1 2005-01-26 J"orn Rennecke <joern.rennecke@st.com>
4 * parser.c (cp_parser_initializer_clause): Initialize *non_constant_p.
6 2005-01-25 Andrew Pinski <pinskia@physics.uc.edu>
8 * class.c (abort_fndecl_addr): New variable.
9 (build_vtbl_initializer): If we have a pure virtual function
10 share the abort function's address.
11 Include gt-cp-class.h at the end.
12 * config-lang.in (gtfiles): Add cp/class.c.
14 2005-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
16 * cxx-pretty-print.c (pp_cxx_statement): Add prototype. Make static.
17 (pp_cxx_function_definition): Make static.
18 * cxx-pretty-print.h (pp_cxx_statement): Remove prototype.
19 (pp_cxx_function_definition): Likewise.
21 2005-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
23 * name-lookup.c (print_binding_level): Make static.
24 (constructor_name_full): Make static inline.
25 (current_decl_namespace): Make static.
26 * name-lookup.h (constructor_name_full): Remove prototype.
27 (print_binding_level): Likewise.
28 (current_decl_namespace): Likewise.
30 2005-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
32 * decl.h (debug_bindings_indentation): Remove.
34 2005-01-23 Kazu Hirata <kazu@cs.umass.edu>
36 * typeck.c: Fix a comment typo.
38 2005-01-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
41 * pt.c (fold_decl_constant_value): Always call fold_non_dependent_expr
43 (tsubst): Use fold_decl_constant_value in place of a bare call to
44 integral_constant_value.
46 2005-01-20 Kazu Hirata <kazu@cs.umass.edu>
48 * typeck.c (more_qualified_p): Remove.
49 * cp-tree.h: Remove the corresponding prototype.
51 2005-01-19 Matt Austern <austern@apple.com>
53 * typeck.c (comptypes): Handle return code from objc_comptypes
56 2005-01-19 Kazu Hirata <kazu@cs.umass.edu>
58 * cp-tree.h, name-lookup.h: Remove unused prototypes.
60 2005-01-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
63 * semantics.c (finish_id_expression): Disable access checking for
64 already lookuped FIELD_DECL.
66 2005-01-18 Kazu Hirata <kazu@cs.umass.edu>
68 * decl.c (delete_block): Remove.
69 * cp-tree.h: Remove the corresponding prototype.
71 * decl.c (vtable_decl_p, vtype_decl_p, walk_globals_data,
72 walk_vtables_r, walk_vtables, walk_globals_r, walk_globals):
74 * cp-tree.h: Remove the corresponding prototypes.
76 * tree.c (count_functions, bound_pmf_p, cp_is_overload_p,
77 cp_update_decl_after_saving, name_p): Remove.
78 * cp-tree.h: Remove the corresponding prototypes.
80 2005-01-18 Andrew Pinski <pinskia@physics.uc.edu>
83 * semantics.c (finish_asm_stmt): Strip nops off
84 input memory operands.
86 2005-01-18 Kazu Hirata <kazu@cs.umass.edu>
88 * Make-lang.in, call.c, cvt.c, init.c, rtti.c, tree.c,
89 typeck2.c: Update copyright.
91 2005-01-16 Kazu Hirata <kazu@cs.umass.edu>
93 * class.c (get_enclosing_class): Remove.
94 * cp-tree.h: Remove the corresponding prototypes.
96 * cvt.c (convert_lvalue): Remove.
97 * cp-tree.h: Remove the corresponding prototype.
99 * pt.c (tinst_for_decl): Remove.
100 * cp-tree.h: Remove the corresponding prototypes.
102 * tree.c (hash_chainon): Remove.
103 * cp-tree.h: Remove the corresponding prototypes.
105 2005-01-15 Jakub Jelinek <jakub@redhat.com>
108 * typeck2.c (split_nonconstant_init_1) <case VECTOR_TYPE>: Put a copy
109 of CONSTRUCTOR's node into MODIFY_EXPR, as the original is modified.
111 2005-01-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
113 * Make-lang.in (cp-warn): Don't append $(WERROR).
115 2005-01-10 Kazu Hirata <kazu@cs.umass.edu>
117 * cp-tree.h: Fix a comment typo.
119 2005-01-07 Nathan Sidwell <nathan@codesourcery.com>
122 * pt.c (tsubst_qualified_id): Call convert_from_reference.
124 2005-01-06 Mark Mitchell <mark@codesourcery.com>
127 * class.c (add_implicitly_declared_members): Remove dead code.
128 * decl.c (grokfndecl): Add sfk parameter. Use it do set
130 (grokdeclarator): Adjust calls to grokfndecl.
131 * method.c (implicitly_declare_fn): Improve documentation.
132 * parser.c (cp_parser_direct_declarator): Do not consider a
133 function to be a constructor if the containing class was
134 originally anonymous.
136 2005-01-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
139 * search.c (lookup_field_1): Handle using declaration in
140 class template partial specialization.
142 2005-01-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
145 * pt.c (push_access_scope): Handle friend defined in class.
146 (pop_access_scope): Likewise.
148 2005-01-06 Nathan Sidwell <nathan@codesourcery.com>
151 * pt.c (tsubst_copy) <ARRAY_REF case>: Handle separately.
152 (tsubst_copy_and_build) <ARRAY_REF case>: Remove obsolete
153 array-new handling code. Use build_x_binary_op.
155 2005-01-05 Nathan Sidwell <nathan@codesourcery.com>
158 * cp-tree.h (start_decl): Take pointer to pushed scope, not bool.
159 * name-lookup.h (push_scope): Return pushed scope, not flag.
160 * name-lookup.c (push_scope): Return scope that should be popped,
162 * decl.c (start_decl): Adjust.
163 (grokfndecl): Adjust scope push and pop.
164 * decl2.c (check_classfn): Likewise.
165 * parser.c (cp_parser_condition, cp_parser_conversion_function_id,
166 cp_parser_init_declarator, cp_parser_direct_declarator,
167 cp_parser_class_specifier, cp_parser_class_head,
168 cp_parser_lookup_name,
169 cp_parser_constructor_declarator_p): Likewise.
170 * pt.c (instantiate_class_template,
171 resolve_typename_type): Likewise.
173 2005-01-03 Volker Reichelt <reichelt@igpm.rwth-aaachen.de>
176 * parser.c (cp_parser_unqualified_id): Do not issue error message
177 for typedef-name as destructor declarator when performing an
178 uncommitted tentative parse.
180 2005-01-01 Steven Bosscher <stevenb@suse.de>
183 * decl.c (finish_function): Fix comment. Annotate the compiler
184 generated return with the current file name and line 0.
186 2004-12-31 Richard Henderson <rth@redhat.com>
189 * call.c (make_temporary_var_for_ref_to_temp): Set DECL_IGNORED_P.
190 * class.c (build_vtable): Don't conditionallize setting it
191 based on DWARF2_DEBUG.
192 (layout_class_type): Set DECL_IGNORED_P.
193 * decl2.c (get_guard): Likewise.
194 * rtti.c (get_tinfo_decl, build_lang_decl): Likewise.
195 * tree.c (build_local_temp): Likewise.
197 2004-12-30 Mark Mitchell <mark@codesourcery.com>
199 * cp-tree.h (cp_declarator): Split "name" field into
200 qualifying_scope and unqualified_name.
201 * decl.c (get_scope_of_declarator): Adjust accordingly.
202 (grokdeclarator): Likewise.
203 * decl2.c (grokfield): Likewise, and adjust call to
205 * name-lookup.c (do_class_using_decl): Split "decl" into
206 "scope" and "name". Remove unnecessary code.
207 * name-lookup.h (do_class_using_decl): Adjust declaration.
208 * parser.c (make_id_declarator): Split "id" into qualifying_scope
209 and unqualified_name.
210 (cp_parser_using_declaration): Adjust call to do_class_using_decl.
211 (cp_parser_direct_declarator): Adjust to handle the fact that
212 cp_parser_declarator_id no longer returns a SCOPE_REF.
213 (cp_parser_direct_declarator): Likewise.
214 (cp_parser_declarator_id): Do not create a SCOPE_REF for qualified
216 (cp_parser_member_declaration): Adjust call to make_id_declarator.
217 (cp_parser_check_declarator_template_parameters): Do not expect a
220 * decl.c (duplicate_decls): Call ggc_free on declarations we will
221 not be needing any longer.
224 * cvt.c (convert_to_void): Do not use STRIP_NOPs.
226 2004-12-28 Richard Henderson <rth@redhat.com>
229 * semantics.c (finish_asm_stmt): Resolve asm names. Validate input
230 constraints. Mark memory inputs addressable.
232 2004-12-27 Jason Merrill <jason@redhat.com>
234 * decl.c (expand_static_init): Don't use shortcut if
235 targetm.relaxed_ordering.
237 2004-12-27 Mark Mitchell <mark@codesourcery.com>
240 * decl.c (check_tag_decl): Robustify.
242 2004-12-23 Mark Mitchell <mark@codesourcery.com>
245 * parser.c (cp_parser_error): Issue better messages about
246 #pragma in locations where it is not permitted.
249 * pt.c (check_instantiated_args): Remove bogus SFINAE code.
251 * cvt.c (convert_to_void): Fix typo in comment.
253 2004-12-23 Alexandre Oliva <aoliva@redhat.com>
256 * pt.c (check_explicit_specialization): Use the argument list from
257 the definition in a template function specialization definition.
259 2004-12-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
262 * pt.c (check_explicit_specialization): Use special logic to validate
263 befriended specializations.
265 2004-12-22 Mark Mitchell <mark@codesourcery.com>
267 * rtti.c (emit_support_tinfos): Avoid using C99 semantics.
270 * call.c (build_this): In templates, do not bother with
272 * typeck.c (unary_complex_lvalue): In a template, always refuse
276 * cp-gimplify.c (cp_genericize): Relax assertion.
279 * cvt.c (convert_to_void): Warn about unused values.
282 * rtti.c (emit_support_tinfos): On systems without weak symbols,
283 emit the runtime library type-info objects as non-COMDAT.
285 2004-12-21 Mark Mitchell <mark@codesourcery.com>
288 * call.c (convert_like_real): Do not permit the use of a copy
289 constructor to copy a packed field.
292 * decl.c (grokdeclarator): Return error_mark_node, not
293 void_type_node, to indicate errors.
294 * parser.c (cp_parser_template_parameter_list): Robustify.
295 (cp_parser_template_parameter): Likewise.
298 * tree.c (cp_tree_equal): Handle OVERLOAD.
300 2004-12-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
302 * decl.c (define_label): Use POP_TIMEVAR_AND_RETURN.
303 * name-lookup.c (pushdecl_class_level): Likewise.
305 2004-12-21 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
307 * name-lookup.c (pushtag): Add missing POP_TIMEVAR_AND_RETURN.
309 2004-12-21 Andrew Pinski <pinskia@physics.uc.edu>
312 * cp-gimplify.c (cp_genericize_r): Don't insert first but instead
313 check to see if contains the pointer. Insert the statement before
316 2004-12-21 Nathan Sidwell <nathan@codesourcery.com>
319 * decl.c (check_initializer): Check string initializer of array is
321 * cp-tree.h (PAREN_STRING_LITERAL_P): New.
322 * semantics.c (finish_parenthesized_expr): Mark a STRING_CST.
323 * error.c (dump_expr): <STRING_CST case> Add parens, if needed.
325 * cp-tree.def (TEMPLATE_TYPE_PARM,
326 BOUND_TEMPLATE_TEMPLATE_PARM, TYPE_OF_TYPE, TYPENAME_TYPE): Reorder
327 for better code efficiency.
328 * cp-tree.h (CLASS_TYPE_P): Short circuit IS_AGGR_TYPE check.
329 (CAN_HAVE_FULL_LANG_DECL_P): Reorder for better optimization.
330 (INTEGRAL_CODE_P, CP_INTEGRAL_TYPE_P,
331 INTEGRAL_OR_ENUMERATION_TYPE_P, SCALAR_TYPE_P,
332 CP_AGGREGATE_TYPE_P, TYPE_PTROB_P, TYPE_REF_OBJ_P,
333 TYPE_PTROBV_P): Likewise.
336 * method.c (do_build_copy_constructor): Refactor. Don't const
337 qualify a mutable field.
338 (do_build_assign_ref): Likewise.
340 2004-12-20 Matt Austern <austern@apple.com>
343 * decl.c (make_rtl_for_nonlocal_decl): Use
344 set_builtin_user_assembler_name.
346 2004-12-19 Mark Mitchell <mark@codesourcery.com>
348 * cp-tree.h (note_decl_for_pch): New function.
349 * class.c (build_clone): Call note_decl_for_pch.
350 * semantics.c (finish_member_declaration): Likewise.
351 (note_decl_for_pch): New function.
353 2004-12-17 Steven Bosscher <stevenb@suse.de>
355 * init.c (build_zero_init): max_index is the number of
358 2004-12-17 Nathan Sidwell <nathan@codesourcery.com>
361 * class.c (add_method): Do not push conversion operators into a
364 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE_TYPE): Reformat.
365 * error.c (dump_decl): <TYPE_DECL case> Remove extraneous braces.
367 2004-12-16 Nathan Sidwell <nathan@codesourcery.com>
370 * cp-tree.h (integral_constant_value): Declare.
371 * call.c (null_ptr_cst_p): Use integral_constant_value, not
373 (convert_like_real): Likewise.
374 * class.c (check_bitfield_decl): Likewise.
375 * cvt.c (ocp_convert): Likewise.
376 (convert): Remove unnecessary decl_constant_value call.
377 * decl.c (compute_array_index_type): Use integral_constant_value,
378 not decl_constant_value.
379 (build_enumerator): Likewise.
380 * decl2.c (grokfield): Likewise.
381 * init.c (decl_constant_value): Simplify.
382 (integral_constant_value): New.
383 * pt.c (fold_decl_constant_value): Use integral_constant_value,
384 remove subsequent check.
385 (tsubst): Use integral_constant_value, not decl_constant_value.
386 (tsubst_copy, unify): Likewise.
387 * typeck.c (decay_conversion): Likewise.
388 (build_compound_expr): Remove unnecessary decl_constant_value
390 (build_static_cast_1, build_reinterpret_cast_1):
391 (convert_for_assignment): Remove comment about not calling
394 2004-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
397 * pt.c (instantiate_class_template): Set input_location for
399 (tsubst_friend_function): Don't set input_location here.
400 Make sure the context is complete if necessary.
402 2004-12-15 Nathan Sidwell <nathan@codesourcery.com>
405 * parser.c (cp_parser_lookup_name): Remove unneeded TYPENAME_TYPE
408 2004-12-14 Mark Mitchell <mark@codesourcery.com>
411 * decl.c (make_typename_type): Do not handle namespace-scoped
413 (tag_name): Handle typename_type.
414 (check_elaborated_type_specifier): Handle typenames.
415 * parser.c (cp_parser_diagnose_invalid_type_name): Improve
417 (cp_parser_elaborated_type_specifier): Use
418 cp_parser_diagnose_invalid_type_name.
420 2004-12-14 Andrew Pinski <pinskia@physics.uc.edu>
423 * init.c (build_zero_init): If the max_index is 0, there is no
424 need to create a RANGE_EXPR.
426 2004-12-14 Mark Mitchell <mark@codesourcery.com>
429 * cp-objcp-common.c (cp_expr_size): Loosen assertion.
431 2004-12-14 Nathan Sidwell <nathan@codesourcery.com>
434 * pt.c (tsubst_copy_and_build): <INDIRECT_REF case> Check that a
435 REFERENCE_REF_P is dereferencing a reference type.
436 * typeck.c (build_static_cast): Convert from reference even in a
438 (build_reinterpret_cast, build_const_cast, build_c_cast): Likewise.
440 2004-12-14 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
442 * parser.c (cp_parser_uncommitted_to_tentative_parse_p): New function.
443 (cp_parser_name_lookup_error): Use it.
444 (cp_parser_check_for_invalid_template_id): Likewise.
445 (cp_parser_skip_to_closing_parenthesis): Likewise.
446 (cp_parser_nested_name_specifier_opt): Likewise.
447 (cp_parser_simple_declaration, cp_parser_template_id): Likewise.
448 (cp_parser_parameter_declaration_list): Likewise.
449 (cp_parser_parameter_declaration): Likewise.
450 (cp_parser_template_name): Let cp_parser_simulate_error perform
452 (cp_parser_committed_to_tentative_parse): Remove.
454 2004-12-13 Andrew Pinski <pinskia@physics.uc.edu>
457 * class.c (build_base_path): Convert the zero constant to the correct
460 2004-12-13 Mark Mitchell <mark@codesourcery.com>
463 * class.c (layout_class_type): Determine the visibility of static
466 2004-12-12 Roger Sayle <roger@eyesopen.com>
469 * cp-gimplify.c (gimplify_if_stmt): Optimize the case where the
470 condition is a constant and the unexecuted clause is empty.
472 2004-12-10 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
475 * parser.c (cp_parser_class_head): Reject typedef-name in class head.
477 2004-12-09 Matt Austern <austern@apple.com>
480 * name-lookup.c (do_nonmember_using_decl): A real function
481 declaration takes precedence over an anticipated declaration.
483 2004-12-09 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
485 * parser.c (cp_parser_member_declaration): Fix comment typo.
487 2004-12-09 Alexandre Oliva <aoliva@redhat.com>
490 * parser.c (cp_parser_template_id): Don't create a CPP_TEMPLATE_ID
493 2004-12-09 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
496 * typeck.c (build_reinterpret_cast_1): Allow cast from vector type.
498 2004-12-09 Nathan Sidwell <nathan@codesourcery.com>
501 * init.c (build_zero_init): Build a RANGE_EXPR for an array
504 2004-12-08 Kelley Cook <kcook@gcc.gnu.org>
506 * typeck.c: Remove DOS line endings.
508 2004-12-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
511 * decl.c (lookup_and_check_tag): Diagnose nested class with
512 the same name as enclosing class.
514 2004-12-08 Nathan Sidwell <nathan@codesourcery.com>
517 * cp-tree.h (REFERENCE_REF_P): New.
518 (CPTI_TYPE_INFO_TYPE): Rename to ...
519 (CPTI_CONST_TYPE_INFO_TYPE): ... here.
520 (CPTI_TYPE_INFO_REF_TYPE): Remove.
521 (type_info_type_node): Rename to ...
522 (const_type_info_type_node): ... here.
523 (type_info_ref_type): Remove.
524 * call.c (build_user_type_conversion): Reformat.
525 (resolve_args): Do not convert_from_reference.
526 (build_object_call): Call convert_from_reference.
527 (prep_operand): Do not convert_from_reference.
528 (build_new_method_call): Likewise.
529 * class.c (build_vfield_ref): Likewise.
530 * cvt.c (convert_to_reference): Likewise.
531 (convert_from_reference): Build INDIRECT_REF here, not with
533 (convert_force): Do not convert_from_reference.
534 (build_expr_type_conversion): Likewise.
535 * decl.c (grok_reference_init): Likewise.
536 * decl2.c (delete_sanity): Likewise.
537 * except.c (initialize_handler_parm): Use POINTER_TYPE_P.
538 * init.c (build_dtor_call): Do not convert_from_reference.
539 * parser.c (cp_parser_template_argument): Unwrap indirected
540 reference. Allow TEMPLATE_PARM_INDEX as an object parm.
541 * pt.c (tsubst_copy_and_build) <case INDIRECT_REF>: Use
542 convert_from_reference, if indicated.
543 <case CALL_EXPR>: Do not convert_from_reference.
544 <case PARM_DECL, VAR_DECL>: Convert_from_reference if needed.
545 (tsubst_initializer_list): Do not convert_from_reference.
546 * rtti.c (init_rtti_processing): Adjust node creation.
547 (throw_bad_typeid): Use const_type_info_type_node.
548 Do not convert_from_reference.
549 (typeid_ok_p): Use const_type_info_type_node.
550 (build_typeid, get_typeid): Always return type_info typed node.
551 (build_dynamic_cast_1): Dont convert_from_reference. Refactor.
552 * semantics.c (finish_stmt_expr_expr): Do not
553 convert_from_reference.
554 (finish_id_expression): Convert_from_reference as appropriate.
555 * typeck.c (decay_conversion): Do not convert_from_reference.
556 (finish_class_member_access_expr): Likewise.
557 (build_indirect_ref): Use POINTER_TYPE_P.
558 (convert_arguments): Do not convert_from_reference.
559 (build_modify_expr): Likewise.
560 (convert_for_initialization): Likewise.
561 * typeck2.c (build_x_arrow): Likewise.
563 2004-12-07 Ziemowit Laski <zlaski@apple.com>
565 * cp-tree.h (struct lang_type_class): Rename 'objc_protocols'
566 field to 'objc_info'.
568 2004-12-07 Kazu Hirata <kazu@cs.umass.edu>
570 * pt.c: Replace a use of first_rtl_op with TREE_CODE_LENGTH.
572 2004-12-07 Roger Sayle <roger@eyesopen.com>
574 * name-lookup.c (leave_scope): We only need to update
575 class_binding_level when leaving a class scope.
577 2004-12-06 Ziemowit Laski <zlaski@apple.com>
579 * cp-tree.h (struct lang_type_class): Add 'objc_protocols' field.
581 2004-12-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
583 PR c++/17011, c++/17971
584 * pt.c (tsubst_copy) <FIELD_DECL case>: Check and diagnose
586 (tsubst_copy_and_build) <COMPONENT_REF case>: Check
587 error_mark_node after member substitution.
588 * semantics.c (finish_id_expression): Call
589 finish_non_static_data_member for non-dependent FIELD_DECL.
591 2004-12-03 Nathan Sidwell <nathan@codesourcery.com>
594 * decl.c (grokdeclarator): Make sure class in pointer to member is
597 2004-12-02 Nathan Sidwell <nathan@codesourcery.com>
600 * parser.c (cp_parser_new_type_id): Move array size expression
602 * init.c (build_new): ... to here.
604 2004-12-02 Nathan Sidwell <nathan@codesourcery.com>
607 * parser.c (cp_parser_class_head): Return NULL_TREE when
608 push_template_decl fails. Update comment.
610 2004-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
612 PR c++/15664, c++/18276
613 * pt.c (tsubst_decl) <TEMPLATE_DECL case>: Reorganize. Correctly
614 tsubst TEMPLATE_DECL that is a TEMPLATE_TEMPLATE_PARM.
616 2004-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
619 * parser.c (cp_parser_type_specifier): Catch template declaration
622 2004-12-01 Matt Austern <austern@apple.com>
624 * name-lookup.c (namespace_binding): Omit alias check for global
627 2004-12-01 Nathan Sidwell <nathan@codesourcery.com>
630 * parser.c (cp_parser_class_name): Check decl's type is not
634 * call.c (standard_conversion): Add FLAGS parameter. Do not allow
635 derived to base conversion when checking constructor
637 (implicit_conversion): Pass FLAGS to standard_conversion.
638 (check_constructir_callable): Disallow conversion functions.
640 2004-11-30 Kazu Hirata <kazu@cs.umass.edu>
642 * parser.c: Fix comment typos.
644 2004-11-27 Mark Mitchell <mark@codesourcery.com>
647 * parser.c (cp_parser_check_for_definition_in_return_type): Take
648 the defined type as a parameter, and inform the user about the
649 possibility of a missing semicolon.
650 (cp_parser_explicit_instantiation): Adjust call to
651 cp_parser_check_for_definition_in_return_type.
652 (cp_parser_init_declarator): Likewise.
653 (cp_parser_member_declaration): Likewise.
656 * cp-tree.def (TYPENAME_TYPE): Remove discussion of implicit
657 typename from comments.
658 * cp-tree.h (TYPENAME_IS_ENUM_P): New macro.
659 (TYPENAME_IS_CLASS_P): Likewise.
660 (make_typename_type): Change prototype.
661 * decl.c (struct_typename_info): New type.
662 (typename_compare): Expect the second argument to be a
663 typename_info, not a tree.
664 (build_typename_type): Add tag_type parameter. Do not create a
665 new type until necessary.
666 (make_typename_type): Add tag_type parameter.
667 * error.c (TYPENAME_TYPE): Print tags other than "typename" if
669 * friend.c (make_friend_class): Adjust call to make_typename_type.
670 * parser.c (cp_parser_make_typename_type): Likewise.
671 (cp_parser_primary_expression): Adjust call to
672 cp_parser_lookup_name.
673 (cp_parser_unqualified_id): Adjust calls to cp_parser_class_name.
674 (cp_parser_class_or_namespace_name): Likewise.
675 (cp_parser_postfix_expression): Adjust calls to
677 (cp_parser_mem_initializer_id): Adjust calls to
678 cp_parser_class_name.
679 (cp_parser_type_parameter): Adjust calls to cp_parser_lookup_name.
680 (cp_parser_template_name): Likewise.
681 (cp_parser_template_argument): Likewise.
682 (cp_parser_type_name): Adjust call to cp_parser_class_name.
683 (cp_parser_elaborated_type_specifier): Adjust calls to
684 make_typename_type and cp_parser_lookup_name.
685 (cp_parser_namespace_name): Likewise.
686 (cp_parser_class_name): Replace type_p parameter with tag_type.
687 Adjust calls to make_typename_type and cp_parser_lookup_name.
688 (cp_parser_class_head): Adjust calls to cp_parser_class_name.
689 (cp_parser_base_specifier): Likewise.
690 (cp_parser_lookup_name): Replace is_type parameter with tag_type.
691 Adjust calls to make_typename_type and lookup_qualified_name.
692 (cp_parser_lookup_name_simple): Adjust call to
693 cp_parser_lookup_name.
694 (cp_parser_constructor_declarator_p): Adjust call to
695 cp_parser_class_name.
696 * pt.c (convert_template_argument): Adjust all to
698 (tsubst_decl): Do not pre-substitute the type of the declaration.
699 (tsubst): Hand off declarations more quickly. Adjust call to
703 * parser.c (cp_parser_postfix_dot_deref_expression): Robustify.
705 2004-11-29 Daniel Jacobowitz <dan@codesourcery.com>
708 * Make-lang.in (cp/decl2.o): Update dependencies.
709 * decl2.c (finish_file): Call maybe_apply_pending_pragma_weaks.
711 2004-11-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
714 * name-lookup.c (pushtag): Change return type to tree.
715 * cp-tree.h (pushtag): Adjust declaration.
716 * decl.c (xref_tag, start_enum): Use return value of pushtag.
717 * pt.c (push_template_decl_real): Return immediately if
718 pushdecl_namespace_level returns error_mark_node.
720 2004-11-27 Kazu Hirata <kazu@cs.umass.edu>
722 * pt.c: Fix a comment typo.
724 2004-11-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
726 Friend class name lookup 4/n
727 * class.c (pushclass): Don't call cxx_remember_type_decls.
728 * cp-tree.h (clear_anon_tags): Remove declaration.
729 * decl.c (grokdeclarator): Don't call lookup_tag_reverse.
730 * name-lookup.c (binding_entry_free, binding_table_free): Comment
732 (binding_table_find_anon_type, binding_table_reverse_maybe_remap,
733 binding_table_remove_anonymous_types, cxx_remember_type_decls,
734 bt_print_entry, clear_anon_tags, follow_tag_typedef, lookup_tag,
735 lookup_tag_reverse): Remove
736 (begin_scope, leave_scope, kept_level_p, print_binding_level):
737 Don't use type_decls field in cp_binding_level.
738 (maybe_process_template_type_declaration, pushtag): Set
739 CLASSTYPE_NESTED_UTDS directly.
740 * name-lookup.h (binding_table_remove_anonymous_types,
741 cxx_remember_type_decls, lookup_tag, lookup_tag_reverse): Remove
743 (cp_binding_level): Remove type_decls field.
745 2004-11-26 Kazu Hirata <kazu@cs.umass.edu>
747 * typeck.c: Fix a comment typo.
749 2004-11-25 Mark Mitchell <mark@codesourcery.com>
752 * class.c (instantiate_type): Treat NON_DEPENDENT_EXPRs with
753 unknown_type as non matching. Tidy up.
754 * pt.c (build_non_dependent_expr): Do not build a
755 NON_DEPENDENT_EXPR for a VAR_DECL.
758 * cp-tree.h (lvalue_or_else): Remove declaration.
759 * tree.c (lvalue_or_else): Remove.
760 * typeck.c (build_unary_op): Adjust call to lvalue_or_else.
761 (build_modify_expr): Likewise.
764 * decl.c (duplicate_decls): Return error_mark_node on error, as
768 * decl.c (grokvardecl): Keep track of whether or not a there was
769 explicit qualification.
770 * name-lookup.c (set_decl_namespace): Complain about explicit
771 qualification of a name within its own namespace.
774 * typeck.c (check_return_expr): Robustify.
776 2004-11-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
778 Friend class name lookup 3/n, PR c++/3332
779 * name-lookup.c (push_inner_scope, pop_inner_scope): New functions.
780 (lookup_type_scope): Don't deal with name from user declaration
782 * name-lookup.h (push_inner_scope, pop_inner_scope): Add declarations.
783 * parser.c (cp_parser_class_specifier): Use push_inner_scope and
786 2004-11-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
788 Friend class name lookup 2/n, PR c++/14513, c++/15410
789 * name-lookup.c (lookup_name_real): Simplify.
790 (lookup_type_scope): Add SCOPE parameter. Handle friend class
792 * name-lookup.h (tag_scope): New enum type.
793 (lookup_type_scope): Adjust declaration.
794 * decl.c (lookup_and_check_tag, xref_tag, xref_tag_from_type):
795 Change bool parameter GLOBALIZED to TAG_SCOPE parameter SCOPE.
796 (start_enum): Likewise. Add assertion test that NAME is
797 IDENTIFIER_NODE. Use anonymous name for dummy ENUMERAL_TYPE in
799 * cp-tree.h (xref_tag, xref_tag_from_type): Adjust declarations.
800 * parser.c (cp_parser_elaborated_type_specifier,
801 cp_parser_class_head): Adjust call to xref_tag.
802 * pt.c (lookup_template_class, instantiate_class_template):
804 * rtti.c (init_rtti_processing, build_dynamic_cast_1,
805 tinfo_base_init, emit_support_tinfos): Likewise.
807 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
809 * g++spec.c, lex.c: Avoid ` as left quote in diagnostics.
811 2004-11-24 Mark Mitchell <mark@codesourcery.com>
814 * name-lookup.c (supplement_binding): Do not allow typedefs to be
815 redefined in class scope.
818 * parser.c (cp_parser_set_decl_type_spec): Do not try to allow
819 redefinitions of builtin types other that "bool" or "wchar_t".
821 2004-11-24 Steven Bosscher <stevenb@suse.de>
823 * decl.c (cxx_init_decl_processing): Don't clear
824 flag_inline_functions.
826 2004-11-24 Mark Mitchell <mark@codesourcery.com>
828 * pt.c (tsubst_function_type): Do not permit function types which
829 return arrays or functions.
832 * parser.c (cp_parser_init_declarator): Do not pop scope twice.
835 * cp-tree.h (CTOR_NAME): Remove.
837 * decl.c (initialize_predefined_identifiers): Add spaces to the
838 end of constructor and destructor names.
840 2004-11-24 Giovanni Bajo <giovannibajo@gcc.gnu.org>
843 * decl.c (start_decl): Check for invalid specialization headers.
845 2004-11-24 Paolo Bonzini <bonzini@gnu.org>
849 * call.c (standard_conversion): Move check for conversions between
851 * typeck.c (ptr_reasonably_similar): ... here.
853 2004-11-23 Ben Elliston <bje@au.ibm.com>
855 * cp-tree.h (context_as_string): Remove extern.
856 * error.c (context_as_string): Remove.
858 * cp-tree.h (cp_type_qual_from_rid): Remove extern.
859 * lex.c (cp_type_qual_from_rid): Remove.
861 * cp-tree.h (do_poplevel): Remove extern.
862 (check_multiple_declarators): Likewise.
863 * semantics.c (do_poplevel): Make static.
864 (check_multiple_declarators): Remove.
866 * cp-tree.h (check_final_overrider): Remove extern.
867 * search.c (check_final_overrider): Make static.
869 * cp-tree.h (build_artificial_parm): Remove extern.
870 * decl2.c (build_artificial_parm): Make static.
872 2004-11-22 Giovanni Bajo <giovannibajo@gcc.gnu.org>
875 * typeck.c (build_unary_op) <CONVERT_EXPR, NEGATE_EXPR>: Unify code.
876 Make sure the result is always a rvalue.
878 2004-11-16 Giovanni Bajo <giovannibajo@gcc.gnu.org>
880 * decl.c (start_preparsed_function): Call check_function_type even
882 (require_complete_types_for_parms): Skip dependent types.
883 (check_function_type): Likewise.
885 2004-11-16 Steven Bosscher <stevenb@suse.de>
887 * Make-lang.in (cp/decl.o, cp/search.o): Don't depend on stack.h.
888 * search.c: Don't include it.
890 2004-11-15 Andrew Pinski <pinskia@physics.uc.edu>
892 * cp-gimplify.c: Include pointer-set.h
893 (cp_genericize_r): Use pointer_sets instead of a hashtable.
894 Also instert the new statement for CLEANUP_STMT.
895 (cp_genericize): Use pointer_sets instead of a hashtable.
896 * Make-lang.in (cp-gimplify.o): Depend on pointer-set.h.
898 2004-11-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
900 Friend class name lookup 1/n, PR c++/18471
901 * decl.c (lookup_and_check_tag): New function.
902 (xref_tag, start_enum): Use it.
903 (check_elaborated_type_specifier): Move TEMPLATE_TYPE_PARM check
904 before !DECL_IMPLICIT_TYPEDEF_P. Also display previously declared
906 * name-lookup.c (lookup_name_current_level): Rename to ...
907 (lookup_name_innermost_nonclass_level): ... this.
908 (lookup_type_scope): New function.
909 * name-lookup.h (lookup_name_current_level): Rename to ...
910 (lookup_name_innermost_nonclass_level): ... this.
911 (lookup_type_scope): Add declaration.
913 2004-11-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
916 * pt.c (coerce_template_parms): Only emit error message about
917 invalid template argument when TF_ERROR.
919 2004-11-12 Mark Mitchell <mark@codesourcery.com>
922 * decl.c (start_decl): Make sure to set *pop_scope_p. Return
923 error_mark_node to indicate errors.
926 * parser.c (cp_parser_direct_declarator): Disallow non-constant
927 array bounds when not inside a function.
930 * pt.c (tsubst_copy_and_build): Do not do Koenig lookup when an
931 unqualified name resolves to a member function.
934 * pt.c (tsubst_copy_and_build): Handle qualified names used from a
935 derived class correctly.
937 * decl2.c (import_export_decl): Fix typo in comment.
938 * tree.c (pod_type_p): Likewise.
940 2004-11-10 Andrew Pinski <pinskia@physics.uc.edu>
942 * typeck.c (cxx_mark_addressable): Add braces around the first if.
944 2004-11-10 Adam Nemet <anemet@lnxw.com>
947 * typeck.c (cxx_mark_addressable): Issue an error if address of an
948 explicit register variable is requested.
950 2004-11-10 Nathan Sidwell <nathan@codesourcery.com>
953 * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK): New.
954 (struct lang_decl_flags): Add thunk_p flag.
955 (struct lang_decl): Remove separate fixed_offset. Place
956 cloned_function and fixed_offset into union.
957 (DECL_CLONED_FUNCTION_P, DECL_CLONED_FUNCTION): Adjust.
958 (DECL_THUNK_P, SET_DECL_THUNK_P): Adjust.
959 (THUNK_FIXED_OFFSET): Adjust.
960 * method.c (make_thunk): Adjust.
962 2004-11-09 Mark Mitchell <mark@codesourcery.com>
965 * init.c (build_new_1): Handle parenthesized type-ids that name an
968 2004-11-09 Joseph S. Myers <joseph@codesourcery.com>
970 * call.c, class.c, decl.c, decl2.c, error.c, mangle.c, parser.c,
971 pt.c, search.c, semantics.c, typeck.c: Use %q, %< and %> for
972 quoting in diagnostics.
973 * parser.c (cp_parser_sizeof_operand): Use '' instead of `' for
974 quoting in printf format.
975 * decl.c (duplicate_decls, start_decl): Use %qD instead of
978 2004-11-08 Kazu Hirata <kazu@cs.umass.edu>
980 * class.c, decl.c, lex.c, name-lookup.c, parser.c, pt.c,
981 search.c, typeck2.c: Fix comment formatting.
983 2004-11-04 Ulrich Weigand <uweigand@de.ibm.com>
985 PR tree-optimization/18184
986 * cp-objcp-common.c (cxx_types_compatible_p): Do not treat pointers
987 of different modes or alias-all flags as equivalent.
988 * typeck.c (comptypes): Likewise.
990 2004-11-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
993 * cp-tree.h (TYPE_REF_OBJ_P): New macro.
994 (TYPE_PTR_P, TYPE_PTROB_P, TYPE_PTROBV_P, TYPE_PTRFN_P,
995 TYPE_REFFN_P): Document.
996 (fold_decl_constant_value): New prototype.
997 * pt.c (convert_nontype_argument_function): Rewrite and extract
999 (fold_decl_constant_value, convert_nontype_argument_function): New.
1000 (lookup_template_class): Add comment about useless double call.
1001 * mangle.c (write_expression): Strip conversions before lowering
1003 * cvt.c (ocp_convert): Check LOOKUP_COMPLAIN for a pedwarn. Disallow
1004 enum to enum conversion.
1006 2004-11-02 Mark Mitchell <mark@codesourcery.com>
1009 * parser.c (cp_parser_type_parameter): Robustify.
1012 * parser.c (cp_parser_single_declaration): Disallow template
1016 * typeck.c (build_const_cast): Use error_operand_p.
1018 2004-11-02 Ziemowit Laski <zlaski@apple.com>
1020 * cp-lang.c (cxx_types_compatible_p): Remove prototype and definition.
1021 (LANG_HOOKS_TYPES_COMPATIBLE_P): Move to cp-objcp-common.h.
1022 * cp-objcp-common.c (cxx_types_compatible_p): Moved definition here
1024 * cp-objcp-common.h (cxx_types_compatible_p): Moved prototype here
1026 (LANG_HOOKS_TYPES_COMPATIBLE_P): Moved here from cp-lang.c.
1028 2004-11-01 Nathan Sidwell <nathan@codesourcery.com>
1031 * search.c (check_final_overrider): Deprecate gnu covariant extension.
1033 2004-10-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
1035 Convert diagnostics to use quoting flag q 9/n
1036 * typeck.c (build_x_unary_op, convert_member_func_to_ptr,
1037 get_delta_difference): Use new quotation style.
1038 * repo.c (reopen_repo_file_for_write): Likewise.
1039 * pt.c (do_type_instantiation): Likewise.
1040 * parser.c (cp_parser_diagnose_invalid_type_name):
1041 * name-lookup.c (push_overloaded_decl, set_decl_namespace):
1042 * error.c (cp_print_error_function,
1043 print_instantiation_full_context): Likewise.
1044 * decl.c (define_label, grok_reference_init,
1045 maybe_deduce_size_from_array_init, revert_static_member_fn):
1046 * decl2.c (check_classfn): Likewise.
1047 * class.c (add_method, check_field_decls, layout_class_type,
1048 resolve_address_of_overloaded_function): Likewise.
1049 * call.c (build_x_va_arg, build_over_call): Likewise.
1051 2004-10-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
1053 Convert diagnostics to use quoting flag q 8/n
1054 * cvt.c (cp_convert_to_pointer, warn_ref_binding,
1055 convert_to_reference, ocp_convert, convert_to_void
1056 cp_convert_to_pointer): Use new quotation style.
1058 2004-10-31 Mark Mitchell <mark@codesourcery.com>
1061 * typeck2.c (store_init_value): Use split_nonconstant_init even
1062 for types that require construction.
1064 1004-10-28 Matt Austern <austern@apple.com>
1067 * cp-tree.h (class_key_or_enum_as_string): Declare.
1068 * error.c (class_key_or_enum): Rename to class_key_or_enum_as_string
1069 and remove static qualifier.
1070 * decl.c (shadow_tag): Warn about ignored attributes in class/struct/
1071 union/enum declaration.
1073 2004-10-29 Kazu Hirata <kazu@cs.umass.edu>
1075 * pt.c: Fix a comment typo.
1077 2004-10-28 Nathan Sidwell <nathan@codesourcery.com>
1079 * typeck.c (composite_pointer_type): Remove comment about DR 195.
1080 (build_reinterpret_cast_1): Revert DR195 patch. Only emit a
1081 warning when being pedantic.
1082 (build_reinterpet_cast, build_c_cast): Adjust.
1084 2004-10-29 Mark Mitchell <mark@codesourcery.com>
1087 * decl.c (grokdeclarator): Mark TYPE_DECLs as abstract when they
1088 appear in a constructor/destructor that will be cloned.
1090 1004-10-28 Matt Austern <austern@apple.com>
1093 * decl.c (finish_enum): Handle packed attribute.
1094 * parser.c (cp_parser_enum_specifier): Process trailing attributes.
1096 2004-10-28 Mark Mitchell <mark@codesourcery.com>
1099 * pt.c (instantiate_class_template): Increment
1100 processing_template_decl when substituting into a member class
1103 2004-10-27 Mark Mitchell <mark@codesourcery.com>
1106 * call.c (convert_like_real): Fix formatting.
1107 (initialize_reference): When binding a temporary to a base class,
1108 ensure that the nominal copy made is to the derived class, not the
1112 * parser.c (cp_parser_next_token_ends_template_argument_p): Do not
1115 2004-10-27 Andrew Pinski <pinskia@physics.uc.edu>
1117 * decl.c (bad_specifiers): Move the q after the %.
1119 2004-10-27 Andrew Pinski <pinskia@physics.uc.edu>
1121 * parser.c (cp_parser_diagnose_invalid_type_name): Move the q after
1124 2004-10-26 Mark Mitchell <mark@codesourcery.com>
1126 * name-lookup.c (do_namespace_alias): Use FROB_CONTEXT.
1127 * search.c (current_scope): Fix prototype.
1130 * search.c (current_scope): Return the innermost non-block scope,
1131 not the innermost non-block, non-namespace scope.
1132 (at_namespace_scope_p): Adjust accordingly.
1133 (dfs_accessible_post): Do not pass namespaces to is_friend.
1134 (dfs_walk_once_accessible_r): Likewise.
1135 * decl.c (grokvardecl): Adjust call to current_scope.
1136 (build_enumerator): Likewise.
1137 * parser.c (cp_parser_using_declaration): Likewise.
1138 (cp_parser_direct_declarator): Use at_namespace_scope_p instead of
1140 (cp_parser_class_head): Adjust call to current_scope.
1141 * name-lookup.c (do_namespace_alias): Set the DECL_CONTEXT for the
1145 * pt.c (tusbst_copy_and_build): Resolve enumeration constants to
1146 their underlying values.
1149 * typeck.c (build_binary_op): Honor build_type, even when in a
1152 2004-10-26 Nathan Sidwell <nathan@codesourcery.com>
1154 * parser.c (cp_lexer_get_preprocessor_token): Remove unneeded
1155 padding token checking.
1157 2004-10-25 Andrew Pinski <pinskia@physics.uc.edu>
1160 * decl.c (grokdeclarator) <case cdk_array>: Remove the call
1161 layout_type as it is already done by create_array_type_for_decl.
1163 2004-10-22 Nathan Sidwell <nathan@codesourcery.com>
1166 * parser.c (eof_token): Make const, correctly initialize rid and
1168 (struct cp_lexer): Replace buffer_end pointer with buffer_length
1170 (cp_lexer_new_main): Directly grow lexer's buffer here. Don't
1172 (cp_lexer_new_from_tokens): Adjust.
1173 (cp_lexer_grow_buffer): Remove.
1174 (cp_lexer_peek_nth_token, cp_lexer_consume_token,
1175 cp_lexer_purge_token): Add const casts.
1177 2004-10-21 Mark Mitchell <mark@codesourcery.com>
1181 * cp-tree.h (convert_to_base): Change prototype.
1182 (build_ptrmemfunc): Likewise.
1183 (convert_ptrmem): New function.
1184 * call.c (struct conversion): Adjust documentation for base_p.
1185 (standard_conversion): Set base_p for ck_pmem conversions as
1187 (convert_like_real): Use convert_to_base for ck_pmem and ck_ptr
1189 * class.c (convert_to_base): Handle both pointers and objects.
1190 Add nonnull parameter.
1191 (build_vfield_ref): Adjust call to convert_to_base.
1192 * cvt.c (cp_convert_to_pointer): Adjust call to build_ptrmemfunc.
1193 (convert_force): Likewise.
1194 * typeck.c (build_unary_op): Likewise.
1195 (convert_ptrmem): New function.
1196 (build_static_cast_1): Use it.
1197 (build_reinterpret_cast): Allow conversions to vector types.
1198 (get_delta_difference): Add c_cast_p parameter.
1199 (build_ptrmemfunc): Likewise. Adjust calls to
1200 get_delta_difference.
1202 2004-10-21 Andrew Pinski <pinskia@physics.uc.edu>
1205 * error.c (cp_error_at): Output the context as it might be
1206 different file as the other location.
1208 2004-10-21 Kazu Hirata <kazu@cs.umass.edu>
1210 * typeck.c: Fix a comment typo.
1212 2004-10-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1215 * decl.c (make_unbound_class_template): Add PARM_LIST parameter.
1216 * cp-tree.h (make_unbound_class_template): Adjust prototype.
1217 * parser.c (cp_parser_lookup_name): Adjust call to
1218 make_unbound_class_template.
1219 (cp_parser_single_declaration): Handle member class of class
1220 template as template friend parsing correctly.
1221 * friend.c (is_friend): Call is_specialization_of_friend for
1222 template friend class.
1223 (make_friend_class): Handle member class of class template as
1225 * pt.c (is_specialization_of_friend): Likewise.
1226 (instantiate_class_template): Likewise.
1227 (tsubst): Adjust call to make_unbound_class_template.
1229 2004-10-20 Nathan Sidwell <nathan@codesourcery.com>
1231 * typeck.c (composite_pointer_type): Add comment about DR 195
1232 (build_reinterpret_cast_1): Add for_reinterpret_cast_p parameter.
1233 Allow function pointer conversions that DR195 suggests.
1234 (build_reinterpret_cast, build_c_cast): Update
1235 build_reinterpret_cast_1 calls.
1237 2004-10-20 Kazu Hirata <kazu@cs.umass.edu>
1239 * call.c, typeck.c: Fix comment typos.
1241 2004-10-20 Nathan Sidwell <nathan@codesourcery.com>
1243 * parser.c (cp_token_position): New typedef. Define VEC thereof.
1244 (struct cp_lexer): Allow buffer and buffer_end to be NULL. Make
1245 next_token and last_token cp_token_position. Make saved_tokens a
1246 VEC(cp_token_position).
1247 (eof_token): New static variable.
1248 (CP_SAVED_TOKENS_SIZE): Rename to ...
1249 (CP_SAVED_TOKEN_STACK): ... here.
1250 (cp_lexer_new_main): Adjust main lexer creation and buffer
1252 (cp_lexer_new_from_tokens): Do not copy the tokens, merely point
1253 to the parent buffer. Do not append eof token.
1254 (cp_lexer_destroy): Only free buffer if non-NULL. Free token
1256 (cp_lexer_next_token, cp_lexer_prev_token): Remove.
1257 (cp_lexer_token_position, cp_lexer_token_at): New.
1258 (cp_lexer_saving_tokens): Adjust. Make inline.
1259 (cp_lexer_advance_token, cp_lexer_token_difference): Remove.
1260 (cp_lexer_peek_token_emit_debug_info): Fold into ...
1261 (cp_lexer_peek_token): ... here.
1262 (cp_lexer_peek_nth_token): Don't peek past EOF.
1263 (cp_lexer_consume_token): Set next_token to eof_token, if reaching
1265 (cp_lexer_purge_token): Adjust eof setting.
1266 (cp_lexer_purge_tokens_after): Likewise.
1267 (cp_lexer_save_tokens): Push next_token directly.
1268 (cp_lexer_commit_tokens): Adjust.
1269 (cp_lexer_rollback_tokens): Pop next_token directly.
1270 (cp_parser_check_for_invalid_template_id): Adjust token purging.
1271 (cp_parser_translation_unit): Do not consume the EOF.
1272 (cp_parser_nested_name_specifier_opt): Adjust token purging.
1273 (cp_parser_template_id, cp_parser_template_name): Likewise.
1275 2004-10-19 Mark Mitchell <mark@codesourcery.com>
1278 * call.c (struct conversion): Add base_p.
1279 (convert_like): Add c_cast_p argument.
1280 (convert_like_with_conversion): Likewise.
1281 (build_conv): Clear base_p.
1282 (standard_conversion): Set it, for derived-to-base conversions.
1283 (convert_like_real): Add c_cast_p parameter. Handle pointer
1284 conversions directly rather than relying on ocp_convert.
1285 (perform_direct_initialization_if_possible): Add c_cast_p
1287 * cp-tree.h (perform_direct_initialization_if_possible): Change
1289 (convert_member_func_to_ptr): New function.
1290 * typeck.c (check_for_casting_away_constness): Add diag_fn
1292 (build_static_cast_1): New function, split out from ...
1293 (build_static_cast): ... here. Use build_static_cast_1.
1294 (build_reinterpret_cast_1): New function, split out from ...
1295 (build_reinterpret_cast): ... here. Use build_reinterpret_cast_1.
1296 (build_const_cast_1): New function, split out from ...
1297 (build_const_cast): ... here. Use build_const_cast_1.
1298 (build_c_cast): Rewrite to use build_const_cast_1,
1299 build_static_cast_1, and build_reinterpret_cast_1.
1300 (convert_member_func_to_ptr): New function.
1302 2004-10-19 Paolo Bonzini <bonzini@gnu.org>
1305 * parser.c (enum cp_parser_prec): Give relational expressions
1306 a higher precedence than equality expressions.
1308 2004-10-15 Nathan Sidwell <nathan@codesourcery.com>
1310 * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Adjust lookup_base call.
1311 (ACCESSIBLY_UNIQUELY_DERIVED_P): Remove.
1312 (PUBLICLY_UNIQUELY_DERIVED_P): Adjust lookup_base call.
1313 (enum base_access): Reorganize.
1314 (accessible_base_p, accessible_p): Add consider_local_p parameter.
1315 * call.c (standard_conversion): Update comment about
1317 (enforce_access): Adjust accessible_p call.
1318 (build_over_call): Adjust accessible_base_p call.
1319 * class.c (convert_to_base): Adjust lookup_base call.
1320 (build_vtbl_ref_1): Likewise.
1321 (warn_about_ambiguous_bases): Likewise. Add early exit.
1322 * cvt.c (convert_to_pointer_force) Adjust lookup_base call.
1323 * search.c (accessible_base_p): Add consider_local_p parameter.
1324 (lookup_base): Pass consider_local_p to accessible_base_p call.
1325 (friend_accessible_p): Check whether scope is a class member.
1326 Remove unnecessary class template check.
1327 (accessible_p): Add consider_local_p parameter. Use it.
1328 (adjust_result_of_qualified_name_lookup): Adjust lookup_base call.
1329 * tree.c (maybe_dummy_object): Likewise.
1330 * typeck.c (comp_except_type): Use PUBLICLY_UNIQUELY_DERIVED_P.
1331 (build_class_member_access_expr): Adjust lookup_base call.
1332 * typeck2.c (binfo_or_else): Likewise.
1333 * rtti.c (build_dynamic_cast_1): Access can consider friendship
1336 2004-10-17 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1339 * decl2.c (grokfield): Apply attributes also to TYPE_DECLs.
1341 2004-10-16 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1344 * parser.c (cp_parser_parenthesized_expression_list): Fold
1345 non-dependent expressions in attribute lists.
1347 2004-10-15 Mark Mitchell <mark@codesourcery.com>
1350 * decl.c (declare_global_var): Use the return value from pushdecl.
1353 * parser.c (cp_parser_simple_declaration): Do not diagnose invalid
1354 type names if we have already found a valid type.
1355 (cp_parser_member_declaration): Likewise.
1358 * parser.c (cp_parser_member_specification_opt): Handle
1361 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
1363 * dump.c, g++spec.c, repo.c: Update copyright.
1365 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
1367 * decl.c: Fix a comment typo.
1369 2004-10-13 Andrew Pinski <pinskia@physics.uc.edu>
1372 * name-lookup.c (parse_using_directive): If we have a
1373 error_mark_node, do not set the decl namespace associations
1376 2004-10-14 Mark Mitchell <mark@codesourcery.com>
1379 * decl.c (cp_finish_decl): Do not call expand_static_init more
1380 than once for a single variable.
1382 2004-10-14 Matt Austern <austern@apple.com>
1384 * Make-lang.in (pt.o): depends on pointer-set.h
1385 * cp-tree.h (cp_walk_subtrees): Last argument is pointer_set_t* now.
1386 * pt.c (struct pair_fn_data): Use pointer_set_t, not htab_t
1387 (for_each_template_parm): Convert from htab_t to pointer_set_t.
1388 * tree.c (cp_walk_subtrees): Last argument is pointer_set_t* now.
1390 2004-10-13 Andrew Pinski <pinskia@physics.uc.edu>
1393 * semantics.c (finish_for_expr): Convert expression to void
1394 so that we don't create temporaries for a?b:c.
1396 2004-10-13 Kazu Hirata <kazu@cs.umass.edu>
1398 * search.c: Fix a comment typo.
1400 2004-10-12 Nathan Sidwell <nathan@codesourcery.com>
1402 * class.c (dfs_modify_vtables): Simplify condition. Return
1403 dfs_skip_bases as appropriate.
1404 (modify_all_vtables): Walk in pre-order.
1405 * search.c (dfs_walk_all, dfs_walk_once_r,
1406 dfs_walk_once_accessible_r): Assert post order function never
1407 returns dfs_skip_bases.
1409 * search.c (struct lookup_base_data_s): New.
1410 (lookup_base_r): Replace with ...
1411 (dfs_lookup_base): ... this.
1412 (lookup_base): Use dfs_walk_all.
1414 2004-10-12 Kazu Hirata <kazu@cs.umass.edu>
1416 * search.c: Fix comment typos.
1418 2004-10-11 Mark Mitchell <mark@codesourcery.com>
1421 * parser.c (cp_parser_declarator): Add member_p parameter.
1422 (cp_parser_condition): Adjust calls to cp_parser_declarator.
1423 (cp_parser_explicit_instantiation): Likewise.
1424 (cp_parser_init_declarator): Likewise.
1425 (cp_parser_direct_declarator): Add member_p parameter. Do not
1426 parse tentatively when parsing the parameters to a member.
1427 (cp_parser_type_id): Adjust calls to cp_parser_declarator.
1428 (cp_parser_parameter_declaration): Likewise.
1429 (cp_parser_member_declaration): Likewise.
1430 (cp_parser_exception_declaration): Likewise.
1433 * cp-tree.h (CLASSTYPE_TEMPLATE_SPECIALIZATION): Add a comment.
1434 * pt.c (optimize_specialization_lookup_p): Do not optimize lookups
1435 for members of partial or explicit specializations.
1438 * decl2.c (finish_anon_union): Robustify.
1440 2004-10-11 Nathan Sidwell <nathan@codesourcery.com>
1442 * cp-tree.h (get_dynamic_cast_base_type): Rename to ...
1443 (dcast_base_hint): ... here.
1444 * rtti.c (build_dynamic_cast_1): Use dcast_base_hint.
1445 * search.c (struct dcast_data_s): New.
1446 (dynamic_cast_base_recurse): Remove. Replace with ...
1447 (dfs_dcast_hint_pre, dfs_dcast_base_post): ... these. New.
1448 (get_dynamic_cast_base_type): Rename to ...
1449 (dcast_base_hint): ... here. Use dfs_walk_once_accessible.
1450 (accessible_r): Remove.
1451 (dfs_accessible_post): New, broken out of accessible_r.
1452 (accessible_p): Use dfs_walk_once_accessible.
1453 (dfs_walk_once_accessible_r): New. From accessible_r.
1454 (dfs_walk_once_accessible): New. From acessible_p.
1456 * cp-tree.h (SAME_BINFO_TYPE_P): New.
1457 * class.c (build_base_path): Use SAME_BINFO_TYPE_P to compare
1459 (convert_to_base_statically, determine_primary_bases,
1460 update_vtable_entry_for_fn, dfs_modify_vtables, build_vtt_inits,
1461 dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
1462 accumulate_vtbl_inits, dfs_accumulate_vtbl_inits,
1463 build_vtbl_initializer, add_vcall_offset_vtbl_entries_1): Likewise.
1464 * init.c (expand_member_init): Likewise.
1465 * search.c (lookup_base_r, dynamic_cast_base_recurse,
1466 binfo_via_virtual, copied_binfo, binfo_for_vbase,
1467 original_binfo): Likewise.
1468 * tree.c (copy_binfo): Likewise.
1470 2004-10-11 Kazu Hirata <kazu@cs.umass.edu>
1472 * semantics.c: Fix comment typos.
1474 2004-10-10 Andrew Pinski <pinskia@physics.uc.edu>
1479 * semantics.c (maybe_cleanup_point_expr): Call
1480 fold_build_cleanup_point_expr.
1481 (maybe_cleanup_point_expr_void): New function.
1482 (add_decl_expr): Call maybe_cleanup_point_expr_void.
1483 (finish_expr_stmt): Likewise.
1484 (finish_return_stmt): Likewise.
1485 (finish_for_expr): Likewise.
1486 (finish_asm_stmt): Likewise.
1487 * typeck.c (condition_conversion): Call
1488 fold_build_cleanup_point_expr.
1490 2004-10-10 Andrew Pinski <pinskia@physics.uc.edu>
1493 * semantics.c (add_decl_expr): If the decl has a size which
1494 has side effects then the decl expression needs a cleanup point.
1496 2004-10-10 Mark Mitchell <mark@codesourcery.com>
1499 * decl.c (grokdeclarator): Robustify error-recovery on invalid
1502 2004-10-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
1504 Convert diagnostics to use quoting flag q 7/n
1505 * typeck.c (composite_pointer_type_r, composite_pointer_type,
1506 cxx_sizeof_or_alignof_type, cxx_sizeof_or_alignof_expr,
1507 string_conv_p, build_class_member_access_expr,
1508 build_class_member_access_expr, lookup_destructor,
1509 finish_class_member_access_expr, build_indirect_ref,
1510 get_member_function_from_ptrfunc, build_function_call,
1511 convert_arguments, build_binary_op, pointer_diff, build_unary_op,
1512 check_for_casting_away_constness, build_static_cast,
1513 build_reinterpret_cast, build_const_cast, build_c_cast,
1514 build_modify_expr, get_delta_difference, build_ptrmemfunc,
1515 dubious_conversion_warnings, convert_for_assignment,
1516 convert_for_initialization,
1517 maybe_warn_about_returning_address_of_local, check_return_expr):
1520 * typeck2.c (error_not_base_type, readonly_error,
1521 abstract_virtuals_error, cxx_incomplete_type_diagnostic,
1522 store_init_value, digest_init, build_x_arrow,
1523 build_m_component_ref, require_complete_eh_spec_types): Likewise.
1525 * tree.c (cp_build_qualified_type_real,
1526 handle_java_interface_attribute, handle_init_priority_attribute):
1529 * semantics.c (finish_asm_stmt, finish_non_static_data_member,
1530 finish_pseudo_destructor_expr,
1531 check_template_template_default_arg, begin_class_definition,
1532 finish_base_specifier, qualified_name_lookup_error,
1533 finish_id_expression, finish_typeof): Likewise.
1535 * search.c (lookup_base, check_final_overrider,
1536 look_for_overrides_r): Likewise.
1538 * rtti.c (get_tinfo_decl, build_dynamic_cast_1): Likewise.
1540 2004-10-09 Mark Mitchell <mark@codesourcery.com>
1543 * error.c (dump_expr): Correct handling of AGGR_INIT_EXPRs using a
1547 * init.c (build_new): Correct comments.
1548 * parser.c (cp_parser_new_expression): Use NULL_TREE for nelts in
1552 * parser.c (cp_parser_postfix_dot_deref_expression): If the
1553 pseduo-destructor-name production does not work, fall back to the
1554 ordinary production.
1557 * tree.c (cp_tree_equal): Handle a BASELINK.
1560 * cp-tree.h (check_var_type): New function.
1561 * decl.c (check_var_type): New function, split out from ...
1562 (grokdeclarator): ... here.
1563 * pt.c (tsubst_decl): Use check_var_type.
1566 * decl.c (grokdeclarator): Disallow declarations of operators as
1569 2004-10-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1572 * error.c (dump_expr): Add missing case for RDIV_EXPR.
1574 2004-10-08 Kazu Hirata <kazu@cs.umass.edu>
1576 * pt.c, search.c: Fix comment typos.
1578 2004-10-08 Nathan Sidwell <nathan@codesourcery.com>
1580 * cp-tree.h (dfs_walk, dfs_walk_real, dfs_unmark, markedp,
1582 (dfs_skip_bases, dfs_walk_all, dfs_walk_once): New.
1583 * class.c (struct find_final_overrider_data): Remove most_derived,
1584 vpath_list and vpath fields. Add path field.
1585 (dfs_find_final_ocerrider_1): Add DEPTH parameter. Adjust.
1586 (dfs_find_final_overrider): Rename to ...
1587 (dfs_find_final_overrider_pre): ... here. Adjust.
1588 (dfs_find_final_overrider_post): Adjust.
1589 (dfs_find_final_overrider_q): Fold into
1590 dfs_find_final_overrider_pre.
1591 (find_final_overrider): Adjust dfs searching.
1592 (dfs_modify_vtables): Don't mark binfo here.
1593 (modify_all_vtables): Use dfs_walk_once.
1594 (build_vtt_inits): Likwise. Use dfs_walk_all.
1595 (dfs_build_secondary_vptr_vtt_inits): Don't mark binfo here.
1596 Return dfs_skip_bases as appropriate.
1597 (dfs_fixup_binfo_vtbls): Return dfs_skip_bases as appropriate.
1598 * init.c (dfs_initialized_vtbl_ptrs): Return dfs_skip_bases as
1599 appropriate. Don't mark binfo here.
1600 (initialize_vtbl_ptrs): Use dfs_walk_once.
1601 * search.c (struct vbase_info): Remove unused struct.
1602 (access_in_type): Use dfs_walk_once.
1603 (dfs_access_in_type): Don't mark binfo here.
1604 (dfs_accessible_queue_p, dfs_accessible_p) Remove.
1606 (accessible_r): ... here. New. Specialize dfs_walk_once.
1607 (accessible_p): Use accessible_r.
1608 (lookup_field_queue_p): Remove. Fold into ...
1609 (lookup_field_r): ... here. Adjust.
1610 (lookup_member): Use dfs_walk_all.
1611 (dfs_walk_real, dfs_walk): Replace with ...
1612 (dfs_walk_all, dfs_walk_once): ... these.
1613 (dfs_walk_once_r, dfs_unmark_r): Workers for dfs_walk_once.
1614 (dfs_unmark, unmarkedp, markedp): Remove.
1615 (dfs_get_pure_virtuals): Don't mark binfo here.
1616 (get_pure_virtuals): Use dfs_walk_once.
1617 (dfs_debug_unmarked_p): Remove. Fold into ...
1618 (dfs_debug_mark): ... here.
1619 (note_debug_info_needed): Use dfs_walk_all.
1621 2004-10-07 Andrew Pinski <pinskia@physics.uc.edu>
1623 * pt.c (tsubst_expr) <case ASM_EXPR>: Look passed the
1624 CLEANUP_POINT_EXPR to get the asm expression.
1626 2004-10-07 Mark Mitchell <mark@codesourcery.com>
1628 * cp-tree.h (ICS_USER_FLAG): Remove comment about obsolete flag.
1629 (DECL_MEMBER_TEMPLATE_P): New macro.
1630 (is_member_template): Remove.
1631 (class_method_index_for_fn): New function.
1632 * pt.c (build_over_call): Use DECL_MEMBER_TEMPLATE_P.
1633 * class.c (finish_struct_methods): Remove out-of-date comment.
1634 * decl.c (copy_fn_p): Use DECL_MBMER_TEMPLATE_P.
1635 * decl2.c (check_classfn): Use DECL_MEMBER_TEMPLATE_P and
1636 class_method_index_for_fn.
1637 * pt.c (is_member_template): Remove.
1638 (is_member_template_class): Likewise.
1639 (optimize_specialization_lookup_p): New function.
1640 (retrieve_specialization): Optimize lookups for members that are
1641 not member templates.
1642 (register_specialization): Adjust accordingly.
1643 (build_template_decl): Add member_template_p parameter. Set
1644 DECL_MEMBER_TEMPLATE_P.
1645 (process_partial_specialization): Adjust call to
1646 retrieve_specialization.
1647 (push_template_decl_real): Determine whether the template is a
1649 (lookup_template_class): Use retrieve_specialization.
1650 (tsubst_decl): Adjust call to retrieve_specialization.
1651 (tsubst_exception_specification): New function.
1653 (tsubst_copy): Use DECL_MEMBER_TEMPLATE_P.
1654 (instantiate_template): Adjust call to retrieve_specialization.
1655 (regenerate_decl_from_template): Do not actually generate a new
1657 (instantiate_decl): Adjust call to retrieve_specialization.
1658 (class_method_index_for_fn): New method.
1660 2004-10-07 Andrew Pinski <pinskia@physics.uc.edu>
1662 * parser.c (cp_parser_asm_definition): Look passed the
1663 CLEANUP_POINT_EXPR to get the asm expression.
1665 2004-10-06 Andrew Pinski <pinskia@physics.uc.edu>
1668 * semantics.c (finish_asm_stmt): Asm expressions need cleanup
1671 2004-10-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
1673 Convert diagnostics to use quoting flag q 6/n
1674 * pt.c (finish_member_template_decl, check_specialization_scope,
1675 maybe_process_partial_specialization, determine_specialization,
1676 check_explicit_specialization, maybe_check_template_type,
1677 process_partial_specialization, check_default_tmpl_args,
1678 push_template_decl_real, redeclare_class_template,
1679 convert_nontype_argument, coerce_template_parms,
1680 lookup_template_class, push_tinst_level,
1681 instantiate_class_template, tsubst_arg_types,
1682 tsubst_function_type, tsubst, tsubst_qualified_id,
1683 tsubst_copy_and_build, check_instantiated_args,
1684 do_decl_instantiation, do_type_instantiation,
1685 invalid_nontype_parm_type_p, check_specialization_namespace,
1686 convert_template_argument, determine_specialization,
1687 check_template_shadow, tsubst_decl
1688 instantiate_pending_templates): Use quoting marks.
1690 2004-10-05 Nathan Sidwell <nathan@codesourcery.com>
1693 * parser.c (cp_parser_postfix_expression): Inhibit Koenig when
1694 unqualified lookup finds a member function.
1696 2004-10-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
1698 Convert diagnostics to use quoting flag q 5/n
1699 * parser.c (cp_parser_name_lookup_error,
1700 cp_parser_diagnose_invalid_type_name,
1701 cp_parser_primary_expression, cp_parser_unqualified_id,
1702 cp_parser_nested_name_specifier_opt, cp_parser_labeled_statement,
1703 cp_parser_jump_statement, cp_parser_simple_declaration,
1704 cp_parser_decl_specifier_seq, cp_parser_mem_initializer_id,
1705 cp_parser_type_parameter, cp_parser_template_id,
1706 cp_parser_template_name, cp_parser_direct_declarator,
1707 cp_parser_parameter_declaration_list, cp_parser_class_head,
1708 cp_parser_base_specifier, cp_parser_lookup_name,
1709 cp_parser_late_parsing_default_args,
1710 cp_parser_optional_template_keyword
1711 cp_parser_elaborated_type_specifier, cp_parser_check_class_key,
1712 cp_parser_check_access_in_redeclaration): Use quoting marks.
1714 * name-lookup.c (supplement_binding, pushdecl,
1715 check_for_out_of_scope_variable, validate_nonmember_using_decl,
1716 do_nonmember_using_decl, lookup_tag, set_decl_namespace,
1717 push_namespace, do_namespace_alias, do_using_directive,
1718 ambiguous_decl, lookup_namespace_name, add_function): Likewise.
1720 * method.c (use_thunk): Likewise.
1722 * lex.c (unqualified_name_lookup_error,
1723 unqualified_fn_lookup_error): Likewise.
1725 2004-10-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
1727 Convert diagnostics to use quoting flag q 4/n
1728 * except.c (decl_is_java_type, build_throw,
1729 is_admissible_throw_operand, check_handlers_1, check_handlers):
1730 Use quoting formats.
1731 * friend.c (add_friend, make_friend_class, do_friend): Likewise.
1732 * init.c (sort_mem_initializers, emit_mem_initializers,
1733 member_init_ok_or_else, expand_member_init, is_aggr_type,
1734 build_offset_ref, build_java_class_ref): Likewise.
1736 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1738 Convert diagnostics to use quoting flag q 3/n
1739 * decl.c (pop_label, duplicate_decls, redeclaration_error_message,
1740 redeclaration_error_message, lookup_label, check_goto,
1741 make_typename_type, make_unbound_class_template,
1742 fixup_anonymous_aggr, check_tag_decl, start_decl, start_decl_1,
1743 grok_reference_init, layout_var_decl, maybe_commonize_var,
1744 check_for_uninitialized_const_var, reshape_init_array,
1745 reshape_init, check_initializer, cp_finish_decl,
1746 member_function_or_else, bad_specifiers, grokfndecl, grokvardecl,
1747 check_static_variable_definition, compute_array_index_type,
1748 create_array_type_for_decl, check_special_function_return_type,
1749 grokdeclarator, check_default_argument, grokparms,
1750 grok_ctor_properties, grok_op_properties,
1751 check_elaborated_type_specifier, xref_tag, finish_enum,
1752 build_enumerator, check_function_type, start_preparsed_function,
1753 store_parm_decls): Use quoting formats.
1754 * decl2.c (grok_array_decl, delete_sanity, check_member_template,
1755 check_java_method, check_classfn, finish_static_data_member_decl,
1756 grokfield, grokbitfield, grok_function_init,
1757 build_anon_union_vars, coerce_new_type, coerce_delete_type,
1758 check_default_args): Likewise.
1759 * parser.c (cp_parser_decl_specifier_seq): Likewise.
1761 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1763 Convert diagnostics to use quoting flag q 2/n
1764 * class.c (build_base_path, add_method, alter_access,
1765 handle_using_decl, check_bases,
1766 maybe_warn_about_overly_private_class, find_final_overrider,
1767 warn_hidden, finish_struct_anon, add_implicitly_declared_members,
1768 check_bitfield_decl, check_field_decls, layout_empty_base,
1769 build_base_field, check_methods, layout_virtual_bases,
1770 warn_about_ambiguous_bases, layout_class_type, finish_struct_1,
1771 resolve_address_of_overloaded_function, instantiate_type,
1772 note_name_declared_in_class): Use format flag "q" for quoting.
1774 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1776 Convert diagnostics to use quoting flag q 1/n
1777 * error.c (locate_error): Ignore quoting flag q.
1778 * call.c (build_user_type_conversion_1, build_operator_new_call,
1779 build_object_call, op_error, build_conditional_expr,
1780 build_new_op, build_op_delete_call, enforce_access,
1781 convert_like_real, convert_arg_to_ellipsis, build_x_va_arg,
1782 convert_default_arg, build_over_call, build_new_method_call,
1783 joust, perform_implicit_conversion, initialize_reference): Use the
1786 2004-10-03 Andrew Pinski <pinskia@physics.uc.edu>
1789 * typeck.c (build_reinterpret_cast): Return if the inner type
1792 2004-10-01 Jan Hubicka <jh@suse.cz>
1794 * semantics.c (expand_body): Update call of tree_rest_of_compilation.
1796 2004-09-30 Nathan Sidwell <nathan@codesourcery.com>
1798 * cp-tree.h (struct lang_decl): Shrink by reordering fields and
1799 turning operator_code and fixed_offset into bitfields.
1801 2004-09-29 Joseph S. Myers <jsm@polyomino.org.uk>
1803 * decl.c (duplicate_decls): Merge TREE_DEPRECATED.
1805 2004-09-29 Jason Merrill <jason@redhat.com>
1807 PR tree-optimization/17697
1808 * decl.c (duplicate_decls): Copy TREE_NOTHROW from newdecl to olddecl.
1810 2004-09-28 Jason Merrill <jason@redhat.com>
1813 * class.c (build_base_field): Set TYPE_MODE.
1815 2004-09-28 Roger Sayle <roger@eyesopen.com>
1818 * g++spec.c (lang_specific_driver): Unrecognized libraries, other
1819 than -lc and -lm, may require linking against libstc++.
1821 2004-09-28 Kazu Hirata <kazu@cs.umass.edu>
1823 * tree.c: Fix a comment typo.
1825 2004-09-28 Nathan Sidwell <nathan@codesourcery.com>
1827 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): Remove.
1828 (struct secondary_vptr_vtt_init_data_s): New.
1829 (build_vtt_inits): Adjust dfs_walkers.
1830 (dfs_build_secondary_vptr_vtt_inits): Caller data is a
1831 secondary_vptr_vtt_init_data_s structure. Adjust.
1832 (dfs_ctor_vtable_bases_queue_p): Remove.
1833 (dfs_fixup_binfo_vtbls): No need to clear BINFO_MARKED. Simplify.
1835 * pt.c (struct get_template_base_data_s): Remove.
1836 (get_template_base_r): Fold into get_template_base.
1837 (get_template_base): Walk base binfos directly in inheritance
1840 2004-09-27 Mark Mitchell <mark@codesourcery.com>
1843 * cp-tree.h (fold_if_not_in_template): New function.
1844 * call.c (build_conditional_expr): Use fold_if_not_in_template.
1845 (build_cxx_call): Likewise.
1846 * cvt.c (convert_to_complex): Likewise.
1847 (ocp_convert): Likewise.
1848 (convert): Likewise.
1849 (convert_force): Likewise.
1850 * decl.c (compute_array_index_type): Clear
1851 processing_template_decl while folding array bounds.
1852 * pt.c (convert_nontype_argument): Clear
1853 processing_template_decl while processing non-type argument
1855 * tree.c (fold_if_not_in_template): New function.
1856 * typeck.c (build_class_member_access_expr): Use
1857 fold_if_not_in_template.
1858 (build_array_ref): Likewise.
1859 (build_binary_op): Likewise. Do not try to optimize computations
1860 when processing templates.
1861 (cp_pointer_int_sum): Use fold_if_not_in_template.
1862 (pointer_diff): Likewise.
1863 (build_unary_op): Likewise.
1864 (build_reinterpret_cast): Likewise.
1865 (get_delta_difference): Likewise.
1866 (expand_ptrmemfunc_cst): Likewise.
1867 (dubious_conversion_warnings): Likewise.
1869 2004-09-27 Matt Austern <austern@apple.com>
1871 * cp/parser.c (struct cp_token): New one-bit field , implicit_extern_c
1872 (cp_lexer_get_preprocessor_token): Set implicit_extern_c for
1873 tokens that come from headers that are implicitly extern "C".
1874 (struct cp_parser): new one-bit field, implicit_extern_c.
1875 (cp_parser_new): Set parser's implicit_extern_c to false.
1876 (cp_parser_translation_unit): Pop lang context if we were in a
1877 header that was implicitly extern "C".
1878 (cp_parser_declaration_seq_opt): Push/pop lang context as
1879 required by the token's and parser's implicit_extern_c.
1881 2004-09-27 Mark Mitchell <mark@codesourcery.com>
1884 * cp-tree.h (shared_member_p): Declare.
1885 * search.c (shared_member_p): Give it external linkage.
1886 * semantics.c (finish_qualified_id_expr): Use it.
1887 (finish_id_expression): Likewise.
1890 * semantics.c (finish_id_expression): Do not add "this->" to
1891 static member functions.
1893 2004-09-27 Nathan Sidwell <nathan@codesourcery.com>
1896 * error.c (dump_type): Change TREE_VEC case into TREE_BINFO.
1898 * class.c (struct count_depth_data): Remove.
1899 (dfs_depth_post, dfs_depth_q): Remove.
1900 (find_final_overrider): Use number of vbase classes as depth
1903 * cp-tree.h (types_overlap_p): Remove.
1904 * search.c (struct overlap_info): Remove.
1905 (dfs_check_overlap, dfs_no_overlap_yet, types_overlap_p): Remove.
1907 * pt.c (GTB_VIA_VIRTUAL, GTB_IGNORE_TYPE): Remove.
1908 (get_template_base_recursive): Remove. Replace with ...
1909 (get_template_base_r): ... this.
1910 (struct get_template_base_data_s): New.
1911 (get_template_base): Use get_template_base_r via dfs_walk. Always
1912 return NULL on failure.
1913 (unify): Remove error_mark_node check from get_template_base result.
1915 2004-09-24 Paolo Bonzini <bonzini@gnu.org>
1917 * parser.c (cp_parser_expression_stack): Clarify why it is
1918 an array of NUM_PREC_VALUES elements.
1919 (cp_parser_binary_expression): Clarify why we do not need to
1920 handle stack overflow.
1922 2004-09-24 Nathan Sidwell <nathan@codesourcery.com>
1925 * search.c (lookup_field_queue_p): Correct check for hidden base.
1927 * search.c (bfs_walk): Remove.
1928 (lookup_member): Use dfs_walk_real.
1929 (dfs_walk_real): Move and adjust documentation from bfs_walk.
1931 2004-09-23 Zack Weinberg <zack@codesourcery.com>
1933 * decl.c (grokfndecl): If ::main is found not to return int,
1934 correct it after issuing a diagnostic.
1935 (grokdeclarator): If the incoming type was error_mark_node, do
1936 not complain about declaring something with no type.
1937 (start_function): Change check for ::main not returning int to
1938 an assertion, as grokfndecl now catches this when the user did it.
1939 * init.c (perform_member_init, sort_mem_initializers)
1940 (emit_mem_initializers): Make most diagnostics be issued on
1941 the line of current_function_decl, not whatever the current
1943 * parser.c (cp_lexer_peek_token_emit_debug_info): Surround
1944 definition and declaration with #ifdef ENABLE_CHECKING.
1945 Avoid unnecessary use of fprintf.
1946 (cp_lexer_print_token, cp_lexer_debug_stream): Adjust stub
1947 definitions to avoid warnings.
1948 (cp_lexer_new_main): Add assertion that first token is not a
1950 (cp_lexer_new_from_token_array): Fold into ...
1951 (cp_lexer_new_from_tokens): ... here. Add assertion that
1952 first token is not a padding token.
1953 (cp_lexer_set_source_position_from_token): Move nearer to callers.
1954 Remove unused lexer argument.
1955 (cp_lexer_peek_token): Just print debugging report (if enabled)
1956 and return lexer->next_token.
1957 (cp_lexer_skip_purged_tokens): Delete.
1958 (cp_lexer_next_token_is, cp_lexer_next_token_is_not): Make
1959 inline, simplify bodies.
1960 (cp_lexer_peek_nth_token): Add debugging report a la
1961 cp_lexer_peek_token.
1962 (cp_lexer_consume_token): Correct commentary. Advance over
1963 purged tokens here. Set current source position here, from
1964 token to be returned. Avoid unnecessary use of fprintf.
1965 (cp_lexer_purge_token): Advance next_token pointer over this and
1966 subsequent purged tokens.
1967 (cp_parser_error): Adjust source position to that of the
1969 (cp_parser_push_lexer_for_tokens, cp_parser_pop_lexer): New functions.
1970 (cp_parser_string_literal): Remove some excessive cleverness.
1971 (cp_parser_enum_specifier): Call start_enum before consuming
1973 (cp_parser_member_declaration): Make the "extra semicolon"
1974 diagnostic consistently-worded with the other place this is
1975 diagnosed. Explicitly set the diagnostic location to the
1976 location of the offending semicolon.
1977 (cp_parser_enclosed_template_argument_list): Use %</%> quoting
1978 in diagnostics. Do not use cp_parser_require. Set location
1979 of diagnostics about improper use of '>>' to location of
1981 (cp_parser_late_parsing_for_member):
1982 Use cp_parser_push_lexer_for_tokens and cp_parser_pop_lexer.
1983 (cp_parser_late_parsing_default_args): Likewise. Manually
1984 move some logic outside the loop.
1986 2004-09-23 Andrew Pinski <pinskia@physics.uc.edu>
1989 * cvt.c (cp_convert_to_pointer): Return early when the type is
1992 2004-09-21 Fariborz Jahanian <fjahanian@apple.com>
1996 * decl.c (grokfndecl): Add new argument "attrlist", use it
1997 to call cplus_decl_attributes.
1998 (start_function): Remove call to cplus_decl_attributes.
1999 * cvt.c (ocp_convert): Add support to use type conversion
2000 function to vector type.
2001 * parser.c (cp_parser_conversion_type_id): Add attributes, if any,
2004 2004-09-23 Paolo Bonzini <bonzini@gnu.org>
2008 * parser.c (cp_parser_token_tree_map_node,
2009 cp_parser_pm_expression, cp_parser_additive_expression,
2010 cp_parser_multiplicative_expression, cp_parser_shift_expression,
2011 cp_parser_relational_expression, cp_parser_equality_expression,
2012 cp_parser_and_expression, cp_parser_exclusive_or_expression,
2013 cp_parser_inclusive_or_expression,
2014 cp_parser_logical_and_expression,
2015 cp_parser_logical_or_expression): Removed.
2016 (enum cp_parser_prec, struct cp_parser_token_tree_map_node,
2017 binops, binops_by_token): New.
2018 (cp_parser_assignment_expression): Use cp_parser_binary_expression.
2019 (cp_parser_new): Initialize binops_by_token.
2020 (cp_parser_binary_expression): Rewritten.
2023 2004-09-23 Kazu Hirata <kazu@cs.umass.edu>
2025 * parser.c: Fix a comment typo.
2027 2004-09-23 Nathan Sidwell <nathan@codesourcery.com>
2030 * decl.c (xref_basetypes): Look through typedefs before checking
2033 2004-09-22 Nathan Sidwell <nathan@codesourcery.com>
2035 * cp-tree.h (unemitted_tinfo_decls): Make a VEC(tree).
2036 * decl2.c (cp_finish_file): Adjust tinfo decl emission loop.
2037 * rtti.c (unemitted_tinfo_decls): Make a VEC(tree).
2038 (init_rtti_processing): Initialize it to something realistic.
2039 (get_tinfo_decl): Adjust pushing the new decl.
2041 * cp-tree.h (struct lang_type_class): Remove marked flags, add
2042 diamond_shaped and repeated_base flags. Reorder to keep 8-bit blocks.
2043 (TYPE_MARKED_P): New.
2044 (CLASSTYPE_DIAMOND_SHAPED_P, CLASSTYPE_REPEATED_BASE_P): New.
2045 (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
2046 CLEAR_CLASSTYPE_MARKED_N): Remove.
2047 (CLASSTYPE_MARKED_*, SET_CLASSTYPE_MARKED_*,
2048 CLEAR_CLASSTYPE_MARKED_*): Remove.
2049 * decl.c (xref_basetypes): Use TYPE_MARKED_P. Determine diamond
2050 shaped and repeated base properties.
2051 * lex.c (cxx_make_type): Don't clear TYPE_ALIAS_SET.
2052 * rtti.c (dfs_class_hint_mark, dfs_class_hint_unmark,
2053 class_hint_flags): Remove.
2054 (get_pseudo_ti_init): Use CLASSTYPE_REPEATED_BASE_P and
2055 CLASSTYPE_DIAMOND_SHAPED_P.
2057 2004-09-21 Ziemowit Laski <zlaski@apple.com>
2059 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved here from
2061 (objcp_tsubst_copy_and_build): Reformat function signature.
2062 * cp-objcp-common.h (objcp_tsubst_copy_and_build): Likewise.
2063 (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved to cp-lang.c.
2065 2004-09-21 Zack Weinberg <zack@codesourcery.com>
2067 * parser.c (cp_lexer_peek_token, cp_lexer_consume_token):
2068 Don't handle CPP_PRAGMA tokens specially.
2069 (cp_lexer_handle_pragma): Use cp_lexer_consume_token. Don't
2070 purge the token; do clear token->value after processing. Add
2071 assertion at beginning that token->value is nonzero.
2072 (cp_parser_statement, cp_parser_declaration_seq_opt): Handle
2073 CPP_PRAGMA as a full statement or declaration in its own right.
2075 2004-09-21 Matt Austern <austern@apple.com>
2078 * decl.c (grokvardecl): Accept declarations of global variables
2079 using anonymous types.
2081 2004-09-21 Roger Sayle <roger@eyesopen.com>
2084 * tree.c (lvalue_p_1): Disallow MIN_EXPR and MAX_EXPR as lvalues
2085 if either operand has side-effects.
2086 * typeck.c (rationalize_conditional_expr): Assert that neither
2087 operand of MIN_EXPR or MAX_EXPR has side-effects.
2088 (build_modify_expr): Add support for MIN_EXPR and MAX_EXPR.
2089 Check that the "lhs" is a valid lvalue, i.e. that neither operand
2090 of a MIN_EXPR or MAX_EXPR has a side-effect.
2092 2004-09-21 Nathan Sidwell <nathan@codesourcery.com>
2094 * cp-tree.h (struct lang_type_header): Remove
2095 uses_multiple_inheritance field.
2096 (TYPE_USES_MULTIPLE_INHERITANCE): Remove.
2097 (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): Remove.
2098 (TYPE_USES_VIRTUAL_BASECLASSES): Remove.
2099 (DECL_NEEDS_VTT_PARM_P): Use CLASSTYPE_VBASECLASSES.
2100 (TYPE_CONTAINS_VPTR_P): Likewise.
2101 * call.c (add_template_candidate_real): Use
2102 CLASSTYPE_VBASECLASSES.
2103 (build_special_member_call): Likewise.
2104 * class.c (finish_struct_bits): Remove
2105 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P & TYPE_USES_VIRTUAL_BASECLASSES
2107 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
2108 (create_vtable_ptr): Remove TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P
2110 (build_vtt_inits): Use CLASSTYPE_VBASECLASSES.
2111 (accumulate_vtbl_inits, build_vbase_offset_vtbl_entries):
2113 * decl.c (xref_basetypes): Remove TYPE_USES_MULTIPLE_INHERITANCE,
2114 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
2116 (cxx_maybe_build_cleanup): Use CLASSTYPE_VBASECLASSES.
2117 * decl2.c (maybe_retrofit_in_chrg): Likewise.
2118 * init.c (expand_member, push_base_cleanups): Likewise.
2119 * pt.c (instantiate_class_template): Remove
2120 TYPE_USES_MULTIPLE_INHERITANCE,
2121 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
2123 * ptree.c (cxx_print_type): Remove TYPE_USES_MULTIPLE_INHERITANCE
2125 * typeck2.c (process_init_constructor): Replace some sorrys with
2128 2004-09-21 Andreas Tobler <a.tobler@schweiz.ch>
2130 * decl.c (reshape_init_array): Initialize max_index_cst to fix
2133 2004-09-20 Mark Mitchell <mark@codesourcery.com>
2136 * pt.c (tsubst): Fix parentheses to accomodate emacs.
2137 (tsubst_baselink): If we get a single function, mark it as used.
2139 2004-09-20 Matt Austern <austern@apple.com>
2140 Zack Weinberg <zack@codesourcery.com>
2142 * decl.c (make_rtl_for_nonlocal_decl, start_preparsed_function):
2143 Apply lbasename to input_filename before passing to get_fileinfo.
2144 * semantics.c (begin_class_definition): Likewise.
2145 * lex.c (handle_pragma_interface): Apply get_fileinfo to the
2146 correct filename. Rename variables to be less confusing.
2147 (handle_pragma_implementation): Likewise. Disable "appears
2148 after file is included" diagnostic.
2150 * parser.c (struct cp_token): Add in_system_header fiag.
2151 (CP_TOKEN_BLOCK_NUM_TOKENS, struct cp_token_block)
2152 (CP_TOKEN_BUFFER_SIZE, cp_token_cache_push_token)
2153 (CPP_NONE, cp_lexer_read_token): Delete.
2154 (struct cp_lexer): Remove first_token, string_tokens,
2155 main_lexer_p fields. Clarify comments.
2156 (struct cp_token_cache): Now just a pair of pointers.
2157 (CP_LEXER_BUFFER_SIZE): New #define.
2158 (CPP_PURGED): New fake token type.
2159 (cp_lexer_new_from_token_array, cp_lexer_destroy)
2160 (cp_lexer_peek_token_emit_debug_info, cp_lexer_skip_purged_tokens)
2161 (cp_lexer_handle_pragma, cp_token_cache_new, cp_parser_string_literal):
2163 (cp_lexer_new_from_tokens): Now a simple wrapper around
2164 cp_lexer_new_from_token_array.
2165 (cp_lexer_set_source_position_from_token): Also update
2167 (cp_lexer_next_token, cp_lexer_prev_token, cp_lexer_advance_token):
2169 (cp_lexer_token_difference): Dont handle wrapping round.
2170 (cp_lexer_new_main): Enable pragma deferral and raw strings,
2171 read the entire translation unit through c_lex_with_flags into
2172 this lexer's buffer, then turn raw strings back off again.
2173 (cp_lexer_grow_buffer): Adjust for buffer no longer being circular.
2174 (cp_lexer_get_preprocessor_token): No need to handle not being
2175 the main lexer. Set token->in_system_header too.
2176 (cp_lexer_peek_token): Skip purged tokens. Feed pragma tokens
2177 to cp_lexer_handle_pragma. No need to call cp_lexer_read_token.
2178 (cp_lexer_peek_nth_token): Likewise.
2179 (cp_lexer_purge_token): Mark the token PURGED, don't shift all
2180 the other tokens down.
2181 (cp_lexer_purge_tokens_after): Likewise.
2182 (cp_lexer_save_tokens, cp_lexer_rollback_tokens): Don't worry
2183 about there being no tokens.
2184 (cp_lexer_print_token): Revise to give useful information on
2186 (struct cp_parser): Add field translate_strings_p.
2187 (cp_parser_new): Initialize it.
2188 (cp_parser_translation_unit): Destroy the lexer when done.
2189 (cp_parser_parameter_declaration): Restructure saving of
2191 (cp_parser_save_member_function_body): Likewise.
2192 (cp_parser_check_for_invalid_template_id)
2193 (cp_parser_nested_name_specifier_opt, cp_parser_template_id):
2194 Adjust calls to cp_lexer_advance_token.
2195 (cp_parser_skip_to_closing_parenthesis, cp_parser_declaration):
2196 No need to fiddle c_lex_string_translate.
2197 (cp_parser_primary_expression, cp_parser_linkage_specification)
2198 (cp_parser_asm_definition, cp_parser_asm_specification_opt)
2199 (cp_parser_asm_operand_list, cp_parser_asm_clobber_list)
2200 Use cp_parser_string_literal.
2201 (cp_parser_attribute_list): Save and restore
2202 parser->translate_strings_p, not c_lex_string_translate.
2203 (cp_parser_cache_group): Delete.
2204 (cp_parser_cache_group_1): Rename cp_parser_cache_group. Do
2205 not take a cache argument.
2207 2004-09-20 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2210 * decl.c (reshape_init): Extract array handling into...
2211 (reshape_init_array): New function. Use integers instead of trees
2212 for indices. Handle out-of-range designated initializers.
2214 2004-09-20 Steven Bosscher <stevenb@suse.de>
2216 * lex.c (cxx_init): Don't set the ridpointer for RID_NULL
2219 2004-09-19 Mark Mitchell <mark@codesourcery.com>
2221 * decl2.c (determine_visibility): Allow class visibility
2222 directives to override targetm.cxx.export_class_data.
2224 2004-09-18 Kazu Hirata <kazu@cs.umass.edu>
2226 * call.c, semantics.c: Follow spelling conventions.
2227 * class.c: Fix a comment typo.
2229 2004-09-16 Geoffrey Keating <geoffk@apple.com>
2232 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
2233 (handle_pragma_implementation): Likewise.
2235 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
2236 Zack Weinberg <zack@codesourcery.com>
2238 * cp-tree.def: Use tree_code_class enumeration constants
2239 instead of code letters.
2240 * call.c, class.c, cp-gimplify.c, cp-lang.c, cxx-pretty-print.c
2241 * mangle.c, pt.c, semantics.c, tree.c, typeck.c:
2242 Update for new tree-class enumeration constants.
2244 2004-09-16 Mark Mitchell <mark@codesourcery.com>
2247 * parser.c (cp_parser_simple_declaration): Commit to tentative
2248 parses after seeing a decl-specifier.
2249 (cp_parser_simple_declaration): Eliminate spurious message.
2250 (cp_parser_init_declarator): Adjust error message.
2253 * lex.c (unqualified_name_lookup_error): Mark the dummy
2254 declaration as used.
2257 * parser.c (cp_parser_nested_name_specifier): Do not resolve
2258 typename types if the user explicitly said "typename".
2260 2004-09-16 Andrew MacLeod <amacleod@redhat.com>
2262 * error.c (dump_decl): Make sure there is lang_specific info before
2263 checking for DTOR and CTOR decls.
2265 2004-09-16 Nathan Sidwell <nathan@codesourcery.com>
2267 * class.c (copy_virtuals): Remove.
2268 (build_primary_vtable): Use copy_list directly.
2269 (build_secondary_vtable): Likewise.
2270 (update_vtable_entry_for_fn): Clear BV_CALL_INDEX here.
2271 (create_vtable_ptr): Likewise.
2273 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
2275 * search.c: Follow spelling conventions.
2277 2004-09-16 Nathan Sidwell <nathan@codesourcery.com>
2279 * cp-tree.h (struct lang_type_class): Make pure_virtuals a
2281 (CLASSTYPE_INLINE_FRIENDS, CLASSTYPE_PURE_VIRTUALS): Update
2283 * call.c (build_new_method_call): Don't confirm a pure virtual is
2284 in CLASSTYPE_PURE_VIRTUALS. Reorder checks. Make it a warning.
2285 * class.c (check_methods): CLASSTYPE_INLINE_FRIENDS is a VEC(tree).
2286 (fixup_inline_methods, finish_struct): Likewise.
2287 * decl.c (finish_method): Likewise.
2288 * search.c (dfs_get_pure_virtuals, get_pure_virtuals):
2289 CLASSTYPE_PURE_VIRTUALS is a VEC(tree).
2290 * typeck2.c (abstract_virtuals_error): Likewise. Truncate the
2291 vector to avoid repeating the list in error messages.
2293 2004-09-15 Mark Mitchell <mark@codesourcery.com>
2295 * cp-objcp-common.h (LANG_HOOKS_COMDAT_GROUP): Define.
2296 * cp-tree.h (cxx_comdat_group): Declare.
2297 * decl.c (cxx_comdat_group): New function.
2299 2004-09-15 Nathan Sidwell <nathan@codesourcery.com>
2301 * search.c (get_pure_virtuals): Remove unused variables.
2303 * cp-tree.h (struct lang_decl_flags): Remove
2304 needs_final_overrider.
2305 (DECL_NEEDS_FINAL_OVERRIDER_P): Remove.
2306 * decl.c (duplicate_decls): Do not copy DECL_NEEDS_FINAL_OVERRIDER_P.
2307 * class.c (finish_struct_bits): Correct comment about
2308 CLASSTYPE_PURE_VIRTUALS.
2309 * search.c (get_pure_virtuals): Remove useless loop.
2311 2004-09-14 Mark Mitchell <mark@codesourcery.com>
2314 * mangle.c (partially_mangled_name): New variable.
2315 (partially_mangled_name_len): Likewise.
2316 (save_partially_mangled_name): New function.
2317 (restore_partially_mangled_name): Likewise.
2318 (write_encoding): Save and restore partially mangled names around
2319 calls to get_mostly_instantiated_function_type.
2320 (write_unqualified_name): Likewise.
2322 2004-09-14 Nathan Sidwell <nathan@codesourcery.com>
2324 * pt.c (unify): Replace gcc_unreachable with gcc_assert.
2326 2004-09-13 Mark Mitchell <mark@codesourcery.com>
2329 * parser.c (cp_parser_id_expression): Correct value for
2331 (cp_parser_nested_name_specifier_opt): Look through typenames as
2333 (cp_parser_template_name): Honor check_dependency_p.
2336 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name):
2340 * pt.c (unify): Add ENUMERAL_TYPE case. Replace sorry with
2343 2004-09-12 Richard Henderson <rth@redhat.com>
2346 * semantics.c (maybe_cleanup_point_expr): Don't call fold.
2347 * typeck.c (condition_conversion): Likewise.
2349 2004-09-11 Richard Henderson <rth@redhat.com>
2352 * pt.c (cur_stmt_expr): Move from tsubst_expr.
2353 (tsubst_expr) <case STMT_EXPR>: Move ...
2354 (tsubst_copy_and_build): ... here.
2356 2004-09-10 Zack Weinberg <zack@codesourcery.com>
2358 * cp-tree.h (interface_only, interface_unknown): Delete declarations;
2359 comment explaining them moved to c-common.h.
2360 * lex.c (interface_only, interface_unknown, extract_interface_info):
2362 (cxx_finish): Don't reset interface_unknown.
2363 (handle_pragma_interface): Don't set interface_only and
2364 interface_unknown; just the like-named fields in finfo.
2365 (handle_pragma_implementation): Adjust comment.
2366 * decl2.c (cp_finish_file): Don't reset interface_only and
2368 * method.c (synthesize_method): Don't reset interface_unknown or
2369 call extract_interface_info.
2370 * pt.c (pop_tinst_level): Don't call extract_interface_info.
2371 * decl.c (start_cleanup_fn): Don't save or restore interface_only
2372 and interface_unknown.
2373 (make_rtl_for_nonlocal_decl): Call get_fileinfo on input_filename
2374 and use the result instead of the interface_only/interface_unknown
2376 (start_preparsed_function): Likewise.
2377 * lex.c (cxx_make_type): Likewise.
2378 * semantics.c (begin_class_definition): Likewise.
2379 (expand_body): Don't call extract_interface_info.
2381 2004-09-10 Ziemowit Laski <zlaski@apple.com>
2383 * decl.c (objc_mark_locals_volatile): Make description of
2384 routine more descriptive; only mark VAR_DECLs at each
2387 2004-09-10 Richard Henderson <rth@redhat.com>
2390 * call.c (build_vfield_ref): Move...
2391 * class.c (build_vfield_ref): ... here. Convert datum to the
2392 primary base containing the vptr.
2393 (make_new_vtable): Simplify build_primary_vtable arguments.
2394 (finish_struct_1): Do not duplicate TYPE_VFIELD.
2395 * typeck.c (build_class_member_access_expr): Don't warn for
2396 null object access to base fields.
2398 2004-09-10 Ziemowit Laski <zlaski@apple.com>
2400 * decl.c (objc_get_current_scope, objc_mark_locals_volatile):
2401 New functions, to be called from ObjC++.
2403 2004-09-10 Kazu Hirata <kazu@cs.umass.edu>
2405 * class.c, cp-tree.h, decl.c, decl2.c, mangle.c,
2406 name-lookup.h, parser.c, search.c, semantics.c, typeck2.c: Fix
2409 2004-09-09 Ziemowit Laski <zlaski@apple.com>
2411 * typeck.c (build_c_cast): Preserve the cast if casting
2412 to and from an Objective-C type.
2414 2004-09-09 Ziemowit Laski <zlaski@apple.com>
2416 * Make-lang.in (cp/typeck.o): Depend on c-common.h.
2417 * typeck.c: Include c-common.h.
2418 (comptypes): For RECORD_TYPEs, call objc_comptypes() and
2419 return the result if nonnegative.
2421 2004-09-09 Zack Weinberg <zack@codesourcery.com>
2423 * decl2.c (import_export_class)
2424 * lex.c (handle_pragma_interface):
2425 Test MULTIPLE_SYMBOL_SPACES with if, not #ifdef.
2427 2004-09-08 Ziemowit Laski <zlaski@apple.com>
2429 * Make-lang.in (cp/semantics.o): Depend on c-common.h.
2430 * semantics.c: Include c-common.h.
2431 (finish_compound_stmt): Call objc_clear_super_receiver().
2433 2004-09-08 Ziemowit Laski <zlaski@apple.com>
2435 * cp-tree.h (do_poplevel): New prototype.
2436 * semantics.c (do_poplevel): Make externally visible.
2438 2004-09-08 Nathan Sidwell <nathan@codesourcery.com>
2440 * cp-tree.h (tree_pair_s): Define a GC'd vector.
2441 * name-lookup.h (cxx_saved_binding, cp_class_binding): Likewise.
2442 * semantics.c (deferred_access): Likewise.
2444 2004-09-06 Daniel Jacobowitz <dan@debian.org>
2446 * semantics.c (expand_body): Assert that we are not nested.
2448 2004-09-06 Zack Weinberg <zack@codesourcery.com>
2450 * decl.c (build_enumerator): Use add_double and int_fits_type_p
2451 instead of cp_build_binary_op, to avoid creating short-lived trees.
2452 * parser.c (cp_parse_type_specifier <RID_ENUM>): Use two-token
2453 lookahead instead of backtracking. Move some code to avoid a
2455 (cp_parser_enum_specifier): Avoid duplication of effort with caller.
2456 Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
2457 (cp_parser_enumerator_list, cp_parser_enumerator_definition):
2458 Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
2460 2004-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2462 * decl.c (grok_declarator): Remove a redundant semicolon.
2464 * parser.c (cp_parser_decl_specifier_seq, cp_parser_type_specifier):
2465 Correct comments describing function parameters.
2467 2004-09-03 Matt Austern <austern@apple.com>
2468 Compile speed improvement.
2469 * parser.c (cp_lexer_print_token): Only define if ENABLE_CHECKING set.
2470 Otherwise define a stub macro that expands to nothing.
2471 (cp_lexer_debugging_p): Only define if ENABLE_CHECKING set. Otherwise
2472 define a stub macro that expands to 0.
2473 (cp_lexer_start_debugging): Only define if ENABLE_CHECKING set.
2474 (cp_lexer_stop_debugging): Likewise.
2475 (cp_lexer_debug_stream): Only define if ENABLE_CHECKING set. Otherwise
2476 define a stub macro that expands to NULL.
2477 (cp_lexer_new_main): Only set debugging_p if ENABLE_CHECKING set.
2478 (cp_lexer_new_from_tokens): Likewise.
2480 2004-09-03 Jan Hubicka <jh@suse.cz>
2482 * decl.c (finish_function): Clean out pointers we no longer need.
2484 2004-09-03 Jan Beulich <jbeulich@novell.com>
2486 * g++spec.c (MATH_LIBRARY_PROFILE): Default to MATH_LIBRARY rather
2489 2004-09-02 Paul Brook <paul@codesourcery.com>
2491 * decl2.c (determine_visibility): Only check data visibility
2494 2004-08-31 Mark Mitchell <mark@codesourcery.com>
2496 * cp-tree.h (DECL_CONSTRUCTION_VTABLE_P): New macro.
2497 * class.c (build_ctor_vtbl_group): Set DECL_CONSTRUCTION_VTABLE_P.
2498 * decl2.c (determine_visibility): Honor
2499 TARGET_CXX_EXPORT_CLASS_DATA.
2501 * class.c (key_method): Rename to ...
2502 (determine_key_method): ... this.
2503 (finish_struct_1): Adjust accordingly.
2504 * cp-tree.h (key_method): Declare.
2505 * decl2.c (maybe_emit_vtables): Determine the key method here if
2506 it has not already been done.
2508 2004-08-31 Ziemowit Laski <zlaski@apple.com>
2510 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-objcp-common.o.
2511 (cp/cp-lang.o): Depend on debug.h, gtype-cp.h and cp/cp-objcp-common.h.
2512 (cp/cp-decl.c): Do not depend on gtype-cp.h.
2513 (cp/cp-objcp-common.o): New target.
2514 * cp-lang.c: Include debug.h, cp-objcp-common.h and gtype-cp.h.
2515 (cxx_get_alias_set, cxx_warn_unused_global_decl, cp_expr_size,
2516 cp_tree_size, cp_var_mod_type_p, cxx_initialize_diagnostics): Move
2517 prototypes and definitions to cp-objcp-common.h and cp-objcp-common.c,
2519 (LANG_HOOKS_TREE_SIZE, LANG_HOOKS_FINISH,
2520 LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_INIT_OPTIONS,
2521 LANG_HOOKS_INITIALIZE_DIAGNOSTICS, LANG_HOOKS_HANDLE_OPTION,
2522 LANG_HOOKS_HANDLE_FILENAME, LANG_HOOKS_MISSING_ARGUMENT,
2523 LANG_HOOKS_POST_OPTIONS, LANG_HOOKS_GET_ALIAS_SET,
2524 LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_EXPAND_EXPR,
2525 LANG_HOOKS_EXPAND_DECL, LANG_HOOKS_PARSE_FILE,
2526 LANG_HOOKS_DUP_LANG_SPECIFIC_DECL, LANG_HOOKS_TRUTHVALUE_CONVERSION,
2527 LANG_HOOKS_SET_DECL_ASSEMBLER_NAME, LANG_HOOKS_MARK_ADDRESSABLE,
2528 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
2529 LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
2530 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_PRINT_ERROR_FUNCTION,
2531 LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL, LANG_HOOKS_WRITE_GLOBALS,
2532 LANG_HOOKS_FUNCTION_INIT, LANG_HOOKS_FUNCTION_FINAL,
2533 LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P,
2534 LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE,
2535 LANG_HOOKS_ATTRIBUTE_TABLE, LANG_HOOKS_TREE_INLINING_WALK_SUBTREES,
2536 LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN,
2537 LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS,
2538 LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P,
2539 LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P,
2540 LANG_HOOKS_TREE_INLINING_VAR_MOD_TYPE_P,
2541 LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN,
2542 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN, LANG_HOOKS_EXPR_SIZE,
2543 LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR,
2544 LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, LANG_HOOKS_MAKE_TYPE,
2545 LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE,
2546 LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
2547 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE, LANG_HOOKS_INCOMPLETE_TYPE_ERROR,
2548 LANG_HOOKS_TYPE_PROMOTES_TO, LANG_HOOKS_REGISTER_BUILTIN_TYPE,
2549 LANG_HOOKS_GIMPLIFY_EXPR, LANG_HOOKS_FOLD_OBJ_TYPE_REF): Move
2550 hooks to cp-objcp-common.h.
2551 (finish_file): New function.
2552 * cp-objcp-common.c: New file.
2553 * cp-objcp-common.h: New file.
2554 * cp-tree.h (cp_finish_file): New prototype.
2555 * decl.c: Do not include gtype-cp.h.
2556 * decl2.c (finish_file): Rename to cp_finish_file.
2558 2004-08-31 Richard Henderson <rth@redhat.com>
2561 * pt.c (tsubst_expr): Move OFFSETOF_EXPR handling ...
2562 (tsubst_copy_and_build): ... here.
2564 2004-08-30 Mark Mitchell <mark@codesourcery.com>
2566 * cp-tree.h (initialize_artificial_var): Declare.
2567 * decl.c (initialize_artifical_var): New function.
2568 * class.c (initialize_array): Remove.
2569 (initialize_vtable): Use initialize_artificial_var.
2570 (build_vtt): Likewise.
2571 (build_ctor_vtbl_group): Likewise.
2573 2004-08-30 Richard Henderson <rth@redhat.com>
2575 * class.c (build_base_path): Use build_address directly.
2576 * typeck.c (build_unary_op): Don't lower &a.b to pointer
2577 arithmetic directly.
2578 * typeck2.c (store_init_value): Don't assume !TREE_CONSTANT
2579 means !initializer_constant_valid_p.
2581 2004-08-30 Richard Henderson <rth@redhat.com>
2583 * class.c (fixed_type_or_null): Use get_base_address before
2584 assuming an ADDR_EXPR is non-null.
2586 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
2588 * name-lookup.c (pop_binding, pushdecl,
2589 set_identifier_type_value_with_scope, push_overloaded_decl,
2590 arg_assoc_type): Replace abort with gcc_assert or gcc_unreachable.
2591 * parser.c (cp_parser_diagnose_invalid_type_name,
2592 cp_parser_postfix_expression, cp_parser_unary_expression,
2593 cp_parser_check_declarator_template_para): Likewise.
2594 * pt.c (push_inline_template_parms_recursive,
2595 check_explicit_specialization, convert_nontype_argument,
2596 coerce_template_template_parms, uses_template_parms,
2597 instantiate_class_template, tsubst_decl, tsubst, tsubst_copy,
2598 tsubst_expr, instantiate_template,
2599 maybe_adjust_types_for_deduction, type_unification_real,
2600 resolve_overloaded_unification, template_decl_level,
2601 type_dependent_expression_p): Likewise.
2602 * search.c (lookup_base_r): Likewise.
2603 * semantics.c (finish_stmt_expr, simplify_aggr_init_expr): Likewise.
2604 * tree.c (lvalue_p_1, count_functions, cxx_printable_name,
2605 verify_stmt_tree_r, get_type_decl, stabilize_call): Likewise.
2606 * typeck.c (common_type, get_member_function_from_ptrfunc,
2607 build_binary_op, build_unary_op, expand_ptrmemfunc_cst): Likewise.
2608 * typeck2.c (cxx_incomplete_type_diagnostic,
2609 split_nonconstant_init_1, store_init_value,
2610 process_init_constructor): Likewise.
2612 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
2614 * call.c (check_dtor_name): Replace abort with gcc_assert or
2616 (build_call, add_builtin_candidate, build_new_op,
2617 convert_like_real, build_over_call, in_charge_arg_for_name,
2618 source_type, joust): Likewise.
2619 * class.c (build_simple_base_path, get_vcall_index,
2620 finish_struct_1, instantiate_type, get_enclosing_class,
2621 add_vcall_offset_vtbl_entries_1, cp_fold_obj_type_ref): Likewise.
2622 * cp-gimplify.c (cp_genericize): Likewise.
2623 * cp-lang.c (cp_expr_size, cp_tree_size): Likewise.
2624 * cvt.c (cp_convert_to_pointer, ocp_convert): Likewise.
2625 * decl.c (poplevel, make_unbound_class_template, reshape_init,
2626 check_special_function_return_type, grokdeclarator,
2627 grok_op_properties, tag_name, xref_tag, start_preparsed_function,
2628 finish_function): Likewise.
2629 * decl2.c (grokfield, maybe_emit_vtables):Likewise.
2630 * error.c (dump_global_iord, dump_decl, dump_template_decl,
2631 language_to_string): Likewise.
2632 * except.c (choose_personality_routine): Likewise.
2633 * friend.c (do_friend): Likewise.
2634 * g++spec.c (lang_specific_driver): Likewise.
2635 * init.c (build_zero_init, expand_default_init, build_new_1,
2636 build_vec_delete_1, build_vec_init, build_dtor_call): Likewise.
2637 * lex.c (retrofit_lang_decl, cp_type_qual_from_rid): Likewise.
2638 * mangle.c (add_substitution, write_unscoped_name,
2639 write_template_prefix, write_identifier,
2640 write_special_name_destructor, write_type, write_builtin_type,
2641 write_expression, write_template_param,
2642 write_java_integer_type_codes): Likewise.
2643 * method.c (implicitly_declare_fn): Likewise.
2645 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
2647 * cp-tree.h (BINFO_PRIMARY_P): Use a binfo flag.
2648 (BINFO_INDIRECT_PRIMARY_P): Remove.
2649 * class.c (determine_primary_base): Rename to ...
2650 (determine_primary_bases): ... here. Set all primary bases.
2651 (set_primary_base): Remove.
2652 (mark_primary_bases): Remove.
2653 (build_simple_base_path, walk_subobject_offsets,
2654 propagate_binfo_offsets, end_of_class): Adjust.
2655 (layout_class_type): Rename determine_primary_base call.
2656 (dump_class_hierarchy_r, dump_vtable): Adjust. Don't pass a binfo
2658 (dfs_build_secondary_vptr_vtt_inits, dfs_accumulate_vtbl_inits,
2659 build_rtti_vtbl_entries): Adjust.
2660 * init.c (build_vtbl_address): Adjust.
2662 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Use gcc_assert.
2664 2004-08-28 Ziemowit Laski <zlaski@apple.com>
2666 * Make-lang.in (CXX_OBJS): Split up into CXX_OBJS and
2667 CXX_AND_OBJCXX_OBJS.
2668 (CXX_C_OBJS): Include in CXX_AND_OBJCXX_OBJS instead of listing
2669 separately on the link line.
2671 2004-08-28 Jason Merrill <jason@redhat.com>
2673 * decl.c (expand_static_init): Avoid bogus warnings.
2675 2004-08-27 Jason Merrill <jason@redhat.com>
2678 * tree.c (stabilize_init): See through a COMPOUND_EXPR.
2681 * decl.c (expand_static_init): Use thread-safety API.
2682 (register_dtor_fn): Return the call, don't expand it.
2683 * tree.c (add_stmt_to_compound): New fn.
2684 (stabilize_call): Use it.
2686 2004-08-27 Richard Henderson <rth@redhat.com>
2688 * cp-tree.def (OFFSETOF_EXPR): New.
2689 * parser.c (cp_parser_builtin_offsetof): Either built an
2690 OFFSETOF_EXPR, or call fold_offsetof immediately.
2691 * pt.c (tsubst_expr): Handle OFFSETOF_EXPR.
2693 2004-08-27 Nathan Sidwell <nathan@codesourcery.com>
2695 * call.c (validate_conversion_obstack): Replace
2696 my_friendly_assert with gcc_assert or gcc_unreachable.
2697 (direct_reference_binding, merge_conversion_sequences,
2698 build_user_type_conversion_1, perform_overload_resolution,
2699 build_op_delete_call, enforce_access, call_builtin_trap,
2700 build_over_call, build_special_member_call, build_new_method_call,
2701 initialize_reference): Likewise.
2702 * class.c (build_base_path, build_primary_vtable, alter_access,
2703 check_bases, update_vtable_entry_for_fn, layout_empty_base,
2704 clone_function_decl, adjust_clone_args,
2705 type_requires_array_cookie, include_empty_classes,
2706 finish_struct_1, resolve_address_of_overloaded_function,
2707 instantiate_type, get_vtbl_decl_for_binfo, build_vtt_inits,
2708 dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
2709 accumulate_vtbl_inits, build_vtbl_initializer,
2710 build_vbase_offset_vtbl_entries, build_rtti_vtbl_entries): Likewise.
2711 * cvt.c (build_up_reference, convert_to_reference): Likewise.
2712 * decl.c (poplevel, duplicate_decls, make_typename_type,
2713 cxx_init_decl_processing, reshape_init, check_initializer,
2714 make_rtl_for_nonlocal_decl, initialize_local_var, cp_finish_decl,
2715 expand_static_init, grokfndecl, grokvardecl, build_ptrmem_type,
2716 grokdeclarator, copy_fn_p, grok_op_properties, xref_tag,
2717 xref_basetypes, start_preparsed_function, save_function_data,
2718 finish_function, finish_method, maybe_register_incomplete_var,
2719 complete_vars): Likewise.
2720 * decl2.c (grok_array_decl, check_member_template,
2721 check_classfn, finish_static_data_member_decl, coerce_new_type,
2722 coerce_delete_type, import_export_class, decl_needed_p,
2723 determine_visibility, import_export_decl, build_cleanup,
2724 start_static_initialization_or_destructi, do_static_destruction,
2725 prune_vars_needing_no_initialization,
2726 build_offset_ref_call_from_tree): Likewise.
2727 * error.c (dump_decl, dump_expr): Likewise.
2728 * init.c (finish_init_stmts, build_zero_init,
2729 expand_virtual_init, expand_default_init, expand_aggr_init_1,
2730 build_offset_ref, build_new_1, build_delete, build_vbase_delete):
2732 * mangle.c (write_method_parms, write_template_args,
2733 write_expression, write_template_arg): Likewise.
2734 * method.c (make_thunk, finish_thunk, use_thunk): Likewise.
2735 * name-lookup.c (pop_binding, begin_scope, leave_scope,
2736 resume_scope, push_using_decl, validate_nonmember_using_decl,
2737 is_ancestor, poplevel_class, set_inherited_value_binding_p,
2738 push_class_level_binding, do_class_using_decl, push_namespace,
2739 pop_namespace, add_using_namespace, ambiguous_decl,
2740 lookup_namespace_name, lookup_type_current_level,
2741 maybe_process_template_type_declaration): Likewise.
2742 * parser.c (cp_lexer_peek_nth_token,
2743 cp_parser_parse_and_diagnose_invalid_typ,
2744 cp_parser_translation_unit, cp_parser_template_id,
2745 cp_parser_lookup_name, cp_parser_late_parsing_for_member): Likewise.
2746 * pt.c (push_access_scope, finish_member_template_decl,
2747 push_inline_template_parms_recursive, add_outermost_template_args,
2748 get_innermost_template_args, begin_explicit_instantiation,
2749 end_explicit_instantiation, retrieve_specialization,
2750 is_specialization_of, is_specialization_of_friend,
2751 register_specialization, check_explicit_specialization,
2752 comp_template_parms, process_template_parm,
2753 process_partial_specialization, convert_nontype_argument,
2754 coerce_template_template_parms, coerce_template_parms,
2755 mangle_class_name_for_template, lookup_template_function,
2756 lookup_template_class, instantiate_class_template, tsubst_decl,
2757 tsubst_function_type, tsubst, tsubst_qualified_id, tsubst_copy,
2758 instantiate_template, fn_type_unification, type_unification_real,
2759 get_template_base, regenerate_decl_from_template,
2760 template_for_substitution, instantiate_decl,
2761 get_mostly_instantiated_function_type, dependent_scope_ref_p,
2762 value_dependent_expression_p, resolve_typename_type): Likewise.
2763 * repo.c (repo_emit_p): Likewise.
2764 * rtti.c (build_headof, get_tinfo_decl, get_pseudo_ti_init,
2765 create_tinfo_types, emit_tinfo_decl): Likewise.
2766 * search.c (lookup_base_r, lookup_base, lookup_field_1,
2767 dfs_access_in_type, build_baselink, lookup_member,
2768 adjust_result_of_qualified_name_lookup, copied_binfo): Likewise.
2769 * semantics.c (perform_or_defer_access_check,
2770 finish_non_static_data_member, finish_stmt_expr_expr,
2771 finish_stmt_expr, finish_call_expr, finish_pseudo_destructor_expr,
2772 finish_template_template_parm, finish_member_declaration,
2773 emit_associated_thunks): Likewise.
2774 * tree.c (build_target_expr_with_type, force_target_expr,
2775 copy_binfo, get_first_fn, cp_tree_equal): Likewise.
2776 * typeck.c (type_after_usual_arithmetic_conversions, comptypes,
2777 cxx_sizeof_or_alignof_type, perform_integral_promotions,
2778 build_class_member_access_expr, finish_class_member_access_expr,
2779 build_ptrmemfunc_access_expr, build_unary_op,
2780 unary_complex_lvalue, cxx_mark_addressable, build_modify_expr,
2781 build_ptrmemfunc, expand_ptrmemfunc_cst, check_return_expr
2782 * typeck2.c (complete_type_check_abstract,
2783 abstract_virtuals_error, process_init_constructor,
2784 add_exception_specifier): Likewise.
2786 2004-08-27 Nathan Sidwell <nathan@codesourcery.com>
2788 * class.c (build_vtbl_initializer): Use ssize_int.
2789 * decl.c (complete_array_type): Likewise.
2790 * method.c (finish_thunk): Likewise.
2791 * search.c (get_dynamic_base_type): Likewise.
2793 2004-08-26 Richard Henderson <rth@redhat.com>
2795 * cp-tree.h (DECL_FIELD_IS_BASE): New.
2796 * class.c (build_base_field): Set it.
2797 (build_simple_base_path): Use it.
2798 (fixed_type_or_null): Don't consider base fields definitive.
2800 2004-08-25 Roger Sayle <roger@eyesopen.com>
2803 PR tree-optimization/16372
2804 * decl.c (finish_enum): Make the precision of the enumerated type
2805 the same width as the underlying integer type.
2807 2004-08-25 Mark Mitchell <mark@codesourcery.com>
2810 * lex.c (build_lang_decl): Set DECL_NO_STATIC_CHAIN for all C++
2813 * mangle.c (get_identifier_nocopy): Add cast.
2815 * cp-tree.h (mangle_type): Remove.
2816 * mangle.c (globals): GTY it.
2817 (mangle_obstack): New variable.
2818 (name_obstack): Likewise.
2819 (name_base): Likewise.
2820 (write_char): Adjust accordingly.
2821 (write_chars): Likewise.
2822 (write_string): Likewise.
2823 (start_mangling): Initialize G.substitutions only one. Add
2825 (finish_mangling): Use VARRAY_CLEAR to reclaim
2826 storage in G.substitutions. Use obstack_finish.
2827 (init_mangle): Adjust for changes to variable names above.
2828 Initialize G.substitutions.
2829 (mangle_decl_string): Adjust call to start_mangling.
2830 (get_identifier_nocopy): New function.
2831 (mangle_decl): Use it.
2832 (mangle_type_string): Adjust call to start_mangling.
2833 (mangle_special_for_type): Likewise.
2834 (mangle_vtt_for_type): Likewise.
2835 (mangle_ctor_vtbl_for_type): Likewise.
2836 (mangle_thunk): Likewise.
2837 (mangle_guard_variable): Likewise.
2838 (mangle_ref_init_variable): Likewise.
2840 2004-08-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2843 * pt.c (redeclare_class_template): Check the type of non-type and
2844 template template parameter.
2846 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
2848 * call.c (convert_class_to_reference): Adjust build_int_cst calls.
2849 (build_user_type_conversion_1, convert_like_real,
2850 build_java_interface_fn_ref, build_special_member_call): Likewise.
2851 * class.c (finish_struct_1, build_vtbl_initializer): Likewise.
2852 * cp-gimplify.c (cp_gimplify_expr): Likewise.
2853 * cvt.c (cp_convert_to_pointer): Likewise.
2854 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
2855 * decl2.c (start_static_initialization_or_destruction,
2856 generate_ctor_or_dtor_function): Likewise.
2857 * except.c (build_throw): Likewise.
2858 * mangle.c (write_integer_cst): Likewise.
2859 * method.c (finish_thunk): Likewise.
2860 * rtti.c (build_headof, get_tinfo_decl_dynamic,
2861 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
2862 get_pseudo_ti_init): Likewise.
2863 * search.c (get_dynamic_cast_base_type): Likewise.
2865 2004-08-25 Zack Weinberg <zack@codesourcery.com>
2867 * class.c, search.c: Remove references to DWARF_DEBUG.
2869 2004-08-25 Adam Nemet <anemet@lnxw.com>
2871 * repo.c (extract_string): Reset backquote after one character.
2872 (get_base_filename): Fix indentation.
2874 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
2876 * decl.c (cxx_init_decl_processing): Adjust
2877 build_common_tree_nodes call.
2879 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
2882 * (is_subobject_of_p): Resurrect & optimize.
2883 (lookup_field_r): Use it.
2885 2004-08-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2888 * search.c (friend_accessible_p): Increment processing_template_decl
2889 when deal with TEMPLATE_DECL of SCOPE.
2891 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
2894 * semantics.c (check_accessibility_of_qualified_id): Defer check
2895 if qualifying_type is a template parameter.
2897 2004-08-23 Mark Mitchell <mark@codesourcery.com>
2900 * pt.c (instantiate_decl): Do not try to apply
2901 DECL_DECLARED_INLINED_P to a VAR_DECL.
2903 * search.c (build_baselink): Fix typo in comment.
2905 2004-08-22 Andrew Pinski <apinski@apple.com>
2908 2004-08-22 Andrew Pinski <apinski@apple.com>
2910 * typeck.c (build_unary_op): Use &a.b if the folded lowered
2911 expression is not constant.
2913 2004-08-23 Nathan Sidwell <nathan@codesourcery.com>
2915 * name-lookup.c (pushdecl): Rename build_type_copy call.
2916 * tree.c (cp_build_qualified_type_real,
2917 build_exception_variant, handle_java_interface_attribute): Likewise.
2919 2004-08-22 Andrew Pinski <apinski@apple.com>
2922 * typeck.c (build_unary_op): Use &a.b if the folded lowered
2923 expression is not constant.
2925 2004-08-20 Mark Mitchell <mark@codesourcery.com>
2928 * decl.c (expand_static_init): Use DECL_FUNCTION_SCOPE_P.
2930 2004-08-21 Joseph S. Myers <jsm@polyomino.org.uk>
2933 * pt.c (tsubst_copy_and_build): Avoid clearing TREE_NO_WARNING for
2936 2004-08-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2938 * pt.c (register_specialization): Check DECL_TEMPLATE_SPECIALIZATION
2939 before calling comp_template_args.
2941 2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
2943 * class.c (build_vtbl_initializer): Use build_int_cst for
2944 negative size types.
2945 * decl.c (complete_array_type): Likewise.
2946 * method.c (finish_thunk): Likewise.
2948 2004-08-20 Andreas Tobler <a.tobler@schweiz.ch>
2950 * tree.c: Remove unused mark_local_for_remap_r.
2952 2004-08-19 Eric Christopher <echristo@redhat.com>
2954 * cp-tree.h (cxx_unsave_expr_now): Delete prototype.
2955 * tree.c (cxx_unsave_expr_now): Delete.
2956 (cp_unsave_r): Ditto.
2958 2004-08-19 Mark Mitchell <mark@codesourcery.com>
2961 * pt.c (push_template_decl_real): Disallow template allocation
2962 functions with fewer than two parameters.
2964 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
2966 * cp-tree.h (build_shared_int_cst): Remove.
2967 * tree.c (shared_int_cache): Remove.
2968 (build_shared_int_cst): Remove.
2969 * class.c (finish_struct_1): Use build_int_cst.
2971 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
2973 * decl.c (finish_enum): Do not copy value node early, copy
2975 * lex.c (cxx_init): Force null_node to be unique.
2977 2004-08-19 Joseph S. Myers <jsm@polyomino.org.uk>
2980 * pt.c (tsubst_copy, tsubst_copy_and_build): Copy TREE_NO_WARNING
2981 from input for MODOP_EXPR.
2983 2004-08-18 Mark Mitchell <mark@codesourcery.com>
2985 * pt.c (dependent_template_p): Fix typo in commment.
2988 * pt.c (dependent_template_p): Treat IDENTIFIER_NODEs as
2991 2004-08-17 Mark Mitchell <mark@codesourcery.com>
2994 * pt.c (unify): Tidy ARRAY_TYPE handling. Make sure that non-type
2995 arguments have the same type as the corresponding parameter.
2998 * parser.c (cp_parser_name_lookup_error): If parser->object_scope
2999 is set use it for diagnostic purposes.
3000 (cp_parser_pseudo_destructor_name): Remove special-case error
3004 * semantics.c (expand_or_defer_fn): Honor -fkeep-inline-functions.
3007 * cp-tree.h (qualified_name_lookup_error): Add parameter.
3008 * name-lookup.c (do_class_using_decl): Restrict set of entities
3009 passed to cp_emit_debug_info_for_using more carefully.
3010 (lookup_qualified_name): Allow lookup_member to return sets of
3012 * parser.c (cp_parser_lookup_name): Add ambiguous_p parameter.
3013 (cp_parser_primary_expression): Handle ambiguous lookups.
3014 (cp_parser_template_name): Adjust use of cp_parser_lookup_name.
3015 (cp_parser_template_argument): Likewise.
3016 (cp_parser_elaborate_type_specifier): Likewise.
3017 (cp_parser_namespace_name): Likewise.
3018 (cp_parser_class_name): Likewise.
3019 (cp_parser_lookup_name_simple): Likewise.
3020 * pt.c (tsubst_qualified_id): Handle ambiguous results.
3021 (tsubst_expr): Likewise.
3022 * semantics.c (qualified_name_lookup_error): Add decl paramter.
3023 For ambiguous lookups, print candidates.
3025 2004-08-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3028 * pt.c (instantiate_pending_templates): Add int parameter. Don't
3030 * cp-tree.h (instantiate_pending_templates): Adjust prototype.
3031 * decl2.c (finish_file): Adjust call to
3032 instantiate_pending_templates.
3034 2004-08-15 Roger Sayle <roger@eyesopen.com>
3036 * call.c (build_vfield_ref, build_call, build_conditional_expr,
3037 convert_arg_to_ellipsis, build_x_va_arg, build_over_call,
3038 build_java_interface_fn_ref, build_special_member_call,
3039 build_new_method_call, initialize_reference): Replace calls to
3040 build with calls to buildN.
3041 * class.c (build_base_path, convert_to_base_statically,
3042 build_vfn_ref, instantiate_type, dfs_accumulate_vtbl_inits,
3043 build_vtbl_initializer): Likewise.
3044 * cp-gimplify.c (genericize_try_block, genericize_catch_block,
3045 gimplify_if_stmt, cp_genericize_r): Likewise.
3046 * cvt.c (convert_to_void): Likewise.
3047 * decl.c (check_initializer, finish_constructor_body,
3048 finish_destructor_body): Likewise.
3049 * error.c (dump_expr): Likewise.
3050 * except.c (build_exc_ptr, expand_start_catch_block, build_throw):
3052 * init.c (perform_member_init, expand_virtual_init,
3053 expand_cleanup_for_base, build_init, expand_default_init,
3054 build_offset_ref, decl_constant_value, build_new, build_new_1,
3055 build_vec_delete_1, build_vec_init, build_delete,
3056 push_base_cleanups, build_vec_delete): Likewise.
3057 * mangle.c (write_integer_cst): Likewise.
3058 * method.c (thunk_adjust, do_build_copy_constructor,
3059 do_build_assign_ref): Likewise.
3060 * pt.c (lookup_template_function, tsubst, tsubst_copy_and_build,
3061 unify, build_non_dependent_expr): Likewise.
3062 * rtti.c (build_headof, build_typeid, ifnonnull,
3063 build_dyanmic_cast_1, tinfo_base_init): Likewise.
3064 * semantics.c (begin_compound_stmt, finish_call_expr,
3065 finish_pseudo_destructor_expr, finish_id_expression,
3066 simplify_aggr_init_expr, finalize_nrv_r): Likewise.
3067 * tree.c (build_target_expr, build_cplus_new, array_type_nelts_top,
3068 array_type_nelts_total, stabilize_call): Likewise.
3069 * typeck.c (decay_conversion, build_class_member_access_expr,
3070 lookup_destructor, build_ptrmemfunc_access_expr, build_array_ref,
3071 get_member_function_from_ptrfunc, build_binary_op, pointer_diff,
3072 build_x_unary_op, build_unary_op, unary_complex_lvalue,
3073 build_compound_expr, build_modify_expr, expand_ptrmemfunc_cst,
3074 check_return_expr): Likewise.
3075 * typeck2.c (split_nonconstant_1, split_nonconstant_init_1,
3076 split_nonconstant_init, store_init_value, build_m_component_ref):
3079 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
3081 * call.c (convert_class_to_reference,
3082 build_user_type_conversion_1, convert_like_real,
3083 build_java_interface_fn_ref, build_special_member_call): Use
3085 * class.c (build_vtbl_initializer): Likewise.
3086 * cp-gimplify.c (cp_gimplify_expr): Likewise.
3087 * cvt.c (cp_convert_to_pointer): Likewise.
3088 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
3089 * decl2.c (start_static_initialization_or_destruction,
3090 generate_ctor_or_dtor_function): Likewise.
3091 * except.c (build_throw): Likewise.
3092 * lex.c (cxx_init): Likewise.
3093 * mangle.c (write_integer_cst): Likewise.
3094 * rtti.c (build_headof, get_tinfo_decl_dynamic,
3095 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
3096 get_pseudo_ti_init): Likewise.
3097 * search.c (get_dynamic_cast_base_type): Likewise.
3098 * tree.c (build_shared_int_cst): Likewise.
3100 2004-08-12 Mark Mitchell <mark@codesourcery.com>
3103 * class.c (count_depth_data): New type.
3104 (dfs_depth_post): New function.
3105 (dfs_depth_q): Likewise.
3106 (find_final_overrider_data_s): Change type of vpath.
3108 (dfs_find_final_overrider_1): New function.
3109 (dfs_find_final_overrider): Use it.
3110 (dfs_find_final_overrider_q): Adjust use of vpath.
3111 (dfs_find_final_overrider_post): Likewise.
3112 (find_final_overrider): Use dfs_depth. Allocate and deallocate
3115 2004-08-12 Jan Beulich <jbeulich@novell.com>
3117 * parser.c (cp_parser_asm_definition): Properly consume scope operator
3118 tokens preceding the clobbers. Don't check for scope operator
3119 following inputs. Simplify inputs handling to match that now used for
3122 2004-08-11 Mark Mitchell <mark@codesourcery.com>
3125 * except.c (build_throw): Allocate cleanup_type and the function
3126 for __cxa_throw separately.
3129 * call.c (standard_conversion): Do not accept conversions between
3130 pointers to members if the class types are unrelated.
3133 * parser.c (cp_parser_builtin_offsetof): Cast to "const volatile
3134 char &" instead of just "char &".
3137 * pt.c (tsubst): Just return the unknown_type_node.
3139 2004-08-11 Mark Mitchell <mark@codesourcery.com>
3142 * parser.c (cp_parser_class_specifier): Robustify.
3145 * pt.c (tsubst_copy_and_build): Complain about invalid
3149 * pt.c (tsubst_default_argument): Clear out current_class_ptr and
3150 current_class_ref while tsubsting.
3152 2004-08-10 Mark Mitchell <mark@codesourcery.com>
3155 * parser.c (cp_parser_init_declarator): Robustify.
3157 2004-08-06 Richard Sandiford <rsandifo@redhat.com>
3159 * typeck2.c (process_init_constructor): Guard the missing field warning
3160 with warn_missing_field_initializers rather than extra_warnings.
3162 2004-08-06 Paolo Bonzini <bonzini@gnu.org>
3164 * class.c (instantiate_type) <ENTRY_VALUE_EXPR>: Do not handle.
3166 2004-08-05 Mark Mitchell <mark@codesourcery.com>
3168 * decl.c (start_preparsed_function): Move determine_visibility
3170 * decl2.c (determine_visibility): Incorporate dllexport testing.
3172 2004-08-05 Geoffrey Keating <geoffk@apple.com>
3174 * g++spec.c (lang_specific_driver): An -Xlinker or -Wl, option
3175 means that libstdc++ is needed.
3177 2004-08-05 Nathan Sidwell <nathan@codesourcery.com>
3179 * cvt.c (cp_convert_to_pointer): Adjust force_fit_type call.
3181 2004-08-04 Geoffrey Keating <geoffk@apple.com>
3183 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_ASSEMBLER_NAME rather
3184 than passing it as a parameter to rest_of_decl_compilation.
3185 * decl2.c (grokfield): Use set_user_assembler_name.
3187 2004-08-04 Nathan Sidwell <nathan@codesourcery.com>
3189 * decl.c (complete_array_type): Don't gratuitously copy
3190 maxindex. Its type is always set.
3192 2004-08-04 Paul Brook <paul@codesourcery.com>
3194 * Make-lang.in (cp/semantics.o, cp/optimize.o): Depend on TARGET_H.
3195 * cp-tree.h (struct language_function): Rename x_dtor_label to
3197 (dtor_label): Rename ...
3198 (cdtor_label): ... to this.
3199 * decl.c (begin_constructor_body): Remove.
3200 (check_special_function_return_type): Maybe change the return type.
3201 (grokdeclarator): Pass the class type.
3202 (start_preparsed_function): Constructors may need a return label.
3203 (finish_constructor_body, finish_destructor_body): Set the return
3205 (begin_function_body): Don't call begin_constructor_body.
3206 (finish_function): Don't warn for constructors or destructors.
3207 (implicitly_declare_fn): Maybe change the return type.
3208 * optimize.c: Include target.h.
3209 (maybe_clone_body): Remap the function result.
3210 * semantics.c: Include target.h.
3211 (finish_return_stmt): Maybe jump to return label for constructors.
3213 2004-08-03 Mark Mitchell <mark@codesourcery.com>
3215 * class.c (build_vtable): Do not set DECL_VISIBILITY here.
3216 (check_field_decls): Or here.
3217 (check_methods): Or here.
3218 (initialize_array): Don't mess with DECL_CONTEXT.
3219 * cp-tree.h (start_decl): Adjust prototype.
3220 (determine_visibility): New function.
3221 * decl.c (duplicate_decls): Remove checks for hidden "operator
3223 (build_library_fn_1): Give all library functions default
3225 (start_decl): Add pop_scope_p parameter. Tidy.
3226 (cp_finish_decl): Do not pop scopes here. Call
3227 determine_visibility for variable definitions.
3228 (start_preparsed_function): Call determine_visibility.
3229 * decl2.c (determine_visibility): New function.
3230 * method.c (use_thunk): Fix formatting.
3231 * parser.c (cp_parser_condition): Adjust calls to start_decl.
3232 (cp_parser_init_declarator): Likewise.
3233 * pt.c (instantiate_decl): Always call pop_nested_class.
3234 * rtti.c (get_tinfo_decl): Do not set DECL_VISIBILITY.
3235 (tinfo_base_init): Likewise.
3237 2004-08-02 Mark Mitchell <mark@codesourcery.com>
3240 * name-lookup.c (validate_nonmember_using_decl): Robustify.
3242 2004-08-01 Mark Mitchell <mark@codesourcery.com>
3245 * name-lookup.c (decl_namespace): Remove.
3246 (current_decl_namespace): Use decl_namespace_context instead of
3248 (push_decl_namespace): Likewise.
3249 (arg_assoc_class): Likewise.
3250 (arg_assoc_type): Likewise.
3251 * pt.c (check_specialization_namespace): New function.
3252 (maybe_process_partial_specialization): Use it.
3253 (register_specialization): Likewise.
3256 * cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): New macro.
3257 * call.c (null_ptr_cst_p): Handle variables with constant
3259 * pt.c (convert_nontype_argument): Use
3260 DECL_INTEGRAL_CONSTANT_VAR_P.
3261 * semantics.c (finish_id_expression): Likewise.
3264 * decl.c (duplicate_decls): Reject duplicate namespace
3268 * typeck.c (build_ptrmemfunc): Loosen assertion.
3270 2004-08-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
3272 * call.c (z_candidate::template_decl): Rename from template.
3273 (add_template_candidate_real): Adjust member reference.
3276 2004-07-29 Mark Mitchell <mark@codesourcery.com>
3278 * cp-tree.h (IDENTIFIER_REPO_CHOSEN): Define.
3279 (lang_decl_flags): Narrow the width of "languages". Add
3281 (DECL_NEEDED_P): Remove.
3282 (FOR_EACH_CLONE): New macro.
3283 (DECL_REPO_AVAILABLE_P): Likewise.
3284 (DECL_TINFO_P): Likewise.
3285 (set_linkage_according_to_type): Declare.
3286 (import_export_vtable): Remove.
3287 (import_export_tinfo): Likewise.
3288 (mark_needed): New function.
3289 (decl_needed_p): Likewise.
3290 (note_vauge_linkage_fn): Likewise.
3291 (init_repo): Change prototype.
3292 (repo_template_used): Remove.
3293 (repo_template_instantiated): Likewise.
3294 (repo_emit_p): New function.
3295 (repo_export_class_p): Likewise.
3296 (no_linkage_check): Change prototype.
3297 * class.c (set_linkage_according_to_type): New function.
3298 (build_vtable): Use it. Do not call import_export_vtable. Set
3299 DECL_IGNORED_P if appropriate.
3300 * decl.c (duplicate_decls): Preserve DECL_REPO_AVAILABLE_P.
3301 (make_rtL_for_nonlocal_decls): Check for template instantiations
3303 (grokfndecl): Adjust call to no_linkage_check.
3304 (set_linkage_for_static_data_member): New function.
3305 (grokvardecl): Use it. Adjust call to no_linkage_check.
3306 (grokdeclarator): Use set_linkage_for_static_data_member.
3307 * decl2.c (note_vague_linkage_fn): New function.
3308 (note_vague_linkage_var): Likewise.
3309 (finish_static_data_member_decl): Use it.
3310 (import_export_vtable): Remove.
3311 (import_export_class): Use repo_export_class_p.
3312 (var_finalized_p): Simplify.
3313 (maybe_emit_vtables): Simplify.
3314 (mark_needed): New function.
3315 (decl_needed_p): Likewise.
3316 (import_export_decl): Add documentation and consistency checks.
3317 Use repo_emit_p. Handle virtual tables and RTTI information
3319 (import_export_tinfo): Remove.
3320 (write_out_vars): Call import_export_decl.
3321 (cxx_callgraph_analyze_expr): Ensure that all vtables are emitted
3323 (finish_file): Use decl_needed_p. Do not call import_export_decl
3324 for undefined static data members. Do not warn about undefined
3325 inlines when using a repository.
3326 (mark_used): Use note_vague_linkage_fn. Always defer template
3328 * lex.c (cxx_init): Adjust call to init_repo. Always set
3329 flag_unit_at_a-time.
3330 * method.c (synthesize_method): Remove unncessary
3331 import_export_decl call.
3332 (implicitly_declare_fn): Use set_linkage_according_to_type.
3333 * optimize.c (maybe_clone_body): Use FOR_EACH_CLONE.
3334 * pt.c (instantiate_class_template): Don't redundantly add classes
3335 to keyed_classes. Don't call repo_template_used.
3336 (tsubst_decl): Set DECL_INTERFACE_KNOWN for instantiations of
3337 templates with internal linkage.
3338 (check_instantiated_args): Adjust call to no_linkage_check.
3339 (instantiate_template): Use FOR_EACH_CLONE.
3340 (mark_definable): New function.
3341 (mark_decl_instantiated): Use it.
3342 (do_decl_instantiation): Adjust tests for explicit instantiation
3343 after "extern template".
3344 (instantiate_class_member): Do not use repo_template_instantiated.
3345 (do_type_instantiation): Simplify.
3346 (instantiate_decl): Use mark_definable. Check repo_emit_p.
3348 * repo.c (repo_get_id): Remove.
3349 (original_repo): Remove.
3350 (IDENTIFIER_REPO_USED): Remove.
3351 (IDENTIFIER_REPO_CHOSEN): Remove.
3352 Remove all #if 0'd code.
3353 (repo_template_used): Remove.
3354 (repo_template_instantiated): Remove.
3355 (temporary_obstack_initialized_p): New variable.
3356 (init_repo): Register with lang_post_pch_load. Avoid creating
3357 identifiers unnecessarily. Don't use original_repo. Close the
3359 (reopen_repo_file_for_write): Not here.
3360 (finish_repo): Always write out a new repository file.
3361 (repo_emit_p): New function.
3362 (repo_export_class_p): Likewise.
3363 * rtti.c (get_tinfo_decl): Use set_linkage_according_to_type.
3364 (involves_incomplete_p): New function.
3365 (tinfo_base_init): Use it.
3366 (ptr_initializer): Remove non_public_ptr parameter.
3367 (ptm_initializer): Likewise.
3368 (get_pseudo_ti_init): Likewise.
3369 (unemitted_tinfo_decl_p): Remove.
3370 (emit_tinfo_decl): Use import_export_decl.
3371 * semantics.c (expand_body): Move updates of static_ctors and
3373 (expand_or_defer_fn): ... here.
3374 * tree.c (no_linkage_check): Add relaxed_p parameter.
3376 2004-07-28 Eric Christopher <echristo@redhat.com>
3378 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
3380 2004-07-28 Nathan Sidwell <nathan@codesourcery.com>
3382 * cp-tree.h (struct tree_pair_s): New.
3383 (typedef tree_pair_p): New.
3384 (DEF_VEC_O(tree_pair_s)): New.
3385 (struct lang_type_class): Make vcall_indices a VEC(tree_pair_s).
3386 (CLASSTYPE_VCALL_INDICES): Update documentation.
3387 * class.c (get_vcall_index): Adjust.
3388 (add_vcall_offset): Adjust.
3390 2004-07-27 Kelley Cook <kcook@gcc.gnu.org>
3392 * pt.c, typeck.c: Remove spurious carriage returns.
3394 2004-07-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3397 * pt.c (coerce_template_template_parms) <PARM_DECL case>: Only check
3398 when the type of ARG is not dependent.
3400 2004-07-26 Geoffrey Keating <geoffk@apple.com>
3402 * g++spec.c (LIBSTDCXX_PROFILE): Default to LIBSTDCXX.
3403 (lang_specific_driver): If the C++ or math library options don't
3404 start with '-l', don't count them as added libraries.
3406 2004-07-26 Nathan Sidwell <nathan@codesourcery.com>
3408 * decl.c (xref_basetypes): Adjust base access vector creation.
3409 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Adjust base
3411 * search.c (dynamic_cast_base_recurse, dfs_access_in_type): Likewise.
3413 2004-07-26 Niall Douglas <s_fsfeurope2@nedprod.com>
3414 Brian Ryner <bryner@brianryner.com>
3418 * class.c (check_field_decls): Apply hidden visibility if
3419 -fvisibility-inlines-hidden and inlined unless otherwise specified
3420 (build_vtable): Set vtable visibility to class visibility.
3421 (check_field_decls): Default static member visibility to class
3423 (check_methods): Default method visibility to class visibility.
3424 * cp-tree.h: Added CLASSTYPE_VISIBILITY and
3425 CLASSTYPE_VISIBILITY_SPECIFIED macro.
3426 * decl.c (duplicate_decls): New logic for merging definition decls
3427 with declaration decls. Added ignore & warning when non default
3428 applied to global operator new or delete.
3429 * method.c, optimize.c, rtti.c: Added setting of VISIBILITY_SPECIFIED
3430 wherever VISIBILITY was changed
3431 * rtti.c (get_tinfo_decl): Set typeinfo visibility to class
3433 (tinfo_base_init): Set typeinfo name visibility to class visibility.
3435 2004-07-25 Bernardo Innocenti <bernie@develer.com>
3437 * decl.c: Rename all identifiers named `class' to `cl'.
3438 * cp-tree.h: Likewise.
3440 2004-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
3442 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Use GGC_CNEW.
3443 * typeck2.c (abstract_virtuals_error): Use GGC_NEW.
3444 * name-lookup.c (binding_entry_make): Use GGC_NEW.
3445 (binding_table_construct): Use GGC_CNEWVEC.
3446 (binding_table_new): Use GGC_NEW.
3447 (cxx_binding_make): Likewise.
3448 (begin_scope): Likewise.
3449 (push_to_top_level): Use GCC_CNEW.
3450 * parser.c (cp_token_cache_new): Likewise.
3451 (cp_token_cache_push_token): Likewise.
3452 (cp_lexer_new_main): Likewise.
3453 (cp_lexer_new_from_tokens): Likewise.
3454 (cp_parser_context_new): Likewise.
3455 (cp_parser_new): Likewise.
3456 (cp_lexer_new_from_tokens): Use GGC_NEWVEC.
3457 * lex.c (cxx_make_type): Use GGC_CNEW.
3458 (retrofit_lang_decl): Use GGC_NEWVAR.
3459 (cxx_dup_lang_specific_decl): Likewise.
3460 (copy_lang_type): Likewise.
3461 * decl.c (use_label): Use GGC_NEW instead of ggc_alloc.
3462 (save_function_data): Likewise.
3463 (lookup_label): Use GGC_CNEW instead of ggc_alloc_cleared.
3464 (cxx_push_function_context): Likewise.
3466 2004-07-25 Richard Henderson <rth@redhat.com>
3468 * decl.c (start_preparsed_function): Set DECL_ARTIFICIAL and
3469 DECL_IGNORED_P on RESULT_DECL.
3470 * semantics.c (finalize_nrv): Copy them too.
3472 2004-07-23 Nathan Sidwell <nathan@codesourcery.com>
3474 * search.c (lookup_conversion_operator): Avoid two loops.
3475 (add_conversions): Remove.
3476 (check_hidden_convs, split_conversions,
3477 lookup_conversions_r): New.
3478 (lookup_conversions): Use lookup_conversions_r.
3480 2004-07-22 Nathan Sidwell <nathan@codesourcery.com>
3482 * pt.c (get_template_base): Check type is completable.
3484 2004-07-21 Eric Christopher <echristo@redhat.com>
3486 * decl.c (poplevel): Inline unused variable checking.
3489 2004-07-21 Paolo Bonzini <bonzini@gnu.org>
3491 * typeck.c (build_binary_op): Do not use RDIV_EXPR for
3494 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3497 * pt.c (check_explicit_specialization): Remove extension to accept
3498 specializations without template headers. Fall-through to normal
3501 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3504 * pt.c (determine_specialization): New parameter template_count.
3505 Disambiguate between member templates and member functions counting
3506 the template headers.
3507 (check_explicit_specialization): Update caller.
3508 (tsubst_friend_function): Likewise.
3510 2004-07-20 Steven Bosscher <stevenb@suse.de>
3512 * cp-tree.def (TINST_LEVEL): Make it an 'x' node.
3513 * cp-tree.h (tinst_level_t): New tree type.
3514 (union lang_tree_node): Handle it.
3515 (TINST_LOCATION): New accessor macro.
3516 (make_tinst_level): New prototype.
3517 * cp-lang.c (cp_tree_size): Handle TINST_LEVEL.
3518 * decl.c (cp_tree_node_structure): Likewise.
3519 * error.c (print_instantiation_full_context): Use TINST_LOCATION.
3520 (print_instantiation_partial_context): Likewise.
3521 * pt.c (pop_tinst_level): Likewise.
3522 (push_tinst_level): Use make_tinst_level.
3523 * tree.c (make_tinst_level): New function.
3524 (cp_walk_subtrees): Walk TINST_DECL for a TINST_LEVEL node.
3526 2004-07-20 Mark Mitchell <mark@codesourcery.com>
3528 * parser.c (cp_parser_simple_type_specifier): Fix typo.
3531 * parser.c (cp_parser_simple_type_specifier): Do not record usage
3532 of globally-qualified names.
3534 2004-07-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3537 * error.c (dump_type) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Output
3540 2004-07-19 Mark Mitchell <mark@codesourcery.com>
3543 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
3544 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
3545 * class.c (add_implicitly_declared_members): Use
3546 CLASSTYPE_LAZY_ASSIGNMENT_OP.
3547 * method.c (lazily_declare_fn): Clear
3548 CLASSTYPE_LAZY_ASSIGNMENT_OP.
3549 * search.c (lookup_fnfields_1): Check it.
3551 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
3553 * cp-tree.h (vec_binfo_member): Remove.
3554 * tree.c (vec_binfo_member): Remove.
3556 * cp-tree.h (struct lang_type_class): Remove vfields field.
3557 (CLASSTYPE_VFIELDS): Remove.
3558 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
3559 * class.c (determine_primary_base): Remove CLASSTYPE_VFIELDS
3561 (dfs_modify_vtables): Use TYPE_CONTAINS_VPTR_P.
3562 (finish_struct_1): Remove CLASSTYPE_VFIELDS handling.
3563 * init.c (dfs_initialize_vtbl_ptrs): Use TYPE_CONTAINS_VPTR_P.
3565 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
3567 * cp-tree.h (DEF_VEC_P(tree)): Remove here.
3568 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
3570 (BINFO_LANG_SLOTS): Remove.
3571 * tree.c (copy_binfo): Adjust BINFO creation and accessors.
3572 * decl.c (xref_basetypes): Adjust BINFO creation and accessors.
3573 * class.c (check_bases): Adjust BINFO accessors.
3574 (determine_primary_base, finish_struct_bits,
3575 maybe_warn_about_overly_private_class, warn_hidden,
3576 walk_subobject_offsets, propagate_binfo_offsets, end_of_class,
3577 warn_about_ambiguous_bases, get_vfield_name,
3578 dump_class_hierarchy_r, build_vtt_inits, accumulate_vtbl_inits,
3579 add_vcall_offset_vtbl_entries_r): Likewise.
3580 * dump.c (cp_dump_tree): Likewise.
3581 * init.c (sort_mem_initializers, expand_member_init, build_delete,
3582 push_base_cleanups): Likewise.
3583 * method.c (do_build_copy_constructor, do_build_assign_ref,
3584 synthesize_exception_spec): Likewise.
3585 name-lookup.c (arg_assoc_class): Likewise.
3586 * pt.c (instantiate_class_template,
3587 get_template_base_recursive): Likewise.
3588 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Likewise.
3589 * typeck2.c (process_init_constructor): Likewise.
3590 * search.c (lookup_base_r, dynamic_cast_base_recurse,
3591 dfs_access_in_type, dfs_walk_real, look_for_overrides,
3592 types_overlap_p, copied_binfo, original_binfo): Likewise.
3593 (binfo_for_vtable): Remove
3595 2004-07-20 Steven Bosscher <stevenb@suse.de>
3597 * cp-tree.h (struct lang_decl_flags): Unify the template_info and
3598 thunk_alias, and the access and virtual_offset fields.
3599 (THUNK_VIRTUAL_OFFSET, THUNK_ALIAS): Adjust.
3600 * decl.c (finish_case_label): Update c_add_case_node call.
3602 2004-07-19 Mark Mitchell <mark@codesourcery.com>
3604 Revert patch for PR c++/16623.
3606 2004-07-19 Kelley Cook <kcook@gcc.gnu.org>
3608 * except.c: Remove two spurious carriage returns.
3610 2004-07-19 Mark Mitchell <mark@codesourcery.com>
3613 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
3614 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
3615 * class.c (add_implicitly_declared_members): Use
3616 CLASSTYPE_LAZY_ASSIGNMENT_OP.
3617 * method.c (lazily_declare_fn): Clear
3618 CLASSTYPE_LAZY_ASSIGNMENT_OP.
3619 * search.c (lookup_fnfields_1): Check it.
3621 2004-07-19 Nathan Sidwell <nathan@codesourcery.com>
3623 * class.c (add_method): Delay adding the slot until the end.
3624 (determine_primary_base): Adjust VEC_iterate invokation.
3625 (resort_type_method_vec, finish_struct_methods, warn_hidden,
3626 walk_subobject_offsets, end_of_class, warn_about_ambiguous_bases,
3627 build_vtbl_initializer): Likewise.
3628 * init.c (sort_mem_initializers, build_delete, push_base_cleanups,
3629 build_vbase_delete): Likewise.
3630 * method.c (do_build_copy_constructor): Likewise.
3631 * name-lookup.c (new_class_binding, print_binding_level,
3632 poplevel_class, store_class_bindings, push_to_top_level,
3633 pop_from_top_level): Likewise.
3634 * pt.c (check_explicit_specialization): Likewise.
3635 * search.c (lookup_conversion_operator, lookup_fnfields_1,
3636 get_pure_virtuals, add_conversions, dfs_check_overlap,
3637 binfo_for_vbase): Likewise.
3639 2004-07-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3642 * pt.c (unify) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Use only
3643 innermost set of template arguments during deduction. Simplify.
3645 2004-07-19 Joseph S. Myers <jsm@polyomino.org.uk>
3647 * typeck.c (build_modify_expr, build_x_modify_expr): Set
3648 TREE_NO_WARNING on assignments with an operator other than '='.
3650 2004-07-10 Steven Bosscher <stevenb@suse.de>
3651 Joseph S. Myers <jsm@polyomino.org.uk>
3653 * cp-tree.h (C_SET_EXP_ORIGINAL_CODE): Remove.
3654 * decl2.c (grokfield): Don't check current_class_depth via
3655 unused TREE_COMPLEXITY.
3656 * semantics.c (finish_parenthesized_expr): Set TREE_NO_WARNING
3657 to avoid the missing parentheses warning.
3658 Don't set C_SET_EXP_ORIGINAL_CODE.
3660 2004-07-18 Mark Mitchell <mark@codesourcery.com>
3662 * tree.c (no_linkage_helper): Remove.
3663 (no_linkage_check): Don't use walk_tree_without_duplicates.
3665 * mangle.c (write_expression): Issue a sorry for zero-operand
3668 2004-07-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3671 * init.c (build_offset_ref): Build SCOPE_REF with non-null
3672 TREE_TYPE for non-dependent names.
3673 * typeck.c (build_x_unary_op): Handle non-dependent SCOPE_REF.
3674 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
3675 unknown_type_node as its TREE_TYPE.
3676 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
3677 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
3678 (dump_expr) <SCOPE_REF case>: Likewise.
3680 2004-07-17 Jason Merrill <jason@redhat.com>
3683 * call.c (type_passed_as): Make the invisible reference type
3685 * cp-gimplify.c (gimplify_cleanup_stmt): Rename to
3686 cp_genericize_r. Handle invisible reference lowering.
3687 (is_invisiref_parm): New fn.
3688 (cp_genericize): Adjust the types of invisible reference parms.
3689 Don't repeat the walk for clones.
3690 * decl.c (store_parm_decls): Don't generate any code for clones.
3692 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
3694 * cp-tree.h (builtin_function): Declare.
3696 2004-07-16 Mark Mitchell <mark@codesourcery.com>
3698 * class.c (finish_struct_methods): Remove unncessary code.
3699 (add_implicitly_declared_members): Create declarations for default
3700 constructors and copy constructors lazily.
3701 * cp-tree.h (lang_type_class): Remove lazy_default_ctor and
3703 (CLASSTYPE_LAZY_DEFAULT_CTOR): New macro.
3704 (CLASSTYPE_LAZY_COPY_CTOR): Likewise.
3705 * decl2.c (check_classfn): Robustify.
3706 (locate_dtor): Handle empty CLASSTYPE_METHOD_VEC.
3707 (locate_ctor): Handle lazy default constructors.
3708 (locate_copy): Handle lazy copy constructors.
3709 (implicitly_declare_fn): Make sure we're looking at the
3710 TYPE_MAIN_VARIANT for a class before creating functions. Don't
3711 set TYPE_HAS_CONSTRUCTOR.
3712 (lazily_declare_fn): New function.
3713 * name-lookup.c (constructor_name_full): Simplify.
3714 * search.c (lookup_fnfields_1): Lazily create methods, as
3716 (lookup_for_overrides): Handle empty CLASSTYPE_METHOD_VEC.
3718 2004-07-16 Steven Bosscher <stevenb@suse.de>
3720 * cp-tree.h (struct lang_type): Don't have three GTY options on a
3721 single bit GTY desc.
3723 2004-07-16 Richard Henderson <rth@redhat.com>
3725 * cp-lang.c (LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING): Die.
3726 * cp-tree.h (cp_copy_res_decl_for_inlining): Remove.
3727 * tree.c (cp_copy_res_decl_for_inlining): Remove.
3729 2004-07-16 Nathan Sidwell <nathan@codesourcery.com>
3731 * class.c (finish_struct_bits): Use for loop.
3732 (propagate_binfo_offsets): Do primary binfo outside of loop.
3735 * dump.c (cp_dump_tree): Don't dump the bases if there's no
3738 * pt.c (tsubst) <TREE_BINFO case>: We should never get here.
3740 2004-07-15 Mark Mitchell <mark@codesourcery.com>
3742 * cp-tree.h (lang_type_class): Remove has_real_assign_ref and
3743 has_abstract_assign_ref. Make methods a VEC(tree) *.
3744 (TYPE_HAS_CONST_ASSIGN_REF): Add documentation.
3745 (CLASSTYPE_CONSTRUCTORS): Adjust for changes to CLASSTYPE_METHOD_VEC.
3746 (CLASSTYPE_DESTRUCTORS): Likewise.
3747 (TYPE_HAS_REAL_ASSIGN_REF): Remove.
3748 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
3749 (add_method): Change prototoype.
3750 * class.c (add_method): Remove error_p parameter. Adjust for
3751 changes to CLASSTYPE_METHOD_VEC.
3752 (handle_using_decl): Adjust call to add_method.
3753 (maybe_warn_about_overly_private_class): Adjust for
3754 changes to CLASSTYPE_METHOD_VEC.
3755 (resort_type_method_vec): Likewise.
3756 (finish_struct_methods): Likewise.
3757 (check_for_override): Likewise.
3758 (warn_hidden): Likewise.
3759 (add_implicitly_declared_members): Defer creation of assignment
3760 operators. Adjust call to add_method.
3761 (clone_function_decl): Adjust call to add_method.
3762 (check_bases_and_members): Don't set TYPE_HAS_REAL_ASSIGN_REF.
3763 (finish_struct_1): Use CLASSTYPE_DESTRUCTORS.
3764 * decl.c (grok_special_member_properties): Don't set
3765 TYPE_HAS_ABSTRACT_ASSIGN_REF.
3766 * decl2.c (check_classfn): Adjust for
3767 changes to CLASSTYPE_METHOD_VEC.
3768 * method.c (locate_dtor): Use CLASSTYPE_DESTRUCTORS.
3769 (locate_ctor): Use CLASSTYPE_CONSTRUCTORS.
3770 (locate_copy): Adjust for changes to CLASSTYPE_METHOD_VEC.
3771 (implicitly_declare_fn): Set DECL_SOURCE_LOCATION. Do not call
3773 * pt.c (check_explicit_specialization): Adjust for
3774 changes to CLASSTYPE_METHOD_VEC.
3775 (instantiate_class_template): Do not set
3776 TYPE_HAS_ABSTRACT_ASSIGN_REF.
3777 * ptree.c (cxx_print_type): Don't try to print
3778 CLASSTYPE_METHOD_VEC.
3779 * rtti.c (emit_support_tinfos): Use CLASSTYPE_DESTRUCTORS.
3780 * search.c (lookup_field_r): Adjust for
3781 changes to CLASSTYPE_METHOD_VEC.
3782 (lookup_fnfields): Likewise.
3783 (lookup_conversion_operator): Likewise.
3784 (lookup_fnfields_1): Likewise. Create assignment operators
3786 (look_for_overrides_here): Adjust for
3787 changes to CLASSTYPE_METHOD_VEC.
3788 (add_conversions): Likewise.
3789 * semantics.c (finish_member_declaration): Adjust call to add_method.
3791 2004-07-15 Jason Merrill <jason@redhat.com>
3793 * cp-lang.c (cxx_types_compatible_p): To the middle-end,
3794 references and pointers are compatible.
3796 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
3798 * decl.c (xref_basetypes): Refactor.
3799 * tree.c (copy_base_binfos): Replace with ...
3800 (copy_binfo): ... this. Deep copy the given binfo, (not the just
3801 bases of the given base).
3802 * cp-tree.h (copy_base_binfo): Remove.
3803 (copy_binfo): Declare.
3805 2004-07-15 Mark Mitchell <mark@codesourcery.com>
3807 * name-lookup.c (set_inherited_value_binding_p): Add class_type
3809 (get_class_binding): Adjust.
3810 (push_class_level_binding): Don't use set_inherited_value_binding_p.
3812 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
3814 * class.c (finish_struct_bits): Don't set TYPE_HAS_CONVERSION here.
3815 * decl.c (xref_basetypes): Set it here.
3817 * class.c (check_bases): Don't set CLASSTYPE_NON_AGGREGATE here.
3818 Don't check for incomplete base.
3819 (get_vfield_name): Simplify while loop.
3820 * decl.c (xref_basetypes): Set CLASSTYPE_NON_AGGREGATE here.
3822 2004-07-14 Mark Mitchell <mark@codesourcery.com>
3824 * lex.c (cxx_make_type): Remove call to get_pointer_type.
3826 * cp-tree.h (IDENTIFIER_VALUE): Remove.
3827 (BINFO_PUSHDECLS_MARKED): Likewise.
3828 (maybe_inject_for_scope_var): Likewise.
3829 (push_class_decls): Likewise.
3830 * name-lookup.h (push_class_binding): Remove.
3831 (innermost_non_namespace_value): New function.
3832 (outer_binding): Likewise.
3833 * class.c (add_method): Push bindings before adding to
3835 (restore_class_cache): Do not restore class_shadowed.
3836 (pushclass): Do not add USING_DECLs. Do not call
3838 * config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c.
3839 * decl.c (pushdecl): Use outer_binding.
3840 (poplevel): Set the scope for an out-of-scope for-loop declaration
3842 (cp_finish_decl): Don't call maybe_inject_for_scope_var.
3843 * name-lookup.c (new_class_binding): New function.
3844 (push_binding): Use it.
3845 (pushdecl): Use innermost_non_namespace_value.
3846 (maybe_inject_for_scope_var): Remove.
3847 (push_class_binding): Remove.
3848 (set_inherited_value_binding_p): New function.
3849 (get_class_binding): New function.
3850 (push_class_level_binding): Assert that the current_class_type is
3852 (outer_binding): New function.
3853 (innermost_non_namespace_value): Likewise.
3854 (lookup_name_real): Use outer_binding.
3855 (lookup_name_current_level): Ignore out-of-scope variables.
3856 * pt.c (check_template_shadow): Use innermost_non_namespace_value.
3857 (lookup_template_class): Likewise.
3858 * search.c (dfs_push_type_decls): Remove.
3859 (dfs_push_decls): Likewise.
3860 (setup_class_bindings): Likewise.
3861 (lookup_field_1): Handle USING_DECLs from dependent scopes.
3862 (marked_pushdecls_p): Remove.
3863 (unmarked_pushdecls_p): Remove.
3864 (marked_identifiers): Remove.
3865 (setup_class_bindings): Remove.
3866 (dfs_push_type_decls): Remove.
3867 (dfs_push_decls): Remove.
3868 (push_class_decls): Remove.
3870 2004-07-13 Mark Mitchell <mark@codesourcery.com>
3874 * decl.c (grokvardecl): Make declspecs parameter const.
3875 (grokdeclarator): Likewise. Adjust accordingly.
3876 * decl.h (grokdeclarator): Adjust declaration.
3877 * parser.c (cp_parser_init_declarator): Do not clear
3878 decl_specifiers->attributes.
3880 * cp-tree.h (lang_identifier): Remove class_value.
3881 (IDENTIFIER_CLASS_VALUE): Remove.
3882 (pop_class_decls): Likewise.
3883 (init_search_processing): Likewise.
3884 * class.c (handle_using_decl): Use lookup_member, not
3885 IDENTIFIER_CLASS_VALUE.
3886 (restore_class_cache): New function, split out from ...
3887 (pushclass): ... here. Do not call clear_identifier_class_values.
3888 (invalidate_class_lookup_cache): Do not clear
3889 IDENTIFIER_CLASS_VALUE.
3890 (popclass): Do not call pop_class_decls.
3891 (maybe_note_name_used_in_class): Do not save names looked up after
3892 the class is complete. Use lookup_member, not
3893 IDENTIFIER_CLASS_VALUE.
3894 * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
3895 * decl.c (cxx_init_decl_processing): Do not call
3896 init_search_processing.
3897 * method.c (do_build_copy_constructor): Remove unnecessary code.
3898 (do_build_assign_ref): Likewise.
3899 * name-lookup.c (pushdecl): Use lookup_member, not
3900 IDENTIFIER_CLASS_VALUE.
3901 (set_identifier_type_value_with_scope): Set TREE_TYPE on the
3903 (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
3904 (push_class_binding): Do not set it.
3905 (clear_identifier_class_values): Remove.
3906 (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
3907 (store_binding): Do not save it.
3908 (pop_from_top_level): Do not restore it.
3909 * name-lookup.h (cxx_saved_binding): Remove class_value.
3910 (clear_identifier_class_values): Remove.
3911 * ptree.c (cxx_print_identifier): Do not print
3912 IDENTIFIER_CLASS_VALUE.
3913 * search.c (search_obstack): Remove.
3914 (push_stack_level): Remove.
3915 (pop_stack_level): Remove.
3916 (search_level): Remove.
3917 (search_stack): Remove.
3918 (lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
3919 (setup_class_bindings): Use IDENTIFIER_MARKED, not
3920 IDENTIFIER_CLASS_VALUE.
3921 (marked_identifiers): New variable.
3922 (push_class_decls): Clear IDENTIFIER_MARKED.
3923 (pop_class_decls): Don't call pop_search_level.
3924 (init_search_processing): Remove.
3926 2004-07-12 Mark Mitchell <mark@codesourcery.com>
3928 * cp-tree.h (get_aggr_typedef): Remove.
3929 * init.c (get_aggr_typedef): Likewise.
3931 * name-lookup.c (push_class_level_binding): Simplify.
3933 2004-07-12 Andrew Pinski <apinski@apple.com>
3937 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
3939 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
3942 2004-07-12 Eric Christopher <echristo@redhat.com>
3944 * parser.c (cp_parser_class_head): Remove unused variable.
3946 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3948 * decl.c (grok_op_properties): Reject [de-]allocation functions
3949 declared in a namespace, or declared as static.
3951 2004-07-12 Nathan Sidwell <nathan@codesourcery.com>
3953 * cp-tree.h (make_binfo): Remove.
3954 * decl.c (xref_basetypes): Use make_tree_binfo directly.
3955 * tree.h (copy_base_binfos): Likewise.
3956 (make_binfo): Remove.
3958 * call.c (build_user_type_conversion_1, build_new_op,
3959 check_constructor_callable, build_temp,
3960 perform_direct_initialization_of_possible): Pass type directly to
3961 lookup_fnfields & build_special_member_call.
3962 (build_special_member_call): Accept a type, and complete it.
3963 * class.c (finish_stuct_bits): Copy the BINFOs here.
3964 * cvt.c (ocp_convert): Pass type directly to
3965 build_special_member_call.
3966 * decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
3967 (xref_basetypes): Allocate the binfo here. Adjust.
3968 * init.c (build_init, build_new_1): Pass type directly to
3969 build_special_member_call.
3970 * lex.c (cxx_make_type): Do not allocate binfo here.
3971 * name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
3972 * parser.c (cp_parser_class_head): Always call xref_basetypes.
3973 * pt.c (instantiate_class_template): Likewise. Inhibit access
3974 checking for template friends.
3975 * ptree.c (cxx_print_type): Adjust record printing.
3976 * search.c (lookup_base): When taking a type, complete it before
3977 looking for a binfo.
3978 (lookup_member): Delay completing a type.
3979 (push_class_decls): Don't walk an incomplete type.
3980 (lookup_conversions): Likewise.
3981 * semantics.c (finish_stmt_expr_expr): Pass type directly to
3982 build_special_member_call.
3983 * tree.c (copy_base_binfos): Adjust.
3984 (make_binfo): Likewise.
3985 * typeck.c (build_modify_expr): Pass type directly to
3986 build_special_member_call.
3987 * typeck2.c (process_init_constructor): Check a binfo exists.
3988 (build_m_component_ref): Allow accessing an incomplete type.
3989 (build_functional_cast): Pass type directly to
3990 build_special_member_call.
3992 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3995 * config-lang.in (gtfiles): Add typeck2.c.
3996 * Make-lang.in: Tweak typeck2.c dependencies, and add rule for
3998 * cp-tree.h: Declare complete_type_check_abstract.
3999 * typeck2.c (pat_calc_hash, pat_compare,
4000 complete_type_check_abstract): New functions.
4001 (abstract_virtuals_error): If the type is abstract, register the
4002 declaration within abstract_pending_vars for further checks.
4003 Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
4004 * decl.c (cp_finish_decl): Do not strip array types.
4005 (create_array_type_for_decl): Check for abstractness of the element
4007 (complete_vars): Call complete_type_check_abstract.
4008 * class.c (finish_struct): Prepare a list of virtual functions for
4009 template types, and call complete_vars on it to check for abstractness.
4011 2004-07-12 Paolo Bonzini <bonzini@gnu.org>
4013 PR tree-optimization/14107
4014 * decl.c (finish_function): Remove temporary band-aid.
4016 2004-07-11 Mark Mitchell <mark@codesourcery.com>
4018 * call.c (build_operator_new_call): Avoid using push_to_top_level.
4019 (build_new_op): Adjust call to lookup_function_nonclass.
4020 * name-lookup.c (identifier_type_value): Adjust call to
4022 (lookup_name_real): Add block_p parameter.
4023 (lookup_name_nonclass): Adjust call to lookup_name_real.
4024 (lookup_function_nonclass): Likewise.
4025 (lookup_name): Likewise.
4026 * name-lookup.h (lookup_name_real): Change prototype.
4027 (lookup_name_nonclass): Likewise.
4028 * parser.c (cp_parser_lookup_name): Likewise.
4030 * cp-tree.h (saved_scope): Make old_bindings a vector.
4031 (unuse_fields): Remove.
4032 * name-lookup.h (cxx_saved_binding): Define it.
4033 * class.c (pushclass): Don't use unuse_fields.
4034 * name-lookup.c (cxx_saved_binding_make): Remove.
4035 (store_binding): Add new bindings to a vector, using an
4036 accumulator style, rather than adding them to a list.
4037 (store_bindings): Adjust accordingly.
4038 (store_class_bindings): Likewise.
4039 (push_to_top_level): Likewise.
4040 (pop_from_top_level): Likewise.
4041 * optimize.c (maybe_clone_body): Must push_to_top_level and
4042 pop_from_top_level calls outside of loop.
4043 * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope
4044 calls here from cp_parser_late_parsing_default_args.
4045 (cp_parser_save_default_args): Record the class type in which the
4046 function is declared.
4047 (cp_parser_late_parsing_default_args): Do not call
4048 push_nested_class/pop_nested_class.
4049 * search.c (dfs_unuse_fields): Remove.
4050 (unuse_fields): Remove.
4052 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
4054 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
4055 LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
4056 * cp-tree.h (poplevel): Declare.
4057 (set_block): Remove.
4058 * decl.c (set_block): Remove.
4060 2004-07-10 Mike Stump <mrs@apple.com>
4062 * decl2.c (import_export_class): Never export/import vtables
4063 with inline key functions.
4065 2004-07-09 Steven Bosscher <stevenb@suse.de>
4067 * typeck.c (c_expand_asm_operands): Remove.
4069 2004-07-09 Mike Stump <mrs@apple.com>
4071 * typeck.c (build_class_member_access_expr): Skip null deref
4072 warning when we don't dereference it.
4074 2004-07-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4078 * class.c (check_field_decls): Improve -Weffc++ warning: do not
4079 warn for pointers to functions/members, or for classes without
4082 2004-07-08 Mark Mitchell <mark@codesourcery.com>
4084 * name-lookup.h (struct cp_binding_level): Update documentation
4087 2004-07-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4090 * typeck.c (check_return_expr): Improve -Weffc++ warning: handle
4091 returning CALL_EXPR, and non-reference return type.
4093 2004-07-08 Nathan Sidwell <nathan@codesourcery.com>
4095 * name-lookup.c (push_binding): Use VEC_reserve.
4097 2004-07-08 Richard Henderson <rth@redhat.com>
4099 * cp-tree.h (expand_eh_spec_block): Remove.
4101 2004-07-07 Mark Mitchell <mark@codesourcery.com>
4103 * cp-tree.h (saved_scope): Remove x_previous_class_type and
4104 x_previous_class_values; add x_previous_class_level.
4105 (previous_class_type): Remove.
4106 (previous_class_values): Remove.
4107 (previous_class_level): New macro.
4108 * class.c (pushclass): Restore the identifier cache more
4110 (invalidate_class_lookup_cache): Use vector for class_shadowed and
4111 previous_class_values.
4112 * decl.c (poplevel): Likewise.
4113 * name-lookup.c (cxx_binding_init): New function.
4114 (cxx_binding_make): Use it.
4115 (push_binding): For a binding in a class level, use a vector of
4116 cp_class_binding nodes.
4117 (push_binding_level): New function.
4118 (begin_scope): Use it.
4119 (leave_scope): Do not put class binding levels on the free list.
4120 (print_binding_level): Adjust for the fact that class_shadowed is
4122 (poplevel_class): Likewise.
4123 (clear_identifier_class_values): Likewise.
4124 (push_class_level_binding): Likewise.
4125 (set_class_shadows): Remove.
4126 (store_binding): New function.
4127 (store_class_bindings): New function.
4128 (push_to_top_level): Use store_class_bindings as appropriate.
4129 (pop_from_top_level): Use previous_class_level, not
4130 previous_class_type.
4131 * name-lookup.h (cp_class_binding): New type.
4132 (cp_binding_level): Use a vector object for class_shadowed.
4133 (push_binding_level): Declare.
4134 (set_class_shadows): Remove.
4136 2004-07-07 Andrew Pinski <apinski@apple.com>
4138 * class.c (instantiate_type): BUFFER_REF is dead.
4139 * lex.c (init_operators): IN_EXPR is dead.
4141 2004-07-07 Jason Merrill <jason@redhat.com>
4144 * call.c (build_new_op): Give overload warnings for built-in
4147 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
4150 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
4153 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
4155 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
4156 * class.c (build_primary_vtable, check_bases,
4157 determine_primary_base, finish_struct_bits,
4158 maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
4159 get_basefndecls, warn_hidden, walk_subobject_offsets,
4160 build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
4161 layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
4162 finish_struct_1, get_vfield_name, contains_empty_class_p,
4163 dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
4164 dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
4165 add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
4167 * decl.c (xref_basetypes): Likewise.
4168 * dump.c (cp_dump_tree): Likewise.
4169 * error.c (dump_expr): Likewise.
4170 * init.c (sort_mem_initializers, expand_member_init,
4171 push_base_cleanups): Likewise.
4172 * method.c (do_build_copy_constructor, do_build_assign_reg,
4173 synthesize_exception_spec): Likewise.
4174 * name-lookup.c (arg_assoc_class): Likewise.
4175 * pt.c (instantiate_class_template, tsubst,
4176 get_template_base_recursive): Likewise.
4177 * ptree.c (cxx_print_type): Likewise.
4178 * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
4179 * search.c (lookup_base_r, dynamic_cast_base_recurse,
4180 dfs_access_in_type, access_in_type, lookup_field_queue_p,
4181 bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
4182 marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
4183 dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
4184 binfo_for_vtable, copied_binfo, original_binfo): Likewise
4185 * tree.c (copy_base_binfos, make_binfo): Likewise.
4186 * typeck.c (commmon_base_type): Likewise
4187 * typeck2.c (process_init_constructor): Likewise
4189 2004-07-06 Joseph S. Myers <jsm@polyomino.org.uk>
4191 * decl.c (check_tag_decl): Name redeclared type in diagnostic.
4193 2004-07-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4196 * pt.c (convert_nontype_argument): Disallow conversions between
4197 different enumeration types.
4199 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
4201 * cp-tree.h (BINFO_MARKED): Remove.
4202 (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
4203 BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
4204 BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
4205 (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
4206 * class.c (build_base_path): Use BINFO_VIRTUAL_P.
4207 (mark_primary_bases, determine_primary_base, base_derived_from,
4208 dfs_find_final_overrider, dfs_find_final_overrider_q,
4209 dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
4210 dfs_modify_vtables, walk_subobject_offsets,
4211 layout_nonempty_base_or_field, build_base_field,
4212 build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
4213 end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
4214 finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
4215 build_ctor_vtbl_group, accumulate_vtble_inits,
4216 dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
4217 build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
4218 add_vcall_offset_vtbl_entries_1): Likewise.
4219 * decl.c (xref_basetypes): Incomming virtual base indicated by
4221 * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
4222 * init.c (finish_init_stmts, sort_mem_initializers,
4223 emit_mem_initializers, build_vtble_address, expand_member_init,
4224 push_base_cleanups): Likewise.
4225 * method.c (do_build_copy_constructor): Likewise.
4226 * pt.c (instantiate_class_template,
4227 get_template_base_recursive): Likewise.
4228 * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
4229 get_pseudo_ti_desc): Likewise.
4230 * search.c (lookup_base_r, dynamic_cast_base_recurse,
4231 binfo_from_vbase, binfo_via_virtual, copied_binfo,
4232 original_binfo): Likewise.
4233 * semantics.c (finish_base_specifier): Virtualness is indicated
4235 * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
4237 2004-07-06 Mark Mitchell <mark@codesourcery.com>
4240 2004-06-24 Jason Merrill <jason@redhat.com>
4242 * decl.c (grokparms): Give the PARM_DECL reference type if the
4243 parameter is passed by invisible reference.
4245 2004-07-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4247 * cp-lang.c (cp_var_mod_type_p): Add extra arg.
4248 * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
4249 * pt.c (check_instantiated_args, unify): Likewise.
4251 2004-07-05 Phil Edwards <phil@codesourcery.com>
4253 * Make-lang.in (check-c++, lang_checks): Add some comments.
4255 2004-07-05 Zack Weinberg <zack@codesourcery.com>
4257 * cp-mudflap.c: Delete file.
4258 * Makefile.in: Remove all references to cp-mudflap.o.
4260 2004-07-05 Zack Weinberg <zack@codesourcery.com>
4262 * decl.c (cxx_init_decl_processing): Call
4263 build_common_tree_nodes before creating the global NAMESPACE_DECL.
4265 2004-07-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4268 * call.c (build_operator_new_call): Look only at global scope.
4270 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
4272 * call.c (enforce_access): Expect TREE_BINFO.
4273 * class.c (binfo_ctor_vtable): Check TREE_BINFO.
4274 * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
4275 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
4277 (BINFO_LANG_ELTS): Remove.
4278 (BINFO_LANG_SLOTS): New.
4279 (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
4280 (CLASSTYPE_TEMPLATE_INFO): Adjust.
4281 * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
4282 * search.c (lookup_member): Check TREE_BINFO.
4283 * semantics.c (perform_or_defer_access_check): Likewise.
4284 (check_accessibility_of_qualified_id): Check
4285 deferred_access_no_check.
4286 * tree.c (make_binfo): Use make_tree_binfo.
4288 2004-07-04 Mark Mitchell <mark@codesourcery.com>
4290 * method.c (implicitly_declare_fn): Set linkage of generated
4293 2004-07-04 Richard Henderson <rth@redhat.com>
4295 * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
4297 2004-07-03 Scott Brumbaugh <scottb.lists@verizon.net>
4300 * name-lookup.c (push_class_level_binding): Don't pass a
4301 TREE_LIST of ambiguous names to check_template_shadow as it
4302 only handles declarations. Instead, pull the declaration
4305 2004-07-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4308 * pt.c (check_explicit_specialization): Clarify error message.
4310 2004-07-02 Richard Henderson <rth@redhat.com>
4312 * tree.c (cp_unsave_r): Update remap_save_expr call.
4314 2004-07-02 Mark Mitchell <mark@codesourcery.com>
4317 * mangle.c (write_template_arg): Correct mangling.
4320 * decl.c (grokdeclarator): Robustify.
4322 2004-07-01 Richard Henderson <rth@redhat.com>
4324 * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
4325 * method.c (synthesize_method): Don't clear_last_expr.
4326 * name-lookup.c (maybe_push_cleanup_level): Likewise.
4328 2004-07-01 Nick Clifton <nickc@redhat.com>
4330 * decl2.c (import_export_class): Invoke the
4331 import_export_class field in the gcc_target structure if it is not
4334 2004-06-30 Richard Henderson (rth@redhat.com>
4336 * decl.c (start_preparsed_function): Don't set immediate_size_expand.
4337 * method.c (use_thunk): Likewise.
4339 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
4341 * call.c (build_over_call), typeck.c (build_function_call): Call
4342 check_function_arguments instead of check_function_format.
4344 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
4346 * call.c (build_over_call), typeck.c (build_function_call): Update
4347 calls to check_function_format.
4349 2004-06-30 Richard Henderson <rth@redhat.com>
4351 * call.c (build_over_call): Use __builtin_memcpy for copying
4352 CLASS_AS_BASE rather than funny casting.
4354 2004-06-30 Richard Henderson <rth@redhat.com>
4356 * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
4357 TYPE_SIZE_UNIT of full_type.
4359 2004-06-30 Per Bothner <per@bothner.com>
4361 Conditionally compile support for --enable-mapped_location.
4362 * decl.c (pop_label): Handle (imperfectly) USE_MAPPED_LOCATION case.
4363 * decl2.c: If USE_MAPPED_LOCATION, don't do some line number
4364 adjustments - which I don't understand.
4365 * error.c (dump_decl): Rename "<interrnal>" to "<built-in>".
4366 * error.c: Use LOCATION_FILE and EXPR_LOCATION macros.
4367 (print_instantiation_partial_context): Use expand_location.
4368 * decl.c (duplicate_decl): Use new DECL_IS_BUILTIN macro.
4369 * name-lookup.c: Likewise.
4370 * lex.c (cxx_init): Likewise. Also use BUILTINS_LOCATION.
4371 * name-lookup.c: Use input_line macro.
4372 * parser.c (cp_lexer_get_preprocessor_token): Use UNKNOWN_LOCATION.
4373 (cp_parser_statement): Rename locaal variable statement_locus to
4374 statement_location and use SET_EXPR_LOCATION macro.
4375 * pt.c: Handle USE_MAPPED_LOCATION case. Use new macros.
4376 * tree.c (cp_walk_subtrees): Likewise.
4378 2004-06-29 Per Bothner <per@bothner.com>
4380 * tree.c (build_min_nt, build_min, build_min_non_dep):
4381 Don't set TREE_COMPLEXITY from input_line.
4383 2004-06-29 Paul Brook <paul@codesourcery.com>
4385 * init.c: Include target.h.
4386 (get_cookie_size): Remove and replace with target hook.
4388 (build_new_1): Store the element size in the cookie.
4390 2004-06-29 Nathan Sidwell <nathan@codesourcery.com>
4393 * parser.c (cp_parser_template_declaration_after_export): Disable
4394 access checks here ...
4395 (cp_parser_class_specifier): ... not here.
4397 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
4399 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
4400 VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
4401 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
4404 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
4406 * cp-tree.h (struct deferred_access): Move to ...
4407 * semantics.c (struct deferred_access): ... here. Adjust.
4408 (deferred_access_stack): Make a VEC(deferred_access),
4409 (deferred_access_free_list): Remove.
4410 (deferred_access_no_check): New.
4411 (push_deferring_access_checks, resume_deferring_access_checks,
4412 stop_deferring_access_checks, pop_deferring_access_checks,
4413 get_deferred_access_checks, pop_to_parent_deferring_access_checks,
4414 perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
4416 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
4419 * call.c (build_temp): Declare.
4420 (check_constructor_callable): New.
4421 (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
4422 CONSTRUCTOR_CALLABLE.
4423 (convert_like_real, initialize_reference): Use
4424 check_constructor_callable.
4425 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
4426 (LOOKUP_*): Renumber.
4428 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
4430 * friend.c (add_friend): Only perform access checks when context
4432 * lex.c (cxx_make_type): Only create a binfo for aggregate types.
4433 * parser.c (cp_parser_class_specifier): Disable access checks here
4434 when parsing the body of a templated class.
4435 * semantics.c (perform_or_defer_access_checks): Reorder to allow
4436 NULL binfos when not checking access.
4438 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
4440 Use vector API for vbase list.
4441 * cp-tree.h: Include vec.h
4442 (DEF_VEC_P (tree)): New type.
4443 (struct lang_type_class): Change vbase's member type.
4444 (binfo_for_vbase): Declare.
4445 * class.c (determine_primary_base, base_derived_from,
4446 update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
4447 warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
4448 build_vtbl_initializer): Adjust.
4449 * decl.c (xref_basetypes): Adjust, accumulate upper bound of
4451 * init.c (sort_mem_initializers, expand_member_init,
4452 push_base_cleanups): Adjust.
4453 * method.c (do_build_copy_constructor): Adjust.
4454 * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
4455 (binfo_for_vbase): New.
4456 * tree.c (copy_base_binfos): Adjust.
4458 2004-06-28 Mark Mitchell <mark@codesourcery.com>
4460 * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
4462 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
4465 * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
4466 paranthesis in case of pointers to array members.
4467 * error.c (dump_type_prefix): Likewise.
4468 (dump_type_suffix): Maybe issue a whitespace when printing
4471 2004-06-27 Mark Mitchell <mark@codesourcery.com>
4474 * parser.c (cp_parser_set_decl_spec_type): Refine test for
4475 redefinition of built-in types.
4477 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
4479 * error.c (pp_template_argument_list_start): Remove.
4480 (pp_template_argument_list_end): Likewise.
4481 (pp_separate_with_comma): Use pp_cxx_separate_with.
4482 (reinit_global_formatting_buffer): Remove.
4483 (pp_non_consecutive_character): Likewise.
4484 (dump_scope): Use pp_cxx_colon_colon.
4485 (dump_template_parameter): Use pp_cxx_identifier,
4486 pp_cxx_tree_identifier and pp_cxx_whitespace.
4487 (dump_templat_bindings): Replace use of pp_string with sequence
4488 of pp_cxx_whitespace and pp_equal.
4489 (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
4490 pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set
4492 (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
4493 (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace,
4494 pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
4495 (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
4496 pp_cxx_right_bracket, pp_cxx_identifier throughout,
4497 (dump_decl): Likewise.
4498 (dump_template_decl): Likewise.
4499 (dump_function_decl): Likewise. Set padding as appropriate.
4500 (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
4502 (dump_exception_spec): Likewise.
4503 (dump_function_name): Use pp_cxx_tree_identifier and
4505 (dump_template_parms): Use pp_cxx_begin_template_argument_list and
4506 pp_cxx_end_template_argument_list.
4507 (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
4508 pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
4509 pp_cxx_whitespace throughout.
4510 (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
4512 (dump_unary_op): Likewise.
4513 (reinit_cxx_pp): New function.
4514 (type_as_string); Use it.
4515 (expr_as_string): Likewise.
4516 (decl_as_string); Likewise.
4517 (context_as_string): Likewise.
4518 (lang_decl_name): Likewise.
4519 (decl_to_string): Likewise.
4520 (expr_to_string): Likewise.
4521 (parm_to_string): Likewise.
4522 (type_to_string): Likewise.
4523 (args_to_string): Likewise.
4524 (cv_to_string): Likewise.
4526 2004-06-26 Mark Mitchell <mark@codesourcery.com>
4528 * cp-tree.h (cp_cv_quals): New type.
4529 (cp_declarator): Use it instead of "tree" as appropriate.
4530 (grok_method_quals): Adjust prototype.
4531 (grokclassfn): Likewise.
4532 (do_friend): Likewise.
4533 * decl.c (grokfndecl): Use cp_cv_quals, not tree.
4534 (grokdeclarator): Likewise.
4535 * decl2.c (grok_method_quals): Likewise.
4536 (grokclassfn): Likewise.
4537 * friend.c (do_friend): Likewise.
4538 * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
4539 * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
4540 (make_pointer_declarator): Likewise.
4541 (make_reference_declarator): Likewise.
4542 (make_ptrmem_declarator): Likewise.
4543 (cp_parser_ptr_operator): Likewise.
4544 (cp_parser_cv_qualifier_seq_opt): Likewise.
4545 (cp_parser_cv_qualifier_opt): Remove.
4546 (cp_parser_new_declarator_opt): Adjust call to
4547 cp_parser_ptr_operator.
4548 (cp_parser_conversion_declaration_opt): Likewise.
4549 (cp_parser_declarator): Use cp_cv_quals, not tree.
4550 (cp_parser_direct_declarator): Likewise.
4552 2004-06-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4554 * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
4555 Rename DECL_STMT to DECL_EXPR.
4556 * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
4557 * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
4558 * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
4560 2004-06-26 Jan Hubicka <jh@suse.cz>
4563 * decl2.c (maybe_emit_vtables): Always import_export_vtable for the
4564 reachability analysis.
4566 2004-06-25 Mark Mitchell <mark@codesourcery.com>
4568 * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
4571 2004-06-25 Paul Brook <paul@codesourcery.com>
4573 * decl2.c (get_guard): Call targetm.cxx.guard_type.
4574 (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
4576 2004-06-24 Mark Mitchell <mark@codesourcery.com>
4578 * decl.c (grokdeclarator): Restore error messages about __thread.
4579 * parser.c (cp_parser_decl_specifier_seq): Likewise.
4581 2004-06-24 Jason Merrill <jason@redhat.com>
4584 * decl.c (grokparms): Give the PARM_DECL reference type if the
4585 parameter is passed by invisible reference.
4587 2004-06-24 Andreas Schwab <schwab@suse.de>
4589 * cp-tree.h (enum cp_storage_class): Remove trailing comma.
4591 2004-06-23 Mark Mitchell <mark@codesourcery.com>
4593 * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
4594 (cp/decl.o): Likewise.
4595 (cp/decl2.o): Likewise.
4596 (cp/pt.o): Likewise.
4597 (cp/semantics.o): Likewise.
4598 * config-lang.in (gtfiles): Do not reference cp/lex.h.
4599 * class.c: Do not include lex.h.
4600 (add_implicitly_declared_members): Do not use
4601 adding_implicit_members.
4602 (check_bases_and_members): Do not talk about grok_x_components.
4603 * cp/cp-tree.h (adding_implicit_members): Remove.
4604 (cp_storage_class): New type.
4605 (cp_decl_spec): Likewise.
4606 (cp_decl_specifier_seq): Likewise.
4607 (cp_parameter_declarator): Use it for the decl_specifiers field.
4608 (check_tag_decl): Adjust prototype.
4609 (shadow_tag): Likewise.
4610 (groktypename): Likewise.
4611 (start_decl): Likewise.
4612 (start_function): Likewise.
4613 (start_method): Likewise.
4614 (grok_x_components): Remove.
4615 (grokfield): Adjust prototype.
4616 (grokbitfield): Likewise.
4617 (finish_member_class_template): Remove.
4618 * decl.c: Do not include lex.h.
4619 (adding_implicit_members): Do not define.
4620 (check_tag_decl): Do not use trees to represent decl-specifiers.
4621 (shadow_tag): Likewise.
4622 (groktypename): Likewise.
4623 (start_decl): Likewise.
4624 (grokvardecl): Likewise.
4625 (grokdeclarator): Likewise.
4626 (grokparms): Likewise.
4627 (start_function): Likewise.
4628 (start_method): Likewise.
4629 * decl.h (grokdeclarator): Adjust prototype.
4630 * decl2.c: Do not include lex.h.
4631 (grok_x_components): Remove.
4632 (grokfield): Do not use trees to represent decl-specifiers.
4633 (grokbitfield): Likewise.
4634 * lex.c: Do not include lex.h.
4636 * parser.c: Include target.h.
4637 (clear_decl_specs): New function.
4638 (cp_parser_translation_unit): Do not use trees to represent
4640 (cp_parser_postfix_expression): Likewise.
4641 (cp_parser_new_type_id): Likewise.
4642 (cp_parser_condition): Likewise.
4643 (cp_parser_simple_declaration): Likewise.
4644 (cp_parser_decl_specifier_seq): Likewise.
4645 (cp_parser_function_specifier_opt): Likewise.
4646 (cp_parser_conversion_type_id): Likewise.
4647 (cp_parser_template_parameter): Likewise.
4648 (cp_parser_explicit_instantiation): Likewise.
4649 (cp_parser_type_specifier): Likewise.
4650 (cp_parser_simple_type_specifier): Likewise.
4651 (cp_parser_init_declarator): Likewise.
4652 (cp_parser_type_id): Likewise.
4653 (cp_parser_type_specifier_seq): Likewise.
4654 (cp_parser_parameter_declaration): Likewise.
4655 (cp_parser_member_declaration): Likewise.
4656 (cp_parser_exception_declaration): Likewise.
4657 (cp_parser_function_definition_from_specifiers_and_declarator):
4659 (cp_parser_single_declaration): Likewise.
4660 (cp_parser_save_member_function_body): Likewise.
4661 (cp_parser_friend_p): Likewise.
4662 (cp_parser_set_storage_class): New function.
4663 (cp_parser_set_decl_spec_type): Likewise.
4664 * pt.c: Do not include lex.h.
4665 * semantics.c: Likewise.
4666 (finish_member_class_template): Remove.
4668 2004-06-23 Roger Sayle <roger@eyesopen.com>
4670 * call.c (build_cxx_call): Don't call expand_tree_builtin. No
4671 longer take both "args" and "convert_args" as arguments.
4672 (build_op_delete_call): Update call to build_cxx_call.
4673 (build_over_call): Likewise, update call to build_cxx_call.
4674 * cp-tree.h (build_cxx_call): Update funtion prototype.
4675 * typeck.c (build_function_call): Don't call expand_tree_builtin.
4676 * rtti.c (throw_bad_cast): Update call to build_cxx_call.
4677 (throw_bad_typeid): Likewise.
4678 (build_dynamic_cast_1): Likewise.
4680 2004-06-22 Richard Henderson <rth@redhat.com>
4682 * class.c (build_vfn_ref): Take a pointer not object. Build
4684 (cp_fold_obj_type_ref): New.
4685 * call.c (build_over_call): Update build_vfn_ref call.
4686 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
4687 * cp-tree.h (cp_fold_obj_type_ref): Declare.
4689 2004-06-21 Jason Merrill <jason@redhat.com>
4692 * cp-gimplify.c (cp_gimplify_init_expr): Look through
4695 2004-06-21 Mark Mitchell <mark@codesourcery.com>
4697 * cp-tree.def (NEW_EXPR): Add a fourth slot.
4698 * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
4699 (TREE_PARMLIST): Likewise.
4700 (CALL_DECLARATOR_PARMS): Likewise.
4701 (CALL_DECLARATOR_QUALS): Likewise.
4702 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
4703 (cp_declarator_kind): New type.
4704 (cp_parameter_declarator): Likewise.
4705 (cp_declarator): Likewise.
4706 (cp_error_declarator): Likewise.
4707 (no_parameters): Likewise.
4708 (groktypename): Change prototype.
4709 (start_decl): Likewise.
4710 (start_handler_parms): Likewise.
4711 (get_scope_of_declarator): Likewise.
4712 (start_function): Likewise.
4713 (start_preparsed_function): New function.
4714 (start_function): Change prototype.
4715 (start_method): Likewise.
4716 (grokfield): Likewise.
4717 (grokbitfield): Likewise.
4718 (build_new): Likewise.
4719 (make_pointer_declarator): Remove.
4720 (make_reference_declarator): Likewise.
4721 (make_call_declarator): Likewise.
4722 (set_quals_and_spec): Likewise.
4723 (process_template_parm): Change prototype.
4724 (begin_function_definition): Remove.
4725 (finish_parmlist): Remove.
4726 * decl.c (groktypename): Do not use trees to represent
4728 (start_decl): Likewise.
4729 (start_handler_parms): Remove.
4730 (get_scope_of_declarator): Reimplement.
4731 (grokdeclarator): Do not use trees to represent declarators.
4732 (grokparms): Likewise.
4733 (start_function): Likewise.
4734 (start_method): Likewise.
4735 (build_void_list_mode): Do not use TREE_PARMLIST.
4736 * decl.h (grokdeclarator): Change prototype.
4737 * decl2.c (grok_method_quals): Robustify.
4738 (grok_x_components): Do not use trees to represent declarators.
4739 (grokfield): Likewise.
4740 (grokbitfield): Likewise.
4741 (start_objects): Build FUNCTION_DECLs, not declarators.
4742 (start_static_storage_duration_function): Likewise.
4743 * init.c (build_new): Simplify.
4744 * lex.c (make_pointer_declarator): Remove.
4745 (make_reference_declarator): Likewise.
4746 (make_call_declarator): Likewise.
4747 (set_quals_and_spec): Likewise.
4748 * method.c (use_thunk): Use start_preparsed_function.
4749 (synthesize_method): Likewise.
4750 (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
4751 * optimize.c (maybe_clone_body): Use start_preparsed_function.
4752 * parser.c (cp_error_declarator): New variable.
4753 (declarator_obstack): Likewise.
4754 (alloc_declarator): New function.
4755 (make_declarator): Likewise.
4756 (make_id_declarator): Likewise.
4757 (make_pointer_declarator): Likewise.
4758 (make_reference_declarator): Likewise.
4759 (make_ptrmem_declarator): Likewise.
4760 (make_call_declarator): Likewise.
4761 (make_array_declarator): Likewise.
4762 (no_parameters): New variable.
4763 (make_parameter_declarator): Likewise.
4764 (cp_parser_check_for_definition_in_return_type): Do not use trees
4765 to represent declarators.
4766 (cp_parser_translation_unit): Likewise.
4767 (cp_parser_new_expression): Likewise.
4768 (cp_parser_new_type_id): Likewise.
4769 (cp_parser_new_declarator_opt): Likewise.
4770 (cp_parser_direct_new_declarator): Likewise.
4771 (cp_parser_condition): Likewise.
4772 (cp_parser_declaration_statement): Likewise.
4773 (cp_parser_declaration): Likewise.
4774 (cp_parser_conversion_type_id): Likewise.
4775 (cp_parser_conversion_declarator_opt): Likewise.
4776 (cp_parser_template_parameter_list): Likewise.
4777 (cp_parser_template_parameter): Likewise.
4778 (cp_parser_explicit_instantiation): Likewise.
4779 (cp_parser_init_declarator): Likewise.
4780 (cp_parser_declarator): Likewise.
4781 (cp_parser_direct_declarator): Likewise.
4782 (cp_parser_type_id): Likewise.
4783 (cp_parser_parameter_declaration_clause): Likewise.
4784 (cp_parser_parameter_declaration_list): Likewise.
4785 (cp_parser_parameter_declaration): Likewise.
4786 (cp_parser_member_declaration): Likewise.
4787 (cp_parser_exception_declaration): Likewise.
4788 (cp_parser_check_declarator_template_parameters): Likewise.
4789 (cp_parser_function_definition_from_specifiers_and_declarator):
4791 (cp_parser_save_member_function_body): Likewise.
4792 * pt.c (process_template_parm): Add is_non_type parameter.
4793 (convert_template_argument): Adjust call to groktypename.
4794 (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
4795 (tsubst): Do not expect declarators.
4796 (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
4798 (instantiate_decl): Use start_preparsed_function.
4799 * semantics.c (begin_function_definition): Remove.
4800 (finish_parmlist): Remove.
4801 * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
4804 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4806 * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
4807 (build_new_method_call): Likewise.
4808 * decl.c (local_variable_p_walkfn): Don't walk into types.
4809 * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
4810 (build_anon_union_vars): Add new operand for COMPONENT_REF.
4811 * init.c (buld_new): Add new operand for ARRAY_REF.
4812 * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
4813 (do_build_assign_ref): Likewise.
4814 * parser.c (cp_parser_direct_new_declarator): Add new operands
4816 (cp_parser_direct_declarator): Likewise.
4817 * pt.c (tsubst): Likewise.
4818 (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
4820 * semantics.c (finish_non_static_data_member): Add new operand
4822 * typeck.c (build_class_member_access_expr): Likewise.
4823 (build_class_member_access_expr, finish_class_member_access_expr):
4825 (build_ptrmemfunc_access_expr): Likewise.
4826 (build_array_ref): Add new operands for ARRAY_REF.
4827 * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
4828 * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
4830 2004-06-21 Richard Henderson <rth@redhat.com>
4832 * dump.c (cp_dump_tree): Don't use dump_next_stmt.
4833 * parser.c (cp_parser_jump_statement): Update commentary.
4834 * pt.c (tsubst_expr): Use RETURN_EXPR.
4835 * semantics.c (finish_return_stmt): Likewise.
4836 (finalize_nrv_r): Likewise.
4837 * typeck.c, typeck2.c: Update file start commentary.
4839 2004-06-21 Richard Henderson <rth@redhat.com>
4841 * semantics.c (finish_expr_stmt): Call verify_sequence_points.
4843 2004-06-20 Richard Henderson <rth@redhat.com>
4845 * cp-tree.h (add_decl_stmt): Declare.
4846 * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
4847 * semantics.c (maybe_cleanup_point_expr): New.
4848 (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
4849 finish_for_expr, finish_switch_cond): Use it.
4850 (finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN.
4852 2004-06-20 Richard Henderson <rth@redhat.com>
4854 * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
4855 * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
4856 (cp_gimplify_expr): Call it.
4857 (gimplify_cleanup_stmt): Move from c-gimplify.c.
4858 (cp_genericize): New.
4859 * decl.c (finish_function): Call it.
4860 * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
4861 (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
4862 (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
4863 (cp_genericize): Declare.
4864 * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
4865 * dump.c (cp_dump_tree): Likewise.
4866 * semantics.c (push_cleanup): Move from c-semantics.c.
4868 2004-06-20 Zack Weinberg <zack@codesourcery.com>
4870 * cp-lang.c (has_c_linkage): Implement.
4872 * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
4873 * decl.c (duplicate_decls): Use COPY_DECL_RTL.
4874 (builtin_function_1): Don't call make_decl_rtl.
4875 (build_cp_library_fn): Don't call set_mangled_name_for_decl.
4876 (grokvardecl): Don't call mangle_decl.
4877 * except.c (nothrow_libfn_p): Look at DECL_NAME, not
4878 DECL_ASSEMBLER_NAME.
4879 * method.c (set_mangled_name_for_decl): Delete.
4880 * name-lookup.c (pushdecl): When a local extern shadows a
4881 file-scope declaration of the same object, give both DECLs the
4883 * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
4884 on DECL_ASSEMBLER_NAME.
4886 2004-06-19 Richard Henderson <rth@redhat.com>
4888 * cp-gimplify.c: Remove unnecessary prototypes.
4889 (cp_gimplify_stmt): Merge into ...
4890 (cp_gimplify_expr): ... here. Move to end of file. Handle
4891 stmts_are_full_exprs_p frobbing.
4892 * cp-tree.h (cp_gimplify_stmt): Remove.
4893 * pt.c (tsubst_expr): Merge prep_stmt and unify.
4894 * tree.c (init_tree): Don't set lang_gimplify_stmt.
4896 2004-06-18 Richard Henderson <rth@redhat.com>
4899 * semantics.c (begin_cond): New.
4900 (finish_cond): Rewrite to handle template DECL_STMTs specially.
4901 Assume that non-template decls go land before the conditional.
4902 (simplify_loop_decl_cond): Likewise.
4903 (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
4904 finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
4905 begin_switch_stmt, finish_switch_cond): Update to match.
4907 2004-06-17 Jason Merrill <jason@redhat.com>
4910 * semantics.c (simplify_aggr_init_expr): Don't return the slot.
4911 (finish_stmt_expr_expr): Update type after conversions.
4912 (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
4913 Handle void initializer.
4914 * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
4916 2004-06-17 Geoffrey Keating <geoffk@apple.com>
4918 * class.c (build_clone): Don't call defer_fn, let mark_used do it.
4919 * cp-tree.h (defer_fn): Delete.
4920 * decl2.c (defer_fn): Delete.
4921 (finish_file): Simplify deferred_fns loops; check that
4922 only used inline functions get into deferred_fns.
4923 (mark_used): Inline previous contents of defer_fn.
4925 2004-06-16 Richard Henderson <rth@redhat.com>
4927 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
4928 (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
4929 * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
4930 of CTOR_INITIALIZER ...
4931 (pp_cxx_statement): ... here.
4932 * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
4933 (finish_function): Use alloc_stmt_list to zap entire function.
4934 * parser.c (cp_parser_compound_statement): Update commentary.
4935 * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
4936 * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
4937 (finish_stmt_expr): Don't look through COMPOUND_STMT.
4939 2004-06-16 Geoffrey Keating <geoffk@apple.com>
4941 * pt.c (mark_decl_instantiated): Don't call defer_fn.
4943 2004-06-16 Richard Henderson <rth@redhat.com>
4945 * parser.c (cp_parser_labeled_statement): Update commentary.
4946 * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
4947 * tree.c (mark_local_for_remap_r): Likewise.
4949 2004-06-16 Richard Henderson <rth@redhat.com>
4951 * parser.c (cp_parser_asm_definition): Update commentary.
4952 * pt.c (tsubst_expr): Use ASM_EXPR.
4953 * semantics.c (finish_asm_stmt): Likewise.
4955 2004-06-16 Richard Henderson <rth@redhat.com>
4957 * decl.c (finish_destructor_body): Use LABEL_EXPR.
4958 * parser.c (cp_parser_statement): Update commentary.
4959 * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
4960 * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
4961 * tree.c (mark_local_for_remap_r): Likewise.
4963 2004-06-16 Richard Henderson <rth@redhat.com>
4966 * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
4967 statement in FOR_INIT_STMT for templates.
4969 2004-06-15 Richard Henderson <rth@redhat.com>
4971 * call.c (initialize_reference): Don't build CLEANUP_STMT here.
4972 * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
4973 (genericize_try_block): Use gimplify_stmt.
4974 (genericize_catch_block, genericize_eh_spec_block): Likewise.
4975 (cp_gimplify_init_expr): Remove STMT_EXPR special case.
4976 (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
4977 * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
4978 (cp_tree_chain_matters_p): Remove.
4979 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
4980 (COMPOUND_STMT_BODY_BLOCK): New.
4981 (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
4982 (EXPR_STMT_STMT_EXPR_RESULT): New.
4983 (building_stmt_tree): Check cur_stmt_list.
4984 (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
4985 (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
4986 * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
4987 (cp_finish_decl): Use push_cleanup.
4988 (start_function, finish_function): Use statement lists.
4989 (finish_stmt): Do nothing.
4990 * except.c (begin_eh_spec_block): Use statement lists.
4991 (check_handlers_1, check_handlers): Likewise.
4992 * init.c (construct_virtual_base): Don't add extra compound stmts.
4993 (build_vec_init): Likewise.
4994 * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
4995 * name-lookup.h (struct cp_binding_level): Add statement_list.
4996 * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
4997 (cp_parser_labeled_statement, cp_parser_expression_statement,
4998 cp_parser_statement_seq_opt): Likewise.
4999 (cp_parser_compound_statement): Likewise. Take bool for try block.
5000 (cp_parser_selection_statement): Tidy if processing.
5001 (cp_parser_already_scoped_statement): Rewrite to do what it says.
5002 * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
5003 (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST.
5004 Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
5005 * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
5006 (finish_cond): New, rewritten from FINISH_COND.
5007 (simplify_loop_decl_cond): New.
5008 (finish_expr_stmt): Avoid nested EXPR_STMTs.
5009 (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
5010 begin_else_clause, finish_else_clause, finish_if_stmt,
5011 begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
5012 begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
5013 finish_for_cond, finish_for_stmt, begin_switch_stmt,
5014 finish_switch_cond, finish_switch_stmt, begin_try_block,
5015 finish_try_block, finish_cleanup_try_block, finish_function_try_block,
5016 finish_handler_sequence, finish_function_handler_sequence,
5017 begin_handler, finish_handler_parms, finish_handler,
5018 begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
5019 using statement lists.
5020 (begin_compound_stmt): Replace has_no_scope argument with flags.
5021 Update all callers. Use statement lists.
5022 (finish_compound_stmt): Likewise.
5023 (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
5024 (current_scope_stmt_stack): Remove.
5025 (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
5026 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
5027 Rewrite with statement lists.
5029 2004-06-15 Alexandre Oliva <aoliva@redhat.com>
5031 * parser.c: Change all assignments of c_lex_string_translate
5032 to true and false to 1 and 0.
5033 (cp_lexer_read_token): Convert type of the translated string.
5034 (cp_parser_skip_to_closing_parentheses): Preserve original
5035 value of c_lex_string_translate, and set it to -1 while
5037 (cp_parser_cache_group): Likewise.
5038 (cp_parser_cache_group_1): Renamed.
5039 (cp_parser_asm_operand_list): Remove redundant setting of
5040 c_lex_string_translate.
5041 (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
5042 Handle chained strings.
5044 2004-06-12 Andrew Pinski <apinski@apple.com>
5048 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
5050 * cp-tree.h: Fix typo.
5052 * cp-tree.h: Include cgraph.h
5053 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
5054 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
5056 2004-06-12 Jason Merrill <jason@redhat.com>
5058 PR tree-optimization/14107
5059 * decl.c (finish_function): Warn about no return in all functions.
5061 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
5063 * cp-tree.h (struct language_function): Remove cannot_inline.
5064 * decl.c (save_function_data): cannot_inline is no more.
5065 (cxx_push_function_context): Likewise.
5066 * decl2.c (start_objects, start_static_storage_duration_function):
5067 Reset DECL_INLINE, set DECL_UNINLINABLE.
5069 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5072 * search.c (lookup_field): Propagate the ambiguity list.
5073 (lookup_fnfields): Likewise.
5075 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5078 * parser.c (cp_parser_template_name): Ctors/dtors never need a
5079 template keyword to disambiguate.
5081 2004-06-14 Mark Mitchell <mark@codesourcery.com>
5084 * decl.c (grokdeclarator): Ignore pointer-to-members when
5085 computing template depth.
5088 * name-lookup.c (pushtag): Do not try to put class declarations in
5089 explicit specialization scopes.
5091 2004-06-11 Andrew Pinski <pinskia@physics.uc.edu>
5093 * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
5095 2004-06-11 Mark Mitchell <mark@codesourcery.com>
5098 * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
5099 bindings for undeclared built-ins.
5101 2004-06-11 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5103 * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
5104 appear at the correct location.
5106 2004-06-10 Jason Merrill <jason@redhat.com>
5110 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5111 * init.c (build_offset_ref): Build SCOPE_REF with non-null
5112 TREE_TYPE for non-dependent names.
5113 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
5114 unknown_type_node as its TREE_TYPE.
5115 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
5116 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
5117 (dump_expr) <SCOPE_REF case>: Likewise.
5119 2004-06-10 Mark Mitchell <mark@codesourcery.com>
5122 * parser.c (cp_parser_direct_declarator): Robustify.
5125 * pt.c (tsubst_copy): Use decl_constant_value on enumeration
5126 constants in non-dependent contexts.
5130 * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
5133 2004-06-10 Jakub Jelinek <jakub@redhat.com>
5136 * decl.c (duplicate_decls): Handle fileptr_type_node arguments
5139 2004-06-09 Mark Mitchell <mark@codesourcery.com>
5143 2004-06-07 Mark Mitchell <mark@codesourcery.com>
5144 * lex.c (handle_pragma_interface): Deprecate.
5145 (handle_pragma_implementation): Likewise.
5147 2004-06-09 Andrew Pinski <pinskia@physics.uc.edu>
5149 * g++spec.c (lang_specific_driver): Remove check for -lm
5150 and -lmath when check it see if it was the math library.
5152 2004-06-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5155 * parser.c (cp_parser_direct_declarator): Reject constructor named
5156 as qualified template-id.
5158 2004-06-07 Mark Mitchell <mark@codesourcery.com>
5161 * lex.c (handle_pragma_interface): Deprecate.
5162 (handle_pragma_implementation): Likewise.
5164 2004-06-07 Mark Mitchell <mark@codesourcery.com>
5167 * parser.c (cp_parser_iteration_statement): Fix typo in error
5171 * pt.c (tsubst_default_argument): Do not defer access checks
5172 while substituting into the default argument.
5175 * pt.c (tsubst_copy): Do not try to substitute for an enumeration
5176 constant in a non-dependent context.
5179 * except.c (build_throw): Ensure that temp_expr has been
5182 2004-06-06 Roger Sayle <roger@eyesopen.com>
5184 * cp/cp-tree.h (lvalue_or_else): Add function prototype.
5186 2004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5189 * parser.c (cp_parser_mem_initializer_id): Gracefully reject
5190 'typename', and accept 'template'.
5192 2004-06-03 Andrew Pinski <pinskia@physics.uc.edu>
5193 Jan Hubicka <jh@suse.cz>
5196 * method.c (use_think): Do not mark thunk as referenced.
5198 2004-06-03 Matt Austern <austern@apple.com>
5201 * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
5202 is nonzero, and if we see a noninline definition of a key method,
5203 make the vtables nonweak.
5205 2004-06-02 Matt Austern <austern@apple.com>
5207 * cp-tree.h (instantiate_decl): new boolean parameter,
5208 undefined_ok. Current behavior is equivalent to its being 0.
5209 * decl2.c (mark_used): Add new argument when calling instantiate_decl
5210 * pt.c (mark_decl_instantiated): Unconditionally make
5211 instantiations explicit unconditionally
5212 (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
5213 since mark_decl_instantiated now does it.
5214 (instantiate_class_member): New. Instantiate a member of an
5215 explicitly instantiated class template.
5216 (do_type_instantiation): Explicitly instantiate members of an
5217 explicitly instantiated class template.
5218 (instantiate_decl): if undefined_ok is nonzero, and if we're
5219 trying to explicitly instantiated a template with no definition,
5220 change it to an implicit instantiation.
5221 (instantiate_pending_templates): Add new argument to instantiate_decl.
5222 * tree.c (cp_cannot_inline_tree_fn): Likewise.
5224 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
5226 * cp-tree.h: Fix typo.
5228 * cp-tree.h: Include cgraph.h
5229 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
5230 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
5232 2004-06-01 Jason Merrill <jason@redhat.com>
5235 * call.c (call_builtin_trap): Remove type parm.
5236 (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
5237 (build_x_va_arg): Dereference a null pointer for a non-POD argument.
5239 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5242 * init.c (build_offset_ref): Build SCOPE_REF with non-null
5243 TREE_TYPE for non-dependent names.
5244 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
5245 unknown_type_node as its TREE_TYPE.
5246 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
5247 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
5248 (dump_expr) <SCOPE_REF case>: Likewise.
5250 2004-06-01 Richard Henderson <rth@redhat.com>
5251 Andrew Pinski <pinskia@physics.uc.edu>
5253 * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
5254 * parser.c (struct cp_parser): Remove in_offsetof.
5255 (cp_parser_new): Don't set it.
5256 (cp_parser_unary_expression): Don't check it.
5257 (cp_parser_postfix_open_square_expression): Split out from ...
5258 (cp_parser_postfix_expression): ... here.
5259 (cp_parser_postfix_dot_deref_expression): Likewise.
5260 (cp_parser_builtin_offsetof): New.
5261 (cp_parser_primary_expression): Use it.
5263 2004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5266 * parser.c (cp_parser_postfix_expression): Allow subscript
5267 operator in offsetof.
5269 2004-05-31 Mark Mitchell <mark@codesourcery.com>
5272 * friend.c (add_friend): Do not try to perform access checks for
5273 functions from dependent classes.
5275 2004-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
5277 * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
5278 (pp_cxx_begin_template_argument_list): Turn into a function.
5279 (pp_cxx_end_template_argument_list): Likewise.
5280 (pp_cxx_separate_with): Define.
5281 (pp_cxx_unqualified_id): Tidy.
5282 (pp_cxx_primary_expression): Likewise.
5283 (pp_cxx_postfix_expression): Likewise.
5284 (pp_cxx_expression): Likewise.
5285 (pp_cxx_simple_type_specifier): Likewise.
5286 (pp_cxx_type_specifier_seq): Likewise.
5287 (pp_cxx_parameter_declaration_clause): Likewise.
5288 (pp_cxx_exception_specification): Likewise.
5289 (pp_cxx_direct_declarator): Likewise.
5290 (pp_cxx_type_id): Likewise.
5291 * cxx-pretty-print.h (pp_cxx_whitespace): Export from
5293 (pp_cxx_left_paren): Likewise.
5294 (pp_cxx_right_paren): Likewise.
5295 (pp_cxx_left_brace): Likewise.
5296 (pp_cxx_right_brace): Likewise.
5297 (pp_cxx_left_bracket): Likewise.
5298 (pp_cxx_right_bracket): Likewise.
5299 (pp_cxx_dot): Likewise.
5300 (pp_cxx_identifier): Likewise.
5301 (pp_cxx_tree_identifier): Likewise.
5302 (pp_cxx_ampersand): New macro.
5303 (pp_cxx_star): Likewise.
5304 (pp_cxx_arrow): Likewise.
5305 (pp_cxx_semicolon): Likewise.
5306 (pp_cxx_complement): Likewise.
5307 (pp_cxx_begin_template_argument_list): Declaree.
5308 (pp_cxx_end_template_argument_list): Likewise.
5309 (pp_cxx_colon_colon): likewise.
5311 2004-05-31 Eric Botcazou <ebotcazou@libertysurf.fr>
5313 * parser.c (cp_parser_simple_type_specifier): Explicitly test
5316 2004-05-31 Kazu Hirata <kazu@cs.umass.edu>
5318 * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
5319 typeck.c: Fix comment formatting.
5321 2004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
5323 * cp-lang.c (cp_expand_decl): Remove.
5324 (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
5326 2004-05-30 Andreas Jaeger <aj@suse.de>
5328 * lang-specs.h: Add missing initializers for .ii.
5330 2004-05-28 Aldy Hernandez <aldyh@redhat.com>
5332 * decl.c (cp_make_fname_decl): Free return value from
5335 2004-05-28 Mark Mitchell <mark@codesourcery.com>
5338 * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
5340 * init.c (build_new): Likewise.
5343 * name-lookup.c (arg_assoc): Robustify.
5346 * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
5347 when determining the scope to use for a pointer to member.
5348 (lookup_anon_field): Give it external linkage.
5349 * cp-tree.h (lookup_anon_field): Declare it.
5350 * expr.c (cplus_expand_constant): Use it.
5352 2004-05-28 Mark Mitchell <mark@codesourcery.com>
5355 * parser.c (cp_parser_simple_type_specifier): Call
5356 maybe_note_name_used_in_class.
5358 2004-05-28 Tom Marshall <tmarshall@real.com>
5361 * class.c (finish_struct_1): Warn only if the dtor is non-private or
5362 the class has friends.
5364 2004-05-27 Adam Nemet <anemet@lnxw.com>
5367 * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
5368 TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
5370 2004-05-24 Geoffrey Keating <geoffk@apple.com>
5372 * method.c (implicitly_declare_fn): Don't call defer_fn; abort
5373 if it might be needed.
5374 * pt.c (mark_decl_instantiated): Only call defer_fn if
5375 the function actually needs processing in finish_file.
5376 * decl2.c (finish_file): Add check that elements in
5377 deferred_fns_used are really needed there. Remove unnecessary
5378 test of DECL_SAVED_TREE.
5380 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
5382 * Make-lang.in: No need to specify $(LIBCPP).
5384 2004-05-23 Mark Mitchell <mark@codesourcery.com>
5387 * parser.c (cp_parser_class_head): Robustify.
5390 * parser.c (cp_parser_decl_specifier_seq): Correct error in
5392 (cp_parser_constructor_declarator_p): Treat attributes
5396 * typeck.c (build_unary_op): Do not attempt to resolve casts to
5397 base classes in templates.
5399 2004-05-23 Mark Mitchell <mark@codesourcery.com>
5402 * pt.c (instantiate_template): Robustify.
5404 2004-05-23 Mark Mitchell <mark@codesourcery.com>
5407 * decl.c (xref_tag): Issue errors about redeclaring template
5408 classes as non-template classes.
5410 2004-05-23 Mark Mitchell <mark@codesourcery.com>
5413 * name-lookup.c (supplement_binding): Allow redefinitions of
5417 * parser.c (cp_parser_template_argument): Robustify.
5419 2004-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
5421 * class.c (alter_access): Use %E format specifier to print an
5422 identifier node. Avoid looking at the IDENTIFIER_POINTER.
5423 (push_lang_context): Likewise.
5424 * decl.c (lookup_label): Likewise.
5425 (grokdeclarator): Likewise.
5426 * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
5427 * pt.c (do_type_instantiation): Likewise.
5428 * tree.c (handle_java_interface_attribute): Likewise.
5429 (handle_com_interface_attribute): Likewise.
5430 (handle_init_priority_attribute): Likewise.
5432 2004-05-22 Mark Mitchell <mark@codesourcery.com>
5436 * pt.c (build_non_dependent_expr): Expand the set of tree nodes
5437 recognized as overloaded functions.
5439 2004-05-22 Mark Mitchell <mark@codesourcery.com>
5442 * class.c (layout_nonempty_base_or_field): Do not try to avoid
5443 layout conflicts for unions.
5446 * typeck.c (build_x_unary_op): Instantiate template class
5447 specializations before looking for "operator &".
5450 * typeck.c (complete_type): Layout non-dependent array types, even
5454 * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
5457 2004-05-22 Roger Sayle <roger@eyesopen.com>
5459 * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
5460 returning when TREE_TYPE is error_mark_node.
5461 * typeck.c (require_complete_type): Return error_mark_node if
5462 value's type is an error_mark_node.
5464 2004-05-20 Andrew Pinski <pinskia@physics.uc.edu>
5466 * optimize.c (calls_setjmp_r): Remove.
5467 (calls_setjmp_p): Remove.
5468 * cp-tree.c (calls_setjmp_p): Remove.
5469 * decl.c (finish_function): Do not call calls_setjmp_p.
5471 2004-05-18 Zack Weinberg <zack@codesourcery.com>
5473 * decl.c (cp_finish_decl): Use mark_decl_referenced.
5474 * decl2.c (maybe_make_one_only): Likewise.
5475 * method.c (use_thunk): Likewise.
5477 2004-05-18 Jason Merrill <jason@redhat.com>
5479 * class.c (build_base_path): Tidy a bit.
5481 2004-05-14 Geoffrey Keating <geoffk@apple.com>
5483 * name-lookup.c (struct scope_binding): New.
5484 (EMPTY_SCOPE_BINDING): New.
5485 (lookup_using_namespace): Take a scope_binding instead of a
5487 (qualified_lookup_using_namespace): Likewise.
5488 (cxx_binding_clear): Delete.
5489 (do_nonmember_using_decl): Use a scope_binding instead of a
5491 (lookup_tag): Don't call select_decl.
5492 (ambiguous_decl): Don't return anything (and change callers to match).
5493 Take a scope_binding as the second parameter.
5494 (lookup_namespace_name): Use a scope_binding instead of a
5496 (unqualified_namespace_lookup): Likewise.
5497 (lookup_qualified_name): Likewise.
5498 (select_decl): Take a scope_binding instead of a cxx_binding.
5499 Use macros rather than hand-coding tests for type-ness.
5501 2004-05-13 Diego Novillo <dnovillo@redhat.com>
5503 * cp-gimplify.c: Rename from cp-simplify.c.
5504 * Make-lang.in, optimize.c: Update.
5506 2004-05-13 Diego Novillo <dnovillo@redhat.com>
5508 Merge from tree-ssa-20020619-branch. See
5509 ChangeLog.tree-ssa for details.
5511 * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
5512 cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
5513 expr.c, init.c, name-lookup.h, optimize.c, parser.c,
5514 pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
5516 * cp-mudflap.c: New file.
5517 * cp-simplify.c:: New file.
5519 2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5522 * decl2.c (check_classfn): For member templates, compare also the
5523 template parameters to match the declaration.
5524 * cp-tree.h: Adjust declaration of check_classfn.
5525 * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
5526 * friend.c (do_friend): Likewise.
5527 * pt.c (tsubst_friend_function): Likewise.
5529 2004-05-01 Zack Weinberg <zack@codesourcery.com>
5531 * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
5532 Instead, dig into the representation type to find the array bound.
5534 2004-04-30 Jason Merrill <jason@redhat.com>
5536 Refer to base members using COMPONENT_REFs where possible.
5537 * class.c (build_simple_base_path): New fn.
5538 (build_base_path): Use it for non-virtual base references.
5539 (layout_class_type): Change base fields to their real type
5540 after layout is done.
5541 * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
5542 * cp-lang.c (cxx_get_alias_set): Use it.
5544 2004-04-30 Kazu Hirata <kazu@cs.umass.edu>
5546 * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
5549 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5552 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
5553 used in integral constant expressions.
5555 2004-04-22 Mark Mitchell <mark@codesourcery.com>
5557 * init.c (build_aggr_init): Fix accidental use of C99 construct in
5560 * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
5562 * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
5563 * decl.c (reshape_init): Use it.
5564 * init.c (perform_member_init): Remove redundant condition.
5565 (build_aggr_init): Adjust to handle brace-enclosed initializers
5567 (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
5569 * parser.c (cp_parser_initializer_clause): Do not set
5570 TREE_HAS_CONSTRUCTOR on the initializer.
5571 * rtti.c (tinfo_base_init): Likewise.
5572 (generic_initializer): Likewise.
5573 (ptr_initializer): Likewise.
5574 (ptm_initializer): Likewise.
5575 (class_initializer): Likewise.
5576 (get_pseudo_ti_init): Likewise.
5577 * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
5579 2004-04-22 Alan Modra <amodra@bigpond.net.au>
5581 * name-lookup.c (anonymous_namespace_name): Make static.
5583 2004-04-19 Roger Sayle <roger@eyesopen.com>
5586 * class.c (build_base_path): Call fold whilst building the NULL
5587 pointer check expression trees.
5589 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
5591 * init.c (build_new_1): Don't use type size argument for Java
5592 _Jv_AllocObject call.
5594 2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
5596 * method.c (make_alias_for_thunk): Remove preprocessor guard on
5597 declaration and definition.
5599 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
5602 * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
5603 than ASM_OUTPUT_DEF.
5605 2004-04-08 Jakub Jelinek <jakub@redhat.com>
5607 * decl2.c (mark_used): Don't segfault if cfun != NULL but
5608 current_function_decl == NULL.
5610 2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
5613 * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
5616 2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5618 * init.c (decl_constant_value): Don't look at DECL_INITIAL
5620 * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
5621 or TREE_SIDE_EFFECTS of a type.
5623 2004-04-02 Nathan Sidwell <nathan@codesourcery.com>
5626 * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
5627 cv-qualifier unification.
5628 * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
5630 2004-04-02 Jan Hubicka <jh@suse.cz>
5632 * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
5633 * cp-tree.h (cp_update_decl_after_saving): Declare.
5634 * tree.c (cp_update_decl_after_saving): Define.
5636 2004-04-01 Mark Mitchell <mark@codesourcery.com>
5639 * typeck.c (get_delta_difference): Call fold before returning the
5642 2004-04-01 Richard Henderson <rth@redhat.com>
5645 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
5646 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
5648 2004-04-01 Mark Mitchell <mark@codesourcery.com>
5651 * name-lookup.c (maybe_push_cleanup_level): Robustify.
5653 2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5655 * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
5657 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5659 * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
5660 * class.c (check_bitfield_decl): Likewise.
5661 * cvt.c (type_promotes_to): Likewise.
5662 * decl.c (finish_enum): Likewise.
5663 * mangle.c (write_builtin_type): Likewise.
5664 * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
5665 * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
5666 (build_binary_op): Likewise.
5668 2004-03-31 Jan Hubicka <jh@suse.cz>
5670 * tree.h (optimize_function): Kill prototype.
5671 * optimize.c (dump_function, optimize_function, dump_finction): Kill.
5672 * semantics.c (expand_body): Kill.
5674 2004-03-30 Mark Mitchell <mark@codesourcery.com>
5677 * decl.c (start_decl_1): Do not decide whether or not to create a
5678 new cleanup level until after the type has been completed.
5681 * pt.c (tsubst_default_argument): Clear current_function_decl.
5683 2004-03-30 Zack Weinberg <zack@codesourcery.com>
5685 * name-lookup.c, parser.c: Use new shorter form of GTY markers.
5687 2004-03-29 Zack Weinberg <zack@codesourcery.com>
5689 * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
5690 is null, just print the literal name and return.
5692 2004-03-25 Kazu Hirata <kazu@cs.umass.edu>
5694 * cxx-pretty-print.c: Fix comment typos.
5696 2004-03-24 Kazu Hirata <kazu@cs.umass.edu>
5698 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
5701 2004-03-23 Ziemowit Laski <zlaski@apple.com>
5703 * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
5704 * mangle.c (write_type): Add call to 'mangle_fundamental_type'
5707 2004-03-23 Zack Weinberg <zack@codesourcery.com>
5709 PR 12267, 12391, 12560, 13129, 14114, 14133
5710 * cp-lang.c (c_reset_state): Delete.
5711 (push_file_scope, pop_file_scope): New stubs.
5712 * parser.c (c_parse_file): Call sorry() here if called more than once.
5714 2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5716 * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
5719 2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5721 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
5723 2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
5725 * error.c (enum pad): Remove.
5726 (dump_qualifiers): Likewise.
5727 (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
5728 (dump_aggr_type): Likewise.
5729 (dump_type_suffix): Likewise.
5730 (dump_simple_decl): Likewise.
5731 (dump_function_decl): Likewise.
5732 (cv_to_string): Likewise.
5733 (dump_type_prefix): Likewise. Adjust return void.
5734 * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
5736 (pp_cxx_template_keyword_if_needed): Document.
5737 (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
5738 (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
5739 MUST_NOT_THROW_EXPR.
5741 2004-03-21 Mark Mitchell <mark@codesourcery.com>
5744 * decl.c (cp_finish_decl): Compute the size of arrays declared in
5745 templates, if their type is non-dependent.
5747 2004-03-19 Mark Mitchell <mark@codesourcery.com>
5749 * call.c (build_op_delete_call): Do not forget the placement
5750 arguments when iterating through mutiple delete operators.
5752 * cp-tree.h (svaed_scope): Remove last_parms.
5753 (NEW_DELETE_OPNAME_P): New macro.
5754 (last_function_parms): Remove.
5755 (do_friend): Adjust prototype.
5756 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
5757 using last_function_parms.
5758 (grokfndecl): Take the PARM_DECLs as an argument, rather than
5759 using last_function_parms.
5760 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
5761 for class-specific operator new and operator delete.
5762 (grok_op_properties): Do not look for allocation functions with
5764 (start_function): Use DECL_ARGUMENTS instead of
5765 last_function_parms.
5766 * decl.h (last_function_parms): Do not declare.
5767 * decl2.c (grokclassfn): Do not use last_function_parms.
5768 * friend.c (do_friend): Remove parmdecls parameter.
5769 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
5770 (pop_from_top_level): Do not restore it.
5771 * pt.c (check_explicit_specialization): Do not adjust
5772 last_function_parms.
5774 * name-lookup.c (do_local_using_decl): Create a local binding for
5775 types brought in via using declarations.
5777 * name-lookup.c (lookup_arg_dependent): Handle block-scope
5778 function declarations correctly.
5780 * semantics.c (finish_id_expression): Correct handling of
5781 conversion operators to dependent types.
5783 * typeck.c (lookup_destructor): Allow the use of destructors from
5786 2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5788 * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
5789 TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
5790 * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
5791 the field is named TEMPLATE_TYPE_PARM_INDEX.
5793 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5796 * parser.c (cp_parser_functional_cast): A cast to anything
5797 but integral or enumaration type is not an integral constant
5799 * pt.c (value_dependent_expression_p): Handle cast expressions
5800 without operands (such as "int()").
5802 2004-03-18 Mark Mitchell <mark@codesourcery.com>
5804 * semantics.c (finish_pseudo_destructor_expr): Allow differing
5805 cv-qualification between the type named by the
5806 pseudo-destructor-name and the object-type.
5808 * search.c (accessible_base_p): Handle non-proper bases.
5810 * name-lookup.c (do_nonmember_using_decl): If a using declaration
5811 refers to a single overloaded function, set the type of the
5813 * tree.c (lvalue_type): Simplify.
5814 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
5816 (build_unary_op): Handle OVERLOADs with known types.
5818 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
5821 * parser.c (cp_parser_postfix_expression): Handle the use of
5822 "typename" in non-dependent contexts. Convert appropriately when
5823 when using a qualified name after "->" or ".".
5825 * call.c (conditional_conversion): Honor the requirement that some
5826 conversions refer to the original object.
5828 2004-03-18 Mark Mitchell <mark@codesourcery.com>
5830 * call.c (build_conditional_expr): Do not call force_rvalue for
5831 operands of void_type when the conditional expression itself has
5833 * name-lookup.c (pushdecl): Don't consider a declaration of a
5834 function named "main" to be an overload of a type named "main".
5835 * parser.c (cp_parser_template_name): Perform name lookup when the
5836 template name is proceeded by "template" if the qualifying scope
5838 * typeck.c (composite_pointer_type_r): Correctly handle
5839 pointer-to-member types.
5840 (build_const_cast): Likewise.
5842 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5844 * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
5845 * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
5846 (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
5847 (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
5848 (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
5849 (TYPEOF_TYPE_EXPR): New macro.
5850 * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
5851 * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
5852 * pt.c (tsubst): Likewise.
5853 * semantics.c (finish_typeof): Likewise.
5854 * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
5855 and TEMPLATE_TYPE_PARM.
5856 * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
5857 (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
5859 2004-03-16 Mark Mitchell <mark@codesourcery.com>
5862 * cp-tree.h (build_new_op): Change prototype.
5863 (build_x_binary_op): Likewise.
5864 * call.c (build_new_op): Add overloaded_p parameter.
5865 * decl2.c (grok_array_decl): Adjust call to build_new_op.
5866 * parser.c (cp_parser_binary_expression): Note that uses of
5867 overloaded operators prevents an expression from being considered
5868 an integral constant.
5869 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
5871 * semantics.c (finish_call_expr): Likewise.
5872 * typeck.c (rationalize_conditional_expr): Likewise.
5873 (build_x_indirect_ref): Likewise.
5874 (build_x_binary_op): Likewise.
5875 (build_x_unary_op): Likewise.
5876 (build_x_compound_expr): Likewise.
5877 (build_modify_expr): Likewise.
5878 * typeck2.c (build_x_arrow): Likewise.
5880 2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
5882 * cp-lang.c, ptree.c: Update copyright.
5884 2004-03-13 Mark Mitchell <mark@codesourcery.com>
5887 * parser.c (cp_parser_non_integral_constant_expression): Encode
5888 more of the idiom that surrounded calls to this function within
5890 (cp_parser_primary_expression): Adjust accordingly.
5891 (cp_parser_postfix_expression): Likewise.
5892 (cp_parser_unary_expression): Likewise.
5893 (cp_parser_cast_expression): Likewise.
5894 (cp_parser_assignment_expression): Likewise.
5895 (cp_parser_expression): Likewise.
5896 (cp_parser_new_expression): Note that new-expressions are not
5897 allowed in integral constant expressions.
5898 (cp_parser_delete_expression): Likewise.
5900 2004-03-12 Matt Austern <austern@apple.com>
5902 * decl2.c (maybe_make_one_only): Look at
5903 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
5904 to make an explicit instantiation weak.
5905 * method.c (use_thunk): Make sure we call comdat_linkage
5907 * pt.c (do_type_instantiation): On systems where weak symbols
5908 don't go in a static archive's TOC, explicit instantiation of a
5909 class must imply *explicit* instantiation of its memeber.
5911 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
5913 * call.c, cp-tree.h, pt.c: Fix comment typos.
5915 2004-03-10 Mark Mitchell <mark@codesourcery.com>
5918 * decl.c (xref_tag): Disregard non-type declarations when
5919 looking up a tagged type.
5921 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
5924 * call.c (convert_like_real): Build a const qualified temporary,
5925 when testing ctor access.
5927 2004-03-09 Mark Mitchell <mark@codesourcery.com>
5929 * call.c (initialize_reference): Fix typo.
5931 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5934 * pt.c (determine_specialization): For member templates, match also
5938 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
5940 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
5942 2004-03-09 Mark Mitchell <mark@codesourcery.com>
5945 * call.c (initialize_reference): Handle initializers that are
5946 class-member access expressions applies to rvalues.
5948 2004-03-09 Mark Mitchell <mark@codesourcery.com>
5951 * name-lookup.c (supplement_binding): Ignore functions that are
5952 marked DECL_ANTICIPATED.
5954 2004-03-08 Mark Mitchell <mark@codesourcery.com>
5957 * class.c (check_field_decls): Complain about non-static data
5958 members of reference type in unions. Propagate
5959 CLASSTYPE_REF_FIELDS_NEED_INIT and
5960 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
5962 * init.c (perform_member_init): Complain about mbmers with const
5963 type that are not explicitly initialized.
5965 2004-03-08 Mark Mitchell <mark@codesourcery.com>
5967 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
5968 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
5969 (lang_identifier): Remove implicit_decl and error_locus.
5970 (IDENTIFIER_IMPLICIT_DECL): Remove.
5971 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
5972 (IDENTIFIER_ERROR_LOCUS): Likewise.
5973 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
5974 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
5975 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
5976 (implicitly_declare): Remove.
5977 * decl.c (warn_extern_redeclared_static): Remove check of
5978 IDENTIFIER_IMPLICIT_DECL.
5979 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
5980 (implicitly_declare): Remove.
5981 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
5982 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
5983 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
5984 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
5985 in the innermost scope, rather than at namespace scope.
5986 * name-lookup.c (push_local_binding): Give it external linkage.
5987 (pushdecl): Remove dead code.
5988 * name-lookup.h (push_local_binding): Declare it.
5989 * ptree.c (cxx_print_identifier): Don't print
5990 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
5991 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
5992 not IDENTIFIER_ERROR_LOCUS.
5993 * typeck.c (build_function_call): Remove dead code.
5995 2004-03-08 Jason Merrill <jason@redhat.com>
5998 * decl.c (xref_tag): Remove attribute handling.
5999 * cp-tree.h: Adjust prototype.
6000 * decl.c, parser.c, rtti.c: Adjust callers.
6001 * parser.c (cp_parser_class_head): Pass back attributes in the
6003 (cp_parser_class_specifier): Adjust.
6005 2004-03-08 Matt Austern <austern@apple.com>
6008 * name-lookup.c (add_decl_to_level): Add extern variables, as well
6009 as static, to static_decls array.
6011 2004-03-05 Jason Merrill <jason@redhat.com>
6013 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
6015 2004-03-04 Geoffrey Keating <geoffk@apple.com>
6017 * decl.c (grokfndecl): Update old incorrect comment.
6018 (grokvardecl): Diagnose C++ variables of type with no linkage.
6020 2004-03-01 Mark Mitchell <mark@codesourcery.com>
6023 * pt.c (build_non_dependent_expr): Do not create a
6024 NON_DEPENDENT_EXPR for a THROW_EXPR.
6026 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
6029 * error.c (dump_expr): Handle THROW_EXPR.
6031 2004-03-01 Mark Mitchell <mark@codesourcery.com>
6034 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
6035 lookup if ordinary name-lookup finds a non-function.
6036 * pt.c (tsubst_copy_and_build): Likewise.
6039 * parser.c (cp_parser_late_parsing_default_args): Check that there
6040 are no extra tokens after the end of the default-argument
6043 2004-03-01 Mark Mitchell <mark@codesourcery.com>
6046 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
6047 having C++ linkage for name-mangling purposes.
6050 * parser.c (cp_parser_direct_declarator): Recognize constructor
6051 declarators that use a template-id to name the class being
6055 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
6056 (tsubst_expr): Do not call tsubst_copy, even when
6057 processing_template_decl.
6059 2004-03-01 Jeff Law <law@redhat.com>
6061 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
6064 2004-02-29 Mark Mitchell <mark@codesourcery.com>
6067 * name-lookup.h (push_scope): Change prototype.
6068 * name-lookup.c (push_scope): Do not reenter the current class
6070 * decl.c (grokfndecl): Check return code from push_scope before
6072 * decl2.c (check_classfn): Likewise.
6073 * parser.c (cp_parser_conversion_function_id): Likewise.
6074 (cp_parser_init_declarator): Likewise.
6075 (cp_parser_direct_declarator): Likewise.
6076 (cp_parser_class_specifier): Likewise.
6077 (cp_parser_class_head): Likewise.
6078 (cp_parser_lookup_name): Likewise.
6079 (cp_parser_constructor_declarator_p): Likewise.
6080 * pt.c (instantiate_class_template): Likewise.
6081 (resolve_typename_type): Likewise.
6083 2004-02-29 Mark Mitchell <mark@codesourcery.com>
6086 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
6090 * class.c (update_vtable_entry_for_fn): Do not go through
6091 covariance machinery if the type returned by an overrider is the
6092 same as the original.
6094 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
6096 * call.c: Fix a comment typo.
6098 2004-02-27 Ziemowit Laski <zlaski@apple.com>
6100 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
6102 2004-02-26 Mark Mitchell <mark@codesourcery.com>
6105 * parser.c (cp_parser_parameter_declaration_list): Commit
6106 to fewer tentative parses.
6108 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6111 * pt.c (dependent_type_p_r): A template template parameter is a
6114 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6117 * mangle.c (write_template_arg_literal): Don't rely on identity for
6120 2004-02-24 Jason Merrill <jason@redhat.com>
6122 * tree.c (build_exception_variant): Use check_qualified_type.
6124 2004-02-23 Zack Weinberg <zack@codesourcery.com>
6125 Kazu Hirata <kazu@cs.umass.edu>
6127 * decl.c (cxx_init_decl_processing): Don't check
6128 flag_writable_strings.
6130 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
6133 * typeck.c (maybe_warn_about_returning_address_of_location):
6134 Change check for VAR_DECL to use DECL_P instead.
6136 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6139 * cvt.c (build_expr_type_conversion): Type must be complete before
6140 looking up for conversions.
6142 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6145 * name-lookup.c (arg_assoc_class): Don't look into template
6146 arguments if it is not a primary template.
6148 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6151 * method.c (use_thunk): Always clone function argument tree.
6153 2004-02-20 Mark Mitchell <mark@codesourcery.com>
6156 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
6159 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
6160 for all type variants.
6162 2004-02-19 Mark Mitchell <mark@codesourcery.com>
6165 * decl.c (duplicate_decls): Return error_mark_node for invalid
6167 * name-lookup.c (push_namespace): Ignore the return value from
6169 * pt.c (push_template_decl_real): Robustify.
6172 * name-lookup.c (push_class_level_binding): Do not complain about
6173 adding a binding for a member whose name is the same as the
6174 enclosing class if the member is located in a base class of the
6177 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6180 * parser.c (cp_parser_new_expression): Parse an ill-formed
6181 direct-new-declarator after a parenthesized type-id to emit good
6184 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
6186 * cp-tree.def, cvt.c: Update copyright.
6188 2004-02-17 Mark Mitchell <mark@codesourcery.com>
6191 * cp-tree.h (abi_version_at_least): Remove.
6192 * mangle.c: Include flags.h.
6194 2004-02-15 Mark Mitchell <mark@codesourcery.com>
6197 * call.c (build_conditional_expr): Handle conversions between
6198 class types which result in differently cv-qualified type
6202 * class.c (delete_duplicate_fields_1): Remove.
6203 (delete_duplicate_fields): Likewise.
6204 (finish_struct_anon): Remove check for members with the same name
6205 as their enclosing class.
6206 (check_field_decls): Do not call duplicate_fields.
6207 * decl.c (grokdeclarator): Remove check for static data members
6208 with the same name as their enclosing class.
6209 * name-lookup.c (push_class_level_binding): Check for members with
6210 the same name as their enclosing class.
6212 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
6215 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
6217 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6220 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
6221 has full set of arguments.
6223 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6226 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
6228 2004-02-13 Mark Mitchell <mark@codesourcery.com>
6231 * cp-tree.h (delete_sanity): Change prototype.
6232 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
6233 Remove dead code. Adjust code to warn about deleting an array.
6234 * typekc.c (decay_conversion): Use build_address and build_nop.
6237 * search.c (accessible_p): Do not check access in thunks.
6240 * call.c (build_conditional_expr): Call force_rvalue on the
6241 non-void operand in the case that one result is a throw-expression
6242 and the other is not.
6244 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
6247 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
6248 the type name and look ahead for ::~, and bail out early with a
6249 better error message if the parse is going to fail.
6251 2004-02-12 Mark Mitchell <mark@codesourcery.com>
6253 * call.c (conversion_kind): New type.
6254 (conversion_rank): Likewise.
6255 (conversion): Likewise.
6256 (CONVERSION_RANK): New macro.
6257 (conversion_obstack): New variable.
6258 (obstack_initialized): Likewise.
6259 (z_candidate): Change type of convs and second_conv.
6260 (candidate_warning): New type.
6261 (IDENTITY_RANK): Remove.
6262 (EXACT_RANK): Likewise.
6263 (PROMO_RANK): Likewise.
6264 (STD_RANK): Likewise.
6265 (PBOOL_RANK): Likewise.
6266 (USER_RANK): Likewise.
6267 (ELLIPSIS_RANK): Likewise.
6268 (BAD_RANK): Likewise.
6269 (ICS_RANK): Likewise.
6270 (ICS_STD_RANK): Likewise.
6271 (ICS_USER_FLAG): Likewise.
6272 (ICS_ELLIPSIS_FLAG): Likewise.
6273 (ICS_THIS_FLAG): Likewise.
6274 (ICS_BAD_FLAG): Likewise.
6275 (NEED_TEMPORARY_P): Likewise.
6276 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
6277 (USER_CONV_CAND): Likewise.
6278 (USER_CONV_FN): Likewise.
6279 (conversion_obstack_alloc): New function.
6280 (alloc_conversion): Likewise.
6281 (validate_conversion_obstack): Likewise.
6282 (alloc_conversions): Likewise.
6283 (build_conv): Adjust to deal with new conversion data structures.
6284 (build_identity_conv): New function.
6285 (build_ambiguous_conv): Likewise.
6286 (standard_conversion): Adjust to deal with new conversion data
6288 (convert_class_to_reference): Likewise.
6289 (direct_reference_binding): Likewise.
6290 (reference_binding): Likewise.
6291 (implicit_conversion): Likewise.
6292 (add_candidate): Likewise.
6293 (add_function_candidate): Likewise.
6294 (add_conv_candidate): Likewise.
6295 (build_builtin_candidate): Likewise.
6296 (print_z_candidate): Likewise.
6297 (merge_conversion_sequences): Likewise.
6298 (build_user_type_conversion_1): Likewise.
6299 (build_user_type_conversion): Likewise.
6300 (build_new_function_call): Likewise.
6301 (build_object_call): Likewise.
6302 (conditional_conversion): Likewise.
6303 (build_conditional_expr): Likewise.
6304 (build_new_op): Likewise.
6305 (build_op_delete_call): Likewise.
6306 (convert_like_real): Likewise.
6307 (build_over_call): Likewise.
6308 (build_new_method_call): Likewise.
6309 (is_subseq): Likewise.
6310 (maybe_handle_implicit_object): Likewise.
6311 (maybe_handle_ref_bind): Likewise.
6312 (compare_ics): Likewise.
6313 (source_type): Likewise.
6314 (add_warning): Likewise.
6316 (can_convert_arg): Likewise.
6317 (can_convert_arg_bad): Likewise.
6318 (perform_implicit_conversion): Likewise.
6319 (perform_direct_initialization_if_possible): Likewise.
6320 (initialize_reference): Likewise.
6321 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
6322 * cp-tree.def (WRAPPER): Likewise.
6323 (IDENTITY_CONV): Remove.
6324 (LVALUE_CONV): Likewise.
6325 (QUAL_CONV): Likewise.
6326 (STD_CONV): Likewise.
6327 (PTR_CONV): Likewise.
6328 (PMEM_CONV): Likewise.
6329 (BASE_CONV): Likewise.
6330 (REF_BIND): Likewise.
6331 (USER_CONV): Likewise.
6332 (AMBIG_CONV): Likewise.
6333 (RVALUE_CONV): Likewise.
6334 * cp-tree.h (tree_wrapper): Remove.
6335 (WRAPPER_ZC): Remove.
6336 (lang_tree_node): Remove wrapper.
6337 (LOOKUP_SPECULATIVELY): Remove.
6338 (build_op_delete_call): Adjust prototype.
6339 (validate_conversion_obstack): Declare.
6340 (build_zc_wrapper): Remove.
6341 * cvt.c (convert_to_reference): Remove dead code.
6342 (ocp_convert): Likewise.
6343 * decl.c (redeclaration_error_message): Correct handling of
6345 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
6346 (cp_tree_node_structure): Remove WRAPPER case.
6347 * decl2.c (finish_file): Call validate_conversion_obstack.
6348 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
6349 (build_op_delete_call): Likewise.
6350 (build_x_delete): Likewise.
6351 (build_delete): Adjust call to build_op_delete_call.
6352 * pt.c (tsubst_friend_declaration): Adjust code to determine
6353 whether or not a friend template is a definition.
6354 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
6355 * tree.c (build_zc_wrapper): Remove.
6357 2004-02-12 Zack Weinberg <zack@codesourcery.com>
6359 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
6360 * cp-tree.h: Don't declare cxx_builtin_type_decls.
6361 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
6362 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
6364 2004-02-10 Mark Mitchell <mark@codesourcery.com>
6366 * typeck.c (lookup_destructor): Fix typo in error message.
6368 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
6370 * call.c, parser.c, tree.c: Fix comment typos.
6372 2004-02-07 Zack Weinberg <zack@codesourcery.com>
6375 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
6376 * decl.c (duplicate_decls, start_function): Likewise.
6378 2004-02-07 Zack Weinberg <zack@codesourcery.com>
6380 * name-lookup.c (pushdecl): Issue shadow warnings directly.
6381 * parser.c (free_parser_stacks): Delete.
6383 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
6385 * rtti.c: Update copyright.
6387 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6390 * decl.c (require_complete_types_for_parms): Do not insert
6391 error_mark_node in the parameter list.
6393 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6396 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
6397 error when terminator can not be found.
6399 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
6401 Make-lang.in (po-generated): Delete.
6403 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
6405 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
6406 targetm.calls.promote_prototypes.
6408 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
6412 2004-01-15 Geoffrey Keating <geoffk@apple.com>
6414 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
6415 (handle_pragma_implementation): Likewise.
6417 2004-02-05 Mark Mitchell <mark@codesourcery.com>
6420 * typeck.c (lookup_destructor): Tweak error message.
6422 2004-02-05 Jan Hubicka <jh@suse.cz>
6424 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
6427 2004-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6430 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
6431 code, only emits the diagnostic now. Added lookup of the identifier
6432 and support for qualified ids.
6433 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
6434 Parse an (invalid) type name as id-expression within a declarator.
6435 (cp_parser_simple_declaration): Use it.
6436 (cp_parser_member_declaration): Likewise.
6437 (cp_parser_make_typename_type): New function. Handle errors through
6438 cp_parser_diagnose_invalid_typename.
6439 (cp_parser_elaborated_type_specifier): Use it.
6441 2004-02-04 Mark Mitchell <mark@codesourcery.com>
6444 * call.c (convert_like_real): Use "converting" rather than
6445 "argument" as the descriptive keyword to
6446 dubious_conversion_warnings.
6447 * typeck.c (convert_for_assignment): Do not call
6448 dubious_conversion_warnings.
6450 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6453 * init.c (build_delete): Emit a more informative error message in
6454 case of an incomplete type, and on the correct source line.
6456 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
6458 * error.c, search.c: Update copyright.
6460 2004-02-04 Mark Mitchell <mark@codesourcery.com>
6463 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
6464 linkage for the typeinfo name string.
6466 2004-02-04 Mark Mitchell <mark@codesourcery.com>
6469 * cp-tree.h (fold_non_dependent_expr): New function.
6470 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
6471 (cp_parser_template_argument): Use fold_non_dependent_expr.
6472 (cp_parser_direct_declarator): Likewise.
6473 * pt.c (fold_non_dependent_expr): New function.
6474 (convert_nontype_argument): Use it.
6475 (tsubst_qualified_id): Simplify.
6476 (tsubst_copy_and_build): Likewise.
6478 2004-02-04 Mark Mitchell <mark@codesourcery.com>
6480 * decl.c (cxx_push_function_context): Do not set
6481 current_function_is_thunk.
6482 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
6485 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6488 * pt.c (more_specialized_class): Increase processing_template_decl
6489 while partial ordering.
6491 2004-02-03 Mark Mitchell <mark@codesourcery.com>
6494 * decl.c (start_function): Do not call pushdecl for any
6495 instantiation or specialization of a primary template.
6497 2004-02-03 Mark Mitchell <mark@codesourcery.com>
6500 * parser.c (cp_parser_class_name): Robustify.
6503 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
6506 * semantics.c (finish_id_expression): Do not return an
6507 IDENTIFIER_NODE when lookup finds a PARM_DECL.
6509 2004-02-03 Mark Mitchell <mark@codesourcery.com>
6512 * pt.c (build_non_dependent_expr): Do not build
6513 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
6516 * semantics.c (finish_id_expression): Do not return an
6517 IDENTIFIER_NODE when lookup finds a VAR_DECL.
6520 * parser.c (cp_parser_simple_declaration): When skipping to the
6521 end of the statement swallow the terminating semicolon.
6523 2004-02-02 Mark Mitchell <mark@codesourcery.com>
6526 * init.c (build_offset_ref): Improve error recovery for invalid
6527 uses of non-static member functions.
6530 * cp-tree.h (cp_build_type_attribute_variant): New function.
6531 * class.c (build_clone): Use cp_build_type_attribute_variant.
6532 * decl.c (duplicate_decls): Likewise.
6533 * pt.c (copy_default_args_to_explicit_spec): Likewise.
6534 (tsubst_function_type): Likewise.
6535 * tree.c (build_exception_variant): Check attributes before
6536 concluding that two types are the same.
6537 (cp_build_type-attribute_variant): New method.
6538 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
6541 * call.c (convert_class_to_reference): Keep better track of
6542 pedantically invalid user-defined conversions.
6544 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6547 * pt.c (tsubst_qualified_id): Improved error message when a type
6548 is expected but not found.
6550 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
6552 * class.c: Fix comment typos.
6554 * error.c: Likewise.
6555 * parser.c: Likewise.
6557 * search.c: Likewise.
6558 * typeck.c: Likewise.
6560 2004-01-30 Richard Henderson <rth@redhat.com>
6563 * method.c (use_thunk): Don't force_target_expr for void thunks.
6564 * tree.c (build_target_expr_with_type): Assert non-void type.
6565 (force_target_expr): Likewise.
6567 2004-01-30 Michael Matz <matz@suse.de>
6569 * parser.c (cp_parser_labeled_statement): Accept case ranges.
6571 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6575 * decl.c (grokdeclarator): Check immediatly type completeness for
6576 non-dependent types.
6578 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6581 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
6582 a sizeof expression.block
6584 2004-01-29 Mark Mitchell <mark@codesourcery.com>
6587 * mangle.c (write_encoding): Correct encoding of member template
6590 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6592 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
6593 template name as it was `<::' (digraph typo).
6594 (cp_parser_nth_token_starts_template_argument_list_p): New function.
6595 (cp_parser_id_expression): Use it.
6596 (cp_parser_nested_name_specifier_opt): Likewise.
6597 (cp_parser_template_name): Likewise.
6598 (cp_parser_class_name): Likewise.
6599 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
6601 2004-01-28 Mark Mitchell <mark@codesourcery.com>
6604 * typeck.c (merge_types): Do not merge attributes into
6608 * parser.c (cp_parser_direct_declarator): Do not prevent
6609 backtracking inside a parenthesized declarator.
6610 (cp_parser_parameter_declaration): Fix typo in comment.
6612 2004-01-28 Jan Hubicka <jh@suse.cz>
6614 * semantics.c (expand_body) Do emit_associated_thunks before
6617 2004-01-27 Devang Patel <dpatel@apple.com>
6619 * name-lookup.c: Include "debug.h"
6620 (do_namespace_alias): Invoke debug_hooks to emit debug info
6621 for namespace alias.
6622 (do_local_using_decl): Invoke debug_hooks to emit debug info
6624 (do_class_using_decl): Same.
6625 (do_toplevel_using_decl): Same.
6626 (do_using_directive): Same.
6627 (cp_emit_debug_info_for_using): New function.
6628 * Make-lang.in (cp/parser.o): Depend on debug.h
6629 (cp/name-lookup.o): Same.
6631 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6633 * cp-tree.h (language_function, lang_type_header): Use
6635 * name-lookup.h (cp_binding_level): Likewise.
6637 2004-01-26 Mark Mitchell <mark@codesourcery.com>
6640 * semantics.c (finish_for_expr): Check for unresolved overloaded
6643 * class.c (add_method): Just check processing_template_decl to
6644 determine whether or not we are within a template.
6645 * decl2.c (maybe_retrofit_in_chrg): Likewise.
6646 * init.c (decl_constant_value): Check the type of the declaration,
6648 * name-lookup.c (maybe_push_to_top_level): Rename to ...
6649 (push_to_top_level): ... this.
6650 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
6651 * pt.c (push_template_decl_real): Reorder condition for speed.
6652 (convert_template_argument): Use dependency-checking functions in
6653 place of uses_template_parms.
6654 (lookup_template_class): Avoid calling uses_template_parms more
6656 (uses_template_parms): Reimplement, using dependency-checking
6658 (instantiate_class_template): Use push_to_top_level, not
6659 maybe_push_to_top_level.
6660 (type_unification_real): Simplify.
6661 (type_dependent_expression_p): Handle OFFSET_REFs and
6663 (any_dependent_template_arguments_p): Handle multiple levels of
6665 * semantics.c (expand_or_defer_fn): Do not check
6666 uses_template_parms for template instantiations.
6667 * typeck.c (comptypes): Avoid calling cp_type_quals.
6669 2004-01-25 Mark Mitchell <mark@codesourcery.com>
6672 * call.c (build_over_call): Do not convert arguments when
6673 processing a template.
6674 * pt.c (build_non_dependent_expr): Do not build a
6675 NON_DEPENDENT_EXPR for arithmetic constants.
6677 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6680 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
6681 returns a TYPE_DECL. no further lookup is required.
6682 * semantics.c (check_template_template_default_arg): A TYPE_DECL
6683 is invalid. Rework to give better diagnostics.
6685 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6688 * pt.c (instantiate_class_template): Add an error_mark_node
6690 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
6692 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
6695 * decl.c (finish_function): Move the call to
6696 finish_fname_decls below the call to
6697 finish_eh_spec_block.
6699 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
6701 * optimize.c, typeck2.c: Update copyright.
6703 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
6705 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
6706 init.c, mangle.c, typeck.c: Update copyright.
6708 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
6710 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
6712 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
6714 * Make-lang.in: Replace $(docdir) with doc.
6715 (c++.info, c++.srcinfo): Dummy entry.
6716 (c++.man, c++.srcman): New rules.
6717 (c++.install-man): Revamp rule.
6719 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
6721 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
6722 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
6723 immediate $(shell) instead of deferred backquote.
6725 2004-01-19 Mark Mitchell <mark@codesourcery.com>
6728 * parser.c (cp_parser_postfix_expression): When encountering
6729 incomplete type on left-hand side of "->" or ".", treat the entire
6730 expression as erroneous.
6733 * call.c (build_field_call): Remove.
6734 (n_build_method_call): Likewise.
6735 (build_method_call): Likewise.
6736 (build_new_method_call): Do not call build_field_call.
6737 * class.c (n_build_method_call): Remove.
6738 (print_class_statistics): Do not print it.
6739 * cp-tree.h (build_method_call): Remove declaration.
6740 (finish_object_call_expr): Likewise.
6741 (build_new_1): Do not use build_method_call.
6742 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
6743 when the function appearing on the right-hand-side of "." or "->"
6744 is not actually a function.
6745 * pt.c (tsubst_copy_and_build): Likewise.
6746 * semantics.c (finish_object_call_expr): Remove.
6748 2004-01-18 Mark Mitchell <mark@codesourcery.com>
6751 * pt.c (tsubst): Use finish_typeof.
6753 2004-01-18 Jason Merrill <jason@redhat.com>
6756 * except.c (build_throw): In a template, set
6757 current_function_returns_abnormally.
6759 2004-01-17 Fred Fish <fnf@intrinsity.com>
6762 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
6763 except don't call array_type_nelts() with a VECTOR_TYPE.
6765 2004-01-16 Jan Hubicka <jh@suse.cz>
6767 * mangle.c (write_mangled_name): Remove inline modifier.
6769 2004-01-16 Mark Mitchell <mark@codesourcery.com>
6772 * decl.c (compute_array_index_type): Fix grammar in comment.
6773 * init.c (build_zero_init): Handle zero-sized arrays correctly.
6776 * call.c (name_as_c_string): Print conversion operator names
6780 * call.c (initialize_reference): Pass -1 for inner parameter to
6783 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6786 * parser.c (cp_parser_base_specifier): Check for an invalid
6787 keyword `typename' and emit an user-friendly error message.
6789 2004-01-15 Geoffrey Keating <geoffk@apple.com>
6792 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
6793 (handle_pragma_implementation): Likewise.
6795 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6798 * typeck.c (build_class_member_access_expr): Allow to access members
6799 of the currently open class.
6800 (finish_class_member_access_expr): Likewise.
6802 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
6805 * name-lookup.c (validate_nonmember_using_decl): Take scope and
6806 name by value, instead of computing them.
6807 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
6808 arguments. Pass them to validate_nonmember_using_decl.
6809 * name-lookup.h (do_local_using_decl): Adjust.
6810 (do_toplevel_using_decl): Likewise.
6811 * parser.c (cp_parser_using_declaration): Likewise.
6812 * pt.c (tsubst_expr): Likewise.
6814 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
6818 * name-lookup.c (qualified_lookup_using_namespace): Search
6819 strongly-associated namespaces first, and only then try other
6822 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
6824 * Make-lang.in (c++.srcextra): Dummy entry.
6826 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6829 * parser.c (cp_parser_template_name): Don't try to parse a
6830 conversion-function-id, as it cannot be a template-name.
6831 (cp_parser_simple_type_specifier): Check for invalid template-ids
6832 even after a built-in type.
6834 2004-01-14 Jan Hubicka <jh@suse.cz>
6837 * pt.c (instantiate_decl): Do not increase function_depth.
6839 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
6843 * parser.c (cp_parser_elaborated_type_specifier): Warn about
6844 attributes and discard.
6845 * decl.c (xref_tag): Don't overwite existing attributes with
6848 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6851 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
6852 is no destructor while looking up a BIT_NOT_EXPR.
6854 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
6856 * cxxfilt.c: Remove unused file.
6858 2004-01-14 Jan Hubicka <jh@suse.cz>
6860 Partial fix to PR c++/12850
6861 * decl2.c (mark_used): Do not proactively instantiate templates
6862 when compiling in unit-at-a-time or not optimizing.
6863 * optimize.c (maybe_clone_body): Do not increase function depth.
6865 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6868 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
6870 2004-01-12 Steven Bosscher <stevenb@suse.de>
6873 * parser.c (cp_parser_member_declaration): Any non-type is also
6874 not a class or a function.
6876 2004-01-12 Jason Merrill <jason@redhat.com>
6879 * class.c (build_base_path): Do not mark vtable references as
6881 (build_vtbl_ref_1): Likewise.
6883 2004-01-12 Richard Henderson <rth@redhat.com>
6886 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
6887 (store_init_value): Use it.
6888 * decl.c (check_initializer): Expect full initialization code
6889 from store_init_value.
6890 * init.c (expand_aggr_init_1): Likewise.
6891 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
6893 2004-01-12 Mark Mitchell <mark@codesourcery.com>
6895 * class.c (layout_class_type): For non-POD class types, also copy
6896 the DECL_SIZE and DECL_MODE of fields to the base class type.
6898 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6901 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
6902 calling regenerate_decl_from_template.
6904 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
6907 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
6908 decl-specifier occurring along with a class definition.
6910 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
6912 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
6913 clauses to comments describing declares_class_or_enum.
6914 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
6917 2004-01-12 Jan Hubicka <jh@suse.cz>
6919 * pt.c (for_each_template_parm): Do not check for duplicates.
6920 (for_each_template_parm): Use walk_tree duplicate checking code.
6922 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
6925 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
6926 is error_mark_node, don't add any more decl_specs.
6927 (cp_parser_init_declarator): After committing to a declaration, if
6928 the decl_specifiers start with error_mark_node, issue an error and
6929 change the type to "int".
6931 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
6934 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
6936 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6940 * pt.c (tsubst): Substitution must fail if we are attempting to
6941 create an array with element type that is an abstract class type.
6942 * decl.c (cp_finish_decl): Strip pointers and array types recursively
6943 before calling abstract_virtuals_error.
6945 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
6947 * name-lookup.c (qualified_lookup_using_namespace): Consider
6948 strong using directives even if we've already found a binding.
6950 2004-01-09 Mark Mitchell <mark@codesourcery.com>
6952 * cp-tree.h (cxx_expand_expr): Change prototype.
6953 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
6955 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6958 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
6959 looking into them recursively. They can be there because of the
6960 new __offsetof__ extension.
6962 2004-01-07 Zack Weinberg <zack@codesourcery.com>
6964 * parser.c (cp_parser_save_member_function_body): Mark the
6967 2004-01-05 Mark Mitchell <mark@codesourcery.com>
6970 * class.c (build_clone): Copy type attributes from the original
6971 function to the clone.
6974 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
6975 references as constant.
6978 * parser.c (cp_parser_explicit_instantiation): Improve error
6980 (cp_parser_require): Improve indication of the error location.
6983 * parser.c (cp_parser_class_head): Reorder logic to check for
6984 invalid qualification.
6986 2004-01-04 Mark Mitchell <mark@codesourcery.com>
6989 * name-lookup.c (lookup_using_namespace): Remove spacesp
6991 (unqualified_namespace_lookup): Likewise.
6992 (lookup_qualified_name): Adjust accordingly.
6993 (lookup_name_real): Likewise.
6994 (lookup_arg_dependent): Do not eliminate the namespace of the
6995 functions found by unqualified name lookup unless that is the
6998 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
7000 * semantics.c (push_deferring_access_checks): Fix format.
7001 (resume_deferring_access_checks): Likewise.
7002 (stop_deferring_access_checks): Likewise.
7003 (pop_deferring_access_checks): Likewise.
7004 (get_deferred_access_checks): Likewise.
7005 (pop_to_parent_deferring_access_checks): Likewise.
7006 (perform_deferred_access_checks): Likewise.
7007 (perform_or_defer_access_check): Likewise.
7009 2004-01-04 Richard Henderson <rth@redhat.com>
7011 * call.c (build_over_call): Don't create a save_expr of an
7012 aggregate, but rather its address.
7014 2004-01-04 Mark Mitchell <mark@codesourcery.com>
7017 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
7018 an offsetof expression.
7020 * parser.c (cp_parser_parameter_declaration): Fix comment.
7023 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
7024 (reference_binding): Set it when appropriate.
7025 (build_temp): New function, split out from ...
7026 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
7027 (initialize_reference): Likewise.
7030 * parser.c (cp_parser): Add in_type_id_in_expr_p.
7031 (cp_parser_new): Initialize it.
7032 (cp_parser_postfix_expression): Set it.
7033 (cp_parser_sizeof_operand): Likewise.
7034 (cp_parser_parameteR_declaration): Do not commit early to tenative
7035 parsers when in_type_id_in_expr_p is set.
7037 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7040 * parser.c (cp_parser_template_argument): Don't call
7041 make_unbound_class_template directly.
7042 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
7043 UNBOUND_CLASS_TEMPLATE tree node.
7045 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
7048 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
7050 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7053 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
7054 (DECL_FUNCTION_TEMPLATE_P): Use it.
7055 (DECL_CLASS_TEMPLATE_P): Likewise.
7056 * parser.c (cp_parser_lookup_name): Add is_template parameter.
7057 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
7058 (cp_parser_template_name): Likewise.
7059 (cp_parser_elaborated_type_specifier): Likewise.
7060 (cp_parser_namespace_name): Likewise.
7061 (cp_parser_class_name): Likewise.
7062 (cp_parser_lookup_name_simple): Likewise.
7064 See ChangeLog.3 for earlier changes.