]> gcc.gnu.org Git - gcc.git/blob - gcc/cp/ChangeLog
re PR c++/10530 (Cannot access non-dependent type within nested template)
[gcc.git] / gcc / cp / ChangeLog
1 2003-08-10 Nathan Sidwell <nathan@codesourcery.com>
2
3 PR c++/10530
4 * pt.c (dependent_type_p_r): A dependent template-id is a class
5 type with dependent template arguments, or a bound template
6 template parameter.
7 (type_dependent_expression_p): A template function decl cannot
8 have a dependent context.
9
10 2003-08-07 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11
12 PR c++/5767
13 * parser.c (cp_parser_class_name): Return immediately when scope
14 is error_mark_node.
15
16 2003-08-07 Aldy Hernandez <aldyh@redhat.com>
17
18 * cp/Make-lang.in (cp/call.o): Add dependency for target.h.
19
20 * cp/call.c (standard_conversion): Support opaque types.
21 Include target.h.
22 (strip_top_quals): Use cp_build_qualified_type instead of
23 TYPE_MAIN_VARIANT.
24
25 * cp/typeck.c (convert_for_assignment): Support opaque types.
26
27 * testsuite/g++.dg/other/opaque-1.C: New.
28
29 * testsuite/g++.dg/other/opaque-2.C: New.
30
31 2003-08-06 Aldy Hernandez <aldyh@redhat.com>
32
33 * decl.c (grokparms): Use cp_build_qualified_type instead
34 TYPE_MAIN_VARIANT.
35
36 2003-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
37
38 * cxx-pretty-print.h: New file.
39 * cxx-pretty-print.c: Likewise.
40 * error.c (scratch_pretty_printer): Change type.
41 (init_error): Tidy.
42 (dump_aggr_type): Likewise.
43 (dump_global_iord): Likewise.
44 (dump_expr): Likewise.
45 (dump_char): Remove.
46 * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTITCS): Define.
47 (cxx_initialize_diagnostics): New function.
48 * Make-lang.in (CXX_OBJS): Add cp/cxx-pretty-print.o
49 (CXX_PRETTY_PRINT_H): New variable.
50 (cp/cxx-pretty-print.o): New rule.
51 (cp/cp-lang.o): Update dependence.
52 (cp/error.o): Likewise.
53
54 2003-08-05 Steven Bosscher <steven@gcc.gnu.org>
55
56 * cp-tree.h (struct lang_decl): Don't include c_lang_decl.
57 (DECL_DECLARED_INLINE_P): Remove.
58 * decl2.c (import_export_decl): Only look at DECL_DECLARED_INLINE_P
59 if decl is a FUNCTION_DECL. This never made sense, but now it is
60 required to avoid a tree check failure.
61 * decl.c (grokfndecl): Don't touch DID_INLINE_FUNC.
62 * optimize.c (maybe_clone_body): Likewise.
63
64 2003-08-04 Roger Sayle <roger@eyesopen.com>
65
66 * decl.c (cxx_insert_default_attributes): Delete.
67 * cp-tree.h (cxx_insert_default_attributes): Don't prototype.
68 * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Don't define.
69
70 2003-08-03 Nathan Sidwell <nathan@codesourcery.com>
71
72 PR c++/11704
73 * pt.c (type_dependent_expression_p): Cope with COMPONENT_REF with
74 unknown type.
75
76 PR c++/11766
77 * typeck.c (comp_ptr_ttypes_real): Don't loop on pointers to
78 member functions.
79
80 2003-08-02 Nathan Sidwell <nathan@codesourcery.com>
81
82 PR c++/9447
83 * cp-tree.def (USING_DECL): Document its type.
84 * class.c (pushclass): If we're entering a template, push any
85 dependent using decls it has.
86 * decl2.c (do_class_using_decl): Refactor. Type is NULL iff it is
87 a dependent scope.
88 * pt.c (tsubst_decl) <USING_DECL case>: Set type.
89 (tsubst): Remove USING_DECL checks.
90 (type_dependent_expression_p): Remove USING_DECL case.
91 * semantics.c (finish_member_declaration): A USING_DECL's type
92 indicates whether it is dependent.
93
94 2003-08-02 Nathan Sidwell <nathan@codesourcery.com>
95
96 * cp-tree.h (pushclass): Remove unneeded parameter.
97 * class.c (pushclass): Remove unneeded MODIFY parm. Adjust.
98 (push_nested_class): Adjust pushclass call.
99 * pt.c (instantiate_class_template): Likewise.
100 * semantics.c (begin_class_definition): Likewise.
101
102 2003-08-01 Nathanael Nerode <neroden@gcc.gnu.org>
103
104 * typeck2.c (add_exception_specifier): Use 'bool' where appropriate.
105
106 2003-08-01 Mark Mitchell <mark@codesourcery.com>
107
108 PR c++/11697
109 * decl.c (decls_match): Don't ignore the types of template
110 classes.
111
112 PR c++/11744
113 * pt.c (tsubst_copy_and_build): Refine Koenig lookup logic.
114
115 2003-08-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
116
117 PR c++/8442, c++/8806
118 * decl.c (qualify_lookup): Accept TEMPLATE_DECL if types are
119 preferred.
120 (check_elaborated_type_specifier): Add allow_template_p
121 parameter. Check tag mismatch and class template.
122 (xref_tag): Add template_header_p parameter. Add assertion
123 that name is an IDENTIFIER_NODE. Remove implicit typename
124 warning. Simplify lookup process if globalize is true.
125 (cxx_init_decl_processing): Adjust call to xref_tag.
126 (xref_tag_from_type): Likewise.
127 * decl2.c (handle_class_head): Likewise.
128 * parser.c (cp_parser_elaborated_type_specifier,
129 cp_parser_class_head): Likewise.
130 * rtti.c (init_rtti_processing, build_dynamic_cast1,
131 tinfo_base_init, emit_support_tinfos): Likewise.
132 * class.c (is_base_of_enclosing_class): Remove.
133 * pt.c (convert_template_argument): Don't accept RECORD_TYPE as
134 template template argument.
135 * cp-tree.h (xref_tag): Adjust declaration.
136 (is_base_of_enclosing_class): Remove.
137 * NEWS: Document template template argument change.
138
139 2003-08-01 Nathan Sidwell <nathan@codesourcery.com>
140
141 * parser.c (cp_parser_init_declarator,
142 cp_paser_member_declaration): Reformat.
143 * pt.c (lookup_template_class, type_unification_real, unify,
144 type_dependent_expression_p): Reformat.
145
146 PR c++/11295
147 * cp-tree.h (tubst_flags_t): Add tf_stmt_expr_cmpd,
148 tf_stmt_expr_body.
149 (finish_stmt_expr_expr): Declare.
150 * parser.c (cp_parser_primary_expression): Tell
151 cp_parser_compount_statement that it is a statement expression.
152 (cp_parser_statement, cp_parser_labeled_statement,
153 cp_parser_compound_statement, cp_parser_statement_seq_opt): Add
154 in_statement_expr_p parameter.
155 (cp_parser_expression_statement): Likewise. Call
156 finish_stmt_expr_expr for final expression of a statement
157 expression.
158 (cp_parser_for_init_statement,
159 cp_parser_implicitly_scoped_statement,
160 cp_parser_already_scoped_statement, cp_parser_function_definition,
161 cp_parser_try_block, cp_parser_handled): Adjust.
162 * pt.c (tsubst_copy) <STMT_EXPR case>: Pass tf_stmt_expr.
163 (tsubst_expr): Process tf_stmt_expr and tf_stmt_exprs flags.
164 (tsubst_expr) <EXPR_STMT case>: Check tf_stmt_exprs flag.
165 * semantics.c (finish_expr_stmt): Do not deal with statement
166 expressions.
167 (begin_stmt_expr): Clear last_expr_type.
168 (finish_stmt_expr_expr): New.
169 (finish_stmt_expr): Process the value expression.
170
171 * typeck.c (build_compound_expr): If RHS is a TARGET_EXPR, put the
172 compound expr inside the target's initializer.
173
174 PR c++/11525
175 * parser.c (cp_parser_primary_expression): Do not set
176 non-constant-p merely because it is a dependent scope.
177
178 PR c++/9447
179 * decl2.c (do_class_using_decl): Set type to NULL_TREE.
180 * semantics.c (finish_expr_stmt): Do not convert to void in a
181 template.
182
183 2003-07-31 Nathan Sidwell <nathan@codesourcery.com>
184
185 * pt.c (coerce_template_parms): Refactor.
186 (fn_type_unification): Increment processing_template_decl when
187 tsubsting an incomplete set of explicit args.
188
189 PR c++/11347
190 * pt.c (instantiate_class_template): Increment
191 processing_template_decl around the tsubst of a template member
192 class.
193 (tsubst_qualified_id): Assert we do not have a dependent scope.
194
195 * pt.c (coerce_template_template_parms, lookup_template_class,
196 can_complete_type_without_circularity, instantiate_class_template,
197 tsubst_decl, unify): Reformat.
198
199 Thu Jul 31 01:07:41 CEST 2003 Jan Hubicka <jh@suse.cz>
200
201 * decl2.c (maybe_make_one_only): Use mark_referenced.
202 * method.c (use_thunk): Likewsie.
203
204 Wed Jul 30 19:12:48 CEST 2003 Jan Hubicka <jh@suse.cz>
205
206 * class.c (build_vtable_entry_ref): Kill.
207 (build_vtbl_ref_1): Do not call build_vtable_entry_ref.
208 (build_vfn_ref): Do not call build_vtable_entry_ref.
209 * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Kill.
210 * cp-tree.h (prepare_assemble_variable): Kill.
211 * cp-decl.c (prepare_assemble_variable): Kill.
212
213 2003-07-29 Geoffrey Keating <geoffk@apple.com>
214
215 * parser.c (cp_lexer_new_main): Use c_common_no_more_pch instead
216 of setting valid_pch by hand.
217
218 2003-07-29 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
219
220 * decl.c (finish_enum): Initialize underlying_type.
221
222 2003-07-29 Nathan Sidwell <nathan@codesourcery.com>
223
224 PR c++/9447
225 * decl.c (add_binding): Add bval local variable.
226 (push_class_level_binding): Likewise. Allow a USING_DECL to be
227 pushed.
228 * decl2.c (do_class_using_decl): The type of a using decl is
229 unknown.
230 * parser.c (cp_parser_postfix_expression): Refactor unqualified-id
231 function call lookup code.
232 * pt.c (tsubst): A USING_DECL will have unknown type.
233 (tsubst_copy_and_build): Allow a using decl.
234 (type_dependent_expression_p): A USING_DECL will make it
235 dependent.
236 * semantics.c (finish_member_declaration): Push a dependent using
237 declaration.
238
239 2003-07-28 Mark Mitchell <mark@codesourcery.com>
240
241 PR c++/11530
242 * parser.c (cp_parser_postfix_expression): Do not call mark_used.
243 * semantics.c (finish_id_expression): Call mark_used for all
244 declarations.
245
246 2003-07-28 Mark Mitchell <mark@codesourcery.com>
247
248 PR c++/11667
249 * call.c (standard_conversion): Allow all integral->enumeral
250 conversions, after marking them as bad.
251 * decl.c (finish_enum): Make sure that all enumerators are
252 properly converted to the underlying type.
253 (build_enumerator): Set DECL_CONTEXT for namespace-scope
254 enumeration types.
255 * pt.c (tsubst_copy): Adjust handling of CONST_DECLs accordingly.
256 (tsubst_enum): Tidy.
257
258 * Make-lang.in (typeck.o): Depend on convert.h.
259 (class.o): Likewise.
260 (rtti.o): Likewise.
261 * call.c: Include convert.h.
262 (convert_arg_to_ellipsis): Use convert_to_real.
263 * class.c: Include convert.h.
264 (build_base_path): Use convert_to_integer.
265 * rtti.c: Include convert.h.
266 (build_headof): Use convert_to_integer.
267 * typeck.c: Include convert.h.
268 (decay_conversion): Use convert_to_integer.
269 (build_unary_op): Use build_nop.
270 (get_delta_difference): Use convert_to_integer.
271 (build_ptrmemfunc): Avoid unncessary conversions.
272
273 Mon Jul 28 23:55:10 CEST 2003 Jan Hubicka <jh@suse.cz>
274
275 * decl2.c (mark_member_pointers): Verify that member pointer points to
276 the function.
277
278 2003-07-28 Nathan Sidwell <nathan@codesourcery.com>
279
280 * cp-tree.h (begin_compound_stmt): No scope arg is a bool.
281 (finish_compound_stmt): Remove no scope arg.
282 * decl.c (register_dtor_fn): Adjust begin_compound_stmt and
283 end_compound_stmt calls.
284 (expand_static_init, begin_destructor_body, begin_function_body,
285 finish_function_body): Likewise.
286 * decl2.c (start_objects, finish_objects,
287 start_static_storage_duration_function,
288 finish_static_storage_duration_function): Likewise.
289 * init.c (begin_init_stmts, finish_init_stmts,
290 construct_virtual_base, build_vec_init): Likewise.
291 * method.c (do_build_assign_ref, synthesize_method): Likewise.
292 * parser.c (cp_parser_compound_statement,
293 cp_parser_implicitly_scoped_statement,
294 cp_parser_already_scoped_statement): Likewise.
295 * pt.c (tsubst_expr): Likewise.
296 * semantics.c (begin_compound_stmt): No scope arg is a bool.
297 (finish_compound_stmt): Remove no scope arg.
298
299 * error.c (dump_expr) <COMPOUND_EXPR case>: A compound expr is
300 always dyadic.
301
302 2003-07-27 Mark Mitchell <mark@codesourcery.com>
303
304 * call.c (standard_conversion): Tweak handling of
305 pointer-to-member types.
306 * pt.c (tsubst): Correctly qualify pointers-to-data member types.
307 * typeck.c (comp_ptr_ttypes_real): Check qualifiers on
308 pointer-to-data member types.
309
310 2003-07-27 Nathan Sidwell <nathan@codesourcery.com>
311
312 * parser.c (cp_parser_type_parameter): Reformat.
313 (cp_parser_parameter_declaration): Deprecate default args where
314 not allowed.
315
316 2003-07-26 Nathan Sidwell <nathan@codesourcery.com>
317
318 * cfns.h: Rebuilt.
319
320 * cp-tree.h (begin_init_stmts, finish_init_stmts): Remove.
321 (begin_global_stmt_expr, finish_global_stmt_expr): Remove.
322 * init.c (begin_init_stmts): Make static. Return is_global
323 value. Always call begin_stmt_expr.
324 (finish_init_stmts): Make static. Add is_global parm. Always
325 building a stmt tree.
326 (build_aggr_init): Adjust begin_init_stmts, finish_init_stmts calls.
327 (build_vec_init): Likewise. Always building a stmt tree.
328 (expand_default_init): Always building a stmt tree.
329 (get_temp_regvar): Likewise.
330 * semantics.c (begin_global_stmt_expr,
331 finish_global_stmt_expr): Remove.
332
333 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
334
335 * cp-tree.h (build_compound_expr): Take LHS & RHS args.
336 (build_x_compound_expr_from_list): Declare.
337 * typeck.c (build_x_compound_expr_from_list): New.
338 (build_x_compound_expr): Adjust.
339 (build_compound_expr): Remove unreachable code. Take two
340 parameters, adjust.
341 * decl.c (grok_reference_init): Use
342 build_x_compound_expr_from_list.
343 (expand_static_init): Adjust build_compound_expr call.
344 (cxx_maybe_build_cleanup): Likewise.
345 * init.c (perform_member_init): Use
346 build_x_compound_expr_from_list.
347 (build_new_1): Likewise.
348 (build_vec_delete): Adjust build_compound_expr calls.
349 (build_vbase_delete): Likewise.
350 * typeck2.c (store_init_value): Use
351 build_x_compound_expr_from_list.
352 (build_functional_cast): Likewise.
353
354 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
355
356 * cp-tree.h (enum tsubst_flags_t): Add tf_user.
357 * decl.c (make_typename_type): Pass it.
358 * pt.c (lookup_template_class): Use it.
359 (resolve_typename_type): Pass it.
360 * semantics.c (finish_template_type): Pass it.
361
362 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
363
364 PR c++/11617
365 * cp-tree.h (qualified_name_lookup_error): Declare.
366 * pt.c (tsubst_qualified_id): Use qualified_name_lookup_error for
367 errors.
368 (tsubst_expr) <DECL_STMT case>: Likewise.
369 (tsubst_copy_and_build) <COMPONENT_REF case>: Likewise.
370 * semantics.c (qualified_name_lookup_error): New, broken out of ...
371 (finish_id_expression): ... here. Use it.
372
373 2003-07-25 Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
374
375 * cfns.gperf: Add '%%' delimiter to placate gperf 3.0.
376
377 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
378
379 PR c++/11596
380 * pt.c (maybe_fold_nontype_arg, maybe_fold_nontype_args): Remove.
381 (tsubst_template_arg): New.
382 (tsubst_template_arg_vector): Rename to ...
383 (tsubst_template_args): ... this. Accept a TREE_LIST form. Use
384 tsubst_template_arg.
385 (coerce_template_parms): Use tsubst_template_arg for default
386 value.
387 (tsubst_template_parms): Likewise.
388 (tsubst_aggr_type): Adjust.
389 (tsubst_decl): Likewise.
390 (tsubst): Use tsubst_template_arg for a DOMAIN. Adjust.
391 (tsubst_copy) <TEMPLATE_ID_EXPR case>: Use tsubst_template_args.
392
393 2003-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
394
395 * Make-lang.in (cp/error.o): Depend on DIAGNOSTIC_H.
396 * error.c: Use the new pretty-printer framework.
397
398 2003-07-24 Per Bothner <pbothner@apple.com>
399
400 * decl.c (pushdecl_class_level): Don't use push_srcloc/pop_srcloc
401 which causes errors messages to incorrectly mention included files.
402
403 2003-07-24 Mark Mitchell <mark@codesourcery.com>
404
405 * cp-tree.h (convert_to_base_statically): Declare.
406 * call.c (build_special_member_call): Convert INSTANCE to the base
407 type.
408 * class.c (convert_to_base_statically): New method.
409 * init.c (construct_virtual_base): Use it.
410 * method.c (do_build_assign_ref): Fix typo in comment.
411
412 2003-07-24 Jason Merrill <jason@redhat.com>
413
414 * decl.c: Just set truthvalue_* to boolean_*.
415
416 2003-07-24 Nathan Sidwell <nathan@codesourcery.com>
417
418 * decl.c (reshape_init): Remove unreachable code.
419
420 2003-07-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
421
422 PR c++/11513
423 * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): Use current_scope.
424
425 2003-07-23 Mark Mitchell <mark@codesourcery.com>
426
427 PR c++/11645
428 * cp-tree.h (accessible_base_p): Declare.
429 * call.c (build_over_call): Use it.
430 * search.c (accessible_base_p): New function, split out from ...
431 (lookup_base): ... here.
432
433 PR c++/11517
434 * call.c (build_conditional_expr): Use perform_implicit_conversion
435 and error_operand_p. Robustify.
436 * typeck.c (build_unary_op): Use perform_implicit_conversion.
437
438 2003-07-23 Nathan Sidwell <nathan@codesourcery.com>
439
440 PR c++/10953
441 * parser.c (cp_parser_nested_name_specifier): Reset scope on
442 failure.
443 (cp_parser_elaborated_type_specifier): Likewise.
444
445 2003-07-22 Mark Mitchell <mark@codesourcery.com>
446
447 Eliminate use of POINTER_TYPE for pointers-to-members.
448 * call.c (standard_conversion): Rework pointer-to-member handling.
449 Add comments.
450 (add_builtin_candidate): Likewise.
451 (resolve_scoped_fn_name): Remove.
452 (build_conditional_expr): Rework pointer-to-member handling.
453 (compare_ics): Likewise.
454 * class.c (check_field_decls): Use TYPE_PTR_P.
455 * cp-lang.c (cp_var_mod_type_p): Rework pointer-to-member
456 handling.
457 * cp-tree.h (SCALAR_TYPE_P): Use TYPE_PTR_TO_MEMBER_P.
458 (TYPE_PTRMEM_P): Add comment.
459 (TYPE_PTR_P): Simplify.
460 (TYPE_PTROB_P): Correct definition.
461 (TYPE_PTR_TO_MEMBER_P): New macro.
462 (TYPE_PTRMEM_CLASS_TYPE): Adjust.
463 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
464 (resolved_scoped_fn_name): Remove declaration.
465 (build_offset_ref): Change prototype.
466 (resolve_offset_ref): Remove.
467 (comp_target_types): Remove.
468 * cvt.c (cp_convert_to_pointer): Rework pointer-to-member
469 handling.
470 (convert_to_reference): Use can_convert.
471 (ocp_convert): Improve error handling. Rework pointer-to-member
472 handling.
473 (perform_qualification_conversions): Rework pointer-to-member
474 handling.
475 * decl.c (build_ptrmem_type): Handle functions too.
476 (create_array_type_for_decl): Remove OFFSET_TYPE error message.
477 (grokdeclarator): Use OFFSET_TYPE for pointers to data members.
478 (grokparms): Remove OFFSET_TYPE error message.
479 * dump.c (cp_dump_tree): Rework pointer-to-member handling.
480 * error.c (dump_type_prefix): Likewise.
481 * expr.c (cplus_expand_constant): Use build_nop.
482 * init.c (build_offset_ref): Add address_p parameter. Fold in
483 necessary bits from resolve_offset_ref.
484 (resolve_offset_ref): Remove.
485 * parser.c (cp_parser_postfix_expression): Remove special case
486 code for OFFSET_TYPE.
487 * pt.c (convert_nontype_argument): Rework pointer-to-member
488 handling.
489 (convert_template_argument): Likewise.
490 (unify): Likewise.
491 (invalid_nontype_parm_type_p): Likewise.
492 (dependent_type_p_r): Likewise.
493 * rtti.c (get_tinfo_decl): Remove OFFSET_TYPE special case.
494 (target_incomplete_p_): Rework pointer-to-member
495 handling.
496 (get_pseudo_ti_init): Likewise.
497 (get_pseudo_ti_desc): Likewise.
498 * semantics.c (finish_qualified_id_expr): Adjust call to
499 build_offset_ref. Remove use of resolve_offset_ref.
500 * tree.c (pod_type_p): Use TYPE_PTR_TO_MEMBER_P.
501 * typeck.c (target_type): Use TYPE_PTRMEM_P.
502 (type_unknown_p): Remove obsolete code about the time before
503 non-dependent expressions were handled correctly.
504 (qualify_type_recursive): Remove.
505 (composite_pointer_type_r): New function.
506 (composite_pointer_type): Use it.
507 (merge_types): Remove dead comments.
508 (comp_cv_target_types): Remove.
509 (comp_target_types): Likewise.
510 (comp_target_parms): Likewise.
511 (cxx_sizeof_or_alignof_type): Remove OFFSET_TYPE error.
512 (build_indirect_ref): Use TYPE_PTR_TO_MEMBER_P.
513 (build_binary_op): Do not use of comp_target_types.
514 (pointer_diff): Remove OFFSET_TYPE case.
515 (build_unary_op): Adjust pointer-to-member handling.
516 (unary_complex_lvalue): Likewise.
517 (check_for_casting_away_constness): Add description parameter.
518 (build_static_cast): Pass it.
519 (build_reinterpret_cast): Use check_for_casting_away_constness.
520 (build_const_cast): Adjust pointer-to-member handling.
521 (build_c_cast): Likewise.
522 (convert_for_assignment): Remove OFFSET_TYPE error message.
523 (comp_ptr_ttypes_real): Adjust pointer-to-member handling.
524 (comp_ptr_ttypes_reinterpret): Remove.
525 (casts_away_constness_r): Adjust pointer-to-member handling.
526 (casts_away_constness): Liekwise.
527 (strip_all_pointer_quals): Remove.
528 * typeck2.c (digest_init): Adjust pointer-to-member handling.
529 (build_m_component_ref): Likewise.
530
531 2003-07-22 Wolfgang Bangerth <bangerth@dealii.org>
532
533 * lex.c (unqualified_fn_lookup_error): Mention that the error
534 message needs to be kept in synch with the manual.
535
536 2003-07-22 Nathan Sidwell <nathan@codesourcery.com>
537
538 PR c++/11614
539 * decl.c (grokdeclarator): An array member is only a flexible
540 array member if the field itself is the array.
541
542 2003-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
543
544 PR c++/10793
545 * decl.c (xref_basetypes): Handle error_mark_node.
546
547 2003-07-22 Nathan Sidwell <nathan@codesourcery.com>
548
549 * cp-tree.h (enum cp_lvalue_kind): Add clk_packed.
550 * tree.c (lvalue_p_1): Set it.
551 * class.c (check_field): Don't allow non-packed non-POD fields to
552 be packed.
553 * call.c (reference_binding): Need a temporary for all bitfield
554 and packed fields.
555 (convert_like_real): Check it is ok to make a temporary here.
556
557 2003-07-21 Nathan Sidwell <nathan@codesourcery.com>
558
559 * cp-tree.h (hack_identifier): Remove.
560 * method.c (hack_identifier): Remove.
561 * semantics.c (finish_id_expression): Expand hack_identifier
562 here. Simplify.
563
564 2003-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
565
566 * call.c class.c decl.c decl2.c g++spec.c lex.c parser.c pt.c rtti.c
567 semantics.c typeck.c: Remove unnecessary casts.
568
569 2003-07-18 Nathan Sidwell <nathan@codesourcery.com>
570
571 * cp-tree.h (hack_identifier): Remove.
572 * method.c (hack_identifier): Remove.
573 * semantics.c (finish_id_expression): Expand hack_identifier
574 here. Simplify.
575
576 2003-07-18 Nathan Sidwell <nathan@codesourcery.com>
577
578 * cp-tree.h (finish_non_static_data_member): Add object param.
579 * method.c (hack_identifier): Adjust.
580 * pt.c (tsubst_copy_and_build) <COMPONENT_REF case>: Don't search
581 again for a FIELD_DECL.
582 * semantics.c (finish_non_static_data_member): Add object
583 parameter. Always save the DECL in the COMPONENT_REF.
584 * call.c (resolve_scoped_fn_name): Adjust.
585
586 2003-07-17 Zack Weinberg <zack@codesourcery.com>
587
588 * pt.c (get_bindings): Make definition consistent with
589 forward declaration.
590
591 2003-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
592
593 PR c++/7809
594 * friend.c (add_friend): Check access for member functions
595 and templates.
596
597 2003-07-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
598
599 PR c++/10668
600 * typeck.c (build_class_member_access_expr): Improve diagnostic.
601
602 2003-07-16 Mark Mitchell <mark@codesourcery.com>
603
604 PR c++/11547
605 * cp-tree.h (DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P): New
606 macro.
607 (DECL_PRETTY_FUNCTION_P): Use VAR_DECL_CHECK.
608 * decl.c (duplicate_decls): Merge
609 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
610 * parser.c (cp_parser_postfix_expression): Adjust call to
611 cp_parser_initializer_list and
612 cp_parser_parenthesized_expression_list.
613 (cp_parser_parenthesized_expression_list): Add non_constant_p.
614 (cp_parser_new_placement): Adjust call to
615 cp_parser_parenthesized_expression_list.
616 (cp_parser_direct_new_declarator): Likewise.
617 (cp_parser_conditional_expression): Remove.
618 (cp_parser_constant_expression): Parse an assignment-expression,
619 not a conditional-expression.
620 (cp_parser_simple_declaration): Resolve expression/declaration
621 ambiguity more quickly.
622 (cp_parser_mem_initializer): Adjust call to
623 cp_parser_parenthesized_expression_list.
624 (cp_parser_init_declarator): Keep track of whether or not the
625 initializer is a constant-expression.
626 (cp_parser_initializer): Add non_constant_p parameter.
627 (cp_parser_initializer_clause): Likewise.
628 (cp_parser_initializer_list): Likewise.
629 (cp_parser_attribute_list): Adjust call to
630 cp_parser_parenthesized_expression_list.
631 (cp_parser_functional_cast): Likewise.
632 * pt.c (tsubst_decl): Copy
633 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
634 (tsubst_expr): Tweak use of DECL_PRETTY_FUNCTION_P.
635 * semantics.c (finish_id_expression): Use
636 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
637
638 2003-07-16 Neil Booth <neil@daikokuya.co.uk>
639
640 * lang-options.h: Remove.
641
642 2003-07-16 Andrew Pinski <pinskia@physics.uc.edu>
643
644 PR c/10962
645 * class.c (field_decl_cmp): Remove.
646 (resort_field_decl_cmp): Remove.
647 (resort_sorted_fields): Remove.
648 (add_fields_to_vec): Rename to ...
649 (add_fields_to_record_type): this.
650 (finish_struct_1): Change to be using
651 sorted_fields_type's fields.
652 * cp-tree.h (lang_decl): In lang_decl_u3
653 change sorted_fields to be a pointer to
654 sorted_fields_type.
655 (resort_sorted_fields): Remove prototype.
656 * search.c (lookup_field_1): Change to be using
657 sorted_fields_type's fields.
658
659 2003-07-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
660
661 PR c++/5421
662 * decl.c (grokdeclarator): Handle TEMPLATE_ID_EXPR if friend
663 is a member of other class.
664 * friend.c (do_friend): Don't build TEMPLATE_DECL if friend
665 is a specialization of function template.
666
667 2003-07-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
668
669 PR c++/10903
670 * pt.c (convert_nontype_argument): Fix thinko in diagnostic.
671 Improve.
672
673 2003-07-15 Mark Mitchell <mark@codesourcery.com>
674
675 * cp-tree.def (LOOKUP_EXPR): Remove.
676 * cp-tree.h (cp_id_kind): Add CP_ID_KIND_UNQUALIFIED_DEPENDENT.
677 (LOOKUP_EXPR_GLOBAL): Remove.
678 (get_bindings): Remove.
679 (is_aggr_type_2): Remove.
680 * call.c (resolved_scoped_fn_name): Remove support for
681 LOOKUP_EXPR.
682 * decl.c (grokfndecl): Likewise.
683 (grokdeclarator): Likewise.
684 * error.c (dump_decl): Likewise.
685 (dump_expr): Likewise.
686 * friend.c (do_friend): Likewise.
687 * init.c (build_offset_ref): Likewise.
688 * lex.c (unqualified_fn_lookup_error): Use pedwarn. Do not create
689 LOOKUP_EXPRs
690 * mangle.c (write_expression): Remove support for LOOKUP_EXPR.
691 * parser.c (cp_parser_postfix_expression): Modify Koenig lookup
692 test.
693 * pt.c (get_bindings): Give it internal linkage.
694 (check_explicit_specialization): Remove support for LOOKUP_EXPR.
695 (lookup_template_function): Likewise.
696 (for_each_tempalte_parm_r): Likewise.
697 (tsubst_decl): Likewise.
698 (tsubst_qualified_id): Handle template template parameters.
699 (tsubst_copy): Remove support for LOOKUP_EXPR.
700 (tsubst_copy_and_build): Likewise.
701 (most_general_template): Likewise.
702 (value_dependent_expression_p): Likewise.
703 (type_dependent_expression_p): Note that IDENTIFIER_NODEs are
704 always dependent.
705 * semantics.c (perform_koenig_lookup): Do not create
706 IDENTIFIER_NODEs.
707 (finish_fname): Likewise.
708 (finish_id_expression): Likewise.
709 * tree.c (is_aggr_type_2): Remove.
710
711 2003-07-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
712
713 PR c++/11531
714 * typeck.c (check_return_expr): Fix thinko in diagnostic.
715
716 2003-07-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
717
718 PR c++/10108
719 * pt.c (tsubst_decl) <TEMPLATE_DECL>: Add a check for
720 error_mark_node.
721
722 2003-07-14 Mark Mitchell <mark@codesourcery.com>
723
724 PR c++/11509
725 * pt.c (dependent_scope_ref_p): New function.
726 (value_dependent_expression_p): Use it.
727 (type_dependent_expression_p): Likewise.
728
729 * pt.c (tsubst_friend_function): Use reregister_specialization.
730
731 PR c++/7019
732 * cp-tree.h (lookup_qualified_name): Adjust prototype.
733 * decl.c (lookup_qualified_name): Add complain parameter. Adjust
734 call to is_aggr_type.
735 * parser.c (cp_parser_lookup_name): Adjust call to
736 lookup_qualified_name.
737 * pt.c (tsubst_qualified_id): Likewise.
738 (tsubst_copy_and_build): Likewise.
739 * semantics.c (finish_qualified_id_expr): Deal with erroneous
740 expressions.
741
742 2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
743
744 PR c++/11510
745 * call.c (op_error): Properly format REALPART_EXPR and
746 IMAGPART_EXPR.
747 * error.c (dump_expr): Likewise.
748
749 2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
750
751 * error.c (dump_expr): Handle EMPTY_CLASS_EXPR.
752
753 2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
754
755 PR c++/5293
756 * call.c (initialize_reference): Improve diagnostic.
757
758 2003-07-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
759
760 PR c++/11154
761 * pt.c (more_specialized_class): Add full_args parameter.
762 (most_specialized_class): Adjust calls to more_specialized_class.
763 * cp-tree.h (more_specialized_class): Adjust declaration.
764
765 2003-07-14 Dan Nicolaescu <dann@ics.uci.edu>
766
767 * lex.c (enum tree_node_kind): Delete.
768
769 2003-07-13 Mark Mitchell <mark@codesourcery.com>
770
771 PR c++/11503
772 * cp-tree.h (DECL_SELF_REFERENCE_P): New macro.
773 (SET_DECL_SELF_REFERENCE_P): Likewise.
774 * class.c (build_self_reference): Use SET_DECL_SELF_REFERENCE_P.
775 * pt.c (tsubst_decl): Copy it.
776 * search.c (lookup_base): Use DECL_SELF_REFERENCE_P.
777
778 * pt.c (reregister_specialization): Fix thinko in previous change.
779
780 * cp-tree.h (cp_id_kind): New type.
781 (unqualified_name_lookup_error): Change prototype.
782 (unqualified_fn_lookup_error): New function.
783 (do_identifier): Remove.
784 (do_scoped_id): Likewise.
785 (tsubst_copy_and_build): Change prototype.
786 (reregister_specialization): New function.
787 (perform_koenig_lookup): Likewise.
788 (finish_id_expression): Likewise.
789 * call.c (build_method_call): Adjust call to
790 unqualified_name_lookup_error.
791 * decl.c (duplicate_decls): Use reregister_specialization.
792 * lex.c (is_global): Remove.
793 (unqualified_name_lookup_error): Return a value.
794 (do_identifier): Remove.
795 (do_scoped_id): Likewise.
796 (identifier_typedecl_value): Remove.
797 (unqualified_fn_lookup_error): New function.
798 * parser.c (cp_parser_id_kind): Remove.
799 (cp_parser_non_constant_id_expression): Remove.
800 (cp_parser_primary_expression): Use finish_id_expression.
801 (cp_parser_class_or_namespace_name): Use cp_id_kind, not
802 cp_parser_id_kind.
803 (cp_parser_postfix_expression): Use perform_koenig_lookup.
804 (cp_parser_template_argument): Use cp_id_kind.
805 (cp_parser_fold_non_dependent_expr): Adjust call to
806 tsubst_copy_and_build.
807 * pt.c (unregister_specialization): Rename to ...
808 (reregister_specialization): This.
809 (tsubst_friend_function): Use it.
810 (maybe_fold_nontype_arg): Adjust call to tsubst_copy_and_build.
811 (tsubst_qualified_id): Likewise.
812 (tsubst_expr): Likewise.
813 (tsubst_copy_and_build): Add function_p parameter. Use
814 finish_id_expression. Introduce RECUR macro.
815 (tsubst_non_call_postfix_expression): New function.
816 (regenerate_decl_from_template): Use reregister_specialization.
817 * semantics.c (perform_koenig_lookup): New function.
818 (finish_id_expression): Likewise.
819
820 2003-07-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
821
822 * pt.c (push_access_scope_real): Remove.
823 (push_access_scope): Move code from push_access_scope_real.
824 (pop_access_scope): Don't check for TEMPLATE_DECL.
825 (instantiate_template): Defer access checking during template
826 substitution.
827 (regenerate_decl_from_template): Tidy.
828
829 2003-07-11 Nathanael Nerode <neroden@gcc.gnu.org>
830
831 PR c++/11437
832 * operators.def: Add definitions for __imag__, __real__.
833
834 2003-07-11 Nathan Sidwell <nathan@codesourcery.com>
835
836 PR c++/11050
837 * parser.c (cp_parser_expression_list): Rename to ...
838 (cp_parser_parenthesized_expression_list): ... here. Add attribute
839 parameter, parse the surounding parentheses.
840 (cp_parser_skip_to_closing_parenthesis): Add recover and or_comma
841 parameters. Return int.
842 (cp_parser_skip_to_closing_parenthesis or comma): Remove.
843 (cp_parser_postfix_expression): Adjust function call parsing.
844 (cp_parser_new_placement): Adjust.
845 (cp_parser_new_initializer): Likewise.
846 (cp_parser_cast_expression): Likewise.
847 (cp_parser_selection_statement): Likewise.
848 (cp_parser_mem_initializer): Likewise.
849 (cp_parser_asm_definition): Likewise.
850 (cp_parser_init_declarator): Likewise.
851 (cp_parser_declarator): Make
852 cdtor_or_conv_p an int ptr.
853 (cp_parser_direct_declarator): Likewise. Check for a parameter
854 list on cdtors & conv functions.
855 (cp_parser_initializer): Adjust.
856 (cp_parser_member_declaration): Adjust.
857 (cp_parser_attribute_list): Move code into
858 cp_parser_parens_expression_list.
859 (cp_parser_functional_cast): Adjust.
860 * pt.c (type_dependent_expression_p): Erroneous expressions are
861 non-dependent.
862
863 2003-07-11 Geoffrey Keating <geoffk@apple.com>
864
865 * decl.c (cp_finish_decl): Handle 'used' attribute.
866
867 * cp-lang.c (c_reset_state): New dummy routine.
868 * cp-tree.h (finish_file): Move prototype to c-common.h.
869 * parser.c (c_parse_file): Rename from yyparse; don't call finish_file.
870
871 2003-07-11 Mark Mitchell <mark@codesourcery.com>
872
873 PR c++/8327
874 * pt.c (tsubst_qualified_id): Implement suggested resolution for
875 Core Issue 2.
876 (type_dependent_expression_p): Likewise.
877
878 2003-07-10 Mark Mitchell <mark@codesourcery.com>
879
880 * typeck.c (build_binary_op): Do not warn about signed
881 vs. unsigned comparisons in the bodies of templates.
882
883 PR c++/9411
884 * parser.c (cp_parser_postfix_expression): Check dependency of
885 functions.
886
887 2003-07-09 Mark Mitchell <mark@codesourcery.com>
888
889 PR c++/10032
890 * decl.c (cxx_init_decl_processing): With -pedantic, pedwarns are
891 still errors.
892
893 PR c++/10527
894 * error.c (decl_to_string): Do not print default argument
895 expressions.
896
897 * cp-tree.h (break_out_calls): Remove declaration.
898 * tree.c (break_out_calls): Remove.
899 * typeck.c (build_modify_expr): Avoid invalid sharing of trees.
900
901 2003-07-09 Nathan Sidwell <nathan@codesourcery.com>
902
903 PR c++ 9483
904 * class.c (check_field_decls): Pass DECL_NAME to constructor_name_p.
905 * decl2.c (constructor_name_p): Avoid repeated constructor_name
906 calls.
907 * decl.c (grokdeclarator): Refactor ctor/dtor detection.
908
909 2003-07-09 Mark Mitchell <mark@codesourcery.com>
910
911 * typeck.c (build_x_unary_op): Take note of the fact that
912 PREINCREMENT_EXPR and POSTINCREMENT_EXPR are binary operations on
913 trees.
914
915 * parser.c (cp_parser_primary_expression): Preserve the form of
916 qualified expressions in templates, even if they are not
917 dependent.
918 * pt.c (convert_nontype_argument): Handle non-dependent SCOPE_REFs.
919 (tsubst_qualified_id): Likewise.
920 * search.c (accessible_p): Treat everything in the body of a
921 template as accessible.
922
923 2003-07-08 Mark Mitchell <mark@codesourcery.com>
924
925 * cp-tree.def (NON_DEPENDENT_EXPR): New node.
926 * cp-tree.h (build_call_from_tree): Remove.
927 (build_member_call): Likewise.
928 (dependent_template_arg_p): Remove.
929 (any_dependent_template_arguments_p): New function.
930 (dependent_template_id_p): Likewise.
931 (any_type_dependent_arguments_p): Likewise.
932 (build_non_dependent_expr): Likewise.
933 (build_non_dependent_args): Likewise.
934 (build_x_compound_expr): Adjust prototype.
935 * call.c (build_new_method_call): Handle non-dependent expressions
936 correctly.
937 * decl2.c (grok_array_decl): Likewise.
938 (build_offset_ref_call_from_tree): Likewise.
939 (build_call_from_tree): Remove.
940 * error.c (dump_decl): Handle NON_DEPENDENT_EXPR.
941 (dump_expr): Likewise.
942 * init.c (build_member_call): Remove.
943 * mangle.c (write_expression): Update handling for template-ids.
944 * parser.c (cp_parser_primary_expression): Use
945 any_dependent_template_arguments_p. Update constant-expression
946 handling.
947 (cp_parser_postfix_expression): Use
948 any_type_dependent_arguments_p. Simplify call processing.
949 (cp_parser_unary_expression): Simplify.
950 (cp_parser_expression): Adjust for changes to
951 build_x_compound_expr.
952 (cp_parser_template_argument): Implement standard-conforming
953 parsing of non-type template arguments.
954 (cp_parser_direct_declarator): Use
955 cp_parser_fold_non_dependent_expr.
956 (cp_parser_fold_non_dependent_expr): New function.
957 (cp_parser_next_token_ends_template_argument_p): Likewise.
958 * pt.c (convert_template_argument): Do not call
959 maybe_fold_nontype_arg.
960 (tsubst_baselink): Likewise.
961 (tsubst_copy_and_build): Share common code. Make sizeof/alignof
962 processing work correctly for non-dependent expressions. Adjust
963 handling of COMPOUND_EXPR. Simplify call processing.
964 (value_dependent_expression_p): Deal with functional casts and
965 sizeof/alignof correctly.
966 (type_dependent_expression_p): Handle overloaded functions.
967 (any_type_dependent_arguments_p): New function.
968 (any_dependent_template_arguments_p): Likewise.
969 (dependent_template_p): Treat SCOPE_REFs as dependent.
970 (dependent_template_id_p): Simplify.
971 (build_non_dependent_expr): New function.
972 (build_non_dependent_args): Likewise.
973 * semantics.c (finish_stmt_expr): Don't make dependent
974 statement-expresions have void type.
975 (finish_call_expr): Handle non-dependent expressions
976 correctly.
977 * tree.c (lvalue_p_1): Treat NON_DEPENDENT_EXPRs as lvalues.
978 * typeck.c (cxx_sizeof_or_alignof_type): Give the expression
979 type size_t, even in templates.
980 (expr_sizeof): Likewise.
981 (finish_class_member_access_expr): Handle non-dependent expressions
982 correctly.
983 (build_x_indirect_ref): Likewise.
984 (build_x_binary_op): Likewise.
985 (build_x_unary_op): Likewise.
986 (build_x_conditional_expr): Likewise.
987 (build_x_compound_expr): Likewise.
988 * typeck2.c (build_x_arrow): Likewise.
989
990 Wed Jul 9 02:28:39 CEST 2003 Jan Hubicka <jh@suse.cz>
991
992 * cp-lang.c (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): New.
993 * decl.c (duplicate_decls): Use DECL_ESTIMATED_INSNS.
994 (start_function): Use DECL_ESTIMATED_INSNS.
995 * optimize.c (maybe_clone_body): Use DECL_ESTIMATED_INSNS.
996
997 * decl2.c (maybe_emit_vtables): Fix marking vtables as needed in
998 unit-at-a-time
999
1000 2003-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1001
1002 PR c++/11030
1003 * pt.c (instantiate_class_template): Don't call xref_tag to
1004 inject name when the friend class is a specialization.
1005
1006 2003-07-07 Mark Mitchell <mark@codesourcery.com>
1007
1008 * cp-tree.h (build_scoped_method_call): Remove.
1009 (lookup_qualified_name): Remove parameter.
1010 (tsubst_copy_and_build): Declare.
1011 (finish_qualified_object_call_expr): Remove.
1012 (check_accessibility_of_qualified_id): New function.
1013 (finish_qualified_id_expr): Likewise.
1014 (non_reference): Likewise.
1015 (build_expr_from-tree): Remove.
1016 * call.c (non_reference): Remove.
1017 (build_scoped_method_call): Likewise.
1018 (build_method_call): Use error_operand_p. Assert that we are not
1019 processing a template.
1020 (standard_conversion): Use non_reference.
1021 * class.c (build_vtbl_entry_ref): Likewise.
1022 (build_vtbl_ref_1): Likewise.
1023 * cvt.c (build_expr_type_conversion): Use non_reference.
1024 * decl.c (lookup_qualified_name): Remove flags parameter.
1025 (grok_op_properties): Use non_reference.
1026 * decl2.c (grok_array_decl): Likewise.
1027 (build_expr_from_tree): Remove.
1028 (build_offset_ref_call_from_tree): Update comment.
1029 * error.c (parm_to_string): Call reinit_global_formatting_buffer.
1030 * except.c (prepare_eh_types): Use non_reference.
1031 (can_convert_eh): Likewise.
1032 * init.c (build_dtor_call): Avoid using build_method_call.
1033 * mangle.c (write_template_param): Remove misleading comment.
1034 * method.c (locate_copy): Use non_reference.
1035 * parser.c (cp_parser_scope_through_which_access_occurs): Remove.
1036 (cp_parser_primary_expression): Do not create SCOPE_REFs is
1037 non-dependent contexts.
1038 (cp_parser_postfix_expression): Use finish_qualified_id_expr.
1039 (cp_parser_direct_declarator): Use tsubst_copy_and_build, not
1040 build_expr_from_tree.
1041 (cp_parser_lookup_name): Adjust call to lookup_qualified_name.
1042 Use check_accessibility_of_qualified_id.
1043 * pt.c (maybe_fold_nontype_arg): Use tsubst_copy_and_build, not
1044 build_expr_from_tree.
1045 (tsubst_baselink): New function.
1046 (tsubst_qualified_id): Likewise.
1047 (tsubst_copy): Use them. Remove support for METHOD_CALL_EXPR.
1048 (tsubst_expr): Adjust call to lookup_qualified_name.
1049 (tsubst_copy_and_build): Handle SCOPE_REFs specially. Adjust
1050 handling of CALL_EXPRs.
1051 (value_dependent_expression_p): Use INTEGRAL_OR_ENUMERATION_TYPE_P.
1052 * rtti.c (get_tinfo_decl_dynamic): Use non_reference.
1053 * search.c (check_final_overrider): Likewise.
1054 * semantics.c (check_accessibility_of_qualified_id): New function.
1055 (finish_qualified_object_call_expr): Remove.
1056 * typeck.c (target_type): Use non_reference.
1057 (cxx_sizeof_or_alignof_type): Likewise.
1058 (dubious_conversion_warnings): Likewise.
1059 (convert_for_initialization): Likewise.
1060 (non_reference): New function.
1061
1062 2003-07-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1063
1064 * decl.c (print_binding_level, print_other_binding_stack,
1065 print_binding_stack): Merge uses of HOST_PTR_PRINTF with adjacent
1066 stdio calls.
1067 * ptree.c (cxx_print_decl, cxx_print_binding): Likewise.
1068
1069 2003-07-07 Andreas Jaeger <aj@suse.de>
1070
1071 * friend.c: Convert to ISO C90 prototypes.
1072
1073 * Make-lang.in ($(srcdir)/cp/cfns.h): Use ANSI-C as output
1074 language.
1075 * cfns.h: Regenerate.
1076
1077 * typeck.c: Convert remaining prototypes to ISO C90.
1078 * search.c: Likewise.
1079
1080 * decl2.c (build_expr_from_tree): Convert prototype to ISO C90.
1081 * semantics.c (expand_or_defer_fn): Likewise
1082 * mangle.c (discriminator_for_string_literal): Likewise.
1083 * g++spec.c (lang_specific_driver): Likewise.
1084
1085 * search.c (lookup_base_r): Remove unused variable.
1086
1087 2003-07-07 Nathan Sidwell <nathan@codesourcery.com>
1088
1089 * semantics.c: (genrtl_try_block) Adjust emit_line_note
1090 calls.
1091
1092 2003-07-07 Andreas Jaeger <aj@suse.de>
1093
1094 * search.c (lookup_base_r): Remove unused variable.
1095
1096 2003-07-06 Michael Chastain <mec@shout.net>
1097
1098 PR debug/10055
1099 * lex.c (cxx_init): Call push_srcloc and pop_srcloc rather than
1100 assigning to input_filename directly.
1101
1102 2003-07-06 Kazu Hirata <kazu@cs.umass.edu>
1103
1104 * call.c: Fix comment formatting.
1105 * class.c: Likewise.
1106 * cp-tree.h: Likewise.
1107 * decl.c: Likewise.
1108 * decl2.c: Likewise.
1109 * error.c: Likewise.
1110 * method.c: Likewise.
1111 * name-lookup.c: Likewise.
1112 * parser.c: Likewise.
1113 * pt.c: Likewise.
1114 * rtti.c: Likewise.
1115 * search.c: Likewise.
1116 * typeck.c: Likewise.
1117
1118 2003-07-06 Mark Mitchell <mark@codesourcery.com>
1119
1120 PR c++/11345
1121 * search.c (lookup_base_r): Remove is_non_public and
1122 within_current_scope parameters. Remove other dead code.
1123 (lookup_base): Adjust call to lookup_base_r.
1124 (adjust_result_of_qualified_name_lookup): Improve comment.
1125 * semantics.c (finish_call_expr): Use maybe_dummy_object.
1126
1127 2003-07-06 Neil Booth <neil@daikokuya.co.uk>
1128
1129 * cp-lang.c (LANG_HOOKS_HANDLE_FILENAME,
1130 LANG_HOOKS_MISSING_ARGUMENT): Override.
1131
1132 2003-07-05 Mark Mitchell <mark@codesourcery.com>
1133
1134 PR c++/11431
1135 * typeck.c (build_static_cast): Check for reference conversions
1136 earlier.
1137
1138 2003-07-04 Mark Mitchell <mark@codesourcery.com>
1139
1140 * cp-tree.h (perform_integral_promotions): Declare.
1141 * call.c (build_addr_func): Use decay_conversion.
1142 (convert_arg_to_ellipsis): Likewise. Remove misleading comment.
1143 (convert_for_arg_passing): Use perform_integral_promotions.
1144 * cvt.c (build_expr_type_conversion): Use decay_conversion.
1145 (type_promotes_to): Do not return a cv-qualified type.
1146 * decl.c (grok_reference_init): Fix formatting.
1147 (get_atexit_node): Use decay_conversion.
1148 (build_enumerator): Use perform_integral_promotions.
1149 * init.c (build_vec_init): Use decay_conversion.
1150 * semantics.c (finish_expr_stmt): Likewise.
1151 (finish_switch_cond): Use perform_integral_promotions.
1152 * typeck.c (default_conversion): Likewise.
1153 (perform_integral_promotions): New function.
1154 (build_indirect_ref): Use decay_conversion.
1155 (build_array_ref): Use perform_integral_promotions.
1156 (convert_arguments): Use decay_conversion.
1157 (build_unary_op): Use perform_integral_promotions.
1158 (build_c_cast): Use decay_conversion.
1159 (build_modify_expr): Likewise.
1160 (convert_for_initialization): Likewise.
1161 * typeck2.c (build_x_arrow): Likewise.
1162
1163 2003-07-04 Kazu Hirata <kazu@cs.umass.edu>
1164
1165 * call.c: Fix comment typos.
1166 * class.c: Likewise.
1167 * cp-tree.h: Likewise.
1168 * cvt.c: Likewise.
1169 * decl2.c: Likewise.
1170 * decl.c: Likewise.
1171 * init.c: Likewise.
1172 * mangle.c: Likewise.
1173 * parser.c: Likewise.
1174 * pt.c: Likewise.
1175 * search.c: Likewise.
1176 * semantics.c: Likewise.
1177 * tree.c: Likewise.
1178 * typeck.c: Likewise.
1179
1180 2003-07-04 Zack Weinberg <zack@codesourcery.com>
1181
1182 * parser.c (cp_lexer_read_token): No need to handle string
1183 constant concatenation.
1184
1185 2003-07-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1186
1187 * cp-tree.h (GCC_DIAG_STYLE, ATTRIBUTE_GCC_CXXDIAG): Define.
1188 (cp_error_at, cp_warning_at, cp_pedwarn_at): Mark with
1189 ATTRIBUTE_GCC_CXXDIAG.
1190
1191 2003-07-03 Mark Mitchell <mark@codesourcery.com>
1192
1193 * call.c (build_addr_func): Handle bound pointers-to-members.
1194 (build_method_call): Do not call resolve_offset_ref.
1195 (implicit_conversion): Likewise.
1196 (resolve_scoped_fn_name): Use finish_non_static_data_member, not
1197 resolve_offset_ref.
1198 (resolve_args): Do not call resolve_offset_ref.
1199 (build_conditional_expr): Likewise.
1200 (build_new_method_call): Likewise.
1201 * cp-tree.def (OFFSET_REF): Update documentation.
1202 * cvt.c (cp_convert_to_pointer): Update handling of conversions from
1203 pointers to members to pointers.
1204 (ocp_convert): Do not call resolve_offset_ref.
1205 (convert_to_void): Likewise.
1206 (build_expr_type_conversion): Likewise.
1207 * decl2.c (delete_sanity): Likewise.
1208 * init.c (resolve_offset_ref): Simplify greatly.
1209 (build_vec_delete): Do not call resolve_offset_ref.
1210 * parser.c (cp_parser_postfix_expression): Call resolve_offset_ref
1211 if appropriate.
1212 (cp_parser_unary_expression): Use
1213 cp_parser_simple_cast_expression.
1214 (cp_parser_delete_expression): Likewise.
1215 (cp_parser_cast_expression): Likewise.
1216 (cp_parser_pm_expression): Use cp_parser_binary_op.
1217 (cp_parser_simple_cast_expression): New function.
1218 * rtti.c (build_dynamic_cast_1): Do not call resolve_offset_ref.
1219 * semantics.c (finish_increment_expr): Likewise.
1220 (finish_typeof): Likewise.
1221 * tree.c (lvalue_p_1): Do not handle OFFSET_REF.
1222 * typeck.c (require_complete_type): Do not handle OFFSET_REFs.
1223 (decay_conversion): Do not call resolve_offset_ref.
1224 (finish_class_member_access_expr): Likewise.
1225 (convert_arguments): Likewise.
1226 (build_x_binary_op): Handle DOTSTAR_EXPR.
1227 (condition_conversion): Do not call resolve_offset_ref.
1228 (unary_complex_lvalue): Likewise.
1229 (build_static_cast): Likewise.
1230 (build_reinterpret_cast): Likewise.
1231 (build_const_cast): Likewise.
1232 (build_c_cast): Likewise.
1233 (build_modify_expr): Likewise.
1234 (convert_for_assignment): Likewise.
1235 (convert_for_initialization): Likewise.
1236 * typeck2.c (build_x_arrow): Likewise.
1237 (build_m_component_ref): Simplify.
1238
1239 * call.c (build_scoped_method_call): Use convert_to_void.
1240 (build_method_call): Likewise.
1241 * class.c (check_field_decls): Remove dead code.
1242 * cvt.c (convert_from_reference): Remove OFFSET_TYPE handling.
1243 * decl2.c (grok_array_decl): Remove dead code.
1244 (arg_assoc_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
1245 as pointer-to-member representation.
1246 * init.c (build_offset_ref): Tidy.
1247 (build_vec_delete_1): Use convert_to_void.
1248 * mangle.c (write_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
1249 as pointer-to-member representation.
1250
1251 2003-07-03 Nathan Sidwell <nathan@codesourcery.com>
1252
1253 PR c++/9162
1254 * decl.c (grokdeclarator): Return friend decls, not
1255 void_type_node.
1256 * decl2.c (grokfield): Alter friend decl check.
1257 * parser.c (struct cp_parser): Document default_arg chain on
1258 unparsed_functions_queue.
1259 (cp_parser_save_default_args): New.
1260 (cp_parser_init_declarator, cp_parser_function_definition,
1261 cp_parser_member_declaration): Call it.
1262 (cp_parser_class_specifier): Remove unused variable. Alter
1263 processing of unparsed_functions_queue.
1264
1265 2003-07-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1266
1267 * class.c (add_method, check_field_decl): Fix format specifier.
1268 * decl.c (duplicate_decls, pushdecl, check_goto,
1269 fixup_anonymous_aggr, maybe_commonize_var, grokdeclarator,
1270 start_enum): Likewise.
1271 * decl2.c (ambiguous_decl): Likewise.
1272 * pt.c (redeclare_class_template): Likewise.
1273
1274 2003-07-02 Nathan Sidwell <nathan@codesourcery.com>
1275
1276 PR c++/10219
1277 * pt.c (type_unification_real): Don't unify exprs of error type.
1278 * tree.c (error_type): Don't die on error_type.
1279
1280 PR c++/9779
1281 * decl2.c (arg_assoc_class): Don't die on NULL type.
1282 * typeck.c (type_unknown_p): Don't die on untyped expressions.
1283
1284 2003-07-01 Mark Mitchell <mark@codesourcery.com>
1285
1286 PR c++/6949
1287 * decl2.c (grokfield): Create TEMPLATE_DECLs for methods in local
1288 classes.
1289
1290 2003-07-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1291
1292 * error.c (locate_error): %P takes an `int', not a `tree'.
1293
1294 Wed Jul 2 00:36:48 CEST 2003 Jan Hubicka <jh@suse.cz>
1295
1296 * decl2.c (defer_fn): Set DECL_DEFER_OUTPUT.
1297 (finish-file): Do not process function with DECL_DEFER_OUTPUT clear;
1298 clear DECL_DEFER_OUTPUT once function is processed; avoid flags
1299 massaging.
1300
1301 * cp-tree.h (DECL_NEEDED_P): Support unit-at-a-time
1302 (expand_or_defer_fn): Declare.
1303 (lower_function): Declare.
1304 * decl.c (start_cleanup_fn): Use expand_or_defer_fn.
1305 * decl2.c: Include cgraph.h and varpool.h
1306 (maybe_emit_vtables): Make explicit instantations as needed.
1307 (mark_member_pointers, lower_function): New functions.
1308 (finish_file): Do unit-at-a-time.
1309 * method.c (synthesize_method): Use expand_or_defer_fn.
1310 * optimize.c (maybe_clone_body): Use expand_or_defer_fn.
1311 * parser.c (cp_parser_function_definition_after_decl): Use
1312 expand_or_defer_fn.
1313 * pt.c (instantiate_decl): Likewise.
1314 * semantics.c: Include cgraph.h
1315 (expand_or_defer_fn): Break out from ...
1316 (expand_body): ... here; deal with unit-at-a-time.
1317 * cp-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION,
1318 LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Define.
1319
1320 2003-07-01 Mark Mitchell <mark@codesourcery.com>
1321
1322 * call.c (resolve_scoped_fn_name): Return error_mark_node for
1323 erroneous cases.
1324
1325 2003-07-01 Mark Mitchell <mark@codesourcery.com>
1326
1327 PR c++/11149
1328 * call.c (resolve_scoped_fn_name): Check that the qualifying scope
1329 is a class type.
1330
1331 2003-07-01 Giovanni Bajo <giovannibajo@libero.it>
1332
1333 PR c++/8046
1334 * error.c (dump_decl): Handle BIT_NOT_EXPR as
1335 pseudo destructor calls.
1336
1337 2003-07-01 Nathan Sidwell <nathan@codesourcery.com>
1338
1339 * cp-tree.h (define_label): Replace filename and lineno
1340 arguments with a location_t.
1341 * decl.c (pop_label): Adjust define_label call.
1342 (define_label): Replace filename and lineno arguments with a
1343 location_t.
1344 * semantics.c (finish_label): Adjust define_label call.
1345
1346 2003-07-01 Mark Mitchell <mark@codesourcery.com>
1347
1348 PR c++/9559
1349 * decl2.c (grokfield): Do not build NOP_EXPRs around the
1350 error_mark_node.
1351
1352 2003-06-30 Neil Booth <neil@daikokuya.co.uk>
1353
1354 * Make-lang.in: Update.
1355 * cp-lang.c (c_language): Define.
1356 (LANG_HOOKS_INIT_OPTIONS): Use common hook.
1357 * cp-tree.h (cxx_init_options): Remove.
1358 * lex.c: Don't include diagnostic.h.
1359 (cxx_init_options): Remove.
1360
1361 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
1362
1363 PR c++/4933
1364 * error.c (dump_expr): Support correctly the COMPOUND_EXPR
1365 tree generated within a template. Use dump_expr to dump an
1366 expression sizeof.
1367
1368 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
1369
1370 * mangle.c (write_expression): Exit gracefully when trying to
1371 mangle a CALL_EXPR.
1372
1373 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
1374
1375 PR c++/10750
1376 * parser.c (cp_parser_primary_expression): A VAR_DECL with a
1377 (value- or type-) dependent expression as DECL_INITIAL is a
1378 valid constant-expression (at parser time).
1379
1380 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
1381
1382 PR c++/11106
1383 * error.c (dump_decl): Call dump_decl to dump the DECL_NAME for a
1384 USING_DECL, instead of print_tree_identifier.
1385
1386 2003-06-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
1387
1388 * cp-tree.h (language_to_string): Adjust declaration.
1389 * dump.c (cp_dump_tree): Adjust usage.
1390 * error.c (dump_char): Use output_formatted_scalar. Tidy.
1391 (parm_to_string): Lose unused parameter. Tidy.
1392 (expr_to_string): Likewise.
1393 (code_to_string): Likewise.
1394 (language_to_string): Likewise.
1395 (op_to_string): Likewise.
1396 (assop_to_string): Likewise.
1397 (digit_buffer): Remove.
1398 (dump_type): Format builtin vector type as __vector__.
1399
1400 2003-06-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
1401
1402 * error.c (print_integer): Remove.
1403 (dump_type_suffix): Adjust.
1404 (dump_expr): Likewise.
1405
1406 2003-06-28 Nathan Sidwell <nathan@codesourcery.com>
1407
1408 * error.c (print_instantiation_partial_context): Take a
1409 location_t.
1410 (print_instantiation_full_context): Adjust.
1411 (print_instantiation_context): Adjust.
1412
1413 * cp-tree.h (cp_line_of, cp_file_of): Remove.
1414 * error.c (cp_line_of, cp_file_of): Merge into ...
1415 (location_of): ... here. Make static, return a location_t.
1416 (cp_error_at, cp_warning_at, cp_pedwarn_at): Adjust.
1417
1418 2003-06-28 Nathan Sidwell <nathan@codesourcery.com>
1419
1420 PR c++/10784
1421 * call.c (joust): Move warn_conversion check outwards.
1422
1423 2003-06-27 Zack Weinberg <zack@codesourcery.com>
1424
1425 * decl.c (build_typename_type)
1426 * mangle.c (write_template_template_arg)
1427 * parser.c (cp_parser_scope_through_which_access_occurs)
1428 * pt.c (push_access_scope_real, push_access_scope, pop_access_scope)
1429 * repo.c (get_base_filename)
1430 * semantics.c (maybe_convert_cond):
1431 Mark the definition static, matching the forward declaration.
1432
1433 2003-06-27 Mark Mitchell <mark@codesourcery.com>
1434
1435 PR c++/10468
1436 * pt.c (tsubst): Handle qualified TYPEOF_TYPEs correctly.
1437
1438 2003-06-27 Mark Mitchell <mark@codesourcery.com>
1439
1440 PR c++/10796
1441 * decl.c (finish_enum): Implement DR377.
1442
1443 * decl.c (cp_finish_decl): Don't make variables with reference
1444 type readonly while they are being initialized.
1445
1446 2003-06-26 Mark Mitchell <mark@codesourcery.com>
1447
1448 PR c++/11332
1449 * typeck.c (build_static_cast): Avoid returning expressions with
1450 reference type.
1451
1452 2003-06-26 Nathan Sidwell <nathan@codesourcery.com>
1453
1454 * call.c (build_op_delete_call): Use strip_array_call. Correct
1455 error message to say 'delete' or 'delete[]'.
1456
1457 2003-06-26 Giovanni Bajo <giovannibajo@libero.it>
1458
1459 PR c++/8266
1460 * pt.c (check_explicit_specialization): When looking up a
1461 template function from an identifier outside class-scope, bind
1462 it to CP_DECL_CONTEXT.
1463
1464 2003-06-25 Mark Mitchell <mark@codesourcery.com>
1465
1466 PR c++/10990
1467 * search.c (lookup_base_r): Rely on accessible_p, rather than
1468 trying to emulate that logic here.
1469
1470 PR c++/10931
1471 * call.c (convert_like): Pass issue_conversion_warnings.
1472 (convert_like_with_context): Likewise.
1473 (convert_like_real): Add issue_conversion_warnings parameter.
1474 (perform_direct_initialization_if_possible): New function.
1475 * cp-tree.h (perform_direct_initialization_if_possible): Declare it.
1476 * typeck.c (check_for_casting_away_constness): New function.
1477 (build_static_cast): Rewrite.
1478
1479 2003-06-24 Nathan Sidwell <nathan@codesourcery.com>
1480
1481 * call.c (enforce_access): Assert we get a binfo.
1482 (build_op_delete_call): Pass a binfo to
1483 perform_or_defer_access_check.
1484 * class.c (alter_access): Likewise.
1485 * decl.c (make_typename_type): Likewise.
1486 (make_unbound_class_template): Likewise.
1487 * lex.c (do_identifier): Likewise.
1488 * method.c (hack_identifier): Likewise.
1489 * parser.c (cp_parser_lookup_name): Likewise.
1490 * search.c (lookup_member): Likewise. Move IDENTIFIER_CLASS_VALUE
1491 test.
1492 * semantics.c (finish_non_static_data_member): Likewise.
1493 (perform_or_defer_access_check): Expect a binfo.
1494 * typeck.c (comptypes): Expect types.
1495
1496 * mangle.c (find_substitution): Don't pass a non-type to same_type_p
1497 * friend.c (make_friend_class): Likewise.
1498 * pt.c (check_default_tmpl_args): Likewise.
1499 (lookup_template_class): Likewise.
1500
1501 Tue Jun 24 15:30:05 CEST 2003 Jan Hubicka <jh@suse.cz>
1502
1503 * method.c (thunk_labelno): Move outside ifdef block to make garbage
1504 collector happy.
1505
1506 Tue Jun 24 13:52:34 CEST 2003 Jan Hubicka <jh@suse.cz>
1507
1508 * class.c (build_vtable): Make vtables.
1509 * cp-tree.h (DECL_VTABLE_OR_VTT_P): New macro.
1510 * decl2.c (output_vtable_inherit): Rename to ...
1511 (prepare_assemble_variable): ... this one; change interface.
1512 (maybe_emit_vtables): Do not call output_vtable_inherit.
1513 * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Define.
1514 * cp-tree.h (prepare_assemble_variable): New.
1515
1516 2003-06-23 Andrew Pinski <pinskia@physics.uc.edu>
1517
1518 * method.c: add prototype for make_alias_for_thunk.
1519 (thunk_labelno, make_alias_for_thunk): only define
1520 if ASM_OUTPUT_DEF is defined.
1521
1522 2003-06-23 Jakub Jelinek <jakub@redhat.com>
1523
1524 * method.c (thunk_labelno): New variable.
1525 (make_alias_for_thunk): New function.
1526 (use_thunk): Use it if defined ASM_OUTPUT_DEF. Put the thunk
1527 into the same section as the function it is calling.
1528 Include gt-cp-method.h.
1529 * Make-lang.in (gt-cp-method.h): Depend on s-gtype.
1530 (cp/method.o): Depend on gt-cp-method.h.
1531 * config-lang.in (gtfiles): Add $(srcdir)/cp/method.c.
1532
1533 Mon Jun 23 19:41:27 CEST 2003 Jan Hubicka <jh@suse.cz>
1534
1535 * decl.c (register_dtor_fn): Mark cleanup as used.
1536 * decl2.c (mark_vtable_entries): Skip nops.
1537 * rtti.c (get_tinfo_ptr): Mark tinfo as used.
1538 (build_dynamic_cast_1): Likewise.
1539 (tinfo_base_init): Likewise.
1540 (emit_tinfo_decl): Likewise.
1541
1542 2003-06-23 Jakub Jelinek <jakub@redhat.com>
1543
1544 * mangle.c (hash_type): Val is the TREE_LIST itself, not a pointer
1545 to it.
1546
1547 2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
1548
1549 PR c++/10784
1550 * call.c (joust): Warn about choosing conversion sequence only if
1551 -Wconversion.
1552
1553 2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
1554
1555 PR c++/10864
1556 * call.c (op_error): Tidy.
1557 * error.c (dump_expr): Properly format 'T()' when T is an
1558 aggregate type.
1559
1560 2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
1561
1562 PR c++/10915
1563 * decl.c (grok_op_properties): Warn possible confusing conversion
1564 only if -Wconversion.
1565
1566 2003-06-20 Mark Mitchell <mark@codesourcery.com>
1567
1568 PR c++/10749
1569 * parser.c (cp_parser_class_head): See through dependent names
1570 when parsing a class-head.
1571
1572 PR c++/10845
1573 * pt.c (try_class_unification): Correct handling of member class
1574 templates.
1575
1576 2003-06-20 Nathan Sidwell <nathan@codesourcery.com>
1577
1578 * semantics.c (genrtl_finish_function): Adjust
1579 expand_function_end call.
1580
1581 2003-06-19 Mark Mitchell <mark@codesourcery.com>
1582
1583 PR c++/10939
1584 * pt.c (tsubst_decl): Do not try to substitute into non-dependent
1585 functions.
1586 (value_dependent_expression_p): Correct logic for FUNCTION_DECLs.
1587
1588 PR c++/9649
1589 * cp-tree.h (pushdecl_class_level): Change prototype.
1590 (push_class_level_binding): Likewise.
1591 * decl.c (add_binding): Reject duplicate static data members.
1592 (pushdecl_class_level): Return a value indicating whether or not
1593 the binding was valid.
1594 (push_class_level_binding): Likewise.
1595 * semantics.c (finish_member_declaration): Don't keep invalid
1596 declarations.
1597
1598 PR c++/11041
1599 * call.c (initialize_reference): Do not use cp_finish_decl to emit
1600 temporary variables.
1601 * cp-tree.h (static_aggregates): Declare.
1602 (pushdecl_top_level_and_finish): Likewise.
1603 * decl.c (pushdecl_top_level_1): New function.
1604 (pushdecl_top_level): Use it.
1605 (pushdecl_top_level_and_finish): New function.
1606 (initialize_local_var): Remove redundant code.
1607 (cp_finish_decl): Remove support for RESULT_DECLs. Don't check
1608 building_stmt_tree.
1609 * decl.h (static_aggregates): Remove.
1610 * decl2.c (get_guard): Use pushdecl_top_level_and_finish.
1611 * rtti.c (get_tinfo_decl): Use pushdecl_top_level_and_finish.
1612 (tinfo_base_init): Likewise.
1613
1614 2003-06-19 Matt Austern <austern@apple.com>
1615
1616 PR c++/11228
1617 * init.c (build_zero_init): Assert that number of array elements
1618 is an integer constant.
1619 (build_default_init) Don't use build_zero_init for arrays with
1620 variable number of elements.
1621
1622 2003-06-19 Andreas Jaeger <aj@suse.de>
1623
1624 * cp-tree.h: Remove duplicated declarations.
1625
1626 2003-06-18 Nathanael Nerode <neroden@gcc.gnu.org>
1627
1628 * pt.c: Convert to ISO C.
1629 * semantics.c: Convert to ISO C.
1630
1631 2003-06-18 Nathan Sidwell <nathan@codesourcery.com>
1632
1633 * cp-tree.h (comp_except_specs, compparms, cp_has_mutable_p,
1634 at_least_as_qualified_p, more_qualified_p): Return bool.
1635 * typeck.c: ANSIFY function definitions.
1636 (comp_array_types): Take redeclaration bool parameter.
1637 (comptypes): Rearrange STRICT handling.
1638 (at_least_as_qualified_p, more_qualified_p,
1639 comp_cv_qualification): Cache cv quals.
1640 (compparms): Rearrange loop.
1641
1642 2003-06-18 Nathan Sidwell <nathan@codesourcery.com>
1643
1644 * cp-tree.h (COMPARE_RELAXED): Rename to ...
1645 (COMPARE_DERIVED): ... here. Adjust comment.
1646 (resolve_typename_type_in_current_instantiation): Remove.
1647 (cp_tree_equal, comptypes): Return a bool.
1648 * cvt.c (convert_to_reference): Adjust comptypes call.
1649 * pt.c (template_args_equal, unify,): Adjust cp_tree_equal call.
1650 (resolve_typename_type_in_current_instantiation): Remove.
1651 * tree.c (cp_tree_equal): Return bool. Cope with TEMPLATE_DECLs and
1652 IDENTIFIER_NODEs. Abort if undeciderable. Adjust recursive
1653 calls. Refactor code.
1654 * typeck.c (comp_array_types): Return bool. Lose callback.
1655 parameter. Adjust cp_tree_equal calls.
1656 (comptypes): Return bool. Adjust strict handling. Remove relaxed
1657 enumeration and java type handling. Deal with typename types here.
1658 Adjust recursive and cp_tree_equals calls. Adjust base and derived
1659 checking.
1660 (comp_target_types): Remove unreachable code. Adjust
1661 same_or_base_type_p calls.
1662 (ptr_reasonably_similar): Adjust base and derived check.
1663
1664 * typeck.c (maybe_warn_about_returning_address_of_local): Remove
1665 unused calculation.
1666 (check_return_expr): Adjust error messages.
1667 * cp-tree.def (SCOPE_REF): Correct comment.
1668
1669 2003-06-17 Mark Mitchell <mark@codesourcery.com>
1670
1671 * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
1672 string again.
1673
1674 2003-06-17 Robert Abeles <rabeles@archaelogic.com>
1675
1676 * optimize.c (dump_function): Form complete flag name by
1677 prefixing 'fdump-' to string returned by dump_flag_name().
1678
1679 2003-06-17 Mark Mitchell <mark@codesourcery.com>
1680
1681 * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
1682 string.
1683
1684 2003-06-17 Jason Merrill <jason@redhat.com>
1685
1686 PR c++/10929
1687 * decl.c (grokfndecl): Don't mark a function inline for
1688 -finline-functions if it isn't defined.
1689
1690 2003-06-17 Mark Mitchell <mark@codesourcery.com>
1691
1692 PR c++/10712
1693 * class.c (handle_using_decl): Robustify.
1694
1695 PR c++/11105
1696 * cp-tree.h (DECL_CONV_FN_TYPE): New method.
1697 * mangle.c (struct globals): Remove internal_mangling_p.
1698 (write_unqualified_name): Use DECL_CONV_FN_TYPE.
1699 (write_template_parm): Don't write out the level number.
1700 (conv_type_names): New variable.
1701 (hash_type): New function.
1702 (compare_type): Likewise.
1703 (mangle_conv_op_name_for_type): Don't try to mangle conversion
1704 operator names.
1705 * search.c (lookup_conversion_operator): New function.
1706 (lookup_fnfields_1): Use it.
1707
1708 2003-06-17 Andreas Jaeger <aj@suse.de>
1709
1710 * except.c: Remove duplicate declaration of push_eh_cleanup.
1711
1712 * call.c: Remove extra declaration of inhibit_warnings.
1713
1714 2003-06-16 Nathanael Nerode <neroden@gcc.gnu.org>
1715
1716 2003-06-16 Jens-Michael Hoffmann <jensmh@gmx.de>
1717 * mangle.c: Convert to ISO C.
1718
1719 2003-06-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1720
1721 * cp/decl.c, cp/pt.c, cp/search.c, cp/tree.c: Don't use the PTR
1722 macro.
1723
1724 2003-06-16 Nathanael Nerode <neroden@gcc.gnu.org>
1725
1726 * tree.c: Convert to ISO C.
1727
1728 2003-06-16 Kazu Hirata <kazu@cs.umass.edu>
1729
1730 * cp-tree.h: Follow spelling conventions.
1731 * mangle.c: Likewise.
1732 * method.c: Likewise.
1733 * parser.c: Likewise.
1734
1735 2003-06-14 Nathan Sidwell <nathan@codesourcery.com>
1736
1737 * decl.c (start_function): Adjust init_function_start call.
1738 * method.c (use_thunk): Likewise.
1739 * semantics.c (genrtl_start_function): Likewise.
1740
1741 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
1742
1743 * Make-lang.in: Remove c-options.o.
1744
1745 2003-06-13 Nathanael Nerode <neroden@gcc.gnu.org>
1746
1747 * lex.c: Convert to ISO C.
1748
1749 2003-05-19 Jens-Michael Hoffmann <jensmh@gmx.de>
1750 * init.c: removes use of PARAMS macro. Use ISO style function
1751 declarations. (Not copyright-significant change.)
1752
1753 * rtti.c: Remove PARAMS.
1754
1755 * typeck2.c: Convert to ISO C.
1756
1757 2003-06-12 Mark Mitchell <mark@codesourcery.com>
1758
1759 PR c++/10635
1760 * typeck.c (build_c_cast): Check that the destination type is
1761 complete.
1762
1763 2003-06-11 Mark Mitchell <mark@codesourcery.com>
1764
1765 PR c++/10432
1766 * cp-tree.h (finish_declarator): Remove.
1767 * decl.c (cp_finish_decl): Make sure to pop_nested_class even for
1768 erroneous declarations.
1769 * semantics.c (finish_declarator): Remove.
1770
1771 2003-06-11 Roger Sayle <roger@eyesopen.com>
1772
1773 * decl2.c (generate_ctor_or_dtor_function): Avoid expanding a
1774 global static constructor/destructor if it will be empty, i.e.
1775 either doesn't call any ctors/dtors or only calls pure or const
1776 ctors/dtors.
1777
1778 2003-06-11 Mark Mitchell <mark@codesourcery.com>
1779
1780 * mangle.c (tm_p.h): Include it.
1781 * Make-lang.in (cp/mangle.o): Depend on $(TM_P_H).
1782
1783 PR c++/11131
1784 * tree.c (cp_cannot_inline_fn): Check for "inline" before
1785 instantiation.
1786
1787 2003-06-10 Jason Merrill <jason@redhat.com>
1788
1789 PR c++/10968
1790 * pt.c (mark_decl_instantiated): Clear DECL_COMDAT.
1791
1792 2003-06-10 Andrew Pinski <pinskia@physics.uc.edu>
1793
1794 * decl.c (start_cleanup_fn): Move static 'counter' out, mark with GTY.
1795 (start_cleanup_cnt): New.
1796
1797 2003-06-10 Mark Mitchell <mark@codesourcery.com>
1798
1799 PR c++/11131
1800 * cp-tree.h (template_for_substitution): Declare.
1801 * decl2.c (mark_used): Use it when figuring out whether or not a
1802 function is inline.
1803 * pt.c (template_for_substitution): Give it external linkage.
1804 * tree.c (cp_cannot_inline_tree_fn): Instantiate as early as
1805 possible.
1806
1807 2003-06-09 Zack Weinberg <zack@codesourcery.com>
1808
1809 PR 8861
1810 * mangle.c (write_real_cst): New function. Implement
1811 ABI-compliant mangling of floating-point literals when
1812 -fabi-version>=2; provide backward compatibility with 3.3 when
1813 -fabi-version=1 (with warning). Clarify commentary.
1814 (write_template_arg_literal): Use write_real_cst.
1815
1816 2003-06-07 Andreas Jaeger <aj@suse.de>
1817
1818 * cp/decl.c (xref_tag): Remove undefined macro NONNESTED_CLASSES.
1819
1820 2003-06-07 Neil Booth <neil@daikokuya.co.uk>
1821
1822 * cp-lang.c (LANG_HOOKS_DECODE_OPTON): Drop.
1823 (LANG_HOOKS_HANDLE_OPTION): Override.
1824 * cp-tree.h (cxx_init_options): Update.
1825 * lex.c (cxx_init_options): Update.
1826
1827 Thu Jun 5 18:33:40 CEST 2003 Jan Hubicka <jh@suse.cz>
1828
1829 * Make-lang.in: Add support for stageprofile and stagefeedback
1830
1831 2003-06-04 J"orn Rennecke <joern.rennecke@superh.com>
1832
1833 * decl.c (grokdeclarator): Error_mark_node in, error_mark_node out.
1834
1835 2003-06-04 Andreas Jaeger <aj@suse.de>
1836
1837 * g++spec.c (lang_specific_driver): Remove ALT_LIBM usage.
1838
1839 2003-06-03 Jason Merrill <jason@redhat.com>
1840
1841 * cp/cp-tree.h (CP_AGGREGATE_TYPE_P): Accept vectors.
1842
1843 * cp/decl.c (reshape_init): Handle vectors.
1844
1845 * testsuite/g++.dg/init/array10.C: New.
1846
1847 2003-06-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1848
1849 PR c++/10940
1850 * pt.c (check_explicit_specialization): Check for 'static'
1851 earlier.
1852
1853 2003-05-31 Diego Novillo <dnovillo@redhat.com>
1854
1855 * class.c (dump_array): Call CONSTRUCTOR_ELTS to access
1856 the operand of a CONSTRUCTOR node.
1857
1858 2003-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
1859
1860 * decl.c (cp_binding_level::this_entity): Rename from this_class.
1861 (cxx_scope_descriptor): New function.
1862 (cxx_scope_debug): Likewise.
1863 (push_binding_level): Use it.
1864 (pop_binding_level): Likewise.
1865 (suspend_binding_level): Likewise.
1866 (resume_binding_level): Likewise.
1867 (pushlevel_class): Adjust use of this_class.
1868 (pushtag): Likewise.
1869 (lookup_name_real): Likewise.
1870 (global_scope_name): New variable.
1871 (initialize_predefined_identifiers): Initialize it.
1872 (push_namespace): Use it.
1873 (make_cxx_scope): New function.
1874 (pushlevel): Use it.
1875 (pushlevel_class): Likewise.
1876 (push_binding_level): Simplify. Loose the last two arguments.
1877 (make_binding_level): Remove.
1878 (initial_push__namespace_scope): New function.
1879 (push_namespace): Use it. Simplify.
1880 (cxx_init_decl_processing): Likewise.
1881 (declare_namespace_level): Remove.
1882
1883 2003-05-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1884
1885 PR c++/10956
1886 * pt.c (instantiate_decl): Don't use full template arguments if
1887 we are dealing with specializations.
1888
1889 2003-05-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
1890
1891 * decl.c (ENABLE_SCOPE_CHECKING): Rename from DEBUG_BINDING_LEVELS.
1892 (binding_depth): Unconditionally define.
1893 (is_class_level): Likewise.
1894 (indent): Likewise. Take an indenting parameter.
1895 (push_binding_level): Remove conditional definittion.
1896 (pop_binding_level): Likewise.
1897 (suspend_binding_level): Likewise.
1898 (resume_binding_level): Likewise.
1899 (pushlevel): Likewise.
1900 (pushlevel_class): Likewise.
1901 (poplevel_class): Likewise.
1902 (pop_everything): Likewise.
1903
1904 2003-05-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
1905
1906 * name-lookup.h (global_scope_p): New macro.
1907 * decl.c (pop_binding_level): Use it. Don't refer directly to
1908 global_binding_level.
1909 (suspend_binding_level): Likewise.
1910 (global_bindings_p): Likewise.
1911 (print_other_binding_stack): Likewise.
1912 (print_binding_stack): Likewise.
1913 (maybe_push_to_top_level): Likewise.
1914 (pushdecl_namespace_level): Likewise.
1915 (cxx_init_decl_processing): Likewise.
1916 (start_decl): Likewise.
1917 (cp_finish_decl): Likewise.
1918 (start_function): Likewise.
1919 (global_binding_level): Remove.
1920
1921 2003-05-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1922
1923 * parser.c (cp_parser_explicit_instantiation): Restore old
1924 access before template instantiation.
1925
1926 2003-05-23 Geoffrey Keating <geoffk@apple.com>
1927
1928 * lang-specs.h: Use -o to specify preprocessor's output file.
1929 Make -no-integrated-cpp work when building PCH files.
1930
1931 2003-05-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1932
1933 PR c++/10682
1934 * pt.c (instantiate_class_template): Use DECL_ARTIFICIAL to
1935 check for implicitly created typedef to an enum.
1936
1937 2003-05-21 Jason Merrill <jason@redhat.com>
1938
1939 * init.c (build_vec_delete): Copy the address into a temporary
1940 variable before calling build_vec_delete_1.
1941 * decl2.c (delete_sanity): Don't call stabilize_reference.
1942
1943 2003-05-21 Nathan Sidwell <nathan@codesourcery.com>
1944
1945 * pt.c (register_specialization): Update the decl's location,
1946 if necessary.
1947 (check_explicit_specialization): Likewise.
1948
1949 2003-05-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1950
1951 * error.c (dump_expr): Use HOST_WIDE_INT_PRINT_DOUBLE_HEX.
1952
1953 2003-05-21 Danny Smith <dannysmith@users.sourceforge.net>
1954
1955 PR c++/9738
1956 * decl.c (duplicate_decls): Re-invoke make_decl_rtl
1957 if the old decl had instantiated DECL_RTL.
1958 (Base on Richard Henderson 2003-05-13 patch to c-decl.c).
1959
1960 2003-05-19 Matt Austern <austern@apple.com>
1961
1962 * lang-options.h: Document -Wno-invalid-offsetof
1963 * typeck.c (build_class_member_access_expr): Don't complain about
1964 (Foo *)p->x for non-POD Foo if warn_invalid_offset is zero.
1965
1966 2003-05-18 Andrew Pinski <pinskia@physics.uc.edu>
1967
1968 * name-lookup.c (free_binding_entry): fix where the GTY markers are.
1969 (binding_entry_make): Make entry->chain NULL after getting an entry.
1970 fix the spelling of chain in a comment.
1971 (binding_table_free): speed up by having temporary variable.
1972 (binding_table_new): set table->chain to be NULL after allocating
1973 a table.
1974 (cxx_binding_make): use gcc_alloc instead of ggc_alloc_cleared and set
1975 binding->previous to NULL after getting an binding for speed.
1976
1977 2003-05-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
1978
1979 * cp-tree.h (struct lang_type_class): Replace data member tags
1980 with hash-table nested_udts.
1981 (CLASSTYPE_NESTED_UTDS): Rename from CLASSTYPE_TAGS.
1982 * class.c (unreverse_member_declarations): Don't touch
1983 CLASSTYPE_TAGS.
1984 (pushclass): Use cxx_remember_type_decls.
1985 * decl.c (struct cp_binding_level): Replace data member tags with
1986 hash-table type_decls.
1987 (pop_binding_level): Handle level->type_decls.
1988 (kept_level_p): Adjust.
1989 (poplevel): Remove unused local variable.
1990 (bt_print_entry): New function.
1991 (print_binding_level): Use it.
1992 (push_namespace): Build current_binding_level->type_decls.
1993 (maybe_process_template_type_declaration): Adjust.
1994 (pushtag): Likewise.
1995 (clear_anon_tags): Use binding_table_remove_anonymous_types.
1996 (gettags): Remove.
1997 (cxx_remember_type_decls): Rename from storetags. Adjust.
1998 (lookup_tag): Use binding_table_find_anon_type. Tidy.
1999 (lookup_tag_reverse): Use binding_table_reverse_maybe_remap.
2000 (cxx_init_decl_processing): Build global_binding_level->type_decls.
2001 (store_parm_decls): Remove pointless code.
2002 * name-lookup.c (free_binding_entry): New variable.
2003 (ENTRY_INDEX): New macro.
2004 (struct binding_table_s): New datatype.
2005 (binding_entry_make): New function.
2006 (binding_entry_free): Likewise.
2007 (binding_table_construct): Likewise.
2008 (binding_table_free): Likewise.
2009 (binding_table_new): Likewise.
2010 (binding_table_expand): Likewise.
2011 (binding_table_insert): Likewise.
2012 (binding_table_find): Likewise.
2013 (binding_table_find_anon_type): Likewise.
2014 (binding_table_reverse_maybe_remap): Likewise.
2015 (binding_table_remove_anonymous_types): Likewise.
2016 (binding_table_foreach): Likewise.
2017 * name-lookup.h (binding_table): New type.
2018 (binding_entry): Likewise.
2019 (bt_foreach_proc): Likewise.
2020 (struct binding_entry_s): New datatype.
2021 (SCOPE_DEFAULT_HT_SIZE): New macro.
2022 (CLASS_SCOPE_HT_SIZE): Likewise.
2023 (NAMESPACE_ORDINARY_HT_SIZE): Likewise.
2024 (NAMESPACE_STD_HT_SIZE): Likewise.
2025 (GLOBAL_SCOPE_HT_SIZE): Likewise.
2026 (binding_table_new): Declare.
2027 (binding_table_free): Likewise.
2028 (binding_table_insert): Likewise.
2029 (binding_table_find_anon_type): Likewise.
2030 (binding_table_reverse_maybe_remap): Likewise.
2031 (binding_table_remove_anonymous_types): Likewise.
2032 (binding_table_foreach): Likewise.
2033 (binding_table_find): Likewise.
2034 (cxx_remember_type_decls): Likewise.
2035 * pt.c (bt_instantiate_type_proc): New function.
2036 (do_type_instantiation): Use it.
2037 * search.c (lookup_field_r): Use binding_table_find.
2038
2039 2003-05-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2040
2041 * semantics.c (perform_deferred_access_checks): Don't discard
2042 checked access.
2043
2044 2003-05-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2045
2046 * error.c (cp_error_at, cp_warning_at, cp_pedwarn_at): Eliminate
2047 libiberty VA_ macros, always use stdarg.
2048 * rtti.c (create_pseudo_type_info): Likewise.
2049 * tree.c (build_min_nt, build_min): Likewise.
2050
2051 2003-05-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2052
2053 * ptree.c (cxx_print_type, cxx_print_xnode): Use string
2054 concatentation on HOST_WIDE_INT_PRINT_* format specifier to
2055 collapse multiple function calls into one.
2056 * tree.c (debug_binfo): Likewise.
2057
2058 2003-05-15 Jason Merrill <jason@redhat.com>
2059
2060 PR c++/5388
2061 * call.c (conditional_conversion): Don't consider implicit
2062 conversions if T2 is a base of T1.
2063 * cp-tree.h (DERIVED_FROM_P, UNIQUELY_DERIVED_FROM_P): Make boolean.
2064 (ACCESSIBLY_UNIQUELY_DERIVED_P, PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
2065
2066 * parser.c (cp_parser_primary_expression): Convert a static data
2067 member from reference.
2068
2069 2003-05-15 Mark Mitchell <mark@codesourcery.com>
2070
2071 * call.c (build_op_delete_call): Avoid creating unnecessary types.
2072 * class.c (instantiate_type): Remove tests for tf_no_attributes.
2073 * cp-tree.h (tsubst_flags_t): Remove tf_no_attributes.
2074 (COMPARE_NO_ATTRIBUTES): Remove.
2075 * typeck.c (comptypes): Do not check COMPARE_NO_ATTRIBUTES.
2076
2077 PR c++/8385
2078 * semantics.c (finish_typeof): Refine type-dependency check.
2079
2080 2003-05-13 Jason Merrill <jason@redhat.com>
2081
2082 * typeck.c (build_modify_expr): Don't always stabilize the lhs and
2083 rhs. Do stabilize the lhs of a MODIFY_EXPR used on the lhs.
2084
2085 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2086
2087 * method.c (synthesize_method): Call push/pop_deferring_access_checks.
2088
2089 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2090
2091 PR c++/10230, c++/10481
2092 * semantics.c (finish_non_static_data_member): Handle when the
2093 non-static member is not from a base of the current class type.
2094
2095 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2096
2097 PR c++/10552
2098 * pt.c (tsubst_copy): Handle TEMPLATE_DECL that is a member class
2099 template and has dependent context.
2100
2101 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2102
2103 * pt.c (instantiate_decl): Call push/pop_deferring_access_checks.
2104
2105 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2106
2107 PR c++/9252
2108 * cp-tree.h (saved_scope): Remove check_access field.
2109 (tsubst_flags_t): Remove tf_parsing.
2110 * decl.c (maybe_push_to_top_level): Don't initialize
2111 scope_chain->check_access.
2112 (make_typename_type, make_unbound_class_template): Don't use
2113 tf_parsing.
2114 (register_dtor_fn): Use push/pop_deferring_access_checks
2115 instead of scope_chain->check_access.
2116 * method.c (use_thunk): Likewise.
2117 * parser.c (cp_parser_explicit_instantiation
2118 (cp_parser_constructor_declarator_p): Don't call
2119 push/pop_deferring_access_checks here.
2120 (cp_parser_template_argument, cp_parser_class_name): Don't use
2121 tf_parsing.
2122 (yyparse): Check flag_access_control.
2123 * pt.c (instantiate_class_template): Call
2124 push/pop_deferring_access_checks.
2125 * semantics.c (push_deferring_access_checks): Propagate
2126 dk_no_check.
2127 (perform_or_defer_access_check): Make sure basetype_path is
2128 a type before comparison.
2129 * call.c (build_op_delete_call, build_over_call): Use
2130 perform_or_defer_access_check.
2131 * class.c (alter_access): Likewise.
2132 * init.c (build_offset_ref): Likewise.
2133 * lex.c (do_identifier): Likewise.
2134 * method.c (hack_identifier): Likewise.
2135 * search.c (lookup_member): Likewise.
2136 * semantics.c (finish_non_static_data_member): Likewise.
2137 (simplify_aggr_init_exprs_r): Use push/pop_deferring_access_checks
2138 instead of flag_access_control.
2139
2140 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2141
2142 PR c++/9554
2143 * parser.c (cp_parser_class_name): Remove check_access parameter.
2144 All caller adjusted. Update declaration.
2145 (cp_parser_lookup_name): Likewise.
2146 * semantics.c (push_deferring_access_checks): Change parameter type
2147 to enum deferring_kind. All caller adjusted.
2148 (resume_deferring_access_checks): Adjust to use new enum.
2149 (stop_deferring_access_checks): Likewise.
2150 (perform_or_defer_access_check): Likewise.
2151 * cp-tree.h (deferring_kind): New enum.
2152 (deferred_access): Adjust field type.
2153 (push_deferring_access_checks): Update declaration.
2154
2155 2003-05-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2156
2157 PR c++/10555, c++/10576
2158 * pt.c (lookup_template_class): Handle class template with
2159 multiple levels of parameters when one of the levels contain
2160 errors.
2161
2162 2003-05-08 Jason Merrill <jason@redhat.com>
2163
2164 * init.c (build_new_1): Don't reuse a TARGET_EXPR in an
2165 expression. Undo some of the recent reorg.
2166
2167 2003-05-07 Richard Henderson <rth@redhat.com>
2168
2169 PR c++/10570
2170 * cfns.gperf: Comment out POSIX thread cancellation points,
2171 plus abort and raise.
2172 * cfns.h: Regenerate.
2173
2174 2003-05-07 Jason Merrill <jason@redhat.com>
2175
2176 * call.c (build_conditional_expr): Don't assume that the folded
2177 expression has result_type.
2178
2179 2003-05-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2180
2181 * typeck.c (build_unary_op): Deal with const qualifier in
2182 invalid pointer-to-member earlier.
2183
2184 2003-05-05 Jason Merrill <jason@redhat.com>
2185
2186 PR c++/9537
2187 * call.c (conditional_conversion): Build an RVALUE_CONV if
2188 we're just changing the cv-quals.
2189 (build_conditional_expr): Don't call convert to change
2190 cv-quals.
2191
2192 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2193
2194 PR c++/10496
2195 * typeck.c (build_unary_op): Don't output const qualifier when
2196 output invalid pointer-to-member diagnostics.
2197
2198 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2199
2200 * decl.c: Fix typos.
2201
2202 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2203
2204 PR c++/4494
2205 * decl.c (start_function): Use same_type_p to check return type
2206 of main.
2207
2208 2003-05-03 Zack Weinberg <zack@codesourcery.com>
2209
2210 PR c/10604
2211 * cp/typeck.c (build_x_compound_expr): No need to check
2212 extra_warnings as well as warn_unused_value.
2213
2214 2003-05-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2215
2216 PR c++/9364, c++/10553, c++/10586
2217 * decl.c (make_typename_type): Don't crash on illegal code.
2218
2219 2003-05-03 Nathan Sidwell <nathan@codesourcery.com>
2220
2221 * class.c (finish_struct): Use location_t and input_location
2222 directly.
2223 * decl.c (make_label_decl): Likewise.
2224 (use_label): Likewise.
2225 * decl2.c (warn_if_unknown_interface): Likewise.
2226 (start_static_initialization_or_destruction): Likewise.
2227 (generate_ctor_or_dtor_function): Likewise.
2228 (finish_file): Likewise.
2229 * error.c (print_instantiation_full_context): Likewise.
2230 * init.c (create_temporary_var): Likewise.
2231 * method.c (synthesize_method): Likewise.
2232 * parser.c (cp_token): Likewise.
2233 (cp_lexer_set_source_position_from_token): Likewise.
2234 (cp_lexer_get_preprocessor_token): Likewise.
2235 (cp_parser_statement): Likewise.
2236 * pt.c (tsubst_friend_function): Likewise.
2237 (instantiate_class_template): Likewise.
2238 (tsubst_decl): Likewise.
2239 (tsubst): Likewise.
2240 (instantiate_decl): Likewise.
2241 * semantics.c (begin_class_definition): Likewise.
2242 (expand_body): Likewise.
2243
2244 2003-05-01 Nathan Sidwell <nathan@codesourcery.com>
2245
2246 * class.c (finish_struct): Rename lineno to input_line.
2247 * decl.c (push_binding_level, pop_binding_level,
2248 suspend_binding_level, resume_binding_level, make_label_decl,
2249 use_label, start_function): Likewise.
2250 * decl2.c (warn_if_unknown_interface,
2251 start_static_initialization_or_destruction,
2252 generate_ctor_or_dtor_function, finish_file): Likewise.
2253 * error.c (cp_line_of, print_instantiation_full_context,
2254 print_instantiation_context): Likewise.
2255 * except.c (check_handlers_1, check_handlers): Likewise.
2256 * init.c (create_temporary_var): Likewise.
2257 * method.c (use_thunk, synthesize_method): Likewise.
2258 * parser.c (cp_lexer_set_source_position_from_token,
2259 cp_lexer_get_preprocessor_token): Likewise.
2260 * pt.c (push_tinst_level, pop_tinst_level,
2261 tsubst_friend_function, instantiate_class_template, tsubst_decl,
2262 tsubst, tsubst_expr, instantiate_decl): Likewise.
2263 * semantics.c (genrtl_try_block, finish_label_stmt,
2264 begin_class_definition, expand_body,
2265 genrtl_finish_function): Likewise.
2266 * tree.c (build_min_nt, build_min): Likewise.
2267
2268 2003-05-01 Mark Mitchell <mark@codesourcery.com>
2269
2270 * decl2.c (comdat_linkage): Don't externalize explicit
2271 instantiations.
2272
2273 2003-05-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2274
2275 PR c++/10554
2276 * decl2.c (do_class_using_decl): Check if operand 0 of SCOPE_REF
2277 is not NULL.
2278
2279 2003-05-01 Steven Bosscher <steven@gcc.gnu.org>
2280
2281 * cp-tree.h (struct lang_id2): Remove. Move fields from here...
2282 (struct lang_identifier): ... to here.
2283 (LANG_ID_FIELD): Remove.
2284 (SET_LANG_ID): Remove.
2285 (IDENTIFIER_LABEL_VALUE): Adjust for new lang_identifier.
2286 (SET_IDENTIFIER_LABEL_VALUE): Likewise.
2287 (IDENTIFIER_IMPLICIT_DECL): Likewise.
2288 (SET_IDENTIFIERL_IMPLICIT_DECL): Likewise.
2289 (IDENTIFIER_ERROR_LOCUS): Likewise.
2290 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
2291
2292 2003-05-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2293
2294 PR c++/8772
2295 * pt.c (convert_template_argument): Correct diagnostic.
2296
2297 2003-04-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2298
2299 PR c++/9432, c++/9528
2300 * decl2.c (validate_nonmember_using_decl): Handle SCOPE_REF.
2301
2302 2003-04-30 Garbiel Dos Reis <gcc@integrable-solutions.net>
2303
2304 * decl.c (check_previous_goto_1): Adjust prototype.
2305 (check_previous_goto): Adjust use.
2306 (check_switch_goto): Likewise.
2307 (use_label): Adjust.
2308 (check_previous_goto_1): Don't use pedwarn_with_file_and_line.
2309 (struct named_label_use_list): Use location_t datatype.
2310
2311 2003-04-29 Mark Mitchell <mark@codesourcery.com>
2312
2313 PR c++/10551
2314 * pt.c (mark_decl_instantiated): Defer all explicit instantiations
2315 that have not yet been written out.
2316
2317 2003-04-29 Mark Mitchell <mark@codesourcery.com>
2318
2319 PR c++/10549
2320 * class.c (layout_class_type): Mark overlong bitfields as having
2321 the maximum size permitted by their type, after layout.
2322
2323 PR c++/10527
2324 * error.c (dump_expr): Correctly handling of NEW_EXPR.4
2325
2326 2003-04-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2327
2328 * call.c (build_operator_new_call): Fix typo.
2329 * lang-options.h: Likewise.
2330
2331 2003-04-29 Mark Mitchell <mark@codesourcery.com>
2332
2333 PR c++/10515
2334 * cp-tree.h (lookup_field_1): Declare it.
2335 * search.c (lookup_field_1): Make it public.
2336 * decl.c (reshape_init): Handle designated initializers.
2337
2338 * decl.c (maybe_commonize_var): Further tweak support for systems
2339 without weak symbols.
2340
2341 2003-04-27 Mark Mitchell <mark@codesourcery.com>
2342
2343 * decl.c (maybe_commonize_var): Fix thinko in last patch.
2344
2345 2003-04-27 Mark Mitchell <mark@codesourcery.com>
2346
2347 PR c++/10506
2348 * method.c (use_thunk): Decrement immediate_size_expand.
2349
2350 PR c++/10503
2351 * cp-tree.h (DECL_VAR_MARKED_P): New macro.
2352 (DECL_MAYBE_TEMPLATE): Remove.
2353 * class.c (fixed_type_or_null): Avoid infinite recursion.
2354
2355 * decl.c (maybe_commonize_var): Make the code match the comments.
2356 * pt.c (instantiate_decl): Move call to import_export_decl.
2357
2358 2003-04-26 Mark Mitchell <mark@codesourcery.com>
2359
2360 * decl2.c (finish_file): Fix merge botch.
2361
2362 2003-04-25 Mark Mitchell <mark@codesourcery.com>
2363
2364 * decl2.c (finish_file): Don't call import_export_decl for
2365 functions that are not defined.
2366 (handle_class_head): Robustify.
2367 * pt.c (instantiate_decl): Do not call cp_finish_decl for
2368 variables that are not defined.
2369
2370 2003-04-24 Sylvain Pion <Sylvain.Pion@mpi-sb.mpg.de>
2371
2372 * call.c (print_z_candidates): Fix off by one error.
2373
2374 2003-04-24 Nathan Sidwell <nathan@codesourcery.com>
2375
2376 PR c++/10337
2377 * call.c (joust): Don't warn about conversion ops that are exact
2378 or cv-conversions. Rearrange to avoid multiple type comparisons.
2379
2380 2003-04-23 Mark Mitchell <mark@codesourcery.com>
2381
2382 PR c++/10471
2383 * call.c (build_cxx_call): Robustify.
2384
2385 2003-04-23 Neil Booth <neil@daikokuya.co.uk>
2386
2387 * Make-lang.in (lex.o): Remove mbchar.h.
2388 * lex.c (MULTIBYTE_CHARS): Lose.
2389 * parser.c (cp_lexer_get_preprocessor_token): CPP_OTHER handled
2390 in c-lex.c.
2391
2392 2003-04-23 Mark Mitchell <mark@codesourcery.com>
2393
2394 PR c++/9847
2395 * cp-tree.h (duplicate_tag_error): Remove.
2396 * class.c (duplicate_tag_error): Remove.
2397 * semantics.c (begin_class_definition): Return immediately for a
2398 duplicate class definition.
2399
2400 PR c++/10451
2401 * decl.c (grokdeclarator): Correct logic for "mutable" errors.
2402
2403 2003-04-22 Mark Mitchell <mark@codesourcery.com>
2404
2405 PR c++/10446
2406 * search.c (lookup_fnfields_1): Handle empty slots in the method
2407 vector.
2408
2409 PR c++/10428
2410 * decl.c (check_elaborated_type_specifier): New function, split
2411 out from ...
2412 (xref_tag): ... here. Use the new function in more places.
2413
2414 * rtti.c (throw_bad_typeid): Use build_cxx_call.
2415
2416 2003-04-21 Mark Mitchell <mark@codesourcery.com>
2417
2418 * call.c (build_over_call): Use build_cxx_call.
2419 (build_cxx_call): New method, split out of build_over_call.
2420 * cp-tree.h (language_function): Add can_throw.
2421 (build_cxx_call): Declare it.
2422 * decl.c (finish_function): If a function does not contain any
2423 calls to functions that can throw an exception, indicate that
2424 fact.
2425 * decl2.c (mark_used): Do not defer the instantiation of
2426 functions, if the current function does not throw.
2427 * optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones.
2428 * pt.c (instantiate_decl): Make sure import_export_decl is called
2429 before emitting things.
2430 * rtti.c (throw_bad_cast): Use build_cxx_call.
2431 (build_dynamic_cast_1): Likewise.
2432 * typeck.c (build_function_call): Likewise.
2433
2434 2003-04-21 Nathan Sidwell <nathan@codesourcery.com>
2435
2436 PR c++/9881
2437 * typeck.c (build_unary_op): Fold all COMPONENT_REF addr
2438 expressions. Reverts my 2002-08-08 patch.
2439
2440 * typeck.c (comp_ptr_ttypes_real): Swap final && operands for
2441 cheaper early exit.
2442
2443 2003-04-20 Nathan Sidwell <nathan@codesourcery.com>
2444
2445 * cp/decl2.c (start_static_storage_duration_function): Take count
2446 arg, don't check if it wraps round.
2447 (generate_ctor_or_dtor_function): Add locus arg, use it.
2448 (generate_ctor_and_dtor_functions_for_priority): Data arg is a
2449 locus.
2450 (finish_file): Set line numbers to past EOF for synthesized
2451 functions.
2452
2453 2003-04-20 Nathan Sidwell <nathan@codesourcery.com>
2454
2455 PR c++/10405
2456 * search.c (lookup_field_1): Final scan goes backwards for
2457 types, forwards for non-types.
2458
2459 2003-04-17 Roger Sayle <roger@eyesopen.com>
2460
2461 PR c/10375
2462 * decl.c (duplicate_decls): Preserve "const", "noreturn" and
2463 "nothrow" function attributes.
2464
2465 2003-04-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2466
2467 PR c++/10347
2468 * pt.c (type_dependent_expression_p): Handle array new.
2469
2470 2003-04-15 Mark Mitchell <mark@codesourcery.com>
2471
2472 PR c++/10381
2473 * parser.c (cp_parser_primary_expression): Reorganize logic for
2474 dealing with name lookup failures.
2475
2476 2003-04-15 Jason Merrill <jason@redhat.com>
2477
2478 * decl2.c (mark_used): Don't instantiate anything if
2479 skip_evaluation.
2480
2481 2003-04-14 Ziemowit Laski <zlaski@apple.com>
2482
2483 * tree.c (build_cplus_array_type_1): Do not call
2484 uses_template_parms() on a NULL index_type.
2485
2486 2003-04-13 Roger Sayle <roger@eyesopen.com>
2487
2488 * decl.c (duplicate_decls): Preserve pure and malloc attributes.
2489
2490 2003-04-12 Mark Mitchell <mark@codesourcery.com>
2491
2492 PR c++/10300
2493 * init.c (build_new_1): Reorganize.
2494
2495 2003-04-12 Zack Weinberg <zack@codesourcery.com>
2496
2497 * class.c (initialize_array)
2498 * decl.c (reshape_init)
2499 * decl2.c (build_expr_from_tree)
2500 * init.c (build_zero_init)
2501 * pt.c (tsubst_copy, tsubst_copy_and_build)
2502 * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer)
2503 (ptm_initializer, class_initializer, get_pseudo_ti_init)
2504 * semantics.c (finish_compound_literal)
2505 * typeck.c (build_ptrmemfunc1)
2506 * typeck2.c (store_init_value, process_init_constructor)
2507 (build_functional_cast): Use build_constructor.
2508
2509 2003-04-12 Zack Weinberg <zack@codesourcery.com>
2510
2511 * call.c (print_z_candidates): Use gcc_gettext_width, not
2512 strlen, to determine how much padding to use.
2513
2514 2003-04-10 Zack Weinberg <zack@codesourcery.com>
2515
2516 * decl.c: Update all calls to shadow_warning.
2517
2518 2003-04-10 Mark Mitchell <mark@codesourcery.com>
2519
2520 * class.c (layout_class_type): Correct handling for overlong
2521 bit-fields whose width is the same as an integer type.
2522
2523 2003-04-06 Zack Weinberg <zack@codesourcery.com>
2524
2525 * cp-tree.def: Make fourth element for all 'c' and 'x' nodes zero.
2526 * cp-lang.c (cp_tree_size): New function.
2527 (LANG_HOOKS_TREE_SIZE): Override.
2528
2529 * cp-tree.h (SOURCE_LOCUS, SRCLOC_FILE, SRCLOC_LINE, struct
2530 tree_srcloc, TS_CP_COMMON, TS_CP_SRCLOC): Kill.
2531 (union lang_tree_node): Remove common and srcloc members.
2532 (build_srcloc_here): Don't prototype.
2533 * decl.c (cp_tree_node_structure): Kill SRCLOC case.
2534 * pt.c (pending_templates): Correct comment.
2535 * tree.c (build_srcloc, build_srcloc_here): Kill.
2536
2537 2003-04-06 Zack Weinberg <zack@codesourcery.com>
2538
2539 * call.c: Include intl.h.
2540 (print_z_candidate): Always use inform; get rid of errfn
2541 argument. Reorganize so that all the strings get picked up
2542 by xgettext. Note obligation of caller to pass first argument
2543 through gettext.
2544 (print_z_candidates): Update to match. Indent second and
2545 successive candidates by strlen() of translated message.
2546 (joust): Restructure ambiguous-conversion pedwarn so that
2547 translators see a complete sentence. Update calls to
2548 print_z_candidate.
2549
2550 * Make-lang.in (cp/call.o): Update dependencies.
2551
2552 2003-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2553
2554 * decl.c (set_current_binding_level): Delete, revert last change.
2555 (current_binding_level): Modify to allow it as as lvalue.
2556
2557 2003-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2558
2559 * name-lookup.c (find_binding): Pass appropriate pointer type to
2560 POP_TIMEVAR_AND_RETURN.
2561
2562 2003-04-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2563
2564 * Make-lang.in (cp-warn): Add $(STRICT_WARN).
2565 * cp-tree.h: Don't insist on having GNUC.
2566
2567 2003-04-03 Jason Merrill <jason@redhat.com>
2568
2569 * cvt.c (ocp_convert): Only abort if we try to convert an object
2570 of TREE_ADDRESSABLE type.
2571
2572 * class.c (build_vtable): Set DECL_ALIGN here.
2573 (get_vtable_decl): Not here.
2574 (layout_vtable_decl): Or here.
2575 (create_vtable_ptr): Or here.
2576 (layout_class_type): Or here.
2577 (check_bitfield_decl): Don't mess with field alignment.
2578
2579 2003-04-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2580
2581 * operators.def (DEF_SIMPLE_OPERATOR, DEF_ASSN_OPERATOR,
2582 DEF_ASSN_OPERATOR): Delete spurious semi-colon.
2583 * rtti.c (dfs_class_hint_mark): Likewise.
2584
2585 * decl.c (push_local_name, push_class_level_binding,
2586 maybe_inject_for_scope_var): Don't use POP_TIMEVAR_AND_RETURN in
2587 functions returning void.
2588 * decl2.c (add_using_namespace): Likewise.
2589
2590 * decl.c (print_binding_level, print_other_binding_stack,
2591 print_binding_stack): Cast argument of %p specifier to void*.
2592 * ptree.c (cxx_print_decl): Likewise.
2593
2594 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
2595 VAR_FUNCTION_OR_PARM_DECL_CHECK,
2596 VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
2597 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK, LANG_TYPE_CLASS_CHECK,
2598 LANG_TYPE_PTRMEM_CHECK, LANG_DECL_U2_CHECK): Add __extension__.
2599
2600 * decl.c (set_current_binding_level): New macro. Use throughout
2601 when setting the current binding level.
2602
2603 * cp-tree.h (cp_lvalue_kind, base_access): Delete trailing comma
2604 in enum.
2605 * method.c (mangling_flags): Likewise.
2606
2607 * cp-tree.h (lang_type_header): Add __extension__ and use
2608 CHAR_BITFIELD for members.
2609
2610 2003-04-02 Geoffrey Keating <geoffk@apple.com>
2611
2612 PR other/9274
2613 * mangle.c: Include gt-cp-mangle.h.
2614 (subst_identifiers): Mark with GTY.
2615 * config-lang.in (gtfiles): Add cp/mangle.c.
2616 * Make-lang.in: (gt-cp-mangle.h): New rule.
2617 (cp/mangle.o): Depends on gt-cp-mangle.h.
2618
2619 2003-04-01 Andrew Pinski <pinskia@physics.uc.edu>
2620
2621 * config-lang.in (gtfiles): Add \$(srcdir)/cp/name-lookup.c
2622 after \$(srcdir)/cp/name-lookup.h.
2623 * name-lookup.c: (cxx_binding_make): Use ggc_alloc_clearedinstead
2624 of ggc_alloc. Include gt-cp-name-lookup.h at the end of the file.
2625 * Make-lang.in: (gt-cp-name-lookup.h): Is generated by gengtype.
2626 (cp/name-lookup.o): Depends on gt-cp-name-lookup.h.
2627
2628 2003-03-31 Jason Merrill <jason@redhat.com>
2629
2630 PR java/10145
2631 * class.c (check_field_decl): Don't set DECL_ALIGN.
2632
2633 2003-03-30 Mark Mitchell <mark@codesourcery.com>
2634
2635 PR c++/7647
2636 * decl.c (grokdeclarator): Tidy, slightly.
2637 * search.c (lookup_field_1): Add want_type parameter.
2638 (lookup_field_r): Adjust call to lookup_field_1.
2639
2640 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
2641
2642 * Make-lang.in (cp/name-lookup.o): Add more dependencies.
2643
2644 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
2645
2646 * cp-tree.h (binding_for_name: Move to name-lookup.h Adjust
2647 prototype.
2648 (cxx_scope_find_binding_for_name): Likewise.
2649 * decl.c (find_binding: Move to name-lookup.c.
2650 (binding_for_name): Likewise.
2651 (cxx_scope_find_binding_for_name): Likewise.
2652 (BINDING_LEVEL): Remove.
2653 (push_binding): Tidy.
2654 (push_class_binding): Likewise.
2655 (pop_binding): Likewise.
2656 (poplevel): Likewise.
2657 (poplevel_class): Likewise.
2658 (set_identifier_type_value_with_scope): Likewise.
2659 (push_overloaded_decl): Likewise.
2660 (lookup_tag): Likewise.
2661 (unqualified_namespace_lookup): Likewise.
2662 (lookup_name_current_level): Likewise.
2663 (maybe_inject_for_scope_var): Likewise.
2664 (namespace_binding): Move to name-lookup.c.
2665 (set_namespace_binding): Likewise.
2666 * decl2.c (lookup_using_namespace): Tidy.
2667 (qualified_lookup_using_namespace): Likewise.
2668 (do_toplevel_using_decl): Likewise.
2669 * name-lookup.c: Include "timevar.h"
2670 * name-lookup.h (cxx_scope): Declare.
2671 (struct cxx_binding): Lose member "has_level". Adjust "scope"
2672 member declaration.
2673 (BINDING_SCOPE): Adjust definition.
2674 (BINDING_HAS_LEVEL_P): Remove.
2675
2676 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
2677
2678 * name-lookup.c: New file.
2679 * name-lookup.h: Likewise..
2680 * decl.c (push_binding): Adjust use cxx_binding_make.
2681 (free_bindings): Move to name-lookup.c
2682 (pop_binding): Use cxx_binding_free.
2683 (binding_for_name): Tidy.
2684 * cp-tree.h: Include "name-lookup.h"
2685 (cxx_binding_make): Move to name-lookup.h
2686 (cxx_binding_clear): Likewise.
2687 (struct cxx_binding): Likewise.
2688 (LOCAL_BINDING_P): Likewise.
2689 (INHERITED_VALUE_BINDING_P): Likewise.
2690 (BINDING_SCOPE): Likewise.
2691 (BINDING_HAS_LEVEL_P): Likewise.
2692 (BINDING_VALUE): Likewise.
2693 (BINDING_TYPE): Likewise.
2694 * config-lang.in (gtfiles): Add cp/name-lookup.h
2695 * Make-lang.in (cp/name-lookup.o): New rule.
2696 (CXX_OBJS): Add cp/name-lookup.o
2697 (CXX_TREE_H): Add cp/name-lookup.h
2698
2699 2003-03-28 Jason Merrill <jason@redhat.com>
2700
2701 PR c++/10245
2702 * cvt.c (force_rvalue): New fn.
2703 * call.c (build_conditional_expr): Use it.
2704 * cp-tree.h: Declare it.
2705
2706 2003-03-28 Mike Stump <mrs@apple.com>
2707
2708 * error.c (dump_expr): Add 0x to printed hex numbers to make
2709 output match source code better.
2710
2711 2003-03-28 Mark Mitchell <mark@codesourcery.com>
2712
2713 PR c++/10218
2714 * decl.c (grokfndecl): Return NULL_TREE for bogus out-of-class
2715 definitions.
2716
2717 * decl2.c (generate_ctor_or_dtor_function): Tolerate a
2718 non-existant ssdf_decls array.
2719 (finish_file): Call generator_ctor_or_dtor_function when there are
2720 static constructors or destructors and no other static
2721 initializations.
2722
2723 2003-03-28 Nathan Sidwell <nathan@codesourcery.com>
2724
2725 PR c++/10047
2726 * decl2.c (finish_file): Don't warn about explicitly instantiated
2727 inline decls.
2728
2729 2003-03-27 Nathan Sidwell <nathan@codesourcery.com>
2730
2731 PR c++/10224
2732 * pt.c (lookup_template_class): Only check instantiated args if
2733 they do not contain template parameters.
2734
2735 2003-03-27 Nathan Sidwell <nathan@codesourcery.com>
2736
2737 PR c++/10158
2738 * parser.c (cp_parser_function_definition): Set
2739 DECL_INITIALIZED_IN_CLASS for members.
2740 * pt.c (instantiate_decl): Only reduce the template args for
2741 friends that are not defined in class.
2742
2743 2003-03-25 Jason Merrill <jason@redhat.com>
2744
2745 * call.c (print_z_candidate): Change name of first arg to msgid.
2746 (joust): Add comment for translators.
2747
2748 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
2749
2750 PR c++/9898, PR c++/383, DR 322
2751 * pt.c (maybe_adjust_types_for_deduction) <DEDUCE_CONV>: Look
2752 through reference types on both PARM and ARG.
2753
2754 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
2755
2756 PR c++/10119
2757 * error.c (dump_expr) <BASELINK>: Use dump_expr.
2758 * pt.c (maybe_fold_nontype_args): New function.
2759 (tsubst_copy) <SCOPE_REF>: Subst any template_id args.
2760 <TEMPLATE_ID_EXPR>: Break out folding code, call it.
2761 (tsubst_copy_and_build) <TEMPLATE_ID_EXPR>: Call
2762 maybe_fold_nontype_args.
2763
2764 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
2765
2766 PR c++/10026
2767 * decl2.c (arg_assoc_type) <ERROR_MARK>: Don't die.
2768
2769 2003-03-23 Mark Mitchell <mark@codesourcery.com>
2770
2771 PR c++/7086
2772 * typeck.c (cxx_mark_addressable): Adjust call to
2773 gen_mem_addressof or put_var_into_stack.
2774
2775 2003-03-22 Nathan Sidwell <nathan@codesourcery.com>
2776
2777 PR c++/9978, c++/9708
2778 * cp-tree.h (instantiate_template): Add tsubst_flags parameter.
2779 * call.c (add_template_candidate_real): Adjust
2780 instantiate_template call.
2781 * class.c (resolve_address_of_overloaded_function): Likewise.
2782 * decl.c (build_enumerator): Set TREE_CONSTANT.
2783 * pt.c (check_instantiated_args): New.
2784 (push_inline_template_parms_recursive): Set TREE_CONSTANT,
2785 TREE_READONLY.
2786 (build_template_parm_index): Copy TREE_CONSTANT, TREE_READONLY.
2787 (reduce_template_parm_level): Likewise.
2788 (process_template_parm): Likewise.
2789 (check_explicit_specialization): Adjust instantiate_template call.
2790 (convert_template_argument): Don't check non-type argument here.
2791 (lookup_template_class): Check them here.
2792 (tsubst_friend_function): Adjust instantiate_template call.
2793 (instantiate_template): Add tsubst_flags parameter, use it. Check
2794 instantiated args.
2795
2796 2003-03-21 Zack Weinberg <zack@codesourcery.com>
2797
2798 * decl.c: Update calls to shadow_warning.
2799
2800 2003-03-21 Nathan Sidwell <nathan@codesourcery.com>
2801
2802 PR c++/9898
2803 * error.c (dump_decl) [CONST_DECL]: Print '<enumerator>'.
2804 (dump_expr) [CONSTRUCTOR]: Print default ctor as a function call.
2805
2806 2003-03-20 Mark Mitchell <mark@codesourcery.com>
2807
2808 * cp/decl2.c (arg_assoc_class): Correct check for namespace-scope
2809 friends.
2810 * cp/pt.c (instantiate_class_template): Fix formatting.
2811
2812 2003-03-14 Matt Austern <austern@apple.com>
2813
2814 * cp-tree.h (unemitted_tinfo_decls): Declaration of a new varray.
2815 (unemitted_tinfo_decl_p): Remove.
2816 (emit_tinfo_decl): Change declaration to remove unused parameter.
2817 * decl2.c (finish_file): Change tinfo emission to loop through
2818 unemitted_tinfo_decls array instead of looping through all decls.
2819 * rtti.c (unemitted_tinfo_decl_p): Declare as static, remove
2820 unused second parameter.
2821 (init_rtti_processing): initialize unemitted_tinfo_decls varray.
2822 (get_tinfo_decls): push new tinfo decl on unemitted_tinfo_decls.
2823 (emit_tinfo_decl): remove unused second parameter, add assertion
2824 that decl hasn't already been emitted.
2825
2826 2003-03-19 Nathanael Nerode <neroden@gcc.gnu.org>
2827
2828 * dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return
2829 type from 'int' to 'bool'. Replace 0 and 1 with true and false in
2830 return statements.
2831
2832 2003-03-19 Jason Merrill <jason@redhat.com>
2833
2834 PR c++/8316, c++/9315, c++/10136
2835 * call.c (print_z_candidate): Split out from...
2836 (print_z_candidiates): ...here.
2837 (joust): Use it.
2838
2839 2003-03-17 Roger Sayle <roger@eyesopen.com>
2840
2841 PR c++/10031
2842 * decl.c (duplicate_decls): Use the new type when prototyping
2843 anticipated decls, even when the types match. This defines the
2844 exception list for the built-in function.
2845
2846 2003-03-17 Jason Merrill <jason@redhat.com>
2847
2848 PR c++/10091
2849 * typeck.c (build_class_member_access_expr): Compare
2850 TYPE_MAIN_VARIANTs.
2851
2852 2003-03-17 Mark Mitchell <mark@codesourcery.com>
2853
2854 PR c++/9639
2855 * parser.c (cp_parser_declarator_id): Clear parser->scope.
2856
2857 2003-03-16 Jason Merrill <jason@redhat.com>
2858
2859 PR c++/9993
2860 * decl.c (finish_function): Only allow the NRVO to use variables
2861 declared at function scope.
2862
2863 2003-03-17 Andreas Jaeger <aj@suse.de>
2864
2865 * Make-lang.in (cp/TAGS): Remove.
2866
2867 2003-03-16 Nathan Sidwell <nathan@codesourcery.com>
2868
2869 PR c++/9629
2870 * cp-tree.h (struct language_function): Add in_base_initializer.
2871 (in_base_initializer): define it.
2872 (expand_member_init): Remove INIT param.
2873 * init.c (expand_member_init): Remove INIT param, return the member.
2874 (emit_mem_initializers): Set in_base_initializer.
2875 * class.c (build_base_path): Check in_base_initializer.
2876 * parser.c (cp_parser_mem_initializer): Set in_base_initializer.
2877 * pt.c (tsubst_initializer_list): Likewise.
2878
2879 2003-03-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
2880
2881 * decl.c (binding_for_name): Fix initialization thinko.
2882
2883 2003-03-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
2884
2885 Compile-time improvement: 2/n.
2886 * cp-tree.h (struct cxx_binding): New datatype;
2887 (struct lang_identifier): Use it.
2888 (LOCAL_BINDING_P): Adjust definition.
2889 (INHERITED_VALUE_BINDING_P): Likewise.
2890 (BINDING_SCOPE): Likewise.
2891 (BINDING_HAS_LEVEL_P): Likewise.
2892 (BINDING_VALUE): Likewise.
2893 (BINDING_TYPE): Likewise.
2894 (IDENTIFIER_VALUE): Likewise.
2895 (struct tree_binding): Remove.
2896 (TS_CP_BINDING): Likewise.
2897 ((union lang_tree_node): Remove field "binding".
2898 (cxx_binding_clear): New macro.
2899 (binding_for_name): Adjust return type.
2900 (qualified_lookup_using_namespace): Adjust prototype.
2901 (lookup_using_namespace): Adjust prototype.
2902 (cxx_scope_find_binding_for_name): Declare.
2903 * cp-tree.def: Remove CPLUS_BINDING definition.
2904 * decl.c (push_binding): Adjust local variable type.
2905 (add_binding): Likewise.
2906 (push_class_binding): Likewise.
2907 (pop_binding): Likewise.
2908 (poplevel): Likewise.
2909 (poplevel_class): Likewise.
2910 (free_bindings): Adjust type.
2911 (find_binding): Adjust return type, add a third parameter. Remove
2912 non-useful assertion now that we use static typing.
2913 (cxx_scope_find_binding_for_name): New function.
2914 (binding_for_name): Use it. Adjust local variable type. Simplify.
2915 (namespace_binding): Simplify.
2916 (set_namespace_binding): Likewise.
2917 (set_identifier_type_value_with_scope): Adjust local variable type.
2918 (lookup_tag): Don't type-abuse of local variable 'old'.
2919 (lookup_namespace_name): Likewise. Allocate binding on stack.
2920 (select_decl): Adjust prototype.
2921 (unqualified_namespace_lookup): Allocate binding on stack.
2922 Don't type-abuse of local variable 'val'.
2923 (lookup_name_real): Likewise.
2924 (maybe_inject_for_scope_var): Adjust local variable type.
2925 (cp_tree_node_structure): Remove CPLUS_BINDING case label.
2926 (namespace_binding): Adjust logic, simplify.
2927 (BINDING_LEVEL): Adjust definition.
2928 (push_class_level_binding): Adjust local variable type.
2929 (struct cxx_saved_binding): Adjust field 'binding' type.
2930 * decl2.c (ambiguous_decl): Adjust prototype.
2931 (lookup_using_namespace): Adjust local variable type.
2932 (qualified_lookup_using_namespace): Catch type error and correct
2933 ensueing logic error.
2934 (do_nonmember_using_decl): Adjust local variable type. Allocate
2935 temporary cxx_binding on stack.
2936 (do_toplevel_using_decl): Adjust local variable type.
2937 * ptree.c (cxx_print_cxx_binding): New function.
2938 (cxx_print_identifier): Use it.
2939 (cxx_print_xnode): Delete CPLUS_BINDING case label.
2940
2941 2003-03-15 Roger Sayle <roger@eyesopen.com>
2942
2943 * tree.c (count_functions): Fix whitespace.
2944
2945 2003-03-15 Neil Booth <neil@daikokuya.co.uk>
2946
2947 * Make-lang.in: Update.
2948
2949 2003-03-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2950
2951 PR c++/6440
2952 * pt.c (maybe_process_partial_specialization): Handle
2953 member class template when enclosing class template is
2954 explicit specialized.
2955 (most_general_template): Stop looking when DECL is already
2956 specialized.
2957
2958 2003-03-13 Jason Merrill <jason@redhat.com>
2959
2960 PR c++/9420
2961 * search.c (lookup_conversions): Call complete_type here.
2962 * call.c (implicit_conversion): Not here.
2963
2964 2003-03-13 Mark Mitchell <mark@codesourcery.com>
2965
2966 * decl2.c (do_nonmember_using_decl): Correct handling of
2967 simultaneous type/non-type bindings.
2968
2969 * call.c (initialize_reference): Remove bogus assertion.
2970 * decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09.
2971
2972 2003-03-12 Andrew Lewycky <andrew@mxc.ca>
2973
2974 PR c++/7050
2975 * expr.c (cxx_expand_expr): Return const0_rtx for throw
2976 expressions.
2977
2978 2003-03-11 Mark Mitchell <mark@codesourcery.com>
2979
2980 PR c++/9474
2981 * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
2982 to merge old and new declarations.
2983
2984 2003-03-12 Alexandre Oliva <aoliva@redhat.com>
2985
2986 * g++.1: Remove.
2987 * Make-lang.in (c++.generated-manpages): Build cp/g++.1.
2988 (cp/g++.1): Build it from scratch in the build tree.
2989 (c++.install-man): Depend on it. Install it from the build tree.
2990 (c++.mostlyclean): Clean it.
2991
2992 2003-03-11 Mark Mitchell <mark@codesourcery.com>
2993
2994 PR c++/9474
2995 * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
2996 to merge old and new declarations.
2997
2998 PR c++/9924
2999 * decl2.c (do_nonmember_using_decl): Ignore anticipated builtins.
3000
3001 2003-03-11 Jason Merrill <jason@redhat.com>
3002
3003 PR c++/9820
3004 * search.c (lookup_member): Fix handling of functions in a class
3005 being defined.
3006
3007 2003-03-11 Mark Mitchell <mark@codesourcery.com>
3008
3009 PR c++/8700
3010 * call.c (convert_class_to_reference): Adjust usage of
3011 splice_viable.
3012 (any_viable): Remove.
3013 (splice_viable): Combine with any_viable.
3014 (print_z_candidates): Avoid printing duplicates.
3015 (build_user_type_conversion_1): Adjust usage of splice_viable.
3016 (build_new_function_call): Likewise.
3017 (build_operator_new_call): Likewise.
3018 (build_object_call): Likewise.
3019 (build_conditional_expr): Likewise.
3020 (build_new_op): Likewise.
3021 (build_new_method_call): Likewise.
3022 (joust): Remove spurious comment.
3023 * cp-tree.h (DECL_FRIENDLIST): Correct documentation.
3024 * decl2.c (arg_assoc_class): Simplify.
3025 * friend.c (add_friend): Likewise.
3026
3027 2003-03-11 Jason Merrill <jason@redhat.com>
3028
3029 PR c++/8660
3030 * decl2.c (check_classfn): A member template only matches a
3031 member template.
3032
3033 2003-03-11 Neil Booth <neil@daikokuya.co.uk>
3034
3035 * Make-lang.in (CXX_C_OBJS): Update.
3036 * lang-specs.h: Don't define __GNUG__ here.
3037
3038 2003-03-10 Mark Mitchell <mark@codesourcery.com>
3039
3040 * call.c (perform_overload_resolution): New function.
3041 (build_new_function_call): Use it.
3042 (build_operator_new_call): Likewise.
3043 (add_candidates): Add explicit_targs and template_only parameters.
3044 (build_new_op): Adjust accordingly.
3045 * cp-tree.h (build_operator_new_call): New function.
3046 (build_function_call_real): Remove.
3047 (build_function_call_maybe): Likewise.
3048 * init.c (build_new_1): Use build_operator_new_call.
3049 * typeck.c (build_function_call_real): Rename to ...
3050 (build_function_call): ... this.
3051
3052 2003-03-10 Devang Patel <dpatel@apple.com>
3053
3054 PR c++/9394
3055 * g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWTCH_TAKES_ARG.
3056
3057 2003-03-10 Jason Merrill <jason@redhat.com>
3058
3059 PR c++/9798
3060 * decl.c (push_using_directive): Push before recursing.
3061
3062 PR c++/9868, c++/9524
3063 * call.c (resolve_scoped_fn_name): Handle the case of a function
3064 pointer member.
3065
3066 * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this'
3067 argument in the pointer-to-member case.
3068
3069 2003-03-09 Mark Mitchell <mark@codesourcery.com>
3070
3071 PR c++/9373
3072 * cp-lang.c (cxx_get_alias_set): Use alias set zero for
3073 pointers to member functions.
3074
3075 PR c++/8534
3076 * decl.c (build_ptrmemfunc_type): Do not allow default arugments
3077 in pointer-to-member-function types.
3078
3079 2003-03-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
3080
3081 * expr.c (cplus_expand_constant): Use C90 prototype style.
3082 (cxx_expand_expr): Likewise.
3083
3084 2003-03-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3085
3086 PR c++/9970
3087 * decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual
3088 functions.
3089
3090 2003-03-08 Geoffrey Keating <geoffk@apple.com>
3091
3092 * lang-specs.h (c++-header): Change .pch to .gch.
3093
3094 2003-03-08 Neil Booth <neil@daikokuya.co.uk>
3095
3096 * cp-tree.h (cxx_init): Update prototype.
3097 * lex.c (cxx_init): Similarly.
3098
3099 2003-03-08 Mark Mitchell <mark@codesourcery.com>
3100
3101 PR c++/9823
3102 * cp-tree.h (begin_mem_initializers): Remove.
3103 * parser.c (cp_parser_mem_initializer_list): Inline it here.
3104 Do not call finish_mem_initializers if not in a constructor.
3105 (cp_parser_class_head): Fix typo in error message.
3106 * semantics.c (begin_mem_initializers): Remove.
3107 * testsuite/g++.dg/parser/constructor1.C: New test.
3108
3109 PR c++/9809
3110 * call.c (add_function_candidate): Skip builtin fuctions that have
3111 not yet been declared.
3112
3113 PR c++/9982
3114 * init.c (build_new_1): Correct logic for determining whether or
3115 not to use an array cookie.
3116
3117 PR c++/9524
3118 * parser.c (cp_parser_postfix_expression): Call
3119 finish_non_static_data_member, even when processing_template_decl.
3120
3121 PR c++/9912
3122 * cp-tree.h (is_ancestor): New function.
3123 (handle_class_head): Change prototype.
3124 * decl2.c (is_namespace_ancestor): Rename to ...
3125 (namespace_anecestor): ... this.
3126 (set_decl_namespace): Adjust accordingly.
3127 (handle_class_head): Remove unncessary parameters.
3128 * parser.c (cp_parser_class_head): Check that
3129 nested-name-specifiers are used appropriately.
3130
3131 2003-03-07 Mark Mitchell <mark@codesourcery.com>
3132
3133 * call.c (reference_binding): Remove REF_IS_VAR parameter.
3134 (implicit_conversion): Adjust call to reference_binding.
3135 (make_temporary_var_for_ref_to_type): Add TYPE parameter.
3136 (initialize_reference): Adjust handling for references bound to
3137 rvalues.
3138 * cp-tree.h (make_temporary_var_for_ref_to_temp): Change
3139 prototype.
3140 (real_non_cast_lvalue_p): New method.
3141 * cvt.c (build_up_reference): Adjust use of
3142 make_temporary_var_for_ref_to_temp.
3143 * tree.c (real_non_cast_lvalue_p): New method.
3144
3145 2003-03-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
3146
3147 * except.c (init_exception_processing): Use C90 prototype style.
3148 (cp_protect_cleanup_actions): Likewise.
3149 (prepare_eh_type): Likewise.
3150 (build_eh_type_type): Likewise.
3151 (build_exc_ptr): Likewise.
3152 (do_begin_catch): Likewise.
3153 (dtor_nothrow): Likewise.
3154 (do_end_catch): Likewise.
3155 (push_eh_cleanup): Likewise.
3156 (decl_is_java_type): Likewise.
3157 (choose_personality_routine): Likewise.
3158 (initialize_handler_parm): Likewise.
3159 (expand_start_catch_block): Likewise.
3160 (expand_end_catch_block): Likewise.
3161 (begin_eh_spec_block): Likewise.
3162 (finish_eh_spec_block): Likewise.
3163 (do_allocate_exception): Likewise.
3164 (do_free_exception): Likewise.
3165 (wrap_cleanups_r): Likewise.
3166 (stabilize_throw_expr): Likewise.
3167 (build_throw): Likewise.
3168 (complete_ptr_ref_or_void_ptr_p): Likewise.
3169 (is_admissible_throw_operand): Likewise.
3170 (nothrow_libfn_p): Likewise.
3171 (can_convert_eh): Likewise.
3172 (check_handlers_1): Likewise.
3173 (check_handlers): Likewise.
3174
3175 2003-03-06 Mark Mitchell <mark@codesourcery.com>
3176
3177 * call.c (merge_conversion_sequences): New function.
3178 (build_conv): Set ICS_USER_FLAG for USER_CONVs.
3179 (convert_class_to_reference): Correct handling of second
3180 standard conversion sequence in a user-defined conversion
3181 sequence.
3182 (build_user_type_conversion_1): Use merge_conversion_sequences.
3183 * cp-tree.def: Add comments for CONV nodes.
3184 * rtti.c (get_tinfo_decl): Use build_address/build_nop.
3185
3186 2003-03-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
3187
3188 * error.c (init_error): Use C90 prototype style.
3189 (dump_scope): Likewise.
3190 (dump_qualifiers): Likewise.
3191 (dump_template_argument): Likewise.
3192 (dump_template_argument_list): Likewise.
3193 (dump_template_parameter): Likewise.
3194 (dump_template_bindings): Likewise.
3195 (dump_type): Likewise.
3196 (dump_typename): Likewise.
3197 (class_key_or_enum): Likewise.
3198 (dump_aggr_type): Likewise.
3199 (dump_type_prefix): Likewise.
3200 (dump_type_suffix): Likewise.
3201 (dump_global_iord): Likewise.
3202 (dump_simple_decl): Likewise.
3203 (dump_decl): Likewise.
3204 (dump_template_decl): Likewise.
3205 (dump_function_decl): Likewise.
3206 (dump_parameters): Likewise.
3207 (dump_exception_spec): Likewise.
3208 (dump_function_name): Likewise.
3209 (dump_template_parms): Likewise.
3210 (dump_char): Likewise.
3211 (dump_expr_list): Likewise.
3212 (dump_expr): Likewise.
3213 (dump_binary_op): Likewise.
3214 (dump_unary_op): Likewise.
3215 (type_as_string): Likewise.
3216 (expr_as_string): Likewise.
3217 (decl_as_string): Likewise.
3218 (context_as_string): Likewise.
3219 (lang_decl_name): Likewise.
3220 (cp_file_of): Likewise.
3221 (cp_line_of): Likewise.
3222 (decl_to_string): Likewise.
3223 (expr_to_string): Likewise.
3224 (fndecl_to_string): Likewise.
3225 (code_to_string): Likewise.
3226 (language_to_string): Likewise.
3227 (parm_to_string): Likewise.
3228 (op_to_string): Likewise.
3229 (type_to_string): Likewise.
3230 (assop_to_string): Likewise.
3231 (args_to_string): Likewise.
3232 (cv_to_string): Likewise.
3233 (cxx_print_error_function): Likewise.
3234 (cp_diagnostic_starter): Likewise.
3235 (cp_diagnostic_finalizer): Likewise.
3236 (cp_print_error_function): Likewise.
3237 (function_category): Likewise.
3238 (print_instantiation_full_context): Likewise.
3239 (print_instantiation_partial_context): Likewise.
3240 (maybe_print_instantiation_context): Likewise.
3241 (print_instantiation_context): Likewise.
3242 (cp_printer): Likewise.
3243 (print_integer): Likewise.
3244 (print_non_consecutive_character): Likewise.
3245 (locate_error): Likewise.
3246
3247 2003-03-06 Mark Mitchell <mark@codesourcery.com>
3248
3249 PR c++/9965
3250 * call.c (reference_binding): Add ref_is_var parameter.
3251 (implicit_conversion): Adjust call to reference_binding.
3252 (initialize_reference): Likewise.
3253
3254 PR c++/9400
3255 * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL
3256 PARM_DECLs.
3257
3258 PR c++/9791
3259 * class.c (get_basefndecls): Use lookup_fnfields_1.
3260
3261 2003-03-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3262
3263 PR c++/9188
3264 * parser.c (cp_parser_type_parameter): Remove redundant `expect'
3265 in error message.
3266 (cp_parser_single_declaration): Likewise.
3267
3268 2003-03-05 Jason Merrill <jason@redhat.com>
3269
3270 PR c++/9440
3271 * call.c (build_conditional_expr): Use convert rather than an
3272 explicit NOP_EXPR.
3273
3274 2003-03-02 Matt Austern <austern@apple.com>
3275
3276 * decl.c (cp_binding_level): Add static_decls varray member.
3277 (add_decl_to_level): Add static/inline namespace scope
3278 declarations to static_decls array.
3279 (wrapup_global_for_namespace): Pass static_decls only, instead of
3280 all decls, to wrapup_global_declarations/check_global_declarations.
3281 (push_namespace): Initialize static_decls for ordinary namespaces.
3282 (cxx_init_decl_processing): Initialize static_decls for global
3283 namespace.
3284
3285 2003-03-05 Mark Mitchell <mark@codesourcery.com>
3286
3287 * class.c (end_of_class): Correct thinko.
3288
3289 2003-03-04 Nathanael Nerode <neroden@gcc.gnu.org>
3290
3291 * config-lang.in: Replace ${libstdcxx_version} by its value.
3292
3293 2003-03-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
3294
3295 * cp-tree.h (cxx_saved_binding): Declare.
3296 (struct saved_scope): Adjust type of field 'old_binding'.
3297 * decl.c (cxx_saved_binding_make): New macro.
3298 (struct cxx_saved_binding): Define.
3299 (store_bindings): Adjust prototype. Use cxx_saved_binding to save
3300 C++ bindings.
3301 (maybe_push_to_top_level): Adjust local variable type.
3302 (pop_from_top_level): Likewise.
3303
3304 2003-03-04 Tom Tromey <tromey@redhat.com>
3305
3306 * Make-lang.in (c++.tags): New target.
3307
3308 2003-03-04 Neil Booth <neil@daikokuya.co.uk>
3309
3310 * Make-lang.in: Update.
3311
3312 2003-03-03 Jason Merrill <jason@redhat.com>
3313
3314 * decl.c (finish_enum): Do set the type in a template. Simplify.
3315 * pt.c (tsubst_enum, tsubst_copy): Revert last patch.
3316
3317 2003-03-03 Mark Mitchell <mark@codesourcery.com>
3318
3319 PR c++/9878
3320 * call.c (convert_class_to_reference): Correct conversion
3321 sequences.
3322 (reference_binding): Add ref_bound_directly_to_rvalue_p parameter.
3323 (implicit_conversion): Adjust call to reference_binding.
3324 (add_candidate): Change type of candidates parameter.
3325 (add_function_candidate): Likewise.
3326 (add_conv_candidate): Likewise.
3327 (build_builtin_candidate): Likewise.
3328 (add_builtin_candidate): Likewise.
3329 (add_builtin_candidates): Likewise.
3330 (add_template_candidate_real): Likewise.
3331 (add_template_candidate): Likewise.
3332 (add_template_conv_candidate): Likewise.
3333 (build_user_type_conversion_1): Adjust accordingly.
3334 (build_object_call): Likewise.
3335 (build_conditional_expr): Likewise.
3336 (add_candidates): Likewise.
3337 (build_new_op): Likewise.
3338 (convert_like_real): Use USER_CONV_CAND. Use build_nop.
3339 (build_new_method_call): Adjust calls to add_function_candidate.
3340 (make_temporary_var_for_ref_to_temp): New function.
3341 (initialize_reference): Add decl parameter.
3342 * class.c (build_rtti_vtbl_entries): Use build_address and
3343 build_nop.
3344 * cp-tree.h (initialize_reference): Change prototype.
3345 (make_temporary_var_for_ref_to_temp): New function.
3346 (build_type_conversion): Change prototype.
3347 (build_address): New function.
3348 (build_nop): Likewise.
3349 * cvt.c (cp_convert_to_pointer): Adjust call to
3350 build_type_conversion. Avoid indicating redundant NOP_EXPRs.
3351 Use build_nop.
3352 (convert_to_pointer_force): Use build_nop.
3353 (build_up_reference): Use make_temporary_var_for_ref_to_temp.
3354 (convert_to_reference): Adjust call to build_type_conversion.
3355 (ocp_convert): Likewise.
3356 (build_type_conversion): Remove for_sure parameter.
3357 * decl.c (grok_reference_init): Use initialize_reference.
3358 * typeck.c (build_address): New function.
3359 (build_nop): Likewise.
3360 (build_unary_op): Use them.
3361 (build_ptrmemfunc): Tidy slightly.
3362 (convert_for_initialization): Adjust call to
3363 initialize_reference.
3364 * typeck2.c (store_init_value): Remove #if 0'd code.
3365
3366 2003-03-03 Jason Merrill <jason@redhat.com>
3367
3368 * decl.c (start_function): Clear DECL_NUM_STMTS.
3369
3370 * class.c (get_vtable_decl): Use vtbl_type_node.
3371 (build_primary_vtable): Check for it.
3372
3373 2003-03-02 Aldy Hernandez <aldyh@redhat.com>
3374
3375 * decl.c (check_initializer): Check for vector_opaque_p.
3376
3377 2003-03-02 Ashif Harji <asharji@uwaterloo.ca>
3378
3379 * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to
3380 invoke an external cpp during compilation.
3381
3382 2003-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
3383
3384 * decl.c (duplicate_decls): Convert use of warning_with_decl() to
3385 that of warning().
3386 (start_decl): Likewise.
3387 (start_function): Likewise.
3388
3389 2003-03-01 Neil Booth <neil@daikokuya.co.uk>
3390
3391 * Make-lang.in (CXX_C_OBJS): Update.
3392
3393 2003-02-28 Mark Mitchell <mark@codesourcery.com>
3394
3395 PR c++/9892
3396 * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when
3397 instantiating it.
3398
3399 2003-02-28 Aldy Hernandez <aldyh@redhat.com>
3400
3401 * parser.c (cp_parser_init_declarator): Revert opaque
3402 vector_opaque_p change.
3403 Do not include target.h.
3404
3405 2003-02-28 Mark Mitchell <mark@codesourcery.com>
3406
3407 PR c++/9879
3408 * cp-tree.h (build_zero_init): Add parameter.
3409 * decl.c (cp_finish_decl): Adjust call.
3410 * init.c (build_zero_init): Add nelts parameter. Adjust recursive
3411 calls.
3412 (build_default_init): Add nelts parameter. Adjust calls to
3413 build_zero_init.
3414 (build_new_1): Adjust call to build_default_init.
3415 * typeck2.c (process_init_constructor): Adjust call to build_zero_init.
3416
3417 2003-02-26 Devang Patel <dpatel@apple.com>
3418
3419 * decl.c (finish_enum): Merge two 'for' loops. Copy value node if
3420 required. Postpone enum setting for template decls.
3421 (build_enumerator): Delay copying value node until finish_enum
3422 (). Remove #if 0'ed code.
3423 * pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
3424 (tsubst_copy): Add check for enum type.
3425
3426 2003-02-25 Mark Mitchell <mark@codesourcery.com>
3427
3428 PR c++/9683
3429 * decl2.c (prune_vars_needing_no_initialization): Do not throw
3430 away initializations for DECL_EXTERNAL VAR_DECLs.
3431 (finish_file): Adjust accordingly.
3432 * pt.c (instantiate_decl): Do not defer VAR_DECLs.
3433
3434 2003-02-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
3435
3436 * decl.c (add_binding): Time TV_NAME_LOOKUP.
3437 (push_class_binding): Likewise.
3438 (set_namespace_binding): Likewise.
3439
3440 2003-02-24 Mark Mitchell <mark@codesourcery.com>
3441
3442 PR c++/9836
3443 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from
3444 specializations back to the main template.
3445 * parser.c (cp_parser_diagnose_invalid_type_name):Adjust use.
3446 * pt.c (resolve_typename_type): Likewise.
3447
3448 2003-02-24 Jeffrey D. Oldham <oldham@codesourcery.com>
3449
3450 PR c++/9778
3451 * pt.c (tsubst_copy_and_build): For a templated function inside a
3452 scope, process template arguments.
3453
3454 2003-02-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3455
3456 PR c++/9602
3457 * typeck2.c (abstract_virtuals_error): Don't check when
3458 TYPE is still template parameter dependent.
3459
3460 2003-02-23 Mark Mitchell <mark@codesourcery.com>
3461
3462 PR c++/5333
3463 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
3464 * parser.c (cp_parser_diagnose_invalid_type_name): Use it.
3465 * pt.c (instantiate_class_template): Don't try to instantiate
3466 dependent types.
3467 (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
3468
3469 2003-02-21 Mark Mitchell <mark@codesourcery.com>
3470
3471 PR c++/9749
3472 * decl.c (grokdeclarator): Do not allow parameters with variably
3473 modified types.
3474
3475 2003-02-21 Nathan Sidwell <nathan@codesourcery.com>
3476
3477 * search.c (grow_bfs_bases): Remove. Fold into ...
3478 (bfs_walk): ... here, fix fencepost error. Fix merge lossage
3479 in previous patch.
3480
3481 2003-02-20 Mark Mitchell <mark@codesourcery.com>
3482
3483 PR c++/9729
3484 * mangle.c (mangle_conv_op_name_for_type): Issue an error message
3485 when the G++ 3.2 ABI prevents correct compilation.
3486
3487 2003-02-20 Nathan Sidwell <nathan@codesourcery.com>
3488
3489 Change base class access representation. Share virtual base
3490 binfos.
3491 * cp/call.c (build_special_member_call): Remove binfo_for_vbase
3492 call.
3493 * cp/class.c (build_base_path): Likewise.
3494 (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use.
3495 (build_secondary_vtable): Remove FOR_TYPE arg. Adjust.
3496 (make_new_vtable): Adjust.
3497 (force_canonical_binfo_r): Delete.
3498 (force_canonical_binfo): Delete.
3499 (mark_primary_virtual_base): Delete.
3500 (dfs_unshared_virtual_bases): Delete.
3501 (mark_primary_bases): Adjust.
3502 (maybe_warn_about_overly_private_class): Adjust.
3503 (dfs_base_derived_from): Delete.
3504 (base_derived_from): Follow the inheritance chain.
3505 (struct find_final_overrider_data): Add vpath member.
3506 (dfs_find_final_overrider): Adjust.
3507 (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New.
3508 (find_final_overrider): Adjust.
3509 (update_vtable_entry_for_fn): Adjust.
3510 (modify_all_vtables): Adjust.
3511 (walk_subobject_offsets): Adjust.
3512 (layout_nonempty_base_or_field): Adjust.
3513 (layout_empty_base): Remove last parameter. Adjust.
3514 (build_base_field): Adjust.
3515 (build_base_fields): Adjust.
3516 (propagate_binfo_offsets): Remove last parameter. Adjust.
3517 (dfs_set_offset_for_unshared_vbases): Delete.
3518 (layout_virtual_bases): Adjust.
3519 (finish_struct_1): Adjust.
3520 (init_class_processing): Don't init access nodes.
3521 (dfs_get_primary_binfo): Delete.
3522 (get_primary_binfo): Adjust.
3523 (dump_class_hierarchy_r): Remove most derived arg, add IGO
3524 parameter. Adjust.
3525 (dump_class_hierarchy): Adjust.
3526 (finish_vtbls): Adjust.
3527 (get_original_base): Delete.
3528 (build_vtt_inits): Adjust.
3529 (dfs_build_secondary_vptr_vtt_inits): Adjust.
3530 (dfs_ctor_vtable_bases_queue_p): Adjust.
3531 (build_ctor_vtbl_group): Adjust.
3532 (dfs_accumulate_vtbl_inits): Adjust.
3533 (build_vtbl_initializer): Adjust.
3534 (build_vbase_offset_vtbl_entries): Adjust.
3535 (add_vcall_offset_vtbl_entries_1): Adjust.
3536 * cp/cp-tree.h (CPTI_ACCESS_*): Remove.
3537 (access_*_node): Remove.
3538 (CANONICAL_BINFO): Delete.
3539 (BINFO_UNSHARED_MARKED): Remove.
3540 (BINFO_MARKED): Set LANG_FLAG_0 directly.
3541 (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete.
3542 (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly.
3543 (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED):
3544 Delete.
3545 (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly.
3546 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
3547 (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED):
3548 Delete.
3549 (BINFO_DEPENDENT_BASE_P): New.
3550 (dfs_walk, dfs_walk_real): Queue function takes derived binfo and
3551 index.
3552 (markedp, unmarkedp): Adjust.
3553 (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p,
3554 dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp,
3555 find_vbase_instance, binfo_for_vbase): Delete.
3556 (copied_binfo, original_binfo): Declare.
3557 (finish_base_specifier): Add virtual_p arg.
3558 (unshare_base_binfos): Delete.
3559 (copy_base_binfos): Declare.
3560 (reverse_path): Delete.
3561 * cp/decl.c (xref_basetypes): Access and virtuality passed
3562 differently. Don't copy direct base binfos here. Call
3563 copy_base_binfos.
3564 * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust.
3565 (initialize_vtbl_ptrs): Adjust.
3566 (expand_member_init): Adjust.
3567 * cp/parser.c (cp_parser_base_specifier): Adjust.
3568 * cp/pt.c (instantiate_class_template): Adjust.
3569 (get_template_base_recursive): Adjust.
3570 * cp/rtti.c (get_pseudo_ti_init): Adjust.
3571 (get_pseudo_ti_desc): Adjust.
3572 * cp/tree.c (unshare_base_binfos): Rename to ...
3573 (copy_base_binfos): ... here, reimplement.
3574 (make_binfo): Set BINFO_DEPENDENT_BASE_P.
3575 (reverse_path): Remove.
3576 * cp/typeck.c (get_delta_difference): Adjust error messages.
3577 * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust.
3578 * cp/search.c (lookup_base_r): Adjust.
3579 (dynamic_cast_base_recurse): Adjust.
3580 (canonical_binfo): Remove.
3581 (dfs_canonical_queue): Remove.
3582 (dfs_assert_unmarked_p): Remove.
3583 (assert_canonical_unmarked): Remove.
3584 (shared_marked_p, shared_unmarked_p): Remove.
3585 (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE.
3586 (dfs_access_in_type): Adjust.
3587 (access_in_type): Adjust.
3588 (dfs_accessible_queue_p): Adjust.
3589 (dfs_accessible_p): Adjust.
3590 (is_subobject_of_p_1, is_subobject_of_p): Remove.
3591 (struct lookup_field_info): Remove from_dep_base_p field.
3592 (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P.
3593 (lookup_field_r): Remove dependent base code.
3594 (lookup_member): Likewise.
3595 (dfs_walk, dfs_walk_real): Add access arg to queue fn.
3596 (dfs_unmarked_real_bases_queue_p): Remove.
3597 (dfs_marked_real_bases_queue_p): Remove.
3598 (dfs_skip_vbases): Remove.
3599 (dfs_get_pure_virtuals): Adjust.
3600 (markedp, unmarkedp): Adjust.
3601 (marked_vtable_pathp, unmarked_vtable_pathp): Remove.
3602 (marked_pushdecls_p, unmarked_pushdecls_p): Adjust.
3603 (dfs_unmark): Adjust.
3604 (dfs_get_vbase_types):Remove.
3605 (dfs_build_inheritance_graph_order): Remove.
3606 (get_vbase_types): Remove
3607 (dfs_find_vbase_instance): Remove.
3608 (find_vbase_instance): Remove.
3609 (dfs_debug_unmarkedp): Adjust.
3610 (dependent_base_p): Remove.
3611 (dfs_push_type_decls): Adjust.
3612 (dfs_push_decls): Adjust.
3613 (dfs_no_overlap_yet): Adjust.
3614 (copied_binfo): New function.
3615 (original_binfo): New function.
3616 (binfo_for_vbase): Remove.
3617
3618 2003-02-18 Zack Weinberg <zack@codesourcery.com>
3619
3620 * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
3621 (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES
3622 vectors, for speed.
3623
3624 2003-02-18 Mark Mitchell <mark@codesourcery.com>
3625
3626 PR c++/9704
3627 * class.c (layout_class_type): In the 3.2 ABI, take into account
3628 trailing bit fields when computing CLASSTYPE_SIZE_UNIT.
3629
3630 2003-02-18 Matt Austern <austern@apple.com>
3631
3632 * cp/cp-lang.c: Change lang hooks so that final_write_globals does
3633 nothing for C++.
3634 * cp/decl.c (wrapup_globals_for_namespace): Remove special
3635 handling of global namespace.
3636
3637 2003-02-18 Geoffrey Keating <geoffk@apple.com>
3638
3639 * cp-tree.h (rid_to_yy): Delete.
3640 (C_RID_YYCODE): Delete.
3641 (finish_file): Delete redundant declaration.
3642
3643 2003-02-18 Jason Merrill <jason@redhat.com>
3644
3645 PR c++/9623
3646 * decl.c (reshape_init): Don't mess with initializer labels.
3647
3648 PR c++/9485
3649 * parser.c (cp_parser_postfix_expression): Set idk properly for
3650 object->scope::member.
3651
3652 2003-02-18 Ben Elliston <bje@redhat.com>
3653
3654 PR other/7350
3655 * decl.c (duplicate_decls): Fix typo in comment.
3656
3657 2003-02-17 Michael Elizabeth Chastain <mec@shout.net>
3658
3659 PR debug/9717
3660 * class.c (build_base_field): Mark fields for base classes with
3661 DECL_IGNORED_P.
3662
3663 2003-02-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3664
3665 PR c++/9457
3666 * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
3667 CONSTRUCTOR_ELTS only once.
3668
3669 2003-02-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3670
3671 PR c++/9459
3672 * error.c (dump_type_prefix): Handle TYPEOF_TYPE.
3673 (dump_type_suffix): Likewise.
3674
3675 2003-02-14 Nathan Sidwell <nathan@codesourcery.com>
3676
3677 * search.c: ANSIfy function declarations and definitions.
3678 * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
3679 * call.c (build_method_call, resolve_scoped_fn_name,
3680 build_java_interface_fn_ref): Adjust lookup_field, lookup_member
3681 calls.
3682 * class.c (handle_using_decl): Likewise.
3683 * decl.c (make_typename_type, make_unmound_class_template,
3684 start_decl, compute_array_index_type): Likewise.
3685 * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
3686 * init.c (expand_member_init, build_member_call): Likewise.
3687 * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
3688 resolve_typename_type): Likewise.
3689 * typeck.c (lookup_destructor, finish_class_member_access_exprm
3690 build_prememfunc_access_expr): Likewise.
3691
3692 2003-02-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
3693
3694 * decl2.c: Include "timevar.h".
3695 (namespace_ancestor): Time name lookup.
3696 (add_using_namespace): Likewise.
3697 (lookup_using_namespace): Likewise.
3698 (qualified_lookup_using_namespace): Likewise.
3699 (decl_namespace): Likewise.
3700 (lookup_arg_dependent): Likewise.
3701 * lex.c (do_identifier): Likewise.
3702 (do_scoped_id): Likewise.
3703 * pt.c (lookup_template_class): Likewise.
3704
3705 2003-02-14 Andrew Pinski <pinskia@physics.uc.edu>
3706
3707 * decl.c: (define_label): Fix warning for return 0 instead of NULL.
3708
3709 2003-02-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
3710
3711 * decl.c: Include "timevar.h".
3712 (poplevel): Time name lookup.
3713 (find_binding): Likewise.
3714 (push_namespace): Likewise.
3715 (pop_nested_namespace): Likewise.
3716 (store_bindings): Likewise.
3717 (maybe_push_to_top_level): Likewise.
3718 (pop_from_top_level): Likewise.
3719 (push_local_name): Likewise.
3720 (pushtag): Likewise.
3721 (pushdecl): Likewise.
3722 (pushdecl_with_scope): Likewise.
3723 (pushdecl_namespace_level): Likewise.
3724 (pushdecl_top_level): Likewise.
3725 (pushdecl_class_level): Likewise.
3726 (push_class_level_binding): Likewise.
3727 (push_using_decl): Likewise.
3728 (push_using_directive): Likewise.
3729 (push_overloaded_decl): Likewise.
3730 (lookup_label): Likewise.
3731 (define_label): Likewise.
3732 (lookup_tag): Likewise.
3733 (lookup_tag_reverse): Likewise.
3734 (lookup_namespace_name): Likewise.
3735 (select_decl): Likewise.
3736 (unqualified_namespace_lookup): Likewise.
3737 (lookup_name_real): Likewise.
3738 (lookup_name_current_level): Likewise.
3739 (lookup_type_current_level): Likewise.
3740 (maybe_inject_for_scope_var): Likewise.
3741 (xref_tag): Likewise.
3742
3743 * Make-lang.in (cp/decl.o): Add dependency on timevar.h
3744
3745 2003-02-12 Phil Edwards <pme@gcc.gnu.org>
3746
3747 * decl.c (build_enumerator): Remove unneeded test.
3748
3749 2003-02-09 Dan Nicolaescu <dann@ics.uci.edu>
3750
3751 * cp-tree.h (struct lang_type_header): Make all fields unsigned
3752 char.
3753
3754 2003-02-03 Mark Mitchell <mark@codesourcery.com>
3755
3756 PR c++/7129
3757 * call.c (z_candidate): Add args.
3758 (convert_class_to_reference): Set it.
3759 (implicit_conversion): Tidy.
3760 (add_candidate): Add args parameter.
3761 (add_function_candidate): Adjust call to add_candidate.
3762 (add_conv_candidate): Likewise.
3763 (build_builtin_candidate): Likewise.
3764 (build_user_type_conversion_1): Eliminate wasteful tree_cons
3765 usage.
3766 (build_new_function_call): Likewise.
3767 (build_object_call): Likewise.
3768 (add_candidates): New function.
3769 (build_new_op): Use it.
3770 (covert_like_real): Adjust call to build_over_call.
3771 (build_over_call): Remove args parameter.
3772 * operators.def: Add <?= and >?=.
3773
3774 2003-02-01 Richard Sandiford <rsandifo@redhat.com>
3775
3776 * typeck.c (build_indirect_ref): Don't check flag_volatile.
3777
3778 2003-01-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3779
3780 PR c++/8849
3781 * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
3782
3783 2003-01-31 Nathan Sidwell <nathan@codesourcery.com>
3784
3785 * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
3786 BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
3787 (BINFO_LANG_ELTS): New #define.
3788 * tree.c (make_binfo): Use BINFO_LANG_ELTS.
3789
3790 2003-01-30 Geoffrey Keating <geoffk@apple.com>
3791
3792 * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
3793
3794 2003-01-30 Mark Mitchell <mark@codesourcery.com>
3795
3796 * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
3797 for class types.
3798 * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
3799 rather than TYPE_LANG_FLAG_0.
3800 (TYPE_BUILT_IN): Remove.
3801 (TYPE_DEPENDENT_P): New macro.
3802 (TYPE_DEPENDENT_P_VALID): Likewise.
3803 (lang_type_class): Add fields_readonly.
3804 * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
3805 * pt.c (dependent_type_p_r): New function, split out from ...
3806 (dependent_type_p): ... here. Memoize results.
3807 * search.c (dependent_base_p): Use dependent_type_p, not
3808 uses_template_parms.
3809 * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
3810 for class types.
3811
3812 2003-01-29 Mark Mitchell <mark@codesourcery.com>
3813
3814 * call.c (build_field_call): Use build_new_op, not build_opfncall.
3815 (prep_operand): New function.
3816 (build_new_op): Use it. Remove dead code.
3817 * class.c (pushclass): Change "modify" parameter type from int to
3818 bool.
3819 (currently_open_class): Use same_type_p, not pointer equality.
3820 (push_nested_class): Adjust calls to pushclass, remove modify
3821 parameter.
3822 * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
3823 (pushclass): Change prototype.
3824 (push_nested_class): Likewise.
3825 (grokoptypename): Remove.
3826 (build_opfncall): Remove.
3827 (value_dependent_expression_p): Declare.
3828 (resolve_typename_type): Likewise.
3829 (resolve_typename_type_in_current_instantiation): Likewise.
3830 (enter_scope_of): Remove.
3831 (tsubst): Remove.
3832 (tsubst_expr): Likewise.
3833 (tsubst_copy): Likewise.
3834 (tsubst_copy_and_build): Likewise.
3835 * decl.c (warn_about_implicit_typename_lookup): Remove.
3836 (finish_case_label): Return error_mark_node for erroneous labels.
3837 (start_decl): Adjust calls to push_nested_class.
3838 (grokfndecl): Call push_scope/pop_scope around call to
3839 duplicate_decls.
3840 (grokdeclarator): Do not call tsubst.
3841 (start_function): Adjust calls to push_nested_class.
3842 * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
3843 (check_classfn): Use push_scope/pop_scope around type comparisions.
3844 (grokoptypename): Remove.
3845 (push_sscope): Adjust call to push_nested_class.
3846 * error.c (dump_type): Show cv-qualification of typename types.
3847 * init.c (build_member_call): Use build_new_op, not
3848 build_opfncall.
3849 * method.c (build_opfncall): Remove.
3850 * parser.c (cp_parser): Add allow_non_constant_expression_p and
3851 non_constant_expression_p.
3852 (cp_parser_constant_expression): Adjust prototype.
3853 (cp_parser_resolve_typename_type): Remove.
3854 (cp_parser_non_constant_expression): New function.
3855 (cp_parser_non_constant_id_expression): Likewise.
3856 (cp_parser_new): Set allow_non_constant_expression_p and
3857 non_constant_expression_p.
3858 (cp_parser_primary_expression): Reject `this' and `va_arg' in
3859 constant-expressions. Note that dependent names aren't really
3860 constant.
3861 (cp_parser_postfix_expression): Reject conversions to non-integral
3862 types in constant-expressions. Neither are increments or
3863 decrements.
3864 (cp_parser_unary_expression): Reject increments and decrements in
3865 constant-expressions.
3866 (cp_parser_direct_new_declarator): Adjust call to
3867 cp_parser_constant_expression.
3868 (cp_parser_cast_expression): Reject conversions to non-integral
3869 types in constant-expressions.
3870 (cp_parser_assignment_expression): Rejects assignments in
3871 constant-expressions.
3872 (cp_parser_expression): Reject commas in constant-expressions.
3873 (cp_parser_labeled_statement): Adjust call to
3874 cp_parser_constant_expression.
3875 (cp_parser_direct_declarator): Simplify array bounds, even in
3876 templates, when they are non-dependent. Use
3877 resolve_typename_type, not cp_parser_resolve_typename_type.
3878 (cp_parser_class_head): Use resolve_typename_type, not
3879 cp_parser_resolve_typename_type.
3880 (cp_parser_member_declaration): Adjust call to
3881 cp_parser_constant_expression.
3882 (cp_parser_constant_initializer): Likewise.
3883 (cp_parser_constructor_declarator): Use resolve_typename_type, not
3884 cp_parser_resolve_typename_type.
3885 (cp_parser_late_parsing_default_args): Adjust call to
3886 push_nested_class.
3887 * pt.c (tsubst): Give it internal linkage.
3888 (tsubst_expr): Likewise.
3889 (tsubst_copy): Likewise.
3890 (tsubst_copy_and_build): Likewise.
3891 (push_access_scope_real): Likewise.
3892 (tsubst_friend_class): Likewise.
3893 (instantiate_class_template): Adjust call to pushclass.
3894 (value_dependent_expression_p): Give it external linkage.
3895 Robustify.
3896 (resolve_typename_type): New function.
3897 * semantics.c (finish_call_expr): Use build_new_op, not
3898 build_opfncall.
3899 (begin_constructor_declarator): Remove.
3900 (begin_class_definition): Adjust call to pushclass.
3901 (enter_scope_of): Remove.
3902 * typeck.c (comptypes): Resolve typename types as appropriate.
3903 (build_x_indirect_ref): Use build_new_op, not build_opfncall.
3904 (build_x_compound_expr): Likewise.
3905 (build_modify_expr): Likewise.
3906 (build_x_modify_expr): Likewise.
3907 * typeck2.c (build_x_arrow): Likewise.
3908
3909 2003-01-29 Fariborz Jahanian <fjahanian@apple.com>
3910
3911 * pt.c (last_pending_template) Declare GTY().
3912
3913 2003-01-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3914
3915 PR c++/8591
3916 * parser.c (cp_parser_elaborated_type_specifier): Convert
3917 TEMPLATE_DECL to TYPE_DECL only when processing template friends.
3918 (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
3919
3920 2003-01-28 Nathan Sidwell <nathan@codesourcery.com>
3921
3922 PR c++/9437
3923 * pt.c (unify): Don't unify '*T' with 'U C::*'.
3924
3925 PR c++/3902
3926 * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
3927 inside a declarator.
3928
3929 2003-01-27 Nathan Sidwell <nathan@codesourcery.com>
3930
3931 * class.c (update_vtable_entry_for_fn): Add index parameter.
3932 Generate vcall thunk for covariant overriding from a virtual
3933 primary base.
3934 (dfs_modify_vtables): Adjust.
3935
3936 2003-01-25 Nathan Sidwell <nathan@codesourcery.com>
3937
3938 PR c++/9403
3939 * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
3940 template keyword.
3941 (cp_parser_base_specifier): Look for and consume a
3942 TEMPLATE keyword. Replace switch with array index.
3943
3944 PR c++/795
3945 * semantics.c (finish_non_static_data_member): Remember the
3946 field's type even in a template.
3947
3948 PR c++/9415
3949 * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
3950 already scoped.
3951
3952 PR c++/8545
3953 * parser.c (cp_parser_cast_expression): Be more tentative.
3954
3955 2003-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3956
3957 * cp-tree.h (flagged_type_tree_s): Remove.
3958 (check_for_new_type): Likewise.
3959 * typeck2.c (check_for_new_type): Likewise.
3960
3961 2003-01-23 Nathanael Nerode <neroden@gcc.gnu.org>
3962
3963 * dump.c: ANSIfy function declarations and definitions.
3964
3965 * cp-tree.h, decl.h: Get rid of PARAMS. Again.
3966
3967 2003-01-22 Mark Mitchell <mark@codesourcery.com>
3968
3969 PR c++/9354
3970 * init.c (build_new): Set the type of the new-expression, even
3971 when processing_templte_decl.
3972
3973 PR c++/9216
3974 * parser.c (cp_parser_primary_expression): Improve error message
3975 for templates used in an expression context.
3976
3977 PR c++/8696
3978 * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
3979 parse when encountering "typedef".
3980
3981 2003-01-22 Nathanael Nerode <neroden@gcc.gnu.org>
3982
3983 * class.c, parser.c: ANSIfy function definitions and declarations.
3984
3985 2003-01-22 Mark Mitchell <mark@codesourcery.com>
3986
3987 PR c++/9328
3988 * error.c (dump_decl): For an OVERLOAD, just print the name of the
3989 function; it doesn't make sense to try to print its type.
3990 * semantics.c (finish_typeof): Issue errors about invalid uses.
3991
3992 PR c++/9298
3993 * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
3994 function.
3995 (cp_parser_expression_statement): Use it.
3996 (cp_parser_explicit_instantiation): Likewise.
3997 * pt.c (do_decl_instantiation): Improve error handling logic.
3998
3999 2003-01-22 Mark Mitchell <mark@codesourcery.com>
4000
4001 PR c++/9384
4002 * parser.c (cp_parser_using_declaration): Issue error messages
4003 about name resolution failures here.
4004
4005 PR c++/9388
4006 * class.c (currently_open_derived_class): Use dependent_type_p.
4007 * cp-tree.h (dependent_type_p): New function.
4008 (dependent_template_arg_p): Likewise.
4009 (dependent_template_p): Likewise.
4010 (type_dependent_expression_p): Likewise.
4011 * parser.c (cp_parser_dependent_type_p): Remove.
4012 (cp_parser_value_dependent_type_p): Likewise.
4013 (cp_parser_type_dependent_expression_p): Likewise.
4014 (cp_parser_dependent_template_arg_p): Likewise.
4015 (cp_parser_dependent_template_id_p): Likewise.
4016 (cp_parser_dependent_template_p): Likewise.
4017 (cp_parser_diagnose_invalid_type_name): Replace
4018 cp_parser_dependent_type_p with dependent_type_p, etc.
4019 (cp_parser_primary_expresion): Likewise.
4020 (cp_parser_nested_name_specifier_opt): Likewise.
4021 (cp_parser_postfix_expression): Likewise.
4022 (cp_parser_unary_expression): Likewise.
4023 (cp_parser_template_name): Likewise.
4024 (cp_parser_class_name): Likewise.
4025 (cp_parser_lookup_name): Likewise.
4026 * pt.c (dependent_type_p): New function.
4027 (value_dependent_expression_p): Likewise.
4028 (type_dependent_expression_p): Likewise.
4029 (dependent_template_arg_p): Likewise.
4030 (dependent_template_id_p): Likewise.
4031 (dependent_template_p): Likewise.
4032
4033 PR c++/9285
4034 PR c++/9294
4035 * parser.c (cp_parser_simple_declaration): Return quickly when
4036 encountering errors.
4037
4038 2003-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4039
4040 Make-lang.in (cp/decl.o-warn): Add -Wno-error.
4041
4042 2003-01-17 Jason Merrill <jason@redhat.com>
4043
4044 PR c++/9167, c++/9358
4045 * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
4046
4047 2003-01-17 Jason Merrill <jason@redhat.com>
4048
4049 PR c++/9342
4050 * call.c (build_conditional_expr): Always do lvalue-rvalue
4051 conversion.
4052
4053 2003-01-17 Mark Mitchell <mark@codesourcery.com>
4054
4055 PR c++/9294
4056 * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
4057 * cp-tree.h (BASELINK_BINFO): Adjust.
4058 (BASELINK_FUNCTIONS): Likewise.
4059 (BASELINK_ACCESS_BINFO): Likewise.
4060 (tree_baselink): New structure.
4061 (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
4062 (lang_tree_node): Add baselink.
4063 * decl.c (cp_tree_node_structure): Add BASELINK case.
4064 * search.c (build_baselink): Adjust.
4065 * tree.c (cp_walk_subtrees): Add BASELINK case. Remove BASELINK_P
4066 test from TREE_LIST case.
4067
4068 PR c++/9272
4069 * parser.c (cp_parser_constructor_declarator_p): Do not assume
4070 that a constructor cannot be declared outside of its own class.
4071
4072 * parser.c (cp_parser_resolve_typename_type): If the scope cannot
4073 be resolved, neither can the qualified name.
4074
4075 * rtti.c (get_pseudo_ti_desc): Fix thinko.
4076
4077 2003-01-16 Jason Merrill <jason@redhat.com>
4078
4079 PR c++/8564
4080 * init.c (build_vec_init): Re-add maxindex parm.
4081 (perform_member_init, build_aggr_init): Pass it.
4082 (build_new_1): Pass it. Use an incomplete array type for full_type.
4083 * typeck.c (build_modify_expr): Pass it.
4084 * cp-tree.h: Adjust.
4085
4086 2003-01-16 Jeffrey D. Oldham <oldham@codesourcery.com>
4087
4088 * cp-tree.h (tsubst_copy_and_build): New declaration.
4089 * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
4090 (tsubst_expr): Use 'tsubst_copy_and_build'. Update initial comment.
4091 (tsubst_copy_and_build): New function.
4092
4093 2003-01-16 Mark Mitchell <mark@codesourcery.com>
4094
4095 * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
4096 (PARTIAL_INSTANTIATION_P): Remove.
4097 (IMPLICIT_TYPENAME_P): Likewise.
4098 (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
4099 (build_typename_type): Remove declaration.
4100 (parmlist_is_exprlist): Likewise.
4101 * decl.c (build_typename_type): Make it static, remove third
4102 parameter.
4103 (push_class_binding): Don't do implicit typename stuff.
4104 (make_typename_type): Likewise.
4105 (lookup_name_real): Likewise.
4106 (grokdeclarator): Don't try to convert declarations into
4107 initializations. Don't do implicit typename stuff.
4108 (parmlist_is_exprlist): Remove.
4109 (xref_basetypes): Simplify.
4110 * decl2.c (grokfield): Don't try to convert declarations into
4111 initializations.
4112 (build_anon_union_vars): Do this while processing templates, too.
4113 (finish_anon_union): Likewise.
4114 * error.c (dump_type): Remove implicit typename handling.
4115 * parser.c (cp_parser_diagnose_invalid_type_name): New method.
4116 (cp_parser_primary_expression): Correct handling of names not
4117 found by unqualified name lookup in templates.
4118 (cp_parser_nested_name_specifier_opt): Avoid checking dependency
4119 of types when possible.
4120 (cp_parser_simple_declaration): Complain intelligently about some
4121 invalid declarations.
4122 (cp_parser_member_declaration): Likewise.
4123 (cp_parser_constructor_declarator_p): Don't check when we're in a
4124 function scope.
4125 * pt.c (instantiate_class_template): Remove
4126 PARTIAL_INSTANTIATION_P gunk.
4127 * search.c (lookup_field_r): Don't build implicit typenames.
4128 (marked_pushdecls_p): Don't enter dependent base types.
4129 (unmarked_pushdecls_p): Likewise.
4130 * semantics.c (begin_class_definition): Remove implicit typename
4131 stuff.
4132
4133 2003-01-16 Nathan Sidwell <nathan@codesourcery.com>
4134
4135 PR c++/9212
4136 * parser.c (cp_parser_direct_declarator): If accepting either
4137 abstract or named, the name must be an unqualified-id.
4138
4139 2003-01-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4140
4141 * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
4142
4143 2003-01-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4144
4145 * decl2.c (check_classfn): Fix uninitialized warning.
4146 (build_anon_union_vars): Likewise.
4147 * pt.c (tsubst_copy): Likewise.
4148
4149 2003-01-14 Jeffrey D. Oldham <oldham@codesourcery.com>
4150
4151 Further conform g++'s __vmi_class_type_info to the C++ ABI
4152 specification.
4153 * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
4154 the specification.
4155 (class_hint_flags): Likewise.
4156
4157 2003-01-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4158
4159 * config-lang.in: Add semantics.c to gtfiles.
4160 * cp-tree.h (flagged_type_tree_s): Remove lookups field.
4161 (saved_scope): Likewise.
4162 (type_lookups): Remove.
4163 (deferred_access): New structure.
4164 (type_access_control): Remove.
4165 (save_type_access_control): Likewise.
4166 (reset_type_access_control): Likewise.
4167 (decl_type_access_control): Likewise.
4168 (push_deferring_access_checks): Declare.
4169 (resume_deferring_access_checks): Likewise.
4170 (stop_deferring_access_checks): Likewise.
4171 (pop_deferring_access_checks): Likewise.
4172 (get_deferred_access_checks): Likewise.
4173 (pop_to_parent_deferring_access_checks): Likewise.
4174 (perform_deferred_access_checks): Likewise.
4175 (perform_or_defer_access_check): Likewise.
4176 * decl.c (make_typename_type): Use perform_or_defer_access_check.
4177 (make_unbound_class_template): Likewise.
4178 (grokdeclarator): Don't call decl_type_access_control.
4179 * parser.c (cp_parser_context): Remove deferred_access_checks
4180 and deferring_access_checks_p fields.
4181 (cp_parser_context_new): Adjust.
4182 (cp_parser): Remove access_checks_lists.
4183 (cp_parser_defer_access_check): Remove.
4184 (cp_parser_start_deferring_access_checks): Remove.
4185 (cp_parser_stop_deferring_access_checks): Remove.
4186 (cp_parser_perform_deferred_access_checks): Remove.
4187 (cp_parser_nested_name_specifier_opt): Use new deferred access
4188 functions.
4189 (cp_parser_simple_declaration): Likewise.
4190 (cp_parser_template_id): Likewise.
4191 (cp_parser_function_definition): Likewise.
4192 (cp_parser_class_specifier): Likewise.
4193 (cp_parser_lookup_name): Likewise.
4194 (cp_parser_single_declaration): Likewise.
4195 (cp_parser_pre_parsed_nested_name_specifier): Likewise.
4196 (cp_parser_parse_tentatively): Likewise.
4197 (cp_parser_parse_definitely): Likewise.
4198 (yyparse): Likewise.
4199 (cp_parser_init_declarator): Remove access_checks parameter.
4200 Use new deferred access functions.
4201 (cp_parser_function_definition_from_specifiers_and_declarator):
4202 Likewise.
4203 (cp_parser_class_head): Remove deferring_access_checks_p and
4204 saved_access_checks parameters. Use new deferred access functions.
4205 (cp_parser_member_specification_opt): Don't call
4206 reset_type_access_control.
4207 * search.c (type_access_control): Remove.
4208 * semantics.c: Include "gt-cp-semantics.h".
4209 (deferred_type_access_control): Remove.
4210 (deferred_access_stack): New variable.
4211 (deferred_access_free_list): Likewise.
4212 (push_deferring_access_checks): New function.
4213 (resume_deferring_access_checks): Likewise.
4214 (stop_deferring_access_checks): Likewise.
4215 (pop_deferring_access_checks): Likewise.
4216 (get_deferred_access_checks): Likewise.
4217 (pop_to_parent_deferring_access_checks): Likewise.
4218 (perform_deferred_access_checks): New function, adapted from
4219 cp_parser_perform_deferred_access_checks.
4220 (perform_or_defer_access_check): New function, adapted from
4221 cp_parser_defer_access_check.
4222 (current_type_lookups): Remove.
4223 (deferred_type_access_control): Likewise.
4224 (decl_type_access_control): Likewise.
4225 (save_type_access_control): Likewise.
4226 (reset_type_access_control): Likewise.
4227 (begin_function_definition): Adjust.
4228 (begin_class_definiton): Likewise.
4229
4230 2003-01-13 Jason Merrill <jason@redhat.com>
4231
4232 PR c++/8748
4233 * class.c (build_base_path): Take the address before calling save_expr.
4234
4235 * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
4236 all the ambiguous conversions are bad.
4237
4238 * class.c (maybe_warn_about_overly_private_class): Don't stop
4239 searching when we find a nonprivate method.
4240
4241 * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
4242
4243 2003-01-12 Mark Mitchell <mark@codesourcery.com>
4244
4245 * cp-tree.h (get_arglist_len_in_bytes): Remove.
4246
4247 PR c++/9264
4248 * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
4249 typeame types more robustly.
4250
4251 2003-01-11 Phil Edwards <pme@gcc.gnu.org>
4252
4253 * parser.c: Fix comment typos.
4254
4255 2003-01-10 Mark Mitchell <mark@codesourcery.com>
4256
4257 PR c++/9099
4258 * parser.c (cp_parser_scope_through_which_access_occurs): Handle
4259 an object_type which is not a class type.
4260
4261 2003-01-10 Geoffrey Keating <geoffk@apple.com>
4262
4263 * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
4264 (cp_parser_late_parsing_default_args): Likewise.
4265
4266 2003-01-10 Nathanael Nerode <neroden@gcc.gnu.org>
4267
4268 * cfns.gperf: ANSIfy function declarations.
4269 * cfns.h: Regenerate.
4270 * cp-tree.h: ANSIfy function declarations.
4271
4272 2003-01-10 Mark Mitchell <mark@codesourcery.com>
4273
4274 * cp-tree.h (reparse_absdcl_as_expr): Remove.
4275 (reparse_absdcl_as_casts): Likewise.
4276 (reparse_decl_as_expr): Likewise.
4277 (finish_decl_parsing): Likewise.
4278 * decl2.c (reparse_absdcl_as_expr): Remove.
4279 (reparse_absdcl_as_casts): Likewise.
4280 (repase_decl_as_expr): Likewise.
4281 (finish_decl_parsing): Likewise.
4282
4283 PR c++/9128
4284 PR c++/9153
4285 PR c++/9171
4286 * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
4287 function.
4288 (cp_parser_nested_name_specifier_opt): Correct the
4289 check_dependency_p false.
4290 (cp_parser_postfix_expression): Fix formatting.
4291 (cp_parser_decl_specifier_seq): Avoid looking for constructor
4292 declarators when possible.
4293 (cp_parser_template_id): Avoid performing name-lookup when
4294 possible.
4295 (cp_parser_class_head): Do not count specializations when counting
4296 levels of templates.
4297 (cp_parser_constructor_declarator_p): Return immediately if
4298 there's no chance that the tokens form a constructor declarator.
4299 * rtti.c (throw_bad_typeid): Add comment. Do not return an
4300 expression with reference type.
4301 (get_tinfo_decl_dynamic): Do not return an expression with
4302 reference type.
4303 (build_typeid): Add comment. Do not return an expression with
4304 reference type.
4305 * typeck.c (build_class_member_access_expr): Improve handling of
4306 conditionals and comma-expressions as objects.
4307
4308 2003-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
4309
4310 * cfns.gperf: ANSIfy function declarations.
4311 * cfns.h: Regenerate.
4312 * cp-tree.h: ANSIfy function declarations.
4313 * parser.c: ANSIfy function declarations & definitions.
4314
4315 * decl.c (bad_specifiers): Fix parameter order error I introduced.
4316
4317 2003-01-09 Geoffrey Keating <geoffk@apple.com>
4318
4319 Merge from pch-branch:
4320
4321 2003-01-09 Geoffrey Keating <geoffk@apple.com>
4322
4323 Merge to tag pch-merge-20030102:
4324
4325 * semantics.c (finish_translation_unit): Don't call finish_file.
4326 * parser.c: Don't include ggc.h.
4327 (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
4328 read first token here. Don't allow PCH files after the first
4329 token is read.
4330 (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
4331 (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
4332 (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
4333 (cp_parser_late_parsing_for_member): Don't duplicate call to
4334 cp_lexer_set_source_position_from_token.
4335 (cp_parser_late_parsing_default_args): Likewise.
4336 (yyparse): Call finish_file after clearing the_parser.
4337
4338 2002-12-11 Geoffrey Keating <geoffk@apple.com>
4339
4340 * Make-lang.in: Remove $(GGC_H) from all dependencies.
4341 (CXX_TREE_H): Add $(GGC_H).
4342 * class.c: Don't include ggc.h.
4343 (field_decl_cmp): Make parameters be 'const void *' to match qsort.
4344 (method_name_cmp): Likewise.
4345 (resort_data): New variable.
4346 (resort_field_decl_cmp): New.
4347 (resort_method_name_cmp): New.
4348 (resort_sorted_fields): New.
4349 (resort_type_method_vec): New.
4350 (finish_struct_methods): Delete cast.
4351 (finish_struct_1): Delete cast.
4352 * cp-tree.h: Include ggc.h.
4353 (struct lang_type_class): Add reorder attribute to field `methods'.
4354 (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
4355 (resort_sorted_fields): New prototype.
4356 (resort_type_method_vec): New prototype.
4357 * call.c: Don't include ggc.h.
4358 * decl.c: Likewise.
4359 * decl2.c: Likewise.
4360 * init.c: Likewise.
4361 * lex.c: Likewise.
4362 * method.c: Likewise.
4363 * optimize.c: Likewise.
4364 * parse.y: Likewise.
4365 * pt.c: Likewise.
4366 * repo.c: Likewise.
4367 * search.c: Likewise.
4368 * semantics.c: Likewise.
4369 * spew.c: Likewise.
4370 * tree.c: Likewise.
4371
4372 * lang-specs.h: Remove comment.
4373
4374 2002-12-03 Geoffrey Keating <geoffk@apple.com>
4375
4376 * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
4377 (operator_name_info): Mark to be saved for PCH, specify size.
4378 (assignment_operator_name_info): Likewise.
4379
4380 2002-11-19 Geoffrey Keating <geoffk@apple.com>
4381
4382 * decl.c (anon_cnt): Mark to be saved for PCH.
4383
4384 2002-10-25 Geoffrey Keating <geoffk@apple.com>
4385
4386 * lex.c (init_reswords): Delete now-untrue comment.
4387 Allocate ridpointers using GGC.
4388
4389 2002-10-04 Geoffrey Keating <geoffk@apple.com>
4390
4391 * cp-tree.h (union lang_decl_u2): Add tags to all fields.
4392
4393 * g++spec.c (lang_specific_driver): Don't include standard
4394 libraries in `added'.
4395
4396 2002-08-27 Geoffrey Keating <geoffk@redhat.com>
4397
4398 * decl2.c (finish_file): Call c_common_write_pch.
4399 * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
4400
4401 2002-08-17 Geoffrey Keating <geoffk@redhat.com>
4402
4403 * g++spec.c (lang_specific_driver): Treat .h files as C++ header
4404 files when using g++.
4405 * lang-specs.h: Handle compiling C++ header files.
4406
4407 2003-01-09 Jakub Jelinek <jakub@redhat.com>
4408
4409 * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
4410
4411 2003-01-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4412
4413 * pt.c (push_access_scope_real): Call push_to_top_level for
4414 function in namespace scope.
4415 (pop_access_scope): Call pop_from_top_level for function in
4416 namespace scope.
4417
4418 2003-01-09 Jakub Jelinek <jakub@redhat.com>
4419
4420 * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
4421
4422 2003-01-09 Christian Cornelssen <ccorn@cs.tu-berlin.de>
4423
4424 * Make-lang.in (c++.install-common, c++.install-man,
4425 c++.uninstall): Prepend $(DESTDIR) to destination paths in
4426 all (un)installation commands.
4427 (c++.install-common): Rewrite $(LN) commands to support
4428 DESTDIR with "ln" as well as with "ln -s".
4429
4430 2003-01-08 Jason Merrill <jason@redhat.com>
4431
4432 * parser.c (cp_parser_primary_expression): See through explicitly
4433 scoped ALIAS_DECLs, too.
4434
4435 2003-01-08 Nathanael Nerode <neroden@gcc.gnu.org>
4436
4437 * decl.c: Remove some #if 0 code.
4438
4439 * decl.c: ANSIfy function declarations.
4440
4441 2003-01-07 Mark Mitchell <mark@codesourcery.com>
4442
4443 * parser.c (cp_parser_asm_definition): Correct handling of omitted
4444 operands.
4445
4446 2003-01-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4447
4448 PR c++/9030
4449 * decl.c (make_typename_type): Check access only when tf_error.
4450 (make_unbound_class_template): Likewise.
4451 * pt.c (saved_access_scope): New variable.
4452 (push_access_scope_real): New function.
4453 (push_access_scope): Likewise.
4454 (pop_access_scope): Likewise.
4455 (tsubst_default_argument): Use them.
4456 (instantiate_template): Likewise.
4457 (regenerate_decl_from_template): Likewise.
4458 (instantiate_decl): Likewise.
4459 (get_mostly_instantiated_function_type): Likewise.
4460
4461 2003-01-07 Nathanael Nerode <neroden@gcc.gnu.org>
4462
4463 * tree.c: Delete bogus #if 0 code.
4464
4465 2003-01-07 Andreas Schwab <schwab@suse.de>
4466
4467 * class.c (layout_class_type): Don't use
4468 PCC_BITFIELD_TYPE_MATTERS if not defined.
4469
4470 2003-01-06 Mark Mitchell <mark@codesourcery.com>
4471
4472 PR c++/9165
4473 * decl2.c (build_cleanup): Mark the object as used.
4474
4475 * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
4476 (hash_local_specialization): New function.
4477 (register_local_specialization): Revert 2003-01-05 change.
4478 (instantiate_decl): Use hash_local_specialization when creating
4479 the local_specializations table.
4480
4481 * decl2.c (mark_used): Do not synthesize thunks.
4482
4483 * class.c (layout_class_type): Correct handling of unnamed
4484 bitfields wider than their types.
4485
4486 PR c++/9189
4487 * parser.c (cp_parser): Remove default_arg_types. Update
4488 documentation for unparsed_functions_queues.
4489 (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
4490 parameter.
4491 (cp_parser_new): Don't set parser->default_arg_types.
4492 (cp_parser_function_definition): Adjust usage of
4493 unparsed_funtions_queues.
4494 (cp_parser_class_specifier): Don't mess with
4495 parser->default_arg_types. Handle default argument processing in
4496 a separate phase from function body processing.
4497 (cp_parser_template_declaration_after_export): Adjust usage of
4498 unparsed_functions_queues.
4499 (cp_parser_late_parsing_for_member): Do not handle default
4500 arguments.
4501
4502 2003-01-06 Nathan Sidwell <nathan@codesourcery.com>
4503
4504 PR c++/9109
4505 * parser.c (cp_parser_declarator_kind): New enum.
4506 (cp_parser_declarator): Adjust.
4507 (cp_parser_direct_declarator): Adjust. Allow for either named or
4508 abstract declarator. Prefer abstract, if possible. Allow
4509 parenthesized function name.
4510 (cp_parser_condition): Adjust cp_parser_declarator call.
4511 (cp_parser_explicit_instantiation): Likewise.
4512 (cp_parser_init_declarator): Likewise.
4513 (cp_parser_type_id): Likewise.
4514 (cp_parser_function_definition): Likewise.
4515 (cp_parser_member_declaration): Likewise.
4516 (cp_parser_parameter_declaration): Use cp_parser_declarator to do
4517 the tentative parsing.
4518 (cp_parser_exception_declaration): Likewise.
4519
4520 2003-01-05 Mark Mitchell <mark@codesourcery.com>
4521
4522 * parser.c (cp_parser_template_parameter): Adjust call to
4523 cp_parser_parameter_declaration.
4524 (cp_parser_parameter_declaration_list): Likewise.
4525 (cp_parser_parameter_declaration): Replace
4526 greater_than_is_operator_p with template_parm_p parameter. Do not
4527 cache tokens for template default arguments.
4528
4529 * pt.c (retrieve_local_specialization): Use htab_find, not
4530 htab_find_with_hash.
4531 (register_local_specialization): Use htab_find_slot, not
4532 htab_find_slot_with_hash.
4533 (instantiate_decl): Pass a hash function to htab_create.
4534
4535 2003-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4536
4537 * parser.c (cp_parser_binary_expression,
4538 cp_parser_multiplicative_expression,
4539 cp_parser_additive_expression, cp_parser_shift_expression,
4540 cp_parser_relational_expression, cp_parser_equality_expression,
4541 cp_parser_and_expression, cp_parser_exclusive_or_expression,
4542 cp_parser_inclusive_or_expression,
4543 cp_parser_logical_and_expression, cp_parser_logical_or_expression,
4544 cp_parser_binary_expression): Const-ify.
4545
4546 2003-01-04 Mark Mitchell <mark@codesourcery.com>
4547
4548 * method.c (use_thunk): Disable access control while building the
4549 body of the thunk.
4550
4551 2003-01-03 Nathanael Nerode <neroden@gcc.gnu.org>
4552
4553 * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C
4554 front end.
4555
4556 2003-01-03 Matt Austern <austern@apple.com>
4557
4558 * cp-tree.h (struct lang_type_class): add field for key method
4559 (cp_global_trees): rename dynamic_classes to keyed_classes
4560 (key_method): add definition
4561 * class.c (finish_struct_1): compute class's key method, and add
4562 the class to keyed_classes list if there is no key method.
4563 * decl.c (finish_function): add class to keyed_classes list if we
4564 see a definition of the class's key method.
4565 * pt.c (instantiate_class_template): add template specialization
4566 of a dynamic class to keyed_classes list.
4567 * decl2.c (key_method): remove
4568 (finish_file): iterate only through keyed_classes list when
4569 deciding whether to emit vtables, remove class from its list after
4570 we do the emission.
4571
4572 2003-01-02 Jason Merrill <jason@redhat.com>
4573
4574 * call.c (build_conditional_expr): Stabilize lvalues properly.
4575 * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
4576 * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
4577 Don't allow CALL_EXPR or VA_ARG_EXPR, either.
4578
4579 * call.c (convert_like_real): Call decl_constant_value for an
4580 IDENTITY_CONV even if there are no more conversions.
4581
4582 * cvt.c (build_up_reference): Don't push unnamed temps.
4583
4584 * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
4585
4586 * dump.c (cp_dump_tree): Don't try to dump class-specific fields
4587 for a backend struct.
4588
4589 * except.c (wrap_cleanups_r, build_throw): Make
4590 MUST_NOT_THROW_EXPRs void.
4591 * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
4592
4593 * init.c (build_vec_delete_1): Pre-evaluate the base address.
4594
4595 * init.c (get_temp_regvar): Simplify logic.
4596
4597 * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
4598 our replacement is a decl.
4599
4600 * decl.c (cp_make_fname_decl): Push the decls inside the
4601 outermost scope.
4602
4603 2003-01-03 Nathan Sidwell <nathan@codesourcery.com>
4604
4605 PR c++/45, c++/3784
4606 * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
4607 the same too.
4608
4609 2003-01-03 Graham Stott <graham.stott@btinternet.com>
4610
4611 * parser.c (struct cp_parser): Add access_checks_lists field
4612 (cp_parser_simple_declaration): Use.
4613 (cp_parser_init_declarator): Likewise.
4614
4615 2003-01-02 Mark Mitchell <mark@codesourcery.com>
4616
4617 * parser.c (cp_parser_declaration): Accept the __extension__
4618 keyword before the declaration.
4619
4620 PR c++/2843
4621 * parser.c (cp_parser_parameter_declaration): Allow attributes to
4622 appear after the declarator.
4623
4624 * call.c (build_new_method_call): Fix typo in message format
4625 string.
4626
4627 2003-01-02 Mark Mitchell <mark@codesourcery.com>
4628
4629 * parser.c (cp_lexer_next_token_is): Declare it inline.
4630 (cp_lexer_set_source_position_from_token): Likewise.
4631 (cp_lexer_debugging_p): Likewise.
4632 (cp_parser_parsing_tentatively): Likewise.
4633 (cp_parser_nested_name_specifier_opt): Reduce the number of calls
4634 to the cp_lexer_peek_token.
4635
4636 * parser.c (cp_parser_sizeof_operand): Do not evaluate the
4637 expression.
4638
4639 2003-01-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
4640
4641 * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
4642 cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
4643 cp/repo.c: Fix copyright years.
4644
4645 2003-01-01 Neil Booth <neil@daikokuya.co.uk>
4646
4647 * lex.c: Remove superfluous include of cpplib.h.
4648 (CONSTRAINT): Define without conditions.
4649 (init_cp_pragma): Use c_register_pragma.
4650
4651 2002-12-31 Neil Booth <neil@daikokuya.co.uk>
4652
4653 * .cvsignore: Remove.
4654
4655 2002-12-31 Steven Bosscher <s.bosscher@student.tudelft.nl>
4656
4657 * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
4658 except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
4659 lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
4660 pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
4661 typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
4662 copyright header.
4663 * lex.h: parse.y is dead, so don't mention it. Also replace the
4664 copyright header with the default GNU copyright header.
4665
4666 2002-12-31 Mark Mitchell <mark@codesourcery.com>
4667
4668 * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
4669 (lookup_name_namespace_only): Likewise.
4670 (begin_only_namespace_names): Likewise.
4671 (end_only_namespace_names): Likewise.
4672 * decl.c (only_namespace_names): Remove.
4673 (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
4674 (lookup_name_real): Do not check only_namespace_names.
4675 (lookup_name_namespace_only): Remove.
4676 (begin_only_namespace_names): Likewise.
4677 (end_only_namespace_names): Likewise.
4678 * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
4679 nested-name-specifiers more gracefully.
4680 (cp_parser_class_or_namespace_name): Avoid looking up namespace
4681 names when they cannot possibly appear.
4682 (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
4683 (cp_parser_elaborated_type_specifier): Likewise.
4684 (cp_parser_namespace_name): Only look for namespace names.
4685 (cp_parser_lookup_name): Add is_namespace parameter.
4686 (cp_parser_lookup_name_simple): Adjust call to
4687 cp_parser_lookup_name.
4688
4689 * parser.c (cp_parser_dependent_type_p): Fix thinko.
4690
4691 2002-12-31 Neil Booth <neil@daikokuya.co.uk>
4692
4693 * .cvsignore: Update.
4694
4695 2002-12-31 Nathan Sidwell <nathan@codesourcery.com>
4696
4697 * class.c (modify_vtable_entry): Remove unused variable.
4698 (get_vcall_index): Always expect a non-thunk.
4699 (update_vtable_entry_for_fn): Combine covariant adjustments, when
4700 overriding a thunk. Pass get_vcall_index a non-thunk.
4701
4702 * decl2.c (finish_file): Mark undefined inlines as extern.
4703
4704 2002-12-31 Mark Mitchell <mark@codesourcery.com>
4705
4706 * cp-tree.def (RETURN_INIT): Remove.
4707 * cp-tree.h (DECL_IN_MEMORY_P): Remove.
4708 (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
4709 (note_level_for_for): Remove.
4710 (note_level_for_try): Likewise.
4711 (note_level_for_catch): Likewise.
4712 (finish_named_return_value): Likewise.
4713 (do_pushlevel): Change prototype.
4714 (pending_lang_change): Remove.
4715 * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
4716 sk_for.
4717 (note_level_for_for): Remove.
4718 (note_level_for_try): Likewise.
4719 (note_level_for_catch): Likewise.
4720 (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
4721 * parser.c (cp_parser_context_free_list): Make it "deletable".
4722 (cp_parser_template_argument): Remove misleading comment.
4723 * pt.c (tsubst_expr): Remove RETURN_INIT code.
4724 * semantics.c (genrtl_named_return_value): Remove.
4725 (do_pushlevel): Take a scope kind as an argument.
4726 (begin_if_stmt): Adjust.
4727 (begin_while_stmt): Likewise.
4728 (begin_for_stmt): Likewise.
4729 (finish_for_init_stmt): Likewise.
4730 (begin_switch_stmt): Likewise.
4731 (begin_handler): Likewise.
4732 (begin_compound_stmt): Likewise.
4733 (finish_named_return_value): Remove.
4734 (cp_expand_stmt): Remove RETURN_INIT case.
4735 * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
4736
4737 2002-12-31 Mark Mitchell <mark@codesourcery.com>
4738
4739 PR c++/9112
4740 * parser.c (cp_parser_direct_declarator): Handle erroneous
4741 parenthesized declarators correctly.
4742
4743 2002-12-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
4744
4745 * cp-tree.h (pending_lang_change): Declare.
4746
4747 2002-12-30 Mark Mitchell <mark@codesourcery.com>
4748
4749 * parser.c (cp_parser_context_free_list): New variable.
4750 (cp_parser_context_new): Use it.
4751 (cp_parser_error): Check return code from
4752 cp_parser_simulate_error.
4753 (cp_parser_simulate_error): Return a value.
4754 (cp_parser_id_expression): Optimize common case.
4755 (cp_parser_class_name): Likewise.
4756 (cp_parser_class_specifier): Adjust call to
4757 cp_parser_late_parsing_default_args.
4758 (cp_parser_lookup_name): Optimize common case.
4759 (cp_parser_late_parsing_for_member): Adjust call to
4760 cp_parser_late_parsing_default_args.
4761 (cp_parser_late_parsing_default_args): Add scope parameter.
4762 (cp_parser_require): Avoid creating the error message unless it's
4763 needed.
4764 (cp_parser_parse_definitely): Place free'd contexts on the free
4765 list.
4766
4767 * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
4768
4769 2002-12-30 David Edelsohn <edelsohn@gnu.org>
4770
4771 * parser.c (cp_parser_parameter_declaration_clause): Treat system
4772 header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
4773
4774 2002-12-30 Nathanael Nerode <neroden@gcc.gnu.org>
4775
4776 * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
4777 GCC, not GNU CC.
4778
4779 2002-12-30 Mark Mitchell <mark@codesourcery.com>
4780
4781 * parse.y: Remove.
4782 * spew.c: Likewise.
4783 * Make-lang.in (gt-cp-spew.h): Remove.
4784 * cp-tree.h (do_pending_lang_change): Remove.
4785 (do_identifier): Change prototype.
4786 (finish_id_expr): Remove.
4787 * decl.c (lookup_name_real): Remove yylex variable.
4788 * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
4789 * lex.c (init_cpp_parse): Remove.
4790 (reduce_cmp): Likewise.
4791 (token_cmp): Likewise.
4792 (yychar): Likewise.
4793 (lastiddecl): Likewise.
4794 (token_count): Likewise.
4795 (reduce_count): Likewise.
4796 (yyhook): Likewise.
4797 (print_parse_statistics): Likewise.
4798 (do_pending_lang_change): Likewise.
4799 (do_identifier): Remove parsing parameter.
4800 * lex.h (lastiddecl): Remove.
4801 (looking_for_typename): Remove.
4802 (looking_for_template): Likewise.
4803 (pending_lang_change): Likewise.
4804 (yylex): Likewise.
4805 * semantics.c (finish_id_expr): Remove.
4806
4807 * decl.c (grokdeclarator): Diagnost "extern thread" and "static
4808 thread" correctly.
4809
4810 2002-12-30 Nathanael Nerode <neroden@gcc.gnu.org>
4811
4812 * decl.c, decl2.c, decl.h: GCC, not GNU CC. This is the C++ front
4813 end, not the C front end.
4814
4815 2002-12-30 Nathan Sidwell <nathan@codesourcery.com>
4816
4817 * cp-tree.h (THUNK_TARGET): New macro.
4818 (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
4819 (finish_thunk): Remove offset parms.
4820 * class.c (find_final_overrider): Look through thunks.
4821 (get_vcall_index): Use THUNK_TARGET.
4822 (update_vtable_entry_for_fn): Look through thunks. Set covariant
4823 fixed offset here. Adjust finish_thunk call.
4824 (build_vtbl_initializer): Adjust finish_thunk calls.
4825 * mangle.c (mangle_call_offset): Remove superfluous if.
4826 (mangle_thunk): Adjust.
4827 * method.c (make_thunk): Adjust.
4828 (finish_thunk): Adjust.
4829 (thunk_adjust): Remove assert.
4830 (use_thunk): Use THUNK_TARGET
4831 * dump1.c (cp_dump_tree): Adjust thunk dumping.
4832
4833 PR c++/9054
4834 * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
4835 * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
4836
4837 2002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
4838
4839 Remove traditional C constructs 4/n.
4840 * decl2.c (grok_method_quals, warn_if_unknown_interface,
4841 grok_x_components, cp_build_parm_decl, build_artificial_parm,
4842 maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
4843 delete_sanity, check_member_template, check_java_method,
4844 check_classfn, finish_static_data_member_decl, grokfield,
4845 grokbitfield, grokoptypename, grok_function_init,
4846 cplus_decl_attributes, constructor_name, defer_fn,
4847 build_anon_union_vars, finish_anon_union, coerce_new_type,
4848 coerce_delete_type, comdat_linkage, maybe_make_one_only,
4849 key_method, import_export_vtable, import_export_class,
4850 output_vtable_inherit, import_export_decl, import_export_tinfo,
4851 build_cleanup, get_guard, get_guard_bits, get_guard_cond,
4852 set_guard, start_objects, finish_objects,
4853 start_static_storage_duration_function,
4854 finish_static_storage_duration_function, get_priority_info,
4855 start_static_initialization_or_destruction,
4856 finish_static_initialization_or_destruction,
4857 do_static_initialization, do_static_destruction,
4858 prune_vars_needing_no_initialization, write_out_vars,
4859 reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
4860 add_using_namespace, merge_functions, ambiguous_decl,
4861 lookup_using_namespace, lookup_using_namespace,
4862 qualified_lookup_using_namespace, set_decl_namespace,
4863 decl_namespace, current_decl_namespace, push_decl_namespace,
4864 pop_decl_namespace, push_scope, pop_scope, add_function,
4865 arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
4866 lookup_arg_dependent, do_namespace_alias,
4867 validate_nonmember_using_decl, do_nonmember_using_decl,
4868 do_toplevel_using_decl, do_local_using_decl,
4869 do_class_using_decl, do_using_directive, check_default_args,
4870 mark_used, handle_class_head): Use C90 prototypings. Use booleans.
4871 * parser.c (cp_parser_class_head): Use booleanss.
4872 * decl.c (walk_globals, walk_vtables): Likewise.
4873 * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
4874 walk_globals): Change return type from 'int' to 'bool'.
4875 * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
4876 throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
4877 build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
4878 get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
4879 qualifier_flags, tinfo_base_init, generic_initializer,
4880 ptr_initializer, dfs_class_hint_mark, ptm_initializer,
4881 dfs_class_hint_unmark, class_hint_flags, class_initializer,
4882 typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
4883 get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
4884 unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
4885 * repo.c (repo_compile_flags, repo_template_declared,
4886 repo_template_defined, repo_class_defined, repo_get_id,
4887 repo_template_used, repo_vtable_used, repo_inline_used,
4888 repo_tinfo_used, repo_template_instantiated, extract_string,
4889 open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
4890 finish_repo): Likewise.
4891 * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
4892 cxx_print_xnode): Likewise..
4893 * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
4894 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
4895 * cxxfilt.c (demangle_it, print_demangler_list, usage,
4896 standard_symbol_characters, hp_symbol_characters, main, fatal):
4897 Likewise.
4898 (strip_underscore): Change type from 'int' to 'bool'.
4899 (main): Use boolean constants.
4900
4901 2002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
4902
4903 Remove traditional C constructs 3/n.
4904 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
4905 build_up_reference, warn_ref_binding, convert_to_reference,
4906 convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
4907 convert_to_void, convert, convert_force, build_type_conversion,
4908 build_expr_type_conversion, type_promotes_to,
4909 perform_qualification_conversions): Use C90 prototyping style.
4910 * decl2.c (grok_array_decl): Use boolean constant.
4911 (delete_sanity): Likewise.
4912 * typeck.c (build_unary_op): Likewise.
4913 * semantics.c (finish_switch_cond): Likewise.
4914 * parser.c (cp_parser_direct_new_declarator): Likewise.
4915 * init.c (build_new): Likewise.
4916
4917 2002-12-27 Mark Mitchell <mark@codesourcery.com>
4918
4919 * Make-lang.in (po-generated): Remove parse.c.
4920 (CXX_OBJS): Remove parse.o and spew.o. Add parser.o.
4921 ($(srcdir)/cp/parse.h): Remove target.
4922 ($(srcdir)/cp/parse.c): Likewise.
4923 (gt-cp-parse.h): Likewise.
4924 (gt-cp-parser.h): New target.
4925 (c++.distclean): Do not remove parse.output.
4926 (c++.maintainer-clean): Do not remove parse.c or parse.h.
4927 (cp/spew.o): Remove target.
4928 (cp/lex.o): Adjust dependencies.
4929 (cp/pt.o): Likewise.
4930 (cp/parse.o): Likewise.
4931 (cp/TAGS): Do not mention parse.c.
4932 (cp/parser.o): New target.
4933 * NEWS: Mention the new parser.
4934 * call.c (build_scoped_method_call): Simplify.
4935 (build_method_call): Likewise.
4936 (build_new_function_call): Adjust calls to add_function_candidate
4937 and add_template_candidate.
4938 (build_new_op): Improve handling of erroroneous operands.
4939 (convert_default_arg): Remove circular argument processing.
4940 (name_as_c_string): New function.
4941 (build_new_method_call): Use it.
4942 (perform_implicit_conversion): Use error_operand_p.
4943 * class.c (finish_struct_anon): Use constructor_name_p.
4944 (check_field_decls): Likewise.
4945 (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
4946 (resolve_address_of_overloaded_function): Likewise.
4947 (instantiate_type): Tweak pointer-to-member handling.
4948 (get_primary_binfo): Remove incorrect assertion.
4949 * config-lang.in (gtfiles): Add parser.c, remove parse.c.
4950 * cp-tree.h (DEFARG_TOKENS): New macro.
4951 (default_arg): New structure.
4952 (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
4953 (lang_tree_node): Add default_arg.
4954 (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
4955 (type_info_ref_type): New macro.
4956 (saved_scope): Make processing_explicit_instantiation a boolean.
4957 (check_access): New field.
4958 (unparsed_text): Remove.
4959 (language_function): Remove unparsed_inlines.
4960 (error_operand_p): New macro.
4961 (lang_decl): Adjust pending_inline_info.
4962 (DEFARG_POINTER): Remove.
4963 (tag_types): Add typenames.
4964 (lookup_ualified_name): Declare.
4965 (lookup_name_real): Likewise.
4966 (shadow_tag): Adjust prototype.
4967 (get_scope_of_declarator): Declare it.
4968 (process_next_inline): Remove it.
4969 (check_for_missing_semicolon): Likewise.
4970 (maybe_get_template_decl_from_type_decl): Declare it.
4971 (finish_label_stmt): Adjust prototype.
4972 (finish_non_static_data_meber): Declare it.
4973 (finish_pseudo_destructor_call_expr): Rename to ...
4974 (finish_pseudo_destructor_expr): ... this.
4975 (finish_compound_literal): Declare it.
4976 (begin_inline_definitions): Remove it.
4977 (init_spew): Remove.
4978 (peekyylex): Likewise.
4979 (arbitrate_lookup): Likewise.
4980 (frob_opname): Likewise.
4981 (maybe_snarf_defarg): Likewise.
4982 (add_defarg_fn): Likewise.
4983 (do_pending_defargs): Likewise.
4984 (done_pending_defargs): Likewise.
4985 (unprocessed_defarg_fn): Likewise.
4986 (replace_defarg): Likewise.
4987 (end_input): Likewise.
4988 (get_overloaded_fn): Likewise.
4989 * cvt.c (convert_to_reference): Improve error handling.
4990 * decl.c (lookup_name_real): Do not declare it static.
4991 (maybe_push_to_top_level): Set check_access.
4992 (identifier_type_value): Adjust call to lookup_name_real.
4993 (lookup_qualified_name): New method.
4994 (lookup_name_real): Remove special-case parsing code.
4995 (lookup_name-nonclass): Adjust call to lookup_name_real.
4996 (lookup_name_namespace_only): Likewise.
4997 (lookup_name): Likewise.
4998 (check_tag_decl): Return the type declared.
4999 (shadow_tag): Likewise.
5000 (register_dtor_fn): Tweak check_access.
5001 (grokfndecl): Use constructor_name_p.
5002 (get_scope_of_declarator): New function.
5003 (grokdeclarator): Obscure tweaks for slightly different declarator
5004 representations.
5005 (start_method): Return error_mark_node to indicate failure.
5006 (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
5007 * decl2.c (constructor_name_full): Simplify.
5008 (constructor_name): Use it.
5009 (build_expr_from_tree): Adjust for changes to do new parser.
5010 (push_scope): Improve robustness.
5011 (validate_nonmember_using_decl): Process declarations, not names.
5012 (do_class_using_decl): Likewise.
5013 (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
5014 here.
5015 * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
5016 * expr.c (cxx_expand_expr): Handle BASELINKs.
5017 * init.c (member_init_ok_or_else): Issue more errors.
5018 (build_offset_ref): Tweak handling of FUNCTION_DECLs.
5019 * lex.c: Do not include parse.h.
5020 (yypring): Do not declare.
5021 (yylval): Likewise.
5022 (make_reference_declarator): Remove error-generating code.
5023 (rid_to_yy): Remove.
5024 (cxx_init): Do not call init_spew.
5025 (yypring): Remove.
5026 (check_for_missing_semicolon): Remove.
5027 * lex.h (got_scope): Remove.
5028 (got_object): Remove.
5029 * method.c (hack_identifier): Use finish_non_static_data_member.
5030 (implicitly_declare_fn): Adjust use of constructor_name.
5031 * parser.c: New file.
5032 * pt.c (parse.h): Do not include it.
5033 (maybe_get_template_decl_from_template): Do not declare it.
5034 (finish_member_template_decl): Tweak.
5035 (begin_explicit_instantiation): Adjust for
5036 processing_explicit_instantiation being boolean.
5037 (end_explicit_instantiation): Likewise.
5038 (maybe_process_partial_specialization): Tighten specialization
5039 test.
5040 (retrieve_local_specialization): Adjust ue of hash table.
5041 (eq_local_specializations): New function.
5042 (register_local_specialization): Likewise.
5043 (push_template_decl_real): Remove unnecessary test.
5044 (maybe_get_template_decl_from_type_decl): Don't make it static.
5045 (for_each_template_parm_r): Handle TYPEOF_TYPE.
5046 (tsubst_copy): Use retrieive_local_specialization to handle
5047 PARM_DECL. Adjust handling of CONST_DECLs. Handle BASELINKs.
5048 Handle COMPONENT_REFs with pseudo-destructor-expressions.
5049 Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
5050 (tsubst_expr): Pass decls, not names, to do_local_using_decl.
5051 (unify): Tweak handling of CONST_DECLs.
5052 (regenerate_decl_from_template): Use push_nested_class.
5053 (template_for_substitution): New funciton.
5054 (instantiate_decl): Use it. Register parameters as local
5055 specializations.
5056 * rtti.c (init_rtti_processing): Set type_info_ref_type.
5057 (build_typeid): Use it.
5058 (get_typeid): Likeise.
5059 * search.c (accessible_p): Use check_access, not
5060 flag_access_control.
5061 (adjust_result_of_qualified_name_lookup): Pay attention to the
5062 context_class.
5063 * semantics.c (finish_asm_stmt): Adjust error handling.
5064 (finish_label_stmt): Return the statement.
5065 (finish_non_static_data_member): New function.
5066 (finish_class_expr): Handle BASELINKs.
5067 (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
5068 (finish_object_call_expr): Simplify handling during templates.
5069 (finish_pseudo_destructor_call_expr): Rename to ...
5070 (finish_pseudo_dtor_expr): ... this.
5071 (finish_compound_literal): New function.
5072 (begin_inline_definitions): Remove.
5073 (finish_sizeof): Remove special template handling.
5074 * spew.c: Do not include parse.h.
5075 * tree.c (get_overloaded_fn): Remove.
5076 * typeck.c (build_class_member_access_expr): Handle
5077 PSEUDO_DTOR_EXPR. Adjust handling of static member functions.
5078 (lookup_destructor): New function.
5079 (finish_class_member_access_expr): Use it.
5080 (convert_arguments): Simplify.
5081 (build_unary_op): Handle BASELINKs.
5082
5083 2002-12-26 Nathan Sidwell <nathan@codesourcery.com>
5084
5085 PR c++/4803
5086 * decl2.c (mark_used): Defer inline functions.
5087 (finish_file): Merge deferred_fns loops. Check all used
5088 inline functions have a definition.
5089 * method.c (make_thunk): Thunks are not inline.
5090
5091 PR c++/5116, c++/764
5092 * call.c (build_new_op): Make sure template class operands are
5093 instantiated.
5094
5095 2002-12-24 Nathan Sidwell <nathan@codesourcery.com>
5096
5097 PR C++/7964
5098 * cp-tree.h (resolve_scoped_fn_name): Prototype.
5099 * call.c (resolve_scoped_fn_name): New function. Deal with
5100 more template expansion. Broken out of ...
5101 * parse.y (parse_finish_call_expr): ... here. Call it.
5102 * decl2.c (build_expr_from_tree, CALL_EXPR): Use
5103 resolve_scoped_fn_name and build_call_from_tree.
5104
5105 PR c++/9053
5106 * decl.c (duplicate_decls): Templates may be disambiguated by
5107 return type.
5108
5109 PR c++/8702
5110 * decl2.c (check_classfn): Use lookup_fnfield_1. List all
5111 conversion operators on failure.
5112
5113 2002-12-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
5114
5115 Remove traditional C constructs 2/n.
5116 * call.c (tourney, build_field_call, equal_functions, joust,
5117 compare_ics, build_over_call, build_java_interface_fn_ref,
5118 convert_like_real, op_error, build_object_call, resolve_args,
5119 build_vfield_ref, check_dtor_name, build_scoped_method_call,
5120 build_addr_func, build_call, build_method_call, null_ptr_cst_p,
5121 sufficient_parms_p, build_conv, non_reference, strip_top_quals,
5122 standard_conversion, reference_related_p,
5123 reference_compatible_p, convert_class_to_reference,
5124 direct_reference_binding, reference_binding,
5125 ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
5126 add_template_conv_candidate, any_viable, any_strictly_viable,
5127 build_this, splice_viable, print_z_candidates,
5128 build_user_type_conversion, build_new_function_call,
5129 conditional_conversion, build_conditional_expr, build_new_op,
5130 build_op_delete_call, enforce_access, call_builtin_trap,
5131 convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
5132 convert_default_arg, type_passed_as, convert_for_arg_passing,
5133 in_charge_arg_for_name, is_properly_derived_from,
5134 maybe_handle_implicit_object, maybe_handle_ref_bind,
5135 source_type, add_warning, can_convert, can_convert_arg,
5136 perform_implicit_conversion, can_convert_arg_bad,
5137 initialize_reference, add_conv_candidate,
5138 add_template_candidate_real, add_template_candidate): Ansify.
5139
5140 2002-12-22 Nathan Sidwell <nathan@codesourcery.com>
5141
5142 PR c++/8572
5143 * cp-tree.h (grokoptypename): Add SCOPE parameter.
5144 * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
5145 if in a template scope.
5146 * parse.y (unoperator): Return the scope.
5147 (operator_name): Adjust grokoptypename call.
5148
5149 2002-12-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5150
5151 * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
5152 * decl.c (make_unbound_class_template): Adjust. Check for tf_error.
5153 * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
5154
5155 2002-12-20 Kazu Hirata <kazu@cs.umass.edu>
5156
5157 * ChangeLog: Fix a typo.
5158 * class.c: Fix comment typos.
5159 * cp-tree.h: Likewise.
5160
5161 2002-12-18 Jason Merrill <jason@redhat.com>
5162
5163 Handle anonymous unions at the tree level.
5164 C++ ABI change: Mangle anonymous unions using the name of their
5165 first named field (by depth-first search). Should not cause
5166 binary compatibility problems, though, as the compiler previously
5167 didn't emit anything for affected unions.
5168 * cp-tree.def (ALIAS_DECL): New tree code.
5169 * decl2.c (build_anon_union_vars): Build ALIAS_DECLs. Return the
5170 first field, not the largest.
5171 (finish_anon_union): Don't mess with RTL. Do set DECL_ASSEMBLER_NAME,
5172 push the decl, and write it out at namespace scope.
5173 * decl.c (lookup_name_real): See through an ALIAS_DECL.
5174 (pushdecl): Add namespace bindings for ALIAS_DECLs.
5175 * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
5176 of a decl which doesn't have one.
5177 * typeck.c (build_class_member_access_expr): Don't recurse if
5178 we already have the type we want.
5179
5180 2002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5181
5182 PR c++/8099
5183 * friend.c (make_friend_class): Allow partial specialization
5184 when declaration is not a template friend.
5185
5186 2002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5187
5188 PR c++/3663
5189 * pt.c (lookup_template_class): Copy TREE_PRIVATE and
5190 TREE_PROTECTED to created decl nodes.
5191
5192 2002-12-18 Mark Mitchell <mark@codesourcery.com>
5193
5194 * class.c (build_base_field): Do not set DECL_PACKED on the
5195 FIELD_DECL.
5196
5197 2002-12-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
5198
5199 * cp-tree.h (struct tree_srcloc): Use location_t.
5200 (SOURCE_LOCUS): New.
5201 (SRCLOC_FILE, SRCLOC_LINE): Adjust.
5202
5203 2002-12-17 Jason Merrill <jason@redhat.com>
5204
5205 * decl.c (finish_function): Also complain about no return in
5206 templates.
5207 * semantics.c (finish_return_stmt): Also call check_return_expr in
5208 templates.
5209 * typeck.c (check_return_expr): In a template, just remember that we
5210 saw a return.
5211
5212 2002-12-16 Jason Merrill <jason@redhat.com>
5213
5214 * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
5215 of the CALL_EXPR.
5216
5217 * semantics.c (do_pushlevel): Call pushlevel after adding the
5218 SCOPE_STMT.
5219 (do_poplevel): Call poplevel before adding the SCOPE_STMT.
5220 * parse.y (function_body): Go back to using compstmt.
5221 * decl.c (pushdecl): Skip another level to get to the parms level.
5222
5223 * call.c (build_new_method_call): Use is_dummy_object to determine
5224 whether or not to evaluate the object parameter to a static member
5225 function.
5226
5227 2002-12-14 Jason Merrill <jason@redhat.com>
5228
5229 * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
5230 return slot for normal functions. Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
5231 * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
5232 don't bother with an AGGR_INIT_EXPR.
5233 (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
5234 just generate a new decl normally. Take return slot parm.
5235 * cp-tree.h: Adjust prototype.
5236
5237 2002-12-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
5238
5239 PR C++/8031
5240 * cvt.c (convert_to_pointer_force): Don't try comparing against
5241 erronous type.
5242
5243 2002-12-13 Geoffrey Keating <geoffk@apple.com>
5244
5245 * cp-tree.h: Have the multiple-include guards around
5246 the entire file.
5247
5248 2002-12-10 David Edelsohn <edelsohn@gnu.org>
5249
5250 * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
5251 for SPEW_DEBUG.
5252 (snarf_method): Same.
5253 (snarf_defarg): Same.
5254
5255 2002-12-10 Mark Mitchell <mark@codesourcery.com>
5256
5257 PR c++/8372
5258 * pt.c (tsubst_copy): Handle destructor names more correctly.
5259
5260 2002-12-10 Matt Austern <austern@apple.com>
5261
5262 * cp-tree.h: get rid of needs_virtual_reinit bit.
5263
5264 2002-12-09 Mark Mitchell <mark@codesourcery.com>
5265
5266 * NEWS: Document removal of in-class initialization extension for
5267 static data members of non-arithmetic, non-enumeration type.
5268 * decl.c (check_static_variable_definition): Do not allow that
5269 extension.
5270 * decl2.c (grokfield): Do not call digest_init when processing
5271 templates.
5272
5273 2002-12-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5274
5275 * error.c (dump_expr): Fix format specifier warning.
5276
5277 2002-12-04 Geoffrey Keating <geoffk@apple.com>
5278
5279 * class.c (finish_struct_1): Correct comment.
5280 * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
5281
5282 2002-12-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
5283
5284 PR C++/8799
5285 * error.c (dump_expr): Don't ever try to dump a non-existent
5286 expression.
5287
5288 2002-12-03 Nathan Sidwell <nathan@codesourcery.com>
5289
5290 Implement covariant returns.
5291 * cp-tree.h (IS_AGGR_TYPE_2): Remove.
5292 (struct lang_decl_flags): Add this_thunk_p flag.
5293 Rename vcall_offset to virtual_offset.
5294 (struct lang_decl): Rename delta to fixed_offset.
5295 (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
5296 (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
5297 (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
5298 (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
5299 (make_thunk): Add this_adjusting arg.
5300 (finish_thunk): Declare.
5301 (mangle_thunk): Add this_adjusting arg.
5302 * class.c (get_vcall_index): Use base function for lookup.
5303 (update_vtable_entry_for_fn): Generate covariant thunk.
5304 (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
5305 (build_vtbl_initializer): Use base function for lookup.
5306 Finish covariant thunk here. Adjust thunk generation.
5307 * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
5308 Adjust thunk dumping.
5309 * mangle.c (mangle_call_offset): New function.
5310 (mangle_thunk): Adjust for covariant thunks.
5311 * method.c (make_thunk): Adjust. Do not set name here.
5312 (finish_thunk): New function. Set name here.
5313 (use_thunk): Generate covariant thunks too.
5314 (thunk_adjust): New function.
5315 * search.c (covariant_return_p): Remove. Fold into ...
5316 (check_final_overrider): ... here. Simplify.
5317 * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
5318
5319 2002-12-03 Jason Merrill <jason@redhat.com>
5320
5321 PR c++/8674
5322 * call.c (build_over_call): Check specifically for TARGET_EXPR
5323 when eliding.
5324
5325 PR c++/8461, c++/8625
5326 * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
5327 (cp_convert_parm_for_inlining): Remove.
5328 * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
5329 Remove.
5330 * cp-tree.h (ADDR_IS_INVISIREF): Remove.
5331 * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
5332
5333 * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
5334 an ambiguous conversion.
5335
5336 2002-12-03 Mark Mitchell <mark@codesourcery.com>
5337
5338 PR c++/8688
5339 * decl.c (reshape_init): Handle erroneous initializers.
5340
5341 2002-12-02 Mark Mitchell <mark@codesourcery.com>
5342
5343 PR c++/8720
5344 * spew.c (remove_last_token): Make sure that last_chunk is set
5345 correctly.
5346
5347 PR c++/8615
5348 * error.c (dump_expr): Handle character constants with
5349 TREE_OVERFLOW set.
5350
5351 2002-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5352
5353 DR 180
5354 * decl.c (grokdeclarator): Require class-key for all friend class.
5355 Output the correct type and context in the error message.
5356
5357 2002-12-01 Mark Mitchell <mark@codesourcery.com>
5358
5359 PR c++/5919
5360 * pt.c (unify): Use variably_modified_type_p to test validity of
5361 template argument types.
5362
5363 PR c++/8727
5364 * cp-tree.h (lang_type_class): Add typeinfo_var.
5365 (CLASSTYPE_TYPEINFO_VAR): New macro.
5366 * rtti.c (get_tinfo_decl): Use it.
5367
5368 PR c++/8663
5369 * init.c (expand_member_init): Always get the main variant of a
5370 base class.
5371
5372 2002-12-01 Mark Mitchell <mark@codesourcery.com>
5373
5374 PR c++/8332
5375 PR c++/8493
5376 * decl.c (cxx_init_decl_processing): Use size_type_node, not
5377 c_size_type_node.
5378 * decl2.c (coerce_new_type): Likewise.
5379 * except.c (do_allocate_exception): Likewise.
5380
5381 2002-11-30 Zack Weinberg <zack@codesourcery.com>
5382
5383 * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
5384 dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
5385 lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
5386 repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
5387 typeck2.c: Include coretypes.h and tm.h.
5388 * Make-lang.in: Update dependencies.
5389
5390 2002-11-30 Mark Mitchell <mark@codesourcery.com>
5391
5392 PR c++/8227
5393 * decl.c (layout_var_decl): Deal gracefully with erroneous types.
5394 (check_initializer): Validate the type of the initialized
5395 variable, even if the initializer is absent.
5396 * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
5397
5398 PR c++/8214
5399 * typeck.c (convert_for_assignment): Do not use
5400 decl_constant_value on the operand.
5401
5402 PR c++/8511
5403 * pt.c (instantiate_decl): Handle template friends defined outside
5404 of the class correctly.
5405
5406 2002-11-29 Joe Buck <jbuck@synopsys.com>
5407
5408 * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
5409 anonymous structs.
5410
5411 2002-11-29 Mark Mitchell <mark@codesourcery.com>
5412
5413 * class.c (walk_subobject_offsets): Recur on binfos as well as on
5414 types.
5415 (layout_nonempty_base_or_field): Pass it a binfo when processing a
5416 base class.
5417 (layout_empty_base): Likewise.
5418 (build_base_field): Likewise.
5419
5420 2002-11-27 Mark Mitchell <mark@codesourcery.com>
5421
5422 * class.c (build_base_field): Make sure we get the canonical base
5423 when descending through primary bases.
5424
5425 2002-11-26 Geoffrey Keating <geoffk@apple.com>
5426
5427 * decl.c (check_initializer): Don't error on initialisation of
5428 a scalar with a brace-enclosed expression.
5429
5430 2002-11-26 Nathan Sidwell <nathan@codesourcery.com>
5431
5432 * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
5433 (template_parms_equal): Remove prototype.
5434 * typeck.c (buuld_indirect_ref): Reformat.
5435
5436 2002-11-25 Jason Merrill <jason@redhat.com>
5437
5438 * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
5439 and a DO_STMT.
5440
5441 2002-11-25 Mark Mitchell <mark@codesourcery.com>
5442
5443 * tree.c (cp_build_qualified_type_real): Correct handling of
5444 array types.
5445 * class.c (walk_subobject_offsets): Fix thinko.
5446 (build_base_field): Record offsets of empty bases in primary
5447 virtual bases.
5448 (layout_class_type): Record offsets of empty bases in fields.
5449
5450 * search.c (is_subobject_of_p_1): Fix thinko.
5451 (lookup_field_queue_p): Likewise.
5452
5453 2002-11-24 Mark Mitchell <mark@codesourcery.com>
5454
5455 * class.c (layout_class_type): Reuse tail padding when laying out
5456 virtual bases.
5457
5458 2002-11-22 Mark Mitchell <mark@codesourcery.com>
5459
5460 * rtti.c (qualifier_flags): Fix thinko.
5461
5462 2002-11-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
5463
5464 Remove traditional C constructs 1/n.
5465 * cp-tree.h (init_method, set_mangled_name_for_decl,
5466 build_opfncall, hack_identifier, make_thunk, use_thunk,
5467 synthesize_method, implicitly_declare_fn,
5468 skip_artificial_parms_for, optimize_function, calls_setjmp_p,
5469 maybe_clone_body): Remove use of PARAMS.
5470
5471 * method.c (do_build_assign_ref, do_build_copy_constructor,
5472 synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
5473 Likewise.
5474 (synthesize_method): Use 'bool' type and constants instead of
5475 'int'.
5476 (locate_copy): Likewise.
5477 (implicitly_declare_fn): Likewise.
5478
5479 * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
5480 Remove old-style declaration.
5481 (maybe_clone_body): Use 'bool' type and constants.
5482
5483 2002-11-21 Glen Nakamura <glen@imodulo.com>
5484
5485 PR c++/8342
5486 * typeck.c (get_member_function_from_ptrfunc): Make sure that a
5487 SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
5488 of the branches of a COND_EXPR.
5489
5490 2002-11-19 Mark Mitchell <mark@codesourcery.com>
5491
5492 * pt.c (for_each_template_parm): Free allocated memory.
5493 * search.c (is_subobject_of_p_1): New function.
5494 (is_subobject_of_p): Avoid walking virtual bases multiple times.
5495
5496 2002-11-19 Jason Thorpe <thorpej@wasabisystems.com>
5497
5498 * g++spec.c (lang_specific_spec_functions): New.
5499
5500 2002-11-15 Kazu Hirata <kazu@cs.umass.edu>
5501
5502 * ChangeLog: Follow spelling conventions.
5503 * class.c: Likewise.
5504 * decl2.c: Likewise.
5505
5506 2002-11-14 Zack Weinberg <zack@codesourcery.com>
5507
5508 * search.c (dfs_push_decls): Do not try to reorder elements
5509 3..n of method_vec if method_vec has only two elements.
5510 Reverse order of two tests to avoid accessing unallocated
5511 memory.
5512
5513 2002-11-14 Mark Mitchell <mark@codesourcery.com>
5514
5515 * class.c (dfs_find_final_overrider): Adjust so that the most
5516 derived object is a binfo, rather than a class type.
5517 (find_final_overrider): Likewise.
5518 (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
5519 (add_vcall_offset): Likewise.
5520
5521 2002-11-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5522
5523 PR c++/8389
5524 * pt.c (instantiate_template): Push class scope for member
5525 functions.
5526 (get_mostly_instantiated_function_type): Likewise. Don't call
5527 tsubst on context. Remove CONTEXTP and TPARMSP parameters.
5528 * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
5529 * mangle.c (write_encoding, write_unqualified_name): Adjust.
5530
5531 2002-11-07 Mark Mitchell <mark@codesourcery.com>
5532
5533 * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
5534 vcall offfsets. Split out ...
5535 (add_vcall_offset): ... new function.
5536
5537 PR c++/8338
5538 * pt.c (for_each_template_parm): Add htab parameter.
5539 (process_partial_specialization): Adjust call.
5540 (push_template_decl_real): Likewise.
5541 (pair_fn_data): Add visited.
5542 (for_each_template_parm_r): Avoid walking duplicates more than
5543 once.
5544 (uses_template_parms): Adjust call to for_each_template_parm.
5545
5546 2002-11-07 Mark Mitchell <mark@codesourcery.com>
5547
5548 * class.c (add_implicitly_declared_members): Put implicitly
5549 declared functions at the end of TYPE_METHODs when -fabi-version
5550 is at least 2.
5551
5552 2002-11-05 Geoffrey Keating <geoffk@apple.com>
5553
5554 * decl2.c (finish_file): Correct spelling.
5555
5556 2002-11-03 Mark Mitchell <mark@codesourcery.com>
5557
5558 * call.c (build_special_member_call): Do not try to lookup VTTs by
5559 name.
5560 * class.c (vtbl_init_data): Add generate_vcall_entries.
5561 (get_vtable_decl): Do not look up virtual tables by name.
5562 (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
5563 (set_primary_base): Do not set CLASSTYPE_RTTI.
5564 (determine_primary_base): Likewise.
5565 (get_matching_virtual): Remove.
5566 (get_vcall_index): New function.
5567 (update_vtable_entry_for_fn): Do not try to use virtual thunks
5568 when they are not required. Assign vcall indices at this point.
5569 (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
5570 Do update dynamic_classes.
5571 (build_vtt): Do not add VTTs to the symbol table.
5572 (build_ctor_vtbl_group): Likewise.
5573 (build_vtbl_initializer): Simplify handling of vcall indices.
5574 (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
5575 for the most derived class.
5576 (add_vcall_offset_vtbl_entries_1): But do not actually add them to
5577 the vtable.
5578 * cp-tree.h (dynamic_classes): New macro.
5579 (lang_type_class): Remove rtti. Add vtables. Add vcall_indices.
5580 (CLASSTYPE_RTTI): Remove.
5581 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
5582 (CLASSTYPE_VCALL_INDICES): New macro.
5583 (CLASSTYPE_VTABLES): Likewise.
5584 (BV_USE_VCALL_INDEX_P): Remove.
5585 (build_vtable_path): Remove.
5586 * decl2.c (finish_vtable_vardecl): Remove.
5587 (key_method): Remove #if 0'd code.
5588 (finish_vtable_vardecl): Rename to ...
5589 (maybe_emit_vtables): ... this.
5590 (finish_file): Use it.
5591 * search.c (look_for_overrides_here): Update comment.
5592
5593 2002-11-01 Zack Weinberg <zack@codesourcery.com>
5594
5595 PR c/7353 redux
5596 * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
5597
5598 2002-10-30 Jason Merrill <jason@redhat.com>
5599
5600 PR c++/8186
5601 * cp-tree.h (ADDR_IS_INVISIREF): New macro.
5602 * call.c (convert_for_arg_passing): Set it.
5603 * except.c (stabilize_throw_expr): Recurse for such an arg.
5604
5605 2002-10-31 Mark Mitchell <mark@codesourcery.com>
5606
5607 * cp-tree.h (lang_decl_flags): Remove init_priority.
5608 (lang_decl): Add delta.
5609 (GLOBAL_INIT_PRIORITY): Remove.
5610 (THUNK_DELTA): Revise definition.
5611 * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
5612 * dump.c (cp_dump_tree): Don't dump it.
5613
5614 2002-10-30 Mark Mitchell <mark@codesourcery.com>
5615
5616 PR c++/8160
5617 * typeck2.c (process_init_constructor): Call complete_array_type.
5618
5619 PR c++/8149
5620 * decl.c (make_typename_type): Issue errors about invalid results.
5621
5622 2002-10-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5623
5624 Core issue 287, PR c++/7639
5625 * cp-tree.h (lang_type_class): Add decl_list field.
5626 (CLASSTYPE_DECL_LIST): New macro.
5627 (maybe_add_class_template_decl_list): Add declaration.
5628 * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
5629 (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
5630 (maybe_add_class_template_decl_list): New function.
5631 (add_implicitly_declared_members): Use it.
5632 * decl.c (maybe_process_template_type_declaration): Likewise.
5633 (pushtag): Likewise.
5634 * friend.c (add_friend): Likewise.
5635 (make_friend_class): Likewise.
5636 * semantics.c (finish_member_declaration): Likewise.
5637 (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
5638 * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
5639 to process members and friends in the order of declaration.
5640
5641 2002-10-29 Mark Mitchell <mark@codesourcery.com>
5642
5643 PR c++/8287
5644 * decl.c (finish_destructor_body): Create the label to jump to
5645 when returning from a destructor here.
5646 (finish_function_body): Rather than here.
5647
5648 2002-10-25 Zack Weinberg <zack@codesourcery.com>
5649
5650 PR c++/7266
5651 * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
5652 SCOPE_REF is not null before dereferencing it.
5653
5654 2002-10-25 Mark Mitchell <mark@codesourcery.com>
5655
5656 * call.c (build_over_call): Use DECL_CONTEXT, not
5657 DECL_VIRTUAL_CONTEXT.
5658 * class.c (modify_vtable_entry): Don't mess with
5659 DECL_VIRTUAL_CONTEXT.
5660 (set_vindex): Remove.
5661 (set_primary_base): Remove vfuns_p parameter.
5662 (determine_primary_base): Likewise.
5663 (modify_all_vtables): Likewise.
5664 (layout_class_type): Likewise. Adjust calls to other functions
5665 accordingly.
5666 (finish_struct_1): Adjust calls to modified functions. Set
5667 DECL_VINDEX here.
5668 * cp-tree.h (lang_type_class): Remove vsize.
5669 (CLASSTYPE_VSIZE): Remove.
5670 (lang_decl): Remove thunks.
5671 (DECL_THUNKS): Adjust.
5672 (DECL_VIRTUAL_CONTEXT): Remove.
5673 (duplicate_decls): Don't copy it.
5674 * pt.c (build_template_decl): Don't set it.
5675 (tsubst_decl): Likewise.
5676 * typeck.c (expand_ptrmemfunc_cst): Don't use it.
5677
5678 * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
5679 (build_vtable_entry): Remove.
5680 * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
5681 (lang_decl): Add thunks.
5682 (DECL_THUNKS): New macro.
5683 * decl.c (duplicate_decls): Copy it.
5684 * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
5685 * semantics.c (emit_associated_thunks): Simplify.
5686
5687 2002-10-24 David Edelsohn <edelsohn@gnu.org>
5688
5689 PR c++/7228
5690 * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
5691 lang_type structure exists before accessing field.
5692 (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
5693 (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
5694 (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
5695 * class.c (check_field_decls): Use new macros.
5696 * typeck2.c (process_init_constructor): Remove redundant check for
5697 existence of lang_type structure.
5698
5699 2002-10-24 Mark Mitchell <mark@codesourcery.com>
5700
5701 * class.c (end_of_base): New method.
5702 (end_of_class): Use it. Check indirect virtual bases.
5703
5704 * class.c (check_field_decls): Fix typo.
5705
5706 2002-10-23 Mark Mitchell <mark@codesourcery.com>
5707
5708 PR c++/8067
5709 * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
5710 related variables.
5711
5712 PR c++/7679
5713 * spew.c (next_token): Do not return an endless stream of
5714 END_OF_SAVED_INPUT tokens.
5715 (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
5716 the cached token stream.
5717 (snarf_defarg): Likewise.
5718
5719 2002-10-23 Zack Weinberg <zack@codesourcery.com>
5720
5721 * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
5722 variably_modified_type_p.
5723 * cp-tree.h: Remove prototype of variably_modified_type_p.
5724 * tree.c (variably_modified_type_p): Remove; now implemented
5725 in language-independent code.
5726
5727 2002-10-22 Mark Mitchell <mark@codesourcery.com>
5728
5729 PR c++/6579
5730 * spew.c (snarf_parenthesized_expression): New function.
5731 (snarf_block): Use it.
5732
5733 2002-10-22 Richard Henderson <rth@redhat.com>
5734
5735 * method.c (use_thunk): Always compute vcall_value; assert that
5736 it is not zero. Use can_output_mi_thunk; use output_mi_thunk
5737 for vcall thunks as well.
5738
5739 2002-10-21 Mark Mitchell <mark@codesourcery.com>
5740
5741 * class.c (empty_base_at_nonzero_offset_p): New function.
5742 (layout_nonempty_base_or_field): Do not check for conflicts when
5743 laying out a virtual base using the GCC 3.2 ABI.
5744 (build_base_field): Correct checking for presence of empty classes
5745 at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
5746
5747 * class.c (include_empty_classes): Use normalize_rli.
5748 (layout_class_type): Likewise.
5749
5750 * decl.c (reshape_init): Tweak handling of character arrays.
5751
5752 PR c++/8218
5753 * cp-tree.h (lang_type_class): Add contains_empty_class_p.
5754 (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
5755 * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
5756 (check_field_decls): Likewise.
5757 (layout_class_type): Likewise.
5758 (finish_struct_1): Initialize it.
5759 (walk_subobject_offsets): Use it to prune searches.
5760
5761 2002-10-20 Mark Mitchell <mark@codesourcery.com>
5762
5763 * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
5764 * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
5765 TARGET_ASM_OUTPUT_MI_THUNK in comments.
5766
5767 2002-10-18 Zack Weinberg <zack@codesourcery.com>
5768
5769 * decl.c (start_decl): Point users of the old initialized-
5770 typedef extension at __typeof__.
5771
5772 2002-10-18 Mark Mitchell <mark@codesourcery.com>
5773
5774 * Make-lang.in (method.o): Depend on TARGET_H.
5775 * method.c (target.h): Include it.
5776 (use_thunk): Use target hooks. Use vcall thunks, if available.
5777
5778 2002-10-18 Mark Mitchell <mark@codesourcery.com>
5779
5780 * class.c (base_derived_from): Make sure return value is a bool.
5781
5782 2002-10-18 Mark Mitchell <mark@codesourcery.com>
5783
5784 * class.c (find_final_overrider_data_s): Remove overriding_fn and
5785 overriding_base.
5786 (dfs_base_derived_from): New function.
5787 (base_derived_from): Likewise.
5788 (dfs_find_final_overrider): Use base_derived_from.
5789 (find_final_overrider): Adjust.
5790
5791 2002-10-18 Jason Merrill <jason@redhat.com>
5792
5793 PR c++/8080
5794 * semantics.c (finish_for_cond, finish_while_cond): Don't mess
5795 with condition decls in a template.
5796
5797 2002-10-17 Nathan Sidwell <nathan@codesourcery.com>
5798
5799 * class.c (add_method): Compare template parms too.
5800
5801 2002-10-17 Mark Mitchell <mark@codesourcery.com>
5802
5803 PR c++/7584
5804 * class.c (handle_using_decl): Allow the declaration used to be
5805 from an ambiguous base.
5806
5807 * pt.c (convert_template_argument): Revert this change:
5808 2002-10-16 Mark Mitchell <mark@codesourcery.com>
5809 * pt.c (convert_template_argument): Do not fold non-type
5810 template rguments when inside a template.
5811
5812 * init.c (expand_default_init): Handle brace-enclosed initializers
5813 correctly.
5814
5815 2002-10-16 Mark Mitchell <mark@codesourcery.com>
5816
5817 * mangle.c (write_expression): Correct handling of enumeration
5818 constants.
5819 (write_template_arg): Likewise.
5820 * pt.c (convert_template_argument): Do not fold non-type template
5821 arguments when inside a template.
5822
5823 PR c++/7478
5824 * cvt.c (convert_to_reference): Allow references as the incoming
5825 type.
5826
5827 2002-10-16 Mark Mitchell <mark@codesourcery.com>
5828
5829 PR c++/7524
5830 * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
5831 build_qualified_type.
5832
5833 2002-10-15 Richard Henderson <rth@redhat.com>
5834
5835 * error.c (dump_expr): Use real_to_decimal directly, and with
5836 the new arguments.
5837
5838 2002-10-15 Mark Mitchell <mark@codesourcery.com>
5839
5840 * decl.c (reshape_init): Fix typo.
5841
5842 * cp-tree.h (operator_name_info_t): Add arity.
5843 * lex.c (init_operators): Initialize it.
5844 * mangle.c (write_conversion_operator_name): New function.
5845 (write_unqualified_name): Use it.
5846 (write_template_args): Accept template arguments as a TREE_LIST.
5847 (write_expression): Adjust handling of qualified names to match
5848 specification.
5849
5850 2002-10-15 Jason Merrill <jason@redhat.com>
5851
5852 * call.c (call_builtin_trap): New fn.
5853 (convert_arg_to_ellipsis): Use it. Downgrade error to warning.
5854 (build_call): Don't set current_function_returns_abnormally outside
5855 a function.
5856
5857 2002-10-14 Mark Mitchell <mark@codesourcery.com>
5858
5859 * class.c (check_field_decls): Remove empty_p parameter. Instead,
5860 clear CLASSTYPE_EMPTY_P.
5861 (build_base_field): Likewise.
5862 (build_base_fields): Likewise.
5863 (check_bases_and_members): Likewise.
5864 (create_vtbl_ptr): Likewise.
5865 (layout_class_type): Likewise. Ensure that empty classes have
5866 size zero when used as base classes in the 3.2 ABI.
5867 (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
5868 CLASSTYPE_NEARLY_EMPTY_P. Adjust calls to avoid passing empty_p
5869 parameter.
5870 (is_empty_class): Correct definition when using post-3.2 ABI.
5871 * cp-tree.h (lang_type_class): Add empty_p.
5872 (CLASSTYPE_EMPTY_P): New macro.
5873
5874 2002-10-12 Nathan Sidwell <nathan@codesourcery.com>
5875
5876 * init.c (build_delete): Do not apply save_expr for arrays.
5877 (build_vec_delete): Likewise.
5878
5879 2002-10-14 Mark Mitchell <mark@codesourcery.com>
5880
5881 * decl.c (layout_var_decl): Call layout_decl even for variables
5882 whose type is an array with unspecified bounds.
5883
5884 PR c++/7176
5885 * lex.c (do_identifier): Add another option for the parsing
5886 parameter.
5887 * parse.y (do_id): Use it.
5888
5889 2002-10-11 Gabriel Dos Reis <gdr@integrable-solutions.net>
5890
5891 PRs C++/6803, C++/7721 and C++/7803
5892 * decl.c (grokdeclarator): Gracefully handle template-name as
5893 decl-specifier.
5894
5895 2002-10-11 Jason Molenda <jmolenda@apple.com>
5896
5897 * init.c (build_field_list): Provide uses_unions_p with a default
5898 value.
5899
5900 2002-10-11 Mark Mitchell <mark@codesourcery.com>
5901
5902 PR c++/5661
5903 * cp-tree.h (variably_modified_type_p): New function.
5904 (grokdeclarator) Tighten check for variably modified types as
5905 fields.
5906 * pt.c (convert_template_argument): Do not allow variably modified
5907 types as template arguments.
5908 * tree.c (variably_modified_type_p): New function.
5909
5910 * NEWS: Document removal of "new X = ..." extension.
5911 * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
5912 brace-enclosed initializers.
5913 * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
5914 (initialize_local_var): Remove declaration.
5915 (expand_static_init): Likewise.
5916 * decl.c (next_initializable_field): New function.
5917 (reshape_init): Likewise.
5918 (check_initializer): Use them. Build dynamic initializer for
5919 aggregates here too.
5920 (initialize_local_var): Simplify, and incorporate cleanup
5921 insertion code as well.
5922 (destroy_local_var): Remove.
5923 (cp_finish_decl): Tidy.
5924 (expand_static_init): Fold checks for whether or not a variable
5925 needs initialization into this function. Simplify.
5926 * decl2.c (do_static_initialization): Simplify.
5927 * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
5928 be done for us automatically.
5929 (expand_default_init): Handle brace-enclosed initializers
5930 correctly.
5931 (expand_aggr_init_1): Remove RTL-generation code.
5932 (build_vec_init): Remove "new X = ..." support.
5933 * parse.y (new_initializer): Likewise.
5934 * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
5935 brace-enclosed initializer.
5936 (create_pseudo_type_info): Likewise.
5937 * typeck2.c (store_init_value): Don't try to handle digest_init
5938 being called more than once.
5939 (digest_init): Tidy handling of brace-enclosed initializers.
5940
5941 2002-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5942
5943 * decl.c (typename_hash): Use htab_hash_pointer.
5944
5945 2002-10-10 Jim Wilson <wilson@redhat.com>
5946
5947 * decl.c (duplicate_decls): Don't call decl_attributes.
5948
5949 2002-10-09 Zack Weinberg <zack@codesourcery.com>
5950
5951 PR c/7353
5952 * decl.c (start_decl): Unconditionally issue error for
5953 'typedef foo = bar'.
5954 (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
5955 (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
5956
5957 2002-10-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5958
5959 * decl2.c (prune_vtable_vardecl): Delete unused function.
5960
5961 2002-10-03 Mark Mitchell <mark@codesourcery.com>
5962
5963 PR c++/7754
5964 * decl2.c (finish_anon_union): Do not expand anonymous unions when
5965 procesing template functions.
5966 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
5967 type. Call layout_decl.
5968 (tsubst_expr, case DECL_STMT): Handle anonymous unions.
5969
5970 2002-10-07 Richard Henderson <rth@redhat.com>
5971
5972 * decl2.c, pt.c: Revert c++/7754 fix.
5973
5974 2002-10-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5975
5976 PR c++/7804
5977 * error.c (dump_expr) [REAL_CST]: Output in decimal format.
5978
5979 2002-10-03 Mark Mitchell <mark@codesourcery.com>
5980
5981 PR c++/7931
5982 * pt.c (for_each_template_parm_r): Handle BASELINKs.
5983
5984 PR c++/7754
5985 * decl2.c (finish_anon_union): Do not expand anonymous unions when
5986 procesing template functions.
5987 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
5988 type. Call layout_decl.
5989 (tsubst_expr, case DECL_STMT): Handle anonymous unions.
5990
5991 2002-10-03 Mark Mitchell <mark@codesourcery.com>
5992
5993 PR c++/8006
5994 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
5995 template parameters.
5996 (globals): Add entity and need_abi_warning.
5997 (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
5998 CLASSTYPE_TEMPLATE_INFO.
5999 (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
6000 TYPE_TI_TEMPLATE.
6001 (write_prefix): Handle typename types correctly.
6002 (write_template_prefix): Handle template template parameters
6003 correctly.
6004 (start_mangling): Add entity parameter.
6005 (finish_mangling): Warn about names whose mangling will change.
6006 (mangle_decl_string): Adjust.
6007 (mangle_type_string): Likewise.
6008 (mangle_special_for_type): Likewise.
6009 (mangle_ctor_vtbl_for_type): Likewise.
6010 (mangle_thunk): Likewise.
6011 (mangle_guard_variable): Likewise.
6012 (mangle_ref_init_variable): Likewise.
6013
6014 2002-10-02 Mark Mitchell <mark@codesourcery.com>
6015
6016 PR c++/7188.
6017 * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
6018 * cp-tree.h (emit_base_init): Rename to ....
6019 (emit_mem_initializers): ... this.
6020 (expand_member_init): Change prototype.
6021 * init.c (perform_member_init): Compute explicit, rather than
6022 requiring it as a parameter.
6023 (sort_member_init): Rename to ...
6024 (sort_mem_initializers): ... this. Process bases and data members
6025 together.
6026 (sort_base_init): Remove.
6027 (emit_base_init): Rename to ...
6028 (emit_mem_initializers): ... this.
6029 (expand_aggr_vbase_init_1): Remove.
6030 (construct_virtual_bases): Rename to ...
6031 (construct_virtual_base): ... this.
6032 (expand_member_init): Rework handling of base initializers.
6033 * method.c (do_build_copy_constructor): Use
6034 finish_mem_initializers.
6035 * parse.y (member_init): Adjust calls to expand_member_init.
6036 * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
6037 (tsubst_initializer_list): Use expand_member_init.
6038 * semantics.c (finish_mem_intiailizers): Simplify.
6039
6040 2002-10-02 Matt Austern <austern@apple.com>
6041 * decl.c (walk_vtables_r): Fixed typo that caused result to
6042 never get a nonzero value.
6043
6044 2002-10-02 Roger Sayle <roger@eyesopen.com>
6045
6046 PR optimization/6627
6047 * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
6048 from here, and move it to tree.h.
6049 * decl.c (cxx_init_decl_processing): If storing the vbit
6050 in function pointers, ensure that force_align_functions_log
6051 is atleast one.
6052
6053 2002-10-02 Matt Austern <austern@apple.com>
6054
6055 * class.c (check_field_decls): Changed warning about const member
6056 variables so that it doesn't get issued for a class aggregate.
6057
6058 2002-10-01 Mark Mitchell <mark@codesourcery.com>
6059
6060 * decl.c (cp_finish_decl): Make sure array types are laid out,
6061 even if the array bounds are unknown.
6062
6063 2002-10-01 Steve Ellcey <sje@cup.hp.com>
6064
6065 * class.c (build_vtbl_initializer): Change build_c_cast
6066 to build1.
6067
6068 2002-10-01 Mark Mitchell <mark@codesourcery.com>
6069
6070 * decl.c (cp_finish_decl): Make sure array types are laid out,
6071 even if the array bounds are unknown.
6072
6073 * decl.c (cp_finish_decl): Correct check for dynamic
6074 initialization of thread-local storage.
6075
6076 2002-09-30 Nathan Sidwell <nathan@codesourcery.com>
6077
6078 * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
6079 overloaded.
6080
6081 2002-09-30 Steve Ellcey <sje@cup.hp.com>
6082
6083 * class.c (build_vtbl_initializer): Add cast.
6084 (add_vcall_offset_vtbl_entries_1):
6085 Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
6086
6087 2002-09-30 Mark Mitchell <mark@codesourcery.com>
6088
6089 * class.c (walk_subobject_offsets): Correct the calculation of
6090 offsets for virtual bases. Correct the counting of array
6091 elements.
6092 (layout_nonempty_base_or_field): Simplify. Correct the
6093 calculation of offsets to be propagated through the binfo
6094 hierarchy.
6095 (build_base_field): Avoid creating a FIELD_DECL for empty bases.
6096 Add the FIELD_DECL to TYPE_FIELDS.
6097 (build_base_fields): Adjust accordingly.
6098 (layout_virtual_bases): Use build_base_field.
6099 (end_of_class): Return a tree, not an integer.
6100 (warn_about_ambiguous_direct_bases): Rename to ...
6101 (warn_about_ambiguous_bases): ... this.
6102 (include_empty_classes): New function.
6103 (layout_class_type): Create an alternative version of the type to
6104 be used when as a base class type. Do not call
6105 finish_record_layout until we are done laying out the class.
6106 * cp-tree.h (lang_type_class): Remove size, size_unit. Add
6107 as_base.
6108 (CLASSTYPE_SIZE): Reimplement.
6109 (CLASSTYPE_SIZE_UNIT): Likewise.
6110 (CLASSTYPE_ALIGN): Likweise.
6111 (CLASSTYPE_USER_ALIGN): Likewise.
6112 (CLASSTYPE_AS_BASE): New macro.
6113 (DECL_INITIALIZED_P): Likewise.
6114 (extract_init): Remove prototype.
6115 (build_forced_zero_init): Rename to ...
6116 (build_zero_init): ... this.
6117 (force_store_init_value): Remove.
6118 * decl.c (obscure_complex_init): Remove.
6119 (duplicate_decls): Copy DECL_INITIALIZED_P.
6120 (check_initializer): Do not leave junk in DECL_INITIAL.
6121 (cp_finish_decl): Handle zero-initialization of entities with
6122 static storage duration.
6123 * expr.c (extract_init): Remove.
6124 * init.c (build_forced_zero_init): Remove.
6125 (build_zero_init): New function.
6126 (build_default_init): Use it.
6127 (build_field_list): Skip FIELD_DECLs for base subobjects.
6128 (push_base_cleanups): Likewise.
6129 * method.c (do_build_assign_ref): Likewise.
6130 (synthesize_exception_spec): Likewise.
6131 * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
6132 (regenerate_decl_from_template): To not set DECL_INITIAL for a
6133 static data member whose initialization took place in its class.
6134 (instantiate_decl): Do not pass an initializer to cp_finish_decl
6135 in that situation.
6136 * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
6137 (dfs_unuse_fields): Likewise.
6138 * tree.c (pod_type_p): Handle error_mark_node.
6139 (zero_init_p): Likewise.
6140 * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
6141 subobjects.
6142 * typeck2.c (store_init_value): Remove #if 0'd code.
6143 (force_store_init_value): Remove.
6144 (process_init_constructor): Use build_zero_init.
6145
6146 2002-09-29 Nathan Sidwell <nathan@codesourcery.com>
6147
6148 PR c++/7788
6149 * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
6150
6151 2002-09-29 Kazu Hirata <kazu@cs.umass.edu>
6152
6153 * cp-tree.h: Fix comment typos.
6154 * decl.c: Likewise.
6155 * pt.c: Likewise.
6156
6157 2002-09-25 Mark Mitchell <mark@codesourcery.com>
6158
6159 * cp/class.c (contains_empty_class_p): New method.
6160 (walk_subobject_offsets): Correct computation of field offset.
6161 (layout_empty_base): Correct placement of emtpy base classes.
6162 (layout_class_type): Warn about ABI changes.
6163
6164 2002-09-23 Mark Mitchell <mark@codesourcery.com>
6165
6166 * cp/class.c (layout_virtual_bases): Do not round the size of the
6167 type to a multiple of the alignment before laying out virtual bases.
6168 (layout_class_type): Correct handling of bit-fields that are wider
6169 than their type inside unions. Round the size of the type to a
6170 even number of bytes when computing the size without virtual
6171 bases.
6172 * cp/cp-tree.h (abi_version_at_least): New macro.
6173
6174 2002-09-21 Kazu Hirata <kazu@cs.umass.edu>
6175
6176 * ChangeLog: Follow spelling conventions.
6177 * ChangeLog.2: Likewise.
6178 * call.c: Likewise.
6179 * class.c: Likewise.
6180 * cp-tree.h: Likewise.
6181 * cvt.c: Likewise.
6182 * decl.c: Likewise.
6183 * decl2.c: Likewise.
6184 * except.c: Likewise.
6185 * friend.c: Likewise.
6186 * g++spec.c: Likewise.
6187 * init.c: Likewise.
6188 * lex.c: Likewise.
6189 * mangle.c: Likewise.
6190 * method.c: Likewise.
6191 * operators.def: Likewise.
6192 * optimize.c: Likewise.
6193 * pt.c: Likewise.
6194 * rtti.c: Likewise.
6195 * search.c: Likewise.
6196 * semantics.c: Likewise.
6197 * spew.c: Likewise.
6198 * tree.c: Likewise.
6199 * typeck.c: Likewise.
6200
6201 2002-09-18 Devang Patel <dpatel@apple.com>
6202
6203 * cp/cp-tree.h: New prototype for walk_vtabls().
6204 * cp/decl.c (walk_vtables_r): New function.
6205 (struct cp_binding_level): Add new members, namespaces,
6206 names_size and vtables.
6207 (add_decl_to_level): Add decl in namespaces or vtables
6208 chain, if conditions match.
6209 (walk_vtables): New function.
6210 (walk_namespaces_r): Travers separate namespace chain
6211 for namespace decls.
6212 (wrapup_globals_for_namespace): Use names_size instead
6213 of list_length().
6214 * cp/decl2.c (finish_file): Use walk_vtables() instead of
6215 walk_globals() to walk vtable decls.
6216
6217 2002-09-18 Nathan Sidwell <nathan@codesourcery.com>
6218
6219 * decl.c (grokdeclarator): Use assert, not internal_error. Don't
6220 ICE with invalid pointers & references.
6221
6222 2002-09-17 Zack Weinberg <zack@codesourcery.com>
6223
6224 * Make-lang.in: Remove all references to the demangler.
6225 * cxxfilt.c: Moved to binutils.
6226
6227 2002-09-16 Nathan Sidwell <nathan@codesourcery.com>
6228
6229 PR c++/7718
6230 * pt.c (tsubst_decl): Remove assert.
6231
6232 Remove DR 295 implementation.
6233 * pt.c (check_cv_quals_for_unify): Disable function & method cases.
6234 * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
6235 about ignoring volatile qualifiers.
6236
6237 * search.c (lookup_member): Correct documentation.
6238
6239 2002-09-16 Geoffrey Keating <geoffk@apple.com>
6240
6241 * cp-tree.h (union lang_tree_node): Add chain_next option.
6242
6243 2002-09-16 Nathan Sidwell <nathan@codesourcery.com>
6244
6245 * parse.y (parse_finish_call_expr): Check lookup_member result.
6246
6247 PR c++/7015
6248 * semantic.c (finish_asm_stmt): Fix operand/output_operands
6249 thinko.
6250 * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
6251
6252 2002-09-15 Nathan Sidwell <nathan@codesourcery.com>
6253
6254 PR c++/7919
6255 * call.c (build_over_call): Convert this pointer for fns found by
6256 using decls.
6257
6258 2002-09-15 Kazu Hirata <kazu@cs.umass.edu>
6259
6260 * ChangeLog: Follow spelling conventions.
6261 * ChangeLog.1: Likewise.
6262
6263 2002-09-14 Nathan Sidwell <nathan@codesourcery.com>
6264
6265 PR c++/7768
6266 * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
6267
6268 2002-09-14 Kazu Hirata <kazu@cs.umass.edu>
6269
6270 * error.c: Fix comment formatting.
6271 * except.c: Likewise.
6272 * expr.c: Likewise.
6273 * friend.c: Likewise.
6274 * g++spec.c: Likewise.
6275 * init.c: Likewise.
6276 * lex.c: Likewise.
6277 * mangle.c: Likewise.
6278 * method.c: Likewise.
6279 * optimize.c: Likewise.
6280 * pt.c: Likewise.
6281 * rtti.c: Likewise.
6282 * search.c: Likewise.
6283 * semantics.c: Likewise.
6284 * spew.c: Likewise.
6285 * tree.c: Likewise.
6286 * typeck.c: Likewise.
6287 * typeck2.c: Likewise.
6288
6289 2002-09-13 Matt Austern <austern@apple.com>
6290
6291 PR C++/7828
6292 * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
6293 * cp/call.c: Change call-by-const-reference mechanism to use
6294 non_cast_lvalue_p when deciding whether the create a temporary.
6295 We need a temporary when passing, e.g. (long) x by const ref.
6296
6297 2002-09-13 Nathan Sidwell <nathan@codesourcery.com>
6298
6299 * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
6300
6301 2002-09-13 Kazu Hirata <kazu@cs.umass.edu>
6302
6303 * decl.c: Fix comment formatting.
6304 * decl2.c: Likewise.
6305
6306 2002-09-12 Kazu Hirata <kazu@cs.umass.edu>
6307
6308 * call.c: Fix comment formatting.
6309 * class.c: Likewise.
6310 * cp-lang.c: Likewise.
6311 * cp-tree.h: Likewise.
6312 * cvt.c: Likewise.
6313
6314 2002-09-11 Zack Weinberg <zack@codesourcery.com>
6315
6316 * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
6317 and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
6318 * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
6319 minor adjustments (use version_string, eliminate yet another
6320 duplicate of xmalloc)
6321
6322 2002-09-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6323
6324 * cp-tree.h (require_complete_eh_spec_types): Add prototype.
6325
6326 2002-09-05 Jason Merrill <jason@redhat.com>
6327
6328 * typeck2.c (add_exception_specifier): Only pedwarn for an
6329 incomplete type.
6330 (require_complete_eh_spec_types): New fn.
6331 (cxx_incomplete_type_diagnostic): Also support pedwarning.
6332 * typeck.c (complete_type_or_diagnostic): Likewise.
6333 * call.c (build_call): Call require_complete_eh_spec_types.
6334 * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
6335 on an incomplete type.
6336
6337 2002-09-04 Jakub Jelinek <jakub@redhat.com>
6338
6339 * decl.c (start_cleanup_fn): Clear interface_only before
6340 start_function, restore it afterwards.
6341
6342 2002-09-02 Nathan Sidwell <nathan@codesourcery.com>
6343
6344 * cp-tree.h (finish_builtin_type): Remove.
6345 * decl2.c (finish_builtin_type): Move to common code.
6346 * decl.c (build_ptrmemfunc_type): Adjust.
6347 * rtti.c (create_pseudo_type_info): Adjust.
6348 (create_tinfo_types): Adjust.
6349
6350 2002-08-31 Jason Merrill <jason@redhat.com>
6351
6352 * cp-lang.c (cp_expr_size): Allow initialization from a
6353 CONSTRUCTOR.
6354
6355 2002-08-30 Richard Henderson <rth@redhat.com>
6356
6357 PR opt/7515
6358 * tree.c: Include target.h.
6359 (cp_cannot_inline_tree_fn): Don't auto-inline functions that
6360 don't bind locally.
6361 * Makefile.in (tree.o): Update.
6362
6363 2002-08-27 Mark Mitchell <mark@codesourcery.com>
6364
6365 * class.c (layout_virtual_bases): Warn about bugs in G++ that
6366 result in incorrect object layouts.
6367 (layout_class_type): Likewise.
6368
6369 2002-08-24 Matt Austern <austern@apple.com>
6370
6371 * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
6372 are allowable.
6373 (real_lvalue_p): Update caller.
6374 (lvalue_p): Ditto.
6375 (non_cast_lvalue_or_else): New.
6376 * tree.h: Declare it.
6377 * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
6378
6379 2002-08-22 Mark Mitchell <mark@codesourcery.com>
6380
6381 * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
6382 and COND_EXPR specially; fix error message output.
6383
6384 2002-08-22 Jason Merrill <jason@redhat.com>
6385
6386 * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
6387 * semantics.c (nullify_returns_r): Likewise.
6388
6389 2002-08-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
6390
6391 Fix PR/7621
6392 * typeck.c (finish_class_member_access_expr): Diagnose cases where
6393 name lookup finds nothing.
6394
6395 2002-08-15 Jason Merrill <jason@redhat.com>
6396
6397 * semantics.c (finish_then_clause): Remove redundant assignment.
6398 (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
6399 extra binding level outside the if/switch statement.
6400 (finish_while_cond, finish_for_cond): Rewrite complex condition
6401 into the loop body.
6402
6403 2002-08-15 Alexandre Oliva <aoliva@redhat.com>
6404
6405 * parse.y (sizeof, alignof, typeof): New non-terminals to
6406 increment skip_evaluation. Replace terminals with them and
6407 decrement skip_evaluation at the end of rules using them.
6408 * decl2.c (mark_used): Don't assemble_external if
6409 skipping evaluation.
6410
6411 2002-08-15 Gabriel Dos Reis <gdr@nerim.net>
6412
6413 Fix PR/7504
6414 * parse.y (parse_finish_call_expr): Handle incomplete
6415 type used to name a scope.
6416
6417 2002-08-15 Nathan Sidwell <nathan@codesourcery.com>
6418
6419 PR c++/7598
6420 * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
6421 regression caused by my 2002-08-08 patch.
6422
6423 2002-08-13 Mark Mitchell <mark@codesourcery.com>
6424
6425 * decl.c (pushdecl_class_level): Honor requests to bind names to
6426 OVERLOADs.
6427
6428 2002-08-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6429
6430 * decl2.c (build_call_from_tree): Fix uninitialized variable.
6431 * parse.y (parse_finish_call_expr): Likewise.
6432 * repo.c (old_args, old_dir, old_main): Const-ify.
6433
6434 2002-08-11 Gabriel Dos Reis <gdr@nerim.net>
6435
6436 * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE
6437 DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
6438 * optimize.c (maybe_clone_body): Likewise.
6439 * pt.c (tsubst_enum): Likewise.
6440 (lookup_template_class): Likewise.
6441 * tree.c (cp_copy_res_decl_for_inlining): Likewise.
6442
6443 2002-08-10 Neil Booth <neil@daikokuya.co.uk>
6444
6445 * lang-specs.h: Remove -ansi.
6446
6447 2002-08-10 Nathan Sidwell <nathan@codesourcery.com>
6448
6449 * tree.c (maybe_dummy_object): Replace // with /* */
6450
6451 2002-08-09 Mark Mitchell <mark@codesourcery.com>
6452
6453 * call.c (standard_conversion): Use build_ptrmem_type.
6454 * cp-tree.h (build_ptrmem_type): New function.
6455 (adjust_result_of_qualified_name_lookup): Likewise.
6456 * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
6457 static data members.
6458 (build_ptrmem_type): New function.
6459 (grokdeclarator): Do not use build_offset_type when encountering a
6460 qualified name.
6461 * parse.y (parse_finish_call_expr): Use
6462 adjust_result_of_qualified_name_lookup.
6463 * search.c (adjust_result_of_qualified_name_lookup): New function.
6464 * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
6465 accessing OFFSET_TYPEs directly.
6466
6467 2002-08-08 Mike Stump <mrs@apple.com>
6468
6469 * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
6470 (type_decays_to): Likewise.
6471 * class.c (find_final_overrider): Likewise.
6472 (maybe_note_name_used_in_class): Likewise.
6473 * decl.c (current_tmpl_spec_kind): Likewise.
6474 (add_binding): Likewise.
6475 (push_class_binding): Likewise.
6476 (duplicate_decls): Likewise.
6477 (layout_var_decl): Likewise.
6478 (grokfndecl): Likewise.
6479 (grokdeclarator): Likewise.
6480 (check_default_argument): Likewise.
6481 * decl2.c (handle_class_head): Likewise.
6482 * error.c (dump_template_decl): Likewise.
6483 * init.c (build_offset_ref): Likewise.
6484 * pt.c (check_specialization_scope): Likewise.
6485 (determine_specialization): Likewise.
6486 (check_explicit_specialization): Likewise.
6487 (maybe_check_template_type): Likewise.
6488 (process_partial_specialization): Likewise.
6489 (check_default_tmpl_args): Likewise.
6490 (push_template_decl_real): Likewise.
6491 (convert_template_argument): Likewise.
6492 (try_class_unification): Likewise.
6493 (get_bindings_real): Likewise.
6494 (do_decl_instantiation): Likewise.
6495 * semantics.c (begin_function_definition): Likewise.
6496 (finish_member_declaration): Likewise.
6497 (check_multiple_declarators): Likewise.
6498 * typeck.c (comp_array_types): Likewise.
6499 (comptypes): Likewise.
6500 (expr_sizeof): Likewise.
6501 (build_binary_op): Likewise.
6502 (dubious_conversion_warnings): Likewise.
6503 (check_return_expr): Likewise.
6504
6505 2002-08-08 Mark Mitchell <mark@codesourcery.com>
6506
6507 * typeck.c (build_class_member_access_expr): Do not return
6508 error_mark_node when no error has occurred.
6509
6510 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
6511
6512 * typeck.c (build_component_addr): Remove.
6513 (build_unary_op): Just check it's not a bitfield, and then build
6514 an ADDR_EXPR.
6515
6516 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
6517
6518 * class.c (convert_to_base): Correct check for error_mark_node.
6519 (create_vtable_ptr): Remove unused VFUNS_P parm.
6520
6521 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
6522
6523 * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
6524
6525 2002-08-07 Mark Mitchell <mark@codesourcery.com>
6526
6527 Rework build_component_ref.
6528 * call.c (build_vfield_ref): Do not go through build_component_ref.
6529 (build_field_call): Use build_class_member_access_expr.
6530 (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
6531 (build_object_call): Likewise.
6532 * class.c (convert_to_base): New function.
6533 (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
6534 (instantiate_type): Handle BASELINKs.
6535 * cp-tree.def (BASELINK): New tree code.
6536 * cp-tree.h (BASELINK_P): Reimplement.
6537 (SET_BASELINK_P): Remove.
6538 (BASELINK_BINFO): Reimplement.
6539 (BASELINK_FUNCTIONS): Likewise.
6540 (BASELINK_ACCESS_BINFO): Likewise.
6541 (BASELINK_OPTYPE): Likewise.
6542 (convert_to_base): New function.
6543 (name_p): Likewise.
6544 (build_object_ref): Remove.
6545 (build_component_ref_1): Likewise.
6546 (build_component_ref): Likewise.
6547 (build_x_component_ref): Likewise.
6548 (build_class_member_access_expr): New function.
6549 (finish_class_member_access_expr): Likewise.
6550 (build_ptrmemfunc_access_expr): Likewise.
6551 * decl.c (grokdeclarator): Handle BASELINKs.
6552 * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
6553 finish_class_member_access_expr.
6554 (arg_assoc): Handle BASELINKs.
6555 (do_class_using_decl): Likewise.
6556 * error.c (dump_decl): Likewise.
6557 (dump_expr): Use build_ptrmemfunc_access_expr.
6558 * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
6559 destructors.
6560 (build_throw): Use BASELINK_FUNCTIONS.
6561 * init.c (perform_member_init): Use
6562 build_class_member_access_expr.
6563 (build_offset_ref): Handle BASELINKs. Use
6564 build_class_member_access_expr.
6565 * method.c (hack_identifier): Likewise.
6566 * parse.y (do_id): Use BASELINK, not TREE_LIST.
6567 (primary): Remove uses of build_object_ref.
6568 * pt.c (lookup_template_function): Handle BASELINKs.
6569 (resolve_overloaded_unification): Likewise.
6570 * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
6571 (lookup_field): Use BASELINK, not TREE_LIST.
6572 (lookup_fnfiels): Likewise.
6573 (setup_class_bindings): Likewise.
6574 * semantics.c (finish_object_call_expr): Do not use
6575 build_method_call when we already know what function is being
6576 called.
6577 * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
6578 * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
6579 TREE_CHAIN.
6580 (name_p): New function.
6581 * typeck.c (build_object_ref): Remove.
6582 (build_component_ref_1): Likewise.
6583 (build_x_component_ref): Likewise.
6584 (build_class_member_access_expr): New function.
6585 (finish_class_member_access_expr): Likewise.
6586 (build_ptrmemfunc_access_expr): Likewise.
6587 (get_member_function_from_ptrfunc): Use
6588 build_ptrmemfunc_access_expr.
6589 (build_binary_op): Likewise.
6590 (build_unary_op): Likewise.
6591 (build_ptrmemfunc): Likewise.
6592 (pfn_from_ptrmemfunc): Likewise.
6593 * typeck2.c (build_m_component_ref): Adjust comment.
6594
6595 2002-08-07 Neil Booth <neil@daikokuya.co.uk>
6596
6597 * Make-lang.in (CXX_C_OBJS): Update.
6598 * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
6599 * cp-tree.h (cxx_decode_option): Remove.
6600 * decl2.c (compare_options, lang_f_options, unsupported_options,
6601 cxx_decode_option): Remove.
6602
6603 2002-08-06 Gabriel Dos Reis <gdr@nerim.net>
6604
6605 * typeck.c (build_x_unary_op): Handle pointer-to-member.
6606
6607 2002-08-05 Geoffrey Keating <geoffk@redhat.com>
6608
6609 * class.c: Don't include obstack.h.
6610 (popclass):
6611 * decl2.c: Delete bogus comment.
6612 * error.c: Don't include obstack.h.
6613 * except.c: Likewise.
6614 (dump_type): Correct comment.
6615 * method.c: Don't include obstack.h.
6616 * tree.c: Likewise.
6617
6618 2002-08-04 Gabriel Dos Reis <gdr@nerim.net>
6619
6620 Fix PR/2213
6621 * cvt.c (cp_convert_to_pointer): Reject conversions from integral
6622 expressions to pointer-to-data-member of pointer-to-member-functions.
6623
6624 2002-08-04 Geoffrey Keating <geoffk@redhat.com>
6625
6626 * cvt.c (ocp_convert): Delete obsolete code.
6627 * parse.y (permanent_obstack): Delete declaration.
6628 * pt.c (permanent_obstack): Delete declaration.
6629 * repo.c (permanent_obstack): Delete declaration.
6630 (open_repo_file): Use xmalloc instead of permanent_obstack.
6631 (init_repo): Use xstrdup instead of permanent_obstack.
6632
6633 2002-08-04 Nathan Sidwell <nathan@codesourcery.com>
6634
6635 * cp-tree.h (VF_DERIVED_VALUE): Remove.
6636 * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
6637
6638 2002-08-03 Nathan Sidwell <nathan@codesourcery.com>
6639
6640 PR 7470.
6641 C++ ABI change - vfunc ordering.
6642 * class.c (add_virtual_function): Remove.
6643 (dfs_modify_all_vtables): Take list of all declared
6644 virtuals. Assign all that are not in primary base.
6645 (check_for_override): Adjust comments.
6646 (create_vtable_ptr): Take single list of virtuals. Build chain
6647 of declared virtuals here.
6648 (layout_class_type): Take single list of virtuals. Adjust.
6649 (finish_struct_1): Keep virtuals on single list. Adjust.
6650
6651 2002-08-02 Mark Mitchell <mark@codesourcery.com>
6652
6653 * init.c (build_member_call): Use build_new_method_call, not
6654 build_method_call.
6655
6656 2002-08-02 Krister Walfridsson <cato@df.lth.se>
6657
6658 * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
6659
6660 2002-08-02 Mark Mitchell <mark@codesourcery.com>
6661
6662 * call.c (build_method_call): Issue a more helpful error message
6663 about ambiguous method names.
6664
6665 2002-08-02 Nathan Sidwell <nathan@codesourcery.com>
6666
6667 * tree.c (build_shared_int_cst): Make cache file scope, and
6668 GTY it.
6669
6670 2002-08-02 Jason Merrill <jason@redhat.com>
6671
6672 * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
6673 (cp_expr_size): New fn.
6674 * call.c (build_over_call): Lose empty class hackery.
6675 (convert_arg_to_ellipsis): Promote non-POD warning to error.
6676 * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
6677
6678 * semantics.c (expand_body): Do tree optimization in the function
6679 context, too.
6680
6681 2002-08-01 Neil Booth <neil@daikokuya.co.uk>
6682
6683 * cp-tree.h: Move all warning and flag declarations to c-common.h.
6684 * decl.c: Move all warning and flag variables to c-common.c.
6685 * decl2.c: Move all warning and flag variables to c-common.c.
6686 * lex.c (flag_digraphs): Remove.
6687 (warn_traditional): Now in c-common.c.
6688
6689 2002-07-31 Mark Mitchell <mark@codesourcery.com>
6690
6691 * call.c (build_field_call): Do not look up the field by name.
6692 (build_method_call): Simplify.
6693 (struct z_candidate): Add access_path and conversion_path. Remove
6694 basetype_path.
6695 (convert_class_to_reference): Adjust use of
6696 add_function_candidate.
6697 (add_candidate): Add conversion_path argument.
6698 (add_function_candidate): Use it.
6699 (add_conv_dndidate): Likewise.
6700 (build_builtin_candidate): Likewise.
6701 (add_template_candidate_real): Add conversion_path argument.
6702 (add_template_conv_candidate): Likewise.
6703 (add_template_candidate): Likewise.
6704 (build_user_type_conversion_1): Use it.
6705 (build_new_function_call): Remove name lookup code. Adjust use of
6706 add_template_candidate and add_function_candidate.
6707 (build_new_op): Likewise.
6708 (convert_like_real): Use build_special_member_call.
6709 (build_over_call): Use cand->conversion_path.
6710 (build_special_member_call): New method.
6711 (build_new_method_call): Remove name lookup code.
6712 * cp-tree.def (OFFSET_REF): Update documentation.
6713 (TEMPLATE_ID_EXPR): Likewise.
6714 * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
6715 (BASELINK_OPTYPE): Likewise.
6716 (build_new_method_call): Adjust prototype.
6717 (build_special_member_call): New method.
6718 (build_baselink): New method.
6719 (build_offset_ref_call_from_tree): Likewise.
6720 (build_call_from_tree): Likewise.
6721 (finish_qualified_call_expr): Remove.
6722 (finish_call_expr): Adjust prototype.
6723 (build_x_function_call): Remove.
6724 * cvt.c (ocp_convert): Use build_special_member_call.
6725 * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
6726 (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
6727 CALL_EXPR.
6728 (build_offset_ref_call_from_tree): New function.
6729 (build_call_from_tree): Likewise.
6730 * init.c (expand_cleanup): Use build_special_member_call.
6731 (expand_default_init): Likewise.
6732 (build_member_call): Use finish_call_expr.
6733 (build_new_1): Use build_special_member_call.
6734 (push_base_cleanups): Likewise.
6735 * method.c (do_build_assign_ref): Likewise.
6736 * parse.y (template_id): Do not pass a COMPONENT_REF to
6737 lookup_template_function.
6738 (primary): Use parse_finish_call_epxr, not finish_call_expr.
6739 (parse_finish_call_expr): New function.
6740 * pt.c (lookup_template_function): Add assertions.
6741 * search.c (lookup_base): Allow T to be a binfo.
6742 (build_baselink): New function.
6743 (lookup_member): Use it.
6744 * semantics.c (finish_call_expr): Do not do name lookup.
6745 (finish_object_call_expr): Remove #if 0'd code.
6746 (finish_qualified_call_expr): Remove.
6747 * typeck.c (build_x_function_call): Remove.
6748 (build_static_case): Use build_special_member_call.
6749 * typeck2.c (build_functional_cast): Likewise.
6750
6751 2002-07-30 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
6752
6753 * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
6754
6755 2002-07-30 Gabriel Dos Reis <gdr@nerim.net>
6756
6757 * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
6758
6759 2002-07-30 Nathan Sidwell <nathan@codesourcery.com>
6760
6761 * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
6762 documentation.
6763
6764 2002-07-29 Alan Modra <amodra@bigpond.net.au>
6765
6766 * cp-tree.h: Comment typo fix.
6767
6768 2002-07-29 Richard Earnshaw <rearnsha@arm.com>
6769
6770 * spew.c (space_for_token): Allocate zeroed memory for a new token
6771 chunk.
6772
6773 2002-07-27 Roger Sayle <roger@eyesopen.com>
6774
6775 * decl.c (builtin_function_1): No need to explicitly mark
6776 BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
6777
6778 2002-07-27 Roger Sayle <roger@eyesopen.com>
6779
6780 * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
6781
6782 2002-07-26 Jason Merrill <jason@redhat.com>
6783
6784 * call.c (build_over_call): Likewise.
6785 (cp_convert_parm_for_inlining): New fn.
6786 (convert_for_arg_passing): New fn.
6787 (convert_default_arg, build_over_call): Use it.
6788 (type_passed_as): New fn.
6789 * pt.c (tsubst_decl): Use it.
6790 * decl2.c (cp_build_parm_decl): New fn.
6791 (build_artificial_parm): Use it.
6792 (start_static_storage_duration_function): Likewise.
6793 * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
6794 (grokparms): Don't mess with DECL_ARG_TYPE.
6795 * typeck.c (convert_arguments): Use convert_for_arg_passing.
6796 * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
6797 Define.
6798 * cp-tree.h: Declare new fns.
6799
6800 2002-07-26 Neil Booth <neil@daikokuya.co.uk>
6801
6802 * cp-tree.h (flag_operator_names): Remove.
6803 * decl2.c (flag_operator_names): Remove.
6804 (lang_f_options): Remove operator-names.
6805 * lex.c (D_OPNAME): Remove.
6806 (reswords): Remove operator names.
6807 (rid_to_yy): Remove operator names.
6808 (init_reswords): No need to handle D_OPNAME.
6809 * spew.c (read_process_identifier): There are no operator
6810 names.
6811
6812 2002-07-26 Jason Merrill <jason@redhat.com>
6813
6814 * dump.c (cp_dump_tree): Call c_dump_tree.
6815 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
6816
6817 2002-07-25 Neil Booth <neil@daikokuya.co.uk>
6818
6819 * error.c (print_whitespace): Remove.
6820 * g++spec.c (LIBUNWIND): Move.
6821 * mangle.c (mangled_position, write_signed_number): Remove.
6822
6823 2002-07-25 Neil Booth <neil@daikokuya.co.uk>
6824
6825 * decl2.c (cxx_decode_option): Similarly.
6826
6827 2002-07-25 Gabriel Dos Reis <gdr@nerim.net>
6828
6829 * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
6830 (cxx_sizeof_or_alignof_type): Take a third argument.
6831 (cxx_sizeof): Adjust definition.
6832 (cxx_alignof): Likewise.
6833 * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
6834 * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
6835 complaining.
6836 (c_sizeof_nowarn): Remove definition.
6837 (build_unary_op): Use cxx_sizeof_nowarn.
6838
6839 2002-07-24 Geoffrey Keating <geoffk@redhat.com>
6840
6841 * tree.c (cp_build_qualified_type_real): When copying
6842 pointer-to-method types, unshare the record that holds
6843 the cached pointer-to-member-function type.
6844
6845 2002-07-23 Neil Booth <neil@daikokuya.co.uk>
6846
6847 * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
6848
6849 2002-07-23 Gabriel Dos Reis <gdr@nerim.net>
6850
6851 Fix PR/7363:
6852 * typeck.c (cxx_sizeof_or_alignof_type): New function.
6853 (c_sizeof): Remove definition.
6854 (expr_sizeof): Use cxx_sizeof.
6855 * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
6856 * decl.c (finish_destructor_body): Use cxx_sizeof.
6857 * semantics.c (finish_alignof): Likewise.
6858 (finish_alignof): Use cxx_alignof.
6859 * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
6860 (cxx_sizeof_or_alignof_type): Declare.
6861 (my_friendly_assert): Move to ../c-common.h.
6862
6863 2002-07-23 Neil Booth <neil@daikokuya.co.uk>
6864
6865 * class.c, method.c, pt.c, search.c: Don't define obstack macros.
6866
6867 2002-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6868
6869 PR c++/7347, c++/7348
6870 * cp-tree.h (tsubst_flags_t): Add tf_parsing.
6871 * decl.c (make_typename_type): Use it.
6872 (make_unbound_class_template): Likewise.
6873 (lookup_name_real): Don't call type_access_control if scope is
6874 template parameter dependent.
6875 * parse.y (template_arg): Call make_unbound_class_template with
6876 tf_parsing set.
6877 (nest_name_specifier): Call make_typename_type with tf_parsing set.
6878 (typename_sub0): Likewise.
6879 (typename_sub1): Likewise.
6880 (instantiate_decl): Push class scope.
6881 * pt.c (regenerate_decl_from_template): Call pushclass and popclass
6882 for both static variable and member function template.
6883 (instantiate_decl) Call pushclass and popclass when tsubst'ing type
6884 and arguments.
6885 * search.c (type_access_control): Do type access for TEMPLATE_DECL
6886 too.
6887
6888 2002-07-20 Roger Sayle <roger@eyesopen.com>
6889
6890 * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
6891 test by using positive_option. Make whitespace consistent.
6892
6893 2002-07-20 Gabriel Dos Reis <gdr@nerim.net>
6894
6895 * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
6896 members with 'locus'. Adjust use throughout.
6897 (struct feed): Likewise.
6898 (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
6899 Adjust use.
6900 (snarf_defarg): Use error(), not error_with_file_and_line().
6901
6902 2002-07-19 Chris Demetriou <cgd@broadcom.com>
6903
6904 * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
6905 cpp_options is included.
6906
6907 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6908
6909 PR c++/2862, c++/2863
6910 * pt.c (determine_specialization): Compare the length of
6911 TYPE_ARG_TYPES. Tidy.
6912
6913 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6914
6915 PR c++/3797
6916 * decl.c (duplicate_decls): Don't propagate inlining parameters from
6917 olddecl to newdecl when newdecl is a specialization of the
6918 instantiation olddecl.
6919
6920 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6921
6922 PR c++/4802, c++/5387
6923 * decl.c (make_typename_type): Use enforce_access.
6924
6925 2002-07-17 Scott Snyder <snyder@fnal.gov>
6926
6927 PR c++/7320
6928 * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
6929
6930 2002-07-12 Mark Mitchell <mark@codesourcery.com>
6931
6932 * class.c (add_method): Correct handling of conversion operators.
6933
6934 2002-07-11 Mark Mitchell <mark@codesourcery.com>
6935
6936 PR c++/7224
6937 * class.c (add_method): Simplify.
6938
6939 2002-07-11 Jason Merrill <jason@redhat.com>
6940
6941 PR c++/7279
6942 * tree.c (cp_copy_res_decl_for_inlining): Also copy
6943 TREE_ADDRESSABLE.
6944
6945 2002-07-10 Graham Stott <graham.stott@btinternet.com>
6946
6947 * pt.c (template_parm_this_level_p, push_template_decl_real):
6948 Pass depth as int pointer.
6949
6950 2002-07-11 Tim Josling <tej@melbpc.org.au>
6951
6952 Remove front end hard coding from gengtype.c.
6953
6954 * config-lang.in (gtfiles): Add files needed for this front end.
6955
6956 2002-07-10 Mark Mitchell <mark@codesourcery.com>
6957
6958 * cp-tree.h (unqualified_name_lookup_error): Declare it.
6959 (begin_function_definition): Adjust prototype.
6960 * lex.c (unqualified_name_lookup_error): New function, split out
6961 from ...
6962 (do_identifier): ... here.
6963 * parse.y (parse_begin_function_definition): New function.
6964 (fn.def1): Use it.
6965 * semantics.c (begin_function_definition): Accept decl-specifiers
6966 and attributes as separate parameters.
6967
6968 2002-07-10 Jason Merrill <jason@redhat.com>
6969
6970 PR c++/6255
6971 * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
6972 modifying the old one.
6973
6974 2002-07-09 Mark Mitchell <mark@codesourcery.com>
6975
6976 * cp-tree.h (constructor_name_p): Declare it.
6977 (check_template_template_default_arg): Likewise.
6978 * class.c (handle_using_decl): Use constructor_name_p.
6979 * decl.c (grokdeclarator): Likewise.
6980 * decl2.c (constructor_name_p): Define it.
6981 * init.c (build_member_call): Use constructor_name_p.
6982 * parse.y (template_parm): Use check_template_template_default_arg.
6983 * pt.c (check_explicit_specialization): Use constructor_name_p.
6984 * semantics.c (check_template_template_default_arg): New function.
6985
6986 2002-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6987
6988 * pt.c (can_complete_type_without_circularity): Add static to
6989 function definition.
6990
6991 2002-07-08 Mark Mitchell <mark@codesourcery.com>
6992
6993 * cp-tree.h (have_extern_spec): Declare it
6994 * decl.c (have_extern_spec): Define it.
6995 (start_decl): Eliminate use of used_extern_spec.
6996 (start_function): Likewise.
6997 * parse.y (have_extern_spec): Remove declaration.
6998 (used_extern_spec): Likewise.
6999 (frob_specs): Eliminate use of used_extern_spec.
7000 (.hush_warning): Likewise.
7001
7002 2002-07-07 Mark Mitchell <mark@codesourcery.com>
7003
7004 * Make-lang.in (cp/parse.o): Depend on decl.h.
7005 * cp-tree.h (do_decl_instantiation): Change prototype.
7006 * parse.y: Include decl.h.
7007 (parse_decl_instantiation): New function.
7008 (explicit_instantiation): Use it.
7009 * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
7010 and DECLSPECS.
7011
7012 2002-07-07 Roger Sayle <roger@eyesopen.com>
7013
7014 * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
7015 constructor and destructor tests when passed a TEMPLATE_DECL.
7016
7017 2002-07-05 Jason Merrill <jason@redhat.com>
7018
7019 * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
7020 pointers.
7021
7022 PR optimization/7145
7023 * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
7024
7025 2002-07-05 Nathan Sidwell <nathan@codesourcery.com>
7026
7027 Repair damage on weak-impared targets caused by my previous patch.
7028 * cp-tree.h (import_export_tinfo): Add parameter.
7029 * decl2.c (import_export_tinfo): Add parameter, post adjust
7030 DECL_COMDAT.
7031 * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
7032 import_export_tinfo.
7033
7034 2002-07-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7035
7036 PR c++/6944
7037 * init.c (build_aggr_init): Remove qualifiers of init before calling
7038 build_vec_init.
7039 (build_vec_init): Flatten multi-dimensional array during cleanup.
7040 (build_vec_delete_1): Abort if the type of each element is array.
7041
7042 2002-07-03 Graham Stott <graham.stott@btinternet.com>
7043
7044 * pt.c (instantiate_class_template): Fix typo.
7045
7046 2002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7047
7048 * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
7049 by CVS conflict in my last patch.
7050
7051 2002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7052
7053 PR c++/6716
7054 * pt.c (can_complete_type_without_circularity): New function.
7055 (instantiate_class_template): Use it.
7056 * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
7057 message due to incomplete fields.
7058
7059 2002-07-01 Mark Mitchell <mark@codesourcery.com>
7060
7061 PR c++/7112
7062 * mangle.c (write_expression): Add mangling for sizeof when
7063 applied to a type.
7064 * operators.def: Remove stale comment.
7065
7066 2002-06-30 Nathan Sidwell <nathan@codesourcery.com>
7067
7068 * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
7069 (CPTI_TYPE_INFO_PTR_TYPE): ... this.
7070 (tinfo_decl_type): Replace with ...
7071 (type_info_ptr_type): ... this.
7072 (import_export_tinfo): Declare.
7073 (tinfo_decl_p): Rename to ...
7074 (unemitted_tinfo_decl_p): ... this.
7075 * decl2.c (import_export_decl): Break out tinfo handling into ...
7076 (import_export_tinfo): ... here. New function.
7077 (finish_file): Adjust.
7078 * rtti.c (TINFO_REAL_NAME): New macro.
7079 (init_rtti_processing): Create the tinfo types.
7080 (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
7081 (get_tinfo_decl): Adjust.
7082 (get_tinfo_ptr): New function.
7083 (get_type_id): Use it.
7084 (tinfo_base_init): Create vtable decl here, if it doesn't exist.
7085 (ptr_initializer): Use get_tinfo_ptr.
7086 (ptm_initializer): Likewise.
7087 (synthesize_tinfo_var): Break into ...
7088 (get_pseudo_ti_init): ... this. Just create the initializer.
7089 (get_pseudo_ti_desc): .. and this.
7090 (create_real_tinfo_var): Remove.
7091 (create_pseudo_type_info): Don't create the vtable decl here.
7092 (get_vmi_pseudo_type_info): Remove.
7093 (create_tinfo_types): Adjust.
7094 (tinfo_decl_p): Rename to ...
7095 (unemitted_tinfo_decl_p): ... here. Adjust.
7096 (emit_tinfo_decl): Adjust. Create the initializer.
7097
7098 2002-06-27 Mark Mitchell <mark@codesourcery.com>
7099
7100 PR c++/6695
7101 * pt.c (tsubst_friend_class): Substitute into the context of the
7102 friend before using it.
7103
7104 2002-06-26 Mark Mitchell <mark@codesourcery.com>
7105
7106 * cp-tree.h (xref_tag): Change prototype.
7107 (handle_class_head): Likewise.
7108 (build_x_component_ref): Likewise.
7109 * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
7110 (xref_tag): Take attributes as a separate parameter.
7111 (xref_tag_from_type): Adjust call to xref_tag.
7112 * decl2.c (build_expr_from_tree): Adjust call to
7113 build_x_component_ref.
7114 (handle_class_head): Take attributes as a separate parameter.
7115 * parse.y (parse_xref_tag): New function.
7116 (parse_handle_class_head): Likewise.
7117 (primary): Use parse_xref_tag.
7118 (class_head_decl): Use parse_handle_class_head.
7119 (class_head_defn): Likewise.
7120 * rtti.c (init_rtti_processing): Adjust call to xref_tag.
7121 (build_dynamic_cast_1): Likewise.
7122 (create_pseudo_type_info): Likewise.
7123 (emit_support_tinfos): Likewise.
7124 * typeck.c (build_object_ref): Adjust call to
7125 build_x_component_ref.
7126 (build_x_component_ref): Remove protect parameter.
7127
7128 2002-06-25 Mark Mitchell <mark@codesourcery.com>
7129
7130 * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
7131 * class.c (handle_using_decl): Likewise.
7132 (instantiate_type): Likewise.
7133 * cp-tree.h (BASELINK_FUNCTIONS): New macro.
7134 (xref_basetypes): Change prototype.
7135 (begin_mem_initializers): New function.
7136 (get_overloaded_fn): Likewise.
7137 * decl.c (xref_basetypes): Simplify.
7138 * error.c (dump_expr): Use BASELINK_FUNCTIONS.
7139 * init.c (build_offset_ref): Likewise.
7140 * parse.y (base_init): Use begin_mem_initializers().
7141 (structsp): Adjust call to xref_basetypes.
7142 * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
7143 (instantiate_class_template): Adjust call to xref_basetypes.
7144 * semantics.c (begin_mem_initializers): New function.
7145 * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
7146 (really_overlaoded_fn): Likewise.
7147 (get_overloaded_fn): New function.'
7148 (get_first_fn): USe BASELINK_FUNCTIONS.
7149
7150 2002-06-24 Mark Mitchell <mark@codesourcery.com>
7151
7152 * cp-tree.h (SCALAR_TYPE_P): New macro.
7153 (check_for_out_of_scope_variable): New function.
7154 (at_class_scope_p): Likewise.
7155 (finish_fname): Likewise.
7156 * class.c (finish_struct): Use at_function_scope_p.
7157 * decl.c (check_for_out_of_scope_variable): New function, split
7158 out from do_identifier.
7159 (finish_enum): Use at_function_scope_p.
7160 * lex.c (do_identifier): Use check_for_out_of_scope_variable.
7161 * parse.y (VAR_FUNC_NAME): Give it <ttype>. Use finish_fname.
7162 (primary): Use at_function_scope_p.
7163 * search.c (at_class_scope_p): New function.
7164 * semantics.c (finish_fname): Likewise.
7165 (check_multiple_declarators): Use at_function_scope_p.
7166
7167 2002-06-23 Mark Mitchell <mark@codesourcery.com>
7168
7169 * parse.y (parse_scoped_id): New function.
7170 (primary): Use it.
7171 * cp-tree.h (do_scoped_id): Adjust declaration.
7172 * lex.c (do_scoped_id): Remove call to yylex.
7173 * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
7174 * typeck2.c (add_exception_specifier): Use tree_cons, rather than
7175 expanding it inline.
7176
7177 2002-06-23 Matt Thomas <matt@3am-software.com>
7178
7179 * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
7180 "#if VMS_TARGET".
7181
7182 2002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7183
7184 * mangle.c (integer_type_codes): Const-ify.
7185
7186 2002-06-20 Richard Henderson <rth@redhat.com>
7187
7188 PR c++/6747
7189 * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
7190 Call put_var_into_stack.
7191
7192 2002-06-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7193
7194 * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
7195 array size calculation.
7196
7197 2002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7198
7199 PR c++/6892
7200 * pt.c (tsubst_expr): Handle FILE_STMT.
7201
7202 2002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7203
7204 PR c++/6723
7205 * pt.c (lookup_template_class): Don't build complete argument of
7206 BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
7207 argument.
7208
7209 2002-06-19 Akim Demaille <akim@epita.fr>
7210
7211 * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
7212 decl.h's TYPENAME.
7213 * spew.c, lex.c: Adjust.
7214 * parse.y (explicit_instantiation): Add empty action to override
7215 the default $$ = $1 where it introduces a type clash.
7216
7217 2002-06-14 Jason Merrill <jason@redhat.com>
7218
7219 * semantics.c (begin_for_stmt): Push the 'for' scope before
7220 adding the FOR_STMT.
7221
7222 C++ ABI changes.
7223 * class.c (build_base_field): Set DECL_PACKED.
7224 (layout_class_type): Don't use tail padding of PODs.
7225 * mangle.c (write_unqualified_name): Fix template conversion op
7226 mangling.
7227
7228 2002-06-16 Richard Henderson <rth@redhat.com>
7229
7230 PR opt/6793
7231 * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
7232 after template instantiation.
7233
7234 2002-06-16 Richard Henderson <rth@redhat.com>
7235
7236 * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
7237
7238 2002-06-15 Gabriel Dos Reis <gdr@codesourcery.com>
7239
7240 * cp-tree.h (compiler_error): Remove declaration.
7241 * lex.c (compiler_error): Remove definition.
7242
7243 2002-06-14 Steve Ellcey <sje@cup.hp.com>
7244
7245 * g++spec.c (LIBUNWIND): New.
7246 (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
7247
7248 2002-06-13 Jessica Han <jessica@cup.hp.com>
7249
7250 * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
7251 (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
7252 (build_vbase_offset_vtbl_entries): Likewise.
7253 * rtti.c (build_headof): Likewise.
7254 (get_tinfo_decl_dynamic): Likewise.
7255 (create_pseudo_type_info): Likewise.
7256
7257 2002-06-12 Stan Shebs <shebs@apple.com>
7258
7259 * mpw-config.in: Remove file, no longer used.
7260 * mpw-make.sed: Ditto.
7261
7262 2002-06-07 Zack Weinberg <zack@codesourcery.com>
7263
7264 * decl2.c: Update call to cpp_handle_option.
7265
7266 2002-06-07 H.J. Lu (hjl@gnu.org)
7267
7268 * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
7269
7270 2002-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
7271
7272 * error.c (cp_error_at): Fix typo.
7273
7274 2002-06-04 Gabriel Dos Reis <gdr@codesourcery.com>
7275
7276 * error.c (cp_diagnostic_starter): Adjust call.
7277 (maybe_print_instantiation_context): Change prototype to take a
7278 'diagnostic_info *'.
7279 (print_instantiation_full_context): Likewise.
7280 (print_instantiation_partial_context): Likewise.
7281 (cp_diagnostic_starter): Likewise.
7282 (cp_diagnostic_finalizer): Likewise.
7283 (cp_print_error_function): Likewise.
7284 (cp_printer): Take a secondary parameter as a 'text_info *'.
7285 Remove output_state savings. Adjust calls.
7286
7287 2002-06-03 Geoffrey Keating <geoffk@redhat.com>
7288
7289 * pt.c (inline_parm_levels): Mark for GC.
7290
7291 * mangle.c (start_mangling): Allocate G.substitutions here...
7292 (init_mangle): ... rather than here.
7293 (finish_mangling): Clear the varray pointer when done with it.
7294 * spew.c (yylexstring): Don't use VARRAY_FREE.
7295 * search.c (bfs_walk): Don't use VARRAY_FREE.
7296 * decl2.c (pending_statics): Use gengtype to mark.
7297 (deferred_fns): Likewise.
7298 (ssdf_decls): Likewise.
7299 (init_decl2): Delete.
7300 * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
7301 (cxx_init_decl_processing): Don't call init_decl2.
7302 (cxx_pop_function_context): Don't use VARRAY_FREE.
7303 * cp-tree.h (struct saved_scope): No need for special marking
7304 of varrays.
7305 (struct language_function): Likewise.
7306 (local_classes): Use gengtype to mark.
7307 (init_decl2): Delete prototype.
7308 * class.c (init_class_processing): Don't use
7309 ggc_add_tree_varray_root.
7310 (build_vtbl_initializer): Don't use VARRAY_FREE.
7311
7312 * decl.c (typename_compare): Don't use same_type_p.
7313
7314 * decl.c: Include hashtab.h instead of hash.h.
7315 (typename_hash): Update to use htab_h.
7316 (typename_compare): Likewise.
7317 (typename_htab): Use gengtype to mark.
7318 (build_typename_type): Update to use htab_h.
7319 * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
7320
7321 * Make-lang.in (gt-cp-tree.h): New rule.
7322 (cp/tree.o): Depend on gt-cp-tree.h.
7323 * config-lang.in (gtfiles): Add cp/tree.c.
7324 * tree.c: Include gt-cp-tree.h.
7325 (list_hash_table): Use gengtype to mark.
7326 (init_tree): Use gengtype to mark trees.
7327
7328 * Make-lang.in (cp/decl.o): Add debug.h dependency.
7329 * call.c (struct z_candidate): Use gengtype.
7330 (USER_CONV_CAND): Use WRAPPER_ZC.
7331 (convert_class_to_reference): Use build_zc_wrapper.
7332 (build_type_conversion_1): Likewise.
7333 (build_over_call): Use WRAPPER_ZC.
7334 (add_warning): Use build_zc_wrapper.
7335 * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
7336 * cp-tree.h (struct lang_identifier): Use gengtype.
7337 (struct template_parm_index_s): Likewise.
7338 (struct ptrmem_cst): Likewise.
7339 (struct tree_binding): Likewise.
7340 (struct tree_overload): Likewise.
7341 (struct tree_srcloc): Likewise.
7342 (struct tree_wrapper): Likewise. Also modify to have a pointer
7343 to struct z_candidate rather than void.
7344 (enum cp_tree_node_structure_enum): New.
7345 (union lang_tree_node): New.
7346 (cxx_mark_tree): Delete prototype.
7347 (cp_tree_node_structure): New prototype.
7348 (build_ptr_wrapper): Delete prototype.
7349 (build_int_wrapper): Delete prototype.
7350 (build_zc_wrapper): New prototype.
7351 * decl.c: Include debug.h
7352 (cxx_mark_tree): Delete.
7353 (cp_tree_node_structure): New.
7354 * tree.c (build_ptr_wrapper): Delete.
7355 (build_int_wrapper): Delete.
7356 (build_zc_wrapper): New.
7357
7358 * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
7359 Correct typo. Patch from k_fukui@highway.ne.jp.
7360
7361 * semantics.c (current_stmt_tree): Update for change to
7362 struct language_function.
7363 (finish_mem_initializers): Likewise.
7364 * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
7365 * cp-tree.h (struct language_function): Rename from
7366 cp_language_function. Change all uses.
7367 (cp_function_chain): Don't need to cast.
7368
7369 * class.c (duplicate_tag_error): Reset discriminator.
7370 (check_bases_and_members): Update for data structure changes.
7371 * cp-tree.h (struct lang_id2): Use gengtype.
7372 (flagged_type_tree): Likewise.
7373 (SET_LANG_ID): Use GGC on struct lang_id2.
7374 (struct cp_language_function): Use gengtype. Remove field
7375 'x_vcalls_possible_p'.
7376 (current_vcalls_possible_p): Delete.
7377 (struct lang_type_header): New.
7378 (struct lang_type_class): Rename from struct lang_type. Include
7379 struct lang_type_header.
7380 (struct lang_type_ptrmem): New.
7381 (struct lang_type): New.
7382 (LANG_TYPE_CLASS_CHECK): New. Use it in all the appropriate macros.
7383 (LANG_TYPE_PTRMEM_CHECK): New. Use it in all the appropriate macros.
7384 (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
7385 (struct lang_decl_flags): Use gengtype. Add discriminators.
7386 (struct lang_decl): Use gengtype. Add and use discriminators.
7387 Update the macros that reference moved fields.
7388 (LANG_DECL_U2_CHECK): New function. Use it when appropriate.
7389 (SET_DECL_THUNK_P): Set discriminator too.
7390 (clear_inline_text_obstack): Delete prototype.
7391 (finish_inline_definitions): Delete prototype.
7392 (mark_pending_inlines): Delete prototype.
7393 (lang_check_failed): New prototype.
7394 * decl.c (struct named_label_use_list): Use gengtype.
7395 (struct named_label_list): Likewise.
7396 (mark_binding_level): Delete.
7397 (mark_named_label_lists): Delete.
7398 (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
7399 (cxx_init_decl_processing): Use generated marker routine.
7400 (begin_destructor_body): Delete dead set to
7401 current_vcalls_possible_p.
7402 (mark_lang_function): Delete.
7403 (mark_cp_function_context): Delete.
7404 (lang_mark_tree): Use generated marker routines.
7405 * decl2.c (start_objects): Set discriminator when setting
7406 GLOBAL_INIT_PRIORITY.
7407 * lex.c (retrofit_lang_decl): Set discriminators.
7408 (copy_lang_type): Update for changes to lang_type structure.
7409 (cp_make_lang_type): Set discriminator.
7410 * parse.y: Use gengtype on YYLVAL. Don't use dots in identifiers.
7411 * search.c: Include ggc.h.
7412 * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
7413 (finish_inline_definitions): Delete.
7414 * spew.c (struct token): Use gengtype.
7415 (struct token_chunk): New.
7416 (struct unparsed_text): Use gengtype. Store tokens in chunks.
7417 (struct feed): Use gengtype.
7418 (feed_obstack): Delete.
7419 (feed): Mark as GC root.
7420 (pending_inlines): Mark as GC root.
7421 (pending_inlines_tail): Likewise.
7422 (processing_these_inlines): Likewise.
7423 (token_obstack): Make static.
7424 (first_token): Likewise.
7425 (init_spew): Don't initialize deleted things; use gengtype for roots.
7426 (clear_inline_text_obstack): Delete.
7427 (feed_input): Use GC for struct feed. Update for changes to
7428 struct unparsed_text.
7429 (mark_pending_inlines): Delete.
7430 (next_token): Rename from add_token. Change all callers. Update
7431 for changes to struct unparsed_text.
7432 (space_for_token): New.
7433 (remove_last_token): New.
7434 (alloc_unparsed_text): New.
7435 (snarf_block): Take an unparsed_text. Update for changes to struct
7436 unparsed_text.
7437 (snarf_method): Update for changes to struct unparsed_text.
7438 (snarf_defarg): Update for changes to struct unparsed_text.
7439 * tree.c (lang_check_failed): New.
7440
7441 * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
7442 gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
7443 (cp/spew.o): Add dependency on gt-<filename>.h.
7444 (cp/decl2.o): Add dependency on gt-<filename>.h.
7445 (cp/call.o): Add dependency on gt-<filename>.h.
7446 (cp/pt.o): Add dependency on gt-<filename>.h.
7447 (cp/repo.o): Add dependency on gt-<filename>.h.
7448 (cp/parse.o): Add dependency on gt-<filename>.h.
7449 * call.c: Use gengtype for roots.
7450 * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
7451 decl2.c parse.y pt.c repo.c spew.c.
7452 * cp-tree.h: Use gengtype for roots.
7453 (struct saved_scope): Use GGC, gengtype.
7454 (cp_parse_init): Delete prototype.
7455 (init_pt): Delete prototype.
7456 * decl.c: Use gengtype for roots.
7457 (mark_saved_scope): Delete.
7458 (cxx_init_decl_processing): Don't call deleted initilisation
7459 routines.
7460 (signed_size_zero_node): Delete, unused.
7461 * decl.h: Use gengtype for roots.
7462 * decl2.c: Use gengtype for roots.
7463 * lex.h: Use gengtype for roots.
7464 * parse.y: Use gengtype for roots.
7465 (cp_parse_init): Delete.
7466 * pt.c: Use gengtype for roots.
7467 (init_pt): Delete.
7468 * repo.c: Use gengtype for roots.
7469 * spew.c: Use gengtype for roots.
7470
7471 * Make-lang.in: Allow for filename changes. Add gtype-cp.h.
7472 (cp/decl.o): Add dependency on gtype-cp.h.
7473 * decl.c: Remove use of add_deletable_root, use GTY marker instead.
7474 Include gtype-cp.h. Allow for filename changes.
7475
7476 * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
7477 (cp/decl.o): Add cp/gt-decl.h dependency.
7478 * config-lang.in (gtfiles): New.
7479 * tree.h: Rename struct binding_level to struct cp_binding_level.
7480 * decl.c: Rename struct binding_level to struct cp_binding_level.
7481 Include cp/gt-decl.h.
7482 (struct cp_binding_level): Use gengtype.
7483 (make_binding_level): Use GGC on struct cp_binding_level.
7484 (mark_binding_level): Use gt_ggc_m_cp_binding_level.
7485 (cxx_init_decl_processing): Mark free_binding_level as
7486 deletable.
7487
7488 * decl.c (mark_cp_function_context): Update calling sequence.
7489
7490 * decl.c (start_function): Don't free 'struct
7491 cp_language_function'.
7492 (pop_cp_function_context): Likewise.
7493 (save_function_data): Allocate it using GC.
7494 * semantics.c (genrtl_start_function): Don't free 'struct
7495 cp_language_function'.
7496
7497 2002-05-31 Matthew Woodcraft <mattheww@chiark.greenend.org.uk>
7498
7499 * lang-specs.h: Use cpp_debug_options.
7500
7501 2002-05-28 Zack Weinberg <zack@codesourcery.com>
7502
7503 * mangle.c, tree.c: Include real.h.
7504 * Make-lang.in: Update dependency lists.
7505
7506 2002-05-25 Neil Booth <neil@daikokuya.demon.co.uk>
7507
7508 * lex.c: Don't include c-lex.h.
7509 * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
7510
7511 2002-05-23 Neil Booth <neil@daikokuya.demon.co.uk>
7512
7513 * spew.c (yyungetc, snarf_block): Remove indent_level handling.
7514
7515 2002-05-22 Richard Henderson <rth@redhat.com>
7516
7517 * decl.c (obscure_complex_init): Check for VAR_DECL
7518 before using DECL_THREAD_LOCAL.
7519
7520 2002-05-22 Richard Henderson <rth@redhat.com>
7521
7522 * decl.c (check_tag_decl): Handle RID_THREAD.
7523 (obscure_complex_init): Reject run-time init of tls.
7524 (grokvardecl, grokdeclarator): Handle RID_THREAD.
7525 * lex.c (reswords): Add __thread.
7526 (rid_to_yy): Map RID_THREAD to SCSPEC.
7527
7528 2002-05-22 Neil Booth <neil@daikokuya.demon.co.uk>
7529
7530 * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
7531 * cp-tree.h (cxx_post_options): Kill.
7532 * cp-lex.c (cxx_post_options): Kill.
7533
7534 2002-05-21 Richard Henderson <rth@redhat.com>
7535
7536 * lex.c (rid_to_yy): Add RID_THREAD.
7537
7538 2002-05-21 Alexandre Oliva <aoliva@redhat.com>
7539
7540 * init.c (build_vec_init): Test for trivial copy-assignment when
7541 copy-assigning arrays.
7542
7543 2002-05-20 Andreas Jaeger <aj@suse.de>
7544
7545 * init.c (build_default_init): Remove unused variable.
7546
7547 2002-05-20 Alexandre Oliva <aoliva@redhat.com>
7548
7549 * call.c (any_strictly_viable): New.
7550 (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
7551
7552 2002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7553
7554 * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
7555
7556 2002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7557
7558 PR c++/186, DR 259
7559 * pt.c (do_decl_instantiation): Don't complain explicit
7560 instantiation after explicit specialization.
7561 (do_type_instantiation): Likewise.
7562
7563 2002-05-19 Alexandre Oliva <aoliva@redhat.com>
7564
7565 * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
7566 renamed from...
7567 (complete_type_or_else): ... this. Redefined as macro.
7568 (cxx_incomplete_type_diagnostic): Declare.
7569 (cxx_incomplete_type_error): Define as macro.
7570 * init.c (build_delete): Warn about incomplete types other than
7571 void, and use the built-in operator delete for them.
7572 * typeck.c (complete_type_or_diagnostic): Renamed from
7573 complete_type_or_else. Added warn_only argument, passed to...
7574 * typeck2.c (cxx_incomplete_type_diagnostic): ... this. Print
7575 warnings or errors depending on new warn_only argument. Renamed
7576 from...
7577 (cxx_incomplete_type_error): ... this. New implementation in
7578 terms of cxx_incomplete_type_diagnostic.
7579
7580 2002-05-18 Jason Merrill <jason@redhat.com>
7581
7582 PR c++/6611
7583 * decl2.c (import_export_decl): If we clear
7584 DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
7585
7586 2002-05-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7587
7588 PR c++/6620
7589 * pt.c (verify_class_unification): Don't check if PARM is template
7590 parameter dependent. Simplify.
7591 (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
7592 parameter dependent expression.
7593
7594 2002-05-14 Jason Merrill <jason@redhat.com>
7595
7596 * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
7597 Do set DECL_COMDAT.
7598 (synthesize_tinfo_var): Take the public decl.
7599 (create_real_tinfo_var): Likewise. Check DECL_COMDAT.
7600 (emit_tinfo_decl): Adjust. Call import_export_decl.
7601 * decl2.c (import_export_decl): Simplify tinfo decl handling.
7602
7603 2002-05-14 Alexandre Oliva <aoliva@redhat.com>
7604
7605 * cp-tree.h (struct lang_type): Added non_zero_init.
7606 (CLASSTYPE_NON_ZERO_INIT_P): New macro.
7607 (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
7608 * class.c (check_field_decls): Test non_zero_init.
7609 * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
7610 zero-to-NULL conversions.
7611 * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
7612 type that needs zero-initialization without zeros.
7613 (check_initializer_decl): Compute zero-initializer for types
7614 that require a non-trivial one.
7615 * init.c (build_forced_zero_init): New function.
7616 (build_default_init): Use it.
7617 * tree.c (zero_init_p): New function.
7618 * typeck2.c (force_store_init_value): New function.
7619 (process_init_constructor): Create non-trivial zero-initializers
7620 for array members and class fields.
7621
7622 2002-05-14 Neil Booth <neil@daikokuya.demon.co.uk>
7623
7624 * lang-specs.h: Remove redundant -lang-c++.
7625
7626 2002-05-13 Jason Merrill <jason@redhat.com>
7627
7628 * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
7629 (fixed_type_or_null): See through reference vars.
7630 (build_base_path): Vtable contents are constant.
7631 * typeck.c (get_member_function_from_ptrfunc): Likewise.
7632
7633 2002-05-12 Jason Merrill <jason@redhat.com>
7634
7635 * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
7636 structs are safe.
7637
7638 2002-05-09 Neil Booth <neil@daikokuya.demon.co.uk>
7639
7640 * cp-tree.h (flag_ansi): Remove.
7641 * decl2.c (flag_ansi): Remove.
7642 (cxx_decode_option): Set flag_iso and flag_undef.
7643
7644 2002-05-09 Jason Merrill <jason@redhat.com>
7645
7646 * typeck.c (get_member_function_from_ptrfunc): Reorganize.
7647 Use subtraction rather than a bitmask to get the index.
7648 * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
7649
7650 * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
7651
7652 2002-05-07 Neil Booth <neil@daikokuya.demon.co.uk>
7653
7654 * Make-lang.in (decl2.o): Update.
7655 * cp-tree.h (warn_multichar): Remove.
7656 * decl2.c: Include c-common.h.
7657 (warn_multichar): Remove.
7658
7659 2002-05-03 Jason Merrill <jason@redhat.com>
7660
7661 * tree.c (build_cplus_array_type): Only const and volatile get
7662 special handling.
7663
7664 * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
7665
7666 2002-04-30 Mark Mitchell <mark@codesourcery.com>
7667
7668 ABI change, returning simple classes from functions.
7669 * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
7670 TYPE_HAS_TRIVIAL_INIT_REF is false or
7671 TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
7672
7673 2002-04-30 Jason Merrill <jason@redhat.com>
7674
7675 PR debug/6436
7676 * decl.c (grokdeclarator): Don't override TYPE_NAME of an
7677 anonymous class with a typedef if there are attributes.
7678
7679 2002-04-29 Paul Eggert <eggert@twinsun.com>
7680
7681 * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
7682
7683 2002-04-29 Jakub Jelinek <jakub@redhat.com>
7684
7685 PR c++/6477
7686 * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
7687 non-NULL first.
7688
7689 2002-04-29 Mark Mitchell <mark@codesourcery.com>
7690
7691 PR c++/6492
7692 * pt.c (tsubst_friend_class): If the friend has an explicit scope,
7693 enter that scope before name lookup.
7694
7695 PR c++/6486
7696 * method.c (do_build_copy_constructor): Avoid building
7697 cv-qualified reference types.
7698
7699 2002-04-29 Nathan Sidwell <nathan@codesourcery.com>
7700
7701 PR c++/5719
7702 * decl.c (grok_op_properties): Assignment ops don't have to return
7703 by value. operator% should.
7704
7705 2002-04-28 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
7706
7707 PR c/6343
7708 * decl.c (duplicate_decls): Call merge_weak.
7709
7710 2002-04-26 Richard Henderson <rth@redhat.com>
7711
7712 * parse.y (malloced_yyss, malloced_yyvs): New.
7713 (yyoverflow): Re-add. Set them.
7714 (free_parser_stacks): New.
7715
7716 2002-04-26 Mark Mitchell <mark@codesourcery.com>
7717
7718 PR c++/6497
7719 * method.c (do_build_assign_ref): Pass a derivation to
7720 build_method_call when calling base class assignment operators.
7721
7722 2002-04-26 Richard Henderson <rth@redhat.com>
7723
7724 * parse.y (yyoverflow): Revert.
7725
7726 2002-04-26 Richard Henderson <rth@redhat.com>
7727
7728 PR c/3581
7729 * parse.y (string): Remove. Update all uses to use STRING
7730 instead, and not call combine_strings.
7731 * rtti.c (tinfo_name): Use fix_string_type.
7732 * semantics.c (finish_asm_stmt): Don't call combine_strings.
7733 * spew.c (yylexstring): New.
7734 (read_token): Use it.
7735
7736 2002-04-25 Richard Henderson <rth@redhat.com>
7737
7738 PR c/2161
7739 * parse.y (yyoverflow): New.
7740
7741 2002-04-25 Jason Merrill <jason@redhat.com>
7742
7743 PR c++/5607
7744 * search.c (check_final_overrider): No longer static.
7745 * class.c (update_vtable_entry_for_fn): Call it.
7746 * cp-tree.h: Adjust.
7747
7748 2002-04-25 Neil Booth <neil@daikokuya.demon.co.uk>
7749
7750 * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
7751 * cp-tree.h (cxx_set_yydebug): Die.
7752 * lex.c (YYDEBUG): Get from c-lex.h.
7753 (cxx_set_yydebug): Remove.
7754 * parse.y: Include c-lex.h.
7755 (YYDEBUG): Get from c-lex.h.
7756
7757 2002-04-24 Mark Mitchell <mark@codesourcery.com>
7758
7759 PR c++/6438.
7760 * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
7761 void.
7762
7763 2002-04-24 Neil Booth <neil@daikokuya.demon.co.uk>
7764
7765 * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
7766 LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
7767 Redefine.
7768 * cp-tree.h (cp_attribute_table): Rename.
7769 * decl.c (lang_attribute_table): Remove declaration.
7770 (cxx_init_decl_processing): Don't set it.
7771 * tree.c (cp_attribute_table): Rename.
7772
7773 2002-04-24 Jason Merrill <jason@redhat.com>
7774
7775 PR c++/6331
7776 * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
7777 * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
7778 The pedwarn for array assignment is now unconditional.
7779 * tree.c (build_cplus_array_type_1): Still process simple array types
7780 normally in templates.
7781
7782 PR c++/6395
7783 * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
7784 stuff for comdats.
7785
7786 2002-04-23 Jakub Jelinek <jakub@redhat.com>
7787
7788 * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
7789 node with attributes.
7790
7791 2002-2-23 David O'Brien <obrien@FreeBSD.org>
7792
7793 * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
7794 Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
7795
7796 2002-04-23 Mark Mitchell <mark@codesourcery.com>
7797
7798 PR c++/6256:
7799 * pt.c (tsubst_friend_class): Handle templates with explicit
7800 nested names.
7801
7802 PR c++/6331:
7803 * typeck.c (merge_types): Remember the cv-qualification of pointer
7804 types when merging them.
7805
7806 2002-04-20 Neil Booth <neil@daikokuya.demon.co.uk>
7807
7808 * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
7809 LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
7810 * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
7811 cxx_mark_function_context): New.
7812 * decl.c (push_cp_function_context, pop_cp_function_context,
7813 mark_cp_function_context): Rename for consistency.
7814 (cxx_init_decl_processing): Don't set old hooks.
7815
7816 2002-04-19 Neil Booth <neil@daikokuya.demon.co.uk>
7817
7818 * call.c (convert_type_from_ellipsis): Rename, update.
7819 * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
7820 * cp-tree.h (convert_type_from_ellipsis): Rename.
7821 * decl.c (cxx_init_decl_processing): Don't set hook.
7822
7823 2002-04-18 Neil Booth <neil@daikokuya.demon.co.uk>
7824
7825 * call.c (build_new_method_call): Update.
7826 * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
7827 * cp-tree.h (cxx_incomplete_type_error): New.
7828 * decl.c (grokdeclarator, grokparms): Update.
7829 * decl2.c (check_classfn): Update.
7830 * pt.c (tsubst): Update.
7831 * typeck.c (complete_type_or_else, expr_sizeof,
7832 decay_conversion): Update.
7833 * typeck2.c (incomplete_type_error): Rename.
7834 (add_exception_specifier): Update.
7835
7836 2002-04-18 Jason Merrill <jason@redhat.com>
7837
7838 PR c++/5658
7839 * search.c (setup_class_bindings): A class template qualifies as a
7840 type binding.
7841
7842 2002-04-17 Jakub Jelinek <jakub@redhat.com>
7843
7844 PR c++/6316
7845 * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
7846 before expanding.
7847
7848 2002-04-16 Mark Mitchell <mark@codesourcery.com>
7849
7850 * init.c (begin_init_stmts): Remove commented out code.
7851 (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
7852 * semantics.c (begin_gobal_stmt_expr): Adjust call to
7853 expand_start_stmt_expr.
7854
7855 2002-04-15 Mark Mitchell <mark@codesourcery.com>
7856
7857 * decl.c (register_dtor_fn): Pass the address of dso_handle, not
7858 dso_handle itself, to __cxa_atexit.
7859
7860 2002-04-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
7861
7862 * error.c (cxx_print_error_function): Adjust call to macros.
7863
7864 2002-04-14 Jakub Jelinek <jakub@redhat.com>
7865
7866 * class.c (layout_virtual_bases): Do all dsize computation on trees.
7867
7868 2002-04-14 Jason Merrill <jason@redhat.com>
7869
7870 * typeck.c (get_member_function_from_ptrfunc): Don't do
7871 gratuitious division and multiplication on
7872 ptrmemfunc_vbit_in_delta targets.
7873
7874 2002-04-12 Mark Mitchell <mark@codesourcery.com>
7875
7876 PR c++/5373.
7877 * semantics.c (finish_expr_stmt): Remember the type of the
7878 expression before any conversions are performed.
7879
7880 2002-04-12 Mark Mitchell <mark@codesourcery.com>
7881
7882 PR c++/5189.
7883 * call.c (add_template_candidate_real): Do not treat member
7884 templates as copy constructors.
7885
7886 2002-04-12 Mark Mitchell <mark@codesourcery.com>
7887
7888 * decl.c (duplicate_decls): Do not copy the RTL for a variable
7889 declaration if the old variable had an incomplete type and the new
7890 variable does not.
7891 (complete_vars): Do not call layout_decl for completed variables.
7892
7893 2002-04-12 Richard Sandiford <rsandifo@redhat.com>
7894
7895 * decl.c (duplicate_decls): Don't try to unify an implicit typedef
7896 with an explicit one.
7897 (follow_tag_typedef): New.
7898 (lookup_tag): Use it to extract the tag of an explicit typedef.
7899 (xref_tag): Likewise.
7900
7901 2002-04-11 Andrew Haley <aph@redhat.com>
7902
7903 * typeck.c (type_after_usual_arithmetic_conversions):
7904 If two types have the same variant, return immediately.
7905 When two floating-point operands are the same precision:
7906 convert to float if one of the operands is float;
7907 if neither operand is one of the standard types, return the type
7908 of the first operand.
7909
7910 2002-04-10 Nathan Sidwell <nathan@codesourcery.com>
7911
7912 PR c++/5507
7913 * decl.c (make_typename_type): Remove implicit typenameness.
7914
7915 2002-04-09 Jason Merrill <jason@redhat.com>
7916
7917 PR optimization/6189
7918 * semantics.c (genrtl_start_function): Don't free
7919 DECL_SAVED_FUNCTION_DATA for inline functions.
7920
7921 * init.c (build_member_call): For now, don't convert to
7922 intermediate base if it would cause an error.
7923
7924 2002-04-08 Paolo Carlini <pcarlini@unitus.it>
7925
7926 * parse.y (namespace_qualifier, maybe_identifier,
7927 begin_explicit_instantiation, end_explicit_instantiation,
7928 apparent_template_type, .finish_template_type,
7929 do_id, maybe_init, defarg_again, component_decl_1):
7930 Add ending ';', in accordance with POSIX.
7931
7932 2002-04-06 Mark Mitchell <mark@codesourcery.com>
7933
7934 PR c++/5571
7935 * class.c (layout_class_type): Remember incomplete static
7936 variables.
7937 (finish_struct_1): Call complete_vars, not
7938 hack_incomplete_structures.
7939 * cp-tree.h (hack_incomplete_structures): Rename to ...
7940 (complete_vars): ... this.
7941 (struct saved_scope): Remove incomplete.
7942 (namespace_scope_incomplete): Remove.
7943 * decl.c (struct binding_level): Remove incomplete.
7944 (incomplete_vars): New variable.
7945 (mark_binding_level): Don't mark incomplete.
7946 (print_binding_level): Don't print it.
7947 (mark_saved_scope): Don't mark incomplete.
7948 (pushdecl): Use maybe_register_incopmlete_var.
7949 (cxx_init_decl_processing): Register incomplete_vars for GC.
7950 (start_decl_1): Clarify error message.
7951 (hack_incomplete_vars): Remove.
7952 (maybe_register_incomplete_var): New function.
7953 (complete_vars): Likewise.
7954
7955 2002-04-06 Jason Merrill <jason@redhat.com>
7956
7957 PR c++/4934
7958 * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
7959 set before checking it.
7960
7961 PR c++/525
7962 * init.c (build_member_call): Use build_scoped_ref.
7963 (resolve_offset_ref): Likewise.
7964 * call.c (build_scoped_method_call): Likewise.
7965 * tree.c (maybe_dummy_object): Kludge around current_class_type being
7966 wrong.
7967 * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
7968 * cp-tree.h: Adjust.
7969
7970 * init.c (push_base_cleanups): Just use build_scoped_method_call.
7971
7972 PR c++/6179
7973 * method.c (implicitly_declare_fn): Pass unqualified type to
7974 synthesize_exception_spec.
7975
7976 2002-04-04 Neil Booth <neil@daikokuya.demon.co.uk>
7977
7978 * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
7979 * cvt.c: Update comment.
7980 * init.c (expand_cleanup_for_base): Update.
7981 * semantics.c (finish_parenthesized_expr): Update.
7982 * typeck.c (cp_truthvalue_conversion): Update.
7983
7984 2002-04-04 Jason Merrill <jason@redhat.com>
7985
7986 * semantics.c (finish_eh_cleanup): New fn.
7987 * cp-tree.h: Add prototype.
7988 * init.c (perform_member_init, expand_cleanup_for_base): Use
7989 finish_eh_cleanup.
7990 * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
7991 * cp-tree.h: Remove references.
7992 * decl.c (begin_constructor_body, end_constructor_body): Likewise.
7993 * dump.c (cp_dump_tree): Likewise.
7994 * pt.c (tsubst_expr): Likewise.
7995 * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
7996 (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
7997 * tree.c (cp_statement_code_p): Likewise.
7998
7999 * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
8000
8001 PR c++/5636
8002 * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
8003 cleanup for nrv.
8004
8005 PR c++/5104
8006 * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
8007 specifiers.
8008 [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
8009
8010 2002-04-03 Richard Henderson <rth@redhat.com>
8011
8012 * cp-lang.c (cxx_warn_unused_global_decl): New.
8013 (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
8014
8015 2002-04-03 Neil Booth <neil@daikokuya.demon.co.uk>
8016
8017 * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
8018 * tree.c (init_tree): Don't set hook.
8019
8020 2002-04-03 Roger Sayle <roger@eyesopen.com>
8021
8022 PR c++/5998:
8023 * decl.c (duplicate_decls): Don't mess with assembler names when
8024 redeclaring builtin functions as static.
8025
8026 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
8027
8028 * call.c (build_addr_func): Update.
8029 * class.c (resolve_address_of_overloaded_function): Update.
8030 * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
8031 * cp-tree.h (cxx_mark_addressable): New.
8032 * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
8033 * decl2.c (build_cleanup): Update.
8034 * except.c (build_throw): Update.
8035 * init.c (resolve_offset_ref): Update.
8036 * pt.c (convert_nontype_argument): Update.
8037 * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
8038 * typeck.c (decay_conversion, build_array_ref, build_unary_op,
8039 unary_complex_lvalue): Update.
8040 (mark_addressable): Rename.
8041
8042 2002-04-01 Roger Sayle <roger@eyesopen.com>
8043
8044 PR c++/5998:
8045 * decl.c (duplicate_decls): Overwrite the RTL when (and only
8046 when) overwriting a built-in function. Don't use COPY_DECL_RTL,
8047 but follow the SET_DECL_RTL idiom used elsewhere in the function.
8048
8049 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
8050
8051 * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
8052 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
8053 * decl.c (grokdeclarator): Update.
8054 * mangle.c (write_integer_cst): Update.
8055 * typeck.c (build_binary_op): Update.
8056
8057 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
8058
8059 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
8060 * lex.c (cxx_init): Don't set hook.
8061
8062 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
8063
8064 * Make-lang.in (error.o): Update.
8065 * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
8066 * cp-tree.h (struct diagnostic_context): Predeclare.
8067 (cxx_print_error_function): New.
8068 * error.c: Include langhooks-def.h.
8069 (lang_print_error_function): Rename. Update.
8070 (init_error): Don't set hook.
8071
8072 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
8073
8074 * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
8075 Redefine.
8076 * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
8077 * decl.c (finish_enum): Similarly.
8078 * error.c (dump_type): Similarly.
8079 * lex.c (cxx_init): Similarly.
8080 * mangle.c (write_builtin_type): Similarly.
8081 * typeck.c (comptypes): Similarly.
8082
8083 2002-03-28 Roger Sayle <roger@eyesopen.com>
8084
8085 PR c++/5998:
8086 * decl.c (cxx_init_decl_processing): Re-enable built-in functions
8087 in the g++ front-end.
8088 (duplicate_decl): Allow redefinition of anticipated built-ins.
8089 Fix inlining problem by over-writing the old DECL_RTL.
8090 (lookup_namespace_name): Fail to find an identifier in the
8091 specified namespace if its still anticipated.
8092 (builtin_function_1): New function split out from builtin_function
8093 to create a builtin in the current namespace with given context.
8094 (builtin_function): Call builtin_function_1 to define the
8095 appropriate builtins in both the std and global namespaces.
8096 (select_decl): Don't test for anticipated decls here.
8097 (unqualified_namespace_lookup): Instead ignore them whilst
8098 searching through scopes and namespaces.
8099 * decl2.c (do_nonmember_using_decl): If a using declaration
8100 specifies an anticipated built-in function, mark it as no longer
8101 anticipated in that scope.
8102 (ambiguous_decl): Avoid resolving to an anticipated decl.
8103 * lex.c (do_scoped_id): Fail to find an identifier in the global
8104 namespace if its still anticipated.
8105
8106 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
8107
8108 * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
8109 * cp-tree.h (cp_make_lang_type): Rename.
8110 * lex.c (cp_make_lang_type): Rename.
8111 (make_aggr_type): Update.
8112 * tree.c (init_tree): Don't set make_lang_type_fn.
8113
8114 2002-03-29 Jakub Jelinek <jakub@redhat.com>
8115
8116 PR c++/6073
8117 * class.c (finish_struct_1): Update static field's DECL_MODE even
8118 if its type is a variant of t.
8119
8120 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
8121
8122 * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
8123 * cp-tree.h (cxx_insert_default_attributes): New.
8124 * decl.c (insert_default_attributes): Rename.
8125
8126 2002-03-27 Mark Mitchell <mark@codesourcery.com>
8127
8128 PR c++/4884
8129 * call.c (build_op_delete_call): Allow for the fact the placement
8130 may be a COMPOUND_EXPR.
8131
8132 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
8133
8134 * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
8135 * cp-tree.h (init_cplus_expand): Remove.
8136 (cxx_expand_expr): New.
8137 * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
8138 fix prototype.
8139 (init_cplus_expand): Remove.
8140 * lex.c (cxx_init): Don't call init_cplus_expand.
8141
8142 2002-03-26 Mark Mitchell <mark@codesourcery.com>
8143
8144 PR c++/4884.
8145 * init.c (build_new_1): Allow for the fact the result of
8146 build_function_call may be a COMPOUND_EXPR.
8147
8148 2002-03-26 Nathan Sidwell <nathan@codesourcery.com>
8149
8150 PR c++/5682
8151 * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
8152 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
8153 (dfs_skip_nonprimary_vbases_markedp): Remove.
8154 * search.c (get_shared_vbase_if_not_primary): Remove.
8155 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
8156 (dfs_skip_nonprimary_vbases_markedp): Remove.
8157 (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
8158 (dfs_marked_real_bases_queue_p): Likewise.
8159
8160 2002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
8161
8162 * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
8163 * cp-tree.h (cxx_mark_tree): New.
8164 * decl.c (lang_mark_tree): Rename cxx_mark_tree.
8165
8166 2002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
8167
8168 * cp-tree.h (cxx_maybe_build_cleanup): New.
8169 * decl.c (destroy_local_var, hack_incomplete_structures): Update.
8170 (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
8171 * tree.c (build_target_expr): Update.
8172 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
8173
8174 2002-03-24 Neil Booth <neil@daikokuya.demon.co.uk>
8175
8176 * decl2.c (cxx_decode_option): Handle -E.
8177 * lang-specs.h (default_compilers): Preprocess with cc1plus.
8178 * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
8179
8180 2002-03-23 Jakub Jelinek <jakub@redhat.com>
8181
8182 PR c++/6037
8183 * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
8184
8185 2002-03-23 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
8186
8187 * error.c (dump_type): Be careful about implicit typenames.
8188
8189 2002-03-21 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
8190
8191 PR C++/3656
8192 * semantics.c (finish_base_specifier): Handle erronous base
8193 classes.
8194
8195 2002-03-22 Zack Weinberg <zack@codesourcery.com>
8196
8197 * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
8198 REAL_IS_NOT_DOUBLE.
8199
8200 2002-03-22 Jeff Knaggs <jknaggs@redhat.com>
8201
8202 * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
8203 an index into the vtable_entry array regardless of
8204 TARGET_PTRMEMFUNC_VBIT_LOCATION.
8205
8206 2002-03-21 Aldy Hernandez <aldyh@redhat.com>
8207
8208 * tree.c (cp_cannot_inline_tree_fn): Same.
8209
8210 2002-03-21 Neil Booth <neil@daikokuya.demon.co.uk>
8211
8212 * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
8213 insert_block, getdecls, global_bindings_p): New.
8214
8215 2002-03-20 Nathan Sidwell <nathan@codesourcery.com>
8216
8217 PR c++/4361
8218 * mangle.c (struct globals) Add internal_mangling_p member.
8219 (write_template_param): Do internal mangling, if needed.
8220 (mangle_conv_op_name_for_type): Request internal mangling.
8221
8222 2002-03-20 Jason Merrill <jason@redhat.com>
8223
8224 PR c++/2136
8225 * init.c (build_delete): Check access for a member op delete here.
8226 * decl2.c (delete_sanity): Not here.
8227
8228 2002-03-19 Jason Merrill <jason@redhat.com>
8229
8230 PR c++/5118
8231 * class.c (get_vfield_name): Use the constructor_name.
8232
8233 2002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
8234
8235 * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
8236 * cp-tree.h (lang_printable_name): Rename.
8237 * error.c (lang_decl_name): Use new hook.
8238 * lex.c (cxx_init): Remove old hook.
8239 * pt.c (tsubst_decl): Use new hook.
8240 * tree.c (lang_printable_name): Rename.
8241
8242 2002-03-18 Eric Botcazou <ebotcazou@multimania.com>
8243
8244 PR c++/3882
8245 * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
8246 (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
8247 only after recording the declaration.
8248
8249 2002-03-18 Jason Merrill <jason@redhat.com>
8250
8251 PR c++/2039
8252 * init.c (resolve_offset_ref): Hand off to build_component_ref.
8253
8254 PR c++/4222, c++/5995
8255 * call.c (build_over_call): Fix empty class logic.
8256
8257 PR c++/3870
8258 * cp-tree.h (struct saved_scope): Add last_parms field.
8259 * decl.c (maybe_push_to_top_level): Save last_function_parms.
8260 (pop_from_top_level): Restore it.
8261
8262 PR c++/4377
8263 * mangle.c (write_expression): Strip NOP_EXPRs sooner. Also strip
8264 NON_LVALUE_EXPRs.
8265
8266 PR c++/4003
8267 * pt.c (tsubst_friend_function): Use decl_namespace_context.
8268
8269 PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
8270 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
8271 type with a nontrivial destructor.
8272
8273 2002-03-17 Jason Merrill <jason@redhat.com>
8274
8275 PR c++/4460
8276 * class.c (build_base_path): Virtual base layout is fixed in
8277 in-charge [cd]tors.
8278
8279 2002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
8280
8281 * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
8282 * parse.y (yyparse): Remove macro.
8283
8284 2002-03-17 Jason Merrill <jason@redhat.com>
8285
8286 PR c++/5757
8287 * init.c (build_new_1): Pass the right pointer to op delete.
8288
8289 2002-03-16 Nathan Sidwell <nathan@codesourcery.com>
8290
8291 PR c++/4361
8292 * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
8293 conversion operators go.
8294 (struct lang_decl_flags): Add template_conv_p and unused
8295 bitfields.
8296 (DECL_TEMPLATE_CONV_FN_P): New macro.
8297 * call.c (build_user_type_conversion_1): Don't check second type
8298 conversion of overload set first.
8299 * class.c (add_method): Make sure templated conversion operators
8300 all end up on slot 2.
8301 * lex.c (do_identifier): A conversion operator token might be
8302 satisfied by a templated conversion operator.
8303 * pt.c (check_explicit_specialization): Use
8304 CLASSTYPE_FIRST_CONVERSION_SLOT.
8305 (template_parm_this_level_p): New function.
8306 (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
8307 * search.c (lookup_fnfields_1): Template conversions will be on
8308 the first slot.
8309 * typeck.c (build_component_ref): Preserve the type of an
8310 conversion operator name on the overload type.
8311 (build_x_function_call): Retrieve the conversion operator name.
8312
8313 2002-03-15 Richard Henderson <rth@redhat.com>
8314
8315 * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
8316
8317 2002-03-15 Mark Mitchell <mark@codesourcery.com>
8318
8319 * cp-tree.h (CLEANUP_DECL): Remove.
8320 (CLEANUP_EXPR): Likewise.
8321 * decl.c (destroy_local_var): Simplify.
8322 (maybe_build_cleanup): Tidy.
8323 * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
8324 * semantics.c (cp_expand_stmt): Likewise.
8325 * cp/tree.c (cp_statement_code_p): Likewise.
8326
8327 2002-03-15 Jason Merrill <jason@redhat.com>
8328
8329 PR c++/5857
8330 * decl.c (duplicate_decls): Use merge_types instead of common_type.
8331 * typeck.c (common_type): Just hand off to
8332 type_after_usual_arithmetic_conversions and
8333 composite_pointer_type.
8334 (merge_types): New fn.
8335 (commonparms): Use it instead of common_type.
8336 (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
8337 (composite_pointer_type): Also handle attributes.
8338 * cp-tree.h: Declare merge_types.
8339
8340 * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
8341 variables.
8342 * decl2.c (maybe_make_one_only): Also mark the decl as needed.
8343
8344 2002-03-14 Richard Henderson <rth@redhat.com>
8345
8346 * decl.c: Include c-pragma.h.
8347 (start_decl, start_function): Invoke maybe_apply_pragma_weak.
8348 * Make-lang.in: Update dependencies.
8349
8350 2002-03-14 Jakub Jelinek <jakub@redhat.com>
8351
8352 PR c++/5908
8353 * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
8354 * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
8355
8356 2002-03-12 Richard Sandiford <rsandifo@redhat.com>
8357
8358 * mangle.c (write_builtin_type): Handle 128-bit integers even if
8359 they are not a standard integer type.
8360
8361 2002-03-12 Richard Sandiford <rsandifo@redhat.com>
8362
8363 * cp-tree.h (init_init_processing): Remove declaration.
8364 * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
8365 * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
8366
8367 2002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8368
8369 * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
8370 Define.
8371 * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
8372 tree_code_length.
8373 * lex.c (cplus_tree_code_type, cplus_tree_code_length,
8374 cplus_tree_code_name): Delete.
8375 (cxx_init): Don't call add_c_tree_codes, instead set
8376 lang_unsafe_for_reeval. Don't try to copy into the various
8377 tree_code arrays.
8378
8379 2002-03-12 Nathan Sidwell <nathan@codesourcery.com>
8380
8381 PR c++/5659
8382 * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
8383 * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
8384 definitions.
8385
8386 2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
8387
8388 Revert 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>,
8389 DR209 is now not a defect.
8390 * cp-tree.h (skip_type_access_control): Remove.
8391 * decl.c (grokdeclarator): Do type access control for friend
8392 declarations.
8393 * semantics.c (decl_type_access_control): Don't reset
8394 current_type_lookups.
8395 (save_type_access_control): Always save the lookups.
8396 (skip_type_access_control): Remove.
8397 (finish_class_definition): Don't change type_lookups.
8398
8399 2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
8400
8401 Revert 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>,
8402 It is incorrect.
8403 * typeck.c (build_static_cast): Compare non-qualified types
8404 with pointer to member conversions.
8405
8406 2002-03-11 Dan Nicolaescu <dann@ics.uci.edu>
8407 Daniel Berlin <dan@dberlin.org>
8408
8409 * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
8410 (cxx_get_alias_set): Use it.
8411
8412 2002-03-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8413
8414 * cp-tree.h (stabilize_expr): Prototype.
8415
8416 2002-03-08 Craig Rodrigues <rodrigc@gcc.gnu.org>
8417
8418 * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
8419 conditional return void.
8420
8421 2002-03-08 Neil Booth <neil@daikokuya.demon.co.uk>
8422
8423 * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
8424 * cp-tree.h (cxx_unsave): New.
8425 * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
8426 (init_tree): Update.
8427
8428 2002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8429
8430 * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
8431 explicit sizeof/sizeof.
8432 * decl2.c (cxx_decode_option): Likewise.
8433 * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
8434
8435 2002-03-02 Nathan Sidwell <nathan@codesourcery.com>
8436
8437 PR c++/775
8438 * decl.c (lookup_tag): Only reject enum/class mismatch, not
8439 class/union mismatch.
8440 * parse.y (check_class_key): New function.
8441 (structsp): Call it.
8442
8443 2002-03-01 Michael Matz <matz@suse.de>
8444
8445 * typeck.c (cp_pointer_int_sum): Complete inner type which is
8446 used later by size_in_bytes().
8447
8448 2002-03-01 Phil Edwards <pme@gcc.gnu.org>
8449
8450 * cp-tree.h: Require __GNUC__ to be #defined.
8451 (build_init): Add missing prototype.
8452
8453 2002-03-01 Jason Merrill <jason@redhat.com>
8454
8455 * except.c: Don't include decl.h or obstack.h. Do include
8456 tree-inline.h.
8457 (build_throw): Destroy temporaries from the thrown
8458 expression before calling __cxa_throw. Construct a thrown
8459 temporary directly into the exception object.
8460 (stabilize_throw_expr): New function.
8461 (wrap_cleanups_r): New function.
8462 * tree.c (stabilize_expr): New function.
8463 * init.c (build_init): New function.
8464 * Make-lang.in (cp/except.o): Adjust .h deps.
8465
8466 2002-02-28 Jason Merrill <jason@redhat.com>
8467
8468 * search.c (lookup_base_r): Don't clear is_non_public just because
8469 we found a friendly scope.
8470
8471 * decl.c (finish_function): Only warn about missing return
8472 statement with -Wreturn-type.
8473
8474 2002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
8475
8476 * class.c (build_clone): Update.
8477 * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
8478 * cp-tree.h (cxx_dup_lang_specific_decl): New.
8479 * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
8480 (copy_decl): Update.
8481 * method.c (make_thunk): Update.
8482
8483 2002-02-27 Zack Weinberg <zack@codesourcery.com>
8484
8485 * decl2.c: Delete traditional-mode-related code copied from
8486 the C front end but not used, or used only to permit the
8487 compiler to link.
8488
8489 2002-02-24 Craig Rodrigues <rodrigc@gcc.gnu.org>
8490
8491 PR c++/4093
8492 * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
8493 to void.
8494
8495 2002-02-22 Jakub Jelinek <jakub@redhat.com>
8496
8497 PR other/5746
8498 * semantics.c (finish_switch_cond): Don't call get_unwidened
8499 if error_mark_node.
8500
8501 2002-02-22 Nathan Sidwell <nathan@codesourcery.com>
8502
8503 PR c++/2645, DR 295
8504 * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
8505 tf_keep_type_decl.
8506 (make_typename_type): Use tsubst_flags_t.
8507 * decl.c (make_typename_type): Adjust. Return non-artificial
8508 TYPE_DECLs, if required.
8509 (grokdeclarator): Simplify CVR qualification handling. Allow bad
8510 qualifiers on typedef types.
8511 * decl2.c (handle_class_head): Adjust make_typename_type call.
8512 * parse.y (nested_name_specifier): Likewise.
8513 (typename_sub0): Likewise.
8514 (typename_sub1): Likewise.
8515 * pt.c (convert_template_argument): Adjust make_typename_type
8516 return value.
8517 (tsubst): Adjust cp_build_qualified_type_real calls.
8518 (check_cv_quals_for_unify): Cope with allowing bad qualifications
8519 on template type parms.
8520 (instantiate_decl): Recheck substitutions to give warnings on bad
8521 qualifications.
8522 * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
8523
8524 2002-02-21 Aldy Hernandez <aldyh@redhat.com>
8525
8526 * cp/decl.c (duplicate_decls): Merge always_inline attribute.
8527
8528 * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
8529 unless DECL_ALWAYS_INLINE.
8530
8531 2002-02-20 Jakub Jelinek <jakub@redhat.com>
8532
8533 * typeck.c (cp_pointer_int_sum): Renamed from
8534 pointer_int_sum, call pointer_int_sum.
8535
8536 2002-02-20 Jakub Jelinek <jakub@redhat.com>
8537
8538 * decl.c (duplicate_decls): Return 0 if issued error about
8539 redeclaration.
8540
8541 2002-02-19 Jason Merrill <jason@redhat.com>
8542
8543 ABI change: Mangle `void (A::*)() const' as
8544 M1AKFvvE, not MK1AFvvE.
8545 * mangle.c (write_function_type): Write cv-quals for member
8546 function type here.
8547 (write_pointer_to_member_type): Not here.
8548
8549 2002-02-18 Jason Merrill <jason@redhat.com>
8550
8551 * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
8552 (do_decl_instantiation): Likewise.
8553
8554 2002-02-17 Craig Rodrigues <rodrigc@gcc.gnu.org>
8555
8556 PR c++/5685
8557 * decl.c (duplicate_decls): Make warning unconditional
8558 if duplicate default argument declarations are present.
8559
8560 2002-02-17 Jakub Jelinek <jakub@redhat.com>
8561
8562 * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
8563 shortening.
8564
8565 2002-02-15 Nathan Sidwell <nathan@codesourcery.com>
8566
8567 * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
8568 remove incorrect comment. Move #if 0'd code to common path. Use
8569 IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
8570
8571 2002-02-13 Jason Merrill <jason@redhat.com>
8572
8573 * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
8574 (finish_function): Don't warn if current_function_returns_null.
8575
8576 * typeck2.c (digest_init): Do handle values of vector type.
8577
8578 * typeck2.c (digest_init, process_init_constructor): Treat vectors
8579 like arrays.
8580
8581 2002-02-11 Jason Merrill <jason@redhat.com>
8582
8583 * parse.y (reserved_declspecs): Don't handle attributes.
8584 (reserved_typespecquals): Handle them here.
8585 * Make-lang.in (parse.c): Adjust expected conflicts.
8586
8587 2002-02-08 Jakub Jelinek <jakub@redhat.com>
8588
8589 * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
8590 instead of compstmt.
8591 (compstmt_or_stmtexpr): Renamed from compstmt.
8592 (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
8593
8594 2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
8595
8596 Rename instantiate_type_flags to tsubst_flags_t & expand use.
8597 * cp-tree.h (instantiate_type_flags): Rename to ...
8598 (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
8599 add tf_warning flag.
8600 (instantiate_type): Adjust prototype.
8601 (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
8602 do_type_instantiation, cp_build_qualified_type_real): Likewise.
8603 cp_build_qualified_type: Adjust.
8604 * class.c (instantiate_type): Adjust parameter. Rename itf_* to
8605 tf_*.
8606 * call.c (standard_conversion): Rename itf_* to tf_*.
8607 (reference_binding): Likewise.
8608 (convert_like_real): Likewise.
8609 * cvt.c (cp_convert_to_pointer): Likewise.
8610 (convert_to_reference): Likewise.
8611 * decl.c (lookup_namespace_name): Use tf_* flags.
8612 (make_typename_type): Likewise.
8613 (grokdeclarator): Likewise.
8614 * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
8615 (coerce_template_template_parms, convert_template_argument,
8616 coerce_template_parms, maybe_get_template_decl_from_type_decl,
8617 lookup_template_class, tsubst_friend_function, tsubst_friend_class,
8618 instantiate_class_template, tsubst_template_arg_vector,
8619 tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
8620 tsubst_decl, tsubst_arg_types, tsubst_function_type,
8621 tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
8622 instantiate_template, fn_type_unification,
8623 resolve_overloaded_unification, verify_class_unification,
8624 unify, get_bindings_real, do_type_instantiation,
8625 regenerate_decl_from_template, instantiate_decl,
8626 tsubst_initializer_list, tsubst_enum,
8627 get_mostly_instantiated_function_type,
8628 invalid_nontype_parm_type_p): Likewise.
8629 * tree.c (cp_build_qualified_type_real): Likewise.
8630 * typeck.c (build_binary_op): Rename itf_* to tf_*.
8631 (build_ptrmemfunc): Likewise.
8632 (convert_for_assignment): Likewise.
8633
8634 2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
8635
8636 PR c++/109
8637 * decl.c (grokdeclarator): Allow friend declarations from
8638 dependent types.
8639 * decl2.c (handle_class_head): Don't push into template parm contexts.
8640 * pt.c (push_template_decl_real): Template parm contexts are never
8641 being defined.
8642
8643 2002-02-05 Alexandre Oliva <aoliva@redhat.com>
8644
8645 * class.c: Include target.h.
8646 (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
8647 BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
8648 bit-field layout.
8649 * Make-lang.in: Adjust deps.
8650
8651 2002-02-05 Jason Merrill <jason@redhat.com>
8652
8653 * error.c (dump_type): Be more helpful about VECTOR_TYPE.
8654
8655 2002-02-04 Jakub Jelinek <jakub@redhat.com>
8656
8657 * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
8658 (finish_switch_cond): Set SWITCH_TYPE.
8659
8660 2002-02-04 Richard Henderson <rth@redhat.com>
8661
8662 * method.c (use_thunk): Always initialize the block tree. Reindent.
8663 * semantics.c (expand_body): Emit thunks after function, not before.
8664
8665 2002-02-04 Jason Merrill <jason@redhat.com>
8666
8667 * decl.c (start_function): Call cplus_decl_attributes immediately
8668 after grokdeclarator.
8669
8670 * decl.c (start_function): Combine DECL_RESULT handling code.
8671
8672 2002-02-03 Jason Merrill <jason@redhat.com>
8673
8674 * xref.c: Remove.
8675 * Make-lang.in (CXX_OBJS): Remove cp/xref.o
8676 (cp/xref.o): Remove dependencies.
8677 * class.c (finish_struct_1, check_methods): Don't call xref fns.
8678 (finish_struct_1): Likewise.
8679 * friend.c (make_friend_class): Likewise.
8680 * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
8681 * spew.c (read_process_identifier): Likewise.
8682
8683 2002-02-01 Jason Merrill <jason@redhat.com>
8684
8685 PR c++/4872
8686 * decl.c (finish_function): Warn about a non-void function with
8687 no return statement and no abnormal exit.
8688 * cp-tree.h (struct cp_language_function): Add returns_abnormally.
8689 (current_function_returns_abnormally): New macro.
8690 * call.c (build_call): Set it.
8691
8692 * typeck.c (build_component_ref): Always complain about offsetof
8693 constructs on non-PODs. Only make it an error for members of
8694 virtual bases.
8695
8696 * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
8697 (dump_function_decl): Always dump parms.
8698
8699 * decl2.c (finish_static_data_member_decl): Complain about a local
8700 class with a static data member.
8701
8702 PR c++/4286
8703 * search.c (lookup_field_1): Don't xref a static data member
8704 just because we looked it up.
8705
8706 2002-01-31 Jason Merrill <jason@redhat.com>
8707
8708 * Make-lang.in (parse.c): Handle .output file.
8709
8710 PR c++/3395
8711 * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
8712 not TREE_TYPE.
8713 * semantics.c (finish_class_definition): Adjust.
8714
8715 Allow attributes in parms and casts.
8716 * parse.y (named_parm): Don't strip attrs.
8717 (declmods): Remove 'attributes' production.
8718 (nonempty_cv_qualifiers): Accept attributes.
8719 (ATTRIBUTE): Give precedence.
8720 * decl.c (groktypename): Handle attributes.
8721 (grokparms): Likewise.
8722
8723 2002-01-29 Jakub Jelinek <jakub@redhat.com>
8724
8725 * decl2.c (cxx_decode_option): Pass 0 as last argument to
8726 cpp_handle_option.
8727 * lang-specs.h: Use cpp_unique_options instead of cpp_options
8728 when used together with cc1_options.
8729
8730 2002-01-29 Nathan Sidwell <nathan@codesourcery.com>
8731
8732 PR c++/5132
8733 * typeck2.c (digest_init): Make sure non-array core type is
8734 instantiated.
8735 * decl2.c (reparse_absdcl_as_casts): Just store the type in the
8736 constructor, rather than build a new one.
8737 (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
8738 PURPOSE of constructor elts.
8739
8740 2002-01-23 Zack Weinberg <zack@codesourcery.com>
8741
8742 * Make-lang.in (parse.c): Adjust expected number of
8743 shift-reduce conflicts.
8744 (decl.o): Depend on diagnostic.h.
8745 * decl.c: Include diagnostic.h.
8746 (grokdeclarator): Check for null pointer.
8747 (finish_function): Don't abort when
8748 current_binding_level->parm_flag != 1, if errors have
8749 occurred; throw away the statement tree and extra binding
8750 levels, and continue.
8751 * lex.c (note_list_got_semicolon): Check for null pointer.
8752 * method.c (hack_identifier): Just return error_mark_node if
8753 value is error_mark_node.
8754 * parse.y (primary: TYPEID(type_id)): No need to use
8755 TYPE_MAIN_VARIANT here.
8756 (handler_seq): Accept an empty list of catch clauses and
8757 generate a fake handler block to avoid later crashes.
8758 (ansi_raise_identifier): Accept the error token too.
8759 * semantics.c (begin_class_definition,
8760 finish_class_definition): Check for error_mark_node.
8761
8762 2002-01-23 Zack Weinberg <zack@codesourcery.com>
8763
8764 * typeck2.c (friendly_abort): Delete definition.
8765 * cp-tree.h (friendly_abort): Don't prototype.
8766 (my_friendly_assert): Use fancy_abort.
8767
8768 2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
8769
8770 * cp-tree.h (my_friendly_abort): Remove.
8771
8772 2002-01-23 Jakub Jelinek <jakub@redhat.com>
8773
8774 * spew.c (pending_inlines, pending_inlines_tail,
8775 processing_these_inlines): Make static.
8776 (mark_pending_inlines): Remove static.
8777 (begin_parsing_inclass_inline): If in function, save pi
8778 for GC to cp_function_chain->unparsed_inlines instead.
8779 (process_next_inline): Likewise.
8780 * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
8781 (mark_pending_inlines): Add prototype.
8782 * decl.c (spew_debug): Remove unused extern.
8783 (mark_lang_function): Call mark_pending_inlines.
8784
8785 2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
8786
8787 * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
8788 init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
8789 semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
8790 Change my_fancy_abort() to abort().
8791
8792 2002-01-23 Jason Merrill <jason@redhat.com>
8793
8794 PR c++/5453
8795 * class.c (fixed_type_or_null): Fix thinko.
8796
8797 PR c++/3331
8798 * init.c (resolve_offset_ref): Use build_indirect_ref.
8799
8800 * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
8801
8802 2002-01-22 Jason Merrill <jason@redhat.com>
8803
8804 * parse.y (function_body): Suppress the block for the outermost
8805 curly braces.
8806 * decl.c (pushdecl): Don't try to skip it.
8807 (begin_function_body): Keep the block we create, not the next one.
8808 * init.c (emit_base_init): Don't mess with keep_next_level.
8809
8810 * class.c (build_base_path): Tweak formatting.
8811
8812 2002-01-19 Nathan Sidwell <nathan@codesourcery.com>
8813
8814 Fix regression introduced with patch for c++/775
8815 * parse.y (class_head_defn): Check for template specializations
8816 with a different class-key.
8817
8818 2002-01-17 Jason Merrill <jason@redhat.com>
8819
8820 * decl.c (begin_constructor_body, begin_destructor_body): New fns.
8821 (begin_function_body): Call them and keep_next_level.
8822 * init.c (emit_base_init): Call keep_next_level.
8823 * semantics.c (setup_vtbl_ptr): Lose.
8824 * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
8825 (vtbls_set_up_p): Lose.
8826 * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
8827 * method.c (do_build_copy_constructor): Likewise.
8828 (synthesize_method): Call finish_mem_initializers.
8829 * parse.y (nodecls): Likewise.
8830
8831 * error.c (dump_type_suffix): Print the exception specs before
8832 recursing.
8833 (dump_function_decl): Here, too.
8834
8835 * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
8836
8837 2002-01-10 Ira Ruben <ira@apple.com>
8838
8839 PR c++/907
8840 * decl.c (start_method): Handle attrlist.
8841
8842 2002-01-10 Jakub Jelinek <jakub@redhat.com>
8843
8844 * decl2.c (max_tinst_depth): Increase default limit to 500.
8845
8846 2002-01-10 Graham Stott <grahams@redhat.com>
8847
8848 * spew.c (YYCHAR): Uppercase macro parameter and add
8849 parenthesis.
8850 (YYCODE): Likewise.
8851 (NAME): Uppercase macro parameter.
8852
8853 2002-01-09 Graham Stott <grahams@redhat.com>
8854
8855 * decl.h (grokdeclarator): Wrap long line.
8856
8857 * semantics.c (FINISH_COND): Uppercase macro paramaters and
8858 add parenthesis.
8859
8860 2002-01-08 Graham Stott <grahams@redhat.com>
8861
8862 * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
8863 (PALLOC): Uppercase macro parameter and whitespace.
8864 (SALLOC): Uppercase macro parameter.
8865 (SFREE): Uppercase macros parameter, add parenthese and
8866 whitespace.
8867 (STREQL): Uppercase macro parameter and whitespace.
8868 (STRNEQ): Likewise.
8869 (STRLSS): Likewise.
8870 (STRLEQ): Likewise.
8871 (STRGTR): Likewise.
8872 (STRGEQ): Likewise.
8873
8874 * call.c (convert_like): Add parenthesis and wrap.
8875 (convert_like_with_context): Likewise.
8876 (ICS_RANK): Whitespace.
8877 (NEED_TEMPORARY_P): Remove parenthesis.
8878
8879 * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
8880 whitespace.
8881 (VTT_MARKED_BINFO_P): Likewise.
8882
8883 * decl.c (BINDING_LEVEL): Add parenthesis.
8884 (DEF_OPERATOR): Likewise.
8885
8886 * mangle.c (MANGLE_TRACE): Add parenthesis.
8887 (MANGLE_TRACE_TREE): Likewise.
8888 (write_signed_number): Likewise.
8889 (write_unsigned_number): Likewise.
8890
8891 * pt.c (ccat): Uppercase macro parameter.
8892 (cat): Likewise
8893
8894 * search.c (SET_BINFO_ACCESS): Add parenthesis.
8895
8896 2002-01-07 Jason Merrill <jason@redhat.com>
8897
8898 * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
8899 to pedwarn.
8900
8901 PR c++/3536
8902 * method.c (make_thunk): If !flag_weak, give the thunk the
8903 function's linkage.
8904 (use_thunk): Here, too.
8905
8906 2002-01-07 Graham Stott <grahams@redhat.com>
8907
8908 * error.c: Update copyright date.
8909 (print_scope_operator): Add parenthesis.
8910 (print_left_paren): Likewise.
8911 (print_right_paren): Likewise.
8912 (print_left_bracket): Likewise.
8913 (print_right_bracket): Likewise.
8914 (print_template_argument_list_start): Likewise.
8915 (print_template_argument_list_end): Likewise.
8916 (print_non_consecutive_character): Likewise.
8917 (print_tree_identifier): Likewise.
8918 (print_identifier): Likewise.
8919 (NEXT_CODE): Uppercase macro parameter.
8920 (ident_fndecl): Delete unused.
8921 (GLOBAL_THING): Likewise.
8922
8923 2002-01-06 Graham Stott <grahams@redhat.com>
8924
8925 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
8926 (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
8927 (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
8928 (RECORD_OR_UNION_TYPE_CHECK): Likewise.
8929 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
8930 (C_IS_RESERVED_WORD): Uppercase macro parameter.
8931 (C_RID_YYCODE) Likewise.
8932 (ptrmem_cst): Use rtx.
8933 (LOCAL_BINDING_P): Add whitespace.
8934 (INHERITED_VALUE_BINDING_P): Likewise.
8935 (BINDING_SCOPE): Wrap long line.
8936 (BINDING_HAS_LEVEL_P): Remove parenthesis.
8937 (BINDING_VALUE): Wrap long line.
8938 (BINDING_TYPE): Whitespace.
8939 (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
8940 (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
8941 (IDENTIFIER_NAMESPACE_VALUE): Likewise.
8942 (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
8943 (same_type_p): Uppercase macro parameters.
8944 (same_type_ignoring_top_level_qualifiers_p): Likewise.
8945 (OVL_FUNCTION): Wrap long line.
8946 (OVL_CHAIN): Whitespace.
8947 (OVL_CURRENT): Add parenthesis and whitespace.
8948 (OVL_NEXT): Whitespace.
8949 (OVL_USED): Likewise.
8950 (IDENTIFIER_TYPE_VALUE): Likewise.
8951 (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
8952 (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
8953 (LANG_ID_FIELD): Whitespace.
8954 (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
8955 (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
8956 (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
8957 (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
8958 (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
8959 (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
8960 (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
8961 (IDENTIFIER_VIRTUAL_P): Likewise.
8962 (IDENTIFIER_OPNAME_P): Likewise.
8963 (IDENTIFIER_TYPENAME_P): Remove parenthesis.
8964 (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
8965 (C_SET_EXP_ORIGINAL_CODE): Likewise.
8966 (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
8967 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
8968 (IS_AGGR_TYPE): Uppercase macro parameter.
8969 (CLASS_TYPE_P): Likewise.
8970 (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
8971 (IS_AGGR_TYPE_2): Whitespace.
8972 (TAGGED_TYPE_P): Uppercase macro parameter.
8973 (TYPE_BUILT_IN): Whitespace.
8974 (TYPE_FOR_JAVA): Likewise.
8975 (FUNCTION_ARG_CHAIN): Remove parenthesis.
8976 (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
8977 (FUNCTION_FIRST_USER_PARAM): Likewise.
8978 (PROMOTES_TO_AGGR_TYPE): Whitespace.
8979 (DERIVED_FROM_P): Add parenthesis and wrap.
8980 (UNIQUELY_DERIVED_FROM_P): Likewise.
8981 (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
8982 (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
8983 (CLASSTYPE_USE_TEMPLATE): Whitespace.
8984 (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
8985 (TYPE_GETS_DELETE): Add parenthesis.
8986 (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
8987 (TYPE_HAS_ASSIGN_REF): Likewise,
8988 (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
8989 (TYPE_HAS_INIT_REF): Likewise.
8990 (TYPE_HAS_CONST_INIT_REF): Likewise.
8991 (TYPE_BEING_DEFINED): Likewise.
8992 (TYPE_LANG_SPECIFIC): Likewise.
8993 (CLASSTYPE_RTTI): Likewise.
8994 (TYPE_OVERLOADS_CALL_EXPR): Likewise.
8995 (TYPE_OVERLOADS_ARRAY_REF): Likewise.
8996 (TYPE_OVERLOADS_ARROW): Likewise.
8997 (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
8998 (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
8999 (CLASSTYPE_METHOD_VEC): Likewise.
9000 (CLASSTYPE_MARKED_N): Likewise.
9001 (CLASSTYPE_MARKED): Likewise.
9002 (CLASSTYPE_MARKED2): Likewise.
9003 (CLASSTYPE_MARKED3): Likewise.
9004 (CLASSTYPE_MARKED4): Likewise.
9005 (CLASSTYPE_MARKED5): Likewise.
9006 (CLASSTYPE_MARKED6): Likewise.
9007 (SET_CLASSTYPE_MARKED): Whitespace.
9008 (CLEAR_CLASSTYPE_MARKED): Likewise.
9009 (SET_CLASSTYPE_MARKED2): Likewise.
9010 (CLEAR_CLASSTYPE_MARKED2): Likewise.
9011 (SET_CLASSTYPE_MARKED3): Likewise.
9012 (CLEAR_CLASSTYPE_MARKED3): Likewise.
9013 (SET_CLASSTYPE_MARKED4): Likewise.
9014 (CLEAR_CLASSTYPE_MARKED4): Likewise.
9015 (SET_CLASSTYPE_MARKED5): Likewise.
9016 (CLEAR_CLASSTYPE_MARKED5): Likewise.
9017 (SET_CLASSTYPE_MARKED6): Likewise.
9018 (CLEAR_CLASSTYPE_MARKED6): Likewise.
9019 (CLASSTYPE_TAGS): Likewise.
9020 (CLASSTYPE_VSIZE): Likewise.
9021 (CLASSTYPE_VBASECLASSES): Likewise.
9022 (CANONICAL_BINFO): Add parenthesis.
9023 (CLASSTYPE_SIZE(NODE): Likewise.
9024 (CLASSTYPE_SIZE_UNIT): Likewise.
9025 (CLASSTYPE_ALIGN(NODE): Likewise.
9026 (CLASSTYPE_USER_ALIGN): Likewise.
9027 (TYPE_JAVA_INTERFACE): Likewise.
9028 (CLASSTYPE_PURE_VIRTUALS): Likewise.
9029 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
9030 (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
9031 (CLASSTYPE_HAS_MUTABLE): Likewise.
9032 (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
9033 (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
9034 (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
9035 (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
9036 (CLASSTYPE_INTERFACE_ONLY): Likewise.
9037 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
9038 (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
9039 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
9040 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
9041 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
9042 (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
9043 (BINFO_UNSHARED_MARKED): Whitespace.
9044 (BINFO_MARKED): Whitespace and wrap.
9045 (SET_BINFO_MARKED): Likewise.
9046 (CLEAR_BINFO_MARKED): Likewise.
9047 (BINFO_VTABLE_PATH_MARKED): Likewise.
9048 (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
9049 (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
9050 (BINFO_SUBVTT_INDEX): Remove parenthesis.
9051 (BINFO_VPTR_INDEX): Likewise.
9052 (BINFO_PRIMARY_BASE_OF): Likewise,
9053 (CLASSTYPE_VFIELDS): Whitespace.
9054 (VF_DERIVED_VALUE): Wrap long line.
9055 (NAMESPACE_LEVEL): Whitespace.
9056 (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
9057 (DEFARG_POINTER): Whitespace.
9058 (DECL_NEEDED_P): Remove parenthesis.
9059 (DECL_LANGUAGE): Whitespace.
9060 (SET_DECL_LANGUAGE): Add parenthesis.
9061 (DECL_CONSTRUCTOR_P): Whitespace and wrap.
9062 (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
9063 (DECL_IN_AGGR_P): Whitespace.
9064 (DECL_FRIEND_P): Likewise.
9065 (DECL_BEFRIENDING_CLASSES): Likewise.
9066 (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
9067 (DECL_NONCONVERTING_P): Whitespace.
9068 (DECL_PURE_VIRTUAL_P): Likewise.
9069 (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
9070 (DECL_PENDING_INLINE_INFO): Whitespace.
9071 (DECL_SORTED_FIELDS): Likewise.
9072 (DECL_DEFERRED_FN): Likewise.
9073 (DECL_TEMPLATE_INFO): Likewise.
9074 (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
9075 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
9076 (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
9077 (TMPL_ARGS_LEVEL): Likewise.
9078 (SET_TMPL_ARGS_LEVEL): Likewise.
9079 (INNERMOST_TEMPLATE_PARMS): Whitespace.
9080 (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
9081 (INTEGRAL_CODE_P(CODE): Add parenthesis.
9082 (CP_INTEGRAL_TYPE_P): Remove parenthesis.
9083 (TYPE_HAS_CONSTRUCTOR): Whitespace.
9084 (TREE_HAS_CONSTRUCTOR): Likewise.
9085 (TYPE_HAS_DESTRUCTOR): Likewise.
9086 (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
9087 (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
9088 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
9089 (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
9090 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
9091 (TYPE_PTRMEMFUNC_P): Likewise.
9092 (TYPE_PTRMEMFUNC_FLAG): Likewise.
9093 (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
9094 (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
9095 (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
9096 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
9097 (DECL_ACCESS): Whitespace.
9098 (DECL_GLOBAL_CTOR_P): Remove parenthesis.
9099 (DECL_GLOBAL_DTOR_P): Likewise.
9100 (GLOBAL_INIT_PRIORITY): Likewise.
9101 (DECL_TEMPLATE_PARMS): Likewise.
9102 (DECL_TEMPLATE_RESULT): Likewise.
9103 (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
9104 (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
9105 (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
9106 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
9107 (PRIMARY_TEMPLATE_P): Add parenthesis.
9108 (DECL_USE_TEMPLATE): Whitespace.
9109 (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
9110 (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
9111 (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
9112 (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
9113 (CALL_DECLARATOR_PARMS): Remove parenthesis.
9114 (CALL_DECLARATOR_QUALS): Likewise.
9115 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
9116 (TEMP_NAME_P): Wrap.
9117 (VFIELD_NAME_P): Likewise.
9118 (B_SET): Uppercase macro parameters and add parenthesis.
9119 (B_CLR): Likewise.
9120 (B_TST): Likewise.
9121 (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
9122 (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
9123 (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
9124 (same_or_base_type_p): Likewise.
9125 (cp_deprecated): Likewise.
9126
9127 2002-01-05 Richard Henderson <rth@redhat.com>
9128
9129 * semantics.c (expand_body): Revert last change.
9130
9131 2002-01-04 Jason Merrill <jason@redhat.com>
9132
9133 PR c++/4122
9134 * class.c (update_vtable_entry_for_fn): Set delta to zero for a
9135 lost primary.
9136
9137 * class.c (build_vtbl_initializer): Check for a lost primary
9138 before calculating the vtable entry to throw away.
9139
9140 2002-01-02 Jason Merrill <jason@redhat.com>
9141
9142 * semantics.c (expand_body): Call outlining_inline_function when
9143 emitting an inline function out of line.
9144
9145 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
9146
9147 PR c++/5116, c++/764 reversion
9148 * call.c (build_new_op): Revert the instantiations. They are
9149 incorrect.
9150
9151 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
9152
9153 PR c++/5089
9154 * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
9155
9156 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
9157
9158 PR c++/3716
9159 * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
9160 (tsubst, case POINTER_TYPE): Handle pmfs here.
9161 (tsubst, case OFFSET_TYPE): Check it is not an offset to
9162 reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
9163
9164 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
9165
9166 PR c++/35
9167 * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
9168 (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
9169 * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
9170 PARM_DECL.
9171 (tsubst_template_parms): Break up loop statements.
9172 (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
9173 parm PARM_DECLs don't get promoted.
9174
9175 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
9176
9177 PR c++/5123
9178 * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
9179 (build_x_function_call): Cope with a COMPONENT_REF containing a
9180 TEMPLATE_ID_EXPR.
9181
9182 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
9183
9184 PR c++/5213
9185 * pt.c (convert_template_argument): Be more careful determining
9186 when RECORD_TYPE templates are or are not templates.
9187
9188 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
9189
9190 PR c++/775
9191 * cp-tree.h (handle_class_head): Adjust prototype.
9192 * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
9193 parameters. Use for all class heads.
9194 * parse.y (named_class_head_sans_basetype, named_class_head,
9195 named_complex_class_head_sans_basetype,
9196 named_class_head_sans_basetype_defn,
9197 unnamed_class_head): Remove.
9198 (class_head, class_head_apparent_template): Recognize class heads
9199 (class_head_decl, class_head_defn): New reductions. Process class
9200 heads.
9201 (structsp): Adjust class definition and class declaration
9202 reductions.
9203 (maybe_base_class_list): Give diagnostic on empty list.
9204
9205 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
9206
9207 PR c++/4379
9208 * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
9209 single non-static member.
9210 (unary_complex_lvalue): If it cannot be a pointer to member, don't
9211 make it so. Check it is not pointer to reference.
9212
9213 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
9214
9215 PR c++/5132
9216 * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
9217 are processing a template decl.
9218
9219 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
9220
9221 PR c++/5116, c++/764
9222 * call.c (build_new_op): Make sure template class operands are
9223 instantiated. Simplify arglist construction.
9224
9225 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
9226
9227 * call.c (build_user_type_conversion_1): Use my_friendly_assert
9228 rather than if ... abort.
9229 * cvt.c (convert_to_reference): Likewise.
9230 * semantics.c (setup_vtbl_ptr): Likewise.
9231 * pt.c (lookup_template_class): Comment typo.
9232
9233 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
9234
9235 PR c++/5125
9236 * pt.c (push_template_decl_real): Make sure DECL has
9237 DECL_LANG_SPECIFIC.
9238
9239 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
9240
9241 PR c++/335
9242 * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
9243 for non-reference fields.
9244 * typeck.c (require_complete_type): Use resolve_offset_ref).
9245
9246 2001-12-26 Nathan Sidwell <nathan@codesourcery.com>
9247
9248 PR c++/196
9249 * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
9250
9251 2001-12-24 Nathan Sidwell <nathan@codesourcery.com>
9252
9253 PR c++/160
9254 * typeck.c (build_modify_expr): Remove old unreachable code & tidy
9255 up. Don't stabilize_references when initializing a reference.
9256
9257 2001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9258
9259 * decl2.c (lang_f_options): Const-ify.
9260
9261 2001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
9262
9263 * config-lang.in (diff_excludes): Remove.
9264
9265 2001-12-19 Nathan Sidwell <nathan@codesourcery.com>
9266
9267 PR c++/90
9268 * typeck.c (build_function_call_real): Use original function
9269 expression for errors.
9270
9271 2001-12-18 Jason Merrill <jason@redhat.com>
9272
9273 PR c++/3242
9274 * class.c (add_method): Do compare 'this' quals when trying to match a
9275 used function. Don't defer to another used function.
9276
9277 2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
9278
9279 * pt.c (instantiate_clone): Remove, fold into ...
9280 (instantiate_template): ... here. Simplify by removing mutual
9281 recursion.
9282 * typeck2.c (build_m_component_ref): Don't cv qualify the function
9283 pointed to by a pointer to function.
9284 * class.c (delete_duplicate_fields_1): Typo.
9285
9286 2001-12-18 Jason Merrill <jason@redhat.com>
9287
9288 C++ ABI change: destroy value arguments in caller.
9289 * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
9290 create an extra binding level for the parameters.
9291 * decl.c (store_parm_decls): Don't do parameter cleanups.
9292
9293 2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
9294
9295 * call.c (build_new_method_call): Use '%#V'.
9296 * error.c (cv_to_string): Use V parameter to determine padding.
9297
9298 2001-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
9299
9300 * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
9301 spellings in messages.
9302
9303 2001-12-17 Zack Weinberg <zack@codesourcery.com>
9304
9305 * cp-tree.h: Delete #defines for cp_error, cp_warning,
9306 cp_pedwarn, and cp_compiler_error.
9307 * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
9308 except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
9309 rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
9310 typeck2.c: Change calls to the above macros to use their
9311 language-independent equivalents: error, warning, pedwarn, and
9312 internal_error respectively.
9313
9314 2001-12-16 Neil Booth <neil@daikokuya.demon.co.uk>
9315
9316 * decl2.c (finish_file): Remove back_end_hook.
9317
9318 2001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
9319
9320 * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
9321 cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
9322 pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
9323
9324 2001-12-15 Joseph S. Myers <jsm28@cam.ac.uk>
9325
9326 * lang-options.h: Use American spelling in messages.
9327
9328 2001-12-13 Jason Merrill <jason@redhat.com>
9329
9330 * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
9331
9332 Use cleanups to run base and member destructors.
9333 * init.c (push_base_cleanups): New function, split out from...
9334 (build_delete): ...here. Lose !TYPE_HAS_DESTRUCTOR code.
9335 * decl.c (finish_destructor_body): Move vbase destruction code to
9336 push_base_cleanups.
9337 (begin_function_body, finish_function_body): New fns.
9338 (finish_function): Move [cd]tor handling and call_poplevel to
9339 finish_function_body.
9340 (pushdecl): Skip the new level.
9341 * semantics.c (genrtl_try_block): Don't call end_protect_partials.
9342 (setup_vtbl_ptr): Call push_base_cleanups.
9343 * method.c (synthesize_method): Call {begin,end}_function_body.
9344 * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
9345 * cp-tree.h: Declare new fns.
9346 * parse.y (function_body, .begin_function_body): New nonterminals.
9347 (fndef, pending_inline, function_try_block): Use function_body.
9348 (ctor_initializer_opt, function_try_block): No longer has a value.
9349 (base_init): Remove .set_base_init token.
9350 (.set_base_init, compstmt_or_error): Remove.
9351 * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
9352
9353 * optimize.c (maybe_clone_body): Fix parameter updating.
9354
9355 2001-12-12 Jason Merrill <jason@redhat.com>
9356
9357 * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
9358 * semantics.c (genrtl_start_function): Don't pass
9359 parms_have_cleanups or push an extra binding level.
9360 (genrtl_finish_function): Lose cleanup_label cruft.
9361
9362 * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
9363 (ctor_label): Remove.
9364 * semantics.c (finish_return_stmt): Lose ctor_label support.
9365 * decl.c (finish_constructor_body, mark_lang_function): Likewise.
9366 * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
9367 dtor_label.
9368
9369 * call.c (build_new_method_call): Let resolves_to_fixed_type_p
9370 check for [cd]tors.
9371 * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
9372
9373 * decl.c (finish_function): Check VMS_TARGET, not VMS.
9374
9375 * decl.c (start_cleanup_fn): Remove redundant pushlevel.
9376 (end_cleanup_fn): And poplevel.
9377
9378 * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
9379 if we're in a template.
9380
9381 2001-12-12 Jakub Jelinek <jakub@redhat.com>
9382
9383 * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
9384 ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
9385 THIS_NAME_P): Delete.
9386 * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
9387 THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
9388 with internal naming scheme.
9389 * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
9390
9391 2001-12-12 Nathan Sidwell <nathan@codesourcery.com>
9392
9393 * decl.c (grokdeclarator): Deprecated implicit typename use.
9394
9395 2001-12-11 Nathan Sidwell <nathan@codesourcery.com>
9396
9397 PR g++/51
9398 * parse.y (frob_specs): Indicate it is a language linkage which
9399 contained the extern.
9400 * decl.c (grokdeclarator): Allow extern language linkage with
9401 other specifiers.
9402
9403 2001-12-10 Nathan Sidwell <nathan@codesourcery.com>
9404
9405 PR g++/72
9406 * decl.c (add_binding): Don't reject duplicate typedefs involving
9407 template parameters.
9408
9409 2001-12-10 Neil Booth <neil@daikokuya.demon.co.uk>
9410
9411 * parse.y, semantics.c: Similarly.
9412
9413 2001-12-09 Nathan Sidwell <nathan@codesourcery.com>
9414
9415 PR g++/87
9416 * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
9417 (copy_args_p): Rename to ...
9418 (copy_fn_p): ... here.
9419 (grok_special_member_properties): New function.
9420 (grok_op_properties): Lose VIRTUALP parameter.
9421 (copy_assignment_arg_p): Remove.
9422 * call.c (build_over_call): Use copy_fn_p.
9423 * decl.c (grokfndecl): Reformat. Adjust call to
9424 grok_op_properties.
9425 (copy_args_p): Rename to ...
9426 (copy_fn_p): ... here. Reject template functions. Check for pass
9427 by value.
9428 (grok_special_member_properties): Remember special functions.
9429 (grok_ctor_properties): Don't remember them here, just check.
9430 (grok_op_properties): Likewise.
9431 (start_method): Call grok_special_member_properties.
9432 * decl2.c (grokfield): Likewise.
9433 (copy_assignment_arg_p): Remove.
9434 (grok_function_init): Don't remember abstract assignment here.
9435 * pt.c (instantiate_class_template): Call
9436 grok_special_member_properties.
9437 (tsubst_decl): Adjust grok_op_properties call.
9438
9439 2001-12-08 Aldy Hernandez <aldyh@redhat.com>
9440
9441 * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
9442 RID_TYPES_COMPATIBLE_P.
9443
9444 2001-12-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
9445
9446 * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
9447 call to build_aggr_init.
9448 * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
9449
9450 2001-12-08 Neil Booth <neil@daikokuya.demon.co.uk>
9451
9452 * parse.y: Replace uses of the string non-terminal with STRING.
9453 Don't perform string concatentaion here.
9454 (string): Remove non-terminal.
9455 * semantics.c (finish_asm_stmt): Don't concatenate strings here.
9456
9457 2001-12-05 Jason Merrill <jason@redhat.com>
9458
9459 * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
9460 (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
9461 * tree.c (cp_start_inlining, cp_end_inlining): New fns.
9462 * pt.c (push_tinst_level): No longer static.
9463 * cp-tree.h: Declare them.
9464
9465 * init.c (resolve_offset_ref): Don't check access for the base
9466 conversion to access a FIELD_DECL.
9467
9468 * cp-tree.h (TYPE_REFFN_P): New macro.
9469 * decl.c (bad_specifiers): Check it, too.
9470
9471 * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
9472 on the __*_type_info type if we haven't seen a definition.
9473
9474 2001-12-05 Neil Booth <neil@daikokuya.demon.co.uk>
9475
9476 * decl.c: Include c-common.h.
9477 (shadow_warning): Move to c-common.c.
9478
9479 2001-12-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9480
9481 * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
9482
9483 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
9484
9485 * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
9486
9487 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
9488
9489 PR g++/164
9490 * init.c (sort_base_init): Allow binfos to be directly specified.
9491 * method.c (do_build_copy_constructor): Explicitly convert to the
9492 base instance.
9493 (do_build_assign_ref): Likewise.
9494
9495 2001-12-03 Hans-Peter Nilsson <hp@bitrange.com>
9496
9497 * decl.c (xref_basetypes): Don't use C99 construct in tag_code
9498 declaration and initialization.
9499
9500 2001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
9501
9502 * typeck2.c: Remove leading capital from diagnostic messages, as
9503 per GNU coding standards.
9504
9505 2001-12-03 Mumit Khan <khan@nanotech.wisc.edu>
9506
9507 PR c++/3394
9508 * decl.c (xref_basetypes): Handle attributes between
9509 'class' and name.
9510
9511 2001-12-03 Nathan Sidwell <nathan@codesourcery.com>
9512
9513 PR g++/3381
9514 * parse.y (named_complex_class_head_sans_basetype): Add new
9515 reduction.
9516 * Make-lang.in (parse.c): Adjust expected conflict count.
9517
9518 2001-12-03 Jason Merrill <jason@redhat.com>
9519
9520 * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
9521 immediate binfos for our virtual bases.
9522
9523 2001-12-02 Neil Booth <neil@daikokuya.demon.co.uk>
9524
9525 * call.c (build_java_interface_fn_ref): Similarly.
9526 * except.c (is_admissible_throw_operand): Similarly.
9527 * init.c (build_java_class_ref): Similarly.
9528 * xref.c (open_xref_file): Similarly.
9529
9530 2001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
9531
9532 * class.c (finish_struct): Remove trailing periods from messages.
9533 * decl.c (check_tag_decl): Similarly.
9534 * lex.c (cxx_set_yydebug): Similarly.
9535 * typeck2.c (friendly_abort): Similarly.
9536
9537 2001-11-29 Mark Mitchell <mark@codesourcery.com>
9538
9539 PR c++/3048
9540 * cp-tree.h (ovl_member): Remove.
9541 * decl2.c (merge_functions): Handle extern "C" functions
9542 specially.
9543 * tree.c (ovl_member): Remove.
9544
9545 2001-11-29 Mark Mitchell <mark@codesourcery.com>
9546
9547 PR c++/4842
9548 * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
9549 FUNCTION_DECL, as input.
9550 (mark_overriders): Remove.
9551 (warn_hidden): Rework for the new ABI.
9552
9553 2001-11-29 Mark Mitchell <mark@codesourcery.com>
9554
9555 PR c++/3471
9556 * call.c (convert_like_real): Do not build additional temporaries
9557 for rvalues of class type.
9558
9559 2001-11-28 Nathan Sidwell <nathan@codesourcery.com>
9560
9561 * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
9562 (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
9563 (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
9564 (DERIVED_FROM_P): Likewise.
9565 (enum base_access): Renumber, add ba_quiet bit mask.
9566 (get_binfo): Remove.
9567 (get_base_distance): Remove.
9568 (binfo_value): Remove.
9569 (ACCESSIBLY_DERIVED_FROM_P): Remove.
9570 * call.c (standard_conversion): Use lookup_base.
9571 * class.c (strictly_overrides): Likewise.
9572 (layout_virtual_bases): Likewise.
9573 (warn_about_ambiguous_direct_bases): Likewise.
9574 (is_base_of_enclosing_class): Likewise.
9575 (add_vcall_offset_vtbl_entries_1): Likewise.
9576 * cvt.c (build_up_reference): Adjust comment.
9577 * init.c (build_member_call): Reformat.
9578 * search.c (get_binfo): Remove.
9579 (get_base_distance_recursive): Remove.
9580 (get_base_distance): Remove.
9581 (lookup_base_r): Tweak.
9582 (lookup_base): Add ba_quiet control. Complete the types here.
9583 (covariant_return_p): Use lookup_base.
9584 * tree.c (binfo_value): Remove.
9585 (maybe_dummy_object): Use lookup_base.
9586 * typeck.c (build_static_cast): Use lookup_base.
9587 (get_delta_difference): Likewise.
9588 * typeck2.c (binfo_or_else): Use lookup_base.
9589 (build_scoped_ref): Add back error_mark_check.
9590 (build_m_component_ref): Use lookup_base.
9591
9592 2001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
9593
9594 * Make-lang.in (c++.generated-manpages): New dummy target.
9595
9596 2001-11-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9597
9598 * Make-lang.in (cp-lang.o): Depends on c-common.h.
9599 * cp-lang.c (c-common.h): Include.
9600 (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
9601 * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
9602 * expr.c (init_cplus_expand): Don't set lang_expand_constant.
9603
9604 2001-11-26 Neil Booth <neil@daikokuya.demon.co.uk>
9605
9606 * decl2.c (c_language): Move to c-common.c.
9607 * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
9608 functions.
9609 (cxx_init): Update.
9610
9611 2001-11-26 Jason Merrill <jason@redhat.com>
9612
9613 * call.c (joust): Remove COND_EXPR hack.
9614
9615 2001-11-25 Aldy Hernandez <aldyh@redhat.com>
9616
9617 * search.c (lookup_base_r): Declare bk in variable declaration
9618 space.
9619
9620 2001-11-25 Nathan Sidwell <nathan@codesourcery.com>
9621
9622 PR g++/3145
9623 * class.c (build_vbase_pointer): Remove.
9624 (build_vbase_path): Remove.
9625 (build_base_path): New function.
9626 * cp-tree.h (base_access, base_kind): New enumerations.
9627 (build_base_path): Declare.
9628 (convert_pointer_to_real): Remove.
9629 (convert_pointer_to): Remove.
9630 (lookup_base): Declare.
9631 (convert_pointer_to_vbase): Remove.
9632 * call.c (build_scoped_method_call): Use lookup_base &
9633 build_base_path instead of convert_pointer_to_real,
9634 get_base_distance & get_binfo.
9635 (build_over_call): Likewise.
9636 * cvt.c (cp_convert_to_pointer): Likewise.
9637 (convert_to_pointer_force): Likewise.
9638 (build_up_reference): Likewise.
9639 (convert_pointer_to_real): Remove.
9640 (convert_pointer_to): Remove.
9641 * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
9642 instead of convert_pointer_to_vbase & build_vbase_path.
9643 (emit_base_init): Use build_base_path instead of
9644 convert_pointer_to_real.
9645 (expand_virtual_init): Lose unrequired conversions.
9646 (resolve_offset_ref): Use lookup_base and build_base_path
9647 instead of convert_pointer_to.
9648 * rtti.c (build_dynamic_cast_1): Use lookup_base &
9649 build_base_path instead of get_base_distance & build_vbase_path.
9650 * search.c (get_vbase_1): Remove.
9651 (get_vbase): Remove.
9652 (convert_pointer_to_vbase): Remove.
9653 (lookup_base_r): New function.
9654 (lookup_base): New function.
9655 * typeck.c (require_complete_type): Use lookup_base &
9656 build_base_path instead of convert_pointer_to.
9657 (build_component_ref): Likewise.
9658 (build_x_function_call): Likewise.
9659 (get_member_function_from_ptrfunc): Likewise.
9660 (build_component_addr): Likewise.
9661 * typeck2.c (build_scoped_ref): Likewise.
9662
9663 2001-11-22 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9664
9665 * cp-tree.h (CP_TYPE_QUALS): Removed.
9666 * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
9667 * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
9668 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
9669 * dump.c (cp_dump_tree): Use void* dump_info argument to match
9670 lang-hooks prototype.
9671 * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
9672 rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
9673 CP_TYPE_QUALS changed to cp_type_quals.
9674 * Make-lang.in: References to c-dump.h changed to tree-dump.h.
9675 (CXX_C_OBJS): Remove c-dump.o.
9676
9677 2001-11-21 Mark Mitchell <mark@codesourcery.com>
9678
9679 PR c++/3637
9680 * pt.c (lookup_template_class): Ensure that all specializations
9681 are registered on the list corresponding to the most general
9682 template.
9683
9684 2001-11-20 Mark Mitchell <mark@codesourcery.com>
9685
9686 * call.c (non_reference): Add documentation.
9687 (convert_class_to_reference): Do not strip reference types
9688 from conversion operators.
9689 (maybe_handle_ref_bind): Simplify.
9690 (compare_ics): Correct handling of references.
9691
9692 2001-11-19 John Wilkinson <johnw@research.att.com>
9693
9694 * dump.c (dump_op): New function.
9695 (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION. Use
9696 dump_op. Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
9697 DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
9698
9699 2001-11-19 Mark Mitchell <mark@codesourcery.com>
9700
9701 PR4629
9702 * semantics.c (finish_sizeof): Make sure that expression created
9703 while processing a template do not have a type.
9704 (finish_alignof): Likewise.
9705 * typeck.c (c_sizeof): Likewise.
9706 (expr_sizeof): Likewise.
9707
9708 2001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
9709
9710 * lex.c (cxx_finish): Call c_common_finish.
9711 (finish_parse): Remove.
9712
9713 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9714
9715 * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
9716 when displaying error message about missing array bounds.
9717
9718 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9719
9720 * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
9721 CONST_CAST_EXPR.
9722 * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
9723
9724 2001-11-16 Neil Booth <neil@daikokuya.demon.co.uk>
9725
9726 * cp-tree.h (print_class_statistics): Restore.
9727
9728 2001-11-15 Jason Merrill <jason@redhat.com>
9729
9730 * method.c (use_thunk): Don't emit debugging information for thunks.
9731
9732 * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
9733 * decl.c (make_typename_type): Handle getting a class template.
9734 * search.c (lookup_field_r): A class template is good enough for
9735 want_type.
9736
9737 * call.c (convert_like_real): Only use cp_convert for the bad part.
9738 (standard_conversion): Also allow bad int->enum.
9739 * typeck.c (ptr_reasonably_similar): Also allow functions to
9740 interconvert. Pointers to same-size integers are reasonably
9741 similar.
9742
9743 * cvt.c (convert_to_void): If we build a new COND_EXPR, always
9744 give it void type.
9745
9746 2001-11-15 Nathan Sidwell <nathan@codesourcery.com>
9747
9748 PR g++/3154
9749 * init.c (sort_base_init): Remove unreachable code.
9750 (expand_member_init): Adjust comment to reflect reality. Simplify
9751 and remove unreachable code.
9752
9753 2001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
9754
9755 * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
9756 (cxx_init): Update prototype.
9757 * decl.c (init_decl_processing): Rename. Move null node init
9758 to its creation time.
9759 * lex.c (cxx_init_options): Update.
9760 (cxx_init): Combine with old init_parse; also call
9761 cxx_init_decl_processing.
9762
9763 2001-11-14 Richard Sandiford <rsandifo@redhat.com>
9764
9765 * decl.c (check_initializer): Try to complete the type of an
9766 array element before checking whether it's complete. Don't
9767 complain about arrays with complete element types but an
9768 unknown size.
9769 (cp_finish_decl): Build the hierarchical constructor before
9770 calling maybe_deduce_size_from_array_init.
9771
9772 2001-11-14 Joseph S. Myers <jsm28@cam.ac.uk>
9773
9774 * Make-lang.in: Change all uses of $(manext) to $(man1ext).
9775
9776 2001-11-13 Nathan Sidwell <nathan@codesourcery.com>
9777
9778 PR g++/4206
9779 * parse.y (already_scoped_stmt): Remove.
9780 (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
9781
9782 2001-11-12 H.J. Lu <hjl@gnu.org>
9783
9784 * cvt.c (ocp_convert): Don't warn the address of a weak
9785 function is always `true'.
9786
9787 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
9788
9789 * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
9790 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
9791 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
9792 * cp-tree.h (print_class_statistics): Remove.
9793 (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
9794 cxx_print_identifier, cxx_set_yydebug): New.
9795 * lex.c (set_yydebug): Rename c_set_yydebug.
9796 * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
9797 lang_print_xnode): Rename.
9798 * tree.c (print_lang_statistics): Rename.
9799
9800 2001-11-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9801
9802 * class.c (dump_array): Fix format specifier warning.
9803
9804 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
9805
9806 * cp-lang.c (LANG_HOOKS_NAME): Override.
9807 (struct lang_hooks): Constify.
9808 * lex.c (cxx_init_options): Update.
9809 (lang_identify): Remove.
9810 * parse.y (language_string): Remove.
9811
9812 2001-11-08 Andreas Franck <afranck@gmx.de>
9813
9814 * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
9815 DEMANGLER_CROSS_NAME): Handle program_transform_name the way
9816 suggested by autoconf.
9817 (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
9818 (c++.install-common): Use the transformed target alias names.
9819
9820 2001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
9821
9822 * Make-lang.in: Update.
9823 * cp-lang.c: Include langhooks-def.h.
9824
9825 2001-11-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9826
9827 * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
9828
9829 2001-11-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9830
9831 * lex.c (copy_lang_type): Add static prototype.
9832
9833 2001-11-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9834
9835 * pt.c (unify): Handle SCOPE_REF.
9836
9837 2001-11-01 Jakub Jelinek <jakub@redhat.com>
9838
9839 * tree.c (cp_copy_res_decl_for_inlining): Adjust
9840 DECL_ABSTRACT_ORIGIN for the return variable.
9841
9842 2001-10-31 Zack Weinberg <zack@codesourcery.com>
9843
9844 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
9845
9846 2001-10-28 Joseph S. Myers <jsm28@cam.ac.uk>
9847
9848 * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
9849 semantics.c, spew.c: Fix spelling errors.
9850
9851 2001-10-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9852
9853 * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
9854
9855 2001-10-25 Zack Weinberg <zack@codesourcery.com>
9856
9857 * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
9858 pop_everything.
9859
9860 2001-10-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9861
9862 * cp-lang.c (cxx_get_alias_set): New function.
9863 Point LANG_HOOKS_GET_ALIAS_SET to it.
9864
9865 2001-10-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9866
9867 * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
9868 * cp-tree.h (make_unbound_class_template): Prototype new function.
9869 * decl.c (make_unbound_class_template): New function.
9870 * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
9871 * error.c (dump_type): Likewise.
9872 * mangle.c (write_type): Likewise.
9873 * parse.y (template_parm): Likewise.
9874 (template_argument): Use make_unbound_class_template.
9875 * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
9876 (tsubst): Likewise.
9877 (tsubst_copy): Likewise.
9878 (unify): Likewise.
9879 * tree.c (walk_tree): Likewise.
9880 * typeck.c (comptypes): Likewise.
9881
9882 2001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9883
9884 * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
9885 extra calls into fewer ones.
9886
9887 2001-10-18 Alexandre Oliva <aoliva@redhat.com>
9888
9889 * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
9890 Warn when merging inline with attribute noinline.
9891 (start_decl, start_function): Warn if inline and attribute
9892 noinline appear in the same declaration.
9893
9894 2001-10-16 H.J. Lu <hjl@gnu.org>
9895
9896 * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
9897 for tree checking disabled.
9898
9899 2001-10-16 Hans-Peter Nilsson <hp@axis.com>
9900
9901 * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
9902 NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
9903
9904 2001-10-15 Richard Sandiford <rsandifo@redhat.com>
9905
9906 * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
9907 (unify): Only handle MINUS_EXPR specially if the above flag is set
9908 and the subtracted constant is 1. Clear the flag on recursive calls.
9909 Set it when unifying the maximum value in an INTEGER_TYPE's range.
9910
9911 2001-10-15 Richard Sandiford <rsandifo@redhat.com>
9912
9913 * decl.c (bad_specifiers): Don't allow exception specifications
9914 on any typedefs.
9915
9916 2001-10-14 Neil Booth <neil@daikokuya.demon.co.uk>
9917
9918 * cp/lex.c (init_cp_pragma): Similarly.
9919
9920 2001-10-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9921
9922 * pt.c (lookup_template_class): Build complete template arguments
9923 for BOUND_TEMPLATE_TEMPLATE_PARM.
9924
9925 2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9926
9927 * cp-tree.h (TYPE_BINFO): Update comment.
9928 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
9929 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
9930 (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
9931 (copy_type): Prototype new function.
9932 * lex.c (copy_lang_decl): Gather tree node statistics.
9933 (copy_lang_type): New function.
9934 (copy_type): Likewise.
9935 (cp_make_lang_type): Create lang_type for
9936 BOUND_TEMPLATE_TEMPLATE_PARM. Set TYPE_BINFO for TYPENAME_TYPE
9937 and BOUND_TEMPLATE_TEMPLATE_PARM.
9938 * pt.c (tsubst): Use copy_type instead of copy_node.
9939 * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
9940
9941 2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9942
9943 * pt.c (determine_specialization): Ignore functions without
9944 DECL_TEMPLATE_INFO.
9945
9946 2001-10-12 Nathan Sidwell <nathan@codesourcery.com>
9947
9948 PR g++/4476
9949 * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
9950
9951 2001-10-11 Jason Merrill <jason_merrill@redhat.com>
9952
9953 * typeck2.c (store_init_value): Don't re-digest a bracketed
9954 initializer.
9955
9956 * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
9957 ANON_AGGR_TYPE_P.
9958
9959 2001-10-11 Richard Henderson <rth@redhat.com>
9960
9961 * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
9962 of an asm statement.
9963 (build_vtbl_ref_1): Split out from build_vtbl_ref.
9964 (build_vfn_ref): Use it to handle vtable descriptors before
9965 calling build_vtable_entry_ref.
9966 * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
9967
9968 2001-10-10 Richard Henderson <rth@redhat.com>
9969
9970 * parse.y (asm_operand): Allow named operands.
9971 * semantics.c (finish_asm_stmt): Tweek for changed location
9972 of the operand constraint.
9973
9974 2001-10-09 Jason Merrill <jason_merrill@redhat.com>
9975
9976 * call.c (standard_conversion): Add bad conversion between
9977 integers and pointers.
9978 (convert_like_real): Don't use convert_for_initialization for bad
9979 conversions; complain here and use cp_convert.
9980 (build_over_call): Don't handle bad conversions specially.
9981 (perform_implicit_conversion): Allow bad conversions.
9982 (can_convert_arg_bad): New fn.
9983 * cp-tree.h: Declare it.
9984 * typeck.c (convert_for_assignment): Use it.
9985 (ptr_reasonably_similar): Any target type is similar to void.
9986
9987 2001-10-08 Alexandre Oliva <aoliva@redhat.com>
9988
9989 * Make-lang.in (CXX_OBJS): Added cp-lang.o.
9990 (cp/cp-lang.o): New rule.
9991 * cp-tree.h: Declare hooks.
9992 * tree.c: Make hooks non-static.
9993 (init_tree): Don't initialize hooks here.
9994 * lex.c: Likewise. Move definition of lang_hooks to...
9995 * cp-lang.c: ... new file.
9996
9997 2001-10-08 Richard Henderson <rth@redhat.com>
9998
9999 * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
10000 (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
10001
10002 2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10003
10004 * class.c (build_vtable_entry_ref): Const-ify.
10005 * decl.c (predefined_identifier,
10006 initialize_predefined_identifiers): Likewise.
10007 * init.c (build_new_1): Likewise.
10008 * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
10009 Likewise.
10010
10011 2001-10-05 Alexandre Oliva <aoliva@redhat.com>
10012
10013 * optimize.c (struct inline_data): Moved to ../tree-inline.c.
10014 (INSNS_PER_STMT): Likewise.
10015 (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
10016 (copy_body, initialize_inlined_parameters): Likewise.
10017 (declare_return_variable, inlinable_function_p): Likewise.
10018 (expand_call_inline, expand_calls_inline): Likewise.
10019 (optimize_inline_calls, clone_body): Likewise.
10020 * tree.c (walk_tree): Moved to ../tree-inline.c.
10021 (walk_tree_without_duplicates): Likewise.
10022 (copy_tree_r, remap_save_expr): Likewise.
10023
10024 2001-10-04 Alexandre Oliva <aoliva@redhat.com>
10025
10026 * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
10027 (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
10028 * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
10029 (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
10030 (flag_inline_trees): Moved declaration to ../tree-inline.h.
10031 (walk_tree): Moved declaration to ../tree-inline.h.
10032 (walk_tree_without_duplicates, copy_tree_r): Likewise.
10033 (remap_save_expr): Likewise.
10034 * decl.c: Include tree-inline.h.
10035 (lang_mark_tree): Don't mark inlined_fns.
10036 * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
10037 * optimize.c: Include tree-inline.h.
10038 (optimize_inline_calls): Move declaration to ../tree.h, as
10039 non-static.
10040 (remap_decl): Use language-independent constructs and hooks.
10041 (remap_block, copy_body_r, declare_return_variable): Likewise.
10042 (inlinable_function_p): Likewise. Don't test for
10043 DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
10044 no longer language-specific.
10045 (optimize_inline_calls): Likewise. Make it non-static. Moved
10046 call of dump_function to...
10047 (optimize_function): Here...
10048 (clone_body): New function, extracted from...
10049 (maybe_clone_body): ... here. Build decl_map locally and pass
10050 it on to clone_body.
10051 * pt.c, semantics.c: Include tree-inline.h.
10052 * tree.c: Likewise.
10053 (cp_walk_subtrees): New language-specific hook for tree inlining.
10054 (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
10055 cp_is_overload_p, cp_auto_var_in_fn_p,
10056 cp_copy_res_decl_for_inlining): Likewise.
10057 (walk_tree): Move language-specific constructs into...
10058 (cp_walk_subtrees): this new function.
10059 (copy_tree_r): Use language-independent constructs and hooks.
10060 (init_tree): Initialize tree inlining hooks.
10061 (remap_save_expr): Adjust prototype so that the declaration
10062 does not require the definition of splay_tree.
10063
10064 2001-10-03 John David Anglin <dave@hiauly1.hia.nrc.ca>
10065
10066 * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
10067 to build the declaration instead of the declaration itself.
10068
10069 2001-10-02 Jason Merrill <jason_merrill@redhat.com>
10070
10071 * decl2.c (cxx_decode_option): Add 'else'.
10072
10073 * spew.c (end_input): No longer static.
10074 * cp-tree.h: Declare it.
10075 * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
10076
10077 2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
10078
10079 * call.c (build_over_call), typeck.c (build_function_call_real):
10080 Pass type attributes to check_function_format rather than name or
10081 assembler name. Don't require there to be a name or assembler
10082 name to check formats.
10083
10084 2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
10085
10086 * decl.c (init_decl_processing): Don't call
10087 init_function_format_info. Initialize lang_attribute_table
10088 earlier.
10089 (builtin_function): Call decl_attributes.
10090 (insert_default_attributes): New.
10091
10092 2001-10-01 Jason Merrill <jason_merrill@redhat.com>
10093
10094 * decl.c (grokdeclarator): Copy array typedef handling from C
10095 frontend.
10096
10097 * decl.c (grokdeclarator): Copy too-large array handling from C
10098 frontend.
10099
10100 2001-09-29 Alexandre Oliva <aoliva@redhat.com>
10101
10102 * config-lang.in (target_libs): Added target-gperf, so that we
10103 don't try to build it if C++ is disabled.
10104
10105 2001-09-23 Zack Weinberg <zack@codesourcery.com>
10106
10107 * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
10108 (cp/errfn.o): Delete rule.
10109 (cp/error.o): Depend on flags.h.
10110 * errfn.c: Delete file.
10111 * cp-tree.h: Declare warn_deprecated. Remove definitions of
10112 TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
10113 and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
10114 cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
10115 internal_error respectively. Make cp_deprecated into a macro.
10116 Don't define cp_printer typedef or declare cp_printers.
10117 * error.c: Include flags.h.
10118 Delete: struct tree_formatting_info, print_function_argument_list,
10119 print_declaration, print_expression, print_function_declaration,
10120 print_function_parameter, print_type_id, print_cv_qualifier_seq,
10121 print_type_specifier_seq, print_simple_type_specifier,
10122 print_elaborated_type_specifier, print_rest_of_abstract_declarator,
10123 print_parameter_declaration_clause, print_exception_specification,
10124 print_nested_name_specifier, and definition of cp_printers.
10125 (locate_error): New function.
10126 (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
10127 rewritten in terms of locate_error and diagnostic.c.
10128 (cp_tree_printer): Rename cp_printer; wire up to *_to_string
10129 instead of deleted print_* routines. Handle %C, %L, %O, %Q also.
10130 (init_error): Adjust to match.
10131
10132 2001-09-22 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10133
10134 * Make-lang.in (CXX_C_OBJS): Add attribs.o.
10135
10136 2001-09-21 Richard Henderson <rth@redhat.com>
10137
10138 * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
10139 (build_vtbl_initializer): Likewise.
10140 (build_vfn_ref): New.
10141 * cp-tree.h: Declare it.
10142 * call.c (build_over_call): Use it.
10143 * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
10144 * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
10145
10146 2001-09-21 J"orn Rennecke <amylaar@redhat.com>
10147
10148 * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
10149
10150 2001-09-21 Joseph S. Myers <jsm28@cam.ac.uk>
10151
10152 Table-driven attributes.
10153 * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
10154 * decl2.c (cplus_decl_attributes): Only take one attributes
10155 parameter.
10156 * cp-tree.c (cplus_decl_attributes): Update prototype.
10157 * class.c (finish_struct), decl.c (start_decl, start_function),
10158 decl2.c (grokfield), friend.c (do_friend), parse.y
10159 (parse_bitfield): Update calls to cplus_decl_attributes.
10160 * decl.c (grokdeclarator): Take a pointer to a single ordinary
10161 attribute list.
10162 * decl.h (grokdeclarator): Update prototype.
10163 * decl2.c (grokfield): Take a single ordinary attribute list.
10164 * friend.c (do_friend): Likewise.
10165 * decl.c (shadow_tag, groktypename, start_decl,
10166 start_handler_parms, grokdeclarator, grokparms, start_function,
10167 start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
10168 parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
10169 (process_template_parm, do_decl_instantiation): Pass single
10170 ordinary attribute lists around.
10171 * decl.c (grokdeclarator): Correct handling of nested attributes.
10172 Revert the patch
10173 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
10174 * decl.c (grokdeclarator): Embedded attrs bind to the right,
10175 not the left.
10176 .
10177 * cp-tree.h (cp_valid_lang_attribute): Remove declaration
10178 (cp_attribute_table): Declare.
10179 * decl.c (valid_lang_attribute): Don't define.
10180 (lang_attribute_table): Define.
10181 (init_decl_processing): Initialize lang_attribute_table instead of
10182 valid_lang_attribute.
10183 * tree.c (cp_valid_lang_attribute): Remove.
10184 (handle_java_interface_attribute, handle_com_interface_attribute,
10185 handle_init_priority_attribute): New functions.
10186 (cp_attribute_table): New array.
10187 * decl2.c (import_export_class): Don't use
10188 targetm.valid_type_attribute.
10189
10190 2001-09-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
10191
10192 * Make-lang.in (cp/error.o): Depend on real.h
10193 * error.c: #include "real.h"
10194
10195 2001-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10196
10197 * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
10198 xmalloc/strcpy/strcat.
10199
10200 2001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10201
10202 * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
10203 Const-ification.
10204 * pt.c (tsubst_decl): Likewise.
10205
10206 2001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10207
10208 * decl2.c (lang_f_options): Const-ification.
10209 * lex.c (cplus_tree_code_name): Likewise.
10210 * spew.c (yyerror): Likewise.
10211
10212 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
10213
10214 PR c++/3986
10215 * class.c (force_canonical_binfo_r): Check & move an indirect
10216 primary base first.
10217 (force_canonical_binfo): Check that it's not already
10218 canonical.
10219 (mark_primary_virtual_base): Remove BINFO parameter.
10220 (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
10221
10222 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
10223
10224 Remove TYPE_NONCOPIED_PARTS.
10225 * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
10226 CLASSTYPE_PURE_VIRTUALS.
10227 (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
10228 * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
10229 (layout_class_type): Don't call fixup_inline_methods here ...
10230 (finish_struct_1): ... call it here.
10231
10232 2001-09-04 Mark Mitchell <mark@codesourcery.com>
10233
10234 * decl.c (duplicate_decls): Remove code deadling with
10235 DECL_SAVED_INSNS.
10236 * decl2.c (finish_file): Likewise.
10237 * pt.c (instantiate_decl): Likewise.
10238 * semantics.c (expand_body): Don't defer local functions if
10239 they wouldn't be deferred for some other reason. Don't
10240 generate RTL for functions that will not be emitted.
10241 (genrtl_start_function): Remove code deadling with
10242 DECL_SAVED_INSNS.
10243 (genrtl_finish_function): Likewise.
10244
10245 2001-09-04 Nathan Sidwell <nathan@codesourcery.com>
10246
10247 PR c++/4203
10248 * call.c (build_over_call): Do not optimize any empty base
10249 construction.
10250
10251 2001-08-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10252
10253 * error.c (dump_template_decl): Output template parameters
10254 together with their specifiers.
10255 Output `class' prefix for template template parameter.
10256 (dump_decl): Fix formatting.
10257
10258 2001-08-30 Kurt Garloff <garloff@suse.de>
10259
10260 * optimize.c (inlinable_function_p): Allow only smaller single
10261 functions. Halve inline limit after reaching recursive limit.
10262
10263 2001-08-30 Joern Rennecke <amylaar@redhat.com>
10264 Jason Merrill <jason_merrill@redhat.com>
10265
10266 * class.c (build_vtable_entry_ref): Subtract in char*, not
10267 ptrdiff_t.
10268
10269 2001-08-23 Jason Merrill <jason_merrill@redhat.com>
10270
10271 * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
10272 (build_cplus_array_type): Use cp_build_qualified_type, not
10273 TYPE_MAIN_VARIANT, to get an unqualified version.
10274
10275 * decl2.c (grok_alignof): Lose.
10276 (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
10277 * typeck.c (c_alignof): Lose.
10278 * semantics.c (finish_sizeof, finish_alignof): New.
10279 * parse.y: Use them.
10280 * cp-tree.h: Declare them.
10281
10282 2001-08-22 Jason Merrill <jason_merrill@redhat.com>
10283
10284 * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
10285 Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
10286 * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
10287
10288 2001-08-19 Jakub Jelinek <jakub@redhat.com>
10289
10290 * typeck2.c (add_exception_specifier): Only require complete type if
10291 not in processing template declaration.
10292
10293 2001-08-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10294
10295 * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
10296 GNU_xref_start_scope and GNU_xref_end_scope.
10297
10298 * tree.c (TYPE_HASH): Moved to ../tree.h.
10299
10300 2001-08-16 Mark Mitchell <mark@codesourcery.com>
10301
10302 * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
10303 on COMPOUND_EXPRs.
10304
10305 2001-08-14 Richard Henderson <rth@redhat.com>
10306
10307 * class.c, cp-tree.h (build_vfn_ref): Remove.
10308 * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
10309
10310 2001-08-13 Mark Mitchell <mark@codesourcery.com>
10311
10312 * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
10313 empty class assignment as having side-effects to avoid
10314 spurious warnings.
10315
10316 2001-08-13 Zack Weinberg <zackw@panix.com>
10317
10318 * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
10319 * except.c: Include libfuncs.h.
10320
10321 2001-08-11 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
10322
10323 * decl.c (grokdeclarator): Clarify diagnostic message.
10324
10325 2001-08-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10326
10327 * decl2.c (do_nonmember_using_decl): Replace using directive
10328 with using declaration in the error message.
10329
10330 2001-08-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10331
10332 * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
10333 criterion to avoid rebuilding expression tree instead of
10334 processing_template_decl.
10335
10336 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
10337
10338 Support named return value optimization for inlines, too.
10339 * decl.c (finish_function): Nullify returns here.
10340 * semantics.c (genrtl_start_function): Not here.
10341 (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
10342 (nullify_returns_r): No longer static. Just clear RETURN_EXPR.
10343 Also nullify the CLEANUP_STMT for the nrv.
10344 * cp-tree.h: Declare it.
10345 * optimize.c (declare_return_variable): Replace the nrv with the
10346 return variable.
10347 * typeck.c (check_return_expr): Be more flexible on alignment check.
10348 Ignore cv-quals when checking for a matching type.
10349
10350 2001-08-09 Richard Henderson <rth@redhat.com>
10351
10352 * decl2.c (finish_objects): Use target hooks instead of
10353 assemble_constructor and assemble_destructor.
10354
10355 2001-08-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
10356
10357 * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
10358
10359 2001-08-07 Nathan Sidwell <nathan@codesourcery.com>
10360
10361 PR c++/3820
10362 Stop using TYPE_NONCOPIED_PARTS.
10363 * call.c (build_over_call): Be careful when copy constructing
10364 or assigning to an empty class.
10365 * class.c (check_bases_and_members): It has a
10366 COMPLEX_ASSIGN_REF if it has a vptr.
10367 (layout_class_type): Don't add empty class padding to
10368 TYPE_NONCOPIED_PARTS.
10369 (finish_struct_1): Don't add the VFIELD either.
10370 * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
10371 initialization.
10372
10373 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
10374
10375 * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
10376
10377 2001-08-06 Richard Henderson <rth@redhat.com>
10378
10379 * decl2.c (finish_objects): Pass a symbol_ref and priority to
10380 assemble_{constructor,destructor}. Remove priority handling.
10381
10382 2001-08-05 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
10383
10384 Don't allow template-id in using-declaration.
10385 * decl2.c (validate_nonmember_using_decl): Handle template-ids.
10386 (do_class_using_decl): Likewise.
10387
10388 2001-08-04 Neil Booth <neil@cat.daikokuya.demon.co.uk>
10389
10390 * cp/spew.c (read_token): No need to pop buffers.
10391
10392 2001-08-02 Stan Shebs <shebs@apple.com>
10393
10394 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
10395 (fnaddr_from_vtable_entry): Remove decl.
10396 * method.c (use_thunk): Update comment.
10397
10398 2001-08-01 Andrew Cagney <ac131313@redhat.com>
10399
10400 * repo.c (get_base_filename): Change return value to const char
10401 pointer.
10402
10403 2001-08-02 Nathan Sidwell <nathan@codesourcery.com>
10404
10405 Kill -fhonor-std.
10406 * NEWS: Document.
10407 * cp-tree.h (flag_honor_std): Remove.
10408 (CPTI_FAKE_STD): Remove.
10409 (std_node): Remove comment about it being NULL.
10410 (fake_std_node): Remove.
10411 * decl.c (in_fake_std): Remove.
10412 (walk_namespaces_r): Remove fake_std_node check.
10413 (push_namespace): Remove in_fake_std code.
10414 (pop_namespace): Likewise.
10415 (lookup_name_real): Remove fake_std_node check.
10416 (init_decl_processing): Always create std_node. Always add
10417 std:: things there.
10418 (builtin_function): Always put non '_' fns in std.
10419 * decl2.c (flag_honor_std): Remove.
10420 (lang_f_options): Remove honor-std.
10421 (unsupported_options): Add honor-std.
10422 (set_decl_namespace): Remove fake_std_node check.
10423 (validate_nonmember_using_decl): Likewise.
10424 (do_using_directive): Likewise.
10425 (handle_class_head): Likewise.
10426 * dump.c (cp_dump_tree): Likewise.
10427 * except.c (init_exception_processing): Adjust.
10428 * init.c (build_member_call): Remove fake_std_node check.
10429 (build_offset_ref): Likewise.
10430 * lang-options.h: Remove -fhonor-std, -fno-honor-std.
10431 * rtti.c (init_rtti_processing): Adjust.
10432
10433 2001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
10434
10435 * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
10436 operand while calling cp_tree_equal.
10437
10438 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
10439
10440 The 3.0 ABI no longer has vbase pointer fields.
10441 * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
10442 FORMAT_VBASE_NAME): Remove.
10443 * method.c (do_build_copy_constructor): Adjust.
10444 (do_build_assign_ref): Adjust.
10445 * search.c (lookup_field_r): Adjust.
10446 * typeck.c (build_component_ref): Adjust.
10447
10448 The 3.0 ABI always has a vtable pointer at the start of every
10449 polymorphic class.
10450 * rtti.c (build_headof_sub): Remove.
10451 (build_headof): Adjust.
10452 (get_tinfo_decl_dynamic): No need to check flag_rtti
10453 here. Adjust.
10454 (create_real_tinfo_var): Explain why we need a hidden name.
10455
10456 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
10457
10458 PR c++/3631
10459 * class.c (update_vtable_entry_for_fn): The fixed adjustment
10460 of a virtual thunk should be from declaring base.
10461
10462 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
10463
10464 * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
10465 the shared virtual base, so preserving inheritance graph order.
10466
10467 2001-07-30 Andreas Jaeger <aj@suse.de>
10468
10469 * decl2.c: Remove unused var global_temp_name_counter.
10470
10471 2001-07-28 Richard Henderson <rth@redhat.com>
10472
10473 * method.c (pending_inlines): Remove.
10474
10475 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
10476
10477 * class.c (mark_primary_virtual_base): Don't adjust base
10478 offsets here.
10479 (dfs_unshared_virtual_bases): Adjust them here.
10480 (mark_primary_bases): Explain why we adjust at the end.
10481
10482 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
10483
10484 * class.c (finish_struct_1): When copying the primary base's
10485 VFIELD, make sure we find it is at offset zero.
10486
10487 2001-07-26 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10488
10489 * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
10490 tsubst_expr for default template arguments.
10491
10492 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
10493
10494 PR c++/3621
10495 * spew.c (yylex): Only copy the token's lineno, if it is
10496 nonzero.
10497
10498 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
10499
10500 PR c++/3624
10501 * call.c (resolve_args): Simplify, call
10502 convert_from_reference.
10503 (build_new_op): Resolve and convert from reference ARG1
10504 earlier. Adjust ARG2 & ARG3 resolve and conversion.
10505
10506 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
10507
10508 * decl.c (last_function_parm_tags): Remove.
10509 (current_function_parm_tags): Remove.
10510 (init_decl_processing): Adjust.
10511 (start_function): Adjust.
10512 (store_parm_decls): Adjust.
10513
10514 PR c++/3152
10515 * decl.c (grokdeclarator): Detect when a function typedef is
10516 declaring a function, and create last_function_parms correctly.
10517
10518 2001-07-25 Jason Merrill <jason_merrill@redhat.com>
10519
10520 * call.c (joust): Only prefer a non-builtin candidate to a builtin
10521 one if they have the same signature.
10522
10523 * cvt.c (build_up_reference): Take DECL parm. Check TREE_STATIC on
10524 it rather than toplevel_bindings_p. Give it a mangled name if static.
10525 (convert_to_reference): Adjust.
10526 * decl2.c (get_temp_name): Lose.
10527 * mangle.c (mangle_ref_init_variable): New fn.
10528 (mangle_guard_variable): Strip the ref-init header.
10529 * cp-tree.h: Adjust.
10530 * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
10531 initializer.
10532 (grok_reference_init): Always use DECL_INITIAL.
10533
10534 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
10535
10536 PR c++/3416
10537 * call.c (build_conditional_expr): Recheck args after
10538 conversions.
10539 * cp-tree.h (build_conditional_expr): Move to correct file.
10540 * typeck.c (decay_conversion): Diagnose any unknown types
10541 reaching here.
10542 (build_binary_op): Don't do initial decay or default
10543 conversions on overloaded functions.
10544 (build_static_cast): Don't do a decay conversion here.
10545
10546 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
10547
10548 PR c++/3543
10549 * typeck.c (condition_conversion): Resolve an OFFSET_REF.
10550 * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
10551
10552 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
10553
10554 * class.c (build_vtbl_or_vbase_field): Remove, move into ...
10555 (create_vtbl_ptr): ... here.
10556
10557 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
10558
10559 * class.c (build_vbase_offset_vbtl_entries): Look for
10560 non-primary base of which we are a sub vtable.
10561
10562 2001-07-24 Phil Edwards <pme@sources.redhat.com>
10563
10564 * semantics.c (finish_this_expr): Remove unused code.
10565
10566 2001-07-24 Nathan Sidwell <nathan@codesourcery.com>
10567
10568 Simplify rtti, now we've only one ABI.
10569 * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
10570 CPTI_TINFO_VAR_ID.
10571 (tinfo_decl_id, tinfo_var_id): Remove.
10572 (get_typeid_1): Remove.
10573 * rtti.c
10574 (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
10575 (typeid_ok_p): New function.
10576 (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
10577 (get_tinfo_decl): Remove old abi documentation.
10578 (tinfo_from_decl): Remove.
10579 (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
10580 (get_typeid_1): Remove.
10581 (get_base_offset): Remove.
10582 (synthesize_tinfo_var): Absorb get_base_offset.
10583 (create_real_tinfo_var): Don't use tinfo_decl_id.
10584
10585 2001-07-23 Graham Stott <grahams@redhat.com>
10586
10587 * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
10588 variable has_two_argument_delete_p.
10589
10590 2001-07-21 Nathan Sidwell <nathan@codesourcery.com>
10591
10592 Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
10593 * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
10594 (CPTI_INDEX_IDENTIFIER): Remove.
10595 (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
10596 (delta2_identifier): Remove.
10597 (index_identifier): Remove.
10598 (pfn_or_delta2_identifier): Remove.
10599 (flag_vtable_thunks): Remove.
10600 (VTABLE_DELTA2_NAME): Remove.
10601 (VTABLE_INDEX_NAME): Remove.
10602 (FNADDR_FROM_VTABLE_ENTRY): Adjust.
10603 (vfunc_ptr_type_node): Adjust.
10604 (VTABLE_NAME_PREFIX): Adjust.
10605 (build_vfn_ref): Lose first parameter.
10606 (fixup_all_virtual_upcast_offsets): Remove.
10607 * decl.c (initialize_predefined_identifiers): Remove
10608 delta2_identifier, index_identifier, pfn_or_delta2_identifier.
10609 (init_decl_processing): Remove no-vtable-thunk code.
10610 * decl2.c (flag_vtable_thunks): Remove.
10611 (mark_vtable_entries): Remove no-vtable-thunk code.
10612 * error.c (dump_decl): Remove no-vtable-thunk code.
10613 (dump_expr): Adjust ptr to member function code.
10614 * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
10615 code.
10616 * rtti.c (build_headof): Remove no-vtable-thunk code.
10617 (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
10618 * search.c (get_base_distance): Remove expand_upcast_fixups case.
10619 (virtual_context) Remove.
10620 (expand_upcast_fixups): Remove.
10621 (fixup_virtual_upcast_offsets): Remove.
10622 (fixup_all_virtual_upcast_offsets): Remove.
10623 * typeck.c (get_member_function_from_ptrfunc): Remove
10624 no-vtable-thunk code.
10625 * call.c (build_over_call): Adjust call to build_vfn_ref.
10626 * class.c (build_vfn_ref): Lose first parameter. Remove
10627 no-vtable-thunk code.
10628 (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
10629 (build_vtable_entry): Remove no-vtable-thunk code.
10630
10631 2001-07-20 Nathan Sidwell <nathan@codesourcery.com>
10632
10633 Remove old-abi remnants. Remove comments about old abi
10634 behavior. Remove references to 'new-abi' in comments.
10635 * cp-tree.h: Adjust comments.
10636 (vbase_offsets_in_vtable_p): Delete.
10637 (vcall_offsets_in_vtable_p): Delete.
10638 (vptrs_present_everywhere_p): Delete.
10639 (all_overridden_vfuns_in_vtables_p): Delete.
10640 (merge_primary_and_secondary_vtables_p): Delete.
10641 (TYPE_CONTAINS_VPTR_P): Adjust.
10642 (VTT_NAME_PREFIX): Remove.
10643 (CTOR_VTBL_NAME_PREFIX): Remove.
10644 (init_vbase_pointers): Remove.
10645 * class.c: Adjust coments.
10646 (build_vbase_pointer_fields): Delete.
10647 (build_vbase_pointer): Remove old-abi code.
10648 (build_secondary_vtable): Likewise.
10649 (modify_all_vtables): Likewise.
10650 (create_vtable_ptr): Likewise.
10651 (layout_class_type): Likewise.
10652 (finish_struct_1): Likewise.
10653 (finish_vtbls): Likewise.
10654 (dfs_finish_vtbls): Delete.
10655 (build_vbase_offset_vtbl_entries): Remove old-abi code.
10656 * cvt.c: Adjust comments.
10657 * decl.c: Adjust comments.
10658 * decl2.c: Adjust comments.
10659 * init.c: Adjust comments.
10660 (construct_virtual_bases): Remove old-abi code.
10661 * lang-specs.h: Remove -fno-new-abi.
10662 * mangle.c: Adjust comments.
10663 * rtti.c: Adjust comments.
10664 (get_base_offset): Remove old-abi-code.
10665 * search.c: Adjust comments.
10666 (dfs_init_vbase_pointers): Remove.
10667 (dfs_vtable_path_unmark): Remove.
10668 (init_vbase_pointers): Remove.
10669 * semantics.c: Adjust comments.
10670 (emit_associated_thunks): Remove old-abi code.
10671 * typeck.c: Adjust comments.
10672
10673 2001-07-20 Daniel Berlin <dan@cgsoftware.com>
10674
10675 * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
10676 params.h.
10677
10678 2001-07-19 Mark Mitchell <mark@codesourcery.com>
10679
10680 * class.c (finish_struct_anon): Forbid nested classes.
10681
10682 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
10683
10684 * decl2.c: Don't include dwarfout.h and dwarf2out.h.
10685 * optimize.c: Include debug.h.
10686 (maybe_clone_body): Use debug hook.
10687 * semantics.c: Include debug.h.
10688 (expand_body): Use debug hook.
10689
10690 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
10691
10692 * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
10693
10694 2001-07-18 Mark Mitchell <mark@codesourcery.com>
10695
10696 * class.c (type_requires_array_cookie): New function.
10697 (check_methods): Don't try to figure out whether the type needs a
10698 cookie here.
10699 (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
10700 * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
10701 (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
10702 * pt.c (instantiate_class_template): Don't set
10703 TYPE_VEC_DELETE_TAKES_SIZE.
10704 * NEWS: Document ABI changes from GCC 3.0.
10705
10706 2001-07-18 Xavier Delacour <xavier@fmaudio.net>,
10707 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
10708
10709 * NEWS (Changes in GCC 3.0): Fix typo.
10710
10711 2001-07-13 Joseph S. Myers <jsm28@cam.ac.uk>
10712
10713 * decl2.c (cplus_decl_attributes): Take a pointer to the node to
10714 which attributes are to be attached, and a flags argument. Update
10715 call to decl_attributes.
10716 (grokfield): Update call to decl_attributes.
10717 * class.c (finish_struct): Update call to cplus_decl_attributes.
10718 * cp-tree.h (cplus_decl_attributes): Update prototype.
10719 * decl.c (start_decl, grokdeclarator, start_function): Update
10720 calls to decl_attributes and cplus_decl_attributes.
10721 * friend.c (do_friend): Update call to cplus_decl_attributes.
10722 * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
10723
10724 2001-07-12 Mark Mitchell <mark@codesourcery.com>
10725
10726 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
10727 for `register' variables with an asm-specification.
10728
10729 2001-07-11 Mark Mitchell <mark@codesourcery.com>
10730
10731 * semantics.c (finish_asm_stmt): Mark the output operands
10732 to an asm addressable, if necessary.
10733
10734 2001-07-11 Ben Elliston <bje@redhat.com>
10735
10736 * Revert this change -- there is a subtle bug.
10737
10738 PR c++/80
10739 * decl.c (finish_enum): New "attributes" argument; pass it to
10740 cplus_decl_attributes. Use a narrower type if the enum is packed.
10741 * cp-tree.h (finish_enum): Adjust prototype.
10742 * parse.y (enum_head): New non-terminal.
10743 (structsp): Use it. Enums now may be preceded or followed by
10744 optional attributes -- pass their chained tree to finish_enum().
10745 * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
10746
10747 2001-07-10 Mark Mitchell <mark@codesourcery.com>
10748
10749 * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
10750 variables.
10751
10752 2001-07-10 Jason Merrill <jason_merrill@redhat.com>
10753
10754 * semantics.c (cp_expand_stmt): Fix for null
10755 current_function_return_value.
10756
10757 2001-07-10 Jan van Male <jan.vanmale@fenk.wau.nl>
10758
10759 * call.c (build_op_delete_call): Initialize fn.
10760 (convert_like_real): Delete conditional.
10761 (joust): Initialize *w and *l.
10762 * class.c: Add prototype for binfo_ctor_vtable.
10763 (get_primary_binfo): Initialize result.
10764 * init.c (build_java_class_ref): Initialize name.
10765
10766 2001-07-09 Erik Rozendaal <dlr@acm.org>
10767
10768 * typeck.c (unary_complex_lvalue): Do not duplicate the
10769 argument to modify, pre-, or post-increment when used as an
10770 lvalue and when the argument has side-effects.
10771
10772 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
10773
10774 * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
10775 (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES. Call
10776 cplus_decl_attributes even if attrs is NULL.
10777 * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
10778
10779 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
10780
10781 * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
10782 calls to decl_attributes.
10783
10784 2001-07-06 Ira Ruben <ira@apple.com>
10785
10786 * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
10787 be DECL_TEMPLATE_RESULT.
10788
10789 2001-07-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10790
10791 * cp-tree.h (copy_template_template_parm): Rename to ...
10792 (bind_template_template_parm): ... here.
10793 * tree.c (copy_template_template_parm): Rename to ...
10794 (bind_template_template_parm): ... here. Remove the case when
10795 NEWARGS is NULL_TREE.
10796 (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
10797 BOUND_TEMPLATE_TEMPLATE_PARM.
10798 * pt.c (lookup_template_class): Adjust.
10799
10800 2001-07-05 Jason Merrill <jason_merrill@redhat.com>
10801
10802 * cvt.c (convert_lvalue): New fn.
10803 * cp-tree.h: Declare it.
10804 * method.c (do_build_assign_ref): Use it.
10805 (do_build_copy_constructor): Convert parm to base types
10806 before calling base constructors.
10807
10808 * typeck.c (check_return_expr): Check DECL_ALIGN instead of
10809 DECL_USER_ALIGN. Check flag_elide_constructors instead of
10810 optimize.
10811 * semantics.c (cp_expand_stmt): Don't destroy the named return value.
10812
10813 2001-07-02 Nathan Sidwell <nathan@codesourcery.com>
10814
10815 * optimize.c (optimize_inline_calls): New function, broken out
10816 of ...
10817 (optimize_function): ... here. Call it. Don't inline if it is
10818 a thunk.
10819 (dump_function): Print name of dump flag causing this dump.
10820 * semantics.c (expand_body): Move thunk inline check to
10821 optimize_function.
10822
10823 2001-06-29 Joseph S. Myers <jsm28@cam.ac.uk>
10824
10825 * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
10826 (comptypes): Use target.comp_type_attributes.
10827
10828 2001-06-29 Nathan Sidwell <nathan@codesourcery.com>
10829
10830 * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
10831
10832 2001-06-28 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
10833
10834 * error.c (lang_print_error_function): Add a `diagnostic_context *'
10835 parameter. Tweak.
10836
10837 2001-06-27 Neil Booth <neil@cat.daikokuya.demon.co.uk>
10838
10839 * decl2.c (import_export_class): Update.
10840
10841 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
10842
10843 * error.c (init_error): Adjust settings.
10844
10845 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
10846
10847 * error.c (init_error): Adjust settings.
10848
10849 2001-06-19 Richard Sandiford <rsandifo@redhat.com>
10850
10851 * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
10852 return pointers to data members by reference rather than by value.
10853
10854 2001-06-18 Jason Merrill <jason_merrill@redhat.com>
10855
10856 Implement the Named Return Value optimization.
10857 * cp-tree.h (struct cp_language_function): Add x_return_value.
10858 (current_function_return_value): Now a macro.
10859 * decl.c: Don't define it.
10860 (define_label, finish_case_label): Don't clear it.
10861 (init_decl_processing): Don't register it with GC.
10862 * semantics.c (genrtl_finish_function): Don't check it for
10863 no_return_label. Copy the RTL from the return value to
10864 current_function_return_value and walk, calling...
10865 (nullify_returns_r): ...this new fn.
10866 * typeck.c (check_return_expr): Set current_function_return_value.
10867
10868 2001-06-15 Jason Merrill <jason_merrill@redhat.com>
10869
10870 * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
10871 sharing a ctor vtable with. Merge code for cases 1 and 2.
10872 (binfo_ctor_vtable): New fn.
10873 (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
10874
10875 2001-06-14 Jason Merrill <jason_merrill@redhat.com>
10876
10877 * class.c (dfs_find_final_overrider): Fix logic.
10878
10879 * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
10880 virtual thunk instead of non-virtual.
10881 (get_matching_virtual): Uncomment.
10882
10883 * pt.c (unify): Don't recurse between the POINTER_TYPE and the
10884 OFFSET_TYPE. If we're adding cv-quals, the extra ones would be on
10885 PARM, not ARG.
10886
10887 2001-06-14 Nathan Sidwell <nathan@codesourcery.com>
10888
10889 * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
10890 we've not emerged from the hierarchy of RTTI_BINFO on reaching
10891 a non-virtual base.
10892
10893 2001-06-13 Mark Mitchell <mark@codesourcery.com>
10894
10895 * NEWS: Update release number.
10896
10897 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
10898
10899 PR c++/3130, c++/3131, c++/3132
10900 * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
10901 * class.c (force_canonical_binfo_r): Move
10902 BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
10903 virtual bases unless they're primary and what they're primary
10904 too has been moved.
10905 (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
10906 with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
10907 BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
10908 derived binfo.
10909 (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
10910 (layout_nonempty_base_or_field): Add most derived type
10911 parameter. Adjust.
10912 (layout_empty_base): Likewise.
10913 (build_base_field): Likewise.
10914 (build_base_fields): Likewise.
10915 (propagate_binfo_offsets): Add most derived type
10916 parameter. Skip non canonical virtual bases too.
10917 (dfs_set_offset_for_unshared_vbases): Don't skip primary
10918 bases. Do skip canonical bases.
10919 (layout_virtual_bases): Adjust.
10920 (layout_class_type): Adjust.
10921 (dfs_get_primary_binfo): Build list of virtual primary base
10922 candidates.
10923 (get_primary_binfo): Check that the shared virtual primary
10924 base candidate was found first.
10925 (accumulate_vtbl_inits): Don't do anything for non-vptr
10926 containing binfos. For case 1 primary virtual bases, keep
10927 checking that we've not emerged from the hierarchy of RTTI_BINFO.
10928
10929 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
10930
10931 PR c++/3089
10932 * class.c (dfs_accumulate_vtbl_inits): Always walk down the
10933 hierarchy looking for primary bases for a ctor
10934 vtable. Recursively call oneself, if we meet our primary via
10935 this route and haven't met it yet via inheritance graph order.
10936
10937 2001-06-11 Mark Mitchell <mark@codesourcery.com>
10938
10939 * lang-options.h: Emit documentation for -fno-honor-std, not
10940 -fhonor-std.
10941
10942 2001-06-10 Alexandre Oliva <aoliva@redhat.com>
10943
10944 * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
10945 Don't clobber delta.
10946 (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
10947
10948 2001-06-10 Mark Mitchell <mark@codesourcery.com>
10949 Gabriel Dos Reis <gdr@codesourcery.com>
10950
10951 * Make-lang.in (cp/call.o): Depend on diagnostic.h
10952 (cp/typeck.o): Depend on diagnostic.h
10953 (cp/typeck2.o): Depend on diagnostic.h
10954 (cp/repo.o): Depend on dignostic.h
10955 * typeck.c: #include diagnostic.h
10956 (convert_for_initialization): Remove extern declaration for
10957 warningcount and errorcount.
10958
10959 * call.c: #include diagnostic.h
10960 (convert_like_real): Remove extern declaration for warnincount and
10961 errorcount.
10962
10963 * repo.c: #include diagnostic.h
10964 * typeck2.c: #include diagnostic.h
10965
10966 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
10967
10968 * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
10969 in previous change.
10970
10971 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
10972
10973 PR c++/2929
10974 * friend.c (do_friend): Use push_decl_namespace for classes at
10975 namespace scope.
10976
10977 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
10978 Jason Merrill <jason_merrill@redhat.com>
10979
10980 PR c++/3061
10981 * class.c (build_secondary_vtable): Use assert, rather than an error
10982 message.
10983 (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
10984 (dfs_accumulate_vtbl_inits): A lost primary virtual base may
10985 be between ORIG_BINFO and RTTI_BINFO, but neither of them.
10986 Don't set BINFO_VTABLE for a primary virtual base.
10987
10988 2001-06-07 Mark Mitchell <mark@codesourcery.com>
10989
10990 * decl.c (duplicate_decls): Update source position information
10991 when a template function is defined.
10992
10993 2001-06-07 Phil Edwards <pme@sources.redhat.com>
10994
10995 * lang-specs.h: Move -D_GNU_SOURCE to config/linux.h.
10996
10997 2001-06-07 Nathan Sidwell <nathan@codesourcery.com>
10998
10999 PR c++/2914
11000 * decl.c (pushtag): Don't push into a complete type's scope.
11001
11002 2001-06-06 Jason Merrill <jason_merrill@redhat.com>
11003
11004 * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
11005 (struct lang_decl_flags): Lose generate_with_vtable_p.
11006 (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
11007 * class.c (copy_virtuals): Adjust.
11008 * decl2.c (mark_vtable_entries): Adjust.
11009 * method.c (make_thunk, build_vtable_entry): Adjust.
11010 * class.c (update_vtable_entry_for_fn): Only look as far as the
11011 first defining class.
11012 (build_vtbl_initializer): Put nothing in the slot for a function only
11013 defined in a lost primary virtual base.
11014 (add_vcall_offset_vtbl_entries_1): Use the same code for
11015 the lost primary case and the normal case.
11016 (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
11017 (get_vfield_offset, get_derived_offset): Lose.
11018 (dfs_find_final_overrider): Use look_for_overrides_here.
11019 (get_matching_virtual): New fn.
11020 * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
11021 not BV_VCALL_INDEX.
11022 * search.c (look_for_overrides_here): Split out from...
11023 (look_for_overrides_r): Here.
11024
11025 * class.c (find_final_overrider): Return error_mark_node on error.
11026
11027 * decl2.c (key_method): #if 0 accidental change.
11028
11029 2001-06-06 John David Anglin <dave@hiauly1.hia.nrc.ca>
11030
11031 * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
11032 (build_over_call): Likewise.
11033 * decl.c (grokparms): Likewise.
11034 * pt.c (tsubst_decl): Likewise.
11035 * typeck.c (convert_arguments): Likewise.
11036
11037 2001-06-05 Mark Mitchell <mark@codesourcery.com>
11038
11039 * semantics.c (begin_class_definition): Robustify.
11040
11041 * pt.c (instantiate_decl): Tell the repository code about the
11042 clones, not the cloned functions.
11043 * repo.c (repo_template_used): Explicitly instantiate the cloned
11044 function, not the clones.
11045
11046 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
11047
11048 * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
11049 ICS_BAD_FLAG on created conversion.
11050 (compare_ics): Break out rank.
11051
11052 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
11053
11054 * decl.c (xref_tag): Remove extraneous %s on dependent name
11055 lookup warning.
11056
11057 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
11058
11059 * class.c (layout_vtable_decl): Fix off by one error on
11060 build_index_type.
11061 (build_vtt): Likewise.
11062 (build_ctor_vtbl_group): Likewise.
11063
11064 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
11065
11066 * class.c (maybe_indent_hierarchy): New function.
11067 (dump_class_hierarchy_r): Add flags. Dump extra binfo
11068 information, if enabled. Use maybe_indent_hierarchy. Adjust
11069 output format.
11070 (dump_class_hierarchy): Adjust prototype. Adjust output format.
11071 (dump_array, dump_vtable, dump_vtt): New functions.
11072 (finish_struct_1): Adjust hierarchy dumping.
11073 (initialize_vtable): Call dump_vtable.
11074 (build_vtt): Call dump_vtt.
11075 (build_ctor_vtbl_group): Call dump_vtable.
11076 * decl2.c (flag_dump_class_layout): Remove.
11077 (cxx_decode_option): Remove dump translation unit
11078 and dump class hierarchy check. Call dump_switch_p.
11079 (finish_file): Adjust dumping.
11080 (dump.c): Only dump base classes if not TDF_SLIM.
11081 Only dump namespace members if not TDF_SLIM.
11082 * optimize.c (dump_function): New function.
11083 (optimize_function): Call dump_function.
11084 * semantics.c (expand_body): Use dump_enabled_p.
11085
11086 2001-06-01 Nathan Sidwell <nathan@codesourcery.com>
11087
11088 PR g++/2936
11089 Part missed from first commit
11090 * decl2.c (finish_anon_union): Copy context.
11091
11092 2001-05-30 Nathan Sidwell <nathan@codesourcery.com>
11093
11094 PR g++/2936
11095 * optimize.c (remap_decl): Remap anonymous aggregate members too.
11096
11097 2001-05-26 Nathan Sidwell <nathan@codesourcery.com>
11098
11099 PR g++/2823
11100 * semantics.c (expand_body): Don't optimize thunks.
11101
11102 2001-05-25 Sam TH <sam@uchicago.edu>
11103
11104 * cp-tree.h lex.h: Fix header include guards.
11105
11106 2001-05-25 Mark Mitchell <mark@codesourcery.com>
11107
11108 * decl.c (init_decl_processing): Tweak.
11109
11110 2001-05-24 Mark Mitchell <mark@codesourcery.com>
11111
11112 * decl.c (duplicate_decls): Tidy.
11113 (init_decl_processing): Always set flag_no_builtin.
11114
11115 2001-05-24 Nathan Sidwell <nathan@codesourcery.com>
11116
11117 PR c++/2184
11118 * decl2.c (do_local_using_decl): Push the decls, even in a
11119 template.
11120
11121 2001-05-22 Mark Mitchell <mark@codesourcery.com>
11122
11123 * optimize.c (initialize_inlined_parameters): Don't set
11124 TREE_READONLY for a VAR_DECL taking the place of an inlined
11125 PARM_DECL.
11126
11127 2001-05-22 Jason Merrill <jason_merrill@redhat.com>
11128
11129 * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
11130 * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
11131 attribute.
11132
11133 2001-05-22 Joseph S. Myers <jsm28@cam.ac.uk>
11134
11135 * parse.y: Refer to compound literals as such, not as
11136 constructor-expressions.
11137
11138 2001-05-21 Mark Mitchell <mark@codesourcery.com>
11139
11140 * call.c (build_op_delete_call): Ignore exception-specifications
11141 when looking for matching delete operators.
11142 * init.c (build_new_1): Compute whether or not the allocation
11143 function used is a placement allocation function or not, and
11144 communicate this information to build_op_delete_call.
11145
11146 2001-05-21 Jason Merrill <jason_merrill@redhat.com>
11147
11148 * class.c (build_vtable_entry_ref): Lose vtbl parm. Fix for new abi.
11149 (build_vtbl_ref): Adjust.
11150 (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
11151 * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
11152 Re-add vtable-gc.
11153 (unsupported_options): Correspondingly.
11154
11155 * decl2.c (maybe_make_one_only): Check flag_weak, not
11156 supports_one_only().
11157
11158 * cp-tree.def (START_CATCH_STMT): Lose.
11159 * dump.c (cp_dump_tree): Don't dump it. Do dump HANDLER_PARMS.
11160 * tree.c (cp_statement_code_p): Don't case it.
11161 * semantics.c (cp_expand_stmt): Likewise.
11162 * cp-tree.h (START_CATCH_TYPE): Lose.
11163 (HANDLER_TYPE): New.
11164 * except.c (expand_start_catch_block): Don't start any blocks.
11165 Return the type.
11166 (expand_end_catch_block): Don't end any blocks.
11167 * parse.y (handler): Don't pass anything from finish_handler_parms
11168 to finish_handler.
11169 * pt.c (tsubst_expr): Likewise.
11170 * semantics.c (begin_handler): Call note_level_for_catch here.
11171 (finish_handler_parms): Don't return anything.
11172 (genrtl_catch_block, begin_catch_block): Lose.
11173 (genrtl_handler): Call expand_start_catch here.
11174
11175 2001-05-18 Jason Merrill <jason_merrill@redhat.com>
11176
11177 * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
11178 (get_vtable_decl, build_vtt): Not here.
11179
11180 2001-05-20 Nathan Sidwell <nathan@codesourcery.com>
11181
11182 PR c++/2781
11183 * optimize.c (update_cloned_parm): Copy addressability and other
11184 flags.
11185
11186 2001-05-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11187
11188 * pt.c (determine_specialization): Ignore artificial functions.
11189
11190 2001-05-20 Neil Booth <neil@daikokuya.demon.co.uk>
11191
11192 * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
11193 (C_RID_CODE): Remove.
11194 * lex.c (cxx_init_options): Call set_identifier_size. Update.
11195 (init_parse): Don't do it here.
11196
11197 2001-05-18 Diego Novillo <dnovillo@redhat.com>
11198
11199 * decl2.c (finish_objects): Use the original SYMBOL_REF from the
11200 function declaration to avoid stripping the symbol's attributes.
11201
11202 2001-05-18 Nathan Sidwell <nathan@codesourcery.com>
11203
11204 * decl.c (pushdecl): Adjust error string.
11205 (xref_tag): Adjust friend class injection warning. Remove the
11206 inherited name from the class shadowed scope.
11207
11208 2001-05-17 Mark Mitchell <mark@codesourcery.com>
11209
11210 * except.c (cp_protect_cleanup_actions): New function.
11211 (init_exception_processing): Don't set protect_cleanup_actions
11212 here. Do set lang_protect_cleanup_actions.
11213
11214 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
11215
11216 * spew.c (read_token): Call yyerror on all unexpected tokens.
11217
11218 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
11219
11220 * init.c (member_init_ok_or_else): Take a tree rather than
11221 string for name.
11222 (expand_member_init): Adjust.
11223
11224 2001-05-14 Nick Clifton <nickc@cambridge.redhat.com>
11225
11226 * decl.c (duplicate_decls): Suppress warning about duplicate
11227 decls if the first decl is a friend.
11228
11229 2001-05-12 Zack Weinberg <zackw@stanford.edu>
11230
11231 * except.c (choose_personality_routine): Export. Add
11232 explanatory comment. Take an enum languages, not a boolean.
11233 (initialize_handler_parm): Adjust to match.
11234 * cp-tree.h: Prototype choose_personality_routine.
11235 * lex.c (handle_pragma_java_exceptions): New function.
11236 (init_cp_pragma): Register #pragma GCC java_exceptions.
11237
11238 2001-05-12 Neil Booth <neil@cat.daikokuya.demon.co.uk>
11239
11240 * method.c (build_mangled_C99_name): Remove unused prototype.
11241
11242 2001-05-12 Alexandre Oliva <aoliva@redhat.com>
11243
11244 * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
11245 * typeck.c (get_member_function_from_ptrfunc,
11246 build_ptrmemfunc, expand_ptrmemfunc_cst): Take
11247 TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
11248
11249 Reverted Geoff Keating's 2001-05-03's patch.
11250
11251 2001-05-11 Ira Ruben <ira@apple.com>
11252
11253 * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
11254
11255 2001-05-11 Neil Booth <neil@daikokuya.demon.co.uk>
11256
11257 * cp-tree.h (finish_label_expr, lookup_label): Delete.
11258 * parse.y: Update for '&&'; don't issue warning here.
11259 * semantics.c (finish_label_expr): Delete.
11260
11261 2001-05-07 Mark Mitchell <mark@codesourcery.com>
11262
11263 * splay-tree.h (splay_tree_max): New function.
11264 (splay_tree_min): Likewise.
11265
11266 2001-05-03 Geoffrey Keating <geoffk@redhat.com>
11267
11268 * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
11269 (pfn_vflag_identifier): Define.
11270 Update comment about layout of pointer functions.
11271 (build_ptrmemfunc1): Update prototype.
11272 (expand_ptrmemfunc_cst): Update prototype.
11273 * decl.c (initialize_predefined_identifiers): Initialize
11274 pfn_vflag_identifier.
11275 (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
11276 an extra field to the type.
11277 * expr.c (cplus_expand_constant): Pass 'flag' between
11278 expand_ptrmemfunc_cst and build_ptrmemfunc1.
11279 * typeck.c (get_member_function_from_ptrfunc): When
11280 FUNCTION_BOUNDARY < 16, look at additional field to determine
11281 if a pointer-to-member is a real pointer or a vtable offset.
11282 (build_ptrmemfunc1): Add new parameter to contain extra field.
11283 (build_ptrmemfunc): Pass the extra field around.
11284 (expand_ptrmemfunc_cst): Add new parameter to return extra field.
11285 (pfn_from_ptrmemfunc): Ignore the extra field.
11286
11287 2001-05-03 Mark Mitchell <mark@codesourcery.com>
11288
11289 * cp-tree.h (flag_inline_trees): Update documentation.
11290 * decl.c (init_decl_processing): Adjust handling of
11291 flag_inline_functions and flag_inline_trees to support -O3.
11292 (grokfndecl): Set DECL_INLINE on all functions if that's what
11293 the user requested.
11294 (save_function_data): Clear DECL_INLINE in
11295 current_function_cannot_inline is non-NULL.
11296 * decl2.c (flag_inline_trees): Update documentation.
11297
11298 2001-05-03 Nathan Sidwell <nathan@codesourcery.com>
11299
11300 * dump.c (cp_dump_tree, USING_STMT case): New case.
11301 * tree.c (cp_statement_code_p): Add USING_STMT.
11302 * decl2.c (do_using_directive): Add the using directive statement.
11303
11304 * tree.c (walk_tree): Reformat an if block.
11305
11306 2001-05-02 Mark Mitchell <mark@codesourcery.com>
11307
11308 * decl.c (compute_array_index_type): Don't try to do anything with
11309 the indices when processing a template.
11310
11311 2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11312
11313 * call.c: NULL_PTR -> NULL.
11314 * class.c: Likewise.
11315 * cvt.c: Likewise.
11316 * decl.c: Likewise.
11317 * decl2.c: Likewise.
11318 * except.c: Likewise.
11319 * init.c: Likewise.
11320 * rtti.c: Likewise.
11321 * search.c: Likewise.
11322 * tree.c: Likewise.
11323 * typeck.c: Likewise.
11324 * typeck2.c: Likewise.
11325
11326 2001-05-02 Mark Mitchell <mark@codesourcery.com>
11327
11328 * decl2.c (do_using_directive): Revert previous patch.
11329
11330 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
11331
11332 * cp-tree.def (USING_STMT): New statement node.
11333 * cp-tree.h (USING_STMT_NAMESPACE): New macro.
11334 * decl2.c (do_using_directive): Add USING_STMT to statement
11335 tree. Don't emit errors when processing template decl.
11336 * pt.c (tsubst_expr, USING_STMT case): New case.
11337 * semantics.c (cp_expand_stmt, USING_STMT case): New case.
11338
11339 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
11340
11341 * call.c (build_new_op): Convert args from reference here.
11342 (build_conditional_expr): Don't convert here.
11343
11344 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
11345
11346 * spew.c (last_token_id): New static variable.
11347 (read_token): Set it here.
11348 (yyerror): Use it here.
11349
11350 2001-04-30 Richard Henderson <rth@redhat.com>
11351
11352 * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
11353 * decl.c: Likewise.
11354
11355 2001-04-30 Mark Mitchell <mark@codesourcery.com>
11356
11357 * gxxint.texi: Remove.
11358 * Make-lang.in: Remove all traces of gxxint.texi.
11359
11360 2001-04-30 Mark P Mitchell <mark@codesourcery.com>
11361
11362 * decl2.c (start_static_initialization_or_destruction): Correct
11363 logic to handle the -fno-use-cxa-atexit case.
11364
11365 2001-04-30 Mark Mitchell <mark@codesourcery.com>
11366
11367 * optimize.c (update_cloned_parm): New function.
11368 (maybe_clone_body): Use it. Update the `this' parameter too.
11369
11370 2001-04-29 Joseph S. Myers <jsm28@cam.ac.uk>
11371
11372 * decl2.c (unsupported_options): Add new-abi.
11373 * lang-options.h: Remove no longer supported options.
11374
11375 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
11376
11377 * except.c (can_convert_eh): Don't check template parms,
11378 typename types etc.
11379
11380 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
11381
11382 * optimize.c (maybe_clone_body): Copy parameter names and locations.
11383
11384 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
11385
11386 * cp-tree.h (adjust_clone_args): Prototype new function.
11387 * class.c (adjust_clone_args): New function.
11388 * decl.c (start_function): Call it for in charge ctors.
11389
11390 2001-04-26 Mark Mitchell <mark@codesourcery.com>
11391
11392 * method.c (use_thunk): Make sure that thunks really are emitted
11393 when requested.
11394
11395 2001-04-26 Nathan Sidwell <nathan@codesourcery.com>
11396
11397 * mangle.c (write_chars): New macro.
11398 (hwint_to_ascii): New function
11399 (write_number): Use it.
11400 (write_integer_cst): Deal with really big numbers.
11401
11402 2001-04-25 Mark Mitchell <mark@codesourcery.com>
11403
11404 * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
11405 the clone.
11406
11407 2001-04-25 Nathan Sidwell <nathan@codesourcery.com>
11408
11409 * decl.c (grokdeclarator): Set context of namespace scope
11410 TYPE_DECLS.
11411
11412 2001-04-24 Zack Weinberg <zackw@stanford.edu>
11413
11414 * cp/optimize.c: Include hashtab.h.
11415 (struct inline_data): Add tree_pruner.
11416 (expand_call_inline, expand_calls_inline): Use it when calling
11417 walk_tree.
11418 (optimize_function): Initialize and free tree_pruner.
11419
11420 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
11421
11422 Lazy __FUNCTION__ generation.
11423 * cp-tree.def (FUNCTION_NAME): Remove.
11424 * cp-tree.h (function_name_declared_p): Remove.
11425 (cp_fname_init): Prototype.
11426 * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
11427 don't call declare_function_name. Call start_fname_decls.
11428 (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
11429 clobber the line number.
11430 (cp_fname_init): New function.
11431 (start_function): Call start_fname_decls.
11432 (finish_function): Call finish_fname_decls.
11433 * lex.c (reswords): Add slots for __FUNCTION__ et al.
11434 (rid_to_yy): Add mappings for __FUNCTION__ et al.
11435 * optimize.c (maybe_clone_body): Remove function_name_declared_p.
11436 * parse.y (VAR_FUNC_NAME): New token.
11437 (primary): Add VAR_FUNC_NAME.
11438 * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
11439 generation.
11440 (tsubst, FUNCTION_NAME case): Remove.
11441 (tsubst_copy, FUNCTION_NAME case): Remove.
11442 (tsubst_expr, DECL_STMT case): Be careful with a
11443 DECL_PRETTY_FUNCTION_P.
11444 (instantiate_decl): Remove function_name_declared_p.
11445 * semantics.c (begin_compound_statement): Don't call
11446 declare_function_name here.
11447 (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
11448 (finish_translation_unit): Call finish_fname_decls.
11449 (expand_body): Remove function_name_declared_p.
11450 * typeck2.c (digest_init): Allow any ERROR_MARK.
11451
11452 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
11453
11454 * pt.c (tsubst_decl): Use VOID_TYPE_P.
11455 * semantics.c: Fix some typos.
11456
11457 2001-04-23 Phil Edwards <pme@sources.redhat.com>
11458
11459 * cp/decl2.c (flag_honor_std): Always initialize to 1.
11460
11461 2001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11462
11463 * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
11464
11465 2001-04-23 Jason Merrill <jason_merrill@redhat.com>
11466
11467 * except.c (build_throw): Wrap the initialization of the exception
11468 object in a MUST_NOT_THROW_EXPR.
11469 (do_free_exception): #if 0.
11470
11471 2001-04-20 Mark Mitchell <mark@codesourcery.com>
11472
11473 * cp-tree.h (finish_enum): Change prototype.
11474 * decl.c (finish_enum): Reorganize.
11475 * parse.y (structsp): Adjust calls to finish_enum.
11476
11477 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
11478
11479 * tree.c (cp_tree_equal): Adjust final switch formatting. Add
11480 't' case.
11481
11482 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
11483
11484 * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
11485 (layout_empty_base): Return at end flag.
11486 (build_base_field): Likewise.
11487 (build_base_fields): Likewise.
11488 (layout_virtual_bases): Don't add 1 to eoc value.
11489 (end_of_class): Use full size for empty bases.
11490 (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
11491 empty bases. Don't add 1 to eoc value. Only add trailing padding
11492 if we're an empty class with no empty bases.
11493 (dump_class_hierarchy): Dump size and alignment.
11494
11495 2001-04-20 Jakub Jelinek <jakub@redhat.com>
11496
11497 * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
11498 ICS_BAD_FLAG.
11499
11500 2001-04-20 Jakub Jelinek <jakub@redhat.com>
11501
11502 * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
11503 is found, look first if name does not match the structure name.
11504
11505 2001-04-19 Mark Mitchell <mark@codesourcery.com>
11506
11507 * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
11508 set.
11509 (SET_DECL_LANGUAGE): New macro.
11510 * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
11511 (pushdecl): Likewise.
11512 (build_library_fn_1): Likewise.
11513 (build_cp_library_fn): Likewise.
11514 (grokfndecl): Likewise.
11515 (grokvardecl): Mark `extern "C"' variables as having C linkage.
11516 * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
11517 * lex.c (retrofit_lang_decl): Likewise.
11518 * mangle.c (mangle_decl_string): Don't mangle the names of
11519 variables declared with C language linkage.
11520 * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
11521
11522 2001-04-18 John David Anglin <dave@hiauly1.hia.nrc.ca>
11523
11524 * semantics.c (simplify_aggr_init_exprs_r): Don't restore
11525 flag_access_control from uninitialized storage.
11526
11527 2001-04-15 Mark Mitchell <mark@codesourcery.com>
11528
11529 * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
11530 * mangle.c (write_pointer_to_member_type): Fix mangling of
11531 pointers to cv-qualified member function types.
11532
11533 * init.c (build_delete): Create a SAVE_EXPR for the address if
11534 we're going to use it more than once.
11535
11536 2001-04-13 Mark Mitchell <mark@codesourcery.com>
11537
11538 * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
11539 (expand_ptremfunc_cst): Change prototype.
11540 (delta2_from_ptrmemfunc): Remove.
11541 * expr.c (cplus_expand_constant): Adjust call to
11542 expand_ptrmemfunc_cst.
11543 * typeck.c (build_ptrmemfunc1): Simplify.
11544 (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
11545 results in a constant.
11546 (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
11547 (delta2_from_ptrmemfunc): Remove.
11548 (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
11549
11550 2001-04-12 Jason Merrill <jason_merrill@redhat.com>
11551
11552 * cp-tree.h (decl_namespace_list): New macro.
11553 (struct saved_scope): Add decl_ns_list.
11554 * decl.c (mark_saved_scope): Mark it.
11555 * decl2.c: Lose static decl_namespace_list.
11556 (init_decl2): Don't save it.
11557
11558 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11559
11560 * cp-tree.h (warn_return_type, yylex): Delete redundant
11561 declarations.
11562
11563 * decl.c (current_class_depth, global_namespace): Likewise.
11564
11565 * decl2.c (current_class_depth, flag_gnu_xref): Likewise
11566
11567 * repo.c (flag_use_repository): Likewise.
11568
11569 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11570
11571 * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
11572 set_block, pushdecl, getdecls, gettags, init_decl_processing,
11573 maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
11574 lvalue_or_else, print_lang_statistics, comp_target_types,
11575 unsigned_type, signed_type, signed_or_unsigned_type,
11576 build_function_call, mark_addressable, incomplete_type_error):
11577 Delete redundant declarations.
11578
11579 2001-04-11 Jason Merrill <jason_merrill@redhat.com>
11580
11581 * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
11582 (TYPE_ANONYMOUS_P): New macro.
11583 (TAGGED_TYPE_P): New macro.
11584 * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
11585 (grokfndecl, grokvardecl, grokdeclarator): Likewise.
11586 * tree.c (no_linkage_helper): Likewise.
11587 * semantics.c (begin_class_definition): Likewise.
11588 * pt.c (convert_template_argument): Likewise.
11589 * lex.c (check_for_missing_semicolon): Likewise.
11590
11591 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
11592
11593 * class.c (dfs_unshared_virtual_bases): New function.
11594 (mark_primary_bases): Call it.
11595 (check_bases): Ignore virtual bases when determining
11596 nearly-emptiness.
11597
11598 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
11599
11600 * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
11601
11602 2001-04-11 Mark Mitchell <mark@codesourcery.com>
11603
11604 * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
11605 cloned function to the clone.
11606
11607 2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11608
11609 * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
11610
11611 * semantics.c: Include expr.h.
11612
11613 2001-04-11 Nathan Sidwell <nathan@codesourcery.com>
11614
11615 * method.c (implicitly_declare_fn): Commonize code for copy ctor
11616 and assignment op. Set TREE_USED for parameter.
11617
11618 2001-04-10 Mark Mitchell <mark@codesourcery.com>
11619
11620 * class.c (find_final_overrider_data): Add `candidates'.
11621 (dfs_find_final_overrider): Don't issue error messages
11622 prematurely.
11623 (find_final_overrider): Issue error messages here.
11624 (build_base_field): Don't warn about amgibuous direct bases here.
11625 (warn_about_ambiguous_direct_bases): New function.
11626 (layout_class_type): Use it.
11627
11628 2001-04-10 Richard Henderson <rth@redhat.com>
11629
11630 * typeck.c (build_array_ref): Push the array reference inside
11631 COMPOUND_EXPR and COND_EXPR.
11632
11633 2001-04-05 Mark Mitchell <mark@codesourcery.com>
11634
11635 * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
11636 * decl.c (duplicate_decls): Adjust accordingly.
11637 (maybe_commonize_var): Likewise.
11638 (grokfndecl): Likewise.
11639 (start_function): Likewise.
11640 (start_method): Likewise.
11641 * decl2.c (key_method): Likewise.
11642 (import_export_decl): Likewise.
11643 * method.c (implicitly_declare_fn): Likewise.
11644 * optimize.c (maybe_clone_body): Likewise.
11645
11646 2001-04-05 Benjamin Kosnik <bkoz@redhat.com>
11647
11648 * lang-specs.h: Add __DEPRECATED.
11649
11650 2001-04-05 J"orn Rennecke <amylaar@redhat.com>
11651
11652 * search.c (get_dynamic_cast_base_type): When building a new
11653 constant, set its type to ssizetype.
11654
11655 2001-04-04 Jakub Jelinek <jakub@redhat.com>
11656
11657 * optimize.c (expand_call_inline): Only add newly inlined statements
11658 into inlined_stmts.
11659
11660 2001-04-03 Mark Mitchell <mark@codesourcery.com>
11661
11662 * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
11663 (OPERATOR_FORMAT): Likewise.
11664 (OPERATOR_TYPENAME_FORMAT): Likewise.
11665 * operators.def: Remove old name-mangling information.
11666 * decl.c (grok_op_properties): Adjust accordingly.
11667 * lex.c (init_operators): Likewise.
11668 * rtti.c (get_tinfo_decl): Issue error messages about types that
11669 have variable size.
11670
11671 2001-04-03 Mark Mitchell <mark@codesourcery.com>
11672
11673 * decl2.c (import_export_decl): Don't call import_export_class
11674 when processing an inline member function.
11675 * semantics.c (expand_body): Call import_export_decl before
11676 emitting inline functions.
11677
11678 2001-03-28 Richard Henderson <rth@redhat.com>
11679
11680 IA-64 ABI Exception Handling:
11681 * cp-tree.def (EH_SPEC_BLOCK): New.
11682 (MUST_NOT_THROW_EXPR): New.
11683 * cp-tree.h: Update changed function declarations.
11684 (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
11685 (CPTI_CALL_UNEXPECTED): New.
11686 (struct cp_language_function): Rename x_eh_spec_try_block
11687 to x_eh_spec_block.
11688 (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
11689 * decl.c (current_binding_level): If no current function
11690 bindings, revert to scope_chain.
11691 (initialize_predefined_identifiers): Remove __cp_push_exception.
11692 (store_parm_decls): Use begin_eh_spec_block.
11693 (finish_function): Use finish_eh_spec_block.
11694 (mark_lang_function): Update for name changes.
11695 * decl2.c (finish_file): No mark_all_runtime_matches.
11696 * dump.c (cp_dump_tree): Handle new tree codes.
11697 * error.c (dump_expr) [BIND_EXPR]: Fix typo.
11698 * except.c (catch_language_init, catch_language): Remove.
11699 (init_exception_processing): Don't set language code.
11700 Initialize call_unexpected_node, protect_cleanup_actions,
11701 eh_personality_libfunc, lang_eh_runtime_type.
11702 (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
11703 (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
11704 (prepare_eh_type): Split out type canonicalizations ...
11705 (build_eh_type_type): ... from here.
11706 (build_eh_type_type_ref): Remove.
11707 (mark_all_runtime_matches): Remove.
11708 (build_exc_ptr): New.
11709 (do_begin_catch, do_end_catch): New.
11710 (do_pop_exception): Remove.
11711 (build_terminate_handler): Remove.
11712 (choose_personality_routine): Split out language choice from ...
11713 (initialize_handler_parm): ... here.
11714 Use MUST_NOT_THROW_EXPR.
11715 (expand_start_catch_block): Use do_begin_catch. Simplify Java
11716 exception object handling.
11717 (expand_start_eh_spec, expand_end_eh_spec): Remove.
11718 (expand_exception_blocks, alloc_eh_object): Remove.
11719 (begin_eh_spec_block, finish_eh_spec_block): New.
11720 (do_allocate_exception, do_free_exception): New.
11721 (expand_throw): Merge into ...
11722 (build_throw): ... here. Update for abi.
11723 * expr.c (cplus_expand_expr): No expand_internal_throw.
11724 Handle MUST_NOT_THROW_EXPR.
11725 * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
11726 * semantics.c (*) Update for except.h name changes.
11727 (genrtl_try_block): No protect_with_terminate.
11728 (genrtl_eh_spec_block): New.
11729 (genrtl_handler): Don't emit the goto here.
11730 (cp_expand_stmt): Handle EH_SPEC_BLOCK.
11731 (genrtl_finish_function): Don't expand_exception_blocks.
11732 * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
11733
11734 2001-03-28 Richard Henderson <rth@redhat.com>
11735
11736 * decl.c (struct named_label_list): Rename eh_region to
11737 in_try_scope, add in_catch_scope.
11738 (struct binding_level): Rename eh_region to is_try_scope,
11739 add is_catch_scope.
11740 (note_level_for_try): Rename from note_level_for_eh.
11741 (note_level_for_catch): New.
11742 (poplevel): Copy both is_try_scope and is_catch_scope to
11743 the named_label_list struct.
11744 (check_previous_goto_1): Don't check for catch block via
11745 DECL_ARTIFICIAL; use in_try_scope instead.
11746 (check_goto): Likewise.
11747 * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
11748 * except.c (expand_start_catch_block): Call note_level_for_catch.
11749 * semantics.c (begin_compound_stmt): Update for note_level_for_try.
11750
11751 2001-03-27 Richard Henderson <rth@redhat.com>
11752
11753 * except.c: Use USING_SJLJ_EXCEPTIONS instead of
11754 exceptions_via_longjmp.
11755
11756 2001-03-27 Phil Edwards <pme@sources.redhat.com>
11757
11758 * pt.c (check_default_tmpl_args): Make error messages clearer.
11759
11760 2001-03-26 Phil Edwards <pme@sources.redhat.com>
11761
11762 * error.c: Also undefine 'A' macro used for cp_printers definition.
11763
11764 2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11765
11766 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
11767
11768 2001-03-26 Mike Yang <yang@research.att.com>
11769 Mark Mitchell <mark@codesourcery.com>
11770
11771 * dump.c (dump_access): New function.
11772 (cp_dump_tree): Use it. Dump basetype information for class
11773 types.
11774
11775 2001-03-26 Mark Mitchell <mark@codesourcery.com>
11776
11777 * Makefile.in (optimize.o): Depend on params.h.
11778 (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
11779 (init_decl_processing): Set flag_no_inline when doing
11780 inlining-on-trees.
11781 * optimize.c: Include params.h.
11782 (struct inline_data): Improve documentation of FNS. Add
11783 FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
11784 (INSNS_PER_STMT): New macro.
11785 (remap_block): Use CLONING_P.
11786 (inlinable_function_p): Don't inline big functions.
11787 (expand_call_inline): Keep track of how much inlining we've done.
11788 (optimize_function): Set FIRST_INLINED_FN.
11789 (maybe_clone_body): Set CLONING_P.
11790 * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
11791 tree nodes.
11792 (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
11793 rest_of_compilation. Clear DECL_RTL for local variables
11794 afterwards.
11795 (clear_decl_rtl): New function.
11796
11797 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>
11798
11799 Implement DR 209
11800 * cp-tree.h (skip_type_access_control,
11801 reset_type_access_control): Prototype.
11802 * decl.c (grokdeclarator): Access of friends is not checked.
11803 * parse.y (component_decl_list): Reset type access control.
11804 * semantics.c (decl_type_access_control): Clear
11805 current_type_lookups.
11806 (save_type_access_control): Don't save if not deferring.
11807 (skip_type_access_control, reset_type_access_control): New
11808 functions.
11809 (begin_class_definition): Do type access control for basetypes.
11810 Start deferred access control.
11811 (finish_class_definition): Resume immediate access control if
11812 this is a local class.
11813
11814 2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11815
11816 * class.c (add_method): Use memcpy/memmove, not bcopy.
11817
11818 * decl.c (duplicate_decls): Likewise.
11819
11820 2001-03-23 Jakub Jelinek <jakub@redhat.com>
11821
11822 * mangle.c (write_discriminator): Use `_0' for discriminator 1,
11823 not `_'.
11824
11825 2001-03-23 Jakub Jelinek <jakub@redhat.com>
11826
11827 * decl.c (local_names): Define.
11828 (push_local_name): New.
11829 (grok_reference_init): Return init if initializing static reference
11830 variable with non-constant instead of emitting it.
11831 Move expand_static_init call to cp_finish_decl.
11832 (layout_var_decl): Call push_local_name.
11833 (maybe_commonize_var): Allow inlining functions even if they have
11834 static local variables, use comdat_linkage for them if flag_weak.
11835 (check_initializer): Call obscure_complex_init if
11836 grok_reference_init returned nonzero.
11837 (save_function_data): Clear x_local_names.
11838 (pop_cp_function_context): Free x_local_names.
11839 (mark_inlined_fns): Remove.
11840 (mark_lang_function): Mark x_local_names.
11841 (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
11842 Mark inlined_fns as tree, remove call to mark_inlined_fns.
11843 * class.c (alter_access): Ensure DECL_ACCESS is never set if
11844 DECL_DISCRIMINATOR_P.
11845 * cp-tree.h (cp_language_function): Add x_local_names.
11846 (lang_decl_flags): Add discriminator into u2.
11847 (lang_decl_inlined_fns): Remove.
11848 (lang_decl): inlined_fns is now a TREE_VEC.
11849 (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
11850 * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
11851 TREE_VEC, not a custom structure.
11852 (optimize_function): Likewise.
11853 * mangle.c (discriminator_for_local_entity): Discriminate among
11854 VAR_DECL local entities.
11855 * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
11856 is not valid.
11857
11858 2001-03-22 Bryce McKinlay <bryce@albatross.co.nz>
11859
11860 Add support for Java interface method calls.
11861 * cp-tree.h (struct lang_type): Add java_interface flag.
11862 (TYPE_JAVA_INTERFACE): New macro.
11863 * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
11864 by setting TYPE_JAVA_INTERFACE.
11865 * call.c (java_iface_lookup_fn): New static.
11866 (build_over_call): If calling a method declared in a
11867 TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
11868 expression which resolves the function address.
11869 (build_java_interface_fn_ref): New function.
11870
11871 2001-03-22 Richard Henderson <rth@redhat.com>
11872
11873 * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
11874 * except.c: Don't include it.
11875
11876 2001-03-22 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
11877 based on an idea from Joe Buck <jbuck@synopsys.com>
11878
11879 * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
11880 New nonterminals.
11881 (data_def, component_decl): Add reductions to bad_decl.
11882
11883 2001-03-22 Jakub Jelinek <jakub@redhat.com>
11884
11885 * method.c (do_build_assign_ref): Don't use build_modify_expr for
11886 anonymous aggregates, since they don't have assignment operator
11887 method.
11888 * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
11889 assignment operators for anonymous structure fields.
11890
11891 2001-03-21 Jason Merrill <jason@redhat.com>
11892
11893 * pt.c (instantiate_decl): Abort if we see a member constant
11894 instantiation that doesn't already have its initializer.
11895 Downgrade explicit instantiation without definition to pedwarn.
11896
11897 * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
11898 * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
11899 (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
11900
11901 * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
11902 (pending_vtables): Remove.
11903 * decl2.c (pending_vtables): Remove.
11904 (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
11905 CLASSTYPE_VTABLE_NEEDS_WRITING.
11906 (import_export_class): Likewise.
11907 (init_decl2): Don't mark pending_vtables.
11908 * lex.c (handle_pragma_vtable): Just sorry.
11909 * pt.c (instantiate_class_template): Don't mess with
11910 CLASSTYPE_VTABLE_NEEDS_WRITING.
11911 (mark_class_instantiated): Likewise.
11912 * ptree.c (print_lang_type): Don't print it.
11913 * semantics.c (begin_class_definition): Don't set it.
11914
11915 * pt.c (template_tail): Replace with last_pending_template.
11916 (maybe_templates, maybe_template_tail): Remove.
11917 (add_pending_template): Adjust.
11918 (instantiate_pending_templates): Adjust.
11919
11920 * cp-tree.h (struct saved_scope): Remove lang_stack field.
11921 (current_lang_stack): Remove.
11922 * decl.c (maybe_push_to_top_level): Don't initialize it.
11923 (duplicate_decls): Use current_lang_depth.
11924 (xref_basetypes): Likewise.
11925 * class.c (current_lang_depth): New fn.
11926 (push_lang_context): Use more varray functionality.
11927 (pop_lang_context): Likewise.
11928
11929 * error.c (GLOBAL_THING): Always use '__'.
11930
11931 2001-03-21 Mark Mitchell <mark@codesourcery.com>
11932
11933 * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
11934
11935 * mangle.c (mangle_decl_string): Mangle the names of overloaded
11936 operators, even when they have `extern "C"' linkage.
11937
11938 2001-03-19 Mark Mitchell <mark@codesourcery.com>
11939
11940 * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
11941 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
11942 where it's not necessary.
11943 (add_method): Remove optimization involving comparison of
11944 DECL_ASSEMBLER_NAME.
11945 (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
11946 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
11947 where it's not necessary.
11948 (check_methods): Likewise.
11949 (build_clone): Likewise.
11950 (built_vtt): Likewise.
11951 * cp-tree.h (DECL_NEEDED_P): Likewise.
11952 * decl.c (pushtag): Likewise.
11953 (duplicate_decls): Likewise.
11954 (pushdecl): Likewise.
11955 (builtin_function): Likewise.
11956 (build_library_fn_1): Set DECL_LANGUAGE for library functions.
11957 (build_cp_library_fn): Likewise.
11958 (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
11959 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
11960 where it's not necessary.
11961 (make_rtl_for_nonlocal_decl): Likewise.
11962 (cp_finish_decl): Likewise.
11963 (grokfndecl): Likewise.
11964 (grokvardecl): Likewise.
11965 (grokdeclarator): Likewise.
11966 (start_function): Likewise.
11967 (cp_missing_return_ok_p): Likewise.
11968 * decl2.c (grokclassfn): Likewise.
11969 (check_classfn): Likewise.
11970 (finish_static_data_member_decl): Likewise.
11971 (grokfield): Likewise.
11972 * error.c (GLOBAL_IORD_P): Remove.
11973 (dump_global_iord): Improve output.
11974 (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
11975 * except.c (nothrow_libfn_p): Summarily reject any function not in
11976 namespace-scope.
11977 * init.c (build_java_class_ref): Don't explicitly set
11978 DECL_ASSEMBLER_NAME after calling mangle_decl.
11979 * mangle.c (mangle_decl_string): Handle extern "C" functions.
11980 (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
11981 * method.c (set_mangled_name_for_decl): Don't explicitly set
11982 DECL_ASSEMBLER_NAME after calling mangle_decl.
11983 (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
11984 IDENTIFIER_GLOBAL_VALUE for the thunk.
11985 * pt.c (set_mangled_name_for_template_decl): Remove.
11986 (check_explicit_specialization): Don't use it.
11987 (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
11988 (tsubst_friend_function): Likewise.
11989 (tsubst_decl): Likewise.
11990 (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
11991 * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
11992 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
11993 where it's not necessary.
11994 (tinfo_base_init): Likewise.
11995 (create_real_tinfo_var): Likewise.
11996 * search.c (looup_field_1): Likewise.
11997 * semantics.c (finish_named_return_value): Likewise.
11998 * tree.c (init_tree): Set lang_set_decl_assembler_name.
11999
12000 2001-03-15 Gabriel Dos Reis <gdr@codesourcery.com>
12001
12002 Correct semantics restrictions checking in throw-expression.
12003 * except.c (is_admissible_throw_operand): New function.
12004 (build_throw): Use it.
12005
12006 2001-03-14 Mark Mitchell <mark@codesourcery.com>
12007
12008 * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
12009 and its ilk.
12010
12011 2001-03-14 Mark Mitchell <mark@codesourcery.com>
12012
12013 * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
12014 * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
12015 * decl.c (duplicate_decls): Likewise.
12016 (builtin_function): Likewise.
12017 (build_library_fn): Likewise.
12018 (build_cp_library_fn): Likewise.
12019 (check_initializer): Likewise.
12020 (cp_finish_decl): Likewise.
12021 * decl2.c (grokfield): Likewise.
12022 (grok_function_init): Remove #if 0'd code.
12023 (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
12024 * friend.c (do_friend): Likewise.
12025 * init.c (get_temp_regvar): Likewise.
12026 * method.c (make_thunk): Likewise.
12027 * pt.c (tsubst_friend_function): Likewise.
12028 (tsubst_decl): Likewise.
12029 (regenerate_decl_from_template): Likewise.
12030 * semantics.c (genrtl_named_return_value): Likewise.
12031 (expand_body): Likewise.
12032 (genrtl_finish_function): Likewise.
12033 * tree.c (cp_tree_equal): Likewise.
12034
12035 2001-03-12 Nathan Sidwell <nathan@codesourcery.com>
12036
12037 * call.c (convert_like_real): Add extra semantics to INNER
12038 parameter. Don't convert to temporary if a user conversion
12039 gives us an lvalue that we're about to bind to a reference.
12040 Set INNER to indicate pending reference binding on recursive
12041 calls.
12042
12043 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
12044
12045 * cp/lex.c: Delete duplicate pending_lang_change.
12046
12047 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
12048
12049 * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
12050 Similarly.
12051 * cp/repo.c (get_base_filename, open_repo_file): Similarly.
12052 * cp/cp-tree.h: Remove file_name_nondirectory prototype.
12053
12054 2001-03-09 Zack Weinberg <zackw@stanford.edu>
12055
12056 * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
12057
12058 2001-03-08 Stan Shebs <shebs@apple.com>
12059
12060 * cp-tree.h (set_identifier_local_value): Remove unused decl.
12061
12062 2001-03-06 Zack Weinberg <zackw@stanford.edu>
12063
12064 * spew.c: Remove references to CPP_OSTRING.
12065
12066 2001-03-06 Andrew Haley <aph@redhat.com>
12067
12068 * typeck.c (convert_arguments): Check that we have an fndecl.
12069
12070 2001-03-05 Andrew Haley <aph@redhat.com>
12071
12072 * typeck.c (convert_arguments): Don't do ellipsis conversion for
12073 __built_in_constant_p.
12074
12075 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
12076
12077 * typeck.c (build_static_cast): Allow enum to enum conversions
12078 as per DR 128.
12079
12080 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
12081
12082 * class.c (check_field_decls): Pointers to member do not a
12083 non-pod struct make, as per DR 148.
12084
12085 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
12086
12087 * call.c (joust): cp_pedwarn when using gnu extension concerning
12088 worst conversion sequences.
12089
12090 2001-03-01 Zack Weinberg <zackw@stanford.edu>
12091
12092 * decl.c: Replace all uses of 'boolean' with 'bool'.
12093
12094 2001-03-01 Zack Weinberg <zackw@stanford.edu>
12095
12096 * lang-specs.h: Add zero initializer for cpp_spec field to
12097 all array elements that need one. Don't put an #ifdef inside
12098 the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
12099 use it.
12100
12101 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
12102
12103 Implement using decls inside template functions.
12104 * decl2.c (validate_nonmember_using_decl): Don't special case
12105 fake_std_node in the global namespace. Don't reject early when
12106 processing a template.
12107 (do_local_using_decl): Add to statement tree. Don't do further
12108 processing when building a template.
12109 * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
12110
12111 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
12112
12113 * decl2.c (do_nonmember_using_decl): Don't complain if we find
12114 same function. Do complain about ambiguating extern "C"
12115 declarations.
12116
12117 2001-02-28 Nathan Sidwell <nathan@codesourcery.com>
12118
12119 Remove floating point and complex type template constant parms.
12120 * pt.c (convert_nontype_argument): Remove REAL_TYPE and
12121 COMPLEX_TYPE extensions.
12122 (invalid_nontype_parm_type_p): Likewise.
12123
12124 2001-02-27 Jeffrey Oldham <oldham@codesourcery.com>
12125
12126 * except.c (call_eh_info): Revert "match_function"'s type.
12127
12128 2001-02-27 Nathan Sidwell <nathan@codesourcery.com>
12129
12130 Fix ctor vtable vcall offsets.
12131 * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
12132 (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
12133 (get_matching_base): Remove.
12134 (get_original_base): New function.
12135 (build_vtbl_initializer): Initialize vid.rtti_binfo.
12136 Use a virtual thunk for a ctor vtable with an index
12137 (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
12138 primary base within a constructor vtable. Only set
12139 BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
12140 when primary base has been lost.
12141 * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
12142
12143 2001-02-26 Jeffrey Oldham <oldham@codesourcery.com>
12144
12145 * call.c (joust): Ensure more_specialized()'s argument length
12146 parameter has correct value for constructors.
12147
12148 2001-02-26 Nathan Sidwell <nathan@codesourcery.com>
12149
12150 * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
12151
12152 * decl.c (mark_inlined_fns): Prototype.
12153
12154 2001-02-22 Mark Mitchell <mark@codesourcery.com>
12155
12156 * spew.c (yylex): Correct handling of friends.
12157
12158 2001-02-22 Mark Mitchell <mark@codesourcery.com>
12159
12160 * mangle.c (write_encoding): Pass write_function_type the
12161 FUNCTION_DECL for the function being encoded.
12162 (write_function_type): Pass it along to write_bare_function_type.
12163 (write_bare_function_type): Pass it along to write_method_parms.
12164 (write_method_parms): Don't mangle the compiler-generated
12165 parameters to a constructor or destructor.
12166
12167 2001-02-22 Andreas Jaeger <aj@suse.de>
12168
12169 * optimize.c: Include toplev.h for
12170 note_deferral_of_defined_inline_function prototype.
12171
12172 2001-02-22 Jakub Jelinek <jakub@redhat.com>
12173
12174 * cp-tree.h (struct lang_decl_inlined_fns): New.
12175 (struct lang_decls): Add inlined_fns.
12176 (DECL_INLINED_FNS): New macro.
12177 * optimize.c (struct inline_data): Add inlined_fns.
12178 (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
12179 (inlinable_function_p): Likewise, fix typo in comment,
12180 function is not inlinable if it already inlined function currently
12181 being optimized.
12182 (expand_call_inline): Add fn to inlined_fns if necessary.
12183 (optimize_function): Initialize inlined_fns.
12184 Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
12185 * decl.c (mark_inlined_fns): New function.
12186 (lang_mark_tree): Call it.
12187
12188 2001-02-21 Jason Merrill <jason@redhat.com>
12189
12190 * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
12191 (DECL_UNINLINABLE): Move to middle-end.
12192
12193 * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
12194 * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
12195 * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
12196 * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
12197 parms and outer BLOCK. note_deferral_of_defined_inline_function.
12198
12199 * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
12200 second parm of op=.
12201
12202 2001-02-19 Mark Mitchell <mark@codesourcery.com>
12203
12204 * decl2.c (set_decl_namespace): Allow explicit instantiations in
12205 any namespace.
12206
12207 2001-02-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12208
12209 * optimize.c (expand_call_inline): Don't walk subtrees of type
12210 nodes.
12211
12212 2001-02-18 Mark Mitchell <mark@codesourcery.com>
12213
12214 * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
12215 for a destructor.
12216
12217 2001-02-18 Jason Merrill <jason@redhat.com>
12218
12219 Do put the VTT parameter in DECL_ARGUMENTS.
12220 * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
12221 (current_vtt_parm): New macro.
12222 (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
12223 (DECL_HAS_VTT_PARM_P): New macro.
12224 (DECL_VTT_PARM): Remove.
12225 (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
12226 * decl.c (duplicate_decls): Only copy the operator code if
12227 appropriate.
12228 (start_function): Set current_vtt_parm.
12229 (lang_mark_tree): Don't mark vtt_parm.
12230 * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
12231 DECL_ARGUMENTS. Set DECL_HAS_VTT_PARM_P.
12232 * class.c (build_clone): Maybe remove the VTT parm.
12233 * optimize.c (maybe_clone_body): Set up the VTT parm.
12234 * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
12235 * call.c (build_over_call): Just allow the VTT arg.
12236 * method.c (make_thunk): Don't set DECL_VTT_PARM.
12237 (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
12238 (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
12239 * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
12240 * error.c (dump_function_decl): Likewise.
12241 * call.c (build_user_type_conversion_1, convert_like_real): Abort
12242 if we try to call a constructor with in-charge or VTT parms.
12243 * method.c (skip_artificial_parms_for): New fn.
12244 * call.c (add_function_candidate, build_over_call): Call it.
12245 * call.c (build_new_method_call): Use current_vtt_parm.
12246 * init.c (expand_virtual_init): Likewise.
12247 * class.c (same_signature_p): No longer static.
12248 * cp-tree.h: Declare it.
12249 * search.c (look_for_overrides_r): Use it.
12250
12251 2001-02-17 Mark Mitchell <mark@codesourcery.com>
12252
12253 * cp-tree.h (new_abi_rtti_p): Remove.
12254 (name_mangling_version): Likewise.
12255 (flag_do_squangling): Likewise.
12256 * class.c (build_rtti_vtbl_entries): Remove old ABI support.
12257 * decl.c (grokfndecl): Likewise.
12258 * decl2.c (name_mangling_version): Remove.
12259 (flag_do_squangling): Likewise.
12260 (lang_f_options): Remove `squangle'.
12261 (unsupported_options): Add `squangle'.
12262 (cxx_decode_option): Issue a warning about uses of
12263 -fname-mangling-version.
12264 (finish_file): Remove old ABI support.
12265 * pt.c (check_explicit_specialization): Likewise.
12266 (tsubst_decl): Likewise.
12267 * rtti.c (init_rtti_processing): Likewise.
12268 (build_headof): Likewise.
12269 (get_tinfo_decl_dynamic): Likewise.
12270 (tinfo_from_decl): Likewise.
12271 (build_dynamic_cast_1): Likewise.
12272 (synthesize_tinfo_var): Likewise.
12273 * init.c (build_new): Allow enumeration types for the array-bounds
12274 in a direct-new-declarator.
12275
12276 * semantics.c (finish_typeof): Resolve OFFSET_REFs.
12277
12278 * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
12279 TREE_PROTECTED from the template being specialized.
12280
12281 2001-02-17 Jason Merrill <jason@redhat.com>
12282
12283 * decl2.c (build_artificial_parm): Set TREE_READONLY.
12284
12285 * decl.c (bad_specifiers): Allow throw specs on things with
12286 pointer-to-function or -member-function type.
12287 * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
12288 a pmf.
12289
12290 2001-02-17 Mark Mitchell <mark@codesourcery.com>
12291
12292 * call.c (check_dtor_name): Handle template names correctly.
12293
12294 2001-02-16 Jason Merrill <jason@redhat.com>
12295
12296 * cp-tree.h (DECL_USE_VTT_PARM): Remove.
12297 * decl2.c (maybe_retrofit_in_chrg): Don't create it.
12298 * optimize.c (maybe_clone_body): Don't substitute it.
12299 * call.c (build_new_method_call): Check in_chrg instead.
12300 * init.c (expand_virtual_init): Likewise.
12301
12302 2001-02-16 Gabriel Dos Reis <gdr@codesourcery.com>
12303
12304 * decl.c (check_tag_decl): Make sure a typedef for an anonymous
12305 class-type introduces at least a type-name.
12306
12307 2001-02-16 Jakub Jelinek <jakub@redhat.com>
12308
12309 * call.c (convert_like_real): Create a temporary for non-lvalue.
12310
12311 2001-02-16 Jeffrey Oldham <oldham@codesourcery.com>
12312
12313 * cp-tree.h: Fix typos in comments.
12314
12315 2001-02-16 Jason Merrill <jason@redhat.com>
12316
12317 * optimize.c (remap_block): If we're compiling a clone, pass the
12318 new block to insert_block.
12319
12320 2001-02-16 Mark Mitchell <mark@codesourcery.com>
12321
12322 * semantics.c (finish_asm_stmt): Robustify.
12323
12324 2001-02-15 Mark Mitchell <mark@codesourcery.com>
12325
12326 * pt.c (push_template_decl_real): Don't remangle the name of a
12327 class template.
12328
12329 2001-02-15 Jim Meyering <meyering@lucent.com>
12330
12331 * Make-lang.in (c++.install-common): Depend on installdirs.
12332 (c++.install-info): Likewise.
12333 (c++.install-man): Likewise.
12334
12335 2001-02-15 Mark Mitchell <mark@codesourcery.com>
12336
12337 * typeck2.c (build_m_component_ref): Robustify.
12338
12339 2001-02-15 Alexandre Oliva <aoliva@redhat.com>
12340
12341 * friend.c (do_friend): Don't take the nested [template] class
12342 into account when deciding whether to warn about the friend
12343 function not referring to a template function.
12344
12345 2001-02-14 Jakub Jelinek <jakub@redhat.com>
12346
12347 * typeck.c (build_unary_op): Clarify error message.
12348
12349 2001-02-08 Aldy Hernandez <aldyh@redhat.com>
12350
12351 * parse.y (component_constructor_declarator): allow optional
12352 parentheses around constructor class name.
12353
12354 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
12355
12356 * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
12357 section.
12358 * init.c (emit_base_init): Remove incorrect comment about
12359 virtual bases.
12360 * method.c (make_thunk): Fix comment alignment.
12361
12362 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
12363
12364 Kill remnants of this is variable.
12365 * cp-tree.h (flag_this_is_variable): Remove.
12366 * decl2.c (flag_this_is_variable): Remove.
12367 * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
12368 (build_vbase_path): The path is non-static, even in a cdtor.
12369 (resolves_to_fixed_type_p): Add additional return value.
12370 * search.c (init_vbase_pointers): Adjust.
12371 * tree.c (lvalue_p_1): Adjust.
12372 * typeck.c (mark_addressable): Adjust.
12373
12374 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
12375
12376 * pt.c (unify): Don't check cv quals of array types.
12377
12378 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
12379
12380 * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
12381 check whether we already have the type.
12382
12383 2001-02-13 Mark Mitchell <mark@codesourcery.com>
12384
12385 * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
12386 * call.c (build_op_delete_call): Simplify to remove duplicate
12387 code.
12388 * class.c (clone_function_decl): Don't build the deleting variant
12389 of a non-virtual destructor.
12390 * decl.c (finish_destructor_body): Don't call delete if this is a
12391 non-virtual destructor.
12392 * init.c (build_delete): Explicitly call `operator delete' when
12393 deleting an object with a non-virtual destructor.
12394
12395 2001-02-13 Jason Merrill <jason@redhat.com>
12396
12397 * lang-specs.h: Add more __EXCEPTIONS.
12398
12399 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
12400
12401 * typeck2.c (process_init_constructor): Check
12402 TREE_HAS_CONSTRUCTOR before issuing missing init warning.
12403
12404 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
12405
12406 * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
12407 Remove spurious information in comment. Allow further
12408 adjustments of REFERENCE_TYPE args.
12409
12410 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
12411
12412 * errfn.c (cp_deprecated): Tweak diagnostic text.
12413 * parse.y (new_initializer): Deprecate initializer lists
12414 extension.
12415
12416 2001-02-12 Mark Mitchell <mark@codesourcery.com>
12417
12418 Remove old ABI support.
12419
12420 2001-02-11 Mark Mitchell <mark@codesourcery.com>
12421
12422 * decl2.c (flag_vtable_thunks): Always set it to 1.
12423 (flag_new_abi): Likewise.
12424 * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
12425
12426 * Makefile.in (g++spec.o): Fix typo.
12427
12428 2001-02-09 Jason Merrill <jason@redhat.com>
12429
12430 * lang-specs.h: Restore definition of __EXCEPTIONS.
12431
12432 2001-02-08 Jason Merrill <jason@redhat.com>
12433
12434 * search.c (shared_member_p): New function.
12435 (lookup_field_r): Use it.
12436 * cp-tree.h (SHARED_MEMBER_P): Remove.
12437
12438 * method.c (process_overload_item): Handle template-dependent array
12439 bounds.
12440 * pt.c (type_unification_real): If we end up with undeduced nontype
12441 parms, try again.
12442
12443 * decl.c (lookup_name_real): Tweak warning to refer to decls, not
12444 types.
12445
12446 * typeck2.c (friendly_abort): Don't say anything if we have
12447 earlier errors or sorries.
12448
12449 * decl.c (check_tag_decl): Notice attempts to redefine bool and
12450 wchar_t. Ignore if in_system_header.
12451
12452 * decl.c (maybe_push_cleanup_level): New fn...
12453 (start_decl_1): ...split out from here.
12454 * cvt.c (build_up_reference): Use it.
12455 * cp-tree.h: Declare it.
12456
12457 2001-02-07 Mark Mitchell <mark@codesourcery.com>
12458
12459 * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
12460 spec.
12461
12462 2001-02-06 Nathan Sidwell <nathan@codesourcery.com>
12463
12464 * pt.c (lookup_template_class): Make sure it's a primary
12465 template or template_template_parm when called from the parser.
12466 (instantiate_template_class): Add assertion.
12467
12468 2001-02-05 Alexandre Oliva <aoliva@redhat.com>
12469
12470 * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
12471 from error_mark_node.
12472
12473 2001-02-05 Nathan Sidwell <nathan@codesourcery.com>
12474
12475 Fix specification and implementation bugs in V3 ABI
12476 construction vtables.
12477 * cp-tree.h (flag_dump_class_layout): New flag.
12478 (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
12479 (BINFO_LOST_PRIMARY_P): New flag.
12480 (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
12481 (BINFO_PRIMARY_MARKED_P): Rename to ...
12482 (BINFO_PRIMARY_P): ... here.
12483 (binfo_via_virtual): New prototype.
12484 * decl2.c (flag_dump_class_layout): New flag.
12485 (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
12486 use `=' as a file name separator.
12487 * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
12488 bases.
12489 (build_vtbl_address): If this is a virtual primary base, then
12490 get the vtbl of what it is ultimately primary for.
12491 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
12492 for BINFO_PRIMARY_P.
12493 (dfs_skip_nonprimary_vbases_markedp): Likewise.
12494 (get_shared_vbase_if_not_primary): Likewise.
12495 (dfs_get_pure_virtuals): Likewise.
12496 (expand_upcast_fixups): Likewise.
12497 (fixup_virtual_upcast_offsets): Likewise.
12498 (dfs_find_vbase_instance): Likewise.
12499 (find_vbase_instance): Likewise.
12500 (binfo_from_vbase): Adjust comment to reflect reality.
12501 (binfo_via_virtual): New function.
12502 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
12503 for binfo walking during VTT construction.
12504 (dfs_mark_primary_bases): Remove.
12505 (force_canonical_binfo_r): New function.
12506 (force_canonical_binfo): New function.
12507 (mark_primary_virtual_base): New function.
12508 (mark_primary_bases): Walk in inheritance graph order, use
12509 mark_primary_virtual_base.
12510 (determine_primary_base): Use some more intermediate variables.
12511 (dfs_find_final_overrider): Don't check for overriding along a
12512 virtual path.
12513 (dfs_modify_vtables): Walk into primary virtual bases too.
12514 (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
12515 (build_base_fields): Likewise.
12516 (dfs_set_offset_for_unshared_vbases): Likewise.
12517 (layout_virtual_bases): Likewise.
12518 (end_of_class): Likewise.
12519 (finish_struct_1): Call dump_class_hierarchy, if requested.
12520 (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
12521 (dump_class_hierarchy_r): Add stream parameter. Emit more information.
12522 (dump_class_hierarchy): Add file parameter. Append to file, if
12523 required.
12524 (finish_vtbls): Adjust accumulate_vtbl_inits call.
12525 Use canonical base for virtual bases.
12526 (build_vtt): Add more comments. Adjust build_vtt_inits call.
12527 (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
12528 Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
12529 VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
12530 virtual VTTs.
12531 (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
12532 from DATA. We want virtual primary bases and all bases via virtual.
12533 Only set BINFO_VPTR_INDEX for top level. Look up from a primary
12534 virtual base when not a construction vtable.
12535 (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
12536 (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
12537 Use canonical bases when processing virtual bases.
12538 (accumulate_vtbl_inits): We're interested in any base via a
12539 virtual path.
12540 (dfs_accumulate_vtbl_inits): If this is a primary virtual base
12541 within a construction vtable, determine what is being overridden.
12542 (build_vtbl_initializer): Add more comments
12543 (add_vcall_offset_vtbl_entries_1): Adjust comment.
12544 (build_rtti_vtbl_entries): Check if the base has lost its
12545 primary.
12546
12547 2001-02-05 Mark Mitchell <mark@codesourcery.com>
12548
12549 * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
12550
12551 2001-02-04 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12552
12553 * decl.c (pushdecl): Call abort instead of fatal.
12554 * except.c (decl_is_java_type): Call fatal_error instead of fatal.
12555 * init.c (build_new_1): Likewise.
12556 (build_java_class_ref): Call internal_error and fatal_error, not fatal.
12557 * decl.c (build_typename_type): hash_table_init now returns void.
12558 decl.c (init_decl_processing): Make an error non-fatal.
12559
12560 2001-02-04 Mark Mitchell <mark@codesourcery.com>
12561
12562 * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
12563 Document.
12564 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
12565 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
12566 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
12567 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
12568 * decl.c (maybe_commonize_var): Use the new name-mangling where
12569 appropriate.
12570 * decl2.c (comdat_linkage): Enhance comments. Make all
12571 compiler-generated things static, if COMDAT is not available.
12572 (get_tinfo_decl): Do not make typeinfo objects that belong in the
12573 library COMDAT.
12574 (tinfo_base_init): Use the correct mangled name for typeinfo
12575 strings, and push them into the global scope.
12576 (typeinfo_in_lib_p): New function.
12577 (synthesize_tinfo_var): Use it.
12578 (create_real_tinfo_var): Likewise.
12579
12580 2001-02-03 Jakub Jelinek <jakub@redhat.com>
12581
12582 * decl.c (push_class_binding): Use context_for_name_lookup instead
12583 of CP_DECL_CONTEXT.
12584 * search.c (context_for_name_lookup): Remove static. Check for NULL
12585 context in the loop.
12586 * cp-tree.h (context_for_name_lookup): Add prototype.
12587
12588 2001-02-02 Jakub Jelinek <jakub@redhat.com>
12589
12590 * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
12591 * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
12592 Remove.
12593 * call.c (convert_class_to_reference, build_user_type_conversion_1,
12594 add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
12595
12596 2001-02-02 Mark Mitchell <mark@codesourcery.com>
12597
12598 * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
12599 of macros used when compiling g++spec.c.
12600 * g++spec.c (lang_specific_driver): Link with the shared
12601 libgcc by default.
12602
12603 2001-01-29 Joseph S. Myers <jsm28@cam.ac.uk>
12604
12605 * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
12606 make_reference_declarator, make_call_declarator), method.c
12607 (implicitly_declare_fn), parse.y (namespace_using_decl,
12608 notype_unqualified_id, expr_or_declarator, new_type_id,
12609 after_type_declarator, direct_after_type_declarator,
12610 notype_declarator, complex_notype_declarator,
12611 complex_direct_notype_declarator, qualified_id,
12612 notype_qualified_id, overqualified_id, direct_new_declarator,
12613 absdcl, direct_abstract_declarator, conversion_declarator), pt.c
12614 (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
12615 instead of build_parse_node.
12616
12617 2001-01-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12618
12619 * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
12620 (minus_one_node): Moved to top level gcc directory. Renamed
12621 to integer_minus_one_node.
12622
12623 * init.c (init_init_processing): Don't set minus_one_node.
12624 (build_vec_init): Use integer_minus_one_node.
12625
12626 * rtti.c (get_tinfo_decl_dynamic): Likewise.
12627
12628 2001-01-28 Jakub Jelinek <jakub@redhat.com>
12629
12630 * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
12631 identical and they would be replaced with constant, remove
12632 MODIFY_EXPR from the tree.
12633
12634 2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12635
12636 * Make-lang.in: Remove all dependencies on defaults.h.
12637 * call.c: Don't include defaults.h.
12638 * decl.c: Likewise.
12639 * decl2.c: Likewise.
12640 * except.c: Likewise.
12641 * pt.c: Likewise.
12642 * rtti.c: Likewise.
12643 * tree.c: Likewise.
12644 * typeck.c: Likewise.
12645
12646 2001-01-25 Jakub Jelinek <jakub@redhat.com>
12647
12648 * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
12649 operators even in "C" linkage.
12650 * method.c (set_mangled_name_for_decl): Likewise.
12651 * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
12652 overloaded operators in "C" linkage.
12653
12654 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
12655
12656 * pt.c (tsubst_decl): Remove IN_DECL parameter.
12657 (tsubst_arg_types): Check parameter is not void.
12658 (tsubst): Adjust tsubst_decl call.
12659
12660 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
12661
12662 * call.c (add_builtin_candidate): Quote std properly, from
12663 previous change.
12664
12665 2001-01-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12666
12667 * pt.c (check_explicit_specialization): Clone constructors and
12668 destructors.
12669
12670 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
12671
12672 * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
12673 indicates anything special about template depth. Make sure we
12674 only count the user visible template classes.
12675
12676 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
12677
12678 * call.c (build_conv): Typo in comment.
12679 (add_builtin_candidate): Add more explanation.
12680 Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
12681 Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
12682 when we have enumeral types.
12683 (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
12684 candidates for relops and eqops.
12685 (joust): Simplify control flow. Allow a non-template user
12686 function to hide a builtin.
12687
12688 2001-01-22 Nathan Sidwell <nathan@codesourcery.com>
12689
12690 * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
12691 (more_specialized): Add deduction parameter.
12692 * call.c (joust): Adjust more_specialized call.
12693 * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
12694 UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
12695 (get_bindings_order): Remove.
12696 (get_bindings_real): Add DEDUCE parameter.
12697 (maybe_adjust_types_for_deduction): Return extra unify flags. Do
12698 REFERENCE_TYPE jig for DEDUCE_ORDER.
12699 (type_unification_real): Deal with DEDUCE_ORDER. Use result of
12700 maybe_adjust_types_for_deduction.
12701 (more_specialized): Add DEDUCE parameter. Call get_bindings_real
12702 directly.
12703 (try_one_overload): Use result of maybe_adjust_types_for_deduction.
12704 (check_cv_quals_for_unify): Use new unify qualifier flags.
12705 (unify): Clear new unify qualifier flags.
12706 (get_bindings_real): Add DEDUCE parameter.
12707 (get_bindings): Adjust call to get_bindings_real.
12708 (get_bindings_overload): Likewise.
12709 (most_specialized_instantiation): Adjust call to
12710 more_specialized.
12711
12712 2001-01-19 Jason Merrill <jason@redhat.com>
12713
12714 * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
12715
12716 * decl.c (init_decl_processing): Just force -fvtable-thunks on if
12717 -fnew-abi.
12718
12719 2001-01-19 Ute Pelkmann <scope.muc@t-online.de>
12720
12721 * decl2.c (arg_assoc_class): Fix double iteration logic.
12722
12723 2001-01-19 Jason Merrill <jason@redhat.com>
12724
12725 * init.c (build_delete): Always call convert_force to strip cv-quals.
12726
12727 * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
12728 * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
12729 * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
12730
12731 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
12732
12733 * search.c (get_vbase_1): Count only virtual bases.
12734
12735 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
12736
12737 * class.c (duplicate_tag_error): Robustify flag clearing.
12738
12739 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
12740
12741 * cp-tree.h (lookup_template_class): Add complain parm.
12742 * decl.c (lookup_namespace_name): Adjust call to
12743 lookup_template_class.
12744 (make_typename_type): Likewise.
12745 * semantics.c (finish_template_type): Likewise.
12746 * pt.c (lookup_template_class): Add complain parm. Adjust.
12747 (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
12748 (tsubst): Likewise.
12749
12750 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
12751
12752 * pt.c (copy_default_args_to_explicit_spec): Preserve
12753 object's CV quals. Reorganize.
12754
12755 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
12756
12757 * typeck.c (build_modify_expr): Say `initialization' for
12758 INIT_EXPRs.
12759 * init.c (build_default_init): Convert to enumeral type, if
12760 needed.
12761
12762 2001-01-18 Jakub Jelinek <jakub@redhat.com>
12763
12764 * parse.y (nomods_initdcl0): Properly set things up for
12765 initdcl0_innards.
12766
12767 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
12768
12769 * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
12770 (type_unification_real): Set it.
12771 (unify): Use it.
12772
12773 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
12774
12775 * decl.c (finish_destructor_body): Convert to vbase pointer here.
12776
12777 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
12778
12779 * semantics.c (begin_class_definition): Check we're not inside a
12780 template parm list.
12781
12782 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
12783
12784 * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
12785 BASELINK_P.
12786
12787 2001-01-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12788
12789 * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
12790 * call.c (build_over_call): Add comment.
12791
12792 2001-01-16 Daniel Berlin <dberlin@redhat.com>
12793
12794 * cvt.c (ocp_convert): Handle vector type conversion
12795 * typeck2.c (digest_init): Handle vector type initializations
12796
12797 2001-01-16 Phil Edwards <pme@sources.redhat.com>
12798
12799 * g++spec.c: Don't add libraries needlessly if -fsyntax-only
12800 was given.
12801
12802 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
12803
12804 * pt.c (check_nontype_parm): Rename to ...
12805 (invalid_nontype_parm_type_p): ... here.
12806 (process_template_parm): Adjust.
12807 (convert_template_argument): Adjust.
12808
12809 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
12810
12811 * pt.c (check_nontype_parm): New function.
12812 (process_template_parm): Use it.
12813 (convert_template_argument): Use it.
12814 (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
12815 member.
12816
12817 2001-01-14 Jeffrey Oldham <oldham@codesourcery.com>
12818
12819 * tree.c: Add defaults.h
12820 (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
12821 * Make-lang.in (cp/tree.o): Add defaults.h.
12822
12823 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
12824
12825 * Make-lang.in (CXX_C_OBJS): Add c-format.o.
12826
12827 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
12828
12829 * g++.1: Change to be ".so man1/gcc.1".
12830
12831 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
12832
12833 * Make-lang.in (c++.info, c++.install-info): Build and install g++
12834 internals info.
12835 (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
12836 ($(srcdir)/cp/g++int.info): New target.
12837 * gxxint.texi: Add info directory entry. Use @@ in email address.
12838 * .cvsignore: Update.
12839
12840 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
12841
12842 * typeck.c (build_c_cast): Do template processing earlier.
12843 Always pedwarn on array casts.
12844
12845 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
12846
12847 * friend.c (make_friend_class): Make sure a templated class is
12848 actually a template.
12849
12850 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
12851
12852 * decl2.c (get_guard): Set linkage from guarded decl.
12853
12854 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
12855
12856 * call.c (convert_default_arg): Check for unprocessed
12857 DEFAULT_ARG.
12858 * cp-tree.h (replace_defarg): Move to spew.c.
12859 (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
12860 spew.c, which is where they really are.
12861 (done_pending_defargs): Declare.
12862 (unprocessed_defarg_fn): Declare.
12863 * decl.c (replace_defarg): Move to spew.c
12864 * parse.y (structsp): Call done_pending_defargs.
12865 * spew.c (defarg_fns): Rearrange list structure.
12866 (defarg_fnsdone): New static variable.
12867 (defarg_depfns): New static variable.
12868 (init_spew): Adjust.
12869 (add_defarg_fn): Store the type in TREE_TYPE.
12870 (do_pending_defargs): Detect and deal with ordering constraints
12871 and circularity.
12872 (done_pending_defargs): New function.
12873 (unprocessed_defarg_fn): New function.
12874 (replace_defarg): Moved from decl.c. Robustify. Don't save
12875 if circularity detected.
12876
12877 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
12878
12879 * pt.c (unify): Check array has a domain, before checking
12880 whether it is variable sized.
12881
12882 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
12883
12884 * decl.c (grokparms): Unobfuscate and get correct diagnostic for
12885 parameters with pointers to arrays of unknown bound.
12886
12887 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
12888
12889 * parse.y (template_parm_header, template_spec_header): New
12890 reductions. Split out from ...
12891 (template_header): ... here. Use them.
12892 (template_template_parm): Use template_parm_header.
12893 * semantics.c (finish_template_template_parm): Add assert.
12894
12895 2001-01-10 Mark Mitchell <mark@codesourcery.com>
12896
12897 * mangle.c (write_builtin_type): Fix thinko.
12898
12899 * pt.c (copy_default_args_to_explicit_spec_1): New function.
12900 (copy_default_args_to_explicit_spec): Likewise.
12901 (check_explicit_specialization): Use it.
12902
12903 * class.c (finish_struct_1): Remove last argument in call to
12904 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
12905 * decl.c (builtin_function): Likewise.
12906 (build_cp_library_fn): Likewise.
12907 (check_initializer): Likewise.
12908 (make_rtl_for_nonlocal_decl): Likewise.
12909 (cp_finish_decl): Likewise.
12910 (start_function): Likewise.
12911 * decl2.c (finish_anon_union): Likewise.
12912 * friend.c (do_friend): Likewise.
12913 * init.c (build_java_class_ref): Likewise.
12914 * method.c (make_thunk): Likewise.
12915 * pt.c (tsubst_friend_function): Likewise.
12916 * semantics.c (expand_body): Likewise.
12917
12918 2001-01-10 Mark Mitchell <mark@codesourcery.com>
12919
12920 * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
12921 looking at DECL_CLONED_FUNCTION for non-functions.
12922
12923 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
12924
12925 * error.c (dump_template_parameter): Use parm to determine how
12926 to print default value.
12927
12928 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
12929
12930 * class.c (duplicate_tag_error): Clear more flags.
12931
12932 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
12933
12934 * call.c (build_new_method_call): Use binfo_for_vbase.
12935
12936 2001-01-10 Joseph S. Myers <jsm28@cam.ac.uk>
12937
12938 * cp-tree.h (flag_cond_mismatch): Don't declare.
12939 * decl2.c (flag_cond_mismatch): Don't define.
12940 (lang_f_options): Remove cond-mismatch.
12941 (unsupported_options): Add cond-mismatch.
12942
12943 2001-01-09 Nathan Sidwell <nathan@codesourcery.com>
12944
12945 * class.c (handle_using_decl): Reject using of constructor name
12946 of sourcing class. Allow injecting of a method with same name as
12947 nested class. Fixup error messages.
12948
12949 2001-01-09 Joseph S. Myers <jsm28@cam.ac.uk>
12950
12951 * decl2.c (lang_decode_option): Handle -Wformat=2.
12952
12953 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
12954
12955 * cp-tree.h (lang_decl_flags): Rename defined_in_class to
12956 initialized_in_class.
12957 (DECL_DEFINED_IN_CLASS_P): Rename to ...
12958 (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
12959 * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
12960 (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
12961 * pt.c (check_default_tmpl_args): Adjust for
12962 DECL_INITIALIZED_IN_CLASS_P.
12963 (instantiate_class_template): Likewise.
12964 (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
12965
12966 * class.c (finish_struct): Constify saved_filename.
12967
12968 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
12969
12970 * class.c (duplicate_tag_error): Adjust diagnostic.
12971 (finish_struct): Locally set location to start of struct.
12972 * decl.c (fixup_anonymous_aggr): Use cp_error_at.
12973
12974 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
12975
12976 * decl.c (struct binding_level): Adjust class_shadowed comments
12977 to reflect reality.
12978 (push_class_level_binding): Adjust comments to reflect reality.
12979 Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
12980 Don't set TREE_VALUE on the class_shadowed list.
12981
12982 2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
12983
12984 * decl2.c (acceptable_java_type): Allow references too.
12985 * init.c (build_java_class_ref): When using the new ABI, search
12986 `class$' and have it mangled with `mangle_decl.'
12987 * mangle.c (write_java_integer_type_codes): New function.
12988 (write_builtin_type): Detect and mangle Java integer and real
12989 types.
12990
12991 2001-01-07 Mark Mitchell <mark@codesourcery.com>
12992
12993 * decl2.c (grokfield): Don't accept `asm' specifiers for
12994 non-static data members.
12995
12996 2001-01-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12997
12998 * expr.c (cplus_expand_expr): Don't reset `target'.
12999
13000 2001-01-07 Neil Booth <neil@daikokuya.demon.co.uk>
13001
13002 * cp/decl2.c (cxx_post_options): Call cpp_post_options.
13003
13004 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
13005
13006 * parse.y (template_datadef): Check for error_mark_node.
13007
13008 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
13009
13010 * cp-tree.def (DEFAULT_ARG): Make `x' class.
13011
13012 2001-01-04 Joseph S. Myers <jsm28@cam.ac.uk>
13013
13014 * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
13015 (record_builtin_type): Make non-static.
13016 (flag_short_double): Don't declare.
13017 (init_decl_processing): Remove the creation of many tree nodes now
13018 in c_common_nodes_and_builtins.
13019 (build_void_list_node): New function.
13020 * decl2.c (flag_short_double, flag_short_wchar): Don't define.
13021 * cp-tree.h (flag_short_wchar): Don't declare.
13022
13023 2001-01-04 Mark Mitchell <mark@codesourcery.com>
13024
13025 * call.c (build_conv): Don't use build1 for USER_CONV.
13026 * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
13027
13028 2001-01-03 Joseph S. Myers <jsm28@cam.ac.uk>
13029
13030 * lex.c (lang_init): Call c_common_lang_init.
13031
13032 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
13033
13034 * search.c (lookup_fnfields_here): Remove.
13035 (look_for_overrides_r): Use lookup_fnfields_1.
13036 Ignore functions from using declarations.
13037
13038 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
13039
13040 Implement exceptions specifiers for implicit member functions.
13041 * cp-tree.h (merge_exceptions_specifiers): Declare new function.
13042 * method.c (synthesize_exception_spec): New function.
13043 (locate_dtor, locate_ctor, locate_copy): New functions.
13044 (implicitly_declare_fn): Generate the exception spec too.
13045 * search.c (check_final_overrider): Check artificial functions
13046 too.
13047 * typeck2.c (merge_exception_specifiers): New function.
13048
13049 2001-01-03 Jason Merrill <jason@redhat.com>
13050
13051 * init.c (build_default_init): New fn.
13052 (perform_member_init): Split out from here.
13053 (build_new_1): Use it. Simplify initialization logic.
13054 (build_vec_init): Take an array, rather than a pointer and maxindex.
13055 Speed up simple initializations. Don't clean up if we're assigning.
13056 * cp-tree.h: Adjust.
13057 * decl2.c (do_static_initialization): Remove TREE_VEC case.
13058 * parse.y (new_initializer): Return void_zero_node for ().
13059 * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
13060 * typeck2.c (digest_init): Only complain about user-written
13061 CONSTRUCTORs.
13062
13063 2000-12-22 Mike Stump <mrs@wrs.com>
13064
13065 * decl2.c: (max_tinst_depth): Increase to 50.
13066
13067 2001-01-02 Mark Mitchell <mark@codesourcery.com>
13068
13069 * class.c (invalidate_class_lookup_cache): Zero the
13070 previous_class_values.
13071 * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
13072 TREE_INT_CST_HIGH.
13073 (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
13074 * decl.c (free_bindings): New variable.
13075 (push_binding): Don't create a new binding if we have one on the
13076 free list.
13077 (pop_binding): Put old bindings on the free list.
13078 (init_decl_processing): Use size_int, not build_int_2.
13079 Register free_bindings as a GC root.
13080 (cp_make_fname_decl): Use size_int, not build_int_2.
13081 (push_inline_template_parms_recursive): Likewise.
13082 (end_template_parm_list): Likewise.
13083 (for_each_template_parm): Do not use walk_tree_without_duplicates.
13084 (tsubst_template_parms): Use size_int, not build_int_2.
13085 (tsubst): Likewise.
13086 * rtti.c (get_vmi_pseudo_type_info): Likewise.
13087
13088 2001-01-02 Richard Henderson <rth@redhat.com>
13089
13090 * parse.y (asm): Set ASM_INPUT_P.
13091
13092 2001-01-02 Jason Merrill <jason@redhat.com>
13093
13094 * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
13095 for v3 ABI.
13096
13097 * typeck.c (cp_truthvalue_conversion): New fn.
13098 * cvt.c (ocp_convert): Use it.
13099
13100 * cp-tree.h: Lose c-common.c decls.
13101
13102 * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
13103 * cvt.c (convert_to_void): Use type_unknown_p.
13104
13105 * typeck.c (strip_all_pointer_quals): Also strip quals from
13106 pointer-to-member types.
13107
13108 * Make-lang.in (cp/TAGS): Use --no-globals. Ignore parse.c, and treat
13109 parse.y as C.
13110
13111 * call.c (build_new_method_call): Do evaluate the object parameter
13112 when accessing a static member.
13113 * typeck.c (build_component_ref): Likewise.
13114
13115 2001-01-02 Andreas Jaeger <aj@suse.de>
13116
13117 * decl.c (cp_missing_noreturn_ok_p): New.
13118 (init_decl_processing): Set lang_missing_noreturn_ok_p.
13119
13120 2000-12-29 Jakub Jelinek <jakub@redhat.com>
13121
13122 * decl.c (init_decl_processing): Fix sign of wchar_type_node.
13123
13124 2000-12-29 Mark Mitchell <mark@codesourcery.com>
13125
13126 * class.c (pushclass): Remove #if 0'd code.
13127 * cp-tree.h (overload_template_name): Remove.
13128 * decl.c (store_bindings): Simplify.
13129 (pop_from_top_level): Likewise.
13130 * pt.c (overload_template_name): Remove.
13131 (instantiate_decl): Don't call push_to_top_level if it's not
13132 needed.
13133
13134 2000-12-28 Mark Mitchell <mark@codesourcery.com>
13135
13136 * pt.c (register_local_specialization): Don't return a value.
13137 (lookup_template_class): Use move-to-front heuristic when looking
13138 up template instantiations.
13139 (instantiate_decl): Only push_to_top_level when we're actually
13140 going to instantiate the template.
13141
13142 2000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
13143
13144 * search.c (binfo_for_vtable): Return least derived class, not
13145 most. Handle secondary vtables.
13146
13147 2000-12-22 Jason Merrill <jason@redhat.com>
13148
13149 * pt.c (more_specialized): Don't optimize len==0.
13150 (fn_type_unification): If we're adding the return type, increase len.
13151
13152 * typeck.c (build_binary_op): Fix pmf comparison logic.
13153
13154 * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
13155 DECL_STATIC_FUNCTION_P.
13156
13157 * semantics.c (genrtl_finish_function): Don't try to jump to
13158 return_label unless it exists.
13159
13160 In partial ordering for a call, ignore parms for which we don't have
13161 a real argument.
13162 * call.c (joust): Pass len to more_specialized.
13163 (add_template_candidate_real): Strip 'this', pass len.
13164 * pt.c (more_specialized): Pass len down. Lose explicit_args parm.
13165 (get_bindings_order): New fn. Pass len down.
13166 (get_bindings_real): Strip 'this', pass len.
13167 (fn_type_unification): Likewise.
13168 (type_unification_real): Succeed after checking 'len' args.
13169 (most_specialized_instantiation): Lose explicit_args parm.
13170 * class.c (resolve_address_of_overloaded_function): Strip 'this',
13171 pass len.
13172
13173 2000-12-21 Jason Merrill <jason@redhat.com>
13174
13175 * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
13176 DECL_TEMPLATE_RESULT.
13177
13178 * search.c (lookup_field_r): Call lookup_fnfields_1, not
13179 lookup_fnfields_here.
13180
13181 * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
13182
13183 * call.c (build_object_call): Also allow conversions that return
13184 reference to pointer to function.
13185 (add_conv_candidate): Handle totype being ref to ptr to fn.
13186 (build_field_call): Also allow members of type reference to function.
13187 Lose support for calling pointer to METHOD_TYPE fields.
13188
13189 * error.c (dump_expr): Handle *_CAST_EXPR.
13190
13191 * typeck2.c (build_scoped_ref): Always convert to the naming class.
13192
13193 * tree.c (break_out_cleanups): Lose.
13194 * cp-tree.h: Remove prototype.
13195 * typeck.c (build_component_ref): Don't break_out_cleanups.
13196 (build_compound_expr): Likewise.
13197 * semantics.c (finish_expr_stmt): Likewise.
13198
13199 2000-12-20 Richard Henderson <rth@redhat.com>
13200
13201 * cp-tree.h: Update declarations.
13202 * decl.c (finish_case_label): Return the new stmt node.
13203 * semantics.c (finish_goto_stmt): Likewise.
13204 (finish_expr_stmt, finish_return_stmt): Likewise.
13205 (finish_break_stmt, finish_continue_stmt): Likewise.
13206 (finish_asm_stmt): Likewise.
13207 * parse.y (already_scoped_stmt): Set STMT_LINENO.
13208 (compstmt, implicitly_scoped_stmt, stmt): Likewise.
13209 (simple_if, simple_stmt): Return the new stmt node.
13210 (save_lineno): New.
13211
13212 2000-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
13213
13214 * cp-tree.h: Don't declare warn_long_long.
13215
13216 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
13217
13218 * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
13219 IS_AGGR_TYPE.
13220
13221 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
13222
13223 * pt.c (unify): Handle when both ARG and PARM are
13224 BOUND_TEMPLATE_TEMPLATE_PARM.
13225
13226 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
13227
13228 * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
13229 DECL_TEMPLATE_PARM_P.
13230
13231 2000-12-15 Jason Merrill <jason@redhat.com>
13232
13233 * init.c (build_new_1): Reorganize. Now with 100% fewer SAVE_EXPRs!
13234
13235 * init.c (build_new_1): Don't strip quals from type.
13236
13237 * decl.c (pushdecl): Don't check for linkage on a non-decl.
13238
13239 * call.c (build_op_delete_call): See through ARRAY_TYPEs.
13240
13241 * call.c (build_new_function_call): Lose space before paren in
13242 error message.
13243 (build_new_method_call): Likewise.
13244
13245 * typeck2.c (build_m_component_ref): Propagate quals from datum.
13246
13247 2000-12-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
13248
13249 * pt.c (check_explicit_specialization): Propagate default
13250 function arguments to explicit specializations.
13251
13252 2000-12-13 DJ Delorie <dj@redhat.com>
13253
13254 * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
13255 and <? operators.
13256
13257 2000-12-08 Jason Merrill <jason@redhat.com>
13258
13259 * error.c (dump_function_name): Don't let the user see __comp_ctor.
13260
13261 Clean up copy-initialization in overloading code.
13262 * call.c (build_user_type_conversion_1): Die if we are asked to
13263 convert to the same or a base type.
13264 (implicit_conversion): Avoid doing so. Lose reference binding code.
13265 (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
13266 direct-initialization. Also do direct-init part of copy-init.
13267 (build_user_type_conversion): Don't provide context to convert_like.
13268 * cvt.c (ocp_convert): build_user_type_conversion will now provide
13269 the constructor call for copy-init.
13270
13271 * pt.c (tsubst_decl): Call clone_function_decl here if this is an
13272 instantiation of a member template.
13273 (do_decl_instantiation): Not here.
13274
13275 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
13276
13277 * class.c (check_field_decls): Don't special case anonymous
13278 fields in error messages.
13279 (note_name_declared_in_class): Use %D on diagnostic.
13280
13281 * tree.c (pod_type_p): Use strip_array_types.
13282 (cp_valid_lang_attribute): Likewise.
13283 * typeck.c (cp_type_quals): Strip arrays separately, to avoid
13284 multiple evaluations.
13285 (cp_has_mutable_p): Use strip_array_types.
13286
13287 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
13288
13289 * cp-tree.h (sufficient_parms_p): Declare new function.
13290 * call.c (sufficient_parms_p): New function, broken out of ...
13291 (add_function_candidate): ... here. Use it.
13292 (add_conv_candidate): Use it.
13293 * decl.c (grok_ctor_properties): Use it.
13294
13295 2000-12-07 Jakub Jelinek <jakub@redhat.com>
13296
13297 * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
13298
13299 2000-12-07 Joseph S. Myers <jsm28@cam.ac.uk>
13300
13301 * decl2.c (lang_decode_option): Handle -Wformat-security.
13302
13303 2000-12-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
13304
13305 * pt.c (verify_class_unification): New function.
13306 (get_class_bindings): Use it.
13307 (try_class_unification): Tidy.
13308 (unify): Handle when argument of a template-id is not
13309 template parameter dependent.
13310 (template_args_equal): Handle when TREE_CODE's do not match.
13311
13312 2000-12-06 Alexandre Oliva <aoliva@redhat.com>
13313
13314 * lang-specs.h (c++): When invoking the stand-alone preprocessor
13315 for -save-temps, pass all relevant -Defines to it, and then don't
13316 pass them to cc1plus.
13317
13318 2000-12-05 Will Cohen <wcohen@redhat.com>
13319
13320 * decl.c (finish_case_label): Cleared
13321 more_cleanups_ok in surrounding function scopes.
13322 (define_label): Likewise.
13323
13324 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
13325
13326 * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
13327 (get_matching_virtual): Remove.
13328 (look_for_overrides): Declare new function.
13329 * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
13330 DECL_VINDEX here.
13331 * class.c (check_for_override): Move base class iteration code
13332 to look_for_overrides.
13333 * search.c (next_baselink): Remove.
13334 (get_virtuals_named_this): Remove.
13335 (get_virtual_destructor): Remove.
13336 (tree_has_any_destructors_p): Remove.
13337 (struct gvnt_info): Remove.
13338 (check_final_overrider): Remove `virtual' from error messages.
13339 (get_matching_virtuals): Remove. Move functionality to ...
13340 (look_for_overrides): ... here, and ...
13341 (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
13342 to be overriding.
13343
13344 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
13345
13346 * typeck.c (get_delta_difference): If via a virtual base,
13347 return zero.
13348 * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
13349 adjustment.
13350
13351 2000-12-04 Richard Henderson <rth@redhat.com>
13352
13353 * error.c (dump_tree): Use output_add_string not OB_PUTS.
13354
13355 2000-12-04 Jason Merrill <jason@redhat.com>
13356
13357 * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
13358 (write_builtin_type): Pass intSI_type_node and the like through
13359 type_for_mode.
13360 * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
13361 Pass intSI_type_node and the like through type_for_mode.
13362 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
13363 * pt.c (tsubst, unify): Likewise.
13364 * tree.c (walk_tree): Likewise.
13365 * error.c (dump_type): Likewise.
13366 (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
13367
13368 * Make-lang.in: Tweak top comment for emacs.
13369 (cp/TAGS): Restore.
13370
13371 * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
13372
13373 * class.c (clone_function_decl): Robustify.
13374
13375 2000-12-04 Michael Matz <matzmich@cs.tu-berlin.de>
13376
13377 * decl.c (store_bindings): Only search in the non modified
13378 old_bindings for duplicates.
13379
13380 2000-12-04 Nathan Sidwell <nathan@codesourcery.com>
13381
13382 * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
13383 TYPE_POLYMORPHIC_P.
13384
13385 * typeck.c (build_static_cast): Remove unused variable.
13386
13387 2000-12-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
13388
13389 * pt.c: Fix typo in comment.
13390
13391 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
13392
13393 * decl2.c (warn_format): Remove definition.
13394 (lang_decode_option): Handle -Wformat-nonliteral,
13395 -Wno-format-extra-args and -Wno-format-y2k. Use set_Wformat.
13396
13397 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
13398
13399 * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
13400 (init_decl_processing): Don't create string_type_node,
13401 const_string_type_node, wint_type_node, intmax_type_node,
13402 uintmax_type_node, default_function_type, ptrdiff_type_node and
13403 unsigned_ptrdiff_type_node. Adjust position of call to
13404 c_common_nodes_and_builtins.
13405 (identifier_global_value): New function.
13406
13407 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>
13408
13409 * call.c (standard_conversion): Reject pointer to member
13410 conversions from ambiguous, inaccessible or virtual bases.
13411 * typeck.c (build_static_cast): Don't check pointers to members
13412 specially.
13413
13414 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
13415
13416 * method.c (do_build_copy_constructor): Preserve cv
13417 qualifications when accessing source object members.
13418 (do_build_assign_ref): Likewise. Remove separate diagnostics for
13419 unnamed fields.
13420
13421 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
13422
13423 * method.c (do_build_assign_ref): Construct appropriately
13424 CV-qualified base reference. Don't allow const casts in base
13425 conversion.
13426
13427 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
13428
13429 * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
13430 incomplete return type.
13431
13432 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
13433
13434 * parse.y (base_class.1): Produce a _TYPE not a _DECL.
13435 * semantics.c (finish_base_specifier): Accept a _TYPE not a
13436 _DECL.
13437
13438 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
13439
13440 * spew.c (yyerror): Cope if yylval.ttype is NULL.
13441
13442 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
13443
13444 * decl.c (grokdeclarator): Diagnose undefined template contexts.
13445
13446 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
13447
13448 * decl.c (grokdeclarator): Do type access control on friend
13449 class.
13450
13451 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
13452
13453 * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
13454 bison parser ickiness.
13455 * pt.c (tsubst_friend_function): Enter namespace scope when
13456 tsubsting the function name.
13457 * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
13458
13459 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
13460
13461 * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
13462 * cvt.c (cp_convert_to_pointer): Add force parameter.
13463 Allow conversions via virtual base if forced.
13464 (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
13465 (ocp_convert): Likewise.
13466 * search.c (binfo_from_vbase): Return the virtual base's binfo.
13467 * typeck.c (get_delta_difference): Adjust handling of virtual
13468 bases.
13469
13470 2000-11-26 Mark Mitchell <mark@codesourcery.com>
13471
13472 * tree.c (struct list_hash): Remove.
13473 (list_hash_table): Make it be an htab.
13474 (struct list_proxy): New type.
13475 (list_hash_eq): New function.
13476 (list_hash_pieces): Renamed from ...
13477 (list_hash): ... this.
13478 (list_hash_lookup): Remove.
13479 (list_hash_add): Remove.
13480 (hash_tree_cons): Use the generic hashtable.
13481 (mark_list_hash): Remove.
13482 (init_tree): Create the hashtable.
13483
13484 2000-11-25 Joseph S. Myers <jsm28@cam.ac.uk>
13485
13486 * method.c (build_mangled_C9x_name): Rename to
13487 build_mangled_C99_name. Change C9X references in comments to
13488 refer to C99.
13489
13490 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
13491
13492 * parse.y (unary_expr): Move VA_ARG from here ...
13493 (primary): ... to here.
13494
13495 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
13496
13497 * semantics.c (finish_id_expr): If type is error_mark, return
13498 error_mark.
13499
13500 2000-11-23 Nathan Sidwell <nathan@codesourcery.com>
13501
13502 * pt.c (lookup_template_class): Simplify loop exit constructs.
13503 Cope when there is no partial instantiation of a template
13504 template member.
13505
13506 2000-11-23 J"orn Rennecke <amylaar@redhat.com>
13507
13508 * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
13509
13510 2000-11-22 Mark Mitchell <mark@codesourcery.com>
13511
13512 * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
13513 prefix.
13514
13515 * pt.c (do_decl_instantiate): Explicitly clone constructors and
13516 destructors that haven't already been cloned.
13517
13518 2000-11-20 Richard Henderson <rth@redhat.com>
13519
13520 * parse.y (yyparse_1): Rename the parser entry point.
13521
13522 2000-11-20 Alex Samuel <samuel@codesourcery.com>
13523
13524 * mangle.c (write_name): Use <unscoped-name> for names directly in
13525 function scope.
13526 (write_unscoped_name): Accept names directly in function scope.
13527
13528 2000-11-20 Nathan Sidwell <nathan@codesourcery.com>
13529
13530 * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
13531 * parse.y (extdef): Add EXPORT reduction.
13532 * spew.c (yylex): Don't skip export here.
13533
13534 2000-11-19 Mark Mitchell <mark@codesourcery.com>
13535
13536 * decl.c (init_decl_processing): Correct name of pure virtual
13537 function under the new ABI.
13538 * rtti.c (throw_bad_cast): Likewise, for bad cast function.
13539 (throw_bad_typeid): Likewise for bad typeid function.
13540
13541 2000-11-18 Mark Mitchell <mark@codesourcery.com>
13542
13543 * decl.c (grokparms): Don't even function types of `void' type,
13544 either.
13545 * mangle.c (write_type): Don't crash when confronted with the
13546 error_mark_node.
13547
13548 * decl.c (grokparms): Don't create parameters of `void' type.
13549
13550 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
13551
13552 * lex.c (mark_impl_file_chain): Delete.
13553 (init_parse): Remove call to ggc_add_string_root. No need to
13554 ggc_strdup a string constant. Do not add impl_file_chain to GC
13555 roots.
13556 (handle_pragma_implementation): No need to ggc_strdup main_filename.
13557
13558 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
13559
13560 * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
13561
13562 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
13563
13564 * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
13565 * decl.c (grokdeclarator): Don't reject void parms here.
13566 (require_complete_types_for_parms): Simplify, use
13567 complete_type_or_else.
13568 (grokparms): Remove bitrot. Remove funcdef parm.
13569 Deal with ellipsis parm lists here.
13570 * semantics.c (finish_parmlist): Don't append void_list_node
13571 here. Set PARMLIST_ELLIPSIS_P.
13572
13573 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
13574
13575 * typeck2.c (incomplete_type_error): Reorganize to avoid
13576 excessive diagnostics.
13577
13578 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
13579
13580 * lex.c (struct impl_files, internal_filename): Constify a char *.
13581
13582 2000-11-16 Mark Mitchell <mark@codesourcery.com>
13583
13584 * mangle.c (write_special_name_constructor): Don't generate
13585 assembler junk when confronted with an old-style constructor.
13586 (write_special_name_destructor): Likewise.
13587 (mangle_decl_string): Do it here instead.
13588
13589 2000-11-16 Nathan Sidwell <nathan@codesourcery.com>
13590
13591 * call.c (op_error): Make error messages clearer.
13592
13593 2000-11-15 Mark Mitchell <mark@codesourcery.com>
13594
13595 * decl.c (wrapup_globals_for_namespace): Don't mark things
13596 TREE_ASM_WRITTEN when they're not.
13597
13598 2000-11-15 Jason Merrill <jason@redhat.com>
13599
13600 * typeck2.c (friendly_abort): Uncount the error before handing
13601 off to fancy_abort.
13602
13603 2000-11-15 Nathan Sidwell <nathan@codesourcery.com>
13604
13605 * typeck.c (lookup_anon_field): Cope with qv qualifiers.
13606
13607 2000-11-14 Mark Mitchell <mark@codesourcery.com>
13608
13609 * class.c (build_vtbl_initializer): Fix typo in comment.
13610 * typeck.c (expr_sizeof): Don't crash on errors.
13611
13612 2000-11-14 Jim Wilson <wilson@redhat.com>
13613
13614 * lang-specs.h: Add %2 after %(cc1_options).
13615
13616 2000-11-14 Richard Henderson <rth@redhat.com>
13617
13618 * typeck.c (c_sizeof): Be strict about casting result value
13619 back to c_size_type_node.
13620 (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
13621
13622 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
13623
13624 * typeck.c (build_unary_op): Use boolean_increment from
13625 c-common.c, moving the relevant code there.
13626
13627 2000-11-11 Jason Merrill <jason@redhat.com>
13628
13629 * typeck.c (mark_addressable): Don't call put_var_into_stack.
13630
13631 * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
13632 in inlines.
13633
13634 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13635
13636 * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
13637 * lex.c (copy_lang_decl): Likewise.
13638
13639 2000-11-09 Mark Mitchell <mark@codesourcery.com>
13640
13641 * dump.c (cp_dump_tree): Don't dump function bodies here.
13642
13643 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
13644 (dump.o): Update dependency list.
13645 * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
13646 (flag_dump_translation_unit): Likewise.
13647 (CP_TYPE_QUALS): Adjust definition.
13648 (DECL_C_BIT_FIELD): Remove.
13649 (SET_DECL_C_BIT_FIELD): Likewise.
13650 (CLEAR_DECL_C_BIT_FIELD): Likewise.
13651 (add_maybe_template): Likewise.
13652 (strip_array_types): Likewise.
13653 (dump_node_to_file): Likewise.
13654 (cp_dump_tree): New function.
13655 * decl.c (init_decl_processing): Set lang_dump_tree.
13656 * decl2.c (flag_dump_translation_unit): Remove.
13657 * dump.c: Move most of it to ../c-dump.c.
13658 (cp_dump_tree): New function.
13659 * pt.c (add_maybe_template): Remove.
13660 * typeck.c (strip_array_types): Likewise.
13661
13662 2000-11-07 Eric Christopher <echristo@redhat.com>
13663
13664 * decl.c (init_decl_processing): Change definition of
13665 __wchar_t to wchar_t. Remove artificial declaration of
13666 wchar_t.
13667 * lex.c: Change instances of __wchar_t to wchar_t.
13668
13669 2000-11-09 Nathan Sidwell <nathan@codesourcery.com>
13670
13671 * lex.c (do_identifier): Don't lookup_name for operators.
13672 * parse.y (operator): Save looking_for_typename.
13673 (unoperator): Restore it.
13674 * spew.c (frob_opname): Use nth_token for lookahead.
13675
13676 2000-11-08 Nathan Sidwell <nathan@codesourcery.com>
13677
13678 * decl.c (grok_op_properties): Always use coerce_new_type and
13679 coerce_delete_type.
13680 * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
13681 exception specification. Tidy up.
13682 (coerce_delete_type): Preserve exception specification. Tidy up.
13683
13684 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
13685
13686 * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
13687 (push_binding_level), error.c (cp_tree_printer), pt.c
13688 (process_partial_specialization, tsubst_template_arg_vector),
13689 search.c (lookup_member): Use memset () instead of bzero ().
13690
13691 2000-11-07 Nathan Sidwell <nathan@codesourcery.com>
13692
13693 * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
13694
13695 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
13696
13697 * Make-lang.in (c++.distdir): Remove.
13698
13699 2000-11-04 Mark Mitchell <mark@codesourcery.com>
13700
13701 * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
13702 declarations from different namespaces to be combined.
13703
13704 2000-11-03 Zack Weinberg <zack@wolery.stanford.edu>
13705
13706 * decl.c: Include tm_p.h.
13707
13708 2000-11-03 Joseph S. Myers <jsm28@cam.ac.uk>
13709
13710 * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
13711
13712 2000-11-02 Joseph S. Myers <jsm28@cam.ac.uk>
13713
13714 * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
13715 (build_overload_value), repo.c (open_repo_file), xref.c
13716 (open_xref_file): Use strchr () and strrchr () instead of index ()
13717 and rindex ().
13718
13719 2000-11-01 Bernd Schmidt <bernds@redhat.co.uk>
13720
13721 * call.c (build_over_call): Call fold on the CALL_EXPR.
13722
13723 2000-11-01 Gabriel Dos Reis <gdr@codesourcery.com>
13724
13725 * error.c (dump_template_decl): Separate template hearders with
13726 space not comma.
13727
13728 2000-10-31 Gabriel Dos Reis <gdr@codesourcery.com>
13729
13730 * error.c: Move TFF_ macros into cp-tree.h. Throughout, replace
13731 TS_* flags with corresponding TFF_*. Adjust prototypes of
13732 functions (which used to take a tree_string_flags) to take an int.
13733
13734 * cp-tree.h (enum tree_string_flags): Remove
13735 (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
13736 TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
13737 TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
13738 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
13739 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
13740 TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
13741 (type_as_string, decl_as_string, expr_as_string,
13742 context_as_string): Adjust prototype.
13743
13744 * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
13745 instead of TS_PLAIN.
13746
13747 * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
13748 instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
13749 plain `0'.
13750
13751 2000-10-30 Mark Mitchell <mark@codesourcery.com>
13752
13753 * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
13754 (linkage_kind): New enumeration.
13755 (decl_linkage): New function.
13756 * decl2.c (comdat_linkage): Extend comment.
13757 * error.c (dump_function_decl): Print the arguments used to
13758 instantiate a template, even when not printing the type of the
13759 function.
13760 * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
13761 not TREE_PUBLIC, to test for external linkage.
13762 * tree.c (decl_linkage): New function.
13763
13764 2000-10-28 Mark Mitchell <mark@codesourcery.com>
13765
13766 * pt.c (instantiate_decl): Always instantiate static data members
13767 initialized in-class.
13768
13769 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
13770
13771 * Make-lang.in: Move all build rules here from Makefile.in,
13772 adapt to new context. Wrap all rules that change the current
13773 directory in parentheses. Expunge all references to $(P).
13774 When one command depends on another and they're run all at
13775 once, use && to separate them, not ;. Add OUTPUT_OPTION to
13776 all object-file generation rules. Delete obsolete variables.
13777
13778 * Makefile.in: Delete.
13779 * config-lang.in: Delete outputs= line.
13780
13781 2000-10-26 Gabriel Dos Reis <gdr@codesourcery.com>
13782
13783 * error.c (dump_function_decl): Print no space between
13784 `ptr-operator' the `type-specifier' of the return type.
13785 (dump_type_prefix): Make sure we put space at the appropriate
13786 place.
13787
13788 2000-10-23 Jason Merrill <jason@redhat.com>
13789
13790 * call.c (equal_functions): Also call decls_match for extern "C" fns.
13791
13792 2000-10-22 Jason Merrill <jason@redhat.com>
13793
13794 * call.c (build_conditional_expr): Use ocp_convert to force
13795 rvalue conversion.
13796
13797 2000-10-22 Mark Mitchell <mark@codesourcery.com>
13798
13799 * call.c (standard_conversion): Use RVALUE_CONVs for all
13800 expressions that satisfy lvalue_p, not just those that satisfy
13801 real_lvalue_p.
13802
13803 * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
13804
13805 * typeck.c (c_sizeof): Return an expression of `size_t' type,
13806 not one with TYPE_IS_SIZETYPE set.
13807 (dubious_conversion_warnings): Remove special-case code.
13808
13809 2000-10-21 Geoffrey Keating <geoffk@cygnus.com>
13810
13811 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
13812 * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
13813 (dump_type_prefix): Print vector-of-int as 'int vector'.
13814 (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
13815 * tree.c (walk_tree): Handle VECTOR_TYPE.
13816
13817 * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
13818
13819 2000-10-21 Jason Merrill <jason@redhat.com>
13820
13821 * parse.y (operator): Set got_object from got_scope.
13822 Set looking_for_typename.
13823 * decl.c (lookup_name_real): Clear val after setting from_obj.
13824 Reorganize diagnostic.
13825
13826 2000-10-20 Jason Merrill <jason@redhat.com>
13827
13828 * tree.c (walk_tree): Don't walk into default args.
13829
13830 * error.c (dump_expr): Use host_integerp.
13831
13832 2000-10-20 David Edelsohn <edelsohn@gnu.org>
13833
13834 * typeck2.c (abstract_virtuals_error): Use "because" instead of
13835 "since" in error message.
13836
13837 2000-10-20 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13838
13839 * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
13840
13841 2000-10-20 Jeffrey Oldham <oldham@codesourcery.com>
13842
13843 * decl.c (revert_static_member_fn): Fixed typo.
13844
13845 2000-10-19 Mark Mitchell <mark@codesourcery.com>
13846
13847 * class.c (subobject_offset_fn): New type.
13848 (dfs_record_base_offsets): Remove.
13849 (record_base_offsets): Likewise.
13850 (dfs_search_base_offsets): Likewise.
13851 (record_subobject_offset): New function.
13852 (check_subobject_offset): Likewise.
13853 (walk_subobject_offsets): Likewise.
13854 (record_subobject_offsets): Likewise.
13855 (layout_conflict_p): Reimplement.
13856 (layout_nonempty_base_or_field): Correct handling of type
13857 conflicts during layout.
13858 (layout_empty_base): Likewise.
13859 (build_base_field): Adjust to handle new representation of empty
13860 base offset table.
13861 (build_base_fields): Likewise.
13862 (layout_virtual_bases): Likewise.
13863 (splay_tree_compare_integer_csts): New function.
13864 (layout_class_type): Use a splay_tree, rather than a varray, to
13865 represent the offsets of empty bases.
13866
13867 * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
13868 * decl.c (select_decl): Don't return declarations that are
13869 DECL_ANTICIPATED.
13870
13871 2000-10-18 Mark Mitchell <mark@codesourcery.com>
13872
13873 * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
13874 (fake_std_node): New macro.
13875 * decl.c (in_std): Rename to ...
13876 (in_fake_std): ... this.
13877 (flag_no_builtin): Remove.
13878 (flag_no_nonansi_builtin): Likewise.
13879 (walk_namespaces_r): Use fake_std_node.
13880 (push_namespace): Use std_identifier.
13881 (pop_namespace): Use in_fake_std.
13882 (lookup_name_real): Use fake_std_node.
13883 (init_decl_processing): When -fhonor-std, create the `std'
13884 namespace. Don't create a dummy fake_std_node in that case.
13885 Adjust call to c_common_nodes_and_builtins. Use std_identifier.
13886 (builtin_function): Put builtins whose names don't begin
13887 with `_' in the std namespace.
13888 * decl2.c (flag_no_builtin): Remove.
13889 (flag_no_nonansi_builtin): Likewise.
13890 (set_decl_namespace): Use fake_std_node.
13891 (validate_nonmember_using_decl): Likewise.
13892 (do_using_directive): Likewise.
13893 (handle_class_head): Likewise.
13894 * dump.c (dequeue_and_dump): Likewise.
13895 * except.c (init_exception_processing): Use std_identifier.
13896 * init.c (build_member_call): Use fake_std_node.
13897 * rtti.c (init_rtti_processing): Use std_identifier.
13898
13899 2000-10-17 Mark Mitchell <mark@codesourcery.com>
13900
13901 * cp-tree.h (back_end_hook): Remove declaration.
13902 * decl2.c (back_end_hook): Remove definition.
13903
13904 * dump.c (dequeue_and_dump): Dump TREE_USED.
13905
13906 2000-10-17 Brad Lucier <lucier@math.purdue.edu>
13907
13908 * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
13909
13910 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
13911
13912 * decl.c (WINT_TYPE): Define.
13913 (init_decl_processing): Create types unsigned_ptrdiff_type_node,
13914 c_size_type_node, signed_size_type_node and wint_type_node.
13915
13916 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
13917
13918 * decl2.c (warn_missing_format_attribute): New variable.
13919 (lang_decode_option): Decode -Wmissing-format-attribute.
13920
13921 2000-10-16 Mark Mitchell <mark@codesourcery.com>
13922
13923 * typeck.c (qualify_type): Remove.
13924 (composite_pointer_type): Fix handling of conversions to `cv void*'.
13925
13926 2000-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13927
13928 * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
13929
13930 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13931
13932 * Makefile.in (parse.c, parse.h): Create atomically.
13933
13934 2000-10-12 Mark Mitchell <mark@codesourcery.com>
13935
13936 * class.c (current_obstack): Remove.
13937 * decl.c (ggc_p): Remove.
13938 (start_decl): Don't use decl_tree_cons.
13939 (grokdeclarator): Don't use build_decl_list.
13940 (start_function): Don't use decl_tree_cons.
13941 (finish_function): Don't mess with obstacks.
13942 * decl2.c (grok_x_components): Don't use build_decl_list.
13943 * lex.c (make_call_declarator): Don't call decl_tree_cons.
13944 (implicitly_declare_fn): Don't call build_decl_list.
13945 * parse.y (frob_specs): Don't call build_decl_list or
13946 decl_tree_cons.
13947 (expr_or_declarator_intern): Don't call decl_tree_cons.
13948 (primary): Don't call build_decl_list.
13949 (fcast_or_absdcl): Likewise.
13950 (typed_declspecs): Don't call decl_tree_cons.
13951 (reserved_declspecs): Don't call build_decl_list.
13952 (declmods): Likewise.
13953 (reserved_typespecquals): Likewise.
13954 (aggr): Likewise.
13955 (new_type_id): Likewise.
13956 (cv_qualifiers): Likewise.
13957 (after_type_declarator_intern): Likewise.
13958 (notype_declarator_intern): Likewise.
13959 (absdcl_intern): Likewise.
13960 (named_parm): Likewise.
13961 * pt.c (most_specialized_class): Likewise.
13962 * repo.c (temporary_obstack): Make it a structure, not a pointer.
13963 (init_repo): Initialize it.
13964 * search.c (current_obstack): Remove.
13965 * typeck2.c (add_exception_specifier): Don't call build_decl_list.
13966
13967 2000-10-09 Richard Henderson <rth@cygnus.com>
13968
13969 * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
13970 (c++ language support bits for libgcc): Remove.
13971 (c++.clean): Remove cplib2.txt cleanup.
13972 * config-lang.in (headers, lib2funcs): Remove.
13973
13974 * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
13975 * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
13976 * inc/cxxabi.h, inc/exception, inc/new: Remove files.
13977 * inc/new.h, inc/typeinfo: Remove files.
13978
13979 2000-10-08 Joseph S. Myers <jsm28@cam.ac.uk>
13980
13981 * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
13982 defined.
13983 (init_decl_processing): Initialize intmax_type_node and
13984 uintmax_type_node.
13985
13986 2000-10-06 Richard Henderson <rth@cygnus.com>
13987
13988 * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
13989 (original_result_rtx): Remove.
13990 * decl.c (save_function_data): Don't clear x_result_rtx.
13991 (mark_lang_function): Don't mark it either.
13992 * expr.c (fixup_result_decl): Remove.
13993 * semantics.c (genrtl_named_return_value): Frob the return decl
13994 before calling emit_local_var.
13995 (genrtl_finish_function): Don't call fixup_result_decl.
13996 Always emit the jump to return_label.
13997
13998 2000-10-06 Nathan Sidwell <nathan@codesourcery.com>
13999
14000 * pt.c (lookup_template_class): Set current access for enum.
14001 (tsubst_enum): Set file & line for enum decl.
14002
14003 * spew.c (yylex): Remove unused variable.
14004
14005 2000-10-05 Richard Henderson <rth@cygnus.com>
14006
14007 * semantics.c (genrtl_finish_function): Don't init or check
14008 can_reach_end; remove noreturn and return value checks.
14009
14010 2000-10-05 Tom Tromey <tromey@cygnus.com>
14011
14012 * init.c (build_java_class_ref): Use `build_static_name' with a
14013 suffix, not a prefix, to build the class object's name.
14014
14015 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
14016
14017 * cp-tree.h (access_kind): Fix comment typo.
14018 * decl2.c (grokfield): Fix diagnostic typo.
14019 * semantics.c (finish_template_type): Fix comment typo.
14020 (finish_qualified_object_call_expr): Likewise.
14021
14022 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
14023
14024 * pt.c (tsubst_expr, DECL_STMT case): Don't process if
14025 tsubsting fails.
14026
14027 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
14028
14029 * spew.c (frob_id): New static function.
14030 (frob_opname): Use it.
14031 (yylex): Use it.
14032
14033 2000-10-01 Mark Mitchell <mark@codesourcery.com>
14034
14035 * decl.c (lang_mark_false_label_stack): Remove.
14036 * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
14037
14038 2000-09-30 Joseph S. Myers <jsm28@cam.ac.uk>
14039
14040 * gxxint.texi: Use @email for formatting email addresses.
14041
14042 2000-09-29 Gabriel Dos Reis <gdr@codesourcery.com>
14043
14044 * error.c: Remove direct obstack manipulation. Replace with
14045 output_buffer-based formatting. Adjust calls to removed macros.
14046 (obstack_chunk_alloc, obstack_chunk_free): Remove.
14047 (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
14048 OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
14049
14050 2000-09-24 Mark Mitchell <mark@codesourcery.com>
14051
14052 * ir.texi: Move to ../c-tree.texi.
14053
14054 2000-09-20 Jason Merrill <jason@redhat.com>
14055
14056 * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
14057
14058 2000-09-21 Andreas Jaeger <aj@suse.de>
14059
14060 * errfn.c: Move declaration of cp_printer and cp_printers to ...
14061 * cp-tree.h: ... here.
14062
14063 * error.c: Remove declaration of cp_printer.
14064
14065 2000-09-20 Mark Mitchell <mark@codesourcery.com>
14066
14067 * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
14068
14069 2000-09-20 Hans-Peter Nilsson <hp@axis.com>
14070
14071 * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
14072 users.
14073
14074 2000-09-18 Mark Mitchell <mark@codesourcery.com>
14075
14076 * decl.c (start_function): Robustify.
14077
14078 2000-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14079
14080 * cp-tree.h (check_function_format): Accept a `status' parameter.
14081
14082 * call.c, typeck.c: Updates calls to `check_function_format'.
14083
14084 2000-09-17 Geoffrey Keating <geoffk@cygnus.com>
14085
14086 * decl2.c (handle_class_head): Always push some scope even
14087 in the error case.
14088
14089 2000-09-16 Mark Mitchell <mark@codesourcery.com>
14090
14091 * cp-tree.h (struct cp_language_function): Remove
14092 x_scope_stmt_stack and name_declared.
14093 (current_scope_stmt_stack): Remove.
14094 (function_name_declared_p): New macro.
14095 (struct lang_decl_flags): Use c_lang_decl as a base class.
14096 (context): Remove.
14097 (struct lang_decl): Replace saved_tree with context.
14098 (DECL_FRIEND_CONTEXT): Adjust accordingly.
14099 (SET_DECL_FRIEND_CONTEXT): Likewise.
14100 (DECL_VIRTUAL_CONTEXT): Likewise.
14101 (DECL_SAVED_TREE): Remove.
14102 (C_DECLARED_LABEL_FLAG): Likewise.
14103 (cplus_expand_expr_stmt): Don't declare.
14104 (add_decl_stmt): Likewise.
14105 (add_scope_stmt): Likewise.
14106 * decl.c (mark_stmt_tree): Remove.
14107 (case_compare): Likewise.
14108 (finish_case_label): Use c_add_case_label.
14109 (init_decl_processing): Set more language-specific hooks.
14110 (build_enumerator): Fix typo in comment.
14111 (cplus_expand_expr_stmt): Remove.
14112 (mark_lang_function): Use mark_c_language_function.
14113 (lang_mark_tree): Use c_mark_lang_decl.
14114 * decl2.c: Change order of inclusion.
14115 * except.c: Likewise.
14116 * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR. Fall
14117 back on c_expand_expr.
14118 * friend.c: Include expr.h.
14119 * init.c: Change order of inclusion.
14120 * Makefile.in: Update dependencies.
14121 * lex.h (free_lang_decl_chain): Remove.
14122 * optimize.c (maybe_clone_body): Use function_name_declared_p.
14123 * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
14124 it doesn't exist.
14125 (instantiate_decl): Use function_name_declared_p.
14126 * semantics.c (lang_expand_expr_stmt): Remove.
14127 (set_current_function_name_declared): Likewise.
14128 (current_function_name_declared): Likewise.
14129 (begin_compound_stmt): Use function_name_declared_p.
14130 (add_decl_stmt): Remove.
14131 (setup_vtbl_ptr): Use function_name_declared_p.
14132 (add_scope_stmt): Remove.
14133 (current_scope_stmt_stack): New function.
14134 (cp_expand_stmt): Don't handle SCOPE_STMTs.
14135 (expand_body): Use function_name_declared_p.
14136 * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
14137 * typeck.c: Change order of includes.
14138 (convert_sequence): Remove.
14139
14140 2000-09-14 Joseph S. Myers <jsm28@cam.ac.uk>
14141
14142 * lex.c (reswords): Add _Complex.
14143
14144 2000-09-14 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14145
14146 * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
14147
14148 2000-09-13 J. David Anglin <dave@hiauly1.hia.nrc.ca>
14149
14150 * init.c (begin_init_stmts): Don't use // comments.
14151
14152 2000-09-12 Jason Merrill <jason@redhat.com>
14153
14154 * decl.c (maybe_deduce_size_from_array_init): Set do_default for
14155 all non-extern arrays.
14156
14157 * decl.c (grokdeclarator): Complain about 'friend T' for implicit
14158 typenames, too. Downgrade complaint to pedwarn.
14159 (xref_tag): Warn about surprising behavior of 'friend struct T'.
14160 * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
14161 'class This::Inherited'.
14162
14163 2000-09-12 Mark Mitchell <mark@codesourcery.com>
14164
14165 * decl.c (finish_case_label): Given the LABEL_DECL a
14166 DECL_CONTEXT.
14167
14168 2000-09-12 Gabriel Dos Reis <gdr@codesourcery.com>
14169
14170 * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
14171 TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
14172 TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
14173 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
14174 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
14175 New macros.
14176 (sorry_for_unsupported_tree, print_scope_operator,
14177 print_left_paren, print_right_paren, print_left_bracket,
14178 print_right_bracket, print_whitespace): Likewise.
14179 (aggr_variety): Rename to class_key_or_enum.
14180 (print_type): Rename to print_type_id.
14181 (print_type_specifier_seq, print_simple_type_specifier,
14182 print_elaborated_type_specifier,
14183 print_rest_of_abstract_declarator,
14184 print_parameter_declaration_clause, print_exception_specification,
14185 print_nested_name_specifier, print_template_id,
14186 typedef_original_name, print_template_argument_list_start,
14187 print_template_argument_list_end): New functions.
14188
14189 2000-09-11 Gabriel Dos Reis <gdr@codesourcery.com>
14190
14191 * ir.texi: Add more documentation.
14192
14193 2000-09-11 Mark Mitchell <mark@codesourcery.com>
14194
14195 * cp-tree.h (struct saved_scope): Remove x_function_parms.
14196 (current_function_parms): Don't define.
14197 (struct cp_language_function): Remove parms_stored.
14198 (current_function_just_assigned_this): Don't define.
14199 (current_function_parms_stored): Likewise.
14200 (static_ctors): Declare.
14201 (static_dtors): Likewise.
14202 (SF_EXPAND): Don't define.
14203 (expand_start_early_try_stmts): Remove declaration.
14204 (store_parm_decls): Likewise.
14205 * decl.c (static_ctors): Don't declare.
14206 (static_dtors): Likewise.
14207 (struct binding_level): Remove this_block.
14208 (poplevel): Remove dead code.
14209 (set_block): Likewise.
14210 (mark_binding_level): Don't mark this_block.
14211 (mark_saved_scope): Don't mark x_function_parms.
14212 (init_decl_processing): Don't add current_function_parms as a GC
14213 root.
14214 (check_function_type): Change prototype.
14215 (start_function): Remove RTL-generation code.
14216 (expand_start_early_try_stmts): Remove.
14217 (store_parm_decls): Give it internal linkage. Remove
14218 RTL-generation code.
14219 (finish_function): Remove RTL-generation code.
14220 * decl2.c (static_ctors): Fix formatting.
14221 (static_dtors): Likewise.
14222 * method.c (use_thunk): Don't call store_parm_decls.
14223 (synthesize_method): Likewise.
14224 * optimize.c (maybe_clone_body): Likewise.
14225 * parse.y (fn.def2): Likewise.
14226 (.set_base_init): Likewise.
14227 (nodecls): Likewise.
14228 * pt.c (instantiate_decl): Likewise.
14229 * rtti.c (synthesize_tinfo_fn): Likewise.
14230 * semantics.c (genrtl_try_block): Simplify.
14231 (expand_body): Use genrtl_start_function and
14232 genrtl_finish_function.
14233 (genrtl_start_function): New function.
14234 (genrtl_finish_function): Likewise.
14235
14236 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
14237
14238 * error.c (cp_tree_printer, case 'P'): Append break.
14239
14240 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
14241
14242 * cp-tree.h (frob_opname): Declare.
14243 * parse.y (saved_scopes): New static variable.
14244 (cp_parse_init): Adjust.
14245 (do_id): If lastiddecl is NULL, do do_identifier.
14246 (operator): Save scope information.
14247 (unoperator): New reduction. Restore scope information.
14248 (operator_name): Append unoperator. Call frob_opname.
14249 * spew.c (frob_opname): Define.
14250
14251 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
14252
14253 * decl.c, rtti.c: Include defaults.h if not already included.
14254 Don't define the *_TYPE_SIZE macros.
14255
14256 2000-09-09 Mark Mitchell <mark@codesourcery.com>
14257
14258 * cp-tree.h (push_switch): Change prototype.
14259 (check_cp_case_value): Remove declaration.
14260 (decl_constant_value): Likewise.
14261 * decl.c (struct cp_switch): Add switch_stmt and cases.
14262 (case_compare): New function.
14263 (push_switch): Set switch_stmt. Initialize cases.
14264 (pop_switch): Clean up cases.
14265 (define_case_label): Rename to ...
14266 (finish_case_label): ... this. Do semantic analysis for case
14267 labels here.
14268 (start_function): Correct comment.
14269 * decl2.c (check_cp_case_value): Remove.
14270 * expr.c (do_case): Remove.
14271 * pt.c (tsubst_expr): Adjust call to finish_case_label.
14272 * semantics.c (genrtl_do_poplevel): Remove declaration.
14273 (RECHAIN_STMTS): Remove.
14274 (finish_break_stmt): Use build_break_stmt.
14275 (finish_continue_stmt): Use build_continue_stmt.
14276 (finish_switch_cond): Adjust condition here, rater than in
14277 c_expand_start_case.
14278 (finish_case_label): Remove.
14279 * typeck.c (c_expand_return): Remove.
14280 (c_expand_start_case): Likewise.
14281
14282 2000-09-07 Gabriel Dos Reis <gdr@codesourcery.com>
14283
14284 * ir.texi: Document type nodes.
14285
14286 2000-09-06 Mark Mitchell <mark@codesourcery.com>
14287
14288 * cp-tree.h (init_cp_semantics): Declare.
14289 (genrtl_try_block): Don't declare.
14290 (genrtl_handler): Likewise.
14291 (genrtl_catch_block): Likewise.
14292 (genrtl_ctor_stmt): Likewise.
14293 (genrtl_subobject): Likewise.
14294 (genrtl_do_poplevel): Likewise.
14295 (genrtl_named_return_value): Likewise.
14296 * lex.c (init_parse): Call init_cp_semantics.
14297 * semantics.c (genrtl_try_block): Give it internal linkage.
14298 (genrtl_handler): Likewise.
14299 (genrtl_catch_block): Likewise.
14300 (genrtl_ctor_stmt): Likewise.
14301 (genrtl_subobject): Likewise.
14302 (genrtl_do_poplevel): Likewise.
14303 (genrtl_named_return_value): Likewise.
14304 (lang_expand_stmt): Rename to ...
14305 (cp_expand_stmt): ... this. Only handle C++-specific nodes.
14306 (init_cp_semantics): Define.
14307
14308 * decl.c (initialize_local_var): Remove RTL-generating code.
14309 * semantics.c (genrtl_try_block): Fix formatting.
14310
14311 Move statement-tree facilities from C++ to C front-end.
14312 * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
14313 (void_zero_node): Remove.
14314 (stmt_tree): Likewise.
14315 (scope_chain): Adjust.
14316 (language_function): Rename to cp_language_function.
14317 (cp_function_chain): Adjust.
14318 (current_stmt_tree): Remove.
14319 (last_tree): Likewise.
14320 (last_expr_type): Likewise.
14321 (struct lang_decl): Adjust.
14322 (STMT_IS_FULL_EXPR_P): Remove.
14323 (add_tree): Remove.
14324 (begin_stmt_tree): Likewise.
14325 (finish_stmt_tree): Likewise.
14326 (walk_tree_fn): Likewise.
14327 (walk_stmt_tree): Likewise.
14328 * class.c (finish_struct): Replace use of add_tree with add_stmt.
14329 * decl.c (mark_stmt_tree): Adjust type.
14330 (init_decl_processing): Don't build void_zero_node.
14331 (initialize_local_var): Adjust usage of current_stmt_tree.
14332 (finish_enum): Use add_stmt, not add_tree.
14333 (save_function_data): Adjust use of language_function.
14334 (finish_constructor_body): Use add_stmt, not add_tree.
14335 (finish_destructor_body): Likewise.
14336 (push_cp_function_context): Adjust use of language_function.
14337 (pop_cp_function_context): Likewise.
14338 (mark_lang_function): Likewise.
14339 (mark_cp_function_context): Likewise.
14340 * init.c (build_aggr_init): Adjust use of current_stmt_tree.
14341 (build_vec_init): Likewise.
14342 * semantics.c (SET_LAST_STMT): Remove.
14343 (RECHAIN_STMTS): Don't use it.
14344 (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
14345 (current_stmt_tree): Define.
14346 (add_tree): Remove.
14347 (finish_goto_stmt): Use add_stmt, not add_tree.
14348 (finish_expr_stmt): Likewise.
14349 (begin_if_stmt): Likewise.
14350 (finish_then_clause): Likewise.
14351 (begin_while_stmt): Likewise.
14352 (begin_do_stmt): Likewise.
14353 (finish_return_stmt): Likewise.
14354 (begin_for_stmt): Likewise.
14355 (finish_break_stmt): Likewise.
14356 (finish_continue_stmt): Likewise.
14357 (begin_switch_stmt): Likewise.
14358 (finish_case_label): Likewise.
14359 (begin_try_block): Likewise.
14360 (begin_function_try_block): Likewise.
14361 (begin_handler): Likewise.
14362 (begin_catch_block): Likewise.
14363 (begin_compound_stmt): Likewise.
14364 (begin_asm_stmt): Likewise.
14365 (finish_asm_stmt): Likewise.
14366 (finish_label_stmt): Likewise.
14367 (add_decl_stmt): Likewise.
14368 (finish_subobject): Likewise.
14369 (finish_decl_cleanup): Likewise.
14370 (finish_named_return_value): Likewise.
14371 (setup_vtbl_ptr): Likewise.
14372 (add_scope_stmt): Likewise.
14373 (finish_stmt_expr): Likewise.
14374 (prune_unused_decls): Remove.
14375 (begin_stmt_tree): Likewise.
14376 (finish_stmt_tree): Likewise.
14377 (prep_stmt): Adjust use of current_stmt_tree.
14378 (lang_expand_stmt): Likewise.
14379 * tree.c (statement_code_p): Remove.
14380 (cp_statement_code_p): New function.
14381 (walk_stmt_tree): Remove.
14382 (init_tree): Set lang_statement_code_p.
14383
14384 2000-09-06 Zack Weinberg <zack@wolery.cumb.org>
14385
14386 Integrated preprocessor.
14387
14388 * Make-lang.in, Makefile.in: Remove all references to input.c,
14389 gxx.gperf, and hash.h. Add ../c-lex.o to C_OBJS.
14390 * gxx.gperf, hash.h, input.c: Delete.
14391 * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
14392 initialized properly.
14393
14394 * class.c (fixup_pending_inline): Take a tree, not a
14395 struct pending_inline *. All callers changed.
14396 (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
14397 RID_PROTECTED entries in ridpointers[] array here.
14398 * decl.c (duplicate_decls): Do not refer to struct
14399 pending_inline.
14400 (record_builtin_type, init_decl_processing): Use RID_MAX not
14401 CP_RID_MAX.
14402 (grokdeclarator): Use C_IS_RESERVED_WORD.
14403 * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
14404 cpplib.
14405 (grok_x_components): Do not inspect pending_inlines chain.
14406
14407 * cp-tree.h (struct lang_identifier): Add rid_code entry.
14408 (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
14409 (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
14410 (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
14411 TIME_IDENTIFIER_FILEINFO): Kill.
14412 Update prototypes.
14413 * lex.h: Expunge cp_rid. Rewrite RIDBIT macros to use just a
14414 single 32-bit word.
14415 * parse.y: Call do_pending_inlines unconditionally.
14416 reinit_parse_for_method is now snarf_method. fn.defpen is no
14417 longer necessary. Remove unnecessary <itype> annotation on
14418 SCOPE. Do not refer to end_of_file or struct pending_inline.
14419 * semantics.c (begin_inline_definitions): Call
14420 do_pending_inlines unconditionally.
14421
14422 * lex.c: Remove all code now shared with C front end.
14423 Initialize cpplib properly if USE_CPPLIB. Put reserved words
14424 into the get_identifier table. Rewrite pragma handling to
14425 work with the registry. Move code to save tokens for later
14426 processing to spew.c.
14427
14428 * spew.c: Rewrite everything in terms of token streams instead
14429 of text. Move routines here from lex.c / input.c as
14430 appropriate. GC-mark trees hanging off the pending inlines
14431 chain.
14432
14433 2000-09-06 Mark Mitchell <mark@codesourcery.com>
14434
14435 * NEWS: Mention that the named return value extension has been
14436 deprecated.
14437 * cp-tree.h (original_result_rtx): Define.
14438 (TREE_REFERENCE_EXPR): Remove.
14439 (DECL_VPARENT): Likewise.
14440 (pushdecl_nonclass_level): Likewise.
14441 (store_return_init): Likewise.
14442 (reinit_lang_specific): Likewise.
14443 (genrtl_named_return_value): Change prototype.
14444 * decl.c (original_result_rtx): Remove.
14445 (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
14446 Do not generate RTL for local variables here.
14447 (store_return_init): Remove.
14448 * semantics.c (genrtl_named_return_value): Simplify. Fold in
14449 store_return_init.
14450 (finish_named_return_value): Adjust accordingly. Warn that this
14451 extension is deprecated.
14452 (lang_expand_stmt): Adjust call to genrtl_named_return_value.
14453
14454 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
14455
14456 * pt.c (type_unification_real): Replace switch with if.
14457 (unify): Tsubst non-type parms before comparing.
14458
14459 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
14460
14461 * error.c (dump_typename): New function, broken out of ...
14462 (dump_type): ... here. Use it.
14463 * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
14464
14465 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
14466
14467 * init.c (build_offset_ref): Deal with namespace scoped
14468 TEMPLATE_ID_EXPRs.
14469
14470 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
14471
14472 * class.c (resolve_address_of_overloaded_function): Add
14473 explanation message.
14474 * decl.c (define_case_label): Reformat explanation.
14475 * decl2.c (finish_static_data_member_decl): Likewise.
14476 (grokfield): Likewise.
14477 * friend.c (do_friend): Likewise.
14478
14479 2000-09-05 Zack Weinberg <zack@wolery.cumb.org>
14480
14481 * tree.c (walk_tree): Expose tail recursion.
14482 (walk_stmt_tree): New function.
14483 * cp-tree.h: Prototype walk_stmt_tree.
14484 * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
14485 the BLOCKs directly. If a BLOCK has no variables after
14486 pruning, discard it.
14487 (finish_stmt_tree): Use walk_stmt_tree. No need to save and
14488 restore the line number.
14489
14490 2000-09-05 Mark Mitchell <mark@codesourcery.com>
14491
14492 * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
14493 (pt.o): Remove dependency on HTAB_H.
14494 * cp-tree.h: Include hashtab.h.
14495 (walk_tree): Change prototype.
14496 (walk_tree_without_duplicates): New function.
14497 * decl.c (check_default_argument): Use it.
14498 * optimize.c (remap_decl): Adjust calls to walk_tree.
14499 (copy_body): Likewise.
14500 (expand_calls_inline): Likewise.
14501 (calls_setjmp_p): Use walk_tree_without_duplicates.
14502 * pt.c: Don't include hashtab.h.
14503 (for_each_template_parm): Use walk_tree_without_duplicates.
14504 * semantics.c (finish-stmt_tree): Likewise.
14505 (expand_body): Likewise.
14506 * tree.c (walk_tree): Add additional parameter.
14507 (walk_tree_without_duplicates): New function.
14508 (count_trees): Use it.
14509 (verify_stmt_tree): Adjust call to walk_tree.
14510 (find_tree): Use walk_tree_without_duplicates.
14511 (no_linkage_check): Likewise.
14512 (break_out_target_exprs): Adjust call to walk_tree.
14513 (cp_unsave): Likewise.
14514
14515 2000-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
14516
14517 * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
14518 (TEMPLATE_TEMPLATE_PARM): Adjust comment.
14519 * cp-tree.h (TYPE_BINFO): Adjust comment.
14520 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
14521 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
14522 (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
14523 (TYPE_TEMPLATE_INFO): Likewise.
14524 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
14525 * class.c (push_nested_class): Likewise.
14526 * decl.c (lookup_name_real): Likewise.
14527 (grokdeclarator): Likewise.
14528 (grok_op_properties): Likewise.
14529 (xref_tag): Likewise.
14530 (xref_basetypes): Likewise.
14531 * decl2.c (constructor_name_full): Likewise.
14532 (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
14533 (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
14534 * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
14535 (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
14536 (dump_type_suffix): Likewise.
14537 * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
14538 instead.
14539 (get_aggr_from_typedef): Likewise.
14540 * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
14541 (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
14542 (write_template_parm): Likewise.
14543 (write_template_template_parm): Check tree code instead of
14544 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
14545 * method.c (build_overload_nested_name): Add
14546 BOUND_TEMPLATE_TEMPLATE_PARM.
14547 (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
14548 * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
14549 * pt.c (convert_template_argument): Check tree code instead of
14550 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
14551 (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
14552 (for_each_template_parm): Adjust comment.
14553 (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize.
14554 (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
14555 (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. Use
14556 template_args_equal to compare template template parameter cases.
14557 * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
14558 * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
14559 instead.
14560 * tree.c (copy_template_template_parm): Decide whether to create
14561 a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
14562 (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
14563 (copy_tree_r): Likewise.
14564 * typeck.c (comptypes): Likewise. Check tree code instead of
14565 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
14566
14567 2000-09-04 Mark Elbrecht <snowball3@bigfoot.com>
14568
14569 * decl.c (finish_function): Move the code for handling functions
14570 marked with the constructor and destructor attributes inside the
14571 expand_p block.
14572
14573 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
14574
14575 * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
14576
14577 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
14578
14579 * pt.c (lookup_template_class): Remove abort.
14580 * tree.c (get_type_decl): Allow error_mark_node.
14581
14582 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
14583
14584 * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
14585 TEMPLATE_ID_EXPRs.
14586
14587 2000-09-03 Mark Mitchell <mark@codesourcery.com>
14588
14589 * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
14590 new ABI mangling.
14591
14592 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
14593
14594 * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
14595 union tag mismatch error reporting.
14596
14597 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
14598
14599 * call.c (build_scoped_method_call): Check it is not a namespace.
14600
14601 2000-08-30 Jason Merrill <jason@redhat.com>
14602
14603 * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
14604
14605 * tree.c (bot_manip): Check TREE_CONSTANT rather than
14606 !TREE_SIDE_EFFECTS. Call break_out_target_exprs and
14607 build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
14608
14609 * decl.c (start_function): Always call make_function_rtl.
14610
14611 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
14612
14613 * semantics.c (prune_unused_decls): New function.
14614 (finish_stmt_tree): Call it via walk_tree.
14615
14616 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
14617
14618 * class.c (build_secondary_vtable): Constify a char *.
14619 * decl.c (init_decl_processing): Initialize function_id_node,
14620 pretty_function_id_node, and func_id_node.
14621 * input.c (struct input_source): Constify 'str'.
14622 (feed_input): Constify first argument.
14623 * mangle.c (write_identifier): Constify argument.
14624 * pt.c (mangle_class_name_for_template): Constify argument.
14625
14626 2000-08-29 Mark Mitchell <mark@codesourcery.com>
14627
14628 * typeck.c (mark_addressable): Remove code that pokes around in
14629 RTL.
14630
14631 2000-08-28 Jason Merrill <jason@redhat.com>
14632
14633 * lex.c (file_name_nondirectory): Move to toplev.c.
14634
14635 * cp-tree.h (LOCAL_CLASS_P): New macro.
14636 * class.c (finish_struct_1): Use it.
14637
14638 2000-08-27 Alex Samuel <samuel@codesourcery.com>
14639
14640 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
14641 (write_encoding): Pass another argument to write_name.
14642 (write_name): Add ignore_local_scope parameter. Fix handling of
14643 local names.
14644 (write_nested_name): Use write_unqualified_name.
14645 (write_prefix): Likewise. Skip out on FUNCTION_DECLs.
14646 (write_template_prefix): Use write_unqualified_name.
14647 (write_component): Remove.
14648 (write_local_name): Add parameter. Use direct local entity to
14649 discriminator calculation.
14650 (write_class_enum_type): Pass another argument to write_name.
14651 (write_template_template_arg): Likewise.
14652 (make_guard_variable): Likewise.
14653
14654 2000-08-27 Jason Merrill <jason@redhat.com>
14655
14656 * decl.c (pushdecl): Matching decls for local externs are found in
14657 the current level. Propagate linkage information from previous
14658 declarations.
14659
14660 2000-08-26 Gabriel Dos Reis <gdr@codesourcery.com>
14661
14662 * ir.texi (Expressions): Fix typo.
14663
14664 2000-08-25 Greg McGary <greg@mcgary.org>
14665
14666 * tree.c (init_tree): Use ARRAY_SIZE.
14667
14668 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
14669
14670 * error.c (cp_tree_printer): Rework.
14671
14672 2000-08-25 Mark Mitchell <mark@codesourcery.com>
14673
14674 * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
14675 dyn-string.o.
14676 (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
14677 (cp-demangle.o): Remove target.
14678 (dyn-string.o): Likewise.
14679
14680 * decl.c (grokfndecl): Require that `main' return an `int'.
14681 * mangle.c (write_encoding): Don't mangle return types for
14682 conversion functions.
14683
14684 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
14685
14686 * error.c (tree_formatting_info): New data type.
14687 (tree_being_formatted): New macro.
14688 (tree_formatting_flags): Likewise.
14689 (put_whitespace): Likewise.
14690 (print_tree_identifier): Likewise.
14691 (print_identifier): Likewise.
14692 (cp_tree_printer, print_function_argument_list, print_declaration,
14693 print_expression, print_function_declaration,
14694 print_function_parameter, print_type, print_cv_qualifier): New
14695 functions.
14696 (init_error): Initialize lang_printer.
14697
14698 2000-08-24 Jason Merrill <jason@redhat.com>
14699
14700 * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
14701 adjustment necessary.
14702
14703 2000-08-24 Greg McGary <greg@mcgary.org>
14704
14705 * cp-tree.h (MAIN_NAME_P): Remove macro.
14706
14707 2000-08-24 Gabriel Dos Reis <gdr@codesourcery.com>
14708
14709 * error.c (print_instantiation_context): Don't forget to flush the
14710 buffer.
14711
14712 2000-08-23 Jason Merrill <jason@redhat.com>
14713
14714 * typeck.c (build_ptrmemfunc): Save the input pmf.
14715
14716 * method.c (process_modifiers): Use same_type_p.
14717
14718 2000-08-23 Mark Mitchell <mark@codesourcery.com>
14719
14720 * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
14721 * mangle.c (write_function_type): Change prototype.
14722 (write_encoding): Don't mangle return types for
14723 constructors or destructors.
14724 (write_type): Adjust call to write_function_type.
14725 * pt.c (instantiate_template): Instantiate alternate entry points
14726 when instantiating the main function.
14727
14728 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
14729
14730 * error.c (cp_print_error_function): Don't use embedded '\n' in
14731 output_printf.
14732
14733 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
14734
14735 * decl.c (init_decl_processing): Remove bogus initialization.
14736 * error.c (lang_print_error_function): Restore here.
14737 (init_error): Initialize print_error_function.
14738
14739 2000-08-22 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
14740
14741 * decl2.c (arg_assoc): Revert my 2000-08-11 change.
14742
14743 2000-08-22 Gabriel Dos Reis <gdr@codesourcery.com>
14744
14745 * Makefile.in (error.o): Depends on diagnostic.h
14746
14747 * cp-tree.h (problematic_instantiation_changed,
14748 record_last_problematic_instantiation, current_instantiation,
14749 print_instantiation_context): Declare.
14750 (maybe_print_template_context): Remove.
14751
14752 * decl.c (init_decl_processing): Set print_error_function to NULL.
14753 (lang_print_error_function): Remove, since we're using a new
14754 machinery.
14755
14756 * error.c: #include diagnostic.h
14757 (function_category): New function.
14758 (cp_diagnostic_starter): Likewise.
14759 (cp_diagnostic_finalizer): Likewise.
14760 (cp_print_error_function): Likewise.
14761 (maybe_print_instantiation_context): Likewise.
14762 (print_instantiation_full_context): Likewise.
14763 (print_instantiation_partial_context): Likewise.
14764 (print_instantiation_context): Define.
14765 (init_error): Initialize diagnostic pager and finalizer.
14766
14767 * pt.c (problematic_instantiation_changed): Define.
14768 (record_last_problematic_instantiation): Likewise.
14769 (current_instantiation): Likewise.
14770 (maybe_print_template_context): Remove.
14771 (print_template_context): Likewise.
14772 (current_tinst_level): Make static to reflect Brendan Kehoe's
14773 change of 1995-04-13.
14774 (push_tinst_level): Call print_instantiation_context.
14775
14776 2000-08-21 Nix <nix@esperi.demon.co.uk>
14777
14778 * lang-specs.h: Do not process -o or run the assembler if
14779 -fsyntax-only.
14780
14781 2000-08-21 Joseph S. Myers <jsm28@cam.ac.uk>
14782
14783 * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
14784 variables.
14785 * decl2.c (lang_decode_option): Disable gettext attributes for
14786 -ansi.
14787
14788 2000-08-21 Gabriel Dos Reis <gdr@codesourcery.com>
14789
14790 * lex.c (lang_init_options): Default diagnostic message maximum
14791 length to 80, when line-wrapping.
14792
14793 2000-08-20 Mark Mitchell <mark@codesourcery.com>
14794
14795 * class.c (build_vtbl_initializer): Clear the entire
14796 vtbl_init_data. Start keeping track of the functions for which we
14797 have created vcall offsets here.
14798 (dfs_build_vcall_offset_vtbl_entries): Remove.
14799 (build_vcall_offset_vtbl_entries): Reimplement.
14800 (add_vcall_offset_vtbl_entries_r): New function.
14801 (add_vcall_offset_vtbl_entries_1): Likewise. Tweak logic for
14802 computing when vcall offsets are necessary.
14803
14804 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
14805
14806 * decl.c (member_function_or_else): Use cp_error ... %T.
14807 (grokdeclarator): Likewise.
14808 (start_method): Likewise.
14809 * friend.c (make_friend_class): Use cp_pedwarn ... %T.
14810
14811 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
14812
14813 * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
14814 TYPE_DECLs.
14815
14816 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
14817
14818 * cp-tree.h (PTRMEM_OK_P): New macro.
14819 (itf_ptrmem_ok): New enumeration value.
14820 * class.c (resolve_address_of_overloaded_function): Add PTRMEM
14821 argument. Diagnose implicit pointer to member.
14822 (instantiate_type): Don't diagnose implicit pointer to member
14823 here. Pass itf_ptrmem_ok if ok. Adjust calls to
14824 resolve_address_of_overloaded_function.
14825 * init.c (build_offset_ref): Set PTRMEM_OK_P.
14826 (resolve_offset_ref): Don't diagnose implicit pointer to member here.
14827 * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
14828 * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
14829 (build_unary_op): Deal with single non-static member in
14830 microsoft-land.
14831
14832 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
14833
14834 * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
14835
14836 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
14837
14838 * cp-tree.h (enum_name_string): Remove prototype.
14839 (report_case_error): Remove prototype.
14840 * cp/typeck2.c (enum_name_string): Remove.
14841 (report_case_error): Remove.
14842 * error.c (dump_expr): Deal with enum values directly.
14843 Correctly negate integer constant.
14844
14845 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
14846
14847 * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
14848 (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
14849 * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
14850 (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
14851 (__cxa_vec_new): Use __cxa_vec_new2.
14852 (__cxa_vec_delete): Use __cxa_vec_delete2.
14853
14854 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
14855
14856 * vec.cc (__cxa_vec_new): Set "C" linkage.
14857 (__cxa_vec_ctor): Likewise.
14858 (__cxa_vec_cctor): Likewise.
14859 (__cxa_vec_dtor): Likewise.
14860 (__cxa_vec_delete): Likewise.
14861 * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
14862 (__cxa_vec_ctor): Likewise.
14863 (__cxa_vec_cctor): Likewise.
14864 (__cxa_vec_dtor): Likewise.
14865 (__cxa_vec_delete): Likewise.
14866
14867 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
14868
14869 * class.c (instantiate_type): Reinstate local variable
14870 deleted in previous change.
14871
14872 * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
14873 itf_no_attributes.
14874
14875 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
14876
14877 * cp-tree.h (instantiate_type_flags): New enumeration.
14878 (instantiate_type): Change parameter.
14879 * class.c (instantiate_type): Adjust prototype. Adjust.
14880 * call.c (standard_conversion): Adjust instantiate_type call.
14881 (reference_binding): Likewise.
14882 (build_op_delete_call): Likewise.
14883 (convert_like_real): Likewise.
14884 * cvt.c (cp_convert_to_pointer): Likewise.
14885 (convert_to_reference): Likewise.
14886 * pt.c (convert_nontype_argument): Likewise.
14887 * typeck.c (build_binary_op): Likewise.
14888 (build_ptrmemfunc): Likewise.
14889 (convert_for_assignment): Likewise.
14890
14891 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
14892
14893 * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
14894 (current_aggr): Define.
14895 * decl.c (grokdeclarator): Make sure a friend class is an
14896 elaborated type specifier.
14897 * parse.y (current_aggr): Remove static definition.
14898 (cp_parse_init): Adjust.
14899 (structsp): Clear and restore current_aggr.
14900 (component_decl_list): Clear current_aggr.
14901
14902 * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
14903 aggregate tag on the typename's context.
14904
14905 * pt.c (tsubst_friend_class): Return error_mark_node, if
14906 parms becomes NULL.
14907 (instantiate_class_template): Ignore error_mark_node friend types.
14908
14909 2000-08-14 Nathan Sidwell <nathan@codesourcery.com>
14910
14911 * cvt.c (warn_ref_binding): New static function, broken out of ...
14912 (convert_to_reference): ... here. Use it.
14913
14914 2000-08-11 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
14915
14916 * parse.y (template_arg): Add rule for template qualified with
14917 global scope.
14918
14919 2000-08-11 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
14920
14921 * decl2.c (add_function): Reorganize.
14922 (arg_assoc): Do not consider function template decls.
14923
14924 2000-08-11 Jason Merrill <jason@redhat.com>
14925
14926 * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
14927 looking inside.
14928
14929 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
14930
14931 * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
14932 (lookup_nested_tag): Likewise.
14933
14934 * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
14935 can be produced.
14936
14937 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
14938
14939 * parse.y (named_complex_class_head_sans_basetype): Remove
14940 always true if.
14941
14942 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
14943
14944 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
14945 explicit TEMPLATE_ID_EXPR args.
14946 (build_expr_from_tree, case CALL_EXPR): Likewise.
14947
14948 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
14949
14950 * decl.c (check_tag_decl): Diagnose typename's which don't
14951 declare anything.
14952
14953 2000-08-10 Nathan Sidwell <nathan@codesourcery.com>
14954
14955 * init.c (build_aggr_init): Reject bogus array initializers
14956 early.
14957
14958 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
14959
14960 * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
14961 runtime.
14962 * cp/tinfo.cc (__dynamic_cast): Likewise.
14963 * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
14964
14965 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
14966
14967 * cvt.c (convert_to_pointer_force): Fix error message when
14968 attempting to cast from ambiguous base.
14969
14970 2000-08-08 Jason Merrill <jason@redhat.com>
14971
14972 * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
14973 (tsubst_template_arg_vector): Likewise.
14974
14975 * decl2.c (build_anon_union_vars): Choose the largest field; don't
14976 assume that one will be as large as the union.
14977
14978 2000-08-07 Kazu Hirata <kazu@hxi.com>
14979
14980 * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
14981 * decl.c (pop_labels): Likewise.
14982
14983 2000-08-04 Jeffrey Oldham <oldham@codesourcery.com>
14984
14985 * inc/cxxabi.h (__pbase_type_info): Changed member names to match
14986 specifications.
14987 (__pointer_to_member_type_info): Likewise.
14988 (__base_class_info): Likewise.
14989 (__class_type_info): Likewise.
14990 (__si_class_type_info): Likewise.
14991 (__vmi_class_type_info): Likewise.
14992 * tinfo.cc (__si_class_type_info::__do_find_public_src):
14993 Changed member names to match specifications.
14994 (__vmi_class_type_info::__do_find_public_src): Likewise.
14995 (__si_class_type_info::__do_dyncast): Likewise.
14996 (__vmi_class_type_info::__do_dyncast): Likewise.
14997 (__si_class_type_info::__do_upcast): Likewise.
14998 (__vmi_class_type_info::__do_upcast): Likewise.
14999 * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
15000 (__pbase_type_info::__pointer_catch): Likewise.
15001 (__pointer_type_info::__pointer_catch): Likewise.
15002 (__pointer_to_member_type_info::__pointer_catch): Likewise.
15003
15004 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
15005
15006 * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
15007 * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
15008 (cc1plus): Link with $(BACKEND) and $(C_OBJS).
15009
15010 2000-08-04 Mark Mitchell <mark@codesourcery.com>
15011
15012 * cp-tree.h (add_method): Change prototype.
15013 * class.c (add_method): Remove FIELDS parameter. Add ERROR_P.
15014 Don't double the size of the method vector in the error case.
15015 (handle_using_decl): Adjust call to add_method.
15016 (add_implicitly_declared_members): Likewise.
15017 (clone_function_decl): Likewise.
15018 * decl2.c (check_classfn): Likewise.
15019 * semantics.c (finish_member_declaration): Likewise.
15020
15021 2000-08-04 Joseph S. Myers <jsm28@cam.ac.uk>
15022
15023 * decl.c (flag_isoc94): New variable.
15024
15025 2000-08-02 Jason Merrill <jason@redhat.com>
15026
15027 * pt.c (do_type_instantiation): Add complain parm; don't complain
15028 if called recursively.
15029 * cp-tree.h, parse.y: Adjust.
15030
15031 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
15032
15033 * decl2.c: Silently ignore -Wstrict-prototypes; warn about
15034 -Wno-strict-prototypes.
15035
15036 * g++spec.c: Adjust type of second argument to
15037 lang_specific_driver, and update code as necessary.
15038
15039 * cp-tree.h: Don't prototype min_precision here.
15040 (my_friendly_assert): Cast expression to void.
15041 * semantics.c (do_poplevel): Initialize scope_stmts.
15042
15043 2000-08-02 Mark Mitchell <mark@codesourcery.com>
15044
15045 * cp-tree.h (DECL_NEEDED_P): Tweak.
15046
15047 2000-07-28 Jason Merrill <jason@redhat.com>
15048
15049 * lang-specs.h: Use %i in rule for .ii files.
15050
15051 2000-07-31 Zack Weinberg <zack@wolery.cumb.org>
15052
15053 * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
15054
15055 2000-07-30 Mark Mitchell <mark@codesourcery.com>
15056
15057 Allow indirect primary bases.
15058 * cp-tree.h (struct lang_type): Remove vfield_parent. Add
15059 primary_base.
15060 (CLASSTYPE_VFIELD_PARENT): Remove.
15061 (CLASSTYPE_PRIMARY_BINFO): Reimplement.
15062 (BINFO_PRIMARY_BINFO): Remove.
15063 (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
15064 (BINFO_VBASE_PRIMARY_P): Likewise.
15065 (BINFO_PRIMARY_BASE_OF): New macro.
15066 (BINFO_INDIRECT_PRIMARY_P): Likewise.
15067 (get_primary_binfo): New function.
15068 * decl.c (lang_mark_tree): Make lang_type::primary_base.
15069 * class.c (vcall_offset_data_s): Rename to ...
15070 (vtbl_init_data_s): ... this. Rename primary_p to primary_vtbl_p,
15071 and add ctor_vtbl_p.
15072 (get_derived_offset): Use get_primary_binfo.
15073 (dfs_mark_primary_bases): Adjust handling of virtual primary
15074 bases.
15075 (mark_primary_bases): Likewise.
15076 (set_primary_base): Take a binfo, not an integer, as a
15077 representation of the primary base.
15078 (indirect_primary_base_p): Remove.
15079 (determine_primary_base): Adjust for indirect primary bases.
15080 (dfs_find_final_overrider): Fix typo in coment.
15081 (update_vtable_entry_for_fn): Use get_primary_binfo.
15082 (layout_nonempty_base_or_field): Tweak.
15083 (build_base_fields): Adjust for new primary base semantics.
15084 (dfs_propagate_binfo_offsets): Remove.
15085 (propagate_binfo_offsets): Rewrite.
15086 (dfs_set_offset_for_shared_vbases): Remove.
15087 (layout_virtual_bases): Don't use it.
15088 (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
15089 ABI.
15090 (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
15091 CLASSTYPE_VFIELD_PARENT.
15092 (dfs_get_primary_binfo): New function.
15093 (get_primary_binfo): Likewise.
15094 (dump_class_hierarchy_r): Tweak printing of primary bases.
15095 (build_vtbl_initializer): Fix typo in comments. Use
15096 vtbl_init_data.
15097 (build_vcall_and_vbase_vtbl_entries): Likewise.
15098 (build_vbaes_offset_vtbl_entries): Likewise.
15099 (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
15100 BV_VCALL_INDEX to handle indirect primary bases.
15101 (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
15102 (build_rtti_vtbl_entries): Likewise.
15103 * search.c (get_shared_vbase_if_not_primary): Tweak.
15104 (find_vbase_instance): Likewise.
15105 (binfo_for_vtable): Simplify.
15106 * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
15107 (make_binfo): Make it have 11 entries.
15108
15109 2000-07-30 Alex Samuel <samuel@codesourcery.com>
15110
15111 * mangle.c (DECL_TEMPLATE_ID_P): Remove.
15112 (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
15113 ascertaining primaryness.
15114 (G): Remove template_args.
15115 (decl_is_template_id): New function.
15116 (write_encoding): Use decl_is_template_id.
15117 (write_name): Likewise. Handle type_decls. Get main variant of
15118 type decls.
15119 (write_nested_name): Likewise.
15120 (write_prefix): Likewise.
15121 (write_template_prefix): Likewise.
15122 (write_special_name_constructor): Remove defunct production from
15123 comment.
15124 (write_bare_function_type): Remove comment about absent parameter.
15125 (write_template_template_arg): Add missing grammar production to
15126 comment.
15127
15128 2000-07-27 Jason Merrill <jason@redhat.com>
15129
15130 * decl.c (duplicate_decls): If common_type produces a non-typedef
15131 type for a typedef, just use the old type.
15132
15133 2000-07-27 Mark Mitchell <mark@codesourcery.com>
15134
15135 * cp-tree.h (function_depth): Declare.
15136 (verify_stmt_tree): Likewise.
15137 (find_tree): Likewise.
15138 * decl.c (function_depth): Give it external linkage.
15139 * optimize.c (optimize_function): Increment and decrement it.
15140 * tree.c (verify_stmt_tree_r): New function.
15141 (verify_stmt_tree): Likewise.
15142 (find_tree_r): Likewise.
15143 (find_tree): Likewise.
15144
15145 2000-07-27 Jason Merrill <jason@redhat.com>
15146
15147 * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
15148 TYPE_PTRMEMFUNC_P.
15149 * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
15150
15151 2000-07-26 Mark Mitchell <mark@codesourcery.com>
15152
15153 * decl.c (start_cleanup_fn): Mark the function as `inline'.
15154 * decl2.c (get_guard): Call cp_finish_decl, not
15155 rest_of_decl_compilation, for local guards.
15156 * lex.c (do_identifier): Remove unused variable.
15157
15158 2000-07-26 Marc Espie <espie@cvs.openbsd.org>
15159
15160 * parse.y: Add missing ';'.
15161
15162 2000-07-26 Mark Mitchell <mark@codesourcery.com>
15163
15164 * parse.y (empty_parms): Use `()', not `(...)', when in the scope
15165 of `extern "C++"'.
15166
15167 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
15168
15169 Kill strict_prototype. Backwards compatibility only for
15170 non NO_IMPLICIT_EXTERN_C systems.
15171 * cp-tree.h (flag_strict_prototype): Remove.
15172 (strict_prototype): Remove.
15173 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
15174 * decl.c (maybe_push_to_top_level): Adjust.
15175 (pop_from_top_level): Adjust.
15176 (decls_match): Only allow sloppy parm matching for ancient
15177 system headers.
15178 (init_decl_processing): Adjust.
15179 (grokdeclarator): Adjust.
15180 * decl2.c (flag_strict_prototype): Remove.
15181 (strict_prototype): Remove.
15182 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
15183 (lang_f_options): Remove "strict-prototype".
15184 (unsupported-options): Add "strict-prototype".
15185 * lex.c (do_identifier): Adjust.
15186 (do_scoped_id): Adjust.
15187 * parse.y (empty_parms): Adjust.
15188 * class.c (push_lang_context): Adjust.
15189 (pop_lang_context): Adjust.
15190 * typeck.c (comp_target_parms): Adjust.
15191
15192 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
15193
15194 * decl.c (poplevel): Deal with anonymous variables at for scope.
15195 (maybe_inject_for_scope_var): Likewise.
15196
15197 2000-07-25 Zack Weinberg <zack@wolery.cumb.org>
15198
15199 * decl.c: Remove all signal handling code, now done in toplev.c.
15200
15201 2000-07-23 Mark Mitchell <mark@codesourcery.com>
15202
15203 * decl.c (make_rtl_for_nonlocal_decl): Rework.
15204
15205 * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
15206 correctly.
15207
15208 2000-07-20 Zack Weinberg <zack@wolery.cumb.org>
15209
15210 * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
15211 Define my_friendly_assert and my_friendly_abort as macros
15212 which may call friendly_abort. Prototype friendly abort, not
15213 my_friendly_abort or my_friendly_assert.
15214 * decl.c (signal_catch): Report the signal caught in the error
15215 message. Call fatal directly.
15216 * typeck2.c (ack, my_friendly_assert): Delete.
15217 (my_friendly_abort): Rename to friendly_abort. Expect file,
15218 line, and function parameters. Report the abort code, then
15219 call fancy_abort. Do not mask an abort if errors have
15220 already occurred.
15221
15222 2000-07-18 Nathan Sidwell <nathan@codesourcery.com>
15223
15224 * typeck.c (comp_target_parms): Remove obsolete parameter.
15225 (comp_target_types): Adjust.
15226
15227 2000-07-17 Jason Merrill <jason@redhat.com>
15228
15229 * typeck.c (mark_addressable): Never set TREE_USED.
15230 * call.c (build_call): Don't abort on calls to library functions
15231 that have been declared normally.
15232
15233 * typeck.c (build_binary_op): Fix grammar in warning.
15234
15235 * exception.cc (__eh_free): Fix prototype.
15236
15237 * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
15238
15239 * decl.c (pushdecl): Handle seeing an OVERLOAD in
15240 IDENTIFIER_NAMESPACE_VALUE.
15241
15242 2000-07-16 Mark Mitchell <mark@codesourcery.com>
15243
15244 * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
15245 * method.c (use_thunk): Correct handling of vcall offsets.
15246
15247 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
15248
15249 * .cvsignore: parse.h and parse.c have no cp- prefix.
15250
15251 2000-07-13 Mark Mitchell <mark@codesourcery.com>
15252
15253 * .cvsignore: New file.
15254
15255 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
15256
15257 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
15258
15259 2000-07-12 Mark Mitchell <mark@codesourcery.com>
15260
15261 * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
15262 * parse.c: Remove.
15263 * parse.h: Likewise.
15264
15265 2000-07-11 Mark Mitchell <mark@codesourcery.com>
15266
15267 * class.c (layout_class_type): Add pointers to virtual bases after
15268 base classes under the old ABI.
15269
15270 2000-07-10 Benjamin Chelf <chelf@codesourcery.com>
15271
15272 * semantics.c (finish_for_stmt): Remove call to emit_line_note.
15273 (finish_continue_stmt): Likewise.
15274 (begin_for_stmt): Remove call to note_level_for_for.
15275 (finish_goto_stmt): Change call from build_min_nt
15276 to build_stmt.
15277 (finish_expr_stmt): Likewise.
15278 (begin_if_stmt): Likewise.
15279 (begin_while_stmt): Likewise.
15280 (finish_while_stmt): Likewise.
15281 (finish_return_stmt): Likewise.
15282 (begin_for_stmt): Likewise.
15283 (finish_for_stmt): Likewise.
15284 (finish_break_stmt): Likewise.
15285 (begin_switch_stmt): Likewise.
15286 (finish_case_label): Likewise.
15287 (genrtl_try_block): Likewise.
15288 (begin_try_block): Likewise.
15289 (begin_handler): Likewise.
15290 (begin_compound_stmt): Likewise.
15291 (finish_asm_stmt): Likewise.
15292 (finish_label_stmt): Likewise.
15293 (add_decl_stmt): Likewise.
15294 (finish_subobject): Likewise.
15295 (finish_decl_cleanup): Likewise.
15296 (finish_named_return_value): Likewise.
15297 (setup_vtbl_ptr): Likewise.
15298 (add_scope_stmt): Likewise.
15299 * decl.c (finish_constructor_body): Likewise.
15300 (finish_destructor_body): Likewise.
15301 * optimize.c (copy_body_r): Likewise.
15302 (initialize_inlined_parameters): Likewise.
15303 (declare_return_variable): Likewise.
15304 (expand_call_inline): Likewise.
15305
15306 2000-07-10 Jakub Jelinek <jakub@redhat.com>
15307
15308 * semantics.c (expand_body): Sync interface information
15309 at the end of function body expansion.
15310
15311 2000-07-09 Jason Merrill <jason@redhat.com>
15312
15313 * init.c (build_new_1): Bail early if the call to new fails.
15314
15315 * decl.c (compute_array_index_type): Check specifically for
15316 an INTEGER_CST, not just TREE_CONSTANT.
15317
15318 * decl.c (duplicate_decls): Don't call duplicate_decls on
15319 the DECL_TEMPLATE_RESULT.
15320 (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
15321 codes.
15322
15323 * error.c (dump_template_bindings): Don't crash if we had an
15324 invalid argument list.
15325
15326 * typeck.c (c_expand_start_case): Do narrowing here.
15327 * semantics.c (finish_switch_cond): Not here.
15328
15329 2000-07-09 Hidvegi Zoli <hzoli@austin.ibm.com>
15330
15331 * parse.y (asm_clobbers): Do string concatenation.
15332
15333 2000-07-09 Mark Mitchell <mark@codesourcery.com>
15334
15335 * decl.c (pushtag): Don't put local classes in template functions
15336 on the local_classes list.
15337
15338 2000-07-04 Scott Snyder <snyder@fnal.gov>
15339
15340 * decl2.c (get_guard): Add missing return for old ABI local
15341 variable case.
15342
15343 2000-07-09 Mark Mitchell <mark@codesourcery.com>
15344
15345 * cp-tree.h (char_type_p): New function.
15346 * decl.c (init_decl_processing): Don't initialize
15347 signed_wchar_type_node or unsigned_wchar_type_node.
15348 (complete_array_type): Handle brace-enclosed string-constants.
15349 * rtti.c (emit_support_tinfos): Remove #if 0'd code.
15350 * tree.c (char_type_p): New function.
15351 * typeck2.c (digest_init): Use char_type_p.
15352
15353 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
15354
15355 * pt.c (tsubst): Don't layout type, if it's error_mark.
15356
15357 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
15358
15359 * pt.c (instantiate_pending_templates): Reset template level.
15360
15361 2000-07-05 Jason Merrill <jason@redhat.com>
15362
15363 * call.c (joust): Don't complain about `operator char *()' beating
15364 `operator const char *() const'.
15365
15366 2000-07-04 scott snyder <snyder@fnal.gov>
15367 Jason Merrill <jason@redhat.com>
15368
15369 * repo.c (repo_get_id): Handle the case where a class with virtual
15370 bases has a null TYPE_BINFO_VTABLE.
15371
15372 2000-07-04 Kevin Buhr <buhr@stat.wisc.edu>
15373 Jason Merrill <jason@redhat.com>
15374
15375 * parse.y (member_init): Just pass in the type.
15376 * init.c (expand_member_init): Handle getting a type.
15377
15378 2000-07-04 Martin v. Löwis <loewis@informatik.hu-berlin.de>
15379 Jason Merrill <jason@redhat.com>
15380
15381 * decl.c (finish_function): Warn if a function has no return
15382 statement.
15383 Suggested by Andrew Koenig.
15384 * typeck.c (check_return_expr): Do set current_function_returns_value
15385 if we got an error_mark_node.
15386
15387 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
15388
15389 * decl2.c (push_decl_namespace): Push the original namespace.
15390
15391 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
15392
15393 * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
15394 * semantics.c (begin_class_definition): Clear it.
15395
15396 2000-07-02 Benjamin Chelf <chelf@codesourcery.com>
15397
15398 * cp-tree.h (genrtl_goto_stmt): Remove declaration.
15399 (genrtl_expr_stmt): Likewise.
15400 (genrtl_decl_stmt): Likewise.
15401 (genrtl_if_stmt): Likewise.
15402 (genrtl_while_stmt): Likewise.
15403 (genrtl_do_stmt): Likewise.
15404 (genrtl_return_stmt): Likewise.
15405 (genrtl_for_stmt): Likewise.
15406 (genrtl_break_stmt): Likewise.
15407 (genrtl_continue_stmt): Likewise.
15408 (genrtl_scope_stmt): Likewise.
15409 (genrtl_switch_stmt): Likewise.
15410 (genrtl_case_label): Likewise.
15411 (genrtl_begin_compound_stmt): Likewise.
15412 (genrtl_finish_compound_stmt): Likewise.
15413 (genrtl_compound_stmt): Likewise.
15414 (genrtl_asm_stmt): Likewise.
15415
15416 * init.c (begin_init_stmts): Remove call to
15417 genrtl_begin_compound_stmt.
15418 (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
15419
15420 * semantics.c (lang_expand_stmt): Changed call to
15421 genrtl_compound_stmt to ignore return value.
15422
15423 2000-07-02 Mark Mitchell <mark@codesourcery.com>
15424
15425 * mangle.c (canonicalize_for_substitution): Return the canonical
15426 variant of a type.
15427
15428 * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
15429 TYPE_DECL.
15430 * typeck.c (commonparms): Remove obstack manipulations.
15431
15432 2000-07-01 Benjamin Chelf <chelf@codesourcery.com>
15433
15434 * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
15435
15436 * Makefile.in (OBJS): Added ../c-semantics.o.
15437 (OBJDEPS): Likewise.
15438
15439 * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
15440 ../c-common.h.
15441 (struct stmt_tree): Added comment.
15442 (current_function_name_declared): Removed.
15443 (stmts_are_full_exprs_p): Likewise.
15444 (genrtl_do_pushlevel): Likewise.
15445 (genrtl_clear_out_block): Likewise.
15446 (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
15447 (DECL_ANON_UNION_ELEMS): Likewise.
15448 (emit_local_var): Likewise.
15449 (make_rtl_for_local_static): Likewise.
15450 (do_case): Likewise.
15451 (expand_stmt): Likewise.
15452 (genrtl_decl_cleanup): Likewise.
15453 (c_expand_asm_operands): Likewise.
15454 (c_expand_return): Likewise.
15455 (c_expand_start_case): Likewise.
15456
15457 * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
15458 (emit_local_var): Likewise.
15459 (initialize_local_var): Change reference to
15460 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
15461 Change reference to stmts_are_full_exprs_p to
15462 current_stmt_tree->stmts_are_full_exprs_p.
15463 (push_cp_function_context): Likewise.
15464
15465 * expect.c (expand_throw): Change reference to
15466 stmts_are_full_exprs_p.
15467
15468 * init.c (build_aggr_init): Change reference to
15469 stmts_are_full_exprs_p.
15470 (build_vec_init): Likewise.
15471
15472 * optimize.c (maybe_clone_body): Change reference to
15473 current_function_name_declared to
15474 cp_function_chain->name_declared.
15475
15476 * pt.c (instantiate_decl): Change reference to
15477 current_function_name_declared to
15478 cp_function_chain->name_declared.
15479
15480 * semantics.c (expand_cond): Moved declaration to c-common.h.
15481 (genrtl_do_pushlevel): Moved to c-semantics.c.
15482 (genrtl_clear_out_block): Likewise.
15483 (genrtl_goto_stmt): Likewise.
15484 (genrtl_expr_stmt): Likewise.
15485 (genrtl_decl_stmt): Likewise.
15486 (gerntl_if_stmt): Likewise.
15487 (genrtl_while_stmt): Likewise.
15488 (genrtl_do_stmt): Likewise.
15489 (genrtl_return_stmt): Likewise.
15490 (genrtl_for_stmt): Likewise.
15491 (genrtl_break_stmt): Likewise.
15492 (genrtl_continue_stmt): Likewise.
15493 (genrtl_scope_stmt): Likewise.
15494 (genrtl_switch_stmt): Likewise.
15495 (genrtl_case_label): Likewise.
15496 (genrtl_begin_compound_stmt): Likewise.
15497 (genrtl_finish_compound_stmt): Likewise.
15498 (genrtl_compound_stmt): Likewise.
15499 (genrtl_asm_stmt): Likewise.
15500 (genrtl_decl_cleanup): Likewise.
15501 (expand_cond): Likewise.
15502 (expand_stmt): Renamed to ...
15503 (lang_expand_stmt): ... this.
15504 (lang_expand_expr_stmt): Initialize.
15505 (set_current_function_name_declared): Likewise.
15506 (stmts_are_full_exprs_p): Likewise.
15507 (current_function_name_declared): Likewise.
15508 (anon_aggr_type_p): Likewise.
15509 (do_poplevel): Change reference to
15510 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
15511 Change reference to stmts_are_full_exprs_p to
15512 current_stmt_tree->stmts_are_full_exprs_p.
15513 (add_tree): Likewise.
15514 (finish_expr_stmt): Likewise.
15515 (prep_stmt): Likewise.
15516 (lang_expand_stmt): Likewise.
15517 (begin_compound_stmt): Change reference to
15518 current_function_name_declared to
15519 cp_function_chain->name_declared and call to
15520 current_function_name_declared().
15521 (setup_vtbl_ptr): Likewise.
15522 (genrtl_do_poplevel): Removed.
15523
15524 2000-06-30 Jason Merrill <jason@redhat.com>
15525
15526 * init.c (init_init_processing): Go back to aligning like
15527 double_type_node for old ABI.
15528 (get_cookie_size): Make cookie larger if we get a type that needs
15529 more alignment.
15530 (build_vec_delete): Call it.
15531
15532 * typeck.c (qualify_type_recursive): New fn.
15533 (composite_pointer_type): Use it.
15534 (build_binary_op): Use composite_pointer_type.
15535
15536 2000-06-24 Carlos O'Ryan <coryan@cs.wustl.edu>
15537 Jason Merrill <jason@redhat.com>
15538
15539 * typeck.c (check_return_expr): Don't complain about returning
15540 NULL from operator new if -fcheck-new.
15541 * cp-tree.h: Declare flag_check_new here.
15542 * init.c: Not here.
15543
15544 2000-06-28 Alex Samuel <samuel@codesourcery.com>
15545
15546 * mangle.c (find_substitution): Use same_type_p.
15547 (write_encoding): Don't check for substitutions.
15548
15549 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
15550
15551 * parse.y (expr_no_comma_rangle): New non-terminal.
15552 (template_parm): Use it for default parameter case.
15553 (template_arg): Use it.
15554 (expr_no_commas): Remove commented out undefined extensions.
15555 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
15556 * parse.h, parse.c: Rebuilt.
15557
15558 2000-06-30 Mark Mitchell <mark@codesourcery.com>
15559
15560 * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
15561 (finish_asm_stmt): Do it here, instead.
15562
15563 * cp-tree.h (ridpointers): Don't declare.
15564 * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
15565 (record_builtin_java_type): Likewise.
15566 (init_decl_processing): Likewise.
15567 * lex.c: Move inclusion of lex.h.
15568 (ridpointers): Don't define.
15569 (init_parse): Initialize ripdointers. Use CP_RID_MAX instead of
15570 RID_MAX.
15571 * lex.h (enum rid): Rename to ...
15572 (enum cp_rid): ... this.
15573 (ridpointers): Don't declare.
15574 * parse.y: Move inclusion of lex.h.
15575 * parse.c: Regenerated.
15576 * spew.c: Move inclusion of lex.h.
15577
15578 * cp-tree.h (struct language_function): Remove temp_name_counter.
15579 (temp_name_counter): Remove.
15580 (get_temp_name): Change prototype.
15581 (get_guard): New function.
15582 (get_guard_cond): Likewise.
15583 (set_guard): Likewise.
15584 * cvt.c (build_up_reference): Adjust call to get_temp_name.
15585 * decl.c (expand_static_init): Use get_guard and friends to
15586 implement guard variables.
15587 * decl2.c (get_temp_name): Assume that the variables created are
15588 always static.
15589 (get_sentry): Rename to ...
15590 (get_guard): ... this. Implement new ABI guard variables.
15591 (get_guard_bits): New function.
15592 (get_guard_cond): Likewise.
15593 (set_guard): Likewise.
15594 (start_static_initialization_or_destruction): Use them.
15595 (do_static_initialization): Replace sentry with guard throughout.
15596 (do_static_destruction): Likewise.
15597 * init.c (create_temporary_var): Add comment.
15598
15599 2000-06-28 Alex Samuel <samuel@codesourcery.com>
15600
15601 * mangle.c (find_substitution): Use same_type_p.
15602 (write_encoding): Don't check for substitutions.
15603
15604 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
15605
15606 * parse.y (expr_no_comma_rangle): New non-terminal.
15607 (template_parm): Use it for default parameter case.
15608 (template_arg): Use it.
15609 (expr_no_commas): Remove commented out undefined extensions.
15610 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
15611 * parse.h, parse.c: Rebuilt.
15612
15613 2000-06-29 Mark Mitchell <mark@codesourcery.com>
15614
15615 * cp-tree.h (flag_const_strings): Remove.
15616 (warn_parentheses): Likewise.
15617 (warn_format): Likewise.
15618 (common_type): Likewise.
15619 (default_conversion): Likewise.
15620 (build_binary_op): Likewise.
15621 (cp_build_binary_op): New macro.
15622 * call.c (build_new_op): Use cp_build_binary_op instead of
15623 build_binary_op.
15624 * class.c (build_vtable_entry_ref): Likewise.
15625 * decl.c (expand_static_init): Likewise.
15626 (compute_array_index_type): Likewise.
15627 (build_enumerator): Likewise.
15628 * decl2.c (delete_sanity): Likewise.
15629 (start_static_initialization_or_destruction): Likewise.
15630 * error.c (dump_type_suffix): Likewise.
15631 * init.c (resolve_offset_ref): Likewise.
15632 (build_new): Likewise.
15633 (build_new_1): Likewise.
15634 (build_vec_delete_1): Likewise.
15635 (build_vec_init): Likewise.
15636 (build_delete): Likewise.
15637 * rtti.c (synthesize_tinfo_fn): Likewise.
15638 (synthesize_tinfo_var): Likewise.
15639 * search.c (expand_upcast_fixups): Likewise.
15640 (fixup_all_virtual_upcast_offsets): Likewise.
15641 * typeck.c (build_array_ref): Likewise.
15642 (get_member_function_from_ptrfunc): Likewise.
15643 (build_binary_op): Add parameter.
15644 (pointer_int_sum): Use cp_build_binary_op.
15645 (pointer_diff): Likewise.
15646 (build_modify_expr): Likewise.
15647 (get_delta_difference): Likewise.
15648 (build_ptrmemfunc): Likewise.
15649
15650 2000-06-29 Nathan Sidwell <nathan@codesourcery.com>
15651
15652 * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
15653 * decl.c (create_implicit_typedef): Adjust.
15654 * decl2.c (build_artificial_parm): Adjust.
15655 * method.c (implicitly_declare_fn): Adjust.
15656 * pt.c (push_inline_template_parms_recursive): Adjust.
15657 (process_template_parm): Adjust.
15658 (overloaded_template_name): Adjust.
15659 * semantics.c (finish_template_template_parm): Adjust.
15660
15661 2000-06-28 Mark Mitchell <mark@codesourcery.com>
15662
15663 * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
15664 * class.c (update_vtable_entry_for_fn): Correct logic for deciding
15665 where to emit thunks.
15666 (build_vtt): Adjust call to build_vtt_inits.
15667 (build_vtt_inits): Add parameter to indicate whether or not
15668 sub-VTTs for virtual bases should be included. Adjust handling of
15669 construction vtables.
15670 (get_matching_base): New function.
15671 (dfs_build_vtt_inits): Rename to ...
15672 (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
15673 construction vtables.
15674 (dfs_fixup_binfo_vtbls): Likewise.
15675 (build_ctor_vtbl_groups): Build construction vtables for virtual
15676 bases, too.
15677 (accumulate_vtbl_inits): Tweak logic for deciding whether or not
15678 to build construction vtbls.
15679 (dfs_accumulate_vtbl_inits): Adjust handling of
15680 construction vtables.
15681
15682 * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
15683 types correctly.
15684
15685 2000-06-27 Mark Mitchell <mark@codesourcery.com>
15686
15687 * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
15688
15689 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
15690
15691 * search.c (hides): Remove.
15692 (is_subobject_of_p): Add most_derived parameter. Use
15693 CANONICAL_BINFO.
15694 (lookup_field_queue_p): Adjust.
15695 (lookup_field_r): Adjust.
15696
15697 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
15698
15699 * decl2.c (handle_class_head): Bash typedefs to the type's main
15700 decl.
15701
15702 2000-06-25 Mark Mitchell <mark@codesourcery.com>
15703
15704 * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
15705 (begin_global_stmt_expr): ... this.
15706 (genrtl_finish_stmt_expr): Rename to ...
15707 (finish_global_stmt_expr): ... this.
15708 * init.c (begin_init_stmts): Adjust calls.
15709 (finish_init_stmts): Likewise.
15710 * semantics.c (genrtl_begin_stmt_expr): Rename to ...
15711 (begin_global_stmt_expr): ... this.
15712 (genrtl_finish_stmt_expr): Rename to ...
15713 (finish_global_stmt_expr): ... this.
15714
15715 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
15716
15717 * search.c (lookup_member): Fix typo in comment.
15718
15719 2000-06-24 Jason Merrill <jason@redhat.com>
15720
15721 * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
15722 (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
15723
15724 2000-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
15725
15726 * parse.y (complex_direct_notype_declarator): Support global_scope.
15727 * Makefile.in: Adjust conflict count.
15728
15729 2000-06-23 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
15730
15731 * parse.y (template_arg): Convert TEMPLATE_DECL
15732 that is a template template parameter to
15733 TEMPLATE_TEMPLATE_PARM here.
15734
15735 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
15736 * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
15737 (copy_template_template_parm): Adjust prototype.
15738 * decl.c (grokdeclarator): Remove dead code.
15739 * pt.c (process_template_parm): Tidy.
15740 (lookup_template_class): Construct nodes in
15741 copy_template_template_parm.
15742 (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
15743 lookup_template_class. Use TYPE_TI_TEMPLATE.
15744 * tree.c (copy_template_template_parm): Add NEWARGS
15745 parameter.
15746 (mapcar): Adjust call to copy_template_template_parm.
15747 * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
15748 * method.c (build_template_template_parm_names): Change error
15749 code to avoid compilation warning.
15750
15751 * gxxint.texi: Document template template parameter
15752 name mangling.
15753
15754 2000-06-21 Alex Samuel <samuel@codesourcery.com>
15755
15756 * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
15757 (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
15758 (cp-demangle.o): New rule.
15759 (dyn-string.o): Likewise.
15760 * inc/cxxabi.h (__cxa_demangle): New declaration.
15761
15762 2000-06-22 Mark Mitchell <mark@codesourcery.com>
15763
15764 * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
15765 (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
15766 (lang_decl_flags): Add generate_with_vtable_p. Make vcall_offset
15767 a tree, not an int.
15768 (THUNK_GENERATE_WITH_VTABLE_P): New macro.
15769 (make_thunk): Change prototype.
15770 (emit_thunk): Rename to use_thunk.
15771 (mangle_thunk): Change prototype.
15772 * class.c (get_derived_offset): Simplify.
15773 (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
15774 BV_GENERATE_THUNK_WITH_VTABLE_P.
15775 (build_primary_vtable): Simplify.
15776 (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
15777 (dfs_find_base): Remove.
15778 (update_vtable_entry_for_fn): Correct bug in finding the base
15779 where a virtual function was first declared. Figure out whether
15780 or not to emit a vcall-thunk with the vtables in which it appears.
15781 Correct logic for deciding whether to use an ordinary thunk, or a
15782 vcall thunk.
15783 (finish_struct_1): Remove unnecssary code.
15784 (build_vtbl_initializer): Use ssize_int for the running counter of
15785 negative indices.
15786 (build_vtbl_initializer): Only use vcall thunks where necessary.
15787 Mark thunks as needing to be emitted with their vtables, or not.
15788 (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
15789 indices. Use size_binop.
15790 (dfs_build_vcall_offset_vtbl_entries): Don't rely on
15791 BINFO_PRIMARY_MARKED_P here. Use BV_FN consistently. Use
15792 size_binop.
15793 (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
15794 (build_vtable_entry): Mark thunks as needing to be emitted with
15795 their vtables, or not.
15796 * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
15797 * decl2.c (mark_vtable_entries): Use use_thunk instead of
15798 emit_thunk.
15799 * dump.c (dequeue_and_dump): Remove dead code. Dump new thunk
15800 information.
15801 * error.c (dump_expr): Use BV_FN.
15802 * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
15803 not an int.
15804 * method.c (make_thunk): Likewise.
15805 (emit_thunk): Rename to use_thunk. Allow callers to decide
15806 whether or not to actually emit the thunk. Adjust for changes in
15807 representation of vcall offsets.
15808 * search.c (dfs_get_pure_virtuals): Use BV_FN.
15809 * semantics.c (emit_associated_thunks): New function.
15810 (expand_body): Use it.
15811 * ir.texi: Adjust decriptions of thunks.
15812
15813 2000-06-22 Jason Merrill <jason@redhat.com>
15814
15815 * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
15816 (tsubst_friend_function): Copy it here.
15817
15818 * decl.c (grok_op_properties): Fix typo.
15819
15820 * decl2.c (delete_sanity): Clarify warning, avoid failure on
15821 deleting void*.
15822
15823 * pt.c (check_explicit_specialization): Clarify error.
15824
15825 * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
15826 an old OVERLOAD when we're declaring a non-function.
15827 (pushdecl, destroy_local_var): Check for error_mark_node.
15828 (warn_extern_redeclared_static): Also bail early if
15829 we're a CONST_DECL.
15830 (push_overloaded_decl): Ignore an old error_mark_node.
15831
15832 2000-06-22 Nathan Sidwell <nathan@codesourcery.com>
15833
15834 * call.c (build_x_va_arg): Check if in a template decl.
15835 * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
15836
15837 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
15838
15839 * class.c (push_lang_context): TYPE_NAME gets you to the Java
15840 types DECLs.
15841 * decl.c (check_goto): Computed gotos assumed OK.
15842
15843 2000-06-20 Jason Merrill <jason@redhat.com>
15844
15845 * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
15846 for which we don't need to look for instantiations.
15847
15848 2000-06-21 Nathan Sidwell <nathan@codesourcery.com>
15849
15850 * parse.y (program): Always call finish_translation_unit.
15851 * parse.c, parse.h: Rebuilt.
15852
15853 2000-06-20 Zack Weinberg <zack@wolery.cumb.org>
15854
15855 * method.c: Don't include hard-reg-set.h.
15856
15857 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
15858
15859 * rtti.c (get_base_offset): Cope when vbase field is in a base.
15860
15861 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
15862
15863 * call.c (build_conditional_expr): Use VOID_TYPE_P.
15864 * cvt.c (cp_convert_to_pointer): Likewise.
15865 (convert_to_void): Likewise.
15866 * error.c (dump_expr): Likewise.
15867 * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
15868 * init.c (build_delete): Likewise.
15869 * method.c (emit_thunk): Likewise.
15870 * optmize.c (declare_return_variable): Likewise.
15871 * rtti.c (get_tinfo_decl_dynamic): Likewise.
15872 (get_typeid): Likewise.
15873 (build_dynamic_cast_1): Likewise.
15874 * typeck.c (composite_pointer_type): Likewise.
15875 (common_type): Likewise.
15876 (build_indirect_ref): Likewise.
15877 (build_binary_op): Likewise.
15878 (build_x_compound_expr): Likewise.
15879 (check_return_expr): Likewise.
15880 * typeck2.c (add_exception_specifier): Likewise.
15881
15882 * mangle.c (write_method_parms): Use direct comparison for end
15883 of parmlist.
15884
15885 2000-06-19 Benjamin Chelf <chelf@codesourcery.com>
15886
15887 * cp-tree.h (genrtl_try_block): Declare function.
15888 (genrtl_handler): Likewise.
15889 (genrtl_catch_block): Likewise.
15890 (genrtl_ctor_stmt): Likewise.
15891 (genrtl_subobject): Likewise.
15892 (genrtl_decl_cleanup): Likewise.
15893 (genrtl_do_poplevel): Likewise.
15894 (genrtl_do_pushlevel): Likewise.
15895 (genrtl_clear_out_block): Likewise.
15896 (genrtl_goto_stmt): Likewise.
15897 (genrtl_expr_stmt): Likewise.
15898 (genrtl_decl_stmt): Likewise.
15899 (genrtl_if_stmt): Likewise.
15900 (genrtl_while_stmt): Likewise.
15901 (genrtl_do_stmt): Likewise.
15902 (genrtl_return_stmt): Likewise.
15903 (genrtl_for_stmt): Likewise.
15904 (genrtl_break_stmt): Likewise.
15905 (genrtl_continue_stmt): Likewise.
15906 (genrtl_scope_stmt): Likewise.
15907 (genrtl_switch_stmt): Likewise.
15908 (genrtl_case_label): Likewise.
15909 (genrtl_begin_compound_stmt): Likewise.
15910 (genrtl_finish_compound_stmt): Likewise.
15911 (genrtl_compound_stmt): Likewise.
15912 (genrtl_asm_stmt): Likewise.
15913 (genrtl_named_return_value): Likewise.
15914 (genrtl_begin_stmt_expr): Likewise.
15915 (genrtl_finish_stmt_expr): Likewise.
15916 (finish_for_stmt): Removed first argument.
15917 (finish_switch_stmt): Likewise.
15918
15919 * semantics.c (genrtl_try_block): Define function.
15920 (genrtl_handler): Likewise.
15921 (genrtl_catch_block): Likewise.
15922 (genrtl_ctor_stmt): Likewise.
15923 (genrtl_subobject): Likewise.
15924 (genrtl_decl_cleanup): Likewise.
15925 (genrtl_do_poplevel): Likewise.
15926 (genrtl_do_pushlevel): Likewise.
15927 (genrtl_clear_out_block): Likewise.
15928 (genrtl_goto_stmt): Likewise.
15929 (genrtl_expr_stmt): Likewise.
15930 (genrtl_decl_stmt): Likewise.
15931 (genrtl_if_stmt): Likewise.
15932 (genrtl_while_stmt): Likewise.
15933 (genrtl_do_stmt): Likewise.
15934 (genrtl_return_stmt): Likewise.
15935 (genrtl_for_stmt): Likewise.
15936 (genrtl_break_stmt): Likewise.
15937 (genrtl_continue_stmt): Likewise.
15938 (genrtl_scope_stmt): Likewise.
15939 (genrtl_switch_stmt): Likewise.
15940 (genrtl_case_label): Likewise.
15941 (genrtl_begin_compound_stmt): Likewise.
15942 (genrtl_finish_compound_stmt): Likewise.
15943 (genrtl_compound_stmt): Likewise.
15944 (genrtl_asm_stmt): Likewise.
15945 (genrtl_named_return_value): Likewise.
15946 (genrtl_begin_stmt_expr): Likewise.
15947 (genrtl_finish_stmt_expr): Likewise.
15948 (finish_for_stmt): Removed first argument and generate rtl
15949 specific code.
15950 (finish_switch_stmt): Likewise.
15951 (do_poplevel): Removed generate rtl specific code.
15952 (do_pushlevel): Likewise.
15953 (add_tree): Likewise.
15954 (finish_goto_stmt): Likewise.
15955 (finish_expr_stmt): Likewise.
15956 (begin_if_stmt): Likewise.
15957 (finish_if_stmt_cond): Likewise.
15958 (finish_then_clause): Likewise.
15959 (begin_else_clause): Likewise.
15960 (finish_else_clause): Likewise.
15961 (finish_if_stmt): Likewise.
15962 (clear_out_block): Likewise.
15963 (begin_while_stmt): Likewise.
15964 (finish_while_stmt_cond): Likewise.
15965 (finish_while_stmt): Likewise.
15966 (begin_do_stmt): Likewise.
15967 (finish_do_body): Likewise.
15968 (finish_do_stmt): Likewise.
15969 (finish_return_stmt): Likewise.
15970 (begin_for_stmt): Likewise.
15971 (finish_for_init_stmt): Likewise.
15972 (finish_for_cond): Likewise.
15973 (finish_for_expr): Likewise.
15974 (finish_break_stmt): Likewise.
15975 (finish_continue_stmt): Likewise.
15976 (begin_switch_stmt): Likewise.
15977 (finish_switch_cond): Likewise.
15978 (finish_case_label): Likewise.
15979 (begin_try_block): Likewise.
15980 (begin_function_try_block): Likewise.
15981 (finish_try_block): Likewise.
15982 (finish_cleanup_try_block): Likewise.
15983 (finish_cleanup): Likewise.
15984 (finish_function_try_block): Likewise.
15985 (finish_handler_sequence): Likewise.
15986 (finish_function_handler_sequence): Likewise.
15987 (begin_handler): Likewise.
15988 (finish_handler_parms): Likewise.
15989 (begin_catch_block): Likewise.
15990 (finish_handler): Likewise.
15991 (begin_compound_stmt): Likewise.
15992 (finish_compound_stmt): Likewise.
15993 (finish_asm_stmt): Likewise.
15994 (finish_label_stmt): Likewise.
15995 (finish_label_decl): Likewise.
15996 (finish_subobject): Likewise.
15997 (finish_decl_cleanup): Likewise.
15998 (finish_named_return_value): Likewise.
15999 (begin_stmt_expr): Likewise.
16000 (finish_stmt_expr): Likewise.
16001
16002 * decl.c (initialize_local_var): Changed call to finish_expr_stmt
16003 to call genrtl_expr_stmt when appropriate.
16004
16005 * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
16006 begin_compound_expr to call genrtl_begin_stmt_expr and
16007 genrtl_begin_compound_expr when appropriate.
16008 (finish_init_stmts): Changed calls to finish_compound_expr and
16009 finish_stmt_expr to call genrtl_finish_compound_expr and
16010 genrtl_finish_stmt_expr when appropriate.
16011 (expand_default_init): Changed call to finish_expr_stmt to call
16012 genrtl_expr_stmt when appropriate.
16013 (build_vec_init): Likewise.
16014
16015 * parse.y (simple_stmt): Removed first argument from call to
16016 finish_for_stmt. Removed first argument from call to
16017 finish_switch_stmt.
16018
16019 * parse.c: Regenerated.
16020
16021 * pt.c (tsubst_expr): Removed first argument from call to
16022 finish_for_stmt. Removed first argument from call to
16023 finish_switch_stmt.
16024
16025 2000-06-16 Benjamin Chelf <chelf@codesourcery.com>
16026
16027 * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
16028 CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
16029
16030 * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
16031 (cplus_tree_code_length[]): Likewise.
16032 (cplus_tree_code_name[]): Likewise.
16033 (init_parse): Added call to add_c_tree_codes. Changed
16034 LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
16035
16036 2000-06-16 Mark Mitchell <mark@codesourcery.com>
16037
16038 * cp-tree.h (finish_mem_initializers): Declare.
16039 (count_trees): Likewise.
16040 * parse.y (base_init): Use finish_mem_initializers.
16041 * semantics.c (finish_mem_initializers): New function.
16042
16043 * tree.c (count_trees_r): Prototype. Use DATA parameter to store
16044 the number of trees.
16045 (n_trees): Remove.
16046 (count_trees): Don't use it.
16047
16048 2000-06-15 Jason Merrill <jason@redhat.com>
16049
16050 * tree.c (count_trees): New debugging function.
16051
16052 * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
16053 * init.c (build_member_call): Pull out the name of a DECL.
16054
16055 * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
16056 * semantics.c (expand_body): Push to TV_INTEGRATION here.
16057 * optimize.c (optimize_function): Not here.
16058 * pt.c (instantiate_decl): Push to TV_PARSE.
16059
16060 2000-06-15 Mark Mitchell <mark@codesourcery.com>
16061
16062 * cp-tree.h (struct language_function): Remove x_base_init_list
16063 and x_member_init_list.
16064 (current_base_init_list): Remove.
16065 (current_member_init_list): Likewise.
16066 (setup_vtbl_ptr): Change prototype.
16067 (emit_base_init): Likewise.
16068 (expand_member_init): Likewise.
16069 (reinit_parse_for_function): Remove.
16070 * decl.c (save_function_data): Don't clear x_base_init_list and
16071 x_member_init_list.
16072 (mark_language_function): Don't mark them.
16073 * init.c (perform_member_init): Tweak comment.
16074 (sort_member_init): Take the list of initializers as an argument.
16075 (sort_base_init): Likewise.
16076 (emit_base_init): Likewise.
16077 (expand_member_init): Return the initializer. Don't use global
16078 variables.
16079 * lex.c (reinit_parse_for_function): Remove.
16080 * method.c (build_template_parm_names): Correct substitution.
16081 (do_build_copy_constructor): Don't use current_member_init_list
16082 and current_base_init_list.
16083 (synthesize_method): Likewise.
16084 * parse.y (base_init): Split mem-initializers into
16085 base-initializers and field-initializers.
16086 (member_init_list): Build up the list here.
16087 (member_init): Return the initializer.
16088 (fn.depfn): Don't use reinit_parse_for_function.
16089 * parse.c: Regenerated.
16090 * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
16091 ERROR_MARK.
16092 (tsubst_expr): Don't use current_member_init_list
16093 and current_base_init_list.
16094 (tsubst_expr_values): Rename to ...
16095 (tsubst_initializer_list): ... this. Use convert_from_reference.
16096 * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
16097 and current_base_init_list.
16098 (begin_function_definition): Don't call reinit_parse_for_function.
16099
16100 * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
16101
16102 * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
16103 correctly.
16104
16105 * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
16106
16107 2000-06-14 Benjamin Chelf <chelf@codesourcery.com>
16108
16109 * cp-tree.h (IF_COND): Move to c-common.h.
16110 (THEN_CLAUSE): Likewise.
16111 (ELSE_CLAUSE): Likewise.
16112 (WHILE_COND): Likewise.
16113 (WHILE_BODY): Likewise.
16114 (DO_COND): Likewise.
16115 (DO_BODY): Likewise.
16116 (RETURN_EXPR): Likewise.
16117 (EXPR_STMT_EXPR): Likewise.
16118 (FOR_INIT_STMT): Likewise.
16119 (FOR_COND): Likewise.
16120 (FOR_EXPR): Likewise.
16121 (FOR_BODY): Likewise.
16122 (SWITCH_COND): Likewise.
16123 (SWITCH_BODY): Likewise.
16124 (CASE_LOW): Likewise.
16125 (CASE_HIGH): Likewise.
16126 (GOTO_DESTINATION): Likewise.
16127 (COMPOUND_BODY): Likewise.
16128 (ASM_CV_QUAL): Likewise.
16129 (ASM_STRING): Likewise.
16130 (ASM_OUTPUTS): Likewise.
16131 (ASM_INPUTS): Likewise.
16132 (ASM_CLOBBERS): Likewise.
16133 (DECL_STMT_DECL): Likewise.
16134 (STMT_EXPR_STMT): Likewise.
16135 (LABEL_STMT_LABEL): Likewise.
16136 (SCOPE_BEGIN_P): Likewise.
16137 (SCOPE_END_P): Likewise.
16138 (SCOPE_STMT_BLOCK): Likewise.
16139 (SCOPE_NULLIFIED_P): Likewise.
16140 (SCOPE_NO_CLEANUPS_P): Likewise.
16141 (SCOPE_PARTIAL_P): Likewise.
16142 (ASM_VOLATILE_P): Likewise.
16143 (STMT_LINENO): Likewise.
16144 (STMT_LINENO_FOR_FN_P): Likewise.
16145
16146 * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
16147 ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
16148 FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
16149 CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
16150 SCOPE_STMT, CASE_LABEL, STMT_EXPR.
16151
16152 * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
16153
16154 * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
16155 (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
16156
16157 * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
16158 (cplus_tree_code_length[]): Added '#include "c-common.def"'.
16159 (cplus_tree_code_name[]): Added '#include "c-common.def"'.
16160
16161 2000-06-14 Mark Mitchell <mark@codesourcery.com>
16162
16163 * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
16164 * class.c (dfs_find_final_overrider): Set it appropriately.
16165 (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
16166 avoid unneeded secondary vptrs.
16167
16168 2000-06-13 Jakub Jelinek <jakub@redhat.com>
16169
16170 * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
16171 (check_bitfield_decl, check_field_decl): Likewise.
16172 (build_vtbl_or_vbase_field, build_base_field): Likewise.
16173 (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
16174 * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
16175 (xfer_tag, finish_enum): Likewise.
16176 * decl2.c (finish_builtin_type): Likewise.
16177 * init.c (init_init_processing): Likewise.
16178 * pt.c (instantiate_class_template): Likewise.
16179 * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
16180 * cp-tree.h (struct lang_type): Add user_align member.
16181 (CLASSTYPE_USER_ALIGN): Define.
16182
16183 2000-06-13 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
16184
16185 * Make-lang.in (c++.install-common): Install g++-cross in
16186 $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
16187 $(target_alias)-g++ and $(target_alias)-c++.
16188
16189 2000-06-12 Mark Mitchell <mark@codesourcery.com>
16190
16191 * class.c (vcall_offset_data_s): Add last_init and fns.
16192 (overrides): Rename to same_signature_p.
16193 (dfs_find_final_overrider): Adjust accordingly.
16194 (mark_overriders): Likewise.
16195 (warn_hidden): Likewise.
16196 (build_vtbl_initializer): Reorganize machinery for building things
16197 at negative offsets.
16198 (build_vcall_and_vbase_vtbl_entries): Likewise.
16199 (build_vbase_offset_vtbl_entries): Likewise.
16200 (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
16201 offset entries. Do not create two entries for functions with the
16202 same signature.
16203 (build_vcall_offset_vtbl_entries): Initialize vod->fns.
16204 (build_rtti_vtbl_entries): Reorganize machinery for building things
16205 at negative offsets.
16206
16207 * optimize.c (expand_call_inline): Don't recurse into the code
16208 used to initialize the parameters more than once.
16209
16210 2000-06-11 Mark Mitchell <mark@codesourcery.com>
16211
16212 * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
16213 (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
16214 (find_substitution): Only use the `Sa' substitution for
16215 std::allocator, not instantiations of it.
16216 (write_template_prefix): Move comment. Only use a TREE_LIST to
16217 represent substitutions for a member template.
16218 (write_array_type): Mangle array dimensions correctly.
16219 * optimize.c (maybe_clone_body): Copy more information from the
16220 cloned function.
16221 * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
16222 on the regenerated declaration.
16223
16224 2000-06-11 Chip Salzenberg <chip@valinux.com>
16225 Mark Mitchell <mark@codesourcery.com>
16226
16227 * class.c (build_vtable): Clarify comment.
16228 (build_ctor_vtbl_group): Pass the most derived type to
16229 build_vtable.
16230
16231 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16232
16233 * decl2.c (compare_options): Don't needlessly cast away const-ness.
16234
16235 2000-06-10 Mark Mitchell <mark@codesourcery.com>
16236
16237 * decl.c (add_binding): Handle duplicate declarations of external
16238 variables.
16239
16240 2000-06-09 Chip Salzenberg <chip@valinux.com>
16241 Mark Mitchell <mark@codesourcery.com>
16242
16243 * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
16244 argument.
16245 (write_signed_number): New macro.
16246 (write_unsigned_number): Likewise.
16247 (write_source_name): Use them.
16248 (write_number): Handle signed and unsigned values.
16249 (write_integer_cst): Use tree_int_cst_sgn, and use
16250 write_unsigned_number or write_signed_number as appropriate.
16251 (write_discriminator): Use write_unsigned_number or
16252 write_signed_number as appropriate.
16253 (write_template_arg_literal): Likewise.
16254 (write_array_type): Use tree_low_cst.
16255 (write_template_parm): Use write_unsigned_number or
16256 write_signed_number as appropriate.
16257 (write_substitution): Adjust call to write_number.
16258 (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
16259 (write_expression): Handle non-type template arguments of
16260 reference type correctly.
16261 (mangle_thunk): Use write_signed_number.
16262
16263 2000-06-09 Chip Salzenberg <chip@valinux.com>
16264
16265 * mangle.c (find_substition): Don't mangle objects with typename
16266 substitutions (e.g. "cin" as "Si").
16267
16268 2000-06-09 Zack Weinberg <zack@wolery.cumb.org>
16269
16270 * call.c (add_candidate): Use ggc_alloc_cleared.
16271 * decl.c (lookup_label): Likewise.
16272 * lex.c (retrofit_lang_decl): Likewise.
16273
16274 2000-06-09 Jason Merrill <jason@casey.soma.redhat.com>
16275
16276 * semantics.c (expand_body): Push to TV_EXPAND.
16277 * optimize.c (optimize_function): Push to TV_INTEGRATION.
16278 * decl.c (start_function): Always call announce_function.
16279
16280 * tinfo2.cc: Just declare abort.
16281
16282 2000-06-09 Gabriel Dos Reis <gdr@codesourcery.com>
16283
16284 * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
16285 whenever @ is a symbolic name.
16286
16287 2000-06-08 Jakub Jelinek <jakub@redhat.com>
16288
16289 * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
16290
16291 2000-06-07 Mark Mitchell <mark@codesourcery.com>
16292
16293 * decl.c (pushdecl): Look up functions by DECL_NAME, not
16294 DECL_ASSEMBLER_NAME.
16295
16296 2000-06-06 Mark Mitchell <mark@codesourcery.com>
16297
16298 * decl2.c (c_language): Define.
16299
16300 2000-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
16301
16302 * lex.c (lang_init_options): Tweak.
16303
16304 * decl2.c: Remove #inclusion of diagnostic.h
16305 (lang_decode_option): Move diagnostic formatting options to
16306 toplevel.
16307
16308 * lang-options.h: Remove documentation for diagnostic options.
16309
16310 * Makefile.in (lex.o): Depends upon diagnostic.h
16311
16312 2000-06-06 Mark Mitchell <mark@codesourcery.com>
16313
16314 * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
16315 the same DECL_RESULT, it's not a redefinition.
16316 * pt.c (tsubst_decl): Remove code to handle illegal
16317 specializations.
16318
16319 2000-06-06 Nathan Sidwell <nathan@codesourcery.com>
16320
16321 * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
16322
16323 2000-06-05 Jason Merrill <jason@casey.soma.redhat.com>
16324
16325 * search.c (maybe_suppress_debug_info): Don't check
16326 CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
16327
16328 * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
16329 here if extern_p.
16330
16331 Remember instantiation context in deferred instantiations.
16332 * cp-tree.h (struct tinst_level): Remove.
16333 (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
16334 * pt.c (current_tinst_level): Now a tree.
16335 (print_template_context, push_tinst_level, pop_tinst_level,
16336 tinst_for_decl): Adjust.
16337 (reopen_tinst_level): New fn.
16338 (init_pt): Register current_tinst_level as a root.
16339 (add_pending_template): Put current_tinst_level in TREE_PURPOSE
16340 of the pending templates list.
16341 (instantiate_pending_templates): Adjust. Call reopen_tinst_level.
16342 * lex.c (extract_interface_info): Adjust.
16343 * decl2.c (warn_if_unknown_interface): Adjust.
16344
16345 2000-06-05 Mark Mitchell <mark@codesourcery.com>
16346
16347 * class.c (indirect_primary_base_p): New function.
16348 (determine_primary_base): Use it.
16349
16350 2000-06-05 Nathan Sidwell <nathan@codesourcery.com>
16351
16352 Update new-abi dynamic cast algorithm.
16353 * tinfo.cc (__class_type_info::__dyncast_result): Add
16354 whole_details. Adjust constructor.
16355 (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
16356 Avoid unnecessary searching.
16357 (__dynamic_cast): Adjust for __dyncast_result::whole_details.
16358
16359 2000-06-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
16360
16361 * decl.c (init_decl_processing): Don't call record_component_aliases.
16362 * tree.c (build_cplus_array_type_1): Likewise.
16363
16364 2000-06-04 Mark Mitchell <mark@codesourcery.com>
16365
16366 * ir.texi: Correct typo.
16367 * mangle.c (write_expression): Handle non-type template arguments
16368 with reference type.
16369 * method.c (build_overload_value): Likewise.
16370 * pt.c (convert_nontype_argument): Explicitly represent conversion
16371 to a reference with an ADDR_EXPR.
16372 (unify): Always unify arguments in left-to-right order.
16373
16374 2000-06-03 Alex Samuel <samuel@codesourcery.com>
16375 Mark Mitchell <mark@codesourcery.com>
16376
16377 * Make-lang.in (CXX_SRCS): Add mangle.c.
16378 * Makefile.in (CXX_OBJS): Add mangle.o.
16379 (mangle.o): New rule.
16380
16381 * class.c (local_classes): New variable.
16382 * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
16383 (get_vtt_name): Use mangle_vtt_name for new ABI.
16384 (init_class_processing): Initialize local_classes.
16385 (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
16386 * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
16387 (std_identifier): New macro.
16388 (DECL_VOLATILE_MEMFUNC_P): New macro.
16389 (DECL_NAMESPACE_STD_P): Likewise.
16390 (local_classes): Declare.
16391 (get_mostly_instantiated_function_type): Declare.
16392 (init_mangle): Declare.
16393 (mangle_decl): Likewise.
16394 (mangle_type_string): Likewise.
16395 (mangle_type): Likewise.
16396 (mangle_typeinfo_for_type): Likewise.
16397 (mangle_typeinfo_string_for_type): Likewise.
16398 (mangle_vtbl_for_type): Likewise.
16399 (mangle_vtt_for_type): Likewise.
16400 (mangle_ctor_vtbl_for_type): Likewise.
16401 (mangle_thunk): Likewise.
16402 (mangle_conv_op_name_for_type): Likewise.
16403 (mangle_guard_variable): Likewise.
16404 * decl.c (pushtag): Keep track of local classes.
16405 (initialize_predefined_identifiers): Initialize std_identifier.
16406 (init_decl_processing): Use std_identifier.
16407 (start_decl): Don't treat instantiations as specializations.
16408 (grokdeclarator): Likewise.
16409 (grokvardecl): Call mangle_decl for new ABI. Only set mangled
16410 name for fully-instantiated templates.
16411 * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
16412 destructors with the new ABI.
16413 (finish_static_data_member_decl): Use mangle_decl under the new ABI.
16414 (grokfield): Use mangle_type for new ABI.
16415 (grokoptypename): Use mangle_conv_op_for_type for new ABI.
16416 (get_sentry): Use mangle_guard_variable for new ABI.
16417 (start_static_initialization_or_destruction): Likewise.
16418 * expr.c (extract_aggr_init): Remove.
16419 (extract_scalar_init): Likewise.
16420 (extract_init): Remove #if 0'd code.
16421 * mangle.c: New function.
16422 * method.c (build_mangled_name): Assert not flag_new_abi.
16423 (build_static_name): Likewise.
16424 (build_decl_overload_real): Likewise.
16425 (build_typename_overload): Likewise.
16426 (build_overload_with_type): Likewise.
16427 (build_overload_name): Likewise.
16428 (get_ctor_vtbl_name): Likewise.
16429 (start_squangling): Likewise.
16430 (get_id_2): Likewise.
16431 (set_mangled_name_for_decl): Call mangle_decl for new ABI.
16432 (init_method): Call init_mangle for new ABI.
16433 (make_thunk): Call mangle_thunk for new ABI.
16434 * operators.def: Correct new ABI manglings for the `%' operator.
16435 Add `::' operator.
16436 * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
16437 DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
16438 (lookup_template_class): Call mangle_decl for new ABI.
16439 (get_mostly_instantiated_function_type): New function.
16440 (set_mangled_name_for_template_decl): Use it.
16441 (tsubst_decl): Use set_mangled_name_for_decl for destructors with
16442 the new ABI. Use mangle_conv_op_name_for_type for instantiated
16443 conversion op names.
16444 * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
16445 (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
16446 (tinfo_base_init): Likewise. Mangle typeinfo string name with
16447 mangle_typeinfo_string_for_type.
16448
16449 2000-06-03 Mark Mitchell <mark@codesourcery.com>
16450
16451 * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
16452 (INNERMOST_TEMPLATE_ARGS): New macro.
16453 (innermost_args): Remove.
16454 (get_innermost_template_args): New function.
16455 * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
16456 * error.c (dump_function_decl): Be caution when using
16457 most_general_template.
16458 * method.c (build_template_parm_names): Use
16459 INNERMOST_TEMPLATE_ARGS.
16460 * pt.c (add_to_template_args): Tidy comment
16461 (get_innermost_template_args): New function.
16462 (check_explicit_specialization): Clear DECL_INITIAL for a new
16463 specialization.
16464 (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
16465 Tidy.
16466 (push_template_decl): Always register specializations of the most
16467 general template.
16468 (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
16469 (coerce_template_parms): Likewise.
16470 (lookup_template_class): Likewise.
16471 (innermost_args): Remove.
16472 (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
16473 (tsubst_decl): Handle tricky specializations. Use
16474 get_innermost_template_args.
16475 (instantiate_template): Simplify handling of partial
16476 instantiations.
16477 (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
16478 (most_general_template): Reimplement, in a more straightforward
16479 manner.
16480 (regenerate_decl_from_template): Tweak formatting. Use
16481 TMPL_ARGS_DEPTH for clarity.
16482 (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
16483
16484 * dump.c (dequeue_and_dump): Dump information about thunks.
16485
16486 2000-06-01 Richard Henderson <rth@cygnus.com>
16487
16488 * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
16489
16490 2000-06-01 Richard Henderson <rth@cygnus.com>
16491
16492 * decl2.c (unsupported_options): Fix typo, make const.
16493 (lang_decode_option): Fix bsearch argument order.
16494
16495 2000-06-01 Mark Mitchell <mark@codesourcery.com>
16496
16497 * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
16498 on FIELD_DECLs.
16499
16500 2000-05-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
16501
16502 * cp-tree.h (c_get_alias_set): Deleted.
16503 * Makefile.in (decl.o): Include ../expr.h.
16504 * decl.c (expr.h): Include.
16505 (init_decl_processing): Call record_component_aliases for arrays.
16506 (grokdeclarator): Likewise.
16507 Set TREE_ADDRESSABLE for fields that aren't bitfields.
16508 * tree.c (build_cplus_array_type_1): Call record_component_aliases.
16509
16510 2000-05-31 Mark Mitchell <mark@codesourcery.com>
16511
16512 Remove guiding declaration support.
16513 * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
16514 (flag_guiding_decls): Remove.
16515 * call.c (build_user_type_conversion_1): Remove support for
16516 guiding decls.
16517 (build_new_function_call): Likewise.
16518 (build_new_op): Likewise.
16519 (build_new_method_call): Likewise.
16520 * decl.c (start_function): Likewise.
16521 * friend.c (is_friend): Likewise.
16522 (do_friend): Likewise.
16523 * decl2.c ((flag_dump_translation_unit): Make it const.
16524 (flag_guiding_decls): Remove.
16525 (unsupported_options): New variable
16526 (compare_options): New function.
16527 (lang_decode_option): Use them.
16528
16529 * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
16530
16531 * method.c (mangle_expression): Adjust test for legal expression
16532 operators.
16533
16534 * pt.c (instantiate_decl): Save and restore the local
16535 specializations list.
16536
16537 2000-05-30 Jason Merrill <jason@decepticon.cygnus.com>
16538
16539 * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
16540
16541 2000-05-30 Mark Mitchell <mark@codesourcery.com>
16542
16543 * call.c (add_template_candidate_real): Handle member template
16544 constructors for classes with virtual bases.
16545 (build_user_type_conversion_1): Use in_charge_arg_for_name.
16546 (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
16547
16548 * ir.texi: Update thunk documentation.
16549
16550 * call.c (joust): Fix handling of overloaded builtin operators.
16551
16552 2000-05-30 Zack Weinberg <zack@wolery.cumb.org>
16553
16554 * cp-tree.h (DECL_ANTICIPATED): New macro.
16555 Document new use of DECL_LANG_FLAG_7.
16556 * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
16557 in the user namespace.
16558 * lex.c (do_identifier): If the identifier's declaration has
16559 DECL_ANTICIPATED on, it has not yet been declared. But do not
16560 replace it with an ordinary implicit declaration.
16561
16562 * tinfo2.cc: Include stdlib.h.
16563
16564 2000-05-29 Mark Mitchell <mark@codesourcery.com>
16565
16566 * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
16567 * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
16568 CLASSTYPE_ALIGN.
16569
16570 2000-05-28 Gabriel Dos Reis <gdr@codesourcery.com>
16571
16572 * decl2.c (lang_decode_option): Use skip_leading_substring instead
16573 of plain strncmp.
16574
16575 2000-05-28 Alexandre Oliva <aoliva@cygnus.com>
16576
16577 * operators.def (<?): Duplicated, should have been...
16578 (>?): this. Fixed.
16579
16580 2000-05-27 Alex Samuel <samuel@codesourcery.com>
16581 Mark Mitchell <mark@codesourcery.com>
16582
16583 * cp-tree.h (ansi_opname): Make it a macro.
16584 (ansi_assopname): Likewise.
16585 (struct lang_decl_flags): Add assignment_operator_p.
16586 (struct lang_decl): Add operator_code.
16587 (DECL_VTT_PARM): Adjust.
16588 (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
16589 overloaded operator.
16590 (SET_OVERLOADED_OPERATOR_CODE): New macro.
16591 (DECL_ASSIGNMENT_OPERATOR_P): New macro.
16592 (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
16593 (opname_tab): Remove.
16594 (assignop_tab): Likewise.
16595 (operator_name_info_t): New type.
16596 (operator_name_info): New variable.
16597 (assignment_operator_name_info): Likewise.
16598 (build_cp_library_fn): Remove declaration.
16599 (push_cp_library_fn): Likewise.
16600 (operator_name_string): Likewise.
16601 (build_decl_overload): Likewise.
16602 * call.c (print_z_candidates): Simplify.
16603 (build_object_call): Adjust usage of ansi_opname. Use
16604 DECL_OVERLOADED_OPERATOR_P.
16605 (op_error): Adjust operator name lookup.
16606 (build_conditional_expr): Adjust usage of ansi_opname.
16607 (build_new_op): Likewise.
16608 (build_op_delete_call): Likewise.
16609 (build_over_call): Likewise.
16610 (joust): Use DECL_OVERLOADED_OPERATOR_P.
16611 * decl.c (duplicate_decls): Copy operator_code.
16612 (init_decl_processing): Adjust parameters to push_cp_library_fn.
16613 (builtin_function): Adjust parameters to build_library_fn_1.
16614 (build_library_fn_1): Accept an overloaded operator code.
16615 (build_library_fn): Pass ERROR_MARK.
16616 (build_cp_library_fn): Accept an overloaded operator code.
16617 (push_cp_library_fn): Likewise.
16618 (grokfndecl): Tweak.
16619 (grokdeclarator): Simplify code to compute names of overloaded
16620 operators. Adjust use of ansi_opname.
16621 (ambi_op_p): Work on tree_codes, not identifiers.
16622 (unary_op_p): Likewise.
16623 (grok_op_properties): Likewise.
16624 (start_function): Use DECL_OVERLOADED_OPERATOR_P.
16625 (lang_mark_tree): Don't try to mark the operator_code.
16626 * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
16627 * error.c (dump_decl): Remove special handling for operator
16628 names.
16629 (dump_function_name): Likewise.
16630 (dump_expr): Adjust name lookup of operators.
16631 (op_to_string): Simplify.
16632 (assop_to_string): Likewise.
16633 * init.c (build_new_1): Adjust use of ansi_opname.
16634 * lex.c (opname_tab): Remove.
16635 (assignop_tab): Likewise.
16636 (ansi_opname): Likewise.
16637 (ansi_assopname): Likewise.
16638 (operator_name_string): Likewise.
16639 (reinit_lang_specific): Likewise.
16640 (operator_name_info): New variable.
16641 (assignment_operator_name_info): Likewise.
16642 (init_operators): New function.
16643 (init_parse): Use it.
16644 (do_identifier): Adjust use of ansi_opname.
16645 * method.c (mangle_expression): Don't use ansi_opname for
16646 mangling.
16647 (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
16648 (build_decl_overload): Remove.
16649 (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
16650 (do_build_assign_ref): Adjust use of ansi_opname.
16651 (synthesize_method): Likewise.
16652 (implicitly_declare_fn): Likewise.
16653 * operators.def: New file.
16654 * parse.y (operator): Adjust use of ansi_opname.
16655 * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
16656 (set_mangled_name_for_template_decl): Don't play games with
16657 current_namespace.
16658 (special_function_p): Adjust use of ansi_opname.
16659 * typeck.c (check_return_expr): Likewise.
16660 * Make-lang.in (cc1plus): Depend on operators.def.
16661 * Makefile.in (lex.o): Likewise.
16662 (decl.o): Likewise.
16663
16664 2000-05-27 Zack Weinberg <zack@wolery.cumb.org>
16665
16666 * Make-lang.in (cplib2.ready): Eradicate.
16667
16668 2000-05-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
16669
16670 * method.c (mangle_expression): Use TREE_CODE_LENGTH.
16671 * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
16672 (built_min, cp_tree_equal): Likewise.
16673
16674 2000-05-26 Mark Mitchell <mark@codesourcery.com>
16675
16676 * class.c (layout_nonempty_base_or_field): Replace
16677 `record_layout_info' with `record_layout_info_s'.
16678
16679 2000-05-26 Jason Merrill <jason@casey.soma.redhat.com>
16680
16681 Fix goto checking.
16682 * cp-tree.h (struct language_function): x_named_labels is now
16683 a struct named_label_list*.
16684 * decl.c (struct named_label_use_list): Renamed from...
16685 (struct named_label_list): ...this. New struct.
16686 (push_binding_level): Don't set eh_region.
16687 (note_level_for_eh): New fn.
16688 (pop_label): Take label and old value directly.
16689 (pop_labels): Adjust for new named_labels format.
16690 (lookup_label): Likewise.
16691 (poplevel): Note characteristics of a binding level containing a
16692 named label. Mess with named label lists earlier.
16693 (mark_named_label_lists): New fn.
16694 (mark_lang_function): Call it.
16695 (use_label): New fn, split out from...
16696 (make_label_decl): ...here. Don't call it.
16697 (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
16698 check_previous_gotos): New fns, split out from...
16699 (define_label): ...here.
16700 (check_switch_goto): New fn.
16701 (define_case_label): Call it.
16702 (check_goto): New fn.
16703 * semantics.c (finish_goto_stmt): Call it and use_label.
16704 (begin_compound_stmt): If we're a try block, call note_level_for_eh.
16705 (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
16706
16707 2000-05-26 Mark Mitchell <mark@codesourcery.com>
16708
16709 * class.c (build_vtable_entry_ref): Correct usage of
16710 get_vtbl_decl_for_binfo.
16711
16712 * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
16713 * method.c (implicitly_declare_fn): Not here.
16714
16715 2000-05-26 Nathan Sidwell <nathan@codesourcery.com>
16716
16717 * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
16718 (CPTI_PTMD_DESC_TYPE): ... here.
16719 (ptmd_desc_type_node): Rename to ...
16720 (ptm_desc_type_node): ... here.
16721 * decl.c: Likewise.
16722 * rtti.c (ptmd_initializer): Rename to ...
16723 (ptm_initializer): ... here.
16724 (sythesize_tinfo_var): Adjust. Deal with pointer to member
16725 function.
16726 (create_tinfo_types): Adjust.
16727
16728 2000-05-25 Mark Mitchell <mark@codesourcery.com>
16729
16730 Finish implementation of VTTs.
16731 * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
16732 CPTI_VTT_PARM_IDENTIFIER.
16733 (vtt_parm_identifier): New macro.
16734 (vtt_parm_type): Likewise.
16735 (BINFO_SUBVTT_INDEX): Likewise.
16736 (BINFO_VPTR_INDEX): Likewise.
16737 (struct lang_decl): Add vtt_parm.
16738 (DECL_VTT_PARM): New macro.
16739 (DECL_USE_VTT_PARM): Likewise.
16740 (DECL_NEEDS_VTT_PARM_P): Likewise.
16741 (get_vtt_name): Declare.
16742 (build_artificial_parm): Likewise.
16743 (fixup_all_virtual_upcast_offsets): Likewise.
16744 (expand_indirect_vtbls_init): Remove.
16745 * call.c (build_new_method_call): Pass the vtt to subobject
16746 constructors and destructors.
16747 * class.c (get_vtt_name): Give it external linkage.
16748 (build_clone): Handle the magic VTT parameters for clones.
16749 (clone_function_decl): Fix typo in comment.
16750 (build_vtt): Keep track of the indices in the VTTs where various
16751 entities are stored.
16752 (build_vtt_inits): Likewise.
16753 (dfs_build_vtt_inits): Likewise.
16754 (build_ctor_vtbl_group): Tweak type of construction vtables.
16755 (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
16756 primary bases, when building construction vtables.
16757 * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
16758 (initialize_predefined_identifiers): Add vtt_parm_identifier.
16759 (init_decl_processing): Initialize vtt_parm_type.
16760 (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
16761 (lang_mark_tree): Make vtt_parm.
16762 * decl2.c (build_artificial_parm): New function.
16763 (maybe_retrofit_in_chrg): Use it. Add VTT parameters.
16764 (grokclassfn): Use build_artificial_parm.
16765 * init.c (initialize_vtbl_ptrs): Call
16766 fixup_all_virtual_upcast_offsets directly.
16767 (perform_member_init): Use the complete subobject destructor for
16768 member cleanups.
16769 (build_vtbl_address): New function.
16770 (expand_virtual_init): Handle VTTs.
16771 * optimize (maybe_clone_body): Likewise.
16772 * search.c (fixup_all_virtual_upcast_offsets): Give it external
16773 linkage.
16774 (expand_indirect_vtbls_init): Remove.
16775 * semantics.c (setup_vtbl_ptr): Fix typos in comment.
16776 * tree.c (make_binfo): Make them bigger.
16777
16778 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
16779
16780 * inc/cxxabi.h (__pbase_type_info): Define, based on
16781 __pointer_type_info.
16782 (__pointer_type_info): Derive from __pbase_type_info. Adjust.
16783 (__pointer_to_member_type_info): Likewise.
16784 * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
16785 (__pointer_to_member_type_info::__is_pointer_p): Remove.
16786 (__pointer_type_info::__do_catch): Rename to ...
16787 (__pbase_type_info::__do_catch): ... here. Adjust.
16788 (__pbase_type_info::__pointer_catch): Implement.
16789 (__pointer_type_info::__pointer_catch): Adjust.
16790 (__pointer_to_member_type_info::__pointer_catch): Adjust.
16791
16792 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
16793
16794 * tinfo.h (__user_type_info::contained_virtual_p): New
16795 predicate.
16796 * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
16797 shaped hierarchy.
16798 (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
16799 diamond shaped hierarchy. Add early out for mixed diamond and
16800 duplicate shaped hierarchy.
16801
16802 2000-05-24 Mark Mitchell <mark@codesourcery.com>
16803
16804 * cp-tree.h (build_delete): Change prototype.
16805 (build_vec_delete): Likewise.
16806 * call.c (build_scoped_method_call): Use special_function_kind
16807 values to indicate the kind of destruction to be done.
16808 (build_method_call): Likewise.
16809 * decl.c (finish_destructor_body): Likewise.
16810 (maybe_build_cleanup_1): Likewise. Rename to ...
16811 (maybe_build_cleanup): ... this.
16812 * decl2.c (delete_sanity): Use special_function_kind
16813 values to indicate the kind of destruction to be done.
16814 (build_cleanup): Likewise.
16815 * init.c (perform_member_init): Likewise.
16816 (build_vec_delete_1): Likewise.
16817 (build_dtor_call): Simplify.
16818 (build_delete): Use special_function_kind
16819 values to indicate the kind of destruction to be done.
16820 (build_vbase_delete): Likewise.
16821 (build_vec_delete): Likewise.
16822
16823 * init.c (sort_member_init): Fix typo in error message generation
16824 code.
16825
16826 2000-05-15 Donald Lindsay <dlindsay@cygnus.com>
16827
16828 * semantics.c (begin_class_definition): make the packed
16829 attribute be sensitive to the "-fpack-struct" command line flag
16830
16831 2000-05-24 Nathan Sidwell <nathan@codesourcery.com>
16832
16833 Update new-abi upcast algorithm.
16834 * inc/cxxabi.h (__class_type_info::__do_upcast): Change
16835 prototype and meaning of return value.
16836 (__si_class_type_info::__do_upcast): Likewise.
16837 (__vmi_class_type_info::__do_upcast): Likewise.
16838 * tinfo.cc (__class_type_info::__upcast_result): Replace
16839 whole2dst with part2dst. Adjust ctor.
16840 (__class_type_info::__do_upcast): Adjust call of worker function.
16841 (__class_type_info::__do_upcast): Adjust.
16842 (__si_class_type_info::__do_upcast): Adjust. Use parent's
16843 __do_upcast.
16844 (__vmi_class_type_info::__do_upcast): Likewise. Fix private
16845 virtual base in diamond hierarchy bug.
16846
16847 2000-05-23 Mark Mitchell <mark@codesourcery.com>
16848
16849 * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
16850 and bitfield to tinfo_fn_p.
16851 (DECL_TINFO_FN_P): Adjust.
16852 (SET_DECL_TINFO_FN_P): Likewise.
16853 (DECL_MUTABLE_P): Likewise.
16854 (DECL_C_BIT_FIELD): Likewise.
16855 (SET_DECL_C_BIT_FIELD): Likewise.
16856 (CLEAR_DECL_C_BIT_FIELD): Likewise.
16857 (DECL_UNINLINABLE): Likewise.
16858 * class.c (alter_access): Call retrofit_lang_decl if ncessary.
16859 (handle_using_decl): Remove assertion.
16860 (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
16861 to build FIELD_DECLs.
16862 (build_base_field): Likewise.
16863 (layout_class_type): Likewise.
16864 * decl.c (init_decl_processing): Likewise.
16865 (build_ptrmemfunc_type): Likewise.
16866 (grokdeclarator): Likewise.
16867 * decl2.c (grok_x_components): Likewise.
16868 * except.c (call_eh_info): Likewise.
16869 * init.c (init_init_processing): Likewise.
16870 * rtti.c (expand_class_desc): Likewise.
16871 (create_pseudo_type_info): Likewise.
16872 (get_vmi_pseudo_type_info): Likewise.
16873 (create_tinfo_types): Likewise.
16874 * ptree.c (print_lang_decl): Adjust.
16875 * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
16876 before checking DECL_MUTABLE_P.
16877
16878 * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
16879 parameters for template functions.
16880 * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
16881 destructors as well as constructors.
16882
16883 2000-05-22 Mark Mitchell <mark@codesourcery.com>
16884
16885 * class.c (build_ctor_vtbl_group): Set inits.
16886 * optimize.c (maybe_clone_body): Set DECL_INLINE and
16887 DECL_THIS_INLINE appropriately for clones.
16888
16889 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
16890 (DECL_CONV_FN_P): Simplify.
16891 (DECL_OPERATOR): Remove.
16892 (language_to_string): Declare.
16893 * decl.c (duplicate_decls): Fix typo in comment.
16894 (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
16895 (grok_op_properties): Use DECL_CONV_FN_P instead of
16896 IDENTIFIER_TYPENAME_P.
16897 * dump.c (dequeue_and_dump): Dump the language linkage of
16898 declarations.
16899 * error.c (language_to_string): Give it external linkage.
16900 * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
16901 (implicitly_declare_fn): Set DECL_LANGUAGE.
16902 * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
16903 IDENTIFIER_TYPENAME_P.
16904 (tsubst_decl): Likewise.
16905 (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
16906 * semantics.c (finish_member_declaration): Don't mark members of
16907 classes declared in an extern "C" region as extern "C".
16908
16909 2000-05-22 Martin v. Löwis <loewis@informatik.hu-berlin.de>
16910
16911 * decl2.c (qualified_lookup_using_namespace): Look through
16912 namespace aliases.
16913
16914 * decl.c (push_using_decl): Return the old decl on namespace level.
16915
16916 2000-05-21 Mark Mitchell <mark@codesourcery.com>
16917
16918 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
16919 (VTT_NAME_PREFIX): New macro.
16920 (CTOR_VTBL_NAME_PREFIX): Likewise.
16921 (get_ctor_vtbl_name): New function.
16922 * class.c (get_vtable_name): Simplify.
16923 (get_vtt_name): New function.
16924 (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
16925 (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
16926 when a virtual base becomes primary.
16927 (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier. Build
16928 VTTs.
16929 (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
16930 additional parameters.
16931 (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
16932 (initialize_array): New function.
16933 (build_vtt): Likewise.
16934 (build_vtt_inits): Likewise.
16935 (dfs_build_vtt_inits): Likewise.
16936 (dfs_fixup_binfo_vtbls): Likewise.
16937 (build_ctor_vtbl_group): Likewise.
16938 (initialize_vtable): Use initialize_array.
16939 (accumulate_vtbl_inits): Reimplement to handle construction
16940 vtables.
16941 (dfs_accumulate_vtbl_inits): Likewise.
16942 (bulid_vtbl_initializer): Adjust parameter name.
16943 * method.c (build_typename_overload): Remove #if 0'd code.
16944 (get_ctor_vtbl_name): New function.
16945 * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
16946 (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
16947
16948 * cp-tree.h (struct lang_type): Remove search_slot.
16949 (CLASSTYPE_SEARCH_SLOT): Remove.
16950 (emit_base_init): Change prototype.
16951 (initialize_vtbl_ptrs): Likewise.
16952 (expand_indirect_vtbls_init): Likewise.
16953 (clear_search_slots): Remove.
16954 * decl.c (lang_mark_tree): Don't mark search_slot.
16955 * init.c (initialize_vtbl_ptrs): Simplify.
16956 (emit_base_init): Likewise.
16957 * search.c (struct vbase_info): Document decl_ptr.
16958 (convert_pointer_to_single_level): Remove.
16959 (dfs_find_vbases): Remove.
16960 (dfs_init_base_pointers): Simplify.
16961 (dfs_clear_vbase_slots): Remove.
16962 (dfs_vtable_path_unmark): New function.
16963 (init_vbase_pointers): Simplify.
16964 (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
16965 (expand_indirect_vtbls_init): Simplify. Don't call
16966 mark_all_temps_used.
16967 * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
16968 initialize_vtbl_ptrs.
16969
16970 2000-05-20 Zack Weinberg <zack@wolery.cumb.org>
16971
16972 * except.c: Add static prototypes.
16973
16974 2000-05-20 H.J. Lu <hjl@gnu.org>
16975
16976 * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
16977
16978 2000-05-19 Mark Mitchell <mark@codesourcery.com>
16979
16980 Don't create a separate copy of virtual bases for the
16981 CLASSTYPE_VBASECLASSES list.
16982 * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
16983 (BINFO_FOR_VBASE): Remove.
16984 (CANONICAL_BINFO): Adjust.
16985 (binfo_for_vbase): New function.
16986 * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
16987 instead of BINFO_FOR_VBASE.
16988 (build_vbase_pointer): Likewise.
16989 (build_secondary_vtable): Likewise.
16990 (dfs_mark_primary_bases): Likewise.
16991 (mark_primary_bases): Likewise.
16992 (layout_nonempty_base_or_field): Likewise.
16993 (dfs_set_offset_for_shared_vbases): Likewise.
16994 (dfs_set_offset_for_unshared_vbases): Likewise.
16995 (layout_virtual_bases): Likewise. Adjust for changes to the
16996 CLASSTYPE_VBASECLASSES list.
16997 (dump_class_hierarchy_r): Use binfo_for_vbase
16998 instead of BINFO_FOR_VBASE.
16999 (dump_class_hierarchy): Likewise.
17000 (finish_vtbls): Likewise.
17001 (build_vtbl_initializer): Adjust for changes to the
17002 CLASSTYPE_VBASECLASSES list.
17003 (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
17004 * decl.c (finish_destructor_body): Adjust for changes to the
17005 CLASSTYPE_VBASECLASSES list.
17006 * init.c (sort_base_init): Use binfo_for_vbase.
17007 (construct_virtual_bases): Adjust for changes to the
17008 CLASSTYPE_VBASECLASSES list.
17009 (expand_member_init): Use binfo_for_vbase.
17010 (build_vbase_delete): Adjust for changes to the
17011 CLASSTYPE_VBASECLASSES list.
17012 * method.c (do_build_copy_constructor): Likewise.
17013 * rtti.c (get_base_offset): Use binfo_for_vbase.
17014 (expand_class_desc): Remove #if 0'd code.
17015 * search.c (struct vbase_info): Remove vbase_types.
17016 (get_base_distance): Use binfo_for_vbase.
17017 (lookup_field_queue_p): Use CANONICAL_BINFO.
17018 (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
17019 (get_pure_virtuals): Adjust for changes to the
17020 CLASSTYPE_VBASECLASSES list.
17021 (dfs_find_vbases): Use binfo_for_vbase.
17022 (dfs_init_vbase_pointers): Likewise.
17023 (init_vbase_pointers): Don't initialize vi.vbase_types.
17024 (virtual_context): Use binfo_for_vbase.
17025 (fixup_all_virtual_upcast_offsets): Adjust for changes to the
17026 CLASSTYPE_VBASECLASSES list.
17027 (expand_indirect_vtbls_init): Simplify.
17028 (dfs_get_vbase_types): Don't replicate virtual bases.
17029 (find_vbase_instance): Use binfo_for_vbase.
17030 (binfo_for_vbase): New function.
17031 * typeck.c (get_delta_difference): Use binfo_for_vbase.
17032
17033 2000-05-17 Mark Mitchell <mark@codesourcery.com>
17034
17035 * decl2.c (finish_anon_union): Generalize error messages to handle
17036 anonymous structures.
17037 * init.c (perform_member_init): Remove `name' parameter.
17038 (build_field_list): New function.
17039 (sort_member_init): Handle anonymous union initialization order
17040 correctly. Check for multiple initializations of the same union.
17041 (emit_base_init): Don't look up fields by name here.
17042 (expand_member_init): Record the result of name lookup for future
17043 reference.
17044 * typeck.c (build_component_ref): Fix formatting.
17045
17046 2000-05-17 Andrew Cagney <cagney@b1.cygnus.com>
17047
17048 * decl.c (pop_label): Replace warn_unused with warn_unused_label.
17049 * typeck.c (build_x_compound_expr): Replace warn_unused with
17050 warn_unused_value.
17051
17052 * decl2.c (lang_decode_option): Update -Wall unused flags by
17053 calling set_Wunused.
17054
17055 2000-05-16 Mark Mitchell <mark@codesourcery.com>
17056
17057 * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
17058 * init.c (dfs_vtable_path_unmark): Remove.
17059 * search.c (marked_new_vtable_p): Likewise.
17060 (unmarked_new_vtable_p): Likewise.
17061 (dfs_search_slot_nonempty_p): Likewise.
17062 (dfs_mark): Likewise.
17063 (dfs_vtable_path_unmark): Likewise.
17064 (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
17065 (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
17066 (dfs_init_vbase_pointers): Remove special-case new ABI code.
17067 (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
17068 (init_vbase_pointers): Simplify.
17069 (expand_indirect_vtbls_init): Likewise.
17070
17071 * class.c (copy_virtuals): New function.
17072 (build_primary_table): Use it.
17073 (build_secondary_vtable): Likewise.
17074 (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
17075 indicate that no vcall offset is required.
17076 (add_virtual_function): Likewise.
17077 (modify_all_vtables): Likewise.
17078 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
17079 (dfs_accumulate_vtbl_inits): Likewise.
17080 (build_vtbl_initializer): Make changes to handle construction
17081 vtables.
17082 (dfs_build_vcall_offset_vtbl_entries): Likewise.
17083 (build_rtti_vtbl_entries): Likewise.
17084 (build_vtable_entries): Handle a NULL vcall_index.
17085
17086 2000-05-15 Gabriel Dos Reis <gdr@codesourcery.com>
17087
17088 * decl2.c (lang_decode_option): Fix thinko.
17089
17090 2000-05-14 Jason Merrill <jason@casey.cygnus.com>
17091
17092 * except.c (check_handlers): New fn.
17093 * cp-tree.h: Declare it.
17094 * semantics.c (finish_handler_sequence): Call it.
17095 (finish_function_handler_sequence): Likewise.
17096 (finish_handler_parms): Set TREE_TYPE on the handler.
17097 * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
17098 * search.c (get_base_distance_recursive): If protect>1, ignore
17099 special access.
17100 (get_base_distance): Don't reduce watch_access.
17101
17102 2000-05-13 Gabriel Dos Reis <gdr@codesourcery.com>
17103
17104 * lex.c: #include diagnostic.h.
17105 (lang_init_options): Set default prefixing rules.
17106
17107 * lang-options.h: Add -fdiagnostics-show-location=.
17108
17109 * decl2.c: #include diagnostic.h.
17110 (lang_decode_option): Handle -fdiagnostics-show-location=.
17111
17112 2000-05-12 Nathan Sidwell <nathan@codesourcery.com>
17113
17114 * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
17115 * vec.cc: Revert my 2000-05-07 change.
17116
17117 2000-05-11 Jason Merrill <jason@casey.cygnus.com>
17118
17119 * class.c (check_field_decls): Complain about non-static data
17120 members with same name as class in class with constructor.
17121
17122 2000-05-10 Jason Merrill <jason@casey.cygnus.com>
17123
17124 * decl.c (grokdeclarator): Allow non-static data members with
17125 same name as class.
17126
17127 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
17128
17129 * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
17130 and pending_inline.filename. Update prototypes.
17131 * decl.c (define_label): Constify filename parameter.
17132 * decl2.c (warn_if_unknown_interface): Constify local char *.
17133 * input.c Constify input_source.filename. Don't declare
17134 input_filename or lineno. Constify filename parameter to feed_input.
17135 * lex.c (init_parse): Constify parameter and return value.
17136 (cp_pragma_interface, cp_pragma_implementation): Constify
17137 filename argument.
17138 (reinit_parse_for_method, reinit_parse_for_block,
17139 reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
17140 Constify local char *.
17141 * pt.c: Don't declare lineno or input_filename.
17142 (print_template_context, tsubst_friend_function, tsubst_decl,
17143 tsubst, instantiate_decl): Constify local char *.
17144 * semantics.c (expand_body): Constify local char *.
17145 * tree.c (build_srcloc): Constify filename parameter.
17146 * typeck.c (c_expand_asm_operands): Constify filename
17147 parameter.
17148
17149 2000-05-08 Nathan Sidwell <nathan@codesourcery.com>
17150
17151 * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
17152 offsetof expansion.
17153
17154 2000-05-08 Branko Cibej <branko.cibej@hermes.si>
17155
17156 * inc/cxxabi.h: Fix typos in comment.
17157 (__base_class_info::__offset): Use a static_cast.
17158
17159 2000-05-07 Nathan Sidwell <nathan@codesourcery.com>
17160
17161 * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
17162 of std::size_t and std::ptrdiff_t respectively.
17163 * tinfo.cc: Likewise.
17164 * vec.cc: Likewise.
17165
17166 2000-05-06 Richard Henderson <rth@cygnus.com>
17167
17168 * typeck.c (build_c_cast): Don't warn integer->pointer size
17169 mismatch for constants.
17170
17171 2000-05-06 Nathan Sidwell <nathan@codesourcery.com>
17172
17173 * rtti.c (ptmd_initializer): Set non-public, if class is
17174 incomplete.
17175
17176 * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
17177 (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
17178 __cxa_vec_delete): Likewise.
17179 * tinfo.cc (__dynamic_cast): Likewise.
17180 * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
17181 __cxa_vec_delete): Likewise.
17182
17183 2000-05-04 Mark Mitchell <mark@codesourcery.com>
17184
17185 * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
17186 (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
17187 (lang_decl_flags): Add vcall_offset.
17188 (THUNK_VCALL_OFFSET): Use it.
17189 * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
17190 * method.c (make_thunk): Create the lang_decl here, not in
17191 emit_thunk.
17192 (emit_thunk): Make generic thunks into ordinary functions once
17193 they have been fed to expand_body.
17194 * semantics.c (expand_body): Set current_function_is_thunk here.
17195
17196 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17197
17198 * class.c (update_vtable_entry_for_fn): Prototype.
17199
17200 * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
17201 and `tmpl'.
17202
17203 * search.c (dfs_build_inheritance_graph_order): Prototype.
17204
17205 2000-05-04 Mark Mitchell <mark@codesourcery.com>
17206
17207 * cp-tree.h (special_function_kind): Add various kinds of
17208 destructors.
17209 (special_function_p): New function.
17210 * class.c (overrides): Don't let one kind of destructor override
17211 another.
17212 * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
17213 whether or not to instantiate a template.
17214 * tree.c (special_function_p): Define.
17215
17216 2000-05-03 Mark Mitchell <mark@codesourcery.com>
17217
17218 * cp-tree.def (THUNK_DECL): Remove.
17219 * cp-tree.h (DECL_THUNK_P): New macro.
17220 (DECL_NON_THUNK_FUNCTION_P): Likewise.
17221 (DECL_EXTERN_C_FUNCTION_P): Likewise.
17222 (SET_DECL_THUNK_P): Likewise.
17223 (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
17224 (FNADDR_FROM_VTABLE_ENTRY): Likewise.
17225 (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
17226 * decl.c (decls_match): Use DECL_EXTERN_C_P.
17227 (duplicate_decls): Likewise.
17228 (pushdecl): Likewise. Adjust thunk handling.
17229 (grokfndecl): Use DECL_EXTERN_C_P.
17230 * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
17231 * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
17232 * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
17233 * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
17234 * method.c (make_thunk): Use SET_DECL_THUNK_P. Set
17235 DECL_NO_STATIC_CHAIN.
17236 (emit_thunk): Don't play games with TREE_CODE on thunks. Don't
17237 set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
17238 * search.c (covariant_return_p): Remove THUNK_DECL handling.
17239 * ir.texi: Update.
17240
17241 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
17242
17243 * tree.c (walk_tree): Set lineno.
17244
17245 2000-05-01 Mark Mitchell <mark@codesourcery.com>
17246
17247 * exception.cc: Update license notice.
17248 * new.cc: Likewise.
17249 * new1.cc: Likewise.
17250 * new2.cc: Likewise.
17251 * tinfo.cc: Likewise.
17252 * tinfo2.cc: Likewise.
17253 * vec.cc: Likewise.
17254 * inc/cxxabi.h: Likewise.
17255 * inc/exception: Likewise.
17256 * inc/new: Likewise.
17257 * inc/new.h: Likewise.
17258 * inc/typeinfo: Likewise.
17259
17260 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
17261
17262 * tree.c (build_target_expr_with_type): If we already have a
17263 TARGET_EXPR, just return it.
17264
17265 * optimize.c (initialize_inlined_parameters): Don't generate an
17266 EXPR_STMT if we can just use DECL_INITIAL.
17267 * decl.c (emit_local_var): Only make the initialization a
17268 full-expression if stmts_are_full_exprs_p.
17269
17270 2000-05-01 Mark Mitchell <mark@codesourcery.com>
17271
17272 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
17273 macro.
17274 * call.c (standard_conversion): Use it.
17275 (direct_reference_binding): Likewise.
17276 (build_over_call): Likewise.
17277 (is_properly_derived_from): Likewise.
17278 (compare_ics): Likewise.
17279 * class.c (resolves_to_fixed_type_p): Likewise.
17280 * optimize.c (declare_return_variable): Likewise.
17281 * pt.c (is_specialization_of): Likewise.
17282 (unify): Likewise.
17283 * typeck.c (comp_target_parms): Likeiwse.
17284 (build_static_cast): Likewise.
17285 (build_reinterpret_cast): Likewise.
17286 (build_const_cast): Likewise.
17287 (comp_ptr_ttypes_real): Likewise.
17288 (comp_ptr_ttypes_const): Likewise.
17289 * typeck2.c (process_init_constructor): Likewise.
17290
17291 2000-04-30 Scott Snyder <snyder@fnal.gov>
17292
17293 * decl.c (finish_destructor_body): Use the base destructor when
17294 destroying virtual bases.
17295
17296 2000-04-30 Mark Mitchell <mark@codesourcery.com>
17297
17298 * expr.c (cplus_expand_expr): Preserve temporaries when expanding
17299 STMT_EXPRs.
17300 * optimize.c (struct inline_data): Add target_exprs field.
17301 (declare_return_variable): When a function returns an aggregate,
17302 use the variable declared in the TARGET_EXPR as the remapped
17303 DECL_RESULT.
17304 (expand_call_inline): Update the pending target_exprs stack.
17305 (optimize_function): Initialize the stack.
17306
17307 * decl2.c (finish_file): Fix typo in comment.
17308
17309 * method.c (emit_thunk): Don't try to return a `void' value.
17310
17311 * optimize.c (initialize_inlined_parameters): If the parameter is
17312 addressable, we need to make a new VAR_DECL, even if the
17313 initializer is constant.
17314
17315 2000-04-28 Cosmin Truta <cosmint@cs.ubbcluj.ro>
17316
17317 * decl.c (grok_op_properties): Add an extra check of argtypes.
17318
17319 2000-04-27 Mark Mitchell <mark@codesourcery.com>
17320
17321 * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
17322 variables.
17323 (initialize_inlined_parameters): Try to avoid creating new
17324 VAR_DECLs.
17325
17326 2000-04-27 Alex Samuel <samuel@codesourcery.com>
17327
17328 * lex.c (my_get_run_time): Remove.
17329 (init_filename_times): Use get_run_time instead of my_get_run_time.
17330 (check_newline): Likewise.
17331 (dump_time_statistics): Likewise.
17332 * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
17333 of computing elapsed time explicitly.
17334
17335 2000-04-26 Mark Mitchell <mark@codesourcery.com>
17336
17337 * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
17338 * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
17339 * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
17340 before calling decl_constant_value.
17341 * class.c (check_bitfield_decl): Likewise.
17342 * cvt.c (ocp_convert): Likewise.
17343 (convert): Likewise.
17344 * decl.c (compute_array_index_type): Likewise.
17345 (build_enumerator): Likewise.
17346 * decl2.c (check_cp_case_value): Likewise.
17347 * pt.c (convert_nontype_argument): Likewise.
17348 (tsubst): Likewise.
17349 * typeck.c (decay_conversion): Likewise.
17350 (build_compound_expr): Likewise.
17351 (build_reinterpret_cast): Likewise.
17352 (build_c_cast): Likewise.
17353 (convert_for_assignment): Likewise.
17354
17355 2000-04-26 Jason Merrill <jason@casey.cygnus.com>
17356
17357 * decl.c (finish_function): Don't play games with DECL_INLINE.
17358
17359 2000-04-25 Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
17360
17361 * ir.texi: Correct typo.
17362
17363 2000-04-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
17364
17365 * decl.c (grokdeclarator): Reject VLAs as members.
17366
17367 2000-04-24 Gabriel Dos Reis <gdr@codesourcery.com>
17368
17369 * call.c (standard_conversion): Accept conversion between
17370 COMPLEX_TYPEs.
17371
17372 * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
17373
17374 2000-04-24 Zack Weinberg <zack@wolery.cumb.org>
17375
17376 * decl2.c (finish_file): Remove double setup for accounting
17377 compile time.
17378
17379 2000-04-24 Robert Lipe <robertlipe@usa.net>
17380
17381 * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
17382
17383 2000-04-23 Benjamin Kosnik <bkoz@cygnus.com>
17384
17385 * new.cc (set_new_handler): Needs to be in std::.
17386
17387 2000-04-23 Mark Mitchell <mark@codesourcery.com>
17388
17389 * cp-tree.h (lang_decl): Remove pretty_function_p.
17390 (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
17391 language-specific node.
17392 * decl.c (cp_make_fname_decl): Use build_decl, not
17393 build_lang_decl, to build the variables.
17394 (grokvardecl): Don't call build_lang_decl for local variables in
17395 templates.
17396 (grokdeclarator): Don't call build_lang_decl for local type
17397 declarations in templates.
17398 * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
17399 zero'd memory, rather than calling memset.
17400 * pt.c: Include hashtab.h.
17401 (local_specializations): New variable.
17402 (retrieve_local_specialization): Use it.
17403 (register_local_specialization): Likewise.
17404 (tsubst_decl): Don't assume local variables have
17405 DECL_LANG_SPECIFIC.
17406 (instantiate_decl): Set up local_specializations.
17407 * Makefile.in (HTAB_H): New variable.
17408
17409 2000-04-23 Richard Henderson <rth@cygnus.com>
17410
17411 * typeck.c (c_expand_asm_operands): Restore the original
17412 contents of the output list.
17413
17414 2000-04-22 Gabriel Dos Reis <gdr@codesourcery.com>
17415
17416 * ir.texi: Document complex number representation.
17417
17418 2000-04-20 Nathan Sidwell <nathan@codesourcery.com>
17419
17420 * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
17421 (target_incomplete_p): New function.
17422 (tinfo_base_init): Create comdat NTBS name variable.
17423 (ptr_initializer): Add non_public parameter. Calculate it.
17424 (ptmd_initializer): Likewise.
17425 (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
17426 (create_real_tinfo_var): Add non_public parameter. Use it.
17427 Push proxy into global namespace.
17428 * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
17429 New enumeration.
17430 * inc/typeinfo (type_info::before, type_info::operator==):
17431 Compare __name addresses.
17432
17433 * tinfo2.cc: Remove new-abi builtins comment.
17434
17435 2000-04-20 Jason Merrill <jason@casey.cygnus.com>
17436
17437 * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
17438
17439 * call.c (joust): Exit early if we get the same function, too.
17440
17441 * decl2.c (key_method): Return NULL_TREE for template classes.
17442 (import_export_class): Don't need to check for template classes.
17443
17444 2000-04-18 Zack Weinberg <zack@wolery.cumb.org>
17445
17446 * lex.c: Remove references to cccp.c.
17447
17448 2000-04-18 Mark Mitchell <mark@codesourcery.com>
17449
17450 * cp-tree.h (lang_decl_flags): Remove const_memfunc and
17451 volatile_memfunc. Add destructor_attr. Adjust dummy.
17452 (DECL_DESTRUCTOR_P): Use destructor_attr.
17453 (DECL_CONST_MEMFUNC_P): Reimplement.
17454 (DECL_VOLATILE_MEMFUNC_P): Remove.
17455 * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
17456 (overrides): Use DECL_DESTRUCTOR_P.
17457 (check_for_override): Likewise.
17458 * decl.c (start_function): Likewise.
17459 * decl2.c (grokfclassfn): Likewise.
17460 (check_classfn): Likewise.
17461 (grok_function_init): Likewise.
17462
17463 2000-04-17 Mark Mitchell <mark@codesourcery.com>
17464
17465 * decl2.c (grokfield): Issue error on illegal data member
17466 declaration.
17467
17468 2000-04-17 Mark P Mitchell <mark@codesourcery.com>
17469
17470 * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
17471
17472 2000-04-16 Mark Mitchell <mark@codesourcery.com>
17473
17474 * class.c (build_vtable_entry): Don't build thunks for type-info
17475 functions.
17476
17477 2000-04-16 Jason Merrill <jason@casey.cygnus.com>
17478
17479 * decl.c (decls_match): Allow a redeclaration of a builtin to
17480 specify args while the builtin did not.
17481
17482 2000-04-15 Mark Mitchell <mark@codesourcery.com>
17483
17484 * cp-tree.def (THUNK_DECL): Add to documentation.
17485 * cp-tree.h (flag_huge_objects): Declare.
17486 * class.c (modify_vtable_entry): Tidy.
17487 (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
17488 Calculate delta appropriately for the new ABI.
17489 (dfs_modify_vtables): Use it.
17490 (modify_all_vtables): Fix thinko in code to add overriding copies
17491 of functions to primary vtables.
17492 (build_clone): Fix typo in comment.
17493 (clone_function_decl): Correct order of destructors in vtable.
17494 (build_vbase_offset_vtbl_entries): Adjust comment.
17495 (dfs_vcall_offset_queue_p): Remove.
17496 (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
17497 (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
17498 (build_vtable_entry): Correct check for pure virtual functions.
17499 Don't declare flag_huge_objects.
17500 * decl.c (flag_huge_objects): Remove declaration.
17501 * method.c (make_thunk): Tweak mangling for vcall offset thunks.
17502 Use int_size_in_bytes.
17503 (emit_thunk): Handle vcall offset thunks.
17504
17505 2000-04-15 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
17506
17507 * decl2.c (parse_time, varconst_time): Delete declarations.
17508 (finish_file): Delete LINENO declaration.
17509 START_TIME and THIS_TIME now long.
17510
17511 2000-04-13 Nathan Sidwell <nathan@codesourcery.com>
17512
17513 * class.c (build_base_field): Reformat comment.
17514
17515 * inc/cxxabi.h (stddef.h): Comment inclusion.
17516 (__base_class_info::__offset): Comment shift.
17517
17518 2000-04-12 Mark Mitchell <mark@codesourcery.com>
17519
17520 * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
17521 (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
17522 (cp_push_exception_identifier): New macro.
17523 (DECL_COMPLETE_DESTRUCTOR_P): New macro.
17524 (DECL_BASE_DESTRUCTOR_P): Likewise.
17525 (DECL_DELETING_DESTRUCTOR_P): Likewise.
17526 (get_vtbl_decl_for_binfo): Fix formatting.
17527 (in_charge_arg_for_name): New macro.
17528 (maybe_build_cleanup_and_delete): Remove declaration.
17529 * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
17530 (in_charge_arg_for_name): New function.
17531 (build_new_method_call): Use it. Handle cloned destructors.
17532 (build_clone): Don't make the base constructor virtual.
17533 Automatically defer generated functions.
17534 (clone_function_decl): Handle destructors, too.
17535 (clone_constructors_and_destructors): Likewise.
17536 (create_vtable_ptr): Don't create a vtable entry for a cloned
17537 function.
17538 * decl.c (predefined_identifier): Add ctor_or_dtor_p.
17539 (initialize_predefined_identifiers): Update appropriately.
17540 (finish_destructor_body): Simplify.
17541 (maybe_build_cleanup_and_delete): Remove.
17542 * except.c (expand_throw): Handle new-ABI destructors.
17543 * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
17544 (build_dtor_call): New function.
17545 (build_delete): Use it. Simplify.
17546 * optimize.c (maybe_clone_body): Handle destructors.
17547 * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
17548
17549 * exception.cc (cleanup_fn): New typedef.
17550 (CALL_CLEANUP): New macro.
17551 (cp_eh_info): Use them.
17552 (__cp_push_exception): Likewise.
17553 (__cp_pop_exception): Likewise.
17554
17555 2000-04-11 Mark Mitchell <mark@codesourcery.com>
17556
17557 * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
17558 (complete_dtor_identifier): New macro.
17559 (CLASSTYPE_FIRST_CONVERSION): Remove.
17560 (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
17561 (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
17562 (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
17563 (CLASSTYPE_CONSTRUCTORS): Likewise.
17564 (CLASSTYPE_DESTRUCTORS): Likewise.
17565 (lang_decl): Add cloned_function.
17566 (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
17567 (DECL_BASE_CONSTRUCTOR_P): Likewise.
17568 (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
17569 (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
17570 (DECL_CLONED_FUNCTION_P): Likewise.
17571 (DECL_CLONED_FUNCTION): Likewise.
17572 (clone_function_decl): Declare.
17573 (maybe_clone_body): Likewise.
17574 * call.c (build_user_type_conversion_1): Call complete object
17575 constructors in the new ABI.
17576 (build_new_method_call): Don't add in-charge parameters under the
17577 new ABI.
17578 * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
17579 DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
17580 CLASSTYPE_DESTRUCTOR_SLOT.
17581 (build_clone): New function.
17582 (clone_function_decl): Likewise.
17583 (clone_constructors_and_destructors): Likewise.
17584 (check_bases_and_members): Use it.
17585 * decl.c (iniitialize_predefined_identifiers): Initialize
17586 complete_dtor_identifier.
17587 (finish_function): Don't add extra code to a clone.
17588 (lang_mark_tree): Mark cloned_function.
17589 * decl2.c (mark_used): Don't bother trying to instantiate things
17590 we synthesized.
17591 * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
17592 * method.c (set_mangled_name_for_decl): Don't treat clones as
17593 constructors.
17594 (synthesize_method): Sythesize cloned functions, not the clones.
17595 * optimize.c (inline_data): Update comment on ret_label.
17596 (remap_block): Don't assume DECL_INITIAL exists.
17597 (copy_body_r): Allow ret_label to be NULL.
17598 (maybe_clone_body): Define.
17599 * pt.c (tsubst_decl): Handle clones.
17600 (instantiate_clone): New function.
17601 (instantiate_template): Use it.
17602 (set_mangled_name_for_template_decl): Don't treat clones as
17603 constructors.
17604 * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
17605 CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
17606 * semantics.c (expand_body): Clone function bodies as necessary.
17607
17608 * optimize.c (remap_decl): Avoid sharing structure for arrays
17609 whose size is only known at run-time.
17610 * tree.c (copy_tree_r): Don't copy PARM_DECLs.
17611
17612 * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
17613 to has_in_charge_parm_p.
17614 (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
17615 (DECL_HAS_IN_CHARGE_PARM_P): ... this.
17616 (DECL_COPY_CONSTRUCTOR_P): New macro.
17617 * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
17618 (build_user_type_conversion_1): Likewise.
17619 (convert_like_real): Likewise.
17620 (build_over_call): Likeiwse. Use DECL_COPY_CONSTRUCTOR_P.
17621 * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
17622 (copy_args_p): Likewise.
17623 (grok_ctor_properties): Likewise.
17624 (start_function): Likewise.
17625 * decl2.c (maybe_retrofit_in_charge): Likewise. Set it.
17626 * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
17627 * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
17628 * method.c (do_build_copy_constructor): Use
17629 DECL_HAS_IN_CHARGE_PARM_P.
17630 (synthesize_method): Likewise.
17631 * pt.c (instantiate_template): Remove goto.
17632 * tree.c (build_cplus_method_type): Remove mention of obstacks in
17633 comment.
17634
17635 * cp-tre.h (finish_function): Change prototype.
17636 * decl.c (end_cleanup_fn): Adjust caller.
17637 (finish_function): Take only one parameter.
17638 * decl2.c (finish_objects): Adjust caller.
17639 (finish_static_storage_duration_function): Likewise.
17640 * method.c (emit_thunk): Likewise.
17641 * parse.y: Likewise.
17642 * parse.c: Regenerated.
17643 * pt.c (instantiate_decl): Likewise.
17644 * rtti.c (synthesize_tinfo_fn): Likewise.
17645 * semantics.c (expand_body): Likewise.
17646
17647 * cp-tree.h (copy_decl): New function.
17648 * class.c (finish_struct_1): Use it.
17649 * lex.c (copy_decl): Define it.
17650 * pt.c (tsubst_decl): Likewise.
17651 * tree.c (copy_template_template_parm): Likewise.
17652
17653 * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
17654 has_nonpublic_assign_ref.
17655 (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
17656 (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
17657 * class.c (finish_struct_methods): Don't set
17658 TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
17659 (interface_only): Don't declare.
17660 (interface_unknown): Likewise.
17661
17662 2000-04-11 Martin v. Löwis <loewis@informatik.hu-berlin.de>
17663
17664 * tree.h (HAVE_TEMPLATES): Remove definition.
17665 * lang-options.h (-fthis-is-variable): Remove documentation.
17666
17667 2000-04-10 Jason Merrill <jason@casey.cygnus.com>
17668
17669 * class.c (instantiate_type): Handle object-relative template-id.
17670
17671 * semantics.c (finish_expr_stmt): Call convert_to_void here.
17672 * decl.c (cplus_expand_expr_stmt): Not here.
17673
17674 * rtti.c (build_dynamic_cast_1): Call non_lvalue.
17675 Initialize exprtype earlier.
17676
17677 * parse.y (fn.def1): Check for defining types in return types.
17678
17679 * decl.c (check_tag_decl): Notice extra fundamental types.
17680 Diagnose empty decls in classes, too.
17681
17682 * decl.c (grokdeclarator): Don't override an anonymous name if no
17683 declarator was given.
17684
17685 * cvt.c (convert_to_void): Call resolve_offset_ref.
17686
17687 * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
17688
17689 * decl2.c (decl_namespace): Handle getting a type.
17690
17691 * typeck.c (build_c_cast): Re-enable warning for cast between
17692 pointer and integer of different size.
17693
17694 2000-04-10 Nathan Sidwell <nathan@codesourcery.com>
17695
17696 * inc/cxxabi.h (__pointer_type_info): Add restrict and
17697 incomplete flags.
17698 (__pointer_type_info::__pointer_catch): New virtual function.
17699 (__pointer_to_member_type_info): Derive from
17700 __pointer_type_info. Adjust.
17701 (__pointer_to_member_type_info::__do_catch): Remove.
17702 (__pointer_to_member_type_info::__is_pointer_p): Declare.
17703 (__pointer_to_member_type_info::__pointer_catch): Declare.
17704 * rtti.c (qualifier_flags): Add restrict flag.
17705 (ptmd_initializer): Reorder members.
17706 (create_tinfo_types): Expand comments. Reorder
17707 ptmd_desc_type_node members.
17708 * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
17709 Implement.
17710 (__pointer_type_info::__do_catch): Move specific code into
17711 __pointer_catch. Call it.
17712 (__pointer_type_info::__pointer_catch): Non-pointer-to-member
17713 specific catch checking. Fix void conversion check.
17714 (__pointer_to_member_type_info::__do_catch): Remove.
17715 (__pointer_to_member_type_info::__pointer_catch): Implement.
17716
17717 2000-04-10 Martin v. Löwis <loewis@informatik.hu-berlin.de>
17718
17719 * lex.c (init_parse): Remove traces of classof and headof.
17720 * decl2.c (flag_operator_names): Default to 1.
17721 (lang_decode_option): Do not set it for -ansi.
17722
17723 2000-04-09 Mark Mitchell <mark@codesourcery.com>
17724
17725 * cp-tree.h (struct lang_decl): Remove main_decl_variant.
17726 (DECL_MAIN_VARIANT): Remove.
17727 * decl.c (duplicate_decls): Don't set it.
17728 (start_function): Likewise.
17729 (lang_mark_tree): Don't mark it.
17730 * decl2.c (defer_fn): Don't use it.
17731 * lex.c (retrofit_lang_decl): Don't set it.
17732 * pt.c (tsubst_decl): Likewise.
17733 * ptree.c (print_lang_decl): Don't print it.
17734 * typeck.c (mark_addressable): Don't use it.
17735
17736 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
17737
17738 * vec.cc: Include <new> and <exception>.
17739 (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
17740 (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
17741 terminate.
17742 (__cxa_vec_delete): Catch dtor exceptions.
17743
17744 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
17745
17746 Prepend __ to implementation defined names.
17747 * inc/typeinfo (type_info): Rename _name to __name.
17748 (type_info::type_info): Rename parameter.
17749 (type_info::operator==, type_info::operator!=,
17750 type_info::before): Likewise.
17751 (type_info::is_pointer_p, type_info::is_function_p,
17752 type_info::do_catch, type_info::do_upcast): Prepend __. Rename
17753 parameters.
17754 * inc/cxxabi.h
17755 (__fundamental_type_info::__fundamental_type_info) Rename parameters.
17756 (__pointer_type_info::__pointer_type_info): Likewise.
17757 (__pointer_type_info::is_pointer_p,
17758 __pointer_type_info::do_catch): Prepend __. Rename parameters.
17759 (__array_type_info::__array_type_info): Rename parameters.
17760 (__function_type_info::__function_type_info): Likewise.
17761 (__function_type_info::is_function_p): Prepend __.
17762 (__enum_type_info::__enum_type_info): Rename parameters.
17763 (__pointer_to_member_type_info::__pointer_to_member_type_info):
17764 Likewise.
17765 (__pointer_to_member_type_info::do_catch): Prepend __. Rename
17766 parameters.
17767 (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
17768 (__class_type_info::__class_type_info): Rename parameters.
17769 (__class_type_info::sub_kind): Prepend __. Adjust member names.
17770 (__class_type_info::upcast_result,
17771 __class_type_info::dyncast_result): Prepend __. Move definition
17772 into tinfo.cc.
17773 (__class_type_info::do_upcast, __class_type_info::do_catch,
17774 __class_type_info::find_public_src,
17775 __class_type_info::do_dyncast,
17776 __class_type_info::do_find_public_src): Prepend __. Rename
17777 parameters.
17778 (__si_class_type_info::__si_class_type_info): Rename parameters.
17779 (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
17780 __si_class_type_info::do_find_public_src): Prepent __. Rename
17781 parameters.
17782 (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
17783 (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
17784 __vmi_class_type_info::do_find_public_src): Prepent __. Rename
17785 parameters.
17786 (__dynamic_cast): Rename parameters.
17787 * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
17788 type_info::do_catch, type_info::do_upcast): Prepend __.
17789 (contained_p, public_p, virtual_p, contained_public_p,
17790 contained_nonpublic_p, contained_nonvirtual_p): Adjust.
17791 (__class_type_info::do_catch,
17792 __class_type_info::do_upcast): Prepend __. Adjust.
17793 (__class_type_info::__upcast_result,
17794 __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
17795 Adjust.
17796 (__class_type_info::find_public_src): Prepend __. Adjust.
17797 (__class_type_info::do_find_public_src,
17798 __si_class_type_info::do_find_public_src,
17799 __vmi_class_type_info::do_find_public_src): Likewise.
17800 (__class_type_info::do_dyncast,
17801 __si_class_type_info::do_dyncast,
17802 __vmi_class_type_info::do_dyncast): Likewise.
17803 (__class_type_info::do_upcast,
17804 __si_class_type_info::do_upcast,
17805 __vmi_class_type_info::do_upcast): Likewise.
17806 (__dynamic_cast): Adjust.
17807 * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
17808 (__function_type_info::is_function_p): Likewise.
17809 (__pointer_type_info::do_catch): Likewise. Adjust.
17810 (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
17811 (__throw_type_match_rtti_2): Adjust.
17812 (__is_pointer): Adjust.
17813
17814 2000-04-08 Mark Mitchell <mark@codesourcery.com>
17815
17816 * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
17817 (complete_ctor_identifier): New macro.
17818 (special_function_kind): Add sfk_copy_constructor and
17819 sfk_assignment_operator.
17820 (LOOKUP_HAS_IN_CHARGE): Remove.
17821 (cons_up_default_function): Rename to ...
17822 (implicitly_declare_fn): ... this.
17823 * call.c (build_new_method_call): Add in-charge parameters for
17824 constructors here.
17825 * class.c (add_implicitly_declared_members): Change parameter name
17826 from cant_have_assignment to cant_have_const_assignment.
17827 Replace calls to cons_up_default_function to implicitly_declare_fn.
17828 * cvt.c (ocp_convert): Use complete_ctor_identifier.
17829 * decl.c (initialize_predefined_identifiers): Initialize it.
17830 (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
17831 complex expression.
17832 * init.c (expand_default_init): Don't calculate the in-charge
17833 parameter here.
17834 (build_new_1): Likewise.
17835 * lex.c (cons_up_default_function): Move to method.c.
17836 * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
17837 (implicitly_declare_fn): New function.
17838 * typeck.c (build_static_cast): Use complete_ctor_identifier.
17839 (build_modify_expr): Likewise.
17840 * typeck2.c (build_functional_cast): Likewise.
17841
17842 Under the new ABI, constructors don't return `this'.
17843 * cp-tree.h (warn_reorder): Declare.
17844 (special_function_kind): New enum.
17845 (global_base_init_list): Remove declaration.
17846 (emit_base_init): Don't return a value.
17847 (check_base_init): Don't declare.
17848 (is_aggr_typedef): Likewise.
17849 * decl.c (check_special_function_return_type): New function.
17850 (return_types): Remove.
17851 (grokdeclarator): Use check_special_function_return_type.
17852 (start_function): Don't initialize ctor_label under the new ABI.
17853 (finish_construtor_body): Don't create a corresponding LABEL_STMT.
17854 * init.c (begin_init_stmts): Move to top of file.
17855 (finish_init_stmts): Likewise.
17856 (warn_reorder): Don't declare.
17857 (emit_base_init): Don't create a STMT_EXPR here. Don't return a
17858 value.
17859 (check_base_init): Remove.
17860 (is_aggr_typedef): Likewise.
17861 (build_new_1): Don't use the return value of a constructor.
17862 * semantics.c (setup_vtbl_ptr): Don't use the return value
17863 of emit_base_init.
17864 * typeck.c (check_return_expr): Don't magically convert return
17865 statements into `return this' in constructors under the new ABI.
17866
17867 * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
17868 CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
17869 (base_ctor_identifier): New macro.
17870 (base_dtor_identifier): Likewise.
17871 (deleting_dtor_identifier): Likewise.
17872 * decl.c: Don't include obstack.h.
17873 (obstack_chunk_alloc): Don't define.
17874 (obstack_chunk_free): Likewise.
17875 (struct predefined_identifier): New type.
17876 (initialize_predefined_identifiers): New function.
17877 (init_decl_processing): Use it.
17878 (debug_temp_inits): Remove.
17879 (start_method): Don't call preserve_data.
17880 (hack_incomplete_structures): Update comment.
17881 * init.c (init_init_processing): Don't initialize
17882 nelts_identifier.
17883 (build_offset_rf): Remove dead code.
17884 (build_delete): Use CLASSTYPE_N_BASECLASSES.
17885 * search.c (init_search_processing): Don't initialize
17886 vptr_identifier.
17887
17888 2000-04-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17889
17890 * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
17891 some sign_compare warnings.
17892
17893 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
17894
17895 Rename abi::__vmi_class_type_info members.
17896 * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
17897 base_list, detail_masks members to vmi_flags, vmi_base_count,
17898 vmi_bases and vmi_flags_masks respectively.
17899 (__vmi_class_type_info::vmi_flags_masks): Rename
17900 details_unknown_mask to flags_unknown_mask.
17901 * tinfo.cc (__class_type_info::do_upcast): Adjust.
17902 (__vmi_class_type_info::do_find_public_src): Adjust.
17903 (__vmi_class_type_info::do_dyncast): Adjust.
17904 (__vmi_class_type_info::do_upcast): Adjust.
17905
17906 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
17907
17908 * tinfo.cc (convert_to_base): New function.
17909 (get_vbase_offset): Remove. Move into convert_to_base.
17910 (__vmi_class_type_info::do_find_public_src): Adjust.
17911 (__vmi_class_type_info::do_dyncast): Adjust.
17912 (__vmi_class_type_info::do_upcast): Adjust.
17913
17914 2000-04-06 Jason Merrill <jason@yorick.cygnus.com>
17915
17916 * tinfo.cc (operator=): Use __builtin_strcmp.
17917 * tinfo2.cc (before): Likewise.
17918
17919 2000-04-06 Mark Mitchell <mark@codesourcery.com>
17920
17921 * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
17922 (DECL_SAVED_INLINE): Rename to ...
17923 (DECL_DEFERRED_FN): ... this.
17924 (in_function_p): Remove declaration.
17925 (mark_inline_for_output): Rename to ...
17926 (defer_fn): ... this.
17927 * decl.c (finish_function): Adjust call to mark_inline_for_output.
17928 (in_function_p): Remove definition.
17929 * decl2.c (saved_inlines): Rename to ...
17930 (deferred_fns): ... this.
17931 (saved_inlines_used): Rename to ...
17932 (deferred_fns_used): ... this.
17933 (mark_inline_for_output): Rename to ...
17934 (defer_fn): ... this.
17935 (finish_file): Adjust accordingly.
17936 (init_decl2): Likewise.
17937 * lex.c (cons_up_default_function): Likewise.
17938 * pt.c (mark_decl_instantiated): Likewise.
17939 (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
17940 circumstances.
17941 * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
17942 * semantics.c (expand_body): Defer more functions.
17943
17944 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
17945
17946 * vec.cc: New file.
17947 * Make-lang.in (CXX_LIB2FUNCS): Add it.
17948 (vec.o): Build it.
17949 * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
17950 __cxa_vec_delete): Declare.
17951
17952 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
17953
17954 * rtti.c (dfs_class_hint_mark): New static function.
17955 (dfs_class_hint_unmark): New static function.
17956 (class_hint_flags): Use them.
17957
17958 2000-04-05 Benjamin Kosnik <bkoz@cygnus.com>
17959
17960 * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
17961
17962 2000-04-05 Mark Mitchell <mark@codesourcery.com>
17963
17964 * cp-tree.h (instantiate_decl): Change prototype.
17965 * decl2.c (mark_used): Adjust call.
17966 * optimize.c (inlinable_function_p): Adjust handling of templates.
17967 * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
17968 (do_type_instantiation): Likewise.
17969 (instantiate_decl): Defer more templates.
17970 (instantiate_pending_templates): Adjust logic to handle inline
17971 friend functions.
17972
17973 * Makefile.in (GGC_H): New variable. Use it throughout in place
17974 of ggc.h.
17975
17976 * call.c: Don't include obstack.h. Include ggc.h.
17977 (obstack_chunk_alloc): Don't define.
17978 (obstack_chunk_free): Likewise.
17979 (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
17980 * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
17981 (pop_switch): Free it.
17982
17983 * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
17984
17985 * dump.c (dequeue_and_dump): Don't try to print the bit_position
17986 if we don't have a DECL_FIELD_OFFSET.
17987
17988 Wed Apr 5 15:12:18 MET DST 2000 Jan Hubicka <jh@suse.cz>
17989
17990 * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
17991 special_function_p.
17992
17993 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17994
17995 * cfns.gperf (hash, libc_name_p): Prototype.
17996
17997 * rtti.c (build_dynamic_cast_1): Constification.
17998
17999 * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
18000
18001 * semantics.c (deferred_type_access_control): Prototype.
18002
18003 2000-04-04 Mark Mitchell <mark@codesourcery.com>
18004
18005 Correct many new ABI issues regarding vbase and vcall offset
18006 layout.
18007 * cp-tree.h (BINFO_VTABLE): Document.
18008 (struct lang_type): Tweak formatting.
18009 (BINFO_PRIMARY_BINFO): Add to documentation.
18010 (CLASSTYPE_VSIZE): Fix typo in comment.
18011 (CLASSTYPE_VBASECLASSES): Update documentation.
18012 (BINFO_VBASE_MARKED): Remove.
18013 (SET_BINFO_VBASE_MARKED): Likewise.
18014 (CLEAR_BINFO_VBASE_MARKED): Likewise.
18015 (BINFO_FIELDS_MARKED): Remove.
18016 (SET_BINFO_FIELDS_MARKED): Likewise.
18017 (CLEAR_BINFO_FIELDS_MARKED): Likewise.
18018 (enum access_kind): New enumeration.
18019 (num_extra_vtbl_entries): Remove declaration.
18020 (size_extra_vtbl_entries): Likewise.
18021 (get_vtbl_decl_for_binfo): New function.
18022 (dfs_vbase_unmark): Remove declaration.
18023 (mark_primary_bases): Likewise.
18024 * class.c (SAME_FN): Remove.
18025 (struct vcall_offset_data_s): Move definition.
18026 (build_vbase_pointer): Use `build', not `build_binary_op', to
18027 access the vbase pointer under the new ABI.
18028 (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
18029 (build_primary_vtable): Likewise.
18030 (dfs_mark_primary_bases): Move here from search.c.
18031 (mark_primary_bases): Likewise.
18032 (determine_primary_bases): Under the new ABI, don't make a base
18033 class a primary base just because we don't yet have any virtual
18034 functions.
18035 (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
18036 (num_vfun_entries): Remove.
18037 (dfs_count_virtuals): Likewise.
18038 (num_extra_vtbl_entries): Likewise.
18039 (size_extra_vtbl_entries): Likewise.
18040 (layout_virtual_bases): Iterate in inheritance graph order under
18041 the new ABI.
18042 (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
18043 indicate that a vfield is present.
18044 (init_class_processing): Initialize access_public_node, etc., from
18045 ak_public, etc.
18046 (get_vtbl_decl_for_binfo): New function.
18047 (dump_class_hierarchy_r): Likewise.
18048 (dump_class_hierarchy): Use it.
18049 (finish_vtbls): Build the vtbls in inheritance graph order.
18050 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
18051 (initialize_vtable): Use get_vtbl_decl_for_binfo.
18052 (accumulate_vtbl_inits): Add comments explaining why a pre-order
18053 walk is required.
18054 (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
18055 where the vptr points, even for primary vtables.
18056 (build_vtbl_initializer): Adjust handling of vbase and vcall
18057 offsets.
18058 (build_vcall_and_vbase_vtable_entries): New function.
18059 (dfs_build_vbase_offset_vtbl_entries): Remove.
18060 (build_vbase_offset_vtbl_entries): Reimplement.
18061 (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
18062 were already handled in a primary base class vtable.
18063 (build_vcall_offset_vtbl_entries): Adjust.
18064 (build_rtti_vtbl_entries): Adjust.
18065 * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
18066 * init.c (expand_virtual_init): Simplify.
18067 * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
18068 * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
18069 * search.c (BINFO_ACCESS): New macro.
18070 (SET_BINFO_ACCESS): Likewise.
18071 (dfs_access_in_type): Manipulate access_kinds, not access nodes.
18072 (access_in_type): Likewise.
18073 (dfs_accessible_p): Likewise.
18074 (protected_accessible_p): Likewise.
18075 (lookup_fnfields_1): Adjust documentation.
18076 (dfs_mark_primary_bases): Move to class.c
18077 (mark_primary_bases): Likewise.
18078 (dfs_vbase_unmark): Remove.
18079 (virtual_context): Use BINFO_FOR_VBASE.
18080 (dfs_get_vbase_types): Simplify.
18081 (dfs_build_inheritance_graph_order): New function.
18082 (get_vbase_types): Use it.
18083 * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
18084
18085 * tinfo.cc (get_vbase_offset): New function.
18086 (__vmi_class_type_info::do_find_public_src): Use it.
18087 (__vmi_class_type_info::do_dyncast): Likewise.
18088 (__vmi_class_type_info::do_upcast): Likewise.
18089
18090 2000-04-03 Zack Weinberg <zack@wolery.cumb.org>
18091
18092 * lang-specs.h: Pass -fno-show-column to the preprocessor.
18093
18094 2000-03-30 Nathan Sidwell <nathan@codesourcery.com>
18095
18096 * rtti.c (class_hint_flags): Rename flags.
18097 (class_initializer): Remove flags.
18098 (synthesize_tinfo_var): Combine offset and flags. Add flags
18099 for __vmi_class_type_info.
18100 (create_tinfo_types): Remove flags from __class_type_info and
18101 __si_class_type_info. Merge flags and offset from
18102 base_class_type_info.
18103 * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
18104 (__base_class_info::is_virtual_p): Adjust.
18105 (__base_class_info::is_public_p): Adjust.
18106 (__base_class_info::offset): New accessor.
18107 (__class_type_info::details): Remove member.
18108 (__class_type_info::__class_type_info): Lose details.
18109 (__class_type_info::detail_masks): Remove.
18110 (__si_class_type_info::__si_class_type_info): Lose details.
18111 (__vmi_class_type_info::details): New member.
18112 (__vmi_class_type_info::__vmi_class_type_info): Adjust.
18113 (__vmi_class_type_info::detail_masks): New member.
18114 * tinfo.cc (__class_type_info::do_upcast): Initialize result
18115 with unknown_details_mask.
18116 (__vmi_class_type_info::do_find_public_src): Adjust
18117 (__vmi_class_type_info::do_dyncast): Adjust.
18118 (__vmi_class_type_info::do_upcast): Set result details, if
18119 needed. Adjust.
18120 (__dynamic_cast): Temporarily #if out optimization.
18121
18122 2000-03-29 Nathan Sidwell <nathan@codesourcery.com>
18123
18124 * rtti.c (get_tinfo_decl): Mark used.
18125 (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
18126 mark as dealt with, if we output it.
18127
18128 2000-03-28 Mark Mitchell <mark@codesourcery.com>
18129
18130 * class.c: Reorganize to put virtual function table initialization
18131 machinery at the end of the file.
18132
18133 2000-03-28 Jason Merrill <jason@casey.cygnus.com>
18134
18135 * class.c (finish_struct): Use bitsize_zero_node.
18136 * pt.c (instantiate_class_template): Likewise.
18137
18138 2000-03-28 Mark Mitchell <mark@codesourcery.com>
18139
18140 Put RTTI entries at negative offsets in new ABI.
18141 * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
18142 vbase offset at index -3, not -1.
18143 (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
18144 dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
18145 (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
18146 (build_rtti_vtbl_entries): New function.
18147 (set_rtti_entry): Remove.
18148 (build_primary_vtable): Don't use it.
18149 (build_secondary_vtable): Likewise.
18150 (start_vtable): Remove.
18151 (first_vfun_index): New function.
18152 (set_vindex): Likewise.
18153 (add_virtual_function): Don't call start_vtable. Do call
18154 set_vindex.
18155 (set_primary_base): Rename parameter.
18156 (determine_primary_base): Likewise.
18157 (num_vfun_entries): Don't use skip_rtti_stuff.
18158 (num_extra_vtbl_entries): Include RTTI information.
18159 (build_vtbl_initializer): Use build_rtti_vtbl_entries.
18160 (skip_rtti_stuff): Remove.
18161 (dfs_modify_vtables): Don't use it.
18162 (modify_all_vtables): Don't use start_vtable. Do use set_vindex.
18163 (layout_nonempty_base_or_field): Update size handling.
18164 (create_vtable_ptr): Tweak.
18165 (layout_class_type): Adjust parameter names.
18166 (finish_struct_1): Simplify.
18167 * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
18168 (skip_rtti_stuff): Remove.
18169 (first_vfun_index): New function.
18170 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
18171 (dfs_vtable_path_marked_real_bases_queue_p): Remove.
18172 (marked_vtable_pathp): Declare.
18173 (unmarked_vtable_pathp): Likewise.
18174 * error.c (dump_expr): Use first_vfun_index to calculate vtable
18175 offsets.
18176 * rtti.c (build_headof): Look for RTTI at negative offsets.
18177 (get_tinfo_decl_dynamic): Likewise.
18178 (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
18179 here.
18180 (create_pseudo_type_info): Do it here instead. Adjust so that
18181 vptr points at first virtual function.
18182 * search.c (marked_vtable_pathp): Make it global.
18183 (unmarked_vtable_pathp): Likewise.
18184 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
18185 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
18186 (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
18187 (get_pure_virtuals): Likewise.
18188 (expand_upcast_fixups): Likewise.
18189 * tree.c (debug_binfo): Likewise.
18190 * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
18191 negative offset.
18192
18193 2000-03-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18194
18195 * class.c (check_field_decl): Fix typo.
18196 (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
18197 (check_methods): Likewise.
18198 (check_field_decls): Likewise.
18199 Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
18200 * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
18201 Use DECL_RESULT_FLD, not DECL_RESULT.
18202 * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
18203 * lex.c (identifier_type): Likewise.
18204 * pt.c (determine_specialization, lookup_template_class): Likewise.
18205 (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
18206 (resolve_overloaded_unification, more_specialized): Likewise.
18207 * semantics.c (finish_member_declaration): Likewise.
18208 * typeck.c (build_x_function_call): Likewise.
18209
18210 2000-03-26 Mark Mitchell <mark@codesourcery.com>
18211
18212 * class.c (layout_empty_base): Handle empty bases with non-byte
18213 alignment.
18214 (build_base_field): Likewise.
18215 (layout_virtual_bases): Likewise.
18216
18217 * class.c (finish_struct_1): Fix typo in this change:
18218
18219 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18220
18221 2000-03-25 Mark Mitchell <mark@codesourcery.com>
18222
18223 * decl.c (grokdeclarator): Count partial specializations when
18224 keeping track of how many template classes have been seen.
18225
18226 * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
18227
18228 2000-03-25 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18229
18230 * class.c (build_vbase_pointer_fields): layout_field now place_field.
18231 (get_vfield_offset): Use byte_position.
18232 (set_rtti_entry): Set OFFSET to ssizetype zero.
18233 (get_binfo_offset_as_int): Deleted.
18234 (dfs_record_base_offsets): Use tree_low_cst.
18235 (dfs_search_base_offsets): Likewise.
18236 (layout_nonempty_base_or_field): Reflect changes in RLI format
18237 and call byte_position.
18238 (layout_empty_base): Convert offset to ssizetype.
18239 (build_base_field): use rli_size_unit_so_far.
18240 (dfs_propagate_binfo_offsets): Do computation in proper type.
18241 (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
18242 (layout_class_type): Reflect changes in RLI names and fields.
18243 (finish_struct_1): Set DECL_FIELD_OFFSET.
18244 * dump.c (dequeue_and_dump): Call bit_position.
18245 * expr.c (cplus_expand_constant): Use byte_position.
18246 * rtti.c (expand_class_desc): Use bitsize_one_node.
18247 * typeck.c (build_component_addr): Use byte_position and don't
18248 special case for zero offset.
18249
18250 2000-03-24 Nathan Sidwell <nathan@codesourcery.com>
18251
18252 * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
18253
18254 * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
18255 tinfo object.
18256 (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
18257 vtable.
18258
18259 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
18260
18261 * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
18262 DECL_P macros.
18263 * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
18264 make_typename_type, check_initializer, cp_finish_decl,
18265 xref_tag): Likewise.
18266 * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
18267 decl_namespace, arg_assoc_template_arg, arg_assoc,
18268 validate_nonmember_using_decl, do_class_using_decl): Likewise.
18269 * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
18270 args_to_string): Likewise.
18271 * friend.c (is_friend): Likewise.
18272 * lex.c (note_got_semicolon, note_list_got_semicolon,
18273 is_global): Likewise.
18274 * method.c (build_overload_nested_name, build_overload_value,
18275 build_qualified_name, build_qualified_name, hack_identifier): Likewise.
18276 * parse.y (typename_sub, typename_sub1): Likewise.
18277 * pt.c (push_inline_template_parms_recursive, check_template_shadow,
18278 process_partial_specialization, convert_template_argument,
18279 template_args_equal, add_pending_template, lookup_template_class,
18280 for_each_template_parm_r, maybe_fold_nontype_arg,
18281 tsubst, instantiate_template, type_unification_real, unify,
18282 instantiate_pending_templates, set_mangled_name_for_template_decl):
18283 Likewise.
18284 * repo.c (repo_get_id, repo_template_used): Likewise.
18285 * search.c (lookup_field_1): Likewise.
18286 * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
18287 * xref.c (classname): Likewise.
18288
18289 2000-03-22 Mark Mitchell <mark@codesourcery.com>
18290
18291 * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
18292 (CANONICAL_BINFO): New macro.
18293 (BINFO_NEW_VTABLE_MARKED): Use it.
18294 (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
18295 (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
18296 * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
18297 not TREE_TYPE.
18298 (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
18299 (build_secondary_vtable): Likewise.
18300 (dfs_finish_vtbls): Likewise.
18301 (dfs_accumulate_vtbl_inits): Likewise.
18302 (accumulate_vtbl_inits): New function.
18303 (finish_vtbls): Make sure that virtual bases come after
18304 non-virtual bases in the vtable group.
18305 (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
18306 (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
18307 * search.c (struct vbase_info): Move definition.
18308 (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
18309 (unmarked_new_vtable_p): Likewise.
18310 (dfs_mark_vtable_path): Remove.
18311 (dfs_mark_new_vtable): Remove.
18312 (dfs_unmark_new_vtable): Likewise.
18313 (dfs_clear_search_slot): Likewise.
18314 (dfs_find_vbases): Adjust usage of BINFO_NEW_VTABLE_MARKED.
18315 (dfs_clear_vbase_slots): Likewise.
18316 (init_vbase_pointers): LIkewise.
18317
18318 2000-03-22 Jason Merrill <jason@casey.cygnus.com>
18319
18320 * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
18321 SIZETYPE to a non-SIZETYPE.
18322
18323 2000-03-21 Mark Mitchell <mark@codesourcery.com>
18324
18325 * class.c (layout_virtual_bases): Adjust names in conditionally
18326 compiled code.
18327
18328 * class.c (record_base_offsets): New function.
18329 (layout_conflict_p): Likewise.
18330 (layout_nonempty_base_or_field): Use it.
18331 (layout_empty_base): New function.
18332 (build_base_field): Use it.
18333 (build_base_fields): Update comment.
18334 (layout_virtual_bases): Fold in a little code form
18335 layout_basetypes. Use layout_empty_base.
18336 (layout_basetypes): Remove.
18337 (end_of_class): New function.
18338 (layout_class_type): Use it. Adjust.
18339
18340 * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
18341 (fntype_p): Remove.
18342 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
18343 comment.
18344 (dfs_skip_nonprimary_vbases_markedp): Likewise.
18345 * typeck.c (fntype_p): Remove.
18346
18347 * cp-tree.h (TI_SPEC_INFO): Remove.
18348 (CLASSTYPE_TI_SPEC_INFO): Likewise.
18349 * pt.c (process_partial_specialization): Likewise.
18350
18351 * class.c (build_base_field): Fix thinko in computation of binfo
18352 offsets.
18353
18354 * tree.c (mark_local_for_remap_p): Mark variables declared in
18355 TARGET_EXPRs as well.
18356
18357 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
18358
18359 * typeck.c (require_complete_type, complete_type,
18360 complete_type_or_else, c_sizeof, c_sizeof_nowarn,
18361 build_array_ref, convert_arguments, pointer_diff,
18362 build_x_unary_op, build_unary_op, build_c_cast,
18363 build_modify_expr): Use COMPLETE_TYPE_P etc.
18364 * call.c (is_complete, convert_like_real,
18365 build_new_method_call): Likewise.
18366 * class.c (build_vbase_pointer_fields, check_bases,
18367 build_base_field, finish_struct_1, pushclass): Likewise.
18368 * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
18369 * decl.c (maybe_process_template_type_declaration, pushtag,
18370 pushdecl, redeclaration_error_message, start_decl, start_decl_1,
18371 layout_var_decl, check_initializer, cp_finish_decl,
18372 grokdeclarator, require_complete_types_for_parms,
18373 grok_op_properties, xref_tag, xref_basetypes,
18374 check_function_type): Likewise.
18375 * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
18376 * friend.c (do_friend): Likewise.
18377 * init.c (build_offset_ref): Likewise.
18378 * parse.y (structsp): Likewise.
18379 * pt.c (maybe_process_partial_specialization,
18380 tsubst_friend_function, instantiate_class_template, tsubst,
18381 do_type_instantiation, instantiate_pending_templates): Likewise.
18382 * repo.c (repo_get_id): Likewise.
18383 * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
18384 synthesize_tinfo_var, emit_support_tinfos): Likewise.
18385 * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
18386 * semantics.c (begin_class_definition): Likewise.
18387 * tree.c (build_cplus_method_type): Likewise.
18388 * typeck2.c (digest_init, build_functional_cast,
18389 add_exception_specifier): Likewise.
18390 * parse.h, parse.c: Regenerated.
18391
18392 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
18393
18394 * inc/cxxabi.h: New header file. Define new-abi entry points.
18395 (__pointer_type_info::target): Rename member to ...
18396 (__pointer_type_info::type): ... here.
18397 (__base_class_info::type): Rename member to ...
18398 (__base_class_info::base): ... here.
18399 * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
18400 * cp-tree.h (CPTI_ABI): New global tree enumeration.
18401 (abi_node): New global tree node.
18402 * decl.c (abi_node): Document.
18403 (init_decl_processing): Initialize abi_node.
18404 * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
18405 (get_vmi_pseudo_type_info): Likewise.
18406 (create_tinfo_types): Likewise.
18407 (emit_support_tinfos): Likewise.
18408 * tinfo.h (cxxabi.h): Include for new-abi.
18409 Move rtti class definitions to new header file.
18410 * tinfo.cc (abi): Use the namespace.
18411 (std): Move new abi rtti classes from here ...
18412 (__cxxabiv1): ... to here.
18413 * tinfo2.cc (cxxabi.h): Include for new-abi.
18414 Move rtti class definitions to new header file.
18415 (std): Move new abi rtti classes from here ...
18416 (__cxxabiv1): ... to here.
18417 * inc/typeinfo (__class_type_info): Move into __cxxabiv1
18418 namespace.
18419
18420 2000-03-20 Jed Wing <jedwin@zloty.ugcs.caltech.edu>
18421 Jason Merrill <jason@casey.cygnus.com>
18422
18423 * method.c (build_overload_int): Use host_integerp.
18424
18425 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
18426
18427 * init.c (build_offset_ref): Handle the case of a templated member
18428 function.
18429
18430 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
18431
18432 * except.c (expand_exception_blocks): Clear catch_clauses_last.
18433
18434 2000-03-18 Mark Mitchell <mark@codesourcery.com>
18435
18436 * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
18437 * class.c (check_bitfield_decl): Turn illegal bitfields into
18438 non-bitfields.
18439 (dfs_propagate_binfo_offsets): Adjust for new size_binop
18440 semantics.
18441 (dfs_offset_for_unshared_vbases): Likewise.
18442 * cvt.c (cp_convert_to_pointer): Convert NULL to a
18443 pointer-to-member correctly under the new ABI.
18444 * expr.c (cplus_expand_constant): Don't use cp_convert when
18445 turning an offset into a pointer-to-member.
18446 * init.c (resolve_offset_ref): Don't adjust pointers-to-members
18447 when dereferencing them under the new ABI.
18448 * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
18449 of pointers-to-members under the new ABI.
18450
18451 * class.c (check_bitfield_decl): Remove restriction on really long
18452 bitfields.
18453 (layout_class_type): Implement new ABI handling of bitfields
18454 longer than their types.
18455
18456 2000-03-18 Martin v. Löwis <loewis@informatik.hu-berlin.de>
18457
18458 * parse.y (extdefs): Call ggc_collect.
18459 * parse.c: Regenerated.
18460
18461 2000-03-18 Nathan Sidwell <nathan@codesourcery.com>
18462
18463 * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
18464 (note_name_declared_in_class): Use OVL_CURRENT to get at a
18465 potential overload.
18466
18467 2000-03-17 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18468
18469 * class.c (build_vbase_path): Use integer_zerop.
18470 (build_vtable_entry): Use tree_low_cst.
18471 (get_vfield_offset): Use bit_position.
18472 (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
18473 Use tree_low_cst.
18474 (check_bitfield_decl): Set DECL_SIZE using convert.
18475 (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
18476 (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
18477 Use tree_low_cst.
18478 (finish_struct_1): Use bit_position.
18479 (dump_class_hierarchy): Use tree_low_cst.
18480 * cp-tree.h (min_precision): Add declaration.
18481 * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
18482 * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
18483 (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
18484 * expr.c (cplus_expand_constant): Use bit_position.
18485 * init.c (build_vec_init): Use host_integerp and tree_low_cst.
18486 * rtti.c (get_base_offset): Use bit_position.
18487 * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
18488 host_integerp, and tree_low_cst.
18489 (pointer_int_sum): Use integer_zerop.
18490 (build_component_addr): Use bit_position.
18491
18492 2000-03-17 Nathan Sidwell <nathan@codesourcery.com>
18493
18494 * typeck.c (require_complete_type): Don't assume size_zero_node.
18495 (complete_type_or_else): Likewise.
18496
18497 2000-03-16 Steven Grady <grady@digitaldeck.com>
18498 Jason Merrill <jason@casey.cygnus.com>
18499
18500 * rtti.c (build_dynamic_cast_1): Improve diagnostics.
18501
18502 2000-03-16 Nathan Sidwell <nathan@codesourcery.com>
18503
18504 * decl2.c (grokfield): Bail out if type is error_mark_node.
18505
18506 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
18507
18508 * tinfo2.cc (__ptr_to_member_data): Rename to ...
18509 (__pointer_to_member_data): ... here. Adjust.
18510 * rtti.c (create_tinfo_types): Adjust.
18511
18512 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
18513
18514 * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
18515 * decl.c (ref_desc_type_node): Undocument.
18516 * rtti.c (ptr_ref_initializer): Rename to ...
18517 (ptr_initializer): ... here. Adjust comments.
18518 (ptmd_initializer): Fix comment thinko.
18519 (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
18520 (create_tinfo_types): Remove ref_desc_type_node init.
18521 * tinfo2.cc (__reference_type_info): Remove.
18522
18523 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
18524
18525 * decl.c (cp_finish_decl): Remove obsolete comment.
18526
18527 * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
18528
18529 2000-03-14 Mark Mitchell <mark@codesourcery.com>
18530
18531 * cp-tree.h: Tweak documentation.
18532 * class.c (build_vbase_pointer_fields): Layout the fields, too.
18533 (avoid_overlap): Remove.
18534 (get_binfo_offset_as_int): New function.
18535 (dfs_serach_base_offsets): Likewise.
18536 (layout_nonempty_base_or_field): Likewise.
18537 (build_base_field): Layout fields here. Avoid placing two objects
18538 of the same type at the same address, under the new ABI.
18539 (build_base_fields): Adjust accordingly.
18540 (create_vtable_ptr): Return the new field, but don't attach it to
18541 TYPE_FIELDS.
18542 (remove_base_field): Remove.
18543 (remove_base_fields): Remove.
18544 (layout_basetypes): Adjust accordingly.
18545 (layout_class_type): Call layout_field for each field, rather than
18546 just making a wholesale call to layout_type.
18547
18548 2000-03-14 Jeff Sturm <jsturm@sigma6.com>
18549
18550 * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
18551
18552 2000-03-13 Jason Merrill <jason@casey.cygnus.com>
18553
18554 * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
18555
18556 * except.c (dtor_nothrow): New fn.
18557 (do_pop_exception): Use it. Take type parm.
18558 (push_eh_cleanup): Take type parm.
18559 (expand_start_catch_block): Pass it.
18560 (build_eh_type_type_ref): Accept null type.
18561
18562 2000-03-12 Mark Mitchell <mark@codesourcery.com>
18563
18564 * cp-tree.h (revert_static_member_fn): Change prototype.
18565 * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
18566 (grok_op_properties): Likewise.
18567 (start_function): Likewise.
18568 (revert_static_member_fn): Simplify.
18569 * pt.c (check_explicit_specialization): Adjust call to
18570 revert_static_member_fn.
18571
18572 2000-03-11 Mark Mitchell <mark@codesourcery.com>
18573
18574 * cp-tree.h (scope_kind): New type.
18575 (tmpl_spec_kind): Likewise.
18576 (declare_pseudo_global_level): Remove.
18577 (pseudo_global_level_p): Rename to template_parm_scope_p.
18578 (pushlevel): Remove declaration.
18579 (begin_scope): New function.
18580 (finish_scope): Likewise.
18581 (current_tmpl_spec_kind): Likewise.
18582 * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
18583 Shorten keep to 2 bits. Rename pseudo_global to template_parms_p.
18584 Add template_spec_p.
18585 (toplevel_bindings_p): Adjust.
18586 (declare_pseudo_global_level): Remove.
18587 (pseudo_global_level_p): Rename to template_parm_scope_p.
18588 (current_tmpl_spec_kind): New function.
18589 (begin_scope): Likewise.
18590 (finish_scope): Likewise.
18591 (maybe_push_to_top_level): Adjust.
18592 (maybe_process_template_type_declaration): Likewise.
18593 (pushtag): Likewise.
18594 (pushdecl_nonclass_level): Likewise.
18595 (lookup_tag): Likewise.
18596 (grokfndecl): Handle member template specializations. Share
18597 constructor and non-constructor code.
18598 * decl2.c (check_classfn): Handle member template specializations.
18599 * pt.c (begin_template_parm_list): Use begin_scope.
18600 (begin_specialization): Likewise.
18601 (end_specialization): Likewise.
18602 (check_explicit_specialization): Use current_tmpl_spec_kind.
18603 Handle member template specializations.
18604 (end_template_decl): Use finish_scope. Remove call to
18605 get_pending_sizes.
18606 (push_template_decl_real): Remove bogus error message.
18607 (tsubst_decl): Fix typo in code contained in comment.
18608 (instantiate_template): Handle member template specializations.
18609 (most_general_template): Likewise.
18610
18611 2000-03-11 Gabriel Dos Reis <gdr@codesourcery.com>
18612
18613 * lex.c (whitespace_cr): Compress consecutive calls to warning().
18614 (do_identifier): Ditto for error().
18615
18616 * pt.c (convert_nontype_argument): Ditto for cp_error().
18617 (convert_template_argument): Ditto for cp_pedwarn().
18618
18619 2000-03-11 Jason Merrill <jason@casey.cygnus.com>
18620
18621 * exception.cc (__check_null_eh_spec): New fn.
18622 * except.c (expand_end_eh_spec): Call it if the spec is throw().
18623
18624 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
18625
18626 * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
18627 * except.c (expand_end_eh_spec): Add the return type.
18628 * rtti.c (throw_bad_cast): Add the parmtypes.
18629 (throw_bad_typeid): Likewise.
18630
18631 * semantics.c (expand_stmt): Only leave out rtl for unused
18632 artificials, and set DECL_IGNORED_P on them as well.
18633 * decl.c (wrapup_globals_for_namespace): Likewise.
18634
18635 2000-03-09 Nathan Sidwell <nathan@codesourcery.com>
18636
18637 * decl.c (maybe_commonize_var): Skip all artificial decls.
18638 * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
18639
18640 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
18641
18642 * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
18643 * cp-tree.h: Declare flag_enforce_eh_specs.
18644 * decl.c (store_parm_decls, finish_function): Check it.
18645
18646 C library functions don't throw.
18647 * Makefile.in (cfns.h): New target.
18648 (except.o): Depend on it.
18649 * Make-lang.in (cc1plus): Depend on cfns.gperf.
18650 * cfns.gperf: New file.
18651 * cfns.h: Generated.
18652 * except.c: Include it.
18653 (nothrow_libfn_p): New fn.
18654 * decl.c (grokfndecl): Use it.
18655 * cp-tree.h: Declare it.
18656
18657 * decl.c (push_overloaded_decl_1, auto_function,
18658 define_function): Lose.
18659 (build_library_fn_1): New static fn.
18660 (builtin_function): Use it.
18661 (get_atexit_node): Use build_library_fn_ptr.
18662 (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
18663 build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
18664 push_void_library_fn, push_throw_library_fn): New fns.
18665 * cp-tree.h: Declare them.
18666 (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
18667 (throw_bad_cast_node, throw_bad_typeid_node): Lose.
18668 * except.c (init_exception_processing, call_eh_info, do_pop_exception,
18669 (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
18670 * rtti.c (build_runtime_decl): Lose.
18671 (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
18672 build_dynamic_cast_1, expand_si_desc, expand_class_desc,
18673 expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
18674
18675 * call.c (build_call): Remove result_type parm.
18676 Call mark_used on unused artificial fns.
18677 * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
18678
18679 2000-03-09 Jason Merrill <jason@casey.cygnus.com>
18680
18681 * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
18682 appropriate.
18683 * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
18684 * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
18685 TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
18686 * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
18687 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
18688 expand_generic_desc): Likewise.
18689
18690 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
18691
18692 * exception.cc (__cp_pop_exception): Cleanup the original object.
18693
18694 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
18695
18696 * decl.c (grok_op_properties): Merge conversion to void warning
18697 with other silly op warnings.
18698
18699 2000-03-08 Jason Merrill <jason@casey.cygnus.com>
18700
18701 * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
18702 array CONSTRUCTOR elements. Don't use expr_tree_cons.
18703
18704 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
18705
18706 * decl.c (cp_make_fname_decl): New function.
18707 (wrapup_globals_for_namespace): Don't emit unused static vars.
18708 (init_decl_processing): Remove comment about use of
18709 array_domain_type. Set make_fname_decl.
18710 (cp_finish_decl): Remove __FUNCTION__ nadgering.
18711 * semantics.c (begin_compound_stmt): Remove
18712 current_function_name_declared flagging.
18713 (expand_stmt): Don't emit unused local statics.
18714 * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
18715 specially.
18716
18717 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
18718
18719 * typeck.c (convert_for_assignment): Don't look at array
18720 initializer.
18721 * call.c (convert_like_real): Likewise.
18722
18723 2000-03-07 Jason Merrill <jason@casey.cygnus.com>
18724
18725 Add initial support for '\uNNNN' specifier.
18726 * lex.c (read_ucs): New fn.
18727 (readescape, skip_white_space): Call it.
18728 (is_extended_char, is_extended_char_1): New fns.
18729 (utf8_extend_token): New fn, #if 0'd out.
18730 (real_yylex): Treat extended chars like letters.
18731
18732 * search.c (note_debug_info_needed): Walk the bases even if we
18733 weren't deferring the type itself.
18734
18735 2000-03-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18736
18737 * decl2.c (finish_objects): Constify a char*.
18738
18739 * method.c (emit_thunk): Likewise.
18740
18741 2000-03-06 Nathan Sidwell <nathan@codesourcery.com>
18742
18743 * typeck.c (dubious_conversion_warnings): Look through
18744 REFERENCE_TYPE.
18745
18746 2000-03-06 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18747
18748 * class.c (dfs_modify_vtables): I is now unsigned.
18749 (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
18750 (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
18751 * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
18752 * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
18753 * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
18754 * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
18755 Call integer_all_onesp.
18756 * typeck2.c (process_init_constructor): Use compare_tree_int.
18757
18758 * lang-specs.h (as): Don't call if -syntax-only.
18759
18760 2000-03-06 Mark Mitchell <mark@codesourcery.com>
18761
18762 * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
18763 RTL_EXPR_HAS_NO_SCOPE after all.
18764
18765 2000-03-05 Mark Mitchell <mark@codesourcery.com>
18766
18767 * expr.c (cplus_expand_expr, case STMT_EXPR): Use
18768 expand_start_stmt_expr and expand_end_stmt_expr directly. Set
18769 RTL_EXPR_HAS_NO_SCOPE.
18770
18771 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
18772 later.
18773
18774 * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
18775
18776 2000-03-05 Nathan Sidwell <nathan@codesourcery.com>
18777
18778 * call.c (convert_like): Macrofy.
18779 (convert_like_with_context): New macro.
18780 (convert_like_real): Renamed from convert_like. Add calling
18781 context parameters, for diagnostics. Add recursive flag. Call
18782 dubious_conversion_warnings for outer conversion.
18783 (build_user_type_conversion): Use convert_like_with_context.
18784 (build_over_call): Likewise. Don't warn about dubious
18785 conversions here. Adjust convert_default_arg calls.
18786 (convert_default_arg): Add context parameters for diagnostics.
18787 Pass through to convert_like_with_context.
18788 * cp-tree.h (convert_default_arg): Add context parameters.
18789 (dubious_conversion_warnings): Prototype new function.
18790 * typeck.c (convert_arguments): Adjust convert_default_arg call.
18791 (dubious_conversion_warnings): New function, broken
18792 out of convert_for_assignment.
18793 (convert_for_assignment): Adjust.
18794
18795 2000-03-03 Jason Merrill <jason@casey.cygnus.com>
18796
18797 * decl2.c (key_method): Break out from...
18798 (import_export_vtable, import_export_class): ...here.
18799
18800 * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
18801 * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
18802
18803 * search.c (note_debug_info_needed, dfs_debug_mark,
18804 dfs_debug_unmarkedp): Uncomment. Adjust for new scheme.
18805 * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
18806
18807 2000-03-03 Nathan Sidwell <nathan@codesourcery.com>
18808
18809 * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
18810 typos.
18811
18812 2000-03-02 Mark Mitchell <mark@codesourcery.com>
18813
18814 * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
18815 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
18816 (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
18817 (lang_type): Split gets_new into has_new and has_array_new.
18818 (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
18819 (TYPE_GETS_NEW): Split into ...
18820 (TYPE_HAS_NEW_OPERATOR): ... this, and ...
18821 (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
18822 (DECL_ARRAY_DELETE_OPERATOR_P): New macro
18823 (build_op_new_call): Don't declare.
18824 (build_new_1): Likewise.
18825 * call.c (build_op_new_call): Remove.
18826 * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
18827 instead of TYPE_NEEDS_DESTRUCTOR.
18828 (finish_struct_bits): Likewise.
18829 (add_implicitly_declared_members): Likewise.
18830 (check_field_decl): Likewise.
18831 (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
18832 correctly under the new ABI.
18833 * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
18834 instead of TYPE_NEEDS_DESTRUCTOR.
18835 (initialize_local_var): Likewise.
18836 (destroy_local_var): Likewise.
18837 (cp_finish_decl): Likewise.
18838 (register_dtor_fn): Likewise.
18839 (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
18840 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set
18841 TYPE_VEC_DELETE_TAKES_SIZE here.
18842 (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
18843 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
18844 (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
18845 (finish_destructor_body): Likewise.
18846 (maybe_build_cleanup_1): Likewise.
18847 * decl2.c (do_static_destruction): Likewise.
18848 * init.c (build_new_1): Make it static.
18849 (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
18850 (expand_cleanup_for_base): Likewise.
18851 (get_cookie_size): New function.
18852 (build_new_1): Handle array-new cookies correctly under the new
18853 ABI.
18854 (build_vec_delete_1): Likewise.
18855 (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
18856 (build_delete): Likewise.
18857 (build_vec_delete): Handle array-new cookies correctly under the new
18858 ABI.
18859 * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
18860 * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
18861 TYPE_HAS_ARRAY_NEW_OPERATOR.
18862 * ptree.c (print_lang_type): Check them.
18863 * search.c (context_for_name_lookup): Fix typo in comment.
18864 (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
18865 * tree.c (break_out_cleanups): Likewise.
18866 (build_cplus_array_test_1): Likewise.
18867 (cp_build_qualified_type_real): Likewise.
18868 * typeck.c (complete_type): Likewise.
18869
18870 * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
18871 the command-line, not the end.
18872
18873 2000-03-01 Jason Merrill <jason@casey.cygnus.com>
18874
18875 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
18876
18877 2000-03-02 Tom Tromey <tromey@cygnus.com>
18878
18879 * cp-tree.h (build_java_class_ref): Declare.
18880 * init.c (build_java_class_ref): No longer static.
18881 * except.c (expand_throw): Generate a Java-style `throw' if the
18882 thrown object is a "Java" object.
18883 (initialize_handler_parm): Generate a Java-style lookup of
18884 exception info if the caught object is a "Java" object.
18885 (catch_language, catch_language_init): New globals.
18886 (decl_is_java_type): New function.
18887 (expand_start_catch_block): Don't call push_eh_info() or
18888 push_eh_cleanup() when handling a Java-style "catch". Pass Java
18889 class reference to build_catch_block.
18890
18891 2000-03-02 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18892
18893 * typeck.c (comptypes): Treat sizetype like its language equivalent.
18894
18895 2000-03-01 Bernd Schmidt <bernds@cygnus.co.uk>
18896
18897 * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
18898 to merge reference/pointer code and fix incorrect warnings.
18899
18900 2000-02-29 Jason Merrill <jason@casey.cygnus.com>
18901
18902 * search.c (protected_accessible_p): Use context_for_name_lookup.
18903
18904 * init.c (construct_virtual_bases): Fix thinko.
18905 * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
18906
18907 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
18908
18909 * decl.c (current_function_decl): Move to toplev.c.
18910
18911 2000-02-29 Nathan Sidwell <nathan@codesourcery.com>
18912
18913 * pt.c (fn_type_unification): Unify return type, whenever
18914 provided.
18915 (get_bindings_real): Only pass return type when necessary.
18916 Remove explicit return type check.
18917 * class.c (resolve_address_of_overloaded_function): Pass desired
18918 return type to fn_type_unification.
18919
18920 2000-02-28 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18921
18922 * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
18923 DECL_FIELD_SIZE.
18924 (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
18925 DECL_FIELD_SIZE.
18926 * rtti.c (expand_class_desc): Likewise.
18927 * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
18928 (THUNK_VCALL_OFFSET): Likewise.
18929 (THUNK_DELTA): Reflect changes in ../tree.h.
18930
18931 2000-02-28 Jason Merrill <jason@casey.cygnus.com>
18932
18933 * search.c (protected_accessible_p): Also allow the access if
18934 the member is public in DERIVED. Lose TYPE parm.
18935 (friend_accessible_p): Lose TYPE parm.
18936 (accessible_p): Adjust.
18937
18938 2000-02-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18939
18940 * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
18941 on things that are not sizes; ssize_binop deleted.
18942 Call size_diffop when appropriate.
18943 (dfs_build_vcall_offset_vtbl_entries): Likewise.
18944 (build_primary_vtable, build_secondary_vtable): Likewise.
18945 (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
18946 Variable I is HOST_WIDE_INT.
18947 (get_vfield_offset): Pass proper types to size_binop.
18948 (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
18949 (finish_struct_1): Likewise.
18950 (skip_rtti_stuff): Arg N is now pointer to signed.
18951 (layout_class_type): Use size_zero_node.
18952 * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
18953 * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
18954 * decl.c (complete_arry_type): Pass proper types to size_binop.
18955 (xref_basetypes): BINFO_OFFSET is sizetype.
18956 * error.c (dump_expr): Don't use size_binop non-sizes.
18957 * expr.c (cplus_expand_constant): Pass proper types to size_binop.
18958 * init.c (construct_virtual_bases): Fix type error.
18959 (build_vec_delete_1): Pass proper type to size_binop and don't
18960 fold result.
18961 * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
18962 * rtti.c (get_base_offset): Pass proper type to size_binop.
18963 * search.c (dfs_find_vbases): Fix type error.
18964 (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
18965 (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
18966 * tree.c (debug_binfo): Variable N is signed.
18967 Use HOST_WIDE_INT_PRINT_DEC.
18968 * typeck.c (comptypes): sizetype is same as equivalent integer type.
18969 (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
18970 size_one_node and size_zero_node.
18971 (c_alignof): Use size_one_node.
18972 (build_component_addr): Pass proper types to size_binop.
18973 (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
18974
18975 2000-02-26 Jason Merrill <jason@casey.cygnus.com>
18976
18977 Implement class scope using-declarations for functions.
18978 * class.c (handle_using_decl): Call add_method for used functions.
18979 Use IDENTIFIER_CLASS_VALUE to check for conflicts.
18980 (add_method): Used functions are hidden by local functions.
18981 (check_bases_and_members): Handle using-decls before finalizing
18982 CLASSTYPE_METHOD_VEC.
18983 * call.c (add_function_candidate): Add ctype parm; if nonzero,
18984 override the type of 'this' accordingly.
18985 (add_template_candidate, add_template_candidate_real): Add ctype parm.
18986 (convert_class_to_reference, build_user_type_conversion_1,
18987 build_new_function_call, build_object_call, build_new_op,
18988 build_new_method_call): Pass ctype parm.
18989
18990 * search.c (lookup_member): Put rval_binfo, not basetype_path, in
18991 the baselink.
18992 * call.c (convert_class_to_reference, build_user_type_conversion_1,
18993 build_new_function_call, build_object_call, build_new_op,
18994 build_new_method_call, build_op_delete_call): Don't get basetype_path
18995 from a baselink.
18996 * typeck.c (build_component_ref): Likewise.
18997 * init.c (build_offset_ref): Likewise.
18998 (resolve_offset_ref): Don't call enforce_access.
18999 Call build_scoped_ref.
19000 * typeck2.c (build_scoped_ref): Simplify. Do nothing if it
19001 would cause an error or if -pedantic.
19002 * class.c (alter_access): Lose binfo parm.
19003
19004 2000-02-26 Mark Mitchell <mark@codesourcery.com>
19005
19006 * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
19007 types.
19008
19009 2000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at>
19010
19011 * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
19012 pseudo_type_info creation into the std namespace
19013
19014 2000-02-26 Mark Mitchell <mark@codesourcery.com>
19015
19016 * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
19017 (import_export_class): Remove declaration.
19018 * decl2.c (import_export_class): Make it static.
19019 * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
19020 PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
19021 EXPR_WITH_FILE_LOCATION.
19022 * lex.c (check_newline): Tweak filename/lineno setting.
19023 * semantics.c (begin_while_stmt): Fix typo in comment.
19024
19025 2000-02-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19026
19027 * lang-options.h (-fmessage-length=): Add missing option.
19028
19029 * Make-lang.in (CXX_SRCS): Add .h files and sort list.
19030
19031 2000-02-26 Zack Weinberg <zack@wolery.cumb.org>
19032
19033 * Make-lang.in: Delete refs to LIBGCC2_DEPS.
19034
19035 2000-02-25 Jim Wilson <wilson@cygnus.com>
19036
19037 * optimize.c (expand_call_inline): Emit the return label before
19038 evaluating the return value.
19039
19040 2000-02-24 Mark Mitchell <mark@codesourcery.com>
19041
19042 * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
19043 than duplicating functionality here.
19044 * optimize.c: Include input.h.
19045 (expand_call_inline): Use push_srcloc and pop_srcloc.
19046 * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
19047 * parse.c: Regenerated.
19048 * Makefile.in (lex.o): Depend on input.h.
19049 (optimize.o): Likewise.
19050
19051 2000-02-24 Nathan Sidwell <nathan@codesourcery.com>
19052
19053 * decl.c (grokdeclarator): Diagnose qualifiers on non-member
19054 function type, rather than ICE.
19055
19056 2000-02-23 Jason Merrill <jason@casey.cygnus.com>
19057
19058 * decl.c (grokdeclarator): Call decl_type_access_control.
19059 * parse.y (parse_end_decl): Don't call decl_type_access_control if
19060 decl is null.
19061
19062 2000-02-23 Nathan Sidwell <nathan@codesourcery.com>
19063
19064 * decl.c (decls_match): Remove obsolete static member nadgering.
19065
19066 2000-02-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
19067
19068 * decl.c (grokdeclarator): Change ANSI to ISO.
19069 * lex.c (consume_string, readescape, do_identifier): Likewise.
19070 (parse_float, real_yylex): Likewise.
19071 * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
19072 (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
19073 new_type_id, maybe_label_decls, simple_stmt,
19074 for.init.statement): Likewise.
19075 * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
19076 * semantics.c (finish_named_return_value): Likewise.
19077 * parse.c: Regenerate.
19078
19079 2000-02-21 Mark Mitchell <mark@codesourcery.com>
19080
19081 * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
19082 (CPTI_CLASS_STAR_TYPE): Remove.
19083 (vtable_index_type): Likewise.
19084 (class_star_type_node): Remove.
19085 (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
19086 (build_binary_op_nodefault): Remove.
19087 * call.c (build_new_op): Use build_binary_op instead of
19088 build_binary_op_nodefault.
19089 * decl.c (init_decl_processing): Remove class_star_type_node
19090 initialization. Make delta_type_node ptrdiff_type_node under the
19091 new ABI. Initialize vtable_index_type.
19092 (build_ptrmemfunc_type): Build different structures for the new
19093 ABI.
19094 (build_enumerator): Use build_binary_op instead of
19095 build_binary_op_nodefault.
19096 * method.c (build_overload_value): Mangle pointers-to-members
19097 appropriately under the new ABI.
19098 * typeck.c (build_array_ref): Use build_binary_op instead of
19099 build_binary_op_nodefault.
19100 (get_member_function_from_ptrfunc): Adjust for the new ABI.
19101 (build_binary_op_nodefault): Rename to ...
19102 (build_binary_op): ... this. Remove old version. Adjust for
19103 pointer-to-member comparisons under the new ABI.
19104 (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI.
19105 (build_ptrmemfunc): Adjust for the new ABI.
19106 (expand_ptrmemfunc_cst): Likewise.
19107 (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
19108 (pfn_from_ptrmemfunc): Adjust for the new ABI.
19109
19110 2000-02-21 Gabriel Dos Reis <gdr@codesourcery.com>
19111
19112 * call.c (build_object_call): Compress consecutive calls to
19113 cp_error.
19114 (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
19115 (build_op_delete_call): Adjust message formatting.
19116
19117 * class.c (check_bases): Compress consecutive calls to
19118 cp_pedwarn.
19119 (finish_struct_anon): Say 'ISO C++'.
19120
19121 * decl.c (start_decl): Same here.
19122 (grok_reference_init): Likewise.
19123 (grokfndecl): Correct message formatting.
19124 (grokfndecl): Improve diagnostic.
19125 (check_static_variable_definition): Likewise. Say 'ISO C++'
19126 (compute_array_index_type): Say 'ISO C++'
19127 (create_array_type_for_decl): Compress consecutive calls to
19128 cp_error.
19129 (grokdeclarator): Say 'ISO C++'
19130 (grok_op_properties): Likewise.
19131
19132 * decl2.c (delete_sanity): Clairify diagnostic.
19133 (check_member_template): Same here.
19134 (grok_function_init): Use consistent terminology.
19135
19136 * expr.c (do_case): Say 'ISO C++'
19137
19138 * friend.c (do_friend): Compress consecutive calls to warning.
19139
19140 2000-02-20 Mark Mitchell <mark@codesourcery.com>
19141
19142 * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
19143 * class.c (build_secondary_vtable): Reorganize. Don't create a
19144 new vtable under the new ABI.
19145 (layout_vtable_decl): Don't add num_extra_vtbl_entries when
19146 computing the size.
19147 (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
19148 the initializing elements.
19149 (initialize_vtable): New function.
19150 (dfs_finish_vtbls): Use it.
19151 (dfs_accumulate_vtbl_inits): New function.
19152 (finish_vtbls): Merge primary and secondary vtables under the new
19153 ABI.
19154 (finish_struct_1): Remove redundant call to layout_vtable_decl.
19155 * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
19156 aren't VAR_DECLs.
19157
19158 * class.c (build_vtable): New function, split out from ...
19159 (get_vtable_decl): ... here, and ...
19160 (build_secondary_vtable): ... here.
19161
19162 * pt.c (tsubst_decl): Fix formatting.
19163
19164 2000-02-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19165
19166 * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
19167 (avoid_overlap, build_base_field): Likewise.
19168 (build_base_field, build_base_fields, is_empty_class):
19169 Test DECL_SIZE with integer_zero.
19170 (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
19171 * cp-tree.h (struct lang_type): New field size_unit.
19172 (CLASSTYPE_SIZE_UNIT): New macro.
19173 * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
19174 (cp_finish_decl): Delete -Wlarger-than processing.
19175 * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
19176 * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
19177 * tree.c (make_binfo): binfo vector is one entry longer.
19178 (walk_tree): Walk DECL_SIZE_UNIT.
19179
19180 2000-02-19 Mark Mitchell <mark@codesourcery.com>
19181
19182 * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
19183 comment.
19184 (build_vtable_entry): Don't assume all vtable entries are
19185 functions.
19186 (build_vtbl_initializer): Adjust accordingly.
19187 (get_vtable_decl): Fix formatting.
19188
19189 2000-02-18 Jason Merrill <jason@casey.cygnus.com>
19190
19191 * semantics.c (deferred_type_access_control): Walk the entire
19192 type_lookups list.
19193 (save_type_access_control): Rename from
19194 initial_deferred_type_access_control. Just remember the value.
19195 (decl_type_access_control): New fn.
19196 (begin_function_definition): Use deferred_type_access_control, after
19197 we've started the function. Set type_lookups to error_mark_node.
19198 * parse.y (frob_specs, fn.def1): Adjust.
19199 (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
19200 (parse_end_decl, parse_bitfield0, parse_method): New fns.
19201 (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
19202 (after_type_component_declarator0): Likewise.
19203 (after_type_component_declarator): Likewise.
19204 (notype_component_declarator): Likewise.
19205 * cp-tree.h: Adjust.
19206
19207 * decl.c (redeclaration_error_message): Allow redeclaration of
19208 namespace-scope decls.
19209
19210 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
19211
19212 * typeck2.c (my_friendly_abort): Use GCCBUGURL.
19213
19214 2000-02-17 Mark Mitchell <mark@codesourcery.com>
19215
19216 * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
19217 * decl2.c (grokclassfn): Likewise.
19218
19219 * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
19220
19221 * decl2.c (lang_decode_option): Don't set default message length
19222 here.
19223 * lex.c (lang_init_options): Set it here.
19224
19225 2000-02-16 Mark Mitchell <mark@codesourcery.com>
19226
19227 Make DECL_CONTEXT mean the class in which a member function was
19228 declared, even for a virtual function.
19229 * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
19230 (DECL_FRIEND_CONTEXT): New macro.
19231 (DECL_REAL_CONTEXT): Remove.
19232 (SET_DECL_FRIEND_CONTEXT): Likewise.
19233 (DECL_VIRTUAL_CONTEXT): Adjust.
19234 (DECL_CLASS_SCOPE_P): Use TYPE_P.
19235 (add_friends): Remove.
19236 (hack_decl_function_context): Likewise.
19237 * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
19238 CP_DECL_CONTEXT.
19239 (build_over_call): Fix indentation. Use DECL_CONTEXT
19240 instead of DECL_CLASS_CONTEXT.
19241 * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
19242 (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
19243 (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
19244 (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
19245 (build_base_field): Likewise.
19246 (finish_struct_1): Likewise.
19247 (build_self_reference): Likewise.
19248 * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
19249 DECL_REAL_CONTEXT.
19250 (pushtag): Use decl_function_context, not
19251 hack_decl_function_context.
19252 (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
19253 (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
19254 (pushdecl): Remove bogus code.
19255 (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
19256 (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
19257 (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
19258 Use decl_function_context, nothack_decl_function_context.
19259 (grokvardecl): Don't set DECL_CLASS_CONTEXT.
19260 (grokdeclarator): Likewise. Use decl_function_context, not
19261 hack_decl_function_context.
19262 (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT.
19263 (start_function): Use DECL_FRIEND_CONTEXT, not
19264 DECL_CLASS_CONTEXT. Use decl_function_context, not
19265 hack_decl_function_context.
19266 (finish_function): Use decl_function_context, not
19267 hack_decl_function_context.
19268 (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
19269 DECL_CLASS_CONTEXT.
19270 (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
19271 (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
19272 (grokfield): Likewise.
19273 (finish_builtin_type): Likewise.
19274 (finish_vtable_vardec): Use decl_function_context, not
19275 hack_decl_function_context.
19276 (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
19277 (start_static_initialization_or_destruction): Likewise.
19278 (finish_static_initialization_or_destruction): Likewise.
19279 (mark_used): Adjust logic for deciding when to synthesize methods.
19280 * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
19281 DECL_REAL_CONTEXT.
19282 * error.c (dump_function_decl): Use DECL_CONTEXT, not
19283 DECL_CLASS_CONTEXT.
19284 * friend.c (is_friend): Likewise.
19285 (add_friends): Remove.
19286 (do_friend): Use SET_DECL_FRIEND_CONTEXT.
19287 * lex.c (begin_definition_of_inclass_inline): Use
19288 decl_function_context, not hack_decl_function_context.
19289 (process_next_inline): Likewise.
19290 (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
19291 * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
19292 DECL_CLASSS_CONTEXT.
19293 (hack_identifier): Likewise.
19294 (synthesize_method): Use decl_function_context, not
19295 hack_decl_function_context.
19296 * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
19297 DECL_REAL_CONTEXT.
19298 (is_member_template): Use decl_function_context, not
19299 hack_decl_function_context. Use DECL_CONTEXT, not
19300 DECL_CLASS_CONTEXT.
19301 (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
19302 DECL_CLASS_CONTEXT.
19303 (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
19304 DECL_REAL_CONTEXT.
19305 (push_template_decl_real): Likewise.
19306 (instantiate_class_template): Don't call add_friends.
19307 (tsubst_default_argument): Use DECL_CONTEXT, not
19308 DECL_REAL_CONTEXT.
19309 (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
19310 Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
19311 (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
19312 DECL_CLASS_CONTEXT.
19313 * repo.c (repo_inline_used): Likewise.
19314 * search.c (current_scope): Adjust for new _CONTEXT macros.
19315 (context_for_name_lookup): Use CP_DECL_CONTEXT, not
19316 DECL_REAL_CONTEXT.
19317 (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
19318 (lookup_fnfields_here):Likewise.
19319 (check_final_overrider): Likewise.
19320 (init_vbase_pointers): Likewise.
19321 (virtual_context): Likewise.
19322 * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
19323 (expand_body): Use decl_function_context, not
19324 hack_decl_function_context.
19325 * tree.c (hack_decl_function_context): Remove.
19326 * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
19327 DECL_CLASS_CONTEXT.
19328 * typeck2.c (error_not_base_type): Likewise.
19329
19330 2000-02-15 Jason Merrill <jason@casey.cygnus.com>
19331
19332 * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
19333
19334 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19335
19336 * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
19337
19338 2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
19339
19340 * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
19341
19342 2000-01-16 Gabriel Dos Reis <gdr@codesourcery.com>
19343
19344 * decl2.c (lang_decode_option): Enable automatic line wrapping.
19345
19346 2000-02-13 Jason Merrill <jason@casey.cygnus.com>
19347
19348 * parse.y (frob_specs): Split out...
19349 (parse_decl): From here.
19350 (fn.def2): Call initial_deferred_type_access_control.
19351 (after_type_component_declarator0): Call frob_specs.
19352 (notype_component_declarator0): Likewise.
19353 * search.c (friend_accessible_p): Nested classes are friends of their
19354 enclosing classes.
19355
19356 2000-02-10 Mark Mitchell <mark@codesourcery.com>
19357
19358 * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
19359 used to create an implicit temporary.
19360
19361 * class.c (dfs_modify_vtables): Tweak calculation of functions to
19362 override.
19363
19364 2000-02-08 Nathan Sidwell <nathan@acm.org>
19365
19366 * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
19367 strip array element qualifiers too.
19368
19369 2000-02-07 Mark Mitchell <mark@codesourcery.com>
19370
19371 * decl.c (store_parm_decls): Don't build cleanups for parameters
19372 while processing_template_decl.
19373
19374 2000-02-07 Jason Merrill <jason@casey.cygnus.com>
19375
19376 * cp-tree.h (struct saved_scope): Add incomplete field.
19377 (namespace_scope_incomplete): New macro.
19378 * decl.c (pushdecl): Use it.
19379 (hack_incomplete_structures): Use it. See through artificial
19380 binding levels.
19381 (mark_saved_scope): Mark it.
19382
19383 Implement access control for nested types.
19384 * search.c (type_access_control): New fn.
19385 (accessible_p): Now we do perform access control for types.
19386 * semantics.c (deferred_type_access_control): New fn.
19387 (initial_deferred_type_access_control): New fn.
19388 (begin_function_definition): Call it. Add lookups parm.
19389 * decl.c (struct binding_level): Add this_class field.
19390 (pushlevel_class): Set it.
19391 (mark_binding_level): Mark it.
19392 (lookup_name_real): Use it. Call type_access_control.
19393 (mark_saved_scope): Mark lookups field.
19394 * cp-tree.h (flagged_type_tree): Add lookups field.
19395 (struct saved_scope): Add lookups field.
19396 (type_lookups): New macro.
19397 * parse.y (declmods): Now <ftype>.
19398 (parse_decl): Add lookups parm. Call
19399 initial_deferred_type_access_control.
19400 (lang_extdef): Clear type_lookups.
19401 (typed_declspecs, declmods, typespec): Set lookups field.
19402 (initdcl): Call deferred_type_access_control.
19403 (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
19404 component_decl_1, named_parm): Adjust.
19405 * friend.c (is_friend): Nested classes are friends of their
19406 enclosing classes.
19407
19408 * class.c (currently_open_derived_class): New fn.
19409 * method.c (hack_identifier): Use it.
19410
19411 * lex.c (do_identifier): Remove obsolete code.
19412
19413 * parse.y (typed_typespecs): Propagate new_type_flag properly.
19414
19415 2000-02-05 Zack Weinberg <zack@wolery.cumb.org>
19416
19417 * tinfo.h: Remove apostrophes from C++ comment (xgettext
19418 thinks this file is plain C).
19419
19420 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19421
19422 * Makefile.in (call.o): Depend on $(EXPR_H).
19423
19424 * call.c: Include "expr.h".
19425
19426 * class.c (dump_class_hierarchy): Add prototype.
19427
19428 * search.c (dfs_get_pure_virtuals): Likewise.
19429
19430 2000-02-1 Ulrich Drepper <drepper@redhat.com>
19431
19432 * parse.y (simple_stmt): Allow :: token in asm parameter list.
19433 * parse.c: Rebuilt.
19434
19435 2000-01-31 Jim Wilson <wilson@cygnus.com>
19436
19437 * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
19438 Store it in DECL_FCONTEXT.
19439 (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
19440
19441 2000-01-31 Jason Merrill <jason@casey.cygnus.com>
19442
19443 * tinfo.h (old abi): #include "tconfig.h".
19444 * tinfo.cc (convert_to_base): Move into old abi section.
19445
19446 2000-01-31 Mark Mitchell <mark@codesourcery.com>
19447
19448 * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
19449 (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
19450 (BINFO_PRIMARY_BINFO): New macro.
19451 (BF_DELTA): Rename to ...
19452 (BV_DELTA): ... this.
19453 (BF_VCALL_INDEX): Rename to ...
19454 (BV_VCALL_INDEX): ... this.
19455 (BF_FN): Rename to ...
19456 (BV_FN): ... this.
19457 * class.c (build_vbase_path): Adjust for changes to reverse_path.
19458 (set_rtti_entry): Rename BF_ macros to BV_ variants.
19459 (modify_vtable_entry): Simplify.
19460 (add_virtual_function): Rename BF_ macros to BV_ variants.
19461 (build_vtable_initializer): Likewise.
19462 (get_class_offset_1): Remove.
19463 (dfs_get_class_offset): Likewise.
19464 (get_class_offset): Likewise.
19465 (dfs_find_final_overrider): New function.
19466 (find_final_overrider): Likewise.
19467 (modify_one_vtable): Remove.
19468 (dfs_find_base): New function.
19469 (dfs_modify_vtables): Fold modify_one_vtable in here. Use
19470 find_final_overrider.
19471 (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new
19472 virtuals.
19473 (dfs_fixup_vtable_deltas): Remove.
19474 (override_one_vtable): Remove.
19475 (merge_overrides): Likewise.
19476 (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
19477 unreal chilren of virtual bases.
19478 (finish_struct_1): Don't use merge_overrides. Don't use
19479 dfs_fixup_vtable_deltas.
19480 * tree.c (reverse_path): Return a TREE_LIST, not a chain of
19481 BINFOs.
19482
19483 2000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
19484 Jason Merrill <jason@yorick.cygnus.com>
19485
19486 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
19487
19488 2000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at>
19489
19490 * exception.cc (__throw_bad_typeid): Add missing std::.
19491
19492 2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19493
19494 * cp-tree.h (make_thunk): PROTO -> PARAMS.
19495
19496 2000-01-31 Nathan Sidwell <sidwell@codesourcery.com>
19497
19498 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
19499
19500 Runtime support for new-abi rtti.
19501 * inc/typeinfo (type_info::operator!=): Define in class.
19502 (type_info::before, type_info::name, type_info::operator==,
19503 type_info::operator!=): Define new ABI implementations.
19504 (type_info::is_pointer_p, type_info::is_function_p): Declare
19505 new virtual functions.
19506 (type_info::do_catch, type_info::do_upcast): Likewise.
19507
19508 * tinfo.h (__base_class_info): Define new class.
19509 (__class_type_info): Likewise.
19510 (__si_class_type_info): Likewise.
19511 (__vmi_class_type_info): Likewise.
19512 (__dynamic_cast): Prototype.
19513
19514 * tinfo.cc: Conditionalize old and new rtti mechanisms.
19515 (type_info::is_pointer_p): Define new function.
19516 (type_info::is_function_p): Likewise.
19517 (type_info::do_catch): Likewise.
19518 (type_info::do_upcast): Likewise.
19519 (vtable_prefix): New structure for vtable access.
19520 (adjust_pointer): Define new template function.
19521 (contained_p, public_p, virtual_p, contained_public_p,
19522 contained_nonpublic_p, contained_nonvirtual_p): Define new
19523 functions.
19524 (nonvirtual_base_type): New local variable.
19525 (__class_type_info::~__class_type_info): Define.
19526 (__si_class_type_info::~__si_class_type_info): Likewise.
19527 (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
19528 (__class_type_info::do_catch): Define new function.
19529 (__class_type_info::do_upcast): Likewise.
19530 (__class_type_info::find_public_src): Likewise.
19531 (__class_type_info::do_find_public_src): Likewise.
19532 (__si_class_type_info::do_find_public_src): Likewise.
19533 (__vmi_class_type_info::do_find_public_src): Likewise.
19534 (__class_type_info::do_dyncast): Likewise.
19535 (__si_class_type_info::do_dyncast): Likewise.
19536 (__vmi_class_type_info::do_dyncast): Likewise.
19537 (__class_type_info::do_upcast): Likewise.
19538 (__si_class_type_info::do_upcast): Likewise.
19539 (__vmi_class_type_info::do_upcast): Likewise.
19540 (__dynamic_cast): Likewise.
19541
19542 * tinfo2.cc (__fundamental_type_info): Define new class.
19543 (__pointer_type_info): Likewise.
19544 (__reference_type_info): Likewise.
19545 (__array_type_info): Likewise.
19546 (__function_type_info): Likewise.
19547 (__enum_type_info): Likewise.
19548 (__ptr_to_member_type_info): Likewise.
19549 (__fundamental_type_info::~__fundamental_type_info): Define.
19550 (__pointer_type_info::~__pointer_type_info): Likewise.
19551 (__reference_type_info::~__reference_type_info): Likewise.
19552 (__array_type_info::~__array_type_info): Likewise.
19553 (__function_type_info::~__function_type_info): Likewise.
19554 (__enum_type_info::~__enum_type_info): Likewise.
19555 (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
19556 (__pointer_type_info::do_catch): Define new function.
19557 (__ptr_to_member_type_info::do_catch): Define new function.
19558
19559 (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
19560 (__is_pointer): Likewise.
19561
19562 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
19563
19564 2000-01-30 Mark Mitchell <mark@codesourcery.com>
19565
19566 * cp/class.c (build_vtable): Rename to build_primary_vtable.
19567 (prepare_fresh_vtable): Rename to build_secondary_vtable.
19568 (make_new_vtable): New function.
19569 (modify_vtable_entry): Handle generation of new vtables correctly.
19570 (modify_one_vtable): Remove unused parameter.
19571 (dfs_fixup_vtable_deltas): Likewise.
19572 (override_one_vtable): Use build_secondary_vtable.
19573 (finish_struct_1): Use build_primary_vtable and
19574 build_secondary_vtable.
19575
19576 2000-01-28 Ulrich Drepper <drepper@redhat.com>
19577
19578 * cp/decl.c: Adjust variable names, comments, help strings.
19579
19580 2000-01-29 Nathan Sidwell <nathan@acm.org>
19581
19582 * new2.cc (operator delete[]): Use operator delete, don't assume
19583 implementation.
19584
19585 2000-01-29 Nathan Sidwell <sidwell@codesourcery.com>
19586
19587 * class.c (build_vtbl_initializer): Add argument to
19588 build_vtable_entry call.
19589
19590 2000-01-27 Mark Mitchell <mark@codesourcery.com>
19591
19592 * cp-tree.def (THUNK_DECL): Discuss vcall indices.
19593 * cp-tree.h (BINFO_VIRTUALS): Update documentation.
19594 (BF_DELTA): New macro.
19595 (BF_VCALL_INDEX): Likewise.
19596 (BF_FN): Likewise.
19597 (THUNK_VCALL_OFFSET): Likewise.
19598 (make_thunk): Change prototype.
19599 * class.c (build_vtable_entry): Integrate
19600 build_vtable_entry_for_fn. Handle vcall indices.
19601 (build_vtable_entry_for_fn): Remove.
19602 (set_rtti_entry): Handle vcall indices. Use BF_DELTA,
19603 BF_VCALL_INDEX, BF_FN.
19604 (modify_vtable_entry): Integrate common code from
19605 modify_one_vtable and dfs_fixup_vtable_deltas.
19606 (add_virtual_function): Set BF_VCALL_INDEX.
19607 (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX,
19608 and BF_FN.
19609 (modify_one_vtable): Simplify.
19610 (dfs_fixup_vtable_deltas): Likewise.
19611 (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
19612 * method.c (make_thunk): Handle vcall indices.
19613
19614 2000-01-28 Nathan Sidwell <sidwell@codesourcery.com>
19615
19616 Compiler side new abi rtti (not enabled).
19617 * cp-tree.h (new_abi_rtti_p): New macro.
19618 (emit_support_tinfos): Prototype new function.
19619 (tinfo_decl_p): Likewise.
19620 (emit_tinfo_decl): Likwise.
19621 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
19622 macros.
19623 (doing_runtime): New local static.
19624 (init_rtti_processing): Add new-abi initializer.
19625 (get_tinfo_decl): Add new-abi logic.
19626 (tinfo_from_decl): Likewise.
19627 (build_dynamic_cast_1): Likewise.
19628 (qualifier_flags): New static function.
19629 (tinfo_base_init): Likewise.
19630 (generic_initializer): Likewise.
19631 (ptr_ref_initializer): Likewise.
19632 (ptmd_initializer): Likewise.
19633 (class_hint_flags): Likewise.
19634 (class_initializer): Likewise.
19635 (synthesize_tinfo_var): Likewise.
19636 (create_real_tinfo_var): Likewise.
19637 (create_pseudo_type_info): Likewise.
19638 (get_vmi_pseudo_type_info): Likewise.
19639 (create_tinfo_types): Likewise.
19640 (emit_support_tinfos): New global function.
19641 (tinfo_decl_p): New global predicate.
19642 (emit_tinfo_decl): New global function.
19643 * class.c (set_rtti_entry): Generalize for old and new rtti.
19644 (build_vtbl_initializer): Likewise.
19645 * decl2.c (finish_file): Likewise.
19646
19647 2000-01-27 Jim Wilson <wilson@cygnus.com>
19648
19649 * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
19650 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
19651
19652 2000-01-27 Mike Stump <mrs@wrs.com>
19653
19654 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
19655 for scopes.
19656
19657 2000-01-26 Jason Merrill <jason@casey.cygnus.com>
19658
19659 * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
19660
19661 2000-01-26 J"orn Rennecke <amylaar@cygnus.co.uk>
19662
19663 * optimize.c (calls_setjmp_r): Supply new argument
19664 to special_function_p.
19665
19666 2000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19667
19668 * call.c: PROTO -> PARAMS.
19669 * class.c: Likewise.
19670 * cp-tree.h: Likewise.
19671 * cvt.c: Likewise.
19672 * decl.c: Likewise.
19673 * decl.h: Likewise.
19674 * decl2.c: Likewise.
19675 * dump.c: Likewise.
19676 * errfn.c: Likewise.
19677 * error.c: Likewise.
19678 * except.c: Likewise.
19679 * expr.c: Likewise.
19680 * init.c: Likewise.
19681 * input.c: Likewise.
19682 * lex.c: Likewise.
19683 * lex.h: Likewise.
19684 * method.c: Likewise.
19685 * optimize.c: Likewise.
19686 * parse.y: Likewise.
19687 * pt.c: Likewise.
19688 * repo.c: Likewise.
19689 * rtti.c: Likewise.
19690 * search.c: Likewise.
19691 * semantics.c: Likewise.
19692 * spew.c: Likewise.
19693 * tree.c: Likewise.
19694 * typeck.c: Likewise.
19695 * typeck2.c: Likewise.
19696 * xref.c: Likewise.
19697
19698 2000-01-25 Richard Henderson <rth@cygnus.com>
19699
19700 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
19701
19702 2000-01-25 Mark Mitchell <mark@codesourcery.com>
19703
19704 * cp-tree.h (vcall_offset_in_vtable_p): New macro.
19705 * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
19706 (struct vcall_offset_data_s): New type.
19707 (dfs_vcall_offset_queue_p): New function.
19708 (dfs_build_vcall_offset_vtbl_entries): Likewise.
19709 (build_vcall_offset_vtbl_entries): Likewise.
19710 (layout_vtable_decl): Likewise.
19711 (num_vfun_entries): Likewise.
19712 (num_extra_vtbl_entries): Add the entries for vcall offsets.
19713 (build_vtbl_initializer): Likewise.
19714 (dfs_finish_vtabls): Use layout_vtable_decl.
19715 (modify_one_vtables): Always duplicate vtables under the new ABI.
19716 (finish_struct_1): Use layout_vtable_decl.
19717
19718 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19719
19720 * decl.c (member_function_or_else): Change third arg from a format
19721 specifier to an `enum overload_flags'. Callers changed.
19722
19723 2000-01-25 Gabriel Dos Reis <gdr@codesourcery.com>
19724
19725 * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
19726 build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
19727 build_const_cast, get_delta_difference, check_return_expr): Avoid
19728 ANSI string concatenation usage.
19729
19730 2000-01-24 Mark Mitchell <mark@codesourcery.com>
19731
19732 * class.c (layout_class_type): Put the fields required to make a
19733 class non-empty at the end, not the beginning, of the TYPE_FIELDs
19734 list.
19735
19736 2000-01-24 Jason Merrill <jason@casey.cygnus.com>
19737
19738 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
19739 template.
19740
19741 * decl2.c (mark_used): Do instantiate inlines that have been
19742 explicitly instantiated.
19743
19744 2000-01-24 Richard Henderson <rth@cygnus.com>
19745
19746 * call.c (build_over_call): Use expand_tree_builtin.
19747 * typeck.c (build_function_call_real): Likewise.
19748 (build_binary_op_nodefault): Handle unordered compares.
19749
19750 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
19751
19752 * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
19753 cp_tree_index values.
19754 (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
19755 New global node #defines for them.
19756 * rtti.c (call_void_fn): Replace with ...
19757 (build_runtime_decl): ... new static function.
19758 (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
19759 (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
19760 (build_dynamic_cast_1): Always produce correctly typed result.
19761 Explicitly produce type_info addresses. Use dynamic_cast_node.
19762 * exception.cc (__throw_bad_cast): Return `void *'.
19763 (__throw_bad_typeid): Return `const type_info &'.
19764
19765 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
19766
19767 * cp-tree.h (get_vtable_decl): Prototype new function.
19768 * class.c (get_vtable_decl): New function. Broken out from ...
19769 (build_vtable): ... here. Use it.
19770 * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
19771 by get_vtable_decl.
19772
19773 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
19774
19775 * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
19776 CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
19777 CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
19778 (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
19779 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
19780 CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
19781 (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
19782 (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
19783 (CPTI_TINFO_VAR_ID): New enumeration.
19784 (__tp_desc_type_node, __access_mode_type_node,
19785 __bltn_desc_type_node, __user_desc_type_node,
19786 __class_desc_type_node, __ptr_desc_type_node,
19787 __attr_desc_type_node, __func_desc_type_node,
19788 __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
19789 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
19790 ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
19791 enum_desc_type_node, class_desc_type_node,
19792 si_class_desc_type_node, vmi_class_desc_type_node,
19793 ptmd_desc_type_node, base_desc_type_node): New #defines.
19794 (tinfo_fn_id, tinfo_fn_type): Rename to ...
19795 (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
19796 (tinfo_var_id): New enumeration.
19797 (DECL_TINFO_FN_P): Augment comment.
19798 * decl.c (cp_global_trees): Adjust documentation.
19799 * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
19800 tinfo_decl_type and tinfo_var_id.
19801 (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
19802 (build_typeid): Remove unused variable.
19803 (get_tinfo_var): Use tinfo_var_id.
19804 (tinfo_name): New static function.
19805 (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
19806 (tinfo_from_decl): Likewise.
19807 (get_base_offset): New static function, broken out of
19808 expand_class_desc.
19809 (expand_si_desc): Use tinfo_name.
19810 (expand_class_desc): Likewise. Lose local static variable.
19811 Use base_desc_type_node. Use get_base_offset.
19812 (expand_ptr_desc): Use tinfo_name.
19813 (expand_attr_desc): Likewise.
19814 (expand_generic_desc): Likewise.
19815
19816 * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
19817 * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
19818
19819 2000-01-23 Mark Mitchell <mark@codesourcery.com>
19820
19821 * cp-tree.h (__eprintf): Remove declaration.
19822 * tree.c (__eprintf): Remove definition.
19823
19824 2000-01-23 Zack Weinberg <zack@rabi.columbia.edu>
19825 Mark Mitchell <mark@codesourcery.com>
19826
19827 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
19828 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
19829
19830 2000-01-23 Brad Lucier <lucier@math.purdue.edu>
19831
19832 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
19833
19834 2000-01-23 Mark Mitchell <mark@codesourcery.com>
19835
19836 * cp-tree.h (register_dtor_fn): New function.
19837 * decl.c (destroy_local_static): Rename to ...
19838 (register_dtor_fn): ... this. Give it external linkage.
19839 (expand_static_init): Use it.
19840 * decl2.c (do_static_initialization): Likewise, if using
19841 __cxa_atexit.
19842 (do_static_destruction): Check that __cxa_atexit is not in use.
19843 (finish_file): Don't call do_static_destruction if using
19844 __cxa_atexit.
19845
19846 * typeck.c (convert_arguments): Restore two-message error
19847 reporting.
19848
19849 2000-01-20 Nathan Sidwell <sidwell@codesourcery.com>
19850
19851 Remap dynamic cast hint values to be consistent across ABIs.
19852 * search.c (dynamic_cast_base_recurse): Remap generated value.
19853 (get_dynamic_cast_base_type): Adjust documentation.
19854 * tinfo.h (__user_type_info::dyncast): Likewise.
19855 (__user_type_info::find_public_subobj): Remap BOFF meaning.
19856 * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
19857 (__class_type_info::do_dyncast): Likewise.
19858 (__class_type_info::do_find_public_subobj): Likewise.
19859 * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
19860
19861 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
19862
19863 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
19864
19865 * typeck2.c (incomplete_type_error): Restore previous
19866 cp_error and cp_error_at call sequence.
19867
19868 2000-01-20 Brad Lucier <lucier@math.purdue.edu>
19869
19870 * class.c (dump_class_hierarchy): Make format agree with argument;
19871 cast pointer to unsigned long and print with %lx.
19872
19873 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
19874
19875 * decl2.c (lang_decode_option): Set default line-wrap length to 72.
19876
19877 * typeck.c (composite_pointer_type, common_type,
19878 comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
19879 build_function_call_real, convert_arguments,
19880 build_binary_op_nodefault, pointer_int_sum, pointer_diff,
19881 build_unary_op, mark_addressable, build_compound_expr,
19882 build_static_cast, build_reinterpret_cast, build_const_cast,
19883 build_c_cast, build_modify_expr, get_delta_difference,
19884 build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
19885 'ISO C++'. Fusion consecutive calls to diagnostic message routines
19886 into a single one.
19887 * typeck2.c (readonly_error, abstract_virtuals_error,
19888 process_init_constructor, check_for_new_type): Likewise.
19889
19890 2000-01-19 Mark Mitchell <mark@codesourcery.com>
19891
19892 * tree.c (bot_manip): Set DECL_CONTEXT for newly created
19893 VAR_DECLs.
19894
19895 2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
19896
19897 * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
19898 (build_x_typeid): Likewise.
19899 (get_tinfo_fn): Likewise.
19900 (get_tinfo_fn_unused): Rename to ...
19901 (get_tinfo_decl): ... here.
19902 * rtti.c (build_headof): Replace logic error with assertion.
19903 (get_tinfo_fn_dynamic): Rename to ...
19904 (get_tinfo_decl_dynamic): ... here. Make static. Use
19905 complete_type_or_else.
19906 (build_x_typeid): Move into ...
19907 (build_typeid): ... here. Adjust call to
19908 get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
19909 throw_bad_typeid expression.
19910 (get_tinfo_fn_unused): Rename to ...
19911 (get_tinfo_decl): ... here. Adjust comment.
19912 (get_tinfo_fn): Delete.
19913 (tinfo_from_decl): New static function.
19914 (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
19915 (get_typeid): Use complete_type_or_else.
19916 (build_dynamic_cast_1): Adjust calls to
19917 get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
19918 * parse.y (primary): Adjust call to build_typeid.
19919 * except.c (build_eh_type_type_ref): Adjust call to
19920 get_tinfo_decl. Mark as used.
19921 * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
19922 * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
19923 * parse.c: Regenerated.
19924
19925 2000-01-17 Mark Mitchell <mark@codesourcery.com>
19926
19927 * class.c (fixed_type_or_null): Don't clear NONNULL. Document
19928 calling convention.
19929 (resolves_to_fixed_type_p): Document calling convention.
19930 * rtti.c (build_x_typeid): Initialize NONNULL.
19931
19932 * cp-tree.h (build_shared_int_cst): New function.
19933 * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
19934 * class.c (modify_vtable_entry): Likewise.
19935 (add_virtual_function): Split out code to generated shared
19936 INTEGER_CSTs to build_share_int_cst.
19937 (modify_all_vtables): Handle all the overridden functions here.
19938 Add overridden functions from non-primary virtual bases to the
19939 primary vtable.
19940 (finish_struct_1): Adjust call to modify_all_vtables. Add
19941 overridden functions from non-primary bases to the vtable.
19942 * tree.c (build_shared_int_cst): New function.
19943
19944 * cp-tree.h (scratchalloc): Remove.
19945 (build_scratch_list): Likewise.
19946 * call.c (convert_class_to_reference): Replace build_scratch_list
19947 and build_expr_list with build_tree_list.
19948 (add_candidate): Replace scratchalloc with expralloc. Note memory
19949 leak.
19950 (build_user_type_conversion_1): Replace build_scratch_list
19951 and build_expr_list with build_tree_list.
19952 (build_new_op): Likewise.
19953 (build_op_delete_call): Likewise.
19954 (convert_like): Likewise.
19955 * cvt.c (ocp_convert): Likewise.
19956 * decl.c (start_decl): Likewise.
19957 (start_function): Likewise.
19958 (finish_destructor_body): Likewise.
19959 (maybe_build_cleanup_1): Likewise.
19960 * decl2.c (reparse_decl_as_expr): Likewise.
19961 * init.c (perform_member_init): Likewise.
19962 (expand_cleanup_for_base): Likewise.
19963 (build_builtin_delete_call): Likewise.
19964 (build_new_1): Likewise.
19965 (build_delete): Likewise.
19966 * method.c (do_build_assign_ref): Likewise.
19967 * parse.y (already_scoped_stmt): Likewise.
19968 (nontrivial_exprlist): Likewise.
19969 (net_initializer): Likewise.
19970 (initlist): Likewise.
19971 * parse.c: Regenerated.
19972 * rtti.c (build_x_typeid): Likewise.
19973 (build_dynamic_cast_1): Likewise.
19974 * typeck.c (build_x_compound_expr): Likewise.
19975 (build_static_cast): Likewise.
19976 (build_modify_expr): Likewise.
19977
19978 * cp-tree.h (DECL_VINDEX): Add documentation.
19979 * class.c (build_vtable_entry): Likewise.
19980 (start_vtable): Add comment.
19981 (add_virtual_function): Replace pending_hard_virtuals with
19982 overridden_virtuals and pending_virtuals with new_virtuals.
19983 Replace redundant assignments with assertions.
19984 (check_for_override): Add comment.
19985 (check_bases_and_members): Replace pending_hard_virtuals with
19986 overridden_virtuals and pending_virtuals with new_virtuals.
19987 (create_vtbl_ptr): Likewise.
19988 (layout_class_type): Likewise.
19989 (finish_struct_1): Likewise. Add comments.
19990
19991 2000-01-16 Mark Mitchell <mark@codesourcery.com>
19992
19993 * class.c (finish_struct_1): Replace redundant code with
19994 assertions.
19995
19996 * cp-tree.h (flag_new_abi): Move.
19997 (flag_use_cxa_atexit): Likewise.
19998 (flag_honor_std): Likewise.
19999 (flag_rtti): Likewise.
20000 (vbase_offsets_in_vtable_p): Define.
20001 (vptrs_present_everywhere_p): Likewise.
20002 (TYPE_CONTAINS_VPTR_P): Likewise.
20003 (dfs_walk_real): Declare.
20004 * class.c (build_vbase_pointer_fields): Check
20005 vbase_offsets_in_vtable_p.
20006 (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
20007 BINFO_VPTR_FIELD.
20008 (build_vbase_offset_vtbl_entries): Simplify.
20009 (build_vbase_offset_vtbl_entries): Adjust.
20010 (build_vbase_pointer): Add ability to look up vbase offsets in
20011 vtable.
20012 (start_vtable): New function.
20013 (add_virtual_function): Use it.
20014 (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
20015 (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
20016 (build_vtbl_initializer): Take the type of the complete object as
20017 input. Use it to correctly calculate vbase offsets.
20018 (dfs_finish_vtbls): Pass the complete type to
20019 build_vtbl_initializer.
20020 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
20021 (create_vtable_ptr): Create a vtable even if there are no
20022 new virtual functions, under the new ABI.
20023 (finish_struct_1): Likewise.
20024 (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
20025 * decl.c (exapnd_static_init): Remove call to
20026 preserve_initializer.
20027 * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
20028 vtables.
20029 * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
20030 (expand_virtual_init): Use vbase_offsets_in_vtable_p.
20031 (construct_virtual_bases): Don't initialize virtual base pointers
20032 under the new ABI.
20033 (build_aggr_init): Clean up comment.
20034 (expand_aggr_init_1): Likewise.
20035 * rtti.c (expand_class_desc): Store the virtual function table
20036 index where the vbase offset lives in the offset field.
20037 * search.c (dfs_walk_real): Make it global.
20038 (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
20039 * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
20040
20041 * tinfo.h (USItype): Make it signed under the new ABI.
20042 * tinfo.cc (convert_to_base): New function. Encapsulate base
20043 conversion logic here.
20044 (__class_type_info::do_upcast): Use it.
20045 (__class_type_info::do_dyncast): Likewise.
20046 (__class_type_info::do_find_public_subobj): Likewise.
20047
20048 * init.c (construct_virtual_bases): Don't look up the addresses of
20049 virtual bases at run-time.
20050
20051 * class.c (build_vbase_pointer): Relocate.
20052 (build_vbase_pointer_fields): Likewise.
20053 (dfs_build_vbase_offset_vtbl_entries): Likewise.
20054 (build_vbase_offset_vtbl_entries): Likewise.
20055
20056 * decl.c (init_decl_processing): Complain if -fnew-abi
20057 -fno-vtable-thunks is used.
20058
20059 * decl2.c (lang_decode_option): Don't couple flag_honor_std to
20060 flag_new_abi.
20061
20062 2000-01-15 Mark Mitchell <mark@codesourcery.com>
20063
20064 * cp-tree.h (num_extra_vtbl_entries): New function.
20065 (size_extra_vtbl_entries): Likewise.
20066 (dfs_vtable_path_unmark): Likewise.
20067 (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
20068 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
20069 * class.c (num_extra_vtbl_entries): New function.
20070 (size_extra_vtbl_entries): Likewise.
20071 (dfs_build_vbase_offset_vtbl_entries): New function.
20072 (build_vbase_offset_vtbl_entries): Likewise.
20073 (build_vtbl_initializer): Use it.
20074 (finish_struct_1): Adjust vtable sizes (using
20075 num_extra_vtbl_entries).
20076 * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
20077 THUNK_DECL is non-NULL before expanding it.
20078 * init.c (expand_virtual_init): Adjust the vtable pointer by
20079 size_extra_vtbl_entries before storing it.
20080 * search.c (get_shared_vase_if_not_primary): Adjust prototype.
20081 Handle TREE_LIST parameters here, not in the dfs_* functions.
20082 (dfs_unmarked_real_bases_queue_p): Adjust.
20083 (dfs_marked_real_bases_queue_p): Likewise.
20084 (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
20085 (dfs_vtable_path_marked_real_bases_queue_p): New function.
20086 (dfs_vtable_path_unmark): Likewise.
20087
20088 2000-01-14 Mark Mitchell <mark@codesourcery.com>
20089
20090 * optimize.c (copy_body_r): Clear the operand three of a
20091 TARGET_EXPR when copying it.
20092
20093 2000-01-14 Martin v. Löwis <loewis@informatik.hu-berlin.de>
20094
20095 * method.c (build_decl_overload_real): Check whether we are in ::
20096 before returning __builtin_new/delete.
20097
20098 2000-01-13 Mark Mitchell <mark@codesourcery.com>
20099
20100 * pt.c (tsubst_friend_function): Improve comment.
20101 (instantiate_decl): Avoid crashing when a "nested" function is
20102 instantiated from the top level.
20103
20104 * dump.c (dqeueue_and_dump): Dump
20105 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
20106
20107 2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20108
20109 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
20110
20111 2000-01-13 Nathan Sidwell <sidwell@codesourcery.com>
20112
20113 * g++spec.c (lang_specific_driver): Add -fnew-abi if
20114 ENABLE_NEW_GXX_ABI defined.
20115 * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
20116 opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
20117 opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
20118
20119 2000-01-12 Mark Mitchell <mark@codesourcery.com>
20120
20121 * decl.c (start_cleanup_fn): Call pushdecl.
20122
20123 * call.c (convert_class_to_reference): Fix typos.
20124 (build_conditional_expr): Handle errors gracefully.
20125 * class.c (push_nested_class): Likewise.
20126 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
20127 (DECL_THIS_EXTERN): Use it.
20128 (DECL_THIS_STATIC): Likewise.
20129 * cvt.c (convert_to_void): Handle errors gracefully.
20130 (build_expr_type_conversion): Likewise.
20131 * decl.c (maybe_push_decl): Likewise.
20132 (start_decl_1): Likewise.
20133 (require_complete_types_for_parms): Likewise.
20134 * parse.y (structsp): Likewise.
20135 (base_class): Likewise.
20136 * parse.c: Regenerated.
20137 * pt.c (finish_member_template_decl): Likewise.
20138 * typeck.c (decay_conversion): Likewise.
20139
20140 * cp-tree.h (dfs_skip_vbases): New function.
20141 (find_vbase_instance): Likewise.
20142 * class.c (determine_primary_base): Allow a nearly empty base to
20143 serve as a primary base class under the new ABI.
20144 (get_class_offset_1): Rename to ...
20145 (dfs_get_class_offset): ... this. Simplify. Don't issue error
20146 messages here.
20147 (get_class_offset): Use it. Issue error messages here.
20148 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
20149 find the right copies of virtual bases.
20150 (fixup_vtable_deltas1): Rename to ...
20151 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual
20152 bases as primary bases.
20153 (fixup_vtable_deltas): Remove.
20154 (override_one_vtable): Handle virtual bases as primary bases.
20155 (merge_overrides): Likewise.
20156 (finish_struct_1): Likewise.
20157 (dump_class_hierarchy): Dump primary-ness of bases as well.
20158 * search.c (mark_primary_bases): Use a pre-order traversal to
20159 handle primary virtual bases.
20160 (dfs_skip_vbases): New fiunction.
20161 (expand_upcast_fixups): Adjust to handle primary virtual bases.
20162 (fixup_virtual_upcast_offsets): Likewise.
20163 (fixup_all_virtual_upcast_offsets): Likewise.
20164 (dfs_find_vbase_instances): New function.
20165 (find_vbase_instance): Likewise.
20166
20167 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
20168
20169 * lex.c (DIR_SEPARATOR): Delete macro.
20170
20171 2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com>
20172
20173 * decl2.c (lang_decode_option): Handle automatic line wrapping
20174 option.
20175
20176 2000-01-11 Mark Mitchell <mark@codesourcery.com>
20177
20178 * friend.c (do_friend): Don't resolve scopes when processing
20179 template declarations, even if the qualifying scope doesn't
20180 involve template parameters.
20181
20182 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
20183
20184 * class.c (dfs_modify_vtables_queue_p): Remove.
20185 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
20186 and dfs_marked_real_bases_queue_p instead of
20187 dfs_modify_vtables_queue_p.
20188
20189 * class.c (build_vbase_path): Simplify.
20190 (dfs_propagate_binfo_offsets): New function.
20191 (propagate_binfo_offsets): Use it.
20192 (remove_base_field): Simplify.
20193 (dfs_set_offset_for_vbases): Remove.
20194 (dfs_set_offset_for_shared_vbases): New function.
20195 (dfs_set_offset_for_unshared_vbases): Likewise.
20196 (layout_virtual_bases): Use them.
20197 (layout_basetypes): Don't call propagate_binfo_offsets.
20198 * search.c (dfs_get_vbase_types): Clone completely fresh binfos
20199 for the vbases.
20200
20201 * class.c (build_base_field): New function, split out from ...
20202 (build_base_fields): ... here. Use it. Allocate primary bases
20203 first, under the new ABI.
20204 (get_vtable_entry): Remove.
20205 (remove_base_field): New function, split out from ...
20206 (remove_base_fields): ... here. Adjust since primary bases come
20207 first under the new ABI.
20208
20209 * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
20210 (initialize_vtbl_ptrs): New function.
20211 (expand_indirect_vtbls_init): Change prototype.
20212 (convert_pointer_to_vbase): Declare.
20213 * init.c (expand_direct_vtbls_init): Remove.
20214 (dfs_initialize_vtbl_ptrs): New function.
20215 (initialize_vtbl_ptrs): Likewise.
20216 (emit_base_init): Use initialize_vtbl_ptrs.
20217 * search.c (convert_pointer_to_vbase): Make it global.
20218 (expand_indirect_vtbls_init): Remove vtable initialization code.
20219 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
20220
20221 * class.c (dfs_finish_vtbls): New function.
20222 (finish_vtbls): Use it.
20223 (dump_class_hierarchy): New function.
20224
20225 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
20226 (BINFO_VBASE_PRIMARY_P): New macro.
20227 (BINFO_VIRTUALS): Add to documentation.
20228 (SET_BINFO_PRIMARY_MARKED_P): Remove.
20229 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
20230 (dfs_mark_primary_bases_queue_p): Likewise.
20231 (dfs_unmarked_real_bases_queue_p): New function.
20232 (dfs_marked_real_bases_queue_p): Likewise.
20233 * search.c (dfs_mark_primary_bases): Adjust.
20234 (mark_primary_bases): Likewise.
20235 (get_shared_vbase_if_not_primary): New function.
20236 (dfs_unmarked_real_bases_queue_p): Likewise.
20237 (dfs_marked_real_bases_queue_p): Likewise.
20238 (dfs_get_pure_virtuals): Simplify.
20239 (get_pure_virtuals): Likewise.
20240
20241 2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20242
20243 * lex.c: Include tm_p.h.
20244
20245 2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
20246
20247 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
20248
20249 2000-01-06 Jason Merrill <jason@casey.cygnus.com>
20250
20251 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
20252 * pt.c (instantiate_decl): Defer comdat templates that might not be
20253 needed.
20254
20255 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
20256 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
20257 (finish_file): Likewise.
20258
20259 * decl2.c (import_export_class): Undo 12/14 change.
20260
20261 * error.c (dump_decl): operator new, not operatornew.
20262
20263 * class.c (field_decl_cmp): A nontype is "greater" than a type.
20264 * search.c (lookup_field_1): Look for the last field with the
20265 desired name.
20266
20267 2000-01-05 Nathan Sidwell <nathan@acm.org>
20268
20269 * decl2.c (lookup_arg_dependent): Deal with FNS not being a
20270 FUNCTION_DECL.
20271
20272 2000-01-05 Nathan Sidwell <nathan@acm.org>
20273
20274 * typeck.c (build_static_cast): Don't strip target qualifiers
20275 when casting from a class.
20276
20277 2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20278
20279 * class.c (warn_hidden): Initialize variable `fndecl'.
20280
20281 2000-01-03 Ulrich Drepper <drepper@cygnus.com>
20282
20283 * decl.c (flag_isoc9x): New variable to be able to use code in
20284 c-common.c. For now always zero.
20285
20286 2000-01-03 Mark Mitchell <mark@codesourcery.com>
20287
20288 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
20289 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
20290 or unshare_base_binfos for virtual bases here.
20291 * search.c (dfs_get_vbase_types): Do it here.
20292 (get_vbase_types): Adjust.
20293
20294 2000-01-02 Mark Mitchell <mark@codesourcery.com>
20295
20296 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
20297 (BINFO_PRIMARY_MARKED_P): Use flag 5.
20298 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
20299 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
20300 (unmark_primary_bases): Remove declaration.
20301 (unmarkedp): Declare.
20302 (dfs_vbase_unmark): Likewise.
20303 * class.c (determine_primary_base): Return immediately if there
20304 are no base classes. Call mark_primary_bases here.
20305 (modify_all_direct_vtables): Remove.
20306 (modify_all_indirect_vtables): Remove.
20307 (dfs_modify_vtables_queue_p): New function.
20308 (dfs_modify_vtables): New function.
20309 (modify_all_vtables): Use them.
20310 (build_base_fields): Build FIELD_DECLs for primary virtual base
20311 classes.
20312 (create_vtable_ptr): Don't call determine_primary_base here.
20313 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
20314 (dfs_set_offset_for_vbases): ... this.
20315 (layout_virtual_bases): Use it.
20316 (layout_class_type): Call determine_primary_base here.
20317 * search.c (unmarkedp): Make it global.
20318 (shared_marked_p): Simplify.
20319 (shared_unmarked_p): Likewise.
20320 (dfs_primary_bases_queue_p): Remove.
20321 (dfs_unmark_primary_bases): Likewise.
20322 (unmark_primary_bases): Likewise.
20323 (mark_primary_bases): Simplify.
20324 (get_pure_virtuals): Don't call mark_primary_bases here.
20325 (dfs_vbase_unmark): New function.
20326 (get_vbase_types): Simplify.
20327
20328 * class.c (struct base_info): Remove.
20329 (determine_primary_base): Take has_virtual_p rather than a
20330 base_info as input. Don't calculate max_has_virtual.
20331 (finish_struct_bits): Remove max_has_virtual argument.
20332 (create_vtable_ptr): Remove max_has_virtual_p argument.
20333 (layout_virtual_bases): Remove max argument.
20334 (layout_basetypes): Likewise.
20335 (layout_class_type): Remove max_has_virtual_p argument.
20336 (finish_struct_1): Remove max_has_virtual.
20337
20338 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
20339 (layout_basetypes): Remove.
20340 * class.c (propagate_binfo_offsets): Moved here from tree.c.
20341 Update to handle primary virtual bases.
20342 (remove_base_fields): New function, split out from
20343 layout_basetypes.
20344 (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
20345 (layout_virtual_bases): New function, split out from
20346 layout_basetypes. Update to handle primary virtual bases.
20347 (layout_basetypes): Moved here from tree.c. Use
20348 remove_base_fields and layout_virtual_bases.
20349 * search.c (dfs_mark_primary_bases_queue_p): New function.
20350 (mark_primary_bases): Use it.
20351 * tree.c (CEIL): Remove.
20352 (propagate_binfo_offsets): Remove.
20353 (layout_basetypes): Remove.
20354
20355 2000-01-01 Mark Mitchell <mark@codesourcery.com>
20356
20357 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
20358 (BINFO_PRIMARY_MARKED_P): New macro.
20359 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
20360 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
20361 (mark_primary_bases): New function.
20362 (unmark_primary_bases): Likewise.
20363 * search.c (get_abstract_virtuals_1): Remove.
20364 (dfs_mark_primary_bases): New function.
20365 (mark_primary_bases): Likewise.
20366 (dfs_unmark_primary_bases): Likewise.
20367 (unmark_primary_bases): Likewise.
20368 (dfs_get_pure_virtuals): Likewise.
20369
20370 2000-01-01 Mark Mitchell <mark@codesourcery.com>
20371
20372 * cp-tree.h (skip_rtti_stuff): Adjust prototype.
20373 * class.c (skip_rtti_stuff): Reorganize parameters and return value.
20374 (modify_one_vtable): Adjust.
20375 (fixup_vtable_deltas1): Likewise.
20376 (override_one_vtable): Likewise.
20377 * search.c (get_abstract_virtuals_1): Likewise.
20378 (get_pure_virtuals): Likewise.
20379 (expand_upcast_fixups): Likewise.
20380 * tree.c (debug_binfo): Likewise.
20381
20382 * class.c (build_vtable): Don't return a value. Don't rebuild
20383 vtables for bases that have already been handled.
20384 (prepare_fresh_vtable): Don't rebuild vtables for bases that have
20385 already been handled.
20386 (modify_one_vtable): Adjust accordingly.
20387 (fixup_vtable_deltas1): Likewise.
20388 (finish_struct_1): Likewise.
20389
20390 2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
20391
20392 * call.c (build_new_method_call): Also check destructors.
This page took 0.927962 seconds and 6 git commands to generate.