1 2005-01-26 J"orn Rennecke <joern.rennecke@st.com>
3 * parse.c (cp_parser_initializer_clause): Initialize *non_constant_p.
5 2005-01-25 Andrew Pinski <pinskia@physics.uc.edu>
7 * class.c (abort_fndecl_addr): New variable.
8 (build_vtbl_initializer): If we have a pure virtual function
9 share the abort function's address.
10 Include gt-cp-class.h at the end.
11 * config-lang.in (gtfiles): Add cp/class.c.
13 2005-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
15 * cxx-pretty-print.c (pp_cxx_statement): Add prototype. Make static.
16 (pp_cxx_function_definition): Make static.
17 * cxx-pretty-print.h (pp_cxx_statement): Remove prototype.
18 (pp_cxx_function_definition): Likewise.
20 2005-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
22 * name-lookup.c (print_binding_level): Make static.
23 (constructor_name_full): Make static inline.
24 (current_decl_namespace): Make static.
25 * name-lookup.h (constructor_name_full): Remove prototype.
26 (print_binding_level): Likewise.
27 (current_decl_namespace): Likewise.
29 2005-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
31 * decl.h (debug_bindings_indentation): Remove.
33 2005-01-23 Kazu Hirata <kazu@cs.umass.edu>
35 * typeck.c: Fix a comment typo.
37 2005-01-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
40 * pt.c (fold_decl_constant_value): Always call fold_non_dependent_expr
42 (tsubst): Use fold_decl_constant_value in place of a bare call to
43 integral_constant_value.
45 2005-01-20 Kazu Hirata <kazu@cs.umass.edu>
47 * typeck.c (more_qualified_p): Remove.
48 * cp-tree.h: Remove the corresponding prototype.
50 2005-01-19 Matt Austern <austern@apple.com>
52 * typeck.c (comptypes): Handle return code from objc_comptypes
55 2005-01-19 Kazu Hirata <kazu@cs.umass.edu>
57 * cp-tree.h, name-lookup.h: Remove unused prototypes.
59 2005-01-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
62 * semantics.c (finish_id_expression): Disable access checking for
63 already lookuped FIELD_DECL.
65 2005-01-18 Kazu Hirata <kazu@cs.umass.edu>
67 * decl.c (delete_block): Remove.
68 * cp-tree.h: Remove the corresponding prototype.
70 * decl.c (vtable_decl_p, vtype_decl_p, walk_globals_data,
71 walk_vtables_r, walk_vtables, walk_globals_r, walk_globals):
73 * cp-tree.h: Remove the corresponding prototypes.
75 * tree.c (count_functions, bound_pmf_p, cp_is_overload_p,
76 cp_update_decl_after_saving, name_p): Remove.
77 * cp-tree.h: Remove the corresponding prototypes.
79 2005-01-18 Andrew Pinski <pinskia@physics.uc.edu>
82 * semantics.c (finish_asm_stmt): Strip nops off
83 input memory operands.
85 2005-01-18 Kazu Hirata <kazu@cs.umass.edu>
87 * Make-lang.in, call.c, cvt.c, init.c, rtti.c, tree.c,
88 typeck2.c: Update copyright.
90 2005-01-16 Kazu Hirata <kazu@cs.umass.edu>
92 * class.c (get_enclosing_class): Remove.
93 * cp-tree.h: Remove the corresponding prototypes.
95 * cvt.c (convert_lvalue): Remove.
96 * cp-tree.h: Remove the corresponding prototype.
98 * pt.c (tinst_for_decl): Remove.
99 * cp-tree.h: Remove the corresponding prototypes.
101 * tree.c (hash_chainon): Remove.
102 * cp-tree.h: Remove the corresponding prototypes.
104 2005-01-15 Jakub Jelinek <jakub@redhat.com>
107 * typeck2.c (split_nonconstant_init_1) <case VECTOR_TYPE>: Put a copy
108 of CONSTRUCTOR's node into MODIFY_EXPR, as the original is modified.
110 2005-01-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
112 * Make-lang.in (cp-warn): Don't append $(WERROR).
114 2005-01-10 Kazu Hirata <kazu@cs.umass.edu>
116 * cp-tree.h: Fix a comment typo.
118 2005-01-07 Nathan Sidwell <nathan@codesourcery.com>
121 * pt.c (tsubst_qualified_id): Call convert_from_reference.
123 2005-01-06 Mark Mitchell <mark@codesourcery.com>
126 * class.c (add_implicitly_declared_members): Remove dead code.
127 * decl.c (grokfndecl): Add sfk parameter. Use it do set
129 (grokdeclarator): Adjust calls to grokfndecl.
130 * method.c (implicitly_declare_fn): Improve documentation.
131 * parser.c (cp_parser_direct_declarator): Do not consider a
132 function to be a constructor if the containing class was
133 originally anonymous.
135 2005-01-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
138 * search.c (lookup_field_1): Handle using declaration in
139 class template partial specialization.
141 2005-01-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
144 * pt.c (push_access_scope): Handle friend defined in class.
145 (pop_access_scope): Likewise.
147 2005-01-06 Nathan Sidwell <nathan@codesourcery.com>
150 * pt.c (tsubst_copy) <ARRAY_REF case>: Handle separately.
151 (tsubst_copy_and_build) <ARRAY_REF case>: Remove obsolete
152 array-new handling code. Use build_x_binary_op.
154 2005-01-05 Nathan Sidwell <nathan@codesourcery.com>
157 * cp-tree.h (start_decl): Take pointer to pushed scope, not bool.
158 * name-lookup.h (push_scope): Return pushed scope, not flag.
159 * name-lookup.c (push_scope): Return scope that should be popped,
161 * decl.c (start_decl): Adjust.
162 (grokfndecl): Adjust scope push and pop.
163 * decl2.c (check_classfn): Likewise.
164 * parser.c (cp_parser_condition, cp_parser_conversion_function_id,
165 cp_parser_init_declarator, cp_parser_direct_declarator,
166 cp_parser_class_specifier, cp_parser_class_head,
167 cp_parser_lookup_name,
168 cp_parser_constructor_declarator_p): Likewise.
169 * pt.c (instantiate_class_template,
170 resolve_typename_type): Likewise.
172 2005-01-03 Volker Reichelt <reichelt@igpm.rwth-aaachen.de>
175 * parser.c (cp_parser_unqualified_id): Do not issue error message
176 for typedef-name as destructor declarator when performing an
177 uncommitted tentative parse.
179 2005-01-01 Steven Bosscher <stevenb@suse.de>
182 * decl.c (finish_function): Fix comment. Annotate the compiler
183 generated return with the current file name and line 0.
185 2004-12-31 Richard Henderson <rth@redhat.com>
188 * call.c (make_temporary_var_for_ref_to_temp): Set DECL_IGNORED_P.
189 * class.c (build_vtable): Don't conditionallize setting it
190 based on DWARF2_DEBUG.
191 (layout_class_type): Set DECL_IGNORED_P.
192 * decl2.c (get_guard): Likewise.
193 * rtti.c (get_tinfo_decl, build_lang_decl): Likewise.
194 * tree.c (build_local_temp): Likewise.
196 2004-12-30 Mark Mitchell <mark@codesourcery.com>
198 * cp-tree.h (cp_declarator): Split "name" field into
199 qualifying_scope and unqualified_name.
200 * decl.c (get_scope_of_declarator): Adjust accordingly.
201 (grokdeclarator): Likewise.
202 * decl2.c (grokfield): Likewise, and adjust call to
204 * name-lookup.c (do_class_using_decl): Split "decl" into
205 "scope" and "name". Remove unnecessary code.
206 * name-lookup.h (do_class_using_decl): Adjust declaration.
207 * parser.c (make_id_declarator): Split "id" into qualifying_scope
208 and unqualified_name.
209 (cp_parser_using_declaration): Adjust call to do_class_using_decl.
210 (cp_parser_direct_declarator): Adjust to handle the fact that
211 cp_parser_declarator_id no longer returns a SCOPE_REF.
212 (cp_parser_direct_declarator): Likewise.
213 (cp_parser_declarator_id): Do not create a SCOPE_REF for qualified
215 (cp_parser_member_declaration): Adjust call to make_id_declarator.
216 (cp_parser_check_declarator_template_parameters): Do not expect a
219 * decl.c (duplicate_decls): Call ggc_free on declarations we will
220 not be needing any longer.
223 * cvt.c (convert_to_void): Do not use STRIP_NOPs.
225 2004-12-28 Richard Henderson <rth@redhat.com>
228 * semantics.c (finish_asm_stmt): Resolve asm names. Validate input
229 constraints. Mark memory inputs addressable.
231 2004-12-27 Jason Merrill <jason@redhat.com>
233 * decl.c (expand_static_init): Don't use shortcut if
234 targetm.relaxed_ordering.
236 2004-12-27 Mark Mitchell <mark@codesourcery.com>
239 * decl.c (check_tag_decl): Robustify.
241 2004-12-23 Mark Mitchell <mark@codesourcery.com>
244 * parser.c (cp_parser_error): Issue better messages about
245 #pragma in locations where it is not permitted.
248 * pt.c (check_instantiated_args): Remove bogus SFINAE code.
250 * cvt.c (convert_to_void): Fix typo in comment.
252 2004-12-23 Alexandre Oliva <aoliva@redhat.com>
255 * pt.c (check_explicit_specialization): Use the argument list from
256 the definition in a template function specialization definition.
258 2004-12-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
261 * pt.c (check_explicit_specialization): Use special logic to validate
262 befriended specializations.
264 2004-12-22 Mark Mitchell <mark@codesourcery.com>
266 * rtti.c (emit_support_tinfos): Avoid using C99 semantics.
269 * call.c (build_this): In templates, do not bother with
271 * typeck.c (unary_complex_lvalue): In a template, always refuse
275 * cp-gimplify.c (cp_genericize): Relax assertion.
278 * cvt.c (convert_to_void): Warn about unused values.
281 * rtti.c (emit_support_tinfos): On systems without weak symbols,
282 emit the runtime library type-info objects as non-COMDAT.
284 2004-12-21 Mark Mitchell <mark@codesourcery.com>
287 * call.c (convert_like_real): Do not permit the use of a copy
288 constructor to copy a packed field.
291 * decl.c (grokdeclarator): Return error_mark_node, not
292 void_type_node, to indicate errors.
293 * parser.c (cp_parser_template_parameter_list): Robustify.
294 (cp_parser_template_parameter): Likewise.
297 * tree.c (cp_tree_equal): Handle OVERLOAD.
299 2004-12-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
301 * decl.c (define_label): Use POP_TIMEVAR_AND_RETURN.
302 * name-lookup.c (pushdecl_class_level): Likewise.
304 2004-12-21 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
306 * name-lookup.c (pushtag): Add missing POP_TIMEVAR_AND_RETURN.
308 2004-12-21 Andrew Pinski <pinskia@physics.uc.edu>
311 * cp-gimplify.c (cp_genericize_r): Don't insert first but instead
312 check to see if contains the pointer. Insert the statement before
315 2004-12-21 Nathan Sidwell <nathan@codesourcery.com>
318 * decl.c (check_initializer): Check string initializer of array is
320 * cp-tree.h (PAREN_STRING_LITERAL_P): New.
321 * semantics.c (finish_parenthesized_expr): Mark a STRING_CST.
322 * error.c (dump_expr): <STRING_CST case> Add parens, if needed.
324 * cp-tree.def (TEMPLATE_TYPE_PARM,
325 BOUND_TEMPLATE_TEMPLATE_PARM, TYPE_OF_TYPE, TYPENAME_TYPE): Reorder
326 for better code efficiency.
327 * cp-tree.h (CLASS_TYPE_P): Short circuit IS_AGGR_TYPE check.
328 (CAN_HAVE_FULL_LANG_DECL_P): Reorder for better optimization.
329 (INTEGRAL_CODE_P, CP_INTEGRAL_TYPE_P,
330 INTEGRAL_OR_ENUMERATION_TYPE_P, SCALAR_TYPE_P,
331 CP_AGGREGATE_TYPE_P, TYPE_PTROB_P, TYPE_REF_OBJ_P,
332 TYPE_PTROBV_P): Likewise.
335 * method.c (do_build_copy_constructor): Refactor. Don't const
336 qualify a mutable field.
337 (do_build_assign_ref): Likewise.
339 2004-12-20 Matt Austern <austern@apple.com>
342 * decl.c (make_rtl_for_nonlocal_decl): Use
343 set_builtin_user_assembler_name.
345 2004-12-19 Mark Mitchell <mark@codesourcery.com>
347 * cp-tree.h (note_decl_for_pch): New function.
348 * class.c (build_clone): Call note_decl_for_pch.
349 * semantics.c (finish_member_declaration): Likewise.
350 (note_decl_for_pch): New function.
352 2004-12-17 Steven Bosscher <stevenb@suse.de>
354 * init.c (build_zero_init): max_index is the number of
357 2004-12-17 Nathan Sidwell <nathan@codesourcery.com>
360 * class.c (add_method): Do not push conversion operators into a
363 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE_TYPE): Reformat.
364 * error.c (dump_decl): <TYPE_DECL case> Remove extraneous braces.
366 2004-12-16 Nathan Sidwell <nathan@codesourcery.com>
369 * cp-tree.h (integral_constant_value): Declare.
370 * call.c (null_ptr_cst_p): Use integral_constant_value, not
372 (convert_like_real): Likewise.
373 * class.c (check_bitfield_decl): Likewise.
374 * cvt.c (ocp_convert): Likewise.
375 (convert): Remove unnecessary decl_constant_value call.
376 * decl.c (compute_array_index_type): Use integral_constant_value,
377 not decl_constant_value.
378 (build_enumerator): Likewise.
379 * decl2.c (grokfield): Likewise.
380 * init.c (decl_constant_value): Simplify.
381 (integral_constant_value): New.
382 * pt.c (fold_decl_constant_value): Use integral_constant_value,
383 remove subsequent check.
384 (tsubst): Use integral_constant_value, not decl_constant_value.
385 (tsubst_copy, unify): Likewise.
386 * typeck.c (decay_conversion): Likewise.
387 (build_compound_expr): Remove unnecessary decl_constant_value
389 (build_static_cast_1, build_reinterpret_cast_1):
390 (convert_for_assignment): Remove comment about not calling
393 2004-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
396 * pt.c (instantiate_class_template): Set input_location for
398 (tsubst_friend_function): Don't set input_location here.
399 Make sure the context is complete if necessary.
401 2004-12-15 Nathan Sidwell <nathan@codesourcery.com>
404 * parser.c (cp_parser_lookup_name): Remove unneeded TYPENAME_TYPE
407 2004-12-14 Mark Mitchell <mark@codesourcery.com>
410 * decl.c (make_typename_type): Do not handle namespace-scoped
412 (tag_name): Handle typename_type.
413 (check_elaborated_type_specifier): Handle typenames.
414 * parser.c (cp_parser_diagnose_invalid_type_name): Improve
416 (cp_parser_elaborated_type_specifier): Use
417 cp_parser_diagnose_invalid_type_name.
419 2004-12-14 Andrew Pinski <pinskia@physics.uc.edu>
422 * init.c (build_zero_init): If the max_index is 0, there is no
423 need to create a RANGE_EXPR.
425 2004-12-14 Mark Mitchell <mark@codesourcery.com>
428 * cp-objcp-common.c (cp_expr_size): Loosen assertion.
430 2004-12-14 Nathan Sidwell <nathan@codesourcery.com>
433 * pt.c (tsubst_copy_and_build): <INDIRECT_REF case> Check that a
434 REFERENCE_REF_P is dereferencing a reference type.
435 * typeck.c (build_static_cast): Convert from reference even in a
437 (build_reinterpret_cast, build_const_cast, build_c_cast): Likewise.
439 2004-12-14 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
441 * parser.c (cp_parser_uncommitted_to_tentative_parse_p): New function.
442 (cp_parser_name_lookup_error): Use it.
443 (cp_parser_check_for_invalid_template_id): Likewise.
444 (cp_parser_skip_to_closing_parenthesis): Likewise.
445 (cp_parser_nested_name_specifier_opt): Likewise.
446 (cp_parser_simple_declaration, cp_parser_template_id): Likewise.
447 (cp_parser_parameter_declaration_list): Likewise.
448 (cp_parser_parameter_declaration): Likewise.
449 (cp_parser_template_name): Let cp_parser_simulate_error perform
451 (cp_parser_committed_to_tentative_parse): Remove.
453 2004-12-13 Andrew Pinski <pinskia@physics.uc.edu>
456 * class.c (build_base_path): Convert the zero constant to the correct
459 2004-12-13 Mark Mitchell <mark@codesourcery.com>
462 * class.c (layout_class_type): Determine the visibility of static
465 2004-12-12 Roger Sayle <roger@eyesopen.com>
468 * cp-gimplify.c (gimplify_if_stmt): Optimize the case where the
469 condition is a constant and the unexecuted clause is empty.
471 2004-12-10 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
474 * parser.c (cp_parser_class_head): Reject typedef-name in class head.
476 2004-12-09 Matt Austern <austern@apple.com>
479 * name-lookup.c (do_nonmember_using_decl): A real function
480 declaration takes precedence over an anticipated declaration.
482 2004-12-09 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
484 * parser.c (cp_parser_member_declaration): Fix comment typo.
486 2004-12-09 Alexandre Oliva <aoliva@redhat.com>
489 * parser.c (cp_parser_template_id): Don't create a CPP_TEMPLATE_ID
492 2004-12-09 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
495 * typeck.c (build_reinterpret_cast_1): Allow cast from vector type.
497 2004-12-09 Nathan Sidwell <nathan@codesourcery.com>
500 * init.c (build_zero_init): Build a RANGE_EXPR for an array
503 2004-12-08 Kelley Cook <kcook@gcc.gnu.org>
505 * typeck.c: Remove DOS line endings.
507 2004-12-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
510 * decl.c (lookup_and_check_tag): Diagnose nested class with
511 the same name as enclosing class.
513 2004-12-08 Nathan Sidwell <nathan@codesourcery.com>
516 * cp-tree.h (REFERENCE_REF_P): New.
517 (CPTI_TYPE_INFO_TYPE): Rename to ...
518 (CPTI_CONST_TYPE_INFO_TYPE): ... here.
519 (CPTI_TYPE_INFO_REF_TYPE): Remove.
520 (type_info_type_node): Rename to ...
521 (const_type_info_type_node): ... here.
522 (type_info_ref_type): Remove.
523 * call.c (build_user_type_conversion): Reformat.
524 (resolve_args): Do not convert_from_reference.
525 (build_object_call): Call convert_from_reference.
526 (prep_operand): Do not convert_from_reference.
527 (build_new_method_call): Likewise.
528 * class.c (build_vfield_ref): Likewise.
529 * cvt.c (convert_to_reference): Likewise.
530 (convert_from_reference): Build INDIRECT_REF here, not with
532 (convert_force): Do not convert_from_reference.
533 (build_expr_type_conversion): Likewise.
534 * decl.c (grok_reference_init): Likewise.
535 * decl2.c (delete_sanity): Likewise.
536 * except.c (initialize_handler_parm): Use POINTER_TYPE_P.
537 * init.c (build_dtor_call): Do not convert_from_reference.
538 * parser.c (cp_parser_template_argument): Unwrap indirected
539 reference. Allow TEMPLATE_PARM_INDEX as an object parm.
540 * pt.c (tsubst_copy_and_build) <case INDIRECT_REF>: Use
541 convert_from_reference, if indicated.
542 <case CALL_EXPR>: Do not convert_from_reference.
543 <case PARM_DECL, VAR_DECL>: Convert_from_reference if needed.
544 (tsubst_initializer_list): Do not convert_from_reference.
545 * rtti.c (init_rtti_processing): Adjust node creation.
546 (throw_bad_typeid): Use const_type_info_type_node.
547 Do not convert_from_reference.
548 (typeid_ok_p): Use const_type_info_type_node.
549 (build_typeid, get_typeid): Always return type_info typed node.
550 (build_dynamic_cast_1): Dont convert_from_reference. Refactor.
551 * semantics.c (finish_stmt_expr_expr): Do not
552 convert_from_reference.
553 (finish_id_expression): Convert_from_reference as appropriate.
554 * typeck.c (decay_conversion): Do not convert_from_reference.
555 (finish_class_member_access_expr): Likewise.
556 (build_indirect_ref): Use POINTER_TYPE_P.
557 (convert_arguments): Do not convert_from_reference.
558 (build_modify_expr): Likewise.
559 (convert_for_initialization): Likewise.
560 * typeck2.c (build_x_arrow): Likewise.
562 2004-12-07 Ziemowit Laski <zlaski@apple.com>
564 * cp-tree.h (struct lang_type_class): Rename 'objc_protocols'
565 field to 'objc_info'.
567 2004-12-07 Kazu Hirata <kazu@cs.umass.edu>
569 * pt.c: Replace a use of first_rtl_op with TREE_CODE_LENGTH.
571 2004-12-07 Roger Sayle <roger@eyesopen.com>
573 * name-lookup.c (leave_scope): We only need to update
574 class_binding_level when leaving a class scope.
576 2004-12-06 Ziemowit Laski <zlaski@apple.com>
578 * cp-tree.h (struct lang_type_class): Add 'objc_protocols' field.
580 2004-12-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
582 PR c++/17011, c++/17971
583 * pt.c (tsubst_copy) <FIELD_DECL case>: Check and diagnose
585 (tsubst_copy_and_build) <COMPONENT_REF case>: Check
586 error_mark_node after member substitution.
587 * semantics.c (finish_id_expression): Call
588 finish_non_static_data_member for non-dependent FIELD_DECL.
590 2004-12-03 Nathan Sidwell <nathan@codesourcery.com>
593 * decl.c (grokdeclarator): Make sure class in pointer to member is
596 2004-12-02 Nathan Sidwell <nathan@codesourcery.com>
599 * parser.c (cp_parser_new_type_id): Move array size expression
601 * init.c (build_new): ... to here.
603 2004-12-02 Nathan Sidwell <nathan@codesourcery.com>
606 * parser.c (cp_parser_class_head): Return NULL_TREE when
607 push_template_decl fails. Update comment.
609 2004-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
611 PR c++/15664, c++/18276
612 * pt.c (tsubst_decl) <TEMPLATE_DECL case>: Reorganize. Correctly
613 tsubst TEMPLATE_DECL that is a TEMPLATE_TEMPLATE_PARM.
615 2004-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
618 * parser.c (cp_parser_type_specifier): Catch template declaration
621 2004-12-01 Matt Austern <austern@apple.com>
623 * name-lookup.c (namespace_binding): Omit alias check for global
626 2004-12-01 Nathan Sidwell <nathan@codesourcery.com>
629 * parser.c (cp_parser_class_name): Check decl's type is not
633 * call.c (standard_conversion): Add FLAGS parameter. Do not allow
634 derived to base conversion when checking constructor
636 (implicit_conversion): Pass FLAGS to standard_conversion.
637 (check_constructir_callable): Disallow conversion functions.
639 2004-11-30 Kazu Hirata <kazu@cs.umass.edu>
641 * parser.c: Fix comment typos.
643 2004-11-27 Mark Mitchell <mark@codesourcery.com>
646 * parser.c (cp_parser_check_for_definition_in_return_type): Take
647 the defined type as a parameter, and inform the user about the
648 possibility of a missing semicolon.
649 (cp_parser_explicit_instantiation): Adjust call to
650 cp_parser_check_for_definition_in_return_type.
651 (cp_parser_init_declarator): Likewise.
652 (cp_parser_member_declaration): Likewise.
655 * cp-tree.def (TYPENAME_TYPE): Remove discussion of implicit
656 typename from comments.
657 * cp-tree.h (TYPENAME_IS_ENUM_P): New macro.
658 (TYPENAME_IS_CLASS_P): Likewise.
659 (make_typename_type): Change prototype.
660 * decl.c (struct_typename_info): New type.
661 (typename_compare): Expect the second argument to be a
662 typename_info, not a tree.
663 (build_typename_type): Add tag_type parameter. Do not create a
664 new type until necessary.
665 (make_typename_type): Add tag_type parameter.
666 * error.c (TYPENAME_TYPE): Print tags other than "typename" if
668 * friend.c (make_friend_class): Adjust call to make_typename_type.
669 * parser.c (cp_parser_make_typename_type): Likewise.
670 (cp_parser_primary_expression): Adjust call to
671 cp_parser_lookup_name.
672 (cp_parser_unqualified_id): Adjust calls to cp_parser_class_name.
673 (cp_parser_class_or_namespace_name): Likewise.
674 (cp_parser_postfix_expression): Adjust calls to
676 (cp_parser_mem_initializer_id): Adjust calls to
677 cp_parser_class_name.
678 (cp_parser_type_parameter): Adjust calls to cp_parser_lookup_name.
679 (cp_parser_template_name): Likewise.
680 (cp_parser_template_argument): Likewise.
681 (cp_parser_type_name): Adjust call to cp_parser_class_name.
682 (cp_parser_elaborated_type_specifier): Adjust calls to
683 make_typename_type and cp_parser_lookup_name.
684 (cp_parser_namespace_name): Likewise.
685 (cp_parser_class_name): Replace type_p parameter with tag_type.
686 Adjust calls to make_typename_type and cp_parser_lookup_name.
687 (cp_parser_class_head): Adjust calls to cp_parser_class_name.
688 (cp_parser_base_specifier): Likewise.
689 (cp_parser_lookup_name): Replace is_type parameter with tag_type.
690 Adjust calls to make_typename_type and lookup_qualified_name.
691 (cp_parser_lookup_name_simple): Adjust call to
692 cp_parser_lookup_name.
693 (cp_parser_constructor_declarator_p): Adjust call to
694 cp_parser_class_name.
695 * pt.c (convert_template_argument): Adjust all to
697 (tsubst_decl): Do not pre-substitute the type of the declaration.
698 (tsubst): Hand off declarations more quickly. Adjust call to
702 * parser.c (cp_parser_postfix_dot_deref_expression): Robustify.
704 2004-11-29 Daniel Jacobowitz <dan@codesourcery.com>
707 * Make-lang.in (cp/decl2.o): Update dependencies.
708 * decl2.c (finish_file): Call maybe_apply_pending_pragma_weaks.
710 2004-11-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
713 * name-lookup.c (pushtag): Change return type to tree.
714 * cp-tree.h (pushtag): Adjust declaration.
715 * decl.c (xref_tag, start_enum): Use return value of pushtag.
716 * pt.c (push_template_decl_real): Return immediately if
717 pushdecl_namespace_level returns error_mark_node.
719 2004-11-27 Kazu Hirata <kazu@cs.umass.edu>
721 * pt.c: Fix a comment typo.
723 2004-11-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
725 Friend class name lookup 4/n
726 * class.c (pushclass): Don't call cxx_remember_type_decls.
727 * cp-tree.h (clear_anon_tags): Remove declaration.
728 * decl.c (grokdeclarator): Don't call lookup_tag_reverse.
729 * name-lookup.c (binding_entry_free, binding_table_free): Comment
731 (binding_table_find_anon_type, binding_table_reverse_maybe_remap,
732 binding_table_remove_anonymous_types, cxx_remember_type_decls,
733 bt_print_entry, clear_anon_tags, follow_tag_typedef, lookup_tag,
734 lookup_tag_reverse): Remove
735 (begin_scope, leave_scope, kept_level_p, print_binding_level):
736 Don't use type_decls field in cp_binding_level.
737 (maybe_process_template_type_declaration, pushtag): Set
738 CLASSTYPE_NESTED_UTDS directly.
739 * name-lookup.h (binding_table_remove_anonymous_types,
740 cxx_remember_type_decls, lookup_tag, lookup_tag_reverse): Remove
742 (cp_binding_level): Remove type_decls field.
744 2004-11-26 Kazu Hirata <kazu@cs.umass.edu>
746 * typeck.c: Fix a comment typo.
748 2004-11-25 Mark Mitchell <mark@codesourcery.com>
751 * class.c (instantiate_type): Treat NON_DEPENDENT_EXPRs with
752 unknown_type as non matching. Tidy up.
753 * pt.c (build_non_dependent_expr): Do not build a
754 NON_DEPENDENT_EXPR for a VAR_DECL.
757 * cp-tree.h (lvalue_or_else): Remove declaration.
758 * tree.c (lvalue_or_else): Remove.
759 * typeck.c (build_unary_op): Adjust call to lvalue_or_else.
760 (build_modify_expr): Likewise.
763 * decl.c (duplicate_decls): Return error_mark_node on error, as
767 * decl.c (grokvardecl): Keep track of whether or not a there was
768 explicit qualification.
769 * name-lookup.c (set_decl_namespace): Complain about explicit
770 qualification of a name within its own namespace.
773 * typeck.c (check_return_expr): Robustify.
775 2004-11-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
777 Friend class name lookup 3/n, PR c++/3332
778 * name-lookup.c (push_inner_scope, pop_inner_scope): New functions.
779 (lookup_type_scope): Don't deal with name from user declaration
781 * name-lookup.h (push_inner_scope, pop_inner_scope): Add declarations.
782 * parser.c (cp_parser_class_specifier): Use push_inner_scope and
785 2004-11-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
787 Friend class name lookup 2/n, PR c++/14513, c++/15410
788 * name-lookup.c (lookup_name_real): Simplify.
789 (lookup_type_scope): Add SCOPE parameter. Handle friend class
791 * name-lookup.h (tag_scope): New enum type.
792 (lookup_type_scope): Adjust declaration.
793 * decl.c (lookup_and_check_tag, xref_tag, xref_tag_from_type):
794 Change bool parameter GLOBALIZED to TAG_SCOPE parameter SCOPE.
795 (start_enum): Likewise. Add assertion test that NAME is
796 IDENTIFIER_NODE. Use anonymous name for dummy ENUMERAL_TYPE in
798 * cp-tree.h (xref_tag, xref_tag_from_type): Adjust declarations.
799 * parser.c (cp_parser_elaborated_type_specifier,
800 cp_parser_class_head): Adjust call to xref_tag.
801 * pt.c (lookup_template_class, instantiate_class_template):
803 * rtti.c (init_rtti_processing, build_dynamic_cast_1,
804 tinfo_base_init, emit_support_tinfos): Likewise.
806 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
808 * g++spec.c, lex.c: Avoid ` as left quote in diagnostics.
810 2004-11-24 Mark Mitchell <mark@codesourcery.com>
813 * name-lookup.c (supplement_binding): Do not allow typedefs to be
814 redefined in class scope.
817 * parser.c (cp_parser_set_decl_type_spec): Do not try to allow
818 redefinitions of builtin types other that "bool" or "wchar_t".
820 2004-11-24 Steven Bosscher <stevenb@suse.de>
822 * decl.c (cxx_init_decl_processing): Don't clear
823 flag_inline_functions.
825 2004-11-24 Mark Mitchell <mark@codesourcery.com>
827 * pt.c (tsubst_function_type): Do not permit function types which
828 return arrays or functions.
831 * parser.c (cp_parser_init_declarator): Do not pop scope twice.
834 * cp-tree.h (CTOR_NAME): Remove.
836 * decl.c (initialize_predefined_identifiers): Add spaces to the
837 end of constructor and destructor names.
839 2004-11-24 Giovanni Bajo <giovannibajo@gcc.gnu.org>
842 * decl.c (start_decl): Check for invalid specialization headers.
844 2004-11-24 Paolo Bonzini <bonzini@gnu.org>
848 * call.c (standard_conversion): Move check for conversions between
850 * typeck.c (ptr_reasonably_similar): ... here.
852 2004-11-23 Ben Elliston <bje@au.ibm.com>
854 * cp-tree.h (context_as_string): Remove extern.
855 * error.c (context_as_string): Remove.
857 * cp-tree.h (cp_type_qual_from_rid): Remove extern.
858 * lex.c (cp_type_qual_from_rid): Remove.
860 * cp-tree.h (do_poplevel): Remove extern.
861 (check_multiple_declarators): Likewise.
862 * semantics.c (do_poplevel): Make static.
863 (check_multiple_declarators): Remove.
865 * cp-tree.h (check_final_overrider): Remove extern.
866 * search.c (check_final_overrider): Make static.
868 * cp-tree.h (build_artificial_parm): Remove extern.
869 * decl2.c (build_artificial_parm): Make static.
871 2004-11-22 Giovanni Bajo <giovannibajo@gcc.gnu.org>
874 * typeck.c (build_unary_op) <CONVERT_EXPR, NEGATE_EXPR>: Unify code.
875 Make sure the result is always a rvalue.
877 2004-11-16 Giovanni Bajo <giovannibajo@gcc.gnu.org>
879 * decl.c (start_preparsed_function): Call check_function_type even
881 (require_complete_types_for_parms): Skip dependent types.
882 (check_function_type): Likewise.
884 2004-11-16 Steven Bosscher <stevenb@suse.de>
886 * Make-lang.in (cp/decl.o, cp/search.o): Don't depend on stack.h.
887 * search.c: Don't include it.
889 2004-11-15 Andrew Pinski <pinskia@physics.uc.edu>
891 * cp-gimplify.c: Include pointer-set.h
892 (cp_genericize_r): Use pointer_sets instead of a hashtable.
893 Also instert the new statement for CLEANUP_STMT.
894 (cp_genericize): Use pointer_sets instead of a hashtable.
895 * Make-lang.in (cp-gimplify.o): Depend on pointer-set.h.
897 2004-11-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
899 Friend class name lookup 1/n, PR c++/18471
900 * decl.c (lookup_and_check_tag): New function.
901 (xref_tag, start_enum): Use it.
902 (check_elaborated_type_specifier): Move TEMPLATE_TYPE_PARM check
903 before !DECL_IMPLICIT_TYPEDEF_P. Also display previously declared
905 * name-lookup.c (lookup_name_current_level): Rename to ...
906 (lookup_name_innermost_nonclass_level): ... this.
907 (lookup_type_scope): New function.
908 * name-lookup.h (lookup_name_current_level): Rename to ...
909 (lookup_name_innermost_nonclass_level): ... this.
910 (lookup_type_scope): Add declaration.
912 2004-11-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
915 * pt.c (coerce_template_parms): Only emit error message about
916 invalid template argument when TF_ERROR.
918 2004-11-12 Mark Mitchell <mark@codesourcery.com>
921 * decl.c (start_decl): Make sure to set *pop_scope_p. Return
922 error_mark_node to indicate errors.
925 * parser.c (cp_parser_direct_declarator): Disallow non-constant
926 array bounds when not inside a function.
929 * pt.c (tsubst_copy_and_build): Do not do Koenig lookup when an
930 unqualified name resolves to a member function.
933 * pt.c (tsubst_copy_and_build): Handle qualified names used from a
934 derived class correctly.
936 * decl2.c (import_export_decl): Fix typo in comment.
937 * tree.c (pod_type_p): Likewise.
939 2004-11-10 Andrew Pinski <pinskia@physics.uc.edu>
941 * typeck.c (cxx_mark_addressable): Add braces around the first if.
943 2004-11-10 Adam Nemet <anemet@lnxw.com>
946 * typeck.c (cxx_mark_addressable): Issue an error if address of an
947 explicit register variable is requested.
949 2004-11-10 Nathan Sidwell <nathan@codesourcery.com>
952 * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK): New.
953 (struct lang_decl_flags): Add thunk_p flag.
954 (struct lang_decl): Remove separate fixed_offset. Place
955 cloned_function and fixed_offset into union.
956 (DECL_CLONED_FUNCTION_P, DECL_CLONED_FUNCTION): Adjust.
957 (DECL_THUNK_P, SET_DECL_THUNK_P): Adjust.
958 (THUNK_FIXED_OFFSET): Adjust.
959 * method.c (make_thunk): Adjust.
961 2004-11-09 Mark Mitchell <mark@codesourcery.com>
964 * init.c (build_new_1): Handle parenthesized type-ids that name an
967 2004-11-09 Joseph S. Myers <joseph@codesourcery.com>
969 * call.c, class.c, decl.c, decl2.c, error.c, mangle.c, parser.c,
970 pt.c, search.c, semantics.c, typeck.c: Use %q, %< and %> for
971 quoting in diagnostics.
972 * parser.c (cp_parser_sizeof_operand): Use '' instead of `' for
973 quoting in printf format.
974 * decl.c (duplicate_decls, start_decl): Use %qD instead of
977 2004-11-08 Kazu Hirata <kazu@cs.umass.edu>
979 * class.c, decl.c, lex.c, name-lookup.c, parser.c, pt.c,
980 search.c, typeck2.c: Fix comment formatting.
982 2004-11-04 Ulrich Weigand <uweigand@de.ibm.com>
984 PR tree-optimization/18184
985 * cp-objcp-common.c (cxx_types_compatible_p): Do not treat pointers
986 of different modes or alias-all flags as equivalent.
987 * typeck.c (comptypes): Likewise.
989 2004-11-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
992 * cp-tree.h (TYPE_REF_OBJ_P): New macro.
993 (TYPE_PTR_P, TYPE_PTROB_P, TYPE_PTROBV_P, TYPE_PTRFN_P,
994 TYPE_REFFN_P): Document.
995 (fold_decl_constant_value): New prototype.
996 * pt.c (convert_nontype_argument_function): Rewrite and extract
998 (fold_decl_constant_value, convert_nontype_argument_function): New.
999 (lookup_template_class): Add comment about useless double call.
1000 * mangle.c (write_expression): Strip conversions before lowering
1002 * cvt.c (ocp_convert): Check LOOKUP_COMPLAIN for a pedwarn. Disallow
1003 enum to enum conversion.
1005 2004-11-02 Mark Mitchell <mark@codesourcery.com>
1008 * parser.c (cp_parser_type_parameter): Robustify.
1011 * parser.c (cp_parser_single_declaration): Disallow template
1015 * typeck.c (build_const_cast): Use error_operand_p.
1017 2004-11-02 Ziemowit Laski <zlaski@apple.com>
1019 * cp-lang.c (cxx_types_compatible_p): Remove prototype and definition.
1020 (LANG_HOOKS_TYPES_COMPATIBLE_P): Move to cp-objcp-common.h.
1021 * cp-objcp-common.c (cxx_types_compatible_p): Moved definition here
1023 * cp-objcp-common.h (cxx_types_compatible_p): Moved prototype here
1025 (LANG_HOOKS_TYPES_COMPATIBLE_P): Moved here from cp-lang.c.
1027 2004-11-01 Nathan Sidwell <nathan@codesourcery.com>
1030 * search.c (check_final_overrider): Deprecate gnu covariant extension.
1032 2004-10-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
1034 Convert diagnostics to use quoting flag q 9/n
1035 * typeck.c (build_x_unary_op, convert_member_func_to_ptr,
1036 get_delta_difference): Use new quotation style.
1037 * repo.c (reopen_repo_file_for_write): Likewise.
1038 * pt.c (do_type_instantiation): Likewise.
1039 * parser.c (cp_parser_diagnose_invalid_type_name):
1040 * name-lookup.c (push_overloaded_decl, set_decl_namespace):
1041 * error.c (cp_print_error_function,
1042 print_instantiation_full_context): Likewise.
1043 * decl.c (define_label, grok_reference_init,
1044 maybe_deduce_size_from_array_init, revert_static_member_fn):
1045 * decl2.c (check_classfn): Likewise.
1046 * class.c (add_method, check_field_decls, layout_class_type,
1047 resolve_address_of_overloaded_function): Likewise.
1048 * call.c (build_x_va_arg, build_over_call): Likewise.
1050 2004-10-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
1052 Convert diagnostics to use quoting flag q 8/n
1053 * cvt.c (cp_convert_to_pointer, warn_ref_binding,
1054 convert_to_reference, ocp_convert, convert_to_void
1055 cp_convert_to_pointer): Use new quotation style.
1057 2004-10-31 Mark Mitchell <mark@codesourcery.com>
1060 * typeck2.c (store_init_value): Use split_nonconstant_init even
1061 for types that require construction.
1063 1004-10-28 Matt Austern <austern@apple.com>
1066 * cp-tree.h (class_key_or_enum_as_string): Declare.
1067 * error.c (class_key_or_enum): Rename to class_key_or_enum_as_string
1068 and remove static qualifier.
1069 * decl.c (shadow_tag): Warn about ignored attributes in class/struct/
1070 union/enum declaration.
1072 2004-10-29 Kazu Hirata <kazu@cs.umass.edu>
1074 * pt.c: Fix a comment typo.
1076 2004-10-28 Nathan Sidwell <nathan@codesourcery.com>
1078 * typeck.c (composite_pointer_type): Remove comment about DR 195.
1079 (build_reinterpret_cast_1): Revert DR195 patch. Only emit a
1080 warning when being pedantic.
1081 (build_reinterpet_cast, build_c_cast): Adjust.
1083 2004-10-29 Mark Mitchell <mark@codesourcery.com>
1086 * decl.c (grokdeclarator): Mark TYPE_DECLs as abstract when they
1087 appear in a constructor/destructor that will be cloned.
1089 1004-10-28 Matt Austern <austern@apple.com>
1092 * decl.c (finish_enum): Handle packed attribute.
1093 * parser.c (cp_parser_enum_specifier): Process trailing attributes.
1095 2004-10-28 Mark Mitchell <mark@codesourcery.com>
1098 * pt.c (instantiate_class_template): Increment
1099 processing_template_decl when substituting into a member class
1102 2004-10-27 Mark Mitchell <mark@codesourcery.com>
1105 * call.c (convert_like_real): Fix formatting.
1106 (initialize_reference): When binding a temporary to a base class,
1107 ensure that the nominal copy made is to the derived class, not the
1111 * parser.c (cp_parser_next_token_ends_template_argument_p): Do not
1114 2004-10-27 Andrew Pinski <pinskia@physics.uc.edu>
1116 * decl.c (bad_specifiers): Move the q after the %.
1118 2004-10-27 Andrew Pinski <pinskia@physics.uc.edu>
1120 * parser.c (cp_parser_diagnose_invalid_type_name): Move the q after
1123 2004-10-26 Mark Mitchell <mark@codesourcery.com>
1125 * name-lookup.c (do_namespace_alias): Use FROB_CONTEXT.
1126 * search.c (current_scope): Fix prototype.
1129 * search.c (current_scope): Return the innermost non-block scope,
1130 not the innermost non-block, non-namespace scope.
1131 (at_namespace_scope_p): Adjust accordingly.
1132 (dfs_accessible_post): Do not pass namespaces to is_friend.
1133 (dfs_walk_once_accessible_r): Likewise.
1134 * decl.c (grokvardecl): Adjust call to current_scope.
1135 (build_enumerator): Likewise.
1136 * parser.c (cp_parser_using_declaration): Likewise.
1137 (cp_parser_direct_declarator): Use at_namespace_scope_p instead of
1139 (cp_parser_class_head): Adjust call to current_scope.
1140 * name-lookup.c (do_namespace_alias): Set the DECL_CONTEXT for the
1144 * pt.c (tusbst_copy_and_build): Resolve enumeration constants to
1145 their underlying values.
1148 * typeck.c (build_binary_op): Honor build_type, even when in a
1151 2004-10-26 Nathan Sidwell <nathan@codesourcery.com>
1153 * parser.c (cp_lexer_get_preprocessor_token): Remove unneeded
1154 padding token checking.
1156 2004-10-25 Andrew Pinski <pinskia@physics.uc.edu>
1159 * decl.c (grokdeclarator) <case cdk_array>: Remove the call
1160 layout_type as it is already done by create_array_type_for_decl.
1162 2004-10-22 Nathan Sidwell <nathan@codesourcery.com>
1165 * parser.c (eof_token): Make const, correctly initialize rid and
1167 (struct cp_lexer): Replace buffer_end pointer with buffer_length
1169 (cp_lexer_new_main): Directly grow lexer's buffer here. Don't
1171 (cp_lexer_new_from_tokens): Adjust.
1172 (cp_lexer_grow_buffer): Remove.
1173 (cp_lexer_peek_nth_token, cp_lexer_consume_token,
1174 cp_lexer_purge_token): Add const casts.
1176 2004-10-21 Mark Mitchell <mark@codesourcery.com>
1180 * cp-tree.h (convert_to_base): Change prototype.
1181 (build_ptrmemfunc): Likewise.
1182 (convert_ptrmem): New function.
1183 * call.c (struct conversion): Adjust documentation for base_p.
1184 (standard_conversion): Set base_p for ck_pmem conversions as
1186 (convert_like_real): Use convert_to_base for ck_pmem and ck_ptr
1188 * class.c (convert_to_base): Handle both pointers and objects.
1189 Add nonnull parameter.
1190 (build_vfield_ref): Adjust call to convert_to_base.
1191 * cvt.c (cp_convert_to_pointer): Adjust call to build_ptrmemfunc.
1192 (convert_force): Likewise.
1193 * typeck.c (build_unary_op): Likewise.
1194 (convert_ptrmem): New function.
1195 (build_static_cast_1): Use it.
1196 (build_reinterpret_cast): Allow conversions to vector types.
1197 (get_delta_difference): Add c_cast_p parameter.
1198 (build_ptrmemfunc): Likewise. Adjust calls to
1199 get_delta_difference.
1201 2004-10-21 Andrew Pinski <pinskia@physics.uc.edu>
1204 * error.c (cp_error_at): Output the context as it might be
1205 different file as the other location.
1207 2004-10-21 Kazu Hirata <kazu@cs.umass.edu>
1209 * typeck.c: Fix a comment typo.
1211 2004-10-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1214 * decl.c (make_unbound_class_template): Add PARM_LIST parameter.
1215 * cp-tree.h (make_unbound_class_template): Adjust prototype.
1216 * parser.c (cp_parser_lookup_name): Adjust call to
1217 make_unbound_class_template.
1218 (cp_parser_single_declaration): Handle member class of class
1219 template as template friend parsing correctly.
1220 * friend.c (is_friend): Call is_specialization_of_friend for
1221 template friend class.
1222 (make_friend_class): Handle member class of class template as
1224 * pt.c (is_specialization_of_friend): Likewise.
1225 (instantiate_class_template): Likewise.
1226 (tsubst): Adjust call to make_unbound_class_template.
1228 2004-10-20 Nathan Sidwell <nathan@codesourcery.com>
1230 * typeck.c (composite_pointer_type): Add comment about DR 195
1231 (build_reinterpret_cast_1): Add for_reinterpret_cast_p parameter.
1232 Allow function pointer conversions that DR195 suggests.
1233 (build_reinterpret_cast, build_c_cast): Update
1234 build_reinterpret_cast_1 calls.
1236 2004-10-20 Kazu Hirata <kazu@cs.umass.edu>
1238 * call.c, typeck.c: Fix comment typos.
1240 2004-10-20 Nathan Sidwell <nathan@codesourcery.com>
1242 * parser.c (cp_token_position): New typedef. Define VEC thereof.
1243 (struct cp_lexer): Allow buffer and buffer_end to be NULL. Make
1244 next_token and last_token cp_token_position. Make saved_tokens a
1245 VEC(cp_token_position).
1246 (eof_token): New static variable.
1247 (CP_SAVED_TOKENS_SIZE): Rename to ...
1248 (CP_SAVED_TOKEN_STACK): ... here.
1249 (cp_lexer_new_main): Adjust main lexer creation and buffer
1251 (cp_lexer_new_from_tokens): Do not copy the tokens, merely point
1252 to the parent buffer. Do not append eof token.
1253 (cp_lexer_destroy): Only free buffer if non-NULL. Free token
1255 (cp_lexer_next_token, cp_lexer_prev_token): Remove.
1256 (cp_lexer_token_position, cp_lexer_token_at): New.
1257 (cp_lexer_saving_tokens): Adjust. Make inline.
1258 (cp_lexer_advance_token, cp_lexer_token_difference): Remove.
1259 (cp_lexer_peek_token_emit_debug_info): Fold into ...
1260 (cp_lexer_peek_token): ... here.
1261 (cp_lexer_peek_nth_token): Don't peek past EOF.
1262 (cp_lexer_consume_token): Set next_token to eof_token, if reaching
1264 (cp_lexer_purge_token): Adjust eof setting.
1265 (cp_lexer_purge_tokens_after): Likewise.
1266 (cp_lexer_save_tokens): Push next_token directly.
1267 (cp_lexer_commit_tokens): Adjust.
1268 (cp_lexer_rollback_tokens): Pop next_token directly.
1269 (cp_parser_check_for_invalid_template_id): Adjust token purging.
1270 (cp_parser_translation_unit): Do not consume the EOF.
1271 (cp_parser_nested_name_specifier_opt): Adjust token purging.
1272 (cp_parser_template_id, cp_parser_template_name): Likewise.
1274 2004-10-19 Mark Mitchell <mark@codesourcery.com>
1277 * call.c (struct conversion): Add base_p.
1278 (convert_like): Add c_cast_p argument.
1279 (convert_like_with_conversion): Likewise.
1280 (build_conv): Clear base_p.
1281 (standard_conversion): Set it, for derived-to-base conversions.
1282 (convert_like_real): Add c_cast_p parameter. Handle pointer
1283 conversions directly rather than relying on ocp_convert.
1284 (perform_direct_initialization_if_possible): Add c_cast_p
1286 * cp-tree.h (perform_direct_initialization_if_possible): Change
1288 (convert_member_func_to_ptr): New function.
1289 * typeck.c (check_for_casting_away_constness): Add diag_fn
1291 (build_static_cast_1): New function, split out from ...
1292 (build_static_cast): ... here. Use build_static_cast_1.
1293 (build_reinterpret_cast_1): New function, split out from ...
1294 (build_reinterpret_cast): ... here. Use build_reinterpret_cast_1.
1295 (build_const_cast_1): New function, split out from ...
1296 (build_const_cast): ... here. Use build_const_cast_1.
1297 (build_c_cast): Rewrite to use build_const_cast_1,
1298 build_static_cast_1, and build_reinterpret_cast_1.
1299 (convert_member_func_to_ptr): New function.
1301 2004-10-19 Paolo Bonzini <bonzini@gnu.org>
1304 * parser.c (enum cp_parser_prec): Give relational expressions
1305 a higher precedence than equality expressions.
1307 2004-10-15 Nathan Sidwell <nathan@codesourcery.com>
1309 * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Adjust lookup_base call.
1310 (ACCESSIBLY_UNIQUELY_DERIVED_P): Remove.
1311 (PUBLICLY_UNIQUELY_DERIVED_P): Adjust lookup_base call.
1312 (enum base_access): Reorganize.
1313 (accessible_base_p, accessible_p): Add consider_local_p parameter.
1314 * call.c (standard_conversion): Update comment about
1316 (enforce_access): Adjust accessible_p call.
1317 (build_over_call): Adjust accessible_base_p call.
1318 * class.c (convert_to_base): Adjust lookup_base call.
1319 (build_vtbl_ref_1): Likewise.
1320 (warn_about_ambiguous_bases): Likewise. Add early exit.
1321 * cvt.c (convert_to_pointer_force) Adjust lookup_base call.
1322 * search.c (accessible_base_p): Add consider_local_p parameter.
1323 (lookup_base): Pass consider_local_p to accessible_base_p call.
1324 (friend_accessible_p): Check whether scope is a class member.
1325 Remove unnecessary class template check.
1326 (accessible_p): Add consider_local_p parameter. Use it.
1327 (adjust_result_of_qualified_name_lookup): Adjust lookup_base call.
1328 * tree.c (maybe_dummy_object): Likewise.
1329 * typeck.c (comp_except_type): Use PUBLICLY_UNIQUELY_DERIVED_P.
1330 (build_class_member_access_expr): Adjust lookup_base call.
1331 * typeck2.c (binfo_or_else): Likewise.
1332 * rtti.c (build_dynamic_cast_1): Access can consider friendship
1335 2004-10-17 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1338 * decl2.c (grokfield): Apply attributes also to TYPE_DECLs.
1340 2004-10-16 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1343 * parser.c (cp_parser_parenthesized_expression_list): Fold
1344 non-dependent expressions in attribute lists.
1346 2004-10-15 Mark Mitchell <mark@codesourcery.com>
1349 * decl.c (declare_global_var): Use the return value from pushdecl.
1352 * parser.c (cp_parser_simple_declaration): Do not diagnose invalid
1353 type names if we have already found a valid type.
1354 (cp_parser_member_declaration): Likewise.
1357 * parser.c (cp_parser_member_specification_opt): Handle
1360 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
1362 * dump.c, g++spec.c, repo.c: Update copyright.
1364 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
1366 * decl.c: Fix a comment typo.
1368 2004-10-13 Andrew Pinski <pinskia@physics.uc.edu>
1371 * name-lookup.c (parse_using_directive): If we have a
1372 error_mark_node, do not set the decl namespace associations
1375 2004-10-14 Mark Mitchell <mark@codesourcery.com>
1378 * decl.c (cp_finish_decl): Do not call expand_static_init more
1379 than once for a single variable.
1381 2004-10-14 Matt Austern <austern@apple.com>
1383 * Make-lang.in (pt.o): depends on pointer-set.h
1384 * cp-tree.h (cp_walk_subtrees): Last argument is pointer_set_t* now.
1385 * pt.c (struct pair_fn_data): Use pointer_set_t, not htab_t
1386 (for_each_template_parm): Convert from htab_t to pointer_set_t.
1387 * tree.c (cp_walk_subtrees): Last argument is pointer_set_t* now.
1389 2004-10-13 Andrew Pinski <pinskia@physics.uc.edu>
1392 * semantics.c (finish_for_expr): Convert expression to void
1393 so that we don't create temporaries for a?b:c.
1395 2004-10-13 Kazu Hirata <kazu@cs.umass.edu>
1397 * search.c: Fix a comment typo.
1399 2004-10-12 Nathan Sidwell <nathan@codesourcery.com>
1401 * class.c (dfs_modify_vtables): Simplify condition. Return
1402 dfs_skip_bases as appropriate.
1403 (modify_all_vtables): Walk in pre-order.
1404 * search.c (dfs_walk_all, dfs_walk_once_r,
1405 dfs_walk_once_accessible_r): Assert post order function never
1406 returns dfs_skip_bases.
1408 * search.c (struct lookup_base_data_s): New.
1409 (lookup_base_r): Replace with ...
1410 (dfs_lookup_base): ... this.
1411 (lookup_base): Use dfs_walk_all.
1413 2004-10-12 Kazu Hirata <kazu@cs.umass.edu>
1415 * search.c: Fix comment typos.
1417 2004-10-11 Mark Mitchell <mark@codesourcery.com>
1420 * parser.c (cp_parser_declarator): Add member_p parameter.
1421 (cp_parser_condition): Adjust calls to cp_parser_declarator.
1422 (cp_parser_explicit_instantiation): Likewise.
1423 (cp_parser_init_declarator): Likewise.
1424 (cp_parser_direct_declarator): Add member_p parameter. Do not
1425 parse tentatively when parsing the parameters to a member.
1426 (cp_parser_type_id): Adjust calls to cp_parser_declarator.
1427 (cp_parser_parameter_declaration): Likewise.
1428 (cp_parser_member_declaration): Likewise.
1429 (cp_parser_exception_declaration): Likewise.
1432 * cp-tree.h (CLASSTYPE_TEMPLATE_SPECIALIZATION): Add a comment.
1433 * pt.c (optimize_specialization_lookup_p): Do not optimize lookups
1434 for members of partial or explicit specializations.
1437 * decl2.c (finish_anon_union): Robustify.
1439 2004-10-11 Nathan Sidwell <nathan@codesourcery.com>
1441 * cp-tree.h (get_dynamic_cast_base_type): Rename to ...
1442 (dcast_base_hint): ... here.
1443 * rtti.c (build_dynamic_cast_1): Use dcast_base_hint.
1444 * search.c (struct dcast_data_s): New.
1445 (dynamic_cast_base_recurse): Remove. Replace with ...
1446 (dfs_dcast_hint_pre, dfs_dcast_base_post): ... these. New.
1447 (get_dynamic_cast_base_type): Rename to ...
1448 (dcast_base_hint): ... here. Use dfs_walk_once_accessible.
1449 (accessible_r): Remove.
1450 (dfs_accessible_post): New, broken out of accessible_r.
1451 (accessible_p): Use dfs_walk_once_accessible.
1452 (dfs_walk_once_accessible_r): New. From accessible_r.
1453 (dfs_walk_once_accessible): New. From acessible_p.
1455 * cp-tree.h (SAME_BINFO_TYPE_P): New.
1456 * class.c (build_base_path): Use SAME_BINFO_TYPE_P to compare
1458 (convert_to_base_statically, determine_primary_bases,
1459 update_vtable_entry_for_fn, dfs_modify_vtables, build_vtt_inits,
1460 dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
1461 accumulate_vtbl_inits, dfs_accumulate_vtbl_inits,
1462 build_vtbl_initializer, add_vcall_offset_vtbl_entries_1): Likewise.
1463 * init.c (expand_member_init): Likewise.
1464 * search.c (lookup_base_r, dynamic_cast_base_recurse,
1465 binfo_via_virtual, copied_binfo, binfo_for_vbase,
1466 original_binfo): Likewise.
1467 * tree.c (copy_binfo): Likewise.
1469 2004-10-11 Kazu Hirata <kazu@cs.umass.edu>
1471 * semantics.c: Fix comment typos.
1473 2004-10-10 Andrew Pinski <pinskia@physics.uc.edu>
1478 * semantics.c (maybe_cleanup_point_expr): Call
1479 fold_build_cleanup_point_expr.
1480 (maybe_cleanup_point_expr_void): New function.
1481 (add_decl_expr): Call maybe_cleanup_point_expr_void.
1482 (finish_expr_stmt): Likewise.
1483 (finish_return_stmt): Likewise.
1484 (finish_for_expr): Likewise.
1485 (finish_asm_stmt): Likewise.
1486 * typeck.c (condition_conversion): Call
1487 fold_build_cleanup_point_expr.
1489 2004-10-10 Andrew Pinski <pinskia@physics.uc.edu>
1492 * semantics.c (add_decl_expr): If the decl has a size which
1493 has side effects then the decl expression needs a cleanup point.
1495 2004-10-10 Mark Mitchell <mark@codesourcery.com>
1498 * decl.c (grokdeclarator): Robustify error-recovery on invalid
1501 2004-10-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
1503 Convert diagnostics to use quoting flag q 7/n
1504 * typeck.c (composite_pointer_type_r, composite_pointer_type,
1505 cxx_sizeof_or_alignof_type, cxx_sizeof_or_alignof_expr,
1506 string_conv_p, build_class_member_access_expr,
1507 build_class_member_access_expr, lookup_destructor,
1508 finish_class_member_access_expr, build_indirect_ref,
1509 get_member_function_from_ptrfunc, build_function_call,
1510 convert_arguments, build_binary_op, pointer_diff, build_unary_op,
1511 check_for_casting_away_constness, build_static_cast,
1512 build_reinterpret_cast, build_const_cast, build_c_cast,
1513 build_modify_expr, get_delta_difference, build_ptrmemfunc,
1514 dubious_conversion_warnings, convert_for_assignment,
1515 convert_for_initialization,
1516 maybe_warn_about_returning_address_of_local, check_return_expr):
1519 * typeck2.c (error_not_base_type, readonly_error,
1520 abstract_virtuals_error, cxx_incomplete_type_diagnostic,
1521 store_init_value, digest_init, build_x_arrow,
1522 build_m_component_ref, require_complete_eh_spec_types): Likewise.
1524 * tree.c (cp_build_qualified_type_real,
1525 handle_java_interface_attribute, handle_init_priority_attribute):
1528 * semantics.c (finish_asm_stmt, finish_non_static_data_member,
1529 finish_pseudo_destructor_expr,
1530 check_template_template_default_arg, begin_class_definition,
1531 finish_base_specifier, qualified_name_lookup_error,
1532 finish_id_expression, finish_typeof): Likewise.
1534 * search.c (lookup_base, check_final_overrider,
1535 look_for_overrides_r): Likewise.
1537 * rtti.c (get_tinfo_decl, build_dynamic_cast_1): Likewise.
1539 2004-10-09 Mark Mitchell <mark@codesourcery.com>
1542 * error.c (dump_expr): Correct handling of AGGR_INIT_EXPRs using a
1546 * init.c (build_new): Correct comments.
1547 * parser.c (cp_parser_new_expression): Use NULL_TREE for nelts in
1551 * parser.c (cp_parser_postfix_dot_deref_expression): If the
1552 pseduo-destructor-name production does not work, fall back to the
1553 ordinary production.
1556 * tree.c (cp_tree_equal): Handle a BASELINK.
1559 * cp-tree.h (check_var_type): New function.
1560 * decl.c (check_var_type): New function, split out from ...
1561 (grokdeclarator): ... here.
1562 * pt.c (tsubst_decl): Use check_var_type.
1565 * decl.c (grokdeclarator): Disallow declarations of operators as
1568 2004-10-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1571 * error.c (dump_expr): Add missing case for RDIV_EXPR.
1573 2004-10-08 Kazu Hirata <kazu@cs.umass.edu>
1575 * pt.c, search.c: Fix comment typos.
1577 2004-10-08 Nathan Sidwell <nathan@codesourcery.com>
1579 * cp-tree.h (dfs_walk, dfs_walk_real, dfs_unmark, markedp,
1581 (dfs_skip_bases, dfs_walk_all, dfs_walk_once): New.
1582 * class.c (struct find_final_overrider_data): Remove most_derived,
1583 vpath_list and vpath fields. Add path field.
1584 (dfs_find_final_ocerrider_1): Add DEPTH parameter. Adjust.
1585 (dfs_find_final_overrider): Rename to ...
1586 (dfs_find_final_overrider_pre): ... here. Adjust.
1587 (dfs_find_final_overrider_post): Adjust.
1588 (dfs_find_final_overrider_q): Fold into
1589 dfs_find_final_overrider_pre.
1590 (find_final_overrider): Adjust dfs searching.
1591 (dfs_modify_vtables): Don't mark binfo here.
1592 (modify_all_vtables): Use dfs_walk_once.
1593 (build_vtt_inits): Likwise. Use dfs_walk_all.
1594 (dfs_build_secondary_vptr_vtt_inits): Don't mark binfo here.
1595 Return dfs_skip_bases as appropriate.
1596 (dfs_fixup_binfo_vtbls): Return dfs_skip_bases as appropriate.
1597 * init.c (dfs_initialized_vtbl_ptrs): Return dfs_skip_bases as
1598 appropriate. Don't mark binfo here.
1599 (initialize_vtbl_ptrs): Use dfs_walk_once.
1600 * search.c (struct vbase_info): Remove unused struct.
1601 (access_in_type): Use dfs_walk_once.
1602 (dfs_access_in_type): Don't mark binfo here.
1603 (dfs_accessible_queue_p, dfs_accessible_p) Remove.
1605 (accessible_r): ... here. New. Specialize dfs_walk_once.
1606 (accessible_p): Use accessible_r.
1607 (lookup_field_queue_p): Remove. Fold into ...
1608 (lookup_field_r): ... here. Adjust.
1609 (lookup_member): Use dfs_walk_all.
1610 (dfs_walk_real, dfs_walk): Replace with ...
1611 (dfs_walk_all, dfs_walk_once): ... these.
1612 (dfs_walk_once_r, dfs_unmark_r): Workers for dfs_walk_once.
1613 (dfs_unmark, unmarkedp, markedp): Remove.
1614 (dfs_get_pure_virtuals): Don't mark binfo here.
1615 (get_pure_virtuals): Use dfs_walk_once.
1616 (dfs_debug_unmarked_p): Remove. Fold into ...
1617 (dfs_debug_mark): ... here.
1618 (note_debug_info_needed): Use dfs_walk_all.
1620 2004-10-07 Andrew Pinski <pinskia@physics.uc.edu>
1622 * pt.c (tsubst_expr) <case ASM_EXPR>: Look passed the
1623 CLEANUP_POINT_EXPR to get the asm expression.
1625 2004-10-07 Mark Mitchell <mark@codesourcery.com>
1627 * cp-tree.h (ICS_USER_FLAG): Remove comment about obsolete flag.
1628 (DECL_MEMBER_TEMPLATE_P): New macro.
1629 (is_member_template): Remove.
1630 (class_method_index_for_fn): New function.
1631 * pt.c (build_over_call): Use DECL_MEMBER_TEMPLATE_P.
1632 * class.c (finish_struct_methods): Remove out-of-date comment.
1633 * decl.c (copy_fn_p): Use DECL_MBMER_TEMPLATE_P.
1634 * decl2.c (check_classfn): Use DECL_MEMBER_TEMPLATE_P and
1635 class_method_index_for_fn.
1636 * pt.c (is_member_template): Remove.
1637 (is_member_template_class): Likewise.
1638 (optimize_specialization_lookup_p): New function.
1639 (retrieve_specialization): Optimize lookups for members that are
1640 not member templates.
1641 (register_specialization): Adjust accordingly.
1642 (build_template_decl): Add member_template_p parameter. Set
1643 DECL_MEMBER_TEMPLATE_P.
1644 (process_partial_specialization): Adjust call to
1645 retrieve_specialization.
1646 (push_template_decl_real): Determine whether the template is a
1648 (lookup_template_class): Use retrieve_specialization.
1649 (tsubst_decl): Adjust call to retrieve_specialization.
1650 (tsubst_exception_specification): New function.
1652 (tsubst_copy): Use DECL_MEMBER_TEMPLATE_P.
1653 (instantiate_template): Adjust call to retrieve_specialization.
1654 (regenerate_decl_from_template): Do not actually generate a new
1656 (instantiate_decl): Adjust call to retrieve_specialization.
1657 (class_method_index_for_fn): New method.
1659 2004-10-07 Andrew Pinski <pinskia@physics.uc.edu>
1661 * parser.c (cp_parser_asm_definition): Look passed the
1662 CLEANUP_POINT_EXPR to get the asm expression.
1664 2004-10-06 Andrew Pinski <pinskia@physics.uc.edu>
1667 * semantics.c (finish_asm_stmt): Asm expressions need cleanup
1670 2004-10-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
1672 Convert diagnostics to use quoting flag q 6/n
1673 * pt.c (finish_member_template_decl, check_specialization_scope,
1674 maybe_process_partial_specialization, determine_specialization,
1675 check_explicit_specialization, maybe_check_template_type,
1676 process_partial_specialization, check_default_tmpl_args,
1677 push_template_decl_real, redeclare_class_template,
1678 convert_nontype_argument, coerce_template_parms,
1679 lookup_template_class, push_tinst_level,
1680 instantiate_class_template, tsubst_arg_types,
1681 tsubst_function_type, tsubst, tsubst_qualified_id,
1682 tsubst_copy_and_build, check_instantiated_args,
1683 do_decl_instantiation, do_type_instantiation,
1684 invalid_nontype_parm_type_p, check_specialization_namespace,
1685 convert_template_argument, determine_specialization,
1686 check_template_shadow, tsubst_decl
1687 instantiate_pending_templates): Use quoting marks.
1689 2004-10-05 Nathan Sidwell <nathan@codesourcery.com>
1692 * parser.c (cp_parser_postfix_expression): Inhibit Koenig when
1693 unqualified lookup finds a member function.
1695 2004-10-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
1697 Convert diagnostics to use quoting flag q 5/n
1698 * parser.c (cp_parser_name_lookup_error,
1699 cp_parser_diagnose_invalid_type_name,
1700 cp_parser_primary_expression, cp_parser_unqualified_id,
1701 cp_parser_nested_name_specifier_opt, cp_parser_labeled_statement,
1702 cp_parser_jump_statement, cp_parser_simple_declaration,
1703 cp_parser_decl_specifier_seq, cp_parser_mem_initializer_id,
1704 cp_parser_type_parameter, cp_parser_template_id,
1705 cp_parser_template_name, cp_parser_direct_declarator,
1706 cp_parser_parameter_declaration_list, cp_parser_class_head,
1707 cp_parser_base_specifier, cp_parser_lookup_name,
1708 cp_parser_late_parsing_default_args,
1709 cp_parser_optional_template_keyword
1710 cp_parser_elaborated_type_specifier, cp_parser_check_class_key,
1711 cp_parser_check_access_in_redeclaration): Use quoting marks.
1713 * name-lookup.c (supplement_binding, pushdecl,
1714 check_for_out_of_scope_variable, validate_nonmember_using_decl,
1715 do_nonmember_using_decl, lookup_tag, set_decl_namespace,
1716 push_namespace, do_namespace_alias, do_using_directive,
1717 ambiguous_decl, lookup_namespace_name, add_function): Likewise.
1719 * method.c (use_thunk): Likewise.
1721 * lex.c (unqualified_name_lookup_error,
1722 unqualified_fn_lookup_error): Likewise.
1724 2004-10-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
1726 Convert diagnostics to use quoting flag q 4/n
1727 * except.c (decl_is_java_type, build_throw,
1728 is_admissible_throw_operand, check_handlers_1, check_handlers):
1729 Use quoting formats.
1730 * friend.c (add_friend, make_friend_class, do_friend): Likewise.
1731 * init.c (sort_mem_initializers, emit_mem_initializers,
1732 member_init_ok_or_else, expand_member_init, is_aggr_type,
1733 build_offset_ref, build_java_class_ref): Likewise.
1735 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1737 Convert diagnostics to use quoting flag q 3/n
1738 * decl.c (pop_label, duplicate_decls, redeclaration_error_message,
1739 redeclaration_error_message, lookup_label, check_goto,
1740 make_typename_type, make_unbound_class_template,
1741 fixup_anonymous_aggr, check_tag_decl, start_decl, start_decl_1,
1742 grok_reference_init, layout_var_decl, maybe_commonize_var,
1743 check_for_uninitialized_const_var, reshape_init_array,
1744 reshape_init, check_initializer, cp_finish_decl,
1745 member_function_or_else, bad_specifiers, grokfndecl, grokvardecl,
1746 check_static_variable_definition, compute_array_index_type,
1747 create_array_type_for_decl, check_special_function_return_type,
1748 grokdeclarator, check_default_argument, grokparms,
1749 grok_ctor_properties, grok_op_properties,
1750 check_elaborated_type_specifier, xref_tag, finish_enum,
1751 build_enumerator, check_function_type, start_preparsed_function,
1752 store_parm_decls): Use quoting formats.
1753 * decl2.c (grok_array_decl, delete_sanity, check_member_template,
1754 check_java_method, check_classfn, finish_static_data_member_decl,
1755 grokfield, grokbitfield, grok_function_init,
1756 build_anon_union_vars, coerce_new_type, coerce_delete_type,
1757 check_default_args): Likewise.
1758 * parser.c (cp_parser_decl_specifier_seq): Likewise.
1760 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1762 Convert diagnostics to use quoting flag q 2/n
1763 * class.c (build_base_path, add_method, alter_access,
1764 handle_using_decl, check_bases,
1765 maybe_warn_about_overly_private_class, find_final_overrider,
1766 warn_hidden, finish_struct_anon, add_implicitly_declared_members,
1767 check_bitfield_decl, check_field_decls, layout_empty_base,
1768 build_base_field, check_methods, layout_virtual_bases,
1769 warn_about_ambiguous_bases, layout_class_type, finish_struct_1,
1770 resolve_address_of_overloaded_function, instantiate_type,
1771 note_name_declared_in_class): Use format flag "q" for quoting.
1773 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1775 Convert diagnostics to use quoting flag q 1/n
1776 * error.c (locate_error): Ignore quoting flag q.
1777 * call.c (build_user_type_conversion_1, build_operator_new_call,
1778 build_object_call, op_error, build_conditional_expr,
1779 build_new_op, build_op_delete_call, enforce_access,
1780 convert_like_real, convert_arg_to_ellipsis, build_x_va_arg,
1781 convert_default_arg, build_over_call, build_new_method_call,
1782 joust, perform_implicit_conversion, initialize_reference): Use the
1785 2004-10-03 Andrew Pinski <pinskia@physics.uc.edu>
1788 * typeck.c (build_reinterpret_cast): Return if the inner type
1791 2004-10-01 Jan Hubicka <jh@suse.cz>
1793 * semantics.c (expand_body): Update call of tree_rest_of_compilation.
1795 2004-09-30 Nathan Sidwell <nathan@codesourcery.com>
1797 * cp-tree.h (struct lang_decl): Shrink by reordering fields and
1798 turning operator_code and fixed_offset into bitfields.
1800 2004-09-29 Joseph S. Myers <jsm@polyomino.org.uk>
1802 * decl.c (duplicate_decls): Merge TREE_DEPRECATED.
1804 2004-09-29 Jason Merrill <jason@redhat.com>
1806 PR tree-optimization/17697
1807 * decl.c (duplicate_decls): Copy TREE_NOTHROW from newdecl to olddecl.
1809 2004-09-28 Jason Merrill <jason@redhat.com>
1812 * class.c (build_base_field): Set TYPE_MODE.
1814 2004-09-28 Roger Sayle <roger@eyesopen.com>
1817 * g++spec.c (lang_specific_driver): Unrecognized libraries, other
1818 than -lc and -lm, may require linking against libstc++.
1820 2004-09-28 Kazu Hirata <kazu@cs.umass.edu>
1822 * tree.c: Fix a comment typo.
1824 2004-09-28 Nathan Sidwell <nathan@codesourcery.com>
1826 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): Remove.
1827 (struct secondary_vptr_vtt_init_data_s): New.
1828 (build_vtt_inits): Adjust dfs_walkers.
1829 (dfs_build_secondary_vptr_vtt_inits): Caller data is a
1830 secondary_vptr_vtt_init_data_s structure. Adjust.
1831 (dfs_ctor_vtable_bases_queue_p): Remove.
1832 (dfs_fixup_binfo_vtbls): No need to clear BINFO_MARKED. Simplify.
1834 * pt.c (struct get_template_base_data_s): Remove.
1835 (get_template_base_r): Fold into get_template_base.
1836 (get_template_base): Walk base binfos directly in inheritance
1839 2004-09-27 Mark Mitchell <mark@codesourcery.com>
1842 * cp-tree.h (fold_if_not_in_template): New function.
1843 * call.c (build_conditional_expr): Use fold_if_not_in_template.
1844 (build_cxx_call): Likewise.
1845 * cvt.c (convert_to_complex): Likewise.
1846 (ocp_convert): Likewise.
1847 (convert): Likewise.
1848 (convert_force): Likewise.
1849 * decl.c (compute_array_index_type): Clear
1850 processing_template_decl while folding array bounds.
1851 * pt.c (convert_nontype_argument): Clear
1852 processing_template_decl while processing non-type argument
1854 * tree.c (fold_if_not_in_template): New function.
1855 * typeck.c (build_class_member_access_expr): Use
1856 fold_if_not_in_template.
1857 (build_array_ref): Likewise.
1858 (build_binary_op): Likewise. Do not try to optimize computations
1859 when processing templates.
1860 (cp_pointer_int_sum): Use fold_if_not_in_template.
1861 (pointer_diff): Likewise.
1862 (build_unary_op): Likewise.
1863 (build_reinterpret_cast): Likewise.
1864 (get_delta_difference): Likewise.
1865 (expand_ptrmemfunc_cst): Likewise.
1866 (dubious_conversion_warnings): Likewise.
1868 2004-09-27 Matt Austern <austern@apple.com>
1870 * cp/parser.c (struct cp_token): New one-bit field , implicit_extern_c
1871 (cp_lexer_get_preprocessor_token): Set implicit_extern_c for
1872 tokens that come from headers that are implicitly extern "C".
1873 (struct cp_parser): new one-bit field, implicit_extern_c.
1874 (cp_parser_new): Set parser's implicit_extern_c to false.
1875 (cp_parser_translation_unit): Pop lang context if we were in a
1876 header that was implicitly extern "C".
1877 (cp_parser_declaration_seq_opt): Push/pop lang context as
1878 required by the token's and parser's implicit_extern_c.
1880 2004-09-27 Mark Mitchell <mark@codesourcery.com>
1883 * cp-tree.h (shared_member_p): Declare.
1884 * search.c (shared_member_p): Give it external linkage.
1885 * semantics.c (finish_qualified_id_expr): Use it.
1886 (finish_id_expression): Likewise.
1889 * semantics.c (finish_id_expression): Do not add "this->" to
1890 static member functions.
1892 2004-09-27 Nathan Sidwell <nathan@codesourcery.com>
1895 * error.c (dump_type): Change TREE_VEC case into TREE_BINFO.
1897 * class.c (struct count_depth_data): Remove.
1898 (dfs_depth_post, dfs_depth_q): Remove.
1899 (find_final_overrider): Use number of vbase classes as depth
1902 * cp-tree.h (types_overlap_p): Remove.
1903 * search.c (struct overlap_info): Remove.
1904 (dfs_check_overlap, dfs_no_overlap_yet, types_overlap_p): Remove.
1906 * pt.c (GTB_VIA_VIRTUAL, GTB_IGNORE_TYPE): Remove.
1907 (get_template_base_recursive): Remove. Replace with ...
1908 (get_template_base_r): ... this.
1909 (struct get_template_base_data_s): New.
1910 (get_template_base): Use get_template_base_r via dfs_walk. Always
1911 return NULL on failure.
1912 (unify): Remove error_mark_node check from get_template_base result.
1914 2004-09-24 Paolo Bonzini <bonzini@gnu.org>
1916 * parser.c (cp_parser_expression_stack): Clarify why it is
1917 an array of NUM_PREC_VALUES elements.
1918 (cp_parser_binary_expression): Clarify why we do not need to
1919 handle stack overflow.
1921 2004-09-24 Nathan Sidwell <nathan@codesourcery.com>
1924 * search.c (lookup_field_queue_p): Correct check for hidden base.
1926 * search.c (bfs_walk): Remove.
1927 (lookup_member): Use dfs_walk_real.
1928 (dfs_walk_real): Move and adjust documentation from bfs_walk.
1930 2004-09-23 Zack Weinberg <zack@codesourcery.com>
1932 * decl.c (grokfndecl): If ::main is found not to return int,
1933 correct it after issuing a diagnostic.
1934 (grokdeclarator): If the incoming type was error_mark_node, do
1935 not complain about declaring something with no type.
1936 (start_function): Change check for ::main not returning int to
1937 an assertion, as grokfndecl now catches this when the user did it.
1938 * init.c (perform_member_init, sort_mem_initializers)
1939 (emit_mem_initializers): Make most diagnostics be issued on
1940 the line of current_function_decl, not whatever the current
1942 * parser.c (cp_lexer_peek_token_emit_debug_info): Surround
1943 definition and declaration with #ifdef ENABLE_CHECKING.
1944 Avoid unnecessary use of fprintf.
1945 (cp_lexer_print_token, cp_lexer_debug_stream): Adjust stub
1946 definitions to avoid warnings.
1947 (cp_lexer_new_main): Add assertion that first token is not a
1949 (cp_lexer_new_from_token_array): Fold into ...
1950 (cp_lexer_new_from_tokens): ... here. Add assertion that
1951 first token is not a padding token.
1952 (cp_lexer_set_source_position_from_token): Move nearer to callers.
1953 Remove unused lexer argument.
1954 (cp_lexer_peek_token): Just print debugging report (if enabled)
1955 and return lexer->next_token.
1956 (cp_lexer_skip_purged_tokens): Delete.
1957 (cp_lexer_next_token_is, cp_lexer_next_token_is_not): Make
1958 inline, simplify bodies.
1959 (cp_lexer_peek_nth_token): Add debugging report a la
1960 cp_lexer_peek_token.
1961 (cp_lexer_consume_token): Correct commentary. Advance over
1962 purged tokens here. Set current source position here, from
1963 token to be returned. Avoid unnecessary use of fprintf.
1964 (cp_lexer_purge_token): Advance next_token pointer over this and
1965 subsequent purged tokens.
1966 (cp_parser_error): Adjust source position to that of the
1968 (cp_parser_push_lexer_for_tokens, cp_parser_pop_lexer): New functions.
1969 (cp_parser_string_literal): Remove some excessive cleverness.
1970 (cp_parser_enum_specifier): Call start_enum before consuming
1972 (cp_parser_member_declaration): Make the "extra semicolon"
1973 diagnostic consistently-worded with the other place this is
1974 diagnosed. Explicitly set the diagnostic location to the
1975 location of the offending semicolon.
1976 (cp_parser_enclosed_template_argument_list): Use %</%> quoting
1977 in diagnostics. Do not use cp_parser_require. Set location
1978 of diagnostics about improper use of '>>' to location of
1980 (cp_parser_late_parsing_for_member):
1981 Use cp_parser_push_lexer_for_tokens and cp_parser_pop_lexer.
1982 (cp_parser_late_parsing_default_args): Likewise. Manually
1983 move some logic outside the loop.
1985 2004-09-23 Andrew Pinski <pinskia@physics.uc.edu>
1988 * cvt.c (cp_convert_to_pointer): Return early when the type is
1991 2004-09-21 Fariborz Jahanian <fjahanian@apple.com>
1995 * decl.c (grokfndecl): Add new argument "attrlist", use it
1996 to call cplus_decl_attributes.
1997 (start_function): Remove call to cplus_decl_attributes.
1998 * cvt.c (ocp_convert): Add support to use type conversion
1999 function to vector type.
2000 * parser.c (cp_parser_conversion_type_id): Add attributes, if any,
2003 2004-09-23 Paolo Bonzini <bonzini@gnu.org>
2007 * parser.c (cp_parser_token_tree_map_node,
2008 cp_parser_pm_expression, cp_parser_additive_expression,
2009 cp_parser_multiplicative_expression, cp_parser_shift_expression,
2010 cp_parser_relational_expression, cp_parser_equality_expression,
2011 cp_parser_and_expression, cp_parser_exclusive_or_expression,
2012 cp_parser_inclusive_or_expression,
2013 cp_parser_logical_and_expression,
2014 cp_parser_logical_or_expression): Removed.
2015 (enum cp_parser_prec, struct cp_parser_token_tree_map_node,
2016 binops, binops_by_token): New.
2017 (cp_parser_assignment_expression): Use cp_parser_binary_expression.
2018 (cp_parser_new): Initialize binops_by_token.
2019 (cp_parser_binary_expression): Rewritten.
2022 2004-09-23 Kazu Hirata <kazu@cs.umass.edu>
2024 * parser.c: Fix a comment typo.
2026 2004-09-23 Nathan Sidwell <nathan@codesourcery.com>
2029 * decl.c (xref_basetypes): Look through typedefs before checking
2032 2004-09-22 Nathan Sidwell <nathan@codesourcery.com>
2034 * cp-tree.h (unemitted_tinfo_decls): Make a VEC(tree).
2035 * decl2.c (cp_finish_file): Adjust tinfo decl emission loop.
2036 * rtti.c (unemitted_tinfo_decls): Make a VEC(tree).
2037 (init_rtti_processing): Initialize it to something realistic.
2038 (get_tinfo_decl): Adjust pushing the new decl.
2040 * cp-tree.h (struct lang_type_class): Remove marked flags, add
2041 diamond_shaped and repeated_base flags. Reorder to keep 8-bit blocks.
2042 (TYPE_MARKED_P): New.
2043 (CLASSTYPE_DIAMOND_SHAPED_P, CLASSTYPE_REPEATED_BASE_P): New.
2044 (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
2045 CLEAR_CLASSTYPE_MARKED_N): Remove.
2046 (CLASSTYPE_MARKED_*, SET_CLASSTYPE_MARKED_*,
2047 CLEAR_CLASSTYPE_MARKED_*): Remove.
2048 * decl.c (xref_basetypes): Use TYPE_MARKED_P. Determine diamond
2049 shaped and repeated base properties.
2050 * lex.c (cxx_make_type): Don't clear TYPE_ALIAS_SET.
2051 * rtti.c (dfs_class_hint_mark, dfs_class_hint_unmark,
2052 class_hint_flags): Remove.
2053 (get_pseudo_ti_init): Use CLASSTYPE_REPEATED_BASE_P and
2054 CLASSTYPE_DIAMOND_SHAPED_P.
2056 2004-09-21 Ziemowit Laski <zlaski@apple.com>
2058 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved here from
2060 (objcp_tsubst_copy_and_build): Reformat function signature.
2061 * cp-objcp-common.h (objcp_tsubst_copy_and_build): Likewise.
2062 (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved to cp-lang.c.
2064 2004-09-21 Zack Weinberg <zack@codesourcery.com>
2066 * parser.c (cp_lexer_peek_token, cp_lexer_consume_token):
2067 Don't handle CPP_PRAGMA tokens specially.
2068 (cp_lexer_handle_pragma): Use cp_lexer_consume_token. Don't
2069 purge the token; do clear token->value after processing. Add
2070 assertion at beginning that token->value is nonzero.
2071 (cp_parser_statement, cp_parser_declaration_seq_opt): Handle
2072 CPP_PRAGMA as a full statement or declaration in its own right.
2074 2004-09-21 Matt Austern <austern@apple.com>
2077 * decl.c (grokvardecl): Accept declarations of global variables
2078 using anonymous types.
2080 2004-09-21 Roger Sayle <roger@eyesopen.com>
2083 * tree.c (lvalue_p_1): Disallow MIN_EXPR and MAX_EXPR as lvalues
2084 if either operand has side-effects.
2085 * typeck.c (rationalize_conditional_expr): Assert that neither
2086 operand of MIN_EXPR or MAX_EXPR has side-effects.
2087 (build_modify_expr): Add support for MIN_EXPR and MAX_EXPR.
2088 Check that the "lhs" is a valid lvalue, i.e. that neither operand
2089 of a MIN_EXPR or MAX_EXPR has a side-effect.
2091 2004-09-21 Nathan Sidwell <nathan@codesourcery.com>
2093 * cp-tree.h (struct lang_type_header): Remove
2094 uses_multiple_inheritance field.
2095 (TYPE_USES_MULTIPLE_INHERITANCE): Remove.
2096 (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): Remove.
2097 (TYPE_USES_VIRTUAL_BASECLASSES): Remove.
2098 (DECL_NEEDS_VTT_PARM_P): Use CLASSTYPE_VBASECLASSES.
2099 (TYPE_CONTAINS_VPTR_P): Likewise.
2100 * call.c (add_template_candidate_real): Use
2101 CLASSTYPE_VBASECLASSES.
2102 (build_special_member_call): Likewise.
2103 * class.c (finish_struct_bits): Remove
2104 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P & TYPE_USES_VIRTUAL_BASECLASSES
2106 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
2107 (create_vtable_ptr): Remove TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P
2109 (build_vtt_inits): Use CLASSTYPE_VBASECLASSES.
2110 (accumulate_vtbl_inits, build_vbase_offset_vtbl_entries):
2112 * decl.c (xref_basetypes): Remove TYPE_USES_MULTIPLE_INHERITANCE,
2113 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
2115 (cxx_maybe_build_cleanup): Use CLASSTYPE_VBASECLASSES.
2116 * decl2.c (maybe_retrofit_in_chrg): Likewise.
2117 * init.c (expand_member, push_base_cleanups): Likewise.
2118 * pt.c (instantiate_class_template): Remove
2119 TYPE_USES_MULTIPLE_INHERITANCE,
2120 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
2122 * ptree.c (cxx_print_type): Remove TYPE_USES_MULTIPLE_INHERITANCE
2124 * typeck2.c (process_init_constructor): Replace some sorrys with
2127 2004-09-21 Andreas Tobler <a.tobler@schweiz.ch>
2129 * decl.c (reshape_init_array): Initialize max_index_cst to fix
2132 2004-09-20 Mark Mitchell <mark@codesourcery.com>
2135 * pt.c (tsubst): Fix parentheses to accomodate emacs.
2136 (tsubst_baselink): If we get a single function, mark it as used.
2138 2004-09-20 Matt Austern <austern@apple.com>
2139 Zack Weinberg <zack@codesourcery.com>
2141 * decl.c (make_rtl_for_nonlocal_decl, start_preparsed_function):
2142 Apply lbasename to input_filename before passing to get_fileinfo.
2143 * semantics.c (begin_class_definition): Likewise.
2144 * lex.c (handle_pragma_interface): Apply get_fileinfo to the
2145 correct filename. Rename variables to be less confusing.
2146 (handle_pragma_implementation): Likewise. Disable "appears
2147 after file is included" diagnostic.
2149 * parser.c (struct cp_token): Add in_system_header fiag.
2150 (CP_TOKEN_BLOCK_NUM_TOKENS, struct cp_token_block)
2151 (CP_TOKEN_BUFFER_SIZE, cp_token_cache_push_token)
2152 (CPP_NONE, cp_lexer_read_token): Delete.
2153 (struct cp_lexer): Remove first_token, string_tokens,
2154 main_lexer_p fields. Clarify comments.
2155 (struct cp_token_cache): Now just a pair of pointers.
2156 (CP_LEXER_BUFFER_SIZE): New #define.
2157 (CPP_PURGED): New fake token type.
2158 (cp_lexer_new_from_token_array, cp_lexer_destroy)
2159 (cp_lexer_peek_token_emit_debug_info, cp_lexer_skip_purged_tokens)
2160 (cp_lexer_handle_pragma, cp_token_cache_new, cp_parser_string_literal):
2162 (cp_lexer_new_from_tokens): Now a simple wrapper around
2163 cp_lexer_new_from_token_array.
2164 (cp_lexer_set_source_position_from_token): Also update
2166 (cp_lexer_next_token, cp_lexer_prev_token, cp_lexer_advance_token):
2168 (cp_lexer_token_difference): Dont handle wrapping round.
2169 (cp_lexer_new_main): Enable pragma deferral and raw strings,
2170 read the entire translation unit through c_lex_with_flags into
2171 this lexer's buffer, then turn raw strings back off again.
2172 (cp_lexer_grow_buffer): Adjust for buffer no longer being circular.
2173 (cp_lexer_get_preprocessor_token): No need to handle not being
2174 the main lexer. Set token->in_system_header too.
2175 (cp_lexer_peek_token): Skip purged tokens. Feed pragma tokens
2176 to cp_lexer_handle_pragma. No need to call cp_lexer_read_token.
2177 (cp_lexer_peek_nth_token): Likewise.
2178 (cp_lexer_purge_token): Mark the token PURGED, don't shift all
2179 the other tokens down.
2180 (cp_lexer_purge_tokens_after): Likewise.
2181 (cp_lexer_save_tokens, cp_lexer_rollback_tokens): Don't worry
2182 about there being no tokens.
2183 (cp_lexer_print_token): Revise to give useful information on
2185 (struct cp_parser): Add field translate_strings_p.
2186 (cp_parser_new): Initialize it.
2187 (cp_parser_translation_unit): Destroy the lexer when done.
2188 (cp_parser_parameter_declaration): Restructure saving of
2190 (cp_parser_save_member_function_body): Likewise.
2191 (cp_parser_check_for_invalid_template_id)
2192 (cp_parser_nested_name_specifier_opt, cp_parser_template_id):
2193 Adjust calls to cp_lexer_advance_token.
2194 (cp_parser_skip_to_closing_parenthesis, cp_parser_declaration):
2195 No need to fiddle c_lex_string_translate.
2196 (cp_parser_primary_expression, cp_parser_linkage_specification)
2197 (cp_parser_asm_definition, cp_parser_asm_specification_opt)
2198 (cp_parser_asm_operand_list, cp_parser_asm_clobber_list)
2199 Use cp_parser_string_literal.
2200 (cp_parser_attribute_list): Save and restore
2201 parser->translate_strings_p, not c_lex_string_translate.
2202 (cp_parser_cache_group): Delete.
2203 (cp_parser_cache_group_1): Rename cp_parser_cache_group. Do
2204 not take a cache argument.
2206 2004-09-20 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2209 * decl.c (reshape_init): Extract array handling into...
2210 (reshape_init_array): New function. Use integers instead of trees
2211 for indices. Handle out-of-range designated initializers.
2213 2004-09-20 Steven Bosscher <stevenb@suse.de>
2215 * lex.c (cxx_init): Don't set the ridpointer for RID_NULL
2218 2004-09-19 Mark Mitchell <mark@codesourcery.com>
2220 * decl2.c (determine_visibility): Allow class visibility
2221 directives to override targetm.cxx.export_class_data.
2223 2004-09-18 Kazu Hirata <kazu@cs.umass.edu>
2225 * call.c, semantics.c: Follow spelling conventions.
2226 * class.c: Fix a comment typo.
2228 2004-09-16 Geoffrey Keating <geoffk@apple.com>
2231 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
2232 (handle_pragma_implementation): Likewise.
2234 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
2235 Zack Weinberg <zack@codesourcery.com>
2237 * cp-tree.def: Use tree_code_class enumeration constants
2238 instead of code letters.
2239 * call.c, class.c, cp-gimplify.c, cp-lang.c, cxx-pretty-print.c
2240 * mangle.c, pt.c, semantics.c, tree.c, typeck.c:
2241 Update for new tree-class enumeration constants.
2243 2004-09-16 Mark Mitchell <mark@codesourcery.com>
2246 * parser.c (cp_parser_simple_declaration): Commit to tentative
2247 parses after seeing a decl-specifier.
2248 (cp_parser_simple_declaration): Eliminate spurious message.
2249 (cp_parser_init_declarator): Adjust error message.
2252 * lex.c (unqualified_name_lookup_error): Mark the dummy
2253 declaration as used.
2256 * parser.c (cp_parser_nested_name_specifier): Do not resolve
2257 typename types if the user explicitly said "typename".
2259 2004-09-16 Andrew MacLeod <amacleod@redhat.com>
2261 * error.c (dump_decl): Make sure there is lang_specific info before
2262 checking for DTOR and CTOR decls.
2264 2004-09-16 Nathan Sidwell <nathan@codesourcery.com>
2266 * class.c (copy_virtuals): Remove.
2267 (build_primary_vtable): Use copy_list directly.
2268 (build_secondary_vtable): Likewise.
2269 (update_vtable_entry_for_fn): Clear BV_CALL_INDEX here.
2270 (create_vtable_ptr): Likewise.
2272 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
2274 * search.c: Follow spelling conventions.
2276 2004-09-16 Nathan Sidwell <nathan@codesourcery.com>
2278 * cp-tree.h (struct lang_type_class): Make pure_virtuals a
2280 (CLASSTYPE_INLINE_FRIENDS, CLASSTYPE_PURE_VIRTUALS): Update
2282 * call.c (build_new_method_call): Don't confirm a pure virtual is
2283 in CLASSTYPE_PURE_VIRTUALS. Reorder checks. Make it a warning.
2284 * class.c (check_methods): CLASSTYPE_INLINE_FRIENDS is a VEC(tree).
2285 (fixup_inline_methods, finish_struct): Likewise.
2286 * decl.c (finish_method): Likewise.
2287 * search.c (dfs_get_pure_virtuals, get_pure_virtuals):
2288 CLASSTYPE_PURE_VIRTUALS is a VEC(tree).
2289 * typeck2.c (abstract_virtuals_error): Likewise. Truncate the
2290 vector to avoid repeating the list in error messages.
2292 2004-09-15 Mark Mitchell <mark@codesourcery.com>
2294 * cp-objcp-common.h (LANG_HOOKS_COMDAT_GROUP): Define.
2295 * cp-tree.h (cxx_comdat_group): Declare.
2296 * decl.c (cxx_comdat_group): New function.
2298 2004-09-15 Nathan Sidwell <nathan@codesourcery.com>
2300 * search.c (get_pure_virtuals): Remove unused variables.
2302 * cp-tree.h (struct lang_decl_flags): Remove
2303 needs_final_overrider.
2304 (DECL_NEEDS_FINAL_OVERRIDER_P): Remove.
2305 * decl.c (duplicate_decls): Do not copy DECL_NEEDS_FINAL_OVERRIDER_P.
2306 * class.c (finish_struct_bits): Correct comment about
2307 CLASSTYPE_PURE_VIRTUALS.
2308 * search.c (get_pure_virtuals): Remove useless loop.
2310 2004-09-14 Mark Mitchell <mark@codesourcery.com>
2313 * mangle.c (partially_mangled_name): New variable.
2314 (partially_mangled_name_len): Likewise.
2315 (save_partially_mangled_name): New function.
2316 (restore_partially_mangled_name): Likewise.
2317 (write_encoding): Save and restore partially mangled names around
2318 calls to get_mostly_instantiated_function_type.
2319 (write_unqualified_name): Likewise.
2321 2004-09-14 Nathan Sidwell <nathan@codesourcery.com>
2323 * pt.c (unify): Replace gcc_unreachable with gcc_assert.
2325 2004-09-13 Mark Mitchell <mark@codesourcery.com>
2328 * parser.c (cp_parser_id_expression): Correct value for
2330 (cp_parser_nested_name_specifier_opt): Look through typenames as
2332 (cp_parser_template_name): Honor check_dependency_p.
2335 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name):
2339 * pt.c (unify): Add ENUMERAL_TYPE case. Replace sorry with
2342 2004-09-12 Richard Henderson <rth@redhat.com>
2345 * semantics.c (maybe_cleanup_point_expr): Don't call fold.
2346 * typeck.c (condition_conversion): Likewise.
2348 2004-09-11 Richard Henderson <rth@redhat.com>
2351 * pt.c (cur_stmt_expr): Move from tsubst_expr.
2352 (tsubst_expr) <case STMT_EXPR>: Move ...
2353 (tsubst_copy_and_build): ... here.
2355 2004-09-10 Zack Weinberg <zack@codesourcery.com>
2357 * cp-tree.h (interface_only, interface_unknown): Delete declarations;
2358 comment explaining them moved to c-common.h.
2359 * lex.c (interface_only, interface_unknown, extract_interface_info):
2361 (cxx_finish): Don't reset interface_unknown.
2362 (handle_pragma_interface): Don't set interface_only and
2363 interface_unknown; just the like-named fields in finfo.
2364 (handle_pragma_implementation): Adjust comment.
2365 * decl2.c (cp_finish_file): Don't reset interface_only and
2367 * method.c (synthesize_method): Don't reset interface_unknown or
2368 call extract_interface_info.
2369 * pt.c (pop_tinst_level): Don't call extract_interface_info.
2370 * decl.c (start_cleanup_fn): Don't save or restore interface_only
2371 and interface_unknown.
2372 (make_rtl_for_nonlocal_decl): Call get_fileinfo on input_filename
2373 and use the result instead of the interface_only/interface_unknown
2375 (start_preparsed_function): Likewise.
2376 * lex.c (cxx_make_type): Likewise.
2377 * semantics.c (begin_class_definition): Likewise.
2378 (expand_body): Don't call extract_interface_info.
2380 2004-09-10 Ziemowit Laski <zlaski@apple.com>
2382 * decl.c (objc_mark_locals_volatile): Make description of
2383 routine more descriptive; only mark VAR_DECLs at each
2386 2004-09-10 Richard Henderson <rth@redhat.com>
2389 * call.c (build_vfield_ref): Move...
2390 * class.c (build_vfield_ref): ... here. Convert datum to the
2391 primary base containing the vptr.
2392 (make_new_vtable): Simplify build_primary_vtable arguments.
2393 (finish_struct_1): Do not duplicate TYPE_VFIELD.
2394 * typeck.c (build_class_member_access_expr): Don't warn for
2395 null object access to base fields.
2397 2004-09-10 Ziemowit Laski <zlaski@apple.com>
2399 * decl.c (objc_get_current_scope, objc_mark_locals_volatile):
2400 New functions, to be called from ObjC++.
2402 2004-09-10 Kazu Hirata <kazu@cs.umass.edu>
2404 * class.c, cp-tree.h, decl.c, decl2.c, mangle.c,
2405 name-lookup.h, parser.c, search.c, semantics.c, typeck2.c: Fix
2408 2004-09-09 Ziemowit Laski <zlaski@apple.com>
2410 * typeck.c (build_c_cast): Preserve the cast if casting
2411 to and from an Objective-C type.
2413 2004-09-09 Ziemowit Laski <zlaski@apple.com>
2415 * Make-lang.in (cp/typeck.o): Depend on c-common.h.
2416 * typeck.c: Include c-common.h.
2417 (comptypes): For RECORD_TYPEs, call objc_comptypes() and
2418 return the result if nonnegative.
2420 2004-09-09 Zack Weinberg <zack@codesourcery.com>
2422 * decl2.c (import_export_class)
2423 * lex.c (handle_pragma_interface):
2424 Test MULTIPLE_SYMBOL_SPACES with if, not #ifdef.
2426 2004-09-08 Ziemowit Laski <zlaski@apple.com>
2428 * Make-lang.in (cp/semantics.o): Depend on c-common.h.
2429 * semantics.c: Include c-common.h.
2430 (finish_compound_stmt): Call objc_clear_super_receiver().
2432 2004-09-08 Ziemowit Laski <zlaski@apple.com>
2434 * cp-tree.h (do_poplevel): New prototype.
2435 * semantics.c (do_poplevel): Make externally visible.
2437 2004-09-08 Nathan Sidwell <nathan@codesourcery.com>
2439 * cp-tree.h (tree_pair_s): Define a GC'd vector.
2440 * name-lookup.h (cxx_saved_binding, cp_class_binding): Likewise.
2441 * semantics.c (deferred_access): Likewise.
2443 2004-09-06 Daniel Jacobowitz <dan@debian.org>
2445 * semantics.c (expand_body): Assert that we are not nested.
2447 2004-09-06 Zack Weinberg <zack@codesourcery.com>
2449 * decl.c (build_enumerator): Use add_double and int_fits_type_p
2450 instead of cp_build_binary_op, to avoid creating short-lived trees.
2451 * parser.c (cp_parse_type_specifier <RID_ENUM>): Use two-token
2452 lookahead instead of backtracking. Move some code to avoid a
2454 (cp_parser_enum_specifier): Avoid duplication of effort with caller.
2455 Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
2456 (cp_parser_enumerator_list, cp_parser_enumerator_definition):
2457 Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
2459 2004-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2461 * decl.c (grok_declarator): Remove a redundant semicolon.
2463 * parser.c (cp_parser_decl_specifier_seq, cp_parser_type_specifier):
2464 Correct comments describing function parameters.
2466 2004-09-03 Matt Austern <austern@apple.com>
2467 Compile speed improvement.
2468 * parser.c (cp_lexer_print_token): Only define if ENABLE_CHECKING set.
2469 Otherwise define a stub macro that expands to nothing.
2470 (cp_lexer_debugging_p): Only define if ENABLE_CHECKING set. Otherwise
2471 define a stub macro that expands to 0.
2472 (cp_lexer_start_debugging): Only define if ENABLE_CHECKING set.
2473 (cp_lexer_stop_debugging): Likewise.
2474 (cp_lexer_debug_stream): Only define if ENABLE_CHECKING set. Otherwise
2475 define a stub macro that expands to NULL.
2476 (cp_lexer_new_main): Only set debugging_p if ENABLE_CHECKING set.
2477 (cp_lexer_new_from_tokens): Likewise.
2479 2004-09-03 Jan Hubicka <jh@suse.cz>
2481 * decl.c (finish_function): Clean out pointers we no longer need.
2483 2004-09-03 Jan Beulich <jbeulich@novell.com>
2485 * g++spec.c (MATH_LIBRARY_PROFILE): Default to MATH_LIBRARY rather
2488 2004-09-02 Paul Brook <paul@codesourcery.com>
2490 * decl2.c (determine_visibility): Only check data visibility
2493 2004-08-31 Mark Mitchell <mark@codesourcery.com>
2495 * cp-tree.h (DECL_CONSTRUCTION_VTABLE_P): New macro.
2496 * class.c (build_ctor_vtbl_group): Set DECL_CONSTRUCTION_VTABLE_P.
2497 * decl2.c (determine_visibility): Honor
2498 TARGET_CXX_EXPORT_CLASS_DATA.
2500 * class.c (key_method): Rename to ...
2501 (determine_key_method): ... this.
2502 (finish_struct_1): Adjust accordingly.
2503 * cp-tree.h (key_method): Declare.
2504 * decl2.c (maybe_emit_vtables): Determine the key method here if
2505 it has not already been done.
2507 2004-08-31 Ziemowit Laski <zlaski@apple.com>
2509 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-objcp-common.o.
2510 (cp/cp-lang.o): Depend on debug.h, gtype-cp.h and cp/cp-objcp-common.h.
2511 (cp/cp-decl.c): Do not depend on gtype-cp.h.
2512 (cp/cp-objcp-common.o): New target.
2513 * cp-lang.c: Include debug.h, cp-objcp-common.h and gtype-cp.h.
2514 (cxx_get_alias_set, cxx_warn_unused_global_decl, cp_expr_size,
2515 cp_tree_size, cp_var_mod_type_p, cxx_initialize_diagnostics): Move
2516 prototypes and definitions to cp-objcp-common.h and cp-objcp-common.c,
2518 (LANG_HOOKS_TREE_SIZE, LANG_HOOKS_FINISH,
2519 LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_INIT_OPTIONS,
2520 LANG_HOOKS_INITIALIZE_DIAGNOSTICS, LANG_HOOKS_HANDLE_OPTION,
2521 LANG_HOOKS_HANDLE_FILENAME, LANG_HOOKS_MISSING_ARGUMENT,
2522 LANG_HOOKS_POST_OPTIONS, LANG_HOOKS_GET_ALIAS_SET,
2523 LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_EXPAND_EXPR,
2524 LANG_HOOKS_EXPAND_DECL, LANG_HOOKS_PARSE_FILE,
2525 LANG_HOOKS_DUP_LANG_SPECIFIC_DECL, LANG_HOOKS_TRUTHVALUE_CONVERSION,
2526 LANG_HOOKS_SET_DECL_ASSEMBLER_NAME, LANG_HOOKS_MARK_ADDRESSABLE,
2527 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
2528 LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
2529 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_PRINT_ERROR_FUNCTION,
2530 LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL, LANG_HOOKS_WRITE_GLOBALS,
2531 LANG_HOOKS_FUNCTION_INIT, LANG_HOOKS_FUNCTION_FINAL,
2532 LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P,
2533 LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE,
2534 LANG_HOOKS_ATTRIBUTE_TABLE, LANG_HOOKS_TREE_INLINING_WALK_SUBTREES,
2535 LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN,
2536 LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS,
2537 LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P,
2538 LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P,
2539 LANG_HOOKS_TREE_INLINING_VAR_MOD_TYPE_P,
2540 LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN,
2541 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN, LANG_HOOKS_EXPR_SIZE,
2542 LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR,
2543 LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, LANG_HOOKS_MAKE_TYPE,
2544 LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE,
2545 LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
2546 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE, LANG_HOOKS_INCOMPLETE_TYPE_ERROR,
2547 LANG_HOOKS_TYPE_PROMOTES_TO, LANG_HOOKS_REGISTER_BUILTIN_TYPE,
2548 LANG_HOOKS_GIMPLIFY_EXPR, LANG_HOOKS_FOLD_OBJ_TYPE_REF): Move
2549 hooks to cp-objcp-common.h.
2550 (finish_file): New function.
2551 * cp-objcp-common.c: New file.
2552 * cp-objcp-common.h: New file.
2553 * cp-tree.h (cp_finish_file): New prototype.
2554 * decl.c: Do not include gtype-cp.h.
2555 * decl2.c (finish_file): Rename to cp_finish_file.
2557 2004-08-31 Richard Henderson <rth@redhat.com>
2560 * pt.c (tsubst_expr): Move OFFSETOF_EXPR handling ...
2561 (tsubst_copy_and_build): ... here.
2563 2004-08-30 Mark Mitchell <mark@codesourcery.com>
2565 * cp-tree.h (initialize_artificial_var): Declare.
2566 * decl.c (initialize_artifical_var): New function.
2567 * class.c (initialize_array): Remove.
2568 (initialize_vtable): Use initialize_artificial_var.
2569 (build_vtt): Likewise.
2570 (build_ctor_vtbl_group): Likewise.
2572 2004-08-30 Richard Henderson <rth@redhat.com>
2574 * class.c (build_base_path): Use build_address directly.
2575 * typeck.c (build_unary_op): Don't lower &a.b to pointer
2576 arithmetic directly.
2577 * typeck2.c (store_init_value): Don't assume !TREE_CONSTANT
2578 means !initializer_constant_valid_p.
2580 2004-08-30 Richard Henderson <rth@redhat.com>
2582 * class.c (fixed_type_or_null): Use get_base_address before
2583 assuming an ADDR_EXPR is non-null.
2585 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
2587 * name-lookup.c (pop_binding, pushdecl,
2588 set_identifier_type_value_with_scope, push_overloaded_decl,
2589 arg_assoc_type): Replace abort with gcc_assert or gcc_unreachable.
2590 * parser.c (cp_parser_diagnose_invalid_type_name,
2591 cp_parser_postfix_expression, cp_parser_unary_expression,
2592 cp_parser_check_declarator_template_para): Likewise.
2593 * pt.c (push_inline_template_parms_recursive,
2594 check_explicit_specialization, convert_nontype_argument,
2595 coerce_template_template_parms, uses_template_parms,
2596 instantiate_class_template, tsubst_decl, tsubst, tsubst_copy,
2597 tsubst_expr, instantiate_template,
2598 maybe_adjust_types_for_deduction, type_unification_real,
2599 resolve_overloaded_unification, template_decl_level,
2600 type_dependent_expression_p): Likewise.
2601 * search.c (lookup_base_r): Likewise.
2602 * semantics.c (finish_stmt_expr, simplify_aggr_init_expr): Likewise.
2603 * tree.c (lvalue_p_1, count_functions, cxx_printable_name,
2604 verify_stmt_tree_r, get_type_decl, stabilize_call): Likewise.
2605 * typeck.c (common_type, get_member_function_from_ptrfunc,
2606 build_binary_op, build_unary_op, expand_ptrmemfunc_cst): Likewise.
2607 * typeck2.c (cxx_incomplete_type_diagnostic,
2608 split_nonconstant_init_1, store_init_value,
2609 process_init_constructor): Likewise.
2611 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
2613 * call.c (check_dtor_name): Replace abort with gcc_assert or
2615 (build_call, add_builtin_candidate, build_new_op,
2616 convert_like_real, build_over_call, in_charge_arg_for_name,
2617 source_type, joust): Likewise.
2618 * class.c (build_simple_base_path, get_vcall_index,
2619 finish_struct_1, instantiate_type, get_enclosing_class,
2620 add_vcall_offset_vtbl_entries_1, cp_fold_obj_type_ref): Likewise.
2621 * cp-gimplify.c (cp_genericize): Likewise.
2622 * cp-lang.c (cp_expr_size, cp_tree_size): Likewise.
2623 * cvt.c (cp_convert_to_pointer, ocp_convert): Likewise.
2624 * decl.c (poplevel, make_unbound_class_template, reshape_init,
2625 check_special_function_return_type, grokdeclarator,
2626 grok_op_properties, tag_name, xref_tag, start_preparsed_function,
2627 finish_function): Likewise.
2628 * decl2.c (grokfield, maybe_emit_vtables):Likewise.
2629 * error.c (dump_global_iord, dump_decl, dump_template_decl,
2630 language_to_string): Likewise.
2631 * except.c (choose_personality_routine): Likewise.
2632 * friend.c (do_friend): Likewise.
2633 * g++spec.c (lang_specific_driver): Likewise.
2634 * init.c (build_zero_init, expand_default_init, build_new_1,
2635 build_vec_delete_1, build_vec_init, build_dtor_call): Likewise.
2636 * lex.c (retrofit_lang_decl, cp_type_qual_from_rid): Likewise.
2637 * mangle.c (add_substitution, write_unscoped_name,
2638 write_template_prefix, write_identifier,
2639 write_special_name_destructor, write_type, write_builtin_type,
2640 write_expression, write_template_param,
2641 write_java_integer_type_codes): Likewise.
2642 * method.c (implicitly_declare_fn): Likewise.
2644 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
2646 * cp-tree.h (BINFO_PRIMARY_P): Use a binfo flag.
2647 (BINFO_INDIRECT_PRIMARY_P): Remove.
2648 * class.c (determine_primary_base): Rename to ...
2649 (determine_primary_bases): ... here. Set all primary bases.
2650 (set_primary_base): Remove.
2651 (mark_primary_bases): Remove.
2652 (build_simple_base_path, walk_subobject_offsets,
2653 propagate_binfo_offsets, end_of_class): Adjust.
2654 (layout_class_type): Rename determine_primary_base call.
2655 (dump_class_hierarchy_r, dump_vtable): Adjust. Don't pass a binfo
2657 (dfs_build_secondary_vptr_vtt_inits, dfs_accumulate_vtbl_inits,
2658 build_rtti_vtbl_entries): Adjust.
2659 * init.c (build_vtbl_address): Adjust.
2661 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Use gcc_assert.
2663 2004-08-28 Ziemowit Laski <zlaski@apple.com>
2665 * Make-lang.in (CXX_OBJS): Split up into CXX_OBJS and
2666 CXX_AND_OBJCXX_OBJS.
2667 (CXX_C_OBJS): Include in CXX_AND_OBJCXX_OBJS instead of listing
2668 separately on the link line.
2670 2004-08-28 Jason Merrill <jason@redhat.com>
2672 * decl.c (expand_static_init): Avoid bogus warnings.
2674 2004-08-27 Jason Merrill <jason@redhat.com>
2677 * tree.c (stabilize_init): See through a COMPOUND_EXPR.
2680 * decl.c (expand_static_init): Use thread-safety API.
2681 (register_dtor_fn): Return the call, don't expand it.
2682 * tree.c (add_stmt_to_compound): New fn.
2683 (stabilize_call): Use it.
2685 2004-08-27 Richard Henderson <rth@redhat.com>
2687 * cp-tree.def (OFFSETOF_EXPR): New.
2688 * parser.c (cp_parser_builtin_offsetof): Either built an
2689 OFFSETOF_EXPR, or call fold_offsetof immediately.
2690 * pt.c (tsubst_expr): Handle OFFSETOF_EXPR.
2692 2004-08-27 Nathan Sidwell <nathan@codesourcery.com>
2694 * call.c (validate_conversion_obstack): Replace
2695 my_friendly_assert with gcc_assert or gcc_unreachable.
2696 (direct_reference_binding, merge_conversion_sequences,
2697 build_user_type_conversion_1, perform_overload_resolution,
2698 build_op_delete_call, enforce_access, call_builtin_trap,
2699 build_over_call, build_special_member_call, build_new_method_call,
2700 initialize_reference): Likewise.
2701 * class.c (build_base_path, build_primary_vtable, alter_access,
2702 check_bases, update_vtable_entry_for_fn, layout_empty_base,
2703 clone_function_decl, adjust_clone_args,
2704 type_requires_array_cookie, include_empty_classes,
2705 finish_struct_1, resolve_address_of_overloaded_function,
2706 instantiate_type, get_vtbl_decl_for_binfo, build_vtt_inits,
2707 dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
2708 accumulate_vtbl_inits, build_vtbl_initializer,
2709 build_vbase_offset_vtbl_entries, build_rtti_vtbl_entries): Likewise.
2710 * cvt.c (build_up_reference, convert_to_reference): Likewise.
2711 * decl.c (poplevel, duplicate_decls, make_typename_type,
2712 cxx_init_decl_processing, reshape_init, check_initializer,
2713 make_rtl_for_nonlocal_decl, initialize_local_var, cp_finish_decl,
2714 expand_static_init, grokfndecl, grokvardecl, build_ptrmem_type,
2715 grokdeclarator, copy_fn_p, grok_op_properties, xref_tag,
2716 xref_basetypes, start_preparsed_function, save_function_data,
2717 finish_function, finish_method, maybe_register_incomplete_var,
2718 complete_vars): Likewise.
2719 * decl2.c (grok_array_decl, check_member_template,
2720 check_classfn, finish_static_data_member_decl, coerce_new_type,
2721 coerce_delete_type, import_export_class, decl_needed_p,
2722 determine_visibility, import_export_decl, build_cleanup,
2723 start_static_initialization_or_destructi, do_static_destruction,
2724 prune_vars_needing_no_initialization,
2725 build_offset_ref_call_from_tree): Likewise.
2726 * error.c (dump_decl, dump_expr): Likewise.
2727 * init.c (finish_init_stmts, build_zero_init,
2728 expand_virtual_init, expand_default_init, expand_aggr_init_1,
2729 build_offset_ref, build_new_1, build_delete, build_vbase_delete):
2731 * mangle.c (write_method_parms, write_template_args,
2732 write_expression, write_template_arg): Likewise.
2733 * method.c (make_thunk, finish_thunk, use_thunk): Likewise.
2734 * name-lookup.c (pop_binding, begin_scope, leave_scope,
2735 resume_scope, push_using_decl, validate_nonmember_using_decl,
2736 is_ancestor, poplevel_class, set_inherited_value_binding_p,
2737 push_class_level_binding, do_class_using_decl, push_namespace,
2738 pop_namespace, add_using_namespace, ambiguous_decl,
2739 lookup_namespace_name, lookup_type_current_level,
2740 maybe_process_template_type_declaration): Likewise.
2741 * parser.c (cp_lexer_peek_nth_token,
2742 cp_parser_parse_and_diagnose_invalid_typ,
2743 cp_parser_translation_unit, cp_parser_template_id,
2744 cp_parser_lookup_name, cp_parser_late_parsing_for_member): Likewise.
2745 * pt.c (push_access_scope, finish_member_template_decl,
2746 push_inline_template_parms_recursive, add_outermost_template_args,
2747 get_innermost_template_args, begin_explicit_instantiation,
2748 end_explicit_instantiation, retrieve_specialization,
2749 is_specialization_of, is_specialization_of_friend,
2750 register_specialization, check_explicit_specialization,
2751 comp_template_parms, process_template_parm,
2752 process_partial_specialization, convert_nontype_argument,
2753 coerce_template_template_parms, coerce_template_parms,
2754 mangle_class_name_for_template, lookup_template_function,
2755 lookup_template_class, instantiate_class_template, tsubst_decl,
2756 tsubst_function_type, tsubst, tsubst_qualified_id, tsubst_copy,
2757 instantiate_template, fn_type_unification, type_unification_real,
2758 get_template_base, regenerate_decl_from_template,
2759 template_for_substitution, instantiate_decl,
2760 get_mostly_instantiated_function_type, dependent_scope_ref_p,
2761 value_dependent_expression_p, resolve_typename_type): Likewise.
2762 * repo.c (repo_emit_p): Likewise.
2763 * rtti.c (build_headof, get_tinfo_decl, get_pseudo_ti_init,
2764 create_tinfo_types, emit_tinfo_decl): Likewise.
2765 * search.c (lookup_base_r, lookup_base, lookup_field_1,
2766 dfs_access_in_type, build_baselink, lookup_member,
2767 adjust_result_of_qualified_name_lookup, copied_binfo): Likewise.
2768 * semantics.c (perform_or_defer_access_check,
2769 finish_non_static_data_member, finish_stmt_expr_expr,
2770 finish_stmt_expr, finish_call_expr, finish_pseudo_destructor_expr,
2771 finish_template_template_parm, finish_member_declaration,
2772 emit_associated_thunks): Likewise.
2773 * tree.c (build_target_expr_with_type, force_target_expr,
2774 copy_binfo, get_first_fn, cp_tree_equal): Likewise.
2775 * typeck.c (type_after_usual_arithmetic_conversions, comptypes,
2776 cxx_sizeof_or_alignof_type, perform_integral_promotions,
2777 build_class_member_access_expr, finish_class_member_access_expr,
2778 build_ptrmemfunc_access_expr, build_unary_op,
2779 unary_complex_lvalue, cxx_mark_addressable, build_modify_expr,
2780 build_ptrmemfunc, expand_ptrmemfunc_cst, check_return_expr
2781 * typeck2.c (complete_type_check_abstract,
2782 abstract_virtuals_error, process_init_constructor,
2783 add_exception_specifier): Likewise.
2785 2004-08-27 Nathan Sidwell <nathan@codesourcery.com>
2787 * class.c (build_vtbl_initializer): Use ssize_int.
2788 * decl.c (complete_array_type): Likewise.
2789 * method.c (finish_thunk): Likewise.
2790 * search.c (get_dynamic_base_type): Likewise.
2792 2004-08-26 Richard Henderson <rth@redhat.com>
2794 * cp-tree.h (DECL_FIELD_IS_BASE): New.
2795 * class.c (build_base_field): Set it.
2796 (build_simple_base_path): Use it.
2797 (fixed_type_or_null): Don't consider base fields definitive.
2799 2004-08-25 Roger Sayle <roger@eyesopen.com>
2802 PR tree-optimization/16372
2803 * decl.c (finish_enum): Make the precision of the enumerated type
2804 the same width as the underlying integer type.
2806 2004-08-25 Mark Mitchell <mark@codesourcery.com>
2809 * lex.c (build_lang_decl): Set DECL_NO_STATIC_CHAIN for all C++
2812 * mangle.c (get_identifier_nocopy): Add cast.
2814 * cp-tree.h (mangle_type): Remove.
2815 * mangle.c (globals): GTY it.
2816 (mangle_obstack): New variable.
2817 (name_obstack): Likewise.
2818 (name_base): Likewise.
2819 (write_char): Adjust accordingly.
2820 (write_chars): Likewise.
2821 (write_string): Likewise.
2822 (start_mangling): Initialize G.substitutions only one. Add
2824 (finish_mangling): Use VARRAY_CLEAR to reclaim
2825 storage in G.substitutions. Use obstack_finish.
2826 (init_mangle): Adjust for changes to variable names above.
2827 Initialize G.substitutions.
2828 (mangle_decl_string): Adjust call to start_mangling.
2829 (get_identifier_nocopy): New function.
2830 (mangle_decl): Use it.
2831 (mangle_type_string): Adjust call to start_mangling.
2832 (mangle_special_for_type): Likewise.
2833 (mangle_vtt_for_type): Likewise.
2834 (mangle_ctor_vtbl_for_type): Likewise.
2835 (mangle_thunk): Likewise.
2836 (mangle_guard_variable): Likewise.
2837 (mangle_ref_init_variable): Likewise.
2839 2004-08-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2842 * pt.c (redeclare_class_template): Check the type of non-type and
2843 template template parameter.
2845 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
2847 * call.c (convert_class_to_reference): Adjust build_int_cst calls.
2848 (build_user_type_conversion_1, convert_like_real,
2849 build_java_interface_fn_ref, build_special_member_call): Likewise.
2850 * class.c (finish_struct_1, build_vtbl_initializer): Likewise.
2851 * cp-gimplify.c (cp_gimplify_expr): Likewise.
2852 * cvt.c (cp_convert_to_pointer): Likewise.
2853 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
2854 * decl2.c (start_static_initialization_or_destruction,
2855 generate_ctor_or_dtor_function): Likewise.
2856 * except.c (build_throw): Likewise.
2857 * mangle.c (write_integer_cst): Likewise.
2858 * method.c (finish_thunk): Likewise.
2859 * rtti.c (build_headof, get_tinfo_decl_dynamic,
2860 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
2861 get_pseudo_ti_init): Likewise.
2862 * search.c (get_dynamic_cast_base_type): Likewise.
2864 2004-08-25 Zack Weinberg <zack@codesourcery.com>
2866 * class.c, search.c: Remove references to DWARF_DEBUG.
2868 2004-08-25 Adam Nemet <anemet@lnxw.com>
2870 * repo.c (extract_string): Reset backquote after one character.
2871 (get_base_filename): Fix indentation.
2873 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
2875 * decl.c (cxx_init_decl_processing): Adjust
2876 build_common_tree_nodes call.
2878 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
2881 * (is_subobject_of_p): Resurrect & optimize.
2882 (lookup_field_r): Use it.
2884 2004-08-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2887 * search.c (friend_accessible_p): Increment processing_template_decl
2888 when deal with TEMPLATE_DECL of SCOPE.
2890 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
2893 * semantics.c (check_accessibility_of_qualified_id): Defer check
2894 if qualifying_type is a template parameter.
2896 2004-08-23 Mark Mitchell <mark@codesourcery.com>
2899 * pt.c (instantiate_decl): Do not try to apply
2900 DECL_DECLARED_INLINED_P to a VAR_DECL.
2902 * search.c (build_baselink): Fix typo in comment.
2904 2004-08-22 Andrew Pinski <apinski@apple.com>
2907 2004-08-22 Andrew Pinski <apinski@apple.com>
2909 * typeck.c (build_unary_op): Use &a.b if the folded lowered
2910 expression is not constant.
2912 2004-08-23 Nathan Sidwell <nathan@codesourcery.com>
2914 * name-lookup.c (pushdecl): Rename build_type_copy call.
2915 * tree.c (cp_build_qualified_type_real,
2916 build_exception_variant, handle_java_interface_attribute): Likewise.
2918 2004-08-22 Andrew Pinski <apinski@apple.com>
2921 * typeck.c (build_unary_op): Use &a.b if the folded lowered
2922 expression is not constant.
2924 2004-08-20 Mark Mitchell <mark@codesourcery.com>
2927 * decl.c (expand_static_init): Use DECL_FUNCTION_SCOPE_P.
2929 2004-08-21 Joseph S. Myers <jsm@polyomino.org.uk>
2932 * pt.c (tsubst_copy_and_build): Avoid clearing TREE_NO_WARNING for
2935 2004-08-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2937 * pt.c (register_specialization): Check DECL_TEMPLATE_SPECIALIZATION
2938 before calling comp_template_args.
2940 2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
2942 * class.c (build_vtbl_initializer): Use build_int_cst for
2943 negative size types.
2944 * decl.c (complete_array_type): Likewise.
2945 * method.c (finish_thunk): Likewise.
2947 2004-08-20 Andreas Tobler <a.tobler@schweiz.ch>
2949 * tree.c: Remove unused mark_local_for_remap_r.
2951 2004-08-19 Eric Christopher <echristo@redhat.com>
2953 * cp-tree.h (cxx_unsave_expr_now): Delete prototype.
2954 * tree.c (cxx_unsave_expr_now): Delete.
2955 (cp_unsave_r): Ditto.
2957 2004-08-19 Mark Mitchell <mark@codesourcery.com>
2960 * pt.c (push_template_decl_real): Disallow template allocation
2961 functions with fewer than two parameters.
2963 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
2965 * cp-tree.h (build_shared_int_cst): Remove.
2966 * tree.c (shared_int_cache): Remove.
2967 (build_shared_int_cst): Remove.
2968 * class.c (finish_struct_1): Use build_int_cst.
2970 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
2972 * decl.c (finish_enum): Do not copy value node early, copy
2974 * lex.c (cxx_init): Force null_node to be unique.
2976 2004-08-19 Joseph S. Myers <jsm@polyomino.org.uk>
2979 * pt.c (tsubst_copy, tsubst_copy_and_build): Copy TREE_NO_WARNING
2980 from input for MODOP_EXPR.
2982 2004-08-18 Mark Mitchell <mark@codesourcery.com>
2984 * pt.c (dependent_template_p): Fix typo in commment.
2987 * pt.c (dependent_template_p): Treat IDENTIFIER_NODEs as
2990 2004-08-17 Mark Mitchell <mark@codesourcery.com>
2993 * pt.c (unify): Tidy ARRAY_TYPE handling. Make sure that non-type
2994 arguments have the same type as the corresponding parameter.
2997 * parser.c (cp_parser_name_lookup_error): If parser->object_scope
2998 is set use it for diagnostic purposes.
2999 (cp_parser_pseudo_destructor_name): Remove special-case error
3003 * semantics.c (expand_or_defer_fn): Honor -fkeep-inline-functions.
3006 * cp-tree.h (qualified_name_lookup_error): Add parameter.
3007 * name-lookup.c (do_class_using_decl): Restrict set of entities
3008 passed to cp_emit_debug_info_for_using more carefully.
3009 (lookup_qualified_name): Allow lookup_member to return sets of
3011 * parser.c (cp_parser_lookup_name): Add ambiguous_p parameter.
3012 (cp_parser_primary_expression): Handle ambiguous lookups.
3013 (cp_parser_template_name): Adjust use of cp_parser_lookup_name.
3014 (cp_parser_template_argument): Likewise.
3015 (cp_parser_elaborate_type_specifier): Likewise.
3016 (cp_parser_namespace_name): Likewise.
3017 (cp_parser_class_name): Likewise.
3018 (cp_parser_lookup_name_simple): Likewise.
3019 * pt.c (tsubst_qualified_id): Handle ambiguous results.
3020 (tsubst_expr): Likewise.
3021 * semantics.c (qualified_name_lookup_error): Add decl paramter.
3022 For ambiguous lookups, print candidates.
3024 2004-08-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3027 * pt.c (instantiate_pending_templates): Add int parameter. Don't
3029 * cp-tree.h (instantiate_pending_templates): Adjust prototype.
3030 * decl2.c (finish_file): Adjust call to
3031 instantiate_pending_templates.
3033 2004-08-15 Roger Sayle <roger@eyesopen.com>
3035 * call.c (build_vfield_ref, build_call, build_conditional_expr,
3036 convert_arg_to_ellipsis, build_x_va_arg, build_over_call,
3037 build_java_interface_fn_ref, build_special_member_call,
3038 build_new_method_call, initialize_reference): Replace calls to
3039 build with calls to buildN.
3040 * class.c (build_base_path, convert_to_base_statically,
3041 build_vfn_ref, instantiate_type, dfs_accumulate_vtbl_inits,
3042 build_vtbl_initializer): Likewise.
3043 * cp-gimplify.c (genericize_try_block, genericize_catch_block,
3044 gimplify_if_stmt, cp_genericize_r): Likewise.
3045 * cvt.c (convert_to_void): Likewise.
3046 * decl.c (check_initializer, finish_constructor_body,
3047 finish_destructor_body): Likewise.
3048 * error.c (dump_expr): Likewise.
3049 * except.c (build_exc_ptr, expand_start_catch_block, build_throw):
3051 * init.c (perform_member_init, expand_virtual_init,
3052 expand_cleanup_for_base, build_init, expand_default_init,
3053 build_offset_ref, decl_constant_value, build_new, build_new_1,
3054 build_vec_delete_1, build_vec_init, build_delete,
3055 push_base_cleanups, build_vec_delete): Likewise.
3056 * mangle.c (write_integer_cst): Likewise.
3057 * method.c (thunk_adjust, do_build_copy_constructor,
3058 do_build_assign_ref): Likewise.
3059 * pt.c (lookup_template_function, tsubst, tsubst_copy_and_build,
3060 unify, build_non_dependent_expr): Likewise.
3061 * rtti.c (build_headof, build_typeid, ifnonnull,
3062 build_dyanmic_cast_1, tinfo_base_init): Likewise.
3063 * semantics.c (begin_compound_stmt, finish_call_expr,
3064 finish_pseudo_destructor_expr, finish_id_expression,
3065 simplify_aggr_init_expr, finalize_nrv_r): Likewise.
3066 * tree.c (build_target_expr, build_cplus_new, array_type_nelts_top,
3067 array_type_nelts_total, stabilize_call): Likewise.
3068 * typeck.c (decay_conversion, build_class_member_access_expr,
3069 lookup_destructor, build_ptrmemfunc_access_expr, build_array_ref,
3070 get_member_function_from_ptrfunc, build_binary_op, pointer_diff,
3071 build_x_unary_op, build_unary_op, unary_complex_lvalue,
3072 build_compound_expr, build_modify_expr, expand_ptrmemfunc_cst,
3073 check_return_expr): Likewise.
3074 * typeck2.c (split_nonconstant_1, split_nonconstant_init_1,
3075 split_nonconstant_init, store_init_value, build_m_component_ref):
3078 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
3080 * call.c (convert_class_to_reference,
3081 build_user_type_conversion_1, convert_like_real,
3082 build_java_interface_fn_ref, build_special_member_call): Use
3084 * class.c (build_vtbl_initializer): Likewise.
3085 * cp-gimplify.c (cp_gimplify_expr): Likewise.
3086 * cvt.c (cp_convert_to_pointer): Likewise.
3087 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
3088 * decl2.c (start_static_initialization_or_destruction,
3089 generate_ctor_or_dtor_function): Likewise.
3090 * except.c (build_throw): Likewise.
3091 * lex.c (cxx_init): Likewise.
3092 * mangle.c (write_integer_cst): Likewise.
3093 * rtti.c (build_headof, get_tinfo_decl_dynamic,
3094 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
3095 get_pseudo_ti_init): Likewise.
3096 * search.c (get_dynamic_cast_base_type): Likewise.
3097 * tree.c (build_shared_int_cst): Likewise.
3099 2004-08-12 Mark Mitchell <mark@codesourcery.com>
3102 * class.c (count_depth_data): New type.
3103 (dfs_depth_post): New function.
3104 (dfs_depth_q): Likewise.
3105 (find_final_overrider_data_s): Change type of vpath.
3107 (dfs_find_final_overrider_1): New function.
3108 (dfs_find_final_overrider): Use it.
3109 (dfs_find_final_overrider_q): Adjust use of vpath.
3110 (dfs_find_final_overrider_post): Likewise.
3111 (find_final_overrider): Use dfs_depth. Allocate and deallocate
3114 2004-08-12 Jan Beulich <jbeulich@novell.com>
3116 * parser.c (cp_parser_asm_definition): Properly consume scope operator
3117 tokens preceding the clobbers. Don't check for scope operator
3118 following inputs. Simplify inputs handling to match that now used for
3121 2004-08-11 Mark Mitchell <mark@codesourcery.com>
3124 * except.c (build_throw): Allocate cleanup_type and the function
3125 for __cxa_throw separately.
3128 * call.c (standard_conversion): Do not accept conversions between
3129 pointers to members if the class types are unrelated.
3132 * parser.c (cp_parser_builtin_offsetof): Cast to "const volatile
3133 char &" instead of just "char &".
3136 * pt.c (tsubst): Just return the unknown_type_node.
3138 2004-08-11 Mark Mitchell <mark@codesourcery.com>
3141 * parser.c (cp_parser_class_specifier): Robustify.
3144 * pt.c (tsubst_copy_and_build): Complain about invalid
3148 * pt.c (tsubst_default_argument): Clear out current_class_ptr and
3149 current_class_ref while tsubsting.
3151 2004-08-10 Mark Mitchell <mark@codesourcery.com>
3154 * parser.c (cp_parser_init_declarator): Robustify.
3156 2004-08-06 Richard Sandiford <rsandifo@redhat.com>
3158 * typeck2.c (process_init_constructor): Guard the missing field warning
3159 with warn_missing_field_initializers rather than extra_warnings.
3161 2004-08-06 Paolo Bonzini <bonzini@gnu.org>
3163 * class.c (instantiate_type) <ENTRY_VALUE_EXPR>: Do not handle.
3165 2004-08-05 Mark Mitchell <mark@codesourcery.com>
3167 * decl.c (start_preparsed_function): Move determine_visibility
3169 * decl2.c (determine_visibility): Incorporate dllexport testing.
3171 2004-08-05 Geoffrey Keating <geoffk@apple.com>
3173 * g++spec.c (lang_specific_driver): An -Xlinker or -Wl, option
3174 means that libstdc++ is needed.
3176 2004-08-05 Nathan Sidwell <nathan@codesourcery.com>
3178 * cvt.c (cp_convert_to_pointer): Adjust force_fit_type call.
3180 2004-08-04 Geoffrey Keating <geoffk@apple.com>
3182 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_ASSEMBLER_NAME rather
3183 than passing it as a parameter to rest_of_decl_compilation.
3184 * decl2.c (grokfield): Use set_user_assembler_name.
3186 2004-08-04 Nathan Sidwell <nathan@codesourcery.com>
3188 * decl.c (complete_array_type): Don't gratuitously copy
3189 maxindex. Its type is always set.
3191 2004-08-04 Paul Brook <paul@codesourcery.com>
3193 * Make-lang.in (cp/semantics.o, cp/optimize.o): Depend on TARGET_H.
3194 * cp-tree.h (struct language_function): Rename x_dtor_label to
3196 (dtor_label): Rename ...
3197 (cdtor_label): ... to this.
3198 * decl.c (begin_constructor_body): Remove.
3199 (check_special_function_return_type): Maybe change the return type.
3200 (grokdeclarator): Pass the class type.
3201 (start_preparsed_function): Constructors may need a return label.
3202 (finish_constructor_body, finish_destructor_body): Set the return
3204 (begin_function_body): Don't call begin_constructor_body.
3205 (finish_function): Don't warn for constructors or destructors.
3206 (implicitly_declare_fn): Maybe change the return type.
3207 * optimize.c: Include target.h.
3208 (maybe_clone_body): Remap the function result.
3209 * semantics.c: Include target.h.
3210 (finish_return_stmt): Maybe jump to return label for constructors.
3212 2004-08-03 Mark Mitchell <mark@codesourcery.com>
3214 * class.c (build_vtable): Do not set DECL_VISIBILITY here.
3215 (check_field_decls): Or here.
3216 (check_methods): Or here.
3217 (initialize_array): Don't mess with DECL_CONTEXT.
3218 * cp-tree.h (start_decl): Adjust prototype.
3219 (determine_visibility): New function.
3220 * decl.c (duplicate_decls): Remove checks for hidden "operator
3222 (build_library_fn_1): Give all library functions default
3224 (start_decl): Add pop_scope_p parameter. Tidy.
3225 (cp_finish_decl): Do not pop scopes here. Call
3226 determine_visibility for variable definitions.
3227 (start_preparsed_function): Call determine_visibility.
3228 * decl2.c (determine_visibility): New function.
3229 * method.c (use_thunk): Fix formatting.
3230 * parser.c (cp_parser_condition): Adjust calls to start_decl.
3231 (cp_parser_init_declarator): Likewise.
3232 * pt.c (instantiate_decl): Always call pop_nested_class.
3233 * rtti.c (get_tinfo_decl): Do not set DECL_VISIBILITY.
3234 (tinfo_base_init): Likewise.
3236 2004-08-02 Mark Mitchell <mark@codesourcery.com>
3239 * name-lookup.c (validate_nonmember_using_decl): Robustify.
3241 2004-08-01 Mark Mitchell <mark@codesourcery.com>
3244 * name-lookup.c (decl_namespace): Remove.
3245 (current_decl_namespace): Use decl_namespace_context instead of
3247 (push_decl_namespace): Likewise.
3248 (arg_assoc_class): Likewise.
3249 (arg_assoc_type): Likewise.
3250 * pt.c (check_specialization_namespace): New function.
3251 (maybe_process_partial_specialization): Use it.
3252 (register_specialization): Likewise.
3255 * cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): New macro.
3256 * call.c (null_ptr_cst_p): Handle variables with constant
3258 * pt.c (convert_nontype_argument): Use
3259 DECL_INTEGRAL_CONSTANT_VAR_P.
3260 * semantics.c (finish_id_expression): Likewise.
3263 * decl.c (duplicate_decls): Reject duplicate namespace
3267 * typeck.c (build_ptrmemfunc): Loosen assertion.
3269 2004-08-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
3271 * call.c (z_candidate::template_decl): Rename from template.
3272 (add_template_candidate_real): Adjust member reference.
3275 2004-07-29 Mark Mitchell <mark@codesourcery.com>
3277 * cp-tree.h (IDENTIFIER_REPO_CHOSEN): Define.
3278 (lang_decl_flags): Narrow the width of "languages". Add
3280 (DECL_NEEDED_P): Remove.
3281 (FOR_EACH_CLONE): New macro.
3282 (DECL_REPO_AVAILABLE_P): Likewise.
3283 (DECL_TINFO_P): Likewise.
3284 (set_linkage_according_to_type): Declare.
3285 (import_export_vtable): Remove.
3286 (import_export_tinfo): Likewise.
3287 (mark_needed): New function.
3288 (decl_needed_p): Likewise.
3289 (note_vauge_linkage_fn): Likewise.
3290 (init_repo): Change prototype.
3291 (repo_template_used): Remove.
3292 (repo_template_instantiated): Likewise.
3293 (repo_emit_p): New function.
3294 (repo_export_class_p): Likewise.
3295 (no_linkage_check): Change prototype.
3296 * class.c (set_linkage_according_to_type): New function.
3297 (build_vtable): Use it. Do not call import_export_vtable. Set
3298 DECL_IGNORED_P if appropriate.
3299 * decl.c (duplicate_decls): Preserve DECL_REPO_AVAILABLE_P.
3300 (make_rtL_for_nonlocal_decls): Check for template instantiations
3302 (grokfndecl): Adjust call to no_linkage_check.
3303 (set_linkage_for_static_data_member): New function.
3304 (grokvardecl): Use it. Adjust call to no_linkage_check.
3305 (grokdeclarator): Use set_linkage_for_static_data_member.
3306 * decl2.c (note_vague_linkage_fn): New function.
3307 (note_vague_linkage_var): Likewise.
3308 (finish_static_data_member_decl): Use it.
3309 (import_export_vtable): Remove.
3310 (import_export_class): Use repo_export_class_p.
3311 (var_finalized_p): Simplify.
3312 (maybe_emit_vtables): Simplify.
3313 (mark_needed): New function.
3314 (decl_needed_p): Likewise.
3315 (import_export_decl): Add documentation and consistency checks.
3316 Use repo_emit_p. Handle virtual tables and RTTI information
3318 (import_export_tinfo): Remove.
3319 (write_out_vars): Call import_export_decl.
3320 (cxx_callgraph_analyze_expr): Ensure that all vtables are emitted
3322 (finish_file): Use decl_needed_p. Do not call import_export_decl
3323 for undefined static data members. Do not warn about undefined
3324 inlines when using a repository.
3325 (mark_used): Use note_vague_linkage_fn. Always defer template
3327 * lex.c (cxx_init): Adjust call to init_repo. Always set
3328 flag_unit_at_a-time.
3329 * method.c (synthesize_method): Remove unncessary
3330 import_export_decl call.
3331 (implicitly_declare_fn): Use set_linkage_according_to_type.
3332 * optimize.c (maybe_clone_body): Use FOR_EACH_CLONE.
3333 * pt.c (instantiate_class_template): Don't redundantly add classes
3334 to keyed_classes. Don't call repo_template_used.
3335 (tsubst_decl): Set DECL_INTERFACE_KNOWN for instantiations of
3336 templates with internal linkage.
3337 (check_instantiated_args): Adjust call to no_linkage_check.
3338 (instantiate_template): Use FOR_EACH_CLONE.
3339 (mark_definable): New function.
3340 (mark_decl_instantiated): Use it.
3341 (do_decl_instantiation): Adjust tests for explicit instantiation
3342 after "extern template".
3343 (instantiate_class_member): Do not use repo_template_instantiated.
3344 (do_type_instantiation): Simplify.
3345 (instantiate_decl): Use mark_definable. Check repo_emit_p.
3347 * repo.c (repo_get_id): Remove.
3348 (original_repo): Remove.
3349 (IDENTIFIER_REPO_USED): Remove.
3350 (IDENTIFIER_REPO_CHOSEN): Remove.
3351 Remove all #if 0'd code.
3352 (repo_template_used): Remove.
3353 (repo_template_instantiated): Remove.
3354 (temporary_obstack_initialized_p): New variable.
3355 (init_repo): Register with lang_post_pch_load. Avoid creating
3356 identifiers unnecessarily. Don't use original_repo. Close the
3358 (reopen_repo_file_for_write): Not here.
3359 (finish_repo): Always write out a new repository file.
3360 (repo_emit_p): New function.
3361 (repo_export_class_p): Likewise.
3362 * rtti.c (get_tinfo_decl): Use set_linkage_according_to_type.
3363 (involves_incomplete_p): New function.
3364 (tinfo_base_init): Use it.
3365 (ptr_initializer): Remove non_public_ptr parameter.
3366 (ptm_initializer): Likewise.
3367 (get_pseudo_ti_init): Likewise.
3368 (unemitted_tinfo_decl_p): Remove.
3369 (emit_tinfo_decl): Use import_export_decl.
3370 * semantics.c (expand_body): Move updates of static_ctors and
3372 (expand_or_defer_fn): ... here.
3373 * tree.c (no_linkage_check): Add relaxed_p parameter.
3375 2004-07-28 Eric Christopher <echristo@redhat.com>
3377 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
3379 2004-07-28 Nathan Sidwell <nathan@codesourcery.com>
3381 * cp-tree.h (struct tree_pair_s): New.
3382 (typedef tree_pair_p): New.
3383 (DEF_VEC_O(tree_pair_s)): New.
3384 (struct lang_type_class): Make vcall_indices a VEC(tree_pair_s).
3385 (CLASSTYPE_VCALL_INDICES): Update documentation.
3386 * class.c (get_vcall_index): Adjust.
3387 (add_vcall_offset): Adjust.
3389 2004-07-27 Kelley Cook <kcook@gcc.gnu.org>
3391 * pt.c, typeck.c: Remove spurious carriage returns.
3393 2004-07-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3396 * pt.c (coerce_template_template_parms) <PARM_DECL case>: Only check
3397 when the type of ARG is not dependent.
3399 2004-07-26 Geoffrey Keating <geoffk@apple.com>
3401 * g++spec.c (LIBSTDCXX_PROFILE): Default to LIBSTDCXX.
3402 (lang_specific_driver): If the C++ or math library options don't
3403 start with '-l', don't count them as added libraries.
3405 2004-07-26 Nathan Sidwell <nathan@codesourcery.com>
3407 * decl.c (xref_basetypes): Adjust base access vector creation.
3408 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Adjust base
3410 * search.c (dynamic_cast_base_recurse, dfs_access_in_type): Likewise.
3412 2004-07-26 Niall Douglas <s_fsfeurope2@nedprod.com>
3413 Brian Ryner <bryner@brianryner.com>
3417 * class.c (check_field_decls): Apply hidden visibility if
3418 -fvisibility-inlines-hidden and inlined unless otherwise specified
3419 (build_vtable): Set vtable visibility to class visibility.
3420 (check_field_decls): Default static member visibility to class
3422 (check_methods): Default method visibility to class visibility.
3423 * cp-tree.h: Added CLASSTYPE_VISIBILITY and
3424 CLASSTYPE_VISIBILITY_SPECIFIED macro.
3425 * decl.c (duplicate_decls): New logic for merging definition decls
3426 with declaration decls. Added ignore & warning when non default
3427 applied to global operator new or delete.
3428 * method.c, optimize.c, rtti.c: Added setting of VISIBILITY_SPECIFIED
3429 wherever VISIBILITY was changed
3430 * rtti.c (get_tinfo_decl): Set typeinfo visibility to class
3432 (tinfo_base_init): Set typeinfo name visibility to class visibility.
3434 2004-07-25 Bernardo Innocenti <bernie@develer.com>
3436 * decl.c: Rename all identifiers named `class' to `cl'.
3437 * cp-tree.h: Likewise.
3439 2004-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
3441 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Use GGC_CNEW.
3442 * typeck2.c (abstract_virtuals_error): Use GGC_NEW.
3443 * name-lookup.c (binding_entry_make): Use GGC_NEW.
3444 (binding_table_construct): Use GGC_CNEWVEC.
3445 (binding_table_new): Use GGC_NEW.
3446 (cxx_binding_make): Likewise.
3447 (begin_scope): Likewise.
3448 (push_to_top_level): Use GCC_CNEW.
3449 * parser.c (cp_token_cache_new): Likewise.
3450 (cp_token_cache_push_token): Likewise.
3451 (cp_lexer_new_main): Likewise.
3452 (cp_lexer_new_from_tokens): Likewise.
3453 (cp_parser_context_new): Likewise.
3454 (cp_parser_new): Likewise.
3455 (cp_lexer_new_from_tokens): Use GGC_NEWVEC.
3456 * lex.c (cxx_make_type): Use GGC_CNEW.
3457 (retrofit_lang_decl): Use GGC_NEWVAR.
3458 (cxx_dup_lang_specific_decl): Likewise.
3459 (copy_lang_type): Likewise.
3460 * decl.c (use_label): Use GGC_NEW instead of ggc_alloc.
3461 (save_function_data): Likewise.
3462 (lookup_label): Use GGC_CNEW instead of ggc_alloc_cleared.
3463 (cxx_push_function_context): Likewise.
3465 2004-07-25 Richard Henderson <rth@redhat.com>
3467 * decl.c (start_preparsed_function): Set DECL_ARTIFICIAL and
3468 DECL_IGNORED_P on RESULT_DECL.
3469 * semantics.c (finalize_nrv): Copy them too.
3471 2004-07-23 Nathan Sidwell <nathan@codesourcery.com>
3473 * search.c (lookup_conversion_operator): Avoid two loops.
3474 (add_conversions): Remove.
3475 (check_hidden_convs, split_conversions,
3476 lookup_conversions_r): New.
3477 (lookup_conversions): Use lookup_conversions_r.
3479 2004-07-22 Nathan Sidwell <nathan@codesourcery.com>
3481 * pt.c (get_template_base): Check type is completable.
3483 2004-07-21 Eric Christopher <echristo@redhat.com>
3485 * decl.c (poplevel): Inline unused variable checking.
3488 2004-07-21 Paolo Bonzini <bonzini@gnu.org>
3490 * typeck.c (build_binary_op): Do not use RDIV_EXPR for
3493 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3496 * pt.c (check_explicit_specialization): Remove extension to accept
3497 specializations without template headers. Fall-through to normal
3500 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3503 * pt.c (determine_specialization): New parameter template_count.
3504 Disambiguate between member templates and member functions counting
3505 the template headers.
3506 (check_explicit_specialization): Update caller.
3507 (tsubst_friend_function): Likewise.
3509 2004-07-20 Steven Bosscher <stevenb@suse.de>
3511 * cp-tree.def (TINST_LEVEL): Make it an 'x' node.
3512 * cp-tree.h (tinst_level_t): New tree type.
3513 (union lang_tree_node): Handle it.
3514 (TINST_LOCATION): New accessor macro.
3515 (make_tinst_level): New prototype.
3516 * cp-lang.c (cp_tree_size): Handle TINST_LEVEL.
3517 * decl.c (cp_tree_node_structure): Likewise.
3518 * error.c (print_instantiation_full_context): Use TINST_LOCATION.
3519 (print_instantiation_partial_context): Likewise.
3520 * pt.c (pop_tinst_level): Likewise.
3521 (push_tinst_level): Use make_tinst_level.
3522 * tree.c (make_tinst_level): New function.
3523 (cp_walk_subtrees): Walk TINST_DECL for a TINST_LEVEL node.
3525 2004-07-20 Mark Mitchell <mark@codesourcery.com>
3527 * parser.c (cp_parser_simple_type_specifier): Fix typo.
3530 * parser.c (cp_parser_simple_type_specifier): Do not record usage
3531 of globally-qualified names.
3533 2004-07-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3536 * error.c (dump_type) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Output
3539 2004-07-19 Mark Mitchell <mark@codesourcery.com>
3542 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
3543 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
3544 * class.c (add_implicitly_declared_members): Use
3545 CLASSTYPE_LAZY_ASSIGNMENT_OP.
3546 * method.c (lazily_declare_fn): Clear
3547 CLASSTYPE_LAZY_ASSIGNMENT_OP.
3548 * search.c (lookup_fnfields_1): Check it.
3550 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
3552 * cp-tree.h (vec_binfo_member): Remove.
3553 * tree.c (vec_binfo_member): Remove.
3555 * cp-tree.h (struct lang_type_class): Remove vfields field.
3556 (CLASSTYPE_VFIELDS): Remove.
3557 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
3558 * class.c (determine_primary_base): Remove CLASSTYPE_VFIELDS
3560 (dfs_modify_vtables): Use TYPE_CONTAINS_VPTR_P.
3561 (finish_struct_1): Remove CLASSTYPE_VFIELDS handling.
3562 * init.c (dfs_initialize_vtbl_ptrs): Use TYPE_CONTAINS_VPTR_P.
3564 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
3566 * cp-tree.h (DEF_VEC_P(tree)): Remove here.
3567 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
3569 (BINFO_LANG_SLOTS): Remove.
3570 * tree.c (copy_binfo): Adjust BINFO creation and accessors.
3571 * decl.c (xref_basetypes): Adjust BINFO creation and accessors.
3572 * class.c (check_bases): Adjust BINFO accessors.
3573 (determine_primary_base, finish_struct_bits,
3574 maybe_warn_about_overly_private_class, warn_hidden,
3575 walk_subobject_offsets, propagate_binfo_offsets, end_of_class,
3576 warn_about_ambiguous_bases, get_vfield_name,
3577 dump_class_hierarchy_r, build_vtt_inits, accumulate_vtbl_inits,
3578 add_vcall_offset_vtbl_entries_r): Likewise.
3579 * dump.c (cp_dump_tree): Likewise.
3580 * init.c (sort_mem_initializers, expand_member_init, build_delete,
3581 push_base_cleanups): Likewise.
3582 * method.c (do_build_copy_constructor, do_build_assign_ref,
3583 synthesize_exception_spec): Likewise.
3584 name-lookup.c (arg_assoc_class): Likewise.
3585 * pt.c (instantiate_class_template,
3586 get_template_base_recursive): Likewise.
3587 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Likewise.
3588 * typeck2.c (process_init_constructor): Likewise.
3589 * search.c (lookup_base_r, dynamic_cast_base_recurse,
3590 dfs_access_in_type, dfs_walk_real, look_for_overrides,
3591 types_overlap_p, copied_binfo, original_binfo): Likewise.
3592 (binfo_for_vtable): Remove
3594 2004-07-20 Steven Bosscher <stevenb@suse.de>
3596 * cp-tree.h (struct lang_decl_flags): Unify the template_info and
3597 thunk_alias, and the access and virtual_offset fields.
3598 (THUNK_VIRTUAL_OFFSET, THUNK_ALIAS): Adjust.
3599 * decl.c (finish_case_label): Update c_add_case_node call.
3601 2004-07-19 Mark Mitchell <mark@codesourcery.com>
3603 Revert patch for PR c++/16623.
3605 2004-07-19 Kelley Cook <kcook@gcc.gnu.org>
3607 * except.c: Remove two spurious carriage returns.
3609 2004-07-19 Mark Mitchell <mark@codesourcery.com>
3612 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
3613 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
3614 * class.c (add_implicitly_declared_members): Use
3615 CLASSTYPE_LAZY_ASSIGNMENT_OP.
3616 * method.c (lazily_declare_fn): Clear
3617 CLASSTYPE_LAZY_ASSIGNMENT_OP.
3618 * search.c (lookup_fnfields_1): Check it.
3620 2004-07-19 Nathan Sidwell <nathan@codesourcery.com>
3622 * class.c (add_method): Delay adding the slot until the end.
3623 (determine_primary_base): Adjust VEC_iterate invokation.
3624 (resort_type_method_vec, finish_struct_methods, warn_hidden,
3625 walk_subobject_offsets, end_of_class, warn_about_ambiguous_bases,
3626 build_vtbl_initializer): Likewise.
3627 * init.c (sort_mem_initializers, build_delete, push_base_cleanups,
3628 build_vbase_delete): Likewise.
3629 * method.c (do_build_copy_constructor): Likewise.
3630 * name-lookup.c (new_class_binding, print_binding_level,
3631 poplevel_class, store_class_bindings, push_to_top_level,
3632 pop_from_top_level): Likewise.
3633 * pt.c (check_explicit_specialization): Likewise.
3634 * search.c (lookup_conversion_operator, lookup_fnfields_1,
3635 get_pure_virtuals, add_conversions, dfs_check_overlap,
3636 binfo_for_vbase): Likewise.
3638 2004-07-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3641 * pt.c (unify) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Use only
3642 innermost set of template arguments during deduction. Simplify.
3644 2004-07-19 Joseph S. Myers <jsm@polyomino.org.uk>
3646 * typeck.c (build_modify_expr, build_x_modify_expr): Set
3647 TREE_NO_WARNING on assignments with an operator other than '='.
3649 2004-07-10 Steven Bosscher <stevenb@suse.de>
3650 Joseph S. Myers <jsm@polyomino.org.uk>
3652 * cp-tree.h (C_SET_EXP_ORIGINAL_CODE): Remove.
3653 * decl2.c (grokfield): Don't check current_class_depth via
3654 unused TREE_COMPLEXITY.
3655 * semantics.c (finish_parenthesized_expr): Set TREE_NO_WARNING
3656 to avoid the missing parentheses warning.
3657 Don't set C_SET_EXP_ORIGINAL_CODE.
3659 2004-07-18 Mark Mitchell <mark@codesourcery.com>
3661 * tree.c (no_linkage_helper): Remove.
3662 (no_linkage_check): Don't use walk_tree_without_duplicates.
3664 * mangle.c (write_expression): Issue a sorry for zero-operand
3667 2004-07-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3670 * init.c (build_offset_ref): Build SCOPE_REF with non-null
3671 TREE_TYPE for non-dependent names.
3672 * typeck.c (build_x_unary_op): Handle non-dependent SCOPE_REF.
3673 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
3674 unknown_type_node as its TREE_TYPE.
3675 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
3676 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
3677 (dump_expr) <SCOPE_REF case>: Likewise.
3679 2004-07-17 Jason Merrill <jason@redhat.com>
3682 * call.c (type_passed_as): Make the invisible reference type
3684 * cp-gimplify.c (gimplify_cleanup_stmt): Rename to
3685 cp_genericize_r. Handle invisible reference lowering.
3686 (is_invisiref_parm): New fn.
3687 (cp_genericize): Adjust the types of invisible reference parms.
3688 Don't repeat the walk for clones.
3689 * decl.c (store_parm_decls): Don't generate any code for clones.
3691 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
3693 * cp-tree.h (builtin_function): Declare.
3695 2004-07-16 Mark Mitchell <mark@codesourcery.com>
3697 * class.c (finish_struct_methods): Remove unncessary code.
3698 (add_implicitly_declared_members): Create declarations for default
3699 constructors and copy constructors lazily.
3700 * cp-tree.h (lang_type_class): Remove lazy_default_ctor and
3702 (CLASSTYPE_LAZY_DEFAULT_CTOR): New macro.
3703 (CLASSTYPE_LAZY_COPY_CTOR): Likewise.
3704 * decl2.c (check_classfn): Robustify.
3705 (locate_dtor): Handle empty CLASSTYPE_METHOD_VEC.
3706 (locate_ctor): Handle lazy default constructors.
3707 (locate_copy): Handle lazy copy constructors.
3708 (implicitly_declare_fn): Make sure we're looking at the
3709 TYPE_MAIN_VARIANT for a class before creating functions. Don't
3710 set TYPE_HAS_CONSTRUCTOR.
3711 (lazily_declare_fn): New function.
3712 * name-lookup.c (constructor_name_full): Simplify.
3713 * search.c (lookup_fnfields_1): Lazily create methods, as
3715 (lookup_for_overrides): Handle empty CLASSTYPE_METHOD_VEC.
3717 2004-07-16 Steven Bosscher <stevenb@suse.de>
3719 * cp-tree.h (struct lang_type): Don't have three GTY options on a
3720 single bit GTY desc.
3722 2004-07-16 Richard Henderson <rth@redhat.com>
3724 * cp-lang.c (LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING): Die.
3725 * cp-tree.h (cp_copy_res_decl_for_inlining): Remove.
3726 * tree.c (cp_copy_res_decl_for_inlining): Remove.
3728 2004-07-16 Nathan Sidwell <nathan@codesourcery.com>
3730 * class.c (finish_struct_bits): Use for loop.
3731 (propagate_binfo_offsets): Do primary binfo outside of loop.
3734 * dump.c (cp_dump_tree): Don't dump the bases if there's no
3737 * pt.c (tsubst) <TREE_BINFO case>: We should never get here.
3739 2004-07-15 Mark Mitchell <mark@codesourcery.com>
3741 * cp-tree.h (lang_type_class): Remove has_real_assign_ref and
3742 has_abstract_assign_ref. Make methods a VEC(tree) *.
3743 (TYPE_HAS_CONST_ASSIGN_REF): Add documentation.
3744 (CLASSTYPE_CONSTRUCTORS): Adjust for changes to CLASSTYPE_METHOD_VEC.
3745 (CLASSTYPE_DESTRUCTORS): Likewise.
3746 (TYPE_HAS_REAL_ASSIGN_REF): Remove.
3747 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
3748 (add_method): Change prototoype.
3749 * class.c (add_method): Remove error_p parameter. Adjust for
3750 changes to CLASSTYPE_METHOD_VEC.
3751 (handle_using_decl): Adjust call to add_method.
3752 (maybe_warn_about_overly_private_class): Adjust for
3753 changes to CLASSTYPE_METHOD_VEC.
3754 (resort_type_method_vec): Likewise.
3755 (finish_struct_methods): Likewise.
3756 (check_for_override): Likewise.
3757 (warn_hidden): Likewise.
3758 (add_implicitly_declared_members): Defer creation of assignment
3759 operators. Adjust call to add_method.
3760 (clone_function_decl): Adjust call to add_method.
3761 (check_bases_and_members): Don't set TYPE_HAS_REAL_ASSIGN_REF.
3762 (finish_struct_1): Use CLASSTYPE_DESTRUCTORS.
3763 * decl.c (grok_special_member_properties): Don't set
3764 TYPE_HAS_ABSTRACT_ASSIGN_REF.
3765 * decl2.c (check_classfn): Adjust for
3766 changes to CLASSTYPE_METHOD_VEC.
3767 * method.c (locate_dtor): Use CLASSTYPE_DESTRUCTORS.
3768 (locate_ctor): Use CLASSTYPE_CONSTRUCTORS.
3769 (locate_copy): Adjust for changes to CLASSTYPE_METHOD_VEC.
3770 (implicitly_declare_fn): Set DECL_SOURCE_LOCATION. Do not call
3772 * pt.c (check_explicit_specialization): Adjust for
3773 changes to CLASSTYPE_METHOD_VEC.
3774 (instantiate_class_template): Do not set
3775 TYPE_HAS_ABSTRACT_ASSIGN_REF.
3776 * ptree.c (cxx_print_type): Don't try to print
3777 CLASSTYPE_METHOD_VEC.
3778 * rtti.c (emit_support_tinfos): Use CLASSTYPE_DESTRUCTORS.
3779 * search.c (lookup_field_r): Adjust for
3780 changes to CLASSTYPE_METHOD_VEC.
3781 (lookup_fnfields): Likewise.
3782 (lookup_conversion_operator): Likewise.
3783 (lookup_fnfields_1): Likewise. Create assignment operators
3785 (look_for_overrides_here): Adjust for
3786 changes to CLASSTYPE_METHOD_VEC.
3787 (add_conversions): Likewise.
3788 * semantics.c (finish_member_declaration): Adjust call to add_method.
3790 2004-07-15 Jason Merrill <jason@redhat.com>
3792 * cp-lang.c (cxx_types_compatible_p): To the middle-end,
3793 references and pointers are compatible.
3795 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
3797 * decl.c (xref_basetypes): Refactor.
3798 * tree.c (copy_base_binfos): Replace with ...
3799 (copy_binfo): ... this. Deep copy the given binfo, (not the just
3800 bases of the given base).
3801 * cp-tree.h (copy_base_binfo): Remove.
3802 (copy_binfo): Declare.
3804 2004-07-15 Mark Mitchell <mark@codesourcery.com>
3806 * name-lookup.c (set_inherited_value_binding_p): Add class_type
3808 (get_class_binding): Adjust.
3809 (push_class_level_binding): Don't use set_inherited_value_binding_p.
3811 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
3813 * class.c (finish_struct_bits): Don't set TYPE_HAS_CONVERSION here.
3814 * decl.c (xref_basetypes): Set it here.
3816 * class.c (check_bases): Don't set CLASSTYPE_NON_AGGREGATE here.
3817 Don't check for incomplete base.
3818 (get_vfield_name): Simplify while loop.
3819 * decl.c (xref_basetypes): Set CLASSTYPE_NON_AGGREGATE here.
3821 2004-07-14 Mark Mitchell <mark@codesourcery.com>
3823 * lex.c (cxx_make_type): Remove call to get_pointer_type.
3825 * cp-tree.h (IDENTIFIER_VALUE): Remove.
3826 (BINFO_PUSHDECLS_MARKED): Likewise.
3827 (maybe_inject_for_scope_var): Likewise.
3828 (push_class_decls): Likewise.
3829 * name-lookup.h (push_class_binding): Remove.
3830 (innermost_non_namespace_value): New function.
3831 (outer_binding): Likewise.
3832 * class.c (add_method): Push bindings before adding to
3834 (restore_class_cache): Do not restore class_shadowed.
3835 (pushclass): Do not add USING_DECLs. Do not call
3837 * config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c.
3838 * decl.c (pushdecl): Use outer_binding.
3839 (poplevel): Set the scope for an out-of-scope for-loop declaration
3841 (cp_finish_decl): Don't call maybe_inject_for_scope_var.
3842 * name-lookup.c (new_class_binding): New function.
3843 (push_binding): Use it.
3844 (pushdecl): Use innermost_non_namespace_value.
3845 (maybe_inject_for_scope_var): Remove.
3846 (push_class_binding): Remove.
3847 (set_inherited_value_binding_p): New function.
3848 (get_class_binding): New function.
3849 (push_class_level_binding): Assert that the current_class_type is
3851 (outer_binding): New function.
3852 (innermost_non_namespace_value): Likewise.
3853 (lookup_name_real): Use outer_binding.
3854 (lookup_name_current_level): Ignore out-of-scope variables.
3855 * pt.c (check_template_shadow): Use innermost_non_namespace_value.
3856 (lookup_template_class): Likewise.
3857 * search.c (dfs_push_type_decls): Remove.
3858 (dfs_push_decls): Likewise.
3859 (setup_class_bindings): Likewise.
3860 (lookup_field_1): Handle USING_DECLs from dependent scopes.
3861 (marked_pushdecls_p): Remove.
3862 (unmarked_pushdecls_p): Remove.
3863 (marked_identifiers): Remove.
3864 (setup_class_bindings): Remove.
3865 (dfs_push_type_decls): Remove.
3866 (dfs_push_decls): Remove.
3867 (push_class_decls): Remove.
3869 2004-07-13 Mark Mitchell <mark@codesourcery.com>
3873 * decl.c (grokvardecl): Make declspecs parameter const.
3874 (grokdeclarator): Likewise. Adjust accordingly.
3875 * decl.h (grokdeclarator): Adjust declaration.
3876 * parser.c (cp_parser_init_declarator): Do not clear
3877 decl_specifiers->attributes.
3879 * cp-tree.h (lang_identifier): Remove class_value.
3880 (IDENTIFIER_CLASS_VALUE): Remove.
3881 (pop_class_decls): Likewise.
3882 (init_search_processing): Likewise.
3883 * class.c (handle_using_decl): Use lookup_member, not
3884 IDENTIFIER_CLASS_VALUE.
3885 (restore_class_cache): New function, split out from ...
3886 (pushclass): ... here. Do not call clear_identifier_class_values.
3887 (invalidate_class_lookup_cache): Do not clear
3888 IDENTIFIER_CLASS_VALUE.
3889 (popclass): Do not call pop_class_decls.
3890 (maybe_note_name_used_in_class): Do not save names looked up after
3891 the class is complete. Use lookup_member, not
3892 IDENTIFIER_CLASS_VALUE.
3893 * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
3894 * decl.c (cxx_init_decl_processing): Do not call
3895 init_search_processing.
3896 * method.c (do_build_copy_constructor): Remove unnecessary code.
3897 (do_build_assign_ref): Likewise.
3898 * name-lookup.c (pushdecl): Use lookup_member, not
3899 IDENTIFIER_CLASS_VALUE.
3900 (set_identifier_type_value_with_scope): Set TREE_TYPE on the
3902 (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
3903 (push_class_binding): Do not set it.
3904 (clear_identifier_class_values): Remove.
3905 (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
3906 (store_binding): Do not save it.
3907 (pop_from_top_level): Do not restore it.
3908 * name-lookup.h (cxx_saved_binding): Remove class_value.
3909 (clear_identifier_class_values): Remove.
3910 * ptree.c (cxx_print_identifier): Do not print
3911 IDENTIFIER_CLASS_VALUE.
3912 * search.c (search_obstack): Remove.
3913 (push_stack_level): Remove.
3914 (pop_stack_level): Remove.
3915 (search_level): Remove.
3916 (search_stack): Remove.
3917 (lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
3918 (setup_class_bindings): Use IDENTIFIER_MARKED, not
3919 IDENTIFIER_CLASS_VALUE.
3920 (marked_identifiers): New variable.
3921 (push_class_decls): Clear IDENTIFIER_MARKED.
3922 (pop_class_decls): Don't call pop_search_level.
3923 (init_search_processing): Remove.
3925 2004-07-12 Mark Mitchell <mark@codesourcery.com>
3927 * cp-tree.h (get_aggr_typedef): Remove.
3928 * init.c (get_aggr_typedef): Likewise.
3930 * name-lookup.c (push_class_level_binding): Simplify.
3932 2004-07-12 Andrew Pinski <apinski@apple.com>
3936 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
3938 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
3941 2004-07-12 Eric Christopher <echristo@redhat.com>
3943 * parser.c (cp_parser_class_head): Remove unused variable.
3945 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3947 * decl.c (grok_op_properties): Reject [de-]allocation functions
3948 declared in a namespace, or declared as static.
3950 2004-07-12 Nathan Sidwell <nathan@codesourcery.com>
3952 * cp-tree.h (make_binfo): Remove.
3953 * decl.c (xref_basetypes): Use make_tree_binfo directly.
3954 * tree.h (copy_base_binfos): Likewise.
3955 (make_binfo): Remove.
3957 * call.c (build_user_type_conversion_1, build_new_op,
3958 check_constructor_callable, build_temp,
3959 perform_direct_initialization_of_possible): Pass type directly to
3960 lookup_fnfields & build_special_member_call.
3961 (build_special_member_call): Accept a type, and complete it.
3962 * class.c (finish_stuct_bits): Copy the BINFOs here.
3963 * cvt.c (ocp_convert): Pass type directly to
3964 build_special_member_call.
3965 * decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
3966 (xref_basetypes): Allocate the binfo here. Adjust.
3967 * init.c (build_init, build_new_1): Pass type directly to
3968 build_special_member_call.
3969 * lex.c (cxx_make_type): Do not allocate binfo here.
3970 * name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
3971 * parser.c (cp_parser_class_head): Always call xref_basetypes.
3972 * pt.c (instantiate_class_template): Likewise. Inhibit access
3973 checking for template friends.
3974 * ptree.c (cxx_print_type): Adjust record printing.
3975 * search.c (lookup_base): When taking a type, complete it before
3976 looking for a binfo.
3977 (lookup_member): Delay completing a type.
3978 (push_class_decls): Don't walk an incomplete type.
3979 (lookup_conversions): Likewise.
3980 * semantics.c (finish_stmt_expr_expr): Pass type directly to
3981 build_special_member_call.
3982 * tree.c (copy_base_binfos): Adjust.
3983 (make_binfo): Likewise.
3984 * typeck.c (build_modify_expr): Pass type directly to
3985 build_special_member_call.
3986 * typeck2.c (process_init_constructor): Check a binfo exists.
3987 (build_m_component_ref): Allow accessing an incomplete type.
3988 (build_functional_cast): Pass type directly to
3989 build_special_member_call.
3991 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3994 * config-lang.in (gtfiles): Add typeck2.c.
3995 * Make-lang.in: Tweak typeck2.c dependencies, and add rule for
3997 * cp-tree.h: Declare complete_type_check_abstract.
3998 * typeck2.c (pat_calc_hash, pat_compare,
3999 complete_type_check_abstract): New functions.
4000 (abstract_virtuals_error): If the type is abstract, register the
4001 declaration within abstract_pending_vars for further checks.
4002 Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
4003 * decl.c (cp_finish_decl): Do not strip array types.
4004 (create_array_type_for_decl): Check for abstractness of the element
4006 (complete_vars): Call complete_type_check_abstract.
4007 * class.c (finish_struct): Prepare a list of virtual functions for
4008 template types, and call complete_vars on it to check for abstractness.
4010 2004-07-12 Paolo Bonzini <bonzini@gnu.org>
4012 PR tree-optimization/14107
4013 * decl.c (finish_function): Remove temporary band-aid.
4015 2004-07-11 Mark Mitchell <mark@codesourcery.com>
4017 * call.c (build_operator_new_call): Avoid using push_to_top_level.
4018 (build_new_op): Adjust call to lookup_function_nonclass.
4019 * name-lookup.c (identifier_type_value): Adjust call to
4021 (lookup_name_real): Add block_p parameter.
4022 (lookup_name_nonclass): Adjust call to lookup_name_real.
4023 (lookup_function_nonclass): Likewise.
4024 (lookup_name): Likewise.
4025 * name-lookup.h (lookup_name_real): Change prototype.
4026 (lookup_name_nonclass): Likewise.
4027 * parser.c (cp_parser_lookup_name): Likewise.
4029 * cp-tree.h (saved_scope): Make old_bindings a vector.
4030 (unuse_fields): Remove.
4031 * name-lookup.h (cxx_saved_binding): Define it.
4032 * class.c (pushclass): Don't use unuse_fields.
4033 * name-lookup.c (cxx_saved_binding_make): Remove.
4034 (store_binding): Add new bindings to a vector, using an
4035 accumulator style, rather than adding them to a list.
4036 (store_bindings): Adjust accordingly.
4037 (store_class_bindings): Likewise.
4038 (push_to_top_level): Likewise.
4039 (pop_from_top_level): Likewise.
4040 * optimize.c (maybe_clone_body): Must push_to_top_level and
4041 pop_from_top_level calls outside of loop.
4042 * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope
4043 calls here from cp_parser_late_parsing_default_args.
4044 (cp_parser_save_default_args): Record the class type in which the
4045 function is declared.
4046 (cp_parser_late_parsing_default_args): Do not call
4047 push_nested_class/pop_nested_class.
4048 * search.c (dfs_unuse_fields): Remove.
4049 (unuse_fields): Remove.
4051 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
4053 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
4054 LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
4055 * cp-tree.h (poplevel): Declare.
4056 (set_block): Remove.
4057 * decl.c (set_block): Remove.
4059 2004-07-10 Mike Stump <mrs@apple.com>
4061 * decl2.c (import_export_class): Never export/import vtables
4062 with inline key functions.
4064 2004-07-09 Steven Bosscher <stevenb@suse.de>
4066 * typeck.c (c_expand_asm_operands): Remove.
4068 2004-07-09 Mike Stump <mrs@apple.com>
4070 * typeck.c (build_class_member_access_expr): Skip null deref
4071 warning when we don't dereference it.
4073 2004-07-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4077 * class.c (check_field_decls): Improve -Weffc++ warning: do not
4078 warn for pointers to functions/members, or for classes without
4081 2004-07-08 Mark Mitchell <mark@codesourcery.com>
4083 * name-lookup.h (struct cp_binding_level): Update documentation
4086 2004-07-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4089 * typeck.c (check_return_expr): Improve -Weffc++ warning: handle
4090 returning CALL_EXPR, and non-reference return type.
4092 2004-07-08 Nathan Sidwell <nathan@codesourcery.com>
4094 * name-lookup.c (push_binding): Use VEC_reserve.
4096 2004-07-08 Richard Henderson <rth@redhat.com>
4098 * cp-tree.h (expand_eh_spec_block): Remove.
4100 2004-07-07 Mark Mitchell <mark@codesourcery.com>
4102 * cp-tree.h (saved_scope): Remove x_previous_class_type and
4103 x_previous_class_values; add x_previous_class_level.
4104 (previous_class_type): Remove.
4105 (previous_class_values): Remove.
4106 (previous_class_level): New macro.
4107 * class.c (pushclass): Restore the identifier cache more
4109 (invalidate_class_lookup_cache): Use vector for class_shadowed and
4110 previous_class_values.
4111 * decl.c (poplevel): Likewise.
4112 * name-lookup.c (cxx_binding_init): New function.
4113 (cxx_binding_make): Use it.
4114 (push_binding): For a binding in a class level, use a vector of
4115 cp_class_binding nodes.
4116 (push_binding_level): New function.
4117 (begin_scope): Use it.
4118 (leave_scope): Do not put class binding levels on the free list.
4119 (print_binding_level): Adjust for the fact that class_shadowed is
4121 (poplevel_class): Likewise.
4122 (clear_identifier_class_values): Likewise.
4123 (push_class_level_binding): Likewise.
4124 (set_class_shadows): Remove.
4125 (store_binding): New function.
4126 (store_class_bindings): New function.
4127 (push_to_top_level): Use store_class_bindings as appropriate.
4128 (pop_from_top_level): Use previous_class_level, not
4129 previous_class_type.
4130 * name-lookup.h (cp_class_binding): New type.
4131 (cp_binding_level): Use a vector object for class_shadowed.
4132 (push_binding_level): Declare.
4133 (set_class_shadows): Remove.
4135 2004-07-07 Andrew Pinski <apinski@apple.com>
4137 * class.c (instantiate_type): BUFFER_REF is dead.
4138 * lex.c (init_operators): IN_EXPR is dead.
4140 2004-07-07 Jason Merrill <jason@redhat.com>
4143 * call.c (build_new_op): Give overload warnings for built-in
4146 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
4149 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
4152 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
4154 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
4155 * class.c (build_primary_vtable, check_bases,
4156 determine_primary_base, finish_struct_bits,
4157 maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
4158 get_basefndecls, warn_hidden, walk_subobject_offsets,
4159 build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
4160 layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
4161 finish_struct_1, get_vfield_name, contains_empty_class_p,
4162 dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
4163 dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
4164 add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
4166 * decl.c (xref_basetypes): Likewise.
4167 * dump.c (cp_dump_tree): Likewise.
4168 * error.c (dump_expr): Likewise.
4169 * init.c (sort_mem_initializers, expand_member_init,
4170 push_base_cleanups): Likewise.
4171 * method.c (do_build_copy_constructor, do_build_assign_reg,
4172 synthesize_exception_spec): Likewise.
4173 * name-lookup.c (arg_assoc_class): Likewise.
4174 * pt.c (instantiate_class_template, tsubst,
4175 get_template_base_recursive): Likewise.
4176 * ptree.c (cxx_print_type): Likewise.
4177 * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
4178 * search.c (lookup_base_r, dynamic_cast_base_recurse,
4179 dfs_access_in_type, access_in_type, lookup_field_queue_p,
4180 bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
4181 marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
4182 dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
4183 binfo_for_vtable, copied_binfo, original_binfo): Likewise
4184 * tree.c (copy_base_binfos, make_binfo): Likewise.
4185 * typeck.c (commmon_base_type): Likewise
4186 * typeck2.c (process_init_constructor): Likewise
4188 2004-07-06 Joseph S. Myers <jsm@polyomino.org.uk>
4190 * decl.c (check_tag_decl): Name redeclared type in diagnostic.
4192 2004-07-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4195 * pt.c (convert_nontype_argument): Disallow conversions between
4196 different enumeration types.
4198 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
4200 * cp-tree.h (BINFO_MARKED): Remove.
4201 (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
4202 BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
4203 BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
4204 (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
4205 * class.c (build_base_path): Use BINFO_VIRTUAL_P.
4206 (mark_primary_bases, determine_primary_base, base_derived_from,
4207 dfs_find_final_overrider, dfs_find_final_overrider_q,
4208 dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
4209 dfs_modify_vtables, walk_subobject_offsets,
4210 layout_nonempty_base_or_field, build_base_field,
4211 build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
4212 end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
4213 finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
4214 build_ctor_vtbl_group, accumulate_vtble_inits,
4215 dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
4216 build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
4217 add_vcall_offset_vtbl_entries_1): Likewise.
4218 * decl.c (xref_basetypes): Incomming virtual base indicated by
4220 * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
4221 * init.c (finish_init_stmts, sort_mem_initializers,
4222 emit_mem_initializers, build_vtble_address, expand_member_init,
4223 push_base_cleanups): Likewise.
4224 * method.c (do_build_copy_constructor): Likewise.
4225 * pt.c (instantiate_class_template,
4226 get_template_base_recursive): Likewise.
4227 * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
4228 get_pseudo_ti_desc): Likewise.
4229 * search.c (lookup_base_r, dynamic_cast_base_recurse,
4230 binfo_from_vbase, binfo_via_virtual, copied_binfo,
4231 original_binfo): Likewise.
4232 * semantics.c (finish_base_specifier): Virtualness is indicated
4234 * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
4236 2004-07-06 Mark Mitchell <mark@codesourcery.com>
4239 2004-06-24 Jason Merrill <jason@redhat.com>
4241 * decl.c (grokparms): Give the PARM_DECL reference type if the
4242 parameter is passed by invisible reference.
4244 2004-07-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4246 * cp-lang.c (cp_var_mod_type_p): Add extra arg.
4247 * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
4248 * pt.c (check_instantiated_args, unify): Likewise.
4250 2004-07-05 Phil Edwards <phil@codesourcery.com>
4252 * Make-lang.in (check-c++, lang_checks): Add some comments.
4254 2004-07-05 Zack Weinberg <zack@codesourcery.com>
4256 * cp-mudflap.c: Delete file.
4257 * Makefile.in: Remove all references to cp-mudflap.o.
4259 2004-07-05 Zack Weinberg <zack@codesourcery.com>
4261 * decl.c (cxx_init_decl_processing): Call
4262 build_common_tree_nodes before creating the global NAMESPACE_DECL.
4264 2004-07-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4267 * call.c (build_operator_new_call): Look only at global scope.
4269 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
4271 * call.c (enforce_access): Expect TREE_BINFO.
4272 * class.c (binfo_ctor_vtable): Check TREE_BINFO.
4273 * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
4274 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
4276 (BINFO_LANG_ELTS): Remove.
4277 (BINFO_LANG_SLOTS): New.
4278 (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
4279 (CLASSTYPE_TEMPLATE_INFO): Adjust.
4280 * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
4281 * search.c (lookup_member): Check TREE_BINFO.
4282 * semantics.c (perform_or_defer_access_check): Likewise.
4283 (check_accessibility_of_qualified_id): Check
4284 deferred_access_no_check.
4285 * tree.c (make_binfo): Use make_tree_binfo.
4287 2004-07-04 Mark Mitchell <mark@codesourcery.com>
4289 * method.c (implicitly_declare_fn): Set linkage of generated
4292 2004-07-04 Richard Henderson <rth@redhat.com>
4294 * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
4296 2004-07-03 Scott Brumbaugh <scottb.lists@verizon.net>
4299 * name-lookup.c (push_class_level_binding): Don't pass a
4300 TREE_LIST of ambiguous names to check_template_shadow as it
4301 only handles declarations. Instead, pull the declaration
4304 2004-07-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4307 * pt.c (check_explicit_specialization): Clarify error message.
4309 2004-07-02 Richard Henderson <rth@redhat.com>
4311 * tree.c (cp_unsave_r): Update remap_save_expr call.
4313 2004-07-02 Mark Mitchell <mark@codesourcery.com>
4316 * mangle.c (write_template_arg): Correct mangling.
4319 * decl.c (grokdeclarator): Robustify.
4321 2004-07-01 Richard Henderson <rth@redhat.com>
4323 * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
4324 * method.c (synthesize_method): Don't clear_last_expr.
4325 * name-lookup.c (maybe_push_cleanup_level): Likewise.
4327 2004-07-01 Nick Clifton <nickc@redhat.com>
4329 * decl2.c (import_export_class): Invoke the
4330 import_export_class field in the gcc_target structure if it is not
4333 2004-06-30 Richard Henderson (rth@redhat.com>
4335 * decl.c (start_preparsed_function): Don't set immediate_size_expand.
4336 * method.c (use_thunk): Likewise.
4338 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
4340 * call.c (build_over_call), typeck.c (build_function_call): Call
4341 check_function_arguments instead of check_function_format.
4343 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
4345 * call.c (build_over_call), typeck.c (build_function_call): Update
4346 calls to check_function_format.
4348 2004-06-30 Richard Henderson <rth@redhat.com>
4350 * call.c (build_over_call): Use __builtin_memcpy for copying
4351 CLASS_AS_BASE rather than funny casting.
4353 2004-06-30 Richard Henderson <rth@redhat.com>
4355 * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
4356 TYPE_SIZE_UNIT of full_type.
4358 2004-06-30 Per Bothner <per@bothner.com>
4360 Conditionally compile support for --enable-mapped_location.
4361 * decl.c (pop_label): Handle (imperfectly) USE_MAPPED_LOCATION case.
4362 * decl2.c: If USE_MAPPED_LOCATION, don't do some line number
4363 adjustments - which I don't understand.
4364 * error.c (dump_decl): Rename "<interrnal>" to "<built-in>".
4365 * error.c: Use LOCATION_FILE and EXPR_LOCATION macros.
4366 (print_instantiation_partial_context): Use expand_location.
4367 * decl.c (duplicate_decl): Use new DECL_IS_BUILTIN macro.
4368 * name-lookup.c: Likewise.
4369 * lex.c (cxx_init): Likewise. Also use BUILTINS_LOCATION.
4370 * name-lookup.c: Use input_line macro.
4371 * parser.c (cp_lexer_get_preprocessor_token): Use UNKNOWN_LOCATION.
4372 (cp_parser_statement): Rename locaal variable statement_locus to
4373 statement_location and use SET_EXPR_LOCATION macro.
4374 * pt.c: Handle USE_MAPPED_LOCATION case. Use new macros.
4375 * tree.c (cp_walk_subtrees): Likewise.
4377 2004-06-29 Per Bothner <per@bothner.com>
4379 * tree.c (build_min_nt, build_min, build_min_non_dep):
4380 Don't set TREE_COMPLEXITY from input_line.
4382 2004-06-29 Paul Brook <paul@codesourcery.com>
4384 * init.c: Include target.h.
4385 (get_cookie_size): Remove and replace with target hook.
4387 (build_new_1): Store the element size in the cookie.
4389 2004-06-29 Nathan Sidwell <nathan@codesourcery.com>
4392 * parser.c (cp_parser_template_declaration_after_export): Disable
4393 access checks here ...
4394 (cp_parser_class_specifier): ... not here.
4396 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
4398 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
4399 VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
4400 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
4403 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
4405 * cp-tree.h (struct deferred_access): Move to ...
4406 * semantics.c (struct deferred_access): ... here. Adjust.
4407 (deferred_access_stack): Make a VEC(deferred_access),
4408 (deferred_access_free_list): Remove.
4409 (deferred_access_no_check): New.
4410 (push_deferring_access_checks, resume_deferring_access_checks,
4411 stop_deferring_access_checks, pop_deferring_access_checks,
4412 get_deferred_access_checks, pop_to_parent_deferring_access_checks,
4413 perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
4415 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
4418 * call.c (build_temp): Declare.
4419 (check_constructor_callable): New.
4420 (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
4421 CONSTRUCTOR_CALLABLE.
4422 (convert_like_real, initialize_reference): Use
4423 check_constructor_callable.
4424 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
4425 (LOOKUP_*): Renumber.
4427 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
4429 * friend.c (add_friend): Only perform access checks when context
4431 * lex.c (cxx_make_type): Only create a binfo for aggregate types.
4432 * parser.c (cp_parser_class_specifier): Disable access checks here
4433 when parsing the body of a templated class.
4434 * semantics.c (perform_or_defer_access_checks): Reorder to allow
4435 NULL binfos when not checking access.
4437 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
4439 Use vector API for vbase list.
4440 * cp-tree.h: Include vec.h
4441 (DEF_VEC_P (tree)): New type.
4442 (struct lang_type_class): Change vbase's member type.
4443 (binfo_for_vbase): Declare.
4444 * class.c (determine_primary_base, base_derived_from,
4445 update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
4446 warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
4447 build_vtbl_initializer): Adjust.
4448 * decl.c (xref_basetypes): Adjust, accumulate upper bound of
4450 * init.c (sort_mem_initializers, expand_member_init,
4451 push_base_cleanups): Adjust.
4452 * method.c (do_build_copy_constructor): Adjust.
4453 * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
4454 (binfo_for_vbase): New.
4455 * tree.c (copy_base_binfos): Adjust.
4457 2004-06-28 Mark Mitchell <mark@codesourcery.com>
4459 * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
4461 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
4464 * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
4465 paranthesis in case of pointers to array members.
4466 * error.c (dump_type_prefix): Likewise.
4467 (dump_type_suffix): Maybe issue a whitespace when printing
4470 2004-06-27 Mark Mitchell <mark@codesourcery.com>
4473 * parser.c (cp_parser_set_decl_spec_type): Refine test for
4474 redefinition of built-in types.
4476 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
4478 * error.c (pp_template_argument_list_start): Remove.
4479 (pp_template_argument_list_end): Likewise.
4480 (pp_separate_with_comma): Use pp_cxx_separate_with.
4481 (reinit_global_formatting_buffer): Remove.
4482 (pp_non_consecutive_character): Likewise.
4483 (dump_scope): Use pp_cxx_colon_colon.
4484 (dump_template_parameter): Use pp_cxx_identifier,
4485 pp_cxx_tree_identifier and pp_cxx_whitespace.
4486 (dump_templat_bindings): Replace use of pp_string with sequence
4487 of pp_cxx_whitespace and pp_equal.
4488 (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
4489 pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set
4491 (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
4492 (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace,
4493 pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
4494 (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
4495 pp_cxx_right_bracket, pp_cxx_identifier throughout,
4496 (dump_decl): Likewise.
4497 (dump_template_decl): Likewise.
4498 (dump_function_decl): Likewise. Set padding as appropriate.
4499 (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
4501 (dump_exception_spec): Likewise.
4502 (dump_function_name): Use pp_cxx_tree_identifier and
4504 (dump_template_parms): Use pp_cxx_begin_template_argument_list and
4505 pp_cxx_end_template_argument_list.
4506 (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
4507 pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
4508 pp_cxx_whitespace throughout.
4509 (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
4511 (dump_unary_op): Likewise.
4512 (reinit_cxx_pp): New function.
4513 (type_as_string); Use it.
4514 (expr_as_string): Likewise.
4515 (decl_as_string); Likewise.
4516 (context_as_string): Likewise.
4517 (lang_decl_name): Likewise.
4518 (decl_to_string): Likewise.
4519 (expr_to_string): Likewise.
4520 (parm_to_string): Likewise.
4521 (type_to_string): Likewise.
4522 (args_to_string): Likewise.
4523 (cv_to_string): Likewise.
4525 2004-06-26 Mark Mitchell <mark@codesourcery.com>
4527 * cp-tree.h (cp_cv_quals): New type.
4528 (cp_declarator): Use it instead of "tree" as appropriate.
4529 (grok_method_quals): Adjust prototype.
4530 (grokclassfn): Likewise.
4531 (do_friend): Likewise.
4532 * decl.c (grokfndecl): Use cp_cv_quals, not tree.
4533 (grokdeclarator): Likewise.
4534 * decl2.c (grok_method_quals): Likewise.
4535 (grokclassfn): Likewise.
4536 * friend.c (do_friend): Likewise.
4537 * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
4538 * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
4539 (make_pointer_declarator): Likewise.
4540 (make_reference_declarator): Likewise.
4541 (make_ptrmem_declarator): Likewise.
4542 (cp_parser_ptr_operator): Likewise.
4543 (cp_parser_cv_qualifier_seq_opt): Likewise.
4544 (cp_parser_cv_qualifier_opt): Remove.
4545 (cp_parser_new_declarator_opt): Adjust call to
4546 cp_parser_ptr_operator.
4547 (cp_parser_conversion_declaration_opt): Likewise.
4548 (cp_parser_declarator): Use cp_cv_quals, not tree.
4549 (cp_parser_direct_declarator): Likewise.
4551 2004-06-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4553 * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
4554 Rename DECL_STMT to DECL_EXPR.
4555 * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
4556 * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
4557 * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
4559 2004-06-26 Jan Hubicka <jh@suse.cz>
4562 * decl2.c (maybe_emit_vtables): Always import_export_vtable for the
4563 reachability analysis.
4565 2004-06-25 Mark Mitchell <mark@codesourcery.com>
4567 * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
4570 2004-06-25 Paul Brook <paul@codesourcery.com>
4572 * decl2.c (get_guard): Call targetm.cxx.guard_type.
4573 (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
4575 2004-06-24 Mark Mitchell <mark@codesourcery.com>
4577 * decl.c (grokdeclarator): Restore error messages about __thread.
4578 * parser.c (cp_parser_decl_specifier_seq): Likewise.
4580 2004-06-24 Jason Merrill <jason@redhat.com>
4583 * decl.c (grokparms): Give the PARM_DECL reference type if the
4584 parameter is passed by invisible reference.
4586 2004-06-24 Andreas Schwab <schwab@suse.de>
4588 * cp-tree.h (enum cp_storage_class): Remove trailing comma.
4590 2004-06-23 Mark Mitchell <mark@codesourcery.com>
4592 * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
4593 (cp/decl.o): Likewise.
4594 (cp/decl2.o): Likewise.
4595 (cp/pt.o): Likewise.
4596 (cp/semantics.o): Likewise.
4597 * config-lang.in (gtfiles): Do not reference cp/lex.h.
4598 * class.c: Do not include lex.h.
4599 (add_implicitly_declared_members): Do not use
4600 adding_implicit_members.
4601 (check_bases_and_members): Do not talk about grok_x_components.
4602 * cp/cp-tree.h (adding_implicit_members): Remove.
4603 (cp_storage_class): New type.
4604 (cp_decl_spec): Likewise.
4605 (cp_decl_specifier_seq): Likewise.
4606 (cp_parameter_declarator): Use it for the decl_specifiers field.
4607 (check_tag_decl): Adjust prototype.
4608 (shadow_tag): Likewise.
4609 (groktypename): Likewise.
4610 (start_decl): Likewise.
4611 (start_function): Likewise.
4612 (start_method): Likewise.
4613 (grok_x_components): Remove.
4614 (grokfield): Adjust prototype.
4615 (grokbitfield): Likewise.
4616 (finish_member_class_template): Remove.
4617 * decl.c: Do not include lex.h.
4618 (adding_implicit_members): Do not define.
4619 (check_tag_decl): Do not use trees to represent decl-specifiers.
4620 (shadow_tag): Likewise.
4621 (groktypename): Likewise.
4622 (start_decl): Likewise.
4623 (grokvardecl): Likewise.
4624 (grokdeclarator): Likewise.
4625 (grokparms): Likewise.
4626 (start_function): Likewise.
4627 (start_method): Likewise.
4628 * decl.h (grokdeclarator): Adjust prototype.
4629 * decl2.c: Do not include lex.h.
4630 (grok_x_components): Remove.
4631 (grokfield): Do not use trees to represent decl-specifiers.
4632 (grokbitfield): Likewise.
4633 * lex.c: Do not include lex.h.
4635 * parser.c: Include target.h.
4636 (clear_decl_specs): New function.
4637 (cp_parser_translation_unit): Do not use trees to represent
4639 (cp_parser_postfix_expression): Likewise.
4640 (cp_parser_new_type_id): Likewise.
4641 (cp_parser_condition): Likewise.
4642 (cp_parser_simple_declaration): Likewise.
4643 (cp_parser_decl_specifier_seq): Likewise.
4644 (cp_parser_function_specifier_opt): Likewise.
4645 (cp_parser_conversion_type_id): Likewise.
4646 (cp_parser_template_parameter): Likewise.
4647 (cp_parser_explicit_instantiation): Likewise.
4648 (cp_parser_type_specifier): Likewise.
4649 (cp_parser_simple_type_specifier): Likewise.
4650 (cp_parser_init_declarator): Likewise.
4651 (cp_parser_type_id): Likewise.
4652 (cp_parser_type_specifier_seq): Likewise.
4653 (cp_parser_parameter_declaration): Likewise.
4654 (cp_parser_member_declaration): Likewise.
4655 (cp_parser_exception_declaration): Likewise.
4656 (cp_parser_function_definition_from_specifiers_and_declarator):
4658 (cp_parser_single_declaration): Likewise.
4659 (cp_parser_save_member_function_body): Likewise.
4660 (cp_parser_friend_p): Likewise.
4661 (cp_parser_set_storage_class): New function.
4662 (cp_parser_set_decl_spec_type): Likewise.
4663 * pt.c: Do not include lex.h.
4664 * semantics.c: Likewise.
4665 (finish_member_class_template): Remove.
4667 2004-06-23 Roger Sayle <roger@eyesopen.com>
4669 * call.c (build_cxx_call): Don't call expand_tree_builtin. No
4670 longer take both "args" and "convert_args" as arguments.
4671 (build_op_delete_call): Update call to build_cxx_call.
4672 (build_over_call): Likewise, update call to build_cxx_call.
4673 * cp-tree.h (build_cxx_call): Update funtion prototype.
4674 * typeck.c (build_function_call): Don't call expand_tree_builtin.
4675 * rtti.c (throw_bad_cast): Update call to build_cxx_call.
4676 (throw_bad_typeid): Likewise.
4677 (build_dynamic_cast_1): Likewise.
4679 2004-06-22 Richard Henderson <rth@redhat.com>
4681 * class.c (build_vfn_ref): Take a pointer not object. Build
4683 (cp_fold_obj_type_ref): New.
4684 * call.c (build_over_call): Update build_vfn_ref call.
4685 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
4686 * cp-tree.h (cp_fold_obj_type_ref): Declare.
4688 2004-06-21 Jason Merrill <jason@redhat.com>
4691 * cp-gimplify.c (cp_gimplify_init_expr): Look through
4694 2004-06-21 Mark Mitchell <mark@codesourcery.com>
4696 * cp-tree.def (NEW_EXPR): Add a fourth slot.
4697 * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
4698 (TREE_PARMLIST): Likewise.
4699 (CALL_DECLARATOR_PARMS): Likewise.
4700 (CALL_DECLARATOR_QUALS): Likewise.
4701 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
4702 (cp_declarator_kind): New type.
4703 (cp_parameter_declarator): Likewise.
4704 (cp_declarator): Likewise.
4705 (cp_error_declarator): Likewise.
4706 (no_parameters): Likewise.
4707 (groktypename): Change prototype.
4708 (start_decl): Likewise.
4709 (start_handler_parms): Likewise.
4710 (get_scope_of_declarator): Likewise.
4711 (start_function): Likewise.
4712 (start_preparsed_function): New function.
4713 (start_function): Change prototype.
4714 (start_method): Likewise.
4715 (grokfield): Likewise.
4716 (grokbitfield): Likewise.
4717 (build_new): Likewise.
4718 (make_pointer_declarator): Remove.
4719 (make_reference_declarator): Likewise.
4720 (make_call_declarator): Likewise.
4721 (set_quals_and_spec): Likewise.
4722 (process_template_parm): Change prototype.
4723 (begin_function_definition): Remove.
4724 (finish_parmlist): Remove.
4725 * decl.c (groktypename): Do not use trees to represent
4727 (start_decl): Likewise.
4728 (start_handler_parms): Remove.
4729 (get_scope_of_declarator): Reimplement.
4730 (grokdeclarator): Do not use trees to represent declarators.
4731 (grokparms): Likewise.
4732 (start_function): Likewise.
4733 (start_method): Likewise.
4734 (build_void_list_mode): Do not use TREE_PARMLIST.
4735 * decl.h (grokdeclarator): Change prototype.
4736 * decl2.c (grok_method_quals): Robustify.
4737 (grok_x_components): Do not use trees to represent declarators.
4738 (grokfield): Likewise.
4739 (grokbitfield): Likewise.
4740 (start_objects): Build FUNCTION_DECLs, not declarators.
4741 (start_static_storage_duration_function): Likewise.
4742 * init.c (build_new): Simplify.
4743 * lex.c (make_pointer_declarator): Remove.
4744 (make_reference_declarator): Likewise.
4745 (make_call_declarator): Likewise.
4746 (set_quals_and_spec): Likewise.
4747 * method.c (use_thunk): Use start_preparsed_function.
4748 (synthesize_method): Likewise.
4749 (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
4750 * optimize.c (maybe_clone_body): Use start_preparsed_function.
4751 * parser.c (cp_error_declarator): New variable.
4752 (declarator_obstack): Likewise.
4753 (alloc_declarator): New function.
4754 (make_declarator): Likewise.
4755 (make_id_declarator): Likewise.
4756 (make_pointer_declarator): Likewise.
4757 (make_reference_declarator): Likewise.
4758 (make_ptrmem_declarator): Likewise.
4759 (make_call_declarator): Likewise.
4760 (make_array_declarator): Likewise.
4761 (no_parameters): New variable.
4762 (make_parameter_declarator): Likewise.
4763 (cp_parser_check_for_definition_in_return_type): Do not use trees
4764 to represent declarators.
4765 (cp_parser_translation_unit): Likewise.
4766 (cp_parser_new_expression): Likewise.
4767 (cp_parser_new_type_id): Likewise.
4768 (cp_parser_new_declarator_opt): Likewise.
4769 (cp_parser_direct_new_declarator): Likewise.
4770 (cp_parser_condition): Likewise.
4771 (cp_parser_declaration_statement): Likewise.
4772 (cp_parser_declaration): Likewise.
4773 (cp_parser_conversion_type_id): Likewise.
4774 (cp_parser_conversion_declarator_opt): Likewise.
4775 (cp_parser_template_parameter_list): Likewise.
4776 (cp_parser_template_parameter): Likewise.
4777 (cp_parser_explicit_instantiation): Likewise.
4778 (cp_parser_init_declarator): Likewise.
4779 (cp_parser_declarator): Likewise.
4780 (cp_parser_direct_declarator): Likewise.
4781 (cp_parser_type_id): Likewise.
4782 (cp_parser_parameter_declaration_clause): Likewise.
4783 (cp_parser_parameter_declaration_list): Likewise.
4784 (cp_parser_parameter_declaration): Likewise.
4785 (cp_parser_member_declaration): Likewise.
4786 (cp_parser_exception_declaration): Likewise.
4787 (cp_parser_check_declarator_template_parameters): Likewise.
4788 (cp_parser_function_definition_from_specifiers_and_declarator):
4790 (cp_parser_save_member_function_body): Likewise.
4791 * pt.c (process_template_parm): Add is_non_type parameter.
4792 (convert_template_argument): Adjust call to groktypename.
4793 (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
4794 (tsubst): Do not expect declarators.
4795 (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
4797 (instantiate_decl): Use start_preparsed_function.
4798 * semantics.c (begin_function_definition): Remove.
4799 (finish_parmlist): Remove.
4800 * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
4803 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4805 * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
4806 (build_new_method_call): Likewise.
4807 * decl.c (local_variable_p_walkfn): Don't walk into types.
4808 * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
4809 (build_anon_union_vars): Add new operand for COMPONENT_REF.
4810 * init.c (buld_new): Add new operand for ARRAY_REF.
4811 * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
4812 (do_build_assign_ref): Likewise.
4813 * parser.c (cp_parser_direct_new_declarator): Add new operands
4815 (cp_parser_direct_declarator): Likewise.
4816 * pt.c (tsubst): Likewise.
4817 (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
4819 * semantics.c (finish_non_static_data_member): Add new operand
4821 * typeck.c (build_class_member_access_expr): Likewise.
4822 (build_class_member_access_expr, finish_class_member_access_expr):
4824 (build_ptrmemfunc_access_expr): Likewise.
4825 (build_array_ref): Add new operands for ARRAY_REF.
4826 * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
4827 * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
4829 2004-06-21 Richard Henderson <rth@redhat.com>
4831 * dump.c (cp_dump_tree): Don't use dump_next_stmt.
4832 * parser.c (cp_parser_jump_statement): Update commentary.
4833 * pt.c (tsubst_expr): Use RETURN_EXPR.
4834 * semantics.c (finish_return_stmt): Likewise.
4835 (finalize_nrv_r): Likewise.
4836 * typeck.c, typeck2.c: Update file start commentary.
4838 2004-06-21 Richard Henderson <rth@redhat.com>
4840 * semantics.c (finish_expr_stmt): Call verify_sequence_points.
4842 2004-06-20 Richard Henderson <rth@redhat.com>
4844 * cp-tree.h (add_decl_stmt): Declare.
4845 * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
4846 * semantics.c (maybe_cleanup_point_expr): New.
4847 (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
4848 finish_for_expr, finish_switch_cond): Use it.
4849 (finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN.
4851 2004-06-20 Richard Henderson <rth@redhat.com>
4853 * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
4854 * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
4855 (cp_gimplify_expr): Call it.
4856 (gimplify_cleanup_stmt): Move from c-gimplify.c.
4857 (cp_genericize): New.
4858 * decl.c (finish_function): Call it.
4859 * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
4860 (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
4861 (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
4862 (cp_genericize): Declare.
4863 * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
4864 * dump.c (cp_dump_tree): Likewise.
4865 * semantics.c (push_cleanup): Move from c-semantics.c.
4867 2004-06-20 Zack Weinberg <zack@codesourcery.com>
4869 * cp-lang.c (has_c_linkage): Implement.
4871 * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
4872 * decl.c (duplicate_decls): Use COPY_DECL_RTL.
4873 (builtin_function_1): Don't call make_decl_rtl.
4874 (build_cp_library_fn): Don't call set_mangled_name_for_decl.
4875 (grokvardecl): Don't call mangle_decl.
4876 * except.c (nothrow_libfn_p): Look at DECL_NAME, not
4877 DECL_ASSEMBLER_NAME.
4878 * method.c (set_mangled_name_for_decl): Delete.
4879 * name-lookup.c (pushdecl): When a local extern shadows a
4880 file-scope declaration of the same object, give both DECLs the
4882 * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
4883 on DECL_ASSEMBLER_NAME.
4885 2004-06-19 Richard Henderson <rth@redhat.com>
4887 * cp-gimplify.c: Remove unnecessary prototypes.
4888 (cp_gimplify_stmt): Merge into ...
4889 (cp_gimplify_expr): ... here. Move to end of file. Handle
4890 stmts_are_full_exprs_p frobbing.
4891 * cp-tree.h (cp_gimplify_stmt): Remove.
4892 * pt.c (tsubst_expr): Merge prep_stmt and unify.
4893 * tree.c (init_tree): Don't set lang_gimplify_stmt.
4895 2004-06-18 Richard Henderson <rth@redhat.com>
4898 * semantics.c (begin_cond): New.
4899 (finish_cond): Rewrite to handle template DECL_STMTs specially.
4900 Assume that non-template decls go land before the conditional.
4901 (simplify_loop_decl_cond): Likewise.
4902 (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
4903 finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
4904 begin_switch_stmt, finish_switch_cond): Update to match.
4906 2004-06-17 Jason Merrill <jason@redhat.com>
4909 * semantics.c (simplify_aggr_init_expr): Don't return the slot.
4910 (finish_stmt_expr_expr): Update type after conversions.
4911 (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
4912 Handle void initializer.
4913 * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
4915 2004-06-17 Geoffrey Keating <geoffk@apple.com>
4917 * class.c (build_clone): Don't call defer_fn, let mark_used do it.
4918 * cp-tree.h (defer_fn): Delete.
4919 * decl2.c (defer_fn): Delete.
4920 (finish_file): Simplify deferred_fns loops; check that
4921 only used inline functions get into deferred_fns.
4922 (mark_used): Inline previous contents of defer_fn.
4924 2004-06-16 Richard Henderson <rth@redhat.com>
4926 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
4927 (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
4928 * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
4929 of CTOR_INITIALIZER ...
4930 (pp_cxx_statement): ... here.
4931 * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
4932 (finish_function): Use alloc_stmt_list to zap entire function.
4933 * parser.c (cp_parser_compound_statement): Update commentary.
4934 * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
4935 * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
4936 (finish_stmt_expr): Don't look through COMPOUND_STMT.
4938 2004-06-16 Geoffrey Keating <geoffk@apple.com>
4940 * pt.c (mark_decl_instantiated): Don't call defer_fn.
4942 2004-06-16 Richard Henderson <rth@redhat.com>
4944 * parser.c (cp_parser_labeled_statement): Update commentary.
4945 * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
4946 * tree.c (mark_local_for_remap_r): Likewise.
4948 2004-06-16 Richard Henderson <rth@redhat.com>
4950 * parser.c (cp_parser_asm_definition): Update commentary.
4951 * pt.c (tsubst_expr): Use ASM_EXPR.
4952 * semantics.c (finish_asm_stmt): Likewise.
4954 2004-06-16 Richard Henderson <rth@redhat.com>
4956 * decl.c (finish_destructor_body): Use LABEL_EXPR.
4957 * parser.c (cp_parser_statement): Update commentary.
4958 * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
4959 * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
4960 * tree.c (mark_local_for_remap_r): Likewise.
4962 2004-06-16 Richard Henderson <rth@redhat.com>
4965 * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
4966 statement in FOR_INIT_STMT for templates.
4968 2004-06-15 Richard Henderson <rth@redhat.com>
4970 * call.c (initialize_reference): Don't build CLEANUP_STMT here.
4971 * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
4972 (genericize_try_block): Use gimplify_stmt.
4973 (genericize_catch_block, genericize_eh_spec_block): Likewise.
4974 (cp_gimplify_init_expr): Remove STMT_EXPR special case.
4975 (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
4976 * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
4977 (cp_tree_chain_matters_p): Remove.
4978 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
4979 (COMPOUND_STMT_BODY_BLOCK): New.
4980 (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
4981 (EXPR_STMT_STMT_EXPR_RESULT): New.
4982 (building_stmt_tree): Check cur_stmt_list.
4983 (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
4984 (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
4985 * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
4986 (cp_finish_decl): Use push_cleanup.
4987 (start_function, finish_function): Use statement lists.
4988 (finish_stmt): Do nothing.
4989 * except.c (begin_eh_spec_block): Use statement lists.
4990 (check_handlers_1, check_handlers): Likewise.
4991 * init.c (construct_virtual_base): Don't add extra compound stmts.
4992 (build_vec_init): Likewise.
4993 * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
4994 * name-lookup.h (struct cp_binding_level): Add statement_list.
4995 * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
4996 (cp_parser_labeled_statement, cp_parser_expression_statement,
4997 cp_parser_statement_seq_opt): Likewise.
4998 (cp_parser_compound_statement): Likewise. Take bool for try block.
4999 (cp_parser_selection_statement): Tidy if processing.
5000 (cp_parser_already_scoped_statement): Rewrite to do what it says.
5001 * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
5002 (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST.
5003 Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
5004 * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
5005 (finish_cond): New, rewritten from FINISH_COND.
5006 (simplify_loop_decl_cond): New.
5007 (finish_expr_stmt): Avoid nested EXPR_STMTs.
5008 (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
5009 begin_else_clause, finish_else_clause, finish_if_stmt,
5010 begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
5011 begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
5012 finish_for_cond, finish_for_stmt, begin_switch_stmt,
5013 finish_switch_cond, finish_switch_stmt, begin_try_block,
5014 finish_try_block, finish_cleanup_try_block, finish_function_try_block,
5015 finish_handler_sequence, finish_function_handler_sequence,
5016 begin_handler, finish_handler_parms, finish_handler,
5017 begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
5018 using statement lists.
5019 (begin_compound_stmt): Replace has_no_scope argument with flags.
5020 Update all callers. Use statement lists.
5021 (finish_compound_stmt): Likewise.
5022 (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
5023 (current_scope_stmt_stack): Remove.
5024 (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
5025 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
5026 Rewrite with statement lists.
5028 2004-06-15 Alexandre Oliva <aoliva@redhat.com>
5030 * parser.c: Change all assignments of c_lex_string_translate
5031 to true and false to 1 and 0.
5032 (cp_lexer_read_token): Convert type of the translated string.
5033 (cp_parser_skip_to_closing_parentheses): Preserve original
5034 value of c_lex_string_translate, and set it to -1 while
5036 (cp_parser_cache_group): Likewise.
5037 (cp_parser_cache_group_1): Renamed.
5038 (cp_parser_asm_operand_list): Remove redundant setting of
5039 c_lex_string_translate.
5040 (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
5041 Handle chained strings.
5043 2004-06-12 Andrew Pinski <apinski@apple.com>
5047 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
5049 * cp-tree.h: Fix typo.
5051 * cp-tree.h: Include cgraph.h
5052 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
5053 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
5055 2004-06-12 Jason Merrill <jason@redhat.com>
5057 PR tree-optimization/14107
5058 * decl.c (finish_function): Warn about no return in all functions.
5060 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
5062 * cp-tree.h (struct language_function): Remove cannot_inline.
5063 * decl.c (save_function_data): cannot_inline is no more.
5064 (cxx_push_function_context): Likewise.
5065 * decl2.c (start_objects, start_static_storage_duration_function):
5066 Reset DECL_INLINE, set DECL_UNINLINABLE.
5068 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5071 * search.c (lookup_field): Propagate the ambiguity list.
5072 (lookup_fnfields): Likewise.
5074 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5077 * parser.c (cp_parser_template_name): Ctors/dtors never need a
5078 template keyword to disambiguate.
5080 2004-06-14 Mark Mitchell <mark@codesourcery.com>
5083 * decl.c (grokdeclarator): Ignore pointer-to-members when
5084 computing template depth.
5087 * name-lookup.c (pushtag): Do not try to put class declarations in
5088 explicit specialization scopes.
5090 2004-06-11 Andrew Pinski <pinskia@physics.uc.edu>
5092 * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
5094 2004-06-11 Mark Mitchell <mark@codesourcery.com>
5097 * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
5098 bindings for undeclared built-ins.
5100 2004-06-11 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5102 * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
5103 appear at the correct location.
5105 2004-06-10 Jason Merrill <jason@redhat.com>
5109 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5110 * init.c (build_offset_ref): Build SCOPE_REF with non-null
5111 TREE_TYPE for non-dependent names.
5112 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
5113 unknown_type_node as its TREE_TYPE.
5114 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
5115 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
5116 (dump_expr) <SCOPE_REF case>: Likewise.
5118 2004-06-10 Mark Mitchell <mark@codesourcery.com>
5121 * parser.c (cp_parser_direct_declarator): Robustify.
5124 * pt.c (tsubst_copy): Use decl_constant_value on enumeration
5125 constants in non-dependent contexts.
5129 * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
5132 2004-06-10 Jakub Jelinek <jakub@redhat.com>
5135 * decl.c (duplicate_decls): Handle fileptr_type_node arguments
5138 2004-06-09 Mark Mitchell <mark@codesourcery.com>
5142 2004-06-07 Mark Mitchell <mark@codesourcery.com>
5143 * lex.c (handle_pragma_interface): Deprecate.
5144 (handle_pragma_implementation): Likewise.
5146 2004-06-09 Andrew Pinski <pinskia@physics.uc.edu>
5148 * g++spec.c (lang_specific_driver): Remove check for -lm
5149 and -lmath when check it see if it was the math library.
5151 2004-06-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5154 * parser.c (cp_parser_direct_declarator): Reject constructor named
5155 as qualified template-id.
5157 2004-06-07 Mark Mitchell <mark@codesourcery.com>
5160 * lex.c (handle_pragma_interface): Deprecate.
5161 (handle_pragma_implementation): Likewise.
5163 2004-06-07 Mark Mitchell <mark@codesourcery.com>
5166 * parser.c (cp_parser_iteration_statement): Fix typo in error
5170 * pt.c (tsubst_default_argument): Do not defer access checks
5171 while substituting into the default argument.
5174 * pt.c (tsubst_copy): Do not try to substitute for an enumeration
5175 constant in a non-dependent context.
5178 * except.c (build_throw): Ensure that temp_expr has been
5181 2004-06-06 Roger Sayle <roger@eyesopen.com>
5183 * cp/cp-tree.h (lvalue_or_else): Add function prototype.
5185 2004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5188 * parser.c (cp_parser_mem_initializer_id): Gracefully reject
5189 'typename', and accept 'template'.
5191 2004-06-03 Andrew Pinski <pinskia@physics.uc.edu>
5192 Jan Hubicka <jh@suse.cz>
5195 * method.c (use_think): Do not mark thunk as referenced.
5197 2004-06-03 Matt Austern <austern@apple.com>
5200 * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
5201 is nonzero, and if we see a noninline definition of a key method,
5202 make the vtables nonweak.
5204 2004-06-02 Matt Austern <austern@apple.com>
5206 * cp-tree.h (instantiate_decl): new boolean parameter,
5207 undefined_ok. Current behavior is equivalent to its being 0.
5208 * decl2.c (mark_used): Add new argument when calling instantiate_decl
5209 * pt.c (mark_decl_instantiated): Unconditionally make
5210 instantiations explicit unconditionally
5211 (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
5212 since mark_decl_instantiated now does it.
5213 (instantiate_class_member): New. Instantiate a member of an
5214 explicitly instantiated class template.
5215 (do_type_instantiation): Explicitly instantiate members of an
5216 explicitly instantiated class template.
5217 (instantiate_decl): if undefined_ok is nonzero, and if we're
5218 trying to explicitly instantiated a template with no definition,
5219 change it to an implicit instantiation.
5220 (instantiate_pending_templates): Add new argument to instantiate_decl.
5221 * tree.c (cp_cannot_inline_tree_fn): Likewise.
5223 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
5225 * cp-tree.h: Fix typo.
5227 * cp-tree.h: Include cgraph.h
5228 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
5229 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
5231 2004-06-01 Jason Merrill <jason@redhat.com>
5234 * call.c (call_builtin_trap): Remove type parm.
5235 (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
5236 (build_x_va_arg): Dereference a null pointer for a non-POD argument.
5238 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5241 * init.c (build_offset_ref): Build SCOPE_REF with non-null
5242 TREE_TYPE for non-dependent names.
5243 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
5244 unknown_type_node as its TREE_TYPE.
5245 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
5246 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
5247 (dump_expr) <SCOPE_REF case>: Likewise.
5249 2004-06-01 Richard Henderson <rth@redhat.com>
5250 Andrew Pinski <pinskia@physics.uc.edu>
5252 * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
5253 * parser.c (struct cp_parser): Remove in_offsetof.
5254 (cp_parser_new): Don't set it.
5255 (cp_parser_unary_expression): Don't check it.
5256 (cp_parser_postfix_open_square_expression): Split out from ...
5257 (cp_parser_postfix_expression): ... here.
5258 (cp_parser_postfix_dot_deref_expression): Likewise.
5259 (cp_parser_builtin_offsetof): New.
5260 (cp_parser_primary_expression): Use it.
5262 2004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5265 * parser.c (cp_parser_postfix_expression): Allow subscript
5266 operator in offsetof.
5268 2004-05-31 Mark Mitchell <mark@codesourcery.com>
5271 * friend.c (add_friend): Do not try to perform access checks for
5272 functions from dependent classes.
5274 2004-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
5276 * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
5277 (pp_cxx_begin_template_argument_list): Turn into a function.
5278 (pp_cxx_end_template_argument_list): Likewise.
5279 (pp_cxx_separate_with): Define.
5280 (pp_cxx_unqualified_id): Tidy.
5281 (pp_cxx_primary_expression): Likewise.
5282 (pp_cxx_postfix_expression): Likewise.
5283 (pp_cxx_expression): Likewise.
5284 (pp_cxx_simple_type_specifier): Likewise.
5285 (pp_cxx_type_specifier_seq): Likewise.
5286 (pp_cxx_parameter_declaration_clause): Likewise.
5287 (pp_cxx_exception_specification): Likewise.
5288 (pp_cxx_direct_declarator): Likewise.
5289 (pp_cxx_type_id): Likewise.
5290 * cxx-pretty-print.h (pp_cxx_whitespace): Export from
5292 (pp_cxx_left_paren): Likewise.
5293 (pp_cxx_right_paren): Likewise.
5294 (pp_cxx_left_brace): Likewise.
5295 (pp_cxx_right_brace): Likewise.
5296 (pp_cxx_left_bracket): Likewise.
5297 (pp_cxx_right_bracket): Likewise.
5298 (pp_cxx_dot): Likewise.
5299 (pp_cxx_identifier): Likewise.
5300 (pp_cxx_tree_identifier): Likewise.
5301 (pp_cxx_ampersand): New macro.
5302 (pp_cxx_star): Likewise.
5303 (pp_cxx_arrow): Likewise.
5304 (pp_cxx_semicolon): Likewise.
5305 (pp_cxx_complement): Likewise.
5306 (pp_cxx_begin_template_argument_list): Declaree.
5307 (pp_cxx_end_template_argument_list): Likewise.
5308 (pp_cxx_colon_colon): likewise.
5310 2004-05-31 Eric Botcazou <ebotcazou@libertysurf.fr>
5312 * parser.c (cp_parser_simple_type_specifier): Explicitly test
5315 2004-05-31 Kazu Hirata <kazu@cs.umass.edu>
5317 * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
5318 typeck.c: Fix comment formatting.
5320 2004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
5322 * cp-lang.c (cp_expand_decl): Remove.
5323 (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
5325 2004-05-30 Andreas Jaeger <aj@suse.de>
5327 * lang-specs.h: Add missing initializers for .ii.
5329 2004-05-28 Aldy Hernandez <aldyh@redhat.com>
5331 * decl.c (cp_make_fname_decl): Free return value from
5334 2004-05-28 Mark Mitchell <mark@codesourcery.com>
5337 * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
5339 * init.c (build_new): Likewise.
5342 * name-lookup.c (arg_assoc): Robustify.
5345 * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
5346 when determining the scope to use for a pointer to member.
5347 (lookup_anon_field): Give it external linkage.
5348 * cp-tree.h (lookup_anon_field): Declare it.
5349 * expr.c (cplus_expand_constant): Use it.
5351 2004-05-28 Mark Mitchell <mark@codesourcery.com>
5354 * parser.c (cp_parser_simple_type_specifier): Call
5355 maybe_note_name_used_in_class.
5357 2004-05-28 Tom Marshall <tmarshall@real.com>
5360 * class.c (finish_struct_1): Warn only if the dtor is non-private or
5361 the class has friends.
5363 2004-05-27 Adam Nemet <anemet@lnxw.com>
5366 * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
5367 TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
5369 2004-05-24 Geoffrey Keating <geoffk@apple.com>
5371 * method.c (implicitly_declare_fn): Don't call defer_fn; abort
5372 if it might be needed.
5373 * pt.c (mark_decl_instantiated): Only call defer_fn if
5374 the function actually needs processing in finish_file.
5375 * decl2.c (finish_file): Add check that elements in
5376 deferred_fns_used are really needed there. Remove unnecessary
5377 test of DECL_SAVED_TREE.
5379 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
5381 * Make-lang.in: No need to specify $(LIBCPP).
5383 2004-05-23 Mark Mitchell <mark@codesourcery.com>
5386 * parser.c (cp_parser_class_head): Robustify.
5389 * parser.c (cp_parser_decl_specifier_seq): Correct error in
5391 (cp_parser_constructor_declarator_p): Treat attributes
5395 * typeck.c (build_unary_op): Do not attempt to resolve casts to
5396 base classes in templates.
5398 2004-05-23 Mark Mitchell <mark@codesourcery.com>
5401 * pt.c (instantiate_template): Robustify.
5403 2004-05-23 Mark Mitchell <mark@codesourcery.com>
5406 * decl.c (xref_tag): Issue errors about redeclaring template
5407 classes as non-template classes.
5409 2004-05-23 Mark Mitchell <mark@codesourcery.com>
5412 * name-lookup.c (supplement_binding): Allow redefinitions of
5416 * parser.c (cp_parser_template_argument): Robustify.
5418 2004-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
5420 * class.c (alter_access): Use %E format specifier to print an
5421 identifier node. Avoid looking at the IDENTIFIER_POINTER.
5422 (push_lang_context): Likewise.
5423 * decl.c (lookup_label): Likewise.
5424 (grokdeclarator): Likewise.
5425 * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
5426 * pt.c (do_type_instantiation): Likewise.
5427 * tree.c (handle_java_interface_attribute): Likewise.
5428 (handle_com_interface_attribute): Likewise.
5429 (handle_init_priority_attribute): Likewise.
5431 2004-05-22 Mark Mitchell <mark@codesourcery.com>
5435 * pt.c (build_non_dependent_expr): Expand the set of tree nodes
5436 recognized as overloaded functions.
5438 2004-05-22 Mark Mitchell <mark@codesourcery.com>
5441 * class.c (layout_nonempty_base_or_field): Do not try to avoid
5442 layout conflicts for unions.
5445 * typeck.c (build_x_unary_op): Instantiate template class
5446 specializations before looking for "operator &".
5449 * typeck.c (complete_type): Layout non-dependent array types, even
5453 * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
5456 2004-05-22 Roger Sayle <roger@eyesopen.com>
5458 * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
5459 returning when TREE_TYPE is error_mark_node.
5460 * typeck.c (require_complete_type): Return error_mark_node if
5461 value's type is an error_mark_node.
5463 2004-05-20 Andrew Pinski <pinskia@physics.uc.edu>
5465 * optimize.c (calls_setjmp_r): Remove.
5466 (calls_setjmp_p): Remove.
5467 * cp-tree.c (calls_setjmp_p): Remove.
5468 * decl.c (finish_function): Do not call calls_setjmp_p.
5470 2004-05-18 Zack Weinberg <zack@codesourcery.com>
5472 * decl.c (cp_finish_decl): Use mark_decl_referenced.
5473 * decl2.c (maybe_make_one_only): Likewise.
5474 * method.c (use_thunk): Likewise.
5476 2004-05-18 Jason Merrill <jason@redhat.com>
5478 * class.c (build_base_path): Tidy a bit.
5480 2004-05-14 Geoffrey Keating <geoffk@apple.com>
5482 * name-lookup.c (struct scope_binding): New.
5483 (EMPTY_SCOPE_BINDING): New.
5484 (lookup_using_namespace): Take a scope_binding instead of a
5486 (qualified_lookup_using_namespace): Likewise.
5487 (cxx_binding_clear): Delete.
5488 (do_nonmember_using_decl): Use a scope_binding instead of a
5490 (lookup_tag): Don't call select_decl.
5491 (ambiguous_decl): Don't return anything (and change callers to match).
5492 Take a scope_binding as the second parameter.
5493 (lookup_namespace_name): Use a scope_binding instead of a
5495 (unqualified_namespace_lookup): Likewise.
5496 (lookup_qualified_name): Likewise.
5497 (select_decl): Take a scope_binding instead of a cxx_binding.
5498 Use macros rather than hand-coding tests for type-ness.
5500 2004-05-13 Diego Novillo <dnovillo@redhat.com>
5502 * cp-gimplify.c: Rename from cp-simplify.c.
5503 * Make-lang.in, optimize.c: Update.
5505 2004-05-13 Diego Novillo <dnovillo@redhat.com>
5507 Merge from tree-ssa-20020619-branch. See
5508 ChangeLog.tree-ssa for details.
5510 * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
5511 cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
5512 expr.c, init.c, name-lookup.h, optimize.c, parser.c,
5513 pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
5515 * cp-mudflap.c: New file.
5516 * cp-simplify.c:: New file.
5518 2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5521 * decl2.c (check_classfn): For member templates, compare also the
5522 template parameters to match the declaration.
5523 * cp-tree.h: Adjust declaration of check_classfn.
5524 * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
5525 * friend.c (do_friend): Likewise.
5526 * pt.c (tsubst_friend_function): Likewise.
5528 2004-05-01 Zack Weinberg <zack@codesourcery.com>
5530 * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
5531 Instead, dig into the representation type to find the array bound.
5533 2004-04-30 Jason Merrill <jason@redhat.com>
5535 Refer to base members using COMPONENT_REFs where possible.
5536 * class.c (build_simple_base_path): New fn.
5537 (build_base_path): Use it for non-virtual base references.
5538 (layout_class_type): Change base fields to their real type
5539 after layout is done.
5540 * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
5541 * cp-lang.c (cxx_get_alias_set): Use it.
5543 2004-04-30 Kazu Hirata <kazu@cs.umass.edu>
5545 * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
5548 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5551 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
5552 used in integral constant expressions.
5554 2004-04-22 Mark Mitchell <mark@codesourcery.com>
5556 * init.c (build_aggr_init): Fix accidental use of C99 construct in
5559 * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
5561 * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
5562 * decl.c (reshape_init): Use it.
5563 * init.c (perform_member_init): Remove redundant condition.
5564 (build_aggr_init): Adjust to handle brace-enclosed initializers
5566 (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
5568 * parser.c (cp_parser_initializer_clause): Do not set
5569 TREE_HAS_CONSTRUCTOR on the initializer.
5570 * rtti.c (tinfo_base_init): Likewise.
5571 (generic_initializer): Likewise.
5572 (ptr_initializer): Likewise.
5573 (ptm_initializer): Likewise.
5574 (class_initializer): Likewise.
5575 (get_pseudo_ti_init): Likewise.
5576 * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
5578 2004-04-22 Alan Modra <amodra@bigpond.net.au>
5580 * name-lookup.c (anonymous_namespace_name): Make static.
5582 2004-04-19 Roger Sayle <roger@eyesopen.com>
5585 * class.c (build_base_path): Call fold whilst building the NULL
5586 pointer check expression trees.
5588 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
5590 * init.c (build_new_1): Don't use type size argument for Java
5591 _Jv_AllocObject call.
5593 2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
5595 * method.c (make_alias_for_thunk): Remove preprocessor guard on
5596 declaration and definition.
5598 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
5601 * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
5602 than ASM_OUTPUT_DEF.
5604 2004-04-08 Jakub Jelinek <jakub@redhat.com>
5606 * decl2.c (mark_used): Don't segfault if cfun != NULL but
5607 current_function_decl == NULL.
5609 2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
5612 * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
5615 2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5617 * init.c (decl_constant_value): Don't look at DECL_INITIAL
5619 * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
5620 or TREE_SIDE_EFFECTS of a type.
5622 2004-04-02 Nathan Sidwell <nathan@codesourcery.com>
5625 * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
5626 cv-qualifier unification.
5627 * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
5629 2004-04-02 Jan Hubicka <jh@suse.cz>
5631 * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
5632 * cp-tree.h (cp_update_decl_after_saving): Declare.
5633 * tree.c (cp_update_decl_after_saving): Define.
5635 2004-04-01 Mark Mitchell <mark@codesourcery.com>
5638 * typeck.c (get_delta_difference): Call fold before returning the
5641 2004-04-01 Richard Henderson <rth@redhat.com>
5644 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
5645 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
5647 2004-04-01 Mark Mitchell <mark@codesourcery.com>
5650 * name-lookup.c (maybe_push_cleanup_level): Robustify.
5652 2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5654 * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
5656 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5658 * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
5659 * class.c (check_bitfield_decl): Likewise.
5660 * cvt.c (type_promotes_to): Likewise.
5661 * decl.c (finish_enum): Likewise.
5662 * mangle.c (write_builtin_type): Likewise.
5663 * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
5664 * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
5665 (build_binary_op): Likewise.
5667 2004-03-31 Jan Hubicka <jh@suse.cz>
5669 * tree.h (optimize_function): Kill prototype.
5670 * optimize.c (dump_function, optimize_function, dump_finction): Kill.
5671 * semantics.c (expand_body): Kill.
5673 2004-03-30 Mark Mitchell <mark@codesourcery.com>
5676 * decl.c (start_decl_1): Do not decide whether or not to create a
5677 new cleanup level until after the type has been completed.
5680 * pt.c (tsubst_default_argument): Clear current_function_decl.
5682 2004-03-30 Zack Weinberg <zack@codesourcery.com>
5684 * name-lookup.c, parser.c: Use new shorter form of GTY markers.
5686 2004-03-29 Zack Weinberg <zack@codesourcery.com>
5688 * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
5689 is null, just print the literal name and return.
5691 2004-03-25 Kazu Hirata <kazu@cs.umass.edu>
5693 * cxx-pretty-print.c: Fix comment typos.
5695 2004-03-24 Kazu Hirata <kazu@cs.umass.edu>
5697 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
5700 2004-03-23 Ziemowit Laski <zlaski@apple.com>
5702 * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
5703 * mangle.c (write_type): Add call to 'mangle_fundamental_type'
5706 2004-03-23 Zack Weinberg <zack@codesourcery.com>
5708 PR 12267, 12391, 12560, 13129, 14114, 14133
5709 * cp-lang.c (c_reset_state): Delete.
5710 (push_file_scope, pop_file_scope): New stubs.
5711 * parser.c (c_parse_file): Call sorry() here if called more than once.
5713 2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5715 * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
5718 2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5720 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
5722 2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
5724 * error.c (enum pad): Remove.
5725 (dump_qualifiers): Likewise.
5726 (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
5727 (dump_aggr_type): Likewise.
5728 (dump_type_suffix): Likewise.
5729 (dump_simple_decl): Likewise.
5730 (dump_function_decl): Likewise.
5731 (cv_to_string): Likewise.
5732 (dump_type_prefix): Likewise. Adjust return void.
5733 * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
5735 (pp_cxx_template_keyword_if_needed): Document.
5736 (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
5737 (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
5738 MUST_NOT_THROW_EXPR.
5740 2004-03-21 Mark Mitchell <mark@codesourcery.com>
5743 * decl.c (cp_finish_decl): Compute the size of arrays declared in
5744 templates, if their type is non-dependent.
5746 2004-03-19 Mark Mitchell <mark@codesourcery.com>
5748 * call.c (build_op_delete_call): Do not forget the placement
5749 arguments when iterating through mutiple delete operators.
5751 * cp-tree.h (svaed_scope): Remove last_parms.
5752 (NEW_DELETE_OPNAME_P): New macro.
5753 (last_function_parms): Remove.
5754 (do_friend): Adjust prototype.
5755 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
5756 using last_function_parms.
5757 (grokfndecl): Take the PARM_DECLs as an argument, rather than
5758 using last_function_parms.
5759 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
5760 for class-specific operator new and operator delete.
5761 (grok_op_properties): Do not look for allocation functions with
5763 (start_function): Use DECL_ARGUMENTS instead of
5764 last_function_parms.
5765 * decl.h (last_function_parms): Do not declare.
5766 * decl2.c (grokclassfn): Do not use last_function_parms.
5767 * friend.c (do_friend): Remove parmdecls parameter.
5768 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
5769 (pop_from_top_level): Do not restore it.
5770 * pt.c (check_explicit_specialization): Do not adjust
5771 last_function_parms.
5773 * name-lookup.c (do_local_using_decl): Create a local binding for
5774 types brought in via using declarations.
5776 * name-lookup.c (lookup_arg_dependent): Handle block-scope
5777 function declarations correctly.
5779 * semantics.c (finish_id_expression): Correct handling of
5780 conversion operators to dependent types.
5782 * typeck.c (lookup_destructor): Allow the use of destructors from
5785 2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5787 * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
5788 TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
5789 * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
5790 the field is named TEMPLATE_TYPE_PARM_INDEX.
5792 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5795 * parser.c (cp_parser_functional_cast): A cast to anything
5796 but integral or enumaration type is not an integral constant
5798 * pt.c (value_dependent_expression_p): Handle cast expressions
5799 without operands (such as "int()").
5801 2004-03-18 Mark Mitchell <mark@codesourcery.com>
5803 * semantics.c (finish_pseudo_destructor_expr): Allow differing
5804 cv-qualification between the type named by the
5805 pseudo-destructor-name and the object-type.
5807 * search.c (accessible_base_p): Handle non-proper bases.
5809 * name-lookup.c (do_nonmember_using_decl): If a using declaration
5810 refers to a single overloaded function, set the type of the
5812 * tree.c (lvalue_type): Simplify.
5813 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
5815 (build_unary_op): Handle OVERLOADs with known types.
5817 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
5820 * parser.c (cp_parser_postfix_expression): Handle the use of
5821 "typename" in non-dependent contexts. Convert appropriately when
5822 when using a qualified name after "->" or ".".
5824 * call.c (conditional_conversion): Honor the requirement that some
5825 conversions refer to the original object.
5827 2004-03-18 Mark Mitchell <mark@codesourcery.com>
5829 * call.c (build_conditional_expr): Do not call force_rvalue for
5830 operands of void_type when the conditional expression itself has
5832 * name-lookup.c (pushdecl): Don't consider a declaration of a
5833 function named "main" to be an overload of a type named "main".
5834 * parser.c (cp_parser_template_name): Perform name lookup when the
5835 template name is proceeded by "template" if the qualifying scope
5837 * typeck.c (composite_pointer_type_r): Correctly handle
5838 pointer-to-member types.
5839 (build_const_cast): Likewise.
5841 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5843 * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
5844 * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
5845 (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
5846 (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
5847 (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
5848 (TYPEOF_TYPE_EXPR): New macro.
5849 * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
5850 * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
5851 * pt.c (tsubst): Likewise.
5852 * semantics.c (finish_typeof): Likewise.
5853 * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
5854 and TEMPLATE_TYPE_PARM.
5855 * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
5856 (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
5858 2004-03-16 Mark Mitchell <mark@codesourcery.com>
5861 * cp-tree.h (build_new_op): Change prototype.
5862 (build_x_binary_op): Likewise.
5863 * call.c (build_new_op): Add overloaded_p parameter.
5864 * decl2.c (grok_array_decl): Adjust call to build_new_op.
5865 * parser.c (cp_parser_binary_expression): Note that uses of
5866 overloaded operators prevents an expression from being considered
5867 an integral constant.
5868 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
5870 * semantics.c (finish_call_expr): Likewise.
5871 * typeck.c (rationalize_conditional_expr): Likewise.
5872 (build_x_indirect_ref): Likewise.
5873 (build_x_binary_op): Likewise.
5874 (build_x_unary_op): Likewise.
5875 (build_x_compound_expr): Likewise.
5876 (build_modify_expr): Likewise.
5877 * typeck2.c (build_x_arrow): Likewise.
5879 2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
5881 * cp-lang.c, ptree.c: Update copyright.
5883 2004-03-13 Mark Mitchell <mark@codesourcery.com>
5886 * parser.c (cp_parser_non_integral_constant_expression): Encode
5887 more of the idiom that surrounded calls to this function within
5889 (cp_parser_primary_expression): Adjust accordingly.
5890 (cp_parser_postfix_expression): Likewise.
5891 (cp_parser_unary_expression): Likewise.
5892 (cp_parser_cast_expression): Likewise.
5893 (cp_parser_assignment_expression): Likewise.
5894 (cp_parser_expression): Likewise.
5895 (cp_parser_new_expression): Note that new-expressions are not
5896 allowed in integral constant expressions.
5897 (cp_parser_delete_expression): Likewise.
5899 2004-03-12 Matt Austern <austern@apple.com>
5901 * decl2.c (maybe_make_one_only): Look at
5902 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
5903 to make an explicit instantiation weak.
5904 * method.c (use_thunk): Make sure we call comdat_linkage
5906 * pt.c (do_type_instantiation): On systems where weak symbols
5907 don't go in a static archive's TOC, explicit instantiation of a
5908 class must imply *explicit* instantiation of its memeber.
5910 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
5912 * call.c, cp-tree.h, pt.c: Fix comment typos.
5914 2004-03-10 Mark Mitchell <mark@codesourcery.com>
5917 * decl.c (xref_tag): Disregard non-type declarations when
5918 looking up a tagged type.
5920 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
5923 * call.c (convert_like_real): Build a const qualified temporary,
5924 when testing ctor access.
5926 2004-03-09 Mark Mitchell <mark@codesourcery.com>
5928 * call.c (initialize_reference): Fix typo.
5930 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5933 * pt.c (determine_specialization): For member templates, match also
5937 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
5939 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
5941 2004-03-09 Mark Mitchell <mark@codesourcery.com>
5944 * call.c (initialize_reference): Handle initializers that are
5945 class-member access expressions applies to rvalues.
5947 2004-03-09 Mark Mitchell <mark@codesourcery.com>
5950 * name-lookup.c (supplement_binding): Ignore functions that are
5951 marked DECL_ANTICIPATED.
5953 2004-03-08 Mark Mitchell <mark@codesourcery.com>
5956 * class.c (check_field_decls): Complain about non-static data
5957 members of reference type in unions. Propagate
5958 CLASSTYPE_REF_FIELDS_NEED_INIT and
5959 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
5961 * init.c (perform_member_init): Complain about mbmers with const
5962 type that are not explicitly initialized.
5964 2004-03-08 Mark Mitchell <mark@codesourcery.com>
5966 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
5967 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
5968 (lang_identifier): Remove implicit_decl and error_locus.
5969 (IDENTIFIER_IMPLICIT_DECL): Remove.
5970 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
5971 (IDENTIFIER_ERROR_LOCUS): Likewise.
5972 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
5973 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
5974 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
5975 (implicitly_declare): Remove.
5976 * decl.c (warn_extern_redeclared_static): Remove check of
5977 IDENTIFIER_IMPLICIT_DECL.
5978 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
5979 (implicitly_declare): Remove.
5980 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
5981 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
5982 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
5983 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
5984 in the innermost scope, rather than at namespace scope.
5985 * name-lookup.c (push_local_binding): Give it external linkage.
5986 (pushdecl): Remove dead code.
5987 * name-lookup.h (push_local_binding): Declare it.
5988 * ptree.c (cxx_print_identifier): Don't print
5989 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
5990 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
5991 not IDENTIFIER_ERROR_LOCUS.
5992 * typeck.c (build_function_call): Remove dead code.
5994 2004-03-08 Jason Merrill <jason@redhat.com>
5997 * decl.c (xref_tag): Remove attribute handling.
5998 * cp-tree.h: Adjust prototype.
5999 * decl.c, parser.c, rtti.c: Adjust callers.
6000 * parser.c (cp_parser_class_head): Pass back attributes in the
6002 (cp_parser_class_specifier): Adjust.
6004 2004-03-08 Matt Austern <austern@apple.com>
6007 * name-lookup.c (add_decl_to_level): Add extern variables, as well
6008 as static, to static_decls array.
6010 2004-03-05 Jason Merrill <jason@redhat.com>
6012 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
6014 2004-03-04 Geoffrey Keating <geoffk@apple.com>
6016 * decl.c (grokfndecl): Update old incorrect comment.
6017 (grokvardecl): Diagnose C++ variables of type with no linkage.
6019 2004-03-01 Mark Mitchell <mark@codesourcery.com>
6022 * pt.c (build_non_dependent_expr): Do not create a
6023 NON_DEPENDENT_EXPR for a THROW_EXPR.
6025 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
6028 * error.c (dump_expr): Handle THROW_EXPR.
6030 2004-03-01 Mark Mitchell <mark@codesourcery.com>
6033 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
6034 lookup if ordinary name-lookup finds a non-function.
6035 * pt.c (tsubst_copy_and_build): Likewise.
6038 * parser.c (cp_parser_late_parsing_default_args): Check that there
6039 are no extra tokens after the end of the default-argument
6042 2004-03-01 Mark Mitchell <mark@codesourcery.com>
6045 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
6046 having C++ linkage for name-mangling purposes.
6049 * parser.c (cp_parser_direct_declarator): Recognize constructor
6050 declarators that use a template-id to name the class being
6054 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
6055 (tsubst_expr): Do not call tsubst_copy, even when
6056 processing_template_decl.
6058 2004-03-01 Jeff Law <law@redhat.com>
6060 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
6063 2004-02-29 Mark Mitchell <mark@codesourcery.com>
6066 * name-lookup.h (push_scope): Change prototype.
6067 * name-lookup.c (push_scope): Do not reenter the current class
6069 * decl.c (grokfndecl): Check return code from push_scope before
6071 * decl2.c (check_classfn): Likewise.
6072 * parser.c (cp_parser_conversion_function_id): Likewise.
6073 (cp_parser_init_declarator): Likewise.
6074 (cp_parser_direct_declarator): Likewise.
6075 (cp_parser_class_specifier): Likewise.
6076 (cp_parser_class_head): Likewise.
6077 (cp_parser_lookup_name): Likewise.
6078 (cp_parser_constructor_declarator_p): Likewise.
6079 * pt.c (instantiate_class_template): Likewise.
6080 (resolve_typename_type): Likewise.
6082 2004-02-29 Mark Mitchell <mark@codesourcery.com>
6085 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
6089 * class.c (update_vtable_entry_for_fn): Do not go through
6090 covariance machinery if the type returned by an overrider is the
6091 same as the original.
6093 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
6095 * call.c: Fix a comment typo.
6097 2004-02-27 Ziemowit Laski <zlaski@apple.com>
6099 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
6101 2004-02-26 Mark Mitchell <mark@codesourcery.com>
6104 * parser.c (cp_parser_parameter_declaration_list): Commit
6105 to fewer tentative parses.
6107 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6110 * pt.c (dependent_type_p_r): A template template parameter is a
6113 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6116 * mangle.c (write_template_arg_literal): Don't rely on identity for
6119 2004-02-24 Jason Merrill <jason@redhat.com>
6121 * tree.c (build_exception_variant): Use check_qualified_type.
6123 2004-02-23 Zack Weinberg <zack@codesourcery.com>
6124 Kazu Hirata <kazu@cs.umass.edu>
6126 * decl.c (cxx_init_decl_processing): Don't check
6127 flag_writable_strings.
6129 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
6132 * typeck.c (maybe_warn_about_returning_address_of_location):
6133 Change check for VAR_DECL to use DECL_P instead.
6135 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6138 * cvt.c (build_expr_type_conversion): Type must be complete before
6139 looking up for conversions.
6141 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6144 * name-lookup.c (arg_assoc_class): Don't look into template
6145 arguments if it is not a primary template.
6147 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6150 * method.c (use_thunk): Always clone function argument tree.
6152 2004-02-20 Mark Mitchell <mark@codesourcery.com>
6155 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
6158 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
6159 for all type variants.
6161 2004-02-19 Mark Mitchell <mark@codesourcery.com>
6164 * decl.c (duplicate_decls): Return error_mark_node for invalid
6166 * name-lookup.c (push_namespace): Ignore the return value from
6168 * pt.c (push_template_decl_real): Robustify.
6171 * name-lookup.c (push_class_level_binding): Do not complain about
6172 adding a binding for a member whose name is the same as the
6173 enclosing class if the member is located in a base class of the
6176 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6179 * parser.c (cp_parser_new_expression): Parse an ill-formed
6180 direct-new-declarator after a parenthesized type-id to emit good
6183 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
6185 * cp-tree.def, cvt.c: Update copyright.
6187 2004-02-17 Mark Mitchell <mark@codesourcery.com>
6190 * cp-tree.h (abi_version_at_least): Remove.
6191 * mangle.c: Include flags.h.
6193 2004-02-15 Mark Mitchell <mark@codesourcery.com>
6196 * call.c (build_conditional_expr): Handle conversions between
6197 class types which result in differently cv-qualified type
6201 * class.c (delete_duplicate_fields_1): Remove.
6202 (delete_duplicate_fields): Likewise.
6203 (finish_struct_anon): Remove check for members with the same name
6204 as their enclosing class.
6205 (check_field_decls): Do not call duplicate_fields.
6206 * decl.c (grokdeclarator): Remove check for static data members
6207 with the same name as their enclosing class.
6208 * name-lookup.c (push_class_level_binding): Check for members with
6209 the same name as their enclosing class.
6211 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
6214 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
6216 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6219 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
6220 has full set of arguments.
6222 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6225 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
6227 2004-02-13 Mark Mitchell <mark@codesourcery.com>
6230 * cp-tree.h (delete_sanity): Change prototype.
6231 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
6232 Remove dead code. Adjust code to warn about deleting an array.
6233 * typekc.c (decay_conversion): Use build_address and build_nop.
6236 * search.c (accessible_p): Do not check access in thunks.
6239 * call.c (build_conditional_expr): Call force_rvalue on the
6240 non-void operand in the case that one result is a throw-expression
6241 and the other is not.
6243 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
6246 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
6247 the type name and look ahead for ::~, and bail out early with a
6248 better error message if the parse is going to fail.
6250 2004-02-12 Mark Mitchell <mark@codesourcery.com>
6252 * call.c (conversion_kind): New type.
6253 (conversion_rank): Likewise.
6254 (conversion): Likewise.
6255 (CONVERSION_RANK): New macro.
6256 (conversion_obstack): New variable.
6257 (obstack_initialized): Likewise.
6258 (z_candidate): Change type of convs and second_conv.
6259 (candidate_warning): New type.
6260 (IDENTITY_RANK): Remove.
6261 (EXACT_RANK): Likewise.
6262 (PROMO_RANK): Likewise.
6263 (STD_RANK): Likewise.
6264 (PBOOL_RANK): Likewise.
6265 (USER_RANK): Likewise.
6266 (ELLIPSIS_RANK): Likewise.
6267 (BAD_RANK): Likewise.
6268 (ICS_RANK): Likewise.
6269 (ICS_STD_RANK): Likewise.
6270 (ICS_USER_FLAG): Likewise.
6271 (ICS_ELLIPSIS_FLAG): Likewise.
6272 (ICS_THIS_FLAG): Likewise.
6273 (ICS_BAD_FLAG): Likewise.
6274 (NEED_TEMPORARY_P): Likewise.
6275 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
6276 (USER_CONV_CAND): Likewise.
6277 (USER_CONV_FN): Likewise.
6278 (conversion_obstack_alloc): New function.
6279 (alloc_conversion): Likewise.
6280 (validate_conversion_obstack): Likewise.
6281 (alloc_conversions): Likewise.
6282 (build_conv): Adjust to deal with new conversion data structures.
6283 (build_identity_conv): New function.
6284 (build_ambiguous_conv): Likewise.
6285 (standard_conversion): Adjust to deal with new conversion data
6287 (convert_class_to_reference): Likewise.
6288 (direct_reference_binding): Likewise.
6289 (reference_binding): Likewise.
6290 (implicit_conversion): Likewise.
6291 (add_candidate): Likewise.
6292 (add_function_candidate): Likewise.
6293 (add_conv_candidate): Likewise.
6294 (build_builtin_candidate): Likewise.
6295 (print_z_candidate): Likewise.
6296 (merge_conversion_sequences): Likewise.
6297 (build_user_type_conversion_1): Likewise.
6298 (build_user_type_conversion): Likewise.
6299 (build_new_function_call): Likewise.
6300 (build_object_call): Likewise.
6301 (conditional_conversion): Likewise.
6302 (build_conditional_expr): Likewise.
6303 (build_new_op): Likewise.
6304 (build_op_delete_call): Likewise.
6305 (convert_like_real): Likewise.
6306 (build_over_call): Likewise.
6307 (build_new_method_call): Likewise.
6308 (is_subseq): Likewise.
6309 (maybe_handle_implicit_object): Likewise.
6310 (maybe_handle_ref_bind): Likewise.
6311 (compare_ics): Likewise.
6312 (source_type): Likewise.
6313 (add_warning): Likewise.
6315 (can_convert_arg): Likewise.
6316 (can_convert_arg_bad): Likewise.
6317 (perform_implicit_conversion): Likewise.
6318 (perform_direct_initialization_if_possible): Likewise.
6319 (initialize_reference): Likewise.
6320 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
6321 * cp-tree.def (WRAPPER): Likewise.
6322 (IDENTITY_CONV): Remove.
6323 (LVALUE_CONV): Likewise.
6324 (QUAL_CONV): Likewise.
6325 (STD_CONV): Likewise.
6326 (PTR_CONV): Likewise.
6327 (PMEM_CONV): Likewise.
6328 (BASE_CONV): Likewise.
6329 (REF_BIND): Likewise.
6330 (USER_CONV): Likewise.
6331 (AMBIG_CONV): Likewise.
6332 (RVALUE_CONV): Likewise.
6333 * cp-tree.h (tree_wrapper): Remove.
6334 (WRAPPER_ZC): Remove.
6335 (lang_tree_node): Remove wrapper.
6336 (LOOKUP_SPECULATIVELY): Remove.
6337 (build_op_delete_call): Adjust prototype.
6338 (validate_conversion_obstack): Declare.
6339 (build_zc_wrapper): Remove.
6340 * cvt.c (convert_to_reference): Remove dead code.
6341 (ocp_convert): Likewise.
6342 * decl.c (redeclaration_error_message): Correct handling of
6344 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
6345 (cp_tree_node_structure): Remove WRAPPER case.
6346 * decl2.c (finish_file): Call validate_conversion_obstack.
6347 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
6348 (build_op_delete_call): Likewise.
6349 (build_x_delete): Likewise.
6350 (build_delete): Adjust call to build_op_delete_call.
6351 * pt.c (tsubst_friend_declaration): Adjust code to determine
6352 whether or not a friend template is a definition.
6353 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
6354 * tree.c (build_zc_wrapper): Remove.
6356 2004-02-12 Zack Weinberg <zack@codesourcery.com>
6358 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
6359 * cp-tree.h: Don't declare cxx_builtin_type_decls.
6360 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
6361 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
6363 2004-02-10 Mark Mitchell <mark@codesourcery.com>
6365 * typeck.c (lookup_destructor): Fix typo in error message.
6367 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
6369 * call.c, parser.c, tree.c: Fix comment typos.
6371 2004-02-07 Zack Weinberg <zack@codesourcery.com>
6374 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
6375 * decl.c (duplicate_decls, start_function): Likewise.
6377 2004-02-07 Zack Weinberg <zack@codesourcery.com>
6379 * name-lookup.c (pushdecl): Issue shadow warnings directly.
6380 * parser.c (free_parser_stacks): Delete.
6382 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
6384 * rtti.c: Update copyright.
6386 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6389 * decl.c (require_complete_types_for_parms): Do not insert
6390 error_mark_node in the parameter list.
6392 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6395 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
6396 error when terminator can not be found.
6398 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
6400 Make-lang.in (po-generated): Delete.
6402 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
6404 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
6405 targetm.calls.promote_prototypes.
6407 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
6411 2004-01-15 Geoffrey Keating <geoffk@apple.com>
6413 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
6414 (handle_pragma_implementation): Likewise.
6416 2004-02-05 Mark Mitchell <mark@codesourcery.com>
6419 * typeck.c (lookup_destructor): Tweak error message.
6421 2004-02-05 Jan Hubicka <jh@suse.cz>
6423 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
6426 2004-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6429 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
6430 code, only emits the diagnostic now. Added lookup of the identifier
6431 and support for qualified ids.
6432 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
6433 Parse an (invalid) type name as id-expression within a declarator.
6434 (cp_parser_simple_declaration): Use it.
6435 (cp_parser_member_declaration): Likewise.
6436 (cp_parser_make_typename_type): New function. Handle errors through
6437 cp_parser_diagnose_invalid_typename.
6438 (cp_parser_elaborated_type_specifier): Use it.
6440 2004-02-04 Mark Mitchell <mark@codesourcery.com>
6443 * call.c (convert_like_real): Use "converting" rather than
6444 "argument" as the descriptive keyword to
6445 dubious_conversion_warnings.
6446 * typeck.c (convert_for_assignment): Do not call
6447 dubious_conversion_warnings.
6449 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6452 * init.c (build_delete): Emit a more informative error message in
6453 case of an incomplete type, and on the correct source line.
6455 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
6457 * error.c, search.c: Update copyright.
6459 2004-02-04 Mark Mitchell <mark@codesourcery.com>
6462 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
6463 linkage for the typeinfo name string.
6465 2004-02-04 Mark Mitchell <mark@codesourcery.com>
6468 * cp-tree.h (fold_non_dependent_expr): New function.
6469 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
6470 (cp_parser_template_argument): Use fold_non_dependent_expr.
6471 (cp_parser_direct_declarator): Likewise.
6472 * pt.c (fold_non_dependent_expr): New function.
6473 (convert_nontype_argument): Use it.
6474 (tsubst_qualified_id): Simplify.
6475 (tsubst_copy_and_build): Likewise.
6477 2004-02-04 Mark Mitchell <mark@codesourcery.com>
6479 * decl.c (cxx_push_function_context): Do not set
6480 current_function_is_thunk.
6481 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
6484 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6487 * pt.c (more_specialized_class): Increase processing_template_decl
6488 while partial ordering.
6490 2004-02-03 Mark Mitchell <mark@codesourcery.com>
6493 * decl.c (start_function): Do not call pushdecl for any
6494 instantiation or specialization of a primary template.
6496 2004-02-03 Mark Mitchell <mark@codesourcery.com>
6499 * parser.c (cp_parser_class_name): Robustify.
6502 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
6505 * semantics.c (finish_id_expression): Do not return an
6506 IDENTIFIER_NODE when lookup finds a PARM_DECL.
6508 2004-02-03 Mark Mitchell <mark@codesourcery.com>
6511 * pt.c (build_non_dependent_expr): Do not build
6512 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
6515 * semantics.c (finish_id_expression): Do not return an
6516 IDENTIFIER_NODE when lookup finds a VAR_DECL.
6519 * parser.c (cp_parser_simple_declaration): When skipping to the
6520 end of the statement swallow the terminating semicolon.
6522 2004-02-02 Mark Mitchell <mark@codesourcery.com>
6525 * init.c (build_offset_ref): Improve error recovery for invalid
6526 uses of non-static member functions.
6529 * cp-tree.h (cp_build_type_attribute_variant): New function.
6530 * class.c (build_clone): Use cp_build_type_attribute_variant.
6531 * decl.c (duplicate_decls): Likewise.
6532 * pt.c (copy_default_args_to_explicit_spec): Likewise.
6533 (tsubst_function_type): Likewise.
6534 * tree.c (build_exception_variant): Check attributes before
6535 concluding that two types are the same.
6536 (cp_build_type-attribute_variant): New method.
6537 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
6540 * call.c (convert_class_to_reference): Keep better track of
6541 pedantically invalid user-defined conversions.
6543 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6546 * pt.c (tsubst_qualified_id): Improved error message when a type
6547 is expected but not found.
6549 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
6551 * class.c: Fix comment typos.
6553 * error.c: Likewise.
6554 * parser.c: Likewise.
6556 * search.c: Likewise.
6557 * typeck.c: Likewise.
6559 2004-01-30 Richard Henderson <rth@redhat.com>
6562 * method.c (use_thunk): Don't force_target_expr for void thunks.
6563 * tree.c (build_target_expr_with_type): Assert non-void type.
6564 (force_target_expr): Likewise.
6566 2004-01-30 Michael Matz <matz@suse.de>
6568 * parser.c (cp_parser_labeled_statement): Accept case ranges.
6570 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6574 * decl.c (grokdeclarator): Check immediatly type completeness for
6575 non-dependent types.
6577 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6580 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
6581 a sizeof expression.block
6583 2004-01-29 Mark Mitchell <mark@codesourcery.com>
6586 * mangle.c (write_encoding): Correct encoding of member template
6589 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6591 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
6592 template name as it was `<::' (digraph typo).
6593 (cp_parser_nth_token_starts_template_argument_list_p): New function.
6594 (cp_parser_id_expression): Use it.
6595 (cp_parser_nested_name_specifier_opt): Likewise.
6596 (cp_parser_template_name): Likewise.
6597 (cp_parser_class_name): Likewise.
6598 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
6600 2004-01-28 Mark Mitchell <mark@codesourcery.com>
6603 * typeck.c (merge_types): Do not merge attributes into
6607 * parser.c (cp_parser_direct_declarator): Do not prevent
6608 backtracking inside a parenthesized declarator.
6609 (cp_parser_parameter_declaration): Fix typo in comment.
6611 2004-01-28 Jan Hubicka <jh@suse.cz>
6613 * semantics.c (expand_body) Do emit_associated_thunks before
6616 2004-01-27 Devang Patel <dpatel@apple.com>
6618 * name-lookup.c: Include "debug.h"
6619 (do_namespace_alias): Invoke debug_hooks to emit debug info
6620 for namespace alias.
6621 (do_local_using_decl): Invoke debug_hooks to emit debug info
6623 (do_class_using_decl): Same.
6624 (do_toplevel_using_decl): Same.
6625 (do_using_directive): Same.
6626 (cp_emit_debug_info_for_using): New function.
6627 * Make-lang.in (cp/parser.o): Depend on debug.h
6628 (cp/name-lookup.o): Same.
6630 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6632 * cp-tree.h (language_function, lang_type_header): Use
6634 * name-lookup.h (cp_binding_level): Likewise.
6636 2004-01-26 Mark Mitchell <mark@codesourcery.com>
6639 * semantics.c (finish_for_expr): Check for unresolved overloaded
6642 * class.c (add_method): Just check processing_template_decl to
6643 determine whether or not we are within a template.
6644 * decl2.c (maybe_retrofit_in_chrg): Likewise.
6645 * init.c (decl_constant_value): Check the type of the declaration,
6647 * name-lookup.c (maybe_push_to_top_level): Rename to ...
6648 (push_to_top_level): ... this.
6649 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
6650 * pt.c (push_template_decl_real): Reorder condition for speed.
6651 (convert_template_argument): Use dependency-checking functions in
6652 place of uses_template_parms.
6653 (lookup_template_class): Avoid calling uses_template_parms more
6655 (uses_template_parms): Reimplement, using dependency-checking
6657 (instantiate_class_template): Use push_to_top_level, not
6658 maybe_push_to_top_level.
6659 (type_unification_real): Simplify.
6660 (type_dependent_expression_p): Handle OFFSET_REFs and
6662 (any_dependent_template_arguments_p): Handle multiple levels of
6664 * semantics.c (expand_or_defer_fn): Do not check
6665 uses_template_parms for template instantiations.
6666 * typeck.c (comptypes): Avoid calling cp_type_quals.
6668 2004-01-25 Mark Mitchell <mark@codesourcery.com>
6671 * call.c (build_over_call): Do not convert arguments when
6672 processing a template.
6673 * pt.c (build_non_dependent_expr): Do not build a
6674 NON_DEPENDENT_EXPR for arithmetic constants.
6676 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6679 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
6680 returns a TYPE_DECL. no further lookup is required.
6681 * semantics.c (check_template_template_default_arg): A TYPE_DECL
6682 is invalid. Rework to give better diagnostics.
6684 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6687 * pt.c (instantiate_class_template): Add an error_mark_node
6689 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
6691 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
6694 * decl.c (finish_function): Move the call to
6695 finish_fname_decls below the call to
6696 finish_eh_spec_block.
6698 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
6700 * optimize.c, typeck2.c: Update copyright.
6702 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
6704 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
6705 init.c, mangle.c, typeck.c: Update copyright.
6707 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
6709 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
6711 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
6713 * Make-lang.in: Replace $(docdir) with doc.
6714 (c++.info, c++.srcinfo): Dummy entry.
6715 (c++.man, c++.srcman): New rules.
6716 (c++.install-man): Revamp rule.
6718 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
6720 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
6721 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
6722 immediate $(shell) instead of deferred backquote.
6724 2004-01-19 Mark Mitchell <mark@codesourcery.com>
6727 * parser.c (cp_parser_postfix_expression): When encountering
6728 incomplete type on left-hand side of "->" or ".", treat the entire
6729 expression as erroneous.
6732 * call.c (build_field_call): Remove.
6733 (n_build_method_call): Likewise.
6734 (build_method_call): Likewise.
6735 (build_new_method_call): Do not call build_field_call.
6736 * class.c (n_build_method_call): Remove.
6737 (print_class_statistics): Do not print it.
6738 * cp-tree.h (build_method_call): Remove declaration.
6739 (finish_object_call_expr): Likewise.
6740 (build_new_1): Do not use build_method_call.
6741 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
6742 when the function appearing on the right-hand-side of "." or "->"
6743 is not actually a function.
6744 * pt.c (tsubst_copy_and_build): Likewise.
6745 * semantics.c (finish_object_call_expr): Remove.
6747 2004-01-18 Mark Mitchell <mark@codesourcery.com>
6750 * pt.c (tsubst): Use finish_typeof.
6752 2004-01-18 Jason Merrill <jason@redhat.com>
6755 * except.c (build_throw): In a template, set
6756 current_function_returns_abnormally.
6758 2004-01-17 Fred Fish <fnf@intrinsity.com>
6761 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
6762 except don't call array_type_nelts() with a VECTOR_TYPE.
6764 2004-01-16 Jan Hubicka <jh@suse.cz>
6766 * mangle.c (write_mangled_name): Remove inline modifier.
6768 2004-01-16 Mark Mitchell <mark@codesourcery.com>
6771 * decl.c (compute_array_index_type): Fix grammar in comment.
6772 * init.c (build_zero_init): Handle zero-sized arrays correctly.
6775 * call.c (name_as_c_string): Print conversion operator names
6779 * call.c (initialize_reference): Pass -1 for inner parameter to
6782 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6785 * parser.c (cp_parser_base_specifier): Check for an invalid
6786 keyword `typename' and emit an user-friendly error message.
6788 2004-01-15 Geoffrey Keating <geoffk@apple.com>
6791 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
6792 (handle_pragma_implementation): Likewise.
6794 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6797 * typeck.c (build_class_member_access_expr): Allow to access members
6798 of the currently open class.
6799 (finish_class_member_access_expr): Likewise.
6801 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
6804 * name-lookup.c (validate_nonmember_using_decl): Take scope and
6805 name by value, instead of computing them.
6806 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
6807 arguments. Pass them to validate_nonmember_using_decl.
6808 * name-lookup.h (do_local_using_decl): Adjust.
6809 (do_toplevel_using_decl): Likewise.
6810 * parser.c (cp_parser_using_declaration): Likewise.
6811 * pt.c (tsubst_expr): Likewise.
6813 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
6817 * name-lookup.c (qualified_lookup_using_namespace): Search
6818 strongly-associated namespaces first, and only then try other
6821 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
6823 * Make-lang.in (c++.srcextra): Dummy entry.
6825 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6828 * parser.c (cp_parser_template_name): Don't try to parse a
6829 conversion-function-id, as it cannot be a template-name.
6830 (cp_parser_simple_type_specifier): Check for invalid template-ids
6831 even after a built-in type.
6833 2004-01-14 Jan Hubicka <jh@suse.cz>
6836 * pt.c (instantiate_decl): Do not increase function_depth.
6838 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
6842 * parser.c (cp_parser_elaborated_type_specifier): Warn about
6843 attributes and discard.
6844 * decl.c (xref_tag): Don't overwite existing attributes with
6847 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6850 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
6851 is no destructor while looking up a BIT_NOT_EXPR.
6853 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
6855 * cxxfilt.c: Remove unused file.
6857 2004-01-14 Jan Hubicka <jh@suse.cz>
6859 Partial fix to PR c++/12850
6860 * decl2.c (mark_used): Do not proactively instantiate templates
6861 when compiling in unit-at-a-time or not optimizing.
6862 * optimize.c (maybe_clone_body): Do not increase function depth.
6864 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6867 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
6869 2004-01-12 Steven Bosscher <stevenb@suse.de>
6872 * parser.c (cp_parser_member_declaration): Any non-type is also
6873 not a class or a function.
6875 2004-01-12 Jason Merrill <jason@redhat.com>
6878 * class.c (build_base_path): Do not mark vtable references as
6880 (build_vtbl_ref_1): Likewise.
6882 2004-01-12 Richard Henderson <rth@redhat.com>
6885 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
6886 (store_init_value): Use it.
6887 * decl.c (check_initializer): Expect full initialization code
6888 from store_init_value.
6889 * init.c (expand_aggr_init_1): Likewise.
6890 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
6892 2004-01-12 Mark Mitchell <mark@codesourcery.com>
6894 * class.c (layout_class_type): For non-POD class types, also copy
6895 the DECL_SIZE and DECL_MODE of fields to the base class type.
6897 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6900 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
6901 calling regenerate_decl_from_template.
6903 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
6906 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
6907 decl-specifier occurring along with a class definition.
6909 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
6911 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
6912 clauses to comments describing declares_class_or_enum.
6913 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
6916 2004-01-12 Jan Hubicka <jh@suse.cz>
6918 * pt.c (for_each_template_parm): Do not check for duplicates.
6919 (for_each_template_parm): Use walk_tree duplicate checking code.
6921 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
6924 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
6925 is error_mark_node, don't add any more decl_specs.
6926 (cp_parser_init_declarator): After committing to a declaration, if
6927 the decl_specifiers start with error_mark_node, issue an error and
6928 change the type to "int".
6930 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
6933 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
6935 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6939 * pt.c (tsubst): Substitution must fail if we are attempting to
6940 create an array with element type that is an abstract class type.
6941 * decl.c (cp_finish_decl): Strip pointers and array types recursively
6942 before calling abstract_virtuals_error.
6944 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
6946 * name-lookup.c (qualified_lookup_using_namespace): Consider
6947 strong using directives even if we've already found a binding.
6949 2004-01-09 Mark Mitchell <mark@codesourcery.com>
6951 * cp-tree.h (cxx_expand_expr): Change prototype.
6952 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
6954 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6957 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
6958 looking into them recursively. They can be there because of the
6959 new __offsetof__ extension.
6961 2004-01-07 Zack Weinberg <zack@codesourcery.com>
6963 * parser.c (cp_parser_save_member_function_body): Mark the
6966 2004-01-05 Mark Mitchell <mark@codesourcery.com>
6969 * class.c (build_clone): Copy type attributes from the original
6970 function to the clone.
6973 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
6974 references as constant.
6977 * parser.c (cp_parser_explicit_instantiation): Improve error
6979 (cp_parser_require): Improve indication of the error location.
6982 * parser.c (cp_parser_class_head): Reorder logic to check for
6983 invalid qualification.
6985 2004-01-04 Mark Mitchell <mark@codesourcery.com>
6988 * name-lookup.c (lookup_using_namespace): Remove spacesp
6990 (unqualified_namespace_lookup): Likewise.
6991 (lookup_qualified_name): Adjust accordingly.
6992 (lookup_name_real): Likewise.
6993 (lookup_arg_dependent): Do not eliminate the namespace of the
6994 functions found by unqualified name lookup unless that is the
6997 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
6999 * semantics.c (push_deferring_access_checks): Fix format.
7000 (resume_deferring_access_checks): Likewise.
7001 (stop_deferring_access_checks): Likewise.
7002 (pop_deferring_access_checks): Likewise.
7003 (get_deferred_access_checks): Likewise.
7004 (pop_to_parent_deferring_access_checks): Likewise.
7005 (perform_deferred_access_checks): Likewise.
7006 (perform_or_defer_access_check): Likewise.
7008 2004-01-04 Richard Henderson <rth@redhat.com>
7010 * call.c (build_over_call): Don't create a save_expr of an
7011 aggregate, but rather its address.
7013 2004-01-04 Mark Mitchell <mark@codesourcery.com>
7016 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
7017 an offsetof expression.
7019 * parser.c (cp_parser_parameter_declaration): Fix comment.
7022 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
7023 (reference_binding): Set it when appropriate.
7024 (build_temp): New function, split out from ...
7025 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
7026 (initialize_reference): Likewise.
7029 * parser.c (cp_parser): Add in_type_id_in_expr_p.
7030 (cp_parser_new): Initialize it.
7031 (cp_parser_postfix_expression): Set it.
7032 (cp_parser_sizeof_operand): Likewise.
7033 (cp_parser_parameteR_declaration): Do not commit early to tenative
7034 parsers when in_type_id_in_expr_p is set.
7036 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7039 * parser.c (cp_parser_template_argument): Don't call
7040 make_unbound_class_template directly.
7041 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
7042 UNBOUND_CLASS_TEMPLATE tree node.
7044 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
7047 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
7049 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7052 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
7053 (DECL_FUNCTION_TEMPLATE_P): Use it.
7054 (DECL_CLASS_TEMPLATE_P): Likewise.
7055 * parser.c (cp_parser_lookup_name): Add is_template parameter.
7056 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
7057 (cp_parser_template_name): Likewise.
7058 (cp_parser_elaborated_type_specifier): Likewise.
7059 (cp_parser_namespace_name): Likewise.
7060 (cp_parser_class_name): Likewise.
7061 (cp_parser_lookup_name_simple): Likewise.
7063 See ChangeLog.3 for earlier changes.