1 2005-04-16 Mark Mitchell <mark@codesourcery.com>
4 * typeck.c (cxx_sizeof_or_alignof_type): Check whether the type to
5 which sizeof/alignof is dependent, rather than just whether we are
6 processing_template_decl.
8 2005-04-17 Kazu Hirata <kazu@cs.umass.edu>
10 * cp-tree.h (LOOKUP_GLOBAL): Remove.
11 (LOOKUP_ONLYCONVERTING, DIRECT_BIND, LOOKUP_NO_CONVERSION,
12 LOOKUP_DESTRUCTOR, LOOKUP_NO_TEMP_BIND, LOOKUP_PREFER_TYPES,
13 LOOKUP_PREFER_NAMESPACES, LOOKUP_CONSTRUCTOR_CALLABLE): Adjust
16 2005-04-15 Richard Henderson <rth@redhat.com>
19 * semantics.c (finish_call_expr): Call resolve_overloaded_builtin.
21 2005-04-15 Kazu Hirata <kazu@cs.umass.edu>
23 * cp-tree.h (lang_type_class): Remove redefined. Move
24 java_interface into where redefined was. Increment the width
26 (TYPE_REDEFINED): Remove.
28 2005-04-14 Kazu Hirata <kazu@cs.umass.edu>
30 * cp-tree.h (SET_TMPL_ARG, ENUM_TI_TEMPLATE, ENUM_TI_ARGS,
31 CLASSTYPE_TEMPLATE_LEVEL): Remove.
33 2005-04-11 Mark Mitchell <mark@codesourcery.com>
35 * decl2.c (determine_visibility): Don't use export_class_data.
36 (import_export_decl): Honor TARGET_CXX_CLASS_DATA_ALWAYS_WEAK and
37 TARGET_CXX_DETERMINE_CLASS_DATA_VISIBILITY.
39 2005-04-09 Kazu Hirata <kazu@cs.umass.edu>
41 * cp-tree.h (cxx_alignof): Remove.
43 * cp-tree.h (DECL_ARRAY_DELETE_OPERATOR_P): Remove.
45 * cp-tree.h (EXCEPTION_CLEANUP_NAME, B_SET, B_CLR, B_TST,
46 CONV_STATIC_CAST): Remove.
48 * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Remove.
50 * cp-tree.h (VF_BINFO_VALUE, VF_BASETYPE_VALUE): Remove.
52 * cp-tree.h (cp_deprecated): Remove.
54 2005-04-08 Ian Lance Taylor <ian@airs.com>
56 * cp-tree.def: Define FOR_STMT, WHILE_STMT, DO_STMT, BREAK_STMT,
57 CONTINUE_STMT, SWITCH_STMT.
58 * cp-tree.h (cp_stmt_codes): Add FOR_STMT, WHILE_STMT, DO_STMT,
59 BREAK_STMT, CONTINUE_STMT, SWITCH_STMT.
60 (WHILE_COND, WHILE_BODY): Define.
61 (DO_COND, DO_BODY): Define.
62 (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY): Define.
63 (SWITCH_STMT_COND, SWITCH_STMT_BODY, SWITCH_STMT_TYPE): Define.
64 * cp-gimplify.c (enum bc_t): Define.
65 (struct cp_gimplify_ctx, ctxp): Define.
66 (push_context, pop_context): New static functions.
67 (begin_bc_block, finish_bc_block): New static functions.
68 (build_bc_goto): New static function.
69 (gimplify_cp_loop, gimplify_for_stmt): New static functions.
70 (gimplify_while_stmt, gimplify_do_stmt): Likewise.
71 (gimplify_switch_stmt): Likewise.
72 (cp_gimplify_expr): Handle FOR_STMT, WHILE_STMT, DO_STMT,
73 SWITCH_STMT, CONTINUE_STMT, BREAK_STMT.
74 (cp_genericize): Call push_context and pop_context.
75 * semantics.c (finish_break_stmt): Just call build_stmt
76 (BREAK_STMT) rather than build_break_stmt.
77 (finish_continue_stmt): Corresponding change.
78 * decl.c (pop_switch): Update call to c_do_switch_warnings for new
80 * cxx-pretty-print.c (pp_cxx_statement): Handle SWITCH_STMT,
81 WHILE_STMT, DO_STMT, FOR_STMT, BREAK_STMT, CONTINUE_STMT.
82 * dump.c (cp_dump_tree): Likewise.
84 2005-04-08 Mark Mitchell <mark@codesourcery.com>
87 * parser.c (cp_parser_type_specifier_seq): Add is_condition
89 (cp_parser_new_type_id): Pass it.
90 (cp_parser_condition): Likewise.
91 (cp_parser_conversion_type_id): Likewise.
92 (cp_parser_type_id): Likewise.
93 (cp_parser_type_specifier_seq): In a condition, do not allow
94 invalid type-specifier combinations.
95 (cp_parser_exception_declaration): Adjust call to
96 cp_parser_type_specifier_seq.
98 * cp-tree.def (TINST_LEVEL): Document TINST_IN_SYSTEM_HEADER_P.
99 * cp-tree.h (struct tinst_level): Add in_system_header_p.
100 (TINST_IN_SYSTEM_HEADER_P): New macro.
101 (make_tinst_level): Remove.
102 * pt.c (lookup_template_class): Preserve DECL_IN_SYSTEM_HEADER on
103 the instantiated class.
104 (push_tinst_level): Do not use make_tinst_level. Set
105 TINST_IN_SYSTEM_HEADER_P.
106 (pop_tinst_level): Likewise.
107 (instantiate_class_template): Set in_system_header.
108 (instantiate_pending_templates): Likewise.
109 * tree.c (make_tinst_level): Remove.
111 2005-04-06 Joseph S. Myers <joseph@codesourcery.com>
113 * decl.c (start_decl): Apply pending #pragma weak regardless of
116 2005-04-06 Mark Mitchell <mark@codesourcery.com>
119 * pt.c (regenerate_decl_from_template): Copy attributes for
120 parameters from the pattern to the instantiation.
122 2005-04-05 Mark Mitchell <mark@codesourcery.com>
125 * cp-tree.def (OFFSET_REF): Correct comments.
126 * init.c (build_offset_ref): Remove misleading comment.
127 * typeck.c (build_unary_op): Handle pointer-to-member creation
128 here, rather than ...
129 (unary_complex_lvalue): ... here.
131 2005-04-06 Jason Merrill <jason@redhat.com>
134 * tree.c (stabilize_init): Don't bother trying to stabilize
135 something with no side-effects.
137 2005-04-05 Mark Mitchell <mark@codesourcery.com>
140 * decl.c (grokdeclarator): Correct attribute handling.
142 2005-04-05 Mark Mitchell <mark@codesourcery.com>
145 * decl2.c (import_export_decl): Use non-COMDAT external linkage
146 for virtual tables, typeinfo, etc. that will be emitted in only
147 one translation unit on systems without weak symbols.
149 2005-04-04 Mark Mitchell <mark@codesourcery.com>
152 * parser.c (cp_parser_template_name): Fix thinko.
154 2005-04-04 Nathan Sidwell <nathan@codesourcery.com>
157 * method.c (use_thunk): Protect covariant pointer return
158 adjustments from NULL pointers.
160 2005-04-04 Jan Hubicka <jh@suse.cz>
162 * decl2.c (finish_objects): Revert my previous patch.
163 (cp_finish_file): Likewise.
165 2005-04-03 Kazu Hirata <kazu@cs.umass.edu>
167 * pt.c: Fix comment typos.
169 2005-04-03 Nathan Sidwell <nathan@codesourcery.com>
172 * pt.c (more_specialized_fn): Member functions are unordered wrt
173 non-members. Conversion operators are unordered wrt other
176 2005-04-01 Nathan Sidwell <nathan@codesourcery.com>
178 * call.c (add_template_candidates_real): Remove length parameter
179 from fn_type_unification call.
180 * class.c (resolve_address_of_overloaded_function): Likewise
181 * cp-tree.h (fn_type_unification): Remove length parameter.
182 * pt.c (get_bindings_overload): Remove.
183 (get_bindings_real): Rename to ...
184 (get_bindings): ... here. Remove length and strict
185 parameters. Change return type flag to boolean. Remove original
187 (determine_specialization): Adjust get_bindings call.
188 (fn_type_unification): Remove length parameter. Adjust.
189 (type_unification_real): Remove length parameter. Adjust.
190 (resolve_overloaded_unification): Adjust get_bindings call.
191 (try_one_overload): Simplify confusing cascaded if control flow.
192 (unify): Remove length paramter from type_unification_real call.
193 (most_specialized_instantiation): Adjust get_bindings calls.
194 (most_specialized): Likewise.
196 2005-03-31 Nathan Sidwell <nathan@codesourcery.com>
198 PR c++/19203, implement DR 214
199 * call.c (joust): Use more_specialized_fn.
200 * cp-tree.h (DEDUCE_ORDER): Remove.
201 (more_specialized): Replace with ...
202 (more_specialized_fn): ... this.
203 * pt.c (maybe_adjust_types_for_deduction): Remove DEDUCE_ORDER
205 (type_unification_real): Remove DEDUCE_ORDER case.
206 (more_specialized): Replace with ...
207 (more_specialized_fn): ... this. Implement DR 214.
208 (most_specialized_instantiation): Use get_bindings_real directly.
210 2005-03-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
213 * call.c (build_new_op): Remove check for -Wsynth.
215 2005-03-31 Jan Hubicka <jh@suse.cz>
217 * decl2.c (finish_objects): Mark ctor as needed.
218 (cp_finish_file): Output variables only in nonunit-at-a-time.
220 2005-03-29 Richard Henderson <rth@redhat.com>
223 * decl.c (cp_complete_array_type): Rename from complete_array_type.
224 Use the new complete_array_type in c-common.c. Update all callers.
225 * cp-tree.h (cp_complete_array_type): Update to match.
227 2005-03-24 Geoffrey Keating <geoffk@apple.com>
229 * typeck.c (build_static_cast_1): Allow scalar_cast between
230 any integral, floating, or enumeration type.
232 2005-03-24 Steven Bosscher <stevenb@suse.de>
234 * typeck.c (comptypes): First determine if the types are compatible
235 from a target-independent point of view. Check target attributes
238 * class.c (build_base_path):
239 (build_vbase_offset_vtbl_entries):
240 (add_vcall_offset): Replace fold (buildN (...)) with fold_buildN.
241 * error.c (dump_expr): Likewise.
242 * init.c (build_zero_init, expand_cleanup_for_base,
243 build_vec_delete_1): Likewise.
244 * mangle.c (write_integer_cst): Likewise.
245 * method.c (thunk_adjust): Likewise.
246 * pt.c (convert_nontype_argument, tsubst, unify): Likewise.
247 * tree.c (cxx_print_statistics, array_type_nelts_total): Likewise.
248 * typeck.c (build_ptrmemfunc_access_expr,
249 (get_member_function_from_ptrfunc): Likewise.
251 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
253 * cp-objcp-common.h (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
255 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
257 * cp-tree.h (perform_integral_promotions): Remove.
258 (default_conversion): Add.
260 2005-03-22 Mark Mitchell <mark@codesourcery.com>
262 * parser.c (cp_parser_warn_min_max): New function.
263 (cp_parser_binary_expression): Use it.
264 (cp_parser_assignment_operator_opt): Likewise.
265 (cp_parser_operator): Likewise.
267 2005-03-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
270 * decl.c (start_preparsed_function): Robustify.
272 2005-03-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
275 * parser.c (cp_parser_class_head): Return NULL_TREE when
276 encountering a redefinition.
278 2005-03-22 Nathan Sidwell <nathan@codesourcery.com>
282 * typeck.c (build_ptrmemfunc): Allow OFFSET_REF when processing a
285 2005-03-21 Paolo Carlini <pcarlini@suse.de>
289 * init.c (emit_mem_initializers): Don't crash on undefined
292 2005-03-21 Paolo Carlini <pcarlini@suse.de>
295 * semantics.c (finish_stmt_expr_expr): Return immediately
296 if error_operand_p (expr).
298 2005-03-21 Joseph S. Myers <joseph@codesourcery.com>
300 * cp-tree.h (lvalue_or_else, lvalue_p): New.
301 * typeck.c (lvalue_or_else): New. Call lvalue_error.
303 2005-03-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
306 * decl.c (decls_match): Compare context of VAR_DECL.
308 2005-03-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
311 * parser.c (cp_parser_postfix_expression) <case RID_TYPENAME>:
312 Check the return value of cp_parser_nested_name_specifier.
314 2005-03-18 Dale Johannesen <dalej@apple.com>
316 * cp/tree.c (cp_tree_equal): Handle SSA_NAME.
318 2005-03-18 Paolo Carlini <pcarlini@suse.de>
321 * parser.c (cp_parser_diagnose_invalid_type_name):
322 Check TYPE_BINFO (current_class_type) before attempting
323 to emit inform messages.
325 2005-03-17 Paolo Carlini <pcarlini@suse.de>
328 * cp-tree.h (grok_op_properties): Change return type to void.
329 * decl.c (grok_op_properties): Return early - don't check the
330 arity - in case of a static member or an operator that cannot
331 be non-member; tidy a bit.
333 2005-03-17 Nathan Sidwell <nathan@codesourcery.com>
336 * pt.c (contains_dependent_cast_p): Remove.
337 (fold_non_dependent_expr): Don't use it.
338 (value_dependent_expression_p): Use a switch statement.
339 reference_exprs can be dependent.
341 2005-03-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
345 * name-lookup.c (pushtag): Skip template parameter scope when
346 scope is ts_global. Don't push tag into template parameter
348 * pt.c (instantiate_class_template): Reorder friend class
349 template substitution to handle non-dependent friend class
350 that hasn't been previously declared.
352 2005-03-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
354 Friend class name lookup 5/n
356 * cp-tree.h (pushtag): Adjust declaration.
357 * decl.c (lookup_and_check_tag): Call lookup_type_scope if
359 (xref_tag): Adjust call to pushtag. Make hidden class visible.
360 (start_enum): Adjust call to pushtag.
361 * name-lookup.c (ambiguous_decl): Ignore hidden names.
362 (qualify_lookup): Change return type to bool.
363 (hidden_name_p): New function.
364 (lookup_namespace_name, unqualified_namespace_lookup,
365 lookup_name_real): Use it.
366 (lookup_type_scope): Update comments.
367 (maybe_process_template_type_declaration): Change parameter name
368 from globalize to is_friend.
369 (pushtag): Change globalize parameter of type int to tag_scope.
370 Hide name if introduced by friend declaration.
371 * name-lookup.h (hidden_name_p): Add declaration.
372 * parser.c (cp_parser_lookup_name): Don't deal with hidden name
374 * pt.c (push_template_decl_real): Make hidden class template
376 (lookup_template_class, instantiate_class_template): Adjust call
378 * semantics.c (begin_class_definition): Likewise.
379 * rtti.c (init_rtti_processing, build_dynamic_cast_1,
380 tinfo_base_init, emit_support_tinfos): Use ts_current instead of
383 2005-03-13 Mark Mitchell <mark@codesourcery.com>
386 * pt.c (determine_specialization): Reject non-specializations.
388 2005-03-11 Per Bothner <per@bothner.com>
390 * cp-tree.h (struct cp_declarator): New id_loc field.
391 * cp/parser.c (cp_lexer_get_preprocessor_token): Set cp_token's
392 location using c_lex_with_flags, instead of input_location.
393 (cp_parser_direct_declarator): Set declarator's id_loc from
396 2005-03-10 Jakub Jelinek <jakub@redhat.com>
398 PR c++/18384, c++/18327
399 * decl.c (reshape_init_array): Use UHWI type for max_index_cst
400 and index. Convert max_index to size_type_node if it isn't
403 2005-03-09 Mark Mitchell <mark@codesourcery.com>
406 * pt.c (tsubst_decl): Apply array-to-pointer and
407 function-to-pointer conversions to function arguments.
408 (regenerate_decl_from_template): Likewise.
410 2005-03-09 Paolo Carlini <pcarlini@suse.de>
413 * decl.c (complete_array_type): In pedantic mode, return
414 3 for an empty initializer list as the initializer for an
415 array of unknown bound (8.5.1/4).
416 (maybe_deduce_size_from_array_init): Fix final test to use
419 2005-03-08 Nathan Sidwell <nathan@codesourcery.com>
422 * pt.c (contains_dependent_cast_p): New.
423 (fold_non_dependent_expr): Call it.
425 2005-03-08 Mark Mitchell <mark@codesourcery.com>
428 * cp-tree.h (target_type): Remove.
429 * decl.c (layout_var_decl): Remove #if 0'd code.
430 (cp_finish_decl): Remove dead code.
431 * init.c (build_vec_init): When determining whether or not the
432 element type has an asignment operator, look through all array
434 * typeck.c (target_type): Remove.
436 2005-03-07 Mark Mitchell <mark@codesourcery.com>
438 * class.c (finish_struct_1): Do not warn about non-virtual
439 destructors in Java classes.
441 2005-03-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
444 * init.c (build_offset_ref): Don't build non-dependent SCOPE_REF.
445 * pt.c (build_non_dependent_expr): Don't build NON_DEPENDENT_EXPR
447 * typeck.c (build_x_unary_op): Don't build non-dependent SCOPE_REF.
448 Also set PTRMEM_OK_P for NON_DEPENDENT_EXPR.
449 (build_unary_op): Handle building ADDR_EXPR of OFFSET_REF inside
452 2005-03-02 Alexandre Oliva <aoliva@redhat.com>
454 * name-lookup.c (push_overloaded_decl): Don't error if the new
455 decl matches the old one.
456 * decl.c (redeclaration_error_message): Likewise.
458 2005-03-01 Per Bothner <per@bothner.com>
460 * decl.c (finish_function): Use SET_EXPR_LOCATION instead of
461 unavailable annotate_with_file_line, if USE_MAPPED_LOCATION.
463 2005-03-01 Nathan Sidwell <nathan@codesourcery.com>
466 * class.c (update_vtable_entry_for_fn): Don't crash on invalid
469 * cp-tree.g (THUNK_TARGET): Expand comment.
470 * method.c (use_thunk): Make sure we also use the target, if that
473 2005-02-27 Jakub Jelinek <jakub@redhat.com>
476 * decl.c (cxx_comdat_group): Put thunks for
477 TARGET_USE_LOCAL_THUNK_ALIAS_P (function) functions into the same
478 comdat group as the thunk target.
480 2005-02-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
482 * call.c, class.c, cp-tree.h, decl2.c, error.c, init.c, mangle.c,
483 parser.c: Fix comment typo(s).
485 2005-02-24 Jakub Jelinek <jakub@redhat.com>
488 * decl.c (reshape_init): Don't warn about missing braces if STRING_CST
489 initializes a char/wchar_t array.
491 2005-02-23 Mark Mitchell <mark@codesourcery.com>
494 * decl.c (grokvardecl): Set DECL_INTERFACE_KNOWN for declarations
495 with internal linkage.
497 2005-02-23 Alexandre Oliva <aoliva@redhat.com>
499 * decl.c (grokvardecl): Don't exempt anonymous types from having
500 linkage for variables that have linkage other than "C".
502 2005-02-23 Kazu Hirata <kazu@cs.umass.edu>
504 * cp-objcp-common.h, error.c: Update copyright.
506 2005-02-22 Mark Mitchell <mark@codesourcery.com>
509 * decl.c (start_decl_1): Don't clear TREE_READONLY.
510 (cp_finish_decl): Likewise.
511 (complete_vars): Call cp_apply_type_quals_to_decl.
512 * typeck.c (cp_apply_type_quals): Avoid setting TREE_READONLY in
513 cases where that's not valid.
516 * init.c (integral_constant_value): Iterate if the value of a decl
517 is itself a constant.
520 * parser.c (cp_parser_class_head): Check for redefintions here.
521 * semantics.c (begin_class_definition): Not here.
524 * decl2.c (build_anon_union_vars): Add type parameter.
525 (finish_anon_union): Pass it.
528 * error.c (dump_expr): Do not print the body of a BIND_EXPR.
529 Handle STATEMENT_LIST.
532 * parser.c (cp_parser_direct_declarator): Always complain about
533 non-constant array bounds when in a function scope.
534 * semantics.c (finish_id_expression): Do not mark dependent names
537 2005-02-21 Douglas Gregor <dgregor@cs.indiana.edu>
541 * cp-tree.h (cp_apply_type_quals_to_decl): Declared.
542 * decl.c (grokdeclarator): Pedwarn about qualifying a function
544 Add qualifiers when declaring a typedef of a function type.
545 Member function pointers pick up the qualifiers of the typedef
546 used to declare them.
547 Don't complain about creating cv-qualified function types.
548 Complain about qualified function typedefs that are used to
549 declare non-static member functions or free functions.
550 Use cp_apply_type_quals_to_decl.
551 (start_preparsed_function): Use cp_apply_type_quals_to_decl.
552 (grokclassfn): Use cp_apply_type_quals_to_decl.
553 * error.c (dump_type_suffix): Print qualifiers for function
555 * pt.c (tsubst_decl): Use cp_apply_type_quals_to_decl.
556 (tsubst): When substituting a function type into a member
557 pointer type, pass along the qualifiers.
558 (unify): Unify member pointers to member function pointers.
559 * tree.c (cp_build_qualified_type_real): Function types may be
560 qualified. This includes restrict qualifiers.
561 * typeck.c (cp_apply_type_quals_to_decl): New function to replace
562 use of c_apply_type_quals_to_decl. Drops qualifiers that are being
563 added to function types.
565 2005-02-20 Zack Weinberg <zack@codesourcery.com>
568 * cp-objcp-common.h (LANG_HOOKS_TO_TARGET_CHARSET): Set to
569 c_common_to_target_charset. Delete bogus comment.
571 2005-02-18 Richard Henderson <rth@redhat.com>
574 * except.c (do_get_exception_ptr): New.
575 (expand_start_catch_block): Use it.
577 2005-02-19 Jakub Jelinek <jakub@redhat.com>
579 * decl.c (start_decl_1): Only check TYPE_NEEDS_CONSTRUCTING
580 if type is not error_mark_node.
582 2005-01-20 Giovanni Bajo <giovannibajo@gcc.gnu.org>
585 * decl2.c (grokfield): Do not apply attributes to template parameters
586 as they are ignored by tsubst anyway.
588 2005-02-18 Jakub Jelinek <jakub@redhat.com>
591 * decl.c (start_decl_1): Clear TREE_READONLY flag if
592 its type has TYPE_NEEDS_CONSTRUCTING.
593 (complete_vars): Likewise.
595 2005-02-17 Alexandre Oliva <aoliva@redhat.com>
598 * class.c (finish_struct): Initialize TYPE_SIZE_UNIT of a
599 template along with TYPE_SIZE.
602 * semantics.c (perform_deferred_access_checks): Use
603 get_deferred_access_checks to get the top of the stack.
605 2005-02-15 Alexandre Oliva <aoliva@redhat.com>
608 * class.c (add_implicitly_declared_members, check_field_decl)
609 (check_field_decls, check_bases): Remove arguments, tests and
610 assignments of cant_have_default_ctor-related variables.
612 2005-02-15 Alexandre Oliva <aoliva@redhat.com>
614 * decl2.c (mark_used): Set the source location of the used decl to
615 the current input location here...
616 * method.c (synthesize_method): ... not here. Set input_location
617 from the decl instead.
619 2005-02-14 Nathan Sidwell <nathan@codesourcery.com>
622 * parser.c (cp_parser_late_parsing_for_member): Use
623 current_function_decl as scope to push to and from.
626 * pt.c (check_explicit_specialization): Make sure namespace
627 binding lookup found an overloaded function.
628 (lookup_template_function): Just assert FNS is an overloaded
632 * decl.c (grokdeclarator): Check for error mark node in ptrmem
635 2005-02-14 Alexandre Oliva <aoliva@redhat.com>
638 * decl.c (redeclaration_error_message): Report redefinition of
639 pure virtual function.
641 2005-02-14 Nathan Sidwell <nathan@codesourcery.com>
644 * class.c (build_simple_base_path): Build the component_ref
646 (update_vtable_entry_for_fn): Walk the covariant's binfo chain
647 rather than using lookup_base.
648 * search.c (dfs_walk_once): Add non-recursive assert check.
649 * typeck.c (build_class_member_access_expr): It is possible for
650 the member type to be both const and volatile.
652 2005-02-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
656 * pt.c (maybe_check_template_type): Remove.
657 * cp-tree.h (maybe_check_template_type): Remove prototype.
658 * name-lookup.c (maybe_process_template_type_declaration): Don't
659 use maybe_check_template_type.
661 2005-02-11 Richard Henderson <rth@redhat.com>
664 * pt.c (get_mostly_instantiated_function_type): Save and restore
665 flag_access_control instead of push/pop_access_scope.
667 2005-02-10 Mark Mitchell <mark@codesourcery.com>
670 * decl.c (reshape_init): Issue warnings about missing braces.
672 2005-02-11 Kazu Hirata <kazu@cs.umass.edu>
674 * cp-tree.def, except.c, ptree.c: Update copyright.
676 2005-02-09 Mark Mitchell <mark@codesourcery.com>
679 * call.c (build_op_delete_call): Check COMPLETE_TYPE_P before
680 attempting name lookup.
682 * parser.c (cp_parser_unqualified_id): Initialize type_decl.
685 * call.c (initialize_reference): Robustify.
688 * decl.c (grokdeclarator): Check for invalid use of destructor
692 * parser.c (cp_parser_unqualified_id): Avoid creating destructor
693 names with invalid types.
696 * parser.c (cp_parser_direct_declarator): Allow type-dependent
697 expressions as array bounds.
700 * parser.c (cp_parser_attributes_list): Allow empty lists.
702 2005-02-08 Mark Mitchell <mark@codesourcery.com>
705 * class.c (add_method): Don't set TYPE_HAS_DESTRUCTOR.
706 (check_bases): Give warnings about a base class with a
707 non-virtual destructor, even if it is implicit.
708 (finish_struct_bits): Don't copy TYPE_HAS_DESTRUCTOR.
709 (maybe_warn_about_overly_private_class): Don't use
711 (finish_struct_methods): Don't set TYPE_HAS_DESTRUCTOR.
712 (check_for_override): Give it external linkage.
713 (add_implicitly_declared_members): Generate destructors lazily.
714 (check_field_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not
716 (check_bases_and_members): Call check_methods before
718 (check_bases_and_members): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not
720 (finish_struct_1): Do not use TYPE_HAS_DESTRUCTOR.
721 * cp-tree.def (PSEUDO_DTOR_EXPR): Document.
722 * cp-tree.h (TYPE_HAS_DESTRUCTOR): Remove.
723 (lang_type_class): Add lazy_destructor.
724 (CLASSTYPE_LAZY_DESTRUCTOR): New macro.
725 (CLASSTYPE_DESTRUCTORS): Robustify.
726 (TYPE_HAS_DESTRUCTOR): Remove.
727 (check_for_override): Declare.
728 (build_vbase_delete): Remove.
729 * cvt.c (convert_to_void): Issue errors about pseudo-destructor
731 * decl.c (cxx_maybe_build_cleanup): Remove dead code.
732 * except.c (dtor_nothrow): Lazily create destructors if necessary.
733 (build_throw): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
734 * init.c (build_delete): Lazily create destructors, if necessary.
735 (build_vbase_delete): Remove.
736 * method.c (locate_dtor): Simplify.
737 (implicitly_declare_fn): Add support for destructors.
738 * parser.c (cp_parser_lookup_name): Lazily create destructors, if
740 * pt.c (check_explicit_specialization): Don't use
742 (instantiate_class_template): Likewise.
743 * ptree.c (cxx_print_type): Don't print TYPE_HAS_DESTRUCTOR.
744 * rtti.c (emit_support_tinfos): Robustify.
745 * search.c (lookup_fnfields_1): Lazily create destructors.
746 * typeck.c (build_class_member_access_expr): Remove
747 PSEUDO_DTOR_EXPR handling.
748 (lookup_destructor): Likewise.
750 2005-02-08 Kazu Hirata <kazu@cs.umass.edu>
752 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h: Update
755 2005-02-07 Mark Mitchell <mark@codesourcery.com>
757 * parser.c (cp_lexer_start_debugging): Avoid arithmetic operations
758 on boolean variables.
759 (cp_lexer_stop_debugging): Likewise.
761 2005-02-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
764 * parser.c (cp_parser_pure_specifier): Emit a specific error
765 message with an invalid pure specifier.
766 * decl2.c (grok_function_init): Remove.
767 (grokfield): An initializer for a method is a always a pure
770 2005-02-02 Matt Austern <austern@apple.com>
773 * cp-tree.h (builtin_valid_in_constant_expr_p): Declare.
774 * parser.c (cp_parser_postfix_expression): Accept function call in
775 constant expression if builtin_valid_in_constant_expr_p is true
777 * pt.c (value_dependent_expression_p): Handle CALL_EXPRs properly.
778 * semantics.c (finish_id_expression): Accept function call in constant
779 expression if builtin_valid_in_constant_expr_p is true for that
781 * tree.c (builtin_valid_in_constant_expr_p): New.
783 2005-02-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
786 * pt.c (check_instantiated_args): Improve error message.
787 Fix logic when to print its second part.
789 2005-02-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
791 * cp-tree.h (complete_type_or_else): Remove macro.
792 (complete_type_or_diagnostic): Rename to complete_type_or_else
793 and remove last argument.
794 * typeck.c (complete_type_or_diagnostic): Rename to
795 complete_type_or_else and remove last argument.
797 2005-02-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
799 * cp-tree.h (commonparms): Remove prototype.
800 (convert_arguments): Likewise.
801 (PFN_FROM_PTRMEMFUNC): Remove.
802 * typeck.c (commonparms): Make static.
803 (convert_arguments): Add prototype. Make static.
804 (PFN_FROM_PTRMEMFUNC): Replace by pfn_from_ptrmemfunc.
806 2005-01-31 Mark Mitchell <mark@codesourcery.com>
808 * parser.c (cp_parser_primary_expression): Don't complain about
809 floating-point literals in integral constant expressions when
812 2005-02-01 Alexandre Oliva <aoliva@redhat.com>
814 * parser.c (cp_parser_template_id): Revert comment patch too.
819 * parser.c (cp_parser_template_id): Revert 2004-12-09's patch.
820 Issue an error when creating the template id.
821 * pt.c (fn_type_unification): Return early if the explicit
822 template arg list is an error_mark_node.
824 2005-01-31 Mark Mitchell <mark@codesourcery.com>
826 * decl.c (build_enumerator): Do not issue duplicate error messages
827 about invalid enumeration constants.
828 * parser.c (cp_parser_non_integral_constant_expression): Always
829 set parser->non_integral_constant_expression_p.
830 (cp_parser_primary_expression): Add cast_p parameter. Issue
831 errors about invalid uses of floating-point literals in
833 (cp_parser_postfix_expression): Add cast_p parameter.
834 (cp_parser_open_square_expression): Pass it.
835 (cp_parser_parenthesized_expression_list): Add cast_p parameter.
836 (cp_parser_unary_expression): Likewise.
837 (cp_parser_new_placement): Pass it.
838 (cp_parser_direct_new_declarator): Likewise.
839 (cp_parser_new_initializer): Likewise.
840 (cp_parser_cast_expression): Add cast_p parameter.
841 (cp_parser_binary_expression): Likewise.
842 (cp_parser_question_colon_clause): Likewise.
843 (cp_parser_assignment_expression): Likewise.
844 (cp_parser_expression): Likewise.
845 (cp_parser_constant_expression): If an integral constant
846 expression is invalid, return error_mark_node.
847 (cp_parser_expression_statement): Pass cast_p.
848 (cp_parser_condition): Likewise.
849 (cp_parser_iteration_statement): Likewise.
850 (cp_parser_jump_statement): Likewise.
851 (cp_parser_mem_initializer): Likewise.
852 (cp_parser_template_argument): Likewise.
853 (cp_parser_parameter_declaration): Likewise.
854 (cp_parser_initializer): Likewise.
855 (cp_parser_throw_expression): Likewise.
856 (cp_parser_attribute_list): Likewise.
857 (cp_parser_simple_cast_expression): Likewise.
858 (cp_parser_functional_cast): Likewise.
859 (cp_parser_late_parsing_default_args): Likewise.
860 (cp_parser_sizeof_operand): Save/restore
861 non_integral_constant_expression_p.
863 2005-01-31 Mike Stump <mrs@apple.com>
865 * parser.c (cp_lexer_new_main): Get the first token, first, before
868 2005-01-31 Mark Mitchell <mark@codesourcery.com>
870 * decl.c (start_decl): Add missing parentheses.
872 2005-01-30 Mark Mitchell <mark@codesourcery.com>
875 * cp-tree.h (DECL_USE_TEMPLATE): Expand documentation.
876 * decl.c (duplicate_decls): Do not discard
877 DECL_IMPLICIT_INSTANTIATION when merging declarations.
878 (start_decl): Do not SET_DECL_TEMPLATE_SPECIALIZATION for
879 variables that do not have DECL_USE_TEMPLATE.
882 * decl.c (grokdeclarator): Refactor code so that qualified names
883 are never allowed as the declarator in a typedef.
886 * name-lookup.c (do_nonmember_using_decl): Avoid overloading
887 builtin declarations.
890 * call.c (convert_like_real): Inline call to
891 dubious_conversion_warnings here.
892 * cp-tree.h (dubious_conversion_warnings): Remove.
893 * semantics.c (finish_unary_op_expr): Copy INTEGER_CSTs before
894 setting TREE_NEGATED_INT.
895 * typeck.c (dubious_conversion_warnings): Remove.
898 * name-lookup.c (pushdecl_namespace_level): Avoid accessing free'd
901 2005-01-28 Mark Mitchell <mark@codesourcery.com>
904 * parser.c (cp_parser_diagnose_invalid_type_name): Commit to
908 * pt.c (redeclare_class_template): Robustify.
910 2005-01-27 Steven Bosscher <stevenb@suse.de>
912 * decl.c (finish_case_label): Use SWITCH_STMT accessor macros
913 instead of SWITCH_EXPR ones.
914 * pt.c (tsubst_expr): Likewise.
915 * semantics.c (begin_switch_stmt, finish_switch_cond,
916 finish_switch_stmt): Likewise.
918 2005-01-26 J"orn Rennecke <joern.rennecke@st.com>
921 * parser.c (cp_parser_initializer_clause): Initialize *non_constant_p.
923 2005-01-25 Andrew Pinski <pinskia@physics.uc.edu>
925 * class.c (abort_fndecl_addr): New variable.
926 (build_vtbl_initializer): If we have a pure virtual function
927 share the abort function's address.
928 Include gt-cp-class.h at the end.
929 * config-lang.in (gtfiles): Add cp/class.c.
931 2005-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
933 * cxx-pretty-print.c (pp_cxx_statement): Add prototype. Make static.
934 (pp_cxx_function_definition): Make static.
935 * cxx-pretty-print.h (pp_cxx_statement): Remove prototype.
936 (pp_cxx_function_definition): Likewise.
938 2005-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
940 * name-lookup.c (print_binding_level): Make static.
941 (constructor_name_full): Make static inline.
942 (current_decl_namespace): Make static.
943 * name-lookup.h (constructor_name_full): Remove prototype.
944 (print_binding_level): Likewise.
945 (current_decl_namespace): Likewise.
947 2005-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
949 * decl.h (debug_bindings_indentation): Remove.
951 2005-01-23 Kazu Hirata <kazu@cs.umass.edu>
953 * typeck.c: Fix a comment typo.
955 2005-01-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
958 * pt.c (fold_decl_constant_value): Always call fold_non_dependent_expr
960 (tsubst): Use fold_decl_constant_value in place of a bare call to
961 integral_constant_value.
963 2005-01-20 Kazu Hirata <kazu@cs.umass.edu>
965 * typeck.c (more_qualified_p): Remove.
966 * cp-tree.h: Remove the corresponding prototype.
968 2005-01-19 Matt Austern <austern@apple.com>
970 * typeck.c (comptypes): Handle return code from objc_comptypes
973 2005-01-19 Kazu Hirata <kazu@cs.umass.edu>
975 * cp-tree.h, name-lookup.h: Remove unused prototypes.
977 2005-01-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
980 * semantics.c (finish_id_expression): Disable access checking for
981 already lookuped FIELD_DECL.
983 2005-01-18 Kazu Hirata <kazu@cs.umass.edu>
985 * decl.c (delete_block): Remove.
986 * cp-tree.h: Remove the corresponding prototype.
988 * decl.c (vtable_decl_p, vtype_decl_p, walk_globals_data,
989 walk_vtables_r, walk_vtables, walk_globals_r, walk_globals):
991 * cp-tree.h: Remove the corresponding prototypes.
993 * tree.c (count_functions, bound_pmf_p, cp_is_overload_p,
994 cp_update_decl_after_saving, name_p): Remove.
995 * cp-tree.h: Remove the corresponding prototypes.
997 2005-01-18 Andrew Pinski <pinskia@physics.uc.edu>
1000 * semantics.c (finish_asm_stmt): Strip nops off
1001 input memory operands.
1003 2005-01-18 Kazu Hirata <kazu@cs.umass.edu>
1005 * Make-lang.in, call.c, cvt.c, init.c, rtti.c, tree.c,
1006 typeck2.c: Update copyright.
1008 2005-01-16 Kazu Hirata <kazu@cs.umass.edu>
1010 * class.c (get_enclosing_class): Remove.
1011 * cp-tree.h: Remove the corresponding prototypes.
1013 * cvt.c (convert_lvalue): Remove.
1014 * cp-tree.h: Remove the corresponding prototype.
1016 * pt.c (tinst_for_decl): Remove.
1017 * cp-tree.h: Remove the corresponding prototypes.
1019 * tree.c (hash_chainon): Remove.
1020 * cp-tree.h: Remove the corresponding prototypes.
1022 2005-01-15 Jakub Jelinek <jakub@redhat.com>
1025 * typeck2.c (split_nonconstant_init_1) <case VECTOR_TYPE>: Put a copy
1026 of CONSTRUCTOR's node into MODIFY_EXPR, as the original is modified.
1028 2005-01-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1030 * Make-lang.in (cp-warn): Don't append $(WERROR).
1032 2005-01-10 Kazu Hirata <kazu@cs.umass.edu>
1034 * cp-tree.h: Fix a comment typo.
1036 2005-01-07 Nathan Sidwell <nathan@codesourcery.com>
1039 * pt.c (tsubst_qualified_id): Call convert_from_reference.
1041 2005-01-06 Mark Mitchell <mark@codesourcery.com>
1044 * class.c (add_implicitly_declared_members): Remove dead code.
1045 * decl.c (grokfndecl): Add sfk parameter. Use it do set
1047 (grokdeclarator): Adjust calls to grokfndecl.
1048 * method.c (implicitly_declare_fn): Improve documentation.
1049 * parser.c (cp_parser_direct_declarator): Do not consider a
1050 function to be a constructor if the containing class was
1051 originally anonymous.
1053 2005-01-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1056 * search.c (lookup_field_1): Handle using declaration in
1057 class template partial specialization.
1059 2005-01-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1062 * pt.c (push_access_scope): Handle friend defined in class.
1063 (pop_access_scope): Likewise.
1065 2005-01-06 Nathan Sidwell <nathan@codesourcery.com>
1068 * pt.c (tsubst_copy) <ARRAY_REF case>: Handle separately.
1069 (tsubst_copy_and_build) <ARRAY_REF case>: Remove obsolete
1070 array-new handling code. Use build_x_binary_op.
1072 2005-01-05 Nathan Sidwell <nathan@codesourcery.com>
1075 * cp-tree.h (start_decl): Take pointer to pushed scope, not bool.
1076 * name-lookup.h (push_scope): Return pushed scope, not flag.
1077 * name-lookup.c (push_scope): Return scope that should be popped,
1079 * decl.c (start_decl): Adjust.
1080 (grokfndecl): Adjust scope push and pop.
1081 * decl2.c (check_classfn): Likewise.
1082 * parser.c (cp_parser_condition, cp_parser_conversion_function_id,
1083 cp_parser_init_declarator, cp_parser_direct_declarator,
1084 cp_parser_class_specifier, cp_parser_class_head,
1085 cp_parser_lookup_name,
1086 cp_parser_constructor_declarator_p): Likewise.
1087 * pt.c (instantiate_class_template,
1088 resolve_typename_type): Likewise.
1090 2005-01-03 Volker Reichelt <reichelt@igpm.rwth-aaachen.de>
1093 * parser.c (cp_parser_unqualified_id): Do not issue error message
1094 for typedef-name as destructor declarator when performing an
1095 uncommitted tentative parse.
1097 2005-01-01 Steven Bosscher <stevenb@suse.de>
1100 * decl.c (finish_function): Fix comment. Annotate the compiler
1101 generated return with the current file name and line 0.
1103 2004-12-31 Richard Henderson <rth@redhat.com>
1106 * call.c (make_temporary_var_for_ref_to_temp): Set DECL_IGNORED_P.
1107 * class.c (build_vtable): Don't conditionallize setting it
1108 based on DWARF2_DEBUG.
1109 (layout_class_type): Set DECL_IGNORED_P.
1110 * decl2.c (get_guard): Likewise.
1111 * rtti.c (get_tinfo_decl, build_lang_decl): Likewise.
1112 * tree.c (build_local_temp): Likewise.
1114 2004-12-30 Mark Mitchell <mark@codesourcery.com>
1116 * cp-tree.h (cp_declarator): Split "name" field into
1117 qualifying_scope and unqualified_name.
1118 * decl.c (get_scope_of_declarator): Adjust accordingly.
1119 (grokdeclarator): Likewise.
1120 * decl2.c (grokfield): Likewise, and adjust call to
1121 do_class_using_decl.
1122 * name-lookup.c (do_class_using_decl): Split "decl" into
1123 "scope" and "name". Remove unnecessary code.
1124 * name-lookup.h (do_class_using_decl): Adjust declaration.
1125 * parser.c (make_id_declarator): Split "id" into qualifying_scope
1126 and unqualified_name.
1127 (cp_parser_using_declaration): Adjust call to do_class_using_decl.
1128 (cp_parser_direct_declarator): Adjust to handle the fact that
1129 cp_parser_declarator_id no longer returns a SCOPE_REF.
1130 (cp_parser_direct_declarator): Likewise.
1131 (cp_parser_declarator_id): Do not create a SCOPE_REF for qualified
1133 (cp_parser_member_declaration): Adjust call to make_id_declarator.
1134 (cp_parser_check_declarator_template_parameters): Do not expect a
1137 * decl.c (duplicate_decls): Call ggc_free on declarations we will
1138 not be needing any longer.
1141 * cvt.c (convert_to_void): Do not use STRIP_NOPs.
1143 2004-12-28 Richard Henderson <rth@redhat.com>
1146 * semantics.c (finish_asm_stmt): Resolve asm names. Validate input
1147 constraints. Mark memory inputs addressable.
1149 2004-12-27 Jason Merrill <jason@redhat.com>
1151 * decl.c (expand_static_init): Don't use shortcut if
1152 targetm.relaxed_ordering.
1154 2004-12-27 Mark Mitchell <mark@codesourcery.com>
1157 * decl.c (check_tag_decl): Robustify.
1159 2004-12-23 Mark Mitchell <mark@codesourcery.com>
1162 * parser.c (cp_parser_error): Issue better messages about
1163 #pragma in locations where it is not permitted.
1166 * pt.c (check_instantiated_args): Remove bogus SFINAE code.
1168 * cvt.c (convert_to_void): Fix typo in comment.
1170 2004-12-23 Alexandre Oliva <aoliva@redhat.com>
1173 * pt.c (check_explicit_specialization): Use the argument list from
1174 the definition in a template function specialization definition.
1176 2004-12-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1179 * pt.c (check_explicit_specialization): Use special logic to validate
1180 befriended specializations.
1182 2004-12-22 Mark Mitchell <mark@codesourcery.com>
1184 * rtti.c (emit_support_tinfos): Avoid using C99 semantics.
1187 * call.c (build_this): In templates, do not bother with
1189 * typeck.c (unary_complex_lvalue): In a template, always refuse
1193 * cp-gimplify.c (cp_genericize): Relax assertion.
1196 * cvt.c (convert_to_void): Warn about unused values.
1199 * rtti.c (emit_support_tinfos): On systems without weak symbols,
1200 emit the runtime library type-info objects as non-COMDAT.
1202 2004-12-21 Mark Mitchell <mark@codesourcery.com>
1205 * call.c (convert_like_real): Do not permit the use of a copy
1206 constructor to copy a packed field.
1209 * decl.c (grokdeclarator): Return error_mark_node, not
1210 void_type_node, to indicate errors.
1211 * parser.c (cp_parser_template_parameter_list): Robustify.
1212 (cp_parser_template_parameter): Likewise.
1215 * tree.c (cp_tree_equal): Handle OVERLOAD.
1217 2004-12-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1219 * decl.c (define_label): Use POP_TIMEVAR_AND_RETURN.
1220 * name-lookup.c (pushdecl_class_level): Likewise.
1222 2004-12-21 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1224 * name-lookup.c (pushtag): Add missing POP_TIMEVAR_AND_RETURN.
1226 2004-12-21 Andrew Pinski <pinskia@physics.uc.edu>
1229 * cp-gimplify.c (cp_genericize_r): Don't insert first but instead
1230 check to see if contains the pointer. Insert the statement before
1233 2004-12-21 Nathan Sidwell <nathan@codesourcery.com>
1236 * decl.c (check_initializer): Check string initializer of array is
1238 * cp-tree.h (PAREN_STRING_LITERAL_P): New.
1239 * semantics.c (finish_parenthesized_expr): Mark a STRING_CST.
1240 * error.c (dump_expr): <STRING_CST case> Add parens, if needed.
1242 * cp-tree.def (TEMPLATE_TYPE_PARM,
1243 BOUND_TEMPLATE_TEMPLATE_PARM, TYPE_OF_TYPE, TYPENAME_TYPE): Reorder
1244 for better code efficiency.
1245 * cp-tree.h (CLASS_TYPE_P): Short circuit IS_AGGR_TYPE check.
1246 (CAN_HAVE_FULL_LANG_DECL_P): Reorder for better optimization.
1247 (INTEGRAL_CODE_P, CP_INTEGRAL_TYPE_P,
1248 INTEGRAL_OR_ENUMERATION_TYPE_P, SCALAR_TYPE_P,
1249 CP_AGGREGATE_TYPE_P, TYPE_PTROB_P, TYPE_REF_OBJ_P,
1250 TYPE_PTROBV_P): Likewise.
1253 * method.c (do_build_copy_constructor): Refactor. Don't const
1254 qualify a mutable field.
1255 (do_build_assign_ref): Likewise.
1257 2004-12-20 Matt Austern <austern@apple.com>
1260 * decl.c (make_rtl_for_nonlocal_decl): Use
1261 set_builtin_user_assembler_name.
1263 2004-12-19 Mark Mitchell <mark@codesourcery.com>
1265 * cp-tree.h (note_decl_for_pch): New function.
1266 * class.c (build_clone): Call note_decl_for_pch.
1267 * semantics.c (finish_member_declaration): Likewise.
1268 (note_decl_for_pch): New function.
1270 2004-12-17 Steven Bosscher <stevenb@suse.de>
1272 * init.c (build_zero_init): max_index is the number of
1275 2004-12-17 Nathan Sidwell <nathan@codesourcery.com>
1278 * class.c (add_method): Do not push conversion operators into a
1281 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE_TYPE): Reformat.
1282 * error.c (dump_decl): <TYPE_DECL case> Remove extraneous braces.
1284 2004-12-16 Nathan Sidwell <nathan@codesourcery.com>
1287 * cp-tree.h (integral_constant_value): Declare.
1288 * call.c (null_ptr_cst_p): Use integral_constant_value, not
1289 decl_constant_value.
1290 (convert_like_real): Likewise.
1291 * class.c (check_bitfield_decl): Likewise.
1292 * cvt.c (ocp_convert): Likewise.
1293 (convert): Remove unnecessary decl_constant_value call.
1294 * decl.c (compute_array_index_type): Use integral_constant_value,
1295 not decl_constant_value.
1296 (build_enumerator): Likewise.
1297 * decl2.c (grokfield): Likewise.
1298 * init.c (decl_constant_value): Simplify.
1299 (integral_constant_value): New.
1300 * pt.c (fold_decl_constant_value): Use integral_constant_value,
1301 remove subsequent check.
1302 (tsubst): Use integral_constant_value, not decl_constant_value.
1303 (tsubst_copy, unify): Likewise.
1304 * typeck.c (decay_conversion): Likewise.
1305 (build_compound_expr): Remove unnecessary decl_constant_value
1307 (build_static_cast_1, build_reinterpret_cast_1):
1308 (convert_for_assignment): Remove comment about not calling
1309 decl_constant_value.
1311 2004-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1314 * pt.c (instantiate_class_template): Set input_location for
1316 (tsubst_friend_function): Don't set input_location here.
1317 Make sure the context is complete if necessary.
1319 2004-12-15 Nathan Sidwell <nathan@codesourcery.com>
1322 * parser.c (cp_parser_lookup_name): Remove unneeded TYPENAME_TYPE
1325 2004-12-14 Mark Mitchell <mark@codesourcery.com>
1328 * decl.c (make_typename_type): Do not handle namespace-scoped
1330 (tag_name): Handle typename_type.
1331 (check_elaborated_type_specifier): Handle typenames.
1332 * parser.c (cp_parser_diagnose_invalid_type_name): Improve
1334 (cp_parser_elaborated_type_specifier): Use
1335 cp_parser_diagnose_invalid_type_name.
1337 2004-12-14 Andrew Pinski <pinskia@physics.uc.edu>
1340 * init.c (build_zero_init): If the max_index is 0, there is no
1341 need to create a RANGE_EXPR.
1343 2004-12-14 Mark Mitchell <mark@codesourcery.com>
1346 * cp-objcp-common.c (cp_expr_size): Loosen assertion.
1348 2004-12-14 Nathan Sidwell <nathan@codesourcery.com>
1351 * pt.c (tsubst_copy_and_build): <INDIRECT_REF case> Check that a
1352 REFERENCE_REF_P is dereferencing a reference type.
1353 * typeck.c (build_static_cast): Convert from reference even in a
1355 (build_reinterpret_cast, build_const_cast, build_c_cast): Likewise.
1357 2004-12-14 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1359 * parser.c (cp_parser_uncommitted_to_tentative_parse_p): New function.
1360 (cp_parser_name_lookup_error): Use it.
1361 (cp_parser_check_for_invalid_template_id): Likewise.
1362 (cp_parser_skip_to_closing_parenthesis): Likewise.
1363 (cp_parser_nested_name_specifier_opt): Likewise.
1364 (cp_parser_simple_declaration, cp_parser_template_id): Likewise.
1365 (cp_parser_parameter_declaration_list): Likewise.
1366 (cp_parser_parameter_declaration): Likewise.
1367 (cp_parser_template_name): Let cp_parser_simulate_error perform
1369 (cp_parser_committed_to_tentative_parse): Remove.
1371 2004-12-13 Andrew Pinski <pinskia@physics.uc.edu>
1374 * class.c (build_base_path): Convert the zero constant to the correct
1375 type when comparing.
1377 2004-12-13 Mark Mitchell <mark@codesourcery.com>
1380 * class.c (layout_class_type): Determine the visibility of static
1383 2004-12-12 Roger Sayle <roger@eyesopen.com>
1386 * cp-gimplify.c (gimplify_if_stmt): Optimize the case where the
1387 condition is a constant and the unexecuted clause is empty.
1389 2004-12-10 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1392 * parser.c (cp_parser_class_head): Reject typedef-name in class head.
1394 2004-12-09 Matt Austern <austern@apple.com>
1397 * name-lookup.c (do_nonmember_using_decl): A real function
1398 declaration takes precedence over an anticipated declaration.
1400 2004-12-09 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1402 * parser.c (cp_parser_member_declaration): Fix comment typo.
1404 2004-12-09 Alexandre Oliva <aoliva@redhat.com>
1407 * parser.c (cp_parser_template_id): Don't create a CPP_TEMPLATE_ID
1410 2004-12-09 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1413 * typeck.c (build_reinterpret_cast_1): Allow cast from vector type.
1415 2004-12-09 Nathan Sidwell <nathan@codesourcery.com>
1418 * init.c (build_zero_init): Build a RANGE_EXPR for an array
1421 2004-12-08 Kelley Cook <kcook@gcc.gnu.org>
1423 * typeck.c: Remove DOS line endings.
1425 2004-12-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1428 * decl.c (lookup_and_check_tag): Diagnose nested class with
1429 the same name as enclosing class.
1431 2004-12-08 Nathan Sidwell <nathan@codesourcery.com>
1434 * cp-tree.h (REFERENCE_REF_P): New.
1435 (CPTI_TYPE_INFO_TYPE): Rename to ...
1436 (CPTI_CONST_TYPE_INFO_TYPE): ... here.
1437 (CPTI_TYPE_INFO_REF_TYPE): Remove.
1438 (type_info_type_node): Rename to ...
1439 (const_type_info_type_node): ... here.
1440 (type_info_ref_type): Remove.
1441 * call.c (build_user_type_conversion): Reformat.
1442 (resolve_args): Do not convert_from_reference.
1443 (build_object_call): Call convert_from_reference.
1444 (prep_operand): Do not convert_from_reference.
1445 (build_new_method_call): Likewise.
1446 * class.c (build_vfield_ref): Likewise.
1447 * cvt.c (convert_to_reference): Likewise.
1448 (convert_from_reference): Build INDIRECT_REF here, not with
1450 (convert_force): Do not convert_from_reference.
1451 (build_expr_type_conversion): Likewise.
1452 * decl.c (grok_reference_init): Likewise.
1453 * decl2.c (delete_sanity): Likewise.
1454 * except.c (initialize_handler_parm): Use POINTER_TYPE_P.
1455 * init.c (build_dtor_call): Do not convert_from_reference.
1456 * parser.c (cp_parser_template_argument): Unwrap indirected
1457 reference. Allow TEMPLATE_PARM_INDEX as an object parm.
1458 * pt.c (tsubst_copy_and_build) <case INDIRECT_REF>: Use
1459 convert_from_reference, if indicated.
1460 <case CALL_EXPR>: Do not convert_from_reference.
1461 <case PARM_DECL, VAR_DECL>: Convert_from_reference if needed.
1462 (tsubst_initializer_list): Do not convert_from_reference.
1463 * rtti.c (init_rtti_processing): Adjust node creation.
1464 (throw_bad_typeid): Use const_type_info_type_node.
1465 Do not convert_from_reference.
1466 (typeid_ok_p): Use const_type_info_type_node.
1467 (build_typeid, get_typeid): Always return type_info typed node.
1468 (build_dynamic_cast_1): Dont convert_from_reference. Refactor.
1469 * semantics.c (finish_stmt_expr_expr): Do not
1470 convert_from_reference.
1471 (finish_id_expression): Convert_from_reference as appropriate.
1472 * typeck.c (decay_conversion): Do not convert_from_reference.
1473 (finish_class_member_access_expr): Likewise.
1474 (build_indirect_ref): Use POINTER_TYPE_P.
1475 (convert_arguments): Do not convert_from_reference.
1476 (build_modify_expr): Likewise.
1477 (convert_for_initialization): Likewise.
1478 * typeck2.c (build_x_arrow): Likewise.
1480 2004-12-07 Ziemowit Laski <zlaski@apple.com>
1482 * cp-tree.h (struct lang_type_class): Rename 'objc_protocols'
1483 field to 'objc_info'.
1485 2004-12-07 Kazu Hirata <kazu@cs.umass.edu>
1487 * pt.c: Replace a use of first_rtl_op with TREE_CODE_LENGTH.
1489 2004-12-07 Roger Sayle <roger@eyesopen.com>
1491 * name-lookup.c (leave_scope): We only need to update
1492 class_binding_level when leaving a class scope.
1494 2004-12-06 Ziemowit Laski <zlaski@apple.com>
1496 * cp-tree.h (struct lang_type_class): Add 'objc_protocols' field.
1498 2004-12-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1500 PR c++/17011, c++/17971
1501 * pt.c (tsubst_copy) <FIELD_DECL case>: Check and diagnose
1503 (tsubst_copy_and_build) <COMPONENT_REF case>: Check
1504 error_mark_node after member substitution.
1505 * semantics.c (finish_id_expression): Call
1506 finish_non_static_data_member for non-dependent FIELD_DECL.
1508 2004-12-03 Nathan Sidwell <nathan@codesourcery.com>
1511 * decl.c (grokdeclarator): Make sure class in pointer to member is
1514 2004-12-02 Nathan Sidwell <nathan@codesourcery.com>
1517 * parser.c (cp_parser_new_type_id): Move array size expression
1518 checks from here ...
1519 * init.c (build_new): ... to here.
1521 2004-12-02 Nathan Sidwell <nathan@codesourcery.com>
1524 * parser.c (cp_parser_class_head): Return NULL_TREE when
1525 push_template_decl fails. Update comment.
1527 2004-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1529 PR c++/15664, c++/18276
1530 * pt.c (tsubst_decl) <TEMPLATE_DECL case>: Reorganize. Correctly
1531 tsubst TEMPLATE_DECL that is a TEMPLATE_TEMPLATE_PARM.
1533 2004-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1536 * parser.c (cp_parser_type_specifier): Catch template declaration
1539 2004-12-01 Matt Austern <austern@apple.com>
1541 * name-lookup.c (namespace_binding): Omit alias check for global
1544 2004-12-01 Nathan Sidwell <nathan@codesourcery.com>
1547 * parser.c (cp_parser_class_name): Check decl's type is not
1551 * call.c (standard_conversion): Add FLAGS parameter. Do not allow
1552 derived to base conversion when checking constructor
1554 (implicit_conversion): Pass FLAGS to standard_conversion.
1555 (check_constructir_callable): Disallow conversion functions.
1557 2004-11-30 Kazu Hirata <kazu@cs.umass.edu>
1559 * parser.c: Fix comment typos.
1561 2004-11-27 Mark Mitchell <mark@codesourcery.com>
1564 * parser.c (cp_parser_check_for_definition_in_return_type): Take
1565 the defined type as a parameter, and inform the user about the
1566 possibility of a missing semicolon.
1567 (cp_parser_explicit_instantiation): Adjust call to
1568 cp_parser_check_for_definition_in_return_type.
1569 (cp_parser_init_declarator): Likewise.
1570 (cp_parser_member_declaration): Likewise.
1573 * cp-tree.def (TYPENAME_TYPE): Remove discussion of implicit
1574 typename from comments.
1575 * cp-tree.h (TYPENAME_IS_ENUM_P): New macro.
1576 (TYPENAME_IS_CLASS_P): Likewise.
1577 (make_typename_type): Change prototype.
1578 * decl.c (struct_typename_info): New type.
1579 (typename_compare): Expect the second argument to be a
1580 typename_info, not a tree.
1581 (build_typename_type): Add tag_type parameter. Do not create a
1582 new type until necessary.
1583 (make_typename_type): Add tag_type parameter.
1584 * error.c (TYPENAME_TYPE): Print tags other than "typename" if
1586 * friend.c (make_friend_class): Adjust call to make_typename_type.
1587 * parser.c (cp_parser_make_typename_type): Likewise.
1588 (cp_parser_primary_expression): Adjust call to
1589 cp_parser_lookup_name.
1590 (cp_parser_unqualified_id): Adjust calls to cp_parser_class_name.
1591 (cp_parser_class_or_namespace_name): Likewise.
1592 (cp_parser_postfix_expression): Adjust calls to
1594 (cp_parser_mem_initializer_id): Adjust calls to
1595 cp_parser_class_name.
1596 (cp_parser_type_parameter): Adjust calls to cp_parser_lookup_name.
1597 (cp_parser_template_name): Likewise.
1598 (cp_parser_template_argument): Likewise.
1599 (cp_parser_type_name): Adjust call to cp_parser_class_name.
1600 (cp_parser_elaborated_type_specifier): Adjust calls to
1601 make_typename_type and cp_parser_lookup_name.
1602 (cp_parser_namespace_name): Likewise.
1603 (cp_parser_class_name): Replace type_p parameter with tag_type.
1604 Adjust calls to make_typename_type and cp_parser_lookup_name.
1605 (cp_parser_class_head): Adjust calls to cp_parser_class_name.
1606 (cp_parser_base_specifier): Likewise.
1607 (cp_parser_lookup_name): Replace is_type parameter with tag_type.
1608 Adjust calls to make_typename_type and lookup_qualified_name.
1609 (cp_parser_lookup_name_simple): Adjust call to
1610 cp_parser_lookup_name.
1611 (cp_parser_constructor_declarator_p): Adjust call to
1612 cp_parser_class_name.
1613 * pt.c (convert_template_argument): Adjust all to
1615 (tsubst_decl): Do not pre-substitute the type of the declaration.
1616 (tsubst): Hand off declarations more quickly. Adjust call to
1620 * parser.c (cp_parser_postfix_dot_deref_expression): Robustify.
1622 2004-11-29 Daniel Jacobowitz <dan@codesourcery.com>
1625 * Make-lang.in (cp/decl2.o): Update dependencies.
1626 * decl2.c (finish_file): Call maybe_apply_pending_pragma_weaks.
1628 2004-11-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1631 * name-lookup.c (pushtag): Change return type to tree.
1632 * cp-tree.h (pushtag): Adjust declaration.
1633 * decl.c (xref_tag, start_enum): Use return value of pushtag.
1634 * pt.c (push_template_decl_real): Return immediately if
1635 pushdecl_namespace_level returns error_mark_node.
1637 2004-11-27 Kazu Hirata <kazu@cs.umass.edu>
1639 * pt.c: Fix a comment typo.
1641 2004-11-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1643 Friend class name lookup 4/n
1644 * class.c (pushclass): Don't call cxx_remember_type_decls.
1645 * cp-tree.h (clear_anon_tags): Remove declaration.
1646 * decl.c (grokdeclarator): Don't call lookup_tag_reverse.
1647 * name-lookup.c (binding_entry_free, binding_table_free): Comment
1649 (binding_table_find_anon_type, binding_table_reverse_maybe_remap,
1650 binding_table_remove_anonymous_types, cxx_remember_type_decls,
1651 bt_print_entry, clear_anon_tags, follow_tag_typedef, lookup_tag,
1652 lookup_tag_reverse): Remove
1653 (begin_scope, leave_scope, kept_level_p, print_binding_level):
1654 Don't use type_decls field in cp_binding_level.
1655 (maybe_process_template_type_declaration, pushtag): Set
1656 CLASSTYPE_NESTED_UTDS directly.
1657 * name-lookup.h (binding_table_remove_anonymous_types,
1658 cxx_remember_type_decls, lookup_tag, lookup_tag_reverse): Remove
1660 (cp_binding_level): Remove type_decls field.
1662 2004-11-26 Kazu Hirata <kazu@cs.umass.edu>
1664 * typeck.c: Fix a comment typo.
1666 2004-11-25 Mark Mitchell <mark@codesourcery.com>
1669 * class.c (instantiate_type): Treat NON_DEPENDENT_EXPRs with
1670 unknown_type as non matching. Tidy up.
1671 * pt.c (build_non_dependent_expr): Do not build a
1672 NON_DEPENDENT_EXPR for a VAR_DECL.
1675 * cp-tree.h (lvalue_or_else): Remove declaration.
1676 * tree.c (lvalue_or_else): Remove.
1677 * typeck.c (build_unary_op): Adjust call to lvalue_or_else.
1678 (build_modify_expr): Likewise.
1681 * decl.c (duplicate_decls): Return error_mark_node on error, as
1685 * decl.c (grokvardecl): Keep track of whether or not a there was
1686 explicit qualification.
1687 * name-lookup.c (set_decl_namespace): Complain about explicit
1688 qualification of a name within its own namespace.
1691 * typeck.c (check_return_expr): Robustify.
1693 2004-11-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1695 Friend class name lookup 3/n, PR c++/3332
1696 * name-lookup.c (push_inner_scope, pop_inner_scope): New functions.
1697 (lookup_type_scope): Don't deal with name from user declaration
1699 * name-lookup.h (push_inner_scope, pop_inner_scope): Add declarations.
1700 * parser.c (cp_parser_class_specifier): Use push_inner_scope and
1703 2004-11-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1705 Friend class name lookup 2/n, PR c++/14513, c++/15410
1706 * name-lookup.c (lookup_name_real): Simplify.
1707 (lookup_type_scope): Add SCOPE parameter. Handle friend class
1709 * name-lookup.h (tag_scope): New enum type.
1710 (lookup_type_scope): Adjust declaration.
1711 * decl.c (lookup_and_check_tag, xref_tag, xref_tag_from_type):
1712 Change bool parameter GLOBALIZED to TAG_SCOPE parameter SCOPE.
1713 (start_enum): Likewise. Add assertion test that NAME is
1714 IDENTIFIER_NODE. Use anonymous name for dummy ENUMERAL_TYPE in
1716 * cp-tree.h (xref_tag, xref_tag_from_type): Adjust declarations.
1717 * parser.c (cp_parser_elaborated_type_specifier,
1718 cp_parser_class_head): Adjust call to xref_tag.
1719 * pt.c (lookup_template_class, instantiate_class_template):
1721 * rtti.c (init_rtti_processing, build_dynamic_cast_1,
1722 tinfo_base_init, emit_support_tinfos): Likewise.
1724 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
1726 * g++spec.c, lex.c: Avoid ` as left quote in diagnostics.
1728 2004-11-24 Mark Mitchell <mark@codesourcery.com>
1731 * name-lookup.c (supplement_binding): Do not allow typedefs to be
1732 redefined in class scope.
1735 * parser.c (cp_parser_set_decl_type_spec): Do not try to allow
1736 redefinitions of builtin types other that "bool" or "wchar_t".
1738 2004-11-24 Steven Bosscher <stevenb@suse.de>
1740 * decl.c (cxx_init_decl_processing): Don't clear
1741 flag_inline_functions.
1743 2004-11-24 Mark Mitchell <mark@codesourcery.com>
1745 * pt.c (tsubst_function_type): Do not permit function types which
1746 return arrays or functions.
1749 * parser.c (cp_parser_init_declarator): Do not pop scope twice.
1752 * cp-tree.h (CTOR_NAME): Remove.
1753 (DTOR_NAME): Remove.
1754 * decl.c (initialize_predefined_identifiers): Add spaces to the
1755 end of constructor and destructor names.
1757 2004-11-24 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1760 * decl.c (start_decl): Check for invalid specialization headers.
1762 2004-11-24 Paolo Bonzini <bonzini@gnu.org>
1766 * call.c (standard_conversion): Move check for conversions between
1768 * typeck.c (ptr_reasonably_similar): ... here.
1770 2004-11-23 Ben Elliston <bje@au.ibm.com>
1772 * cp-tree.h (context_as_string): Remove extern.
1773 * error.c (context_as_string): Remove.
1775 * cp-tree.h (cp_type_qual_from_rid): Remove extern.
1776 * lex.c (cp_type_qual_from_rid): Remove.
1778 * cp-tree.h (do_poplevel): Remove extern.
1779 (check_multiple_declarators): Likewise.
1780 * semantics.c (do_poplevel): Make static.
1781 (check_multiple_declarators): Remove.
1783 * cp-tree.h (check_final_overrider): Remove extern.
1784 * search.c (check_final_overrider): Make static.
1786 * cp-tree.h (build_artificial_parm): Remove extern.
1787 * decl2.c (build_artificial_parm): Make static.
1789 2004-11-22 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1792 * typeck.c (build_unary_op) <CONVERT_EXPR, NEGATE_EXPR>: Unify code.
1793 Make sure the result is always a rvalue.
1795 2004-11-16 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1797 * decl.c (start_preparsed_function): Call check_function_type even
1799 (require_complete_types_for_parms): Skip dependent types.
1800 (check_function_type): Likewise.
1802 2004-11-16 Steven Bosscher <stevenb@suse.de>
1804 * Make-lang.in (cp/decl.o, cp/search.o): Don't depend on stack.h.
1805 * search.c: Don't include it.
1807 2004-11-15 Andrew Pinski <pinskia@physics.uc.edu>
1809 * cp-gimplify.c: Include pointer-set.h
1810 (cp_genericize_r): Use pointer_sets instead of a hashtable.
1811 Also instert the new statement for CLEANUP_STMT.
1812 (cp_genericize): Use pointer_sets instead of a hashtable.
1813 * Make-lang.in (cp-gimplify.o): Depend on pointer-set.h.
1815 2004-11-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1817 Friend class name lookup 1/n, PR c++/18471
1818 * decl.c (lookup_and_check_tag): New function.
1819 (xref_tag, start_enum): Use it.
1820 (check_elaborated_type_specifier): Move TEMPLATE_TYPE_PARM check
1821 before !DECL_IMPLICIT_TYPEDEF_P. Also display previously declared
1823 * name-lookup.c (lookup_name_current_level): Rename to ...
1824 (lookup_name_innermost_nonclass_level): ... this.
1825 (lookup_type_scope): New function.
1826 * name-lookup.h (lookup_name_current_level): Rename to ...
1827 (lookup_name_innermost_nonclass_level): ... this.
1828 (lookup_type_scope): Add declaration.
1830 2004-11-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1833 * pt.c (coerce_template_parms): Only emit error message about
1834 invalid template argument when TF_ERROR.
1836 2004-11-12 Mark Mitchell <mark@codesourcery.com>
1839 * decl.c (start_decl): Make sure to set *pop_scope_p. Return
1840 error_mark_node to indicate errors.
1843 * parser.c (cp_parser_direct_declarator): Disallow non-constant
1844 array bounds when not inside a function.
1847 * pt.c (tsubst_copy_and_build): Do not do Koenig lookup when an
1848 unqualified name resolves to a member function.
1851 * pt.c (tsubst_copy_and_build): Handle qualified names used from a
1852 derived class correctly.
1854 * decl2.c (import_export_decl): Fix typo in comment.
1855 * tree.c (pod_type_p): Likewise.
1857 2004-11-10 Andrew Pinski <pinskia@physics.uc.edu>
1859 * typeck.c (cxx_mark_addressable): Add braces around the first if.
1861 2004-11-10 Adam Nemet <anemet@lnxw.com>
1864 * typeck.c (cxx_mark_addressable): Issue an error if address of an
1865 explicit register variable is requested.
1867 2004-11-10 Nathan Sidwell <nathan@codesourcery.com>
1870 * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK): New.
1871 (struct lang_decl_flags): Add thunk_p flag.
1872 (struct lang_decl): Remove separate fixed_offset. Place
1873 cloned_function and fixed_offset into union.
1874 (DECL_CLONED_FUNCTION_P, DECL_CLONED_FUNCTION): Adjust.
1875 (DECL_THUNK_P, SET_DECL_THUNK_P): Adjust.
1876 (THUNK_FIXED_OFFSET): Adjust.
1877 * method.c (make_thunk): Adjust.
1879 2004-11-09 Mark Mitchell <mark@codesourcery.com>
1882 * init.c (build_new_1): Handle parenthesized type-ids that name an
1885 2004-11-09 Joseph S. Myers <joseph@codesourcery.com>
1887 * call.c, class.c, decl.c, decl2.c, error.c, mangle.c, parser.c,
1888 pt.c, search.c, semantics.c, typeck.c: Use %q, %< and %> for
1889 quoting in diagnostics.
1890 * parser.c (cp_parser_sizeof_operand): Use '' instead of `' for
1891 quoting in printf format.
1892 * decl.c (duplicate_decls, start_decl): Use %qD instead of
1895 2004-11-08 Kazu Hirata <kazu@cs.umass.edu>
1897 * class.c, decl.c, lex.c, name-lookup.c, parser.c, pt.c,
1898 search.c, typeck2.c: Fix comment formatting.
1900 2004-11-04 Ulrich Weigand <uweigand@de.ibm.com>
1902 PR tree-optimization/18184
1903 * cp-objcp-common.c (cxx_types_compatible_p): Do not treat pointers
1904 of different modes or alias-all flags as equivalent.
1905 * typeck.c (comptypes): Likewise.
1907 2004-11-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1910 * cp-tree.h (TYPE_REF_OBJ_P): New macro.
1911 (TYPE_PTR_P, TYPE_PTROB_P, TYPE_PTROBV_P, TYPE_PTRFN_P,
1912 TYPE_REFFN_P): Document.
1913 (fold_decl_constant_value): New prototype.
1914 * pt.c (convert_nontype_argument_function): Rewrite and extract
1916 (fold_decl_constant_value, convert_nontype_argument_function): New.
1917 (lookup_template_class): Add comment about useless double call.
1918 * mangle.c (write_expression): Strip conversions before lowering
1920 * cvt.c (ocp_convert): Check LOOKUP_COMPLAIN for a pedwarn. Disallow
1921 enum to enum conversion.
1923 2004-11-02 Mark Mitchell <mark@codesourcery.com>
1926 * parser.c (cp_parser_type_parameter): Robustify.
1929 * parser.c (cp_parser_single_declaration): Disallow template
1933 * typeck.c (build_const_cast): Use error_operand_p.
1935 2004-11-02 Ziemowit Laski <zlaski@apple.com>
1937 * cp-lang.c (cxx_types_compatible_p): Remove prototype and definition.
1938 (LANG_HOOKS_TYPES_COMPATIBLE_P): Move to cp-objcp-common.h.
1939 * cp-objcp-common.c (cxx_types_compatible_p): Moved definition here
1941 * cp-objcp-common.h (cxx_types_compatible_p): Moved prototype here
1943 (LANG_HOOKS_TYPES_COMPATIBLE_P): Moved here from cp-lang.c.
1945 2004-11-01 Nathan Sidwell <nathan@codesourcery.com>
1948 * search.c (check_final_overrider): Deprecate gnu covariant extension.
1950 2004-10-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
1952 Convert diagnostics to use quoting flag q 9/n
1953 * typeck.c (build_x_unary_op, convert_member_func_to_ptr,
1954 get_delta_difference): Use new quotation style.
1955 * repo.c (reopen_repo_file_for_write): Likewise.
1956 * pt.c (do_type_instantiation): Likewise.
1957 * parser.c (cp_parser_diagnose_invalid_type_name):
1958 * name-lookup.c (push_overloaded_decl, set_decl_namespace):
1959 * error.c (cp_print_error_function,
1960 print_instantiation_full_context): Likewise.
1961 * decl.c (define_label, grok_reference_init,
1962 maybe_deduce_size_from_array_init, revert_static_member_fn):
1963 * decl2.c (check_classfn): Likewise.
1964 * class.c (add_method, check_field_decls, layout_class_type,
1965 resolve_address_of_overloaded_function): Likewise.
1966 * call.c (build_x_va_arg, build_over_call): Likewise.
1968 2004-10-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
1970 Convert diagnostics to use quoting flag q 8/n
1971 * cvt.c (cp_convert_to_pointer, warn_ref_binding,
1972 convert_to_reference, ocp_convert, convert_to_void
1973 cp_convert_to_pointer): Use new quotation style.
1975 2004-10-31 Mark Mitchell <mark@codesourcery.com>
1978 * typeck2.c (store_init_value): Use split_nonconstant_init even
1979 for types that require construction.
1981 1004-10-28 Matt Austern <austern@apple.com>
1984 * cp-tree.h (class_key_or_enum_as_string): Declare.
1985 * error.c (class_key_or_enum): Rename to class_key_or_enum_as_string
1986 and remove static qualifier.
1987 * decl.c (shadow_tag): Warn about ignored attributes in class/struct/
1988 union/enum declaration.
1990 2004-10-29 Kazu Hirata <kazu@cs.umass.edu>
1992 * pt.c: Fix a comment typo.
1994 2004-10-28 Nathan Sidwell <nathan@codesourcery.com>
1996 * typeck.c (composite_pointer_type): Remove comment about DR 195.
1997 (build_reinterpret_cast_1): Revert DR195 patch. Only emit a
1998 warning when being pedantic.
1999 (build_reinterpet_cast, build_c_cast): Adjust.
2001 2004-10-29 Mark Mitchell <mark@codesourcery.com>
2004 * decl.c (grokdeclarator): Mark TYPE_DECLs as abstract when they
2005 appear in a constructor/destructor that will be cloned.
2007 1004-10-28 Matt Austern <austern@apple.com>
2010 * decl.c (finish_enum): Handle packed attribute.
2011 * parser.c (cp_parser_enum_specifier): Process trailing attributes.
2013 2004-10-28 Mark Mitchell <mark@codesourcery.com>
2016 * pt.c (instantiate_class_template): Increment
2017 processing_template_decl when substituting into a member class
2020 2004-10-27 Mark Mitchell <mark@codesourcery.com>
2023 * call.c (convert_like_real): Fix formatting.
2024 (initialize_reference): When binding a temporary to a base class,
2025 ensure that the nominal copy made is to the derived class, not the
2029 * parser.c (cp_parser_next_token_ends_template_argument_p): Do not
2032 2004-10-27 Andrew Pinski <pinskia@physics.uc.edu>
2034 * decl.c (bad_specifiers): Move the q after the %.
2036 2004-10-27 Andrew Pinski <pinskia@physics.uc.edu>
2038 * parser.c (cp_parser_diagnose_invalid_type_name): Move the q after
2041 2004-10-26 Mark Mitchell <mark@codesourcery.com>
2043 * name-lookup.c (do_namespace_alias): Use FROB_CONTEXT.
2044 * search.c (current_scope): Fix prototype.
2047 * search.c (current_scope): Return the innermost non-block scope,
2048 not the innermost non-block, non-namespace scope.
2049 (at_namespace_scope_p): Adjust accordingly.
2050 (dfs_accessible_post): Do not pass namespaces to is_friend.
2051 (dfs_walk_once_accessible_r): Likewise.
2052 * decl.c (grokvardecl): Adjust call to current_scope.
2053 (build_enumerator): Likewise.
2054 * parser.c (cp_parser_using_declaration): Likewise.
2055 (cp_parser_direct_declarator): Use at_namespace_scope_p instead of
2057 (cp_parser_class_head): Adjust call to current_scope.
2058 * name-lookup.c (do_namespace_alias): Set the DECL_CONTEXT for the
2062 * pt.c (tusbst_copy_and_build): Resolve enumeration constants to
2063 their underlying values.
2066 * typeck.c (build_binary_op): Honor build_type, even when in a
2069 2004-10-26 Nathan Sidwell <nathan@codesourcery.com>
2071 * parser.c (cp_lexer_get_preprocessor_token): Remove unneeded
2072 padding token checking.
2074 2004-10-25 Andrew Pinski <pinskia@physics.uc.edu>
2077 * decl.c (grokdeclarator) <case cdk_array>: Remove the call
2078 layout_type as it is already done by create_array_type_for_decl.
2080 2004-10-22 Nathan Sidwell <nathan@codesourcery.com>
2083 * parser.c (eof_token): Make const, correctly initialize rid and
2085 (struct cp_lexer): Replace buffer_end pointer with buffer_length
2087 (cp_lexer_new_main): Directly grow lexer's buffer here. Don't
2089 (cp_lexer_new_from_tokens): Adjust.
2090 (cp_lexer_grow_buffer): Remove.
2091 (cp_lexer_peek_nth_token, cp_lexer_consume_token,
2092 cp_lexer_purge_token): Add const casts.
2094 2004-10-21 Mark Mitchell <mark@codesourcery.com>
2098 * cp-tree.h (convert_to_base): Change prototype.
2099 (build_ptrmemfunc): Likewise.
2100 (convert_ptrmem): New function.
2101 * call.c (struct conversion): Adjust documentation for base_p.
2102 (standard_conversion): Set base_p for ck_pmem conversions as
2104 (convert_like_real): Use convert_to_base for ck_pmem and ck_ptr
2106 * class.c (convert_to_base): Handle both pointers and objects.
2107 Add nonnull parameter.
2108 (build_vfield_ref): Adjust call to convert_to_base.
2109 * cvt.c (cp_convert_to_pointer): Adjust call to build_ptrmemfunc.
2110 (convert_force): Likewise.
2111 * typeck.c (build_unary_op): Likewise.
2112 (convert_ptrmem): New function.
2113 (build_static_cast_1): Use it.
2114 (build_reinterpret_cast): Allow conversions to vector types.
2115 (get_delta_difference): Add c_cast_p parameter.
2116 (build_ptrmemfunc): Likewise. Adjust calls to
2117 get_delta_difference.
2119 2004-10-21 Andrew Pinski <pinskia@physics.uc.edu>
2122 * error.c (cp_error_at): Output the context as it might be
2123 different file as the other location.
2125 2004-10-21 Kazu Hirata <kazu@cs.umass.edu>
2127 * typeck.c: Fix a comment typo.
2129 2004-10-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2132 * decl.c (make_unbound_class_template): Add PARM_LIST parameter.
2133 * cp-tree.h (make_unbound_class_template): Adjust prototype.
2134 * parser.c (cp_parser_lookup_name): Adjust call to
2135 make_unbound_class_template.
2136 (cp_parser_single_declaration): Handle member class of class
2137 template as template friend parsing correctly.
2138 * friend.c (is_friend): Call is_specialization_of_friend for
2139 template friend class.
2140 (make_friend_class): Handle member class of class template as
2142 * pt.c (is_specialization_of_friend): Likewise.
2143 (instantiate_class_template): Likewise.
2144 (tsubst): Adjust call to make_unbound_class_template.
2146 2004-10-20 Nathan Sidwell <nathan@codesourcery.com>
2148 * typeck.c (composite_pointer_type): Add comment about DR 195
2149 (build_reinterpret_cast_1): Add for_reinterpret_cast_p parameter.
2150 Allow function pointer conversions that DR195 suggests.
2151 (build_reinterpret_cast, build_c_cast): Update
2152 build_reinterpret_cast_1 calls.
2154 2004-10-20 Kazu Hirata <kazu@cs.umass.edu>
2156 * call.c, typeck.c: Fix comment typos.
2158 2004-10-20 Nathan Sidwell <nathan@codesourcery.com>
2160 * parser.c (cp_token_position): New typedef. Define VEC thereof.
2161 (struct cp_lexer): Allow buffer and buffer_end to be NULL. Make
2162 next_token and last_token cp_token_position. Make saved_tokens a
2163 VEC(cp_token_position).
2164 (eof_token): New static variable.
2165 (CP_SAVED_TOKENS_SIZE): Rename to ...
2166 (CP_SAVED_TOKEN_STACK): ... here.
2167 (cp_lexer_new_main): Adjust main lexer creation and buffer
2169 (cp_lexer_new_from_tokens): Do not copy the tokens, merely point
2170 to the parent buffer. Do not append eof token.
2171 (cp_lexer_destroy): Only free buffer if non-NULL. Free token
2173 (cp_lexer_next_token, cp_lexer_prev_token): Remove.
2174 (cp_lexer_token_position, cp_lexer_token_at): New.
2175 (cp_lexer_saving_tokens): Adjust. Make inline.
2176 (cp_lexer_advance_token, cp_lexer_token_difference): Remove.
2177 (cp_lexer_peek_token_emit_debug_info): Fold into ...
2178 (cp_lexer_peek_token): ... here.
2179 (cp_lexer_peek_nth_token): Don't peek past EOF.
2180 (cp_lexer_consume_token): Set next_token to eof_token, if reaching
2182 (cp_lexer_purge_token): Adjust eof setting.
2183 (cp_lexer_purge_tokens_after): Likewise.
2184 (cp_lexer_save_tokens): Push next_token directly.
2185 (cp_lexer_commit_tokens): Adjust.
2186 (cp_lexer_rollback_tokens): Pop next_token directly.
2187 (cp_parser_check_for_invalid_template_id): Adjust token purging.
2188 (cp_parser_translation_unit): Do not consume the EOF.
2189 (cp_parser_nested_name_specifier_opt): Adjust token purging.
2190 (cp_parser_template_id, cp_parser_template_name): Likewise.
2192 2004-10-19 Mark Mitchell <mark@codesourcery.com>
2195 * call.c (struct conversion): Add base_p.
2196 (convert_like): Add c_cast_p argument.
2197 (convert_like_with_conversion): Likewise.
2198 (build_conv): Clear base_p.
2199 (standard_conversion): Set it, for derived-to-base conversions.
2200 (convert_like_real): Add c_cast_p parameter. Handle pointer
2201 conversions directly rather than relying on ocp_convert.
2202 (perform_direct_initialization_if_possible): Add c_cast_p
2204 * cp-tree.h (perform_direct_initialization_if_possible): Change
2206 (convert_member_func_to_ptr): New function.
2207 * typeck.c (check_for_casting_away_constness): Add diag_fn
2209 (build_static_cast_1): New function, split out from ...
2210 (build_static_cast): ... here. Use build_static_cast_1.
2211 (build_reinterpret_cast_1): New function, split out from ...
2212 (build_reinterpret_cast): ... here. Use build_reinterpret_cast_1.
2213 (build_const_cast_1): New function, split out from ...
2214 (build_const_cast): ... here. Use build_const_cast_1.
2215 (build_c_cast): Rewrite to use build_const_cast_1,
2216 build_static_cast_1, and build_reinterpret_cast_1.
2217 (convert_member_func_to_ptr): New function.
2219 2004-10-19 Paolo Bonzini <bonzini@gnu.org>
2222 * parser.c (enum cp_parser_prec): Give relational expressions
2223 a higher precedence than equality expressions.
2225 2004-10-15 Nathan Sidwell <nathan@codesourcery.com>
2227 * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Adjust lookup_base call.
2228 (ACCESSIBLY_UNIQUELY_DERIVED_P): Remove.
2229 (PUBLICLY_UNIQUELY_DERIVED_P): Adjust lookup_base call.
2230 (enum base_access): Reorganize.
2231 (accessible_base_p, accessible_p): Add consider_local_p parameter.
2232 * call.c (standard_conversion): Update comment about
2234 (enforce_access): Adjust accessible_p call.
2235 (build_over_call): Adjust accessible_base_p call.
2236 * class.c (convert_to_base): Adjust lookup_base call.
2237 (build_vtbl_ref_1): Likewise.
2238 (warn_about_ambiguous_bases): Likewise. Add early exit.
2239 * cvt.c (convert_to_pointer_force) Adjust lookup_base call.
2240 * search.c (accessible_base_p): Add consider_local_p parameter.
2241 (lookup_base): Pass consider_local_p to accessible_base_p call.
2242 (friend_accessible_p): Check whether scope is a class member.
2243 Remove unnecessary class template check.
2244 (accessible_p): Add consider_local_p parameter. Use it.
2245 (adjust_result_of_qualified_name_lookup): Adjust lookup_base call.
2246 * tree.c (maybe_dummy_object): Likewise.
2247 * typeck.c (comp_except_type): Use PUBLICLY_UNIQUELY_DERIVED_P.
2248 (build_class_member_access_expr): Adjust lookup_base call.
2249 * typeck2.c (binfo_or_else): Likewise.
2250 * rtti.c (build_dynamic_cast_1): Access can consider friendship
2253 2004-10-17 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2256 * decl2.c (grokfield): Apply attributes also to TYPE_DECLs.
2258 2004-10-16 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2261 * parser.c (cp_parser_parenthesized_expression_list): Fold
2262 non-dependent expressions in attribute lists.
2264 2004-10-15 Mark Mitchell <mark@codesourcery.com>
2267 * decl.c (declare_global_var): Use the return value from pushdecl.
2270 * parser.c (cp_parser_simple_declaration): Do not diagnose invalid
2271 type names if we have already found a valid type.
2272 (cp_parser_member_declaration): Likewise.
2275 * parser.c (cp_parser_member_specification_opt): Handle
2278 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
2280 * dump.c, g++spec.c, repo.c: Update copyright.
2282 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
2284 * decl.c: Fix a comment typo.
2286 2004-10-13 Andrew Pinski <pinskia@physics.uc.edu>
2289 * name-lookup.c (parse_using_directive): If we have a
2290 error_mark_node, do not set the decl namespace associations
2293 2004-10-14 Mark Mitchell <mark@codesourcery.com>
2296 * decl.c (cp_finish_decl): Do not call expand_static_init more
2297 than once for a single variable.
2299 2004-10-14 Matt Austern <austern@apple.com>
2301 * Make-lang.in (pt.o): depends on pointer-set.h
2302 * cp-tree.h (cp_walk_subtrees): Last argument is pointer_set_t* now.
2303 * pt.c (struct pair_fn_data): Use pointer_set_t, not htab_t
2304 (for_each_template_parm): Convert from htab_t to pointer_set_t.
2305 * tree.c (cp_walk_subtrees): Last argument is pointer_set_t* now.
2307 2004-10-13 Andrew Pinski <pinskia@physics.uc.edu>
2310 * semantics.c (finish_for_expr): Convert expression to void
2311 so that we don't create temporaries for a?b:c.
2313 2004-10-13 Kazu Hirata <kazu@cs.umass.edu>
2315 * search.c: Fix a comment typo.
2317 2004-10-12 Nathan Sidwell <nathan@codesourcery.com>
2319 * class.c (dfs_modify_vtables): Simplify condition. Return
2320 dfs_skip_bases as appropriate.
2321 (modify_all_vtables): Walk in pre-order.
2322 * search.c (dfs_walk_all, dfs_walk_once_r,
2323 dfs_walk_once_accessible_r): Assert post order function never
2324 returns dfs_skip_bases.
2326 * search.c (struct lookup_base_data_s): New.
2327 (lookup_base_r): Replace with ...
2328 (dfs_lookup_base): ... this.
2329 (lookup_base): Use dfs_walk_all.
2331 2004-10-12 Kazu Hirata <kazu@cs.umass.edu>
2333 * search.c: Fix comment typos.
2335 2004-10-11 Mark Mitchell <mark@codesourcery.com>
2338 * parser.c (cp_parser_declarator): Add member_p parameter.
2339 (cp_parser_condition): Adjust calls to cp_parser_declarator.
2340 (cp_parser_explicit_instantiation): Likewise.
2341 (cp_parser_init_declarator): Likewise.
2342 (cp_parser_direct_declarator): Add member_p parameter. Do not
2343 parse tentatively when parsing the parameters to a member.
2344 (cp_parser_type_id): Adjust calls to cp_parser_declarator.
2345 (cp_parser_parameter_declaration): Likewise.
2346 (cp_parser_member_declaration): Likewise.
2347 (cp_parser_exception_declaration): Likewise.
2350 * cp-tree.h (CLASSTYPE_TEMPLATE_SPECIALIZATION): Add a comment.
2351 * pt.c (optimize_specialization_lookup_p): Do not optimize lookups
2352 for members of partial or explicit specializations.
2355 * decl2.c (finish_anon_union): Robustify.
2357 2004-10-11 Nathan Sidwell <nathan@codesourcery.com>
2359 * cp-tree.h (get_dynamic_cast_base_type): Rename to ...
2360 (dcast_base_hint): ... here.
2361 * rtti.c (build_dynamic_cast_1): Use dcast_base_hint.
2362 * search.c (struct dcast_data_s): New.
2363 (dynamic_cast_base_recurse): Remove. Replace with ...
2364 (dfs_dcast_hint_pre, dfs_dcast_base_post): ... these. New.
2365 (get_dynamic_cast_base_type): Rename to ...
2366 (dcast_base_hint): ... here. Use dfs_walk_once_accessible.
2367 (accessible_r): Remove.
2368 (dfs_accessible_post): New, broken out of accessible_r.
2369 (accessible_p): Use dfs_walk_once_accessible.
2370 (dfs_walk_once_accessible_r): New. From accessible_r.
2371 (dfs_walk_once_accessible): New. From acessible_p.
2373 * cp-tree.h (SAME_BINFO_TYPE_P): New.
2374 * class.c (build_base_path): Use SAME_BINFO_TYPE_P to compare
2376 (convert_to_base_statically, determine_primary_bases,
2377 update_vtable_entry_for_fn, dfs_modify_vtables, build_vtt_inits,
2378 dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
2379 accumulate_vtbl_inits, dfs_accumulate_vtbl_inits,
2380 build_vtbl_initializer, add_vcall_offset_vtbl_entries_1): Likewise.
2381 * init.c (expand_member_init): Likewise.
2382 * search.c (lookup_base_r, dynamic_cast_base_recurse,
2383 binfo_via_virtual, copied_binfo, binfo_for_vbase,
2384 original_binfo): Likewise.
2385 * tree.c (copy_binfo): Likewise.
2387 2004-10-11 Kazu Hirata <kazu@cs.umass.edu>
2389 * semantics.c: Fix comment typos.
2391 2004-10-10 Andrew Pinski <pinskia@physics.uc.edu>
2396 * semantics.c (maybe_cleanup_point_expr): Call
2397 fold_build_cleanup_point_expr.
2398 (maybe_cleanup_point_expr_void): New function.
2399 (add_decl_expr): Call maybe_cleanup_point_expr_void.
2400 (finish_expr_stmt): Likewise.
2401 (finish_return_stmt): Likewise.
2402 (finish_for_expr): Likewise.
2403 (finish_asm_stmt): Likewise.
2404 * typeck.c (condition_conversion): Call
2405 fold_build_cleanup_point_expr.
2407 2004-10-10 Andrew Pinski <pinskia@physics.uc.edu>
2410 * semantics.c (add_decl_expr): If the decl has a size which
2411 has side effects then the decl expression needs a cleanup point.
2413 2004-10-10 Mark Mitchell <mark@codesourcery.com>
2416 * decl.c (grokdeclarator): Robustify error-recovery on invalid
2419 2004-10-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
2421 Convert diagnostics to use quoting flag q 7/n
2422 * typeck.c (composite_pointer_type_r, composite_pointer_type,
2423 cxx_sizeof_or_alignof_type, cxx_sizeof_or_alignof_expr,
2424 string_conv_p, build_class_member_access_expr,
2425 build_class_member_access_expr, lookup_destructor,
2426 finish_class_member_access_expr, build_indirect_ref,
2427 get_member_function_from_ptrfunc, build_function_call,
2428 convert_arguments, build_binary_op, pointer_diff, build_unary_op,
2429 check_for_casting_away_constness, build_static_cast,
2430 build_reinterpret_cast, build_const_cast, build_c_cast,
2431 build_modify_expr, get_delta_difference, build_ptrmemfunc,
2432 dubious_conversion_warnings, convert_for_assignment,
2433 convert_for_initialization,
2434 maybe_warn_about_returning_address_of_local, check_return_expr):
2437 * typeck2.c (error_not_base_type, readonly_error,
2438 abstract_virtuals_error, cxx_incomplete_type_diagnostic,
2439 store_init_value, digest_init, build_x_arrow,
2440 build_m_component_ref, require_complete_eh_spec_types): Likewise.
2442 * tree.c (cp_build_qualified_type_real,
2443 handle_java_interface_attribute, handle_init_priority_attribute):
2446 * semantics.c (finish_asm_stmt, finish_non_static_data_member,
2447 finish_pseudo_destructor_expr,
2448 check_template_template_default_arg, begin_class_definition,
2449 finish_base_specifier, qualified_name_lookup_error,
2450 finish_id_expression, finish_typeof): Likewise.
2452 * search.c (lookup_base, check_final_overrider,
2453 look_for_overrides_r): Likewise.
2455 * rtti.c (get_tinfo_decl, build_dynamic_cast_1): Likewise.
2457 2004-10-09 Mark Mitchell <mark@codesourcery.com>
2460 * error.c (dump_expr): Correct handling of AGGR_INIT_EXPRs using a
2464 * init.c (build_new): Correct comments.
2465 * parser.c (cp_parser_new_expression): Use NULL_TREE for nelts in
2469 * parser.c (cp_parser_postfix_dot_deref_expression): If the
2470 pseduo-destructor-name production does not work, fall back to the
2471 ordinary production.
2474 * tree.c (cp_tree_equal): Handle a BASELINK.
2477 * cp-tree.h (check_var_type): New function.
2478 * decl.c (check_var_type): New function, split out from ...
2479 (grokdeclarator): ... here.
2480 * pt.c (tsubst_decl): Use check_var_type.
2483 * decl.c (grokdeclarator): Disallow declarations of operators as
2486 2004-10-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2489 * error.c (dump_expr): Add missing case for RDIV_EXPR.
2491 2004-10-08 Kazu Hirata <kazu@cs.umass.edu>
2493 * pt.c, search.c: Fix comment typos.
2495 2004-10-08 Nathan Sidwell <nathan@codesourcery.com>
2497 * cp-tree.h (dfs_walk, dfs_walk_real, dfs_unmark, markedp,
2499 (dfs_skip_bases, dfs_walk_all, dfs_walk_once): New.
2500 * class.c (struct find_final_overrider_data): Remove most_derived,
2501 vpath_list and vpath fields. Add path field.
2502 (dfs_find_final_ocerrider_1): Add DEPTH parameter. Adjust.
2503 (dfs_find_final_overrider): Rename to ...
2504 (dfs_find_final_overrider_pre): ... here. Adjust.
2505 (dfs_find_final_overrider_post): Adjust.
2506 (dfs_find_final_overrider_q): Fold into
2507 dfs_find_final_overrider_pre.
2508 (find_final_overrider): Adjust dfs searching.
2509 (dfs_modify_vtables): Don't mark binfo here.
2510 (modify_all_vtables): Use dfs_walk_once.
2511 (build_vtt_inits): Likwise. Use dfs_walk_all.
2512 (dfs_build_secondary_vptr_vtt_inits): Don't mark binfo here.
2513 Return dfs_skip_bases as appropriate.
2514 (dfs_fixup_binfo_vtbls): Return dfs_skip_bases as appropriate.
2515 * init.c (dfs_initialized_vtbl_ptrs): Return dfs_skip_bases as
2516 appropriate. Don't mark binfo here.
2517 (initialize_vtbl_ptrs): Use dfs_walk_once.
2518 * search.c (struct vbase_info): Remove unused struct.
2519 (access_in_type): Use dfs_walk_once.
2520 (dfs_access_in_type): Don't mark binfo here.
2521 (dfs_accessible_queue_p, dfs_accessible_p) Remove.
2523 (accessible_r): ... here. New. Specialize dfs_walk_once.
2524 (accessible_p): Use accessible_r.
2525 (lookup_field_queue_p): Remove. Fold into ...
2526 (lookup_field_r): ... here. Adjust.
2527 (lookup_member): Use dfs_walk_all.
2528 (dfs_walk_real, dfs_walk): Replace with ...
2529 (dfs_walk_all, dfs_walk_once): ... these.
2530 (dfs_walk_once_r, dfs_unmark_r): Workers for dfs_walk_once.
2531 (dfs_unmark, unmarkedp, markedp): Remove.
2532 (dfs_get_pure_virtuals): Don't mark binfo here.
2533 (get_pure_virtuals): Use dfs_walk_once.
2534 (dfs_debug_unmarked_p): Remove. Fold into ...
2535 (dfs_debug_mark): ... here.
2536 (note_debug_info_needed): Use dfs_walk_all.
2538 2004-10-07 Andrew Pinski <pinskia@physics.uc.edu>
2540 * pt.c (tsubst_expr) <case ASM_EXPR>: Look passed the
2541 CLEANUP_POINT_EXPR to get the asm expression.
2543 2004-10-07 Mark Mitchell <mark@codesourcery.com>
2545 * cp-tree.h (ICS_USER_FLAG): Remove comment about obsolete flag.
2546 (DECL_MEMBER_TEMPLATE_P): New macro.
2547 (is_member_template): Remove.
2548 (class_method_index_for_fn): New function.
2549 * pt.c (build_over_call): Use DECL_MEMBER_TEMPLATE_P.
2550 * class.c (finish_struct_methods): Remove out-of-date comment.
2551 * decl.c (copy_fn_p): Use DECL_MBMER_TEMPLATE_P.
2552 * decl2.c (check_classfn): Use DECL_MEMBER_TEMPLATE_P and
2553 class_method_index_for_fn.
2554 * pt.c (is_member_template): Remove.
2555 (is_member_template_class): Likewise.
2556 (optimize_specialization_lookup_p): New function.
2557 (retrieve_specialization): Optimize lookups for members that are
2558 not member templates.
2559 (register_specialization): Adjust accordingly.
2560 (build_template_decl): Add member_template_p parameter. Set
2561 DECL_MEMBER_TEMPLATE_P.
2562 (process_partial_specialization): Adjust call to
2563 retrieve_specialization.
2564 (push_template_decl_real): Determine whether the template is a
2566 (lookup_template_class): Use retrieve_specialization.
2567 (tsubst_decl): Adjust call to retrieve_specialization.
2568 (tsubst_exception_specification): New function.
2570 (tsubst_copy): Use DECL_MEMBER_TEMPLATE_P.
2571 (instantiate_template): Adjust call to retrieve_specialization.
2572 (regenerate_decl_from_template): Do not actually generate a new
2574 (instantiate_decl): Adjust call to retrieve_specialization.
2575 (class_method_index_for_fn): New method.
2577 2004-10-07 Andrew Pinski <pinskia@physics.uc.edu>
2579 * parser.c (cp_parser_asm_definition): Look passed the
2580 CLEANUP_POINT_EXPR to get the asm expression.
2582 2004-10-06 Andrew Pinski <pinskia@physics.uc.edu>
2585 * semantics.c (finish_asm_stmt): Asm expressions need cleanup
2588 2004-10-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
2590 Convert diagnostics to use quoting flag q 6/n
2591 * pt.c (finish_member_template_decl, check_specialization_scope,
2592 maybe_process_partial_specialization, determine_specialization,
2593 check_explicit_specialization, maybe_check_template_type,
2594 process_partial_specialization, check_default_tmpl_args,
2595 push_template_decl_real, redeclare_class_template,
2596 convert_nontype_argument, coerce_template_parms,
2597 lookup_template_class, push_tinst_level,
2598 instantiate_class_template, tsubst_arg_types,
2599 tsubst_function_type, tsubst, tsubst_qualified_id,
2600 tsubst_copy_and_build, check_instantiated_args,
2601 do_decl_instantiation, do_type_instantiation,
2602 invalid_nontype_parm_type_p, check_specialization_namespace,
2603 convert_template_argument, determine_specialization,
2604 check_template_shadow, tsubst_decl
2605 instantiate_pending_templates): Use quoting marks.
2607 2004-10-05 Nathan Sidwell <nathan@codesourcery.com>
2610 * parser.c (cp_parser_postfix_expression): Inhibit Koenig when
2611 unqualified lookup finds a member function.
2613 2004-10-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
2615 Convert diagnostics to use quoting flag q 5/n
2616 * parser.c (cp_parser_name_lookup_error,
2617 cp_parser_diagnose_invalid_type_name,
2618 cp_parser_primary_expression, cp_parser_unqualified_id,
2619 cp_parser_nested_name_specifier_opt, cp_parser_labeled_statement,
2620 cp_parser_jump_statement, cp_parser_simple_declaration,
2621 cp_parser_decl_specifier_seq, cp_parser_mem_initializer_id,
2622 cp_parser_type_parameter, cp_parser_template_id,
2623 cp_parser_template_name, cp_parser_direct_declarator,
2624 cp_parser_parameter_declaration_list, cp_parser_class_head,
2625 cp_parser_base_specifier, cp_parser_lookup_name,
2626 cp_parser_late_parsing_default_args,
2627 cp_parser_optional_template_keyword
2628 cp_parser_elaborated_type_specifier, cp_parser_check_class_key,
2629 cp_parser_check_access_in_redeclaration): Use quoting marks.
2631 * name-lookup.c (supplement_binding, pushdecl,
2632 check_for_out_of_scope_variable, validate_nonmember_using_decl,
2633 do_nonmember_using_decl, lookup_tag, set_decl_namespace,
2634 push_namespace, do_namespace_alias, do_using_directive,
2635 ambiguous_decl, lookup_namespace_name, add_function): Likewise.
2637 * method.c (use_thunk): Likewise.
2639 * lex.c (unqualified_name_lookup_error,
2640 unqualified_fn_lookup_error): Likewise.
2642 2004-10-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
2644 Convert diagnostics to use quoting flag q 4/n
2645 * except.c (decl_is_java_type, build_throw,
2646 is_admissible_throw_operand, check_handlers_1, check_handlers):
2647 Use quoting formats.
2648 * friend.c (add_friend, make_friend_class, do_friend): Likewise.
2649 * init.c (sort_mem_initializers, emit_mem_initializers,
2650 member_init_ok_or_else, expand_member_init, is_aggr_type,
2651 build_offset_ref, build_java_class_ref): Likewise.
2653 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
2655 Convert diagnostics to use quoting flag q 3/n
2656 * decl.c (pop_label, duplicate_decls, redeclaration_error_message,
2657 redeclaration_error_message, lookup_label, check_goto,
2658 make_typename_type, make_unbound_class_template,
2659 fixup_anonymous_aggr, check_tag_decl, start_decl, start_decl_1,
2660 grok_reference_init, layout_var_decl, maybe_commonize_var,
2661 check_for_uninitialized_const_var, reshape_init_array,
2662 reshape_init, check_initializer, cp_finish_decl,
2663 member_function_or_else, bad_specifiers, grokfndecl, grokvardecl,
2664 check_static_variable_definition, compute_array_index_type,
2665 create_array_type_for_decl, check_special_function_return_type,
2666 grokdeclarator, check_default_argument, grokparms,
2667 grok_ctor_properties, grok_op_properties,
2668 check_elaborated_type_specifier, xref_tag, finish_enum,
2669 build_enumerator, check_function_type, start_preparsed_function,
2670 store_parm_decls): Use quoting formats.
2671 * decl2.c (grok_array_decl, delete_sanity, check_member_template,
2672 check_java_method, check_classfn, finish_static_data_member_decl,
2673 grokfield, grokbitfield, grok_function_init,
2674 build_anon_union_vars, coerce_new_type, coerce_delete_type,
2675 check_default_args): Likewise.
2676 * parser.c (cp_parser_decl_specifier_seq): Likewise.
2678 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
2680 Convert diagnostics to use quoting flag q 2/n
2681 * class.c (build_base_path, add_method, alter_access,
2682 handle_using_decl, check_bases,
2683 maybe_warn_about_overly_private_class, find_final_overrider,
2684 warn_hidden, finish_struct_anon, add_implicitly_declared_members,
2685 check_bitfield_decl, check_field_decls, layout_empty_base,
2686 build_base_field, check_methods, layout_virtual_bases,
2687 warn_about_ambiguous_bases, layout_class_type, finish_struct_1,
2688 resolve_address_of_overloaded_function, instantiate_type,
2689 note_name_declared_in_class): Use format flag "q" for quoting.
2691 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
2693 Convert diagnostics to use quoting flag q 1/n
2694 * error.c (locate_error): Ignore quoting flag q.
2695 * call.c (build_user_type_conversion_1, build_operator_new_call,
2696 build_object_call, op_error, build_conditional_expr,
2697 build_new_op, build_op_delete_call, enforce_access,
2698 convert_like_real, convert_arg_to_ellipsis, build_x_va_arg,
2699 convert_default_arg, build_over_call, build_new_method_call,
2700 joust, perform_implicit_conversion, initialize_reference): Use the
2703 2004-10-03 Andrew Pinski <pinskia@physics.uc.edu>
2706 * typeck.c (build_reinterpret_cast): Return if the inner type
2709 2004-10-01 Jan Hubicka <jh@suse.cz>
2711 * semantics.c (expand_body): Update call of tree_rest_of_compilation.
2713 2004-09-30 Nathan Sidwell <nathan@codesourcery.com>
2715 * cp-tree.h (struct lang_decl): Shrink by reordering fields and
2716 turning operator_code and fixed_offset into bitfields.
2718 2004-09-29 Joseph S. Myers <jsm@polyomino.org.uk>
2720 * decl.c (duplicate_decls): Merge TREE_DEPRECATED.
2722 2004-09-29 Jason Merrill <jason@redhat.com>
2724 PR tree-optimization/17697
2725 * decl.c (duplicate_decls): Copy TREE_NOTHROW from newdecl to olddecl.
2727 2004-09-28 Jason Merrill <jason@redhat.com>
2730 * class.c (build_base_field): Set TYPE_MODE.
2732 2004-09-28 Roger Sayle <roger@eyesopen.com>
2735 * g++spec.c (lang_specific_driver): Unrecognized libraries, other
2736 than -lc and -lm, may require linking against libstc++.
2738 2004-09-28 Kazu Hirata <kazu@cs.umass.edu>
2740 * tree.c: Fix a comment typo.
2742 2004-09-28 Nathan Sidwell <nathan@codesourcery.com>
2744 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): Remove.
2745 (struct secondary_vptr_vtt_init_data_s): New.
2746 (build_vtt_inits): Adjust dfs_walkers.
2747 (dfs_build_secondary_vptr_vtt_inits): Caller data is a
2748 secondary_vptr_vtt_init_data_s structure. Adjust.
2749 (dfs_ctor_vtable_bases_queue_p): Remove.
2750 (dfs_fixup_binfo_vtbls): No need to clear BINFO_MARKED. Simplify.
2752 * pt.c (struct get_template_base_data_s): Remove.
2753 (get_template_base_r): Fold into get_template_base.
2754 (get_template_base): Walk base binfos directly in inheritance
2757 2004-09-27 Mark Mitchell <mark@codesourcery.com>
2760 * cp-tree.h (fold_if_not_in_template): New function.
2761 * call.c (build_conditional_expr): Use fold_if_not_in_template.
2762 (build_cxx_call): Likewise.
2763 * cvt.c (convert_to_complex): Likewise.
2764 (ocp_convert): Likewise.
2765 (convert): Likewise.
2766 (convert_force): Likewise.
2767 * decl.c (compute_array_index_type): Clear
2768 processing_template_decl while folding array bounds.
2769 * pt.c (convert_nontype_argument): Clear
2770 processing_template_decl while processing non-type argument
2772 * tree.c (fold_if_not_in_template): New function.
2773 * typeck.c (build_class_member_access_expr): Use
2774 fold_if_not_in_template.
2775 (build_array_ref): Likewise.
2776 (build_binary_op): Likewise. Do not try to optimize computations
2777 when processing templates.
2778 (cp_pointer_int_sum): Use fold_if_not_in_template.
2779 (pointer_diff): Likewise.
2780 (build_unary_op): Likewise.
2781 (build_reinterpret_cast): Likewise.
2782 (get_delta_difference): Likewise.
2783 (expand_ptrmemfunc_cst): Likewise.
2784 (dubious_conversion_warnings): Likewise.
2786 2004-09-27 Matt Austern <austern@apple.com>
2788 * cp/parser.c (struct cp_token): New one-bit field , implicit_extern_c
2789 (cp_lexer_get_preprocessor_token): Set implicit_extern_c for
2790 tokens that come from headers that are implicitly extern "C".
2791 (struct cp_parser): new one-bit field, implicit_extern_c.
2792 (cp_parser_new): Set parser's implicit_extern_c to false.
2793 (cp_parser_translation_unit): Pop lang context if we were in a
2794 header that was implicitly extern "C".
2795 (cp_parser_declaration_seq_opt): Push/pop lang context as
2796 required by the token's and parser's implicit_extern_c.
2798 2004-09-27 Mark Mitchell <mark@codesourcery.com>
2801 * cp-tree.h (shared_member_p): Declare.
2802 * search.c (shared_member_p): Give it external linkage.
2803 * semantics.c (finish_qualified_id_expr): Use it.
2804 (finish_id_expression): Likewise.
2807 * semantics.c (finish_id_expression): Do not add "this->" to
2808 static member functions.
2810 2004-09-27 Nathan Sidwell <nathan@codesourcery.com>
2813 * error.c (dump_type): Change TREE_VEC case into TREE_BINFO.
2815 * class.c (struct count_depth_data): Remove.
2816 (dfs_depth_post, dfs_depth_q): Remove.
2817 (find_final_overrider): Use number of vbase classes as depth
2820 * cp-tree.h (types_overlap_p): Remove.
2821 * search.c (struct overlap_info): Remove.
2822 (dfs_check_overlap, dfs_no_overlap_yet, types_overlap_p): Remove.
2824 * pt.c (GTB_VIA_VIRTUAL, GTB_IGNORE_TYPE): Remove.
2825 (get_template_base_recursive): Remove. Replace with ...
2826 (get_template_base_r): ... this.
2827 (struct get_template_base_data_s): New.
2828 (get_template_base): Use get_template_base_r via dfs_walk. Always
2829 return NULL on failure.
2830 (unify): Remove error_mark_node check from get_template_base result.
2832 2004-09-24 Paolo Bonzini <bonzini@gnu.org>
2834 * parser.c (cp_parser_expression_stack): Clarify why it is
2835 an array of NUM_PREC_VALUES elements.
2836 (cp_parser_binary_expression): Clarify why we do not need to
2837 handle stack overflow.
2839 2004-09-24 Nathan Sidwell <nathan@codesourcery.com>
2842 * search.c (lookup_field_queue_p): Correct check for hidden base.
2844 * search.c (bfs_walk): Remove.
2845 (lookup_member): Use dfs_walk_real.
2846 (dfs_walk_real): Move and adjust documentation from bfs_walk.
2848 2004-09-23 Zack Weinberg <zack@codesourcery.com>
2850 * decl.c (grokfndecl): If ::main is found not to return int,
2851 correct it after issuing a diagnostic.
2852 (grokdeclarator): If the incoming type was error_mark_node, do
2853 not complain about declaring something with no type.
2854 (start_function): Change check for ::main not returning int to
2855 an assertion, as grokfndecl now catches this when the user did it.
2856 * init.c (perform_member_init, sort_mem_initializers)
2857 (emit_mem_initializers): Make most diagnostics be issued on
2858 the line of current_function_decl, not whatever the current
2860 * parser.c (cp_lexer_peek_token_emit_debug_info): Surround
2861 definition and declaration with #ifdef ENABLE_CHECKING.
2862 Avoid unnecessary use of fprintf.
2863 (cp_lexer_print_token, cp_lexer_debug_stream): Adjust stub
2864 definitions to avoid warnings.
2865 (cp_lexer_new_main): Add assertion that first token is not a
2867 (cp_lexer_new_from_token_array): Fold into ...
2868 (cp_lexer_new_from_tokens): ... here. Add assertion that
2869 first token is not a padding token.
2870 (cp_lexer_set_source_position_from_token): Move nearer to callers.
2871 Remove unused lexer argument.
2872 (cp_lexer_peek_token): Just print debugging report (if enabled)
2873 and return lexer->next_token.
2874 (cp_lexer_skip_purged_tokens): Delete.
2875 (cp_lexer_next_token_is, cp_lexer_next_token_is_not): Make
2876 inline, simplify bodies.
2877 (cp_lexer_peek_nth_token): Add debugging report a la
2878 cp_lexer_peek_token.
2879 (cp_lexer_consume_token): Correct commentary. Advance over
2880 purged tokens here. Set current source position here, from
2881 token to be returned. Avoid unnecessary use of fprintf.
2882 (cp_lexer_purge_token): Advance next_token pointer over this and
2883 subsequent purged tokens.
2884 (cp_parser_error): Adjust source position to that of the
2886 (cp_parser_push_lexer_for_tokens, cp_parser_pop_lexer): New functions.
2887 (cp_parser_string_literal): Remove some excessive cleverness.
2888 (cp_parser_enum_specifier): Call start_enum before consuming
2890 (cp_parser_member_declaration): Make the "extra semicolon"
2891 diagnostic consistently-worded with the other place this is
2892 diagnosed. Explicitly set the diagnostic location to the
2893 location of the offending semicolon.
2894 (cp_parser_enclosed_template_argument_list): Use %</%> quoting
2895 in diagnostics. Do not use cp_parser_require. Set location
2896 of diagnostics about improper use of '>>' to location of
2898 (cp_parser_late_parsing_for_member):
2899 Use cp_parser_push_lexer_for_tokens and cp_parser_pop_lexer.
2900 (cp_parser_late_parsing_default_args): Likewise. Manually
2901 move some logic outside the loop.
2903 2004-09-23 Andrew Pinski <pinskia@physics.uc.edu>
2906 * cvt.c (cp_convert_to_pointer): Return early when the type is
2909 2004-09-21 Fariborz Jahanian <fjahanian@apple.com>
2913 * decl.c (grokfndecl): Add new argument "attrlist", use it
2914 to call cplus_decl_attributes.
2915 (start_function): Remove call to cplus_decl_attributes.
2916 * cvt.c (ocp_convert): Add support to use type conversion
2917 function to vector type.
2918 * parser.c (cp_parser_conversion_type_id): Add attributes, if any,
2921 2004-09-23 Paolo Bonzini <bonzini@gnu.org>
2925 * parser.c (cp_parser_token_tree_map_node,
2926 cp_parser_pm_expression, cp_parser_additive_expression,
2927 cp_parser_multiplicative_expression, cp_parser_shift_expression,
2928 cp_parser_relational_expression, cp_parser_equality_expression,
2929 cp_parser_and_expression, cp_parser_exclusive_or_expression,
2930 cp_parser_inclusive_or_expression,
2931 cp_parser_logical_and_expression,
2932 cp_parser_logical_or_expression): Removed.
2933 (enum cp_parser_prec, struct cp_parser_token_tree_map_node,
2934 binops, binops_by_token): New.
2935 (cp_parser_assignment_expression): Use cp_parser_binary_expression.
2936 (cp_parser_new): Initialize binops_by_token.
2937 (cp_parser_binary_expression): Rewritten.
2940 2004-09-23 Kazu Hirata <kazu@cs.umass.edu>
2942 * parser.c: Fix a comment typo.
2944 2004-09-23 Nathan Sidwell <nathan@codesourcery.com>
2947 * decl.c (xref_basetypes): Look through typedefs before checking
2950 2004-09-22 Nathan Sidwell <nathan@codesourcery.com>
2952 * cp-tree.h (unemitted_tinfo_decls): Make a VEC(tree).
2953 * decl2.c (cp_finish_file): Adjust tinfo decl emission loop.
2954 * rtti.c (unemitted_tinfo_decls): Make a VEC(tree).
2955 (init_rtti_processing): Initialize it to something realistic.
2956 (get_tinfo_decl): Adjust pushing the new decl.
2958 * cp-tree.h (struct lang_type_class): Remove marked flags, add
2959 diamond_shaped and repeated_base flags. Reorder to keep 8-bit blocks.
2960 (TYPE_MARKED_P): New.
2961 (CLASSTYPE_DIAMOND_SHAPED_P, CLASSTYPE_REPEATED_BASE_P): New.
2962 (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
2963 CLEAR_CLASSTYPE_MARKED_N): Remove.
2964 (CLASSTYPE_MARKED_*, SET_CLASSTYPE_MARKED_*,
2965 CLEAR_CLASSTYPE_MARKED_*): Remove.
2966 * decl.c (xref_basetypes): Use TYPE_MARKED_P. Determine diamond
2967 shaped and repeated base properties.
2968 * lex.c (cxx_make_type): Don't clear TYPE_ALIAS_SET.
2969 * rtti.c (dfs_class_hint_mark, dfs_class_hint_unmark,
2970 class_hint_flags): Remove.
2971 (get_pseudo_ti_init): Use CLASSTYPE_REPEATED_BASE_P and
2972 CLASSTYPE_DIAMOND_SHAPED_P.
2974 2004-09-21 Ziemowit Laski <zlaski@apple.com>
2976 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved here from
2978 (objcp_tsubst_copy_and_build): Reformat function signature.
2979 * cp-objcp-common.h (objcp_tsubst_copy_and_build): Likewise.
2980 (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved to cp-lang.c.
2982 2004-09-21 Zack Weinberg <zack@codesourcery.com>
2984 * parser.c (cp_lexer_peek_token, cp_lexer_consume_token):
2985 Don't handle CPP_PRAGMA tokens specially.
2986 (cp_lexer_handle_pragma): Use cp_lexer_consume_token. Don't
2987 purge the token; do clear token->value after processing. Add
2988 assertion at beginning that token->value is nonzero.
2989 (cp_parser_statement, cp_parser_declaration_seq_opt): Handle
2990 CPP_PRAGMA as a full statement or declaration in its own right.
2992 2004-09-21 Matt Austern <austern@apple.com>
2995 * decl.c (grokvardecl): Accept declarations of global variables
2996 using anonymous types.
2998 2004-09-21 Roger Sayle <roger@eyesopen.com>
3001 * tree.c (lvalue_p_1): Disallow MIN_EXPR and MAX_EXPR as lvalues
3002 if either operand has side-effects.
3003 * typeck.c (rationalize_conditional_expr): Assert that neither
3004 operand of MIN_EXPR or MAX_EXPR has side-effects.
3005 (build_modify_expr): Add support for MIN_EXPR and MAX_EXPR.
3006 Check that the "lhs" is a valid lvalue, i.e. that neither operand
3007 of a MIN_EXPR or MAX_EXPR has a side-effect.
3009 2004-09-21 Nathan Sidwell <nathan@codesourcery.com>
3011 * cp-tree.h (struct lang_type_header): Remove
3012 uses_multiple_inheritance field.
3013 (TYPE_USES_MULTIPLE_INHERITANCE): Remove.
3014 (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): Remove.
3015 (TYPE_USES_VIRTUAL_BASECLASSES): Remove.
3016 (DECL_NEEDS_VTT_PARM_P): Use CLASSTYPE_VBASECLASSES.
3017 (TYPE_CONTAINS_VPTR_P): Likewise.
3018 * call.c (add_template_candidate_real): Use
3019 CLASSTYPE_VBASECLASSES.
3020 (build_special_member_call): Likewise.
3021 * class.c (finish_struct_bits): Remove
3022 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P & TYPE_USES_VIRTUAL_BASECLASSES
3024 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
3025 (create_vtable_ptr): Remove TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P
3027 (build_vtt_inits): Use CLASSTYPE_VBASECLASSES.
3028 (accumulate_vtbl_inits, build_vbase_offset_vtbl_entries):
3030 * decl.c (xref_basetypes): Remove TYPE_USES_MULTIPLE_INHERITANCE,
3031 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
3033 (cxx_maybe_build_cleanup): Use CLASSTYPE_VBASECLASSES.
3034 * decl2.c (maybe_retrofit_in_chrg): Likewise.
3035 * init.c (expand_member, push_base_cleanups): Likewise.
3036 * pt.c (instantiate_class_template): Remove
3037 TYPE_USES_MULTIPLE_INHERITANCE,
3038 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
3040 * ptree.c (cxx_print_type): Remove TYPE_USES_MULTIPLE_INHERITANCE
3042 * typeck2.c (process_init_constructor): Replace some sorrys with
3045 2004-09-21 Andreas Tobler <a.tobler@schweiz.ch>
3047 * decl.c (reshape_init_array): Initialize max_index_cst to fix
3050 2004-09-20 Mark Mitchell <mark@codesourcery.com>
3053 * pt.c (tsubst): Fix parentheses to accomodate emacs.
3054 (tsubst_baselink): If we get a single function, mark it as used.
3056 2004-09-20 Matt Austern <austern@apple.com>
3057 Zack Weinberg <zack@codesourcery.com>
3059 * decl.c (make_rtl_for_nonlocal_decl, start_preparsed_function):
3060 Apply lbasename to input_filename before passing to get_fileinfo.
3061 * semantics.c (begin_class_definition): Likewise.
3062 * lex.c (handle_pragma_interface): Apply get_fileinfo to the
3063 correct filename. Rename variables to be less confusing.
3064 (handle_pragma_implementation): Likewise. Disable "appears
3065 after file is included" diagnostic.
3067 * parser.c (struct cp_token): Add in_system_header fiag.
3068 (CP_TOKEN_BLOCK_NUM_TOKENS, struct cp_token_block)
3069 (CP_TOKEN_BUFFER_SIZE, cp_token_cache_push_token)
3070 (CPP_NONE, cp_lexer_read_token): Delete.
3071 (struct cp_lexer): Remove first_token, string_tokens,
3072 main_lexer_p fields. Clarify comments.
3073 (struct cp_token_cache): Now just a pair of pointers.
3074 (CP_LEXER_BUFFER_SIZE): New #define.
3075 (CPP_PURGED): New fake token type.
3076 (cp_lexer_new_from_token_array, cp_lexer_destroy)
3077 (cp_lexer_peek_token_emit_debug_info, cp_lexer_skip_purged_tokens)
3078 (cp_lexer_handle_pragma, cp_token_cache_new, cp_parser_string_literal):
3080 (cp_lexer_new_from_tokens): Now a simple wrapper around
3081 cp_lexer_new_from_token_array.
3082 (cp_lexer_set_source_position_from_token): Also update
3084 (cp_lexer_next_token, cp_lexer_prev_token, cp_lexer_advance_token):
3086 (cp_lexer_token_difference): Dont handle wrapping round.
3087 (cp_lexer_new_main): Enable pragma deferral and raw strings,
3088 read the entire translation unit through c_lex_with_flags into
3089 this lexer's buffer, then turn raw strings back off again.
3090 (cp_lexer_grow_buffer): Adjust for buffer no longer being circular.
3091 (cp_lexer_get_preprocessor_token): No need to handle not being
3092 the main lexer. Set token->in_system_header too.
3093 (cp_lexer_peek_token): Skip purged tokens. Feed pragma tokens
3094 to cp_lexer_handle_pragma. No need to call cp_lexer_read_token.
3095 (cp_lexer_peek_nth_token): Likewise.
3096 (cp_lexer_purge_token): Mark the token PURGED, don't shift all
3097 the other tokens down.
3098 (cp_lexer_purge_tokens_after): Likewise.
3099 (cp_lexer_save_tokens, cp_lexer_rollback_tokens): Don't worry
3100 about there being no tokens.
3101 (cp_lexer_print_token): Revise to give useful information on
3103 (struct cp_parser): Add field translate_strings_p.
3104 (cp_parser_new): Initialize it.
3105 (cp_parser_translation_unit): Destroy the lexer when done.
3106 (cp_parser_parameter_declaration): Restructure saving of
3108 (cp_parser_save_member_function_body): Likewise.
3109 (cp_parser_check_for_invalid_template_id)
3110 (cp_parser_nested_name_specifier_opt, cp_parser_template_id):
3111 Adjust calls to cp_lexer_advance_token.
3112 (cp_parser_skip_to_closing_parenthesis, cp_parser_declaration):
3113 No need to fiddle c_lex_string_translate.
3114 (cp_parser_primary_expression, cp_parser_linkage_specification)
3115 (cp_parser_asm_definition, cp_parser_asm_specification_opt)
3116 (cp_parser_asm_operand_list, cp_parser_asm_clobber_list)
3117 Use cp_parser_string_literal.
3118 (cp_parser_attribute_list): Save and restore
3119 parser->translate_strings_p, not c_lex_string_translate.
3120 (cp_parser_cache_group): Delete.
3121 (cp_parser_cache_group_1): Rename cp_parser_cache_group. Do
3122 not take a cache argument.
3124 2004-09-20 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3127 * decl.c (reshape_init): Extract array handling into...
3128 (reshape_init_array): New function. Use integers instead of trees
3129 for indices. Handle out-of-range designated initializers.
3131 2004-09-20 Steven Bosscher <stevenb@suse.de>
3133 * lex.c (cxx_init): Don't set the ridpointer for RID_NULL
3136 2004-09-19 Mark Mitchell <mark@codesourcery.com>
3138 * decl2.c (determine_visibility): Allow class visibility
3139 directives to override targetm.cxx.export_class_data.
3141 2004-09-18 Kazu Hirata <kazu@cs.umass.edu>
3143 * call.c, semantics.c: Follow spelling conventions.
3144 * class.c: Fix a comment typo.
3146 2004-09-16 Geoffrey Keating <geoffk@apple.com>
3149 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
3150 (handle_pragma_implementation): Likewise.
3152 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
3153 Zack Weinberg <zack@codesourcery.com>
3155 * cp-tree.def: Use tree_code_class enumeration constants
3156 instead of code letters.
3157 * call.c, class.c, cp-gimplify.c, cp-lang.c, cxx-pretty-print.c
3158 * mangle.c, pt.c, semantics.c, tree.c, typeck.c:
3159 Update for new tree-class enumeration constants.
3161 2004-09-16 Mark Mitchell <mark@codesourcery.com>
3164 * parser.c (cp_parser_simple_declaration): Commit to tentative
3165 parses after seeing a decl-specifier.
3166 (cp_parser_simple_declaration): Eliminate spurious message.
3167 (cp_parser_init_declarator): Adjust error message.
3170 * lex.c (unqualified_name_lookup_error): Mark the dummy
3171 declaration as used.
3174 * parser.c (cp_parser_nested_name_specifier): Do not resolve
3175 typename types if the user explicitly said "typename".
3177 2004-09-16 Andrew MacLeod <amacleod@redhat.com>
3179 * error.c (dump_decl): Make sure there is lang_specific info before
3180 checking for DTOR and CTOR decls.
3182 2004-09-16 Nathan Sidwell <nathan@codesourcery.com>
3184 * class.c (copy_virtuals): Remove.
3185 (build_primary_vtable): Use copy_list directly.
3186 (build_secondary_vtable): Likewise.
3187 (update_vtable_entry_for_fn): Clear BV_CALL_INDEX here.
3188 (create_vtable_ptr): Likewise.
3190 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
3192 * search.c: Follow spelling conventions.
3194 2004-09-16 Nathan Sidwell <nathan@codesourcery.com>
3196 * cp-tree.h (struct lang_type_class): Make pure_virtuals a
3198 (CLASSTYPE_INLINE_FRIENDS, CLASSTYPE_PURE_VIRTUALS): Update
3200 * call.c (build_new_method_call): Don't confirm a pure virtual is
3201 in CLASSTYPE_PURE_VIRTUALS. Reorder checks. Make it a warning.
3202 * class.c (check_methods): CLASSTYPE_INLINE_FRIENDS is a VEC(tree).
3203 (fixup_inline_methods, finish_struct): Likewise.
3204 * decl.c (finish_method): Likewise.
3205 * search.c (dfs_get_pure_virtuals, get_pure_virtuals):
3206 CLASSTYPE_PURE_VIRTUALS is a VEC(tree).
3207 * typeck2.c (abstract_virtuals_error): Likewise. Truncate the
3208 vector to avoid repeating the list in error messages.
3210 2004-09-15 Mark Mitchell <mark@codesourcery.com>
3212 * cp-objcp-common.h (LANG_HOOKS_COMDAT_GROUP): Define.
3213 * cp-tree.h (cxx_comdat_group): Declare.
3214 * decl.c (cxx_comdat_group): New function.
3216 2004-09-15 Nathan Sidwell <nathan@codesourcery.com>
3218 * search.c (get_pure_virtuals): Remove unused variables.
3220 * cp-tree.h (struct lang_decl_flags): Remove
3221 needs_final_overrider.
3222 (DECL_NEEDS_FINAL_OVERRIDER_P): Remove.
3223 * decl.c (duplicate_decls): Do not copy DECL_NEEDS_FINAL_OVERRIDER_P.
3224 * class.c (finish_struct_bits): Correct comment about
3225 CLASSTYPE_PURE_VIRTUALS.
3226 * search.c (get_pure_virtuals): Remove useless loop.
3228 2004-09-14 Mark Mitchell <mark@codesourcery.com>
3231 * mangle.c (partially_mangled_name): New variable.
3232 (partially_mangled_name_len): Likewise.
3233 (save_partially_mangled_name): New function.
3234 (restore_partially_mangled_name): Likewise.
3235 (write_encoding): Save and restore partially mangled names around
3236 calls to get_mostly_instantiated_function_type.
3237 (write_unqualified_name): Likewise.
3239 2004-09-14 Nathan Sidwell <nathan@codesourcery.com>
3241 * pt.c (unify): Replace gcc_unreachable with gcc_assert.
3243 2004-09-13 Mark Mitchell <mark@codesourcery.com>
3246 * parser.c (cp_parser_id_expression): Correct value for
3248 (cp_parser_nested_name_specifier_opt): Look through typenames as
3250 (cp_parser_template_name): Honor check_dependency_p.
3253 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name):
3257 * pt.c (unify): Add ENUMERAL_TYPE case. Replace sorry with
3260 2004-09-12 Richard Henderson <rth@redhat.com>
3263 * semantics.c (maybe_cleanup_point_expr): Don't call fold.
3264 * typeck.c (condition_conversion): Likewise.
3266 2004-09-11 Richard Henderson <rth@redhat.com>
3269 * pt.c (cur_stmt_expr): Move from tsubst_expr.
3270 (tsubst_expr) <case STMT_EXPR>: Move ...
3271 (tsubst_copy_and_build): ... here.
3273 2004-09-10 Zack Weinberg <zack@codesourcery.com>
3275 * cp-tree.h (interface_only, interface_unknown): Delete declarations;
3276 comment explaining them moved to c-common.h.
3277 * lex.c (interface_only, interface_unknown, extract_interface_info):
3279 (cxx_finish): Don't reset interface_unknown.
3280 (handle_pragma_interface): Don't set interface_only and
3281 interface_unknown; just the like-named fields in finfo.
3282 (handle_pragma_implementation): Adjust comment.
3283 * decl2.c (cp_finish_file): Don't reset interface_only and
3285 * method.c (synthesize_method): Don't reset interface_unknown or
3286 call extract_interface_info.
3287 * pt.c (pop_tinst_level): Don't call extract_interface_info.
3288 * decl.c (start_cleanup_fn): Don't save or restore interface_only
3289 and interface_unknown.
3290 (make_rtl_for_nonlocal_decl): Call get_fileinfo on input_filename
3291 and use the result instead of the interface_only/interface_unknown
3293 (start_preparsed_function): Likewise.
3294 * lex.c (cxx_make_type): Likewise.
3295 * semantics.c (begin_class_definition): Likewise.
3296 (expand_body): Don't call extract_interface_info.
3298 2004-09-10 Ziemowit Laski <zlaski@apple.com>
3300 * decl.c (objc_mark_locals_volatile): Make description of
3301 routine more descriptive; only mark VAR_DECLs at each
3304 2004-09-10 Richard Henderson <rth@redhat.com>
3307 * call.c (build_vfield_ref): Move...
3308 * class.c (build_vfield_ref): ... here. Convert datum to the
3309 primary base containing the vptr.
3310 (make_new_vtable): Simplify build_primary_vtable arguments.
3311 (finish_struct_1): Do not duplicate TYPE_VFIELD.
3312 * typeck.c (build_class_member_access_expr): Don't warn for
3313 null object access to base fields.
3315 2004-09-10 Ziemowit Laski <zlaski@apple.com>
3317 * decl.c (objc_get_current_scope, objc_mark_locals_volatile):
3318 New functions, to be called from ObjC++.
3320 2004-09-10 Kazu Hirata <kazu@cs.umass.edu>
3322 * class.c, cp-tree.h, decl.c, decl2.c, mangle.c,
3323 name-lookup.h, parser.c, search.c, semantics.c, typeck2.c: Fix
3326 2004-09-09 Ziemowit Laski <zlaski@apple.com>
3328 * typeck.c (build_c_cast): Preserve the cast if casting
3329 to and from an Objective-C type.
3331 2004-09-09 Ziemowit Laski <zlaski@apple.com>
3333 * Make-lang.in (cp/typeck.o): Depend on c-common.h.
3334 * typeck.c: Include c-common.h.
3335 (comptypes): For RECORD_TYPEs, call objc_comptypes() and
3336 return the result if nonnegative.
3338 2004-09-09 Zack Weinberg <zack@codesourcery.com>
3340 * decl2.c (import_export_class)
3341 * lex.c (handle_pragma_interface):
3342 Test MULTIPLE_SYMBOL_SPACES with if, not #ifdef.
3344 2004-09-08 Ziemowit Laski <zlaski@apple.com>
3346 * Make-lang.in (cp/semantics.o): Depend on c-common.h.
3347 * semantics.c: Include c-common.h.
3348 (finish_compound_stmt): Call objc_clear_super_receiver().
3350 2004-09-08 Ziemowit Laski <zlaski@apple.com>
3352 * cp-tree.h (do_poplevel): New prototype.
3353 * semantics.c (do_poplevel): Make externally visible.
3355 2004-09-08 Nathan Sidwell <nathan@codesourcery.com>
3357 * cp-tree.h (tree_pair_s): Define a GC'd vector.
3358 * name-lookup.h (cxx_saved_binding, cp_class_binding): Likewise.
3359 * semantics.c (deferred_access): Likewise.
3361 2004-09-06 Daniel Jacobowitz <dan@debian.org>
3363 * semantics.c (expand_body): Assert that we are not nested.
3365 2004-09-06 Zack Weinberg <zack@codesourcery.com>
3367 * decl.c (build_enumerator): Use add_double and int_fits_type_p
3368 instead of cp_build_binary_op, to avoid creating short-lived trees.
3369 * parser.c (cp_parse_type_specifier <RID_ENUM>): Use two-token
3370 lookahead instead of backtracking. Move some code to avoid a
3372 (cp_parser_enum_specifier): Avoid duplication of effort with caller.
3373 Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
3374 (cp_parser_enumerator_list, cp_parser_enumerator_definition):
3375 Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
3377 2004-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3379 * decl.c (grok_declarator): Remove a redundant semicolon.
3381 * parser.c (cp_parser_decl_specifier_seq, cp_parser_type_specifier):
3382 Correct comments describing function parameters.
3384 2004-09-03 Matt Austern <austern@apple.com>
3385 Compile speed improvement.
3386 * parser.c (cp_lexer_print_token): Only define if ENABLE_CHECKING set.
3387 Otherwise define a stub macro that expands to nothing.
3388 (cp_lexer_debugging_p): Only define if ENABLE_CHECKING set. Otherwise
3389 define a stub macro that expands to 0.
3390 (cp_lexer_start_debugging): Only define if ENABLE_CHECKING set.
3391 (cp_lexer_stop_debugging): Likewise.
3392 (cp_lexer_debug_stream): Only define if ENABLE_CHECKING set. Otherwise
3393 define a stub macro that expands to NULL.
3394 (cp_lexer_new_main): Only set debugging_p if ENABLE_CHECKING set.
3395 (cp_lexer_new_from_tokens): Likewise.
3397 2004-09-03 Jan Hubicka <jh@suse.cz>
3399 * decl.c (finish_function): Clean out pointers we no longer need.
3401 2004-09-03 Jan Beulich <jbeulich@novell.com>
3403 * g++spec.c (MATH_LIBRARY_PROFILE): Default to MATH_LIBRARY rather
3406 2004-09-02 Paul Brook <paul@codesourcery.com>
3408 * decl2.c (determine_visibility): Only check data visibility
3411 2004-08-31 Mark Mitchell <mark@codesourcery.com>
3413 * cp-tree.h (DECL_CONSTRUCTION_VTABLE_P): New macro.
3414 * class.c (build_ctor_vtbl_group): Set DECL_CONSTRUCTION_VTABLE_P.
3415 * decl2.c (determine_visibility): Honor
3416 TARGET_CXX_EXPORT_CLASS_DATA.
3418 * class.c (key_method): Rename to ...
3419 (determine_key_method): ... this.
3420 (finish_struct_1): Adjust accordingly.
3421 * cp-tree.h (key_method): Declare.
3422 * decl2.c (maybe_emit_vtables): Determine the key method here if
3423 it has not already been done.
3425 2004-08-31 Ziemowit Laski <zlaski@apple.com>
3427 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-objcp-common.o.
3428 (cp/cp-lang.o): Depend on debug.h, gtype-cp.h and cp/cp-objcp-common.h.
3429 (cp/cp-decl.c): Do not depend on gtype-cp.h.
3430 (cp/cp-objcp-common.o): New target.
3431 * cp-lang.c: Include debug.h, cp-objcp-common.h and gtype-cp.h.
3432 (cxx_get_alias_set, cxx_warn_unused_global_decl, cp_expr_size,
3433 cp_tree_size, cp_var_mod_type_p, cxx_initialize_diagnostics): Move
3434 prototypes and definitions to cp-objcp-common.h and cp-objcp-common.c,
3436 (LANG_HOOKS_TREE_SIZE, LANG_HOOKS_FINISH,
3437 LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_INIT_OPTIONS,
3438 LANG_HOOKS_INITIALIZE_DIAGNOSTICS, LANG_HOOKS_HANDLE_OPTION,
3439 LANG_HOOKS_HANDLE_FILENAME, LANG_HOOKS_MISSING_ARGUMENT,
3440 LANG_HOOKS_POST_OPTIONS, LANG_HOOKS_GET_ALIAS_SET,
3441 LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_EXPAND_EXPR,
3442 LANG_HOOKS_EXPAND_DECL, LANG_HOOKS_PARSE_FILE,
3443 LANG_HOOKS_DUP_LANG_SPECIFIC_DECL, LANG_HOOKS_TRUTHVALUE_CONVERSION,
3444 LANG_HOOKS_SET_DECL_ASSEMBLER_NAME, LANG_HOOKS_MARK_ADDRESSABLE,
3445 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
3446 LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
3447 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_PRINT_ERROR_FUNCTION,
3448 LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL, LANG_HOOKS_WRITE_GLOBALS,
3449 LANG_HOOKS_FUNCTION_INIT, LANG_HOOKS_FUNCTION_FINAL,
3450 LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P,
3451 LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE,
3452 LANG_HOOKS_ATTRIBUTE_TABLE, LANG_HOOKS_TREE_INLINING_WALK_SUBTREES,
3453 LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN,
3454 LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS,
3455 LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P,
3456 LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P,
3457 LANG_HOOKS_TREE_INLINING_VAR_MOD_TYPE_P,
3458 LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN,
3459 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN, LANG_HOOKS_EXPR_SIZE,
3460 LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR,
3461 LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, LANG_HOOKS_MAKE_TYPE,
3462 LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE,
3463 LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
3464 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE, LANG_HOOKS_INCOMPLETE_TYPE_ERROR,
3465 LANG_HOOKS_TYPE_PROMOTES_TO, LANG_HOOKS_REGISTER_BUILTIN_TYPE,
3466 LANG_HOOKS_GIMPLIFY_EXPR, LANG_HOOKS_FOLD_OBJ_TYPE_REF): Move
3467 hooks to cp-objcp-common.h.
3468 (finish_file): New function.
3469 * cp-objcp-common.c: New file.
3470 * cp-objcp-common.h: New file.
3471 * cp-tree.h (cp_finish_file): New prototype.
3472 * decl.c: Do not include gtype-cp.h.
3473 * decl2.c (finish_file): Rename to cp_finish_file.
3475 2004-08-31 Richard Henderson <rth@redhat.com>
3478 * pt.c (tsubst_expr): Move OFFSETOF_EXPR handling ...
3479 (tsubst_copy_and_build): ... here.
3481 2004-08-30 Mark Mitchell <mark@codesourcery.com>
3483 * cp-tree.h (initialize_artificial_var): Declare.
3484 * decl.c (initialize_artifical_var): New function.
3485 * class.c (initialize_array): Remove.
3486 (initialize_vtable): Use initialize_artificial_var.
3487 (build_vtt): Likewise.
3488 (build_ctor_vtbl_group): Likewise.
3490 2004-08-30 Richard Henderson <rth@redhat.com>
3492 * class.c (build_base_path): Use build_address directly.
3493 * typeck.c (build_unary_op): Don't lower &a.b to pointer
3494 arithmetic directly.
3495 * typeck2.c (store_init_value): Don't assume !TREE_CONSTANT
3496 means !initializer_constant_valid_p.
3498 2004-08-30 Richard Henderson <rth@redhat.com>
3500 * class.c (fixed_type_or_null): Use get_base_address before
3501 assuming an ADDR_EXPR is non-null.
3503 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
3505 * name-lookup.c (pop_binding, pushdecl,
3506 set_identifier_type_value_with_scope, push_overloaded_decl,
3507 arg_assoc_type): Replace abort with gcc_assert or gcc_unreachable.
3508 * parser.c (cp_parser_diagnose_invalid_type_name,
3509 cp_parser_postfix_expression, cp_parser_unary_expression,
3510 cp_parser_check_declarator_template_para): Likewise.
3511 * pt.c (push_inline_template_parms_recursive,
3512 check_explicit_specialization, convert_nontype_argument,
3513 coerce_template_template_parms, uses_template_parms,
3514 instantiate_class_template, tsubst_decl, tsubst, tsubst_copy,
3515 tsubst_expr, instantiate_template,
3516 maybe_adjust_types_for_deduction, type_unification_real,
3517 resolve_overloaded_unification, template_decl_level,
3518 type_dependent_expression_p): Likewise.
3519 * search.c (lookup_base_r): Likewise.
3520 * semantics.c (finish_stmt_expr, simplify_aggr_init_expr): Likewise.
3521 * tree.c (lvalue_p_1, count_functions, cxx_printable_name,
3522 verify_stmt_tree_r, get_type_decl, stabilize_call): Likewise.
3523 * typeck.c (common_type, get_member_function_from_ptrfunc,
3524 build_binary_op, build_unary_op, expand_ptrmemfunc_cst): Likewise.
3525 * typeck2.c (cxx_incomplete_type_diagnostic,
3526 split_nonconstant_init_1, store_init_value,
3527 process_init_constructor): Likewise.
3529 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
3531 * call.c (check_dtor_name): Replace abort with gcc_assert or
3533 (build_call, add_builtin_candidate, build_new_op,
3534 convert_like_real, build_over_call, in_charge_arg_for_name,
3535 source_type, joust): Likewise.
3536 * class.c (build_simple_base_path, get_vcall_index,
3537 finish_struct_1, instantiate_type, get_enclosing_class,
3538 add_vcall_offset_vtbl_entries_1, cp_fold_obj_type_ref): Likewise.
3539 * cp-gimplify.c (cp_genericize): Likewise.
3540 * cp-lang.c (cp_expr_size, cp_tree_size): Likewise.
3541 * cvt.c (cp_convert_to_pointer, ocp_convert): Likewise.
3542 * decl.c (poplevel, make_unbound_class_template, reshape_init,
3543 check_special_function_return_type, grokdeclarator,
3544 grok_op_properties, tag_name, xref_tag, start_preparsed_function,
3545 finish_function): Likewise.
3546 * decl2.c (grokfield, maybe_emit_vtables):Likewise.
3547 * error.c (dump_global_iord, dump_decl, dump_template_decl,
3548 language_to_string): Likewise.
3549 * except.c (choose_personality_routine): Likewise.
3550 * friend.c (do_friend): Likewise.
3551 * g++spec.c (lang_specific_driver): Likewise.
3552 * init.c (build_zero_init, expand_default_init, build_new_1,
3553 build_vec_delete_1, build_vec_init, build_dtor_call): Likewise.
3554 * lex.c (retrofit_lang_decl, cp_type_qual_from_rid): Likewise.
3555 * mangle.c (add_substitution, write_unscoped_name,
3556 write_template_prefix, write_identifier,
3557 write_special_name_destructor, write_type, write_builtin_type,
3558 write_expression, write_template_param,
3559 write_java_integer_type_codes): Likewise.
3560 * method.c (implicitly_declare_fn): Likewise.
3562 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
3564 * cp-tree.h (BINFO_PRIMARY_P): Use a binfo flag.
3565 (BINFO_INDIRECT_PRIMARY_P): Remove.
3566 * class.c (determine_primary_base): Rename to ...
3567 (determine_primary_bases): ... here. Set all primary bases.
3568 (set_primary_base): Remove.
3569 (mark_primary_bases): Remove.
3570 (build_simple_base_path, walk_subobject_offsets,
3571 propagate_binfo_offsets, end_of_class): Adjust.
3572 (layout_class_type): Rename determine_primary_base call.
3573 (dump_class_hierarchy_r, dump_vtable): Adjust. Don't pass a binfo
3575 (dfs_build_secondary_vptr_vtt_inits, dfs_accumulate_vtbl_inits,
3576 build_rtti_vtbl_entries): Adjust.
3577 * init.c (build_vtbl_address): Adjust.
3579 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Use gcc_assert.
3581 2004-08-28 Ziemowit Laski <zlaski@apple.com>
3583 * Make-lang.in (CXX_OBJS): Split up into CXX_OBJS and
3584 CXX_AND_OBJCXX_OBJS.
3585 (CXX_C_OBJS): Include in CXX_AND_OBJCXX_OBJS instead of listing
3586 separately on the link line.
3588 2004-08-28 Jason Merrill <jason@redhat.com>
3590 * decl.c (expand_static_init): Avoid bogus warnings.
3592 2004-08-27 Jason Merrill <jason@redhat.com>
3595 * tree.c (stabilize_init): See through a COMPOUND_EXPR.
3598 * decl.c (expand_static_init): Use thread-safety API.
3599 (register_dtor_fn): Return the call, don't expand it.
3600 * tree.c (add_stmt_to_compound): New fn.
3601 (stabilize_call): Use it.
3603 2004-08-27 Richard Henderson <rth@redhat.com>
3605 * cp-tree.def (OFFSETOF_EXPR): New.
3606 * parser.c (cp_parser_builtin_offsetof): Either built an
3607 OFFSETOF_EXPR, or call fold_offsetof immediately.
3608 * pt.c (tsubst_expr): Handle OFFSETOF_EXPR.
3610 2004-08-27 Nathan Sidwell <nathan@codesourcery.com>
3612 * call.c (validate_conversion_obstack): Replace
3613 my_friendly_assert with gcc_assert or gcc_unreachable.
3614 (direct_reference_binding, merge_conversion_sequences,
3615 build_user_type_conversion_1, perform_overload_resolution,
3616 build_op_delete_call, enforce_access, call_builtin_trap,
3617 build_over_call, build_special_member_call, build_new_method_call,
3618 initialize_reference): Likewise.
3619 * class.c (build_base_path, build_primary_vtable, alter_access,
3620 check_bases, update_vtable_entry_for_fn, layout_empty_base,
3621 clone_function_decl, adjust_clone_args,
3622 type_requires_array_cookie, include_empty_classes,
3623 finish_struct_1, resolve_address_of_overloaded_function,
3624 instantiate_type, get_vtbl_decl_for_binfo, build_vtt_inits,
3625 dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
3626 accumulate_vtbl_inits, build_vtbl_initializer,
3627 build_vbase_offset_vtbl_entries, build_rtti_vtbl_entries): Likewise.
3628 * cvt.c (build_up_reference, convert_to_reference): Likewise.
3629 * decl.c (poplevel, duplicate_decls, make_typename_type,
3630 cxx_init_decl_processing, reshape_init, check_initializer,
3631 make_rtl_for_nonlocal_decl, initialize_local_var, cp_finish_decl,
3632 expand_static_init, grokfndecl, grokvardecl, build_ptrmem_type,
3633 grokdeclarator, copy_fn_p, grok_op_properties, xref_tag,
3634 xref_basetypes, start_preparsed_function, save_function_data,
3635 finish_function, finish_method, maybe_register_incomplete_var,
3636 complete_vars): Likewise.
3637 * decl2.c (grok_array_decl, check_member_template,
3638 check_classfn, finish_static_data_member_decl, coerce_new_type,
3639 coerce_delete_type, import_export_class, decl_needed_p,
3640 determine_visibility, import_export_decl, build_cleanup,
3641 start_static_initialization_or_destructi, do_static_destruction,
3642 prune_vars_needing_no_initialization,
3643 build_offset_ref_call_from_tree): Likewise.
3644 * error.c (dump_decl, dump_expr): Likewise.
3645 * init.c (finish_init_stmts, build_zero_init,
3646 expand_virtual_init, expand_default_init, expand_aggr_init_1,
3647 build_offset_ref, build_new_1, build_delete, build_vbase_delete):
3649 * mangle.c (write_method_parms, write_template_args,
3650 write_expression, write_template_arg): Likewise.
3651 * method.c (make_thunk, finish_thunk, use_thunk): Likewise.
3652 * name-lookup.c (pop_binding, begin_scope, leave_scope,
3653 resume_scope, push_using_decl, validate_nonmember_using_decl,
3654 is_ancestor, poplevel_class, set_inherited_value_binding_p,
3655 push_class_level_binding, do_class_using_decl, push_namespace,
3656 pop_namespace, add_using_namespace, ambiguous_decl,
3657 lookup_namespace_name, lookup_type_current_level,
3658 maybe_process_template_type_declaration): Likewise.
3659 * parser.c (cp_lexer_peek_nth_token,
3660 cp_parser_parse_and_diagnose_invalid_typ,
3661 cp_parser_translation_unit, cp_parser_template_id,
3662 cp_parser_lookup_name, cp_parser_late_parsing_for_member): Likewise.
3663 * pt.c (push_access_scope, finish_member_template_decl,
3664 push_inline_template_parms_recursive, add_outermost_template_args,
3665 get_innermost_template_args, begin_explicit_instantiation,
3666 end_explicit_instantiation, retrieve_specialization,
3667 is_specialization_of, is_specialization_of_friend,
3668 register_specialization, check_explicit_specialization,
3669 comp_template_parms, process_template_parm,
3670 process_partial_specialization, convert_nontype_argument,
3671 coerce_template_template_parms, coerce_template_parms,
3672 mangle_class_name_for_template, lookup_template_function,
3673 lookup_template_class, instantiate_class_template, tsubst_decl,
3674 tsubst_function_type, tsubst, tsubst_qualified_id, tsubst_copy,
3675 instantiate_template, fn_type_unification, type_unification_real,
3676 get_template_base, regenerate_decl_from_template,
3677 template_for_substitution, instantiate_decl,
3678 get_mostly_instantiated_function_type, dependent_scope_ref_p,
3679 value_dependent_expression_p, resolve_typename_type): Likewise.
3680 * repo.c (repo_emit_p): Likewise.
3681 * rtti.c (build_headof, get_tinfo_decl, get_pseudo_ti_init,
3682 create_tinfo_types, emit_tinfo_decl): Likewise.
3683 * search.c (lookup_base_r, lookup_base, lookup_field_1,
3684 dfs_access_in_type, build_baselink, lookup_member,
3685 adjust_result_of_qualified_name_lookup, copied_binfo): Likewise.
3686 * semantics.c (perform_or_defer_access_check,
3687 finish_non_static_data_member, finish_stmt_expr_expr,
3688 finish_stmt_expr, finish_call_expr, finish_pseudo_destructor_expr,
3689 finish_template_template_parm, finish_member_declaration,
3690 emit_associated_thunks): Likewise.
3691 * tree.c (build_target_expr_with_type, force_target_expr,
3692 copy_binfo, get_first_fn, cp_tree_equal): Likewise.
3693 * typeck.c (type_after_usual_arithmetic_conversions, comptypes,
3694 cxx_sizeof_or_alignof_type, perform_integral_promotions,
3695 build_class_member_access_expr, finish_class_member_access_expr,
3696 build_ptrmemfunc_access_expr, build_unary_op,
3697 unary_complex_lvalue, cxx_mark_addressable, build_modify_expr,
3698 build_ptrmemfunc, expand_ptrmemfunc_cst, check_return_expr
3699 * typeck2.c (complete_type_check_abstract,
3700 abstract_virtuals_error, process_init_constructor,
3701 add_exception_specifier): Likewise.
3703 2004-08-27 Nathan Sidwell <nathan@codesourcery.com>
3705 * class.c (build_vtbl_initializer): Use ssize_int.
3706 * decl.c (complete_array_type): Likewise.
3707 * method.c (finish_thunk): Likewise.
3708 * search.c (get_dynamic_base_type): Likewise.
3710 2004-08-26 Richard Henderson <rth@redhat.com>
3712 * cp-tree.h (DECL_FIELD_IS_BASE): New.
3713 * class.c (build_base_field): Set it.
3714 (build_simple_base_path): Use it.
3715 (fixed_type_or_null): Don't consider base fields definitive.
3717 2004-08-25 Roger Sayle <roger@eyesopen.com>
3720 PR tree-optimization/16372
3721 * decl.c (finish_enum): Make the precision of the enumerated type
3722 the same width as the underlying integer type.
3724 2004-08-25 Mark Mitchell <mark@codesourcery.com>
3727 * lex.c (build_lang_decl): Set DECL_NO_STATIC_CHAIN for all C++
3730 * mangle.c (get_identifier_nocopy): Add cast.
3732 * cp-tree.h (mangle_type): Remove.
3733 * mangle.c (globals): GTY it.
3734 (mangle_obstack): New variable.
3735 (name_obstack): Likewise.
3736 (name_base): Likewise.
3737 (write_char): Adjust accordingly.
3738 (write_chars): Likewise.
3739 (write_string): Likewise.
3740 (start_mangling): Initialize G.substitutions only one. Add
3742 (finish_mangling): Use VARRAY_CLEAR to reclaim
3743 storage in G.substitutions. Use obstack_finish.
3744 (init_mangle): Adjust for changes to variable names above.
3745 Initialize G.substitutions.
3746 (mangle_decl_string): Adjust call to start_mangling.
3747 (get_identifier_nocopy): New function.
3748 (mangle_decl): Use it.
3749 (mangle_type_string): Adjust call to start_mangling.
3750 (mangle_special_for_type): Likewise.
3751 (mangle_vtt_for_type): Likewise.
3752 (mangle_ctor_vtbl_for_type): Likewise.
3753 (mangle_thunk): Likewise.
3754 (mangle_guard_variable): Likewise.
3755 (mangle_ref_init_variable): Likewise.
3757 2004-08-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3760 * pt.c (redeclare_class_template): Check the type of non-type and
3761 template template parameter.
3763 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
3765 * call.c (convert_class_to_reference): Adjust build_int_cst calls.
3766 (build_user_type_conversion_1, convert_like_real,
3767 build_java_interface_fn_ref, build_special_member_call): Likewise.
3768 * class.c (finish_struct_1, build_vtbl_initializer): Likewise.
3769 * cp-gimplify.c (cp_gimplify_expr): Likewise.
3770 * cvt.c (cp_convert_to_pointer): Likewise.
3771 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
3772 * decl2.c (start_static_initialization_or_destruction,
3773 generate_ctor_or_dtor_function): Likewise.
3774 * except.c (build_throw): Likewise.
3775 * mangle.c (write_integer_cst): Likewise.
3776 * method.c (finish_thunk): Likewise.
3777 * rtti.c (build_headof, get_tinfo_decl_dynamic,
3778 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
3779 get_pseudo_ti_init): Likewise.
3780 * search.c (get_dynamic_cast_base_type): Likewise.
3782 2004-08-25 Zack Weinberg <zack@codesourcery.com>
3784 * class.c, search.c: Remove references to DWARF_DEBUG.
3786 2004-08-25 Adam Nemet <anemet@lnxw.com>
3788 * repo.c (extract_string): Reset backquote after one character.
3789 (get_base_filename): Fix indentation.
3791 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
3793 * decl.c (cxx_init_decl_processing): Adjust
3794 build_common_tree_nodes call.
3796 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
3799 * (is_subobject_of_p): Resurrect & optimize.
3800 (lookup_field_r): Use it.
3802 2004-08-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3805 * search.c (friend_accessible_p): Increment processing_template_decl
3806 when deal with TEMPLATE_DECL of SCOPE.
3808 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
3811 * semantics.c (check_accessibility_of_qualified_id): Defer check
3812 if qualifying_type is a template parameter.
3814 2004-08-23 Mark Mitchell <mark@codesourcery.com>
3817 * pt.c (instantiate_decl): Do not try to apply
3818 DECL_DECLARED_INLINED_P to a VAR_DECL.
3820 * search.c (build_baselink): Fix typo in comment.
3822 2004-08-22 Andrew Pinski <apinski@apple.com>
3825 2004-08-22 Andrew Pinski <apinski@apple.com>
3827 * typeck.c (build_unary_op): Use &a.b if the folded lowered
3828 expression is not constant.
3830 2004-08-23 Nathan Sidwell <nathan@codesourcery.com>
3832 * name-lookup.c (pushdecl): Rename build_type_copy call.
3833 * tree.c (cp_build_qualified_type_real,
3834 build_exception_variant, handle_java_interface_attribute): Likewise.
3836 2004-08-22 Andrew Pinski <apinski@apple.com>
3839 * typeck.c (build_unary_op): Use &a.b if the folded lowered
3840 expression is not constant.
3842 2004-08-20 Mark Mitchell <mark@codesourcery.com>
3845 * decl.c (expand_static_init): Use DECL_FUNCTION_SCOPE_P.
3847 2004-08-21 Joseph S. Myers <jsm@polyomino.org.uk>
3850 * pt.c (tsubst_copy_and_build): Avoid clearing TREE_NO_WARNING for
3853 2004-08-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3855 * pt.c (register_specialization): Check DECL_TEMPLATE_SPECIALIZATION
3856 before calling comp_template_args.
3858 2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
3860 * class.c (build_vtbl_initializer): Use build_int_cst for
3861 negative size types.
3862 * decl.c (complete_array_type): Likewise.
3863 * method.c (finish_thunk): Likewise.
3865 2004-08-20 Andreas Tobler <a.tobler@schweiz.ch>
3867 * tree.c: Remove unused mark_local_for_remap_r.
3869 2004-08-19 Eric Christopher <echristo@redhat.com>
3871 * cp-tree.h (cxx_unsave_expr_now): Delete prototype.
3872 * tree.c (cxx_unsave_expr_now): Delete.
3873 (cp_unsave_r): Ditto.
3875 2004-08-19 Mark Mitchell <mark@codesourcery.com>
3878 * pt.c (push_template_decl_real): Disallow template allocation
3879 functions with fewer than two parameters.
3881 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
3883 * cp-tree.h (build_shared_int_cst): Remove.
3884 * tree.c (shared_int_cache): Remove.
3885 (build_shared_int_cst): Remove.
3886 * class.c (finish_struct_1): Use build_int_cst.
3888 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
3890 * decl.c (finish_enum): Do not copy value node early, copy
3892 * lex.c (cxx_init): Force null_node to be unique.
3894 2004-08-19 Joseph S. Myers <jsm@polyomino.org.uk>
3897 * pt.c (tsubst_copy, tsubst_copy_and_build): Copy TREE_NO_WARNING
3898 from input for MODOP_EXPR.
3900 2004-08-18 Mark Mitchell <mark@codesourcery.com>
3902 * pt.c (dependent_template_p): Fix typo in commment.
3905 * pt.c (dependent_template_p): Treat IDENTIFIER_NODEs as
3908 2004-08-17 Mark Mitchell <mark@codesourcery.com>
3911 * pt.c (unify): Tidy ARRAY_TYPE handling. Make sure that non-type
3912 arguments have the same type as the corresponding parameter.
3915 * parser.c (cp_parser_name_lookup_error): If parser->object_scope
3916 is set use it for diagnostic purposes.
3917 (cp_parser_pseudo_destructor_name): Remove special-case error
3921 * semantics.c (expand_or_defer_fn): Honor -fkeep-inline-functions.
3924 * cp-tree.h (qualified_name_lookup_error): Add parameter.
3925 * name-lookup.c (do_class_using_decl): Restrict set of entities
3926 passed to cp_emit_debug_info_for_using more carefully.
3927 (lookup_qualified_name): Allow lookup_member to return sets of
3929 * parser.c (cp_parser_lookup_name): Add ambiguous_p parameter.
3930 (cp_parser_primary_expression): Handle ambiguous lookups.
3931 (cp_parser_template_name): Adjust use of cp_parser_lookup_name.
3932 (cp_parser_template_argument): Likewise.
3933 (cp_parser_elaborate_type_specifier): Likewise.
3934 (cp_parser_namespace_name): Likewise.
3935 (cp_parser_class_name): Likewise.
3936 (cp_parser_lookup_name_simple): Likewise.
3937 * pt.c (tsubst_qualified_id): Handle ambiguous results.
3938 (tsubst_expr): Likewise.
3939 * semantics.c (qualified_name_lookup_error): Add decl paramter.
3940 For ambiguous lookups, print candidates.
3942 2004-08-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3945 * pt.c (instantiate_pending_templates): Add int parameter. Don't
3947 * cp-tree.h (instantiate_pending_templates): Adjust prototype.
3948 * decl2.c (finish_file): Adjust call to
3949 instantiate_pending_templates.
3951 2004-08-15 Roger Sayle <roger@eyesopen.com>
3953 * call.c (build_vfield_ref, build_call, build_conditional_expr,
3954 convert_arg_to_ellipsis, build_x_va_arg, build_over_call,
3955 build_java_interface_fn_ref, build_special_member_call,
3956 build_new_method_call, initialize_reference): Replace calls to
3957 build with calls to buildN.
3958 * class.c (build_base_path, convert_to_base_statically,
3959 build_vfn_ref, instantiate_type, dfs_accumulate_vtbl_inits,
3960 build_vtbl_initializer): Likewise.
3961 * cp-gimplify.c (genericize_try_block, genericize_catch_block,
3962 gimplify_if_stmt, cp_genericize_r): Likewise.
3963 * cvt.c (convert_to_void): Likewise.
3964 * decl.c (check_initializer, finish_constructor_body,
3965 finish_destructor_body): Likewise.
3966 * error.c (dump_expr): Likewise.
3967 * except.c (build_exc_ptr, expand_start_catch_block, build_throw):
3969 * init.c (perform_member_init, expand_virtual_init,
3970 expand_cleanup_for_base, build_init, expand_default_init,
3971 build_offset_ref, decl_constant_value, build_new, build_new_1,
3972 build_vec_delete_1, build_vec_init, build_delete,
3973 push_base_cleanups, build_vec_delete): Likewise.
3974 * mangle.c (write_integer_cst): Likewise.
3975 * method.c (thunk_adjust, do_build_copy_constructor,
3976 do_build_assign_ref): Likewise.
3977 * pt.c (lookup_template_function, tsubst, tsubst_copy_and_build,
3978 unify, build_non_dependent_expr): Likewise.
3979 * rtti.c (build_headof, build_typeid, ifnonnull,
3980 build_dyanmic_cast_1, tinfo_base_init): Likewise.
3981 * semantics.c (begin_compound_stmt, finish_call_expr,
3982 finish_pseudo_destructor_expr, finish_id_expression,
3983 simplify_aggr_init_expr, finalize_nrv_r): Likewise.
3984 * tree.c (build_target_expr, build_cplus_new, array_type_nelts_top,
3985 array_type_nelts_total, stabilize_call): Likewise.
3986 * typeck.c (decay_conversion, build_class_member_access_expr,
3987 lookup_destructor, build_ptrmemfunc_access_expr, build_array_ref,
3988 get_member_function_from_ptrfunc, build_binary_op, pointer_diff,
3989 build_x_unary_op, build_unary_op, unary_complex_lvalue,
3990 build_compound_expr, build_modify_expr, expand_ptrmemfunc_cst,
3991 check_return_expr): Likewise.
3992 * typeck2.c (split_nonconstant_1, split_nonconstant_init_1,
3993 split_nonconstant_init, store_init_value, build_m_component_ref):
3996 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
3998 * call.c (convert_class_to_reference,
3999 build_user_type_conversion_1, convert_like_real,
4000 build_java_interface_fn_ref, build_special_member_call): Use
4002 * class.c (build_vtbl_initializer): Likewise.
4003 * cp-gimplify.c (cp_gimplify_expr): Likewise.
4004 * cvt.c (cp_convert_to_pointer): Likewise.
4005 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
4006 * decl2.c (start_static_initialization_or_destruction,
4007 generate_ctor_or_dtor_function): Likewise.
4008 * except.c (build_throw): Likewise.
4009 * lex.c (cxx_init): Likewise.
4010 * mangle.c (write_integer_cst): Likewise.
4011 * rtti.c (build_headof, get_tinfo_decl_dynamic,
4012 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
4013 get_pseudo_ti_init): Likewise.
4014 * search.c (get_dynamic_cast_base_type): Likewise.
4015 * tree.c (build_shared_int_cst): Likewise.
4017 2004-08-12 Mark Mitchell <mark@codesourcery.com>
4020 * class.c (count_depth_data): New type.
4021 (dfs_depth_post): New function.
4022 (dfs_depth_q): Likewise.
4023 (find_final_overrider_data_s): Change type of vpath.
4025 (dfs_find_final_overrider_1): New function.
4026 (dfs_find_final_overrider): Use it.
4027 (dfs_find_final_overrider_q): Adjust use of vpath.
4028 (dfs_find_final_overrider_post): Likewise.
4029 (find_final_overrider): Use dfs_depth. Allocate and deallocate
4032 2004-08-12 Jan Beulich <jbeulich@novell.com>
4034 * parser.c (cp_parser_asm_definition): Properly consume scope operator
4035 tokens preceding the clobbers. Don't check for scope operator
4036 following inputs. Simplify inputs handling to match that now used for
4039 2004-08-11 Mark Mitchell <mark@codesourcery.com>
4042 * except.c (build_throw): Allocate cleanup_type and the function
4043 for __cxa_throw separately.
4046 * call.c (standard_conversion): Do not accept conversions between
4047 pointers to members if the class types are unrelated.
4050 * parser.c (cp_parser_builtin_offsetof): Cast to "const volatile
4051 char &" instead of just "char &".
4054 * pt.c (tsubst): Just return the unknown_type_node.
4056 2004-08-11 Mark Mitchell <mark@codesourcery.com>
4059 * parser.c (cp_parser_class_specifier): Robustify.
4062 * pt.c (tsubst_copy_and_build): Complain about invalid
4066 * pt.c (tsubst_default_argument): Clear out current_class_ptr and
4067 current_class_ref while tsubsting.
4069 2004-08-10 Mark Mitchell <mark@codesourcery.com>
4072 * parser.c (cp_parser_init_declarator): Robustify.
4074 2004-08-06 Richard Sandiford <rsandifo@redhat.com>
4076 * typeck2.c (process_init_constructor): Guard the missing field warning
4077 with warn_missing_field_initializers rather than extra_warnings.
4079 2004-08-06 Paolo Bonzini <bonzini@gnu.org>
4081 * class.c (instantiate_type) <ENTRY_VALUE_EXPR>: Do not handle.
4083 2004-08-05 Mark Mitchell <mark@codesourcery.com>
4085 * decl.c (start_preparsed_function): Move determine_visibility
4087 * decl2.c (determine_visibility): Incorporate dllexport testing.
4089 2004-08-05 Geoffrey Keating <geoffk@apple.com>
4091 * g++spec.c (lang_specific_driver): An -Xlinker or -Wl, option
4092 means that libstdc++ is needed.
4094 2004-08-05 Nathan Sidwell <nathan@codesourcery.com>
4096 * cvt.c (cp_convert_to_pointer): Adjust force_fit_type call.
4098 2004-08-04 Geoffrey Keating <geoffk@apple.com>
4100 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_ASSEMBLER_NAME rather
4101 than passing it as a parameter to rest_of_decl_compilation.
4102 * decl2.c (grokfield): Use set_user_assembler_name.
4104 2004-08-04 Nathan Sidwell <nathan@codesourcery.com>
4106 * decl.c (complete_array_type): Don't gratuitously copy
4107 maxindex. Its type is always set.
4109 2004-08-04 Paul Brook <paul@codesourcery.com>
4111 * Make-lang.in (cp/semantics.o, cp/optimize.o): Depend on TARGET_H.
4112 * cp-tree.h (struct language_function): Rename x_dtor_label to
4114 (dtor_label): Rename ...
4115 (cdtor_label): ... to this.
4116 * decl.c (begin_constructor_body): Remove.
4117 (check_special_function_return_type): Maybe change the return type.
4118 (grokdeclarator): Pass the class type.
4119 (start_preparsed_function): Constructors may need a return label.
4120 (finish_constructor_body, finish_destructor_body): Set the return
4122 (begin_function_body): Don't call begin_constructor_body.
4123 (finish_function): Don't warn for constructors or destructors.
4124 (implicitly_declare_fn): Maybe change the return type.
4125 * optimize.c: Include target.h.
4126 (maybe_clone_body): Remap the function result.
4127 * semantics.c: Include target.h.
4128 (finish_return_stmt): Maybe jump to return label for constructors.
4130 2004-08-03 Mark Mitchell <mark@codesourcery.com>
4132 * class.c (build_vtable): Do not set DECL_VISIBILITY here.
4133 (check_field_decls): Or here.
4134 (check_methods): Or here.
4135 (initialize_array): Don't mess with DECL_CONTEXT.
4136 * cp-tree.h (start_decl): Adjust prototype.
4137 (determine_visibility): New function.
4138 * decl.c (duplicate_decls): Remove checks for hidden "operator
4140 (build_library_fn_1): Give all library functions default
4142 (start_decl): Add pop_scope_p parameter. Tidy.
4143 (cp_finish_decl): Do not pop scopes here. Call
4144 determine_visibility for variable definitions.
4145 (start_preparsed_function): Call determine_visibility.
4146 * decl2.c (determine_visibility): New function.
4147 * method.c (use_thunk): Fix formatting.
4148 * parser.c (cp_parser_condition): Adjust calls to start_decl.
4149 (cp_parser_init_declarator): Likewise.
4150 * pt.c (instantiate_decl): Always call pop_nested_class.
4151 * rtti.c (get_tinfo_decl): Do not set DECL_VISIBILITY.
4152 (tinfo_base_init): Likewise.
4154 2004-08-02 Mark Mitchell <mark@codesourcery.com>
4157 * name-lookup.c (validate_nonmember_using_decl): Robustify.
4159 2004-08-01 Mark Mitchell <mark@codesourcery.com>
4162 * name-lookup.c (decl_namespace): Remove.
4163 (current_decl_namespace): Use decl_namespace_context instead of
4165 (push_decl_namespace): Likewise.
4166 (arg_assoc_class): Likewise.
4167 (arg_assoc_type): Likewise.
4168 * pt.c (check_specialization_namespace): New function.
4169 (maybe_process_partial_specialization): Use it.
4170 (register_specialization): Likewise.
4173 * cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): New macro.
4174 * call.c (null_ptr_cst_p): Handle variables with constant
4176 * pt.c (convert_nontype_argument): Use
4177 DECL_INTEGRAL_CONSTANT_VAR_P.
4178 * semantics.c (finish_id_expression): Likewise.
4181 * decl.c (duplicate_decls): Reject duplicate namespace
4185 * typeck.c (build_ptrmemfunc): Loosen assertion.
4187 2004-08-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
4189 * call.c (z_candidate::template_decl): Rename from template.
4190 (add_template_candidate_real): Adjust member reference.
4193 2004-07-29 Mark Mitchell <mark@codesourcery.com>
4195 * cp-tree.h (IDENTIFIER_REPO_CHOSEN): Define.
4196 (lang_decl_flags): Narrow the width of "languages". Add
4198 (DECL_NEEDED_P): Remove.
4199 (FOR_EACH_CLONE): New macro.
4200 (DECL_REPO_AVAILABLE_P): Likewise.
4201 (DECL_TINFO_P): Likewise.
4202 (set_linkage_according_to_type): Declare.
4203 (import_export_vtable): Remove.
4204 (import_export_tinfo): Likewise.
4205 (mark_needed): New function.
4206 (decl_needed_p): Likewise.
4207 (note_vauge_linkage_fn): Likewise.
4208 (init_repo): Change prototype.
4209 (repo_template_used): Remove.
4210 (repo_template_instantiated): Likewise.
4211 (repo_emit_p): New function.
4212 (repo_export_class_p): Likewise.
4213 (no_linkage_check): Change prototype.
4214 * class.c (set_linkage_according_to_type): New function.
4215 (build_vtable): Use it. Do not call import_export_vtable. Set
4216 DECL_IGNORED_P if appropriate.
4217 * decl.c (duplicate_decls): Preserve DECL_REPO_AVAILABLE_P.
4218 (make_rtL_for_nonlocal_decls): Check for template instantiations
4220 (grokfndecl): Adjust call to no_linkage_check.
4221 (set_linkage_for_static_data_member): New function.
4222 (grokvardecl): Use it. Adjust call to no_linkage_check.
4223 (grokdeclarator): Use set_linkage_for_static_data_member.
4224 * decl2.c (note_vague_linkage_fn): New function.
4225 (note_vague_linkage_var): Likewise.
4226 (finish_static_data_member_decl): Use it.
4227 (import_export_vtable): Remove.
4228 (import_export_class): Use repo_export_class_p.
4229 (var_finalized_p): Simplify.
4230 (maybe_emit_vtables): Simplify.
4231 (mark_needed): New function.
4232 (decl_needed_p): Likewise.
4233 (import_export_decl): Add documentation and consistency checks.
4234 Use repo_emit_p. Handle virtual tables and RTTI information
4236 (import_export_tinfo): Remove.
4237 (write_out_vars): Call import_export_decl.
4238 (cxx_callgraph_analyze_expr): Ensure that all vtables are emitted
4240 (finish_file): Use decl_needed_p. Do not call import_export_decl
4241 for undefined static data members. Do not warn about undefined
4242 inlines when using a repository.
4243 (mark_used): Use note_vague_linkage_fn. Always defer template
4245 * lex.c (cxx_init): Adjust call to init_repo. Always set
4246 flag_unit_at_a-time.
4247 * method.c (synthesize_method): Remove unncessary
4248 import_export_decl call.
4249 (implicitly_declare_fn): Use set_linkage_according_to_type.
4250 * optimize.c (maybe_clone_body): Use FOR_EACH_CLONE.
4251 * pt.c (instantiate_class_template): Don't redundantly add classes
4252 to keyed_classes. Don't call repo_template_used.
4253 (tsubst_decl): Set DECL_INTERFACE_KNOWN for instantiations of
4254 templates with internal linkage.
4255 (check_instantiated_args): Adjust call to no_linkage_check.
4256 (instantiate_template): Use FOR_EACH_CLONE.
4257 (mark_definable): New function.
4258 (mark_decl_instantiated): Use it.
4259 (do_decl_instantiation): Adjust tests for explicit instantiation
4260 after "extern template".
4261 (instantiate_class_member): Do not use repo_template_instantiated.
4262 (do_type_instantiation): Simplify.
4263 (instantiate_decl): Use mark_definable. Check repo_emit_p.
4265 * repo.c (repo_get_id): Remove.
4266 (original_repo): Remove.
4267 (IDENTIFIER_REPO_USED): Remove.
4268 (IDENTIFIER_REPO_CHOSEN): Remove.
4269 Remove all #if 0'd code.
4270 (repo_template_used): Remove.
4271 (repo_template_instantiated): Remove.
4272 (temporary_obstack_initialized_p): New variable.
4273 (init_repo): Register with lang_post_pch_load. Avoid creating
4274 identifiers unnecessarily. Don't use original_repo. Close the
4276 (reopen_repo_file_for_write): Not here.
4277 (finish_repo): Always write out a new repository file.
4278 (repo_emit_p): New function.
4279 (repo_export_class_p): Likewise.
4280 * rtti.c (get_tinfo_decl): Use set_linkage_according_to_type.
4281 (involves_incomplete_p): New function.
4282 (tinfo_base_init): Use it.
4283 (ptr_initializer): Remove non_public_ptr parameter.
4284 (ptm_initializer): Likewise.
4285 (get_pseudo_ti_init): Likewise.
4286 (unemitted_tinfo_decl_p): Remove.
4287 (emit_tinfo_decl): Use import_export_decl.
4288 * semantics.c (expand_body): Move updates of static_ctors and
4290 (expand_or_defer_fn): ... here.
4291 * tree.c (no_linkage_check): Add relaxed_p parameter.
4293 2004-07-28 Eric Christopher <echristo@redhat.com>
4295 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
4297 2004-07-28 Nathan Sidwell <nathan@codesourcery.com>
4299 * cp-tree.h (struct tree_pair_s): New.
4300 (typedef tree_pair_p): New.
4301 (DEF_VEC_O(tree_pair_s)): New.
4302 (struct lang_type_class): Make vcall_indices a VEC(tree_pair_s).
4303 (CLASSTYPE_VCALL_INDICES): Update documentation.
4304 * class.c (get_vcall_index): Adjust.
4305 (add_vcall_offset): Adjust.
4307 2004-07-27 Kelley Cook <kcook@gcc.gnu.org>
4309 * pt.c, typeck.c: Remove spurious carriage returns.
4311 2004-07-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4314 * pt.c (coerce_template_template_parms) <PARM_DECL case>: Only check
4315 when the type of ARG is not dependent.
4317 2004-07-26 Geoffrey Keating <geoffk@apple.com>
4319 * g++spec.c (LIBSTDCXX_PROFILE): Default to LIBSTDCXX.
4320 (lang_specific_driver): If the C++ or math library options don't
4321 start with '-l', don't count them as added libraries.
4323 2004-07-26 Nathan Sidwell <nathan@codesourcery.com>
4325 * decl.c (xref_basetypes): Adjust base access vector creation.
4326 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Adjust base
4328 * search.c (dynamic_cast_base_recurse, dfs_access_in_type): Likewise.
4330 2004-07-26 Niall Douglas <s_fsfeurope2@nedprod.com>
4331 Brian Ryner <bryner@brianryner.com>
4335 * class.c (check_field_decls): Apply hidden visibility if
4336 -fvisibility-inlines-hidden and inlined unless otherwise specified
4337 (build_vtable): Set vtable visibility to class visibility.
4338 (check_field_decls): Default static member visibility to class
4340 (check_methods): Default method visibility to class visibility.
4341 * cp-tree.h: Added CLASSTYPE_VISIBILITY and
4342 CLASSTYPE_VISIBILITY_SPECIFIED macro.
4343 * decl.c (duplicate_decls): New logic for merging definition decls
4344 with declaration decls. Added ignore & warning when non default
4345 applied to global operator new or delete.
4346 * method.c, optimize.c, rtti.c: Added setting of VISIBILITY_SPECIFIED
4347 wherever VISIBILITY was changed
4348 * rtti.c (get_tinfo_decl): Set typeinfo visibility to class
4350 (tinfo_base_init): Set typeinfo name visibility to class visibility.
4352 2004-07-25 Bernardo Innocenti <bernie@develer.com>
4354 * decl.c: Rename all identifiers named `class' to `cl'.
4355 * cp-tree.h: Likewise.
4357 2004-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
4359 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Use GGC_CNEW.
4360 * typeck2.c (abstract_virtuals_error): Use GGC_NEW.
4361 * name-lookup.c (binding_entry_make): Use GGC_NEW.
4362 (binding_table_construct): Use GGC_CNEWVEC.
4363 (binding_table_new): Use GGC_NEW.
4364 (cxx_binding_make): Likewise.
4365 (begin_scope): Likewise.
4366 (push_to_top_level): Use GCC_CNEW.
4367 * parser.c (cp_token_cache_new): Likewise.
4368 (cp_token_cache_push_token): Likewise.
4369 (cp_lexer_new_main): Likewise.
4370 (cp_lexer_new_from_tokens): Likewise.
4371 (cp_parser_context_new): Likewise.
4372 (cp_parser_new): Likewise.
4373 (cp_lexer_new_from_tokens): Use GGC_NEWVEC.
4374 * lex.c (cxx_make_type): Use GGC_CNEW.
4375 (retrofit_lang_decl): Use GGC_NEWVAR.
4376 (cxx_dup_lang_specific_decl): Likewise.
4377 (copy_lang_type): Likewise.
4378 * decl.c (use_label): Use GGC_NEW instead of ggc_alloc.
4379 (save_function_data): Likewise.
4380 (lookup_label): Use GGC_CNEW instead of ggc_alloc_cleared.
4381 (cxx_push_function_context): Likewise.
4383 2004-07-25 Richard Henderson <rth@redhat.com>
4385 * decl.c (start_preparsed_function): Set DECL_ARTIFICIAL and
4386 DECL_IGNORED_P on RESULT_DECL.
4387 * semantics.c (finalize_nrv): Copy them too.
4389 2004-07-23 Nathan Sidwell <nathan@codesourcery.com>
4391 * search.c (lookup_conversion_operator): Avoid two loops.
4392 (add_conversions): Remove.
4393 (check_hidden_convs, split_conversions,
4394 lookup_conversions_r): New.
4395 (lookup_conversions): Use lookup_conversions_r.
4397 2004-07-22 Nathan Sidwell <nathan@codesourcery.com>
4399 * pt.c (get_template_base): Check type is completable.
4401 2004-07-21 Eric Christopher <echristo@redhat.com>
4403 * decl.c (poplevel): Inline unused variable checking.
4406 2004-07-21 Paolo Bonzini <bonzini@gnu.org>
4408 * typeck.c (build_binary_op): Do not use RDIV_EXPR for
4411 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4414 * pt.c (check_explicit_specialization): Remove extension to accept
4415 specializations without template headers. Fall-through to normal
4418 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4421 * pt.c (determine_specialization): New parameter template_count.
4422 Disambiguate between member templates and member functions counting
4423 the template headers.
4424 (check_explicit_specialization): Update caller.
4425 (tsubst_friend_function): Likewise.
4427 2004-07-20 Steven Bosscher <stevenb@suse.de>
4429 * cp-tree.def (TINST_LEVEL): Make it an 'x' node.
4430 * cp-tree.h (tinst_level_t): New tree type.
4431 (union lang_tree_node): Handle it.
4432 (TINST_LOCATION): New accessor macro.
4433 (make_tinst_level): New prototype.
4434 * cp-lang.c (cp_tree_size): Handle TINST_LEVEL.
4435 * decl.c (cp_tree_node_structure): Likewise.
4436 * error.c (print_instantiation_full_context): Use TINST_LOCATION.
4437 (print_instantiation_partial_context): Likewise.
4438 * pt.c (pop_tinst_level): Likewise.
4439 (push_tinst_level): Use make_tinst_level.
4440 * tree.c (make_tinst_level): New function.
4441 (cp_walk_subtrees): Walk TINST_DECL for a TINST_LEVEL node.
4443 2004-07-20 Mark Mitchell <mark@codesourcery.com>
4445 * parser.c (cp_parser_simple_type_specifier): Fix typo.
4448 * parser.c (cp_parser_simple_type_specifier): Do not record usage
4449 of globally-qualified names.
4451 2004-07-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4454 * error.c (dump_type) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Output
4457 2004-07-19 Mark Mitchell <mark@codesourcery.com>
4460 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
4461 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
4462 * class.c (add_implicitly_declared_members): Use
4463 CLASSTYPE_LAZY_ASSIGNMENT_OP.
4464 * method.c (lazily_declare_fn): Clear
4465 CLASSTYPE_LAZY_ASSIGNMENT_OP.
4466 * search.c (lookup_fnfields_1): Check it.
4468 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
4470 * cp-tree.h (vec_binfo_member): Remove.
4471 * tree.c (vec_binfo_member): Remove.
4473 * cp-tree.h (struct lang_type_class): Remove vfields field.
4474 (CLASSTYPE_VFIELDS): Remove.
4475 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
4476 * class.c (determine_primary_base): Remove CLASSTYPE_VFIELDS
4478 (dfs_modify_vtables): Use TYPE_CONTAINS_VPTR_P.
4479 (finish_struct_1): Remove CLASSTYPE_VFIELDS handling.
4480 * init.c (dfs_initialize_vtbl_ptrs): Use TYPE_CONTAINS_VPTR_P.
4482 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
4484 * cp-tree.h (DEF_VEC_P(tree)): Remove here.
4485 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
4487 (BINFO_LANG_SLOTS): Remove.
4488 * tree.c (copy_binfo): Adjust BINFO creation and accessors.
4489 * decl.c (xref_basetypes): Adjust BINFO creation and accessors.
4490 * class.c (check_bases): Adjust BINFO accessors.
4491 (determine_primary_base, finish_struct_bits,
4492 maybe_warn_about_overly_private_class, warn_hidden,
4493 walk_subobject_offsets, propagate_binfo_offsets, end_of_class,
4494 warn_about_ambiguous_bases, get_vfield_name,
4495 dump_class_hierarchy_r, build_vtt_inits, accumulate_vtbl_inits,
4496 add_vcall_offset_vtbl_entries_r): Likewise.
4497 * dump.c (cp_dump_tree): Likewise.
4498 * init.c (sort_mem_initializers, expand_member_init, build_delete,
4499 push_base_cleanups): Likewise.
4500 * method.c (do_build_copy_constructor, do_build_assign_ref,
4501 synthesize_exception_spec): Likewise.
4502 name-lookup.c (arg_assoc_class): Likewise.
4503 * pt.c (instantiate_class_template,
4504 get_template_base_recursive): Likewise.
4505 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Likewise.
4506 * typeck2.c (process_init_constructor): Likewise.
4507 * search.c (lookup_base_r, dynamic_cast_base_recurse,
4508 dfs_access_in_type, dfs_walk_real, look_for_overrides,
4509 types_overlap_p, copied_binfo, original_binfo): Likewise.
4510 (binfo_for_vtable): Remove
4512 2004-07-20 Steven Bosscher <stevenb@suse.de>
4514 * cp-tree.h (struct lang_decl_flags): Unify the template_info and
4515 thunk_alias, and the access and virtual_offset fields.
4516 (THUNK_VIRTUAL_OFFSET, THUNK_ALIAS): Adjust.
4517 * decl.c (finish_case_label): Update c_add_case_node call.
4519 2004-07-19 Mark Mitchell <mark@codesourcery.com>
4521 Revert patch for PR c++/16623.
4523 2004-07-19 Kelley Cook <kcook@gcc.gnu.org>
4525 * except.c: Remove two spurious carriage returns.
4527 2004-07-19 Mark Mitchell <mark@codesourcery.com>
4530 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
4531 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
4532 * class.c (add_implicitly_declared_members): Use
4533 CLASSTYPE_LAZY_ASSIGNMENT_OP.
4534 * method.c (lazily_declare_fn): Clear
4535 CLASSTYPE_LAZY_ASSIGNMENT_OP.
4536 * search.c (lookup_fnfields_1): Check it.
4538 2004-07-19 Nathan Sidwell <nathan@codesourcery.com>
4540 * class.c (add_method): Delay adding the slot until the end.
4541 (determine_primary_base): Adjust VEC_iterate invokation.
4542 (resort_type_method_vec, finish_struct_methods, warn_hidden,
4543 walk_subobject_offsets, end_of_class, warn_about_ambiguous_bases,
4544 build_vtbl_initializer): Likewise.
4545 * init.c (sort_mem_initializers, build_delete, push_base_cleanups,
4546 build_vbase_delete): Likewise.
4547 * method.c (do_build_copy_constructor): Likewise.
4548 * name-lookup.c (new_class_binding, print_binding_level,
4549 poplevel_class, store_class_bindings, push_to_top_level,
4550 pop_from_top_level): Likewise.
4551 * pt.c (check_explicit_specialization): Likewise.
4552 * search.c (lookup_conversion_operator, lookup_fnfields_1,
4553 get_pure_virtuals, add_conversions, dfs_check_overlap,
4554 binfo_for_vbase): Likewise.
4556 2004-07-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4559 * pt.c (unify) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Use only
4560 innermost set of template arguments during deduction. Simplify.
4562 2004-07-19 Joseph S. Myers <jsm@polyomino.org.uk>
4564 * typeck.c (build_modify_expr, build_x_modify_expr): Set
4565 TREE_NO_WARNING on assignments with an operator other than '='.
4567 2004-07-10 Steven Bosscher <stevenb@suse.de>
4568 Joseph S. Myers <jsm@polyomino.org.uk>
4570 * cp-tree.h (C_SET_EXP_ORIGINAL_CODE): Remove.
4571 * decl2.c (grokfield): Don't check current_class_depth via
4572 unused TREE_COMPLEXITY.
4573 * semantics.c (finish_parenthesized_expr): Set TREE_NO_WARNING
4574 to avoid the missing parentheses warning.
4575 Don't set C_SET_EXP_ORIGINAL_CODE.
4577 2004-07-18 Mark Mitchell <mark@codesourcery.com>
4579 * tree.c (no_linkage_helper): Remove.
4580 (no_linkage_check): Don't use walk_tree_without_duplicates.
4582 * mangle.c (write_expression): Issue a sorry for zero-operand
4585 2004-07-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4588 * init.c (build_offset_ref): Build SCOPE_REF with non-null
4589 TREE_TYPE for non-dependent names.
4590 * typeck.c (build_x_unary_op): Handle non-dependent SCOPE_REF.
4591 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
4592 unknown_type_node as its TREE_TYPE.
4593 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
4594 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
4595 (dump_expr) <SCOPE_REF case>: Likewise.
4597 2004-07-17 Jason Merrill <jason@redhat.com>
4600 * call.c (type_passed_as): Make the invisible reference type
4602 * cp-gimplify.c (gimplify_cleanup_stmt): Rename to
4603 cp_genericize_r. Handle invisible reference lowering.
4604 (is_invisiref_parm): New fn.
4605 (cp_genericize): Adjust the types of invisible reference parms.
4606 Don't repeat the walk for clones.
4607 * decl.c (store_parm_decls): Don't generate any code for clones.
4609 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
4611 * cp-tree.h (builtin_function): Declare.
4613 2004-07-16 Mark Mitchell <mark@codesourcery.com>
4615 * class.c (finish_struct_methods): Remove unncessary code.
4616 (add_implicitly_declared_members): Create declarations for default
4617 constructors and copy constructors lazily.
4618 * cp-tree.h (lang_type_class): Remove lazy_default_ctor and
4620 (CLASSTYPE_LAZY_DEFAULT_CTOR): New macro.
4621 (CLASSTYPE_LAZY_COPY_CTOR): Likewise.
4622 * decl2.c (check_classfn): Robustify.
4623 (locate_dtor): Handle empty CLASSTYPE_METHOD_VEC.
4624 (locate_ctor): Handle lazy default constructors.
4625 (locate_copy): Handle lazy copy constructors.
4626 (implicitly_declare_fn): Make sure we're looking at the
4627 TYPE_MAIN_VARIANT for a class before creating functions. Don't
4628 set TYPE_HAS_CONSTRUCTOR.
4629 (lazily_declare_fn): New function.
4630 * name-lookup.c (constructor_name_full): Simplify.
4631 * search.c (lookup_fnfields_1): Lazily create methods, as
4633 (lookup_for_overrides): Handle empty CLASSTYPE_METHOD_VEC.
4635 2004-07-16 Steven Bosscher <stevenb@suse.de>
4637 * cp-tree.h (struct lang_type): Don't have three GTY options on a
4638 single bit GTY desc.
4640 2004-07-16 Richard Henderson <rth@redhat.com>
4642 * cp-lang.c (LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING): Die.
4643 * cp-tree.h (cp_copy_res_decl_for_inlining): Remove.
4644 * tree.c (cp_copy_res_decl_for_inlining): Remove.
4646 2004-07-16 Nathan Sidwell <nathan@codesourcery.com>
4648 * class.c (finish_struct_bits): Use for loop.
4649 (propagate_binfo_offsets): Do primary binfo outside of loop.
4652 * dump.c (cp_dump_tree): Don't dump the bases if there's no
4655 * pt.c (tsubst) <TREE_BINFO case>: We should never get here.
4657 2004-07-15 Mark Mitchell <mark@codesourcery.com>
4659 * cp-tree.h (lang_type_class): Remove has_real_assign_ref and
4660 has_abstract_assign_ref. Make methods a VEC(tree) *.
4661 (TYPE_HAS_CONST_ASSIGN_REF): Add documentation.
4662 (CLASSTYPE_CONSTRUCTORS): Adjust for changes to CLASSTYPE_METHOD_VEC.
4663 (CLASSTYPE_DESTRUCTORS): Likewise.
4664 (TYPE_HAS_REAL_ASSIGN_REF): Remove.
4665 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
4666 (add_method): Change prototoype.
4667 * class.c (add_method): Remove error_p parameter. Adjust for
4668 changes to CLASSTYPE_METHOD_VEC.
4669 (handle_using_decl): Adjust call to add_method.
4670 (maybe_warn_about_overly_private_class): Adjust for
4671 changes to CLASSTYPE_METHOD_VEC.
4672 (resort_type_method_vec): Likewise.
4673 (finish_struct_methods): Likewise.
4674 (check_for_override): Likewise.
4675 (warn_hidden): Likewise.
4676 (add_implicitly_declared_members): Defer creation of assignment
4677 operators. Adjust call to add_method.
4678 (clone_function_decl): Adjust call to add_method.
4679 (check_bases_and_members): Don't set TYPE_HAS_REAL_ASSIGN_REF.
4680 (finish_struct_1): Use CLASSTYPE_DESTRUCTORS.
4681 * decl.c (grok_special_member_properties): Don't set
4682 TYPE_HAS_ABSTRACT_ASSIGN_REF.
4683 * decl2.c (check_classfn): Adjust for
4684 changes to CLASSTYPE_METHOD_VEC.
4685 * method.c (locate_dtor): Use CLASSTYPE_DESTRUCTORS.
4686 (locate_ctor): Use CLASSTYPE_CONSTRUCTORS.
4687 (locate_copy): Adjust for changes to CLASSTYPE_METHOD_VEC.
4688 (implicitly_declare_fn): Set DECL_SOURCE_LOCATION. Do not call
4690 * pt.c (check_explicit_specialization): Adjust for
4691 changes to CLASSTYPE_METHOD_VEC.
4692 (instantiate_class_template): Do not set
4693 TYPE_HAS_ABSTRACT_ASSIGN_REF.
4694 * ptree.c (cxx_print_type): Don't try to print
4695 CLASSTYPE_METHOD_VEC.
4696 * rtti.c (emit_support_tinfos): Use CLASSTYPE_DESTRUCTORS.
4697 * search.c (lookup_field_r): Adjust for
4698 changes to CLASSTYPE_METHOD_VEC.
4699 (lookup_fnfields): Likewise.
4700 (lookup_conversion_operator): Likewise.
4701 (lookup_fnfields_1): Likewise. Create assignment operators
4703 (look_for_overrides_here): Adjust for
4704 changes to CLASSTYPE_METHOD_VEC.
4705 (add_conversions): Likewise.
4706 * semantics.c (finish_member_declaration): Adjust call to add_method.
4708 2004-07-15 Jason Merrill <jason@redhat.com>
4710 * cp-lang.c (cxx_types_compatible_p): To the middle-end,
4711 references and pointers are compatible.
4713 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
4715 * decl.c (xref_basetypes): Refactor.
4716 * tree.c (copy_base_binfos): Replace with ...
4717 (copy_binfo): ... this. Deep copy the given binfo, (not the just
4718 bases of the given base).
4719 * cp-tree.h (copy_base_binfo): Remove.
4720 (copy_binfo): Declare.
4722 2004-07-15 Mark Mitchell <mark@codesourcery.com>
4724 * name-lookup.c (set_inherited_value_binding_p): Add class_type
4726 (get_class_binding): Adjust.
4727 (push_class_level_binding): Don't use set_inherited_value_binding_p.
4729 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
4731 * class.c (finish_struct_bits): Don't set TYPE_HAS_CONVERSION here.
4732 * decl.c (xref_basetypes): Set it here.
4734 * class.c (check_bases): Don't set CLASSTYPE_NON_AGGREGATE here.
4735 Don't check for incomplete base.
4736 (get_vfield_name): Simplify while loop.
4737 * decl.c (xref_basetypes): Set CLASSTYPE_NON_AGGREGATE here.
4739 2004-07-14 Mark Mitchell <mark@codesourcery.com>
4741 * lex.c (cxx_make_type): Remove call to get_pointer_type.
4743 * cp-tree.h (IDENTIFIER_VALUE): Remove.
4744 (BINFO_PUSHDECLS_MARKED): Likewise.
4745 (maybe_inject_for_scope_var): Likewise.
4746 (push_class_decls): Likewise.
4747 * name-lookup.h (push_class_binding): Remove.
4748 (innermost_non_namespace_value): New function.
4749 (outer_binding): Likewise.
4750 * class.c (add_method): Push bindings before adding to
4752 (restore_class_cache): Do not restore class_shadowed.
4753 (pushclass): Do not add USING_DECLs. Do not call
4755 * config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c.
4756 * decl.c (pushdecl): Use outer_binding.
4757 (poplevel): Set the scope for an out-of-scope for-loop declaration
4759 (cp_finish_decl): Don't call maybe_inject_for_scope_var.
4760 * name-lookup.c (new_class_binding): New function.
4761 (push_binding): Use it.
4762 (pushdecl): Use innermost_non_namespace_value.
4763 (maybe_inject_for_scope_var): Remove.
4764 (push_class_binding): Remove.
4765 (set_inherited_value_binding_p): New function.
4766 (get_class_binding): New function.
4767 (push_class_level_binding): Assert that the current_class_type is
4769 (outer_binding): New function.
4770 (innermost_non_namespace_value): Likewise.
4771 (lookup_name_real): Use outer_binding.
4772 (lookup_name_current_level): Ignore out-of-scope variables.
4773 * pt.c (check_template_shadow): Use innermost_non_namespace_value.
4774 (lookup_template_class): Likewise.
4775 * search.c (dfs_push_type_decls): Remove.
4776 (dfs_push_decls): Likewise.
4777 (setup_class_bindings): Likewise.
4778 (lookup_field_1): Handle USING_DECLs from dependent scopes.
4779 (marked_pushdecls_p): Remove.
4780 (unmarked_pushdecls_p): Remove.
4781 (marked_identifiers): Remove.
4782 (setup_class_bindings): Remove.
4783 (dfs_push_type_decls): Remove.
4784 (dfs_push_decls): Remove.
4785 (push_class_decls): Remove.
4787 2004-07-13 Mark Mitchell <mark@codesourcery.com>
4791 * decl.c (grokvardecl): Make declspecs parameter const.
4792 (grokdeclarator): Likewise. Adjust accordingly.
4793 * decl.h (grokdeclarator): Adjust declaration.
4794 * parser.c (cp_parser_init_declarator): Do not clear
4795 decl_specifiers->attributes.
4797 * cp-tree.h (lang_identifier): Remove class_value.
4798 (IDENTIFIER_CLASS_VALUE): Remove.
4799 (pop_class_decls): Likewise.
4800 (init_search_processing): Likewise.
4801 * class.c (handle_using_decl): Use lookup_member, not
4802 IDENTIFIER_CLASS_VALUE.
4803 (restore_class_cache): New function, split out from ...
4804 (pushclass): ... here. Do not call clear_identifier_class_values.
4805 (invalidate_class_lookup_cache): Do not clear
4806 IDENTIFIER_CLASS_VALUE.
4807 (popclass): Do not call pop_class_decls.
4808 (maybe_note_name_used_in_class): Do not save names looked up after
4809 the class is complete. Use lookup_member, not
4810 IDENTIFIER_CLASS_VALUE.
4811 * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
4812 * decl.c (cxx_init_decl_processing): Do not call
4813 init_search_processing.
4814 * method.c (do_build_copy_constructor): Remove unnecessary code.
4815 (do_build_assign_ref): Likewise.
4816 * name-lookup.c (pushdecl): Use lookup_member, not
4817 IDENTIFIER_CLASS_VALUE.
4818 (set_identifier_type_value_with_scope): Set TREE_TYPE on the
4820 (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
4821 (push_class_binding): Do not set it.
4822 (clear_identifier_class_values): Remove.
4823 (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
4824 (store_binding): Do not save it.
4825 (pop_from_top_level): Do not restore it.
4826 * name-lookup.h (cxx_saved_binding): Remove class_value.
4827 (clear_identifier_class_values): Remove.
4828 * ptree.c (cxx_print_identifier): Do not print
4829 IDENTIFIER_CLASS_VALUE.
4830 * search.c (search_obstack): Remove.
4831 (push_stack_level): Remove.
4832 (pop_stack_level): Remove.
4833 (search_level): Remove.
4834 (search_stack): Remove.
4835 (lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
4836 (setup_class_bindings): Use IDENTIFIER_MARKED, not
4837 IDENTIFIER_CLASS_VALUE.
4838 (marked_identifiers): New variable.
4839 (push_class_decls): Clear IDENTIFIER_MARKED.
4840 (pop_class_decls): Don't call pop_search_level.
4841 (init_search_processing): Remove.
4843 2004-07-12 Mark Mitchell <mark@codesourcery.com>
4845 * cp-tree.h (get_aggr_typedef): Remove.
4846 * init.c (get_aggr_typedef): Likewise.
4848 * name-lookup.c (push_class_level_binding): Simplify.
4850 2004-07-12 Andrew Pinski <apinski@apple.com>
4854 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
4856 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
4859 2004-07-12 Eric Christopher <echristo@redhat.com>
4861 * parser.c (cp_parser_class_head): Remove unused variable.
4863 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4865 * decl.c (grok_op_properties): Reject [de-]allocation functions
4866 declared in a namespace, or declared as static.
4868 2004-07-12 Nathan Sidwell <nathan@codesourcery.com>
4870 * cp-tree.h (make_binfo): Remove.
4871 * decl.c (xref_basetypes): Use make_tree_binfo directly.
4872 * tree.h (copy_base_binfos): Likewise.
4873 (make_binfo): Remove.
4875 * call.c (build_user_type_conversion_1, build_new_op,
4876 check_constructor_callable, build_temp,
4877 perform_direct_initialization_of_possible): Pass type directly to
4878 lookup_fnfields & build_special_member_call.
4879 (build_special_member_call): Accept a type, and complete it.
4880 * class.c (finish_stuct_bits): Copy the BINFOs here.
4881 * cvt.c (ocp_convert): Pass type directly to
4882 build_special_member_call.
4883 * decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
4884 (xref_basetypes): Allocate the binfo here. Adjust.
4885 * init.c (build_init, build_new_1): Pass type directly to
4886 build_special_member_call.
4887 * lex.c (cxx_make_type): Do not allocate binfo here.
4888 * name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
4889 * parser.c (cp_parser_class_head): Always call xref_basetypes.
4890 * pt.c (instantiate_class_template): Likewise. Inhibit access
4891 checking for template friends.
4892 * ptree.c (cxx_print_type): Adjust record printing.
4893 * search.c (lookup_base): When taking a type, complete it before
4894 looking for a binfo.
4895 (lookup_member): Delay completing a type.
4896 (push_class_decls): Don't walk an incomplete type.
4897 (lookup_conversions): Likewise.
4898 * semantics.c (finish_stmt_expr_expr): Pass type directly to
4899 build_special_member_call.
4900 * tree.c (copy_base_binfos): Adjust.
4901 (make_binfo): Likewise.
4902 * typeck.c (build_modify_expr): Pass type directly to
4903 build_special_member_call.
4904 * typeck2.c (process_init_constructor): Check a binfo exists.
4905 (build_m_component_ref): Allow accessing an incomplete type.
4906 (build_functional_cast): Pass type directly to
4907 build_special_member_call.
4909 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4912 * config-lang.in (gtfiles): Add typeck2.c.
4913 * Make-lang.in: Tweak typeck2.c dependencies, and add rule for
4915 * cp-tree.h: Declare complete_type_check_abstract.
4916 * typeck2.c (pat_calc_hash, pat_compare,
4917 complete_type_check_abstract): New functions.
4918 (abstract_virtuals_error): If the type is abstract, register the
4919 declaration within abstract_pending_vars for further checks.
4920 Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
4921 * decl.c (cp_finish_decl): Do not strip array types.
4922 (create_array_type_for_decl): Check for abstractness of the element
4924 (complete_vars): Call complete_type_check_abstract.
4925 * class.c (finish_struct): Prepare a list of virtual functions for
4926 template types, and call complete_vars on it to check for abstractness.
4928 2004-07-12 Paolo Bonzini <bonzini@gnu.org>
4930 PR tree-optimization/14107
4931 * decl.c (finish_function): Remove temporary band-aid.
4933 2004-07-11 Mark Mitchell <mark@codesourcery.com>
4935 * call.c (build_operator_new_call): Avoid using push_to_top_level.
4936 (build_new_op): Adjust call to lookup_function_nonclass.
4937 * name-lookup.c (identifier_type_value): Adjust call to
4939 (lookup_name_real): Add block_p parameter.
4940 (lookup_name_nonclass): Adjust call to lookup_name_real.
4941 (lookup_function_nonclass): Likewise.
4942 (lookup_name): Likewise.
4943 * name-lookup.h (lookup_name_real): Change prototype.
4944 (lookup_name_nonclass): Likewise.
4945 * parser.c (cp_parser_lookup_name): Likewise.
4947 * cp-tree.h (saved_scope): Make old_bindings a vector.
4948 (unuse_fields): Remove.
4949 * name-lookup.h (cxx_saved_binding): Define it.
4950 * class.c (pushclass): Don't use unuse_fields.
4951 * name-lookup.c (cxx_saved_binding_make): Remove.
4952 (store_binding): Add new bindings to a vector, using an
4953 accumulator style, rather than adding them to a list.
4954 (store_bindings): Adjust accordingly.
4955 (store_class_bindings): Likewise.
4956 (push_to_top_level): Likewise.
4957 (pop_from_top_level): Likewise.
4958 * optimize.c (maybe_clone_body): Must push_to_top_level and
4959 pop_from_top_level calls outside of loop.
4960 * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope
4961 calls here from cp_parser_late_parsing_default_args.
4962 (cp_parser_save_default_args): Record the class type in which the
4963 function is declared.
4964 (cp_parser_late_parsing_default_args): Do not call
4965 push_nested_class/pop_nested_class.
4966 * search.c (dfs_unuse_fields): Remove.
4967 (unuse_fields): Remove.
4969 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
4971 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
4972 LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
4973 * cp-tree.h (poplevel): Declare.
4974 (set_block): Remove.
4975 * decl.c (set_block): Remove.
4977 2004-07-10 Mike Stump <mrs@apple.com>
4979 * decl2.c (import_export_class): Never export/import vtables
4980 with inline key functions.
4982 2004-07-09 Steven Bosscher <stevenb@suse.de>
4984 * typeck.c (c_expand_asm_operands): Remove.
4986 2004-07-09 Mike Stump <mrs@apple.com>
4988 * typeck.c (build_class_member_access_expr): Skip null deref
4989 warning when we don't dereference it.
4991 2004-07-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4995 * class.c (check_field_decls): Improve -Weffc++ warning: do not
4996 warn for pointers to functions/members, or for classes without
4999 2004-07-08 Mark Mitchell <mark@codesourcery.com>
5001 * name-lookup.h (struct cp_binding_level): Update documentation
5004 2004-07-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5007 * typeck.c (check_return_expr): Improve -Weffc++ warning: handle
5008 returning CALL_EXPR, and non-reference return type.
5010 2004-07-08 Nathan Sidwell <nathan@codesourcery.com>
5012 * name-lookup.c (push_binding): Use VEC_reserve.
5014 2004-07-08 Richard Henderson <rth@redhat.com>
5016 * cp-tree.h (expand_eh_spec_block): Remove.
5018 2004-07-07 Mark Mitchell <mark@codesourcery.com>
5020 * cp-tree.h (saved_scope): Remove x_previous_class_type and
5021 x_previous_class_values; add x_previous_class_level.
5022 (previous_class_type): Remove.
5023 (previous_class_values): Remove.
5024 (previous_class_level): New macro.
5025 * class.c (pushclass): Restore the identifier cache more
5027 (invalidate_class_lookup_cache): Use vector for class_shadowed and
5028 previous_class_values.
5029 * decl.c (poplevel): Likewise.
5030 * name-lookup.c (cxx_binding_init): New function.
5031 (cxx_binding_make): Use it.
5032 (push_binding): For a binding in a class level, use a vector of
5033 cp_class_binding nodes.
5034 (push_binding_level): New function.
5035 (begin_scope): Use it.
5036 (leave_scope): Do not put class binding levels on the free list.
5037 (print_binding_level): Adjust for the fact that class_shadowed is
5039 (poplevel_class): Likewise.
5040 (clear_identifier_class_values): Likewise.
5041 (push_class_level_binding): Likewise.
5042 (set_class_shadows): Remove.
5043 (store_binding): New function.
5044 (store_class_bindings): New function.
5045 (push_to_top_level): Use store_class_bindings as appropriate.
5046 (pop_from_top_level): Use previous_class_level, not
5047 previous_class_type.
5048 * name-lookup.h (cp_class_binding): New type.
5049 (cp_binding_level): Use a vector object for class_shadowed.
5050 (push_binding_level): Declare.
5051 (set_class_shadows): Remove.
5053 2004-07-07 Andrew Pinski <apinski@apple.com>
5055 * class.c (instantiate_type): BUFFER_REF is dead.
5056 * lex.c (init_operators): IN_EXPR is dead.
5058 2004-07-07 Jason Merrill <jason@redhat.com>
5061 * call.c (build_new_op): Give overload warnings for built-in
5064 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
5067 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
5070 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
5072 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
5073 * class.c (build_primary_vtable, check_bases,
5074 determine_primary_base, finish_struct_bits,
5075 maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
5076 get_basefndecls, warn_hidden, walk_subobject_offsets,
5077 build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
5078 layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
5079 finish_struct_1, get_vfield_name, contains_empty_class_p,
5080 dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
5081 dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
5082 add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
5084 * decl.c (xref_basetypes): Likewise.
5085 * dump.c (cp_dump_tree): Likewise.
5086 * error.c (dump_expr): Likewise.
5087 * init.c (sort_mem_initializers, expand_member_init,
5088 push_base_cleanups): Likewise.
5089 * method.c (do_build_copy_constructor, do_build_assign_reg,
5090 synthesize_exception_spec): Likewise.
5091 * name-lookup.c (arg_assoc_class): Likewise.
5092 * pt.c (instantiate_class_template, tsubst,
5093 get_template_base_recursive): Likewise.
5094 * ptree.c (cxx_print_type): Likewise.
5095 * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
5096 * search.c (lookup_base_r, dynamic_cast_base_recurse,
5097 dfs_access_in_type, access_in_type, lookup_field_queue_p,
5098 bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
5099 marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
5100 dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
5101 binfo_for_vtable, copied_binfo, original_binfo): Likewise
5102 * tree.c (copy_base_binfos, make_binfo): Likewise.
5103 * typeck.c (commmon_base_type): Likewise
5104 * typeck2.c (process_init_constructor): Likewise
5106 2004-07-06 Joseph S. Myers <jsm@polyomino.org.uk>
5108 * decl.c (check_tag_decl): Name redeclared type in diagnostic.
5110 2004-07-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5113 * pt.c (convert_nontype_argument): Disallow conversions between
5114 different enumeration types.
5116 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
5118 * cp-tree.h (BINFO_MARKED): Remove.
5119 (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
5120 BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
5121 BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
5122 (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
5123 * class.c (build_base_path): Use BINFO_VIRTUAL_P.
5124 (mark_primary_bases, determine_primary_base, base_derived_from,
5125 dfs_find_final_overrider, dfs_find_final_overrider_q,
5126 dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
5127 dfs_modify_vtables, walk_subobject_offsets,
5128 layout_nonempty_base_or_field, build_base_field,
5129 build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
5130 end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
5131 finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
5132 build_ctor_vtbl_group, accumulate_vtble_inits,
5133 dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
5134 build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
5135 add_vcall_offset_vtbl_entries_1): Likewise.
5136 * decl.c (xref_basetypes): Incomming virtual base indicated by
5138 * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
5139 * init.c (finish_init_stmts, sort_mem_initializers,
5140 emit_mem_initializers, build_vtble_address, expand_member_init,
5141 push_base_cleanups): Likewise.
5142 * method.c (do_build_copy_constructor): Likewise.
5143 * pt.c (instantiate_class_template,
5144 get_template_base_recursive): Likewise.
5145 * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
5146 get_pseudo_ti_desc): Likewise.
5147 * search.c (lookup_base_r, dynamic_cast_base_recurse,
5148 binfo_from_vbase, binfo_via_virtual, copied_binfo,
5149 original_binfo): Likewise.
5150 * semantics.c (finish_base_specifier): Virtualness is indicated
5152 * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
5154 2004-07-06 Mark Mitchell <mark@codesourcery.com>
5157 2004-06-24 Jason Merrill <jason@redhat.com>
5159 * decl.c (grokparms): Give the PARM_DECL reference type if the
5160 parameter is passed by invisible reference.
5162 2004-07-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5164 * cp-lang.c (cp_var_mod_type_p): Add extra arg.
5165 * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
5166 * pt.c (check_instantiated_args, unify): Likewise.
5168 2004-07-05 Phil Edwards <phil@codesourcery.com>
5170 * Make-lang.in (check-c++, lang_checks): Add some comments.
5172 2004-07-05 Zack Weinberg <zack@codesourcery.com>
5174 * cp-mudflap.c: Delete file.
5175 * Makefile.in: Remove all references to cp-mudflap.o.
5177 2004-07-05 Zack Weinberg <zack@codesourcery.com>
5179 * decl.c (cxx_init_decl_processing): Call
5180 build_common_tree_nodes before creating the global NAMESPACE_DECL.
5182 2004-07-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5185 * call.c (build_operator_new_call): Look only at global scope.
5187 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
5189 * call.c (enforce_access): Expect TREE_BINFO.
5190 * class.c (binfo_ctor_vtable): Check TREE_BINFO.
5191 * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
5192 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
5194 (BINFO_LANG_ELTS): Remove.
5195 (BINFO_LANG_SLOTS): New.
5196 (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
5197 (CLASSTYPE_TEMPLATE_INFO): Adjust.
5198 * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
5199 * search.c (lookup_member): Check TREE_BINFO.
5200 * semantics.c (perform_or_defer_access_check): Likewise.
5201 (check_accessibility_of_qualified_id): Check
5202 deferred_access_no_check.
5203 * tree.c (make_binfo): Use make_tree_binfo.
5205 2004-07-04 Mark Mitchell <mark@codesourcery.com>
5207 * method.c (implicitly_declare_fn): Set linkage of generated
5210 2004-07-04 Richard Henderson <rth@redhat.com>
5212 * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
5214 2004-07-03 Scott Brumbaugh <scottb.lists@verizon.net>
5217 * name-lookup.c (push_class_level_binding): Don't pass a
5218 TREE_LIST of ambiguous names to check_template_shadow as it
5219 only handles declarations. Instead, pull the declaration
5222 2004-07-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5225 * pt.c (check_explicit_specialization): Clarify error message.
5227 2004-07-02 Richard Henderson <rth@redhat.com>
5229 * tree.c (cp_unsave_r): Update remap_save_expr call.
5231 2004-07-02 Mark Mitchell <mark@codesourcery.com>
5234 * mangle.c (write_template_arg): Correct mangling.
5237 * decl.c (grokdeclarator): Robustify.
5239 2004-07-01 Richard Henderson <rth@redhat.com>
5241 * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
5242 * method.c (synthesize_method): Don't clear_last_expr.
5243 * name-lookup.c (maybe_push_cleanup_level): Likewise.
5245 2004-07-01 Nick Clifton <nickc@redhat.com>
5247 * decl2.c (import_export_class): Invoke the
5248 import_export_class field in the gcc_target structure if it is not
5251 2004-06-30 Richard Henderson (rth@redhat.com>
5253 * decl.c (start_preparsed_function): Don't set immediate_size_expand.
5254 * method.c (use_thunk): Likewise.
5256 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
5258 * call.c (build_over_call), typeck.c (build_function_call): Call
5259 check_function_arguments instead of check_function_format.
5261 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
5263 * call.c (build_over_call), typeck.c (build_function_call): Update
5264 calls to check_function_format.
5266 2004-06-30 Richard Henderson <rth@redhat.com>
5268 * call.c (build_over_call): Use __builtin_memcpy for copying
5269 CLASS_AS_BASE rather than funny casting.
5271 2004-06-30 Richard Henderson <rth@redhat.com>
5273 * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
5274 TYPE_SIZE_UNIT of full_type.
5276 2004-06-30 Per Bothner <per@bothner.com>
5278 Conditionally compile support for --enable-mapped_location.
5279 * decl.c (pop_label): Handle (imperfectly) USE_MAPPED_LOCATION case.
5280 * decl2.c: If USE_MAPPED_LOCATION, don't do some line number
5281 adjustments - which I don't understand.
5282 * error.c (dump_decl): Rename "<interrnal>" to "<built-in>".
5283 * error.c: Use LOCATION_FILE and EXPR_LOCATION macros.
5284 (print_instantiation_partial_context): Use expand_location.
5285 * decl.c (duplicate_decl): Use new DECL_IS_BUILTIN macro.
5286 * name-lookup.c: Likewise.
5287 * lex.c (cxx_init): Likewise. Also use BUILTINS_LOCATION.
5288 * name-lookup.c: Use input_line macro.
5289 * parser.c (cp_lexer_get_preprocessor_token): Use UNKNOWN_LOCATION.
5290 (cp_parser_statement): Rename locaal variable statement_locus to
5291 statement_location and use SET_EXPR_LOCATION macro.
5292 * pt.c: Handle USE_MAPPED_LOCATION case. Use new macros.
5293 * tree.c (cp_walk_subtrees): Likewise.
5295 2004-06-29 Per Bothner <per@bothner.com>
5297 * tree.c (build_min_nt, build_min, build_min_non_dep):
5298 Don't set TREE_COMPLEXITY from input_line.
5300 2004-06-29 Paul Brook <paul@codesourcery.com>
5302 * init.c: Include target.h.
5303 (get_cookie_size): Remove and replace with target hook.
5305 (build_new_1): Store the element size in the cookie.
5307 2004-06-29 Nathan Sidwell <nathan@codesourcery.com>
5310 * parser.c (cp_parser_template_declaration_after_export): Disable
5311 access checks here ...
5312 (cp_parser_class_specifier): ... not here.
5314 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
5316 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
5317 VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
5318 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
5321 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
5323 * cp-tree.h (struct deferred_access): Move to ...
5324 * semantics.c (struct deferred_access): ... here. Adjust.
5325 (deferred_access_stack): Make a VEC(deferred_access),
5326 (deferred_access_free_list): Remove.
5327 (deferred_access_no_check): New.
5328 (push_deferring_access_checks, resume_deferring_access_checks,
5329 stop_deferring_access_checks, pop_deferring_access_checks,
5330 get_deferred_access_checks, pop_to_parent_deferring_access_checks,
5331 perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
5333 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
5336 * call.c (build_temp): Declare.
5337 (check_constructor_callable): New.
5338 (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
5339 CONSTRUCTOR_CALLABLE.
5340 (convert_like_real, initialize_reference): Use
5341 check_constructor_callable.
5342 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
5343 (LOOKUP_*): Renumber.
5345 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
5347 * friend.c (add_friend): Only perform access checks when context
5349 * lex.c (cxx_make_type): Only create a binfo for aggregate types.
5350 * parser.c (cp_parser_class_specifier): Disable access checks here
5351 when parsing the body of a templated class.
5352 * semantics.c (perform_or_defer_access_checks): Reorder to allow
5353 NULL binfos when not checking access.
5355 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
5357 Use vector API for vbase list.
5358 * cp-tree.h: Include vec.h
5359 (DEF_VEC_P (tree)): New type.
5360 (struct lang_type_class): Change vbase's member type.
5361 (binfo_for_vbase): Declare.
5362 * class.c (determine_primary_base, base_derived_from,
5363 update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
5364 warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
5365 build_vtbl_initializer): Adjust.
5366 * decl.c (xref_basetypes): Adjust, accumulate upper bound of
5368 * init.c (sort_mem_initializers, expand_member_init,
5369 push_base_cleanups): Adjust.
5370 * method.c (do_build_copy_constructor): Adjust.
5371 * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
5372 (binfo_for_vbase): New.
5373 * tree.c (copy_base_binfos): Adjust.
5375 2004-06-28 Mark Mitchell <mark@codesourcery.com>
5377 * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
5379 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
5382 * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
5383 paranthesis in case of pointers to array members.
5384 * error.c (dump_type_prefix): Likewise.
5385 (dump_type_suffix): Maybe issue a whitespace when printing
5388 2004-06-27 Mark Mitchell <mark@codesourcery.com>
5391 * parser.c (cp_parser_set_decl_spec_type): Refine test for
5392 redefinition of built-in types.
5394 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
5396 * error.c (pp_template_argument_list_start): Remove.
5397 (pp_template_argument_list_end): Likewise.
5398 (pp_separate_with_comma): Use pp_cxx_separate_with.
5399 (reinit_global_formatting_buffer): Remove.
5400 (pp_non_consecutive_character): Likewise.
5401 (dump_scope): Use pp_cxx_colon_colon.
5402 (dump_template_parameter): Use pp_cxx_identifier,
5403 pp_cxx_tree_identifier and pp_cxx_whitespace.
5404 (dump_templat_bindings): Replace use of pp_string with sequence
5405 of pp_cxx_whitespace and pp_equal.
5406 (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
5407 pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set
5409 (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
5410 (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace,
5411 pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
5412 (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
5413 pp_cxx_right_bracket, pp_cxx_identifier throughout,
5414 (dump_decl): Likewise.
5415 (dump_template_decl): Likewise.
5416 (dump_function_decl): Likewise. Set padding as appropriate.
5417 (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
5419 (dump_exception_spec): Likewise.
5420 (dump_function_name): Use pp_cxx_tree_identifier and
5422 (dump_template_parms): Use pp_cxx_begin_template_argument_list and
5423 pp_cxx_end_template_argument_list.
5424 (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
5425 pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
5426 pp_cxx_whitespace throughout.
5427 (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
5429 (dump_unary_op): Likewise.
5430 (reinit_cxx_pp): New function.
5431 (type_as_string); Use it.
5432 (expr_as_string): Likewise.
5433 (decl_as_string); Likewise.
5434 (context_as_string): Likewise.
5435 (lang_decl_name): Likewise.
5436 (decl_to_string): Likewise.
5437 (expr_to_string): Likewise.
5438 (parm_to_string): Likewise.
5439 (type_to_string): Likewise.
5440 (args_to_string): Likewise.
5441 (cv_to_string): Likewise.
5443 2004-06-26 Mark Mitchell <mark@codesourcery.com>
5445 * cp-tree.h (cp_cv_quals): New type.
5446 (cp_declarator): Use it instead of "tree" as appropriate.
5447 (grok_method_quals): Adjust prototype.
5448 (grokclassfn): Likewise.
5449 (do_friend): Likewise.
5450 * decl.c (grokfndecl): Use cp_cv_quals, not tree.
5451 (grokdeclarator): Likewise.
5452 * decl2.c (grok_method_quals): Likewise.
5453 (grokclassfn): Likewise.
5454 * friend.c (do_friend): Likewise.
5455 * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
5456 * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
5457 (make_pointer_declarator): Likewise.
5458 (make_reference_declarator): Likewise.
5459 (make_ptrmem_declarator): Likewise.
5460 (cp_parser_ptr_operator): Likewise.
5461 (cp_parser_cv_qualifier_seq_opt): Likewise.
5462 (cp_parser_cv_qualifier_opt): Remove.
5463 (cp_parser_new_declarator_opt): Adjust call to
5464 cp_parser_ptr_operator.
5465 (cp_parser_conversion_declaration_opt): Likewise.
5466 (cp_parser_declarator): Use cp_cv_quals, not tree.
5467 (cp_parser_direct_declarator): Likewise.
5469 2004-06-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5471 * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
5472 Rename DECL_STMT to DECL_EXPR.
5473 * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
5474 * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
5475 * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
5477 2004-06-26 Jan Hubicka <jh@suse.cz>
5480 * decl2.c (maybe_emit_vtables): Always import_export_vtable for the
5481 reachability analysis.
5483 2004-06-25 Mark Mitchell <mark@codesourcery.com>
5485 * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
5488 2004-06-25 Paul Brook <paul@codesourcery.com>
5490 * decl2.c (get_guard): Call targetm.cxx.guard_type.
5491 (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
5493 2004-06-24 Mark Mitchell <mark@codesourcery.com>
5495 * decl.c (grokdeclarator): Restore error messages about __thread.
5496 * parser.c (cp_parser_decl_specifier_seq): Likewise.
5498 2004-06-24 Jason Merrill <jason@redhat.com>
5501 * decl.c (grokparms): Give the PARM_DECL reference type if the
5502 parameter is passed by invisible reference.
5504 2004-06-24 Andreas Schwab <schwab@suse.de>
5506 * cp-tree.h (enum cp_storage_class): Remove trailing comma.
5508 2004-06-23 Mark Mitchell <mark@codesourcery.com>
5510 * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
5511 (cp/decl.o): Likewise.
5512 (cp/decl2.o): Likewise.
5513 (cp/pt.o): Likewise.
5514 (cp/semantics.o): Likewise.
5515 * config-lang.in (gtfiles): Do not reference cp/lex.h.
5516 * class.c: Do not include lex.h.
5517 (add_implicitly_declared_members): Do not use
5518 adding_implicit_members.
5519 (check_bases_and_members): Do not talk about grok_x_components.
5520 * cp/cp-tree.h (adding_implicit_members): Remove.
5521 (cp_storage_class): New type.
5522 (cp_decl_spec): Likewise.
5523 (cp_decl_specifier_seq): Likewise.
5524 (cp_parameter_declarator): Use it for the decl_specifiers field.
5525 (check_tag_decl): Adjust prototype.
5526 (shadow_tag): Likewise.
5527 (groktypename): Likewise.
5528 (start_decl): Likewise.
5529 (start_function): Likewise.
5530 (start_method): Likewise.
5531 (grok_x_components): Remove.
5532 (grokfield): Adjust prototype.
5533 (grokbitfield): Likewise.
5534 (finish_member_class_template): Remove.
5535 * decl.c: Do not include lex.h.
5536 (adding_implicit_members): Do not define.
5537 (check_tag_decl): Do not use trees to represent decl-specifiers.
5538 (shadow_tag): Likewise.
5539 (groktypename): Likewise.
5540 (start_decl): Likewise.
5541 (grokvardecl): Likewise.
5542 (grokdeclarator): Likewise.
5543 (grokparms): Likewise.
5544 (start_function): Likewise.
5545 (start_method): Likewise.
5546 * decl.h (grokdeclarator): Adjust prototype.
5547 * decl2.c: Do not include lex.h.
5548 (grok_x_components): Remove.
5549 (grokfield): Do not use trees to represent decl-specifiers.
5550 (grokbitfield): Likewise.
5551 * lex.c: Do not include lex.h.
5553 * parser.c: Include target.h.
5554 (clear_decl_specs): New function.
5555 (cp_parser_translation_unit): Do not use trees to represent
5557 (cp_parser_postfix_expression): Likewise.
5558 (cp_parser_new_type_id): Likewise.
5559 (cp_parser_condition): Likewise.
5560 (cp_parser_simple_declaration): Likewise.
5561 (cp_parser_decl_specifier_seq): Likewise.
5562 (cp_parser_function_specifier_opt): Likewise.
5563 (cp_parser_conversion_type_id): Likewise.
5564 (cp_parser_template_parameter): Likewise.
5565 (cp_parser_explicit_instantiation): Likewise.
5566 (cp_parser_type_specifier): Likewise.
5567 (cp_parser_simple_type_specifier): Likewise.
5568 (cp_parser_init_declarator): Likewise.
5569 (cp_parser_type_id): Likewise.
5570 (cp_parser_type_specifier_seq): Likewise.
5571 (cp_parser_parameter_declaration): Likewise.
5572 (cp_parser_member_declaration): Likewise.
5573 (cp_parser_exception_declaration): Likewise.
5574 (cp_parser_function_definition_from_specifiers_and_declarator):
5576 (cp_parser_single_declaration): Likewise.
5577 (cp_parser_save_member_function_body): Likewise.
5578 (cp_parser_friend_p): Likewise.
5579 (cp_parser_set_storage_class): New function.
5580 (cp_parser_set_decl_spec_type): Likewise.
5581 * pt.c: Do not include lex.h.
5582 * semantics.c: Likewise.
5583 (finish_member_class_template): Remove.
5585 2004-06-23 Roger Sayle <roger@eyesopen.com>
5587 * call.c (build_cxx_call): Don't call expand_tree_builtin. No
5588 longer take both "args" and "convert_args" as arguments.
5589 (build_op_delete_call): Update call to build_cxx_call.
5590 (build_over_call): Likewise, update call to build_cxx_call.
5591 * cp-tree.h (build_cxx_call): Update funtion prototype.
5592 * typeck.c (build_function_call): Don't call expand_tree_builtin.
5593 * rtti.c (throw_bad_cast): Update call to build_cxx_call.
5594 (throw_bad_typeid): Likewise.
5595 (build_dynamic_cast_1): Likewise.
5597 2004-06-22 Richard Henderson <rth@redhat.com>
5599 * class.c (build_vfn_ref): Take a pointer not object. Build
5601 (cp_fold_obj_type_ref): New.
5602 * call.c (build_over_call): Update build_vfn_ref call.
5603 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
5604 * cp-tree.h (cp_fold_obj_type_ref): Declare.
5606 2004-06-21 Jason Merrill <jason@redhat.com>
5609 * cp-gimplify.c (cp_gimplify_init_expr): Look through
5612 2004-06-21 Mark Mitchell <mark@codesourcery.com>
5614 * cp-tree.def (NEW_EXPR): Add a fourth slot.
5615 * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
5616 (TREE_PARMLIST): Likewise.
5617 (CALL_DECLARATOR_PARMS): Likewise.
5618 (CALL_DECLARATOR_QUALS): Likewise.
5619 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
5620 (cp_declarator_kind): New type.
5621 (cp_parameter_declarator): Likewise.
5622 (cp_declarator): Likewise.
5623 (cp_error_declarator): Likewise.
5624 (no_parameters): Likewise.
5625 (groktypename): Change prototype.
5626 (start_decl): Likewise.
5627 (start_handler_parms): Likewise.
5628 (get_scope_of_declarator): Likewise.
5629 (start_function): Likewise.
5630 (start_preparsed_function): New function.
5631 (start_function): Change prototype.
5632 (start_method): Likewise.
5633 (grokfield): Likewise.
5634 (grokbitfield): Likewise.
5635 (build_new): Likewise.
5636 (make_pointer_declarator): Remove.
5637 (make_reference_declarator): Likewise.
5638 (make_call_declarator): Likewise.
5639 (set_quals_and_spec): Likewise.
5640 (process_template_parm): Change prototype.
5641 (begin_function_definition): Remove.
5642 (finish_parmlist): Remove.
5643 * decl.c (groktypename): Do not use trees to represent
5645 (start_decl): Likewise.
5646 (start_handler_parms): Remove.
5647 (get_scope_of_declarator): Reimplement.
5648 (grokdeclarator): Do not use trees to represent declarators.
5649 (grokparms): Likewise.
5650 (start_function): Likewise.
5651 (start_method): Likewise.
5652 (build_void_list_mode): Do not use TREE_PARMLIST.
5653 * decl.h (grokdeclarator): Change prototype.
5654 * decl2.c (grok_method_quals): Robustify.
5655 (grok_x_components): Do not use trees to represent declarators.
5656 (grokfield): Likewise.
5657 (grokbitfield): Likewise.
5658 (start_objects): Build FUNCTION_DECLs, not declarators.
5659 (start_static_storage_duration_function): Likewise.
5660 * init.c (build_new): Simplify.
5661 * lex.c (make_pointer_declarator): Remove.
5662 (make_reference_declarator): Likewise.
5663 (make_call_declarator): Likewise.
5664 (set_quals_and_spec): Likewise.
5665 * method.c (use_thunk): Use start_preparsed_function.
5666 (synthesize_method): Likewise.
5667 (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
5668 * optimize.c (maybe_clone_body): Use start_preparsed_function.
5669 * parser.c (cp_error_declarator): New variable.
5670 (declarator_obstack): Likewise.
5671 (alloc_declarator): New function.
5672 (make_declarator): Likewise.
5673 (make_id_declarator): Likewise.
5674 (make_pointer_declarator): Likewise.
5675 (make_reference_declarator): Likewise.
5676 (make_ptrmem_declarator): Likewise.
5677 (make_call_declarator): Likewise.
5678 (make_array_declarator): Likewise.
5679 (no_parameters): New variable.
5680 (make_parameter_declarator): Likewise.
5681 (cp_parser_check_for_definition_in_return_type): Do not use trees
5682 to represent declarators.
5683 (cp_parser_translation_unit): Likewise.
5684 (cp_parser_new_expression): Likewise.
5685 (cp_parser_new_type_id): Likewise.
5686 (cp_parser_new_declarator_opt): Likewise.
5687 (cp_parser_direct_new_declarator): Likewise.
5688 (cp_parser_condition): Likewise.
5689 (cp_parser_declaration_statement): Likewise.
5690 (cp_parser_declaration): Likewise.
5691 (cp_parser_conversion_type_id): Likewise.
5692 (cp_parser_conversion_declarator_opt): Likewise.
5693 (cp_parser_template_parameter_list): Likewise.
5694 (cp_parser_template_parameter): Likewise.
5695 (cp_parser_explicit_instantiation): Likewise.
5696 (cp_parser_init_declarator): Likewise.
5697 (cp_parser_declarator): Likewise.
5698 (cp_parser_direct_declarator): Likewise.
5699 (cp_parser_type_id): Likewise.
5700 (cp_parser_parameter_declaration_clause): Likewise.
5701 (cp_parser_parameter_declaration_list): Likewise.
5702 (cp_parser_parameter_declaration): Likewise.
5703 (cp_parser_member_declaration): Likewise.
5704 (cp_parser_exception_declaration): Likewise.
5705 (cp_parser_check_declarator_template_parameters): Likewise.
5706 (cp_parser_function_definition_from_specifiers_and_declarator):
5708 (cp_parser_save_member_function_body): Likewise.
5709 * pt.c (process_template_parm): Add is_non_type parameter.
5710 (convert_template_argument): Adjust call to groktypename.
5711 (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
5712 (tsubst): Do not expect declarators.
5713 (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
5715 (instantiate_decl): Use start_preparsed_function.
5716 * semantics.c (begin_function_definition): Remove.
5717 (finish_parmlist): Remove.
5718 * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
5721 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5723 * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
5724 (build_new_method_call): Likewise.
5725 * decl.c (local_variable_p_walkfn): Don't walk into types.
5726 * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
5727 (build_anon_union_vars): Add new operand for COMPONENT_REF.
5728 * init.c (buld_new): Add new operand for ARRAY_REF.
5729 * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
5730 (do_build_assign_ref): Likewise.
5731 * parser.c (cp_parser_direct_new_declarator): Add new operands
5733 (cp_parser_direct_declarator): Likewise.
5734 * pt.c (tsubst): Likewise.
5735 (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
5737 * semantics.c (finish_non_static_data_member): Add new operand
5739 * typeck.c (build_class_member_access_expr): Likewise.
5740 (build_class_member_access_expr, finish_class_member_access_expr):
5742 (build_ptrmemfunc_access_expr): Likewise.
5743 (build_array_ref): Add new operands for ARRAY_REF.
5744 * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
5745 * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
5747 2004-06-21 Richard Henderson <rth@redhat.com>
5749 * dump.c (cp_dump_tree): Don't use dump_next_stmt.
5750 * parser.c (cp_parser_jump_statement): Update commentary.
5751 * pt.c (tsubst_expr): Use RETURN_EXPR.
5752 * semantics.c (finish_return_stmt): Likewise.
5753 (finalize_nrv_r): Likewise.
5754 * typeck.c, typeck2.c: Update file start commentary.
5756 2004-06-21 Richard Henderson <rth@redhat.com>
5758 * semantics.c (finish_expr_stmt): Call verify_sequence_points.
5760 2004-06-20 Richard Henderson <rth@redhat.com>
5762 * cp-tree.h (add_decl_stmt): Declare.
5763 * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
5764 * semantics.c (maybe_cleanup_point_expr): New.
5765 (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
5766 finish_for_expr, finish_switch_cond): Use it.
5767 (finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN.
5769 2004-06-20 Richard Henderson <rth@redhat.com>
5771 * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
5772 * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
5773 (cp_gimplify_expr): Call it.
5774 (gimplify_cleanup_stmt): Move from c-gimplify.c.
5775 (cp_genericize): New.
5776 * decl.c (finish_function): Call it.
5777 * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
5778 (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
5779 (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
5780 (cp_genericize): Declare.
5781 * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
5782 * dump.c (cp_dump_tree): Likewise.
5783 * semantics.c (push_cleanup): Move from c-semantics.c.
5785 2004-06-20 Zack Weinberg <zack@codesourcery.com>
5787 * cp-lang.c (has_c_linkage): Implement.
5789 * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
5790 * decl.c (duplicate_decls): Use COPY_DECL_RTL.
5791 (builtin_function_1): Don't call make_decl_rtl.
5792 (build_cp_library_fn): Don't call set_mangled_name_for_decl.
5793 (grokvardecl): Don't call mangle_decl.
5794 * except.c (nothrow_libfn_p): Look at DECL_NAME, not
5795 DECL_ASSEMBLER_NAME.
5796 * method.c (set_mangled_name_for_decl): Delete.
5797 * name-lookup.c (pushdecl): When a local extern shadows a
5798 file-scope declaration of the same object, give both DECLs the
5800 * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
5801 on DECL_ASSEMBLER_NAME.
5803 2004-06-19 Richard Henderson <rth@redhat.com>
5805 * cp-gimplify.c: Remove unnecessary prototypes.
5806 (cp_gimplify_stmt): Merge into ...
5807 (cp_gimplify_expr): ... here. Move to end of file. Handle
5808 stmts_are_full_exprs_p frobbing.
5809 * cp-tree.h (cp_gimplify_stmt): Remove.
5810 * pt.c (tsubst_expr): Merge prep_stmt and unify.
5811 * tree.c (init_tree): Don't set lang_gimplify_stmt.
5813 2004-06-18 Richard Henderson <rth@redhat.com>
5816 * semantics.c (begin_cond): New.
5817 (finish_cond): Rewrite to handle template DECL_STMTs specially.
5818 Assume that non-template decls go land before the conditional.
5819 (simplify_loop_decl_cond): Likewise.
5820 (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
5821 finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
5822 begin_switch_stmt, finish_switch_cond): Update to match.
5824 2004-06-17 Jason Merrill <jason@redhat.com>
5827 * semantics.c (simplify_aggr_init_expr): Don't return the slot.
5828 (finish_stmt_expr_expr): Update type after conversions.
5829 (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
5830 Handle void initializer.
5831 * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
5833 2004-06-17 Geoffrey Keating <geoffk@apple.com>
5835 * class.c (build_clone): Don't call defer_fn, let mark_used do it.
5836 * cp-tree.h (defer_fn): Delete.
5837 * decl2.c (defer_fn): Delete.
5838 (finish_file): Simplify deferred_fns loops; check that
5839 only used inline functions get into deferred_fns.
5840 (mark_used): Inline previous contents of defer_fn.
5842 2004-06-16 Richard Henderson <rth@redhat.com>
5844 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
5845 (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
5846 * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
5847 of CTOR_INITIALIZER ...
5848 (pp_cxx_statement): ... here.
5849 * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
5850 (finish_function): Use alloc_stmt_list to zap entire function.
5851 * parser.c (cp_parser_compound_statement): Update commentary.
5852 * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
5853 * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
5854 (finish_stmt_expr): Don't look through COMPOUND_STMT.
5856 2004-06-16 Geoffrey Keating <geoffk@apple.com>
5858 * pt.c (mark_decl_instantiated): Don't call defer_fn.
5860 2004-06-16 Richard Henderson <rth@redhat.com>
5862 * parser.c (cp_parser_labeled_statement): Update commentary.
5863 * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
5864 * tree.c (mark_local_for_remap_r): Likewise.
5866 2004-06-16 Richard Henderson <rth@redhat.com>
5868 * parser.c (cp_parser_asm_definition): Update commentary.
5869 * pt.c (tsubst_expr): Use ASM_EXPR.
5870 * semantics.c (finish_asm_stmt): Likewise.
5872 2004-06-16 Richard Henderson <rth@redhat.com>
5874 * decl.c (finish_destructor_body): Use LABEL_EXPR.
5875 * parser.c (cp_parser_statement): Update commentary.
5876 * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
5877 * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
5878 * tree.c (mark_local_for_remap_r): Likewise.
5880 2004-06-16 Richard Henderson <rth@redhat.com>
5883 * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
5884 statement in FOR_INIT_STMT for templates.
5886 2004-06-15 Richard Henderson <rth@redhat.com>
5888 * call.c (initialize_reference): Don't build CLEANUP_STMT here.
5889 * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
5890 (genericize_try_block): Use gimplify_stmt.
5891 (genericize_catch_block, genericize_eh_spec_block): Likewise.
5892 (cp_gimplify_init_expr): Remove STMT_EXPR special case.
5893 (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
5894 * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
5895 (cp_tree_chain_matters_p): Remove.
5896 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
5897 (COMPOUND_STMT_BODY_BLOCK): New.
5898 (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
5899 (EXPR_STMT_STMT_EXPR_RESULT): New.
5900 (building_stmt_tree): Check cur_stmt_list.
5901 (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
5902 (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
5903 * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
5904 (cp_finish_decl): Use push_cleanup.
5905 (start_function, finish_function): Use statement lists.
5906 (finish_stmt): Do nothing.
5907 * except.c (begin_eh_spec_block): Use statement lists.
5908 (check_handlers_1, check_handlers): Likewise.
5909 * init.c (construct_virtual_base): Don't add extra compound stmts.
5910 (build_vec_init): Likewise.
5911 * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
5912 * name-lookup.h (struct cp_binding_level): Add statement_list.
5913 * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
5914 (cp_parser_labeled_statement, cp_parser_expression_statement,
5915 cp_parser_statement_seq_opt): Likewise.
5916 (cp_parser_compound_statement): Likewise. Take bool for try block.
5917 (cp_parser_selection_statement): Tidy if processing.
5918 (cp_parser_already_scoped_statement): Rewrite to do what it says.
5919 * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
5920 (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST.
5921 Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
5922 * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
5923 (finish_cond): New, rewritten from FINISH_COND.
5924 (simplify_loop_decl_cond): New.
5925 (finish_expr_stmt): Avoid nested EXPR_STMTs.
5926 (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
5927 begin_else_clause, finish_else_clause, finish_if_stmt,
5928 begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
5929 begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
5930 finish_for_cond, finish_for_stmt, begin_switch_stmt,
5931 finish_switch_cond, finish_switch_stmt, begin_try_block,
5932 finish_try_block, finish_cleanup_try_block, finish_function_try_block,
5933 finish_handler_sequence, finish_function_handler_sequence,
5934 begin_handler, finish_handler_parms, finish_handler,
5935 begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
5936 using statement lists.
5937 (begin_compound_stmt): Replace has_no_scope argument with flags.
5938 Update all callers. Use statement lists.
5939 (finish_compound_stmt): Likewise.
5940 (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
5941 (current_scope_stmt_stack): Remove.
5942 (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
5943 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
5944 Rewrite with statement lists.
5946 2004-06-15 Alexandre Oliva <aoliva@redhat.com>
5948 * parser.c: Change all assignments of c_lex_string_translate
5949 to true and false to 1 and 0.
5950 (cp_lexer_read_token): Convert type of the translated string.
5951 (cp_parser_skip_to_closing_parentheses): Preserve original
5952 value of c_lex_string_translate, and set it to -1 while
5954 (cp_parser_cache_group): Likewise.
5955 (cp_parser_cache_group_1): Renamed.
5956 (cp_parser_asm_operand_list): Remove redundant setting of
5957 c_lex_string_translate.
5958 (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
5959 Handle chained strings.
5961 2004-06-12 Andrew Pinski <apinski@apple.com>
5965 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
5967 * cp-tree.h: Fix typo.
5969 * cp-tree.h: Include cgraph.h
5970 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
5971 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
5973 2004-06-12 Jason Merrill <jason@redhat.com>
5975 PR tree-optimization/14107
5976 * decl.c (finish_function): Warn about no return in all functions.
5978 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
5980 * cp-tree.h (struct language_function): Remove cannot_inline.
5981 * decl.c (save_function_data): cannot_inline is no more.
5982 (cxx_push_function_context): Likewise.
5983 * decl2.c (start_objects, start_static_storage_duration_function):
5984 Reset DECL_INLINE, set DECL_UNINLINABLE.
5986 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5989 * search.c (lookup_field): Propagate the ambiguity list.
5990 (lookup_fnfields): Likewise.
5992 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5995 * parser.c (cp_parser_template_name): Ctors/dtors never need a
5996 template keyword to disambiguate.
5998 2004-06-14 Mark Mitchell <mark@codesourcery.com>
6001 * decl.c (grokdeclarator): Ignore pointer-to-members when
6002 computing template depth.
6005 * name-lookup.c (pushtag): Do not try to put class declarations in
6006 explicit specialization scopes.
6008 2004-06-11 Andrew Pinski <pinskia@physics.uc.edu>
6010 * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
6012 2004-06-11 Mark Mitchell <mark@codesourcery.com>
6015 * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
6016 bindings for undeclared built-ins.
6018 2004-06-11 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6020 * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
6021 appear at the correct location.
6023 2004-06-10 Jason Merrill <jason@redhat.com>
6027 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6028 * init.c (build_offset_ref): Build SCOPE_REF with non-null
6029 TREE_TYPE for non-dependent names.
6030 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
6031 unknown_type_node as its TREE_TYPE.
6032 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
6033 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
6034 (dump_expr) <SCOPE_REF case>: Likewise.
6036 2004-06-10 Mark Mitchell <mark@codesourcery.com>
6039 * parser.c (cp_parser_direct_declarator): Robustify.
6042 * pt.c (tsubst_copy): Use decl_constant_value on enumeration
6043 constants in non-dependent contexts.
6047 * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
6050 2004-06-10 Jakub Jelinek <jakub@redhat.com>
6053 * decl.c (duplicate_decls): Handle fileptr_type_node arguments
6056 2004-06-09 Mark Mitchell <mark@codesourcery.com>
6060 2004-06-07 Mark Mitchell <mark@codesourcery.com>
6061 * lex.c (handle_pragma_interface): Deprecate.
6062 (handle_pragma_implementation): Likewise.
6064 2004-06-09 Andrew Pinski <pinskia@physics.uc.edu>
6066 * g++spec.c (lang_specific_driver): Remove check for -lm
6067 and -lmath when check it see if it was the math library.
6069 2004-06-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6072 * parser.c (cp_parser_direct_declarator): Reject constructor named
6073 as qualified template-id.
6075 2004-06-07 Mark Mitchell <mark@codesourcery.com>
6078 * lex.c (handle_pragma_interface): Deprecate.
6079 (handle_pragma_implementation): Likewise.
6081 2004-06-07 Mark Mitchell <mark@codesourcery.com>
6084 * parser.c (cp_parser_iteration_statement): Fix typo in error
6088 * pt.c (tsubst_default_argument): Do not defer access checks
6089 while substituting into the default argument.
6092 * pt.c (tsubst_copy): Do not try to substitute for an enumeration
6093 constant in a non-dependent context.
6096 * except.c (build_throw): Ensure that temp_expr has been
6099 2004-06-06 Roger Sayle <roger@eyesopen.com>
6101 * cp/cp-tree.h (lvalue_or_else): Add function prototype.
6103 2004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6106 * parser.c (cp_parser_mem_initializer_id): Gracefully reject
6107 'typename', and accept 'template'.
6109 2004-06-03 Andrew Pinski <pinskia@physics.uc.edu>
6110 Jan Hubicka <jh@suse.cz>
6113 * method.c (use_think): Do not mark thunk as referenced.
6115 2004-06-03 Matt Austern <austern@apple.com>
6118 * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
6119 is nonzero, and if we see a noninline definition of a key method,
6120 make the vtables nonweak.
6122 2004-06-02 Matt Austern <austern@apple.com>
6124 * cp-tree.h (instantiate_decl): new boolean parameter,
6125 undefined_ok. Current behavior is equivalent to its being 0.
6126 * decl2.c (mark_used): Add new argument when calling instantiate_decl
6127 * pt.c (mark_decl_instantiated): Unconditionally make
6128 instantiations explicit unconditionally
6129 (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
6130 since mark_decl_instantiated now does it.
6131 (instantiate_class_member): New. Instantiate a member of an
6132 explicitly instantiated class template.
6133 (do_type_instantiation): Explicitly instantiate members of an
6134 explicitly instantiated class template.
6135 (instantiate_decl): if undefined_ok is nonzero, and if we're
6136 trying to explicitly instantiated a template with no definition,
6137 change it to an implicit instantiation.
6138 (instantiate_pending_templates): Add new argument to instantiate_decl.
6139 * tree.c (cp_cannot_inline_tree_fn): Likewise.
6141 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
6143 * cp-tree.h: Fix typo.
6145 * cp-tree.h: Include cgraph.h
6146 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
6147 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
6149 2004-06-01 Jason Merrill <jason@redhat.com>
6152 * call.c (call_builtin_trap): Remove type parm.
6153 (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
6154 (build_x_va_arg): Dereference a null pointer for a non-POD argument.
6156 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6159 * init.c (build_offset_ref): Build SCOPE_REF with non-null
6160 TREE_TYPE for non-dependent names.
6161 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
6162 unknown_type_node as its TREE_TYPE.
6163 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
6164 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
6165 (dump_expr) <SCOPE_REF case>: Likewise.
6167 2004-06-01 Richard Henderson <rth@redhat.com>
6168 Andrew Pinski <pinskia@physics.uc.edu>
6170 * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
6171 * parser.c (struct cp_parser): Remove in_offsetof.
6172 (cp_parser_new): Don't set it.
6173 (cp_parser_unary_expression): Don't check it.
6174 (cp_parser_postfix_open_square_expression): Split out from ...
6175 (cp_parser_postfix_expression): ... here.
6176 (cp_parser_postfix_dot_deref_expression): Likewise.
6177 (cp_parser_builtin_offsetof): New.
6178 (cp_parser_primary_expression): Use it.
6180 2004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6183 * parser.c (cp_parser_postfix_expression): Allow subscript
6184 operator in offsetof.
6186 2004-05-31 Mark Mitchell <mark@codesourcery.com>
6189 * friend.c (add_friend): Do not try to perform access checks for
6190 functions from dependent classes.
6192 2004-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
6194 * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
6195 (pp_cxx_begin_template_argument_list): Turn into a function.
6196 (pp_cxx_end_template_argument_list): Likewise.
6197 (pp_cxx_separate_with): Define.
6198 (pp_cxx_unqualified_id): Tidy.
6199 (pp_cxx_primary_expression): Likewise.
6200 (pp_cxx_postfix_expression): Likewise.
6201 (pp_cxx_expression): Likewise.
6202 (pp_cxx_simple_type_specifier): Likewise.
6203 (pp_cxx_type_specifier_seq): Likewise.
6204 (pp_cxx_parameter_declaration_clause): Likewise.
6205 (pp_cxx_exception_specification): Likewise.
6206 (pp_cxx_direct_declarator): Likewise.
6207 (pp_cxx_type_id): Likewise.
6208 * cxx-pretty-print.h (pp_cxx_whitespace): Export from
6210 (pp_cxx_left_paren): Likewise.
6211 (pp_cxx_right_paren): Likewise.
6212 (pp_cxx_left_brace): Likewise.
6213 (pp_cxx_right_brace): Likewise.
6214 (pp_cxx_left_bracket): Likewise.
6215 (pp_cxx_right_bracket): Likewise.
6216 (pp_cxx_dot): Likewise.
6217 (pp_cxx_identifier): Likewise.
6218 (pp_cxx_tree_identifier): Likewise.
6219 (pp_cxx_ampersand): New macro.
6220 (pp_cxx_star): Likewise.
6221 (pp_cxx_arrow): Likewise.
6222 (pp_cxx_semicolon): Likewise.
6223 (pp_cxx_complement): Likewise.
6224 (pp_cxx_begin_template_argument_list): Declaree.
6225 (pp_cxx_end_template_argument_list): Likewise.
6226 (pp_cxx_colon_colon): likewise.
6228 2004-05-31 Eric Botcazou <ebotcazou@libertysurf.fr>
6230 * parser.c (cp_parser_simple_type_specifier): Explicitly test
6233 2004-05-31 Kazu Hirata <kazu@cs.umass.edu>
6235 * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
6236 typeck.c: Fix comment formatting.
6238 2004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
6240 * cp-lang.c (cp_expand_decl): Remove.
6241 (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
6243 2004-05-30 Andreas Jaeger <aj@suse.de>
6245 * lang-specs.h: Add missing initializers for .ii.
6247 2004-05-28 Aldy Hernandez <aldyh@redhat.com>
6249 * decl.c (cp_make_fname_decl): Free return value from
6252 2004-05-28 Mark Mitchell <mark@codesourcery.com>
6255 * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
6257 * init.c (build_new): Likewise.
6260 * name-lookup.c (arg_assoc): Robustify.
6263 * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
6264 when determining the scope to use for a pointer to member.
6265 (lookup_anon_field): Give it external linkage.
6266 * cp-tree.h (lookup_anon_field): Declare it.
6267 * expr.c (cplus_expand_constant): Use it.
6269 2004-05-28 Mark Mitchell <mark@codesourcery.com>
6272 * parser.c (cp_parser_simple_type_specifier): Call
6273 maybe_note_name_used_in_class.
6275 2004-05-28 Tom Marshall <tmarshall@real.com>
6278 * class.c (finish_struct_1): Warn only if the dtor is non-private or
6279 the class has friends.
6281 2004-05-27 Adam Nemet <anemet@lnxw.com>
6284 * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
6285 TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
6287 2004-05-24 Geoffrey Keating <geoffk@apple.com>
6289 * method.c (implicitly_declare_fn): Don't call defer_fn; abort
6290 if it might be needed.
6291 * pt.c (mark_decl_instantiated): Only call defer_fn if
6292 the function actually needs processing in finish_file.
6293 * decl2.c (finish_file): Add check that elements in
6294 deferred_fns_used are really needed there. Remove unnecessary
6295 test of DECL_SAVED_TREE.
6297 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
6299 * Make-lang.in: No need to specify $(LIBCPP).
6301 2004-05-23 Mark Mitchell <mark@codesourcery.com>
6304 * parser.c (cp_parser_class_head): Robustify.
6307 * parser.c (cp_parser_decl_specifier_seq): Correct error in
6309 (cp_parser_constructor_declarator_p): Treat attributes
6313 * typeck.c (build_unary_op): Do not attempt to resolve casts to
6314 base classes in templates.
6316 2004-05-23 Mark Mitchell <mark@codesourcery.com>
6319 * pt.c (instantiate_template): Robustify.
6321 2004-05-23 Mark Mitchell <mark@codesourcery.com>
6324 * decl.c (xref_tag): Issue errors about redeclaring template
6325 classes as non-template classes.
6327 2004-05-23 Mark Mitchell <mark@codesourcery.com>
6330 * name-lookup.c (supplement_binding): Allow redefinitions of
6334 * parser.c (cp_parser_template_argument): Robustify.
6336 2004-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
6338 * class.c (alter_access): Use %E format specifier to print an
6339 identifier node. Avoid looking at the IDENTIFIER_POINTER.
6340 (push_lang_context): Likewise.
6341 * decl.c (lookup_label): Likewise.
6342 (grokdeclarator): Likewise.
6343 * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
6344 * pt.c (do_type_instantiation): Likewise.
6345 * tree.c (handle_java_interface_attribute): Likewise.
6346 (handle_com_interface_attribute): Likewise.
6347 (handle_init_priority_attribute): Likewise.
6349 2004-05-22 Mark Mitchell <mark@codesourcery.com>
6353 * pt.c (build_non_dependent_expr): Expand the set of tree nodes
6354 recognized as overloaded functions.
6356 2004-05-22 Mark Mitchell <mark@codesourcery.com>
6359 * class.c (layout_nonempty_base_or_field): Do not try to avoid
6360 layout conflicts for unions.
6363 * typeck.c (build_x_unary_op): Instantiate template class
6364 specializations before looking for "operator &".
6367 * typeck.c (complete_type): Layout non-dependent array types, even
6371 * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
6374 2004-05-22 Roger Sayle <roger@eyesopen.com>
6376 * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
6377 returning when TREE_TYPE is error_mark_node.
6378 * typeck.c (require_complete_type): Return error_mark_node if
6379 value's type is an error_mark_node.
6381 2004-05-20 Andrew Pinski <pinskia@physics.uc.edu>
6383 * optimize.c (calls_setjmp_r): Remove.
6384 (calls_setjmp_p): Remove.
6385 * cp-tree.c (calls_setjmp_p): Remove.
6386 * decl.c (finish_function): Do not call calls_setjmp_p.
6388 2004-05-18 Zack Weinberg <zack@codesourcery.com>
6390 * decl.c (cp_finish_decl): Use mark_decl_referenced.
6391 * decl2.c (maybe_make_one_only): Likewise.
6392 * method.c (use_thunk): Likewise.
6394 2004-05-18 Jason Merrill <jason@redhat.com>
6396 * class.c (build_base_path): Tidy a bit.
6398 2004-05-14 Geoffrey Keating <geoffk@apple.com>
6400 * name-lookup.c (struct scope_binding): New.
6401 (EMPTY_SCOPE_BINDING): New.
6402 (lookup_using_namespace): Take a scope_binding instead of a
6404 (qualified_lookup_using_namespace): Likewise.
6405 (cxx_binding_clear): Delete.
6406 (do_nonmember_using_decl): Use a scope_binding instead of a
6408 (lookup_tag): Don't call select_decl.
6409 (ambiguous_decl): Don't return anything (and change callers to match).
6410 Take a scope_binding as the second parameter.
6411 (lookup_namespace_name): Use a scope_binding instead of a
6413 (unqualified_namespace_lookup): Likewise.
6414 (lookup_qualified_name): Likewise.
6415 (select_decl): Take a scope_binding instead of a cxx_binding.
6416 Use macros rather than hand-coding tests for type-ness.
6418 2004-05-13 Diego Novillo <dnovillo@redhat.com>
6420 * cp-gimplify.c: Rename from cp-simplify.c.
6421 * Make-lang.in, optimize.c: Update.
6423 2004-05-13 Diego Novillo <dnovillo@redhat.com>
6425 Merge from tree-ssa-20020619-branch. See
6426 ChangeLog.tree-ssa for details.
6428 * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
6429 cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
6430 expr.c, init.c, name-lookup.h, optimize.c, parser.c,
6431 pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
6433 * cp-mudflap.c: New file.
6434 * cp-simplify.c:: New file.
6436 2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6439 * decl2.c (check_classfn): For member templates, compare also the
6440 template parameters to match the declaration.
6441 * cp-tree.h: Adjust declaration of check_classfn.
6442 * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
6443 * friend.c (do_friend): Likewise.
6444 * pt.c (tsubst_friend_function): Likewise.
6446 2004-05-01 Zack Weinberg <zack@codesourcery.com>
6448 * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
6449 Instead, dig into the representation type to find the array bound.
6451 2004-04-30 Jason Merrill <jason@redhat.com>
6453 Refer to base members using COMPONENT_REFs where possible.
6454 * class.c (build_simple_base_path): New fn.
6455 (build_base_path): Use it for non-virtual base references.
6456 (layout_class_type): Change base fields to their real type
6457 after layout is done.
6458 * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
6459 * cp-lang.c (cxx_get_alias_set): Use it.
6461 2004-04-30 Kazu Hirata <kazu@cs.umass.edu>
6463 * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
6466 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6469 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
6470 used in integral constant expressions.
6472 2004-04-22 Mark Mitchell <mark@codesourcery.com>
6474 * init.c (build_aggr_init): Fix accidental use of C99 construct in
6477 * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
6479 * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
6480 * decl.c (reshape_init): Use it.
6481 * init.c (perform_member_init): Remove redundant condition.
6482 (build_aggr_init): Adjust to handle brace-enclosed initializers
6484 (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
6486 * parser.c (cp_parser_initializer_clause): Do not set
6487 TREE_HAS_CONSTRUCTOR on the initializer.
6488 * rtti.c (tinfo_base_init): Likewise.
6489 (generic_initializer): Likewise.
6490 (ptr_initializer): Likewise.
6491 (ptm_initializer): Likewise.
6492 (class_initializer): Likewise.
6493 (get_pseudo_ti_init): Likewise.
6494 * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
6496 2004-04-22 Alan Modra <amodra@bigpond.net.au>
6498 * name-lookup.c (anonymous_namespace_name): Make static.
6500 2004-04-19 Roger Sayle <roger@eyesopen.com>
6503 * class.c (build_base_path): Call fold whilst building the NULL
6504 pointer check expression trees.
6506 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
6508 * init.c (build_new_1): Don't use type size argument for Java
6509 _Jv_AllocObject call.
6511 2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
6513 * method.c (make_alias_for_thunk): Remove preprocessor guard on
6514 declaration and definition.
6516 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
6519 * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
6520 than ASM_OUTPUT_DEF.
6522 2004-04-08 Jakub Jelinek <jakub@redhat.com>
6524 * decl2.c (mark_used): Don't segfault if cfun != NULL but
6525 current_function_decl == NULL.
6527 2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
6530 * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
6533 2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6535 * init.c (decl_constant_value): Don't look at DECL_INITIAL
6537 * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
6538 or TREE_SIDE_EFFECTS of a type.
6540 2004-04-02 Nathan Sidwell <nathan@codesourcery.com>
6543 * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
6544 cv-qualifier unification.
6545 * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
6547 2004-04-02 Jan Hubicka <jh@suse.cz>
6549 * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
6550 * cp-tree.h (cp_update_decl_after_saving): Declare.
6551 * tree.c (cp_update_decl_after_saving): Define.
6553 2004-04-01 Mark Mitchell <mark@codesourcery.com>
6556 * typeck.c (get_delta_difference): Call fold before returning the
6559 2004-04-01 Richard Henderson <rth@redhat.com>
6562 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
6563 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
6565 2004-04-01 Mark Mitchell <mark@codesourcery.com>
6568 * name-lookup.c (maybe_push_cleanup_level): Robustify.
6570 2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6572 * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
6574 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6576 * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
6577 * class.c (check_bitfield_decl): Likewise.
6578 * cvt.c (type_promotes_to): Likewise.
6579 * decl.c (finish_enum): Likewise.
6580 * mangle.c (write_builtin_type): Likewise.
6581 * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
6582 * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
6583 (build_binary_op): Likewise.
6585 2004-03-31 Jan Hubicka <jh@suse.cz>
6587 * tree.h (optimize_function): Kill prototype.
6588 * optimize.c (dump_function, optimize_function, dump_finction): Kill.
6589 * semantics.c (expand_body): Kill.
6591 2004-03-30 Mark Mitchell <mark@codesourcery.com>
6594 * decl.c (start_decl_1): Do not decide whether or not to create a
6595 new cleanup level until after the type has been completed.
6598 * pt.c (tsubst_default_argument): Clear current_function_decl.
6600 2004-03-30 Zack Weinberg <zack@codesourcery.com>
6602 * name-lookup.c, parser.c: Use new shorter form of GTY markers.
6604 2004-03-29 Zack Weinberg <zack@codesourcery.com>
6606 * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
6607 is null, just print the literal name and return.
6609 2004-03-25 Kazu Hirata <kazu@cs.umass.edu>
6611 * cxx-pretty-print.c: Fix comment typos.
6613 2004-03-24 Kazu Hirata <kazu@cs.umass.edu>
6615 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
6618 2004-03-23 Ziemowit Laski <zlaski@apple.com>
6620 * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
6621 * mangle.c (write_type): Add call to 'mangle_fundamental_type'
6624 2004-03-23 Zack Weinberg <zack@codesourcery.com>
6626 PR 12267, 12391, 12560, 13129, 14114, 14133
6627 * cp-lang.c (c_reset_state): Delete.
6628 (push_file_scope, pop_file_scope): New stubs.
6629 * parser.c (c_parse_file): Call sorry() here if called more than once.
6631 2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6633 * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
6636 2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
6638 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
6640 2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
6642 * error.c (enum pad): Remove.
6643 (dump_qualifiers): Likewise.
6644 (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
6645 (dump_aggr_type): Likewise.
6646 (dump_type_suffix): Likewise.
6647 (dump_simple_decl): Likewise.
6648 (dump_function_decl): Likewise.
6649 (cv_to_string): Likewise.
6650 (dump_type_prefix): Likewise. Adjust return void.
6651 * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
6653 (pp_cxx_template_keyword_if_needed): Document.
6654 (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
6655 (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
6656 MUST_NOT_THROW_EXPR.
6658 2004-03-21 Mark Mitchell <mark@codesourcery.com>
6661 * decl.c (cp_finish_decl): Compute the size of arrays declared in
6662 templates, if their type is non-dependent.
6664 2004-03-19 Mark Mitchell <mark@codesourcery.com>
6666 * call.c (build_op_delete_call): Do not forget the placement
6667 arguments when iterating through mutiple delete operators.
6669 * cp-tree.h (svaed_scope): Remove last_parms.
6670 (NEW_DELETE_OPNAME_P): New macro.
6671 (last_function_parms): Remove.
6672 (do_friend): Adjust prototype.
6673 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
6674 using last_function_parms.
6675 (grokfndecl): Take the PARM_DECLs as an argument, rather than
6676 using last_function_parms.
6677 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
6678 for class-specific operator new and operator delete.
6679 (grok_op_properties): Do not look for allocation functions with
6681 (start_function): Use DECL_ARGUMENTS instead of
6682 last_function_parms.
6683 * decl.h (last_function_parms): Do not declare.
6684 * decl2.c (grokclassfn): Do not use last_function_parms.
6685 * friend.c (do_friend): Remove parmdecls parameter.
6686 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
6687 (pop_from_top_level): Do not restore it.
6688 * pt.c (check_explicit_specialization): Do not adjust
6689 last_function_parms.
6691 * name-lookup.c (do_local_using_decl): Create a local binding for
6692 types brought in via using declarations.
6694 * name-lookup.c (lookup_arg_dependent): Handle block-scope
6695 function declarations correctly.
6697 * semantics.c (finish_id_expression): Correct handling of
6698 conversion operators to dependent types.
6700 * typeck.c (lookup_destructor): Allow the use of destructors from
6703 2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6705 * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
6706 TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
6707 * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
6708 the field is named TEMPLATE_TYPE_PARM_INDEX.
6710 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6713 * parser.c (cp_parser_functional_cast): A cast to anything
6714 but integral or enumaration type is not an integral constant
6716 * pt.c (value_dependent_expression_p): Handle cast expressions
6717 without operands (such as "int()").
6719 2004-03-18 Mark Mitchell <mark@codesourcery.com>
6721 * semantics.c (finish_pseudo_destructor_expr): Allow differing
6722 cv-qualification between the type named by the
6723 pseudo-destructor-name and the object-type.
6725 * search.c (accessible_base_p): Handle non-proper bases.
6727 * name-lookup.c (do_nonmember_using_decl): If a using declaration
6728 refers to a single overloaded function, set the type of the
6730 * tree.c (lvalue_type): Simplify.
6731 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
6733 (build_unary_op): Handle OVERLOADs with known types.
6735 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
6738 * parser.c (cp_parser_postfix_expression): Handle the use of
6739 "typename" in non-dependent contexts. Convert appropriately when
6740 when using a qualified name after "->" or ".".
6742 * call.c (conditional_conversion): Honor the requirement that some
6743 conversions refer to the original object.
6745 2004-03-18 Mark Mitchell <mark@codesourcery.com>
6747 * call.c (build_conditional_expr): Do not call force_rvalue for
6748 operands of void_type when the conditional expression itself has
6750 * name-lookup.c (pushdecl): Don't consider a declaration of a
6751 function named "main" to be an overload of a type named "main".
6752 * parser.c (cp_parser_template_name): Perform name lookup when the
6753 template name is proceeded by "template" if the qualifying scope
6755 * typeck.c (composite_pointer_type_r): Correctly handle
6756 pointer-to-member types.
6757 (build_const_cast): Likewise.
6759 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6761 * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
6762 * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
6763 (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
6764 (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
6765 (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
6766 (TYPEOF_TYPE_EXPR): New macro.
6767 * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
6768 * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
6769 * pt.c (tsubst): Likewise.
6770 * semantics.c (finish_typeof): Likewise.
6771 * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
6772 and TEMPLATE_TYPE_PARM.
6773 * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
6774 (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
6776 2004-03-16 Mark Mitchell <mark@codesourcery.com>
6779 * cp-tree.h (build_new_op): Change prototype.
6780 (build_x_binary_op): Likewise.
6781 * call.c (build_new_op): Add overloaded_p parameter.
6782 * decl2.c (grok_array_decl): Adjust call to build_new_op.
6783 * parser.c (cp_parser_binary_expression): Note that uses of
6784 overloaded operators prevents an expression from being considered
6785 an integral constant.
6786 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
6788 * semantics.c (finish_call_expr): Likewise.
6789 * typeck.c (rationalize_conditional_expr): Likewise.
6790 (build_x_indirect_ref): Likewise.
6791 (build_x_binary_op): Likewise.
6792 (build_x_unary_op): Likewise.
6793 (build_x_compound_expr): Likewise.
6794 (build_modify_expr): Likewise.
6795 * typeck2.c (build_x_arrow): Likewise.
6797 2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
6799 * cp-lang.c, ptree.c: Update copyright.
6801 2004-03-13 Mark Mitchell <mark@codesourcery.com>
6804 * parser.c (cp_parser_non_integral_constant_expression): Encode
6805 more of the idiom that surrounded calls to this function within
6807 (cp_parser_primary_expression): Adjust accordingly.
6808 (cp_parser_postfix_expression): Likewise.
6809 (cp_parser_unary_expression): Likewise.
6810 (cp_parser_cast_expression): Likewise.
6811 (cp_parser_assignment_expression): Likewise.
6812 (cp_parser_expression): Likewise.
6813 (cp_parser_new_expression): Note that new-expressions are not
6814 allowed in integral constant expressions.
6815 (cp_parser_delete_expression): Likewise.
6817 2004-03-12 Matt Austern <austern@apple.com>
6819 * decl2.c (maybe_make_one_only): Look at
6820 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
6821 to make an explicit instantiation weak.
6822 * method.c (use_thunk): Make sure we call comdat_linkage
6824 * pt.c (do_type_instantiation): On systems where weak symbols
6825 don't go in a static archive's TOC, explicit instantiation of a
6826 class must imply *explicit* instantiation of its memeber.
6828 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
6830 * call.c, cp-tree.h, pt.c: Fix comment typos.
6832 2004-03-10 Mark Mitchell <mark@codesourcery.com>
6835 * decl.c (xref_tag): Disregard non-type declarations when
6836 looking up a tagged type.
6838 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
6841 * call.c (convert_like_real): Build a const qualified temporary,
6842 when testing ctor access.
6844 2004-03-09 Mark Mitchell <mark@codesourcery.com>
6846 * call.c (initialize_reference): Fix typo.
6848 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6851 * pt.c (determine_specialization): For member templates, match also
6855 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
6857 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
6859 2004-03-09 Mark Mitchell <mark@codesourcery.com>
6862 * call.c (initialize_reference): Handle initializers that are
6863 class-member access expressions applies to rvalues.
6865 2004-03-09 Mark Mitchell <mark@codesourcery.com>
6868 * name-lookup.c (supplement_binding): Ignore functions that are
6869 marked DECL_ANTICIPATED.
6871 2004-03-08 Mark Mitchell <mark@codesourcery.com>
6874 * class.c (check_field_decls): Complain about non-static data
6875 members of reference type in unions. Propagate
6876 CLASSTYPE_REF_FIELDS_NEED_INIT and
6877 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
6879 * init.c (perform_member_init): Complain about mbmers with const
6880 type that are not explicitly initialized.
6882 2004-03-08 Mark Mitchell <mark@codesourcery.com>
6884 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
6885 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
6886 (lang_identifier): Remove implicit_decl and error_locus.
6887 (IDENTIFIER_IMPLICIT_DECL): Remove.
6888 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
6889 (IDENTIFIER_ERROR_LOCUS): Likewise.
6890 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
6891 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
6892 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
6893 (implicitly_declare): Remove.
6894 * decl.c (warn_extern_redeclared_static): Remove check of
6895 IDENTIFIER_IMPLICIT_DECL.
6896 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
6897 (implicitly_declare): Remove.
6898 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
6899 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
6900 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
6901 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
6902 in the innermost scope, rather than at namespace scope.
6903 * name-lookup.c (push_local_binding): Give it external linkage.
6904 (pushdecl): Remove dead code.
6905 * name-lookup.h (push_local_binding): Declare it.
6906 * ptree.c (cxx_print_identifier): Don't print
6907 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
6908 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
6909 not IDENTIFIER_ERROR_LOCUS.
6910 * typeck.c (build_function_call): Remove dead code.
6912 2004-03-08 Jason Merrill <jason@redhat.com>
6915 * decl.c (xref_tag): Remove attribute handling.
6916 * cp-tree.h: Adjust prototype.
6917 * decl.c, parser.c, rtti.c: Adjust callers.
6918 * parser.c (cp_parser_class_head): Pass back attributes in the
6920 (cp_parser_class_specifier): Adjust.
6922 2004-03-08 Matt Austern <austern@apple.com>
6925 * name-lookup.c (add_decl_to_level): Add extern variables, as well
6926 as static, to static_decls array.
6928 2004-03-05 Jason Merrill <jason@redhat.com>
6930 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
6932 2004-03-04 Geoffrey Keating <geoffk@apple.com>
6934 * decl.c (grokfndecl): Update old incorrect comment.
6935 (grokvardecl): Diagnose C++ variables of type with no linkage.
6937 2004-03-01 Mark Mitchell <mark@codesourcery.com>
6940 * pt.c (build_non_dependent_expr): Do not create a
6941 NON_DEPENDENT_EXPR for a THROW_EXPR.
6943 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
6946 * error.c (dump_expr): Handle THROW_EXPR.
6948 2004-03-01 Mark Mitchell <mark@codesourcery.com>
6951 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
6952 lookup if ordinary name-lookup finds a non-function.
6953 * pt.c (tsubst_copy_and_build): Likewise.
6956 * parser.c (cp_parser_late_parsing_default_args): Check that there
6957 are no extra tokens after the end of the default-argument
6960 2004-03-01 Mark Mitchell <mark@codesourcery.com>
6963 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
6964 having C++ linkage for name-mangling purposes.
6967 * parser.c (cp_parser_direct_declarator): Recognize constructor
6968 declarators that use a template-id to name the class being
6972 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
6973 (tsubst_expr): Do not call tsubst_copy, even when
6974 processing_template_decl.
6976 2004-03-01 Jeff Law <law@redhat.com>
6978 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
6981 2004-02-29 Mark Mitchell <mark@codesourcery.com>
6984 * name-lookup.h (push_scope): Change prototype.
6985 * name-lookup.c (push_scope): Do not reenter the current class
6987 * decl.c (grokfndecl): Check return code from push_scope before
6989 * decl2.c (check_classfn): Likewise.
6990 * parser.c (cp_parser_conversion_function_id): Likewise.
6991 (cp_parser_init_declarator): Likewise.
6992 (cp_parser_direct_declarator): Likewise.
6993 (cp_parser_class_specifier): Likewise.
6994 (cp_parser_class_head): Likewise.
6995 (cp_parser_lookup_name): Likewise.
6996 (cp_parser_constructor_declarator_p): Likewise.
6997 * pt.c (instantiate_class_template): Likewise.
6998 (resolve_typename_type): Likewise.
7000 2004-02-29 Mark Mitchell <mark@codesourcery.com>
7003 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
7007 * class.c (update_vtable_entry_for_fn): Do not go through
7008 covariance machinery if the type returned by an overrider is the
7009 same as the original.
7011 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
7013 * call.c: Fix a comment typo.
7015 2004-02-27 Ziemowit Laski <zlaski@apple.com>
7017 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
7019 2004-02-26 Mark Mitchell <mark@codesourcery.com>
7022 * parser.c (cp_parser_parameter_declaration_list): Commit
7023 to fewer tentative parses.
7025 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7028 * pt.c (dependent_type_p_r): A template template parameter is a
7031 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7034 * mangle.c (write_template_arg_literal): Don't rely on identity for
7037 2004-02-24 Jason Merrill <jason@redhat.com>
7039 * tree.c (build_exception_variant): Use check_qualified_type.
7041 2004-02-23 Zack Weinberg <zack@codesourcery.com>
7042 Kazu Hirata <kazu@cs.umass.edu>
7044 * decl.c (cxx_init_decl_processing): Don't check
7045 flag_writable_strings.
7047 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
7050 * typeck.c (maybe_warn_about_returning_address_of_location):
7051 Change check for VAR_DECL to use DECL_P instead.
7053 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7056 * cvt.c (build_expr_type_conversion): Type must be complete before
7057 looking up for conversions.
7059 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7062 * name-lookup.c (arg_assoc_class): Don't look into template
7063 arguments if it is not a primary template.
7065 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
7068 * method.c (use_thunk): Always clone function argument tree.
7070 2004-02-20 Mark Mitchell <mark@codesourcery.com>
7073 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
7076 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
7077 for all type variants.
7079 2004-02-19 Mark Mitchell <mark@codesourcery.com>
7082 * decl.c (duplicate_decls): Return error_mark_node for invalid
7084 * name-lookup.c (push_namespace): Ignore the return value from
7086 * pt.c (push_template_decl_real): Robustify.
7089 * name-lookup.c (push_class_level_binding): Do not complain about
7090 adding a binding for a member whose name is the same as the
7091 enclosing class if the member is located in a base class of the
7094 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7097 * parser.c (cp_parser_new_expression): Parse an ill-formed
7098 direct-new-declarator after a parenthesized type-id to emit good
7101 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
7103 * cp-tree.def, cvt.c: Update copyright.
7105 2004-02-17 Mark Mitchell <mark@codesourcery.com>
7108 * cp-tree.h (abi_version_at_least): Remove.
7109 * mangle.c: Include flags.h.
7111 2004-02-15 Mark Mitchell <mark@codesourcery.com>
7114 * call.c (build_conditional_expr): Handle conversions between
7115 class types which result in differently cv-qualified type
7119 * class.c (delete_duplicate_fields_1): Remove.
7120 (delete_duplicate_fields): Likewise.
7121 (finish_struct_anon): Remove check for members with the same name
7122 as their enclosing class.
7123 (check_field_decls): Do not call duplicate_fields.
7124 * decl.c (grokdeclarator): Remove check for static data members
7125 with the same name as their enclosing class.
7126 * name-lookup.c (push_class_level_binding): Check for members with
7127 the same name as their enclosing class.
7129 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
7132 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
7134 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7137 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
7138 has full set of arguments.
7140 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7143 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
7145 2004-02-13 Mark Mitchell <mark@codesourcery.com>
7148 * cp-tree.h (delete_sanity): Change prototype.
7149 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
7150 Remove dead code. Adjust code to warn about deleting an array.
7151 * typekc.c (decay_conversion): Use build_address and build_nop.
7154 * search.c (accessible_p): Do not check access in thunks.
7157 * call.c (build_conditional_expr): Call force_rvalue on the
7158 non-void operand in the case that one result is a throw-expression
7159 and the other is not.
7161 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
7164 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
7165 the type name and look ahead for ::~, and bail out early with a
7166 better error message if the parse is going to fail.
7168 2004-02-12 Mark Mitchell <mark@codesourcery.com>
7170 * call.c (conversion_kind): New type.
7171 (conversion_rank): Likewise.
7172 (conversion): Likewise.
7173 (CONVERSION_RANK): New macro.
7174 (conversion_obstack): New variable.
7175 (obstack_initialized): Likewise.
7176 (z_candidate): Change type of convs and second_conv.
7177 (candidate_warning): New type.
7178 (IDENTITY_RANK): Remove.
7179 (EXACT_RANK): Likewise.
7180 (PROMO_RANK): Likewise.
7181 (STD_RANK): Likewise.
7182 (PBOOL_RANK): Likewise.
7183 (USER_RANK): Likewise.
7184 (ELLIPSIS_RANK): Likewise.
7185 (BAD_RANK): Likewise.
7186 (ICS_RANK): Likewise.
7187 (ICS_STD_RANK): Likewise.
7188 (ICS_USER_FLAG): Likewise.
7189 (ICS_ELLIPSIS_FLAG): Likewise.
7190 (ICS_THIS_FLAG): Likewise.
7191 (ICS_BAD_FLAG): Likewise.
7192 (NEED_TEMPORARY_P): Likewise.
7193 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
7194 (USER_CONV_CAND): Likewise.
7195 (USER_CONV_FN): Likewise.
7196 (conversion_obstack_alloc): New function.
7197 (alloc_conversion): Likewise.
7198 (validate_conversion_obstack): Likewise.
7199 (alloc_conversions): Likewise.
7200 (build_conv): Adjust to deal with new conversion data structures.
7201 (build_identity_conv): New function.
7202 (build_ambiguous_conv): Likewise.
7203 (standard_conversion): Adjust to deal with new conversion data
7205 (convert_class_to_reference): Likewise.
7206 (direct_reference_binding): Likewise.
7207 (reference_binding): Likewise.
7208 (implicit_conversion): Likewise.
7209 (add_candidate): Likewise.
7210 (add_function_candidate): Likewise.
7211 (add_conv_candidate): Likewise.
7212 (build_builtin_candidate): Likewise.
7213 (print_z_candidate): Likewise.
7214 (merge_conversion_sequences): Likewise.
7215 (build_user_type_conversion_1): Likewise.
7216 (build_user_type_conversion): Likewise.
7217 (build_new_function_call): Likewise.
7218 (build_object_call): Likewise.
7219 (conditional_conversion): Likewise.
7220 (build_conditional_expr): Likewise.
7221 (build_new_op): Likewise.
7222 (build_op_delete_call): Likewise.
7223 (convert_like_real): Likewise.
7224 (build_over_call): Likewise.
7225 (build_new_method_call): Likewise.
7226 (is_subseq): Likewise.
7227 (maybe_handle_implicit_object): Likewise.
7228 (maybe_handle_ref_bind): Likewise.
7229 (compare_ics): Likewise.
7230 (source_type): Likewise.
7231 (add_warning): Likewise.
7233 (can_convert_arg): Likewise.
7234 (can_convert_arg_bad): Likewise.
7235 (perform_implicit_conversion): Likewise.
7236 (perform_direct_initialization_if_possible): Likewise.
7237 (initialize_reference): Likewise.
7238 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
7239 * cp-tree.def (WRAPPER): Likewise.
7240 (IDENTITY_CONV): Remove.
7241 (LVALUE_CONV): Likewise.
7242 (QUAL_CONV): Likewise.
7243 (STD_CONV): Likewise.
7244 (PTR_CONV): Likewise.
7245 (PMEM_CONV): Likewise.
7246 (BASE_CONV): Likewise.
7247 (REF_BIND): Likewise.
7248 (USER_CONV): Likewise.
7249 (AMBIG_CONV): Likewise.
7250 (RVALUE_CONV): Likewise.
7251 * cp-tree.h (tree_wrapper): Remove.
7252 (WRAPPER_ZC): Remove.
7253 (lang_tree_node): Remove wrapper.
7254 (LOOKUP_SPECULATIVELY): Remove.
7255 (build_op_delete_call): Adjust prototype.
7256 (validate_conversion_obstack): Declare.
7257 (build_zc_wrapper): Remove.
7258 * cvt.c (convert_to_reference): Remove dead code.
7259 (ocp_convert): Likewise.
7260 * decl.c (redeclaration_error_message): Correct handling of
7262 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
7263 (cp_tree_node_structure): Remove WRAPPER case.
7264 * decl2.c (finish_file): Call validate_conversion_obstack.
7265 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
7266 (build_op_delete_call): Likewise.
7267 (build_x_delete): Likewise.
7268 (build_delete): Adjust call to build_op_delete_call.
7269 * pt.c (tsubst_friend_declaration): Adjust code to determine
7270 whether or not a friend template is a definition.
7271 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
7272 * tree.c (build_zc_wrapper): Remove.
7274 2004-02-12 Zack Weinberg <zack@codesourcery.com>
7276 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
7277 * cp-tree.h: Don't declare cxx_builtin_type_decls.
7278 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
7279 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
7281 2004-02-10 Mark Mitchell <mark@codesourcery.com>
7283 * typeck.c (lookup_destructor): Fix typo in error message.
7285 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
7287 * call.c, parser.c, tree.c: Fix comment typos.
7289 2004-02-07 Zack Weinberg <zack@codesourcery.com>
7292 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
7293 * decl.c (duplicate_decls, start_function): Likewise.
7295 2004-02-07 Zack Weinberg <zack@codesourcery.com>
7297 * name-lookup.c (pushdecl): Issue shadow warnings directly.
7298 * parser.c (free_parser_stacks): Delete.
7300 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
7302 * rtti.c: Update copyright.
7304 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7307 * decl.c (require_complete_types_for_parms): Do not insert
7308 error_mark_node in the parameter list.
7310 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7313 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
7314 error when terminator can not be found.
7316 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
7318 Make-lang.in (po-generated): Delete.
7320 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
7322 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
7323 targetm.calls.promote_prototypes.
7325 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
7329 2004-01-15 Geoffrey Keating <geoffk@apple.com>
7331 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
7332 (handle_pragma_implementation): Likewise.
7334 2004-02-05 Mark Mitchell <mark@codesourcery.com>
7337 * typeck.c (lookup_destructor): Tweak error message.
7339 2004-02-05 Jan Hubicka <jh@suse.cz>
7341 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
7344 2004-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7347 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
7348 code, only emits the diagnostic now. Added lookup of the identifier
7349 and support for qualified ids.
7350 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
7351 Parse an (invalid) type name as id-expression within a declarator.
7352 (cp_parser_simple_declaration): Use it.
7353 (cp_parser_member_declaration): Likewise.
7354 (cp_parser_make_typename_type): New function. Handle errors through
7355 cp_parser_diagnose_invalid_typename.
7356 (cp_parser_elaborated_type_specifier): Use it.
7358 2004-02-04 Mark Mitchell <mark@codesourcery.com>
7361 * call.c (convert_like_real): Use "converting" rather than
7362 "argument" as the descriptive keyword to
7363 dubious_conversion_warnings.
7364 * typeck.c (convert_for_assignment): Do not call
7365 dubious_conversion_warnings.
7367 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7370 * init.c (build_delete): Emit a more informative error message in
7371 case of an incomplete type, and on the correct source line.
7373 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
7375 * error.c, search.c: Update copyright.
7377 2004-02-04 Mark Mitchell <mark@codesourcery.com>
7380 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
7381 linkage for the typeinfo name string.
7383 2004-02-04 Mark Mitchell <mark@codesourcery.com>
7386 * cp-tree.h (fold_non_dependent_expr): New function.
7387 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
7388 (cp_parser_template_argument): Use fold_non_dependent_expr.
7389 (cp_parser_direct_declarator): Likewise.
7390 * pt.c (fold_non_dependent_expr): New function.
7391 (convert_nontype_argument): Use it.
7392 (tsubst_qualified_id): Simplify.
7393 (tsubst_copy_and_build): Likewise.
7395 2004-02-04 Mark Mitchell <mark@codesourcery.com>
7397 * decl.c (cxx_push_function_context): Do not set
7398 current_function_is_thunk.
7399 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
7402 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7405 * pt.c (more_specialized_class): Increase processing_template_decl
7406 while partial ordering.
7408 2004-02-03 Mark Mitchell <mark@codesourcery.com>
7411 * decl.c (start_function): Do not call pushdecl for any
7412 instantiation or specialization of a primary template.
7414 2004-02-03 Mark Mitchell <mark@codesourcery.com>
7417 * parser.c (cp_parser_class_name): Robustify.
7420 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
7423 * semantics.c (finish_id_expression): Do not return an
7424 IDENTIFIER_NODE when lookup finds a PARM_DECL.
7426 2004-02-03 Mark Mitchell <mark@codesourcery.com>
7429 * pt.c (build_non_dependent_expr): Do not build
7430 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
7433 * semantics.c (finish_id_expression): Do not return an
7434 IDENTIFIER_NODE when lookup finds a VAR_DECL.
7437 * parser.c (cp_parser_simple_declaration): When skipping to the
7438 end of the statement swallow the terminating semicolon.
7440 2004-02-02 Mark Mitchell <mark@codesourcery.com>
7443 * init.c (build_offset_ref): Improve error recovery for invalid
7444 uses of non-static member functions.
7447 * cp-tree.h (cp_build_type_attribute_variant): New function.
7448 * class.c (build_clone): Use cp_build_type_attribute_variant.
7449 * decl.c (duplicate_decls): Likewise.
7450 * pt.c (copy_default_args_to_explicit_spec): Likewise.
7451 (tsubst_function_type): Likewise.
7452 * tree.c (build_exception_variant): Check attributes before
7453 concluding that two types are the same.
7454 (cp_build_type-attribute_variant): New method.
7455 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
7458 * call.c (convert_class_to_reference): Keep better track of
7459 pedantically invalid user-defined conversions.
7461 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7464 * pt.c (tsubst_qualified_id): Improved error message when a type
7465 is expected but not found.
7467 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
7469 * class.c: Fix comment typos.
7471 * error.c: Likewise.
7472 * parser.c: Likewise.
7474 * search.c: Likewise.
7475 * typeck.c: Likewise.
7477 2004-01-30 Richard Henderson <rth@redhat.com>
7480 * method.c (use_thunk): Don't force_target_expr for void thunks.
7481 * tree.c (build_target_expr_with_type): Assert non-void type.
7482 (force_target_expr): Likewise.
7484 2004-01-30 Michael Matz <matz@suse.de>
7486 * parser.c (cp_parser_labeled_statement): Accept case ranges.
7488 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7492 * decl.c (grokdeclarator): Check immediatly type completeness for
7493 non-dependent types.
7495 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7498 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
7499 a sizeof expression.block
7501 2004-01-29 Mark Mitchell <mark@codesourcery.com>
7504 * mangle.c (write_encoding): Correct encoding of member template
7507 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7509 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
7510 template name as it was `<::' (digraph typo).
7511 (cp_parser_nth_token_starts_template_argument_list_p): New function.
7512 (cp_parser_id_expression): Use it.
7513 (cp_parser_nested_name_specifier_opt): Likewise.
7514 (cp_parser_template_name): Likewise.
7515 (cp_parser_class_name): Likewise.
7516 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
7518 2004-01-28 Mark Mitchell <mark@codesourcery.com>
7521 * typeck.c (merge_types): Do not merge attributes into
7525 * parser.c (cp_parser_direct_declarator): Do not prevent
7526 backtracking inside a parenthesized declarator.
7527 (cp_parser_parameter_declaration): Fix typo in comment.
7529 2004-01-28 Jan Hubicka <jh@suse.cz>
7531 * semantics.c (expand_body) Do emit_associated_thunks before
7534 2004-01-27 Devang Patel <dpatel@apple.com>
7536 * name-lookup.c: Include "debug.h"
7537 (do_namespace_alias): Invoke debug_hooks to emit debug info
7538 for namespace alias.
7539 (do_local_using_decl): Invoke debug_hooks to emit debug info
7541 (do_class_using_decl): Same.
7542 (do_toplevel_using_decl): Same.
7543 (do_using_directive): Same.
7544 (cp_emit_debug_info_for_using): New function.
7545 * Make-lang.in (cp/parser.o): Depend on debug.h
7546 (cp/name-lookup.o): Same.
7548 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7550 * cp-tree.h (language_function, lang_type_header): Use
7552 * name-lookup.h (cp_binding_level): Likewise.
7554 2004-01-26 Mark Mitchell <mark@codesourcery.com>
7557 * semantics.c (finish_for_expr): Check for unresolved overloaded
7560 * class.c (add_method): Just check processing_template_decl to
7561 determine whether or not we are within a template.
7562 * decl2.c (maybe_retrofit_in_chrg): Likewise.
7563 * init.c (decl_constant_value): Check the type of the declaration,
7565 * name-lookup.c (maybe_push_to_top_level): Rename to ...
7566 (push_to_top_level): ... this.
7567 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
7568 * pt.c (push_template_decl_real): Reorder condition for speed.
7569 (convert_template_argument): Use dependency-checking functions in
7570 place of uses_template_parms.
7571 (lookup_template_class): Avoid calling uses_template_parms more
7573 (uses_template_parms): Reimplement, using dependency-checking
7575 (instantiate_class_template): Use push_to_top_level, not
7576 maybe_push_to_top_level.
7577 (type_unification_real): Simplify.
7578 (type_dependent_expression_p): Handle OFFSET_REFs and
7580 (any_dependent_template_arguments_p): Handle multiple levels of
7582 * semantics.c (expand_or_defer_fn): Do not check
7583 uses_template_parms for template instantiations.
7584 * typeck.c (comptypes): Avoid calling cp_type_quals.
7586 2004-01-25 Mark Mitchell <mark@codesourcery.com>
7589 * call.c (build_over_call): Do not convert arguments when
7590 processing a template.
7591 * pt.c (build_non_dependent_expr): Do not build a
7592 NON_DEPENDENT_EXPR for arithmetic constants.
7594 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7597 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
7598 returns a TYPE_DECL. no further lookup is required.
7599 * semantics.c (check_template_template_default_arg): A TYPE_DECL
7600 is invalid. Rework to give better diagnostics.
7602 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7605 * pt.c (instantiate_class_template): Add an error_mark_node
7607 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
7609 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
7612 * decl.c (finish_function): Move the call to
7613 finish_fname_decls below the call to
7614 finish_eh_spec_block.
7616 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
7618 * optimize.c, typeck2.c: Update copyright.
7620 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
7622 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
7623 init.c, mangle.c, typeck.c: Update copyright.
7625 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
7627 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
7629 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
7631 * Make-lang.in: Replace $(docdir) with doc.
7632 (c++.info, c++.srcinfo): Dummy entry.
7633 (c++.man, c++.srcman): New rules.
7634 (c++.install-man): Revamp rule.
7636 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
7638 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
7639 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
7640 immediate $(shell) instead of deferred backquote.
7642 2004-01-19 Mark Mitchell <mark@codesourcery.com>
7645 * parser.c (cp_parser_postfix_expression): When encountering
7646 incomplete type on left-hand side of "->" or ".", treat the entire
7647 expression as erroneous.
7650 * call.c (build_field_call): Remove.
7651 (n_build_method_call): Likewise.
7652 (build_method_call): Likewise.
7653 (build_new_method_call): Do not call build_field_call.
7654 * class.c (n_build_method_call): Remove.
7655 (print_class_statistics): Do not print it.
7656 * cp-tree.h (build_method_call): Remove declaration.
7657 (finish_object_call_expr): Likewise.
7658 (build_new_1): Do not use build_method_call.
7659 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
7660 when the function appearing on the right-hand-side of "." or "->"
7661 is not actually a function.
7662 * pt.c (tsubst_copy_and_build): Likewise.
7663 * semantics.c (finish_object_call_expr): Remove.
7665 2004-01-18 Mark Mitchell <mark@codesourcery.com>
7668 * pt.c (tsubst): Use finish_typeof.
7670 2004-01-18 Jason Merrill <jason@redhat.com>
7673 * except.c (build_throw): In a template, set
7674 current_function_returns_abnormally.
7676 2004-01-17 Fred Fish <fnf@intrinsity.com>
7679 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
7680 except don't call array_type_nelts() with a VECTOR_TYPE.
7682 2004-01-16 Jan Hubicka <jh@suse.cz>
7684 * mangle.c (write_mangled_name): Remove inline modifier.
7686 2004-01-16 Mark Mitchell <mark@codesourcery.com>
7689 * decl.c (compute_array_index_type): Fix grammar in comment.
7690 * init.c (build_zero_init): Handle zero-sized arrays correctly.
7693 * call.c (name_as_c_string): Print conversion operator names
7697 * call.c (initialize_reference): Pass -1 for inner parameter to
7700 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7703 * parser.c (cp_parser_base_specifier): Check for an invalid
7704 keyword `typename' and emit an user-friendly error message.
7706 2004-01-15 Geoffrey Keating <geoffk@apple.com>
7709 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
7710 (handle_pragma_implementation): Likewise.
7712 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7715 * typeck.c (build_class_member_access_expr): Allow to access members
7716 of the currently open class.
7717 (finish_class_member_access_expr): Likewise.
7719 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
7722 * name-lookup.c (validate_nonmember_using_decl): Take scope and
7723 name by value, instead of computing them.
7724 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
7725 arguments. Pass them to validate_nonmember_using_decl.
7726 * name-lookup.h (do_local_using_decl): Adjust.
7727 (do_toplevel_using_decl): Likewise.
7728 * parser.c (cp_parser_using_declaration): Likewise.
7729 * pt.c (tsubst_expr): Likewise.
7731 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
7735 * name-lookup.c (qualified_lookup_using_namespace): Search
7736 strongly-associated namespaces first, and only then try other
7739 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
7741 * Make-lang.in (c++.srcextra): Dummy entry.
7743 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7746 * parser.c (cp_parser_template_name): Don't try to parse a
7747 conversion-function-id, as it cannot be a template-name.
7748 (cp_parser_simple_type_specifier): Check for invalid template-ids
7749 even after a built-in type.
7751 2004-01-14 Jan Hubicka <jh@suse.cz>
7754 * pt.c (instantiate_decl): Do not increase function_depth.
7756 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
7760 * parser.c (cp_parser_elaborated_type_specifier): Warn about
7761 attributes and discard.
7762 * decl.c (xref_tag): Don't overwite existing attributes with
7765 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7768 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
7769 is no destructor while looking up a BIT_NOT_EXPR.
7771 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
7773 * cxxfilt.c: Remove unused file.
7775 2004-01-14 Jan Hubicka <jh@suse.cz>
7777 Partial fix to PR c++/12850
7778 * decl2.c (mark_used): Do not proactively instantiate templates
7779 when compiling in unit-at-a-time or not optimizing.
7780 * optimize.c (maybe_clone_body): Do not increase function depth.
7782 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7785 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
7787 2004-01-12 Steven Bosscher <stevenb@suse.de>
7790 * parser.c (cp_parser_member_declaration): Any non-type is also
7791 not a class or a function.
7793 2004-01-12 Jason Merrill <jason@redhat.com>
7796 * class.c (build_base_path): Do not mark vtable references as
7798 (build_vtbl_ref_1): Likewise.
7800 2004-01-12 Richard Henderson <rth@redhat.com>
7803 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
7804 (store_init_value): Use it.
7805 * decl.c (check_initializer): Expect full initialization code
7806 from store_init_value.
7807 * init.c (expand_aggr_init_1): Likewise.
7808 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
7810 2004-01-12 Mark Mitchell <mark@codesourcery.com>
7812 * class.c (layout_class_type): For non-POD class types, also copy
7813 the DECL_SIZE and DECL_MODE of fields to the base class type.
7815 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7818 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
7819 calling regenerate_decl_from_template.
7821 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
7824 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
7825 decl-specifier occurring along with a class definition.
7827 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
7829 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
7830 clauses to comments describing declares_class_or_enum.
7831 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
7834 2004-01-12 Jan Hubicka <jh@suse.cz>
7836 * pt.c (for_each_template_parm): Do not check for duplicates.
7837 (for_each_template_parm): Use walk_tree duplicate checking code.
7839 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
7842 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
7843 is error_mark_node, don't add any more decl_specs.
7844 (cp_parser_init_declarator): After committing to a declaration, if
7845 the decl_specifiers start with error_mark_node, issue an error and
7846 change the type to "int".
7848 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
7851 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
7853 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7857 * pt.c (tsubst): Substitution must fail if we are attempting to
7858 create an array with element type that is an abstract class type.
7859 * decl.c (cp_finish_decl): Strip pointers and array types recursively
7860 before calling abstract_virtuals_error.
7862 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
7864 * name-lookup.c (qualified_lookup_using_namespace): Consider
7865 strong using directives even if we've already found a binding.
7867 2004-01-09 Mark Mitchell <mark@codesourcery.com>
7869 * cp-tree.h (cxx_expand_expr): Change prototype.
7870 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
7872 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7875 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
7876 looking into them recursively. They can be there because of the
7877 new __offsetof__ extension.
7879 2004-01-07 Zack Weinberg <zack@codesourcery.com>
7881 * parser.c (cp_parser_save_member_function_body): Mark the
7884 2004-01-05 Mark Mitchell <mark@codesourcery.com>
7887 * class.c (build_clone): Copy type attributes from the original
7888 function to the clone.
7891 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
7892 references as constant.
7895 * parser.c (cp_parser_explicit_instantiation): Improve error
7897 (cp_parser_require): Improve indication of the error location.
7900 * parser.c (cp_parser_class_head): Reorder logic to check for
7901 invalid qualification.
7903 2004-01-04 Mark Mitchell <mark@codesourcery.com>
7906 * name-lookup.c (lookup_using_namespace): Remove spacesp
7908 (unqualified_namespace_lookup): Likewise.
7909 (lookup_qualified_name): Adjust accordingly.
7910 (lookup_name_real): Likewise.
7911 (lookup_arg_dependent): Do not eliminate the namespace of the
7912 functions found by unqualified name lookup unless that is the
7915 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
7917 * semantics.c (push_deferring_access_checks): Fix format.
7918 (resume_deferring_access_checks): Likewise.
7919 (stop_deferring_access_checks): Likewise.
7920 (pop_deferring_access_checks): Likewise.
7921 (get_deferred_access_checks): Likewise.
7922 (pop_to_parent_deferring_access_checks): Likewise.
7923 (perform_deferred_access_checks): Likewise.
7924 (perform_or_defer_access_check): Likewise.
7926 2004-01-04 Richard Henderson <rth@redhat.com>
7928 * call.c (build_over_call): Don't create a save_expr of an
7929 aggregate, but rather its address.
7931 2004-01-04 Mark Mitchell <mark@codesourcery.com>
7934 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
7935 an offsetof expression.
7937 * parser.c (cp_parser_parameter_declaration): Fix comment.
7940 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
7941 (reference_binding): Set it when appropriate.
7942 (build_temp): New function, split out from ...
7943 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
7944 (initialize_reference): Likewise.
7947 * parser.c (cp_parser): Add in_type_id_in_expr_p.
7948 (cp_parser_new): Initialize it.
7949 (cp_parser_postfix_expression): Set it.
7950 (cp_parser_sizeof_operand): Likewise.
7951 (cp_parser_parameteR_declaration): Do not commit early to tenative
7952 parsers when in_type_id_in_expr_p is set.
7954 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7957 * parser.c (cp_parser_template_argument): Don't call
7958 make_unbound_class_template directly.
7959 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
7960 UNBOUND_CLASS_TEMPLATE tree node.
7962 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
7965 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
7967 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7970 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
7971 (DECL_FUNCTION_TEMPLATE_P): Use it.
7972 (DECL_CLASS_TEMPLATE_P): Likewise.
7973 * parser.c (cp_parser_lookup_name): Add is_template parameter.
7974 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
7975 (cp_parser_template_name): Likewise.
7976 (cp_parser_elaborated_type_specifier): Likewise.
7977 (cp_parser_namespace_name): Likewise.
7978 (cp_parser_class_name): Likewise.
7979 (cp_parser_lookup_name_simple): Likewise.
7981 See ChangeLog.3 for earlier changes.