1 2004-11-12 Mark Mitchell <mark@codesourcery.com>
4 * decl.c (start_decl): Make sure to set *pop_scope_p. Return
5 error_mark_node to indicate errors.
8 * parser.c (cp_parser_direct_declarator): Disallow non-constant
9 array bounds when not inside a function.
12 * pt.c (tsubst_copy_and_build): Do not do Koenig lookup when an
13 unqualified name resolves to a member function.
16 * pt.c (tsubst_copy_and_build): Handle qualified names used from a
17 derived class correctly.
19 * decl2.c (import_export_decl): Fix typo in comment.
20 * tree.c (pod_type_p): Likewise.
22 2004-11-10 Andrew Pinski <pinskia@physics.uc.edu>
24 * typeck.c (cxx_mark_addressable): Add braces around the first if.
26 2004-11-10 Adam Nemet <anemet@lnxw.com>
29 * typeck.c (cxx_mark_addressable): Issue an error if address of an
30 explicit register variable is requested.
32 2004-11-10 Nathan Sidwell <nathan@codesourcery.com>
35 * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK): New.
36 (struct lang_decl_flags): Add thunk_p flag.
37 (struct lang_decl): Remove separate fixed_offset. Place
38 cloned_function and fixed_offset into union.
39 (DECL_CLONED_FUNCTION_P, DECL_CLONED_FUNCTION): Adjust.
40 (DECL_THUNK_P, SET_DECL_THUNK_P): Adjust.
41 (THUNK_FIXED_OFFSET): Adjust.
42 * method.c (make_thunk): Adjust.
44 2004-11-09 Mark Mitchell <mark@codesourcery.com>
47 * init.c (build_new_1): Handle parenthesized type-ids that name an
50 2004-11-09 Joseph S. Myers <joseph@codesourcery.com>
52 * call.c, class.c, decl.c, decl2.c, error.c, mangle.c, parser.c,
53 pt.c, search.c, semantics.c, typeck.c: Use %q, %< and %> for
54 quoting in diagnostics.
55 * parser.c (cp_parser_sizeof_operand): Use '' instead of `' for
56 quoting in printf format.
57 * decl.c (duplicate_decls, start_decl): Use %qD instead of
60 2004-11-08 Kazu Hirata <kazu@cs.umass.edu>
62 * class.c, decl.c, lex.c, name-lookup.c, parser.c, pt.c,
63 search.c, typeck2.c: Fix comment formatting.
65 2004-11-04 Ulrich Weigand <uweigand@de.ibm.com>
67 PR tree-optimization/18184
68 * cp-objcp-common.c (cxx_types_compatible_p): Do not treat pointers
69 of different modes or alias-all flags as equivalent.
70 * typeck.c (comptypes): Likewise.
72 2004-11-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
75 * cp-tree.h (TYPE_REF_OBJ_P): New macro.
76 (TYPE_PTR_P, TYPE_PTROB_P, TYPE_PTROBV_P, TYPE_PTRFN_P,
77 TYPE_REFFN_P): Document.
78 (fold_decl_constant_value): New prototype.
79 * pt.c (convert_nontype_argument_function): Rewrite and extract
81 (fold_decl_constant_value, convert_nontype_argument_function): New.
82 (lookup_template_class): Add comment about useless double call.
83 * mangle.c (write_expression): Strip conversions before lowering
85 * cvt.c (ocp_convert): Check LOOKUP_COMPLAIN for a pedwarn. Disallow
86 enum to enum conversion.
88 2004-11-02 Mark Mitchell <mark@codesourcery.com>
91 * parser.c (cp_parser_type_parameter): Robustify.
94 * parser.c (cp_parser_single_declaration): Disallow template
98 * typeck.c (build_const_cast): Use error_operand_p.
100 2004-11-02 Ziemowit Laski <zlaski@apple.com>
102 * cp-lang.c (cxx_types_compatible_p): Remove prototype and definition.
103 (LANG_HOOKS_TYPES_COMPATIBLE_P): Move to cp-objcp-common.h.
104 * cp-objcp-common.c (cxx_types_compatible_p): Moved definition here
106 * cp-objcp-common.h (cxx_types_compatible_p): Moved prototype here
108 (LANG_HOOKS_TYPES_COMPATIBLE_P): Moved here from cp-lang.c.
110 2004-11-01 Nathan Sidwell <nathan@codesourcery.com>
113 * search.c (check_final_overrider): Deprecate gnu covariant extension.
115 2004-10-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
117 Convert diagnostics to use quoting flag q 9/n
118 * typeck.c (build_x_unary_op, convert_member_func_to_ptr,
119 get_delta_difference): Use new quotation style.
120 * repo.c (reopen_repo_file_for_write): Likewise.
121 * pt.c (do_type_instantiation): Likewise.
122 * parser.c (cp_parser_diagnose_invalid_type_name):
123 * name-lookup.c (push_overloaded_decl, set_decl_namespace):
124 * error.c (cp_print_error_function,
125 print_instantiation_full_context): Likewise.
126 * decl.c (define_label, grok_reference_init,
127 maybe_deduce_size_from_array_init, revert_static_member_fn):
128 * decl2.c (check_classfn): Likewise.
129 * class.c (add_method, check_field_decls, layout_class_type,
130 resolve_address_of_overloaded_function): Likewise.
131 * call.c (build_x_va_arg, build_over_call): Likewise.
133 2004-10-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
135 Convert diagnostics to use quoting flag q 8/n
136 * cvt.c (cp_convert_to_pointer, warn_ref_binding,
137 convert_to_reference, ocp_convert, convert_to_void
138 cp_convert_to_pointer): Use new quotation style.
140 2004-10-31 Mark Mitchell <mark@codesourcery.com>
143 * typeck2.c (store_init_value): Use split_nonconstant_init even
144 for types that require construction.
146 1004-10-28 Matt Austern <austern@apple.com>
149 * cp-tree.h (class_key_or_enum_as_string): Declare.
150 * error.c (class_key_or_enum): Rename to class_key_or_enum_as_string
151 and remove static qualifier.
152 * decl.c (shadow_tag): Warn about ignored attributes in class/struct/
153 union/enum declaration.
155 2004-10-29 Kazu Hirata <kazu@cs.umass.edu>
157 * pt.c: Fix a comment typo.
159 2004-10-28 Nathan Sidwell <nathan@codesourcery.com>
161 * typeck.c (composite_pointer_type): Remove comment about DR 195.
162 (build_reinterpret_cast_1): Revert DR195 patch. Only emit a
163 warning when being pedantic.
164 (build_reinterpet_cast, build_c_cast): Adjust.
166 2004-10-29 Mark Mitchell <mark@codesourcery.com>
169 * decl.c (grokdeclarator): Mark TYPE_DECLs as abstract when they
170 appear in a constructor/destructor that will be cloned.
172 1004-10-28 Matt Austern <austern@apple.com>
175 * decl.c (finish_enum): Handle packed attribute.
176 * parser.c (cp_parser_enum_specifier): Process trailing attributes.
178 2004-10-28 Mark Mitchell <mark@codesourcery.com>
181 * pt.c (instantiate_class_template): Increment
182 processing_template_decl when substituting into a member class
185 2004-10-27 Mark Mitchell <mark@codesourcery.com>
188 * call.c (convert_like_real): Fix formatting.
189 (initialize_reference): When binding a temporary to a base class,
190 ensure that the nominal copy made is to the derived class, not the
194 * parser.c (cp_parser_next_token_ends_template_argument_p): Do not
197 2004-10-27 Andrew Pinski <pinskia@physics.uc.edu>
199 * decl.c (bad_specifiers): Move the q after the %.
201 2004-10-27 Andrew Pinski <pinskia@physics.uc.edu>
203 * parser.c (cp_parser_diagnose_invalid_type_name): Move the q after
206 2004-10-26 Mark Mitchell <mark@codesourcery.com>
208 * name-lookup.c (do_namespace_alias): Use FROB_CONTEXT.
209 * search.c (current_scope): Fix prototype.
212 * search.c (current_scope): Return the innermost non-block scope,
213 not the innermost non-block, non-namespace scope.
214 (at_namespace_scope_p): Adjust accordingly.
215 (dfs_accessible_post): Do not pass namespaces to is_friend.
216 (dfs_walk_once_accessible_r): Likewise.
217 * decl.c (grokvardecl): Adjust call to current_scope.
218 (build_enumerator): Likewise.
219 * parser.c (cp_parser_using_declaration): Likewise.
220 (cp_parser_direct_declarator): Use at_namespace_scope_p instead of
222 (cp_parser_class_head): Adjust call to current_scope.
223 * name-lookup.c (do_namespace_alias): Set the DECL_CONTEXT for the
227 * pt.c (tusbst_copy_and_build): Resolve enumeration constants to
228 their underlying values.
231 * typeck.c (build_binary_op): Honor build_type, even when in a
234 2004-10-26 Nathan Sidwell <nathan@codesourcery.com>
236 * parser.c (cp_lexer_get_preprocessor_token): Remove unneeded
237 padding token checking.
239 2004-10-25 Andrew Pinski <pinskia@physics.uc.edu>
242 * decl.c (grokdeclarator) <case cdk_array>: Remove the call
243 layout_type as it is already done by create_array_type_for_decl.
245 2004-10-22 Nathan Sidwell <nathan@codesourcery.com>
248 * parser.c (eof_token): Make const, correctly initialize rid and
250 (struct cp_lexer): Replace buffer_end pointer with buffer_length
252 (cp_lexer_new_main): Directly grow lexer's buffer here. Don't
254 (cp_lexer_new_from_tokens): Adjust.
255 (cp_lexer_grow_buffer): Remove.
256 (cp_lexer_peek_nth_token, cp_lexer_consume_token,
257 cp_lexer_purge_token): Add const casts.
259 2004-10-21 Mark Mitchell <mark@codesourcery.com>
263 * cp-tree.h (convert_to_base): Change prototype.
264 (build_ptrmemfunc): Likewise.
265 (convert_ptrmem): New function.
266 * call.c (struct conversion): Adjust documentation for base_p.
267 (standard_conversion): Set base_p for ck_pmem conversions as
269 (convert_like_real): Use convert_to_base for ck_pmem and ck_ptr
271 * class.c (convert_to_base): Handle both pointers and objects.
272 Add nonnull parameter.
273 (build_vfield_ref): Adjust call to convert_to_base.
274 * cvt.c (cp_convert_to_pointer): Adjust call to build_ptrmemfunc.
275 (convert_force): Likewise.
276 * typeck.c (build_unary_op): Likewise.
277 (convert_ptrmem): New function.
278 (build_static_cast_1): Use it.
279 (build_reinterpret_cast): Allow conversions to vector types.
280 (get_delta_difference): Add c_cast_p parameter.
281 (build_ptrmemfunc): Likewise. Adjust calls to
282 get_delta_difference.
284 2004-10-21 Andrew Pinski <pinskia@physics.uc.edu>
287 * error.c (cp_error_at): Output the context as it might be
288 different file as the other location.
290 2004-10-21 Kazu Hirata <kazu@cs.umass.edu>
292 * typeck.c: Fix a comment typo.
294 2004-10-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
297 * decl.c (make_unbound_class_template): Add PARM_LIST parameter.
298 * cp-tree.h (make_unbound_class_template): Adjust prototype.
299 * parser.c (cp_parser_lookup_name): Adjust call to
300 make_unbound_class_template.
301 (cp_parser_single_declaration): Handle member class of class
302 template as template friend parsing correctly.
303 * friend.c (is_friend): Call is_specialization_of_friend for
304 template friend class.
305 (make_friend_class): Handle member class of class template as
307 * pt.c (is_specialization_of_friend): Likewise.
308 (instantiate_class_template): Likewise.
309 (tsubst): Adjust call to make_unbound_class_template.
311 2004-10-20 Nathan Sidwell <nathan@codesourcery.com>
313 * typeck.c (composite_pointer_type): Add comment about DR 195
314 (build_reinterpret_cast_1): Add for_reinterpret_cast_p parameter.
315 Allow function pointer conversions that DR195 suggests.
316 (build_reinterpret_cast, build_c_cast): Update
317 build_reinterpret_cast_1 calls.
319 2004-10-20 Kazu Hirata <kazu@cs.umass.edu>
321 * call.c, typeck.c: Fix comment typos.
323 2004-10-20 Nathan Sidwell <nathan@codesourcery.com>
325 * parser.c (cp_token_position): New typedef. Define VEC thereof.
326 (struct cp_lexer): Allow buffer and buffer_end to be NULL. Make
327 next_token and last_token cp_token_position. Make saved_tokens a
328 VEC(cp_token_position).
329 (eof_token): New static variable.
330 (CP_SAVED_TOKENS_SIZE): Rename to ...
331 (CP_SAVED_TOKEN_STACK): ... here.
332 (cp_lexer_new_main): Adjust main lexer creation and buffer
334 (cp_lexer_new_from_tokens): Do not copy the tokens, merely point
335 to the parent buffer. Do not append eof token.
336 (cp_lexer_destroy): Only free buffer if non-NULL. Free token
338 (cp_lexer_next_token, cp_lexer_prev_token): Remove.
339 (cp_lexer_token_position, cp_lexer_token_at): New.
340 (cp_lexer_saving_tokens): Adjust. Make inline.
341 (cp_lexer_advance_token, cp_lexer_token_difference): Remove.
342 (cp_lexer_peek_token_emit_debug_info): Fold into ...
343 (cp_lexer_peek_token): ... here.
344 (cp_lexer_peek_nth_token): Don't peek past EOF.
345 (cp_lexer_consume_token): Set next_token to eof_token, if reaching
347 (cp_lexer_purge_token): Adjust eof setting.
348 (cp_lexer_purge_tokens_after): Likewise.
349 (cp_lexer_save_tokens): Push next_token directly.
350 (cp_lexer_commit_tokens): Adjust.
351 (cp_lexer_rollback_tokens): Pop next_token directly.
352 (cp_parser_check_for_invalid_template_id): Adjust token purging.
353 (cp_parser_translation_unit): Do not consume the EOF.
354 (cp_parser_nested_name_specifier_opt): Adjust token purging.
355 (cp_parser_template_id, cp_parser_template_name): Likewise.
357 2004-10-19 Mark Mitchell <mark@codesourcery.com>
360 * call.c (struct conversion): Add base_p.
361 (convert_like): Add c_cast_p argument.
362 (convert_like_with_conversion): Likewise.
363 (build_conv): Clear base_p.
364 (standard_conversion): Set it, for derived-to-base conversions.
365 (convert_like_real): Add c_cast_p parameter. Handle pointer
366 conversions directly rather than relying on ocp_convert.
367 (perform_direct_initialization_if_possible): Add c_cast_p
369 * cp-tree.h (perform_direct_initialization_if_possible): Change
371 (convert_member_func_to_ptr): New function.
372 * typeck.c (check_for_casting_away_constness): Add diag_fn
374 (build_static_cast_1): New function, split out from ...
375 (build_static_cast): ... here. Use build_static_cast_1.
376 (build_reinterpret_cast_1): New function, split out from ...
377 (build_reinterpret_cast): ... here. Use build_reinterpret_cast_1.
378 (build_const_cast_1): New function, split out from ...
379 (build_const_cast): ... here. Use build_const_cast_1.
380 (build_c_cast): Rewrite to use build_const_cast_1,
381 build_static_cast_1, and build_reinterpret_cast_1.
382 (convert_member_func_to_ptr): New function.
384 2004-10-19 Paolo Bonzini <bonzini@gnu.org>
387 * parser.c (enum cp_parser_prec): Give relational expressions
388 a higher precedence than equality expressions.
390 2004-10-15 Nathan Sidwell <nathan@codesourcery.com>
392 * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Adjust lookup_base call.
393 (ACCESSIBLY_UNIQUELY_DERIVED_P): Remove.
394 (PUBLICLY_UNIQUELY_DERIVED_P): Adjust lookup_base call.
395 (enum base_access): Reorganize.
396 (accessible_base_p, accessible_p): Add consider_local_p parameter.
397 * call.c (standard_conversion): Update comment about
399 (enforce_access): Adjust accessible_p call.
400 (build_over_call): Adjust accessible_base_p call.
401 * class.c (convert_to_base): Adjust lookup_base call.
402 (build_vtbl_ref_1): Likewise.
403 (warn_about_ambiguous_bases): Likewise. Add early exit.
404 * cvt.c (convert_to_pointer_force) Adjust lookup_base call.
405 * search.c (accessible_base_p): Add consider_local_p parameter.
406 (lookup_base): Pass consider_local_p to accessible_base_p call.
407 (friend_accessible_p): Check whether scope is a class member.
408 Remove unnecessary class template check.
409 (accessible_p): Add consider_local_p parameter. Use it.
410 (adjust_result_of_qualified_name_lookup): Adjust lookup_base call.
411 * tree.c (maybe_dummy_object): Likewise.
412 * typeck.c (comp_except_type): Use PUBLICLY_UNIQUELY_DERIVED_P.
413 (build_class_member_access_expr): Adjust lookup_base call.
414 * typeck2.c (binfo_or_else): Likewise.
415 * rtti.c (build_dynamic_cast_1): Access can consider friendship
418 2004-10-17 Giovanni Bajo <giovannibajo@gcc.gnu.org>
421 * decl2.c (grokfield): Apply attributes also to TYPE_DECLs.
423 2004-10-16 Giovanni Bajo <giovannibajo@gcc.gnu.org>
426 * parser.c (cp_parser_parenthesized_expression_list): Fold
427 non-dependent expressions in attribute lists.
429 2004-10-15 Mark Mitchell <mark@codesourcery.com>
432 * decl.c (declare_global_var): Use the return value from pushdecl.
435 * parser.c (cp_parser_simple_declaration): Do not diagnose invalid
436 type names if we have already found a valid type.
437 (cp_parser_member_declaration): Likewise.
440 * parser.c (cp_parser_member_specification_opt): Handle
443 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
445 * dump.c, g++spec.c, repo.c: Update copyright.
447 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
449 * decl.c: Fix a comment typo.
451 2004-10-13 Andrew Pinski <pinskia@physics.uc.edu>
454 * name-lookup.c (parse_using_directive): If we have a
455 error_mark_node, do not set the decl namespace associations
458 2004-10-14 Mark Mitchell <mark@codesourcery.com>
461 * decl.c (cp_finish_decl): Do not call expand_static_init more
462 than once for a single variable.
464 2004-10-14 Matt Austern <austern@apple.com>
466 * Make-lang.in (pt.o): depends on pointer-set.h
467 * cp-tree.h (cp_walk_subtrees): Last argument is pointer_set_t* now.
468 * pt.c (struct pair_fn_data): Use pointer_set_t, not htab_t
469 (for_each_template_parm): Convert from htab_t to pointer_set_t.
470 * tree.c (cp_walk_subtrees): Last argument is pointer_set_t* now.
472 2004-10-13 Andrew Pinski <pinskia@physics.uc.edu>
475 * semantics.c (finish_for_expr): Convert expression to void
476 so that we don't create temporaries for a?b:c.
478 2004-10-13 Kazu Hirata <kazu@cs.umass.edu>
480 * search.c: Fix a comment typo.
482 2004-10-12 Nathan Sidwell <nathan@codesourcery.com>
484 * class.c (dfs_modify_vtables): Simplify condition. Return
485 dfs_skip_bases as appropriate.
486 (modify_all_vtables): Walk in pre-order.
487 * search.c (dfs_walk_all, dfs_walk_once_r,
488 dfs_walk_once_accessible_r): Assert post order function never
489 returns dfs_skip_bases.
491 * search.c (struct lookup_base_data_s): New.
492 (lookup_base_r): Replace with ...
493 (dfs_lookup_base): ... this.
494 (lookup_base): Use dfs_walk_all.
496 2004-10-12 Kazu Hirata <kazu@cs.umass.edu>
498 * search.c: Fix comment typos.
500 2004-10-11 Mark Mitchell <mark@codesourcery.com>
503 * parser.c (cp_parser_declarator): Add member_p parameter.
504 (cp_parser_condition): Adjust calls to cp_parser_declarator.
505 (cp_parser_explicit_instantiation): Likewise.
506 (cp_parser_init_declarator): Likewise.
507 (cp_parser_direct_declarator): Add member_p parameter. Do not
508 parse tentatively when parsing the parameters to a member.
509 (cp_parser_type_id): Adjust calls to cp_parser_declarator.
510 (cp_parser_parameter_declaration): Likewise.
511 (cp_parser_member_declaration): Likewise.
512 (cp_parser_exception_declaration): Likewise.
515 * cp-tree.h (CLASSTYPE_TEMPLATE_SPECIALIZATION): Add a comment.
516 * pt.c (optimize_specialization_lookup_p): Do not optimize lookups
517 for members of partial or explicit specializations.
520 * decl2.c (finish_anon_union): Robustify.
522 2004-10-11 Nathan Sidwell <nathan@codesourcery.com>
524 * cp-tree.h (get_dynamic_cast_base_type): Rename to ...
525 (dcast_base_hint): ... here.
526 * rtti.c (build_dynamic_cast_1): Use dcast_base_hint.
527 * search.c (struct dcast_data_s): New.
528 (dynamic_cast_base_recurse): Remove. Replace with ...
529 (dfs_dcast_hint_pre, dfs_dcast_base_post): ... these. New.
530 (get_dynamic_cast_base_type): Rename to ...
531 (dcast_base_hint): ... here. Use dfs_walk_once_accessible.
532 (accessible_r): Remove.
533 (dfs_accessible_post): New, broken out of accessible_r.
534 (accessible_p): Use dfs_walk_once_accessible.
535 (dfs_walk_once_accessible_r): New. From accessible_r.
536 (dfs_walk_once_accessible): New. From acessible_p.
538 * cp-tree.h (SAME_BINFO_TYPE_P): New.
539 * class.c (build_base_path): Use SAME_BINFO_TYPE_P to compare
541 (convert_to_base_statically, determine_primary_bases,
542 update_vtable_entry_for_fn, dfs_modify_vtables, build_vtt_inits,
543 dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
544 accumulate_vtbl_inits, dfs_accumulate_vtbl_inits,
545 build_vtbl_initializer, add_vcall_offset_vtbl_entries_1): Likewise.
546 * init.c (expand_member_init): Likewise.
547 * search.c (lookup_base_r, dynamic_cast_base_recurse,
548 binfo_via_virtual, copied_binfo, binfo_for_vbase,
549 original_binfo): Likewise.
550 * tree.c (copy_binfo): Likewise.
552 2004-10-11 Kazu Hirata <kazu@cs.umass.edu>
554 * semantics.c: Fix comment typos.
556 2004-10-10 Andrew Pinski <pinskia@physics.uc.edu>
561 * semantics.c (maybe_cleanup_point_expr): Call
562 fold_build_cleanup_point_expr.
563 (maybe_cleanup_point_expr_void): New function.
564 (add_decl_expr): Call maybe_cleanup_point_expr_void.
565 (finish_expr_stmt): Likewise.
566 (finish_return_stmt): Likewise.
567 (finish_for_expr): Likewise.
568 (finish_asm_stmt): Likewise.
569 * typeck.c (condition_conversion): Call
570 fold_build_cleanup_point_expr.
572 2004-10-10 Andrew Pinski <pinskia@physics.uc.edu>
575 * semantics.c (add_decl_expr): If the decl has a size which
576 has side effects then the decl expression needs a cleanup point.
578 2004-10-10 Mark Mitchell <mark@codesourcery.com>
581 * decl.c (grokdeclarator): Robustify error-recovery on invalid
584 2004-10-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
586 Convert diagnostics to use quoting flag q 7/n
587 * typeck.c (composite_pointer_type_r, composite_pointer_type,
588 cxx_sizeof_or_alignof_type, cxx_sizeof_or_alignof_expr,
589 string_conv_p, build_class_member_access_expr,
590 build_class_member_access_expr, lookup_destructor,
591 finish_class_member_access_expr, build_indirect_ref,
592 get_member_function_from_ptrfunc, build_function_call,
593 convert_arguments, build_binary_op, pointer_diff, build_unary_op,
594 check_for_casting_away_constness, build_static_cast,
595 build_reinterpret_cast, build_const_cast, build_c_cast,
596 build_modify_expr, get_delta_difference, build_ptrmemfunc,
597 dubious_conversion_warnings, convert_for_assignment,
598 convert_for_initialization,
599 maybe_warn_about_returning_address_of_local, check_return_expr):
602 * typeck2.c (error_not_base_type, readonly_error,
603 abstract_virtuals_error, cxx_incomplete_type_diagnostic,
604 store_init_value, digest_init, build_x_arrow,
605 build_m_component_ref, require_complete_eh_spec_types): Likewise.
607 * tree.c (cp_build_qualified_type_real,
608 handle_java_interface_attribute, handle_init_priority_attribute):
611 * semantics.c (finish_asm_stmt, finish_non_static_data_member,
612 finish_pseudo_destructor_expr,
613 check_template_template_default_arg, begin_class_definition,
614 finish_base_specifier, qualified_name_lookup_error,
615 finish_id_expression, finish_typeof): Likewise.
617 * search.c (lookup_base, check_final_overrider,
618 look_for_overrides_r): Likewise.
620 * rtti.c (get_tinfo_decl, build_dynamic_cast_1): Likewise.
622 2004-10-09 Mark Mitchell <mark@codesourcery.com>
625 * error.c (dump_expr): Correct handling of AGGR_INIT_EXPRs using a
629 * init.c (build_new): Correct comments.
630 * parser.c (cp_parser_new_expression): Use NULL_TREE for nelts in
634 * parser.c (cp_parser_postfix_dot_deref_expression): If the
635 pseduo-destructor-name production does not work, fall back to the
639 * tree.c (cp_tree_equal): Handle a BASELINK.
642 * cp-tree.h (check_var_type): New function.
643 * decl.c (check_var_type): New function, split out from ...
644 (grokdeclarator): ... here.
645 * pt.c (tsubst_decl): Use check_var_type.
648 * decl.c (grokdeclarator): Disallow declarations of operators as
651 2004-10-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
654 * error.c (dump_expr): Add missing case for RDIV_EXPR.
656 2004-10-08 Kazu Hirata <kazu@cs.umass.edu>
658 * pt.c, search.c: Fix comment typos.
660 2004-10-08 Nathan Sidwell <nathan@codesourcery.com>
662 * cp-tree.h (dfs_walk, dfs_walk_real, dfs_unmark, markedp,
664 (dfs_skip_bases, dfs_walk_all, dfs_walk_once): New.
665 * class.c (struct find_final_overrider_data): Remove most_derived,
666 vpath_list and vpath fields. Add path field.
667 (dfs_find_final_ocerrider_1): Add DEPTH parameter. Adjust.
668 (dfs_find_final_overrider): Rename to ...
669 (dfs_find_final_overrider_pre): ... here. Adjust.
670 (dfs_find_final_overrider_post): Adjust.
671 (dfs_find_final_overrider_q): Fold into
672 dfs_find_final_overrider_pre.
673 (find_final_overrider): Adjust dfs searching.
674 (dfs_modify_vtables): Don't mark binfo here.
675 (modify_all_vtables): Use dfs_walk_once.
676 (build_vtt_inits): Likwise. Use dfs_walk_all.
677 (dfs_build_secondary_vptr_vtt_inits): Don't mark binfo here.
678 Return dfs_skip_bases as appropriate.
679 (dfs_fixup_binfo_vtbls): Return dfs_skip_bases as appropriate.
680 * init.c (dfs_initialized_vtbl_ptrs): Return dfs_skip_bases as
681 appropriate. Don't mark binfo here.
682 (initialize_vtbl_ptrs): Use dfs_walk_once.
683 * search.c (struct vbase_info): Remove unused struct.
684 (access_in_type): Use dfs_walk_once.
685 (dfs_access_in_type): Don't mark binfo here.
686 (dfs_accessible_queue_p, dfs_accessible_p) Remove.
688 (accessible_r): ... here. New. Specialize dfs_walk_once.
689 (accessible_p): Use accessible_r.
690 (lookup_field_queue_p): Remove. Fold into ...
691 (lookup_field_r): ... here. Adjust.
692 (lookup_member): Use dfs_walk_all.
693 (dfs_walk_real, dfs_walk): Replace with ...
694 (dfs_walk_all, dfs_walk_once): ... these.
695 (dfs_walk_once_r, dfs_unmark_r): Workers for dfs_walk_once.
696 (dfs_unmark, unmarkedp, markedp): Remove.
697 (dfs_get_pure_virtuals): Don't mark binfo here.
698 (get_pure_virtuals): Use dfs_walk_once.
699 (dfs_debug_unmarked_p): Remove. Fold into ...
700 (dfs_debug_mark): ... here.
701 (note_debug_info_needed): Use dfs_walk_all.
703 2004-10-07 Andrew Pinski <pinskia@physics.uc.edu>
705 * pt.c (tsubst_expr) <case ASM_EXPR>: Look passed the
706 CLEANUP_POINT_EXPR to get the asm expression.
708 2004-10-07 Mark Mitchell <mark@codesourcery.com>
710 * cp-tree.h (ICS_USER_FLAG): Remove comment about obsolete flag.
711 (DECL_MEMBER_TEMPLATE_P): New macro.
712 (is_member_template): Remove.
713 (class_method_index_for_fn): New function.
714 * pt.c (build_over_call): Use DECL_MEMBER_TEMPLATE_P.
715 * class.c (finish_struct_methods): Remove out-of-date comment.
716 * decl.c (copy_fn_p): Use DECL_MBMER_TEMPLATE_P.
717 * decl2.c (check_classfn): Use DECL_MEMBER_TEMPLATE_P and
718 class_method_index_for_fn.
719 * pt.c (is_member_template): Remove.
720 (is_member_template_class): Likewise.
721 (optimize_specialization_lookup_p): New function.
722 (retrieve_specialization): Optimize lookups for members that are
723 not member templates.
724 (register_specialization): Adjust accordingly.
725 (build_template_decl): Add member_template_p parameter. Set
726 DECL_MEMBER_TEMPLATE_P.
727 (process_partial_specialization): Adjust call to
728 retrieve_specialization.
729 (push_template_decl_real): Determine whether the template is a
731 (lookup_template_class): Use retrieve_specialization.
732 (tsubst_decl): Adjust call to retrieve_specialization.
733 (tsubst_exception_specification): New function.
735 (tsubst_copy): Use DECL_MEMBER_TEMPLATE_P.
736 (instantiate_template): Adjust call to retrieve_specialization.
737 (regenerate_decl_from_template): Do not actually generate a new
739 (instantiate_decl): Adjust call to retrieve_specialization.
740 (class_method_index_for_fn): New method.
742 2004-10-07 Andrew Pinski <pinskia@physics.uc.edu>
744 * parser.c (cp_parser_asm_definition): Look passed the
745 CLEANUP_POINT_EXPR to get the asm expression.
747 2004-10-06 Andrew Pinski <pinskia@physics.uc.edu>
750 * semantics.c (finish_asm_stmt): Asm expressions need cleanup
753 2004-10-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
755 Convert diagnostics to use quoting flag q 6/n
756 * pt.c (finish_member_template_decl, check_specialization_scope,
757 maybe_process_partial_specialization, determine_specialization,
758 check_explicit_specialization, maybe_check_template_type,
759 process_partial_specialization, check_default_tmpl_args,
760 push_template_decl_real, redeclare_class_template,
761 convert_nontype_argument, coerce_template_parms,
762 lookup_template_class, push_tinst_level,
763 instantiate_class_template, tsubst_arg_types,
764 tsubst_function_type, tsubst, tsubst_qualified_id,
765 tsubst_copy_and_build, check_instantiated_args,
766 do_decl_instantiation, do_type_instantiation,
767 invalid_nontype_parm_type_p, check_specialization_namespace,
768 convert_template_argument, determine_specialization,
769 check_template_shadow, tsubst_decl
770 instantiate_pending_templates): Use quoting marks.
772 2004-10-05 Nathan Sidwell <nathan@codesourcery.com>
775 * parser.c (cp_parser_postfix_expression): Inhibit Koenig when
776 unqualified lookup finds a member function.
778 2004-10-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
780 Convert diagnostics to use quoting flag q 5/n
781 * parser.c (cp_parser_name_lookup_error,
782 cp_parser_diagnose_invalid_type_name,
783 cp_parser_primary_expression, cp_parser_unqualified_id,
784 cp_parser_nested_name_specifier_opt, cp_parser_labeled_statement,
785 cp_parser_jump_statement, cp_parser_simple_declaration,
786 cp_parser_decl_specifier_seq, cp_parser_mem_initializer_id,
787 cp_parser_type_parameter, cp_parser_template_id,
788 cp_parser_template_name, cp_parser_direct_declarator,
789 cp_parser_parameter_declaration_list, cp_parser_class_head,
790 cp_parser_base_specifier, cp_parser_lookup_name,
791 cp_parser_late_parsing_default_args,
792 cp_parser_optional_template_keyword
793 cp_parser_elaborated_type_specifier, cp_parser_check_class_key,
794 cp_parser_check_access_in_redeclaration): Use quoting marks.
796 * name-lookup.c (supplement_binding, pushdecl,
797 check_for_out_of_scope_variable, validate_nonmember_using_decl,
798 do_nonmember_using_decl, lookup_tag, set_decl_namespace,
799 push_namespace, do_namespace_alias, do_using_directive,
800 ambiguous_decl, lookup_namespace_name, add_function): Likewise.
802 * method.c (use_thunk): Likewise.
804 * lex.c (unqualified_name_lookup_error,
805 unqualified_fn_lookup_error): Likewise.
807 2004-10-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
809 Convert diagnostics to use quoting flag q 4/n
810 * except.c (decl_is_java_type, build_throw,
811 is_admissible_throw_operand, check_handlers_1, check_handlers):
813 * friend.c (add_friend, make_friend_class, do_friend): Likewise.
814 * init.c (sort_mem_initializers, emit_mem_initializers,
815 member_init_ok_or_else, expand_member_init, is_aggr_type,
816 build_offset_ref, build_java_class_ref): Likewise.
818 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
820 Convert diagnostics to use quoting flag q 3/n
821 * decl.c (pop_label, duplicate_decls, redeclaration_error_message,
822 redeclaration_error_message, lookup_label, check_goto,
823 make_typename_type, make_unbound_class_template,
824 fixup_anonymous_aggr, check_tag_decl, start_decl, start_decl_1,
825 grok_reference_init, layout_var_decl, maybe_commonize_var,
826 check_for_uninitialized_const_var, reshape_init_array,
827 reshape_init, check_initializer, cp_finish_decl,
828 member_function_or_else, bad_specifiers, grokfndecl, grokvardecl,
829 check_static_variable_definition, compute_array_index_type,
830 create_array_type_for_decl, check_special_function_return_type,
831 grokdeclarator, check_default_argument, grokparms,
832 grok_ctor_properties, grok_op_properties,
833 check_elaborated_type_specifier, xref_tag, finish_enum,
834 build_enumerator, check_function_type, start_preparsed_function,
835 store_parm_decls): Use quoting formats.
836 * decl2.c (grok_array_decl, delete_sanity, check_member_template,
837 check_java_method, check_classfn, finish_static_data_member_decl,
838 grokfield, grokbitfield, grok_function_init,
839 build_anon_union_vars, coerce_new_type, coerce_delete_type,
840 check_default_args): Likewise.
841 * parser.c (cp_parser_decl_specifier_seq): Likewise.
843 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
845 Convert diagnostics to use quoting flag q 2/n
846 * class.c (build_base_path, add_method, alter_access,
847 handle_using_decl, check_bases,
848 maybe_warn_about_overly_private_class, find_final_overrider,
849 warn_hidden, finish_struct_anon, add_implicitly_declared_members,
850 check_bitfield_decl, check_field_decls, layout_empty_base,
851 build_base_field, check_methods, layout_virtual_bases,
852 warn_about_ambiguous_bases, layout_class_type, finish_struct_1,
853 resolve_address_of_overloaded_function, instantiate_type,
854 note_name_declared_in_class): Use format flag "q" for quoting.
856 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
858 Convert diagnostics to use quoting flag q 1/n
859 * error.c (locate_error): Ignore quoting flag q.
860 * call.c (build_user_type_conversion_1, build_operator_new_call,
861 build_object_call, op_error, build_conditional_expr,
862 build_new_op, build_op_delete_call, enforce_access,
863 convert_like_real, convert_arg_to_ellipsis, build_x_va_arg,
864 convert_default_arg, build_over_call, build_new_method_call,
865 joust, perform_implicit_conversion, initialize_reference): Use the
868 2004-10-03 Andrew Pinski <pinskia@physics.uc.edu>
871 * typeck.c (build_reinterpret_cast): Return if the inner type
874 2004-10-01 Jan Hubicka <jh@suse.cz>
876 * semantics.c (expand_body): Update call of tree_rest_of_compilation.
878 2004-09-30 Nathan Sidwell <nathan@codesourcery.com>
880 * cp-tree.h (struct lang_decl): Shrink by reordering fields and
881 turning operator_code and fixed_offset into bitfields.
883 2004-09-29 Joseph S. Myers <jsm@polyomino.org.uk>
885 * decl.c (duplicate_decls): Merge TREE_DEPRECATED.
887 2004-09-29 Jason Merrill <jason@redhat.com>
889 PR tree-optimization/17697
890 * decl.c (duplicate_decls): Copy TREE_NOTHROW from newdecl to olddecl.
892 2004-09-28 Jason Merrill <jason@redhat.com>
895 * class.c (build_base_field): Set TYPE_MODE.
897 2004-09-28 Roger Sayle <roger@eyesopen.com>
900 * g++spec.c (lang_specific_driver): Unrecognized libraries, other
901 than -lc and -lm, may require linking against libstc++.
903 2004-09-28 Kazu Hirata <kazu@cs.umass.edu>
905 * tree.c: Fix a comment typo.
907 2004-09-28 Nathan Sidwell <nathan@codesourcery.com>
909 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): Remove.
910 (struct secondary_vptr_vtt_init_data_s): New.
911 (build_vtt_inits): Adjust dfs_walkers.
912 (dfs_build_secondary_vptr_vtt_inits): Caller data is a
913 secondary_vptr_vtt_init_data_s structure. Adjust.
914 (dfs_ctor_vtable_bases_queue_p): Remove.
915 (dfs_fixup_binfo_vtbls): No need to clear BINFO_MARKED. Simplify.
917 * pt.c (struct get_template_base_data_s): Remove.
918 (get_template_base_r): Fold into get_template_base.
919 (get_template_base): Walk base binfos directly in inheritance
922 2004-09-27 Mark Mitchell <mark@codesourcery.com>
925 * cp-tree.h (fold_if_not_in_template): New function.
926 * call.c (build_conditional_expr): Use fold_if_not_in_template.
927 (build_cxx_call): Likewise.
928 * cvt.c (convert_to_complex): Likewise.
929 (ocp_convert): Likewise.
931 (convert_force): Likewise.
932 * decl.c (compute_array_index_type): Clear
933 processing_template_decl while folding array bounds.
934 * pt.c (convert_nontype_argument): Clear
935 processing_template_decl while processing non-type argument
937 * tree.c (fold_if_not_in_template): New function.
938 * typeck.c (build_class_member_access_expr): Use
939 fold_if_not_in_template.
940 (build_array_ref): Likewise.
941 (build_binary_op): Likewise. Do not try to optimize computations
942 when processing templates.
943 (cp_pointer_int_sum): Use fold_if_not_in_template.
944 (pointer_diff): Likewise.
945 (build_unary_op): Likewise.
946 (build_reinterpret_cast): Likewise.
947 (get_delta_difference): Likewise.
948 (expand_ptrmemfunc_cst): Likewise.
949 (dubious_conversion_warnings): Likewise.
951 2004-09-27 Matt Austern <austern@apple.com>
953 * cp/parser.c (struct cp_token): New one-bit field , implicit_extern_c
954 (cp_lexer_get_preprocessor_token): Set implicit_extern_c for
955 tokens that come from headers that are implicitly extern "C".
956 (struct cp_parser): new one-bit field, implicit_extern_c.
957 (cp_parser_new): Set parser's implicit_extern_c to false.
958 (cp_parser_translation_unit): Pop lang context if we were in a
959 header that was implicitly extern "C".
960 (cp_parser_declaration_seq_opt): Push/pop lang context as
961 required by the token's and parser's implicit_extern_c.
963 2004-09-27 Mark Mitchell <mark@codesourcery.com>
966 * cp-tree.h (shared_member_p): Declare.
967 * search.c (shared_member_p): Give it external linkage.
968 * semantics.c (finish_qualified_id_expr): Use it.
969 (finish_id_expression): Likewise.
972 * semantics.c (finish_id_expression): Do not add "this->" to
973 static member functions.
975 2004-09-27 Nathan Sidwell <nathan@codesourcery.com>
978 * error.c (dump_type): Change TREE_VEC case into TREE_BINFO.
980 * class.c (struct count_depth_data): Remove.
981 (dfs_depth_post, dfs_depth_q): Remove.
982 (find_final_overrider): Use number of vbase classes as depth
985 * cp-tree.h (types_overlap_p): Remove.
986 * search.c (struct overlap_info): Remove.
987 (dfs_check_overlap, dfs_no_overlap_yet, types_overlap_p): Remove.
989 * pt.c (GTB_VIA_VIRTUAL, GTB_IGNORE_TYPE): Remove.
990 (get_template_base_recursive): Remove. Replace with ...
991 (get_template_base_r): ... this.
992 (struct get_template_base_data_s): New.
993 (get_template_base): Use get_template_base_r via dfs_walk. Always
994 return NULL on failure.
995 (unify): Remove error_mark_node check from get_template_base result.
997 2004-09-24 Paolo Bonzini <bonzini@gnu.org>
999 * parser.c (cp_parser_expression_stack): Clarify why it is
1000 an array of NUM_PREC_VALUES elements.
1001 (cp_parser_binary_expression): Clarify why we do not need to
1002 handle stack overflow.
1004 2004-09-24 Nathan Sidwell <nathan@codesourcery.com>
1007 * search.c (lookup_field_queue_p): Correct check for hidden base.
1009 * search.c (bfs_walk): Remove.
1010 (lookup_member): Use dfs_walk_real.
1011 (dfs_walk_real): Move and adjust documentation from bfs_walk.
1013 2004-09-23 Zack Weinberg <zack@codesourcery.com>
1015 * decl.c (grokfndecl): If ::main is found not to return int,
1016 correct it after issuing a diagnostic.
1017 (grokdeclarator): If the incoming type was error_mark_node, do
1018 not complain about declaring something with no type.
1019 (start_function): Change check for ::main not returning int to
1020 an assertion, as grokfndecl now catches this when the user did it.
1021 * init.c (perform_member_init, sort_mem_initializers)
1022 (emit_mem_initializers): Make most diagnostics be issued on
1023 the line of current_function_decl, not whatever the current
1025 * parser.c (cp_lexer_peek_token_emit_debug_info): Surround
1026 definition and declaration with #ifdef ENABLE_CHECKING.
1027 Avoid unnecessary use of fprintf.
1028 (cp_lexer_print_token, cp_lexer_debug_stream): Adjust stub
1029 definitions to avoid warnings.
1030 (cp_lexer_new_main): Add assertion that first token is not a
1032 (cp_lexer_new_from_token_array): Fold into ...
1033 (cp_lexer_new_from_tokens): ... here. Add assertion that
1034 first token is not a padding token.
1035 (cp_lexer_set_source_position_from_token): Move nearer to callers.
1036 Remove unused lexer argument.
1037 (cp_lexer_peek_token): Just print debugging report (if enabled)
1038 and return lexer->next_token.
1039 (cp_lexer_skip_purged_tokens): Delete.
1040 (cp_lexer_next_token_is, cp_lexer_next_token_is_not): Make
1041 inline, simplify bodies.
1042 (cp_lexer_peek_nth_token): Add debugging report a la
1043 cp_lexer_peek_token.
1044 (cp_lexer_consume_token): Correct commentary. Advance over
1045 purged tokens here. Set current source position here, from
1046 token to be returned. Avoid unnecessary use of fprintf.
1047 (cp_lexer_purge_token): Advance next_token pointer over this and
1048 subsequent purged tokens.
1049 (cp_parser_error): Adjust source position to that of the
1051 (cp_parser_push_lexer_for_tokens, cp_parser_pop_lexer): New functions.
1052 (cp_parser_string_literal): Remove some excessive cleverness.
1053 (cp_parser_enum_specifier): Call start_enum before consuming
1055 (cp_parser_member_declaration): Make the "extra semicolon"
1056 diagnostic consistently-worded with the other place this is
1057 diagnosed. Explicitly set the diagnostic location to the
1058 location of the offending semicolon.
1059 (cp_parser_enclosed_template_argument_list): Use %</%> quoting
1060 in diagnostics. Do not use cp_parser_require. Set location
1061 of diagnostics about improper use of '>>' to location of
1063 (cp_parser_late_parsing_for_member):
1064 Use cp_parser_push_lexer_for_tokens and cp_parser_pop_lexer.
1065 (cp_parser_late_parsing_default_args): Likewise. Manually
1066 move some logic outside the loop.
1068 2004-09-23 Andrew Pinski <pinskia@physics.uc.edu>
1071 * cvt.c (cp_convert_to_pointer): Return early when the type is
1074 2004-09-21 Fariborz Jahanian <fjahanian@apple.com>
1078 * decl.c (grokfndecl): Add new argument "attrlist", use it
1079 to call cplus_decl_attributes.
1080 (start_function): Remove call to cplus_decl_attributes.
1081 * cvt.c (ocp_convert): Add support to use type conversion
1082 function to vector type.
1083 * parser.c (cp_parser_conversion_type_id): Add attributes, if any,
1086 2004-09-23 Paolo Bonzini <bonzini@gnu.org>
1090 * parser.c (cp_parser_token_tree_map_node,
1091 cp_parser_pm_expression, cp_parser_additive_expression,
1092 cp_parser_multiplicative_expression, cp_parser_shift_expression,
1093 cp_parser_relational_expression, cp_parser_equality_expression,
1094 cp_parser_and_expression, cp_parser_exclusive_or_expression,
1095 cp_parser_inclusive_or_expression,
1096 cp_parser_logical_and_expression,
1097 cp_parser_logical_or_expression): Removed.
1098 (enum cp_parser_prec, struct cp_parser_token_tree_map_node,
1099 binops, binops_by_token): New.
1100 (cp_parser_assignment_expression): Use cp_parser_binary_expression.
1101 (cp_parser_new): Initialize binops_by_token.
1102 (cp_parser_binary_expression): Rewritten.
1105 2004-09-23 Kazu Hirata <kazu@cs.umass.edu>
1107 * parser.c: Fix a comment typo.
1109 2004-09-23 Nathan Sidwell <nathan@codesourcery.com>
1112 * decl.c (xref_basetypes): Look through typedefs before checking
1115 2004-09-22 Nathan Sidwell <nathan@codesourcery.com>
1117 * cp-tree.h (unemitted_tinfo_decls): Make a VEC(tree).
1118 * decl2.c (cp_finish_file): Adjust tinfo decl emission loop.
1119 * rtti.c (unemitted_tinfo_decls): Make a VEC(tree).
1120 (init_rtti_processing): Initialize it to something realistic.
1121 (get_tinfo_decl): Adjust pushing the new decl.
1123 * cp-tree.h (struct lang_type_class): Remove marked flags, add
1124 diamond_shaped and repeated_base flags. Reorder to keep 8-bit blocks.
1125 (TYPE_MARKED_P): New.
1126 (CLASSTYPE_DIAMOND_SHAPED_P, CLASSTYPE_REPEATED_BASE_P): New.
1127 (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
1128 CLEAR_CLASSTYPE_MARKED_N): Remove.
1129 (CLASSTYPE_MARKED_*, SET_CLASSTYPE_MARKED_*,
1130 CLEAR_CLASSTYPE_MARKED_*): Remove.
1131 * decl.c (xref_basetypes): Use TYPE_MARKED_P. Determine diamond
1132 shaped and repeated base properties.
1133 * lex.c (cxx_make_type): Don't clear TYPE_ALIAS_SET.
1134 * rtti.c (dfs_class_hint_mark, dfs_class_hint_unmark,
1135 class_hint_flags): Remove.
1136 (get_pseudo_ti_init): Use CLASSTYPE_REPEATED_BASE_P and
1137 CLASSTYPE_DIAMOND_SHAPED_P.
1139 2004-09-21 Ziemowit Laski <zlaski@apple.com>
1141 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved here from
1143 (objcp_tsubst_copy_and_build): Reformat function signature.
1144 * cp-objcp-common.h (objcp_tsubst_copy_and_build): Likewise.
1145 (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved to cp-lang.c.
1147 2004-09-21 Zack Weinberg <zack@codesourcery.com>
1149 * parser.c (cp_lexer_peek_token, cp_lexer_consume_token):
1150 Don't handle CPP_PRAGMA tokens specially.
1151 (cp_lexer_handle_pragma): Use cp_lexer_consume_token. Don't
1152 purge the token; do clear token->value after processing. Add
1153 assertion at beginning that token->value is nonzero.
1154 (cp_parser_statement, cp_parser_declaration_seq_opt): Handle
1155 CPP_PRAGMA as a full statement or declaration in its own right.
1157 2004-09-21 Matt Austern <austern@apple.com>
1160 * decl.c (grokvardecl): Accept declarations of global variables
1161 using anonymous types.
1163 2004-09-21 Roger Sayle <roger@eyesopen.com>
1166 * tree.c (lvalue_p_1): Disallow MIN_EXPR and MAX_EXPR as lvalues
1167 if either operand has side-effects.
1168 * typeck.c (rationalize_conditional_expr): Assert that neither
1169 operand of MIN_EXPR or MAX_EXPR has side-effects.
1170 (build_modify_expr): Add support for MIN_EXPR and MAX_EXPR.
1171 Check that the "lhs" is a valid lvalue, i.e. that neither operand
1172 of a MIN_EXPR or MAX_EXPR has a side-effect.
1174 2004-09-21 Nathan Sidwell <nathan@codesourcery.com>
1176 * cp-tree.h (struct lang_type_header): Remove
1177 uses_multiple_inheritance field.
1178 (TYPE_USES_MULTIPLE_INHERITANCE): Remove.
1179 (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): Remove.
1180 (TYPE_USES_VIRTUAL_BASECLASSES): Remove.
1181 (DECL_NEEDS_VTT_PARM_P): Use CLASSTYPE_VBASECLASSES.
1182 (TYPE_CONTAINS_VPTR_P): Likewise.
1183 * call.c (add_template_candidate_real): Use
1184 CLASSTYPE_VBASECLASSES.
1185 (build_special_member_call): Likewise.
1186 * class.c (finish_struct_bits): Remove
1187 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P & TYPE_USES_VIRTUAL_BASECLASSES
1189 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
1190 (create_vtable_ptr): Remove TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P
1192 (build_vtt_inits): Use CLASSTYPE_VBASECLASSES.
1193 (accumulate_vtbl_inits, build_vbase_offset_vtbl_entries):
1195 * decl.c (xref_basetypes): Remove TYPE_USES_MULTIPLE_INHERITANCE,
1196 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
1198 (cxx_maybe_build_cleanup): Use CLASSTYPE_VBASECLASSES.
1199 * decl2.c (maybe_retrofit_in_chrg): Likewise.
1200 * init.c (expand_member, push_base_cleanups): Likewise.
1201 * pt.c (instantiate_class_template): Remove
1202 TYPE_USES_MULTIPLE_INHERITANCE,
1203 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
1205 * ptree.c (cxx_print_type): Remove TYPE_USES_MULTIPLE_INHERITANCE
1207 * typeck2.c (process_init_constructor): Replace some sorrys with
1210 2004-09-21 Andreas Tobler <a.tobler@schweiz.ch>
1212 * decl.c (reshape_init_array): Initialize max_index_cst to fix
1215 2004-09-20 Mark Mitchell <mark@codesourcery.com>
1218 * pt.c (tsubst): Fix parentheses to accomodate emacs.
1219 (tsubst_baselink): If we get a single function, mark it as used.
1221 2004-09-20 Matt Austern <austern@apple.com>
1222 Zack Weinberg <zack@codesourcery.com>
1224 * decl.c (make_rtl_for_nonlocal_decl, start_preparsed_function):
1225 Apply lbasename to input_filename before passing to get_fileinfo.
1226 * semantics.c (begin_class_definition): Likewise.
1227 * lex.c (handle_pragma_interface): Apply get_fileinfo to the
1228 correct filename. Rename variables to be less confusing.
1229 (handle_pragma_implementation): Likewise. Disable "appears
1230 after file is included" diagnostic.
1232 * parser.c (struct cp_token): Add in_system_header fiag.
1233 (CP_TOKEN_BLOCK_NUM_TOKENS, struct cp_token_block)
1234 (CP_TOKEN_BUFFER_SIZE, cp_token_cache_push_token)
1235 (CPP_NONE, cp_lexer_read_token): Delete.
1236 (struct cp_lexer): Remove first_token, string_tokens,
1237 main_lexer_p fields. Clarify comments.
1238 (struct cp_token_cache): Now just a pair of pointers.
1239 (CP_LEXER_BUFFER_SIZE): New #define.
1240 (CPP_PURGED): New fake token type.
1241 (cp_lexer_new_from_token_array, cp_lexer_destroy)
1242 (cp_lexer_peek_token_emit_debug_info, cp_lexer_skip_purged_tokens)
1243 (cp_lexer_handle_pragma, cp_token_cache_new, cp_parser_string_literal):
1245 (cp_lexer_new_from_tokens): Now a simple wrapper around
1246 cp_lexer_new_from_token_array.
1247 (cp_lexer_set_source_position_from_token): Also update
1249 (cp_lexer_next_token, cp_lexer_prev_token, cp_lexer_advance_token):
1251 (cp_lexer_token_difference): Dont handle wrapping round.
1252 (cp_lexer_new_main): Enable pragma deferral and raw strings,
1253 read the entire translation unit through c_lex_with_flags into
1254 this lexer's buffer, then turn raw strings back off again.
1255 (cp_lexer_grow_buffer): Adjust for buffer no longer being circular.
1256 (cp_lexer_get_preprocessor_token): No need to handle not being
1257 the main lexer. Set token->in_system_header too.
1258 (cp_lexer_peek_token): Skip purged tokens. Feed pragma tokens
1259 to cp_lexer_handle_pragma. No need to call cp_lexer_read_token.
1260 (cp_lexer_peek_nth_token): Likewise.
1261 (cp_lexer_purge_token): Mark the token PURGED, don't shift all
1262 the other tokens down.
1263 (cp_lexer_purge_tokens_after): Likewise.
1264 (cp_lexer_save_tokens, cp_lexer_rollback_tokens): Don't worry
1265 about there being no tokens.
1266 (cp_lexer_print_token): Revise to give useful information on
1268 (struct cp_parser): Add field translate_strings_p.
1269 (cp_parser_new): Initialize it.
1270 (cp_parser_translation_unit): Destroy the lexer when done.
1271 (cp_parser_parameter_declaration): Restructure saving of
1273 (cp_parser_save_member_function_body): Likewise.
1274 (cp_parser_check_for_invalid_template_id)
1275 (cp_parser_nested_name_specifier_opt, cp_parser_template_id):
1276 Adjust calls to cp_lexer_advance_token.
1277 (cp_parser_skip_to_closing_parenthesis, cp_parser_declaration):
1278 No need to fiddle c_lex_string_translate.
1279 (cp_parser_primary_expression, cp_parser_linkage_specification)
1280 (cp_parser_asm_definition, cp_parser_asm_specification_opt)
1281 (cp_parser_asm_operand_list, cp_parser_asm_clobber_list)
1282 Use cp_parser_string_literal.
1283 (cp_parser_attribute_list): Save and restore
1284 parser->translate_strings_p, not c_lex_string_translate.
1285 (cp_parser_cache_group): Delete.
1286 (cp_parser_cache_group_1): Rename cp_parser_cache_group. Do
1287 not take a cache argument.
1289 2004-09-20 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1292 * decl.c (reshape_init): Extract array handling into...
1293 (reshape_init_array): New function. Use integers instead of trees
1294 for indices. Handle out-of-range designated initializers.
1296 2004-09-20 Steven Bosscher <stevenb@suse.de>
1298 * lex.c (cxx_init): Don't set the ridpointer for RID_NULL
1301 2004-09-19 Mark Mitchell <mark@codesourcery.com>
1303 * decl2.c (determine_visibility): Allow class visibility
1304 directives to override targetm.cxx.export_class_data.
1306 2004-09-18 Kazu Hirata <kazu@cs.umass.edu>
1308 * call.c, semantics.c: Follow spelling conventions.
1309 * class.c: Fix a comment typo.
1311 2004-09-16 Geoffrey Keating <geoffk@apple.com>
1314 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
1315 (handle_pragma_implementation): Likewise.
1317 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
1318 Zack Weinberg <zack@codesourcery.com>
1320 * cp-tree.def: Use tree_code_class enumeration constants
1321 instead of code letters.
1322 * call.c, class.c, cp-gimplify.c, cp-lang.c, cxx-pretty-print.c
1323 * mangle.c, pt.c, semantics.c, tree.c, typeck.c:
1324 Update for new tree-class enumeration constants.
1326 2004-09-16 Mark Mitchell <mark@codesourcery.com>
1329 * parser.c (cp_parser_simple_declaration): Commit to tentative
1330 parses after seeing a decl-specifier.
1331 (cp_parser_simple_declaration): Eliminate spurious message.
1332 (cp_parser_init_declarator): Adjust error message.
1335 * lex.c (unqualified_name_lookup_error): Mark the dummy
1336 declaration as used.
1339 * parser.c (cp_parser_nested_name_specifier): Do not resolve
1340 typename types if the user explicitly said "typename".
1342 2004-09-16 Andrew MacLeod <amacleod@redhat.com>
1344 * error.c (dump_decl): Make sure there is lang_specific info before
1345 checking for DTOR and CTOR decls.
1347 2004-09-16 Nathan Sidwell <nathan@codesourcery.com>
1349 * class.c (copy_virtuals): Remove.
1350 (build_primary_vtable): Use copy_list directly.
1351 (build_secondary_vtable): Likewise.
1352 (update_vtable_entry_for_fn): Clear BV_CALL_INDEX here.
1353 (create_vtable_ptr): Likewise.
1355 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
1357 * search.c: Follow spelling conventions.
1359 2004-09-16 Nathan Sidwell <nathan@codesourcery.com>
1361 * cp-tree.h (struct lang_type_class): Make pure_virtuals a
1363 (CLASSTYPE_INLINE_FRIENDS, CLASSTYPE_PURE_VIRTUALS): Update
1365 * call.c (build_new_method_call): Don't confirm a pure virtual is
1366 in CLASSTYPE_PURE_VIRTUALS. Reorder checks. Make it a warning.
1367 * class.c (check_methods): CLASSTYPE_INLINE_FRIENDS is a VEC(tree).
1368 (fixup_inline_methods, finish_struct): Likewise.
1369 * decl.c (finish_method): Likewise.
1370 * search.c (dfs_get_pure_virtuals, get_pure_virtuals):
1371 CLASSTYPE_PURE_VIRTUALS is a VEC(tree).
1372 * typeck2.c (abstract_virtuals_error): Likewise. Truncate the
1373 vector to avoid repeating the list in error messages.
1375 2004-09-15 Mark Mitchell <mark@codesourcery.com>
1377 * cp-objcp-common.h (LANG_HOOKS_COMDAT_GROUP): Define.
1378 * cp-tree.h (cxx_comdat_group): Declare.
1379 * decl.c (cxx_comdat_group): New function.
1381 2004-09-15 Nathan Sidwell <nathan@codesourcery.com>
1383 * search.c (get_pure_virtuals): Remove unused variables.
1385 * cp-tree.h (struct lang_decl_flags): Remove
1386 needs_final_overrider.
1387 (DECL_NEEDS_FINAL_OVERRIDER_P): Remove.
1388 * decl.c (duplicate_decls): Do not copy DECL_NEEDS_FINAL_OVERRIDER_P.
1389 * class.c (finish_struct_bits): Correct comment about
1390 CLASSTYPE_PURE_VIRTUALS.
1391 * search.c (get_pure_virtuals): Remove useless loop.
1393 2004-09-14 Mark Mitchell <mark@codesourcery.com>
1396 * mangle.c (partially_mangled_name): New variable.
1397 (partially_mangled_name_len): Likewise.
1398 (save_partially_mangled_name): New function.
1399 (restore_partially_mangled_name): Likewise.
1400 (write_encoding): Save and restore partially mangled names around
1401 calls to get_mostly_instantiated_function_type.
1402 (write_unqualified_name): Likewise.
1404 2004-09-14 Nathan Sidwell <nathan@codesourcery.com>
1406 * pt.c (unify): Replace gcc_unreachable with gcc_assert.
1408 2004-09-13 Mark Mitchell <mark@codesourcery.com>
1411 * parser.c (cp_parser_id_expression): Correct value for
1413 (cp_parser_nested_name_specifier_opt): Look through typenames as
1415 (cp_parser_template_name): Honor check_dependency_p.
1418 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name):
1422 * pt.c (unify): Add ENUMERAL_TYPE case. Replace sorry with
1425 2004-09-12 Richard Henderson <rth@redhat.com>
1428 * semantics.c (maybe_cleanup_point_expr): Don't call fold.
1429 * typeck.c (condition_conversion): Likewise.
1431 2004-09-11 Richard Henderson <rth@redhat.com>
1434 * pt.c (cur_stmt_expr): Move from tsubst_expr.
1435 (tsubst_expr) <case STMT_EXPR>: Move ...
1436 (tsubst_copy_and_build): ... here.
1438 2004-09-10 Zack Weinberg <zack@codesourcery.com>
1440 * cp-tree.h (interface_only, interface_unknown): Delete declarations;
1441 comment explaining them moved to c-common.h.
1442 * lex.c (interface_only, interface_unknown, extract_interface_info):
1444 (cxx_finish): Don't reset interface_unknown.
1445 (handle_pragma_interface): Don't set interface_only and
1446 interface_unknown; just the like-named fields in finfo.
1447 (handle_pragma_implementation): Adjust comment.
1448 * decl2.c (cp_finish_file): Don't reset interface_only and
1450 * method.c (synthesize_method): Don't reset interface_unknown or
1451 call extract_interface_info.
1452 * pt.c (pop_tinst_level): Don't call extract_interface_info.
1453 * decl.c (start_cleanup_fn): Don't save or restore interface_only
1454 and interface_unknown.
1455 (make_rtl_for_nonlocal_decl): Call get_fileinfo on input_filename
1456 and use the result instead of the interface_only/interface_unknown
1458 (start_preparsed_function): Likewise.
1459 * lex.c (cxx_make_type): Likewise.
1460 * semantics.c (begin_class_definition): Likewise.
1461 (expand_body): Don't call extract_interface_info.
1463 2004-09-10 Ziemowit Laski <zlaski@apple.com>
1465 * decl.c (objc_mark_locals_volatile): Make description of
1466 routine more descriptive; only mark VAR_DECLs at each
1469 2004-09-10 Richard Henderson <rth@redhat.com>
1472 * call.c (build_vfield_ref): Move...
1473 * class.c (build_vfield_ref): ... here. Convert datum to the
1474 primary base containing the vptr.
1475 (make_new_vtable): Simplify build_primary_vtable arguments.
1476 (finish_struct_1): Do not duplicate TYPE_VFIELD.
1477 * typeck.c (build_class_member_access_expr): Don't warn for
1478 null object access to base fields.
1480 2004-09-10 Ziemowit Laski <zlaski@apple.com>
1482 * decl.c (objc_get_current_scope, objc_mark_locals_volatile):
1483 New functions, to be called from ObjC++.
1485 2004-09-10 Kazu Hirata <kazu@cs.umass.edu>
1487 * class.c, cp-tree.h, decl.c, decl2.c, mangle.c,
1488 name-lookup.h, parser.c, search.c, semantics.c, typeck2.c: Fix
1491 2004-09-09 Ziemowit Laski <zlaski@apple.com>
1493 * typeck.c (build_c_cast): Preserve the cast if casting
1494 to and from an Objective-C type.
1496 2004-09-09 Ziemowit Laski <zlaski@apple.com>
1498 * Make-lang.in (cp/typeck.o): Depend on c-common.h.
1499 * typeck.c: Include c-common.h.
1500 (comptypes): For RECORD_TYPEs, call objc_comptypes() and
1501 return the result if nonnegative.
1503 2004-09-09 Zack Weinberg <zack@codesourcery.com>
1505 * decl2.c (import_export_class)
1506 * lex.c (handle_pragma_interface):
1507 Test MULTIPLE_SYMBOL_SPACES with if, not #ifdef.
1509 2004-09-08 Ziemowit Laski <zlaski@apple.com>
1511 * Make-lang.in (cp/semantics.o): Depend on c-common.h.
1512 * semantics.c: Include c-common.h.
1513 (finish_compound_stmt): Call objc_clear_super_receiver().
1515 2004-09-08 Ziemowit Laski <zlaski@apple.com>
1517 * cp-tree.h (do_poplevel): New prototype.
1518 * semantics.c (do_poplevel): Make externally visible.
1520 2004-09-08 Nathan Sidwell <nathan@codesourcery.com>
1522 * cp-tree.h (tree_pair_s): Define a GC'd vector.
1523 * name-lookup.h (cxx_saved_binding, cp_class_binding): Likewise.
1524 * semantics.c (deferred_access): Likewise.
1526 2004-09-06 Daniel Jacobowitz <dan@debian.org>
1528 * semantics.c (expand_body): Assert that we are not nested.
1530 2004-09-06 Zack Weinberg <zack@codesourcery.com>
1532 * decl.c (build_enumerator): Use add_double and int_fits_type_p
1533 instead of cp_build_binary_op, to avoid creating short-lived trees.
1534 * parser.c (cp_parse_type_specifier <RID_ENUM>): Use two-token
1535 lookahead instead of backtracking. Move some code to avoid a
1537 (cp_parser_enum_specifier): Avoid duplication of effort with caller.
1538 Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
1539 (cp_parser_enumerator_list, cp_parser_enumerator_definition):
1540 Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
1542 2004-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1544 * decl.c (grok_declarator): Remove a redundant semicolon.
1546 * parser.c (cp_parser_decl_specifier_seq, cp_parser_type_specifier):
1547 Correct comments describing function parameters.
1549 2004-09-03 Matt Austern <austern@apple.com>
1550 Compile speed improvement.
1551 * parser.c (cp_lexer_print_token): Only define if ENABLE_CHECKING set.
1552 Otherwise define a stub macro that expands to nothing.
1553 (cp_lexer_debugging_p): Only define if ENABLE_CHECKING set. Otherwise
1554 define a stub macro that expands to 0.
1555 (cp_lexer_start_debugging): Only define if ENABLE_CHECKING set.
1556 (cp_lexer_stop_debugging): Likewise.
1557 (cp_lexer_debug_stream): Only define if ENABLE_CHECKING set. Otherwise
1558 define a stub macro that expands to NULL.
1559 (cp_lexer_new_main): Only set debugging_p if ENABLE_CHECKING set.
1560 (cp_lexer_new_from_tokens): Likewise.
1562 2004-09-03 Jan Hubicka <jh@suse.cz>
1564 * decl.c (finish_function): Clean out pointers we no longer need.
1566 2004-09-03 Jan Beulich <jbeulich@novell.com>
1568 * g++spec.c (MATH_LIBRARY_PROFILE): Default to MATH_LIBRARY rather
1571 2004-09-02 Paul Brook <paul@codesourcery.com>
1573 * decl2.c (determine_visibility): Only check data visibility
1576 2004-08-31 Mark Mitchell <mark@codesourcery.com>
1578 * cp-tree.h (DECL_CONSTRUCTION_VTABLE_P): New macro.
1579 * class.c (build_ctor_vtbl_group): Set DECL_CONSTRUCTION_VTABLE_P.
1580 * decl2.c (determine_visibility): Honor
1581 TARGET_CXX_EXPORT_CLASS_DATA.
1583 * class.c (key_method): Rename to ...
1584 (determine_key_method): ... this.
1585 (finish_struct_1): Adjust accordingly.
1586 * cp-tree.h (key_method): Declare.
1587 * decl2.c (maybe_emit_vtables): Determine the key method here if
1588 it has not already been done.
1590 2004-08-31 Ziemowit Laski <zlaski@apple.com>
1592 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-objcp-common.o.
1593 (cp/cp-lang.o): Depend on debug.h, gtype-cp.h and cp/cp-objcp-common.h.
1594 (cp/cp-decl.c): Do not depend on gtype-cp.h.
1595 (cp/cp-objcp-common.o): New target.
1596 * cp-lang.c: Include debug.h, cp-objcp-common.h and gtype-cp.h.
1597 (cxx_get_alias_set, cxx_warn_unused_global_decl, cp_expr_size,
1598 cp_tree_size, cp_var_mod_type_p, cxx_initialize_diagnostics): Move
1599 prototypes and definitions to cp-objcp-common.h and cp-objcp-common.c,
1601 (LANG_HOOKS_TREE_SIZE, LANG_HOOKS_FINISH,
1602 LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_INIT_OPTIONS,
1603 LANG_HOOKS_INITIALIZE_DIAGNOSTICS, LANG_HOOKS_HANDLE_OPTION,
1604 LANG_HOOKS_HANDLE_FILENAME, LANG_HOOKS_MISSING_ARGUMENT,
1605 LANG_HOOKS_POST_OPTIONS, LANG_HOOKS_GET_ALIAS_SET,
1606 LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_EXPAND_EXPR,
1607 LANG_HOOKS_EXPAND_DECL, LANG_HOOKS_PARSE_FILE,
1608 LANG_HOOKS_DUP_LANG_SPECIFIC_DECL, LANG_HOOKS_TRUTHVALUE_CONVERSION,
1609 LANG_HOOKS_SET_DECL_ASSEMBLER_NAME, LANG_HOOKS_MARK_ADDRESSABLE,
1610 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
1611 LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
1612 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_PRINT_ERROR_FUNCTION,
1613 LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL, LANG_HOOKS_WRITE_GLOBALS,
1614 LANG_HOOKS_FUNCTION_INIT, LANG_HOOKS_FUNCTION_FINAL,
1615 LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P,
1616 LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE,
1617 LANG_HOOKS_ATTRIBUTE_TABLE, LANG_HOOKS_TREE_INLINING_WALK_SUBTREES,
1618 LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN,
1619 LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS,
1620 LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P,
1621 LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P,
1622 LANG_HOOKS_TREE_INLINING_VAR_MOD_TYPE_P,
1623 LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN,
1624 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN, LANG_HOOKS_EXPR_SIZE,
1625 LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR,
1626 LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, LANG_HOOKS_MAKE_TYPE,
1627 LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE,
1628 LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
1629 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE, LANG_HOOKS_INCOMPLETE_TYPE_ERROR,
1630 LANG_HOOKS_TYPE_PROMOTES_TO, LANG_HOOKS_REGISTER_BUILTIN_TYPE,
1631 LANG_HOOKS_GIMPLIFY_EXPR, LANG_HOOKS_FOLD_OBJ_TYPE_REF): Move
1632 hooks to cp-objcp-common.h.
1633 (finish_file): New function.
1634 * cp-objcp-common.c: New file.
1635 * cp-objcp-common.h: New file.
1636 * cp-tree.h (cp_finish_file): New prototype.
1637 * decl.c: Do not include gtype-cp.h.
1638 * decl2.c (finish_file): Rename to cp_finish_file.
1640 2004-08-31 Richard Henderson <rth@redhat.com>
1643 * pt.c (tsubst_expr): Move OFFSETOF_EXPR handling ...
1644 (tsubst_copy_and_build): ... here.
1646 2004-08-30 Mark Mitchell <mark@codesourcery.com>
1648 * cp-tree.h (initialize_artificial_var): Declare.
1649 * decl.c (initialize_artifical_var): New function.
1650 * class.c (initialize_array): Remove.
1651 (initialize_vtable): Use initialize_artificial_var.
1652 (build_vtt): Likewise.
1653 (build_ctor_vtbl_group): Likewise.
1655 2004-08-30 Richard Henderson <rth@redhat.com>
1657 * class.c (build_base_path): Use build_address directly.
1658 * typeck.c (build_unary_op): Don't lower &a.b to pointer
1659 arithmetic directly.
1660 * typeck2.c (store_init_value): Don't assume !TREE_CONSTANT
1661 means !initializer_constant_valid_p.
1663 2004-08-30 Richard Henderson <rth@redhat.com>
1665 * class.c (fixed_type_or_null): Use get_base_address before
1666 assuming an ADDR_EXPR is non-null.
1668 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
1670 * name-lookup.c (pop_binding, pushdecl,
1671 set_identifier_type_value_with_scope, push_overloaded_decl,
1672 arg_assoc_type): Replace abort with gcc_assert or gcc_unreachable.
1673 * parser.c (cp_parser_diagnose_invalid_type_name,
1674 cp_parser_postfix_expression, cp_parser_unary_expression,
1675 cp_parser_check_declarator_template_para): Likewise.
1676 * pt.c (push_inline_template_parms_recursive,
1677 check_explicit_specialization, convert_nontype_argument,
1678 coerce_template_template_parms, uses_template_parms,
1679 instantiate_class_template, tsubst_decl, tsubst, tsubst_copy,
1680 tsubst_expr, instantiate_template,
1681 maybe_adjust_types_for_deduction, type_unification_real,
1682 resolve_overloaded_unification, template_decl_level,
1683 type_dependent_expression_p): Likewise.
1684 * search.c (lookup_base_r): Likewise.
1685 * semantics.c (finish_stmt_expr, simplify_aggr_init_expr): Likewise.
1686 * tree.c (lvalue_p_1, count_functions, cxx_printable_name,
1687 verify_stmt_tree_r, get_type_decl, stabilize_call): Likewise.
1688 * typeck.c (common_type, get_member_function_from_ptrfunc,
1689 build_binary_op, build_unary_op, expand_ptrmemfunc_cst): Likewise.
1690 * typeck2.c (cxx_incomplete_type_diagnostic,
1691 split_nonconstant_init_1, store_init_value,
1692 process_init_constructor): Likewise.
1694 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
1696 * call.c (check_dtor_name): Replace abort with gcc_assert or
1698 (build_call, add_builtin_candidate, build_new_op,
1699 convert_like_real, build_over_call, in_charge_arg_for_name,
1700 source_type, joust): Likewise.
1701 * class.c (build_simple_base_path, get_vcall_index,
1702 finish_struct_1, instantiate_type, get_enclosing_class,
1703 add_vcall_offset_vtbl_entries_1, cp_fold_obj_type_ref): Likewise.
1704 * cp-gimplify.c (cp_genericize): Likewise.
1705 * cp-lang.c (cp_expr_size, cp_tree_size): Likewise.
1706 * cvt.c (cp_convert_to_pointer, ocp_convert): Likewise.
1707 * decl.c (poplevel, make_unbound_class_template, reshape_init,
1708 check_special_function_return_type, grokdeclarator,
1709 grok_op_properties, tag_name, xref_tag, start_preparsed_function,
1710 finish_function): Likewise.
1711 * decl2.c (grokfield, maybe_emit_vtables):Likewise.
1712 * error.c (dump_global_iord, dump_decl, dump_template_decl,
1713 language_to_string): Likewise.
1714 * except.c (choose_personality_routine): Likewise.
1715 * friend.c (do_friend): Likewise.
1716 * g++spec.c (lang_specific_driver): Likewise.
1717 * init.c (build_zero_init, expand_default_init, build_new_1,
1718 build_vec_delete_1, build_vec_init, build_dtor_call): Likewise.
1719 * lex.c (retrofit_lang_decl, cp_type_qual_from_rid): Likewise.
1720 * mangle.c (add_substitution, write_unscoped_name,
1721 write_template_prefix, write_identifier,
1722 write_special_name_destructor, write_type, write_builtin_type,
1723 write_expression, write_template_param,
1724 write_java_integer_type_codes): Likewise.
1725 * method.c (implicitly_declare_fn): Likewise.
1727 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
1729 * cp-tree.h (BINFO_PRIMARY_P): Use a binfo flag.
1730 (BINFO_INDIRECT_PRIMARY_P): Remove.
1731 * class.c (determine_primary_base): Rename to ...
1732 (determine_primary_bases): ... here. Set all primary bases.
1733 (set_primary_base): Remove.
1734 (mark_primary_bases): Remove.
1735 (build_simple_base_path, walk_subobject_offsets,
1736 propagate_binfo_offsets, end_of_class): Adjust.
1737 (layout_class_type): Rename determine_primary_base call.
1738 (dump_class_hierarchy_r, dump_vtable): Adjust. Don't pass a binfo
1740 (dfs_build_secondary_vptr_vtt_inits, dfs_accumulate_vtbl_inits,
1741 build_rtti_vtbl_entries): Adjust.
1742 * init.c (build_vtbl_address): Adjust.
1744 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Use gcc_assert.
1746 2004-08-28 Ziemowit Laski <zlaski@apple.com>
1748 * Make-lang.in (CXX_OBJS): Split up into CXX_OBJS and
1749 CXX_AND_OBJCXX_OBJS.
1750 (CXX_C_OBJS): Include in CXX_AND_OBJCXX_OBJS instead of listing
1751 separately on the link line.
1753 2004-08-28 Jason Merrill <jason@redhat.com>
1755 * decl.c (expand_static_init): Avoid bogus warnings.
1757 2004-08-27 Jason Merrill <jason@redhat.com>
1760 * tree.c (stabilize_init): See through a COMPOUND_EXPR.
1763 * decl.c (expand_static_init): Use thread-safety API.
1764 (register_dtor_fn): Return the call, don't expand it.
1765 * tree.c (add_stmt_to_compound): New fn.
1766 (stabilize_call): Use it.
1768 2004-08-27 Richard Henderson <rth@redhat.com>
1770 * cp-tree.def (OFFSETOF_EXPR): New.
1771 * parser.c (cp_parser_builtin_offsetof): Either built an
1772 OFFSETOF_EXPR, or call fold_offsetof immediately.
1773 * pt.c (tsubst_expr): Handle OFFSETOF_EXPR.
1775 2004-08-27 Nathan Sidwell <nathan@codesourcery.com>
1777 * call.c (validate_conversion_obstack): Replace
1778 my_friendly_assert with gcc_assert or gcc_unreachable.
1779 (direct_reference_binding, merge_conversion_sequences,
1780 build_user_type_conversion_1, perform_overload_resolution,
1781 build_op_delete_call, enforce_access, call_builtin_trap,
1782 build_over_call, build_special_member_call, build_new_method_call,
1783 initialize_reference): Likewise.
1784 * class.c (build_base_path, build_primary_vtable, alter_access,
1785 check_bases, update_vtable_entry_for_fn, layout_empty_base,
1786 clone_function_decl, adjust_clone_args,
1787 type_requires_array_cookie, include_empty_classes,
1788 finish_struct_1, resolve_address_of_overloaded_function,
1789 instantiate_type, get_vtbl_decl_for_binfo, build_vtt_inits,
1790 dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
1791 accumulate_vtbl_inits, build_vtbl_initializer,
1792 build_vbase_offset_vtbl_entries, build_rtti_vtbl_entries): Likewise.
1793 * cvt.c (build_up_reference, convert_to_reference): Likewise.
1794 * decl.c (poplevel, duplicate_decls, make_typename_type,
1795 cxx_init_decl_processing, reshape_init, check_initializer,
1796 make_rtl_for_nonlocal_decl, initialize_local_var, cp_finish_decl,
1797 expand_static_init, grokfndecl, grokvardecl, build_ptrmem_type,
1798 grokdeclarator, copy_fn_p, grok_op_properties, xref_tag,
1799 xref_basetypes, start_preparsed_function, save_function_data,
1800 finish_function, finish_method, maybe_register_incomplete_var,
1801 complete_vars): Likewise.
1802 * decl2.c (grok_array_decl, check_member_template,
1803 check_classfn, finish_static_data_member_decl, coerce_new_type,
1804 coerce_delete_type, import_export_class, decl_needed_p,
1805 determine_visibility, import_export_decl, build_cleanup,
1806 start_static_initialization_or_destructi, do_static_destruction,
1807 prune_vars_needing_no_initialization,
1808 build_offset_ref_call_from_tree): Likewise.
1809 * error.c (dump_decl, dump_expr): Likewise.
1810 * init.c (finish_init_stmts, build_zero_init,
1811 expand_virtual_init, expand_default_init, expand_aggr_init_1,
1812 build_offset_ref, build_new_1, build_delete, build_vbase_delete):
1814 * mangle.c (write_method_parms, write_template_args,
1815 write_expression, write_template_arg): Likewise.
1816 * method.c (make_thunk, finish_thunk, use_thunk): Likewise.
1817 * name-lookup.c (pop_binding, begin_scope, leave_scope,
1818 resume_scope, push_using_decl, validate_nonmember_using_decl,
1819 is_ancestor, poplevel_class, set_inherited_value_binding_p,
1820 push_class_level_binding, do_class_using_decl, push_namespace,
1821 pop_namespace, add_using_namespace, ambiguous_decl,
1822 lookup_namespace_name, lookup_type_current_level,
1823 maybe_process_template_type_declaration): Likewise.
1824 * parser.c (cp_lexer_peek_nth_token,
1825 cp_parser_parse_and_diagnose_invalid_typ,
1826 cp_parser_translation_unit, cp_parser_template_id,
1827 cp_parser_lookup_name, cp_parser_late_parsing_for_member): Likewise.
1828 * pt.c (push_access_scope, finish_member_template_decl,
1829 push_inline_template_parms_recursive, add_outermost_template_args,
1830 get_innermost_template_args, begin_explicit_instantiation,
1831 end_explicit_instantiation, retrieve_specialization,
1832 is_specialization_of, is_specialization_of_friend,
1833 register_specialization, check_explicit_specialization,
1834 comp_template_parms, process_template_parm,
1835 process_partial_specialization, convert_nontype_argument,
1836 coerce_template_template_parms, coerce_template_parms,
1837 mangle_class_name_for_template, lookup_template_function,
1838 lookup_template_class, instantiate_class_template, tsubst_decl,
1839 tsubst_function_type, tsubst, tsubst_qualified_id, tsubst_copy,
1840 instantiate_template, fn_type_unification, type_unification_real,
1841 get_template_base, regenerate_decl_from_template,
1842 template_for_substitution, instantiate_decl,
1843 get_mostly_instantiated_function_type, dependent_scope_ref_p,
1844 value_dependent_expression_p, resolve_typename_type): Likewise.
1845 * repo.c (repo_emit_p): Likewise.
1846 * rtti.c (build_headof, get_tinfo_decl, get_pseudo_ti_init,
1847 create_tinfo_types, emit_tinfo_decl): Likewise.
1848 * search.c (lookup_base_r, lookup_base, lookup_field_1,
1849 dfs_access_in_type, build_baselink, lookup_member,
1850 adjust_result_of_qualified_name_lookup, copied_binfo): Likewise.
1851 * semantics.c (perform_or_defer_access_check,
1852 finish_non_static_data_member, finish_stmt_expr_expr,
1853 finish_stmt_expr, finish_call_expr, finish_pseudo_destructor_expr,
1854 finish_template_template_parm, finish_member_declaration,
1855 emit_associated_thunks): Likewise.
1856 * tree.c (build_target_expr_with_type, force_target_expr,
1857 copy_binfo, get_first_fn, cp_tree_equal): Likewise.
1858 * typeck.c (type_after_usual_arithmetic_conversions, comptypes,
1859 cxx_sizeof_or_alignof_type, perform_integral_promotions,
1860 build_class_member_access_expr, finish_class_member_access_expr,
1861 build_ptrmemfunc_access_expr, build_unary_op,
1862 unary_complex_lvalue, cxx_mark_addressable, build_modify_expr,
1863 build_ptrmemfunc, expand_ptrmemfunc_cst, check_return_expr
1864 * typeck2.c (complete_type_check_abstract,
1865 abstract_virtuals_error, process_init_constructor,
1866 add_exception_specifier): Likewise.
1868 2004-08-27 Nathan Sidwell <nathan@codesourcery.com>
1870 * class.c (build_vtbl_initializer): Use ssize_int.
1871 * decl.c (complete_array_type): Likewise.
1872 * method.c (finish_thunk): Likewise.
1873 * search.c (get_dynamic_base_type): Likewise.
1875 2004-08-26 Richard Henderson <rth@redhat.com>
1877 * cp-tree.h (DECL_FIELD_IS_BASE): New.
1878 * class.c (build_base_field): Set it.
1879 (build_simple_base_path): Use it.
1880 (fixed_type_or_null): Don't consider base fields definitive.
1882 2004-08-25 Roger Sayle <roger@eyesopen.com>
1885 PR tree-optimization/16372
1886 * decl.c (finish_enum): Make the precision of the enumerated type
1887 the same width as the underlying integer type.
1889 2004-08-25 Mark Mitchell <mark@codesourcery.com>
1892 * lex.c (build_lang_decl): Set DECL_NO_STATIC_CHAIN for all C++
1895 * mangle.c (get_identifier_nocopy): Add cast.
1897 * cp-tree.h (mangle_type): Remove.
1898 * mangle.c (globals): GTY it.
1899 (mangle_obstack): New variable.
1900 (name_obstack): Likewise.
1901 (name_base): Likewise.
1902 (write_char): Adjust accordingly.
1903 (write_chars): Likewise.
1904 (write_string): Likewise.
1905 (start_mangling): Initialize G.substitutions only one. Add
1907 (finish_mangling): Use VARRAY_CLEAR to reclaim
1908 storage in G.substitutions. Use obstack_finish.
1909 (init_mangle): Adjust for changes to variable names above.
1910 Initialize G.substitutions.
1911 (mangle_decl_string): Adjust call to start_mangling.
1912 (get_identifier_nocopy): New function.
1913 (mangle_decl): Use it.
1914 (mangle_type_string): Adjust call to start_mangling.
1915 (mangle_special_for_type): Likewise.
1916 (mangle_vtt_for_type): Likewise.
1917 (mangle_ctor_vtbl_for_type): Likewise.
1918 (mangle_thunk): Likewise.
1919 (mangle_guard_variable): Likewise.
1920 (mangle_ref_init_variable): Likewise.
1922 2004-08-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1925 * pt.c (redeclare_class_template): Check the type of non-type and
1926 template template parameter.
1928 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
1930 * call.c (convert_class_to_reference): Adjust build_int_cst calls.
1931 (build_user_type_conversion_1, convert_like_real,
1932 build_java_interface_fn_ref, build_special_member_call): Likewise.
1933 * class.c (finish_struct_1, build_vtbl_initializer): Likewise.
1934 * cp-gimplify.c (cp_gimplify_expr): Likewise.
1935 * cvt.c (cp_convert_to_pointer): Likewise.
1936 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
1937 * decl2.c (start_static_initialization_or_destruction,
1938 generate_ctor_or_dtor_function): Likewise.
1939 * except.c (build_throw): Likewise.
1940 * mangle.c (write_integer_cst): Likewise.
1941 * method.c (finish_thunk): Likewise.
1942 * rtti.c (build_headof, get_tinfo_decl_dynamic,
1943 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
1944 get_pseudo_ti_init): Likewise.
1945 * search.c (get_dynamic_cast_base_type): Likewise.
1947 2004-08-25 Zack Weinberg <zack@codesourcery.com>
1949 * class.c, search.c: Remove references to DWARF_DEBUG.
1951 2004-08-25 Adam Nemet <anemet@lnxw.com>
1953 * repo.c (extract_string): Reset backquote after one character.
1954 (get_base_filename): Fix indentation.
1956 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
1958 * decl.c (cxx_init_decl_processing): Adjust
1959 build_common_tree_nodes call.
1961 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
1964 * (is_subobject_of_p): Resurrect & optimize.
1965 (lookup_field_r): Use it.
1967 2004-08-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1970 * search.c (friend_accessible_p): Increment processing_template_decl
1971 when deal with TEMPLATE_DECL of SCOPE.
1973 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
1976 * semantics.c (check_accessibility_of_qualified_id): Defer check
1977 if qualifying_type is a template parameter.
1979 2004-08-23 Mark Mitchell <mark@codesourcery.com>
1982 * pt.c (instantiate_decl): Do not try to apply
1983 DECL_DECLARED_INLINED_P to a VAR_DECL.
1985 * search.c (build_baselink): Fix typo in comment.
1987 2004-08-22 Andrew Pinski <apinski@apple.com>
1990 2004-08-22 Andrew Pinski <apinski@apple.com>
1992 * typeck.c (build_unary_op): Use &a.b if the folded lowered
1993 expression is not constant.
1995 2004-08-23 Nathan Sidwell <nathan@codesourcery.com>
1997 * name-lookup.c (pushdecl): Rename build_type_copy call.
1998 * tree.c (cp_build_qualified_type_real,
1999 build_exception_variant, handle_java_interface_attribute): Likewise.
2001 2004-08-22 Andrew Pinski <apinski@apple.com>
2004 * typeck.c (build_unary_op): Use &a.b if the folded lowered
2005 expression is not constant.
2007 2004-08-20 Mark Mitchell <mark@codesourcery.com>
2010 * decl.c (expand_static_init): Use DECL_FUNCTION_SCOPE_P.
2012 2004-08-21 Joseph S. Myers <jsm@polyomino.org.uk>
2015 * pt.c (tsubst_copy_and_build): Avoid clearing TREE_NO_WARNING for
2018 2004-08-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2020 * pt.c (register_specialization): Check DECL_TEMPLATE_SPECIALIZATION
2021 before calling comp_template_args.
2023 2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
2025 * class.c (build_vtbl_initializer): Use build_int_cst for
2026 negative size types.
2027 * decl.c (complete_array_type): Likewise.
2028 * method.c (finish_thunk): Likewise.
2030 2004-08-20 Andreas Tobler <a.tobler@schweiz.ch>
2032 * tree.c: Remove unused mark_local_for_remap_r.
2034 2004-08-19 Eric Christopher <echristo@redhat.com>
2036 * cp-tree.h (cxx_unsave_expr_now): Delete prototype.
2037 * tree.c (cxx_unsave_expr_now): Delete.
2038 (cp_unsave_r): Ditto.
2040 2004-08-19 Mark Mitchell <mark@codesourcery.com>
2043 * pt.c (push_template_decl_real): Disallow template allocation
2044 functions with fewer than two parameters.
2046 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
2048 * cp-tree.h (build_shared_int_cst): Remove.
2049 * tree.c (shared_int_cache): Remove.
2050 (build_shared_int_cst): Remove.
2051 * class.c (finish_struct_1): Use build_int_cst.
2053 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
2055 * decl.c (finish_enum): Do not copy value node early, copy
2057 * lex.c (cxx_init): Force null_node to be unique.
2059 2004-08-19 Joseph S. Myers <jsm@polyomino.org.uk>
2062 * pt.c (tsubst_copy, tsubst_copy_and_build): Copy TREE_NO_WARNING
2063 from input for MODOP_EXPR.
2065 2004-08-18 Mark Mitchell <mark@codesourcery.com>
2067 * pt.c (dependent_template_p): Fix typo in commment.
2070 * pt.c (dependent_template_p): Treat IDENTIFIER_NODEs as
2073 2004-08-17 Mark Mitchell <mark@codesourcery.com>
2076 * pt.c (unify): Tidy ARRAY_TYPE handling. Make sure that non-type
2077 arguments have the same type as the corresponding parameter.
2080 * parser.c (cp_parser_name_lookup_error): If parser->object_scope
2081 is set use it for diagnostic purposes.
2082 (cp_parser_pseudo_destructor_name): Remove special-case error
2086 * semantics.c (expand_or_defer_fn): Honor -fkeep-inline-functions.
2089 * cp-tree.h (qualified_name_lookup_error): Add parameter.
2090 * name-lookup.c (do_class_using_decl): Restrict set of entities
2091 passed to cp_emit_debug_info_for_using more carefully.
2092 (lookup_qualified_name): Allow lookup_member to return sets of
2094 * parser.c (cp_parser_lookup_name): Add ambiguous_p parameter.
2095 (cp_parser_primary_expression): Handle ambiguous lookups.
2096 (cp_parser_template_name): Adjust use of cp_parser_lookup_name.
2097 (cp_parser_template_argument): Likewise.
2098 (cp_parser_elaborate_type_specifier): Likewise.
2099 (cp_parser_namespace_name): Likewise.
2100 (cp_parser_class_name): Likewise.
2101 (cp_parser_lookup_name_simple): Likewise.
2102 * pt.c (tsubst_qualified_id): Handle ambiguous results.
2103 (tsubst_expr): Likewise.
2104 * semantics.c (qualified_name_lookup_error): Add decl paramter.
2105 For ambiguous lookups, print candidates.
2107 2004-08-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2110 * pt.c (instantiate_pending_templates): Add int parameter. Don't
2112 * cp-tree.h (instantiate_pending_templates): Adjust prototype.
2113 * decl2.c (finish_file): Adjust call to
2114 instantiate_pending_templates.
2116 2004-08-15 Roger Sayle <roger@eyesopen.com>
2118 * call.c (build_vfield_ref, build_call, build_conditional_expr,
2119 convert_arg_to_ellipsis, build_x_va_arg, build_over_call,
2120 build_java_interface_fn_ref, build_special_member_call,
2121 build_new_method_call, initialize_reference): Replace calls to
2122 build with calls to buildN.
2123 * class.c (build_base_path, convert_to_base_statically,
2124 build_vfn_ref, instantiate_type, dfs_accumulate_vtbl_inits,
2125 build_vtbl_initializer): Likewise.
2126 * cp-gimplify.c (genericize_try_block, genericize_catch_block,
2127 gimplify_if_stmt, cp_genericize_r): Likewise.
2128 * cvt.c (convert_to_void): Likewise.
2129 * decl.c (check_initializer, finish_constructor_body,
2130 finish_destructor_body): Likewise.
2131 * error.c (dump_expr): Likewise.
2132 * except.c (build_exc_ptr, expand_start_catch_block, build_throw):
2134 * init.c (perform_member_init, expand_virtual_init,
2135 expand_cleanup_for_base, build_init, expand_default_init,
2136 build_offset_ref, decl_constant_value, build_new, build_new_1,
2137 build_vec_delete_1, build_vec_init, build_delete,
2138 push_base_cleanups, build_vec_delete): Likewise.
2139 * mangle.c (write_integer_cst): Likewise.
2140 * method.c (thunk_adjust, do_build_copy_constructor,
2141 do_build_assign_ref): Likewise.
2142 * pt.c (lookup_template_function, tsubst, tsubst_copy_and_build,
2143 unify, build_non_dependent_expr): Likewise.
2144 * rtti.c (build_headof, build_typeid, ifnonnull,
2145 build_dyanmic_cast_1, tinfo_base_init): Likewise.
2146 * semantics.c (begin_compound_stmt, finish_call_expr,
2147 finish_pseudo_destructor_expr, finish_id_expression,
2148 simplify_aggr_init_expr, finalize_nrv_r): Likewise.
2149 * tree.c (build_target_expr, build_cplus_new, array_type_nelts_top,
2150 array_type_nelts_total, stabilize_call): Likewise.
2151 * typeck.c (decay_conversion, build_class_member_access_expr,
2152 lookup_destructor, build_ptrmemfunc_access_expr, build_array_ref,
2153 get_member_function_from_ptrfunc, build_binary_op, pointer_diff,
2154 build_x_unary_op, build_unary_op, unary_complex_lvalue,
2155 build_compound_expr, build_modify_expr, expand_ptrmemfunc_cst,
2156 check_return_expr): Likewise.
2157 * typeck2.c (split_nonconstant_1, split_nonconstant_init_1,
2158 split_nonconstant_init, store_init_value, build_m_component_ref):
2161 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
2163 * call.c (convert_class_to_reference,
2164 build_user_type_conversion_1, convert_like_real,
2165 build_java_interface_fn_ref, build_special_member_call): Use
2167 * class.c (build_vtbl_initializer): Likewise.
2168 * cp-gimplify.c (cp_gimplify_expr): Likewise.
2169 * cvt.c (cp_convert_to_pointer): Likewise.
2170 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
2171 * decl2.c (start_static_initialization_or_destruction,
2172 generate_ctor_or_dtor_function): Likewise.
2173 * except.c (build_throw): Likewise.
2174 * lex.c (cxx_init): Likewise.
2175 * mangle.c (write_integer_cst): Likewise.
2176 * rtti.c (build_headof, get_tinfo_decl_dynamic,
2177 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
2178 get_pseudo_ti_init): Likewise.
2179 * search.c (get_dynamic_cast_base_type): Likewise.
2180 * tree.c (build_shared_int_cst): Likewise.
2182 2004-08-12 Mark Mitchell <mark@codesourcery.com>
2185 * class.c (count_depth_data): New type.
2186 (dfs_depth_post): New function.
2187 (dfs_depth_q): Likewise.
2188 (find_final_overrider_data_s): Change type of vpath.
2190 (dfs_find_final_overrider_1): New function.
2191 (dfs_find_final_overrider): Use it.
2192 (dfs_find_final_overrider_q): Adjust use of vpath.
2193 (dfs_find_final_overrider_post): Likewise.
2194 (find_final_overrider): Use dfs_depth. Allocate and deallocate
2197 2004-08-12 Jan Beulich <jbeulich@novell.com>
2199 * parser.c (cp_parser_asm_definition): Properly consume scope operator
2200 tokens preceding the clobbers. Don't check for scope operator
2201 following inputs. Simplify inputs handling to match that now used for
2204 2004-08-11 Mark Mitchell <mark@codesourcery.com>
2207 * except.c (build_throw): Allocate cleanup_type and the function
2208 for __cxa_throw separately.
2211 * call.c (standard_conversion): Do not accept conversions between
2212 pointers to members if the class types are unrelated.
2215 * parser.c (cp_parser_builtin_offsetof): Cast to "const volatile
2216 char &" instead of just "char &".
2219 * pt.c (tsubst): Just return the unknown_type_node.
2221 2004-08-11 Mark Mitchell <mark@codesourcery.com>
2224 * parser.c (cp_parser_class_specifier): Robustify.
2227 * pt.c (tsubst_copy_and_build): Complain about invalid
2231 * pt.c (tsubst_default_argument): Clear out current_class_ptr and
2232 current_class_ref while tsubsting.
2234 2004-08-10 Mark Mitchell <mark@codesourcery.com>
2237 * parser.c (cp_parser_init_declarator): Robustify.
2239 2004-08-06 Richard Sandiford <rsandifo@redhat.com>
2241 * typeck2.c (process_init_constructor): Guard the missing field warning
2242 with warn_missing_field_initializers rather than extra_warnings.
2244 2004-08-06 Paolo Bonzini <bonzini@gnu.org>
2246 * class.c (instantiate_type) <ENTRY_VALUE_EXPR>: Do not handle.
2248 2004-08-05 Mark Mitchell <mark@codesourcery.com>
2250 * decl.c (start_preparsed_function): Move determine_visibility
2252 * decl2.c (determine_visibility): Incorporate dllexport testing.
2254 2004-08-05 Geoffrey Keating <geoffk@apple.com>
2256 * g++spec.c (lang_specific_driver): An -Xlinker or -Wl, option
2257 means that libstdc++ is needed.
2259 2004-08-05 Nathan Sidwell <nathan@codesourcery.com>
2261 * cvt.c (cp_convert_to_pointer): Adjust force_fit_type call.
2263 2004-08-04 Geoffrey Keating <geoffk@apple.com>
2265 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_ASSEMBLER_NAME rather
2266 than passing it as a parameter to rest_of_decl_compilation.
2267 * decl2.c (grokfield): Use set_user_assembler_name.
2269 2004-08-04 Nathan Sidwell <nathan@codesourcery.com>
2271 * decl.c (complete_array_type): Don't gratuitously copy
2272 maxindex. Its type is always set.
2274 2004-08-04 Paul Brook <paul@codesourcery.com>
2276 * Make-lang.in (cp/semantics.o, cp/optimize.o): Depend on TARGET_H.
2277 * cp-tree.h (struct language_function): Rename x_dtor_label to
2279 (dtor_label): Rename ...
2280 (cdtor_label): ... to this.
2281 * decl.c (begin_constructor_body): Remove.
2282 (check_special_function_return_type): Maybe change the return type.
2283 (grokdeclarator): Pass the class type.
2284 (start_preparsed_function): Constructors may need a return label.
2285 (finish_constructor_body, finish_destructor_body): Set the return
2287 (begin_function_body): Don't call begin_constructor_body.
2288 (finish_function): Don't warn for constructors or destructors.
2289 (implicitly_declare_fn): Maybe change the return type.
2290 * optimize.c: Include target.h.
2291 (maybe_clone_body): Remap the function result.
2292 * semantics.c: Include target.h.
2293 (finish_return_stmt): Maybe jump to return label for constructors.
2295 2004-08-03 Mark Mitchell <mark@codesourcery.com>
2297 * class.c (build_vtable): Do not set DECL_VISIBILITY here.
2298 (check_field_decls): Or here.
2299 (check_methods): Or here.
2300 (initialize_array): Don't mess with DECL_CONTEXT.
2301 * cp-tree.h (start_decl): Adjust prototype.
2302 (determine_visibility): New function.
2303 * decl.c (duplicate_decls): Remove checks for hidden "operator
2305 (build_library_fn_1): Give all library functions default
2307 (start_decl): Add pop_scope_p parameter. Tidy.
2308 (cp_finish_decl): Do not pop scopes here. Call
2309 determine_visibility for variable definitions.
2310 (start_preparsed_function): Call determine_visibility.
2311 * decl2.c (determine_visibility): New function.
2312 * method.c (use_thunk): Fix formatting.
2313 * parser.c (cp_parser_condition): Adjust calls to start_decl.
2314 (cp_parser_init_declarator): Likewise.
2315 * pt.c (instantiate_decl): Always call pop_nested_class.
2316 * rtti.c (get_tinfo_decl): Do not set DECL_VISIBILITY.
2317 (tinfo_base_init): Likewise.
2319 2004-08-02 Mark Mitchell <mark@codesourcery.com>
2322 * name-lookup.c (validate_nonmember_using_decl): Robustify.
2324 2004-08-01 Mark Mitchell <mark@codesourcery.com>
2327 * name-lookup.c (decl_namespace): Remove.
2328 (current_decl_namespace): Use decl_namespace_context instead of
2330 (push_decl_namespace): Likewise.
2331 (arg_assoc_class): Likewise.
2332 (arg_assoc_type): Likewise.
2333 * pt.c (check_specialization_namespace): New function.
2334 (maybe_process_partial_specialization): Use it.
2335 (register_specialization): Likewise.
2338 * cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): New macro.
2339 * call.c (null_ptr_cst_p): Handle variables with constant
2341 * pt.c (convert_nontype_argument): Use
2342 DECL_INTEGRAL_CONSTANT_VAR_P.
2343 * semantics.c (finish_id_expression): Likewise.
2346 * decl.c (duplicate_decls): Reject duplicate namespace
2350 * typeck.c (build_ptrmemfunc): Loosen assertion.
2352 2004-08-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
2354 * call.c (z_candidate::template_decl): Rename from template.
2355 (add_template_candidate_real): Adjust member reference.
2358 2004-07-29 Mark Mitchell <mark@codesourcery.com>
2360 * cp-tree.h (IDENTIFIER_REPO_CHOSEN): Define.
2361 (lang_decl_flags): Narrow the width of "languages". Add
2363 (DECL_NEEDED_P): Remove.
2364 (FOR_EACH_CLONE): New macro.
2365 (DECL_REPO_AVAILABLE_P): Likewise.
2366 (DECL_TINFO_P): Likewise.
2367 (set_linkage_according_to_type): Declare.
2368 (import_export_vtable): Remove.
2369 (import_export_tinfo): Likewise.
2370 (mark_needed): New function.
2371 (decl_needed_p): Likewise.
2372 (note_vauge_linkage_fn): Likewise.
2373 (init_repo): Change prototype.
2374 (repo_template_used): Remove.
2375 (repo_template_instantiated): Likewise.
2376 (repo_emit_p): New function.
2377 (repo_export_class_p): Likewise.
2378 (no_linkage_check): Change prototype.
2379 * class.c (set_linkage_according_to_type): New function.
2380 (build_vtable): Use it. Do not call import_export_vtable. Set
2381 DECL_IGNORED_P if appropriate.
2382 * decl.c (duplicate_decls): Preserve DECL_REPO_AVAILABLE_P.
2383 (make_rtL_for_nonlocal_decls): Check for template instantiations
2385 (grokfndecl): Adjust call to no_linkage_check.
2386 (set_linkage_for_static_data_member): New function.
2387 (grokvardecl): Use it. Adjust call to no_linkage_check.
2388 (grokdeclarator): Use set_linkage_for_static_data_member.
2389 * decl2.c (note_vague_linkage_fn): New function.
2390 (note_vague_linkage_var): Likewise.
2391 (finish_static_data_member_decl): Use it.
2392 (import_export_vtable): Remove.
2393 (import_export_class): Use repo_export_class_p.
2394 (var_finalized_p): Simplify.
2395 (maybe_emit_vtables): Simplify.
2396 (mark_needed): New function.
2397 (decl_needed_p): Likewise.
2398 (import_export_decl): Add documentation and consistency checks.
2399 Use repo_emit_p. Handle virtual tables and RTTI information
2401 (import_export_tinfo): Remove.
2402 (write_out_vars): Call import_export_decl.
2403 (cxx_callgraph_analyze_expr): Ensure that all vtables are emitted
2405 (finish_file): Use decl_needed_p. Do not call import_export_decl
2406 for undefined static data members. Do not warn about undefined
2407 inlines when using a repository.
2408 (mark_used): Use note_vague_linkage_fn. Always defer template
2410 * lex.c (cxx_init): Adjust call to init_repo. Always set
2411 flag_unit_at_a-time.
2412 * method.c (synthesize_method): Remove unncessary
2413 import_export_decl call.
2414 (implicitly_declare_fn): Use set_linkage_according_to_type.
2415 * optimize.c (maybe_clone_body): Use FOR_EACH_CLONE.
2416 * pt.c (instantiate_class_template): Don't redundantly add classes
2417 to keyed_classes. Don't call repo_template_used.
2418 (tsubst_decl): Set DECL_INTERFACE_KNOWN for instantiations of
2419 templates with internal linkage.
2420 (check_instantiated_args): Adjust call to no_linkage_check.
2421 (instantiate_template): Use FOR_EACH_CLONE.
2422 (mark_definable): New function.
2423 (mark_decl_instantiated): Use it.
2424 (do_decl_instantiation): Adjust tests for explicit instantiation
2425 after "extern template".
2426 (instantiate_class_member): Do not use repo_template_instantiated.
2427 (do_type_instantiation): Simplify.
2428 (instantiate_decl): Use mark_definable. Check repo_emit_p.
2430 * repo.c (repo_get_id): Remove.
2431 (original_repo): Remove.
2432 (IDENTIFIER_REPO_USED): Remove.
2433 (IDENTIFIER_REPO_CHOSEN): Remove.
2434 Remove all #if 0'd code.
2435 (repo_template_used): Remove.
2436 (repo_template_instantiated): Remove.
2437 (temporary_obstack_initialized_p): New variable.
2438 (init_repo): Register with lang_post_pch_load. Avoid creating
2439 identifiers unnecessarily. Don't use original_repo. Close the
2441 (reopen_repo_file_for_write): Not here.
2442 (finish_repo): Always write out a new repository file.
2443 (repo_emit_p): New function.
2444 (repo_export_class_p): Likewise.
2445 * rtti.c (get_tinfo_decl): Use set_linkage_according_to_type.
2446 (involves_incomplete_p): New function.
2447 (tinfo_base_init): Use it.
2448 (ptr_initializer): Remove non_public_ptr parameter.
2449 (ptm_initializer): Likewise.
2450 (get_pseudo_ti_init): Likewise.
2451 (unemitted_tinfo_decl_p): Remove.
2452 (emit_tinfo_decl): Use import_export_decl.
2453 * semantics.c (expand_body): Move updates of static_ctors and
2455 (expand_or_defer_fn): ... here.
2456 * tree.c (no_linkage_check): Add relaxed_p parameter.
2458 2004-07-28 Eric Christopher <echristo@redhat.com>
2460 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
2462 2004-07-28 Nathan Sidwell <nathan@codesourcery.com>
2464 * cp-tree.h (struct tree_pair_s): New.
2465 (typedef tree_pair_p): New.
2466 (DEF_VEC_O(tree_pair_s)): New.
2467 (struct lang_type_class): Make vcall_indices a VEC(tree_pair_s).
2468 (CLASSTYPE_VCALL_INDICES): Update documentation.
2469 * class.c (get_vcall_index): Adjust.
2470 (add_vcall_offset): Adjust.
2472 2004-07-27 Kelley Cook <kcook@gcc.gnu.org>
2474 * pt.c, typeck.c: Remove spurious carriage returns.
2476 2004-07-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2479 * pt.c (coerce_template_template_parms) <PARM_DECL case>: Only check
2480 when the type of ARG is not dependent.
2482 2004-07-26 Geoffrey Keating <geoffk@apple.com>
2484 * g++spec.c (LIBSTDCXX_PROFILE): Default to LIBSTDCXX.
2485 (lang_specific_driver): If the C++ or math library options don't
2486 start with '-l', don't count them as added libraries.
2488 2004-07-26 Nathan Sidwell <nathan@codesourcery.com>
2490 * decl.c (xref_basetypes): Adjust base access vector creation.
2491 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Adjust base
2493 * search.c (dynamic_cast_base_recurse, dfs_access_in_type): Likewise.
2495 2004-07-26 Niall Douglas <s_fsfeurope2@nedprod.com>
2496 Brian Ryner <bryner@brianryner.com>
2500 * class.c (check_field_decls): Apply hidden visibility if
2501 -fvisibility-inlines-hidden and inlined unless otherwise specified
2502 (build_vtable): Set vtable visibility to class visibility.
2503 (check_field_decls): Default static member visibility to class
2505 (check_methods): Default method visibility to class visibility.
2506 * cp-tree.h: Added CLASSTYPE_VISIBILITY and
2507 CLASSTYPE_VISIBILITY_SPECIFIED macro.
2508 * decl.c (duplicate_decls): New logic for merging definition decls
2509 with declaration decls. Added ignore & warning when non default
2510 applied to global operator new or delete.
2511 * method.c, optimize.c, rtti.c: Added setting of VISIBILITY_SPECIFIED
2512 wherever VISIBILITY was changed
2513 * rtti.c (get_tinfo_decl): Set typeinfo visibility to class
2515 (tinfo_base_init): Set typeinfo name visibility to class visibility.
2517 2004-07-25 Bernardo Innocenti <bernie@develer.com>
2519 * decl.c: Rename all identifiers named `class' to `cl'.
2520 * cp-tree.h: Likewise.
2522 2004-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
2524 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Use GGC_CNEW.
2525 * typeck2.c (abstract_virtuals_error): Use GGC_NEW.
2526 * name-lookup.c (binding_entry_make): Use GGC_NEW.
2527 (binding_table_construct): Use GGC_CNEWVEC.
2528 (binding_table_new): Use GGC_NEW.
2529 (cxx_binding_make): Likewise.
2530 (begin_scope): Likewise.
2531 (push_to_top_level): Use GCC_CNEW.
2532 * parser.c (cp_token_cache_new): Likewise.
2533 (cp_token_cache_push_token): Likewise.
2534 (cp_lexer_new_main): Likewise.
2535 (cp_lexer_new_from_tokens): Likewise.
2536 (cp_parser_context_new): Likewise.
2537 (cp_parser_new): Likewise.
2538 (cp_lexer_new_from_tokens): Use GGC_NEWVEC.
2539 * lex.c (cxx_make_type): Use GGC_CNEW.
2540 (retrofit_lang_decl): Use GGC_NEWVAR.
2541 (cxx_dup_lang_specific_decl): Likewise.
2542 (copy_lang_type): Likewise.
2543 * decl.c (use_label): Use GGC_NEW instead of ggc_alloc.
2544 (save_function_data): Likewise.
2545 (lookup_label): Use GGC_CNEW instead of ggc_alloc_cleared.
2546 (cxx_push_function_context): Likewise.
2548 2004-07-25 Richard Henderson <rth@redhat.com>
2550 * decl.c (start_preparsed_function): Set DECL_ARTIFICIAL and
2551 DECL_IGNORED_P on RESULT_DECL.
2552 * semantics.c (finalize_nrv): Copy them too.
2554 2004-07-23 Nathan Sidwell <nathan@codesourcery.com>
2556 * search.c (lookup_conversion_operator): Avoid two loops.
2557 (add_conversions): Remove.
2558 (check_hidden_convs, split_conversions,
2559 lookup_conversions_r): New.
2560 (lookup_conversions): Use lookup_conversions_r.
2562 2004-07-22 Nathan Sidwell <nathan@codesourcery.com>
2564 * pt.c (get_template_base): Check type is completable.
2566 2004-07-21 Eric Christopher <echristo@redhat.com>
2568 * decl.c (poplevel): Inline unused variable checking.
2571 2004-07-21 Paolo Bonzini <bonzini@gnu.org>
2573 * typeck.c (build_binary_op): Do not use RDIV_EXPR for
2576 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2579 * pt.c (check_explicit_specialization): Remove extension to accept
2580 specializations without template headers. Fall-through to normal
2583 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2586 * pt.c (determine_specialization): New parameter template_count.
2587 Disambiguate between member templates and member functions counting
2588 the template headers.
2589 (check_explicit_specialization): Update caller.
2590 (tsubst_friend_function): Likewise.
2592 2004-07-20 Steven Bosscher <stevenb@suse.de>
2594 * cp-tree.def (TINST_LEVEL): Make it an 'x' node.
2595 * cp-tree.h (tinst_level_t): New tree type.
2596 (union lang_tree_node): Handle it.
2597 (TINST_LOCATION): New accessor macro.
2598 (make_tinst_level): New prototype.
2599 * cp-lang.c (cp_tree_size): Handle TINST_LEVEL.
2600 * decl.c (cp_tree_node_structure): Likewise.
2601 * error.c (print_instantiation_full_context): Use TINST_LOCATION.
2602 (print_instantiation_partial_context): Likewise.
2603 * pt.c (pop_tinst_level): Likewise.
2604 (push_tinst_level): Use make_tinst_level.
2605 * tree.c (make_tinst_level): New function.
2606 (cp_walk_subtrees): Walk TINST_DECL for a TINST_LEVEL node.
2608 2004-07-20 Mark Mitchell <mark@codesourcery.com>
2610 * parser.c (cp_parser_simple_type_specifier): Fix typo.
2613 * parser.c (cp_parser_simple_type_specifier): Do not record usage
2614 of globally-qualified names.
2616 2004-07-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2619 * error.c (dump_type) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Output
2622 2004-07-19 Mark Mitchell <mark@codesourcery.com>
2625 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
2626 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
2627 * class.c (add_implicitly_declared_members): Use
2628 CLASSTYPE_LAZY_ASSIGNMENT_OP.
2629 * method.c (lazily_declare_fn): Clear
2630 CLASSTYPE_LAZY_ASSIGNMENT_OP.
2631 * search.c (lookup_fnfields_1): Check it.
2633 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
2635 * cp-tree.h (vec_binfo_member): Remove.
2636 * tree.c (vec_binfo_member): Remove.
2638 * cp-tree.h (struct lang_type_class): Remove vfields field.
2639 (CLASSTYPE_VFIELDS): Remove.
2640 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
2641 * class.c (determine_primary_base): Remove CLASSTYPE_VFIELDS
2643 (dfs_modify_vtables): Use TYPE_CONTAINS_VPTR_P.
2644 (finish_struct_1): Remove CLASSTYPE_VFIELDS handling.
2645 * init.c (dfs_initialize_vtbl_ptrs): Use TYPE_CONTAINS_VPTR_P.
2647 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
2649 * cp-tree.h (DEF_VEC_P(tree)): Remove here.
2650 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
2652 (BINFO_LANG_SLOTS): Remove.
2653 * tree.c (copy_binfo): Adjust BINFO creation and accessors.
2654 * decl.c (xref_basetypes): Adjust BINFO creation and accessors.
2655 * class.c (check_bases): Adjust BINFO accessors.
2656 (determine_primary_base, finish_struct_bits,
2657 maybe_warn_about_overly_private_class, warn_hidden,
2658 walk_subobject_offsets, propagate_binfo_offsets, end_of_class,
2659 warn_about_ambiguous_bases, get_vfield_name,
2660 dump_class_hierarchy_r, build_vtt_inits, accumulate_vtbl_inits,
2661 add_vcall_offset_vtbl_entries_r): Likewise.
2662 * dump.c (cp_dump_tree): Likewise.
2663 * init.c (sort_mem_initializers, expand_member_init, build_delete,
2664 push_base_cleanups): Likewise.
2665 * method.c (do_build_copy_constructor, do_build_assign_ref,
2666 synthesize_exception_spec): Likewise.
2667 name-lookup.c (arg_assoc_class): Likewise.
2668 * pt.c (instantiate_class_template,
2669 get_template_base_recursive): Likewise.
2670 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Likewise.
2671 * typeck2.c (process_init_constructor): Likewise.
2672 * search.c (lookup_base_r, dynamic_cast_base_recurse,
2673 dfs_access_in_type, dfs_walk_real, look_for_overrides,
2674 types_overlap_p, copied_binfo, original_binfo): Likewise.
2675 (binfo_for_vtable): Remove
2677 2004-07-20 Steven Bosscher <stevenb@suse.de>
2679 * cp-tree.h (struct lang_decl_flags): Unify the template_info and
2680 thunk_alias, and the access and virtual_offset fields.
2681 (THUNK_VIRTUAL_OFFSET, THUNK_ALIAS): Adjust.
2682 * decl.c (finish_case_label): Update c_add_case_node call.
2684 2004-07-19 Mark Mitchell <mark@codesourcery.com>
2686 Revert patch for PR c++/16623.
2688 2004-07-19 Kelley Cook <kcook@gcc.gnu.org>
2690 * except.c: Remove two spurious carriage returns.
2692 2004-07-19 Mark Mitchell <mark@codesourcery.com>
2695 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
2696 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
2697 * class.c (add_implicitly_declared_members): Use
2698 CLASSTYPE_LAZY_ASSIGNMENT_OP.
2699 * method.c (lazily_declare_fn): Clear
2700 CLASSTYPE_LAZY_ASSIGNMENT_OP.
2701 * search.c (lookup_fnfields_1): Check it.
2703 2004-07-19 Nathan Sidwell <nathan@codesourcery.com>
2705 * class.c (add_method): Delay adding the slot until the end.
2706 (determine_primary_base): Adjust VEC_iterate invokation.
2707 (resort_type_method_vec, finish_struct_methods, warn_hidden,
2708 walk_subobject_offsets, end_of_class, warn_about_ambiguous_bases,
2709 build_vtbl_initializer): Likewise.
2710 * init.c (sort_mem_initializers, build_delete, push_base_cleanups,
2711 build_vbase_delete): Likewise.
2712 * method.c (do_build_copy_constructor): Likewise.
2713 * name-lookup.c (new_class_binding, print_binding_level,
2714 poplevel_class, store_class_bindings, push_to_top_level,
2715 pop_from_top_level): Likewise.
2716 * pt.c (check_explicit_specialization): Likewise.
2717 * search.c (lookup_conversion_operator, lookup_fnfields_1,
2718 get_pure_virtuals, add_conversions, dfs_check_overlap,
2719 binfo_for_vbase): Likewise.
2721 2004-07-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2724 * pt.c (unify) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Use only
2725 innermost set of template arguments during deduction. Simplify.
2727 2004-07-19 Joseph S. Myers <jsm@polyomino.org.uk>
2729 * typeck.c (build_modify_expr, build_x_modify_expr): Set
2730 TREE_NO_WARNING on assignments with an operator other than '='.
2732 2004-07-10 Steven Bosscher <stevenb@suse.de>
2733 Joseph S. Myers <jsm@polyomino.org.uk>
2735 * cp-tree.h (C_SET_EXP_ORIGINAL_CODE): Remove.
2736 * decl2.c (grokfield): Don't check current_class_depth via
2737 unused TREE_COMPLEXITY.
2738 * semantics.c (finish_parenthesized_expr): Set TREE_NO_WARNING
2739 to avoid the missing parentheses warning.
2740 Don't set C_SET_EXP_ORIGINAL_CODE.
2742 2004-07-18 Mark Mitchell <mark@codesourcery.com>
2744 * tree.c (no_linkage_helper): Remove.
2745 (no_linkage_check): Don't use walk_tree_without_duplicates.
2747 * mangle.c (write_expression): Issue a sorry for zero-operand
2750 2004-07-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2753 * init.c (build_offset_ref): Build SCOPE_REF with non-null
2754 TREE_TYPE for non-dependent names.
2755 * typeck.c (build_x_unary_op): Handle non-dependent SCOPE_REF.
2756 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
2757 unknown_type_node as its TREE_TYPE.
2758 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
2759 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
2760 (dump_expr) <SCOPE_REF case>: Likewise.
2762 2004-07-17 Jason Merrill <jason@redhat.com>
2765 * call.c (type_passed_as): Make the invisible reference type
2767 * cp-gimplify.c (gimplify_cleanup_stmt): Rename to
2768 cp_genericize_r. Handle invisible reference lowering.
2769 (is_invisiref_parm): New fn.
2770 (cp_genericize): Adjust the types of invisible reference parms.
2771 Don't repeat the walk for clones.
2772 * decl.c (store_parm_decls): Don't generate any code for clones.
2774 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
2776 * cp-tree.h (builtin_function): Declare.
2778 2004-07-16 Mark Mitchell <mark@codesourcery.com>
2780 * class.c (finish_struct_methods): Remove unncessary code.
2781 (add_implicitly_declared_members): Create declarations for default
2782 constructors and copy constructors lazily.
2783 * cp-tree.h (lang_type_class): Remove lazy_default_ctor and
2785 (CLASSTYPE_LAZY_DEFAULT_CTOR): New macro.
2786 (CLASSTYPE_LAZY_COPY_CTOR): Likewise.
2787 * decl2.c (check_classfn): Robustify.
2788 (locate_dtor): Handle empty CLASSTYPE_METHOD_VEC.
2789 (locate_ctor): Handle lazy default constructors.
2790 (locate_copy): Handle lazy copy constructors.
2791 (implicitly_declare_fn): Make sure we're looking at the
2792 TYPE_MAIN_VARIANT for a class before creating functions. Don't
2793 set TYPE_HAS_CONSTRUCTOR.
2794 (lazily_declare_fn): New function.
2795 * name-lookup.c (constructor_name_full): Simplify.
2796 * search.c (lookup_fnfields_1): Lazily create methods, as
2798 (lookup_for_overrides): Handle empty CLASSTYPE_METHOD_VEC.
2800 2004-07-16 Steven Bosscher <stevenb@suse.de>
2802 * cp-tree.h (struct lang_type): Don't have three GTY options on a
2803 single bit GTY desc.
2805 2004-07-16 Richard Henderson <rth@redhat.com>
2807 * cp-lang.c (LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING): Die.
2808 * cp-tree.h (cp_copy_res_decl_for_inlining): Remove.
2809 * tree.c (cp_copy_res_decl_for_inlining): Remove.
2811 2004-07-16 Nathan Sidwell <nathan@codesourcery.com>
2813 * class.c (finish_struct_bits): Use for loop.
2814 (propagate_binfo_offsets): Do primary binfo outside of loop.
2817 * dump.c (cp_dump_tree): Don't dump the bases if there's no
2820 * pt.c (tsubst) <TREE_BINFO case>: We should never get here.
2822 2004-07-15 Mark Mitchell <mark@codesourcery.com>
2824 * cp-tree.h (lang_type_class): Remove has_real_assign_ref and
2825 has_abstract_assign_ref. Make methods a VEC(tree) *.
2826 (TYPE_HAS_CONST_ASSIGN_REF): Add documentation.
2827 (CLASSTYPE_CONSTRUCTORS): Adjust for changes to CLASSTYPE_METHOD_VEC.
2828 (CLASSTYPE_DESTRUCTORS): Likewise.
2829 (TYPE_HAS_REAL_ASSIGN_REF): Remove.
2830 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
2831 (add_method): Change prototoype.
2832 * class.c (add_method): Remove error_p parameter. Adjust for
2833 changes to CLASSTYPE_METHOD_VEC.
2834 (handle_using_decl): Adjust call to add_method.
2835 (maybe_warn_about_overly_private_class): Adjust for
2836 changes to CLASSTYPE_METHOD_VEC.
2837 (resort_type_method_vec): Likewise.
2838 (finish_struct_methods): Likewise.
2839 (check_for_override): Likewise.
2840 (warn_hidden): Likewise.
2841 (add_implicitly_declared_members): Defer creation of assignment
2842 operators. Adjust call to add_method.
2843 (clone_function_decl): Adjust call to add_method.
2844 (check_bases_and_members): Don't set TYPE_HAS_REAL_ASSIGN_REF.
2845 (finish_struct_1): Use CLASSTYPE_DESTRUCTORS.
2846 * decl.c (grok_special_member_properties): Don't set
2847 TYPE_HAS_ABSTRACT_ASSIGN_REF.
2848 * decl2.c (check_classfn): Adjust for
2849 changes to CLASSTYPE_METHOD_VEC.
2850 * method.c (locate_dtor): Use CLASSTYPE_DESTRUCTORS.
2851 (locate_ctor): Use CLASSTYPE_CONSTRUCTORS.
2852 (locate_copy): Adjust for changes to CLASSTYPE_METHOD_VEC.
2853 (implicitly_declare_fn): Set DECL_SOURCE_LOCATION. Do not call
2855 * pt.c (check_explicit_specialization): Adjust for
2856 changes to CLASSTYPE_METHOD_VEC.
2857 (instantiate_class_template): Do not set
2858 TYPE_HAS_ABSTRACT_ASSIGN_REF.
2859 * ptree.c (cxx_print_type): Don't try to print
2860 CLASSTYPE_METHOD_VEC.
2861 * rtti.c (emit_support_tinfos): Use CLASSTYPE_DESTRUCTORS.
2862 * search.c (lookup_field_r): Adjust for
2863 changes to CLASSTYPE_METHOD_VEC.
2864 (lookup_fnfields): Likewise.
2865 (lookup_conversion_operator): Likewise.
2866 (lookup_fnfields_1): Likewise. Create assignment operators
2868 (look_for_overrides_here): Adjust for
2869 changes to CLASSTYPE_METHOD_VEC.
2870 (add_conversions): Likewise.
2871 * semantics.c (finish_member_declaration): Adjust call to add_method.
2873 2004-07-15 Jason Merrill <jason@redhat.com>
2875 * cp-lang.c (cxx_types_compatible_p): To the middle-end,
2876 references and pointers are compatible.
2878 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
2880 * decl.c (xref_basetypes): Refactor.
2881 * tree.c (copy_base_binfos): Replace with ...
2882 (copy_binfo): ... this. Deep copy the given binfo, (not the just
2883 bases of the given base).
2884 * cp-tree.h (copy_base_binfo): Remove.
2885 (copy_binfo): Declare.
2887 2004-07-15 Mark Mitchell <mark@codesourcery.com>
2889 * name-lookup.c (set_inherited_value_binding_p): Add class_type
2891 (get_class_binding): Adjust.
2892 (push_class_level_binding): Don't use set_inherited_value_binding_p.
2894 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
2896 * class.c (finish_struct_bits): Don't set TYPE_HAS_CONVERSION here.
2897 * decl.c (xref_basetypes): Set it here.
2899 * class.c (check_bases): Don't set CLASSTYPE_NON_AGGREGATE here.
2900 Don't check for incomplete base.
2901 (get_vfield_name): Simplify while loop.
2902 * decl.c (xref_basetypes): Set CLASSTYPE_NON_AGGREGATE here.
2904 2004-07-14 Mark Mitchell <mark@codesourcery.com>
2906 * lex.c (cxx_make_type): Remove call to get_pointer_type.
2908 * cp-tree.h (IDENTIFIER_VALUE): Remove.
2909 (BINFO_PUSHDECLS_MARKED): Likewise.
2910 (maybe_inject_for_scope_var): Likewise.
2911 (push_class_decls): Likewise.
2912 * name-lookup.h (push_class_binding): Remove.
2913 (innermost_non_namespace_value): New function.
2914 (outer_binding): Likewise.
2915 * class.c (add_method): Push bindings before adding to
2917 (restore_class_cache): Do not restore class_shadowed.
2918 (pushclass): Do not add USING_DECLs. Do not call
2920 * config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c.
2921 * decl.c (pushdecl): Use outer_binding.
2922 (poplevel): Set the scope for an out-of-scope for-loop declaration
2924 (cp_finish_decl): Don't call maybe_inject_for_scope_var.
2925 * name-lookup.c (new_class_binding): New function.
2926 (push_binding): Use it.
2927 (pushdecl): Use innermost_non_namespace_value.
2928 (maybe_inject_for_scope_var): Remove.
2929 (push_class_binding): Remove.
2930 (set_inherited_value_binding_p): New function.
2931 (get_class_binding): New function.
2932 (push_class_level_binding): Assert that the current_class_type is
2934 (outer_binding): New function.
2935 (innermost_non_namespace_value): Likewise.
2936 (lookup_name_real): Use outer_binding.
2937 (lookup_name_current_level): Ignore out-of-scope variables.
2938 * pt.c (check_template_shadow): Use innermost_non_namespace_value.
2939 (lookup_template_class): Likewise.
2940 * search.c (dfs_push_type_decls): Remove.
2941 (dfs_push_decls): Likewise.
2942 (setup_class_bindings): Likewise.
2943 (lookup_field_1): Handle USING_DECLs from dependent scopes.
2944 (marked_pushdecls_p): Remove.
2945 (unmarked_pushdecls_p): Remove.
2946 (marked_identifiers): Remove.
2947 (setup_class_bindings): Remove.
2948 (dfs_push_type_decls): Remove.
2949 (dfs_push_decls): Remove.
2950 (push_class_decls): Remove.
2952 2004-07-13 Mark Mitchell <mark@codesourcery.com>
2956 * decl.c (grokvardecl): Make declspecs parameter const.
2957 (grokdeclarator): Likewise. Adjust accordingly.
2958 * decl.h (grokdeclarator): Adjust declaration.
2959 * parser.c (cp_parser_init_declarator): Do not clear
2960 decl_specifiers->attributes.
2962 * cp-tree.h (lang_identifier): Remove class_value.
2963 (IDENTIFIER_CLASS_VALUE): Remove.
2964 (pop_class_decls): Likewise.
2965 (init_search_processing): Likewise.
2966 * class.c (handle_using_decl): Use lookup_member, not
2967 IDENTIFIER_CLASS_VALUE.
2968 (restore_class_cache): New function, split out from ...
2969 (pushclass): ... here. Do not call clear_identifier_class_values.
2970 (invalidate_class_lookup_cache): Do not clear
2971 IDENTIFIER_CLASS_VALUE.
2972 (popclass): Do not call pop_class_decls.
2973 (maybe_note_name_used_in_class): Do not save names looked up after
2974 the class is complete. Use lookup_member, not
2975 IDENTIFIER_CLASS_VALUE.
2976 * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
2977 * decl.c (cxx_init_decl_processing): Do not call
2978 init_search_processing.
2979 * method.c (do_build_copy_constructor): Remove unnecessary code.
2980 (do_build_assign_ref): Likewise.
2981 * name-lookup.c (pushdecl): Use lookup_member, not
2982 IDENTIFIER_CLASS_VALUE.
2983 (set_identifier_type_value_with_scope): Set TREE_TYPE on the
2985 (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
2986 (push_class_binding): Do not set it.
2987 (clear_identifier_class_values): Remove.
2988 (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
2989 (store_binding): Do not save it.
2990 (pop_from_top_level): Do not restore it.
2991 * name-lookup.h (cxx_saved_binding): Remove class_value.
2992 (clear_identifier_class_values): Remove.
2993 * ptree.c (cxx_print_identifier): Do not print
2994 IDENTIFIER_CLASS_VALUE.
2995 * search.c (search_obstack): Remove.
2996 (push_stack_level): Remove.
2997 (pop_stack_level): Remove.
2998 (search_level): Remove.
2999 (search_stack): Remove.
3000 (lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
3001 (setup_class_bindings): Use IDENTIFIER_MARKED, not
3002 IDENTIFIER_CLASS_VALUE.
3003 (marked_identifiers): New variable.
3004 (push_class_decls): Clear IDENTIFIER_MARKED.
3005 (pop_class_decls): Don't call pop_search_level.
3006 (init_search_processing): Remove.
3008 2004-07-12 Mark Mitchell <mark@codesourcery.com>
3010 * cp-tree.h (get_aggr_typedef): Remove.
3011 * init.c (get_aggr_typedef): Likewise.
3013 * name-lookup.c (push_class_level_binding): Simplify.
3015 2004-07-12 Andrew Pinski <apinski@apple.com>
3019 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
3021 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
3024 2004-07-12 Eric Christopher <echristo@redhat.com>
3026 * parser.c (cp_parser_class_head): Remove unused variable.
3028 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3030 * decl.c (grok_op_properties): Reject [de-]allocation functions
3031 declared in a namespace, or declared as static.
3033 2004-07-12 Nathan Sidwell <nathan@codesourcery.com>
3035 * cp-tree.h (make_binfo): Remove.
3036 * decl.c (xref_basetypes): Use make_tree_binfo directly.
3037 * tree.h (copy_base_binfos): Likewise.
3038 (make_binfo): Remove.
3040 * call.c (build_user_type_conversion_1, build_new_op,
3041 check_constructor_callable, build_temp,
3042 perform_direct_initialization_of_possible): Pass type directly to
3043 lookup_fnfields & build_special_member_call.
3044 (build_special_member_call): Accept a type, and complete it.
3045 * class.c (finish_stuct_bits): Copy the BINFOs here.
3046 * cvt.c (ocp_convert): Pass type directly to
3047 build_special_member_call.
3048 * decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
3049 (xref_basetypes): Allocate the binfo here. Adjust.
3050 * init.c (build_init, build_new_1): Pass type directly to
3051 build_special_member_call.
3052 * lex.c (cxx_make_type): Do not allocate binfo here.
3053 * name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
3054 * parser.c (cp_parser_class_head): Always call xref_basetypes.
3055 * pt.c (instantiate_class_template): Likewise. Inhibit access
3056 checking for template friends.
3057 * ptree.c (cxx_print_type): Adjust record printing.
3058 * search.c (lookup_base): When taking a type, complete it before
3059 looking for a binfo.
3060 (lookup_member): Delay completing a type.
3061 (push_class_decls): Don't walk an incomplete type.
3062 (lookup_conversions): Likewise.
3063 * semantics.c (finish_stmt_expr_expr): Pass type directly to
3064 build_special_member_call.
3065 * tree.c (copy_base_binfos): Adjust.
3066 (make_binfo): Likewise.
3067 * typeck.c (build_modify_expr): Pass type directly to
3068 build_special_member_call.
3069 * typeck2.c (process_init_constructor): Check a binfo exists.
3070 (build_m_component_ref): Allow accessing an incomplete type.
3071 (build_functional_cast): Pass type directly to
3072 build_special_member_call.
3074 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3077 * config-lang.in (gtfiles): Add typeck2.c.
3078 * Make-lang.in: Tweak typeck2.c dependencies, and add rule for
3080 * cp-tree.h: Declare complete_type_check_abstract.
3081 * typeck2.c (pat_calc_hash, pat_compare,
3082 complete_type_check_abstract): New functions.
3083 (abstract_virtuals_error): If the type is abstract, register the
3084 declaration within abstract_pending_vars for further checks.
3085 Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
3086 * decl.c (cp_finish_decl): Do not strip array types.
3087 (create_array_type_for_decl): Check for abstractness of the element
3089 (complete_vars): Call complete_type_check_abstract.
3090 * class.c (finish_struct): Prepare a list of virtual functions for
3091 template types, and call complete_vars on it to check for abstractness.
3093 2004-07-12 Paolo Bonzini <bonzini@gnu.org>
3095 PR tree-optimization/14107
3096 * decl.c (finish_function): Remove temporary band-aid.
3098 2004-07-11 Mark Mitchell <mark@codesourcery.com>
3100 * call.c (build_operator_new_call): Avoid using push_to_top_level.
3101 (build_new_op): Adjust call to lookup_function_nonclass.
3102 * name-lookup.c (identifier_type_value): Adjust call to
3104 (lookup_name_real): Add block_p parameter.
3105 (lookup_name_nonclass): Adjust call to lookup_name_real.
3106 (lookup_function_nonclass): Likewise.
3107 (lookup_name): Likewise.
3108 * name-lookup.h (lookup_name_real): Change prototype.
3109 (lookup_name_nonclass): Likewise.
3110 * parser.c (cp_parser_lookup_name): Likewise.
3112 * cp-tree.h (saved_scope): Make old_bindings a vector.
3113 (unuse_fields): Remove.
3114 * name-lookup.h (cxx_saved_binding): Define it.
3115 * class.c (pushclass): Don't use unuse_fields.
3116 * name-lookup.c (cxx_saved_binding_make): Remove.
3117 (store_binding): Add new bindings to a vector, using an
3118 accumulator style, rather than adding them to a list.
3119 (store_bindings): Adjust accordingly.
3120 (store_class_bindings): Likewise.
3121 (push_to_top_level): Likewise.
3122 (pop_from_top_level): Likewise.
3123 * optimize.c (maybe_clone_body): Must push_to_top_level and
3124 pop_from_top_level calls outside of loop.
3125 * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope
3126 calls here from cp_parser_late_parsing_default_args.
3127 (cp_parser_save_default_args): Record the class type in which the
3128 function is declared.
3129 (cp_parser_late_parsing_default_args): Do not call
3130 push_nested_class/pop_nested_class.
3131 * search.c (dfs_unuse_fields): Remove.
3132 (unuse_fields): Remove.
3134 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
3136 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
3137 LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
3138 * cp-tree.h (poplevel): Declare.
3139 (set_block): Remove.
3140 * decl.c (set_block): Remove.
3142 2004-07-10 Mike Stump <mrs@apple.com>
3144 * decl2.c (import_export_class): Never export/import vtables
3145 with inline key functions.
3147 2004-07-09 Steven Bosscher <stevenb@suse.de>
3149 * typeck.c (c_expand_asm_operands): Remove.
3151 2004-07-09 Mike Stump <mrs@apple.com>
3153 * typeck.c (build_class_member_access_expr): Skip null deref
3154 warning when we don't dereference it.
3156 2004-07-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3160 * class.c (check_field_decls): Improve -Weffc++ warning: do not
3161 warn for pointers to functions/members, or for classes without
3164 2004-07-08 Mark Mitchell <mark@codesourcery.com>
3166 * name-lookup.h (struct cp_binding_level): Update documentation
3169 2004-07-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3172 * typeck.c (check_return_expr): Improve -Weffc++ warning: handle
3173 returning CALL_EXPR, and non-reference return type.
3175 2004-07-08 Nathan Sidwell <nathan@codesourcery.com>
3177 * name-lookup.c (push_binding): Use VEC_reserve.
3179 2004-07-08 Richard Henderson <rth@redhat.com>
3181 * cp-tree.h (expand_eh_spec_block): Remove.
3183 2004-07-07 Mark Mitchell <mark@codesourcery.com>
3185 * cp-tree.h (saved_scope): Remove x_previous_class_type and
3186 x_previous_class_values; add x_previous_class_level.
3187 (previous_class_type): Remove.
3188 (previous_class_values): Remove.
3189 (previous_class_level): New macro.
3190 * class.c (pushclass): Restore the identifier cache more
3192 (invalidate_class_lookup_cache): Use vector for class_shadowed and
3193 previous_class_values.
3194 * decl.c (poplevel): Likewise.
3195 * name-lookup.c (cxx_binding_init): New function.
3196 (cxx_binding_make): Use it.
3197 (push_binding): For a binding in a class level, use a vector of
3198 cp_class_binding nodes.
3199 (push_binding_level): New function.
3200 (begin_scope): Use it.
3201 (leave_scope): Do not put class binding levels on the free list.
3202 (print_binding_level): Adjust for the fact that class_shadowed is
3204 (poplevel_class): Likewise.
3205 (clear_identifier_class_values): Likewise.
3206 (push_class_level_binding): Likewise.
3207 (set_class_shadows): Remove.
3208 (store_binding): New function.
3209 (store_class_bindings): New function.
3210 (push_to_top_level): Use store_class_bindings as appropriate.
3211 (pop_from_top_level): Use previous_class_level, not
3212 previous_class_type.
3213 * name-lookup.h (cp_class_binding): New type.
3214 (cp_binding_level): Use a vector object for class_shadowed.
3215 (push_binding_level): Declare.
3216 (set_class_shadows): Remove.
3218 2004-07-07 Andrew Pinski <apinski@apple.com>
3220 * class.c (instantiate_type): BUFFER_REF is dead.
3221 * lex.c (init_operators): IN_EXPR is dead.
3223 2004-07-07 Jason Merrill <jason@redhat.com>
3226 * call.c (build_new_op): Give overload warnings for built-in
3229 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
3232 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
3235 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
3237 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
3238 * class.c (build_primary_vtable, check_bases,
3239 determine_primary_base, finish_struct_bits,
3240 maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
3241 get_basefndecls, warn_hidden, walk_subobject_offsets,
3242 build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
3243 layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
3244 finish_struct_1, get_vfield_name, contains_empty_class_p,
3245 dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
3246 dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
3247 add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
3249 * decl.c (xref_basetypes): Likewise.
3250 * dump.c (cp_dump_tree): Likewise.
3251 * error.c (dump_expr): Likewise.
3252 * init.c (sort_mem_initializers, expand_member_init,
3253 push_base_cleanups): Likewise.
3254 * method.c (do_build_copy_constructor, do_build_assign_reg,
3255 synthesize_exception_spec): Likewise.
3256 * name-lookup.c (arg_assoc_class): Likewise.
3257 * pt.c (instantiate_class_template, tsubst,
3258 get_template_base_recursive): Likewise.
3259 * ptree.c (cxx_print_type): Likewise.
3260 * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
3261 * search.c (lookup_base_r, dynamic_cast_base_recurse,
3262 dfs_access_in_type, access_in_type, lookup_field_queue_p,
3263 bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
3264 marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
3265 dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
3266 binfo_for_vtable, copied_binfo, original_binfo): Likewise
3267 * tree.c (copy_base_binfos, make_binfo): Likewise.
3268 * typeck.c (commmon_base_type): Likewise
3269 * typeck2.c (process_init_constructor): Likewise
3271 2004-07-06 Joseph S. Myers <jsm@polyomino.org.uk>
3273 * decl.c (check_tag_decl): Name redeclared type in diagnostic.
3275 2004-07-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3278 * pt.c (convert_nontype_argument): Disallow conversions between
3279 different enumeration types.
3281 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
3283 * cp-tree.h (BINFO_MARKED): Remove.
3284 (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
3285 BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
3286 BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
3287 (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
3288 * class.c (build_base_path): Use BINFO_VIRTUAL_P.
3289 (mark_primary_bases, determine_primary_base, base_derived_from,
3290 dfs_find_final_overrider, dfs_find_final_overrider_q,
3291 dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
3292 dfs_modify_vtables, walk_subobject_offsets,
3293 layout_nonempty_base_or_field, build_base_field,
3294 build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
3295 end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
3296 finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
3297 build_ctor_vtbl_group, accumulate_vtble_inits,
3298 dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
3299 build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
3300 add_vcall_offset_vtbl_entries_1): Likewise.
3301 * decl.c (xref_basetypes): Incomming virtual base indicated by
3303 * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
3304 * init.c (finish_init_stmts, sort_mem_initializers,
3305 emit_mem_initializers, build_vtble_address, expand_member_init,
3306 push_base_cleanups): Likewise.
3307 * method.c (do_build_copy_constructor): Likewise.
3308 * pt.c (instantiate_class_template,
3309 get_template_base_recursive): Likewise.
3310 * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
3311 get_pseudo_ti_desc): Likewise.
3312 * search.c (lookup_base_r, dynamic_cast_base_recurse,
3313 binfo_from_vbase, binfo_via_virtual, copied_binfo,
3314 original_binfo): Likewise.
3315 * semantics.c (finish_base_specifier): Virtualness is indicated
3317 * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
3319 2004-07-06 Mark Mitchell <mark@codesourcery.com>
3322 2004-06-24 Jason Merrill <jason@redhat.com>
3324 * decl.c (grokparms): Give the PARM_DECL reference type if the
3325 parameter is passed by invisible reference.
3327 2004-07-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3329 * cp-lang.c (cp_var_mod_type_p): Add extra arg.
3330 * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
3331 * pt.c (check_instantiated_args, unify): Likewise.
3333 2004-07-05 Phil Edwards <phil@codesourcery.com>
3335 * Make-lang.in (check-c++, lang_checks): Add some comments.
3337 2004-07-05 Zack Weinberg <zack@codesourcery.com>
3339 * cp-mudflap.c: Delete file.
3340 * Makefile.in: Remove all references to cp-mudflap.o.
3342 2004-07-05 Zack Weinberg <zack@codesourcery.com>
3344 * decl.c (cxx_init_decl_processing): Call
3345 build_common_tree_nodes before creating the global NAMESPACE_DECL.
3347 2004-07-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3350 * call.c (build_operator_new_call): Look only at global scope.
3352 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
3354 * call.c (enforce_access): Expect TREE_BINFO.
3355 * class.c (binfo_ctor_vtable): Check TREE_BINFO.
3356 * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
3357 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
3359 (BINFO_LANG_ELTS): Remove.
3360 (BINFO_LANG_SLOTS): New.
3361 (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
3362 (CLASSTYPE_TEMPLATE_INFO): Adjust.
3363 * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
3364 * search.c (lookup_member): Check TREE_BINFO.
3365 * semantics.c (perform_or_defer_access_check): Likewise.
3366 (check_accessibility_of_qualified_id): Check
3367 deferred_access_no_check.
3368 * tree.c (make_binfo): Use make_tree_binfo.
3370 2004-07-04 Mark Mitchell <mark@codesourcery.com>
3372 * method.c (implicitly_declare_fn): Set linkage of generated
3375 2004-07-04 Richard Henderson <rth@redhat.com>
3377 * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
3379 2004-07-03 Scott Brumbaugh <scottb.lists@verizon.net>
3382 * name-lookup.c (push_class_level_binding): Don't pass a
3383 TREE_LIST of ambiguous names to check_template_shadow as it
3384 only handles declarations. Instead, pull the declaration
3387 2004-07-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3390 * pt.c (check_explicit_specialization): Clarify error message.
3392 2004-07-02 Richard Henderson <rth@redhat.com>
3394 * tree.c (cp_unsave_r): Update remap_save_expr call.
3396 2004-07-02 Mark Mitchell <mark@codesourcery.com>
3399 * mangle.c (write_template_arg): Correct mangling.
3402 * decl.c (grokdeclarator): Robustify.
3404 2004-07-01 Richard Henderson <rth@redhat.com>
3406 * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
3407 * method.c (synthesize_method): Don't clear_last_expr.
3408 * name-lookup.c (maybe_push_cleanup_level): Likewise.
3410 2004-07-01 Nick Clifton <nickc@redhat.com>
3412 * decl2.c (import_export_class): Invoke the
3413 import_export_class field in the gcc_target structure if it is not
3416 2004-06-30 Richard Henderson (rth@redhat.com>
3418 * decl.c (start_preparsed_function): Don't set immediate_size_expand.
3419 * method.c (use_thunk): Likewise.
3421 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
3423 * call.c (build_over_call), typeck.c (build_function_call): Call
3424 check_function_arguments instead of check_function_format.
3426 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
3428 * call.c (build_over_call), typeck.c (build_function_call): Update
3429 calls to check_function_format.
3431 2004-06-30 Richard Henderson <rth@redhat.com>
3433 * call.c (build_over_call): Use __builtin_memcpy for copying
3434 CLASS_AS_BASE rather than funny casting.
3436 2004-06-30 Richard Henderson <rth@redhat.com>
3438 * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
3439 TYPE_SIZE_UNIT of full_type.
3441 2004-06-30 Per Bothner <per@bothner.com>
3443 Conditionally compile support for --enable-mapped_location.
3444 * decl.c (pop_label): Handle (imperfectly) USE_MAPPED_LOCATION case.
3445 * decl2.c: If USE_MAPPED_LOCATION, don't do some line number
3446 adjustments - which I don't understand.
3447 * error.c (dump_decl): Rename "<interrnal>" to "<built-in>".
3448 * error.c: Use LOCATION_FILE and EXPR_LOCATION macros.
3449 (print_instantiation_partial_context): Use expand_location.
3450 * decl.c (duplicate_decl): Use new DECL_IS_BUILTIN macro.
3451 * name-lookup.c: Likewise.
3452 * lex.c (cxx_init): Likewise. Also use BUILTINS_LOCATION.
3453 * name-lookup.c: Use input_line macro.
3454 * parser.c (cp_lexer_get_preprocessor_token): Use UNKNOWN_LOCATION.
3455 (cp_parser_statement): Rename locaal variable statement_locus to
3456 statement_location and use SET_EXPR_LOCATION macro.
3457 * pt.c: Handle USE_MAPPED_LOCATION case. Use new macros.
3458 * tree.c (cp_walk_subtrees): Likewise.
3460 2004-06-29 Per Bothner <per@bothner.com>
3462 * tree.c (build_min_nt, build_min, build_min_non_dep):
3463 Don't set TREE_COMPLEXITY from input_line.
3465 2004-06-29 Paul Brook <paul@codesourcery.com>
3467 * init.c: Include target.h.
3468 (get_cookie_size): Remove and replace with target hook.
3470 (build_new_1): Store the element size in the cookie.
3472 2004-06-29 Nathan Sidwell <nathan@codesourcery.com>
3475 * parser.c (cp_parser_template_declaration_after_export): Disable
3476 access checks here ...
3477 (cp_parser_class_specifier): ... not here.
3479 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
3481 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
3482 VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
3483 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
3486 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
3488 * cp-tree.h (struct deferred_access): Move to ...
3489 * semantics.c (struct deferred_access): ... here. Adjust.
3490 (deferred_access_stack): Make a VEC(deferred_access),
3491 (deferred_access_free_list): Remove.
3492 (deferred_access_no_check): New.
3493 (push_deferring_access_checks, resume_deferring_access_checks,
3494 stop_deferring_access_checks, pop_deferring_access_checks,
3495 get_deferred_access_checks, pop_to_parent_deferring_access_checks,
3496 perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
3498 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
3501 * call.c (build_temp): Declare.
3502 (check_constructor_callable): New.
3503 (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
3504 CONSTRUCTOR_CALLABLE.
3505 (convert_like_real, initialize_reference): Use
3506 check_constructor_callable.
3507 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
3508 (LOOKUP_*): Renumber.
3510 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
3512 * friend.c (add_friend): Only perform access checks when context
3514 * lex.c (cxx_make_type): Only create a binfo for aggregate types.
3515 * parser.c (cp_parser_class_specifier): Disable access checks here
3516 when parsing the body of a templated class.
3517 * semantics.c (perform_or_defer_access_checks): Reorder to allow
3518 NULL binfos when not checking access.
3520 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
3522 Use vector API for vbase list.
3523 * cp-tree.h: Include vec.h
3524 (DEF_VEC_P (tree)): New type.
3525 (struct lang_type_class): Change vbase's member type.
3526 (binfo_for_vbase): Declare.
3527 * class.c (determine_primary_base, base_derived_from,
3528 update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
3529 warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
3530 build_vtbl_initializer): Adjust.
3531 * decl.c (xref_basetypes): Adjust, accumulate upper bound of
3533 * init.c (sort_mem_initializers, expand_member_init,
3534 push_base_cleanups): Adjust.
3535 * method.c (do_build_copy_constructor): Adjust.
3536 * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
3537 (binfo_for_vbase): New.
3538 * tree.c (copy_base_binfos): Adjust.
3540 2004-06-28 Mark Mitchell <mark@codesourcery.com>
3542 * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
3544 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
3547 * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
3548 paranthesis in case of pointers to array members.
3549 * error.c (dump_type_prefix): Likewise.
3550 (dump_type_suffix): Maybe issue a whitespace when printing
3553 2004-06-27 Mark Mitchell <mark@codesourcery.com>
3556 * parser.c (cp_parser_set_decl_spec_type): Refine test for
3557 redefinition of built-in types.
3559 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
3561 * error.c (pp_template_argument_list_start): Remove.
3562 (pp_template_argument_list_end): Likewise.
3563 (pp_separate_with_comma): Use pp_cxx_separate_with.
3564 (reinit_global_formatting_buffer): Remove.
3565 (pp_non_consecutive_character): Likewise.
3566 (dump_scope): Use pp_cxx_colon_colon.
3567 (dump_template_parameter): Use pp_cxx_identifier,
3568 pp_cxx_tree_identifier and pp_cxx_whitespace.
3569 (dump_templat_bindings): Replace use of pp_string with sequence
3570 of pp_cxx_whitespace and pp_equal.
3571 (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
3572 pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set
3574 (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
3575 (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace,
3576 pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
3577 (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
3578 pp_cxx_right_bracket, pp_cxx_identifier throughout,
3579 (dump_decl): Likewise.
3580 (dump_template_decl): Likewise.
3581 (dump_function_decl): Likewise. Set padding as appropriate.
3582 (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
3584 (dump_exception_spec): Likewise.
3585 (dump_function_name): Use pp_cxx_tree_identifier and
3587 (dump_template_parms): Use pp_cxx_begin_template_argument_list and
3588 pp_cxx_end_template_argument_list.
3589 (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
3590 pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
3591 pp_cxx_whitespace throughout.
3592 (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
3594 (dump_unary_op): Likewise.
3595 (reinit_cxx_pp): New function.
3596 (type_as_string); Use it.
3597 (expr_as_string): Likewise.
3598 (decl_as_string); Likewise.
3599 (context_as_string): Likewise.
3600 (lang_decl_name): Likewise.
3601 (decl_to_string): Likewise.
3602 (expr_to_string): Likewise.
3603 (parm_to_string): Likewise.
3604 (type_to_string): Likewise.
3605 (args_to_string): Likewise.
3606 (cv_to_string): Likewise.
3608 2004-06-26 Mark Mitchell <mark@codesourcery.com>
3610 * cp-tree.h (cp_cv_quals): New type.
3611 (cp_declarator): Use it instead of "tree" as appropriate.
3612 (grok_method_quals): Adjust prototype.
3613 (grokclassfn): Likewise.
3614 (do_friend): Likewise.
3615 * decl.c (grokfndecl): Use cp_cv_quals, not tree.
3616 (grokdeclarator): Likewise.
3617 * decl2.c (grok_method_quals): Likewise.
3618 (grokclassfn): Likewise.
3619 * friend.c (do_friend): Likewise.
3620 * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
3621 * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
3622 (make_pointer_declarator): Likewise.
3623 (make_reference_declarator): Likewise.
3624 (make_ptrmem_declarator): Likewise.
3625 (cp_parser_ptr_operator): Likewise.
3626 (cp_parser_cv_qualifier_seq_opt): Likewise.
3627 (cp_parser_cv_qualifier_opt): Remove.
3628 (cp_parser_new_declarator_opt): Adjust call to
3629 cp_parser_ptr_operator.
3630 (cp_parser_conversion_declaration_opt): Likewise.
3631 (cp_parser_declarator): Use cp_cv_quals, not tree.
3632 (cp_parser_direct_declarator): Likewise.
3634 2004-06-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3636 * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
3637 Rename DECL_STMT to DECL_EXPR.
3638 * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
3639 * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
3640 * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
3642 2004-06-26 Jan Hubicka <jh@suse.cz>
3645 * decl2.c (maybe_emit_vtables): Always import_export_vtable for the
3646 reachability analysis.
3648 2004-06-25 Mark Mitchell <mark@codesourcery.com>
3650 * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
3653 2004-06-25 Paul Brook <paul@codesourcery.com>
3655 * decl2.c (get_guard): Call targetm.cxx.guard_type.
3656 (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
3658 2004-06-24 Mark Mitchell <mark@codesourcery.com>
3660 * decl.c (grokdeclarator): Restore error messages about __thread.
3661 * parser.c (cp_parser_decl_specifier_seq): Likewise.
3663 2004-06-24 Jason Merrill <jason@redhat.com>
3666 * decl.c (grokparms): Give the PARM_DECL reference type if the
3667 parameter is passed by invisible reference.
3669 2004-06-24 Andreas Schwab <schwab@suse.de>
3671 * cp-tree.h (enum cp_storage_class): Remove trailing comma.
3673 2004-06-23 Mark Mitchell <mark@codesourcery.com>
3675 * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
3676 (cp/decl.o): Likewise.
3677 (cp/decl2.o): Likewise.
3678 (cp/pt.o): Likewise.
3679 (cp/semantics.o): Likewise.
3680 * config-lang.in (gtfiles): Do not reference cp/lex.h.
3681 * class.c: Do not include lex.h.
3682 (add_implicitly_declared_members): Do not use
3683 adding_implicit_members.
3684 (check_bases_and_members): Do not talk about grok_x_components.
3685 * cp/cp-tree.h (adding_implicit_members): Remove.
3686 (cp_storage_class): New type.
3687 (cp_decl_spec): Likewise.
3688 (cp_decl_specifier_seq): Likewise.
3689 (cp_parameter_declarator): Use it for the decl_specifiers field.
3690 (check_tag_decl): Adjust prototype.
3691 (shadow_tag): Likewise.
3692 (groktypename): Likewise.
3693 (start_decl): Likewise.
3694 (start_function): Likewise.
3695 (start_method): Likewise.
3696 (grok_x_components): Remove.
3697 (grokfield): Adjust prototype.
3698 (grokbitfield): Likewise.
3699 (finish_member_class_template): Remove.
3700 * decl.c: Do not include lex.h.
3701 (adding_implicit_members): Do not define.
3702 (check_tag_decl): Do not use trees to represent decl-specifiers.
3703 (shadow_tag): Likewise.
3704 (groktypename): Likewise.
3705 (start_decl): Likewise.
3706 (grokvardecl): Likewise.
3707 (grokdeclarator): Likewise.
3708 (grokparms): Likewise.
3709 (start_function): Likewise.
3710 (start_method): Likewise.
3711 * decl.h (grokdeclarator): Adjust prototype.
3712 * decl2.c: Do not include lex.h.
3713 (grok_x_components): Remove.
3714 (grokfield): Do not use trees to represent decl-specifiers.
3715 (grokbitfield): Likewise.
3716 * lex.c: Do not include lex.h.
3718 * parser.c: Include target.h.
3719 (clear_decl_specs): New function.
3720 (cp_parser_translation_unit): Do not use trees to represent
3722 (cp_parser_postfix_expression): Likewise.
3723 (cp_parser_new_type_id): Likewise.
3724 (cp_parser_condition): Likewise.
3725 (cp_parser_simple_declaration): Likewise.
3726 (cp_parser_decl_specifier_seq): Likewise.
3727 (cp_parser_function_specifier_opt): Likewise.
3728 (cp_parser_conversion_type_id): Likewise.
3729 (cp_parser_template_parameter): Likewise.
3730 (cp_parser_explicit_instantiation): Likewise.
3731 (cp_parser_type_specifier): Likewise.
3732 (cp_parser_simple_type_specifier): Likewise.
3733 (cp_parser_init_declarator): Likewise.
3734 (cp_parser_type_id): Likewise.
3735 (cp_parser_type_specifier_seq): Likewise.
3736 (cp_parser_parameter_declaration): Likewise.
3737 (cp_parser_member_declaration): Likewise.
3738 (cp_parser_exception_declaration): Likewise.
3739 (cp_parser_function_definition_from_specifiers_and_declarator):
3741 (cp_parser_single_declaration): Likewise.
3742 (cp_parser_save_member_function_body): Likewise.
3743 (cp_parser_friend_p): Likewise.
3744 (cp_parser_set_storage_class): New function.
3745 (cp_parser_set_decl_spec_type): Likewise.
3746 * pt.c: Do not include lex.h.
3747 * semantics.c: Likewise.
3748 (finish_member_class_template): Remove.
3750 2004-06-23 Roger Sayle <roger@eyesopen.com>
3752 * call.c (build_cxx_call): Don't call expand_tree_builtin. No
3753 longer take both "args" and "convert_args" as arguments.
3754 (build_op_delete_call): Update call to build_cxx_call.
3755 (build_over_call): Likewise, update call to build_cxx_call.
3756 * cp-tree.h (build_cxx_call): Update funtion prototype.
3757 * typeck.c (build_function_call): Don't call expand_tree_builtin.
3758 * rtti.c (throw_bad_cast): Update call to build_cxx_call.
3759 (throw_bad_typeid): Likewise.
3760 (build_dynamic_cast_1): Likewise.
3762 2004-06-22 Richard Henderson <rth@redhat.com>
3764 * class.c (build_vfn_ref): Take a pointer not object. Build
3766 (cp_fold_obj_type_ref): New.
3767 * call.c (build_over_call): Update build_vfn_ref call.
3768 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
3769 * cp-tree.h (cp_fold_obj_type_ref): Declare.
3771 2004-06-21 Jason Merrill <jason@redhat.com>
3774 * cp-gimplify.c (cp_gimplify_init_expr): Look through
3777 2004-06-21 Mark Mitchell <mark@codesourcery.com>
3779 * cp-tree.def (NEW_EXPR): Add a fourth slot.
3780 * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
3781 (TREE_PARMLIST): Likewise.
3782 (CALL_DECLARATOR_PARMS): Likewise.
3783 (CALL_DECLARATOR_QUALS): Likewise.
3784 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
3785 (cp_declarator_kind): New type.
3786 (cp_parameter_declarator): Likewise.
3787 (cp_declarator): Likewise.
3788 (cp_error_declarator): Likewise.
3789 (no_parameters): Likewise.
3790 (groktypename): Change prototype.
3791 (start_decl): Likewise.
3792 (start_handler_parms): Likewise.
3793 (get_scope_of_declarator): Likewise.
3794 (start_function): Likewise.
3795 (start_preparsed_function): New function.
3796 (start_function): Change prototype.
3797 (start_method): Likewise.
3798 (grokfield): Likewise.
3799 (grokbitfield): Likewise.
3800 (build_new): Likewise.
3801 (make_pointer_declarator): Remove.
3802 (make_reference_declarator): Likewise.
3803 (make_call_declarator): Likewise.
3804 (set_quals_and_spec): Likewise.
3805 (process_template_parm): Change prototype.
3806 (begin_function_definition): Remove.
3807 (finish_parmlist): Remove.
3808 * decl.c (groktypename): Do not use trees to represent
3810 (start_decl): Likewise.
3811 (start_handler_parms): Remove.
3812 (get_scope_of_declarator): Reimplement.
3813 (grokdeclarator): Do not use trees to represent declarators.
3814 (grokparms): Likewise.
3815 (start_function): Likewise.
3816 (start_method): Likewise.
3817 (build_void_list_mode): Do not use TREE_PARMLIST.
3818 * decl.h (grokdeclarator): Change prototype.
3819 * decl2.c (grok_method_quals): Robustify.
3820 (grok_x_components): Do not use trees to represent declarators.
3821 (grokfield): Likewise.
3822 (grokbitfield): Likewise.
3823 (start_objects): Build FUNCTION_DECLs, not declarators.
3824 (start_static_storage_duration_function): Likewise.
3825 * init.c (build_new): Simplify.
3826 * lex.c (make_pointer_declarator): Remove.
3827 (make_reference_declarator): Likewise.
3828 (make_call_declarator): Likewise.
3829 (set_quals_and_spec): Likewise.
3830 * method.c (use_thunk): Use start_preparsed_function.
3831 (synthesize_method): Likewise.
3832 (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
3833 * optimize.c (maybe_clone_body): Use start_preparsed_function.
3834 * parser.c (cp_error_declarator): New variable.
3835 (declarator_obstack): Likewise.
3836 (alloc_declarator): New function.
3837 (make_declarator): Likewise.
3838 (make_id_declarator): Likewise.
3839 (make_pointer_declarator): Likewise.
3840 (make_reference_declarator): Likewise.
3841 (make_ptrmem_declarator): Likewise.
3842 (make_call_declarator): Likewise.
3843 (make_array_declarator): Likewise.
3844 (no_parameters): New variable.
3845 (make_parameter_declarator): Likewise.
3846 (cp_parser_check_for_definition_in_return_type): Do not use trees
3847 to represent declarators.
3848 (cp_parser_translation_unit): Likewise.
3849 (cp_parser_new_expression): Likewise.
3850 (cp_parser_new_type_id): Likewise.
3851 (cp_parser_new_declarator_opt): Likewise.
3852 (cp_parser_direct_new_declarator): Likewise.
3853 (cp_parser_condition): Likewise.
3854 (cp_parser_declaration_statement): Likewise.
3855 (cp_parser_declaration): Likewise.
3856 (cp_parser_conversion_type_id): Likewise.
3857 (cp_parser_conversion_declarator_opt): Likewise.
3858 (cp_parser_template_parameter_list): Likewise.
3859 (cp_parser_template_parameter): Likewise.
3860 (cp_parser_explicit_instantiation): Likewise.
3861 (cp_parser_init_declarator): Likewise.
3862 (cp_parser_declarator): Likewise.
3863 (cp_parser_direct_declarator): Likewise.
3864 (cp_parser_type_id): Likewise.
3865 (cp_parser_parameter_declaration_clause): Likewise.
3866 (cp_parser_parameter_declaration_list): Likewise.
3867 (cp_parser_parameter_declaration): Likewise.
3868 (cp_parser_member_declaration): Likewise.
3869 (cp_parser_exception_declaration): Likewise.
3870 (cp_parser_check_declarator_template_parameters): Likewise.
3871 (cp_parser_function_definition_from_specifiers_and_declarator):
3873 (cp_parser_save_member_function_body): Likewise.
3874 * pt.c (process_template_parm): Add is_non_type parameter.
3875 (convert_template_argument): Adjust call to groktypename.
3876 (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
3877 (tsubst): Do not expect declarators.
3878 (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
3880 (instantiate_decl): Use start_preparsed_function.
3881 * semantics.c (begin_function_definition): Remove.
3882 (finish_parmlist): Remove.
3883 * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
3886 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3888 * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
3889 (build_new_method_call): Likewise.
3890 * decl.c (local_variable_p_walkfn): Don't walk into types.
3891 * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
3892 (build_anon_union_vars): Add new operand for COMPONENT_REF.
3893 * init.c (buld_new): Add new operand for ARRAY_REF.
3894 * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
3895 (do_build_assign_ref): Likewise.
3896 * parser.c (cp_parser_direct_new_declarator): Add new operands
3898 (cp_parser_direct_declarator): Likewise.
3899 * pt.c (tsubst): Likewise.
3900 (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
3902 * semantics.c (finish_non_static_data_member): Add new operand
3904 * typeck.c (build_class_member_access_expr): Likewise.
3905 (build_class_member_access_expr, finish_class_member_access_expr):
3907 (build_ptrmemfunc_access_expr): Likewise.
3908 (build_array_ref): Add new operands for ARRAY_REF.
3909 * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
3910 * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
3912 2004-06-21 Richard Henderson <rth@redhat.com>
3914 * dump.c (cp_dump_tree): Don't use dump_next_stmt.
3915 * parser.c (cp_parser_jump_statement): Update commentary.
3916 * pt.c (tsubst_expr): Use RETURN_EXPR.
3917 * semantics.c (finish_return_stmt): Likewise.
3918 (finalize_nrv_r): Likewise.
3919 * typeck.c, typeck2.c: Update file start commentary.
3921 2004-06-21 Richard Henderson <rth@redhat.com>
3923 * semantics.c (finish_expr_stmt): Call verify_sequence_points.
3925 2004-06-20 Richard Henderson <rth@redhat.com>
3927 * cp-tree.h (add_decl_stmt): Declare.
3928 * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
3929 * semantics.c (maybe_cleanup_point_expr): New.
3930 (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
3931 finish_for_expr, finish_switch_cond): Use it.
3932 (finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN.
3934 2004-06-20 Richard Henderson <rth@redhat.com>
3936 * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
3937 * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
3938 (cp_gimplify_expr): Call it.
3939 (gimplify_cleanup_stmt): Move from c-gimplify.c.
3940 (cp_genericize): New.
3941 * decl.c (finish_function): Call it.
3942 * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
3943 (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
3944 (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
3945 (cp_genericize): Declare.
3946 * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
3947 * dump.c (cp_dump_tree): Likewise.
3948 * semantics.c (push_cleanup): Move from c-semantics.c.
3950 2004-06-20 Zack Weinberg <zack@codesourcery.com>
3952 * cp-lang.c (has_c_linkage): Implement.
3954 * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
3955 * decl.c (duplicate_decls): Use COPY_DECL_RTL.
3956 (builtin_function_1): Don't call make_decl_rtl.
3957 (build_cp_library_fn): Don't call set_mangled_name_for_decl.
3958 (grokvardecl): Don't call mangle_decl.
3959 * except.c (nothrow_libfn_p): Look at DECL_NAME, not
3960 DECL_ASSEMBLER_NAME.
3961 * method.c (set_mangled_name_for_decl): Delete.
3962 * name-lookup.c (pushdecl): When a local extern shadows a
3963 file-scope declaration of the same object, give both DECLs the
3965 * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
3966 on DECL_ASSEMBLER_NAME.
3968 2004-06-19 Richard Henderson <rth@redhat.com>
3970 * cp-gimplify.c: Remove unnecessary prototypes.
3971 (cp_gimplify_stmt): Merge into ...
3972 (cp_gimplify_expr): ... here. Move to end of file. Handle
3973 stmts_are_full_exprs_p frobbing.
3974 * cp-tree.h (cp_gimplify_stmt): Remove.
3975 * pt.c (tsubst_expr): Merge prep_stmt and unify.
3976 * tree.c (init_tree): Don't set lang_gimplify_stmt.
3978 2004-06-18 Richard Henderson <rth@redhat.com>
3981 * semantics.c (begin_cond): New.
3982 (finish_cond): Rewrite to handle template DECL_STMTs specially.
3983 Assume that non-template decls go land before the conditional.
3984 (simplify_loop_decl_cond): Likewise.
3985 (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
3986 finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
3987 begin_switch_stmt, finish_switch_cond): Update to match.
3989 2004-06-17 Jason Merrill <jason@redhat.com>
3992 * semantics.c (simplify_aggr_init_expr): Don't return the slot.
3993 (finish_stmt_expr_expr): Update type after conversions.
3994 (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
3995 Handle void initializer.
3996 * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
3998 2004-06-17 Geoffrey Keating <geoffk@apple.com>
4000 * class.c (build_clone): Don't call defer_fn, let mark_used do it.
4001 * cp-tree.h (defer_fn): Delete.
4002 * decl2.c (defer_fn): Delete.
4003 (finish_file): Simplify deferred_fns loops; check that
4004 only used inline functions get into deferred_fns.
4005 (mark_used): Inline previous contents of defer_fn.
4007 2004-06-16 Richard Henderson <rth@redhat.com>
4009 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
4010 (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
4011 * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
4012 of CTOR_INITIALIZER ...
4013 (pp_cxx_statement): ... here.
4014 * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
4015 (finish_function): Use alloc_stmt_list to zap entire function.
4016 * parser.c (cp_parser_compound_statement): Update commentary.
4017 * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
4018 * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
4019 (finish_stmt_expr): Don't look through COMPOUND_STMT.
4021 2004-06-16 Geoffrey Keating <geoffk@apple.com>
4023 * pt.c (mark_decl_instantiated): Don't call defer_fn.
4025 2004-06-16 Richard Henderson <rth@redhat.com>
4027 * parser.c (cp_parser_labeled_statement): Update commentary.
4028 * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
4029 * tree.c (mark_local_for_remap_r): Likewise.
4031 2004-06-16 Richard Henderson <rth@redhat.com>
4033 * parser.c (cp_parser_asm_definition): Update commentary.
4034 * pt.c (tsubst_expr): Use ASM_EXPR.
4035 * semantics.c (finish_asm_stmt): Likewise.
4037 2004-06-16 Richard Henderson <rth@redhat.com>
4039 * decl.c (finish_destructor_body): Use LABEL_EXPR.
4040 * parser.c (cp_parser_statement): Update commentary.
4041 * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
4042 * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
4043 * tree.c (mark_local_for_remap_r): Likewise.
4045 2004-06-16 Richard Henderson <rth@redhat.com>
4048 * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
4049 statement in FOR_INIT_STMT for templates.
4051 2004-06-15 Richard Henderson <rth@redhat.com>
4053 * call.c (initialize_reference): Don't build CLEANUP_STMT here.
4054 * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
4055 (genericize_try_block): Use gimplify_stmt.
4056 (genericize_catch_block, genericize_eh_spec_block): Likewise.
4057 (cp_gimplify_init_expr): Remove STMT_EXPR special case.
4058 (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
4059 * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
4060 (cp_tree_chain_matters_p): Remove.
4061 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
4062 (COMPOUND_STMT_BODY_BLOCK): New.
4063 (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
4064 (EXPR_STMT_STMT_EXPR_RESULT): New.
4065 (building_stmt_tree): Check cur_stmt_list.
4066 (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
4067 (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
4068 * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
4069 (cp_finish_decl): Use push_cleanup.
4070 (start_function, finish_function): Use statement lists.
4071 (finish_stmt): Do nothing.
4072 * except.c (begin_eh_spec_block): Use statement lists.
4073 (check_handlers_1, check_handlers): Likewise.
4074 * init.c (construct_virtual_base): Don't add extra compound stmts.
4075 (build_vec_init): Likewise.
4076 * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
4077 * name-lookup.h (struct cp_binding_level): Add statement_list.
4078 * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
4079 (cp_parser_labeled_statement, cp_parser_expression_statement,
4080 cp_parser_statement_seq_opt): Likewise.
4081 (cp_parser_compound_statement): Likewise. Take bool for try block.
4082 (cp_parser_selection_statement): Tidy if processing.
4083 (cp_parser_already_scoped_statement): Rewrite to do what it says.
4084 * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
4085 (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST.
4086 Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
4087 * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
4088 (finish_cond): New, rewritten from FINISH_COND.
4089 (simplify_loop_decl_cond): New.
4090 (finish_expr_stmt): Avoid nested EXPR_STMTs.
4091 (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
4092 begin_else_clause, finish_else_clause, finish_if_stmt,
4093 begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
4094 begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
4095 finish_for_cond, finish_for_stmt, begin_switch_stmt,
4096 finish_switch_cond, finish_switch_stmt, begin_try_block,
4097 finish_try_block, finish_cleanup_try_block, finish_function_try_block,
4098 finish_handler_sequence, finish_function_handler_sequence,
4099 begin_handler, finish_handler_parms, finish_handler,
4100 begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
4101 using statement lists.
4102 (begin_compound_stmt): Replace has_no_scope argument with flags.
4103 Update all callers. Use statement lists.
4104 (finish_compound_stmt): Likewise.
4105 (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
4106 (current_scope_stmt_stack): Remove.
4107 (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
4108 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
4109 Rewrite with statement lists.
4111 2004-06-15 Alexandre Oliva <aoliva@redhat.com>
4113 * parser.c: Change all assignments of c_lex_string_translate
4114 to true and false to 1 and 0.
4115 (cp_lexer_read_token): Convert type of the translated string.
4116 (cp_parser_skip_to_closing_parentheses): Preserve original
4117 value of c_lex_string_translate, and set it to -1 while
4119 (cp_parser_cache_group): Likewise.
4120 (cp_parser_cache_group_1): Renamed.
4121 (cp_parser_asm_operand_list): Remove redundant setting of
4122 c_lex_string_translate.
4123 (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
4124 Handle chained strings.
4126 2004-06-12 Andrew Pinski <apinski@apple.com>
4130 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
4132 * cp-tree.h: Fix typo.
4134 * cp-tree.h: Include cgraph.h
4135 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
4136 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
4138 2004-06-12 Jason Merrill <jason@redhat.com>
4140 PR tree-optimization/14107
4141 * decl.c (finish_function): Warn about no return in all functions.
4143 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
4145 * cp-tree.h (struct language_function): Remove cannot_inline.
4146 * decl.c (save_function_data): cannot_inline is no more.
4147 (cxx_push_function_context): Likewise.
4148 * decl2.c (start_objects, start_static_storage_duration_function):
4149 Reset DECL_INLINE, set DECL_UNINLINABLE.
4151 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4154 * search.c (lookup_field): Propagate the ambiguity list.
4155 (lookup_fnfields): Likewise.
4157 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4160 * parser.c (cp_parser_template_name): Ctors/dtors never need a
4161 template keyword to disambiguate.
4163 2004-06-14 Mark Mitchell <mark@codesourcery.com>
4166 * decl.c (grokdeclarator): Ignore pointer-to-members when
4167 computing template depth.
4170 * name-lookup.c (pushtag): Do not try to put class declarations in
4171 explicit specialization scopes.
4173 2004-06-11 Andrew Pinski <pinskia@physics.uc.edu>
4175 * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
4177 2004-06-11 Mark Mitchell <mark@codesourcery.com>
4180 * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
4181 bindings for undeclared built-ins.
4183 2004-06-11 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4185 * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
4186 appear at the correct location.
4188 2004-06-10 Jason Merrill <jason@redhat.com>
4192 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4193 * init.c (build_offset_ref): Build SCOPE_REF with non-null
4194 TREE_TYPE for non-dependent names.
4195 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
4196 unknown_type_node as its TREE_TYPE.
4197 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
4198 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
4199 (dump_expr) <SCOPE_REF case>: Likewise.
4201 2004-06-10 Mark Mitchell <mark@codesourcery.com>
4204 * parser.c (cp_parser_direct_declarator): Robustify.
4207 * pt.c (tsubst_copy): Use decl_constant_value on enumeration
4208 constants in non-dependent contexts.
4212 * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
4215 2004-06-10 Jakub Jelinek <jakub@redhat.com>
4218 * decl.c (duplicate_decls): Handle fileptr_type_node arguments
4221 2004-06-09 Mark Mitchell <mark@codesourcery.com>
4225 2004-06-07 Mark Mitchell <mark@codesourcery.com>
4226 * lex.c (handle_pragma_interface): Deprecate.
4227 (handle_pragma_implementation): Likewise.
4229 2004-06-09 Andrew Pinski <pinskia@physics.uc.edu>
4231 * g++spec.c (lang_specific_driver): Remove check for -lm
4232 and -lmath when check it see if it was the math library.
4234 2004-06-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4237 * parser.c (cp_parser_direct_declarator): Reject constructor named
4238 as qualified template-id.
4240 2004-06-07 Mark Mitchell <mark@codesourcery.com>
4243 * lex.c (handle_pragma_interface): Deprecate.
4244 (handle_pragma_implementation): Likewise.
4246 2004-06-07 Mark Mitchell <mark@codesourcery.com>
4249 * parser.c (cp_parser_iteration_statement): Fix typo in error
4253 * pt.c (tsubst_default_argument): Do not defer access checks
4254 while substituting into the default argument.
4257 * pt.c (tsubst_copy): Do not try to substitute for an enumeration
4258 constant in a non-dependent context.
4261 * except.c (build_throw): Ensure that temp_expr has been
4264 2004-06-06 Roger Sayle <roger@eyesopen.com>
4266 * cp/cp-tree.h (lvalue_or_else): Add function prototype.
4268 2004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4271 * parser.c (cp_parser_mem_initializer_id): Gracefully reject
4272 'typename', and accept 'template'.
4274 2004-06-03 Andrew Pinski <pinskia@physics.uc.edu>
4275 Jan Hubicka <jh@suse.cz>
4278 * method.c (use_think): Do not mark thunk as referenced.
4280 2004-06-03 Matt Austern <austern@apple.com>
4283 * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
4284 is nonzero, and if we see a noninline definition of a key method,
4285 make the vtables nonweak.
4287 2004-06-02 Matt Austern <austern@apple.com>
4289 * cp-tree.h (instantiate_decl): new boolean parameter,
4290 undefined_ok. Current behavior is equivalent to its being 0.
4291 * decl2.c (mark_used): Add new argument when calling instantiate_decl
4292 * pt.c (mark_decl_instantiated): Unconditionally make
4293 instantiations explicit unconditionally
4294 (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
4295 since mark_decl_instantiated now does it.
4296 (instantiate_class_member): New. Instantiate a member of an
4297 explicitly instantiated class template.
4298 (do_type_instantiation): Explicitly instantiate members of an
4299 explicitly instantiated class template.
4300 (instantiate_decl): if undefined_ok is nonzero, and if we're
4301 trying to explicitly instantiated a template with no definition,
4302 change it to an implicit instantiation.
4303 (instantiate_pending_templates): Add new argument to instantiate_decl.
4304 * tree.c (cp_cannot_inline_tree_fn): Likewise.
4306 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
4308 * cp-tree.h: Fix typo.
4310 * cp-tree.h: Include cgraph.h
4311 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
4312 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
4314 2004-06-01 Jason Merrill <jason@redhat.com>
4317 * call.c (call_builtin_trap): Remove type parm.
4318 (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
4319 (build_x_va_arg): Dereference a null pointer for a non-POD argument.
4321 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4324 * init.c (build_offset_ref): Build SCOPE_REF with non-null
4325 TREE_TYPE for non-dependent names.
4326 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
4327 unknown_type_node as its TREE_TYPE.
4328 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
4329 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
4330 (dump_expr) <SCOPE_REF case>: Likewise.
4332 2004-06-01 Richard Henderson <rth@redhat.com>
4333 Andrew Pinski <pinskia@physics.uc.edu>
4335 * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
4336 * parser.c (struct cp_parser): Remove in_offsetof.
4337 (cp_parser_new): Don't set it.
4338 (cp_parser_unary_expression): Don't check it.
4339 (cp_parser_postfix_open_square_expression): Split out from ...
4340 (cp_parser_postfix_expression): ... here.
4341 (cp_parser_postfix_dot_deref_expression): Likewise.
4342 (cp_parser_builtin_offsetof): New.
4343 (cp_parser_primary_expression): Use it.
4345 2004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4348 * parser.c (cp_parser_postfix_expression): Allow subscript
4349 operator in offsetof.
4351 2004-05-31 Mark Mitchell <mark@codesourcery.com>
4354 * friend.c (add_friend): Do not try to perform access checks for
4355 functions from dependent classes.
4357 2004-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
4359 * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
4360 (pp_cxx_begin_template_argument_list): Turn into a function.
4361 (pp_cxx_end_template_argument_list): Likewise.
4362 (pp_cxx_separate_with): Define.
4363 (pp_cxx_unqualified_id): Tidy.
4364 (pp_cxx_primary_expression): Likewise.
4365 (pp_cxx_postfix_expression): Likewise.
4366 (pp_cxx_expression): Likewise.
4367 (pp_cxx_simple_type_specifier): Likewise.
4368 (pp_cxx_type_specifier_seq): Likewise.
4369 (pp_cxx_parameter_declaration_clause): Likewise.
4370 (pp_cxx_exception_specification): Likewise.
4371 (pp_cxx_direct_declarator): Likewise.
4372 (pp_cxx_type_id): Likewise.
4373 * cxx-pretty-print.h (pp_cxx_whitespace): Export from
4375 (pp_cxx_left_paren): Likewise.
4376 (pp_cxx_right_paren): Likewise.
4377 (pp_cxx_left_brace): Likewise.
4378 (pp_cxx_right_brace): Likewise.
4379 (pp_cxx_left_bracket): Likewise.
4380 (pp_cxx_right_bracket): Likewise.
4381 (pp_cxx_dot): Likewise.
4382 (pp_cxx_identifier): Likewise.
4383 (pp_cxx_tree_identifier): Likewise.
4384 (pp_cxx_ampersand): New macro.
4385 (pp_cxx_star): Likewise.
4386 (pp_cxx_arrow): Likewise.
4387 (pp_cxx_semicolon): Likewise.
4388 (pp_cxx_complement): Likewise.
4389 (pp_cxx_begin_template_argument_list): Declaree.
4390 (pp_cxx_end_template_argument_list): Likewise.
4391 (pp_cxx_colon_colon): likewise.
4393 2004-05-31 Eric Botcazou <ebotcazou@libertysurf.fr>
4395 * parser.c (cp_parser_simple_type_specifier): Explicitly test
4398 2004-05-31 Kazu Hirata <kazu@cs.umass.edu>
4400 * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
4401 typeck.c: Fix comment formatting.
4403 2004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
4405 * cp-lang.c (cp_expand_decl): Remove.
4406 (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
4408 2004-05-30 Andreas Jaeger <aj@suse.de>
4410 * lang-specs.h: Add missing initializers for .ii.
4412 2004-05-28 Aldy Hernandez <aldyh@redhat.com>
4414 * decl.c (cp_make_fname_decl): Free return value from
4417 2004-05-28 Mark Mitchell <mark@codesourcery.com>
4420 * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
4422 * init.c (build_new): Likewise.
4425 * name-lookup.c (arg_assoc): Robustify.
4428 * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
4429 when determining the scope to use for a pointer to member.
4430 (lookup_anon_field): Give it external linkage.
4431 * cp-tree.h (lookup_anon_field): Declare it.
4432 * expr.c (cplus_expand_constant): Use it.
4434 2004-05-28 Mark Mitchell <mark@codesourcery.com>
4437 * parser.c (cp_parser_simple_type_specifier): Call
4438 maybe_note_name_used_in_class.
4440 2004-05-28 Tom Marshall <tmarshall@real.com>
4443 * class.c (finish_struct_1): Warn only if the dtor is non-private or
4444 the class has friends.
4446 2004-05-27 Adam Nemet <anemet@lnxw.com>
4449 * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
4450 TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
4452 2004-05-24 Geoffrey Keating <geoffk@apple.com>
4454 * method.c (implicitly_declare_fn): Don't call defer_fn; abort
4455 if it might be needed.
4456 * pt.c (mark_decl_instantiated): Only call defer_fn if
4457 the function actually needs processing in finish_file.
4458 * decl2.c (finish_file): Add check that elements in
4459 deferred_fns_used are really needed there. Remove unnecessary
4460 test of DECL_SAVED_TREE.
4462 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
4464 * Make-lang.in: No need to specify $(LIBCPP).
4466 2004-05-23 Mark Mitchell <mark@codesourcery.com>
4469 * parser.c (cp_parser_class_head): Robustify.
4472 * parser.c (cp_parser_decl_specifier_seq): Correct error in
4474 (cp_parser_constructor_declarator_p): Treat attributes
4478 * typeck.c (build_unary_op): Do not attempt to resolve casts to
4479 base classes in templates.
4481 2004-05-23 Mark Mitchell <mark@codesourcery.com>
4484 * pt.c (instantiate_template): Robustify.
4486 2004-05-23 Mark Mitchell <mark@codesourcery.com>
4489 * decl.c (xref_tag): Issue errors about redeclaring template
4490 classes as non-template classes.
4492 2004-05-23 Mark Mitchell <mark@codesourcery.com>
4495 * name-lookup.c (supplement_binding): Allow redefinitions of
4499 * parser.c (cp_parser_template_argument): Robustify.
4501 2004-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
4503 * class.c (alter_access): Use %E format specifier to print an
4504 identifier node. Avoid looking at the IDENTIFIER_POINTER.
4505 (push_lang_context): Likewise.
4506 * decl.c (lookup_label): Likewise.
4507 (grokdeclarator): Likewise.
4508 * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
4509 * pt.c (do_type_instantiation): Likewise.
4510 * tree.c (handle_java_interface_attribute): Likewise.
4511 (handle_com_interface_attribute): Likewise.
4512 (handle_init_priority_attribute): Likewise.
4514 2004-05-22 Mark Mitchell <mark@codesourcery.com>
4518 * pt.c (build_non_dependent_expr): Expand the set of tree nodes
4519 recognized as overloaded functions.
4521 2004-05-22 Mark Mitchell <mark@codesourcery.com>
4524 * class.c (layout_nonempty_base_or_field): Do not try to avoid
4525 layout conflicts for unions.
4528 * typeck.c (build_x_unary_op): Instantiate template class
4529 specializations before looking for "operator &".
4532 * typeck.c (complete_type): Layout non-dependent array types, even
4536 * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
4539 2004-05-22 Roger Sayle <roger@eyesopen.com>
4541 * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
4542 returning when TREE_TYPE is error_mark_node.
4543 * typeck.c (require_complete_type): Return error_mark_node if
4544 value's type is an error_mark_node.
4546 2004-05-20 Andrew Pinski <pinskia@physics.uc.edu>
4548 * optimize.c (calls_setjmp_r): Remove.
4549 (calls_setjmp_p): Remove.
4550 * cp-tree.c (calls_setjmp_p): Remove.
4551 * decl.c (finish_function): Do not call calls_setjmp_p.
4553 2004-05-18 Zack Weinberg <zack@codesourcery.com>
4555 * decl.c (cp_finish_decl): Use mark_decl_referenced.
4556 * decl2.c (maybe_make_one_only): Likewise.
4557 * method.c (use_thunk): Likewise.
4559 2004-05-18 Jason Merrill <jason@redhat.com>
4561 * class.c (build_base_path): Tidy a bit.
4563 2004-05-14 Geoffrey Keating <geoffk@apple.com>
4565 * name-lookup.c (struct scope_binding): New.
4566 (EMPTY_SCOPE_BINDING): New.
4567 (lookup_using_namespace): Take a scope_binding instead of a
4569 (qualified_lookup_using_namespace): Likewise.
4570 (cxx_binding_clear): Delete.
4571 (do_nonmember_using_decl): Use a scope_binding instead of a
4573 (lookup_tag): Don't call select_decl.
4574 (ambiguous_decl): Don't return anything (and change callers to match).
4575 Take a scope_binding as the second parameter.
4576 (lookup_namespace_name): Use a scope_binding instead of a
4578 (unqualified_namespace_lookup): Likewise.
4579 (lookup_qualified_name): Likewise.
4580 (select_decl): Take a scope_binding instead of a cxx_binding.
4581 Use macros rather than hand-coding tests for type-ness.
4583 2004-05-13 Diego Novillo <dnovillo@redhat.com>
4585 * cp-gimplify.c: Rename from cp-simplify.c.
4586 * Make-lang.in, optimize.c: Update.
4588 2004-05-13 Diego Novillo <dnovillo@redhat.com>
4590 Merge from tree-ssa-20020619-branch. See
4591 ChangeLog.tree-ssa for details.
4593 * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
4594 cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
4595 expr.c, init.c, name-lookup.h, optimize.c, parser.c,
4596 pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
4598 * cp-mudflap.c: New file.
4599 * cp-simplify.c:: New file.
4601 2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4604 * decl2.c (check_classfn): For member templates, compare also the
4605 template parameters to match the declaration.
4606 * cp-tree.h: Adjust declaration of check_classfn.
4607 * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
4608 * friend.c (do_friend): Likewise.
4609 * pt.c (tsubst_friend_function): Likewise.
4611 2004-05-01 Zack Weinberg <zack@codesourcery.com>
4613 * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
4614 Instead, dig into the representation type to find the array bound.
4616 2004-04-30 Jason Merrill <jason@redhat.com>
4618 Refer to base members using COMPONENT_REFs where possible.
4619 * class.c (build_simple_base_path): New fn.
4620 (build_base_path): Use it for non-virtual base references.
4621 (layout_class_type): Change base fields to their real type
4622 after layout is done.
4623 * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
4624 * cp-lang.c (cxx_get_alias_set): Use it.
4626 2004-04-30 Kazu Hirata <kazu@cs.umass.edu>
4628 * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
4631 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4634 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
4635 used in integral constant expressions.
4637 2004-04-22 Mark Mitchell <mark@codesourcery.com>
4639 * init.c (build_aggr_init): Fix accidental use of C99 construct in
4642 * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
4644 * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
4645 * decl.c (reshape_init): Use it.
4646 * init.c (perform_member_init): Remove redundant condition.
4647 (build_aggr_init): Adjust to handle brace-enclosed initializers
4649 (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
4651 * parser.c (cp_parser_initializer_clause): Do not set
4652 TREE_HAS_CONSTRUCTOR on the initializer.
4653 * rtti.c (tinfo_base_init): Likewise.
4654 (generic_initializer): Likewise.
4655 (ptr_initializer): Likewise.
4656 (ptm_initializer): Likewise.
4657 (class_initializer): Likewise.
4658 (get_pseudo_ti_init): Likewise.
4659 * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
4661 2004-04-22 Alan Modra <amodra@bigpond.net.au>
4663 * name-lookup.c (anonymous_namespace_name): Make static.
4665 2004-04-19 Roger Sayle <roger@eyesopen.com>
4668 * class.c (build_base_path): Call fold whilst building the NULL
4669 pointer check expression trees.
4671 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
4673 * init.c (build_new_1): Don't use type size argument for Java
4674 _Jv_AllocObject call.
4676 2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
4678 * method.c (make_alias_for_thunk): Remove preprocessor guard on
4679 declaration and definition.
4681 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
4684 * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
4685 than ASM_OUTPUT_DEF.
4687 2004-04-08 Jakub Jelinek <jakub@redhat.com>
4689 * decl2.c (mark_used): Don't segfault if cfun != NULL but
4690 current_function_decl == NULL.
4692 2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
4695 * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
4698 2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4700 * init.c (decl_constant_value): Don't look at DECL_INITIAL
4702 * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
4703 or TREE_SIDE_EFFECTS of a type.
4705 2004-04-02 Nathan Sidwell <nathan@codesourcery.com>
4708 * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
4709 cv-qualifier unification.
4710 * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
4712 2004-04-02 Jan Hubicka <jh@suse.cz>
4714 * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
4715 * cp-tree.h (cp_update_decl_after_saving): Declare.
4716 * tree.c (cp_update_decl_after_saving): Define.
4718 2004-04-01 Mark Mitchell <mark@codesourcery.com>
4721 * typeck.c (get_delta_difference): Call fold before returning the
4724 2004-04-01 Richard Henderson <rth@redhat.com>
4727 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
4728 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
4730 2004-04-01 Mark Mitchell <mark@codesourcery.com>
4733 * name-lookup.c (maybe_push_cleanup_level): Robustify.
4735 2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4737 * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
4739 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4741 * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
4742 * class.c (check_bitfield_decl): Likewise.
4743 * cvt.c (type_promotes_to): Likewise.
4744 * decl.c (finish_enum): Likewise.
4745 * mangle.c (write_builtin_type): Likewise.
4746 * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
4747 * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
4748 (build_binary_op): Likewise.
4750 2004-03-31 Jan Hubicka <jh@suse.cz>
4752 * tree.h (optimize_function): Kill prototype.
4753 * optimize.c (dump_function, optimize_function, dump_finction): Kill.
4754 * semantics.c (expand_body): Kill.
4756 2004-03-30 Mark Mitchell <mark@codesourcery.com>
4759 * decl.c (start_decl_1): Do not decide whether or not to create a
4760 new cleanup level until after the type has been completed.
4763 * pt.c (tsubst_default_argument): Clear current_function_decl.
4765 2004-03-30 Zack Weinberg <zack@codesourcery.com>
4767 * name-lookup.c, parser.c: Use new shorter form of GTY markers.
4769 2004-03-29 Zack Weinberg <zack@codesourcery.com>
4771 * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
4772 is null, just print the literal name and return.
4774 2004-03-25 Kazu Hirata <kazu@cs.umass.edu>
4776 * cxx-pretty-print.c: Fix comment typos.
4778 2004-03-24 Kazu Hirata <kazu@cs.umass.edu>
4780 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
4783 2004-03-23 Ziemowit Laski <zlaski@apple.com>
4785 * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
4786 * mangle.c (write_type): Add call to 'mangle_fundamental_type'
4789 2004-03-23 Zack Weinberg <zack@codesourcery.com>
4791 PR 12267, 12391, 12560, 13129, 14114, 14133
4792 * cp-lang.c (c_reset_state): Delete.
4793 (push_file_scope, pop_file_scope): New stubs.
4794 * parser.c (c_parse_file): Call sorry() here if called more than once.
4796 2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4798 * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
4801 2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
4803 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
4805 2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
4807 * error.c (enum pad): Remove.
4808 (dump_qualifiers): Likewise.
4809 (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
4810 (dump_aggr_type): Likewise.
4811 (dump_type_suffix): Likewise.
4812 (dump_simple_decl): Likewise.
4813 (dump_function_decl): Likewise.
4814 (cv_to_string): Likewise.
4815 (dump_type_prefix): Likewise. Adjust return void.
4816 * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
4818 (pp_cxx_template_keyword_if_needed): Document.
4819 (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
4820 (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
4821 MUST_NOT_THROW_EXPR.
4823 2004-03-21 Mark Mitchell <mark@codesourcery.com>
4826 * decl.c (cp_finish_decl): Compute the size of arrays declared in
4827 templates, if their type is non-dependent.
4829 2004-03-19 Mark Mitchell <mark@codesourcery.com>
4831 * call.c (build_op_delete_call): Do not forget the placement
4832 arguments when iterating through mutiple delete operators.
4834 * cp-tree.h (svaed_scope): Remove last_parms.
4835 (NEW_DELETE_OPNAME_P): New macro.
4836 (last_function_parms): Remove.
4837 (do_friend): Adjust prototype.
4838 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
4839 using last_function_parms.
4840 (grokfndecl): Take the PARM_DECLs as an argument, rather than
4841 using last_function_parms.
4842 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
4843 for class-specific operator new and operator delete.
4844 (grok_op_properties): Do not look for allocation functions with
4846 (start_function): Use DECL_ARGUMENTS instead of
4847 last_function_parms.
4848 * decl.h (last_function_parms): Do not declare.
4849 * decl2.c (grokclassfn): Do not use last_function_parms.
4850 * friend.c (do_friend): Remove parmdecls parameter.
4851 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
4852 (pop_from_top_level): Do not restore it.
4853 * pt.c (check_explicit_specialization): Do not adjust
4854 last_function_parms.
4856 * name-lookup.c (do_local_using_decl): Create a local binding for
4857 types brought in via using declarations.
4859 * name-lookup.c (lookup_arg_dependent): Handle block-scope
4860 function declarations correctly.
4862 * semantics.c (finish_id_expression): Correct handling of
4863 conversion operators to dependent types.
4865 * typeck.c (lookup_destructor): Allow the use of destructors from
4868 2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4870 * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
4871 TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
4872 * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
4873 the field is named TEMPLATE_TYPE_PARM_INDEX.
4875 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4878 * parser.c (cp_parser_functional_cast): A cast to anything
4879 but integral or enumaration type is not an integral constant
4881 * pt.c (value_dependent_expression_p): Handle cast expressions
4882 without operands (such as "int()").
4884 2004-03-18 Mark Mitchell <mark@codesourcery.com>
4886 * semantics.c (finish_pseudo_destructor_expr): Allow differing
4887 cv-qualification between the type named by the
4888 pseudo-destructor-name and the object-type.
4890 * search.c (accessible_base_p): Handle non-proper bases.
4892 * name-lookup.c (do_nonmember_using_decl): If a using declaration
4893 refers to a single overloaded function, set the type of the
4895 * tree.c (lvalue_type): Simplify.
4896 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
4898 (build_unary_op): Handle OVERLOADs with known types.
4900 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
4903 * parser.c (cp_parser_postfix_expression): Handle the use of
4904 "typename" in non-dependent contexts. Convert appropriately when
4905 when using a qualified name after "->" or ".".
4907 * call.c (conditional_conversion): Honor the requirement that some
4908 conversions refer to the original object.
4910 2004-03-18 Mark Mitchell <mark@codesourcery.com>
4912 * call.c (build_conditional_expr): Do not call force_rvalue for
4913 operands of void_type when the conditional expression itself has
4915 * name-lookup.c (pushdecl): Don't consider a declaration of a
4916 function named "main" to be an overload of a type named "main".
4917 * parser.c (cp_parser_template_name): Perform name lookup when the
4918 template name is proceeded by "template" if the qualifying scope
4920 * typeck.c (composite_pointer_type_r): Correctly handle
4921 pointer-to-member types.
4922 (build_const_cast): Likewise.
4924 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4926 * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
4927 * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
4928 (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
4929 (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
4930 (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
4931 (TYPEOF_TYPE_EXPR): New macro.
4932 * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
4933 * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
4934 * pt.c (tsubst): Likewise.
4935 * semantics.c (finish_typeof): Likewise.
4936 * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
4937 and TEMPLATE_TYPE_PARM.
4938 * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
4939 (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
4941 2004-03-16 Mark Mitchell <mark@codesourcery.com>
4944 * cp-tree.h (build_new_op): Change prototype.
4945 (build_x_binary_op): Likewise.
4946 * call.c (build_new_op): Add overloaded_p parameter.
4947 * decl2.c (grok_array_decl): Adjust call to build_new_op.
4948 * parser.c (cp_parser_binary_expression): Note that uses of
4949 overloaded operators prevents an expression from being considered
4950 an integral constant.
4951 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
4953 * semantics.c (finish_call_expr): Likewise.
4954 * typeck.c (rationalize_conditional_expr): Likewise.
4955 (build_x_indirect_ref): Likewise.
4956 (build_x_binary_op): Likewise.
4957 (build_x_unary_op): Likewise.
4958 (build_x_compound_expr): Likewise.
4959 (build_modify_expr): Likewise.
4960 * typeck2.c (build_x_arrow): Likewise.
4962 2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
4964 * cp-lang.c, ptree.c: Update copyright.
4966 2004-03-13 Mark Mitchell <mark@codesourcery.com>
4969 * parser.c (cp_parser_non_integral_constant_expression): Encode
4970 more of the idiom that surrounded calls to this function within
4972 (cp_parser_primary_expression): Adjust accordingly.
4973 (cp_parser_postfix_expression): Likewise.
4974 (cp_parser_unary_expression): Likewise.
4975 (cp_parser_cast_expression): Likewise.
4976 (cp_parser_assignment_expression): Likewise.
4977 (cp_parser_expression): Likewise.
4978 (cp_parser_new_expression): Note that new-expressions are not
4979 allowed in integral constant expressions.
4980 (cp_parser_delete_expression): Likewise.
4982 2004-03-12 Matt Austern <austern@apple.com>
4984 * decl2.c (maybe_make_one_only): Look at
4985 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
4986 to make an explicit instantiation weak.
4987 * method.c (use_thunk): Make sure we call comdat_linkage
4989 * pt.c (do_type_instantiation): On systems where weak symbols
4990 don't go in a static archive's TOC, explicit instantiation of a
4991 class must imply *explicit* instantiation of its memeber.
4993 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
4995 * call.c, cp-tree.h, pt.c: Fix comment typos.
4997 2004-03-10 Mark Mitchell <mark@codesourcery.com>
5000 * decl.c (xref_tag): Disregard non-type declarations when
5001 looking up a tagged type.
5003 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
5006 * call.c (convert_like_real): Build a const qualified temporary,
5007 when testing ctor access.
5009 2004-03-09 Mark Mitchell <mark@codesourcery.com>
5011 * call.c (initialize_reference): Fix typo.
5013 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5016 * pt.c (determine_specialization): For member templates, match also
5020 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
5022 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
5024 2004-03-09 Mark Mitchell <mark@codesourcery.com>
5027 * call.c (initialize_reference): Handle initializers that are
5028 class-member access expressions applies to rvalues.
5030 2004-03-09 Mark Mitchell <mark@codesourcery.com>
5033 * name-lookup.c (supplement_binding): Ignore functions that are
5034 marked DECL_ANTICIPATED.
5036 2004-03-08 Mark Mitchell <mark@codesourcery.com>
5039 * class.c (check_field_decls): Complain about non-static data
5040 members of reference type in unions. Propagate
5041 CLASSTYPE_REF_FIELDS_NEED_INIT and
5042 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
5044 * init.c (perform_member_init): Complain about mbmers with const
5045 type that are not explicitly initialized.
5047 2004-03-08 Mark Mitchell <mark@codesourcery.com>
5049 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
5050 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
5051 (lang_identifier): Remove implicit_decl and error_locus.
5052 (IDENTIFIER_IMPLICIT_DECL): Remove.
5053 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
5054 (IDENTIFIER_ERROR_LOCUS): Likewise.
5055 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
5056 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
5057 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
5058 (implicitly_declare): Remove.
5059 * decl.c (warn_extern_redeclared_static): Remove check of
5060 IDENTIFIER_IMPLICIT_DECL.
5061 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
5062 (implicitly_declare): Remove.
5063 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
5064 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
5065 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
5066 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
5067 in the innermost scope, rather than at namespace scope.
5068 * name-lookup.c (push_local_binding): Give it external linkage.
5069 (pushdecl): Remove dead code.
5070 * name-lookup.h (push_local_binding): Declare it.
5071 * ptree.c (cxx_print_identifier): Don't print
5072 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
5073 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
5074 not IDENTIFIER_ERROR_LOCUS.
5075 * typeck.c (build_function_call): Remove dead code.
5077 2004-03-08 Jason Merrill <jason@redhat.com>
5080 * decl.c (xref_tag): Remove attribute handling.
5081 * cp-tree.h: Adjust prototype.
5082 * decl.c, parser.c, rtti.c: Adjust callers.
5083 * parser.c (cp_parser_class_head): Pass back attributes in the
5085 (cp_parser_class_specifier): Adjust.
5087 2004-03-08 Matt Austern <austern@apple.com>
5090 * name-lookup.c (add_decl_to_level): Add extern variables, as well
5091 as static, to static_decls array.
5093 2004-03-05 Jason Merrill <jason@redhat.com>
5095 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
5097 2004-03-04 Geoffrey Keating <geoffk@apple.com>
5099 * decl.c (grokfndecl): Update old incorrect comment.
5100 (grokvardecl): Diagnose C++ variables of type with no linkage.
5102 2004-03-01 Mark Mitchell <mark@codesourcery.com>
5105 * pt.c (build_non_dependent_expr): Do not create a
5106 NON_DEPENDENT_EXPR for a THROW_EXPR.
5108 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
5111 * error.c (dump_expr): Handle THROW_EXPR.
5113 2004-03-01 Mark Mitchell <mark@codesourcery.com>
5116 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
5117 lookup if ordinary name-lookup finds a non-function.
5118 * pt.c (tsubst_copy_and_build): Likewise.
5121 * parser.c (cp_parser_late_parsing_default_args): Check that there
5122 are no extra tokens after the end of the default-argument
5125 2004-03-01 Mark Mitchell <mark@codesourcery.com>
5128 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
5129 having C++ linkage for name-mangling purposes.
5132 * parser.c (cp_parser_direct_declarator): Recognize constructor
5133 declarators that use a template-id to name the class being
5137 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
5138 (tsubst_expr): Do not call tsubst_copy, even when
5139 processing_template_decl.
5141 2004-03-01 Jeff Law <law@redhat.com>
5143 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
5146 2004-02-29 Mark Mitchell <mark@codesourcery.com>
5149 * name-lookup.h (push_scope): Change prototype.
5150 * name-lookup.c (push_scope): Do not reenter the current class
5152 * decl.c (grokfndecl): Check return code from push_scope before
5154 * decl2.c (check_classfn): Likewise.
5155 * parser.c (cp_parser_conversion_function_id): Likewise.
5156 (cp_parser_init_declarator): Likewise.
5157 (cp_parser_direct_declarator): Likewise.
5158 (cp_parser_class_specifier): Likewise.
5159 (cp_parser_class_head): Likewise.
5160 (cp_parser_lookup_name): Likewise.
5161 (cp_parser_constructor_declarator_p): Likewise.
5162 * pt.c (instantiate_class_template): Likewise.
5163 (resolve_typename_type): Likewise.
5165 2004-02-29 Mark Mitchell <mark@codesourcery.com>
5168 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
5172 * class.c (update_vtable_entry_for_fn): Do not go through
5173 covariance machinery if the type returned by an overrider is the
5174 same as the original.
5176 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
5178 * call.c: Fix a comment typo.
5180 2004-02-27 Ziemowit Laski <zlaski@apple.com>
5182 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
5184 2004-02-26 Mark Mitchell <mark@codesourcery.com>
5187 * parser.c (cp_parser_parameter_declaration_list): Commit
5188 to fewer tentative parses.
5190 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5193 * pt.c (dependent_type_p_r): A template template parameter is a
5196 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5199 * mangle.c (write_template_arg_literal): Don't rely on identity for
5202 2004-02-24 Jason Merrill <jason@redhat.com>
5204 * tree.c (build_exception_variant): Use check_qualified_type.
5206 2004-02-23 Zack Weinberg <zack@codesourcery.com>
5207 Kazu Hirata <kazu@cs.umass.edu>
5209 * decl.c (cxx_init_decl_processing): Don't check
5210 flag_writable_strings.
5212 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
5215 * typeck.c (maybe_warn_about_returning_address_of_location):
5216 Change check for VAR_DECL to use DECL_P instead.
5218 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5221 * cvt.c (build_expr_type_conversion): Type must be complete before
5222 looking up for conversions.
5224 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5227 * name-lookup.c (arg_assoc_class): Don't look into template
5228 arguments if it is not a primary template.
5230 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
5233 * method.c (use_thunk): Always clone function argument tree.
5235 2004-02-20 Mark Mitchell <mark@codesourcery.com>
5238 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
5241 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
5242 for all type variants.
5244 2004-02-19 Mark Mitchell <mark@codesourcery.com>
5247 * decl.c (duplicate_decls): Return error_mark_node for invalid
5249 * name-lookup.c (push_namespace): Ignore the return value from
5251 * pt.c (push_template_decl_real): Robustify.
5254 * name-lookup.c (push_class_level_binding): Do not complain about
5255 adding a binding for a member whose name is the same as the
5256 enclosing class if the member is located in a base class of the
5259 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5262 * parser.c (cp_parser_new_expression): Parse an ill-formed
5263 direct-new-declarator after a parenthesized type-id to emit good
5266 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
5268 * cp-tree.def, cvt.c: Update copyright.
5270 2004-02-17 Mark Mitchell <mark@codesourcery.com>
5273 * cp-tree.h (abi_version_at_least): Remove.
5274 * mangle.c: Include flags.h.
5276 2004-02-15 Mark Mitchell <mark@codesourcery.com>
5279 * call.c (build_conditional_expr): Handle conversions between
5280 class types which result in differently cv-qualified type
5284 * class.c (delete_duplicate_fields_1): Remove.
5285 (delete_duplicate_fields): Likewise.
5286 (finish_struct_anon): Remove check for members with the same name
5287 as their enclosing class.
5288 (check_field_decls): Do not call duplicate_fields.
5289 * decl.c (grokdeclarator): Remove check for static data members
5290 with the same name as their enclosing class.
5291 * name-lookup.c (push_class_level_binding): Check for members with
5292 the same name as their enclosing class.
5294 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
5297 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
5299 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5302 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
5303 has full set of arguments.
5305 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5308 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
5310 2004-02-13 Mark Mitchell <mark@codesourcery.com>
5313 * cp-tree.h (delete_sanity): Change prototype.
5314 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
5315 Remove dead code. Adjust code to warn about deleting an array.
5316 * typekc.c (decay_conversion): Use build_address and build_nop.
5319 * search.c (accessible_p): Do not check access in thunks.
5322 * call.c (build_conditional_expr): Call force_rvalue on the
5323 non-void operand in the case that one result is a throw-expression
5324 and the other is not.
5326 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
5329 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
5330 the type name and look ahead for ::~, and bail out early with a
5331 better error message if the parse is going to fail.
5333 2004-02-12 Mark Mitchell <mark@codesourcery.com>
5335 * call.c (conversion_kind): New type.
5336 (conversion_rank): Likewise.
5337 (conversion): Likewise.
5338 (CONVERSION_RANK): New macro.
5339 (conversion_obstack): New variable.
5340 (obstack_initialized): Likewise.
5341 (z_candidate): Change type of convs and second_conv.
5342 (candidate_warning): New type.
5343 (IDENTITY_RANK): Remove.
5344 (EXACT_RANK): Likewise.
5345 (PROMO_RANK): Likewise.
5346 (STD_RANK): Likewise.
5347 (PBOOL_RANK): Likewise.
5348 (USER_RANK): Likewise.
5349 (ELLIPSIS_RANK): Likewise.
5350 (BAD_RANK): Likewise.
5351 (ICS_RANK): Likewise.
5352 (ICS_STD_RANK): Likewise.
5353 (ICS_USER_FLAG): Likewise.
5354 (ICS_ELLIPSIS_FLAG): Likewise.
5355 (ICS_THIS_FLAG): Likewise.
5356 (ICS_BAD_FLAG): Likewise.
5357 (NEED_TEMPORARY_P): Likewise.
5358 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
5359 (USER_CONV_CAND): Likewise.
5360 (USER_CONV_FN): Likewise.
5361 (conversion_obstack_alloc): New function.
5362 (alloc_conversion): Likewise.
5363 (validate_conversion_obstack): Likewise.
5364 (alloc_conversions): Likewise.
5365 (build_conv): Adjust to deal with new conversion data structures.
5366 (build_identity_conv): New function.
5367 (build_ambiguous_conv): Likewise.
5368 (standard_conversion): Adjust to deal with new conversion data
5370 (convert_class_to_reference): Likewise.
5371 (direct_reference_binding): Likewise.
5372 (reference_binding): Likewise.
5373 (implicit_conversion): Likewise.
5374 (add_candidate): Likewise.
5375 (add_function_candidate): Likewise.
5376 (add_conv_candidate): Likewise.
5377 (build_builtin_candidate): Likewise.
5378 (print_z_candidate): Likewise.
5379 (merge_conversion_sequences): Likewise.
5380 (build_user_type_conversion_1): Likewise.
5381 (build_user_type_conversion): Likewise.
5382 (build_new_function_call): Likewise.
5383 (build_object_call): Likewise.
5384 (conditional_conversion): Likewise.
5385 (build_conditional_expr): Likewise.
5386 (build_new_op): Likewise.
5387 (build_op_delete_call): Likewise.
5388 (convert_like_real): Likewise.
5389 (build_over_call): Likewise.
5390 (build_new_method_call): Likewise.
5391 (is_subseq): Likewise.
5392 (maybe_handle_implicit_object): Likewise.
5393 (maybe_handle_ref_bind): Likewise.
5394 (compare_ics): Likewise.
5395 (source_type): Likewise.
5396 (add_warning): Likewise.
5398 (can_convert_arg): Likewise.
5399 (can_convert_arg_bad): Likewise.
5400 (perform_implicit_conversion): Likewise.
5401 (perform_direct_initialization_if_possible): Likewise.
5402 (initialize_reference): Likewise.
5403 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
5404 * cp-tree.def (WRAPPER): Likewise.
5405 (IDENTITY_CONV): Remove.
5406 (LVALUE_CONV): Likewise.
5407 (QUAL_CONV): Likewise.
5408 (STD_CONV): Likewise.
5409 (PTR_CONV): Likewise.
5410 (PMEM_CONV): Likewise.
5411 (BASE_CONV): Likewise.
5412 (REF_BIND): Likewise.
5413 (USER_CONV): Likewise.
5414 (AMBIG_CONV): Likewise.
5415 (RVALUE_CONV): Likewise.
5416 * cp-tree.h (tree_wrapper): Remove.
5417 (WRAPPER_ZC): Remove.
5418 (lang_tree_node): Remove wrapper.
5419 (LOOKUP_SPECULATIVELY): Remove.
5420 (build_op_delete_call): Adjust prototype.
5421 (validate_conversion_obstack): Declare.
5422 (build_zc_wrapper): Remove.
5423 * cvt.c (convert_to_reference): Remove dead code.
5424 (ocp_convert): Likewise.
5425 * decl.c (redeclaration_error_message): Correct handling of
5427 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
5428 (cp_tree_node_structure): Remove WRAPPER case.
5429 * decl2.c (finish_file): Call validate_conversion_obstack.
5430 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
5431 (build_op_delete_call): Likewise.
5432 (build_x_delete): Likewise.
5433 (build_delete): Adjust call to build_op_delete_call.
5434 * pt.c (tsubst_friend_declaration): Adjust code to determine
5435 whether or not a friend template is a definition.
5436 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
5437 * tree.c (build_zc_wrapper): Remove.
5439 2004-02-12 Zack Weinberg <zack@codesourcery.com>
5441 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
5442 * cp-tree.h: Don't declare cxx_builtin_type_decls.
5443 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
5444 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
5446 2004-02-10 Mark Mitchell <mark@codesourcery.com>
5448 * typeck.c (lookup_destructor): Fix typo in error message.
5450 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
5452 * call.c, parser.c, tree.c: Fix comment typos.
5454 2004-02-07 Zack Weinberg <zack@codesourcery.com>
5457 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
5458 * decl.c (duplicate_decls, start_function): Likewise.
5460 2004-02-07 Zack Weinberg <zack@codesourcery.com>
5462 * name-lookup.c (pushdecl): Issue shadow warnings directly.
5463 * parser.c (free_parser_stacks): Delete.
5465 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
5467 * rtti.c: Update copyright.
5469 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5472 * decl.c (require_complete_types_for_parms): Do not insert
5473 error_mark_node in the parameter list.
5475 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5478 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
5479 error when terminator can not be found.
5481 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
5483 Make-lang.in (po-generated): Delete.
5485 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
5487 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
5488 targetm.calls.promote_prototypes.
5490 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
5494 2004-01-15 Geoffrey Keating <geoffk@apple.com>
5496 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
5497 (handle_pragma_implementation): Likewise.
5499 2004-02-05 Mark Mitchell <mark@codesourcery.com>
5502 * typeck.c (lookup_destructor): Tweak error message.
5504 2004-02-05 Jan Hubicka <jh@suse.cz>
5506 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
5509 2004-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5512 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
5513 code, only emits the diagnostic now. Added lookup of the identifier
5514 and support for qualified ids.
5515 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
5516 Parse an (invalid) type name as id-expression within a declarator.
5517 (cp_parser_simple_declaration): Use it.
5518 (cp_parser_member_declaration): Likewise.
5519 (cp_parser_make_typename_type): New function. Handle errors through
5520 cp_parser_diagnose_invalid_typename.
5521 (cp_parser_elaborated_type_specifier): Use it.
5523 2004-02-04 Mark Mitchell <mark@codesourcery.com>
5526 * call.c (convert_like_real): Use "converting" rather than
5527 "argument" as the descriptive keyword to
5528 dubious_conversion_warnings.
5529 * typeck.c (convert_for_assignment): Do not call
5530 dubious_conversion_warnings.
5532 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5535 * init.c (build_delete): Emit a more informative error message in
5536 case of an incomplete type, and on the correct source line.
5538 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
5540 * error.c, search.c: Update copyright.
5542 2004-02-04 Mark Mitchell <mark@codesourcery.com>
5545 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
5546 linkage for the typeinfo name string.
5548 2004-02-04 Mark Mitchell <mark@codesourcery.com>
5551 * cp-tree.h (fold_non_dependent_expr): New function.
5552 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
5553 (cp_parser_template_argument): Use fold_non_dependent_expr.
5554 (cp_parser_direct_declarator): Likewise.
5555 * pt.c (fold_non_dependent_expr): New function.
5556 (convert_nontype_argument): Use it.
5557 (tsubst_qualified_id): Simplify.
5558 (tsubst_copy_and_build): Likewise.
5560 2004-02-04 Mark Mitchell <mark@codesourcery.com>
5562 * decl.c (cxx_push_function_context): Do not set
5563 current_function_is_thunk.
5564 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
5567 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5570 * pt.c (more_specialized_class): Increase processing_template_decl
5571 while partial ordering.
5573 2004-02-03 Mark Mitchell <mark@codesourcery.com>
5576 * decl.c (start_function): Do not call pushdecl for any
5577 instantiation or specialization of a primary template.
5579 2004-02-03 Mark Mitchell <mark@codesourcery.com>
5582 * parser.c (cp_parser_class_name): Robustify.
5585 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
5588 * semantics.c (finish_id_expression): Do not return an
5589 IDENTIFIER_NODE when lookup finds a PARM_DECL.
5591 2004-02-03 Mark Mitchell <mark@codesourcery.com>
5594 * pt.c (build_non_dependent_expr): Do not build
5595 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
5598 * semantics.c (finish_id_expression): Do not return an
5599 IDENTIFIER_NODE when lookup finds a VAR_DECL.
5602 * parser.c (cp_parser_simple_declaration): When skipping to the
5603 end of the statement swallow the terminating semicolon.
5605 2004-02-02 Mark Mitchell <mark@codesourcery.com>
5608 * init.c (build_offset_ref): Improve error recovery for invalid
5609 uses of non-static member functions.
5612 * cp-tree.h (cp_build_type_attribute_variant): New function.
5613 * class.c (build_clone): Use cp_build_type_attribute_variant.
5614 * decl.c (duplicate_decls): Likewise.
5615 * pt.c (copy_default_args_to_explicit_spec): Likewise.
5616 (tsubst_function_type): Likewise.
5617 * tree.c (build_exception_variant): Check attributes before
5618 concluding that two types are the same.
5619 (cp_build_type-attribute_variant): New method.
5620 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
5623 * call.c (convert_class_to_reference): Keep better track of
5624 pedantically invalid user-defined conversions.
5626 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5629 * pt.c (tsubst_qualified_id): Improved error message when a type
5630 is expected but not found.
5632 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
5634 * class.c: Fix comment typos.
5636 * error.c: Likewise.
5637 * parser.c: Likewise.
5639 * search.c: Likewise.
5640 * typeck.c: Likewise.
5642 2004-01-30 Richard Henderson <rth@redhat.com>
5645 * method.c (use_thunk): Don't force_target_expr for void thunks.
5646 * tree.c (build_target_expr_with_type): Assert non-void type.
5647 (force_target_expr): Likewise.
5649 2004-01-30 Michael Matz <matz@suse.de>
5651 * parser.c (cp_parser_labeled_statement): Accept case ranges.
5653 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5657 * decl.c (grokdeclarator): Check immediatly type completeness for
5658 non-dependent types.
5660 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5663 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
5664 a sizeof expression.block
5666 2004-01-29 Mark Mitchell <mark@codesourcery.com>
5669 * mangle.c (write_encoding): Correct encoding of member template
5672 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5674 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
5675 template name as it was `<::' (digraph typo).
5676 (cp_parser_nth_token_starts_template_argument_list_p): New function.
5677 (cp_parser_id_expression): Use it.
5678 (cp_parser_nested_name_specifier_opt): Likewise.
5679 (cp_parser_template_name): Likewise.
5680 (cp_parser_class_name): Likewise.
5681 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
5683 2004-01-28 Mark Mitchell <mark@codesourcery.com>
5686 * typeck.c (merge_types): Do not merge attributes into
5690 * parser.c (cp_parser_direct_declarator): Do not prevent
5691 backtracking inside a parenthesized declarator.
5692 (cp_parser_parameter_declaration): Fix typo in comment.
5694 2004-01-28 Jan Hubicka <jh@suse.cz>
5696 * semantics.c (expand_body) Do emit_associated_thunks before
5699 2004-01-27 Devang Patel <dpatel@apple.com>
5701 * name-lookup.c: Include "debug.h"
5702 (do_namespace_alias): Invoke debug_hooks to emit debug info
5703 for namespace alias.
5704 (do_local_using_decl): Invoke debug_hooks to emit debug info
5706 (do_class_using_decl): Same.
5707 (do_toplevel_using_decl): Same.
5708 (do_using_directive): Same.
5709 (cp_emit_debug_info_for_using): New function.
5710 * Make-lang.in (cp/parser.o): Depend on debug.h
5711 (cp/name-lookup.o): Same.
5713 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5715 * cp-tree.h (language_function, lang_type_header): Use
5717 * name-lookup.h (cp_binding_level): Likewise.
5719 2004-01-26 Mark Mitchell <mark@codesourcery.com>
5722 * semantics.c (finish_for_expr): Check for unresolved overloaded
5725 * class.c (add_method): Just check processing_template_decl to
5726 determine whether or not we are within a template.
5727 * decl2.c (maybe_retrofit_in_chrg): Likewise.
5728 * init.c (decl_constant_value): Check the type of the declaration,
5730 * name-lookup.c (maybe_push_to_top_level): Rename to ...
5731 (push_to_top_level): ... this.
5732 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
5733 * pt.c (push_template_decl_real): Reorder condition for speed.
5734 (convert_template_argument): Use dependency-checking functions in
5735 place of uses_template_parms.
5736 (lookup_template_class): Avoid calling uses_template_parms more
5738 (uses_template_parms): Reimplement, using dependency-checking
5740 (instantiate_class_template): Use push_to_top_level, not
5741 maybe_push_to_top_level.
5742 (type_unification_real): Simplify.
5743 (type_dependent_expression_p): Handle OFFSET_REFs and
5745 (any_dependent_template_arguments_p): Handle multiple levels of
5747 * semantics.c (expand_or_defer_fn): Do not check
5748 uses_template_parms for template instantiations.
5749 * typeck.c (comptypes): Avoid calling cp_type_quals.
5751 2004-01-25 Mark Mitchell <mark@codesourcery.com>
5754 * call.c (build_over_call): Do not convert arguments when
5755 processing a template.
5756 * pt.c (build_non_dependent_expr): Do not build a
5757 NON_DEPENDENT_EXPR for arithmetic constants.
5759 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5762 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
5763 returns a TYPE_DECL. no further lookup is required.
5764 * semantics.c (check_template_template_default_arg): A TYPE_DECL
5765 is invalid. Rework to give better diagnostics.
5767 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5770 * pt.c (instantiate_class_template): Add an error_mark_node
5772 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
5774 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
5777 * decl.c (finish_function): Move the call to
5778 finish_fname_decls below the call to
5779 finish_eh_spec_block.
5781 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
5783 * optimize.c, typeck2.c: Update copyright.
5785 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
5787 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
5788 init.c, mangle.c, typeck.c: Update copyright.
5790 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
5792 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
5794 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
5796 * Make-lang.in: Replace $(docdir) with doc.
5797 (c++.info, c++.srcinfo): Dummy entry.
5798 (c++.man, c++.srcman): New rules.
5799 (c++.install-man): Revamp rule.
5801 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
5803 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
5804 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
5805 immediate $(shell) instead of deferred backquote.
5807 2004-01-19 Mark Mitchell <mark@codesourcery.com>
5810 * parser.c (cp_parser_postfix_expression): When encountering
5811 incomplete type on left-hand side of "->" or ".", treat the entire
5812 expression as erroneous.
5815 * call.c (build_field_call): Remove.
5816 (n_build_method_call): Likewise.
5817 (build_method_call): Likewise.
5818 (build_new_method_call): Do not call build_field_call.
5819 * class.c (n_build_method_call): Remove.
5820 (print_class_statistics): Do not print it.
5821 * cp-tree.h (build_method_call): Remove declaration.
5822 (finish_object_call_expr): Likewise.
5823 (build_new_1): Do not use build_method_call.
5824 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
5825 when the function appearing on the right-hand-side of "." or "->"
5826 is not actually a function.
5827 * pt.c (tsubst_copy_and_build): Likewise.
5828 * semantics.c (finish_object_call_expr): Remove.
5830 2004-01-18 Mark Mitchell <mark@codesourcery.com>
5833 * pt.c (tsubst): Use finish_typeof.
5835 2004-01-18 Jason Merrill <jason@redhat.com>
5838 * except.c (build_throw): In a template, set
5839 current_function_returns_abnormally.
5841 2004-01-17 Fred Fish <fnf@intrinsity.com>
5844 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
5845 except don't call array_type_nelts() with a VECTOR_TYPE.
5847 2004-01-16 Jan Hubicka <jh@suse.cz>
5849 * mangle.c (write_mangled_name): Remove inline modifier.
5851 2004-01-16 Mark Mitchell <mark@codesourcery.com>
5854 * decl.c (compute_array_index_type): Fix grammar in comment.
5855 * init.c (build_zero_init): Handle zero-sized arrays correctly.
5858 * call.c (name_as_c_string): Print conversion operator names
5862 * call.c (initialize_reference): Pass -1 for inner parameter to
5865 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5868 * parser.c (cp_parser_base_specifier): Check for an invalid
5869 keyword `typename' and emit an user-friendly error message.
5871 2004-01-15 Geoffrey Keating <geoffk@apple.com>
5874 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
5875 (handle_pragma_implementation): Likewise.
5877 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5880 * typeck.c (build_class_member_access_expr): Allow to access members
5881 of the currently open class.
5882 (finish_class_member_access_expr): Likewise.
5884 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
5887 * name-lookup.c (validate_nonmember_using_decl): Take scope and
5888 name by value, instead of computing them.
5889 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
5890 arguments. Pass them to validate_nonmember_using_decl.
5891 * name-lookup.h (do_local_using_decl): Adjust.
5892 (do_toplevel_using_decl): Likewise.
5893 * parser.c (cp_parser_using_declaration): Likewise.
5894 * pt.c (tsubst_expr): Likewise.
5896 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
5900 * name-lookup.c (qualified_lookup_using_namespace): Search
5901 strongly-associated namespaces first, and only then try other
5904 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
5906 * Make-lang.in (c++.srcextra): Dummy entry.
5908 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5911 * parser.c (cp_parser_template_name): Don't try to parse a
5912 conversion-function-id, as it cannot be a template-name.
5913 (cp_parser_simple_type_specifier): Check for invalid template-ids
5914 even after a built-in type.
5916 2004-01-14 Jan Hubicka <jh@suse.cz>
5919 * pt.c (instantiate_decl): Do not increase function_depth.
5921 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
5925 * parser.c (cp_parser_elaborated_type_specifier): Warn about
5926 attributes and discard.
5927 * decl.c (xref_tag): Don't overwite existing attributes with
5930 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5933 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
5934 is no destructor while looking up a BIT_NOT_EXPR.
5936 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
5938 * cxxfilt.c: Remove unused file.
5940 2004-01-14 Jan Hubicka <jh@suse.cz>
5942 Partial fix to PR c++/12850
5943 * decl2.c (mark_used): Do not proactively instantiate templates
5944 when compiling in unit-at-a-time or not optimizing.
5945 * optimize.c (maybe_clone_body): Do not increase function depth.
5947 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5950 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
5952 2004-01-12 Steven Bosscher <stevenb@suse.de>
5955 * parser.c (cp_parser_member_declaration): Any non-type is also
5956 not a class or a function.
5958 2004-01-12 Jason Merrill <jason@redhat.com>
5961 * class.c (build_base_path): Do not mark vtable references as
5963 (build_vtbl_ref_1): Likewise.
5965 2004-01-12 Richard Henderson <rth@redhat.com>
5968 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
5969 (store_init_value): Use it.
5970 * decl.c (check_initializer): Expect full initialization code
5971 from store_init_value.
5972 * init.c (expand_aggr_init_1): Likewise.
5973 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
5975 2004-01-12 Mark Mitchell <mark@codesourcery.com>
5977 * class.c (layout_class_type): For non-POD class types, also copy
5978 the DECL_SIZE and DECL_MODE of fields to the base class type.
5980 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5983 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
5984 calling regenerate_decl_from_template.
5986 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
5989 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
5990 decl-specifier occurring along with a class definition.
5992 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
5994 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
5995 clauses to comments describing declares_class_or_enum.
5996 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
5999 2004-01-12 Jan Hubicka <jh@suse.cz>
6001 * pt.c (for_each_template_parm): Do not check for duplicates.
6002 (for_each_template_parm): Use walk_tree duplicate checking code.
6004 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
6007 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
6008 is error_mark_node, don't add any more decl_specs.
6009 (cp_parser_init_declarator): After committing to a declaration, if
6010 the decl_specifiers start with error_mark_node, issue an error and
6011 change the type to "int".
6013 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
6016 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
6018 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6022 * pt.c (tsubst): Substitution must fail if we are attempting to
6023 create an array with element type that is an abstract class type.
6024 * decl.c (cp_finish_decl): Strip pointers and array types recursively
6025 before calling abstract_virtuals_error.
6027 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
6029 * name-lookup.c (qualified_lookup_using_namespace): Consider
6030 strong using directives even if we've already found a binding.
6032 2004-01-09 Mark Mitchell <mark@codesourcery.com>
6034 * cp-tree.h (cxx_expand_expr): Change prototype.
6035 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
6037 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6040 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
6041 looking into them recursively. They can be there because of the
6042 new __offsetof__ extension.
6044 2004-01-07 Zack Weinberg <zack@codesourcery.com>
6046 * parser.c (cp_parser_save_member_function_body): Mark the
6049 2004-01-05 Mark Mitchell <mark@codesourcery.com>
6052 * class.c (build_clone): Copy type attributes from the original
6053 function to the clone.
6056 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
6057 references as constant.
6060 * parser.c (cp_parser_explicit_instantiation): Improve error
6062 (cp_parser_require): Improve indication of the error location.
6065 * parser.c (cp_parser_class_head): Reorder logic to check for
6066 invalid qualification.
6068 2004-01-04 Mark Mitchell <mark@codesourcery.com>
6071 * name-lookup.c (lookup_using_namespace): Remove spacesp
6073 (unqualified_namespace_lookup): Likewise.
6074 (lookup_qualified_name): Adjust accordingly.
6075 (lookup_name_real): Likewise.
6076 (lookup_arg_dependent): Do not eliminate the namespace of the
6077 functions found by unqualified name lookup unless that is the
6080 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
6082 * semantics.c (push_deferring_access_checks): Fix format.
6083 (resume_deferring_access_checks): Likewise.
6084 (stop_deferring_access_checks): Likewise.
6085 (pop_deferring_access_checks): Likewise.
6086 (get_deferred_access_checks): Likewise.
6087 (pop_to_parent_deferring_access_checks): Likewise.
6088 (perform_deferred_access_checks): Likewise.
6089 (perform_or_defer_access_check): Likewise.
6091 2004-01-04 Richard Henderson <rth@redhat.com>
6093 * call.c (build_over_call): Don't create a save_expr of an
6094 aggregate, but rather its address.
6096 2004-01-04 Mark Mitchell <mark@codesourcery.com>
6099 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
6100 an offsetof expression.
6102 * parser.c (cp_parser_parameter_declaration): Fix comment.
6105 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
6106 (reference_binding): Set it when appropriate.
6107 (build_temp): New function, split out from ...
6108 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
6109 (initialize_reference): Likewise.
6112 * parser.c (cp_parser): Add in_type_id_in_expr_p.
6113 (cp_parser_new): Initialize it.
6114 (cp_parser_postfix_expression): Set it.
6115 (cp_parser_sizeof_operand): Likewise.
6116 (cp_parser_parameteR_declaration): Do not commit early to tenative
6117 parsers when in_type_id_in_expr_p is set.
6119 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6122 * parser.c (cp_parser_template_argument): Don't call
6123 make_unbound_class_template directly.
6124 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
6125 UNBOUND_CLASS_TEMPLATE tree node.
6127 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
6130 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
6132 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6135 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
6136 (DECL_FUNCTION_TEMPLATE_P): Use it.
6137 (DECL_CLASS_TEMPLATE_P): Likewise.
6138 * parser.c (cp_parser_lookup_name): Add is_template parameter.
6139 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
6140 (cp_parser_template_name): Likewise.
6141 (cp_parser_elaborated_type_specifier): Likewise.
6142 (cp_parser_namespace_name): Likewise.
6143 (cp_parser_class_name): Likewise.
6144 (cp_parser_lookup_name_simple): Likewise.
6146 See ChangeLog.3 for earlier changes.