1 2004-11-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3 Friend class name lookup 4/n
4 * class.c (pushclass): Don't call cxx_remember_type_decls.
5 * cp-tree.h (clear_anon_tags): Remove declaration.
6 * decl.c (grokdeclarator): Don't call lookup_tag_reverse.
7 * name-lookup.c (binding_entry_free, binding_table_free): Comment
9 (binding_table_find_anon_type, binding_table_reverse_maybe_remap,
10 binding_table_remove_anonymous_types, cxx_remember_type_decls,
11 bt_print_entry, clear_anon_tags, follow_tag_typedef, lookup_tag,
12 lookup_tag_reverse): Remove
13 (begin_scope, leave_scope, kept_level_p, print_binding_level):
14 Don't use type_decls field in cp_binding_level.
15 (maybe_process_template_type_declaration, pushtag): Set
16 CLASSTYPE_NESTED_UTDS directly.
17 * name-lookup.h (binding_table_remove_anonymous_types,
18 cxx_remember_type_decls, lookup_tag, lookup_tag_reverse): Remove
20 (cp_binding_level): Remove type_decls field.
22 2004-11-26 Kazu Hirata <kazu@cs.umass.edu>
24 * typeck.c: Fix a comment typo.
26 2004-11-25 Mark Mitchell <mark@codesourcery.com>
29 * class.c (instantiate_type): Treat NON_DEPENDENT_EXPRs with
30 unknown_type as non matching. Tidy up.
31 * pt.c (build_non_dependent_expr): Do not build a
32 NON_DEPENDENT_EXPR for a VAR_DECL.
35 * cp-tree.h (lvalue_or_else): Remove declaration.
36 * tree.c (lvalue_or_else): Remove.
37 * typeck.c (build_unary_op): Adjust call to lvalue_or_else.
38 (build_modify_expr): Likewise.
41 * decl.c (duplicate_decls): Return error_mark_node on error, as
45 * decl.c (grokvardecl): Keep track of whether or not a there was
46 explicit qualification.
47 * name-lookup.c (set_decl_namespace): Complain about explicit
48 qualification of a name within its own namespace.
51 * typeck.c (check_return_expr): Robustify.
53 2004-11-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
55 Friend class name lookup 3/n, PR c++/3332
56 * name-lookup.c (push_inner_scope, pop_inner_scope): New functions.
57 (lookup_type_scope): Don't deal with name from user declaration
59 * name-lookup.h (push_inner_scope, pop_inner_scope): Add declarations.
60 * parser.c (cp_parser_class_specifier): Use push_inner_scope and
63 2004-11-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
65 Friend class name lookup 2/n, PR c++/14513, c++/15410
66 * name-lookup.c (lookup_name_real): Simplify.
67 (lookup_type_scope): Add SCOPE parameter. Handle friend class
69 * name-lookup.h (tag_scope): New enum type.
70 (lookup_type_scope): Adjust declaration.
71 * decl.c (lookup_and_check_tag, xref_tag, xref_tag_from_type):
72 Change bool parameter GLOBALIZED to TAG_SCOPE parameter SCOPE.
73 (start_enum): Likewise. Add assertion test that NAME is
74 IDENTIFIER_NODE. Use anonymous name for dummy ENUMERAL_TYPE in
76 * cp-tree.h (xref_tag, xref_tag_from_type): Adjust declarations.
77 * parser.c (cp_parser_elaborated_type_specifier,
78 cp_parser_class_head): Adjust call to xref_tag.
79 * pt.c (lookup_template_class, instantiate_class_template):
81 * rtti.c (init_rtti_processing, build_dynamic_cast_1,
82 tinfo_base_init, emit_support_tinfos): Likewise.
84 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
86 * g++spec.c, lex.c: Avoid ` as left quote in diagnostics.
88 2004-11-24 Mark Mitchell <mark@codesourcery.com>
91 * name-lookup.c (supplement_binding): Do not allow typedefs to be
92 redefined in class scope.
95 * parser.c (cp_parser_set_decl_type_spec): Do not try to allow
96 redefinitions of builtin types other that "bool" or "wchar_t".
98 2004-11-24 Steven Bosscher <stevenb@suse.de>
100 * decl.c (cxx_init_decl_processing): Don't clear
101 flag_inline_functions.
103 2004-11-24 Mark Mitchell <mark@codesourcery.com>
105 * pt.c (tsubst_function_type): Do not permit function types which
106 return arrays or functions.
109 * parser.c (cp_parser_init_declarator): Do not pop scope twice.
112 * cp-tree.h (CTOR_NAME): Remove.
114 * decl.c (initialize_predefined_identifiers): Add spaces to the
115 end of constructor and destructor names.
117 2004-11-24 Giovanni Bajo <giovannibajo@gcc.gnu.org>
120 * decl.c (start_decl): Check for invalid specialization headers.
122 2004-11-24 Paolo Bonzini <bonzini@gnu.org>
126 * call.c (standard_conversion): Move check for conversions between
128 * typeck.c (ptr_reasonably_similar): ... here.
130 2004-11-23 Ben Elliston <bje@au.ibm.com>
132 * cp-tree.h (context_as_string): Remove extern.
133 * error.c (context_as_string): Remove.
135 * cp-tree.h (cp_type_qual_from_rid): Remove extern.
136 * lex.c (cp_type_qual_from_rid): Remove.
138 * cp-tree.h (do_poplevel): Remove extern.
139 (check_multiple_declarators): Likewise.
140 * semantics.c (do_poplevel): Make static.
141 (check_multiple_declarators): Remove.
143 * cp-tree.h (check_final_overrider): Remove extern.
144 * search.c (check_final_overrider): Make static.
146 * cp-tree.h (build_artificial_parm): Remove extern.
147 * decl2.c (build_artificial_parm): Make static.
149 2004-11-22 Giovanni Bajo <giovannibajo@gcc.gnu.org>
152 * typeck.c (build_unary_op) <CONVERT_EXPR, NEGATE_EXPR>: Unify code.
153 Make sure the result is always a rvalue.
155 2004-11-16 Giovanni Bajo <giovannibajo@gcc.gnu.org>
157 * decl.c (start_preparsed_function): Call check_function_type even
159 (require_complete_types_for_parms): Skip dependent types.
160 (check_function_type): Likewise.
162 2004-11-16 Steven Bosscher <stevenb@suse.de>
164 * Make-lang.in (cp/decl.o, cp/search.o): Don't depend on stack.h.
165 * search.c: Don't include it.
167 2004-11-15 Andrew Pinski <pinskia@physics.uc.edu>
169 * cp-gimplify.c: Include pointer-set.h
170 (cp_genericize_r): Use pointer_sets instead of a hashtable.
171 Also instert the new statement for CLEANUP_STMT.
172 (cp_genericize): Use pointer_sets instead of a hashtable.
173 * Make-lang.in (cp-gimplify.o): Depend on pointer-set.h.
175 2004-11-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
177 Friend class name lookup 1/n, PR c++/18471
178 * decl.c (lookup_and_check_tag): New function.
179 (xref_tag, start_enum): Use it.
180 (check_elaborated_type_specifier): Move TEMPLATE_TYPE_PARM check
181 before !DECL_IMPLICIT_TYPEDEF_P. Also display previously declared
183 * name-lookup.c (lookup_name_current_level): Rename to ...
184 (lookup_name_innermost_nonclass_level): ... this.
185 (lookup_type_scope): New function.
186 * name-lookup.h (lookup_name_current_level): Rename to ...
187 (lookup_name_innermost_nonclass_level): ... this.
188 (lookup_type_scope): Add declaration.
190 2004-11-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
193 * pt.c (coerce_template_parms): Only emit error message about
194 invalid template argument when TF_ERROR.
196 2004-11-12 Mark Mitchell <mark@codesourcery.com>
199 * decl.c (start_decl): Make sure to set *pop_scope_p. Return
200 error_mark_node to indicate errors.
203 * parser.c (cp_parser_direct_declarator): Disallow non-constant
204 array bounds when not inside a function.
207 * pt.c (tsubst_copy_and_build): Do not do Koenig lookup when an
208 unqualified name resolves to a member function.
211 * pt.c (tsubst_copy_and_build): Handle qualified names used from a
212 derived class correctly.
214 * decl2.c (import_export_decl): Fix typo in comment.
215 * tree.c (pod_type_p): Likewise.
217 2004-11-10 Andrew Pinski <pinskia@physics.uc.edu>
219 * typeck.c (cxx_mark_addressable): Add braces around the first if.
221 2004-11-10 Adam Nemet <anemet@lnxw.com>
224 * typeck.c (cxx_mark_addressable): Issue an error if address of an
225 explicit register variable is requested.
227 2004-11-10 Nathan Sidwell <nathan@codesourcery.com>
230 * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK): New.
231 (struct lang_decl_flags): Add thunk_p flag.
232 (struct lang_decl): Remove separate fixed_offset. Place
233 cloned_function and fixed_offset into union.
234 (DECL_CLONED_FUNCTION_P, DECL_CLONED_FUNCTION): Adjust.
235 (DECL_THUNK_P, SET_DECL_THUNK_P): Adjust.
236 (THUNK_FIXED_OFFSET): Adjust.
237 * method.c (make_thunk): Adjust.
239 2004-11-09 Mark Mitchell <mark@codesourcery.com>
242 * init.c (build_new_1): Handle parenthesized type-ids that name an
245 2004-11-09 Joseph S. Myers <joseph@codesourcery.com>
247 * call.c, class.c, decl.c, decl2.c, error.c, mangle.c, parser.c,
248 pt.c, search.c, semantics.c, typeck.c: Use %q, %< and %> for
249 quoting in diagnostics.
250 * parser.c (cp_parser_sizeof_operand): Use '' instead of `' for
251 quoting in printf format.
252 * decl.c (duplicate_decls, start_decl): Use %qD instead of
255 2004-11-08 Kazu Hirata <kazu@cs.umass.edu>
257 * class.c, decl.c, lex.c, name-lookup.c, parser.c, pt.c,
258 search.c, typeck2.c: Fix comment formatting.
260 2004-11-04 Ulrich Weigand <uweigand@de.ibm.com>
262 PR tree-optimization/18184
263 * cp-objcp-common.c (cxx_types_compatible_p): Do not treat pointers
264 of different modes or alias-all flags as equivalent.
265 * typeck.c (comptypes): Likewise.
267 2004-11-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
270 * cp-tree.h (TYPE_REF_OBJ_P): New macro.
271 (TYPE_PTR_P, TYPE_PTROB_P, TYPE_PTROBV_P, TYPE_PTRFN_P,
272 TYPE_REFFN_P): Document.
273 (fold_decl_constant_value): New prototype.
274 * pt.c (convert_nontype_argument_function): Rewrite and extract
276 (fold_decl_constant_value, convert_nontype_argument_function): New.
277 (lookup_template_class): Add comment about useless double call.
278 * mangle.c (write_expression): Strip conversions before lowering
280 * cvt.c (ocp_convert): Check LOOKUP_COMPLAIN for a pedwarn. Disallow
281 enum to enum conversion.
283 2004-11-02 Mark Mitchell <mark@codesourcery.com>
286 * parser.c (cp_parser_type_parameter): Robustify.
289 * parser.c (cp_parser_single_declaration): Disallow template
293 * typeck.c (build_const_cast): Use error_operand_p.
295 2004-11-02 Ziemowit Laski <zlaski@apple.com>
297 * cp-lang.c (cxx_types_compatible_p): Remove prototype and definition.
298 (LANG_HOOKS_TYPES_COMPATIBLE_P): Move to cp-objcp-common.h.
299 * cp-objcp-common.c (cxx_types_compatible_p): Moved definition here
301 * cp-objcp-common.h (cxx_types_compatible_p): Moved prototype here
303 (LANG_HOOKS_TYPES_COMPATIBLE_P): Moved here from cp-lang.c.
305 2004-11-01 Nathan Sidwell <nathan@codesourcery.com>
308 * search.c (check_final_overrider): Deprecate gnu covariant extension.
310 2004-10-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
312 Convert diagnostics to use quoting flag q 9/n
313 * typeck.c (build_x_unary_op, convert_member_func_to_ptr,
314 get_delta_difference): Use new quotation style.
315 * repo.c (reopen_repo_file_for_write): Likewise.
316 * pt.c (do_type_instantiation): Likewise.
317 * parser.c (cp_parser_diagnose_invalid_type_name):
318 * name-lookup.c (push_overloaded_decl, set_decl_namespace):
319 * error.c (cp_print_error_function,
320 print_instantiation_full_context): Likewise.
321 * decl.c (define_label, grok_reference_init,
322 maybe_deduce_size_from_array_init, revert_static_member_fn):
323 * decl2.c (check_classfn): Likewise.
324 * class.c (add_method, check_field_decls, layout_class_type,
325 resolve_address_of_overloaded_function): Likewise.
326 * call.c (build_x_va_arg, build_over_call): Likewise.
328 2004-10-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
330 Convert diagnostics to use quoting flag q 8/n
331 * cvt.c (cp_convert_to_pointer, warn_ref_binding,
332 convert_to_reference, ocp_convert, convert_to_void
333 cp_convert_to_pointer): Use new quotation style.
335 2004-10-31 Mark Mitchell <mark@codesourcery.com>
338 * typeck2.c (store_init_value): Use split_nonconstant_init even
339 for types that require construction.
341 1004-10-28 Matt Austern <austern@apple.com>
344 * cp-tree.h (class_key_or_enum_as_string): Declare.
345 * error.c (class_key_or_enum): Rename to class_key_or_enum_as_string
346 and remove static qualifier.
347 * decl.c (shadow_tag): Warn about ignored attributes in class/struct/
348 union/enum declaration.
350 2004-10-29 Kazu Hirata <kazu@cs.umass.edu>
352 * pt.c: Fix a comment typo.
354 2004-10-28 Nathan Sidwell <nathan@codesourcery.com>
356 * typeck.c (composite_pointer_type): Remove comment about DR 195.
357 (build_reinterpret_cast_1): Revert DR195 patch. Only emit a
358 warning when being pedantic.
359 (build_reinterpet_cast, build_c_cast): Adjust.
361 2004-10-29 Mark Mitchell <mark@codesourcery.com>
364 * decl.c (grokdeclarator): Mark TYPE_DECLs as abstract when they
365 appear in a constructor/destructor that will be cloned.
367 1004-10-28 Matt Austern <austern@apple.com>
370 * decl.c (finish_enum): Handle packed attribute.
371 * parser.c (cp_parser_enum_specifier): Process trailing attributes.
373 2004-10-28 Mark Mitchell <mark@codesourcery.com>
376 * pt.c (instantiate_class_template): Increment
377 processing_template_decl when substituting into a member class
380 2004-10-27 Mark Mitchell <mark@codesourcery.com>
383 * call.c (convert_like_real): Fix formatting.
384 (initialize_reference): When binding a temporary to a base class,
385 ensure that the nominal copy made is to the derived class, not the
389 * parser.c (cp_parser_next_token_ends_template_argument_p): Do not
392 2004-10-27 Andrew Pinski <pinskia@physics.uc.edu>
394 * decl.c (bad_specifiers): Move the q after the %.
396 2004-10-27 Andrew Pinski <pinskia@physics.uc.edu>
398 * parser.c (cp_parser_diagnose_invalid_type_name): Move the q after
401 2004-10-26 Mark Mitchell <mark@codesourcery.com>
403 * name-lookup.c (do_namespace_alias): Use FROB_CONTEXT.
404 * search.c (current_scope): Fix prototype.
407 * search.c (current_scope): Return the innermost non-block scope,
408 not the innermost non-block, non-namespace scope.
409 (at_namespace_scope_p): Adjust accordingly.
410 (dfs_accessible_post): Do not pass namespaces to is_friend.
411 (dfs_walk_once_accessible_r): Likewise.
412 * decl.c (grokvardecl): Adjust call to current_scope.
413 (build_enumerator): Likewise.
414 * parser.c (cp_parser_using_declaration): Likewise.
415 (cp_parser_direct_declarator): Use at_namespace_scope_p instead of
417 (cp_parser_class_head): Adjust call to current_scope.
418 * name-lookup.c (do_namespace_alias): Set the DECL_CONTEXT for the
422 * pt.c (tusbst_copy_and_build): Resolve enumeration constants to
423 their underlying values.
426 * typeck.c (build_binary_op): Honor build_type, even when in a
429 2004-10-26 Nathan Sidwell <nathan@codesourcery.com>
431 * parser.c (cp_lexer_get_preprocessor_token): Remove unneeded
432 padding token checking.
434 2004-10-25 Andrew Pinski <pinskia@physics.uc.edu>
437 * decl.c (grokdeclarator) <case cdk_array>: Remove the call
438 layout_type as it is already done by create_array_type_for_decl.
440 2004-10-22 Nathan Sidwell <nathan@codesourcery.com>
443 * parser.c (eof_token): Make const, correctly initialize rid and
445 (struct cp_lexer): Replace buffer_end pointer with buffer_length
447 (cp_lexer_new_main): Directly grow lexer's buffer here. Don't
449 (cp_lexer_new_from_tokens): Adjust.
450 (cp_lexer_grow_buffer): Remove.
451 (cp_lexer_peek_nth_token, cp_lexer_consume_token,
452 cp_lexer_purge_token): Add const casts.
454 2004-10-21 Mark Mitchell <mark@codesourcery.com>
458 * cp-tree.h (convert_to_base): Change prototype.
459 (build_ptrmemfunc): Likewise.
460 (convert_ptrmem): New function.
461 * call.c (struct conversion): Adjust documentation for base_p.
462 (standard_conversion): Set base_p for ck_pmem conversions as
464 (convert_like_real): Use convert_to_base for ck_pmem and ck_ptr
466 * class.c (convert_to_base): Handle both pointers and objects.
467 Add nonnull parameter.
468 (build_vfield_ref): Adjust call to convert_to_base.
469 * cvt.c (cp_convert_to_pointer): Adjust call to build_ptrmemfunc.
470 (convert_force): Likewise.
471 * typeck.c (build_unary_op): Likewise.
472 (convert_ptrmem): New function.
473 (build_static_cast_1): Use it.
474 (build_reinterpret_cast): Allow conversions to vector types.
475 (get_delta_difference): Add c_cast_p parameter.
476 (build_ptrmemfunc): Likewise. Adjust calls to
477 get_delta_difference.
479 2004-10-21 Andrew Pinski <pinskia@physics.uc.edu>
482 * error.c (cp_error_at): Output the context as it might be
483 different file as the other location.
485 2004-10-21 Kazu Hirata <kazu@cs.umass.edu>
487 * typeck.c: Fix a comment typo.
489 2004-10-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
492 * decl.c (make_unbound_class_template): Add PARM_LIST parameter.
493 * cp-tree.h (make_unbound_class_template): Adjust prototype.
494 * parser.c (cp_parser_lookup_name): Adjust call to
495 make_unbound_class_template.
496 (cp_parser_single_declaration): Handle member class of class
497 template as template friend parsing correctly.
498 * friend.c (is_friend): Call is_specialization_of_friend for
499 template friend class.
500 (make_friend_class): Handle member class of class template as
502 * pt.c (is_specialization_of_friend): Likewise.
503 (instantiate_class_template): Likewise.
504 (tsubst): Adjust call to make_unbound_class_template.
506 2004-10-20 Nathan Sidwell <nathan@codesourcery.com>
508 * typeck.c (composite_pointer_type): Add comment about DR 195
509 (build_reinterpret_cast_1): Add for_reinterpret_cast_p parameter.
510 Allow function pointer conversions that DR195 suggests.
511 (build_reinterpret_cast, build_c_cast): Update
512 build_reinterpret_cast_1 calls.
514 2004-10-20 Kazu Hirata <kazu@cs.umass.edu>
516 * call.c, typeck.c: Fix comment typos.
518 2004-10-20 Nathan Sidwell <nathan@codesourcery.com>
520 * parser.c (cp_token_position): New typedef. Define VEC thereof.
521 (struct cp_lexer): Allow buffer and buffer_end to be NULL. Make
522 next_token and last_token cp_token_position. Make saved_tokens a
523 VEC(cp_token_position).
524 (eof_token): New static variable.
525 (CP_SAVED_TOKENS_SIZE): Rename to ...
526 (CP_SAVED_TOKEN_STACK): ... here.
527 (cp_lexer_new_main): Adjust main lexer creation and buffer
529 (cp_lexer_new_from_tokens): Do not copy the tokens, merely point
530 to the parent buffer. Do not append eof token.
531 (cp_lexer_destroy): Only free buffer if non-NULL. Free token
533 (cp_lexer_next_token, cp_lexer_prev_token): Remove.
534 (cp_lexer_token_position, cp_lexer_token_at): New.
535 (cp_lexer_saving_tokens): Adjust. Make inline.
536 (cp_lexer_advance_token, cp_lexer_token_difference): Remove.
537 (cp_lexer_peek_token_emit_debug_info): Fold into ...
538 (cp_lexer_peek_token): ... here.
539 (cp_lexer_peek_nth_token): Don't peek past EOF.
540 (cp_lexer_consume_token): Set next_token to eof_token, if reaching
542 (cp_lexer_purge_token): Adjust eof setting.
543 (cp_lexer_purge_tokens_after): Likewise.
544 (cp_lexer_save_tokens): Push next_token directly.
545 (cp_lexer_commit_tokens): Adjust.
546 (cp_lexer_rollback_tokens): Pop next_token directly.
547 (cp_parser_check_for_invalid_template_id): Adjust token purging.
548 (cp_parser_translation_unit): Do not consume the EOF.
549 (cp_parser_nested_name_specifier_opt): Adjust token purging.
550 (cp_parser_template_id, cp_parser_template_name): Likewise.
552 2004-10-19 Mark Mitchell <mark@codesourcery.com>
555 * call.c (struct conversion): Add base_p.
556 (convert_like): Add c_cast_p argument.
557 (convert_like_with_conversion): Likewise.
558 (build_conv): Clear base_p.
559 (standard_conversion): Set it, for derived-to-base conversions.
560 (convert_like_real): Add c_cast_p parameter. Handle pointer
561 conversions directly rather than relying on ocp_convert.
562 (perform_direct_initialization_if_possible): Add c_cast_p
564 * cp-tree.h (perform_direct_initialization_if_possible): Change
566 (convert_member_func_to_ptr): New function.
567 * typeck.c (check_for_casting_away_constness): Add diag_fn
569 (build_static_cast_1): New function, split out from ...
570 (build_static_cast): ... here. Use build_static_cast_1.
571 (build_reinterpret_cast_1): New function, split out from ...
572 (build_reinterpret_cast): ... here. Use build_reinterpret_cast_1.
573 (build_const_cast_1): New function, split out from ...
574 (build_const_cast): ... here. Use build_const_cast_1.
575 (build_c_cast): Rewrite to use build_const_cast_1,
576 build_static_cast_1, and build_reinterpret_cast_1.
577 (convert_member_func_to_ptr): New function.
579 2004-10-19 Paolo Bonzini <bonzini@gnu.org>
582 * parser.c (enum cp_parser_prec): Give relational expressions
583 a higher precedence than equality expressions.
585 2004-10-15 Nathan Sidwell <nathan@codesourcery.com>
587 * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Adjust lookup_base call.
588 (ACCESSIBLY_UNIQUELY_DERIVED_P): Remove.
589 (PUBLICLY_UNIQUELY_DERIVED_P): Adjust lookup_base call.
590 (enum base_access): Reorganize.
591 (accessible_base_p, accessible_p): Add consider_local_p parameter.
592 * call.c (standard_conversion): Update comment about
594 (enforce_access): Adjust accessible_p call.
595 (build_over_call): Adjust accessible_base_p call.
596 * class.c (convert_to_base): Adjust lookup_base call.
597 (build_vtbl_ref_1): Likewise.
598 (warn_about_ambiguous_bases): Likewise. Add early exit.
599 * cvt.c (convert_to_pointer_force) Adjust lookup_base call.
600 * search.c (accessible_base_p): Add consider_local_p parameter.
601 (lookup_base): Pass consider_local_p to accessible_base_p call.
602 (friend_accessible_p): Check whether scope is a class member.
603 Remove unnecessary class template check.
604 (accessible_p): Add consider_local_p parameter. Use it.
605 (adjust_result_of_qualified_name_lookup): Adjust lookup_base call.
606 * tree.c (maybe_dummy_object): Likewise.
607 * typeck.c (comp_except_type): Use PUBLICLY_UNIQUELY_DERIVED_P.
608 (build_class_member_access_expr): Adjust lookup_base call.
609 * typeck2.c (binfo_or_else): Likewise.
610 * rtti.c (build_dynamic_cast_1): Access can consider friendship
613 2004-10-17 Giovanni Bajo <giovannibajo@gcc.gnu.org>
616 * decl2.c (grokfield): Apply attributes also to TYPE_DECLs.
618 2004-10-16 Giovanni Bajo <giovannibajo@gcc.gnu.org>
621 * parser.c (cp_parser_parenthesized_expression_list): Fold
622 non-dependent expressions in attribute lists.
624 2004-10-15 Mark Mitchell <mark@codesourcery.com>
627 * decl.c (declare_global_var): Use the return value from pushdecl.
630 * parser.c (cp_parser_simple_declaration): Do not diagnose invalid
631 type names if we have already found a valid type.
632 (cp_parser_member_declaration): Likewise.
635 * parser.c (cp_parser_member_specification_opt): Handle
638 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
640 * dump.c, g++spec.c, repo.c: Update copyright.
642 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
644 * decl.c: Fix a comment typo.
646 2004-10-13 Andrew Pinski <pinskia@physics.uc.edu>
649 * name-lookup.c (parse_using_directive): If we have a
650 error_mark_node, do not set the decl namespace associations
653 2004-10-14 Mark Mitchell <mark@codesourcery.com>
656 * decl.c (cp_finish_decl): Do not call expand_static_init more
657 than once for a single variable.
659 2004-10-14 Matt Austern <austern@apple.com>
661 * Make-lang.in (pt.o): depends on pointer-set.h
662 * cp-tree.h (cp_walk_subtrees): Last argument is pointer_set_t* now.
663 * pt.c (struct pair_fn_data): Use pointer_set_t, not htab_t
664 (for_each_template_parm): Convert from htab_t to pointer_set_t.
665 * tree.c (cp_walk_subtrees): Last argument is pointer_set_t* now.
667 2004-10-13 Andrew Pinski <pinskia@physics.uc.edu>
670 * semantics.c (finish_for_expr): Convert expression to void
671 so that we don't create temporaries for a?b:c.
673 2004-10-13 Kazu Hirata <kazu@cs.umass.edu>
675 * search.c: Fix a comment typo.
677 2004-10-12 Nathan Sidwell <nathan@codesourcery.com>
679 * class.c (dfs_modify_vtables): Simplify condition. Return
680 dfs_skip_bases as appropriate.
681 (modify_all_vtables): Walk in pre-order.
682 * search.c (dfs_walk_all, dfs_walk_once_r,
683 dfs_walk_once_accessible_r): Assert post order function never
684 returns dfs_skip_bases.
686 * search.c (struct lookup_base_data_s): New.
687 (lookup_base_r): Replace with ...
688 (dfs_lookup_base): ... this.
689 (lookup_base): Use dfs_walk_all.
691 2004-10-12 Kazu Hirata <kazu@cs.umass.edu>
693 * search.c: Fix comment typos.
695 2004-10-11 Mark Mitchell <mark@codesourcery.com>
698 * parser.c (cp_parser_declarator): Add member_p parameter.
699 (cp_parser_condition): Adjust calls to cp_parser_declarator.
700 (cp_parser_explicit_instantiation): Likewise.
701 (cp_parser_init_declarator): Likewise.
702 (cp_parser_direct_declarator): Add member_p parameter. Do not
703 parse tentatively when parsing the parameters to a member.
704 (cp_parser_type_id): Adjust calls to cp_parser_declarator.
705 (cp_parser_parameter_declaration): Likewise.
706 (cp_parser_member_declaration): Likewise.
707 (cp_parser_exception_declaration): Likewise.
710 * cp-tree.h (CLASSTYPE_TEMPLATE_SPECIALIZATION): Add a comment.
711 * pt.c (optimize_specialization_lookup_p): Do not optimize lookups
712 for members of partial or explicit specializations.
715 * decl2.c (finish_anon_union): Robustify.
717 2004-10-11 Nathan Sidwell <nathan@codesourcery.com>
719 * cp-tree.h (get_dynamic_cast_base_type): Rename to ...
720 (dcast_base_hint): ... here.
721 * rtti.c (build_dynamic_cast_1): Use dcast_base_hint.
722 * search.c (struct dcast_data_s): New.
723 (dynamic_cast_base_recurse): Remove. Replace with ...
724 (dfs_dcast_hint_pre, dfs_dcast_base_post): ... these. New.
725 (get_dynamic_cast_base_type): Rename to ...
726 (dcast_base_hint): ... here. Use dfs_walk_once_accessible.
727 (accessible_r): Remove.
728 (dfs_accessible_post): New, broken out of accessible_r.
729 (accessible_p): Use dfs_walk_once_accessible.
730 (dfs_walk_once_accessible_r): New. From accessible_r.
731 (dfs_walk_once_accessible): New. From acessible_p.
733 * cp-tree.h (SAME_BINFO_TYPE_P): New.
734 * class.c (build_base_path): Use SAME_BINFO_TYPE_P to compare
736 (convert_to_base_statically, determine_primary_bases,
737 update_vtable_entry_for_fn, dfs_modify_vtables, build_vtt_inits,
738 dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
739 accumulate_vtbl_inits, dfs_accumulate_vtbl_inits,
740 build_vtbl_initializer, add_vcall_offset_vtbl_entries_1): Likewise.
741 * init.c (expand_member_init): Likewise.
742 * search.c (lookup_base_r, dynamic_cast_base_recurse,
743 binfo_via_virtual, copied_binfo, binfo_for_vbase,
744 original_binfo): Likewise.
745 * tree.c (copy_binfo): Likewise.
747 2004-10-11 Kazu Hirata <kazu@cs.umass.edu>
749 * semantics.c: Fix comment typos.
751 2004-10-10 Andrew Pinski <pinskia@physics.uc.edu>
756 * semantics.c (maybe_cleanup_point_expr): Call
757 fold_build_cleanup_point_expr.
758 (maybe_cleanup_point_expr_void): New function.
759 (add_decl_expr): Call maybe_cleanup_point_expr_void.
760 (finish_expr_stmt): Likewise.
761 (finish_return_stmt): Likewise.
762 (finish_for_expr): Likewise.
763 (finish_asm_stmt): Likewise.
764 * typeck.c (condition_conversion): Call
765 fold_build_cleanup_point_expr.
767 2004-10-10 Andrew Pinski <pinskia@physics.uc.edu>
770 * semantics.c (add_decl_expr): If the decl has a size which
771 has side effects then the decl expression needs a cleanup point.
773 2004-10-10 Mark Mitchell <mark@codesourcery.com>
776 * decl.c (grokdeclarator): Robustify error-recovery on invalid
779 2004-10-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
781 Convert diagnostics to use quoting flag q 7/n
782 * typeck.c (composite_pointer_type_r, composite_pointer_type,
783 cxx_sizeof_or_alignof_type, cxx_sizeof_or_alignof_expr,
784 string_conv_p, build_class_member_access_expr,
785 build_class_member_access_expr, lookup_destructor,
786 finish_class_member_access_expr, build_indirect_ref,
787 get_member_function_from_ptrfunc, build_function_call,
788 convert_arguments, build_binary_op, pointer_diff, build_unary_op,
789 check_for_casting_away_constness, build_static_cast,
790 build_reinterpret_cast, build_const_cast, build_c_cast,
791 build_modify_expr, get_delta_difference, build_ptrmemfunc,
792 dubious_conversion_warnings, convert_for_assignment,
793 convert_for_initialization,
794 maybe_warn_about_returning_address_of_local, check_return_expr):
797 * typeck2.c (error_not_base_type, readonly_error,
798 abstract_virtuals_error, cxx_incomplete_type_diagnostic,
799 store_init_value, digest_init, build_x_arrow,
800 build_m_component_ref, require_complete_eh_spec_types): Likewise.
802 * tree.c (cp_build_qualified_type_real,
803 handle_java_interface_attribute, handle_init_priority_attribute):
806 * semantics.c (finish_asm_stmt, finish_non_static_data_member,
807 finish_pseudo_destructor_expr,
808 check_template_template_default_arg, begin_class_definition,
809 finish_base_specifier, qualified_name_lookup_error,
810 finish_id_expression, finish_typeof): Likewise.
812 * search.c (lookup_base, check_final_overrider,
813 look_for_overrides_r): Likewise.
815 * rtti.c (get_tinfo_decl, build_dynamic_cast_1): Likewise.
817 2004-10-09 Mark Mitchell <mark@codesourcery.com>
820 * error.c (dump_expr): Correct handling of AGGR_INIT_EXPRs using a
824 * init.c (build_new): Correct comments.
825 * parser.c (cp_parser_new_expression): Use NULL_TREE for nelts in
829 * parser.c (cp_parser_postfix_dot_deref_expression): If the
830 pseduo-destructor-name production does not work, fall back to the
834 * tree.c (cp_tree_equal): Handle a BASELINK.
837 * cp-tree.h (check_var_type): New function.
838 * decl.c (check_var_type): New function, split out from ...
839 (grokdeclarator): ... here.
840 * pt.c (tsubst_decl): Use check_var_type.
843 * decl.c (grokdeclarator): Disallow declarations of operators as
846 2004-10-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
849 * error.c (dump_expr): Add missing case for RDIV_EXPR.
851 2004-10-08 Kazu Hirata <kazu@cs.umass.edu>
853 * pt.c, search.c: Fix comment typos.
855 2004-10-08 Nathan Sidwell <nathan@codesourcery.com>
857 * cp-tree.h (dfs_walk, dfs_walk_real, dfs_unmark, markedp,
859 (dfs_skip_bases, dfs_walk_all, dfs_walk_once): New.
860 * class.c (struct find_final_overrider_data): Remove most_derived,
861 vpath_list and vpath fields. Add path field.
862 (dfs_find_final_ocerrider_1): Add DEPTH parameter. Adjust.
863 (dfs_find_final_overrider): Rename to ...
864 (dfs_find_final_overrider_pre): ... here. Adjust.
865 (dfs_find_final_overrider_post): Adjust.
866 (dfs_find_final_overrider_q): Fold into
867 dfs_find_final_overrider_pre.
868 (find_final_overrider): Adjust dfs searching.
869 (dfs_modify_vtables): Don't mark binfo here.
870 (modify_all_vtables): Use dfs_walk_once.
871 (build_vtt_inits): Likwise. Use dfs_walk_all.
872 (dfs_build_secondary_vptr_vtt_inits): Don't mark binfo here.
873 Return dfs_skip_bases as appropriate.
874 (dfs_fixup_binfo_vtbls): Return dfs_skip_bases as appropriate.
875 * init.c (dfs_initialized_vtbl_ptrs): Return dfs_skip_bases as
876 appropriate. Don't mark binfo here.
877 (initialize_vtbl_ptrs): Use dfs_walk_once.
878 * search.c (struct vbase_info): Remove unused struct.
879 (access_in_type): Use dfs_walk_once.
880 (dfs_access_in_type): Don't mark binfo here.
881 (dfs_accessible_queue_p, dfs_accessible_p) Remove.
883 (accessible_r): ... here. New. Specialize dfs_walk_once.
884 (accessible_p): Use accessible_r.
885 (lookup_field_queue_p): Remove. Fold into ...
886 (lookup_field_r): ... here. Adjust.
887 (lookup_member): Use dfs_walk_all.
888 (dfs_walk_real, dfs_walk): Replace with ...
889 (dfs_walk_all, dfs_walk_once): ... these.
890 (dfs_walk_once_r, dfs_unmark_r): Workers for dfs_walk_once.
891 (dfs_unmark, unmarkedp, markedp): Remove.
892 (dfs_get_pure_virtuals): Don't mark binfo here.
893 (get_pure_virtuals): Use dfs_walk_once.
894 (dfs_debug_unmarked_p): Remove. Fold into ...
895 (dfs_debug_mark): ... here.
896 (note_debug_info_needed): Use dfs_walk_all.
898 2004-10-07 Andrew Pinski <pinskia@physics.uc.edu>
900 * pt.c (tsubst_expr) <case ASM_EXPR>: Look passed the
901 CLEANUP_POINT_EXPR to get the asm expression.
903 2004-10-07 Mark Mitchell <mark@codesourcery.com>
905 * cp-tree.h (ICS_USER_FLAG): Remove comment about obsolete flag.
906 (DECL_MEMBER_TEMPLATE_P): New macro.
907 (is_member_template): Remove.
908 (class_method_index_for_fn): New function.
909 * pt.c (build_over_call): Use DECL_MEMBER_TEMPLATE_P.
910 * class.c (finish_struct_methods): Remove out-of-date comment.
911 * decl.c (copy_fn_p): Use DECL_MBMER_TEMPLATE_P.
912 * decl2.c (check_classfn): Use DECL_MEMBER_TEMPLATE_P and
913 class_method_index_for_fn.
914 * pt.c (is_member_template): Remove.
915 (is_member_template_class): Likewise.
916 (optimize_specialization_lookup_p): New function.
917 (retrieve_specialization): Optimize lookups for members that are
918 not member templates.
919 (register_specialization): Adjust accordingly.
920 (build_template_decl): Add member_template_p parameter. Set
921 DECL_MEMBER_TEMPLATE_P.
922 (process_partial_specialization): Adjust call to
923 retrieve_specialization.
924 (push_template_decl_real): Determine whether the template is a
926 (lookup_template_class): Use retrieve_specialization.
927 (tsubst_decl): Adjust call to retrieve_specialization.
928 (tsubst_exception_specification): New function.
930 (tsubst_copy): Use DECL_MEMBER_TEMPLATE_P.
931 (instantiate_template): Adjust call to retrieve_specialization.
932 (regenerate_decl_from_template): Do not actually generate a new
934 (instantiate_decl): Adjust call to retrieve_specialization.
935 (class_method_index_for_fn): New method.
937 2004-10-07 Andrew Pinski <pinskia@physics.uc.edu>
939 * parser.c (cp_parser_asm_definition): Look passed the
940 CLEANUP_POINT_EXPR to get the asm expression.
942 2004-10-06 Andrew Pinski <pinskia@physics.uc.edu>
945 * semantics.c (finish_asm_stmt): Asm expressions need cleanup
948 2004-10-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
950 Convert diagnostics to use quoting flag q 6/n
951 * pt.c (finish_member_template_decl, check_specialization_scope,
952 maybe_process_partial_specialization, determine_specialization,
953 check_explicit_specialization, maybe_check_template_type,
954 process_partial_specialization, check_default_tmpl_args,
955 push_template_decl_real, redeclare_class_template,
956 convert_nontype_argument, coerce_template_parms,
957 lookup_template_class, push_tinst_level,
958 instantiate_class_template, tsubst_arg_types,
959 tsubst_function_type, tsubst, tsubst_qualified_id,
960 tsubst_copy_and_build, check_instantiated_args,
961 do_decl_instantiation, do_type_instantiation,
962 invalid_nontype_parm_type_p, check_specialization_namespace,
963 convert_template_argument, determine_specialization,
964 check_template_shadow, tsubst_decl
965 instantiate_pending_templates): Use quoting marks.
967 2004-10-05 Nathan Sidwell <nathan@codesourcery.com>
970 * parser.c (cp_parser_postfix_expression): Inhibit Koenig when
971 unqualified lookup finds a member function.
973 2004-10-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
975 Convert diagnostics to use quoting flag q 5/n
976 * parser.c (cp_parser_name_lookup_error,
977 cp_parser_diagnose_invalid_type_name,
978 cp_parser_primary_expression, cp_parser_unqualified_id,
979 cp_parser_nested_name_specifier_opt, cp_parser_labeled_statement,
980 cp_parser_jump_statement, cp_parser_simple_declaration,
981 cp_parser_decl_specifier_seq, cp_parser_mem_initializer_id,
982 cp_parser_type_parameter, cp_parser_template_id,
983 cp_parser_template_name, cp_parser_direct_declarator,
984 cp_parser_parameter_declaration_list, cp_parser_class_head,
985 cp_parser_base_specifier, cp_parser_lookup_name,
986 cp_parser_late_parsing_default_args,
987 cp_parser_optional_template_keyword
988 cp_parser_elaborated_type_specifier, cp_parser_check_class_key,
989 cp_parser_check_access_in_redeclaration): Use quoting marks.
991 * name-lookup.c (supplement_binding, pushdecl,
992 check_for_out_of_scope_variable, validate_nonmember_using_decl,
993 do_nonmember_using_decl, lookup_tag, set_decl_namespace,
994 push_namespace, do_namespace_alias, do_using_directive,
995 ambiguous_decl, lookup_namespace_name, add_function): Likewise.
997 * method.c (use_thunk): Likewise.
999 * lex.c (unqualified_name_lookup_error,
1000 unqualified_fn_lookup_error): Likewise.
1002 2004-10-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
1004 Convert diagnostics to use quoting flag q 4/n
1005 * except.c (decl_is_java_type, build_throw,
1006 is_admissible_throw_operand, check_handlers_1, check_handlers):
1007 Use quoting formats.
1008 * friend.c (add_friend, make_friend_class, do_friend): Likewise.
1009 * init.c (sort_mem_initializers, emit_mem_initializers,
1010 member_init_ok_or_else, expand_member_init, is_aggr_type,
1011 build_offset_ref, build_java_class_ref): Likewise.
1013 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1015 Convert diagnostics to use quoting flag q 3/n
1016 * decl.c (pop_label, duplicate_decls, redeclaration_error_message,
1017 redeclaration_error_message, lookup_label, check_goto,
1018 make_typename_type, make_unbound_class_template,
1019 fixup_anonymous_aggr, check_tag_decl, start_decl, start_decl_1,
1020 grok_reference_init, layout_var_decl, maybe_commonize_var,
1021 check_for_uninitialized_const_var, reshape_init_array,
1022 reshape_init, check_initializer, cp_finish_decl,
1023 member_function_or_else, bad_specifiers, grokfndecl, grokvardecl,
1024 check_static_variable_definition, compute_array_index_type,
1025 create_array_type_for_decl, check_special_function_return_type,
1026 grokdeclarator, check_default_argument, grokparms,
1027 grok_ctor_properties, grok_op_properties,
1028 check_elaborated_type_specifier, xref_tag, finish_enum,
1029 build_enumerator, check_function_type, start_preparsed_function,
1030 store_parm_decls): Use quoting formats.
1031 * decl2.c (grok_array_decl, delete_sanity, check_member_template,
1032 check_java_method, check_classfn, finish_static_data_member_decl,
1033 grokfield, grokbitfield, grok_function_init,
1034 build_anon_union_vars, coerce_new_type, coerce_delete_type,
1035 check_default_args): Likewise.
1036 * parser.c (cp_parser_decl_specifier_seq): Likewise.
1038 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1040 Convert diagnostics to use quoting flag q 2/n
1041 * class.c (build_base_path, add_method, alter_access,
1042 handle_using_decl, check_bases,
1043 maybe_warn_about_overly_private_class, find_final_overrider,
1044 warn_hidden, finish_struct_anon, add_implicitly_declared_members,
1045 check_bitfield_decl, check_field_decls, layout_empty_base,
1046 build_base_field, check_methods, layout_virtual_bases,
1047 warn_about_ambiguous_bases, layout_class_type, finish_struct_1,
1048 resolve_address_of_overloaded_function, instantiate_type,
1049 note_name_declared_in_class): Use format flag "q" for quoting.
1051 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1053 Convert diagnostics to use quoting flag q 1/n
1054 * error.c (locate_error): Ignore quoting flag q.
1055 * call.c (build_user_type_conversion_1, build_operator_new_call,
1056 build_object_call, op_error, build_conditional_expr,
1057 build_new_op, build_op_delete_call, enforce_access,
1058 convert_like_real, convert_arg_to_ellipsis, build_x_va_arg,
1059 convert_default_arg, build_over_call, build_new_method_call,
1060 joust, perform_implicit_conversion, initialize_reference): Use the
1063 2004-10-03 Andrew Pinski <pinskia@physics.uc.edu>
1066 * typeck.c (build_reinterpret_cast): Return if the inner type
1069 2004-10-01 Jan Hubicka <jh@suse.cz>
1071 * semantics.c (expand_body): Update call of tree_rest_of_compilation.
1073 2004-09-30 Nathan Sidwell <nathan@codesourcery.com>
1075 * cp-tree.h (struct lang_decl): Shrink by reordering fields and
1076 turning operator_code and fixed_offset into bitfields.
1078 2004-09-29 Joseph S. Myers <jsm@polyomino.org.uk>
1080 * decl.c (duplicate_decls): Merge TREE_DEPRECATED.
1082 2004-09-29 Jason Merrill <jason@redhat.com>
1084 PR tree-optimization/17697
1085 * decl.c (duplicate_decls): Copy TREE_NOTHROW from newdecl to olddecl.
1087 2004-09-28 Jason Merrill <jason@redhat.com>
1090 * class.c (build_base_field): Set TYPE_MODE.
1092 2004-09-28 Roger Sayle <roger@eyesopen.com>
1095 * g++spec.c (lang_specific_driver): Unrecognized libraries, other
1096 than -lc and -lm, may require linking against libstc++.
1098 2004-09-28 Kazu Hirata <kazu@cs.umass.edu>
1100 * tree.c: Fix a comment typo.
1102 2004-09-28 Nathan Sidwell <nathan@codesourcery.com>
1104 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): Remove.
1105 (struct secondary_vptr_vtt_init_data_s): New.
1106 (build_vtt_inits): Adjust dfs_walkers.
1107 (dfs_build_secondary_vptr_vtt_inits): Caller data is a
1108 secondary_vptr_vtt_init_data_s structure. Adjust.
1109 (dfs_ctor_vtable_bases_queue_p): Remove.
1110 (dfs_fixup_binfo_vtbls): No need to clear BINFO_MARKED. Simplify.
1112 * pt.c (struct get_template_base_data_s): Remove.
1113 (get_template_base_r): Fold into get_template_base.
1114 (get_template_base): Walk base binfos directly in inheritance
1117 2004-09-27 Mark Mitchell <mark@codesourcery.com>
1120 * cp-tree.h (fold_if_not_in_template): New function.
1121 * call.c (build_conditional_expr): Use fold_if_not_in_template.
1122 (build_cxx_call): Likewise.
1123 * cvt.c (convert_to_complex): Likewise.
1124 (ocp_convert): Likewise.
1125 (convert): Likewise.
1126 (convert_force): Likewise.
1127 * decl.c (compute_array_index_type): Clear
1128 processing_template_decl while folding array bounds.
1129 * pt.c (convert_nontype_argument): Clear
1130 processing_template_decl while processing non-type argument
1132 * tree.c (fold_if_not_in_template): New function.
1133 * typeck.c (build_class_member_access_expr): Use
1134 fold_if_not_in_template.
1135 (build_array_ref): Likewise.
1136 (build_binary_op): Likewise. Do not try to optimize computations
1137 when processing templates.
1138 (cp_pointer_int_sum): Use fold_if_not_in_template.
1139 (pointer_diff): Likewise.
1140 (build_unary_op): Likewise.
1141 (build_reinterpret_cast): Likewise.
1142 (get_delta_difference): Likewise.
1143 (expand_ptrmemfunc_cst): Likewise.
1144 (dubious_conversion_warnings): Likewise.
1146 2004-09-27 Matt Austern <austern@apple.com>
1148 * cp/parser.c (struct cp_token): New one-bit field , implicit_extern_c
1149 (cp_lexer_get_preprocessor_token): Set implicit_extern_c for
1150 tokens that come from headers that are implicitly extern "C".
1151 (struct cp_parser): new one-bit field, implicit_extern_c.
1152 (cp_parser_new): Set parser's implicit_extern_c to false.
1153 (cp_parser_translation_unit): Pop lang context if we were in a
1154 header that was implicitly extern "C".
1155 (cp_parser_declaration_seq_opt): Push/pop lang context as
1156 required by the token's and parser's implicit_extern_c.
1158 2004-09-27 Mark Mitchell <mark@codesourcery.com>
1161 * cp-tree.h (shared_member_p): Declare.
1162 * search.c (shared_member_p): Give it external linkage.
1163 * semantics.c (finish_qualified_id_expr): Use it.
1164 (finish_id_expression): Likewise.
1167 * semantics.c (finish_id_expression): Do not add "this->" to
1168 static member functions.
1170 2004-09-27 Nathan Sidwell <nathan@codesourcery.com>
1173 * error.c (dump_type): Change TREE_VEC case into TREE_BINFO.
1175 * class.c (struct count_depth_data): Remove.
1176 (dfs_depth_post, dfs_depth_q): Remove.
1177 (find_final_overrider): Use number of vbase classes as depth
1180 * cp-tree.h (types_overlap_p): Remove.
1181 * search.c (struct overlap_info): Remove.
1182 (dfs_check_overlap, dfs_no_overlap_yet, types_overlap_p): Remove.
1184 * pt.c (GTB_VIA_VIRTUAL, GTB_IGNORE_TYPE): Remove.
1185 (get_template_base_recursive): Remove. Replace with ...
1186 (get_template_base_r): ... this.
1187 (struct get_template_base_data_s): New.
1188 (get_template_base): Use get_template_base_r via dfs_walk. Always
1189 return NULL on failure.
1190 (unify): Remove error_mark_node check from get_template_base result.
1192 2004-09-24 Paolo Bonzini <bonzini@gnu.org>
1194 * parser.c (cp_parser_expression_stack): Clarify why it is
1195 an array of NUM_PREC_VALUES elements.
1196 (cp_parser_binary_expression): Clarify why we do not need to
1197 handle stack overflow.
1199 2004-09-24 Nathan Sidwell <nathan@codesourcery.com>
1202 * search.c (lookup_field_queue_p): Correct check for hidden base.
1204 * search.c (bfs_walk): Remove.
1205 (lookup_member): Use dfs_walk_real.
1206 (dfs_walk_real): Move and adjust documentation from bfs_walk.
1208 2004-09-23 Zack Weinberg <zack@codesourcery.com>
1210 * decl.c (grokfndecl): If ::main is found not to return int,
1211 correct it after issuing a diagnostic.
1212 (grokdeclarator): If the incoming type was error_mark_node, do
1213 not complain about declaring something with no type.
1214 (start_function): Change check for ::main not returning int to
1215 an assertion, as grokfndecl now catches this when the user did it.
1216 * init.c (perform_member_init, sort_mem_initializers)
1217 (emit_mem_initializers): Make most diagnostics be issued on
1218 the line of current_function_decl, not whatever the current
1220 * parser.c (cp_lexer_peek_token_emit_debug_info): Surround
1221 definition and declaration with #ifdef ENABLE_CHECKING.
1222 Avoid unnecessary use of fprintf.
1223 (cp_lexer_print_token, cp_lexer_debug_stream): Adjust stub
1224 definitions to avoid warnings.
1225 (cp_lexer_new_main): Add assertion that first token is not a
1227 (cp_lexer_new_from_token_array): Fold into ...
1228 (cp_lexer_new_from_tokens): ... here. Add assertion that
1229 first token is not a padding token.
1230 (cp_lexer_set_source_position_from_token): Move nearer to callers.
1231 Remove unused lexer argument.
1232 (cp_lexer_peek_token): Just print debugging report (if enabled)
1233 and return lexer->next_token.
1234 (cp_lexer_skip_purged_tokens): Delete.
1235 (cp_lexer_next_token_is, cp_lexer_next_token_is_not): Make
1236 inline, simplify bodies.
1237 (cp_lexer_peek_nth_token): Add debugging report a la
1238 cp_lexer_peek_token.
1239 (cp_lexer_consume_token): Correct commentary. Advance over
1240 purged tokens here. Set current source position here, from
1241 token to be returned. Avoid unnecessary use of fprintf.
1242 (cp_lexer_purge_token): Advance next_token pointer over this and
1243 subsequent purged tokens.
1244 (cp_parser_error): Adjust source position to that of the
1246 (cp_parser_push_lexer_for_tokens, cp_parser_pop_lexer): New functions.
1247 (cp_parser_string_literal): Remove some excessive cleverness.
1248 (cp_parser_enum_specifier): Call start_enum before consuming
1250 (cp_parser_member_declaration): Make the "extra semicolon"
1251 diagnostic consistently-worded with the other place this is
1252 diagnosed. Explicitly set the diagnostic location to the
1253 location of the offending semicolon.
1254 (cp_parser_enclosed_template_argument_list): Use %</%> quoting
1255 in diagnostics. Do not use cp_parser_require. Set location
1256 of diagnostics about improper use of '>>' to location of
1258 (cp_parser_late_parsing_for_member):
1259 Use cp_parser_push_lexer_for_tokens and cp_parser_pop_lexer.
1260 (cp_parser_late_parsing_default_args): Likewise. Manually
1261 move some logic outside the loop.
1263 2004-09-23 Andrew Pinski <pinskia@physics.uc.edu>
1266 * cvt.c (cp_convert_to_pointer): Return early when the type is
1269 2004-09-21 Fariborz Jahanian <fjahanian@apple.com>
1273 * decl.c (grokfndecl): Add new argument "attrlist", use it
1274 to call cplus_decl_attributes.
1275 (start_function): Remove call to cplus_decl_attributes.
1276 * cvt.c (ocp_convert): Add support to use type conversion
1277 function to vector type.
1278 * parser.c (cp_parser_conversion_type_id): Add attributes, if any,
1281 2004-09-23 Paolo Bonzini <bonzini@gnu.org>
1285 * parser.c (cp_parser_token_tree_map_node,
1286 cp_parser_pm_expression, cp_parser_additive_expression,
1287 cp_parser_multiplicative_expression, cp_parser_shift_expression,
1288 cp_parser_relational_expression, cp_parser_equality_expression,
1289 cp_parser_and_expression, cp_parser_exclusive_or_expression,
1290 cp_parser_inclusive_or_expression,
1291 cp_parser_logical_and_expression,
1292 cp_parser_logical_or_expression): Removed.
1293 (enum cp_parser_prec, struct cp_parser_token_tree_map_node,
1294 binops, binops_by_token): New.
1295 (cp_parser_assignment_expression): Use cp_parser_binary_expression.
1296 (cp_parser_new): Initialize binops_by_token.
1297 (cp_parser_binary_expression): Rewritten.
1300 2004-09-23 Kazu Hirata <kazu@cs.umass.edu>
1302 * parser.c: Fix a comment typo.
1304 2004-09-23 Nathan Sidwell <nathan@codesourcery.com>
1307 * decl.c (xref_basetypes): Look through typedefs before checking
1310 2004-09-22 Nathan Sidwell <nathan@codesourcery.com>
1312 * cp-tree.h (unemitted_tinfo_decls): Make a VEC(tree).
1313 * decl2.c (cp_finish_file): Adjust tinfo decl emission loop.
1314 * rtti.c (unemitted_tinfo_decls): Make a VEC(tree).
1315 (init_rtti_processing): Initialize it to something realistic.
1316 (get_tinfo_decl): Adjust pushing the new decl.
1318 * cp-tree.h (struct lang_type_class): Remove marked flags, add
1319 diamond_shaped and repeated_base flags. Reorder to keep 8-bit blocks.
1320 (TYPE_MARKED_P): New.
1321 (CLASSTYPE_DIAMOND_SHAPED_P, CLASSTYPE_REPEATED_BASE_P): New.
1322 (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
1323 CLEAR_CLASSTYPE_MARKED_N): Remove.
1324 (CLASSTYPE_MARKED_*, SET_CLASSTYPE_MARKED_*,
1325 CLEAR_CLASSTYPE_MARKED_*): Remove.
1326 * decl.c (xref_basetypes): Use TYPE_MARKED_P. Determine diamond
1327 shaped and repeated base properties.
1328 * lex.c (cxx_make_type): Don't clear TYPE_ALIAS_SET.
1329 * rtti.c (dfs_class_hint_mark, dfs_class_hint_unmark,
1330 class_hint_flags): Remove.
1331 (get_pseudo_ti_init): Use CLASSTYPE_REPEATED_BASE_P and
1332 CLASSTYPE_DIAMOND_SHAPED_P.
1334 2004-09-21 Ziemowit Laski <zlaski@apple.com>
1336 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved here from
1338 (objcp_tsubst_copy_and_build): Reformat function signature.
1339 * cp-objcp-common.h (objcp_tsubst_copy_and_build): Likewise.
1340 (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved to cp-lang.c.
1342 2004-09-21 Zack Weinberg <zack@codesourcery.com>
1344 * parser.c (cp_lexer_peek_token, cp_lexer_consume_token):
1345 Don't handle CPP_PRAGMA tokens specially.
1346 (cp_lexer_handle_pragma): Use cp_lexer_consume_token. Don't
1347 purge the token; do clear token->value after processing. Add
1348 assertion at beginning that token->value is nonzero.
1349 (cp_parser_statement, cp_parser_declaration_seq_opt): Handle
1350 CPP_PRAGMA as a full statement or declaration in its own right.
1352 2004-09-21 Matt Austern <austern@apple.com>
1355 * decl.c (grokvardecl): Accept declarations of global variables
1356 using anonymous types.
1358 2004-09-21 Roger Sayle <roger@eyesopen.com>
1361 * tree.c (lvalue_p_1): Disallow MIN_EXPR and MAX_EXPR as lvalues
1362 if either operand has side-effects.
1363 * typeck.c (rationalize_conditional_expr): Assert that neither
1364 operand of MIN_EXPR or MAX_EXPR has side-effects.
1365 (build_modify_expr): Add support for MIN_EXPR and MAX_EXPR.
1366 Check that the "lhs" is a valid lvalue, i.e. that neither operand
1367 of a MIN_EXPR or MAX_EXPR has a side-effect.
1369 2004-09-21 Nathan Sidwell <nathan@codesourcery.com>
1371 * cp-tree.h (struct lang_type_header): Remove
1372 uses_multiple_inheritance field.
1373 (TYPE_USES_MULTIPLE_INHERITANCE): Remove.
1374 (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): Remove.
1375 (TYPE_USES_VIRTUAL_BASECLASSES): Remove.
1376 (DECL_NEEDS_VTT_PARM_P): Use CLASSTYPE_VBASECLASSES.
1377 (TYPE_CONTAINS_VPTR_P): Likewise.
1378 * call.c (add_template_candidate_real): Use
1379 CLASSTYPE_VBASECLASSES.
1380 (build_special_member_call): Likewise.
1381 * class.c (finish_struct_bits): Remove
1382 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P & TYPE_USES_VIRTUAL_BASECLASSES
1384 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
1385 (create_vtable_ptr): Remove TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P
1387 (build_vtt_inits): Use CLASSTYPE_VBASECLASSES.
1388 (accumulate_vtbl_inits, build_vbase_offset_vtbl_entries):
1390 * decl.c (xref_basetypes): Remove TYPE_USES_MULTIPLE_INHERITANCE,
1391 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
1393 (cxx_maybe_build_cleanup): Use CLASSTYPE_VBASECLASSES.
1394 * decl2.c (maybe_retrofit_in_chrg): Likewise.
1395 * init.c (expand_member, push_base_cleanups): Likewise.
1396 * pt.c (instantiate_class_template): Remove
1397 TYPE_USES_MULTIPLE_INHERITANCE,
1398 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
1400 * ptree.c (cxx_print_type): Remove TYPE_USES_MULTIPLE_INHERITANCE
1402 * typeck2.c (process_init_constructor): Replace some sorrys with
1405 2004-09-21 Andreas Tobler <a.tobler@schweiz.ch>
1407 * decl.c (reshape_init_array): Initialize max_index_cst to fix
1410 2004-09-20 Mark Mitchell <mark@codesourcery.com>
1413 * pt.c (tsubst): Fix parentheses to accomodate emacs.
1414 (tsubst_baselink): If we get a single function, mark it as used.
1416 2004-09-20 Matt Austern <austern@apple.com>
1417 Zack Weinberg <zack@codesourcery.com>
1419 * decl.c (make_rtl_for_nonlocal_decl, start_preparsed_function):
1420 Apply lbasename to input_filename before passing to get_fileinfo.
1421 * semantics.c (begin_class_definition): Likewise.
1422 * lex.c (handle_pragma_interface): Apply get_fileinfo to the
1423 correct filename. Rename variables to be less confusing.
1424 (handle_pragma_implementation): Likewise. Disable "appears
1425 after file is included" diagnostic.
1427 * parser.c (struct cp_token): Add in_system_header fiag.
1428 (CP_TOKEN_BLOCK_NUM_TOKENS, struct cp_token_block)
1429 (CP_TOKEN_BUFFER_SIZE, cp_token_cache_push_token)
1430 (CPP_NONE, cp_lexer_read_token): Delete.
1431 (struct cp_lexer): Remove first_token, string_tokens,
1432 main_lexer_p fields. Clarify comments.
1433 (struct cp_token_cache): Now just a pair of pointers.
1434 (CP_LEXER_BUFFER_SIZE): New #define.
1435 (CPP_PURGED): New fake token type.
1436 (cp_lexer_new_from_token_array, cp_lexer_destroy)
1437 (cp_lexer_peek_token_emit_debug_info, cp_lexer_skip_purged_tokens)
1438 (cp_lexer_handle_pragma, cp_token_cache_new, cp_parser_string_literal):
1440 (cp_lexer_new_from_tokens): Now a simple wrapper around
1441 cp_lexer_new_from_token_array.
1442 (cp_lexer_set_source_position_from_token): Also update
1444 (cp_lexer_next_token, cp_lexer_prev_token, cp_lexer_advance_token):
1446 (cp_lexer_token_difference): Dont handle wrapping round.
1447 (cp_lexer_new_main): Enable pragma deferral and raw strings,
1448 read the entire translation unit through c_lex_with_flags into
1449 this lexer's buffer, then turn raw strings back off again.
1450 (cp_lexer_grow_buffer): Adjust for buffer no longer being circular.
1451 (cp_lexer_get_preprocessor_token): No need to handle not being
1452 the main lexer. Set token->in_system_header too.
1453 (cp_lexer_peek_token): Skip purged tokens. Feed pragma tokens
1454 to cp_lexer_handle_pragma. No need to call cp_lexer_read_token.
1455 (cp_lexer_peek_nth_token): Likewise.
1456 (cp_lexer_purge_token): Mark the token PURGED, don't shift all
1457 the other tokens down.
1458 (cp_lexer_purge_tokens_after): Likewise.
1459 (cp_lexer_save_tokens, cp_lexer_rollback_tokens): Don't worry
1460 about there being no tokens.
1461 (cp_lexer_print_token): Revise to give useful information on
1463 (struct cp_parser): Add field translate_strings_p.
1464 (cp_parser_new): Initialize it.
1465 (cp_parser_translation_unit): Destroy the lexer when done.
1466 (cp_parser_parameter_declaration): Restructure saving of
1468 (cp_parser_save_member_function_body): Likewise.
1469 (cp_parser_check_for_invalid_template_id)
1470 (cp_parser_nested_name_specifier_opt, cp_parser_template_id):
1471 Adjust calls to cp_lexer_advance_token.
1472 (cp_parser_skip_to_closing_parenthesis, cp_parser_declaration):
1473 No need to fiddle c_lex_string_translate.
1474 (cp_parser_primary_expression, cp_parser_linkage_specification)
1475 (cp_parser_asm_definition, cp_parser_asm_specification_opt)
1476 (cp_parser_asm_operand_list, cp_parser_asm_clobber_list)
1477 Use cp_parser_string_literal.
1478 (cp_parser_attribute_list): Save and restore
1479 parser->translate_strings_p, not c_lex_string_translate.
1480 (cp_parser_cache_group): Delete.
1481 (cp_parser_cache_group_1): Rename cp_parser_cache_group. Do
1482 not take a cache argument.
1484 2004-09-20 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1487 * decl.c (reshape_init): Extract array handling into...
1488 (reshape_init_array): New function. Use integers instead of trees
1489 for indices. Handle out-of-range designated initializers.
1491 2004-09-20 Steven Bosscher <stevenb@suse.de>
1493 * lex.c (cxx_init): Don't set the ridpointer for RID_NULL
1496 2004-09-19 Mark Mitchell <mark@codesourcery.com>
1498 * decl2.c (determine_visibility): Allow class visibility
1499 directives to override targetm.cxx.export_class_data.
1501 2004-09-18 Kazu Hirata <kazu@cs.umass.edu>
1503 * call.c, semantics.c: Follow spelling conventions.
1504 * class.c: Fix a comment typo.
1506 2004-09-16 Geoffrey Keating <geoffk@apple.com>
1509 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
1510 (handle_pragma_implementation): Likewise.
1512 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
1513 Zack Weinberg <zack@codesourcery.com>
1515 * cp-tree.def: Use tree_code_class enumeration constants
1516 instead of code letters.
1517 * call.c, class.c, cp-gimplify.c, cp-lang.c, cxx-pretty-print.c
1518 * mangle.c, pt.c, semantics.c, tree.c, typeck.c:
1519 Update for new tree-class enumeration constants.
1521 2004-09-16 Mark Mitchell <mark@codesourcery.com>
1524 * parser.c (cp_parser_simple_declaration): Commit to tentative
1525 parses after seeing a decl-specifier.
1526 (cp_parser_simple_declaration): Eliminate spurious message.
1527 (cp_parser_init_declarator): Adjust error message.
1530 * lex.c (unqualified_name_lookup_error): Mark the dummy
1531 declaration as used.
1534 * parser.c (cp_parser_nested_name_specifier): Do not resolve
1535 typename types if the user explicitly said "typename".
1537 2004-09-16 Andrew MacLeod <amacleod@redhat.com>
1539 * error.c (dump_decl): Make sure there is lang_specific info before
1540 checking for DTOR and CTOR decls.
1542 2004-09-16 Nathan Sidwell <nathan@codesourcery.com>
1544 * class.c (copy_virtuals): Remove.
1545 (build_primary_vtable): Use copy_list directly.
1546 (build_secondary_vtable): Likewise.
1547 (update_vtable_entry_for_fn): Clear BV_CALL_INDEX here.
1548 (create_vtable_ptr): Likewise.
1550 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
1552 * search.c: Follow spelling conventions.
1554 2004-09-16 Nathan Sidwell <nathan@codesourcery.com>
1556 * cp-tree.h (struct lang_type_class): Make pure_virtuals a
1558 (CLASSTYPE_INLINE_FRIENDS, CLASSTYPE_PURE_VIRTUALS): Update
1560 * call.c (build_new_method_call): Don't confirm a pure virtual is
1561 in CLASSTYPE_PURE_VIRTUALS. Reorder checks. Make it a warning.
1562 * class.c (check_methods): CLASSTYPE_INLINE_FRIENDS is a VEC(tree).
1563 (fixup_inline_methods, finish_struct): Likewise.
1564 * decl.c (finish_method): Likewise.
1565 * search.c (dfs_get_pure_virtuals, get_pure_virtuals):
1566 CLASSTYPE_PURE_VIRTUALS is a VEC(tree).
1567 * typeck2.c (abstract_virtuals_error): Likewise. Truncate the
1568 vector to avoid repeating the list in error messages.
1570 2004-09-15 Mark Mitchell <mark@codesourcery.com>
1572 * cp-objcp-common.h (LANG_HOOKS_COMDAT_GROUP): Define.
1573 * cp-tree.h (cxx_comdat_group): Declare.
1574 * decl.c (cxx_comdat_group): New function.
1576 2004-09-15 Nathan Sidwell <nathan@codesourcery.com>
1578 * search.c (get_pure_virtuals): Remove unused variables.
1580 * cp-tree.h (struct lang_decl_flags): Remove
1581 needs_final_overrider.
1582 (DECL_NEEDS_FINAL_OVERRIDER_P): Remove.
1583 * decl.c (duplicate_decls): Do not copy DECL_NEEDS_FINAL_OVERRIDER_P.
1584 * class.c (finish_struct_bits): Correct comment about
1585 CLASSTYPE_PURE_VIRTUALS.
1586 * search.c (get_pure_virtuals): Remove useless loop.
1588 2004-09-14 Mark Mitchell <mark@codesourcery.com>
1591 * mangle.c (partially_mangled_name): New variable.
1592 (partially_mangled_name_len): Likewise.
1593 (save_partially_mangled_name): New function.
1594 (restore_partially_mangled_name): Likewise.
1595 (write_encoding): Save and restore partially mangled names around
1596 calls to get_mostly_instantiated_function_type.
1597 (write_unqualified_name): Likewise.
1599 2004-09-14 Nathan Sidwell <nathan@codesourcery.com>
1601 * pt.c (unify): Replace gcc_unreachable with gcc_assert.
1603 2004-09-13 Mark Mitchell <mark@codesourcery.com>
1606 * parser.c (cp_parser_id_expression): Correct value for
1608 (cp_parser_nested_name_specifier_opt): Look through typenames as
1610 (cp_parser_template_name): Honor check_dependency_p.
1613 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name):
1617 * pt.c (unify): Add ENUMERAL_TYPE case. Replace sorry with
1620 2004-09-12 Richard Henderson <rth@redhat.com>
1623 * semantics.c (maybe_cleanup_point_expr): Don't call fold.
1624 * typeck.c (condition_conversion): Likewise.
1626 2004-09-11 Richard Henderson <rth@redhat.com>
1629 * pt.c (cur_stmt_expr): Move from tsubst_expr.
1630 (tsubst_expr) <case STMT_EXPR>: Move ...
1631 (tsubst_copy_and_build): ... here.
1633 2004-09-10 Zack Weinberg <zack@codesourcery.com>
1635 * cp-tree.h (interface_only, interface_unknown): Delete declarations;
1636 comment explaining them moved to c-common.h.
1637 * lex.c (interface_only, interface_unknown, extract_interface_info):
1639 (cxx_finish): Don't reset interface_unknown.
1640 (handle_pragma_interface): Don't set interface_only and
1641 interface_unknown; just the like-named fields in finfo.
1642 (handle_pragma_implementation): Adjust comment.
1643 * decl2.c (cp_finish_file): Don't reset interface_only and
1645 * method.c (synthesize_method): Don't reset interface_unknown or
1646 call extract_interface_info.
1647 * pt.c (pop_tinst_level): Don't call extract_interface_info.
1648 * decl.c (start_cleanup_fn): Don't save or restore interface_only
1649 and interface_unknown.
1650 (make_rtl_for_nonlocal_decl): Call get_fileinfo on input_filename
1651 and use the result instead of the interface_only/interface_unknown
1653 (start_preparsed_function): Likewise.
1654 * lex.c (cxx_make_type): Likewise.
1655 * semantics.c (begin_class_definition): Likewise.
1656 (expand_body): Don't call extract_interface_info.
1658 2004-09-10 Ziemowit Laski <zlaski@apple.com>
1660 * decl.c (objc_mark_locals_volatile): Make description of
1661 routine more descriptive; only mark VAR_DECLs at each
1664 2004-09-10 Richard Henderson <rth@redhat.com>
1667 * call.c (build_vfield_ref): Move...
1668 * class.c (build_vfield_ref): ... here. Convert datum to the
1669 primary base containing the vptr.
1670 (make_new_vtable): Simplify build_primary_vtable arguments.
1671 (finish_struct_1): Do not duplicate TYPE_VFIELD.
1672 * typeck.c (build_class_member_access_expr): Don't warn for
1673 null object access to base fields.
1675 2004-09-10 Ziemowit Laski <zlaski@apple.com>
1677 * decl.c (objc_get_current_scope, objc_mark_locals_volatile):
1678 New functions, to be called from ObjC++.
1680 2004-09-10 Kazu Hirata <kazu@cs.umass.edu>
1682 * class.c, cp-tree.h, decl.c, decl2.c, mangle.c,
1683 name-lookup.h, parser.c, search.c, semantics.c, typeck2.c: Fix
1686 2004-09-09 Ziemowit Laski <zlaski@apple.com>
1688 * typeck.c (build_c_cast): Preserve the cast if casting
1689 to and from an Objective-C type.
1691 2004-09-09 Ziemowit Laski <zlaski@apple.com>
1693 * Make-lang.in (cp/typeck.o): Depend on c-common.h.
1694 * typeck.c: Include c-common.h.
1695 (comptypes): For RECORD_TYPEs, call objc_comptypes() and
1696 return the result if nonnegative.
1698 2004-09-09 Zack Weinberg <zack@codesourcery.com>
1700 * decl2.c (import_export_class)
1701 * lex.c (handle_pragma_interface):
1702 Test MULTIPLE_SYMBOL_SPACES with if, not #ifdef.
1704 2004-09-08 Ziemowit Laski <zlaski@apple.com>
1706 * Make-lang.in (cp/semantics.o): Depend on c-common.h.
1707 * semantics.c: Include c-common.h.
1708 (finish_compound_stmt): Call objc_clear_super_receiver().
1710 2004-09-08 Ziemowit Laski <zlaski@apple.com>
1712 * cp-tree.h (do_poplevel): New prototype.
1713 * semantics.c (do_poplevel): Make externally visible.
1715 2004-09-08 Nathan Sidwell <nathan@codesourcery.com>
1717 * cp-tree.h (tree_pair_s): Define a GC'd vector.
1718 * name-lookup.h (cxx_saved_binding, cp_class_binding): Likewise.
1719 * semantics.c (deferred_access): Likewise.
1721 2004-09-06 Daniel Jacobowitz <dan@debian.org>
1723 * semantics.c (expand_body): Assert that we are not nested.
1725 2004-09-06 Zack Weinberg <zack@codesourcery.com>
1727 * decl.c (build_enumerator): Use add_double and int_fits_type_p
1728 instead of cp_build_binary_op, to avoid creating short-lived trees.
1729 * parser.c (cp_parse_type_specifier <RID_ENUM>): Use two-token
1730 lookahead instead of backtracking. Move some code to avoid a
1732 (cp_parser_enum_specifier): Avoid duplication of effort with caller.
1733 Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
1734 (cp_parser_enumerator_list, cp_parser_enumerator_definition):
1735 Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
1737 2004-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1739 * decl.c (grok_declarator): Remove a redundant semicolon.
1741 * parser.c (cp_parser_decl_specifier_seq, cp_parser_type_specifier):
1742 Correct comments describing function parameters.
1744 2004-09-03 Matt Austern <austern@apple.com>
1745 Compile speed improvement.
1746 * parser.c (cp_lexer_print_token): Only define if ENABLE_CHECKING set.
1747 Otherwise define a stub macro that expands to nothing.
1748 (cp_lexer_debugging_p): Only define if ENABLE_CHECKING set. Otherwise
1749 define a stub macro that expands to 0.
1750 (cp_lexer_start_debugging): Only define if ENABLE_CHECKING set.
1751 (cp_lexer_stop_debugging): Likewise.
1752 (cp_lexer_debug_stream): Only define if ENABLE_CHECKING set. Otherwise
1753 define a stub macro that expands to NULL.
1754 (cp_lexer_new_main): Only set debugging_p if ENABLE_CHECKING set.
1755 (cp_lexer_new_from_tokens): Likewise.
1757 2004-09-03 Jan Hubicka <jh@suse.cz>
1759 * decl.c (finish_function): Clean out pointers we no longer need.
1761 2004-09-03 Jan Beulich <jbeulich@novell.com>
1763 * g++spec.c (MATH_LIBRARY_PROFILE): Default to MATH_LIBRARY rather
1766 2004-09-02 Paul Brook <paul@codesourcery.com>
1768 * decl2.c (determine_visibility): Only check data visibility
1771 2004-08-31 Mark Mitchell <mark@codesourcery.com>
1773 * cp-tree.h (DECL_CONSTRUCTION_VTABLE_P): New macro.
1774 * class.c (build_ctor_vtbl_group): Set DECL_CONSTRUCTION_VTABLE_P.
1775 * decl2.c (determine_visibility): Honor
1776 TARGET_CXX_EXPORT_CLASS_DATA.
1778 * class.c (key_method): Rename to ...
1779 (determine_key_method): ... this.
1780 (finish_struct_1): Adjust accordingly.
1781 * cp-tree.h (key_method): Declare.
1782 * decl2.c (maybe_emit_vtables): Determine the key method here if
1783 it has not already been done.
1785 2004-08-31 Ziemowit Laski <zlaski@apple.com>
1787 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-objcp-common.o.
1788 (cp/cp-lang.o): Depend on debug.h, gtype-cp.h and cp/cp-objcp-common.h.
1789 (cp/cp-decl.c): Do not depend on gtype-cp.h.
1790 (cp/cp-objcp-common.o): New target.
1791 * cp-lang.c: Include debug.h, cp-objcp-common.h and gtype-cp.h.
1792 (cxx_get_alias_set, cxx_warn_unused_global_decl, cp_expr_size,
1793 cp_tree_size, cp_var_mod_type_p, cxx_initialize_diagnostics): Move
1794 prototypes and definitions to cp-objcp-common.h and cp-objcp-common.c,
1796 (LANG_HOOKS_TREE_SIZE, LANG_HOOKS_FINISH,
1797 LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_INIT_OPTIONS,
1798 LANG_HOOKS_INITIALIZE_DIAGNOSTICS, LANG_HOOKS_HANDLE_OPTION,
1799 LANG_HOOKS_HANDLE_FILENAME, LANG_HOOKS_MISSING_ARGUMENT,
1800 LANG_HOOKS_POST_OPTIONS, LANG_HOOKS_GET_ALIAS_SET,
1801 LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_EXPAND_EXPR,
1802 LANG_HOOKS_EXPAND_DECL, LANG_HOOKS_PARSE_FILE,
1803 LANG_HOOKS_DUP_LANG_SPECIFIC_DECL, LANG_HOOKS_TRUTHVALUE_CONVERSION,
1804 LANG_HOOKS_SET_DECL_ASSEMBLER_NAME, LANG_HOOKS_MARK_ADDRESSABLE,
1805 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
1806 LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
1807 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_PRINT_ERROR_FUNCTION,
1808 LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL, LANG_HOOKS_WRITE_GLOBALS,
1809 LANG_HOOKS_FUNCTION_INIT, LANG_HOOKS_FUNCTION_FINAL,
1810 LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P,
1811 LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE,
1812 LANG_HOOKS_ATTRIBUTE_TABLE, LANG_HOOKS_TREE_INLINING_WALK_SUBTREES,
1813 LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN,
1814 LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS,
1815 LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P,
1816 LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P,
1817 LANG_HOOKS_TREE_INLINING_VAR_MOD_TYPE_P,
1818 LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN,
1819 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN, LANG_HOOKS_EXPR_SIZE,
1820 LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR,
1821 LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, LANG_HOOKS_MAKE_TYPE,
1822 LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE,
1823 LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
1824 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE, LANG_HOOKS_INCOMPLETE_TYPE_ERROR,
1825 LANG_HOOKS_TYPE_PROMOTES_TO, LANG_HOOKS_REGISTER_BUILTIN_TYPE,
1826 LANG_HOOKS_GIMPLIFY_EXPR, LANG_HOOKS_FOLD_OBJ_TYPE_REF): Move
1827 hooks to cp-objcp-common.h.
1828 (finish_file): New function.
1829 * cp-objcp-common.c: New file.
1830 * cp-objcp-common.h: New file.
1831 * cp-tree.h (cp_finish_file): New prototype.
1832 * decl.c: Do not include gtype-cp.h.
1833 * decl2.c (finish_file): Rename to cp_finish_file.
1835 2004-08-31 Richard Henderson <rth@redhat.com>
1838 * pt.c (tsubst_expr): Move OFFSETOF_EXPR handling ...
1839 (tsubst_copy_and_build): ... here.
1841 2004-08-30 Mark Mitchell <mark@codesourcery.com>
1843 * cp-tree.h (initialize_artificial_var): Declare.
1844 * decl.c (initialize_artifical_var): New function.
1845 * class.c (initialize_array): Remove.
1846 (initialize_vtable): Use initialize_artificial_var.
1847 (build_vtt): Likewise.
1848 (build_ctor_vtbl_group): Likewise.
1850 2004-08-30 Richard Henderson <rth@redhat.com>
1852 * class.c (build_base_path): Use build_address directly.
1853 * typeck.c (build_unary_op): Don't lower &a.b to pointer
1854 arithmetic directly.
1855 * typeck2.c (store_init_value): Don't assume !TREE_CONSTANT
1856 means !initializer_constant_valid_p.
1858 2004-08-30 Richard Henderson <rth@redhat.com>
1860 * class.c (fixed_type_or_null): Use get_base_address before
1861 assuming an ADDR_EXPR is non-null.
1863 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
1865 * name-lookup.c (pop_binding, pushdecl,
1866 set_identifier_type_value_with_scope, push_overloaded_decl,
1867 arg_assoc_type): Replace abort with gcc_assert or gcc_unreachable.
1868 * parser.c (cp_parser_diagnose_invalid_type_name,
1869 cp_parser_postfix_expression, cp_parser_unary_expression,
1870 cp_parser_check_declarator_template_para): Likewise.
1871 * pt.c (push_inline_template_parms_recursive,
1872 check_explicit_specialization, convert_nontype_argument,
1873 coerce_template_template_parms, uses_template_parms,
1874 instantiate_class_template, tsubst_decl, tsubst, tsubst_copy,
1875 tsubst_expr, instantiate_template,
1876 maybe_adjust_types_for_deduction, type_unification_real,
1877 resolve_overloaded_unification, template_decl_level,
1878 type_dependent_expression_p): Likewise.
1879 * search.c (lookup_base_r): Likewise.
1880 * semantics.c (finish_stmt_expr, simplify_aggr_init_expr): Likewise.
1881 * tree.c (lvalue_p_1, count_functions, cxx_printable_name,
1882 verify_stmt_tree_r, get_type_decl, stabilize_call): Likewise.
1883 * typeck.c (common_type, get_member_function_from_ptrfunc,
1884 build_binary_op, build_unary_op, expand_ptrmemfunc_cst): Likewise.
1885 * typeck2.c (cxx_incomplete_type_diagnostic,
1886 split_nonconstant_init_1, store_init_value,
1887 process_init_constructor): Likewise.
1889 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
1891 * call.c (check_dtor_name): Replace abort with gcc_assert or
1893 (build_call, add_builtin_candidate, build_new_op,
1894 convert_like_real, build_over_call, in_charge_arg_for_name,
1895 source_type, joust): Likewise.
1896 * class.c (build_simple_base_path, get_vcall_index,
1897 finish_struct_1, instantiate_type, get_enclosing_class,
1898 add_vcall_offset_vtbl_entries_1, cp_fold_obj_type_ref): Likewise.
1899 * cp-gimplify.c (cp_genericize): Likewise.
1900 * cp-lang.c (cp_expr_size, cp_tree_size): Likewise.
1901 * cvt.c (cp_convert_to_pointer, ocp_convert): Likewise.
1902 * decl.c (poplevel, make_unbound_class_template, reshape_init,
1903 check_special_function_return_type, grokdeclarator,
1904 grok_op_properties, tag_name, xref_tag, start_preparsed_function,
1905 finish_function): Likewise.
1906 * decl2.c (grokfield, maybe_emit_vtables):Likewise.
1907 * error.c (dump_global_iord, dump_decl, dump_template_decl,
1908 language_to_string): Likewise.
1909 * except.c (choose_personality_routine): Likewise.
1910 * friend.c (do_friend): Likewise.
1911 * g++spec.c (lang_specific_driver): Likewise.
1912 * init.c (build_zero_init, expand_default_init, build_new_1,
1913 build_vec_delete_1, build_vec_init, build_dtor_call): Likewise.
1914 * lex.c (retrofit_lang_decl, cp_type_qual_from_rid): Likewise.
1915 * mangle.c (add_substitution, write_unscoped_name,
1916 write_template_prefix, write_identifier,
1917 write_special_name_destructor, write_type, write_builtin_type,
1918 write_expression, write_template_param,
1919 write_java_integer_type_codes): Likewise.
1920 * method.c (implicitly_declare_fn): Likewise.
1922 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
1924 * cp-tree.h (BINFO_PRIMARY_P): Use a binfo flag.
1925 (BINFO_INDIRECT_PRIMARY_P): Remove.
1926 * class.c (determine_primary_base): Rename to ...
1927 (determine_primary_bases): ... here. Set all primary bases.
1928 (set_primary_base): Remove.
1929 (mark_primary_bases): Remove.
1930 (build_simple_base_path, walk_subobject_offsets,
1931 propagate_binfo_offsets, end_of_class): Adjust.
1932 (layout_class_type): Rename determine_primary_base call.
1933 (dump_class_hierarchy_r, dump_vtable): Adjust. Don't pass a binfo
1935 (dfs_build_secondary_vptr_vtt_inits, dfs_accumulate_vtbl_inits,
1936 build_rtti_vtbl_entries): Adjust.
1937 * init.c (build_vtbl_address): Adjust.
1939 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Use gcc_assert.
1941 2004-08-28 Ziemowit Laski <zlaski@apple.com>
1943 * Make-lang.in (CXX_OBJS): Split up into CXX_OBJS and
1944 CXX_AND_OBJCXX_OBJS.
1945 (CXX_C_OBJS): Include in CXX_AND_OBJCXX_OBJS instead of listing
1946 separately on the link line.
1948 2004-08-28 Jason Merrill <jason@redhat.com>
1950 * decl.c (expand_static_init): Avoid bogus warnings.
1952 2004-08-27 Jason Merrill <jason@redhat.com>
1955 * tree.c (stabilize_init): See through a COMPOUND_EXPR.
1958 * decl.c (expand_static_init): Use thread-safety API.
1959 (register_dtor_fn): Return the call, don't expand it.
1960 * tree.c (add_stmt_to_compound): New fn.
1961 (stabilize_call): Use it.
1963 2004-08-27 Richard Henderson <rth@redhat.com>
1965 * cp-tree.def (OFFSETOF_EXPR): New.
1966 * parser.c (cp_parser_builtin_offsetof): Either built an
1967 OFFSETOF_EXPR, or call fold_offsetof immediately.
1968 * pt.c (tsubst_expr): Handle OFFSETOF_EXPR.
1970 2004-08-27 Nathan Sidwell <nathan@codesourcery.com>
1972 * call.c (validate_conversion_obstack): Replace
1973 my_friendly_assert with gcc_assert or gcc_unreachable.
1974 (direct_reference_binding, merge_conversion_sequences,
1975 build_user_type_conversion_1, perform_overload_resolution,
1976 build_op_delete_call, enforce_access, call_builtin_trap,
1977 build_over_call, build_special_member_call, build_new_method_call,
1978 initialize_reference): Likewise.
1979 * class.c (build_base_path, build_primary_vtable, alter_access,
1980 check_bases, update_vtable_entry_for_fn, layout_empty_base,
1981 clone_function_decl, adjust_clone_args,
1982 type_requires_array_cookie, include_empty_classes,
1983 finish_struct_1, resolve_address_of_overloaded_function,
1984 instantiate_type, get_vtbl_decl_for_binfo, build_vtt_inits,
1985 dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
1986 accumulate_vtbl_inits, build_vtbl_initializer,
1987 build_vbase_offset_vtbl_entries, build_rtti_vtbl_entries): Likewise.
1988 * cvt.c (build_up_reference, convert_to_reference): Likewise.
1989 * decl.c (poplevel, duplicate_decls, make_typename_type,
1990 cxx_init_decl_processing, reshape_init, check_initializer,
1991 make_rtl_for_nonlocal_decl, initialize_local_var, cp_finish_decl,
1992 expand_static_init, grokfndecl, grokvardecl, build_ptrmem_type,
1993 grokdeclarator, copy_fn_p, grok_op_properties, xref_tag,
1994 xref_basetypes, start_preparsed_function, save_function_data,
1995 finish_function, finish_method, maybe_register_incomplete_var,
1996 complete_vars): Likewise.
1997 * decl2.c (grok_array_decl, check_member_template,
1998 check_classfn, finish_static_data_member_decl, coerce_new_type,
1999 coerce_delete_type, import_export_class, decl_needed_p,
2000 determine_visibility, import_export_decl, build_cleanup,
2001 start_static_initialization_or_destructi, do_static_destruction,
2002 prune_vars_needing_no_initialization,
2003 build_offset_ref_call_from_tree): Likewise.
2004 * error.c (dump_decl, dump_expr): Likewise.
2005 * init.c (finish_init_stmts, build_zero_init,
2006 expand_virtual_init, expand_default_init, expand_aggr_init_1,
2007 build_offset_ref, build_new_1, build_delete, build_vbase_delete):
2009 * mangle.c (write_method_parms, write_template_args,
2010 write_expression, write_template_arg): Likewise.
2011 * method.c (make_thunk, finish_thunk, use_thunk): Likewise.
2012 * name-lookup.c (pop_binding, begin_scope, leave_scope,
2013 resume_scope, push_using_decl, validate_nonmember_using_decl,
2014 is_ancestor, poplevel_class, set_inherited_value_binding_p,
2015 push_class_level_binding, do_class_using_decl, push_namespace,
2016 pop_namespace, add_using_namespace, ambiguous_decl,
2017 lookup_namespace_name, lookup_type_current_level,
2018 maybe_process_template_type_declaration): Likewise.
2019 * parser.c (cp_lexer_peek_nth_token,
2020 cp_parser_parse_and_diagnose_invalid_typ,
2021 cp_parser_translation_unit, cp_parser_template_id,
2022 cp_parser_lookup_name, cp_parser_late_parsing_for_member): Likewise.
2023 * pt.c (push_access_scope, finish_member_template_decl,
2024 push_inline_template_parms_recursive, add_outermost_template_args,
2025 get_innermost_template_args, begin_explicit_instantiation,
2026 end_explicit_instantiation, retrieve_specialization,
2027 is_specialization_of, is_specialization_of_friend,
2028 register_specialization, check_explicit_specialization,
2029 comp_template_parms, process_template_parm,
2030 process_partial_specialization, convert_nontype_argument,
2031 coerce_template_template_parms, coerce_template_parms,
2032 mangle_class_name_for_template, lookup_template_function,
2033 lookup_template_class, instantiate_class_template, tsubst_decl,
2034 tsubst_function_type, tsubst, tsubst_qualified_id, tsubst_copy,
2035 instantiate_template, fn_type_unification, type_unification_real,
2036 get_template_base, regenerate_decl_from_template,
2037 template_for_substitution, instantiate_decl,
2038 get_mostly_instantiated_function_type, dependent_scope_ref_p,
2039 value_dependent_expression_p, resolve_typename_type): Likewise.
2040 * repo.c (repo_emit_p): Likewise.
2041 * rtti.c (build_headof, get_tinfo_decl, get_pseudo_ti_init,
2042 create_tinfo_types, emit_tinfo_decl): Likewise.
2043 * search.c (lookup_base_r, lookup_base, lookup_field_1,
2044 dfs_access_in_type, build_baselink, lookup_member,
2045 adjust_result_of_qualified_name_lookup, copied_binfo): Likewise.
2046 * semantics.c (perform_or_defer_access_check,
2047 finish_non_static_data_member, finish_stmt_expr_expr,
2048 finish_stmt_expr, finish_call_expr, finish_pseudo_destructor_expr,
2049 finish_template_template_parm, finish_member_declaration,
2050 emit_associated_thunks): Likewise.
2051 * tree.c (build_target_expr_with_type, force_target_expr,
2052 copy_binfo, get_first_fn, cp_tree_equal): Likewise.
2053 * typeck.c (type_after_usual_arithmetic_conversions, comptypes,
2054 cxx_sizeof_or_alignof_type, perform_integral_promotions,
2055 build_class_member_access_expr, finish_class_member_access_expr,
2056 build_ptrmemfunc_access_expr, build_unary_op,
2057 unary_complex_lvalue, cxx_mark_addressable, build_modify_expr,
2058 build_ptrmemfunc, expand_ptrmemfunc_cst, check_return_expr
2059 * typeck2.c (complete_type_check_abstract,
2060 abstract_virtuals_error, process_init_constructor,
2061 add_exception_specifier): Likewise.
2063 2004-08-27 Nathan Sidwell <nathan@codesourcery.com>
2065 * class.c (build_vtbl_initializer): Use ssize_int.
2066 * decl.c (complete_array_type): Likewise.
2067 * method.c (finish_thunk): Likewise.
2068 * search.c (get_dynamic_base_type): Likewise.
2070 2004-08-26 Richard Henderson <rth@redhat.com>
2072 * cp-tree.h (DECL_FIELD_IS_BASE): New.
2073 * class.c (build_base_field): Set it.
2074 (build_simple_base_path): Use it.
2075 (fixed_type_or_null): Don't consider base fields definitive.
2077 2004-08-25 Roger Sayle <roger@eyesopen.com>
2080 PR tree-optimization/16372
2081 * decl.c (finish_enum): Make the precision of the enumerated type
2082 the same width as the underlying integer type.
2084 2004-08-25 Mark Mitchell <mark@codesourcery.com>
2087 * lex.c (build_lang_decl): Set DECL_NO_STATIC_CHAIN for all C++
2090 * mangle.c (get_identifier_nocopy): Add cast.
2092 * cp-tree.h (mangle_type): Remove.
2093 * mangle.c (globals): GTY it.
2094 (mangle_obstack): New variable.
2095 (name_obstack): Likewise.
2096 (name_base): Likewise.
2097 (write_char): Adjust accordingly.
2098 (write_chars): Likewise.
2099 (write_string): Likewise.
2100 (start_mangling): Initialize G.substitutions only one. Add
2102 (finish_mangling): Use VARRAY_CLEAR to reclaim
2103 storage in G.substitutions. Use obstack_finish.
2104 (init_mangle): Adjust for changes to variable names above.
2105 Initialize G.substitutions.
2106 (mangle_decl_string): Adjust call to start_mangling.
2107 (get_identifier_nocopy): New function.
2108 (mangle_decl): Use it.
2109 (mangle_type_string): Adjust call to start_mangling.
2110 (mangle_special_for_type): Likewise.
2111 (mangle_vtt_for_type): Likewise.
2112 (mangle_ctor_vtbl_for_type): Likewise.
2113 (mangle_thunk): Likewise.
2114 (mangle_guard_variable): Likewise.
2115 (mangle_ref_init_variable): Likewise.
2117 2004-08-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2120 * pt.c (redeclare_class_template): Check the type of non-type and
2121 template template parameter.
2123 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
2125 * call.c (convert_class_to_reference): Adjust build_int_cst calls.
2126 (build_user_type_conversion_1, convert_like_real,
2127 build_java_interface_fn_ref, build_special_member_call): Likewise.
2128 * class.c (finish_struct_1, build_vtbl_initializer): Likewise.
2129 * cp-gimplify.c (cp_gimplify_expr): Likewise.
2130 * cvt.c (cp_convert_to_pointer): Likewise.
2131 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
2132 * decl2.c (start_static_initialization_or_destruction,
2133 generate_ctor_or_dtor_function): Likewise.
2134 * except.c (build_throw): Likewise.
2135 * mangle.c (write_integer_cst): Likewise.
2136 * method.c (finish_thunk): Likewise.
2137 * rtti.c (build_headof, get_tinfo_decl_dynamic,
2138 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
2139 get_pseudo_ti_init): Likewise.
2140 * search.c (get_dynamic_cast_base_type): Likewise.
2142 2004-08-25 Zack Weinberg <zack@codesourcery.com>
2144 * class.c, search.c: Remove references to DWARF_DEBUG.
2146 2004-08-25 Adam Nemet <anemet@lnxw.com>
2148 * repo.c (extract_string): Reset backquote after one character.
2149 (get_base_filename): Fix indentation.
2151 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
2153 * decl.c (cxx_init_decl_processing): Adjust
2154 build_common_tree_nodes call.
2156 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
2159 * (is_subobject_of_p): Resurrect & optimize.
2160 (lookup_field_r): Use it.
2162 2004-08-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2165 * search.c (friend_accessible_p): Increment processing_template_decl
2166 when deal with TEMPLATE_DECL of SCOPE.
2168 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
2171 * semantics.c (check_accessibility_of_qualified_id): Defer check
2172 if qualifying_type is a template parameter.
2174 2004-08-23 Mark Mitchell <mark@codesourcery.com>
2177 * pt.c (instantiate_decl): Do not try to apply
2178 DECL_DECLARED_INLINED_P to a VAR_DECL.
2180 * search.c (build_baselink): Fix typo in comment.
2182 2004-08-22 Andrew Pinski <apinski@apple.com>
2185 2004-08-22 Andrew Pinski <apinski@apple.com>
2187 * typeck.c (build_unary_op): Use &a.b if the folded lowered
2188 expression is not constant.
2190 2004-08-23 Nathan Sidwell <nathan@codesourcery.com>
2192 * name-lookup.c (pushdecl): Rename build_type_copy call.
2193 * tree.c (cp_build_qualified_type_real,
2194 build_exception_variant, handle_java_interface_attribute): Likewise.
2196 2004-08-22 Andrew Pinski <apinski@apple.com>
2199 * typeck.c (build_unary_op): Use &a.b if the folded lowered
2200 expression is not constant.
2202 2004-08-20 Mark Mitchell <mark@codesourcery.com>
2205 * decl.c (expand_static_init): Use DECL_FUNCTION_SCOPE_P.
2207 2004-08-21 Joseph S. Myers <jsm@polyomino.org.uk>
2210 * pt.c (tsubst_copy_and_build): Avoid clearing TREE_NO_WARNING for
2213 2004-08-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2215 * pt.c (register_specialization): Check DECL_TEMPLATE_SPECIALIZATION
2216 before calling comp_template_args.
2218 2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
2220 * class.c (build_vtbl_initializer): Use build_int_cst for
2221 negative size types.
2222 * decl.c (complete_array_type): Likewise.
2223 * method.c (finish_thunk): Likewise.
2225 2004-08-20 Andreas Tobler <a.tobler@schweiz.ch>
2227 * tree.c: Remove unused mark_local_for_remap_r.
2229 2004-08-19 Eric Christopher <echristo@redhat.com>
2231 * cp-tree.h (cxx_unsave_expr_now): Delete prototype.
2232 * tree.c (cxx_unsave_expr_now): Delete.
2233 (cp_unsave_r): Ditto.
2235 2004-08-19 Mark Mitchell <mark@codesourcery.com>
2238 * pt.c (push_template_decl_real): Disallow template allocation
2239 functions with fewer than two parameters.
2241 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
2243 * cp-tree.h (build_shared_int_cst): Remove.
2244 * tree.c (shared_int_cache): Remove.
2245 (build_shared_int_cst): Remove.
2246 * class.c (finish_struct_1): Use build_int_cst.
2248 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
2250 * decl.c (finish_enum): Do not copy value node early, copy
2252 * lex.c (cxx_init): Force null_node to be unique.
2254 2004-08-19 Joseph S. Myers <jsm@polyomino.org.uk>
2257 * pt.c (tsubst_copy, tsubst_copy_and_build): Copy TREE_NO_WARNING
2258 from input for MODOP_EXPR.
2260 2004-08-18 Mark Mitchell <mark@codesourcery.com>
2262 * pt.c (dependent_template_p): Fix typo in commment.
2265 * pt.c (dependent_template_p): Treat IDENTIFIER_NODEs as
2268 2004-08-17 Mark Mitchell <mark@codesourcery.com>
2271 * pt.c (unify): Tidy ARRAY_TYPE handling. Make sure that non-type
2272 arguments have the same type as the corresponding parameter.
2275 * parser.c (cp_parser_name_lookup_error): If parser->object_scope
2276 is set use it for diagnostic purposes.
2277 (cp_parser_pseudo_destructor_name): Remove special-case error
2281 * semantics.c (expand_or_defer_fn): Honor -fkeep-inline-functions.
2284 * cp-tree.h (qualified_name_lookup_error): Add parameter.
2285 * name-lookup.c (do_class_using_decl): Restrict set of entities
2286 passed to cp_emit_debug_info_for_using more carefully.
2287 (lookup_qualified_name): Allow lookup_member to return sets of
2289 * parser.c (cp_parser_lookup_name): Add ambiguous_p parameter.
2290 (cp_parser_primary_expression): Handle ambiguous lookups.
2291 (cp_parser_template_name): Adjust use of cp_parser_lookup_name.
2292 (cp_parser_template_argument): Likewise.
2293 (cp_parser_elaborate_type_specifier): Likewise.
2294 (cp_parser_namespace_name): Likewise.
2295 (cp_parser_class_name): Likewise.
2296 (cp_parser_lookup_name_simple): Likewise.
2297 * pt.c (tsubst_qualified_id): Handle ambiguous results.
2298 (tsubst_expr): Likewise.
2299 * semantics.c (qualified_name_lookup_error): Add decl paramter.
2300 For ambiguous lookups, print candidates.
2302 2004-08-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2305 * pt.c (instantiate_pending_templates): Add int parameter. Don't
2307 * cp-tree.h (instantiate_pending_templates): Adjust prototype.
2308 * decl2.c (finish_file): Adjust call to
2309 instantiate_pending_templates.
2311 2004-08-15 Roger Sayle <roger@eyesopen.com>
2313 * call.c (build_vfield_ref, build_call, build_conditional_expr,
2314 convert_arg_to_ellipsis, build_x_va_arg, build_over_call,
2315 build_java_interface_fn_ref, build_special_member_call,
2316 build_new_method_call, initialize_reference): Replace calls to
2317 build with calls to buildN.
2318 * class.c (build_base_path, convert_to_base_statically,
2319 build_vfn_ref, instantiate_type, dfs_accumulate_vtbl_inits,
2320 build_vtbl_initializer): Likewise.
2321 * cp-gimplify.c (genericize_try_block, genericize_catch_block,
2322 gimplify_if_stmt, cp_genericize_r): Likewise.
2323 * cvt.c (convert_to_void): Likewise.
2324 * decl.c (check_initializer, finish_constructor_body,
2325 finish_destructor_body): Likewise.
2326 * error.c (dump_expr): Likewise.
2327 * except.c (build_exc_ptr, expand_start_catch_block, build_throw):
2329 * init.c (perform_member_init, expand_virtual_init,
2330 expand_cleanup_for_base, build_init, expand_default_init,
2331 build_offset_ref, decl_constant_value, build_new, build_new_1,
2332 build_vec_delete_1, build_vec_init, build_delete,
2333 push_base_cleanups, build_vec_delete): Likewise.
2334 * mangle.c (write_integer_cst): Likewise.
2335 * method.c (thunk_adjust, do_build_copy_constructor,
2336 do_build_assign_ref): Likewise.
2337 * pt.c (lookup_template_function, tsubst, tsubst_copy_and_build,
2338 unify, build_non_dependent_expr): Likewise.
2339 * rtti.c (build_headof, build_typeid, ifnonnull,
2340 build_dyanmic_cast_1, tinfo_base_init): Likewise.
2341 * semantics.c (begin_compound_stmt, finish_call_expr,
2342 finish_pseudo_destructor_expr, finish_id_expression,
2343 simplify_aggr_init_expr, finalize_nrv_r): Likewise.
2344 * tree.c (build_target_expr, build_cplus_new, array_type_nelts_top,
2345 array_type_nelts_total, stabilize_call): Likewise.
2346 * typeck.c (decay_conversion, build_class_member_access_expr,
2347 lookup_destructor, build_ptrmemfunc_access_expr, build_array_ref,
2348 get_member_function_from_ptrfunc, build_binary_op, pointer_diff,
2349 build_x_unary_op, build_unary_op, unary_complex_lvalue,
2350 build_compound_expr, build_modify_expr, expand_ptrmemfunc_cst,
2351 check_return_expr): Likewise.
2352 * typeck2.c (split_nonconstant_1, split_nonconstant_init_1,
2353 split_nonconstant_init, store_init_value, build_m_component_ref):
2356 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
2358 * call.c (convert_class_to_reference,
2359 build_user_type_conversion_1, convert_like_real,
2360 build_java_interface_fn_ref, build_special_member_call): Use
2362 * class.c (build_vtbl_initializer): Likewise.
2363 * cp-gimplify.c (cp_gimplify_expr): Likewise.
2364 * cvt.c (cp_convert_to_pointer): Likewise.
2365 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
2366 * decl2.c (start_static_initialization_or_destruction,
2367 generate_ctor_or_dtor_function): Likewise.
2368 * except.c (build_throw): Likewise.
2369 * lex.c (cxx_init): Likewise.
2370 * mangle.c (write_integer_cst): Likewise.
2371 * rtti.c (build_headof, get_tinfo_decl_dynamic,
2372 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
2373 get_pseudo_ti_init): Likewise.
2374 * search.c (get_dynamic_cast_base_type): Likewise.
2375 * tree.c (build_shared_int_cst): Likewise.
2377 2004-08-12 Mark Mitchell <mark@codesourcery.com>
2380 * class.c (count_depth_data): New type.
2381 (dfs_depth_post): New function.
2382 (dfs_depth_q): Likewise.
2383 (find_final_overrider_data_s): Change type of vpath.
2385 (dfs_find_final_overrider_1): New function.
2386 (dfs_find_final_overrider): Use it.
2387 (dfs_find_final_overrider_q): Adjust use of vpath.
2388 (dfs_find_final_overrider_post): Likewise.
2389 (find_final_overrider): Use dfs_depth. Allocate and deallocate
2392 2004-08-12 Jan Beulich <jbeulich@novell.com>
2394 * parser.c (cp_parser_asm_definition): Properly consume scope operator
2395 tokens preceding the clobbers. Don't check for scope operator
2396 following inputs. Simplify inputs handling to match that now used for
2399 2004-08-11 Mark Mitchell <mark@codesourcery.com>
2402 * except.c (build_throw): Allocate cleanup_type and the function
2403 for __cxa_throw separately.
2406 * call.c (standard_conversion): Do not accept conversions between
2407 pointers to members if the class types are unrelated.
2410 * parser.c (cp_parser_builtin_offsetof): Cast to "const volatile
2411 char &" instead of just "char &".
2414 * pt.c (tsubst): Just return the unknown_type_node.
2416 2004-08-11 Mark Mitchell <mark@codesourcery.com>
2419 * parser.c (cp_parser_class_specifier): Robustify.
2422 * pt.c (tsubst_copy_and_build): Complain about invalid
2426 * pt.c (tsubst_default_argument): Clear out current_class_ptr and
2427 current_class_ref while tsubsting.
2429 2004-08-10 Mark Mitchell <mark@codesourcery.com>
2432 * parser.c (cp_parser_init_declarator): Robustify.
2434 2004-08-06 Richard Sandiford <rsandifo@redhat.com>
2436 * typeck2.c (process_init_constructor): Guard the missing field warning
2437 with warn_missing_field_initializers rather than extra_warnings.
2439 2004-08-06 Paolo Bonzini <bonzini@gnu.org>
2441 * class.c (instantiate_type) <ENTRY_VALUE_EXPR>: Do not handle.
2443 2004-08-05 Mark Mitchell <mark@codesourcery.com>
2445 * decl.c (start_preparsed_function): Move determine_visibility
2447 * decl2.c (determine_visibility): Incorporate dllexport testing.
2449 2004-08-05 Geoffrey Keating <geoffk@apple.com>
2451 * g++spec.c (lang_specific_driver): An -Xlinker or -Wl, option
2452 means that libstdc++ is needed.
2454 2004-08-05 Nathan Sidwell <nathan@codesourcery.com>
2456 * cvt.c (cp_convert_to_pointer): Adjust force_fit_type call.
2458 2004-08-04 Geoffrey Keating <geoffk@apple.com>
2460 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_ASSEMBLER_NAME rather
2461 than passing it as a parameter to rest_of_decl_compilation.
2462 * decl2.c (grokfield): Use set_user_assembler_name.
2464 2004-08-04 Nathan Sidwell <nathan@codesourcery.com>
2466 * decl.c (complete_array_type): Don't gratuitously copy
2467 maxindex. Its type is always set.
2469 2004-08-04 Paul Brook <paul@codesourcery.com>
2471 * Make-lang.in (cp/semantics.o, cp/optimize.o): Depend on TARGET_H.
2472 * cp-tree.h (struct language_function): Rename x_dtor_label to
2474 (dtor_label): Rename ...
2475 (cdtor_label): ... to this.
2476 * decl.c (begin_constructor_body): Remove.
2477 (check_special_function_return_type): Maybe change the return type.
2478 (grokdeclarator): Pass the class type.
2479 (start_preparsed_function): Constructors may need a return label.
2480 (finish_constructor_body, finish_destructor_body): Set the return
2482 (begin_function_body): Don't call begin_constructor_body.
2483 (finish_function): Don't warn for constructors or destructors.
2484 (implicitly_declare_fn): Maybe change the return type.
2485 * optimize.c: Include target.h.
2486 (maybe_clone_body): Remap the function result.
2487 * semantics.c: Include target.h.
2488 (finish_return_stmt): Maybe jump to return label for constructors.
2490 2004-08-03 Mark Mitchell <mark@codesourcery.com>
2492 * class.c (build_vtable): Do not set DECL_VISIBILITY here.
2493 (check_field_decls): Or here.
2494 (check_methods): Or here.
2495 (initialize_array): Don't mess with DECL_CONTEXT.
2496 * cp-tree.h (start_decl): Adjust prototype.
2497 (determine_visibility): New function.
2498 * decl.c (duplicate_decls): Remove checks for hidden "operator
2500 (build_library_fn_1): Give all library functions default
2502 (start_decl): Add pop_scope_p parameter. Tidy.
2503 (cp_finish_decl): Do not pop scopes here. Call
2504 determine_visibility for variable definitions.
2505 (start_preparsed_function): Call determine_visibility.
2506 * decl2.c (determine_visibility): New function.
2507 * method.c (use_thunk): Fix formatting.
2508 * parser.c (cp_parser_condition): Adjust calls to start_decl.
2509 (cp_parser_init_declarator): Likewise.
2510 * pt.c (instantiate_decl): Always call pop_nested_class.
2511 * rtti.c (get_tinfo_decl): Do not set DECL_VISIBILITY.
2512 (tinfo_base_init): Likewise.
2514 2004-08-02 Mark Mitchell <mark@codesourcery.com>
2517 * name-lookup.c (validate_nonmember_using_decl): Robustify.
2519 2004-08-01 Mark Mitchell <mark@codesourcery.com>
2522 * name-lookup.c (decl_namespace): Remove.
2523 (current_decl_namespace): Use decl_namespace_context instead of
2525 (push_decl_namespace): Likewise.
2526 (arg_assoc_class): Likewise.
2527 (arg_assoc_type): Likewise.
2528 * pt.c (check_specialization_namespace): New function.
2529 (maybe_process_partial_specialization): Use it.
2530 (register_specialization): Likewise.
2533 * cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): New macro.
2534 * call.c (null_ptr_cst_p): Handle variables with constant
2536 * pt.c (convert_nontype_argument): Use
2537 DECL_INTEGRAL_CONSTANT_VAR_P.
2538 * semantics.c (finish_id_expression): Likewise.
2541 * decl.c (duplicate_decls): Reject duplicate namespace
2545 * typeck.c (build_ptrmemfunc): Loosen assertion.
2547 2004-08-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
2549 * call.c (z_candidate::template_decl): Rename from template.
2550 (add_template_candidate_real): Adjust member reference.
2553 2004-07-29 Mark Mitchell <mark@codesourcery.com>
2555 * cp-tree.h (IDENTIFIER_REPO_CHOSEN): Define.
2556 (lang_decl_flags): Narrow the width of "languages". Add
2558 (DECL_NEEDED_P): Remove.
2559 (FOR_EACH_CLONE): New macro.
2560 (DECL_REPO_AVAILABLE_P): Likewise.
2561 (DECL_TINFO_P): Likewise.
2562 (set_linkage_according_to_type): Declare.
2563 (import_export_vtable): Remove.
2564 (import_export_tinfo): Likewise.
2565 (mark_needed): New function.
2566 (decl_needed_p): Likewise.
2567 (note_vauge_linkage_fn): Likewise.
2568 (init_repo): Change prototype.
2569 (repo_template_used): Remove.
2570 (repo_template_instantiated): Likewise.
2571 (repo_emit_p): New function.
2572 (repo_export_class_p): Likewise.
2573 (no_linkage_check): Change prototype.
2574 * class.c (set_linkage_according_to_type): New function.
2575 (build_vtable): Use it. Do not call import_export_vtable. Set
2576 DECL_IGNORED_P if appropriate.
2577 * decl.c (duplicate_decls): Preserve DECL_REPO_AVAILABLE_P.
2578 (make_rtL_for_nonlocal_decls): Check for template instantiations
2580 (grokfndecl): Adjust call to no_linkage_check.
2581 (set_linkage_for_static_data_member): New function.
2582 (grokvardecl): Use it. Adjust call to no_linkage_check.
2583 (grokdeclarator): Use set_linkage_for_static_data_member.
2584 * decl2.c (note_vague_linkage_fn): New function.
2585 (note_vague_linkage_var): Likewise.
2586 (finish_static_data_member_decl): Use it.
2587 (import_export_vtable): Remove.
2588 (import_export_class): Use repo_export_class_p.
2589 (var_finalized_p): Simplify.
2590 (maybe_emit_vtables): Simplify.
2591 (mark_needed): New function.
2592 (decl_needed_p): Likewise.
2593 (import_export_decl): Add documentation and consistency checks.
2594 Use repo_emit_p. Handle virtual tables and RTTI information
2596 (import_export_tinfo): Remove.
2597 (write_out_vars): Call import_export_decl.
2598 (cxx_callgraph_analyze_expr): Ensure that all vtables are emitted
2600 (finish_file): Use decl_needed_p. Do not call import_export_decl
2601 for undefined static data members. Do not warn about undefined
2602 inlines when using a repository.
2603 (mark_used): Use note_vague_linkage_fn. Always defer template
2605 * lex.c (cxx_init): Adjust call to init_repo. Always set
2606 flag_unit_at_a-time.
2607 * method.c (synthesize_method): Remove unncessary
2608 import_export_decl call.
2609 (implicitly_declare_fn): Use set_linkage_according_to_type.
2610 * optimize.c (maybe_clone_body): Use FOR_EACH_CLONE.
2611 * pt.c (instantiate_class_template): Don't redundantly add classes
2612 to keyed_classes. Don't call repo_template_used.
2613 (tsubst_decl): Set DECL_INTERFACE_KNOWN for instantiations of
2614 templates with internal linkage.
2615 (check_instantiated_args): Adjust call to no_linkage_check.
2616 (instantiate_template): Use FOR_EACH_CLONE.
2617 (mark_definable): New function.
2618 (mark_decl_instantiated): Use it.
2619 (do_decl_instantiation): Adjust tests for explicit instantiation
2620 after "extern template".
2621 (instantiate_class_member): Do not use repo_template_instantiated.
2622 (do_type_instantiation): Simplify.
2623 (instantiate_decl): Use mark_definable. Check repo_emit_p.
2625 * repo.c (repo_get_id): Remove.
2626 (original_repo): Remove.
2627 (IDENTIFIER_REPO_USED): Remove.
2628 (IDENTIFIER_REPO_CHOSEN): Remove.
2629 Remove all #if 0'd code.
2630 (repo_template_used): Remove.
2631 (repo_template_instantiated): Remove.
2632 (temporary_obstack_initialized_p): New variable.
2633 (init_repo): Register with lang_post_pch_load. Avoid creating
2634 identifiers unnecessarily. Don't use original_repo. Close the
2636 (reopen_repo_file_for_write): Not here.
2637 (finish_repo): Always write out a new repository file.
2638 (repo_emit_p): New function.
2639 (repo_export_class_p): Likewise.
2640 * rtti.c (get_tinfo_decl): Use set_linkage_according_to_type.
2641 (involves_incomplete_p): New function.
2642 (tinfo_base_init): Use it.
2643 (ptr_initializer): Remove non_public_ptr parameter.
2644 (ptm_initializer): Likewise.
2645 (get_pseudo_ti_init): Likewise.
2646 (unemitted_tinfo_decl_p): Remove.
2647 (emit_tinfo_decl): Use import_export_decl.
2648 * semantics.c (expand_body): Move updates of static_ctors and
2650 (expand_or_defer_fn): ... here.
2651 * tree.c (no_linkage_check): Add relaxed_p parameter.
2653 2004-07-28 Eric Christopher <echristo@redhat.com>
2655 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
2657 2004-07-28 Nathan Sidwell <nathan@codesourcery.com>
2659 * cp-tree.h (struct tree_pair_s): New.
2660 (typedef tree_pair_p): New.
2661 (DEF_VEC_O(tree_pair_s)): New.
2662 (struct lang_type_class): Make vcall_indices a VEC(tree_pair_s).
2663 (CLASSTYPE_VCALL_INDICES): Update documentation.
2664 * class.c (get_vcall_index): Adjust.
2665 (add_vcall_offset): Adjust.
2667 2004-07-27 Kelley Cook <kcook@gcc.gnu.org>
2669 * pt.c, typeck.c: Remove spurious carriage returns.
2671 2004-07-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2674 * pt.c (coerce_template_template_parms) <PARM_DECL case>: Only check
2675 when the type of ARG is not dependent.
2677 2004-07-26 Geoffrey Keating <geoffk@apple.com>
2679 * g++spec.c (LIBSTDCXX_PROFILE): Default to LIBSTDCXX.
2680 (lang_specific_driver): If the C++ or math library options don't
2681 start with '-l', don't count them as added libraries.
2683 2004-07-26 Nathan Sidwell <nathan@codesourcery.com>
2685 * decl.c (xref_basetypes): Adjust base access vector creation.
2686 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Adjust base
2688 * search.c (dynamic_cast_base_recurse, dfs_access_in_type): Likewise.
2690 2004-07-26 Niall Douglas <s_fsfeurope2@nedprod.com>
2691 Brian Ryner <bryner@brianryner.com>
2695 * class.c (check_field_decls): Apply hidden visibility if
2696 -fvisibility-inlines-hidden and inlined unless otherwise specified
2697 (build_vtable): Set vtable visibility to class visibility.
2698 (check_field_decls): Default static member visibility to class
2700 (check_methods): Default method visibility to class visibility.
2701 * cp-tree.h: Added CLASSTYPE_VISIBILITY and
2702 CLASSTYPE_VISIBILITY_SPECIFIED macro.
2703 * decl.c (duplicate_decls): New logic for merging definition decls
2704 with declaration decls. Added ignore & warning when non default
2705 applied to global operator new or delete.
2706 * method.c, optimize.c, rtti.c: Added setting of VISIBILITY_SPECIFIED
2707 wherever VISIBILITY was changed
2708 * rtti.c (get_tinfo_decl): Set typeinfo visibility to class
2710 (tinfo_base_init): Set typeinfo name visibility to class visibility.
2712 2004-07-25 Bernardo Innocenti <bernie@develer.com>
2714 * decl.c: Rename all identifiers named `class' to `cl'.
2715 * cp-tree.h: Likewise.
2717 2004-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
2719 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Use GGC_CNEW.
2720 * typeck2.c (abstract_virtuals_error): Use GGC_NEW.
2721 * name-lookup.c (binding_entry_make): Use GGC_NEW.
2722 (binding_table_construct): Use GGC_CNEWVEC.
2723 (binding_table_new): Use GGC_NEW.
2724 (cxx_binding_make): Likewise.
2725 (begin_scope): Likewise.
2726 (push_to_top_level): Use GCC_CNEW.
2727 * parser.c (cp_token_cache_new): Likewise.
2728 (cp_token_cache_push_token): Likewise.
2729 (cp_lexer_new_main): Likewise.
2730 (cp_lexer_new_from_tokens): Likewise.
2731 (cp_parser_context_new): Likewise.
2732 (cp_parser_new): Likewise.
2733 (cp_lexer_new_from_tokens): Use GGC_NEWVEC.
2734 * lex.c (cxx_make_type): Use GGC_CNEW.
2735 (retrofit_lang_decl): Use GGC_NEWVAR.
2736 (cxx_dup_lang_specific_decl): Likewise.
2737 (copy_lang_type): Likewise.
2738 * decl.c (use_label): Use GGC_NEW instead of ggc_alloc.
2739 (save_function_data): Likewise.
2740 (lookup_label): Use GGC_CNEW instead of ggc_alloc_cleared.
2741 (cxx_push_function_context): Likewise.
2743 2004-07-25 Richard Henderson <rth@redhat.com>
2745 * decl.c (start_preparsed_function): Set DECL_ARTIFICIAL and
2746 DECL_IGNORED_P on RESULT_DECL.
2747 * semantics.c (finalize_nrv): Copy them too.
2749 2004-07-23 Nathan Sidwell <nathan@codesourcery.com>
2751 * search.c (lookup_conversion_operator): Avoid two loops.
2752 (add_conversions): Remove.
2753 (check_hidden_convs, split_conversions,
2754 lookup_conversions_r): New.
2755 (lookup_conversions): Use lookup_conversions_r.
2757 2004-07-22 Nathan Sidwell <nathan@codesourcery.com>
2759 * pt.c (get_template_base): Check type is completable.
2761 2004-07-21 Eric Christopher <echristo@redhat.com>
2763 * decl.c (poplevel): Inline unused variable checking.
2766 2004-07-21 Paolo Bonzini <bonzini@gnu.org>
2768 * typeck.c (build_binary_op): Do not use RDIV_EXPR for
2771 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2774 * pt.c (check_explicit_specialization): Remove extension to accept
2775 specializations without template headers. Fall-through to normal
2778 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2781 * pt.c (determine_specialization): New parameter template_count.
2782 Disambiguate between member templates and member functions counting
2783 the template headers.
2784 (check_explicit_specialization): Update caller.
2785 (tsubst_friend_function): Likewise.
2787 2004-07-20 Steven Bosscher <stevenb@suse.de>
2789 * cp-tree.def (TINST_LEVEL): Make it an 'x' node.
2790 * cp-tree.h (tinst_level_t): New tree type.
2791 (union lang_tree_node): Handle it.
2792 (TINST_LOCATION): New accessor macro.
2793 (make_tinst_level): New prototype.
2794 * cp-lang.c (cp_tree_size): Handle TINST_LEVEL.
2795 * decl.c (cp_tree_node_structure): Likewise.
2796 * error.c (print_instantiation_full_context): Use TINST_LOCATION.
2797 (print_instantiation_partial_context): Likewise.
2798 * pt.c (pop_tinst_level): Likewise.
2799 (push_tinst_level): Use make_tinst_level.
2800 * tree.c (make_tinst_level): New function.
2801 (cp_walk_subtrees): Walk TINST_DECL for a TINST_LEVEL node.
2803 2004-07-20 Mark Mitchell <mark@codesourcery.com>
2805 * parser.c (cp_parser_simple_type_specifier): Fix typo.
2808 * parser.c (cp_parser_simple_type_specifier): Do not record usage
2809 of globally-qualified names.
2811 2004-07-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2814 * error.c (dump_type) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Output
2817 2004-07-19 Mark Mitchell <mark@codesourcery.com>
2820 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
2821 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
2822 * class.c (add_implicitly_declared_members): Use
2823 CLASSTYPE_LAZY_ASSIGNMENT_OP.
2824 * method.c (lazily_declare_fn): Clear
2825 CLASSTYPE_LAZY_ASSIGNMENT_OP.
2826 * search.c (lookup_fnfields_1): Check it.
2828 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
2830 * cp-tree.h (vec_binfo_member): Remove.
2831 * tree.c (vec_binfo_member): Remove.
2833 * cp-tree.h (struct lang_type_class): Remove vfields field.
2834 (CLASSTYPE_VFIELDS): Remove.
2835 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
2836 * class.c (determine_primary_base): Remove CLASSTYPE_VFIELDS
2838 (dfs_modify_vtables): Use TYPE_CONTAINS_VPTR_P.
2839 (finish_struct_1): Remove CLASSTYPE_VFIELDS handling.
2840 * init.c (dfs_initialize_vtbl_ptrs): Use TYPE_CONTAINS_VPTR_P.
2842 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
2844 * cp-tree.h (DEF_VEC_P(tree)): Remove here.
2845 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
2847 (BINFO_LANG_SLOTS): Remove.
2848 * tree.c (copy_binfo): Adjust BINFO creation and accessors.
2849 * decl.c (xref_basetypes): Adjust BINFO creation and accessors.
2850 * class.c (check_bases): Adjust BINFO accessors.
2851 (determine_primary_base, finish_struct_bits,
2852 maybe_warn_about_overly_private_class, warn_hidden,
2853 walk_subobject_offsets, propagate_binfo_offsets, end_of_class,
2854 warn_about_ambiguous_bases, get_vfield_name,
2855 dump_class_hierarchy_r, build_vtt_inits, accumulate_vtbl_inits,
2856 add_vcall_offset_vtbl_entries_r): Likewise.
2857 * dump.c (cp_dump_tree): Likewise.
2858 * init.c (sort_mem_initializers, expand_member_init, build_delete,
2859 push_base_cleanups): Likewise.
2860 * method.c (do_build_copy_constructor, do_build_assign_ref,
2861 synthesize_exception_spec): Likewise.
2862 name-lookup.c (arg_assoc_class): Likewise.
2863 * pt.c (instantiate_class_template,
2864 get_template_base_recursive): Likewise.
2865 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Likewise.
2866 * typeck2.c (process_init_constructor): Likewise.
2867 * search.c (lookup_base_r, dynamic_cast_base_recurse,
2868 dfs_access_in_type, dfs_walk_real, look_for_overrides,
2869 types_overlap_p, copied_binfo, original_binfo): Likewise.
2870 (binfo_for_vtable): Remove
2872 2004-07-20 Steven Bosscher <stevenb@suse.de>
2874 * cp-tree.h (struct lang_decl_flags): Unify the template_info and
2875 thunk_alias, and the access and virtual_offset fields.
2876 (THUNK_VIRTUAL_OFFSET, THUNK_ALIAS): Adjust.
2877 * decl.c (finish_case_label): Update c_add_case_node call.
2879 2004-07-19 Mark Mitchell <mark@codesourcery.com>
2881 Revert patch for PR c++/16623.
2883 2004-07-19 Kelley Cook <kcook@gcc.gnu.org>
2885 * except.c: Remove two spurious carriage returns.
2887 2004-07-19 Mark Mitchell <mark@codesourcery.com>
2890 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
2891 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
2892 * class.c (add_implicitly_declared_members): Use
2893 CLASSTYPE_LAZY_ASSIGNMENT_OP.
2894 * method.c (lazily_declare_fn): Clear
2895 CLASSTYPE_LAZY_ASSIGNMENT_OP.
2896 * search.c (lookup_fnfields_1): Check it.
2898 2004-07-19 Nathan Sidwell <nathan@codesourcery.com>
2900 * class.c (add_method): Delay adding the slot until the end.
2901 (determine_primary_base): Adjust VEC_iterate invokation.
2902 (resort_type_method_vec, finish_struct_methods, warn_hidden,
2903 walk_subobject_offsets, end_of_class, warn_about_ambiguous_bases,
2904 build_vtbl_initializer): Likewise.
2905 * init.c (sort_mem_initializers, build_delete, push_base_cleanups,
2906 build_vbase_delete): Likewise.
2907 * method.c (do_build_copy_constructor): Likewise.
2908 * name-lookup.c (new_class_binding, print_binding_level,
2909 poplevel_class, store_class_bindings, push_to_top_level,
2910 pop_from_top_level): Likewise.
2911 * pt.c (check_explicit_specialization): Likewise.
2912 * search.c (lookup_conversion_operator, lookup_fnfields_1,
2913 get_pure_virtuals, add_conversions, dfs_check_overlap,
2914 binfo_for_vbase): Likewise.
2916 2004-07-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2919 * pt.c (unify) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Use only
2920 innermost set of template arguments during deduction. Simplify.
2922 2004-07-19 Joseph S. Myers <jsm@polyomino.org.uk>
2924 * typeck.c (build_modify_expr, build_x_modify_expr): Set
2925 TREE_NO_WARNING on assignments with an operator other than '='.
2927 2004-07-10 Steven Bosscher <stevenb@suse.de>
2928 Joseph S. Myers <jsm@polyomino.org.uk>
2930 * cp-tree.h (C_SET_EXP_ORIGINAL_CODE): Remove.
2931 * decl2.c (grokfield): Don't check current_class_depth via
2932 unused TREE_COMPLEXITY.
2933 * semantics.c (finish_parenthesized_expr): Set TREE_NO_WARNING
2934 to avoid the missing parentheses warning.
2935 Don't set C_SET_EXP_ORIGINAL_CODE.
2937 2004-07-18 Mark Mitchell <mark@codesourcery.com>
2939 * tree.c (no_linkage_helper): Remove.
2940 (no_linkage_check): Don't use walk_tree_without_duplicates.
2942 * mangle.c (write_expression): Issue a sorry for zero-operand
2945 2004-07-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2948 * init.c (build_offset_ref): Build SCOPE_REF with non-null
2949 TREE_TYPE for non-dependent names.
2950 * typeck.c (build_x_unary_op): Handle non-dependent SCOPE_REF.
2951 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
2952 unknown_type_node as its TREE_TYPE.
2953 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
2954 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
2955 (dump_expr) <SCOPE_REF case>: Likewise.
2957 2004-07-17 Jason Merrill <jason@redhat.com>
2960 * call.c (type_passed_as): Make the invisible reference type
2962 * cp-gimplify.c (gimplify_cleanup_stmt): Rename to
2963 cp_genericize_r. Handle invisible reference lowering.
2964 (is_invisiref_parm): New fn.
2965 (cp_genericize): Adjust the types of invisible reference parms.
2966 Don't repeat the walk for clones.
2967 * decl.c (store_parm_decls): Don't generate any code for clones.
2969 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
2971 * cp-tree.h (builtin_function): Declare.
2973 2004-07-16 Mark Mitchell <mark@codesourcery.com>
2975 * class.c (finish_struct_methods): Remove unncessary code.
2976 (add_implicitly_declared_members): Create declarations for default
2977 constructors and copy constructors lazily.
2978 * cp-tree.h (lang_type_class): Remove lazy_default_ctor and
2980 (CLASSTYPE_LAZY_DEFAULT_CTOR): New macro.
2981 (CLASSTYPE_LAZY_COPY_CTOR): Likewise.
2982 * decl2.c (check_classfn): Robustify.
2983 (locate_dtor): Handle empty CLASSTYPE_METHOD_VEC.
2984 (locate_ctor): Handle lazy default constructors.
2985 (locate_copy): Handle lazy copy constructors.
2986 (implicitly_declare_fn): Make sure we're looking at the
2987 TYPE_MAIN_VARIANT for a class before creating functions. Don't
2988 set TYPE_HAS_CONSTRUCTOR.
2989 (lazily_declare_fn): New function.
2990 * name-lookup.c (constructor_name_full): Simplify.
2991 * search.c (lookup_fnfields_1): Lazily create methods, as
2993 (lookup_for_overrides): Handle empty CLASSTYPE_METHOD_VEC.
2995 2004-07-16 Steven Bosscher <stevenb@suse.de>
2997 * cp-tree.h (struct lang_type): Don't have three GTY options on a
2998 single bit GTY desc.
3000 2004-07-16 Richard Henderson <rth@redhat.com>
3002 * cp-lang.c (LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING): Die.
3003 * cp-tree.h (cp_copy_res_decl_for_inlining): Remove.
3004 * tree.c (cp_copy_res_decl_for_inlining): Remove.
3006 2004-07-16 Nathan Sidwell <nathan@codesourcery.com>
3008 * class.c (finish_struct_bits): Use for loop.
3009 (propagate_binfo_offsets): Do primary binfo outside of loop.
3012 * dump.c (cp_dump_tree): Don't dump the bases if there's no
3015 * pt.c (tsubst) <TREE_BINFO case>: We should never get here.
3017 2004-07-15 Mark Mitchell <mark@codesourcery.com>
3019 * cp-tree.h (lang_type_class): Remove has_real_assign_ref and
3020 has_abstract_assign_ref. Make methods a VEC(tree) *.
3021 (TYPE_HAS_CONST_ASSIGN_REF): Add documentation.
3022 (CLASSTYPE_CONSTRUCTORS): Adjust for changes to CLASSTYPE_METHOD_VEC.
3023 (CLASSTYPE_DESTRUCTORS): Likewise.
3024 (TYPE_HAS_REAL_ASSIGN_REF): Remove.
3025 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
3026 (add_method): Change prototoype.
3027 * class.c (add_method): Remove error_p parameter. Adjust for
3028 changes to CLASSTYPE_METHOD_VEC.
3029 (handle_using_decl): Adjust call to add_method.
3030 (maybe_warn_about_overly_private_class): Adjust for
3031 changes to CLASSTYPE_METHOD_VEC.
3032 (resort_type_method_vec): Likewise.
3033 (finish_struct_methods): Likewise.
3034 (check_for_override): Likewise.
3035 (warn_hidden): Likewise.
3036 (add_implicitly_declared_members): Defer creation of assignment
3037 operators. Adjust call to add_method.
3038 (clone_function_decl): Adjust call to add_method.
3039 (check_bases_and_members): Don't set TYPE_HAS_REAL_ASSIGN_REF.
3040 (finish_struct_1): Use CLASSTYPE_DESTRUCTORS.
3041 * decl.c (grok_special_member_properties): Don't set
3042 TYPE_HAS_ABSTRACT_ASSIGN_REF.
3043 * decl2.c (check_classfn): Adjust for
3044 changes to CLASSTYPE_METHOD_VEC.
3045 * method.c (locate_dtor): Use CLASSTYPE_DESTRUCTORS.
3046 (locate_ctor): Use CLASSTYPE_CONSTRUCTORS.
3047 (locate_copy): Adjust for changes to CLASSTYPE_METHOD_VEC.
3048 (implicitly_declare_fn): Set DECL_SOURCE_LOCATION. Do not call
3050 * pt.c (check_explicit_specialization): Adjust for
3051 changes to CLASSTYPE_METHOD_VEC.
3052 (instantiate_class_template): Do not set
3053 TYPE_HAS_ABSTRACT_ASSIGN_REF.
3054 * ptree.c (cxx_print_type): Don't try to print
3055 CLASSTYPE_METHOD_VEC.
3056 * rtti.c (emit_support_tinfos): Use CLASSTYPE_DESTRUCTORS.
3057 * search.c (lookup_field_r): Adjust for
3058 changes to CLASSTYPE_METHOD_VEC.
3059 (lookup_fnfields): Likewise.
3060 (lookup_conversion_operator): Likewise.
3061 (lookup_fnfields_1): Likewise. Create assignment operators
3063 (look_for_overrides_here): Adjust for
3064 changes to CLASSTYPE_METHOD_VEC.
3065 (add_conversions): Likewise.
3066 * semantics.c (finish_member_declaration): Adjust call to add_method.
3068 2004-07-15 Jason Merrill <jason@redhat.com>
3070 * cp-lang.c (cxx_types_compatible_p): To the middle-end,
3071 references and pointers are compatible.
3073 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
3075 * decl.c (xref_basetypes): Refactor.
3076 * tree.c (copy_base_binfos): Replace with ...
3077 (copy_binfo): ... this. Deep copy the given binfo, (not the just
3078 bases of the given base).
3079 * cp-tree.h (copy_base_binfo): Remove.
3080 (copy_binfo): Declare.
3082 2004-07-15 Mark Mitchell <mark@codesourcery.com>
3084 * name-lookup.c (set_inherited_value_binding_p): Add class_type
3086 (get_class_binding): Adjust.
3087 (push_class_level_binding): Don't use set_inherited_value_binding_p.
3089 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
3091 * class.c (finish_struct_bits): Don't set TYPE_HAS_CONVERSION here.
3092 * decl.c (xref_basetypes): Set it here.
3094 * class.c (check_bases): Don't set CLASSTYPE_NON_AGGREGATE here.
3095 Don't check for incomplete base.
3096 (get_vfield_name): Simplify while loop.
3097 * decl.c (xref_basetypes): Set CLASSTYPE_NON_AGGREGATE here.
3099 2004-07-14 Mark Mitchell <mark@codesourcery.com>
3101 * lex.c (cxx_make_type): Remove call to get_pointer_type.
3103 * cp-tree.h (IDENTIFIER_VALUE): Remove.
3104 (BINFO_PUSHDECLS_MARKED): Likewise.
3105 (maybe_inject_for_scope_var): Likewise.
3106 (push_class_decls): Likewise.
3107 * name-lookup.h (push_class_binding): Remove.
3108 (innermost_non_namespace_value): New function.
3109 (outer_binding): Likewise.
3110 * class.c (add_method): Push bindings before adding to
3112 (restore_class_cache): Do not restore class_shadowed.
3113 (pushclass): Do not add USING_DECLs. Do not call
3115 * config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c.
3116 * decl.c (pushdecl): Use outer_binding.
3117 (poplevel): Set the scope for an out-of-scope for-loop declaration
3119 (cp_finish_decl): Don't call maybe_inject_for_scope_var.
3120 * name-lookup.c (new_class_binding): New function.
3121 (push_binding): Use it.
3122 (pushdecl): Use innermost_non_namespace_value.
3123 (maybe_inject_for_scope_var): Remove.
3124 (push_class_binding): Remove.
3125 (set_inherited_value_binding_p): New function.
3126 (get_class_binding): New function.
3127 (push_class_level_binding): Assert that the current_class_type is
3129 (outer_binding): New function.
3130 (innermost_non_namespace_value): Likewise.
3131 (lookup_name_real): Use outer_binding.
3132 (lookup_name_current_level): Ignore out-of-scope variables.
3133 * pt.c (check_template_shadow): Use innermost_non_namespace_value.
3134 (lookup_template_class): Likewise.
3135 * search.c (dfs_push_type_decls): Remove.
3136 (dfs_push_decls): Likewise.
3137 (setup_class_bindings): Likewise.
3138 (lookup_field_1): Handle USING_DECLs from dependent scopes.
3139 (marked_pushdecls_p): Remove.
3140 (unmarked_pushdecls_p): Remove.
3141 (marked_identifiers): Remove.
3142 (setup_class_bindings): Remove.
3143 (dfs_push_type_decls): Remove.
3144 (dfs_push_decls): Remove.
3145 (push_class_decls): Remove.
3147 2004-07-13 Mark Mitchell <mark@codesourcery.com>
3151 * decl.c (grokvardecl): Make declspecs parameter const.
3152 (grokdeclarator): Likewise. Adjust accordingly.
3153 * decl.h (grokdeclarator): Adjust declaration.
3154 * parser.c (cp_parser_init_declarator): Do not clear
3155 decl_specifiers->attributes.
3157 * cp-tree.h (lang_identifier): Remove class_value.
3158 (IDENTIFIER_CLASS_VALUE): Remove.
3159 (pop_class_decls): Likewise.
3160 (init_search_processing): Likewise.
3161 * class.c (handle_using_decl): Use lookup_member, not
3162 IDENTIFIER_CLASS_VALUE.
3163 (restore_class_cache): New function, split out from ...
3164 (pushclass): ... here. Do not call clear_identifier_class_values.
3165 (invalidate_class_lookup_cache): Do not clear
3166 IDENTIFIER_CLASS_VALUE.
3167 (popclass): Do not call pop_class_decls.
3168 (maybe_note_name_used_in_class): Do not save names looked up after
3169 the class is complete. Use lookup_member, not
3170 IDENTIFIER_CLASS_VALUE.
3171 * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
3172 * decl.c (cxx_init_decl_processing): Do not call
3173 init_search_processing.
3174 * method.c (do_build_copy_constructor): Remove unnecessary code.
3175 (do_build_assign_ref): Likewise.
3176 * name-lookup.c (pushdecl): Use lookup_member, not
3177 IDENTIFIER_CLASS_VALUE.
3178 (set_identifier_type_value_with_scope): Set TREE_TYPE on the
3180 (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
3181 (push_class_binding): Do not set it.
3182 (clear_identifier_class_values): Remove.
3183 (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
3184 (store_binding): Do not save it.
3185 (pop_from_top_level): Do not restore it.
3186 * name-lookup.h (cxx_saved_binding): Remove class_value.
3187 (clear_identifier_class_values): Remove.
3188 * ptree.c (cxx_print_identifier): Do not print
3189 IDENTIFIER_CLASS_VALUE.
3190 * search.c (search_obstack): Remove.
3191 (push_stack_level): Remove.
3192 (pop_stack_level): Remove.
3193 (search_level): Remove.
3194 (search_stack): Remove.
3195 (lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
3196 (setup_class_bindings): Use IDENTIFIER_MARKED, not
3197 IDENTIFIER_CLASS_VALUE.
3198 (marked_identifiers): New variable.
3199 (push_class_decls): Clear IDENTIFIER_MARKED.
3200 (pop_class_decls): Don't call pop_search_level.
3201 (init_search_processing): Remove.
3203 2004-07-12 Mark Mitchell <mark@codesourcery.com>
3205 * cp-tree.h (get_aggr_typedef): Remove.
3206 * init.c (get_aggr_typedef): Likewise.
3208 * name-lookup.c (push_class_level_binding): Simplify.
3210 2004-07-12 Andrew Pinski <apinski@apple.com>
3214 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
3216 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
3219 2004-07-12 Eric Christopher <echristo@redhat.com>
3221 * parser.c (cp_parser_class_head): Remove unused variable.
3223 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3225 * decl.c (grok_op_properties): Reject [de-]allocation functions
3226 declared in a namespace, or declared as static.
3228 2004-07-12 Nathan Sidwell <nathan@codesourcery.com>
3230 * cp-tree.h (make_binfo): Remove.
3231 * decl.c (xref_basetypes): Use make_tree_binfo directly.
3232 * tree.h (copy_base_binfos): Likewise.
3233 (make_binfo): Remove.
3235 * call.c (build_user_type_conversion_1, build_new_op,
3236 check_constructor_callable, build_temp,
3237 perform_direct_initialization_of_possible): Pass type directly to
3238 lookup_fnfields & build_special_member_call.
3239 (build_special_member_call): Accept a type, and complete it.
3240 * class.c (finish_stuct_bits): Copy the BINFOs here.
3241 * cvt.c (ocp_convert): Pass type directly to
3242 build_special_member_call.
3243 * decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
3244 (xref_basetypes): Allocate the binfo here. Adjust.
3245 * init.c (build_init, build_new_1): Pass type directly to
3246 build_special_member_call.
3247 * lex.c (cxx_make_type): Do not allocate binfo here.
3248 * name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
3249 * parser.c (cp_parser_class_head): Always call xref_basetypes.
3250 * pt.c (instantiate_class_template): Likewise. Inhibit access
3251 checking for template friends.
3252 * ptree.c (cxx_print_type): Adjust record printing.
3253 * search.c (lookup_base): When taking a type, complete it before
3254 looking for a binfo.
3255 (lookup_member): Delay completing a type.
3256 (push_class_decls): Don't walk an incomplete type.
3257 (lookup_conversions): Likewise.
3258 * semantics.c (finish_stmt_expr_expr): Pass type directly to
3259 build_special_member_call.
3260 * tree.c (copy_base_binfos): Adjust.
3261 (make_binfo): Likewise.
3262 * typeck.c (build_modify_expr): Pass type directly to
3263 build_special_member_call.
3264 * typeck2.c (process_init_constructor): Check a binfo exists.
3265 (build_m_component_ref): Allow accessing an incomplete type.
3266 (build_functional_cast): Pass type directly to
3267 build_special_member_call.
3269 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3272 * config-lang.in (gtfiles): Add typeck2.c.
3273 * Make-lang.in: Tweak typeck2.c dependencies, and add rule for
3275 * cp-tree.h: Declare complete_type_check_abstract.
3276 * typeck2.c (pat_calc_hash, pat_compare,
3277 complete_type_check_abstract): New functions.
3278 (abstract_virtuals_error): If the type is abstract, register the
3279 declaration within abstract_pending_vars for further checks.
3280 Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
3281 * decl.c (cp_finish_decl): Do not strip array types.
3282 (create_array_type_for_decl): Check for abstractness of the element
3284 (complete_vars): Call complete_type_check_abstract.
3285 * class.c (finish_struct): Prepare a list of virtual functions for
3286 template types, and call complete_vars on it to check for abstractness.
3288 2004-07-12 Paolo Bonzini <bonzini@gnu.org>
3290 PR tree-optimization/14107
3291 * decl.c (finish_function): Remove temporary band-aid.
3293 2004-07-11 Mark Mitchell <mark@codesourcery.com>
3295 * call.c (build_operator_new_call): Avoid using push_to_top_level.
3296 (build_new_op): Adjust call to lookup_function_nonclass.
3297 * name-lookup.c (identifier_type_value): Adjust call to
3299 (lookup_name_real): Add block_p parameter.
3300 (lookup_name_nonclass): Adjust call to lookup_name_real.
3301 (lookup_function_nonclass): Likewise.
3302 (lookup_name): Likewise.
3303 * name-lookup.h (lookup_name_real): Change prototype.
3304 (lookup_name_nonclass): Likewise.
3305 * parser.c (cp_parser_lookup_name): Likewise.
3307 * cp-tree.h (saved_scope): Make old_bindings a vector.
3308 (unuse_fields): Remove.
3309 * name-lookup.h (cxx_saved_binding): Define it.
3310 * class.c (pushclass): Don't use unuse_fields.
3311 * name-lookup.c (cxx_saved_binding_make): Remove.
3312 (store_binding): Add new bindings to a vector, using an
3313 accumulator style, rather than adding them to a list.
3314 (store_bindings): Adjust accordingly.
3315 (store_class_bindings): Likewise.
3316 (push_to_top_level): Likewise.
3317 (pop_from_top_level): Likewise.
3318 * optimize.c (maybe_clone_body): Must push_to_top_level and
3319 pop_from_top_level calls outside of loop.
3320 * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope
3321 calls here from cp_parser_late_parsing_default_args.
3322 (cp_parser_save_default_args): Record the class type in which the
3323 function is declared.
3324 (cp_parser_late_parsing_default_args): Do not call
3325 push_nested_class/pop_nested_class.
3326 * search.c (dfs_unuse_fields): Remove.
3327 (unuse_fields): Remove.
3329 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
3331 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
3332 LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
3333 * cp-tree.h (poplevel): Declare.
3334 (set_block): Remove.
3335 * decl.c (set_block): Remove.
3337 2004-07-10 Mike Stump <mrs@apple.com>
3339 * decl2.c (import_export_class): Never export/import vtables
3340 with inline key functions.
3342 2004-07-09 Steven Bosscher <stevenb@suse.de>
3344 * typeck.c (c_expand_asm_operands): Remove.
3346 2004-07-09 Mike Stump <mrs@apple.com>
3348 * typeck.c (build_class_member_access_expr): Skip null deref
3349 warning when we don't dereference it.
3351 2004-07-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3355 * class.c (check_field_decls): Improve -Weffc++ warning: do not
3356 warn for pointers to functions/members, or for classes without
3359 2004-07-08 Mark Mitchell <mark@codesourcery.com>
3361 * name-lookup.h (struct cp_binding_level): Update documentation
3364 2004-07-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3367 * typeck.c (check_return_expr): Improve -Weffc++ warning: handle
3368 returning CALL_EXPR, and non-reference return type.
3370 2004-07-08 Nathan Sidwell <nathan@codesourcery.com>
3372 * name-lookup.c (push_binding): Use VEC_reserve.
3374 2004-07-08 Richard Henderson <rth@redhat.com>
3376 * cp-tree.h (expand_eh_spec_block): Remove.
3378 2004-07-07 Mark Mitchell <mark@codesourcery.com>
3380 * cp-tree.h (saved_scope): Remove x_previous_class_type and
3381 x_previous_class_values; add x_previous_class_level.
3382 (previous_class_type): Remove.
3383 (previous_class_values): Remove.
3384 (previous_class_level): New macro.
3385 * class.c (pushclass): Restore the identifier cache more
3387 (invalidate_class_lookup_cache): Use vector for class_shadowed and
3388 previous_class_values.
3389 * decl.c (poplevel): Likewise.
3390 * name-lookup.c (cxx_binding_init): New function.
3391 (cxx_binding_make): Use it.
3392 (push_binding): For a binding in a class level, use a vector of
3393 cp_class_binding nodes.
3394 (push_binding_level): New function.
3395 (begin_scope): Use it.
3396 (leave_scope): Do not put class binding levels on the free list.
3397 (print_binding_level): Adjust for the fact that class_shadowed is
3399 (poplevel_class): Likewise.
3400 (clear_identifier_class_values): Likewise.
3401 (push_class_level_binding): Likewise.
3402 (set_class_shadows): Remove.
3403 (store_binding): New function.
3404 (store_class_bindings): New function.
3405 (push_to_top_level): Use store_class_bindings as appropriate.
3406 (pop_from_top_level): Use previous_class_level, not
3407 previous_class_type.
3408 * name-lookup.h (cp_class_binding): New type.
3409 (cp_binding_level): Use a vector object for class_shadowed.
3410 (push_binding_level): Declare.
3411 (set_class_shadows): Remove.
3413 2004-07-07 Andrew Pinski <apinski@apple.com>
3415 * class.c (instantiate_type): BUFFER_REF is dead.
3416 * lex.c (init_operators): IN_EXPR is dead.
3418 2004-07-07 Jason Merrill <jason@redhat.com>
3421 * call.c (build_new_op): Give overload warnings for built-in
3424 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
3427 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
3430 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
3432 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
3433 * class.c (build_primary_vtable, check_bases,
3434 determine_primary_base, finish_struct_bits,
3435 maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
3436 get_basefndecls, warn_hidden, walk_subobject_offsets,
3437 build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
3438 layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
3439 finish_struct_1, get_vfield_name, contains_empty_class_p,
3440 dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
3441 dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
3442 add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
3444 * decl.c (xref_basetypes): Likewise.
3445 * dump.c (cp_dump_tree): Likewise.
3446 * error.c (dump_expr): Likewise.
3447 * init.c (sort_mem_initializers, expand_member_init,
3448 push_base_cleanups): Likewise.
3449 * method.c (do_build_copy_constructor, do_build_assign_reg,
3450 synthesize_exception_spec): Likewise.
3451 * name-lookup.c (arg_assoc_class): Likewise.
3452 * pt.c (instantiate_class_template, tsubst,
3453 get_template_base_recursive): Likewise.
3454 * ptree.c (cxx_print_type): Likewise.
3455 * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
3456 * search.c (lookup_base_r, dynamic_cast_base_recurse,
3457 dfs_access_in_type, access_in_type, lookup_field_queue_p,
3458 bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
3459 marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
3460 dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
3461 binfo_for_vtable, copied_binfo, original_binfo): Likewise
3462 * tree.c (copy_base_binfos, make_binfo): Likewise.
3463 * typeck.c (commmon_base_type): Likewise
3464 * typeck2.c (process_init_constructor): Likewise
3466 2004-07-06 Joseph S. Myers <jsm@polyomino.org.uk>
3468 * decl.c (check_tag_decl): Name redeclared type in diagnostic.
3470 2004-07-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3473 * pt.c (convert_nontype_argument): Disallow conversions between
3474 different enumeration types.
3476 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
3478 * cp-tree.h (BINFO_MARKED): Remove.
3479 (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
3480 BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
3481 BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
3482 (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
3483 * class.c (build_base_path): Use BINFO_VIRTUAL_P.
3484 (mark_primary_bases, determine_primary_base, base_derived_from,
3485 dfs_find_final_overrider, dfs_find_final_overrider_q,
3486 dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
3487 dfs_modify_vtables, walk_subobject_offsets,
3488 layout_nonempty_base_or_field, build_base_field,
3489 build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
3490 end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
3491 finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
3492 build_ctor_vtbl_group, accumulate_vtble_inits,
3493 dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
3494 build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
3495 add_vcall_offset_vtbl_entries_1): Likewise.
3496 * decl.c (xref_basetypes): Incomming virtual base indicated by
3498 * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
3499 * init.c (finish_init_stmts, sort_mem_initializers,
3500 emit_mem_initializers, build_vtble_address, expand_member_init,
3501 push_base_cleanups): Likewise.
3502 * method.c (do_build_copy_constructor): Likewise.
3503 * pt.c (instantiate_class_template,
3504 get_template_base_recursive): Likewise.
3505 * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
3506 get_pseudo_ti_desc): Likewise.
3507 * search.c (lookup_base_r, dynamic_cast_base_recurse,
3508 binfo_from_vbase, binfo_via_virtual, copied_binfo,
3509 original_binfo): Likewise.
3510 * semantics.c (finish_base_specifier): Virtualness is indicated
3512 * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
3514 2004-07-06 Mark Mitchell <mark@codesourcery.com>
3517 2004-06-24 Jason Merrill <jason@redhat.com>
3519 * decl.c (grokparms): Give the PARM_DECL reference type if the
3520 parameter is passed by invisible reference.
3522 2004-07-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3524 * cp-lang.c (cp_var_mod_type_p): Add extra arg.
3525 * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
3526 * pt.c (check_instantiated_args, unify): Likewise.
3528 2004-07-05 Phil Edwards <phil@codesourcery.com>
3530 * Make-lang.in (check-c++, lang_checks): Add some comments.
3532 2004-07-05 Zack Weinberg <zack@codesourcery.com>
3534 * cp-mudflap.c: Delete file.
3535 * Makefile.in: Remove all references to cp-mudflap.o.
3537 2004-07-05 Zack Weinberg <zack@codesourcery.com>
3539 * decl.c (cxx_init_decl_processing): Call
3540 build_common_tree_nodes before creating the global NAMESPACE_DECL.
3542 2004-07-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3545 * call.c (build_operator_new_call): Look only at global scope.
3547 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
3549 * call.c (enforce_access): Expect TREE_BINFO.
3550 * class.c (binfo_ctor_vtable): Check TREE_BINFO.
3551 * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
3552 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
3554 (BINFO_LANG_ELTS): Remove.
3555 (BINFO_LANG_SLOTS): New.
3556 (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
3557 (CLASSTYPE_TEMPLATE_INFO): Adjust.
3558 * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
3559 * search.c (lookup_member): Check TREE_BINFO.
3560 * semantics.c (perform_or_defer_access_check): Likewise.
3561 (check_accessibility_of_qualified_id): Check
3562 deferred_access_no_check.
3563 * tree.c (make_binfo): Use make_tree_binfo.
3565 2004-07-04 Mark Mitchell <mark@codesourcery.com>
3567 * method.c (implicitly_declare_fn): Set linkage of generated
3570 2004-07-04 Richard Henderson <rth@redhat.com>
3572 * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
3574 2004-07-03 Scott Brumbaugh <scottb.lists@verizon.net>
3577 * name-lookup.c (push_class_level_binding): Don't pass a
3578 TREE_LIST of ambiguous names to check_template_shadow as it
3579 only handles declarations. Instead, pull the declaration
3582 2004-07-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3585 * pt.c (check_explicit_specialization): Clarify error message.
3587 2004-07-02 Richard Henderson <rth@redhat.com>
3589 * tree.c (cp_unsave_r): Update remap_save_expr call.
3591 2004-07-02 Mark Mitchell <mark@codesourcery.com>
3594 * mangle.c (write_template_arg): Correct mangling.
3597 * decl.c (grokdeclarator): Robustify.
3599 2004-07-01 Richard Henderson <rth@redhat.com>
3601 * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
3602 * method.c (synthesize_method): Don't clear_last_expr.
3603 * name-lookup.c (maybe_push_cleanup_level): Likewise.
3605 2004-07-01 Nick Clifton <nickc@redhat.com>
3607 * decl2.c (import_export_class): Invoke the
3608 import_export_class field in the gcc_target structure if it is not
3611 2004-06-30 Richard Henderson (rth@redhat.com>
3613 * decl.c (start_preparsed_function): Don't set immediate_size_expand.
3614 * method.c (use_thunk): Likewise.
3616 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
3618 * call.c (build_over_call), typeck.c (build_function_call): Call
3619 check_function_arguments instead of check_function_format.
3621 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
3623 * call.c (build_over_call), typeck.c (build_function_call): Update
3624 calls to check_function_format.
3626 2004-06-30 Richard Henderson <rth@redhat.com>
3628 * call.c (build_over_call): Use __builtin_memcpy for copying
3629 CLASS_AS_BASE rather than funny casting.
3631 2004-06-30 Richard Henderson <rth@redhat.com>
3633 * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
3634 TYPE_SIZE_UNIT of full_type.
3636 2004-06-30 Per Bothner <per@bothner.com>
3638 Conditionally compile support for --enable-mapped_location.
3639 * decl.c (pop_label): Handle (imperfectly) USE_MAPPED_LOCATION case.
3640 * decl2.c: If USE_MAPPED_LOCATION, don't do some line number
3641 adjustments - which I don't understand.
3642 * error.c (dump_decl): Rename "<interrnal>" to "<built-in>".
3643 * error.c: Use LOCATION_FILE and EXPR_LOCATION macros.
3644 (print_instantiation_partial_context): Use expand_location.
3645 * decl.c (duplicate_decl): Use new DECL_IS_BUILTIN macro.
3646 * name-lookup.c: Likewise.
3647 * lex.c (cxx_init): Likewise. Also use BUILTINS_LOCATION.
3648 * name-lookup.c: Use input_line macro.
3649 * parser.c (cp_lexer_get_preprocessor_token): Use UNKNOWN_LOCATION.
3650 (cp_parser_statement): Rename locaal variable statement_locus to
3651 statement_location and use SET_EXPR_LOCATION macro.
3652 * pt.c: Handle USE_MAPPED_LOCATION case. Use new macros.
3653 * tree.c (cp_walk_subtrees): Likewise.
3655 2004-06-29 Per Bothner <per@bothner.com>
3657 * tree.c (build_min_nt, build_min, build_min_non_dep):
3658 Don't set TREE_COMPLEXITY from input_line.
3660 2004-06-29 Paul Brook <paul@codesourcery.com>
3662 * init.c: Include target.h.
3663 (get_cookie_size): Remove and replace with target hook.
3665 (build_new_1): Store the element size in the cookie.
3667 2004-06-29 Nathan Sidwell <nathan@codesourcery.com>
3670 * parser.c (cp_parser_template_declaration_after_export): Disable
3671 access checks here ...
3672 (cp_parser_class_specifier): ... not here.
3674 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
3676 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
3677 VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
3678 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
3681 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
3683 * cp-tree.h (struct deferred_access): Move to ...
3684 * semantics.c (struct deferred_access): ... here. Adjust.
3685 (deferred_access_stack): Make a VEC(deferred_access),
3686 (deferred_access_free_list): Remove.
3687 (deferred_access_no_check): New.
3688 (push_deferring_access_checks, resume_deferring_access_checks,
3689 stop_deferring_access_checks, pop_deferring_access_checks,
3690 get_deferred_access_checks, pop_to_parent_deferring_access_checks,
3691 perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
3693 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
3696 * call.c (build_temp): Declare.
3697 (check_constructor_callable): New.
3698 (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
3699 CONSTRUCTOR_CALLABLE.
3700 (convert_like_real, initialize_reference): Use
3701 check_constructor_callable.
3702 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
3703 (LOOKUP_*): Renumber.
3705 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
3707 * friend.c (add_friend): Only perform access checks when context
3709 * lex.c (cxx_make_type): Only create a binfo for aggregate types.
3710 * parser.c (cp_parser_class_specifier): Disable access checks here
3711 when parsing the body of a templated class.
3712 * semantics.c (perform_or_defer_access_checks): Reorder to allow
3713 NULL binfos when not checking access.
3715 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
3717 Use vector API for vbase list.
3718 * cp-tree.h: Include vec.h
3719 (DEF_VEC_P (tree)): New type.
3720 (struct lang_type_class): Change vbase's member type.
3721 (binfo_for_vbase): Declare.
3722 * class.c (determine_primary_base, base_derived_from,
3723 update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
3724 warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
3725 build_vtbl_initializer): Adjust.
3726 * decl.c (xref_basetypes): Adjust, accumulate upper bound of
3728 * init.c (sort_mem_initializers, expand_member_init,
3729 push_base_cleanups): Adjust.
3730 * method.c (do_build_copy_constructor): Adjust.
3731 * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
3732 (binfo_for_vbase): New.
3733 * tree.c (copy_base_binfos): Adjust.
3735 2004-06-28 Mark Mitchell <mark@codesourcery.com>
3737 * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
3739 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
3742 * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
3743 paranthesis in case of pointers to array members.
3744 * error.c (dump_type_prefix): Likewise.
3745 (dump_type_suffix): Maybe issue a whitespace when printing
3748 2004-06-27 Mark Mitchell <mark@codesourcery.com>
3751 * parser.c (cp_parser_set_decl_spec_type): Refine test for
3752 redefinition of built-in types.
3754 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
3756 * error.c (pp_template_argument_list_start): Remove.
3757 (pp_template_argument_list_end): Likewise.
3758 (pp_separate_with_comma): Use pp_cxx_separate_with.
3759 (reinit_global_formatting_buffer): Remove.
3760 (pp_non_consecutive_character): Likewise.
3761 (dump_scope): Use pp_cxx_colon_colon.
3762 (dump_template_parameter): Use pp_cxx_identifier,
3763 pp_cxx_tree_identifier and pp_cxx_whitespace.
3764 (dump_templat_bindings): Replace use of pp_string with sequence
3765 of pp_cxx_whitespace and pp_equal.
3766 (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
3767 pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set
3769 (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
3770 (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace,
3771 pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
3772 (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
3773 pp_cxx_right_bracket, pp_cxx_identifier throughout,
3774 (dump_decl): Likewise.
3775 (dump_template_decl): Likewise.
3776 (dump_function_decl): Likewise. Set padding as appropriate.
3777 (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
3779 (dump_exception_spec): Likewise.
3780 (dump_function_name): Use pp_cxx_tree_identifier and
3782 (dump_template_parms): Use pp_cxx_begin_template_argument_list and
3783 pp_cxx_end_template_argument_list.
3784 (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
3785 pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
3786 pp_cxx_whitespace throughout.
3787 (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
3789 (dump_unary_op): Likewise.
3790 (reinit_cxx_pp): New function.
3791 (type_as_string); Use it.
3792 (expr_as_string): Likewise.
3793 (decl_as_string); Likewise.
3794 (context_as_string): Likewise.
3795 (lang_decl_name): Likewise.
3796 (decl_to_string): Likewise.
3797 (expr_to_string): Likewise.
3798 (parm_to_string): Likewise.
3799 (type_to_string): Likewise.
3800 (args_to_string): Likewise.
3801 (cv_to_string): Likewise.
3803 2004-06-26 Mark Mitchell <mark@codesourcery.com>
3805 * cp-tree.h (cp_cv_quals): New type.
3806 (cp_declarator): Use it instead of "tree" as appropriate.
3807 (grok_method_quals): Adjust prototype.
3808 (grokclassfn): Likewise.
3809 (do_friend): Likewise.
3810 * decl.c (grokfndecl): Use cp_cv_quals, not tree.
3811 (grokdeclarator): Likewise.
3812 * decl2.c (grok_method_quals): Likewise.
3813 (grokclassfn): Likewise.
3814 * friend.c (do_friend): Likewise.
3815 * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
3816 * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
3817 (make_pointer_declarator): Likewise.
3818 (make_reference_declarator): Likewise.
3819 (make_ptrmem_declarator): Likewise.
3820 (cp_parser_ptr_operator): Likewise.
3821 (cp_parser_cv_qualifier_seq_opt): Likewise.
3822 (cp_parser_cv_qualifier_opt): Remove.
3823 (cp_parser_new_declarator_opt): Adjust call to
3824 cp_parser_ptr_operator.
3825 (cp_parser_conversion_declaration_opt): Likewise.
3826 (cp_parser_declarator): Use cp_cv_quals, not tree.
3827 (cp_parser_direct_declarator): Likewise.
3829 2004-06-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3831 * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
3832 Rename DECL_STMT to DECL_EXPR.
3833 * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
3834 * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
3835 * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
3837 2004-06-26 Jan Hubicka <jh@suse.cz>
3840 * decl2.c (maybe_emit_vtables): Always import_export_vtable for the
3841 reachability analysis.
3843 2004-06-25 Mark Mitchell <mark@codesourcery.com>
3845 * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
3848 2004-06-25 Paul Brook <paul@codesourcery.com>
3850 * decl2.c (get_guard): Call targetm.cxx.guard_type.
3851 (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
3853 2004-06-24 Mark Mitchell <mark@codesourcery.com>
3855 * decl.c (grokdeclarator): Restore error messages about __thread.
3856 * parser.c (cp_parser_decl_specifier_seq): Likewise.
3858 2004-06-24 Jason Merrill <jason@redhat.com>
3861 * decl.c (grokparms): Give the PARM_DECL reference type if the
3862 parameter is passed by invisible reference.
3864 2004-06-24 Andreas Schwab <schwab@suse.de>
3866 * cp-tree.h (enum cp_storage_class): Remove trailing comma.
3868 2004-06-23 Mark Mitchell <mark@codesourcery.com>
3870 * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
3871 (cp/decl.o): Likewise.
3872 (cp/decl2.o): Likewise.
3873 (cp/pt.o): Likewise.
3874 (cp/semantics.o): Likewise.
3875 * config-lang.in (gtfiles): Do not reference cp/lex.h.
3876 * class.c: Do not include lex.h.
3877 (add_implicitly_declared_members): Do not use
3878 adding_implicit_members.
3879 (check_bases_and_members): Do not talk about grok_x_components.
3880 * cp/cp-tree.h (adding_implicit_members): Remove.
3881 (cp_storage_class): New type.
3882 (cp_decl_spec): Likewise.
3883 (cp_decl_specifier_seq): Likewise.
3884 (cp_parameter_declarator): Use it for the decl_specifiers field.
3885 (check_tag_decl): Adjust prototype.
3886 (shadow_tag): Likewise.
3887 (groktypename): Likewise.
3888 (start_decl): Likewise.
3889 (start_function): Likewise.
3890 (start_method): Likewise.
3891 (grok_x_components): Remove.
3892 (grokfield): Adjust prototype.
3893 (grokbitfield): Likewise.
3894 (finish_member_class_template): Remove.
3895 * decl.c: Do not include lex.h.
3896 (adding_implicit_members): Do not define.
3897 (check_tag_decl): Do not use trees to represent decl-specifiers.
3898 (shadow_tag): Likewise.
3899 (groktypename): Likewise.
3900 (start_decl): Likewise.
3901 (grokvardecl): Likewise.
3902 (grokdeclarator): Likewise.
3903 (grokparms): Likewise.
3904 (start_function): Likewise.
3905 (start_method): Likewise.
3906 * decl.h (grokdeclarator): Adjust prototype.
3907 * decl2.c: Do not include lex.h.
3908 (grok_x_components): Remove.
3909 (grokfield): Do not use trees to represent decl-specifiers.
3910 (grokbitfield): Likewise.
3911 * lex.c: Do not include lex.h.
3913 * parser.c: Include target.h.
3914 (clear_decl_specs): New function.
3915 (cp_parser_translation_unit): Do not use trees to represent
3917 (cp_parser_postfix_expression): Likewise.
3918 (cp_parser_new_type_id): Likewise.
3919 (cp_parser_condition): Likewise.
3920 (cp_parser_simple_declaration): Likewise.
3921 (cp_parser_decl_specifier_seq): Likewise.
3922 (cp_parser_function_specifier_opt): Likewise.
3923 (cp_parser_conversion_type_id): Likewise.
3924 (cp_parser_template_parameter): Likewise.
3925 (cp_parser_explicit_instantiation): Likewise.
3926 (cp_parser_type_specifier): Likewise.
3927 (cp_parser_simple_type_specifier): Likewise.
3928 (cp_parser_init_declarator): Likewise.
3929 (cp_parser_type_id): Likewise.
3930 (cp_parser_type_specifier_seq): Likewise.
3931 (cp_parser_parameter_declaration): Likewise.
3932 (cp_parser_member_declaration): Likewise.
3933 (cp_parser_exception_declaration): Likewise.
3934 (cp_parser_function_definition_from_specifiers_and_declarator):
3936 (cp_parser_single_declaration): Likewise.
3937 (cp_parser_save_member_function_body): Likewise.
3938 (cp_parser_friend_p): Likewise.
3939 (cp_parser_set_storage_class): New function.
3940 (cp_parser_set_decl_spec_type): Likewise.
3941 * pt.c: Do not include lex.h.
3942 * semantics.c: Likewise.
3943 (finish_member_class_template): Remove.
3945 2004-06-23 Roger Sayle <roger@eyesopen.com>
3947 * call.c (build_cxx_call): Don't call expand_tree_builtin. No
3948 longer take both "args" and "convert_args" as arguments.
3949 (build_op_delete_call): Update call to build_cxx_call.
3950 (build_over_call): Likewise, update call to build_cxx_call.
3951 * cp-tree.h (build_cxx_call): Update funtion prototype.
3952 * typeck.c (build_function_call): Don't call expand_tree_builtin.
3953 * rtti.c (throw_bad_cast): Update call to build_cxx_call.
3954 (throw_bad_typeid): Likewise.
3955 (build_dynamic_cast_1): Likewise.
3957 2004-06-22 Richard Henderson <rth@redhat.com>
3959 * class.c (build_vfn_ref): Take a pointer not object. Build
3961 (cp_fold_obj_type_ref): New.
3962 * call.c (build_over_call): Update build_vfn_ref call.
3963 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
3964 * cp-tree.h (cp_fold_obj_type_ref): Declare.
3966 2004-06-21 Jason Merrill <jason@redhat.com>
3969 * cp-gimplify.c (cp_gimplify_init_expr): Look through
3972 2004-06-21 Mark Mitchell <mark@codesourcery.com>
3974 * cp-tree.def (NEW_EXPR): Add a fourth slot.
3975 * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
3976 (TREE_PARMLIST): Likewise.
3977 (CALL_DECLARATOR_PARMS): Likewise.
3978 (CALL_DECLARATOR_QUALS): Likewise.
3979 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
3980 (cp_declarator_kind): New type.
3981 (cp_parameter_declarator): Likewise.
3982 (cp_declarator): Likewise.
3983 (cp_error_declarator): Likewise.
3984 (no_parameters): Likewise.
3985 (groktypename): Change prototype.
3986 (start_decl): Likewise.
3987 (start_handler_parms): Likewise.
3988 (get_scope_of_declarator): Likewise.
3989 (start_function): Likewise.
3990 (start_preparsed_function): New function.
3991 (start_function): Change prototype.
3992 (start_method): Likewise.
3993 (grokfield): Likewise.
3994 (grokbitfield): Likewise.
3995 (build_new): Likewise.
3996 (make_pointer_declarator): Remove.
3997 (make_reference_declarator): Likewise.
3998 (make_call_declarator): Likewise.
3999 (set_quals_and_spec): Likewise.
4000 (process_template_parm): Change prototype.
4001 (begin_function_definition): Remove.
4002 (finish_parmlist): Remove.
4003 * decl.c (groktypename): Do not use trees to represent
4005 (start_decl): Likewise.
4006 (start_handler_parms): Remove.
4007 (get_scope_of_declarator): Reimplement.
4008 (grokdeclarator): Do not use trees to represent declarators.
4009 (grokparms): Likewise.
4010 (start_function): Likewise.
4011 (start_method): Likewise.
4012 (build_void_list_mode): Do not use TREE_PARMLIST.
4013 * decl.h (grokdeclarator): Change prototype.
4014 * decl2.c (grok_method_quals): Robustify.
4015 (grok_x_components): Do not use trees to represent declarators.
4016 (grokfield): Likewise.
4017 (grokbitfield): Likewise.
4018 (start_objects): Build FUNCTION_DECLs, not declarators.
4019 (start_static_storage_duration_function): Likewise.
4020 * init.c (build_new): Simplify.
4021 * lex.c (make_pointer_declarator): Remove.
4022 (make_reference_declarator): Likewise.
4023 (make_call_declarator): Likewise.
4024 (set_quals_and_spec): Likewise.
4025 * method.c (use_thunk): Use start_preparsed_function.
4026 (synthesize_method): Likewise.
4027 (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
4028 * optimize.c (maybe_clone_body): Use start_preparsed_function.
4029 * parser.c (cp_error_declarator): New variable.
4030 (declarator_obstack): Likewise.
4031 (alloc_declarator): New function.
4032 (make_declarator): Likewise.
4033 (make_id_declarator): Likewise.
4034 (make_pointer_declarator): Likewise.
4035 (make_reference_declarator): Likewise.
4036 (make_ptrmem_declarator): Likewise.
4037 (make_call_declarator): Likewise.
4038 (make_array_declarator): Likewise.
4039 (no_parameters): New variable.
4040 (make_parameter_declarator): Likewise.
4041 (cp_parser_check_for_definition_in_return_type): Do not use trees
4042 to represent declarators.
4043 (cp_parser_translation_unit): Likewise.
4044 (cp_parser_new_expression): Likewise.
4045 (cp_parser_new_type_id): Likewise.
4046 (cp_parser_new_declarator_opt): Likewise.
4047 (cp_parser_direct_new_declarator): Likewise.
4048 (cp_parser_condition): Likewise.
4049 (cp_parser_declaration_statement): Likewise.
4050 (cp_parser_declaration): Likewise.
4051 (cp_parser_conversion_type_id): Likewise.
4052 (cp_parser_conversion_declarator_opt): Likewise.
4053 (cp_parser_template_parameter_list): Likewise.
4054 (cp_parser_template_parameter): Likewise.
4055 (cp_parser_explicit_instantiation): Likewise.
4056 (cp_parser_init_declarator): Likewise.
4057 (cp_parser_declarator): Likewise.
4058 (cp_parser_direct_declarator): Likewise.
4059 (cp_parser_type_id): Likewise.
4060 (cp_parser_parameter_declaration_clause): Likewise.
4061 (cp_parser_parameter_declaration_list): Likewise.
4062 (cp_parser_parameter_declaration): Likewise.
4063 (cp_parser_member_declaration): Likewise.
4064 (cp_parser_exception_declaration): Likewise.
4065 (cp_parser_check_declarator_template_parameters): Likewise.
4066 (cp_parser_function_definition_from_specifiers_and_declarator):
4068 (cp_parser_save_member_function_body): Likewise.
4069 * pt.c (process_template_parm): Add is_non_type parameter.
4070 (convert_template_argument): Adjust call to groktypename.
4071 (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
4072 (tsubst): Do not expect declarators.
4073 (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
4075 (instantiate_decl): Use start_preparsed_function.
4076 * semantics.c (begin_function_definition): Remove.
4077 (finish_parmlist): Remove.
4078 * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
4081 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4083 * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
4084 (build_new_method_call): Likewise.
4085 * decl.c (local_variable_p_walkfn): Don't walk into types.
4086 * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
4087 (build_anon_union_vars): Add new operand for COMPONENT_REF.
4088 * init.c (buld_new): Add new operand for ARRAY_REF.
4089 * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
4090 (do_build_assign_ref): Likewise.
4091 * parser.c (cp_parser_direct_new_declarator): Add new operands
4093 (cp_parser_direct_declarator): Likewise.
4094 * pt.c (tsubst): Likewise.
4095 (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
4097 * semantics.c (finish_non_static_data_member): Add new operand
4099 * typeck.c (build_class_member_access_expr): Likewise.
4100 (build_class_member_access_expr, finish_class_member_access_expr):
4102 (build_ptrmemfunc_access_expr): Likewise.
4103 (build_array_ref): Add new operands for ARRAY_REF.
4104 * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
4105 * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
4107 2004-06-21 Richard Henderson <rth@redhat.com>
4109 * dump.c (cp_dump_tree): Don't use dump_next_stmt.
4110 * parser.c (cp_parser_jump_statement): Update commentary.
4111 * pt.c (tsubst_expr): Use RETURN_EXPR.
4112 * semantics.c (finish_return_stmt): Likewise.
4113 (finalize_nrv_r): Likewise.
4114 * typeck.c, typeck2.c: Update file start commentary.
4116 2004-06-21 Richard Henderson <rth@redhat.com>
4118 * semantics.c (finish_expr_stmt): Call verify_sequence_points.
4120 2004-06-20 Richard Henderson <rth@redhat.com>
4122 * cp-tree.h (add_decl_stmt): Declare.
4123 * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
4124 * semantics.c (maybe_cleanup_point_expr): New.
4125 (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
4126 finish_for_expr, finish_switch_cond): Use it.
4127 (finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN.
4129 2004-06-20 Richard Henderson <rth@redhat.com>
4131 * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
4132 * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
4133 (cp_gimplify_expr): Call it.
4134 (gimplify_cleanup_stmt): Move from c-gimplify.c.
4135 (cp_genericize): New.
4136 * decl.c (finish_function): Call it.
4137 * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
4138 (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
4139 (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
4140 (cp_genericize): Declare.
4141 * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
4142 * dump.c (cp_dump_tree): Likewise.
4143 * semantics.c (push_cleanup): Move from c-semantics.c.
4145 2004-06-20 Zack Weinberg <zack@codesourcery.com>
4147 * cp-lang.c (has_c_linkage): Implement.
4149 * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
4150 * decl.c (duplicate_decls): Use COPY_DECL_RTL.
4151 (builtin_function_1): Don't call make_decl_rtl.
4152 (build_cp_library_fn): Don't call set_mangled_name_for_decl.
4153 (grokvardecl): Don't call mangle_decl.
4154 * except.c (nothrow_libfn_p): Look at DECL_NAME, not
4155 DECL_ASSEMBLER_NAME.
4156 * method.c (set_mangled_name_for_decl): Delete.
4157 * name-lookup.c (pushdecl): When a local extern shadows a
4158 file-scope declaration of the same object, give both DECLs the
4160 * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
4161 on DECL_ASSEMBLER_NAME.
4163 2004-06-19 Richard Henderson <rth@redhat.com>
4165 * cp-gimplify.c: Remove unnecessary prototypes.
4166 (cp_gimplify_stmt): Merge into ...
4167 (cp_gimplify_expr): ... here. Move to end of file. Handle
4168 stmts_are_full_exprs_p frobbing.
4169 * cp-tree.h (cp_gimplify_stmt): Remove.
4170 * pt.c (tsubst_expr): Merge prep_stmt and unify.
4171 * tree.c (init_tree): Don't set lang_gimplify_stmt.
4173 2004-06-18 Richard Henderson <rth@redhat.com>
4176 * semantics.c (begin_cond): New.
4177 (finish_cond): Rewrite to handle template DECL_STMTs specially.
4178 Assume that non-template decls go land before the conditional.
4179 (simplify_loop_decl_cond): Likewise.
4180 (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
4181 finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
4182 begin_switch_stmt, finish_switch_cond): Update to match.
4184 2004-06-17 Jason Merrill <jason@redhat.com>
4187 * semantics.c (simplify_aggr_init_expr): Don't return the slot.
4188 (finish_stmt_expr_expr): Update type after conversions.
4189 (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
4190 Handle void initializer.
4191 * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
4193 2004-06-17 Geoffrey Keating <geoffk@apple.com>
4195 * class.c (build_clone): Don't call defer_fn, let mark_used do it.
4196 * cp-tree.h (defer_fn): Delete.
4197 * decl2.c (defer_fn): Delete.
4198 (finish_file): Simplify deferred_fns loops; check that
4199 only used inline functions get into deferred_fns.
4200 (mark_used): Inline previous contents of defer_fn.
4202 2004-06-16 Richard Henderson <rth@redhat.com>
4204 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
4205 (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
4206 * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
4207 of CTOR_INITIALIZER ...
4208 (pp_cxx_statement): ... here.
4209 * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
4210 (finish_function): Use alloc_stmt_list to zap entire function.
4211 * parser.c (cp_parser_compound_statement): Update commentary.
4212 * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
4213 * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
4214 (finish_stmt_expr): Don't look through COMPOUND_STMT.
4216 2004-06-16 Geoffrey Keating <geoffk@apple.com>
4218 * pt.c (mark_decl_instantiated): Don't call defer_fn.
4220 2004-06-16 Richard Henderson <rth@redhat.com>
4222 * parser.c (cp_parser_labeled_statement): Update commentary.
4223 * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
4224 * tree.c (mark_local_for_remap_r): Likewise.
4226 2004-06-16 Richard Henderson <rth@redhat.com>
4228 * parser.c (cp_parser_asm_definition): Update commentary.
4229 * pt.c (tsubst_expr): Use ASM_EXPR.
4230 * semantics.c (finish_asm_stmt): Likewise.
4232 2004-06-16 Richard Henderson <rth@redhat.com>
4234 * decl.c (finish_destructor_body): Use LABEL_EXPR.
4235 * parser.c (cp_parser_statement): Update commentary.
4236 * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
4237 * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
4238 * tree.c (mark_local_for_remap_r): Likewise.
4240 2004-06-16 Richard Henderson <rth@redhat.com>
4243 * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
4244 statement in FOR_INIT_STMT for templates.
4246 2004-06-15 Richard Henderson <rth@redhat.com>
4248 * call.c (initialize_reference): Don't build CLEANUP_STMT here.
4249 * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
4250 (genericize_try_block): Use gimplify_stmt.
4251 (genericize_catch_block, genericize_eh_spec_block): Likewise.
4252 (cp_gimplify_init_expr): Remove STMT_EXPR special case.
4253 (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
4254 * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
4255 (cp_tree_chain_matters_p): Remove.
4256 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
4257 (COMPOUND_STMT_BODY_BLOCK): New.
4258 (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
4259 (EXPR_STMT_STMT_EXPR_RESULT): New.
4260 (building_stmt_tree): Check cur_stmt_list.
4261 (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
4262 (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
4263 * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
4264 (cp_finish_decl): Use push_cleanup.
4265 (start_function, finish_function): Use statement lists.
4266 (finish_stmt): Do nothing.
4267 * except.c (begin_eh_spec_block): Use statement lists.
4268 (check_handlers_1, check_handlers): Likewise.
4269 * init.c (construct_virtual_base): Don't add extra compound stmts.
4270 (build_vec_init): Likewise.
4271 * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
4272 * name-lookup.h (struct cp_binding_level): Add statement_list.
4273 * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
4274 (cp_parser_labeled_statement, cp_parser_expression_statement,
4275 cp_parser_statement_seq_opt): Likewise.
4276 (cp_parser_compound_statement): Likewise. Take bool for try block.
4277 (cp_parser_selection_statement): Tidy if processing.
4278 (cp_parser_already_scoped_statement): Rewrite to do what it says.
4279 * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
4280 (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST.
4281 Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
4282 * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
4283 (finish_cond): New, rewritten from FINISH_COND.
4284 (simplify_loop_decl_cond): New.
4285 (finish_expr_stmt): Avoid nested EXPR_STMTs.
4286 (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
4287 begin_else_clause, finish_else_clause, finish_if_stmt,
4288 begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
4289 begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
4290 finish_for_cond, finish_for_stmt, begin_switch_stmt,
4291 finish_switch_cond, finish_switch_stmt, begin_try_block,
4292 finish_try_block, finish_cleanup_try_block, finish_function_try_block,
4293 finish_handler_sequence, finish_function_handler_sequence,
4294 begin_handler, finish_handler_parms, finish_handler,
4295 begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
4296 using statement lists.
4297 (begin_compound_stmt): Replace has_no_scope argument with flags.
4298 Update all callers. Use statement lists.
4299 (finish_compound_stmt): Likewise.
4300 (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
4301 (current_scope_stmt_stack): Remove.
4302 (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
4303 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
4304 Rewrite with statement lists.
4306 2004-06-15 Alexandre Oliva <aoliva@redhat.com>
4308 * parser.c: Change all assignments of c_lex_string_translate
4309 to true and false to 1 and 0.
4310 (cp_lexer_read_token): Convert type of the translated string.
4311 (cp_parser_skip_to_closing_parentheses): Preserve original
4312 value of c_lex_string_translate, and set it to -1 while
4314 (cp_parser_cache_group): Likewise.
4315 (cp_parser_cache_group_1): Renamed.
4316 (cp_parser_asm_operand_list): Remove redundant setting of
4317 c_lex_string_translate.
4318 (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
4319 Handle chained strings.
4321 2004-06-12 Andrew Pinski <apinski@apple.com>
4325 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
4327 * cp-tree.h: Fix typo.
4329 * cp-tree.h: Include cgraph.h
4330 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
4331 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
4333 2004-06-12 Jason Merrill <jason@redhat.com>
4335 PR tree-optimization/14107
4336 * decl.c (finish_function): Warn about no return in all functions.
4338 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
4340 * cp-tree.h (struct language_function): Remove cannot_inline.
4341 * decl.c (save_function_data): cannot_inline is no more.
4342 (cxx_push_function_context): Likewise.
4343 * decl2.c (start_objects, start_static_storage_duration_function):
4344 Reset DECL_INLINE, set DECL_UNINLINABLE.
4346 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4349 * search.c (lookup_field): Propagate the ambiguity list.
4350 (lookup_fnfields): Likewise.
4352 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4355 * parser.c (cp_parser_template_name): Ctors/dtors never need a
4356 template keyword to disambiguate.
4358 2004-06-14 Mark Mitchell <mark@codesourcery.com>
4361 * decl.c (grokdeclarator): Ignore pointer-to-members when
4362 computing template depth.
4365 * name-lookup.c (pushtag): Do not try to put class declarations in
4366 explicit specialization scopes.
4368 2004-06-11 Andrew Pinski <pinskia@physics.uc.edu>
4370 * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
4372 2004-06-11 Mark Mitchell <mark@codesourcery.com>
4375 * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
4376 bindings for undeclared built-ins.
4378 2004-06-11 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4380 * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
4381 appear at the correct location.
4383 2004-06-10 Jason Merrill <jason@redhat.com>
4387 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4388 * init.c (build_offset_ref): Build SCOPE_REF with non-null
4389 TREE_TYPE for non-dependent names.
4390 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
4391 unknown_type_node as its TREE_TYPE.
4392 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
4393 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
4394 (dump_expr) <SCOPE_REF case>: Likewise.
4396 2004-06-10 Mark Mitchell <mark@codesourcery.com>
4399 * parser.c (cp_parser_direct_declarator): Robustify.
4402 * pt.c (tsubst_copy): Use decl_constant_value on enumeration
4403 constants in non-dependent contexts.
4407 * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
4410 2004-06-10 Jakub Jelinek <jakub@redhat.com>
4413 * decl.c (duplicate_decls): Handle fileptr_type_node arguments
4416 2004-06-09 Mark Mitchell <mark@codesourcery.com>
4420 2004-06-07 Mark Mitchell <mark@codesourcery.com>
4421 * lex.c (handle_pragma_interface): Deprecate.
4422 (handle_pragma_implementation): Likewise.
4424 2004-06-09 Andrew Pinski <pinskia@physics.uc.edu>
4426 * g++spec.c (lang_specific_driver): Remove check for -lm
4427 and -lmath when check it see if it was the math library.
4429 2004-06-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4432 * parser.c (cp_parser_direct_declarator): Reject constructor named
4433 as qualified template-id.
4435 2004-06-07 Mark Mitchell <mark@codesourcery.com>
4438 * lex.c (handle_pragma_interface): Deprecate.
4439 (handle_pragma_implementation): Likewise.
4441 2004-06-07 Mark Mitchell <mark@codesourcery.com>
4444 * parser.c (cp_parser_iteration_statement): Fix typo in error
4448 * pt.c (tsubst_default_argument): Do not defer access checks
4449 while substituting into the default argument.
4452 * pt.c (tsubst_copy): Do not try to substitute for an enumeration
4453 constant in a non-dependent context.
4456 * except.c (build_throw): Ensure that temp_expr has been
4459 2004-06-06 Roger Sayle <roger@eyesopen.com>
4461 * cp/cp-tree.h (lvalue_or_else): Add function prototype.
4463 2004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4466 * parser.c (cp_parser_mem_initializer_id): Gracefully reject
4467 'typename', and accept 'template'.
4469 2004-06-03 Andrew Pinski <pinskia@physics.uc.edu>
4470 Jan Hubicka <jh@suse.cz>
4473 * method.c (use_think): Do not mark thunk as referenced.
4475 2004-06-03 Matt Austern <austern@apple.com>
4478 * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
4479 is nonzero, and if we see a noninline definition of a key method,
4480 make the vtables nonweak.
4482 2004-06-02 Matt Austern <austern@apple.com>
4484 * cp-tree.h (instantiate_decl): new boolean parameter,
4485 undefined_ok. Current behavior is equivalent to its being 0.
4486 * decl2.c (mark_used): Add new argument when calling instantiate_decl
4487 * pt.c (mark_decl_instantiated): Unconditionally make
4488 instantiations explicit unconditionally
4489 (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
4490 since mark_decl_instantiated now does it.
4491 (instantiate_class_member): New. Instantiate a member of an
4492 explicitly instantiated class template.
4493 (do_type_instantiation): Explicitly instantiate members of an
4494 explicitly instantiated class template.
4495 (instantiate_decl): if undefined_ok is nonzero, and if we're
4496 trying to explicitly instantiated a template with no definition,
4497 change it to an implicit instantiation.
4498 (instantiate_pending_templates): Add new argument to instantiate_decl.
4499 * tree.c (cp_cannot_inline_tree_fn): Likewise.
4501 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
4503 * cp-tree.h: Fix typo.
4505 * cp-tree.h: Include cgraph.h
4506 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
4507 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
4509 2004-06-01 Jason Merrill <jason@redhat.com>
4512 * call.c (call_builtin_trap): Remove type parm.
4513 (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
4514 (build_x_va_arg): Dereference a null pointer for a non-POD argument.
4516 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4519 * init.c (build_offset_ref): Build SCOPE_REF with non-null
4520 TREE_TYPE for non-dependent names.
4521 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
4522 unknown_type_node as its TREE_TYPE.
4523 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
4524 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
4525 (dump_expr) <SCOPE_REF case>: Likewise.
4527 2004-06-01 Richard Henderson <rth@redhat.com>
4528 Andrew Pinski <pinskia@physics.uc.edu>
4530 * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
4531 * parser.c (struct cp_parser): Remove in_offsetof.
4532 (cp_parser_new): Don't set it.
4533 (cp_parser_unary_expression): Don't check it.
4534 (cp_parser_postfix_open_square_expression): Split out from ...
4535 (cp_parser_postfix_expression): ... here.
4536 (cp_parser_postfix_dot_deref_expression): Likewise.
4537 (cp_parser_builtin_offsetof): New.
4538 (cp_parser_primary_expression): Use it.
4540 2004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4543 * parser.c (cp_parser_postfix_expression): Allow subscript
4544 operator in offsetof.
4546 2004-05-31 Mark Mitchell <mark@codesourcery.com>
4549 * friend.c (add_friend): Do not try to perform access checks for
4550 functions from dependent classes.
4552 2004-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
4554 * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
4555 (pp_cxx_begin_template_argument_list): Turn into a function.
4556 (pp_cxx_end_template_argument_list): Likewise.
4557 (pp_cxx_separate_with): Define.
4558 (pp_cxx_unqualified_id): Tidy.
4559 (pp_cxx_primary_expression): Likewise.
4560 (pp_cxx_postfix_expression): Likewise.
4561 (pp_cxx_expression): Likewise.
4562 (pp_cxx_simple_type_specifier): Likewise.
4563 (pp_cxx_type_specifier_seq): Likewise.
4564 (pp_cxx_parameter_declaration_clause): Likewise.
4565 (pp_cxx_exception_specification): Likewise.
4566 (pp_cxx_direct_declarator): Likewise.
4567 (pp_cxx_type_id): Likewise.
4568 * cxx-pretty-print.h (pp_cxx_whitespace): Export from
4570 (pp_cxx_left_paren): Likewise.
4571 (pp_cxx_right_paren): Likewise.
4572 (pp_cxx_left_brace): Likewise.
4573 (pp_cxx_right_brace): Likewise.
4574 (pp_cxx_left_bracket): Likewise.
4575 (pp_cxx_right_bracket): Likewise.
4576 (pp_cxx_dot): Likewise.
4577 (pp_cxx_identifier): Likewise.
4578 (pp_cxx_tree_identifier): Likewise.
4579 (pp_cxx_ampersand): New macro.
4580 (pp_cxx_star): Likewise.
4581 (pp_cxx_arrow): Likewise.
4582 (pp_cxx_semicolon): Likewise.
4583 (pp_cxx_complement): Likewise.
4584 (pp_cxx_begin_template_argument_list): Declaree.
4585 (pp_cxx_end_template_argument_list): Likewise.
4586 (pp_cxx_colon_colon): likewise.
4588 2004-05-31 Eric Botcazou <ebotcazou@libertysurf.fr>
4590 * parser.c (cp_parser_simple_type_specifier): Explicitly test
4593 2004-05-31 Kazu Hirata <kazu@cs.umass.edu>
4595 * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
4596 typeck.c: Fix comment formatting.
4598 2004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
4600 * cp-lang.c (cp_expand_decl): Remove.
4601 (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
4603 2004-05-30 Andreas Jaeger <aj@suse.de>
4605 * lang-specs.h: Add missing initializers for .ii.
4607 2004-05-28 Aldy Hernandez <aldyh@redhat.com>
4609 * decl.c (cp_make_fname_decl): Free return value from
4612 2004-05-28 Mark Mitchell <mark@codesourcery.com>
4615 * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
4617 * init.c (build_new): Likewise.
4620 * name-lookup.c (arg_assoc): Robustify.
4623 * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
4624 when determining the scope to use for a pointer to member.
4625 (lookup_anon_field): Give it external linkage.
4626 * cp-tree.h (lookup_anon_field): Declare it.
4627 * expr.c (cplus_expand_constant): Use it.
4629 2004-05-28 Mark Mitchell <mark@codesourcery.com>
4632 * parser.c (cp_parser_simple_type_specifier): Call
4633 maybe_note_name_used_in_class.
4635 2004-05-28 Tom Marshall <tmarshall@real.com>
4638 * class.c (finish_struct_1): Warn only if the dtor is non-private or
4639 the class has friends.
4641 2004-05-27 Adam Nemet <anemet@lnxw.com>
4644 * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
4645 TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
4647 2004-05-24 Geoffrey Keating <geoffk@apple.com>
4649 * method.c (implicitly_declare_fn): Don't call defer_fn; abort
4650 if it might be needed.
4651 * pt.c (mark_decl_instantiated): Only call defer_fn if
4652 the function actually needs processing in finish_file.
4653 * decl2.c (finish_file): Add check that elements in
4654 deferred_fns_used are really needed there. Remove unnecessary
4655 test of DECL_SAVED_TREE.
4657 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
4659 * Make-lang.in: No need to specify $(LIBCPP).
4661 2004-05-23 Mark Mitchell <mark@codesourcery.com>
4664 * parser.c (cp_parser_class_head): Robustify.
4667 * parser.c (cp_parser_decl_specifier_seq): Correct error in
4669 (cp_parser_constructor_declarator_p): Treat attributes
4673 * typeck.c (build_unary_op): Do not attempt to resolve casts to
4674 base classes in templates.
4676 2004-05-23 Mark Mitchell <mark@codesourcery.com>
4679 * pt.c (instantiate_template): Robustify.
4681 2004-05-23 Mark Mitchell <mark@codesourcery.com>
4684 * decl.c (xref_tag): Issue errors about redeclaring template
4685 classes as non-template classes.
4687 2004-05-23 Mark Mitchell <mark@codesourcery.com>
4690 * name-lookup.c (supplement_binding): Allow redefinitions of
4694 * parser.c (cp_parser_template_argument): Robustify.
4696 2004-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
4698 * class.c (alter_access): Use %E format specifier to print an
4699 identifier node. Avoid looking at the IDENTIFIER_POINTER.
4700 (push_lang_context): Likewise.
4701 * decl.c (lookup_label): Likewise.
4702 (grokdeclarator): Likewise.
4703 * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
4704 * pt.c (do_type_instantiation): Likewise.
4705 * tree.c (handle_java_interface_attribute): Likewise.
4706 (handle_com_interface_attribute): Likewise.
4707 (handle_init_priority_attribute): Likewise.
4709 2004-05-22 Mark Mitchell <mark@codesourcery.com>
4713 * pt.c (build_non_dependent_expr): Expand the set of tree nodes
4714 recognized as overloaded functions.
4716 2004-05-22 Mark Mitchell <mark@codesourcery.com>
4719 * class.c (layout_nonempty_base_or_field): Do not try to avoid
4720 layout conflicts for unions.
4723 * typeck.c (build_x_unary_op): Instantiate template class
4724 specializations before looking for "operator &".
4727 * typeck.c (complete_type): Layout non-dependent array types, even
4731 * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
4734 2004-05-22 Roger Sayle <roger@eyesopen.com>
4736 * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
4737 returning when TREE_TYPE is error_mark_node.
4738 * typeck.c (require_complete_type): Return error_mark_node if
4739 value's type is an error_mark_node.
4741 2004-05-20 Andrew Pinski <pinskia@physics.uc.edu>
4743 * optimize.c (calls_setjmp_r): Remove.
4744 (calls_setjmp_p): Remove.
4745 * cp-tree.c (calls_setjmp_p): Remove.
4746 * decl.c (finish_function): Do not call calls_setjmp_p.
4748 2004-05-18 Zack Weinberg <zack@codesourcery.com>
4750 * decl.c (cp_finish_decl): Use mark_decl_referenced.
4751 * decl2.c (maybe_make_one_only): Likewise.
4752 * method.c (use_thunk): Likewise.
4754 2004-05-18 Jason Merrill <jason@redhat.com>
4756 * class.c (build_base_path): Tidy a bit.
4758 2004-05-14 Geoffrey Keating <geoffk@apple.com>
4760 * name-lookup.c (struct scope_binding): New.
4761 (EMPTY_SCOPE_BINDING): New.
4762 (lookup_using_namespace): Take a scope_binding instead of a
4764 (qualified_lookup_using_namespace): Likewise.
4765 (cxx_binding_clear): Delete.
4766 (do_nonmember_using_decl): Use a scope_binding instead of a
4768 (lookup_tag): Don't call select_decl.
4769 (ambiguous_decl): Don't return anything (and change callers to match).
4770 Take a scope_binding as the second parameter.
4771 (lookup_namespace_name): Use a scope_binding instead of a
4773 (unqualified_namespace_lookup): Likewise.
4774 (lookup_qualified_name): Likewise.
4775 (select_decl): Take a scope_binding instead of a cxx_binding.
4776 Use macros rather than hand-coding tests for type-ness.
4778 2004-05-13 Diego Novillo <dnovillo@redhat.com>
4780 * cp-gimplify.c: Rename from cp-simplify.c.
4781 * Make-lang.in, optimize.c: Update.
4783 2004-05-13 Diego Novillo <dnovillo@redhat.com>
4785 Merge from tree-ssa-20020619-branch. See
4786 ChangeLog.tree-ssa for details.
4788 * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
4789 cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
4790 expr.c, init.c, name-lookup.h, optimize.c, parser.c,
4791 pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
4793 * cp-mudflap.c: New file.
4794 * cp-simplify.c:: New file.
4796 2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4799 * decl2.c (check_classfn): For member templates, compare also the
4800 template parameters to match the declaration.
4801 * cp-tree.h: Adjust declaration of check_classfn.
4802 * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
4803 * friend.c (do_friend): Likewise.
4804 * pt.c (tsubst_friend_function): Likewise.
4806 2004-05-01 Zack Weinberg <zack@codesourcery.com>
4808 * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
4809 Instead, dig into the representation type to find the array bound.
4811 2004-04-30 Jason Merrill <jason@redhat.com>
4813 Refer to base members using COMPONENT_REFs where possible.
4814 * class.c (build_simple_base_path): New fn.
4815 (build_base_path): Use it for non-virtual base references.
4816 (layout_class_type): Change base fields to their real type
4817 after layout is done.
4818 * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
4819 * cp-lang.c (cxx_get_alias_set): Use it.
4821 2004-04-30 Kazu Hirata <kazu@cs.umass.edu>
4823 * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
4826 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4829 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
4830 used in integral constant expressions.
4832 2004-04-22 Mark Mitchell <mark@codesourcery.com>
4834 * init.c (build_aggr_init): Fix accidental use of C99 construct in
4837 * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
4839 * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
4840 * decl.c (reshape_init): Use it.
4841 * init.c (perform_member_init): Remove redundant condition.
4842 (build_aggr_init): Adjust to handle brace-enclosed initializers
4844 (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
4846 * parser.c (cp_parser_initializer_clause): Do not set
4847 TREE_HAS_CONSTRUCTOR on the initializer.
4848 * rtti.c (tinfo_base_init): Likewise.
4849 (generic_initializer): Likewise.
4850 (ptr_initializer): Likewise.
4851 (ptm_initializer): Likewise.
4852 (class_initializer): Likewise.
4853 (get_pseudo_ti_init): Likewise.
4854 * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
4856 2004-04-22 Alan Modra <amodra@bigpond.net.au>
4858 * name-lookup.c (anonymous_namespace_name): Make static.
4860 2004-04-19 Roger Sayle <roger@eyesopen.com>
4863 * class.c (build_base_path): Call fold whilst building the NULL
4864 pointer check expression trees.
4866 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
4868 * init.c (build_new_1): Don't use type size argument for Java
4869 _Jv_AllocObject call.
4871 2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
4873 * method.c (make_alias_for_thunk): Remove preprocessor guard on
4874 declaration and definition.
4876 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
4879 * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
4880 than ASM_OUTPUT_DEF.
4882 2004-04-08 Jakub Jelinek <jakub@redhat.com>
4884 * decl2.c (mark_used): Don't segfault if cfun != NULL but
4885 current_function_decl == NULL.
4887 2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
4890 * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
4893 2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4895 * init.c (decl_constant_value): Don't look at DECL_INITIAL
4897 * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
4898 or TREE_SIDE_EFFECTS of a type.
4900 2004-04-02 Nathan Sidwell <nathan@codesourcery.com>
4903 * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
4904 cv-qualifier unification.
4905 * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
4907 2004-04-02 Jan Hubicka <jh@suse.cz>
4909 * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
4910 * cp-tree.h (cp_update_decl_after_saving): Declare.
4911 * tree.c (cp_update_decl_after_saving): Define.
4913 2004-04-01 Mark Mitchell <mark@codesourcery.com>
4916 * typeck.c (get_delta_difference): Call fold before returning the
4919 2004-04-01 Richard Henderson <rth@redhat.com>
4922 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
4923 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
4925 2004-04-01 Mark Mitchell <mark@codesourcery.com>
4928 * name-lookup.c (maybe_push_cleanup_level): Robustify.
4930 2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4932 * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
4934 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4936 * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
4937 * class.c (check_bitfield_decl): Likewise.
4938 * cvt.c (type_promotes_to): Likewise.
4939 * decl.c (finish_enum): Likewise.
4940 * mangle.c (write_builtin_type): Likewise.
4941 * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
4942 * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
4943 (build_binary_op): Likewise.
4945 2004-03-31 Jan Hubicka <jh@suse.cz>
4947 * tree.h (optimize_function): Kill prototype.
4948 * optimize.c (dump_function, optimize_function, dump_finction): Kill.
4949 * semantics.c (expand_body): Kill.
4951 2004-03-30 Mark Mitchell <mark@codesourcery.com>
4954 * decl.c (start_decl_1): Do not decide whether or not to create a
4955 new cleanup level until after the type has been completed.
4958 * pt.c (tsubst_default_argument): Clear current_function_decl.
4960 2004-03-30 Zack Weinberg <zack@codesourcery.com>
4962 * name-lookup.c, parser.c: Use new shorter form of GTY markers.
4964 2004-03-29 Zack Weinberg <zack@codesourcery.com>
4966 * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
4967 is null, just print the literal name and return.
4969 2004-03-25 Kazu Hirata <kazu@cs.umass.edu>
4971 * cxx-pretty-print.c: Fix comment typos.
4973 2004-03-24 Kazu Hirata <kazu@cs.umass.edu>
4975 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
4978 2004-03-23 Ziemowit Laski <zlaski@apple.com>
4980 * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
4981 * mangle.c (write_type): Add call to 'mangle_fundamental_type'
4984 2004-03-23 Zack Weinberg <zack@codesourcery.com>
4986 PR 12267, 12391, 12560, 13129, 14114, 14133
4987 * cp-lang.c (c_reset_state): Delete.
4988 (push_file_scope, pop_file_scope): New stubs.
4989 * parser.c (c_parse_file): Call sorry() here if called more than once.
4991 2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4993 * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
4996 2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
4998 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
5000 2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
5002 * error.c (enum pad): Remove.
5003 (dump_qualifiers): Likewise.
5004 (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
5005 (dump_aggr_type): Likewise.
5006 (dump_type_suffix): Likewise.
5007 (dump_simple_decl): Likewise.
5008 (dump_function_decl): Likewise.
5009 (cv_to_string): Likewise.
5010 (dump_type_prefix): Likewise. Adjust return void.
5011 * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
5013 (pp_cxx_template_keyword_if_needed): Document.
5014 (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
5015 (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
5016 MUST_NOT_THROW_EXPR.
5018 2004-03-21 Mark Mitchell <mark@codesourcery.com>
5021 * decl.c (cp_finish_decl): Compute the size of arrays declared in
5022 templates, if their type is non-dependent.
5024 2004-03-19 Mark Mitchell <mark@codesourcery.com>
5026 * call.c (build_op_delete_call): Do not forget the placement
5027 arguments when iterating through mutiple delete operators.
5029 * cp-tree.h (svaed_scope): Remove last_parms.
5030 (NEW_DELETE_OPNAME_P): New macro.
5031 (last_function_parms): Remove.
5032 (do_friend): Adjust prototype.
5033 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
5034 using last_function_parms.
5035 (grokfndecl): Take the PARM_DECLs as an argument, rather than
5036 using last_function_parms.
5037 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
5038 for class-specific operator new and operator delete.
5039 (grok_op_properties): Do not look for allocation functions with
5041 (start_function): Use DECL_ARGUMENTS instead of
5042 last_function_parms.
5043 * decl.h (last_function_parms): Do not declare.
5044 * decl2.c (grokclassfn): Do not use last_function_parms.
5045 * friend.c (do_friend): Remove parmdecls parameter.
5046 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
5047 (pop_from_top_level): Do not restore it.
5048 * pt.c (check_explicit_specialization): Do not adjust
5049 last_function_parms.
5051 * name-lookup.c (do_local_using_decl): Create a local binding for
5052 types brought in via using declarations.
5054 * name-lookup.c (lookup_arg_dependent): Handle block-scope
5055 function declarations correctly.
5057 * semantics.c (finish_id_expression): Correct handling of
5058 conversion operators to dependent types.
5060 * typeck.c (lookup_destructor): Allow the use of destructors from
5063 2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5065 * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
5066 TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
5067 * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
5068 the field is named TEMPLATE_TYPE_PARM_INDEX.
5070 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5073 * parser.c (cp_parser_functional_cast): A cast to anything
5074 but integral or enumaration type is not an integral constant
5076 * pt.c (value_dependent_expression_p): Handle cast expressions
5077 without operands (such as "int()").
5079 2004-03-18 Mark Mitchell <mark@codesourcery.com>
5081 * semantics.c (finish_pseudo_destructor_expr): Allow differing
5082 cv-qualification between the type named by the
5083 pseudo-destructor-name and the object-type.
5085 * search.c (accessible_base_p): Handle non-proper bases.
5087 * name-lookup.c (do_nonmember_using_decl): If a using declaration
5088 refers to a single overloaded function, set the type of the
5090 * tree.c (lvalue_type): Simplify.
5091 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
5093 (build_unary_op): Handle OVERLOADs with known types.
5095 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
5098 * parser.c (cp_parser_postfix_expression): Handle the use of
5099 "typename" in non-dependent contexts. Convert appropriately when
5100 when using a qualified name after "->" or ".".
5102 * call.c (conditional_conversion): Honor the requirement that some
5103 conversions refer to the original object.
5105 2004-03-18 Mark Mitchell <mark@codesourcery.com>
5107 * call.c (build_conditional_expr): Do not call force_rvalue for
5108 operands of void_type when the conditional expression itself has
5110 * name-lookup.c (pushdecl): Don't consider a declaration of a
5111 function named "main" to be an overload of a type named "main".
5112 * parser.c (cp_parser_template_name): Perform name lookup when the
5113 template name is proceeded by "template" if the qualifying scope
5115 * typeck.c (composite_pointer_type_r): Correctly handle
5116 pointer-to-member types.
5117 (build_const_cast): Likewise.
5119 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5121 * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
5122 * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
5123 (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
5124 (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
5125 (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
5126 (TYPEOF_TYPE_EXPR): New macro.
5127 * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
5128 * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
5129 * pt.c (tsubst): Likewise.
5130 * semantics.c (finish_typeof): Likewise.
5131 * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
5132 and TEMPLATE_TYPE_PARM.
5133 * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
5134 (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
5136 2004-03-16 Mark Mitchell <mark@codesourcery.com>
5139 * cp-tree.h (build_new_op): Change prototype.
5140 (build_x_binary_op): Likewise.
5141 * call.c (build_new_op): Add overloaded_p parameter.
5142 * decl2.c (grok_array_decl): Adjust call to build_new_op.
5143 * parser.c (cp_parser_binary_expression): Note that uses of
5144 overloaded operators prevents an expression from being considered
5145 an integral constant.
5146 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
5148 * semantics.c (finish_call_expr): Likewise.
5149 * typeck.c (rationalize_conditional_expr): Likewise.
5150 (build_x_indirect_ref): Likewise.
5151 (build_x_binary_op): Likewise.
5152 (build_x_unary_op): Likewise.
5153 (build_x_compound_expr): Likewise.
5154 (build_modify_expr): Likewise.
5155 * typeck2.c (build_x_arrow): Likewise.
5157 2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
5159 * cp-lang.c, ptree.c: Update copyright.
5161 2004-03-13 Mark Mitchell <mark@codesourcery.com>
5164 * parser.c (cp_parser_non_integral_constant_expression): Encode
5165 more of the idiom that surrounded calls to this function within
5167 (cp_parser_primary_expression): Adjust accordingly.
5168 (cp_parser_postfix_expression): Likewise.
5169 (cp_parser_unary_expression): Likewise.
5170 (cp_parser_cast_expression): Likewise.
5171 (cp_parser_assignment_expression): Likewise.
5172 (cp_parser_expression): Likewise.
5173 (cp_parser_new_expression): Note that new-expressions are not
5174 allowed in integral constant expressions.
5175 (cp_parser_delete_expression): Likewise.
5177 2004-03-12 Matt Austern <austern@apple.com>
5179 * decl2.c (maybe_make_one_only): Look at
5180 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
5181 to make an explicit instantiation weak.
5182 * method.c (use_thunk): Make sure we call comdat_linkage
5184 * pt.c (do_type_instantiation): On systems where weak symbols
5185 don't go in a static archive's TOC, explicit instantiation of a
5186 class must imply *explicit* instantiation of its memeber.
5188 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
5190 * call.c, cp-tree.h, pt.c: Fix comment typos.
5192 2004-03-10 Mark Mitchell <mark@codesourcery.com>
5195 * decl.c (xref_tag): Disregard non-type declarations when
5196 looking up a tagged type.
5198 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
5201 * call.c (convert_like_real): Build a const qualified temporary,
5202 when testing ctor access.
5204 2004-03-09 Mark Mitchell <mark@codesourcery.com>
5206 * call.c (initialize_reference): Fix typo.
5208 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5211 * pt.c (determine_specialization): For member templates, match also
5215 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
5217 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
5219 2004-03-09 Mark Mitchell <mark@codesourcery.com>
5222 * call.c (initialize_reference): Handle initializers that are
5223 class-member access expressions applies to rvalues.
5225 2004-03-09 Mark Mitchell <mark@codesourcery.com>
5228 * name-lookup.c (supplement_binding): Ignore functions that are
5229 marked DECL_ANTICIPATED.
5231 2004-03-08 Mark Mitchell <mark@codesourcery.com>
5234 * class.c (check_field_decls): Complain about non-static data
5235 members of reference type in unions. Propagate
5236 CLASSTYPE_REF_FIELDS_NEED_INIT and
5237 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
5239 * init.c (perform_member_init): Complain about mbmers with const
5240 type that are not explicitly initialized.
5242 2004-03-08 Mark Mitchell <mark@codesourcery.com>
5244 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
5245 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
5246 (lang_identifier): Remove implicit_decl and error_locus.
5247 (IDENTIFIER_IMPLICIT_DECL): Remove.
5248 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
5249 (IDENTIFIER_ERROR_LOCUS): Likewise.
5250 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
5251 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
5252 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
5253 (implicitly_declare): Remove.
5254 * decl.c (warn_extern_redeclared_static): Remove check of
5255 IDENTIFIER_IMPLICIT_DECL.
5256 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
5257 (implicitly_declare): Remove.
5258 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
5259 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
5260 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
5261 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
5262 in the innermost scope, rather than at namespace scope.
5263 * name-lookup.c (push_local_binding): Give it external linkage.
5264 (pushdecl): Remove dead code.
5265 * name-lookup.h (push_local_binding): Declare it.
5266 * ptree.c (cxx_print_identifier): Don't print
5267 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
5268 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
5269 not IDENTIFIER_ERROR_LOCUS.
5270 * typeck.c (build_function_call): Remove dead code.
5272 2004-03-08 Jason Merrill <jason@redhat.com>
5275 * decl.c (xref_tag): Remove attribute handling.
5276 * cp-tree.h: Adjust prototype.
5277 * decl.c, parser.c, rtti.c: Adjust callers.
5278 * parser.c (cp_parser_class_head): Pass back attributes in the
5280 (cp_parser_class_specifier): Adjust.
5282 2004-03-08 Matt Austern <austern@apple.com>
5285 * name-lookup.c (add_decl_to_level): Add extern variables, as well
5286 as static, to static_decls array.
5288 2004-03-05 Jason Merrill <jason@redhat.com>
5290 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
5292 2004-03-04 Geoffrey Keating <geoffk@apple.com>
5294 * decl.c (grokfndecl): Update old incorrect comment.
5295 (grokvardecl): Diagnose C++ variables of type with no linkage.
5297 2004-03-01 Mark Mitchell <mark@codesourcery.com>
5300 * pt.c (build_non_dependent_expr): Do not create a
5301 NON_DEPENDENT_EXPR for a THROW_EXPR.
5303 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
5306 * error.c (dump_expr): Handle THROW_EXPR.
5308 2004-03-01 Mark Mitchell <mark@codesourcery.com>
5311 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
5312 lookup if ordinary name-lookup finds a non-function.
5313 * pt.c (tsubst_copy_and_build): Likewise.
5316 * parser.c (cp_parser_late_parsing_default_args): Check that there
5317 are no extra tokens after the end of the default-argument
5320 2004-03-01 Mark Mitchell <mark@codesourcery.com>
5323 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
5324 having C++ linkage for name-mangling purposes.
5327 * parser.c (cp_parser_direct_declarator): Recognize constructor
5328 declarators that use a template-id to name the class being
5332 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
5333 (tsubst_expr): Do not call tsubst_copy, even when
5334 processing_template_decl.
5336 2004-03-01 Jeff Law <law@redhat.com>
5338 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
5341 2004-02-29 Mark Mitchell <mark@codesourcery.com>
5344 * name-lookup.h (push_scope): Change prototype.
5345 * name-lookup.c (push_scope): Do not reenter the current class
5347 * decl.c (grokfndecl): Check return code from push_scope before
5349 * decl2.c (check_classfn): Likewise.
5350 * parser.c (cp_parser_conversion_function_id): Likewise.
5351 (cp_parser_init_declarator): Likewise.
5352 (cp_parser_direct_declarator): Likewise.
5353 (cp_parser_class_specifier): Likewise.
5354 (cp_parser_class_head): Likewise.
5355 (cp_parser_lookup_name): Likewise.
5356 (cp_parser_constructor_declarator_p): Likewise.
5357 * pt.c (instantiate_class_template): Likewise.
5358 (resolve_typename_type): Likewise.
5360 2004-02-29 Mark Mitchell <mark@codesourcery.com>
5363 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
5367 * class.c (update_vtable_entry_for_fn): Do not go through
5368 covariance machinery if the type returned by an overrider is the
5369 same as the original.
5371 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
5373 * call.c: Fix a comment typo.
5375 2004-02-27 Ziemowit Laski <zlaski@apple.com>
5377 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
5379 2004-02-26 Mark Mitchell <mark@codesourcery.com>
5382 * parser.c (cp_parser_parameter_declaration_list): Commit
5383 to fewer tentative parses.
5385 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5388 * pt.c (dependent_type_p_r): A template template parameter is a
5391 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5394 * mangle.c (write_template_arg_literal): Don't rely on identity for
5397 2004-02-24 Jason Merrill <jason@redhat.com>
5399 * tree.c (build_exception_variant): Use check_qualified_type.
5401 2004-02-23 Zack Weinberg <zack@codesourcery.com>
5402 Kazu Hirata <kazu@cs.umass.edu>
5404 * decl.c (cxx_init_decl_processing): Don't check
5405 flag_writable_strings.
5407 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
5410 * typeck.c (maybe_warn_about_returning_address_of_location):
5411 Change check for VAR_DECL to use DECL_P instead.
5413 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5416 * cvt.c (build_expr_type_conversion): Type must be complete before
5417 looking up for conversions.
5419 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5422 * name-lookup.c (arg_assoc_class): Don't look into template
5423 arguments if it is not a primary template.
5425 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
5428 * method.c (use_thunk): Always clone function argument tree.
5430 2004-02-20 Mark Mitchell <mark@codesourcery.com>
5433 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
5436 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
5437 for all type variants.
5439 2004-02-19 Mark Mitchell <mark@codesourcery.com>
5442 * decl.c (duplicate_decls): Return error_mark_node for invalid
5444 * name-lookup.c (push_namespace): Ignore the return value from
5446 * pt.c (push_template_decl_real): Robustify.
5449 * name-lookup.c (push_class_level_binding): Do not complain about
5450 adding a binding for a member whose name is the same as the
5451 enclosing class if the member is located in a base class of the
5454 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5457 * parser.c (cp_parser_new_expression): Parse an ill-formed
5458 direct-new-declarator after a parenthesized type-id to emit good
5461 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
5463 * cp-tree.def, cvt.c: Update copyright.
5465 2004-02-17 Mark Mitchell <mark@codesourcery.com>
5468 * cp-tree.h (abi_version_at_least): Remove.
5469 * mangle.c: Include flags.h.
5471 2004-02-15 Mark Mitchell <mark@codesourcery.com>
5474 * call.c (build_conditional_expr): Handle conversions between
5475 class types which result in differently cv-qualified type
5479 * class.c (delete_duplicate_fields_1): Remove.
5480 (delete_duplicate_fields): Likewise.
5481 (finish_struct_anon): Remove check for members with the same name
5482 as their enclosing class.
5483 (check_field_decls): Do not call duplicate_fields.
5484 * decl.c (grokdeclarator): Remove check for static data members
5485 with the same name as their enclosing class.
5486 * name-lookup.c (push_class_level_binding): Check for members with
5487 the same name as their enclosing class.
5489 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
5492 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
5494 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5497 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
5498 has full set of arguments.
5500 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5503 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
5505 2004-02-13 Mark Mitchell <mark@codesourcery.com>
5508 * cp-tree.h (delete_sanity): Change prototype.
5509 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
5510 Remove dead code. Adjust code to warn about deleting an array.
5511 * typekc.c (decay_conversion): Use build_address and build_nop.
5514 * search.c (accessible_p): Do not check access in thunks.
5517 * call.c (build_conditional_expr): Call force_rvalue on the
5518 non-void operand in the case that one result is a throw-expression
5519 and the other is not.
5521 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
5524 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
5525 the type name and look ahead for ::~, and bail out early with a
5526 better error message if the parse is going to fail.
5528 2004-02-12 Mark Mitchell <mark@codesourcery.com>
5530 * call.c (conversion_kind): New type.
5531 (conversion_rank): Likewise.
5532 (conversion): Likewise.
5533 (CONVERSION_RANK): New macro.
5534 (conversion_obstack): New variable.
5535 (obstack_initialized): Likewise.
5536 (z_candidate): Change type of convs and second_conv.
5537 (candidate_warning): New type.
5538 (IDENTITY_RANK): Remove.
5539 (EXACT_RANK): Likewise.
5540 (PROMO_RANK): Likewise.
5541 (STD_RANK): Likewise.
5542 (PBOOL_RANK): Likewise.
5543 (USER_RANK): Likewise.
5544 (ELLIPSIS_RANK): Likewise.
5545 (BAD_RANK): Likewise.
5546 (ICS_RANK): Likewise.
5547 (ICS_STD_RANK): Likewise.
5548 (ICS_USER_FLAG): Likewise.
5549 (ICS_ELLIPSIS_FLAG): Likewise.
5550 (ICS_THIS_FLAG): Likewise.
5551 (ICS_BAD_FLAG): Likewise.
5552 (NEED_TEMPORARY_P): Likewise.
5553 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
5554 (USER_CONV_CAND): Likewise.
5555 (USER_CONV_FN): Likewise.
5556 (conversion_obstack_alloc): New function.
5557 (alloc_conversion): Likewise.
5558 (validate_conversion_obstack): Likewise.
5559 (alloc_conversions): Likewise.
5560 (build_conv): Adjust to deal with new conversion data structures.
5561 (build_identity_conv): New function.
5562 (build_ambiguous_conv): Likewise.
5563 (standard_conversion): Adjust to deal with new conversion data
5565 (convert_class_to_reference): Likewise.
5566 (direct_reference_binding): Likewise.
5567 (reference_binding): Likewise.
5568 (implicit_conversion): Likewise.
5569 (add_candidate): Likewise.
5570 (add_function_candidate): Likewise.
5571 (add_conv_candidate): Likewise.
5572 (build_builtin_candidate): Likewise.
5573 (print_z_candidate): Likewise.
5574 (merge_conversion_sequences): Likewise.
5575 (build_user_type_conversion_1): Likewise.
5576 (build_user_type_conversion): Likewise.
5577 (build_new_function_call): Likewise.
5578 (build_object_call): Likewise.
5579 (conditional_conversion): Likewise.
5580 (build_conditional_expr): Likewise.
5581 (build_new_op): Likewise.
5582 (build_op_delete_call): Likewise.
5583 (convert_like_real): Likewise.
5584 (build_over_call): Likewise.
5585 (build_new_method_call): Likewise.
5586 (is_subseq): Likewise.
5587 (maybe_handle_implicit_object): Likewise.
5588 (maybe_handle_ref_bind): Likewise.
5589 (compare_ics): Likewise.
5590 (source_type): Likewise.
5591 (add_warning): Likewise.
5593 (can_convert_arg): Likewise.
5594 (can_convert_arg_bad): Likewise.
5595 (perform_implicit_conversion): Likewise.
5596 (perform_direct_initialization_if_possible): Likewise.
5597 (initialize_reference): Likewise.
5598 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
5599 * cp-tree.def (WRAPPER): Likewise.
5600 (IDENTITY_CONV): Remove.
5601 (LVALUE_CONV): Likewise.
5602 (QUAL_CONV): Likewise.
5603 (STD_CONV): Likewise.
5604 (PTR_CONV): Likewise.
5605 (PMEM_CONV): Likewise.
5606 (BASE_CONV): Likewise.
5607 (REF_BIND): Likewise.
5608 (USER_CONV): Likewise.
5609 (AMBIG_CONV): Likewise.
5610 (RVALUE_CONV): Likewise.
5611 * cp-tree.h (tree_wrapper): Remove.
5612 (WRAPPER_ZC): Remove.
5613 (lang_tree_node): Remove wrapper.
5614 (LOOKUP_SPECULATIVELY): Remove.
5615 (build_op_delete_call): Adjust prototype.
5616 (validate_conversion_obstack): Declare.
5617 (build_zc_wrapper): Remove.
5618 * cvt.c (convert_to_reference): Remove dead code.
5619 (ocp_convert): Likewise.
5620 * decl.c (redeclaration_error_message): Correct handling of
5622 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
5623 (cp_tree_node_structure): Remove WRAPPER case.
5624 * decl2.c (finish_file): Call validate_conversion_obstack.
5625 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
5626 (build_op_delete_call): Likewise.
5627 (build_x_delete): Likewise.
5628 (build_delete): Adjust call to build_op_delete_call.
5629 * pt.c (tsubst_friend_declaration): Adjust code to determine
5630 whether or not a friend template is a definition.
5631 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
5632 * tree.c (build_zc_wrapper): Remove.
5634 2004-02-12 Zack Weinberg <zack@codesourcery.com>
5636 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
5637 * cp-tree.h: Don't declare cxx_builtin_type_decls.
5638 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
5639 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
5641 2004-02-10 Mark Mitchell <mark@codesourcery.com>
5643 * typeck.c (lookup_destructor): Fix typo in error message.
5645 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
5647 * call.c, parser.c, tree.c: Fix comment typos.
5649 2004-02-07 Zack Weinberg <zack@codesourcery.com>
5652 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
5653 * decl.c (duplicate_decls, start_function): Likewise.
5655 2004-02-07 Zack Weinberg <zack@codesourcery.com>
5657 * name-lookup.c (pushdecl): Issue shadow warnings directly.
5658 * parser.c (free_parser_stacks): Delete.
5660 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
5662 * rtti.c: Update copyright.
5664 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5667 * decl.c (require_complete_types_for_parms): Do not insert
5668 error_mark_node in the parameter list.
5670 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5673 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
5674 error when terminator can not be found.
5676 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
5678 Make-lang.in (po-generated): Delete.
5680 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
5682 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
5683 targetm.calls.promote_prototypes.
5685 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
5689 2004-01-15 Geoffrey Keating <geoffk@apple.com>
5691 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
5692 (handle_pragma_implementation): Likewise.
5694 2004-02-05 Mark Mitchell <mark@codesourcery.com>
5697 * typeck.c (lookup_destructor): Tweak error message.
5699 2004-02-05 Jan Hubicka <jh@suse.cz>
5701 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
5704 2004-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5707 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
5708 code, only emits the diagnostic now. Added lookup of the identifier
5709 and support for qualified ids.
5710 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
5711 Parse an (invalid) type name as id-expression within a declarator.
5712 (cp_parser_simple_declaration): Use it.
5713 (cp_parser_member_declaration): Likewise.
5714 (cp_parser_make_typename_type): New function. Handle errors through
5715 cp_parser_diagnose_invalid_typename.
5716 (cp_parser_elaborated_type_specifier): Use it.
5718 2004-02-04 Mark Mitchell <mark@codesourcery.com>
5721 * call.c (convert_like_real): Use "converting" rather than
5722 "argument" as the descriptive keyword to
5723 dubious_conversion_warnings.
5724 * typeck.c (convert_for_assignment): Do not call
5725 dubious_conversion_warnings.
5727 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5730 * init.c (build_delete): Emit a more informative error message in
5731 case of an incomplete type, and on the correct source line.
5733 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
5735 * error.c, search.c: Update copyright.
5737 2004-02-04 Mark Mitchell <mark@codesourcery.com>
5740 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
5741 linkage for the typeinfo name string.
5743 2004-02-04 Mark Mitchell <mark@codesourcery.com>
5746 * cp-tree.h (fold_non_dependent_expr): New function.
5747 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
5748 (cp_parser_template_argument): Use fold_non_dependent_expr.
5749 (cp_parser_direct_declarator): Likewise.
5750 * pt.c (fold_non_dependent_expr): New function.
5751 (convert_nontype_argument): Use it.
5752 (tsubst_qualified_id): Simplify.
5753 (tsubst_copy_and_build): Likewise.
5755 2004-02-04 Mark Mitchell <mark@codesourcery.com>
5757 * decl.c (cxx_push_function_context): Do not set
5758 current_function_is_thunk.
5759 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
5762 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5765 * pt.c (more_specialized_class): Increase processing_template_decl
5766 while partial ordering.
5768 2004-02-03 Mark Mitchell <mark@codesourcery.com>
5771 * decl.c (start_function): Do not call pushdecl for any
5772 instantiation or specialization of a primary template.
5774 2004-02-03 Mark Mitchell <mark@codesourcery.com>
5777 * parser.c (cp_parser_class_name): Robustify.
5780 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
5783 * semantics.c (finish_id_expression): Do not return an
5784 IDENTIFIER_NODE when lookup finds a PARM_DECL.
5786 2004-02-03 Mark Mitchell <mark@codesourcery.com>
5789 * pt.c (build_non_dependent_expr): Do not build
5790 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
5793 * semantics.c (finish_id_expression): Do not return an
5794 IDENTIFIER_NODE when lookup finds a VAR_DECL.
5797 * parser.c (cp_parser_simple_declaration): When skipping to the
5798 end of the statement swallow the terminating semicolon.
5800 2004-02-02 Mark Mitchell <mark@codesourcery.com>
5803 * init.c (build_offset_ref): Improve error recovery for invalid
5804 uses of non-static member functions.
5807 * cp-tree.h (cp_build_type_attribute_variant): New function.
5808 * class.c (build_clone): Use cp_build_type_attribute_variant.
5809 * decl.c (duplicate_decls): Likewise.
5810 * pt.c (copy_default_args_to_explicit_spec): Likewise.
5811 (tsubst_function_type): Likewise.
5812 * tree.c (build_exception_variant): Check attributes before
5813 concluding that two types are the same.
5814 (cp_build_type-attribute_variant): New method.
5815 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
5818 * call.c (convert_class_to_reference): Keep better track of
5819 pedantically invalid user-defined conversions.
5821 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5824 * pt.c (tsubst_qualified_id): Improved error message when a type
5825 is expected but not found.
5827 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
5829 * class.c: Fix comment typos.
5831 * error.c: Likewise.
5832 * parser.c: Likewise.
5834 * search.c: Likewise.
5835 * typeck.c: Likewise.
5837 2004-01-30 Richard Henderson <rth@redhat.com>
5840 * method.c (use_thunk): Don't force_target_expr for void thunks.
5841 * tree.c (build_target_expr_with_type): Assert non-void type.
5842 (force_target_expr): Likewise.
5844 2004-01-30 Michael Matz <matz@suse.de>
5846 * parser.c (cp_parser_labeled_statement): Accept case ranges.
5848 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5852 * decl.c (grokdeclarator): Check immediatly type completeness for
5853 non-dependent types.
5855 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5858 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
5859 a sizeof expression.block
5861 2004-01-29 Mark Mitchell <mark@codesourcery.com>
5864 * mangle.c (write_encoding): Correct encoding of member template
5867 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5869 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
5870 template name as it was `<::' (digraph typo).
5871 (cp_parser_nth_token_starts_template_argument_list_p): New function.
5872 (cp_parser_id_expression): Use it.
5873 (cp_parser_nested_name_specifier_opt): Likewise.
5874 (cp_parser_template_name): Likewise.
5875 (cp_parser_class_name): Likewise.
5876 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
5878 2004-01-28 Mark Mitchell <mark@codesourcery.com>
5881 * typeck.c (merge_types): Do not merge attributes into
5885 * parser.c (cp_parser_direct_declarator): Do not prevent
5886 backtracking inside a parenthesized declarator.
5887 (cp_parser_parameter_declaration): Fix typo in comment.
5889 2004-01-28 Jan Hubicka <jh@suse.cz>
5891 * semantics.c (expand_body) Do emit_associated_thunks before
5894 2004-01-27 Devang Patel <dpatel@apple.com>
5896 * name-lookup.c: Include "debug.h"
5897 (do_namespace_alias): Invoke debug_hooks to emit debug info
5898 for namespace alias.
5899 (do_local_using_decl): Invoke debug_hooks to emit debug info
5901 (do_class_using_decl): Same.
5902 (do_toplevel_using_decl): Same.
5903 (do_using_directive): Same.
5904 (cp_emit_debug_info_for_using): New function.
5905 * Make-lang.in (cp/parser.o): Depend on debug.h
5906 (cp/name-lookup.o): Same.
5908 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5910 * cp-tree.h (language_function, lang_type_header): Use
5912 * name-lookup.h (cp_binding_level): Likewise.
5914 2004-01-26 Mark Mitchell <mark@codesourcery.com>
5917 * semantics.c (finish_for_expr): Check for unresolved overloaded
5920 * class.c (add_method): Just check processing_template_decl to
5921 determine whether or not we are within a template.
5922 * decl2.c (maybe_retrofit_in_chrg): Likewise.
5923 * init.c (decl_constant_value): Check the type of the declaration,
5925 * name-lookup.c (maybe_push_to_top_level): Rename to ...
5926 (push_to_top_level): ... this.
5927 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
5928 * pt.c (push_template_decl_real): Reorder condition for speed.
5929 (convert_template_argument): Use dependency-checking functions in
5930 place of uses_template_parms.
5931 (lookup_template_class): Avoid calling uses_template_parms more
5933 (uses_template_parms): Reimplement, using dependency-checking
5935 (instantiate_class_template): Use push_to_top_level, not
5936 maybe_push_to_top_level.
5937 (type_unification_real): Simplify.
5938 (type_dependent_expression_p): Handle OFFSET_REFs and
5940 (any_dependent_template_arguments_p): Handle multiple levels of
5942 * semantics.c (expand_or_defer_fn): Do not check
5943 uses_template_parms for template instantiations.
5944 * typeck.c (comptypes): Avoid calling cp_type_quals.
5946 2004-01-25 Mark Mitchell <mark@codesourcery.com>
5949 * call.c (build_over_call): Do not convert arguments when
5950 processing a template.
5951 * pt.c (build_non_dependent_expr): Do not build a
5952 NON_DEPENDENT_EXPR for arithmetic constants.
5954 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5957 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
5958 returns a TYPE_DECL. no further lookup is required.
5959 * semantics.c (check_template_template_default_arg): A TYPE_DECL
5960 is invalid. Rework to give better diagnostics.
5962 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5965 * pt.c (instantiate_class_template): Add an error_mark_node
5967 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
5969 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
5972 * decl.c (finish_function): Move the call to
5973 finish_fname_decls below the call to
5974 finish_eh_spec_block.
5976 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
5978 * optimize.c, typeck2.c: Update copyright.
5980 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
5982 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
5983 init.c, mangle.c, typeck.c: Update copyright.
5985 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
5987 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
5989 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
5991 * Make-lang.in: Replace $(docdir) with doc.
5992 (c++.info, c++.srcinfo): Dummy entry.
5993 (c++.man, c++.srcman): New rules.
5994 (c++.install-man): Revamp rule.
5996 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
5998 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
5999 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
6000 immediate $(shell) instead of deferred backquote.
6002 2004-01-19 Mark Mitchell <mark@codesourcery.com>
6005 * parser.c (cp_parser_postfix_expression): When encountering
6006 incomplete type on left-hand side of "->" or ".", treat the entire
6007 expression as erroneous.
6010 * call.c (build_field_call): Remove.
6011 (n_build_method_call): Likewise.
6012 (build_method_call): Likewise.
6013 (build_new_method_call): Do not call build_field_call.
6014 * class.c (n_build_method_call): Remove.
6015 (print_class_statistics): Do not print it.
6016 * cp-tree.h (build_method_call): Remove declaration.
6017 (finish_object_call_expr): Likewise.
6018 (build_new_1): Do not use build_method_call.
6019 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
6020 when the function appearing on the right-hand-side of "." or "->"
6021 is not actually a function.
6022 * pt.c (tsubst_copy_and_build): Likewise.
6023 * semantics.c (finish_object_call_expr): Remove.
6025 2004-01-18 Mark Mitchell <mark@codesourcery.com>
6028 * pt.c (tsubst): Use finish_typeof.
6030 2004-01-18 Jason Merrill <jason@redhat.com>
6033 * except.c (build_throw): In a template, set
6034 current_function_returns_abnormally.
6036 2004-01-17 Fred Fish <fnf@intrinsity.com>
6039 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
6040 except don't call array_type_nelts() with a VECTOR_TYPE.
6042 2004-01-16 Jan Hubicka <jh@suse.cz>
6044 * mangle.c (write_mangled_name): Remove inline modifier.
6046 2004-01-16 Mark Mitchell <mark@codesourcery.com>
6049 * decl.c (compute_array_index_type): Fix grammar in comment.
6050 * init.c (build_zero_init): Handle zero-sized arrays correctly.
6053 * call.c (name_as_c_string): Print conversion operator names
6057 * call.c (initialize_reference): Pass -1 for inner parameter to
6060 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6063 * parser.c (cp_parser_base_specifier): Check for an invalid
6064 keyword `typename' and emit an user-friendly error message.
6066 2004-01-15 Geoffrey Keating <geoffk@apple.com>
6069 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
6070 (handle_pragma_implementation): Likewise.
6072 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6075 * typeck.c (build_class_member_access_expr): Allow to access members
6076 of the currently open class.
6077 (finish_class_member_access_expr): Likewise.
6079 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
6082 * name-lookup.c (validate_nonmember_using_decl): Take scope and
6083 name by value, instead of computing them.
6084 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
6085 arguments. Pass them to validate_nonmember_using_decl.
6086 * name-lookup.h (do_local_using_decl): Adjust.
6087 (do_toplevel_using_decl): Likewise.
6088 * parser.c (cp_parser_using_declaration): Likewise.
6089 * pt.c (tsubst_expr): Likewise.
6091 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
6095 * name-lookup.c (qualified_lookup_using_namespace): Search
6096 strongly-associated namespaces first, and only then try other
6099 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
6101 * Make-lang.in (c++.srcextra): Dummy entry.
6103 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6106 * parser.c (cp_parser_template_name): Don't try to parse a
6107 conversion-function-id, as it cannot be a template-name.
6108 (cp_parser_simple_type_specifier): Check for invalid template-ids
6109 even after a built-in type.
6111 2004-01-14 Jan Hubicka <jh@suse.cz>
6114 * pt.c (instantiate_decl): Do not increase function_depth.
6116 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
6120 * parser.c (cp_parser_elaborated_type_specifier): Warn about
6121 attributes and discard.
6122 * decl.c (xref_tag): Don't overwite existing attributes with
6125 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6128 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
6129 is no destructor while looking up a BIT_NOT_EXPR.
6131 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
6133 * cxxfilt.c: Remove unused file.
6135 2004-01-14 Jan Hubicka <jh@suse.cz>
6137 Partial fix to PR c++/12850
6138 * decl2.c (mark_used): Do not proactively instantiate templates
6139 when compiling in unit-at-a-time or not optimizing.
6140 * optimize.c (maybe_clone_body): Do not increase function depth.
6142 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6145 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
6147 2004-01-12 Steven Bosscher <stevenb@suse.de>
6150 * parser.c (cp_parser_member_declaration): Any non-type is also
6151 not a class or a function.
6153 2004-01-12 Jason Merrill <jason@redhat.com>
6156 * class.c (build_base_path): Do not mark vtable references as
6158 (build_vtbl_ref_1): Likewise.
6160 2004-01-12 Richard Henderson <rth@redhat.com>
6163 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
6164 (store_init_value): Use it.
6165 * decl.c (check_initializer): Expect full initialization code
6166 from store_init_value.
6167 * init.c (expand_aggr_init_1): Likewise.
6168 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
6170 2004-01-12 Mark Mitchell <mark@codesourcery.com>
6172 * class.c (layout_class_type): For non-POD class types, also copy
6173 the DECL_SIZE and DECL_MODE of fields to the base class type.
6175 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6178 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
6179 calling regenerate_decl_from_template.
6181 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
6184 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
6185 decl-specifier occurring along with a class definition.
6187 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
6189 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
6190 clauses to comments describing declares_class_or_enum.
6191 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
6194 2004-01-12 Jan Hubicka <jh@suse.cz>
6196 * pt.c (for_each_template_parm): Do not check for duplicates.
6197 (for_each_template_parm): Use walk_tree duplicate checking code.
6199 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
6202 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
6203 is error_mark_node, don't add any more decl_specs.
6204 (cp_parser_init_declarator): After committing to a declaration, if
6205 the decl_specifiers start with error_mark_node, issue an error and
6206 change the type to "int".
6208 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
6211 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
6213 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6217 * pt.c (tsubst): Substitution must fail if we are attempting to
6218 create an array with element type that is an abstract class type.
6219 * decl.c (cp_finish_decl): Strip pointers and array types recursively
6220 before calling abstract_virtuals_error.
6222 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
6224 * name-lookup.c (qualified_lookup_using_namespace): Consider
6225 strong using directives even if we've already found a binding.
6227 2004-01-09 Mark Mitchell <mark@codesourcery.com>
6229 * cp-tree.h (cxx_expand_expr): Change prototype.
6230 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
6232 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6235 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
6236 looking into them recursively. They can be there because of the
6237 new __offsetof__ extension.
6239 2004-01-07 Zack Weinberg <zack@codesourcery.com>
6241 * parser.c (cp_parser_save_member_function_body): Mark the
6244 2004-01-05 Mark Mitchell <mark@codesourcery.com>
6247 * class.c (build_clone): Copy type attributes from the original
6248 function to the clone.
6251 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
6252 references as constant.
6255 * parser.c (cp_parser_explicit_instantiation): Improve error
6257 (cp_parser_require): Improve indication of the error location.
6260 * parser.c (cp_parser_class_head): Reorder logic to check for
6261 invalid qualification.
6263 2004-01-04 Mark Mitchell <mark@codesourcery.com>
6266 * name-lookup.c (lookup_using_namespace): Remove spacesp
6268 (unqualified_namespace_lookup): Likewise.
6269 (lookup_qualified_name): Adjust accordingly.
6270 (lookup_name_real): Likewise.
6271 (lookup_arg_dependent): Do not eliminate the namespace of the
6272 functions found by unqualified name lookup unless that is the
6275 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
6277 * semantics.c (push_deferring_access_checks): Fix format.
6278 (resume_deferring_access_checks): Likewise.
6279 (stop_deferring_access_checks): Likewise.
6280 (pop_deferring_access_checks): Likewise.
6281 (get_deferred_access_checks): Likewise.
6282 (pop_to_parent_deferring_access_checks): Likewise.
6283 (perform_deferred_access_checks): Likewise.
6284 (perform_or_defer_access_check): Likewise.
6286 2004-01-04 Richard Henderson <rth@redhat.com>
6288 * call.c (build_over_call): Don't create a save_expr of an
6289 aggregate, but rather its address.
6291 2004-01-04 Mark Mitchell <mark@codesourcery.com>
6294 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
6295 an offsetof expression.
6297 * parser.c (cp_parser_parameter_declaration): Fix comment.
6300 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
6301 (reference_binding): Set it when appropriate.
6302 (build_temp): New function, split out from ...
6303 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
6304 (initialize_reference): Likewise.
6307 * parser.c (cp_parser): Add in_type_id_in_expr_p.
6308 (cp_parser_new): Initialize it.
6309 (cp_parser_postfix_expression): Set it.
6310 (cp_parser_sizeof_operand): Likewise.
6311 (cp_parser_parameteR_declaration): Do not commit early to tenative
6312 parsers when in_type_id_in_expr_p is set.
6314 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6317 * parser.c (cp_parser_template_argument): Don't call
6318 make_unbound_class_template directly.
6319 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
6320 UNBOUND_CLASS_TEMPLATE tree node.
6322 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
6325 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
6327 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6330 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
6331 (DECL_FUNCTION_TEMPLATE_P): Use it.
6332 (DECL_CLASS_TEMPLATE_P): Likewise.
6333 * parser.c (cp_parser_lookup_name): Add is_template parameter.
6334 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
6335 (cp_parser_template_name): Likewise.
6336 (cp_parser_elaborated_type_specifier): Likewise.
6337 (cp_parser_namespace_name): Likewise.
6338 (cp_parser_class_name): Likewise.
6339 (cp_parser_lookup_name_simple): Likewise.
6341 See ChangeLog.3 for earlier changes.