1 2004-12-14 Mark Mitchell <mark@codesourcery.com>
4 * decl.c (make_typename_type): Do not handle namespace-scoped
6 (tag_name): Handle typename_type.
7 (check_elaborated_type_specifier): Handle typenames.
8 * parser.c (cp_parser_diagnose_invalid_type_name): Improve
10 (cp_parser_elaborated_type_specifier): Use
11 cp_parser_diagnose_invalid_type_name.
13 2004-12-14 Andrew Pinski <pinskia@physics.uc.edu>
16 * init.c (build_zero_init): If the max_index is 0, there is no
17 need to create a RANGE_EXPR.
19 2004-12-14 Mark Mitchell <mark@codesourcery.com>
22 * cp-objcp-common.c (cp_expr_size): Loosen assertion.
24 2004-12-14 Nathan Sidwell <nathan@codesourcery.com>
27 * pt.c (tsubst_copy_and_build): <INDIRECT_REF case> Check that a
28 REFERENCE_REF_P is dereferencing a reference type.
29 * typeck.c (build_static_cast): Convert from reference even in a
31 (build_reinterpret_cast, build_const_cast, build_c_cast): Likewise.
33 2004-12-14 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
35 * parser.c (cp_parser_uncommitted_to_tentative_parse_p): New function.
36 (cp_parser_name_lookup_error): Use it.
37 (cp_parser_check_for_invalid_template_id): Likewise.
38 (cp_parser_skip_to_closing_parenthesis): Likewise.
39 (cp_parser_nested_name_specifier_opt): Likewise.
40 (cp_parser_simple_declaration, cp_parser_template_id): Likewise.
41 (cp_parser_parameter_declaration_list): Likewise.
42 (cp_parser_parameter_declaration): Likewise.
43 (cp_parser_template_name): Let cp_parser_simulate_error perform
45 (cp_parser_committed_to_tentative_parse): Remove.
47 2004-12-13 Andrew Pinski <pinskia@physics.uc.edu>
50 * class.c (build_base_path): Convert the zero constant to the correct
53 2004-12-13 Mark Mitchell <mark@codesourcery.com>
56 * class.c (layout_class_type): Determine the visibility of static
59 2004-12-12 Roger Sayle <roger@eyesopen.com>
62 * cp-gimplify.c (gimplify_if_stmt): Optimize the case where the
63 condition is a constant and the unexecuted clause is empty.
65 2004-12-10 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
68 * parser.c (cp_parser_class_head): Reject typedef-name in class head.
70 2004-12-09 Matt Austern <austern@apple.com>
73 * name-lookup.c (do_nonmember_using_decl): A real function
74 declaration takes precedence over an anticipated declaration.
76 2004-12-09 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
78 * parser.c (cp_parser_member_declaration): Fix comment typo.
80 2004-12-09 Alexandre Oliva <aoliva@redhat.com>
83 * parser.c (cp_parser_template_id): Don't create a CPP_TEMPLATE_ID
86 2004-12-09 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
89 * typeck.c (build_reinterpret_cast_1): Allow cast from vector type.
91 2004-12-09 Nathan Sidwell <nathan@codesourcery.com>
94 * init.c (build_zero_init): Build a RANGE_EXPR for an array
97 2004-12-08 Kelley Cook <kcook@gcc.gnu.org>
99 * typeck.c: Remove DOS line endings.
101 2004-12-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
104 * decl.c (lookup_and_check_tag): Diagnose nested class with
105 the same name as enclosing class.
107 2004-12-08 Nathan Sidwell <nathan@codesourcery.com>
110 * cp-tree.h (REFERENCE_REF_P): New.
111 (CPTI_TYPE_INFO_TYPE): Rename to ...
112 (CPTI_CONST_TYPE_INFO_TYPE): ... here.
113 (CPTI_TYPE_INFO_REF_TYPE): Remove.
114 (type_info_type_node): Rename to ...
115 (const_type_info_type_node): ... here.
116 (type_info_ref_type): Remove.
117 * call.c (build_user_type_conversion): Reformat.
118 (resolve_args): Do not convert_from_reference.
119 (build_object_call): Call convert_from_reference.
120 (prep_operand): Do not convert_from_reference.
121 (build_new_method_call): Likewise.
122 * class.c (build_vfield_ref): Likewise.
123 * cvt.c (convert_to_reference): Likewise.
124 (convert_from_reference): Build INDIRECT_REF here, not with
126 (convert_force): Do not convert_from_reference.
127 (build_expr_type_conversion): Likewise.
128 * decl.c (grok_reference_init): Likewise.
129 * decl2.c (delete_sanity): Likewise.
130 * except.c (initialize_handler_parm): Use POINTER_TYPE_P.
131 * init.c (build_dtor_call): Do not convert_from_reference.
132 * parser.c (cp_parser_template_argument): Unwrap indirected
133 reference. Allow TEMPLATE_PARM_INDEX as an object parm.
134 * pt.c (tsubst_copy_and_build) <case INDIRECT_REF>: Use
135 convert_from_reference, if indicated.
136 <case CALL_EXPR>: Do not convert_from_reference.
137 <case PARM_DECL, VAR_DECL>: Convert_from_reference if needed.
138 (tsubst_initializer_list): Do not convert_from_reference.
139 * rtti.c (init_rtti_processing): Adjust node creation.
140 (throw_bad_typeid): Use const_type_info_type_node.
141 Do not convert_from_reference.
142 (typeid_ok_p): Use const_type_info_type_node.
143 (build_typeid, get_typeid): Always return type_info typed node.
144 (build_dynamic_cast_1): Dont convert_from_reference. Refactor.
145 * semantics.c (finish_stmt_expr_expr): Do not
146 convert_from_reference.
147 (finish_id_expression): Convert_from_reference as appropriate.
148 * typeck.c (decay_conversion): Do not convert_from_reference.
149 (finish_class_member_access_expr): Likewise.
150 (build_indirect_ref): Use POINTER_TYPE_P.
151 (convert_arguments): Do not convert_from_reference.
152 (build_modify_expr): Likewise.
153 (convert_for_initialization): Likewise.
154 * typeck2.c (build_x_arrow): Likewise.
156 2004-12-07 Ziemowit Laski <zlaski@apple.com>
158 * cp-tree.h (struct lang_type_class): Rename 'objc_protocols'
159 field to 'objc_info'.
161 2004-12-07 Kazu Hirata <kazu@cs.umass.edu>
163 * pt.c: Replace a use of first_rtl_op with TREE_CODE_LENGTH.
165 2004-12-07 Roger Sayle <roger@eyesopen.com>
167 * name-lookup.c (leave_scope): We only need to update
168 class_binding_level when leaving a class scope.
170 2004-12-06 Ziemowit Laski <zlaski@apple.com>
172 * cp-tree.h (struct lang_type_class): Add 'objc_protocols' field.
174 2004-12-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
176 PR c++/17011, c++/17971
177 * pt.c (tsubst_copy) <FIELD_DECL case>: Check and diagnose
179 (tsubst_copy_and_build) <COMPONENT_REF case>: Check
180 error_mark_node after member substitution.
181 * semantics.c (finish_id_expression): Call
182 finish_non_static_data_member for non-dependent FIELD_DECL.
184 2004-12-03 Nathan Sidwell <nathan@codesourcery.com>
187 * decl.c (grokdeclarator): Make sure class in pointer to member is
190 2004-12-02 Nathan Sidwell <nathan@codesourcery.com>
193 * parser.c (cp_parser_new_type_id): Move array size expression
195 * init.c (build_new): ... to here.
197 2004-12-02 Nathan Sidwell <nathan@codesourcery.com>
200 * parser.c (cp_parser_class_head): Return NULL_TREE when
201 push_template_decl fails. Update comment.
203 2004-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
205 PR c++/15664, c++/18276
206 * pt.c (tsubst_decl) <TEMPLATE_DECL case>: Reorganize. Correctly
207 tsubst TEMPLATE_DECL that is a TEMPLATE_TEMPLATE_PARM.
209 2004-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
212 * parser.c (cp_parser_type_specifier): Catch template declaration
215 2004-12-01 Matt Austern <austern@apple.com>
217 * name-lookup.c (namespace_binding): Omit alias check for global
220 2004-12-01 Nathan Sidwell <nathan@codesourcery.com>
223 * parser.c (cp_parser_class_name): Check decl's type is not
227 * call.c (standard_conversion): Add FLAGS parameter. Do not allow
228 derived to base conversion when checking constructor
230 (implicit_conversion): Pass FLAGS to standard_conversion.
231 (check_constructir_callable): Disallow conversion functions.
233 2004-11-30 Kazu Hirata <kazu@cs.umass.edu>
235 * parser.c: Fix comment typos.
237 2004-11-27 Mark Mitchell <mark@codesourcery.com>
240 * parser.c (cp_parser_check_for_definition_in_return_type): Take
241 the defined type as a parameter, and inform the user about the
242 possibility of a missing semicolon.
243 (cp_parser_explicit_instantiation): Adjust call to
244 cp_parser_check_for_definition_in_return_type.
245 (cp_parser_init_declarator): Likewise.
246 (cp_parser_member_declaration): Likewise.
249 * cp-tree.def (TYPENAME_TYPE): Remove discussion of implicit
250 typename from comments.
251 * cp-tree.h (TYPENAME_IS_ENUM_P): New macro.
252 (TYPENAME_IS_CLASS_P): Likewise.
253 (make_typename_type): Change prototype.
254 * decl.c (struct_typename_info): New type.
255 (typename_compare): Expect the second argument to be a
256 typename_info, not a tree.
257 (build_typename_type): Add tag_type parameter. Do not create a
258 new type until necessary.
259 (make_typename_type): Add tag_type parameter.
260 * error.c (TYPENAME_TYPE): Print tags other than "typename" if
262 * friend.c (make_friend_class): Adjust call to make_typename_type.
263 * parser.c (cp_parser_make_typename_type): Likewise.
264 (cp_parser_primary_expression): Adjust call to
265 cp_parser_lookup_name.
266 (cp_parser_unqualified_id): Adjust calls to cp_parser_class_name.
267 (cp_parser_class_or_namespace_name): Likewise.
268 (cp_parser_postfix_expression): Adjust calls to
270 (cp_parser_mem_initializer_id): Adjust calls to
271 cp_parser_class_name.
272 (cp_parser_type_parameter): Adjust calls to cp_parser_lookup_name.
273 (cp_parser_template_name): Likewise.
274 (cp_parser_template_argument): Likewise.
275 (cp_parser_type_name): Adjust call to cp_parser_class_name.
276 (cp_parser_elaborated_type_specifier): Adjust calls to
277 make_typename_type and cp_parser_lookup_name.
278 (cp_parser_namespace_name): Likewise.
279 (cp_parser_class_name): Replace type_p parameter with tag_type.
280 Adjust calls to make_typename_type and cp_parser_lookup_name.
281 (cp_parser_class_head): Adjust calls to cp_parser_class_name.
282 (cp_parser_base_specifier): Likewise.
283 (cp_parser_lookup_name): Replace is_type parameter with tag_type.
284 Adjust calls to make_typename_type and lookup_qualified_name.
285 (cp_parser_lookup_name_simple): Adjust call to
286 cp_parser_lookup_name.
287 (cp_parser_constructor_declarator_p): Adjust call to
288 cp_parser_class_name.
289 * pt.c (convert_template_argument): Adjust all to
291 (tsubst_decl): Do not pre-substitute the type of the declaration.
292 (tsubst): Hand off declarations more quickly. Adjust call to
296 * parser.c (cp_parser_postfix_dot_deref_expression): Robustify.
298 2004-11-29 Daniel Jacobowitz <dan@codesourcery.com>
301 * Make-lang.in (cp/decl2.o): Update dependencies.
302 * decl2.c (finish_file): Call maybe_apply_pending_pragma_weaks.
304 2004-11-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
307 * name-lookup.c (pushtag): Change return type to tree.
308 * cp-tree.h (pushtag): Adjust declaration.
309 * decl.c (xref_tag, start_enum): Use return value of pushtag.
310 * pt.c (push_template_decl_real): Return immediately if
311 pushdecl_namespace_level returns error_mark_node.
313 2004-11-27 Kazu Hirata <kazu@cs.umass.edu>
315 * pt.c: Fix a comment typo.
317 2004-11-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
319 Friend class name lookup 4/n
320 * class.c (pushclass): Don't call cxx_remember_type_decls.
321 * cp-tree.h (clear_anon_tags): Remove declaration.
322 * decl.c (grokdeclarator): Don't call lookup_tag_reverse.
323 * name-lookup.c (binding_entry_free, binding_table_free): Comment
325 (binding_table_find_anon_type, binding_table_reverse_maybe_remap,
326 binding_table_remove_anonymous_types, cxx_remember_type_decls,
327 bt_print_entry, clear_anon_tags, follow_tag_typedef, lookup_tag,
328 lookup_tag_reverse): Remove
329 (begin_scope, leave_scope, kept_level_p, print_binding_level):
330 Don't use type_decls field in cp_binding_level.
331 (maybe_process_template_type_declaration, pushtag): Set
332 CLASSTYPE_NESTED_UTDS directly.
333 * name-lookup.h (binding_table_remove_anonymous_types,
334 cxx_remember_type_decls, lookup_tag, lookup_tag_reverse): Remove
336 (cp_binding_level): Remove type_decls field.
338 2004-11-26 Kazu Hirata <kazu@cs.umass.edu>
340 * typeck.c: Fix a comment typo.
342 2004-11-25 Mark Mitchell <mark@codesourcery.com>
345 * class.c (instantiate_type): Treat NON_DEPENDENT_EXPRs with
346 unknown_type as non matching. Tidy up.
347 * pt.c (build_non_dependent_expr): Do not build a
348 NON_DEPENDENT_EXPR for a VAR_DECL.
351 * cp-tree.h (lvalue_or_else): Remove declaration.
352 * tree.c (lvalue_or_else): Remove.
353 * typeck.c (build_unary_op): Adjust call to lvalue_or_else.
354 (build_modify_expr): Likewise.
357 * decl.c (duplicate_decls): Return error_mark_node on error, as
361 * decl.c (grokvardecl): Keep track of whether or not a there was
362 explicit qualification.
363 * name-lookup.c (set_decl_namespace): Complain about explicit
364 qualification of a name within its own namespace.
367 * typeck.c (check_return_expr): Robustify.
369 2004-11-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
371 Friend class name lookup 3/n, PR c++/3332
372 * name-lookup.c (push_inner_scope, pop_inner_scope): New functions.
373 (lookup_type_scope): Don't deal with name from user declaration
375 * name-lookup.h (push_inner_scope, pop_inner_scope): Add declarations.
376 * parser.c (cp_parser_class_specifier): Use push_inner_scope and
379 2004-11-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
381 Friend class name lookup 2/n, PR c++/14513, c++/15410
382 * name-lookup.c (lookup_name_real): Simplify.
383 (lookup_type_scope): Add SCOPE parameter. Handle friend class
385 * name-lookup.h (tag_scope): New enum type.
386 (lookup_type_scope): Adjust declaration.
387 * decl.c (lookup_and_check_tag, xref_tag, xref_tag_from_type):
388 Change bool parameter GLOBALIZED to TAG_SCOPE parameter SCOPE.
389 (start_enum): Likewise. Add assertion test that NAME is
390 IDENTIFIER_NODE. Use anonymous name for dummy ENUMERAL_TYPE in
392 * cp-tree.h (xref_tag, xref_tag_from_type): Adjust declarations.
393 * parser.c (cp_parser_elaborated_type_specifier,
394 cp_parser_class_head): Adjust call to xref_tag.
395 * pt.c (lookup_template_class, instantiate_class_template):
397 * rtti.c (init_rtti_processing, build_dynamic_cast_1,
398 tinfo_base_init, emit_support_tinfos): Likewise.
400 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
402 * g++spec.c, lex.c: Avoid ` as left quote in diagnostics.
404 2004-11-24 Mark Mitchell <mark@codesourcery.com>
407 * name-lookup.c (supplement_binding): Do not allow typedefs to be
408 redefined in class scope.
411 * parser.c (cp_parser_set_decl_type_spec): Do not try to allow
412 redefinitions of builtin types other that "bool" or "wchar_t".
414 2004-11-24 Steven Bosscher <stevenb@suse.de>
416 * decl.c (cxx_init_decl_processing): Don't clear
417 flag_inline_functions.
419 2004-11-24 Mark Mitchell <mark@codesourcery.com>
421 * pt.c (tsubst_function_type): Do not permit function types which
422 return arrays or functions.
425 * parser.c (cp_parser_init_declarator): Do not pop scope twice.
428 * cp-tree.h (CTOR_NAME): Remove.
430 * decl.c (initialize_predefined_identifiers): Add spaces to the
431 end of constructor and destructor names.
433 2004-11-24 Giovanni Bajo <giovannibajo@gcc.gnu.org>
436 * decl.c (start_decl): Check for invalid specialization headers.
438 2004-11-24 Paolo Bonzini <bonzini@gnu.org>
442 * call.c (standard_conversion): Move check for conversions between
444 * typeck.c (ptr_reasonably_similar): ... here.
446 2004-11-23 Ben Elliston <bje@au.ibm.com>
448 * cp-tree.h (context_as_string): Remove extern.
449 * error.c (context_as_string): Remove.
451 * cp-tree.h (cp_type_qual_from_rid): Remove extern.
452 * lex.c (cp_type_qual_from_rid): Remove.
454 * cp-tree.h (do_poplevel): Remove extern.
455 (check_multiple_declarators): Likewise.
456 * semantics.c (do_poplevel): Make static.
457 (check_multiple_declarators): Remove.
459 * cp-tree.h (check_final_overrider): Remove extern.
460 * search.c (check_final_overrider): Make static.
462 * cp-tree.h (build_artificial_parm): Remove extern.
463 * decl2.c (build_artificial_parm): Make static.
465 2004-11-22 Giovanni Bajo <giovannibajo@gcc.gnu.org>
468 * typeck.c (build_unary_op) <CONVERT_EXPR, NEGATE_EXPR>: Unify code.
469 Make sure the result is always a rvalue.
471 2004-11-16 Giovanni Bajo <giovannibajo@gcc.gnu.org>
473 * decl.c (start_preparsed_function): Call check_function_type even
475 (require_complete_types_for_parms): Skip dependent types.
476 (check_function_type): Likewise.
478 2004-11-16 Steven Bosscher <stevenb@suse.de>
480 * Make-lang.in (cp/decl.o, cp/search.o): Don't depend on stack.h.
481 * search.c: Don't include it.
483 2004-11-15 Andrew Pinski <pinskia@physics.uc.edu>
485 * cp-gimplify.c: Include pointer-set.h
486 (cp_genericize_r): Use pointer_sets instead of a hashtable.
487 Also instert the new statement for CLEANUP_STMT.
488 (cp_genericize): Use pointer_sets instead of a hashtable.
489 * Make-lang.in (cp-gimplify.o): Depend on pointer-set.h.
491 2004-11-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
493 Friend class name lookup 1/n, PR c++/18471
494 * decl.c (lookup_and_check_tag): New function.
495 (xref_tag, start_enum): Use it.
496 (check_elaborated_type_specifier): Move TEMPLATE_TYPE_PARM check
497 before !DECL_IMPLICIT_TYPEDEF_P. Also display previously declared
499 * name-lookup.c (lookup_name_current_level): Rename to ...
500 (lookup_name_innermost_nonclass_level): ... this.
501 (lookup_type_scope): New function.
502 * name-lookup.h (lookup_name_current_level): Rename to ...
503 (lookup_name_innermost_nonclass_level): ... this.
504 (lookup_type_scope): Add declaration.
506 2004-11-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
509 * pt.c (coerce_template_parms): Only emit error message about
510 invalid template argument when TF_ERROR.
512 2004-11-12 Mark Mitchell <mark@codesourcery.com>
515 * decl.c (start_decl): Make sure to set *pop_scope_p. Return
516 error_mark_node to indicate errors.
519 * parser.c (cp_parser_direct_declarator): Disallow non-constant
520 array bounds when not inside a function.
523 * pt.c (tsubst_copy_and_build): Do not do Koenig lookup when an
524 unqualified name resolves to a member function.
527 * pt.c (tsubst_copy_and_build): Handle qualified names used from a
528 derived class correctly.
530 * decl2.c (import_export_decl): Fix typo in comment.
531 * tree.c (pod_type_p): Likewise.
533 2004-11-10 Andrew Pinski <pinskia@physics.uc.edu>
535 * typeck.c (cxx_mark_addressable): Add braces around the first if.
537 2004-11-10 Adam Nemet <anemet@lnxw.com>
540 * typeck.c (cxx_mark_addressable): Issue an error if address of an
541 explicit register variable is requested.
543 2004-11-10 Nathan Sidwell <nathan@codesourcery.com>
546 * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK): New.
547 (struct lang_decl_flags): Add thunk_p flag.
548 (struct lang_decl): Remove separate fixed_offset. Place
549 cloned_function and fixed_offset into union.
550 (DECL_CLONED_FUNCTION_P, DECL_CLONED_FUNCTION): Adjust.
551 (DECL_THUNK_P, SET_DECL_THUNK_P): Adjust.
552 (THUNK_FIXED_OFFSET): Adjust.
553 * method.c (make_thunk): Adjust.
555 2004-11-09 Mark Mitchell <mark@codesourcery.com>
558 * init.c (build_new_1): Handle parenthesized type-ids that name an
561 2004-11-09 Joseph S. Myers <joseph@codesourcery.com>
563 * call.c, class.c, decl.c, decl2.c, error.c, mangle.c, parser.c,
564 pt.c, search.c, semantics.c, typeck.c: Use %q, %< and %> for
565 quoting in diagnostics.
566 * parser.c (cp_parser_sizeof_operand): Use '' instead of `' for
567 quoting in printf format.
568 * decl.c (duplicate_decls, start_decl): Use %qD instead of
571 2004-11-08 Kazu Hirata <kazu@cs.umass.edu>
573 * class.c, decl.c, lex.c, name-lookup.c, parser.c, pt.c,
574 search.c, typeck2.c: Fix comment formatting.
576 2004-11-04 Ulrich Weigand <uweigand@de.ibm.com>
578 PR tree-optimization/18184
579 * cp-objcp-common.c (cxx_types_compatible_p): Do not treat pointers
580 of different modes or alias-all flags as equivalent.
581 * typeck.c (comptypes): Likewise.
583 2004-11-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
586 * cp-tree.h (TYPE_REF_OBJ_P): New macro.
587 (TYPE_PTR_P, TYPE_PTROB_P, TYPE_PTROBV_P, TYPE_PTRFN_P,
588 TYPE_REFFN_P): Document.
589 (fold_decl_constant_value): New prototype.
590 * pt.c (convert_nontype_argument_function): Rewrite and extract
592 (fold_decl_constant_value, convert_nontype_argument_function): New.
593 (lookup_template_class): Add comment about useless double call.
594 * mangle.c (write_expression): Strip conversions before lowering
596 * cvt.c (ocp_convert): Check LOOKUP_COMPLAIN for a pedwarn. Disallow
597 enum to enum conversion.
599 2004-11-02 Mark Mitchell <mark@codesourcery.com>
602 * parser.c (cp_parser_type_parameter): Robustify.
605 * parser.c (cp_parser_single_declaration): Disallow template
609 * typeck.c (build_const_cast): Use error_operand_p.
611 2004-11-02 Ziemowit Laski <zlaski@apple.com>
613 * cp-lang.c (cxx_types_compatible_p): Remove prototype and definition.
614 (LANG_HOOKS_TYPES_COMPATIBLE_P): Move to cp-objcp-common.h.
615 * cp-objcp-common.c (cxx_types_compatible_p): Moved definition here
617 * cp-objcp-common.h (cxx_types_compatible_p): Moved prototype here
619 (LANG_HOOKS_TYPES_COMPATIBLE_P): Moved here from cp-lang.c.
621 2004-11-01 Nathan Sidwell <nathan@codesourcery.com>
624 * search.c (check_final_overrider): Deprecate gnu covariant extension.
626 2004-10-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
628 Convert diagnostics to use quoting flag q 9/n
629 * typeck.c (build_x_unary_op, convert_member_func_to_ptr,
630 get_delta_difference): Use new quotation style.
631 * repo.c (reopen_repo_file_for_write): Likewise.
632 * pt.c (do_type_instantiation): Likewise.
633 * parser.c (cp_parser_diagnose_invalid_type_name):
634 * name-lookup.c (push_overloaded_decl, set_decl_namespace):
635 * error.c (cp_print_error_function,
636 print_instantiation_full_context): Likewise.
637 * decl.c (define_label, grok_reference_init,
638 maybe_deduce_size_from_array_init, revert_static_member_fn):
639 * decl2.c (check_classfn): Likewise.
640 * class.c (add_method, check_field_decls, layout_class_type,
641 resolve_address_of_overloaded_function): Likewise.
642 * call.c (build_x_va_arg, build_over_call): Likewise.
644 2004-10-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
646 Convert diagnostics to use quoting flag q 8/n
647 * cvt.c (cp_convert_to_pointer, warn_ref_binding,
648 convert_to_reference, ocp_convert, convert_to_void
649 cp_convert_to_pointer): Use new quotation style.
651 2004-10-31 Mark Mitchell <mark@codesourcery.com>
654 * typeck2.c (store_init_value): Use split_nonconstant_init even
655 for types that require construction.
657 1004-10-28 Matt Austern <austern@apple.com>
660 * cp-tree.h (class_key_or_enum_as_string): Declare.
661 * error.c (class_key_or_enum): Rename to class_key_or_enum_as_string
662 and remove static qualifier.
663 * decl.c (shadow_tag): Warn about ignored attributes in class/struct/
664 union/enum declaration.
666 2004-10-29 Kazu Hirata <kazu@cs.umass.edu>
668 * pt.c: Fix a comment typo.
670 2004-10-28 Nathan Sidwell <nathan@codesourcery.com>
672 * typeck.c (composite_pointer_type): Remove comment about DR 195.
673 (build_reinterpret_cast_1): Revert DR195 patch. Only emit a
674 warning when being pedantic.
675 (build_reinterpet_cast, build_c_cast): Adjust.
677 2004-10-29 Mark Mitchell <mark@codesourcery.com>
680 * decl.c (grokdeclarator): Mark TYPE_DECLs as abstract when they
681 appear in a constructor/destructor that will be cloned.
683 1004-10-28 Matt Austern <austern@apple.com>
686 * decl.c (finish_enum): Handle packed attribute.
687 * parser.c (cp_parser_enum_specifier): Process trailing attributes.
689 2004-10-28 Mark Mitchell <mark@codesourcery.com>
692 * pt.c (instantiate_class_template): Increment
693 processing_template_decl when substituting into a member class
696 2004-10-27 Mark Mitchell <mark@codesourcery.com>
699 * call.c (convert_like_real): Fix formatting.
700 (initialize_reference): When binding a temporary to a base class,
701 ensure that the nominal copy made is to the derived class, not the
705 * parser.c (cp_parser_next_token_ends_template_argument_p): Do not
708 2004-10-27 Andrew Pinski <pinskia@physics.uc.edu>
710 * decl.c (bad_specifiers): Move the q after the %.
712 2004-10-27 Andrew Pinski <pinskia@physics.uc.edu>
714 * parser.c (cp_parser_diagnose_invalid_type_name): Move the q after
717 2004-10-26 Mark Mitchell <mark@codesourcery.com>
719 * name-lookup.c (do_namespace_alias): Use FROB_CONTEXT.
720 * search.c (current_scope): Fix prototype.
723 * search.c (current_scope): Return the innermost non-block scope,
724 not the innermost non-block, non-namespace scope.
725 (at_namespace_scope_p): Adjust accordingly.
726 (dfs_accessible_post): Do not pass namespaces to is_friend.
727 (dfs_walk_once_accessible_r): Likewise.
728 * decl.c (grokvardecl): Adjust call to current_scope.
729 (build_enumerator): Likewise.
730 * parser.c (cp_parser_using_declaration): Likewise.
731 (cp_parser_direct_declarator): Use at_namespace_scope_p instead of
733 (cp_parser_class_head): Adjust call to current_scope.
734 * name-lookup.c (do_namespace_alias): Set the DECL_CONTEXT for the
738 * pt.c (tusbst_copy_and_build): Resolve enumeration constants to
739 their underlying values.
742 * typeck.c (build_binary_op): Honor build_type, even when in a
745 2004-10-26 Nathan Sidwell <nathan@codesourcery.com>
747 * parser.c (cp_lexer_get_preprocessor_token): Remove unneeded
748 padding token checking.
750 2004-10-25 Andrew Pinski <pinskia@physics.uc.edu>
753 * decl.c (grokdeclarator) <case cdk_array>: Remove the call
754 layout_type as it is already done by create_array_type_for_decl.
756 2004-10-22 Nathan Sidwell <nathan@codesourcery.com>
759 * parser.c (eof_token): Make const, correctly initialize rid and
761 (struct cp_lexer): Replace buffer_end pointer with buffer_length
763 (cp_lexer_new_main): Directly grow lexer's buffer here. Don't
765 (cp_lexer_new_from_tokens): Adjust.
766 (cp_lexer_grow_buffer): Remove.
767 (cp_lexer_peek_nth_token, cp_lexer_consume_token,
768 cp_lexer_purge_token): Add const casts.
770 2004-10-21 Mark Mitchell <mark@codesourcery.com>
774 * cp-tree.h (convert_to_base): Change prototype.
775 (build_ptrmemfunc): Likewise.
776 (convert_ptrmem): New function.
777 * call.c (struct conversion): Adjust documentation for base_p.
778 (standard_conversion): Set base_p for ck_pmem conversions as
780 (convert_like_real): Use convert_to_base for ck_pmem and ck_ptr
782 * class.c (convert_to_base): Handle both pointers and objects.
783 Add nonnull parameter.
784 (build_vfield_ref): Adjust call to convert_to_base.
785 * cvt.c (cp_convert_to_pointer): Adjust call to build_ptrmemfunc.
786 (convert_force): Likewise.
787 * typeck.c (build_unary_op): Likewise.
788 (convert_ptrmem): New function.
789 (build_static_cast_1): Use it.
790 (build_reinterpret_cast): Allow conversions to vector types.
791 (get_delta_difference): Add c_cast_p parameter.
792 (build_ptrmemfunc): Likewise. Adjust calls to
793 get_delta_difference.
795 2004-10-21 Andrew Pinski <pinskia@physics.uc.edu>
798 * error.c (cp_error_at): Output the context as it might be
799 different file as the other location.
801 2004-10-21 Kazu Hirata <kazu@cs.umass.edu>
803 * typeck.c: Fix a comment typo.
805 2004-10-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
808 * decl.c (make_unbound_class_template): Add PARM_LIST parameter.
809 * cp-tree.h (make_unbound_class_template): Adjust prototype.
810 * parser.c (cp_parser_lookup_name): Adjust call to
811 make_unbound_class_template.
812 (cp_parser_single_declaration): Handle member class of class
813 template as template friend parsing correctly.
814 * friend.c (is_friend): Call is_specialization_of_friend for
815 template friend class.
816 (make_friend_class): Handle member class of class template as
818 * pt.c (is_specialization_of_friend): Likewise.
819 (instantiate_class_template): Likewise.
820 (tsubst): Adjust call to make_unbound_class_template.
822 2004-10-20 Nathan Sidwell <nathan@codesourcery.com>
824 * typeck.c (composite_pointer_type): Add comment about DR 195
825 (build_reinterpret_cast_1): Add for_reinterpret_cast_p parameter.
826 Allow function pointer conversions that DR195 suggests.
827 (build_reinterpret_cast, build_c_cast): Update
828 build_reinterpret_cast_1 calls.
830 2004-10-20 Kazu Hirata <kazu@cs.umass.edu>
832 * call.c, typeck.c: Fix comment typos.
834 2004-10-20 Nathan Sidwell <nathan@codesourcery.com>
836 * parser.c (cp_token_position): New typedef. Define VEC thereof.
837 (struct cp_lexer): Allow buffer and buffer_end to be NULL. Make
838 next_token and last_token cp_token_position. Make saved_tokens a
839 VEC(cp_token_position).
840 (eof_token): New static variable.
841 (CP_SAVED_TOKENS_SIZE): Rename to ...
842 (CP_SAVED_TOKEN_STACK): ... here.
843 (cp_lexer_new_main): Adjust main lexer creation and buffer
845 (cp_lexer_new_from_tokens): Do not copy the tokens, merely point
846 to the parent buffer. Do not append eof token.
847 (cp_lexer_destroy): Only free buffer if non-NULL. Free token
849 (cp_lexer_next_token, cp_lexer_prev_token): Remove.
850 (cp_lexer_token_position, cp_lexer_token_at): New.
851 (cp_lexer_saving_tokens): Adjust. Make inline.
852 (cp_lexer_advance_token, cp_lexer_token_difference): Remove.
853 (cp_lexer_peek_token_emit_debug_info): Fold into ...
854 (cp_lexer_peek_token): ... here.
855 (cp_lexer_peek_nth_token): Don't peek past EOF.
856 (cp_lexer_consume_token): Set next_token to eof_token, if reaching
858 (cp_lexer_purge_token): Adjust eof setting.
859 (cp_lexer_purge_tokens_after): Likewise.
860 (cp_lexer_save_tokens): Push next_token directly.
861 (cp_lexer_commit_tokens): Adjust.
862 (cp_lexer_rollback_tokens): Pop next_token directly.
863 (cp_parser_check_for_invalid_template_id): Adjust token purging.
864 (cp_parser_translation_unit): Do not consume the EOF.
865 (cp_parser_nested_name_specifier_opt): Adjust token purging.
866 (cp_parser_template_id, cp_parser_template_name): Likewise.
868 2004-10-19 Mark Mitchell <mark@codesourcery.com>
871 * call.c (struct conversion): Add base_p.
872 (convert_like): Add c_cast_p argument.
873 (convert_like_with_conversion): Likewise.
874 (build_conv): Clear base_p.
875 (standard_conversion): Set it, for derived-to-base conversions.
876 (convert_like_real): Add c_cast_p parameter. Handle pointer
877 conversions directly rather than relying on ocp_convert.
878 (perform_direct_initialization_if_possible): Add c_cast_p
880 * cp-tree.h (perform_direct_initialization_if_possible): Change
882 (convert_member_func_to_ptr): New function.
883 * typeck.c (check_for_casting_away_constness): Add diag_fn
885 (build_static_cast_1): New function, split out from ...
886 (build_static_cast): ... here. Use build_static_cast_1.
887 (build_reinterpret_cast_1): New function, split out from ...
888 (build_reinterpret_cast): ... here. Use build_reinterpret_cast_1.
889 (build_const_cast_1): New function, split out from ...
890 (build_const_cast): ... here. Use build_const_cast_1.
891 (build_c_cast): Rewrite to use build_const_cast_1,
892 build_static_cast_1, and build_reinterpret_cast_1.
893 (convert_member_func_to_ptr): New function.
895 2004-10-19 Paolo Bonzini <bonzini@gnu.org>
898 * parser.c (enum cp_parser_prec): Give relational expressions
899 a higher precedence than equality expressions.
901 2004-10-15 Nathan Sidwell <nathan@codesourcery.com>
903 * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Adjust lookup_base call.
904 (ACCESSIBLY_UNIQUELY_DERIVED_P): Remove.
905 (PUBLICLY_UNIQUELY_DERIVED_P): Adjust lookup_base call.
906 (enum base_access): Reorganize.
907 (accessible_base_p, accessible_p): Add consider_local_p parameter.
908 * call.c (standard_conversion): Update comment about
910 (enforce_access): Adjust accessible_p call.
911 (build_over_call): Adjust accessible_base_p call.
912 * class.c (convert_to_base): Adjust lookup_base call.
913 (build_vtbl_ref_1): Likewise.
914 (warn_about_ambiguous_bases): Likewise. Add early exit.
915 * cvt.c (convert_to_pointer_force) Adjust lookup_base call.
916 * search.c (accessible_base_p): Add consider_local_p parameter.
917 (lookup_base): Pass consider_local_p to accessible_base_p call.
918 (friend_accessible_p): Check whether scope is a class member.
919 Remove unnecessary class template check.
920 (accessible_p): Add consider_local_p parameter. Use it.
921 (adjust_result_of_qualified_name_lookup): Adjust lookup_base call.
922 * tree.c (maybe_dummy_object): Likewise.
923 * typeck.c (comp_except_type): Use PUBLICLY_UNIQUELY_DERIVED_P.
924 (build_class_member_access_expr): Adjust lookup_base call.
925 * typeck2.c (binfo_or_else): Likewise.
926 * rtti.c (build_dynamic_cast_1): Access can consider friendship
929 2004-10-17 Giovanni Bajo <giovannibajo@gcc.gnu.org>
932 * decl2.c (grokfield): Apply attributes also to TYPE_DECLs.
934 2004-10-16 Giovanni Bajo <giovannibajo@gcc.gnu.org>
937 * parser.c (cp_parser_parenthesized_expression_list): Fold
938 non-dependent expressions in attribute lists.
940 2004-10-15 Mark Mitchell <mark@codesourcery.com>
943 * decl.c (declare_global_var): Use the return value from pushdecl.
946 * parser.c (cp_parser_simple_declaration): Do not diagnose invalid
947 type names if we have already found a valid type.
948 (cp_parser_member_declaration): Likewise.
951 * parser.c (cp_parser_member_specification_opt): Handle
954 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
956 * dump.c, g++spec.c, repo.c: Update copyright.
958 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
960 * decl.c: Fix a comment typo.
962 2004-10-13 Andrew Pinski <pinskia@physics.uc.edu>
965 * name-lookup.c (parse_using_directive): If we have a
966 error_mark_node, do not set the decl namespace associations
969 2004-10-14 Mark Mitchell <mark@codesourcery.com>
972 * decl.c (cp_finish_decl): Do not call expand_static_init more
973 than once for a single variable.
975 2004-10-14 Matt Austern <austern@apple.com>
977 * Make-lang.in (pt.o): depends on pointer-set.h
978 * cp-tree.h (cp_walk_subtrees): Last argument is pointer_set_t* now.
979 * pt.c (struct pair_fn_data): Use pointer_set_t, not htab_t
980 (for_each_template_parm): Convert from htab_t to pointer_set_t.
981 * tree.c (cp_walk_subtrees): Last argument is pointer_set_t* now.
983 2004-10-13 Andrew Pinski <pinskia@physics.uc.edu>
986 * semantics.c (finish_for_expr): Convert expression to void
987 so that we don't create temporaries for a?b:c.
989 2004-10-13 Kazu Hirata <kazu@cs.umass.edu>
991 * search.c: Fix a comment typo.
993 2004-10-12 Nathan Sidwell <nathan@codesourcery.com>
995 * class.c (dfs_modify_vtables): Simplify condition. Return
996 dfs_skip_bases as appropriate.
997 (modify_all_vtables): Walk in pre-order.
998 * search.c (dfs_walk_all, dfs_walk_once_r,
999 dfs_walk_once_accessible_r): Assert post order function never
1000 returns dfs_skip_bases.
1002 * search.c (struct lookup_base_data_s): New.
1003 (lookup_base_r): Replace with ...
1004 (dfs_lookup_base): ... this.
1005 (lookup_base): Use dfs_walk_all.
1007 2004-10-12 Kazu Hirata <kazu@cs.umass.edu>
1009 * search.c: Fix comment typos.
1011 2004-10-11 Mark Mitchell <mark@codesourcery.com>
1014 * parser.c (cp_parser_declarator): Add member_p parameter.
1015 (cp_parser_condition): Adjust calls to cp_parser_declarator.
1016 (cp_parser_explicit_instantiation): Likewise.
1017 (cp_parser_init_declarator): Likewise.
1018 (cp_parser_direct_declarator): Add member_p parameter. Do not
1019 parse tentatively when parsing the parameters to a member.
1020 (cp_parser_type_id): Adjust calls to cp_parser_declarator.
1021 (cp_parser_parameter_declaration): Likewise.
1022 (cp_parser_member_declaration): Likewise.
1023 (cp_parser_exception_declaration): Likewise.
1026 * cp-tree.h (CLASSTYPE_TEMPLATE_SPECIALIZATION): Add a comment.
1027 * pt.c (optimize_specialization_lookup_p): Do not optimize lookups
1028 for members of partial or explicit specializations.
1031 * decl2.c (finish_anon_union): Robustify.
1033 2004-10-11 Nathan Sidwell <nathan@codesourcery.com>
1035 * cp-tree.h (get_dynamic_cast_base_type): Rename to ...
1036 (dcast_base_hint): ... here.
1037 * rtti.c (build_dynamic_cast_1): Use dcast_base_hint.
1038 * search.c (struct dcast_data_s): New.
1039 (dynamic_cast_base_recurse): Remove. Replace with ...
1040 (dfs_dcast_hint_pre, dfs_dcast_base_post): ... these. New.
1041 (get_dynamic_cast_base_type): Rename to ...
1042 (dcast_base_hint): ... here. Use dfs_walk_once_accessible.
1043 (accessible_r): Remove.
1044 (dfs_accessible_post): New, broken out of accessible_r.
1045 (accessible_p): Use dfs_walk_once_accessible.
1046 (dfs_walk_once_accessible_r): New. From accessible_r.
1047 (dfs_walk_once_accessible): New. From acessible_p.
1049 * cp-tree.h (SAME_BINFO_TYPE_P): New.
1050 * class.c (build_base_path): Use SAME_BINFO_TYPE_P to compare
1052 (convert_to_base_statically, determine_primary_bases,
1053 update_vtable_entry_for_fn, dfs_modify_vtables, build_vtt_inits,
1054 dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
1055 accumulate_vtbl_inits, dfs_accumulate_vtbl_inits,
1056 build_vtbl_initializer, add_vcall_offset_vtbl_entries_1): Likewise.
1057 * init.c (expand_member_init): Likewise.
1058 * search.c (lookup_base_r, dynamic_cast_base_recurse,
1059 binfo_via_virtual, copied_binfo, binfo_for_vbase,
1060 original_binfo): Likewise.
1061 * tree.c (copy_binfo): Likewise.
1063 2004-10-11 Kazu Hirata <kazu@cs.umass.edu>
1065 * semantics.c: Fix comment typos.
1067 2004-10-10 Andrew Pinski <pinskia@physics.uc.edu>
1072 * semantics.c (maybe_cleanup_point_expr): Call
1073 fold_build_cleanup_point_expr.
1074 (maybe_cleanup_point_expr_void): New function.
1075 (add_decl_expr): Call maybe_cleanup_point_expr_void.
1076 (finish_expr_stmt): Likewise.
1077 (finish_return_stmt): Likewise.
1078 (finish_for_expr): Likewise.
1079 (finish_asm_stmt): Likewise.
1080 * typeck.c (condition_conversion): Call
1081 fold_build_cleanup_point_expr.
1083 2004-10-10 Andrew Pinski <pinskia@physics.uc.edu>
1086 * semantics.c (add_decl_expr): If the decl has a size which
1087 has side effects then the decl expression needs a cleanup point.
1089 2004-10-10 Mark Mitchell <mark@codesourcery.com>
1092 * decl.c (grokdeclarator): Robustify error-recovery on invalid
1095 2004-10-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
1097 Convert diagnostics to use quoting flag q 7/n
1098 * typeck.c (composite_pointer_type_r, composite_pointer_type,
1099 cxx_sizeof_or_alignof_type, cxx_sizeof_or_alignof_expr,
1100 string_conv_p, build_class_member_access_expr,
1101 build_class_member_access_expr, lookup_destructor,
1102 finish_class_member_access_expr, build_indirect_ref,
1103 get_member_function_from_ptrfunc, build_function_call,
1104 convert_arguments, build_binary_op, pointer_diff, build_unary_op,
1105 check_for_casting_away_constness, build_static_cast,
1106 build_reinterpret_cast, build_const_cast, build_c_cast,
1107 build_modify_expr, get_delta_difference, build_ptrmemfunc,
1108 dubious_conversion_warnings, convert_for_assignment,
1109 convert_for_initialization,
1110 maybe_warn_about_returning_address_of_local, check_return_expr):
1113 * typeck2.c (error_not_base_type, readonly_error,
1114 abstract_virtuals_error, cxx_incomplete_type_diagnostic,
1115 store_init_value, digest_init, build_x_arrow,
1116 build_m_component_ref, require_complete_eh_spec_types): Likewise.
1118 * tree.c (cp_build_qualified_type_real,
1119 handle_java_interface_attribute, handle_init_priority_attribute):
1122 * semantics.c (finish_asm_stmt, finish_non_static_data_member,
1123 finish_pseudo_destructor_expr,
1124 check_template_template_default_arg, begin_class_definition,
1125 finish_base_specifier, qualified_name_lookup_error,
1126 finish_id_expression, finish_typeof): Likewise.
1128 * search.c (lookup_base, check_final_overrider,
1129 look_for_overrides_r): Likewise.
1131 * rtti.c (get_tinfo_decl, build_dynamic_cast_1): Likewise.
1133 2004-10-09 Mark Mitchell <mark@codesourcery.com>
1136 * error.c (dump_expr): Correct handling of AGGR_INIT_EXPRs using a
1140 * init.c (build_new): Correct comments.
1141 * parser.c (cp_parser_new_expression): Use NULL_TREE for nelts in
1145 * parser.c (cp_parser_postfix_dot_deref_expression): If the
1146 pseduo-destructor-name production does not work, fall back to the
1147 ordinary production.
1150 * tree.c (cp_tree_equal): Handle a BASELINK.
1153 * cp-tree.h (check_var_type): New function.
1154 * decl.c (check_var_type): New function, split out from ...
1155 (grokdeclarator): ... here.
1156 * pt.c (tsubst_decl): Use check_var_type.
1159 * decl.c (grokdeclarator): Disallow declarations of operators as
1162 2004-10-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1165 * error.c (dump_expr): Add missing case for RDIV_EXPR.
1167 2004-10-08 Kazu Hirata <kazu@cs.umass.edu>
1169 * pt.c, search.c: Fix comment typos.
1171 2004-10-08 Nathan Sidwell <nathan@codesourcery.com>
1173 * cp-tree.h (dfs_walk, dfs_walk_real, dfs_unmark, markedp,
1175 (dfs_skip_bases, dfs_walk_all, dfs_walk_once): New.
1176 * class.c (struct find_final_overrider_data): Remove most_derived,
1177 vpath_list and vpath fields. Add path field.
1178 (dfs_find_final_ocerrider_1): Add DEPTH parameter. Adjust.
1179 (dfs_find_final_overrider): Rename to ...
1180 (dfs_find_final_overrider_pre): ... here. Adjust.
1181 (dfs_find_final_overrider_post): Adjust.
1182 (dfs_find_final_overrider_q): Fold into
1183 dfs_find_final_overrider_pre.
1184 (find_final_overrider): Adjust dfs searching.
1185 (dfs_modify_vtables): Don't mark binfo here.
1186 (modify_all_vtables): Use dfs_walk_once.
1187 (build_vtt_inits): Likwise. Use dfs_walk_all.
1188 (dfs_build_secondary_vptr_vtt_inits): Don't mark binfo here.
1189 Return dfs_skip_bases as appropriate.
1190 (dfs_fixup_binfo_vtbls): Return dfs_skip_bases as appropriate.
1191 * init.c (dfs_initialized_vtbl_ptrs): Return dfs_skip_bases as
1192 appropriate. Don't mark binfo here.
1193 (initialize_vtbl_ptrs): Use dfs_walk_once.
1194 * search.c (struct vbase_info): Remove unused struct.
1195 (access_in_type): Use dfs_walk_once.
1196 (dfs_access_in_type): Don't mark binfo here.
1197 (dfs_accessible_queue_p, dfs_accessible_p) Remove.
1199 (accessible_r): ... here. New. Specialize dfs_walk_once.
1200 (accessible_p): Use accessible_r.
1201 (lookup_field_queue_p): Remove. Fold into ...
1202 (lookup_field_r): ... here. Adjust.
1203 (lookup_member): Use dfs_walk_all.
1204 (dfs_walk_real, dfs_walk): Replace with ...
1205 (dfs_walk_all, dfs_walk_once): ... these.
1206 (dfs_walk_once_r, dfs_unmark_r): Workers for dfs_walk_once.
1207 (dfs_unmark, unmarkedp, markedp): Remove.
1208 (dfs_get_pure_virtuals): Don't mark binfo here.
1209 (get_pure_virtuals): Use dfs_walk_once.
1210 (dfs_debug_unmarked_p): Remove. Fold into ...
1211 (dfs_debug_mark): ... here.
1212 (note_debug_info_needed): Use dfs_walk_all.
1214 2004-10-07 Andrew Pinski <pinskia@physics.uc.edu>
1216 * pt.c (tsubst_expr) <case ASM_EXPR>: Look passed the
1217 CLEANUP_POINT_EXPR to get the asm expression.
1219 2004-10-07 Mark Mitchell <mark@codesourcery.com>
1221 * cp-tree.h (ICS_USER_FLAG): Remove comment about obsolete flag.
1222 (DECL_MEMBER_TEMPLATE_P): New macro.
1223 (is_member_template): Remove.
1224 (class_method_index_for_fn): New function.
1225 * pt.c (build_over_call): Use DECL_MEMBER_TEMPLATE_P.
1226 * class.c (finish_struct_methods): Remove out-of-date comment.
1227 * decl.c (copy_fn_p): Use DECL_MBMER_TEMPLATE_P.
1228 * decl2.c (check_classfn): Use DECL_MEMBER_TEMPLATE_P and
1229 class_method_index_for_fn.
1230 * pt.c (is_member_template): Remove.
1231 (is_member_template_class): Likewise.
1232 (optimize_specialization_lookup_p): New function.
1233 (retrieve_specialization): Optimize lookups for members that are
1234 not member templates.
1235 (register_specialization): Adjust accordingly.
1236 (build_template_decl): Add member_template_p parameter. Set
1237 DECL_MEMBER_TEMPLATE_P.
1238 (process_partial_specialization): Adjust call to
1239 retrieve_specialization.
1240 (push_template_decl_real): Determine whether the template is a
1242 (lookup_template_class): Use retrieve_specialization.
1243 (tsubst_decl): Adjust call to retrieve_specialization.
1244 (tsubst_exception_specification): New function.
1246 (tsubst_copy): Use DECL_MEMBER_TEMPLATE_P.
1247 (instantiate_template): Adjust call to retrieve_specialization.
1248 (regenerate_decl_from_template): Do not actually generate a new
1250 (instantiate_decl): Adjust call to retrieve_specialization.
1251 (class_method_index_for_fn): New method.
1253 2004-10-07 Andrew Pinski <pinskia@physics.uc.edu>
1255 * parser.c (cp_parser_asm_definition): Look passed the
1256 CLEANUP_POINT_EXPR to get the asm expression.
1258 2004-10-06 Andrew Pinski <pinskia@physics.uc.edu>
1261 * semantics.c (finish_asm_stmt): Asm expressions need cleanup
1264 2004-10-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
1266 Convert diagnostics to use quoting flag q 6/n
1267 * pt.c (finish_member_template_decl, check_specialization_scope,
1268 maybe_process_partial_specialization, determine_specialization,
1269 check_explicit_specialization, maybe_check_template_type,
1270 process_partial_specialization, check_default_tmpl_args,
1271 push_template_decl_real, redeclare_class_template,
1272 convert_nontype_argument, coerce_template_parms,
1273 lookup_template_class, push_tinst_level,
1274 instantiate_class_template, tsubst_arg_types,
1275 tsubst_function_type, tsubst, tsubst_qualified_id,
1276 tsubst_copy_and_build, check_instantiated_args,
1277 do_decl_instantiation, do_type_instantiation,
1278 invalid_nontype_parm_type_p, check_specialization_namespace,
1279 convert_template_argument, determine_specialization,
1280 check_template_shadow, tsubst_decl
1281 instantiate_pending_templates): Use quoting marks.
1283 2004-10-05 Nathan Sidwell <nathan@codesourcery.com>
1286 * parser.c (cp_parser_postfix_expression): Inhibit Koenig when
1287 unqualified lookup finds a member function.
1289 2004-10-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
1291 Convert diagnostics to use quoting flag q 5/n
1292 * parser.c (cp_parser_name_lookup_error,
1293 cp_parser_diagnose_invalid_type_name,
1294 cp_parser_primary_expression, cp_parser_unqualified_id,
1295 cp_parser_nested_name_specifier_opt, cp_parser_labeled_statement,
1296 cp_parser_jump_statement, cp_parser_simple_declaration,
1297 cp_parser_decl_specifier_seq, cp_parser_mem_initializer_id,
1298 cp_parser_type_parameter, cp_parser_template_id,
1299 cp_parser_template_name, cp_parser_direct_declarator,
1300 cp_parser_parameter_declaration_list, cp_parser_class_head,
1301 cp_parser_base_specifier, cp_parser_lookup_name,
1302 cp_parser_late_parsing_default_args,
1303 cp_parser_optional_template_keyword
1304 cp_parser_elaborated_type_specifier, cp_parser_check_class_key,
1305 cp_parser_check_access_in_redeclaration): Use quoting marks.
1307 * name-lookup.c (supplement_binding, pushdecl,
1308 check_for_out_of_scope_variable, validate_nonmember_using_decl,
1309 do_nonmember_using_decl, lookup_tag, set_decl_namespace,
1310 push_namespace, do_namespace_alias, do_using_directive,
1311 ambiguous_decl, lookup_namespace_name, add_function): Likewise.
1313 * method.c (use_thunk): Likewise.
1315 * lex.c (unqualified_name_lookup_error,
1316 unqualified_fn_lookup_error): Likewise.
1318 2004-10-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
1320 Convert diagnostics to use quoting flag q 4/n
1321 * except.c (decl_is_java_type, build_throw,
1322 is_admissible_throw_operand, check_handlers_1, check_handlers):
1323 Use quoting formats.
1324 * friend.c (add_friend, make_friend_class, do_friend): Likewise.
1325 * init.c (sort_mem_initializers, emit_mem_initializers,
1326 member_init_ok_or_else, expand_member_init, is_aggr_type,
1327 build_offset_ref, build_java_class_ref): Likewise.
1329 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1331 Convert diagnostics to use quoting flag q 3/n
1332 * decl.c (pop_label, duplicate_decls, redeclaration_error_message,
1333 redeclaration_error_message, lookup_label, check_goto,
1334 make_typename_type, make_unbound_class_template,
1335 fixup_anonymous_aggr, check_tag_decl, start_decl, start_decl_1,
1336 grok_reference_init, layout_var_decl, maybe_commonize_var,
1337 check_for_uninitialized_const_var, reshape_init_array,
1338 reshape_init, check_initializer, cp_finish_decl,
1339 member_function_or_else, bad_specifiers, grokfndecl, grokvardecl,
1340 check_static_variable_definition, compute_array_index_type,
1341 create_array_type_for_decl, check_special_function_return_type,
1342 grokdeclarator, check_default_argument, grokparms,
1343 grok_ctor_properties, grok_op_properties,
1344 check_elaborated_type_specifier, xref_tag, finish_enum,
1345 build_enumerator, check_function_type, start_preparsed_function,
1346 store_parm_decls): Use quoting formats.
1347 * decl2.c (grok_array_decl, delete_sanity, check_member_template,
1348 check_java_method, check_classfn, finish_static_data_member_decl,
1349 grokfield, grokbitfield, grok_function_init,
1350 build_anon_union_vars, coerce_new_type, coerce_delete_type,
1351 check_default_args): Likewise.
1352 * parser.c (cp_parser_decl_specifier_seq): Likewise.
1354 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1356 Convert diagnostics to use quoting flag q 2/n
1357 * class.c (build_base_path, add_method, alter_access,
1358 handle_using_decl, check_bases,
1359 maybe_warn_about_overly_private_class, find_final_overrider,
1360 warn_hidden, finish_struct_anon, add_implicitly_declared_members,
1361 check_bitfield_decl, check_field_decls, layout_empty_base,
1362 build_base_field, check_methods, layout_virtual_bases,
1363 warn_about_ambiguous_bases, layout_class_type, finish_struct_1,
1364 resolve_address_of_overloaded_function, instantiate_type,
1365 note_name_declared_in_class): Use format flag "q" for quoting.
1367 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1369 Convert diagnostics to use quoting flag q 1/n
1370 * error.c (locate_error): Ignore quoting flag q.
1371 * call.c (build_user_type_conversion_1, build_operator_new_call,
1372 build_object_call, op_error, build_conditional_expr,
1373 build_new_op, build_op_delete_call, enforce_access,
1374 convert_like_real, convert_arg_to_ellipsis, build_x_va_arg,
1375 convert_default_arg, build_over_call, build_new_method_call,
1376 joust, perform_implicit_conversion, initialize_reference): Use the
1379 2004-10-03 Andrew Pinski <pinskia@physics.uc.edu>
1382 * typeck.c (build_reinterpret_cast): Return if the inner type
1385 2004-10-01 Jan Hubicka <jh@suse.cz>
1387 * semantics.c (expand_body): Update call of tree_rest_of_compilation.
1389 2004-09-30 Nathan Sidwell <nathan@codesourcery.com>
1391 * cp-tree.h (struct lang_decl): Shrink by reordering fields and
1392 turning operator_code and fixed_offset into bitfields.
1394 2004-09-29 Joseph S. Myers <jsm@polyomino.org.uk>
1396 * decl.c (duplicate_decls): Merge TREE_DEPRECATED.
1398 2004-09-29 Jason Merrill <jason@redhat.com>
1400 PR tree-optimization/17697
1401 * decl.c (duplicate_decls): Copy TREE_NOTHROW from newdecl to olddecl.
1403 2004-09-28 Jason Merrill <jason@redhat.com>
1406 * class.c (build_base_field): Set TYPE_MODE.
1408 2004-09-28 Roger Sayle <roger@eyesopen.com>
1411 * g++spec.c (lang_specific_driver): Unrecognized libraries, other
1412 than -lc and -lm, may require linking against libstc++.
1414 2004-09-28 Kazu Hirata <kazu@cs.umass.edu>
1416 * tree.c: Fix a comment typo.
1418 2004-09-28 Nathan Sidwell <nathan@codesourcery.com>
1420 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): Remove.
1421 (struct secondary_vptr_vtt_init_data_s): New.
1422 (build_vtt_inits): Adjust dfs_walkers.
1423 (dfs_build_secondary_vptr_vtt_inits): Caller data is a
1424 secondary_vptr_vtt_init_data_s structure. Adjust.
1425 (dfs_ctor_vtable_bases_queue_p): Remove.
1426 (dfs_fixup_binfo_vtbls): No need to clear BINFO_MARKED. Simplify.
1428 * pt.c (struct get_template_base_data_s): Remove.
1429 (get_template_base_r): Fold into get_template_base.
1430 (get_template_base): Walk base binfos directly in inheritance
1433 2004-09-27 Mark Mitchell <mark@codesourcery.com>
1436 * cp-tree.h (fold_if_not_in_template): New function.
1437 * call.c (build_conditional_expr): Use fold_if_not_in_template.
1438 (build_cxx_call): Likewise.
1439 * cvt.c (convert_to_complex): Likewise.
1440 (ocp_convert): Likewise.
1441 (convert): Likewise.
1442 (convert_force): Likewise.
1443 * decl.c (compute_array_index_type): Clear
1444 processing_template_decl while folding array bounds.
1445 * pt.c (convert_nontype_argument): Clear
1446 processing_template_decl while processing non-type argument
1448 * tree.c (fold_if_not_in_template): New function.
1449 * typeck.c (build_class_member_access_expr): Use
1450 fold_if_not_in_template.
1451 (build_array_ref): Likewise.
1452 (build_binary_op): Likewise. Do not try to optimize computations
1453 when processing templates.
1454 (cp_pointer_int_sum): Use fold_if_not_in_template.
1455 (pointer_diff): Likewise.
1456 (build_unary_op): Likewise.
1457 (build_reinterpret_cast): Likewise.
1458 (get_delta_difference): Likewise.
1459 (expand_ptrmemfunc_cst): Likewise.
1460 (dubious_conversion_warnings): Likewise.
1462 2004-09-27 Matt Austern <austern@apple.com>
1464 * cp/parser.c (struct cp_token): New one-bit field , implicit_extern_c
1465 (cp_lexer_get_preprocessor_token): Set implicit_extern_c for
1466 tokens that come from headers that are implicitly extern "C".
1467 (struct cp_parser): new one-bit field, implicit_extern_c.
1468 (cp_parser_new): Set parser's implicit_extern_c to false.
1469 (cp_parser_translation_unit): Pop lang context if we were in a
1470 header that was implicitly extern "C".
1471 (cp_parser_declaration_seq_opt): Push/pop lang context as
1472 required by the token's and parser's implicit_extern_c.
1474 2004-09-27 Mark Mitchell <mark@codesourcery.com>
1477 * cp-tree.h (shared_member_p): Declare.
1478 * search.c (shared_member_p): Give it external linkage.
1479 * semantics.c (finish_qualified_id_expr): Use it.
1480 (finish_id_expression): Likewise.
1483 * semantics.c (finish_id_expression): Do not add "this->" to
1484 static member functions.
1486 2004-09-27 Nathan Sidwell <nathan@codesourcery.com>
1489 * error.c (dump_type): Change TREE_VEC case into TREE_BINFO.
1491 * class.c (struct count_depth_data): Remove.
1492 (dfs_depth_post, dfs_depth_q): Remove.
1493 (find_final_overrider): Use number of vbase classes as depth
1496 * cp-tree.h (types_overlap_p): Remove.
1497 * search.c (struct overlap_info): Remove.
1498 (dfs_check_overlap, dfs_no_overlap_yet, types_overlap_p): Remove.
1500 * pt.c (GTB_VIA_VIRTUAL, GTB_IGNORE_TYPE): Remove.
1501 (get_template_base_recursive): Remove. Replace with ...
1502 (get_template_base_r): ... this.
1503 (struct get_template_base_data_s): New.
1504 (get_template_base): Use get_template_base_r via dfs_walk. Always
1505 return NULL on failure.
1506 (unify): Remove error_mark_node check from get_template_base result.
1508 2004-09-24 Paolo Bonzini <bonzini@gnu.org>
1510 * parser.c (cp_parser_expression_stack): Clarify why it is
1511 an array of NUM_PREC_VALUES elements.
1512 (cp_parser_binary_expression): Clarify why we do not need to
1513 handle stack overflow.
1515 2004-09-24 Nathan Sidwell <nathan@codesourcery.com>
1518 * search.c (lookup_field_queue_p): Correct check for hidden base.
1520 * search.c (bfs_walk): Remove.
1521 (lookup_member): Use dfs_walk_real.
1522 (dfs_walk_real): Move and adjust documentation from bfs_walk.
1524 2004-09-23 Zack Weinberg <zack@codesourcery.com>
1526 * decl.c (grokfndecl): If ::main is found not to return int,
1527 correct it after issuing a diagnostic.
1528 (grokdeclarator): If the incoming type was error_mark_node, do
1529 not complain about declaring something with no type.
1530 (start_function): Change check for ::main not returning int to
1531 an assertion, as grokfndecl now catches this when the user did it.
1532 * init.c (perform_member_init, sort_mem_initializers)
1533 (emit_mem_initializers): Make most diagnostics be issued on
1534 the line of current_function_decl, not whatever the current
1536 * parser.c (cp_lexer_peek_token_emit_debug_info): Surround
1537 definition and declaration with #ifdef ENABLE_CHECKING.
1538 Avoid unnecessary use of fprintf.
1539 (cp_lexer_print_token, cp_lexer_debug_stream): Adjust stub
1540 definitions to avoid warnings.
1541 (cp_lexer_new_main): Add assertion that first token is not a
1543 (cp_lexer_new_from_token_array): Fold into ...
1544 (cp_lexer_new_from_tokens): ... here. Add assertion that
1545 first token is not a padding token.
1546 (cp_lexer_set_source_position_from_token): Move nearer to callers.
1547 Remove unused lexer argument.
1548 (cp_lexer_peek_token): Just print debugging report (if enabled)
1549 and return lexer->next_token.
1550 (cp_lexer_skip_purged_tokens): Delete.
1551 (cp_lexer_next_token_is, cp_lexer_next_token_is_not): Make
1552 inline, simplify bodies.
1553 (cp_lexer_peek_nth_token): Add debugging report a la
1554 cp_lexer_peek_token.
1555 (cp_lexer_consume_token): Correct commentary. Advance over
1556 purged tokens here. Set current source position here, from
1557 token to be returned. Avoid unnecessary use of fprintf.
1558 (cp_lexer_purge_token): Advance next_token pointer over this and
1559 subsequent purged tokens.
1560 (cp_parser_error): Adjust source position to that of the
1562 (cp_parser_push_lexer_for_tokens, cp_parser_pop_lexer): New functions.
1563 (cp_parser_string_literal): Remove some excessive cleverness.
1564 (cp_parser_enum_specifier): Call start_enum before consuming
1566 (cp_parser_member_declaration): Make the "extra semicolon"
1567 diagnostic consistently-worded with the other place this is
1568 diagnosed. Explicitly set the diagnostic location to the
1569 location of the offending semicolon.
1570 (cp_parser_enclosed_template_argument_list): Use %</%> quoting
1571 in diagnostics. Do not use cp_parser_require. Set location
1572 of diagnostics about improper use of '>>' to location of
1574 (cp_parser_late_parsing_for_member):
1575 Use cp_parser_push_lexer_for_tokens and cp_parser_pop_lexer.
1576 (cp_parser_late_parsing_default_args): Likewise. Manually
1577 move some logic outside the loop.
1579 2004-09-23 Andrew Pinski <pinskia@physics.uc.edu>
1582 * cvt.c (cp_convert_to_pointer): Return early when the type is
1585 2004-09-21 Fariborz Jahanian <fjahanian@apple.com>
1589 * decl.c (grokfndecl): Add new argument "attrlist", use it
1590 to call cplus_decl_attributes.
1591 (start_function): Remove call to cplus_decl_attributes.
1592 * cvt.c (ocp_convert): Add support to use type conversion
1593 function to vector type.
1594 * parser.c (cp_parser_conversion_type_id): Add attributes, if any,
1597 2004-09-23 Paolo Bonzini <bonzini@gnu.org>
1601 * parser.c (cp_parser_token_tree_map_node,
1602 cp_parser_pm_expression, cp_parser_additive_expression,
1603 cp_parser_multiplicative_expression, cp_parser_shift_expression,
1604 cp_parser_relational_expression, cp_parser_equality_expression,
1605 cp_parser_and_expression, cp_parser_exclusive_or_expression,
1606 cp_parser_inclusive_or_expression,
1607 cp_parser_logical_and_expression,
1608 cp_parser_logical_or_expression): Removed.
1609 (enum cp_parser_prec, struct cp_parser_token_tree_map_node,
1610 binops, binops_by_token): New.
1611 (cp_parser_assignment_expression): Use cp_parser_binary_expression.
1612 (cp_parser_new): Initialize binops_by_token.
1613 (cp_parser_binary_expression): Rewritten.
1616 2004-09-23 Kazu Hirata <kazu@cs.umass.edu>
1618 * parser.c: Fix a comment typo.
1620 2004-09-23 Nathan Sidwell <nathan@codesourcery.com>
1623 * decl.c (xref_basetypes): Look through typedefs before checking
1626 2004-09-22 Nathan Sidwell <nathan@codesourcery.com>
1628 * cp-tree.h (unemitted_tinfo_decls): Make a VEC(tree).
1629 * decl2.c (cp_finish_file): Adjust tinfo decl emission loop.
1630 * rtti.c (unemitted_tinfo_decls): Make a VEC(tree).
1631 (init_rtti_processing): Initialize it to something realistic.
1632 (get_tinfo_decl): Adjust pushing the new decl.
1634 * cp-tree.h (struct lang_type_class): Remove marked flags, add
1635 diamond_shaped and repeated_base flags. Reorder to keep 8-bit blocks.
1636 (TYPE_MARKED_P): New.
1637 (CLASSTYPE_DIAMOND_SHAPED_P, CLASSTYPE_REPEATED_BASE_P): New.
1638 (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
1639 CLEAR_CLASSTYPE_MARKED_N): Remove.
1640 (CLASSTYPE_MARKED_*, SET_CLASSTYPE_MARKED_*,
1641 CLEAR_CLASSTYPE_MARKED_*): Remove.
1642 * decl.c (xref_basetypes): Use TYPE_MARKED_P. Determine diamond
1643 shaped and repeated base properties.
1644 * lex.c (cxx_make_type): Don't clear TYPE_ALIAS_SET.
1645 * rtti.c (dfs_class_hint_mark, dfs_class_hint_unmark,
1646 class_hint_flags): Remove.
1647 (get_pseudo_ti_init): Use CLASSTYPE_REPEATED_BASE_P and
1648 CLASSTYPE_DIAMOND_SHAPED_P.
1650 2004-09-21 Ziemowit Laski <zlaski@apple.com>
1652 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved here from
1654 (objcp_tsubst_copy_and_build): Reformat function signature.
1655 * cp-objcp-common.h (objcp_tsubst_copy_and_build): Likewise.
1656 (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved to cp-lang.c.
1658 2004-09-21 Zack Weinberg <zack@codesourcery.com>
1660 * parser.c (cp_lexer_peek_token, cp_lexer_consume_token):
1661 Don't handle CPP_PRAGMA tokens specially.
1662 (cp_lexer_handle_pragma): Use cp_lexer_consume_token. Don't
1663 purge the token; do clear token->value after processing. Add
1664 assertion at beginning that token->value is nonzero.
1665 (cp_parser_statement, cp_parser_declaration_seq_opt): Handle
1666 CPP_PRAGMA as a full statement or declaration in its own right.
1668 2004-09-21 Matt Austern <austern@apple.com>
1671 * decl.c (grokvardecl): Accept declarations of global variables
1672 using anonymous types.
1674 2004-09-21 Roger Sayle <roger@eyesopen.com>
1677 * tree.c (lvalue_p_1): Disallow MIN_EXPR and MAX_EXPR as lvalues
1678 if either operand has side-effects.
1679 * typeck.c (rationalize_conditional_expr): Assert that neither
1680 operand of MIN_EXPR or MAX_EXPR has side-effects.
1681 (build_modify_expr): Add support for MIN_EXPR and MAX_EXPR.
1682 Check that the "lhs" is a valid lvalue, i.e. that neither operand
1683 of a MIN_EXPR or MAX_EXPR has a side-effect.
1685 2004-09-21 Nathan Sidwell <nathan@codesourcery.com>
1687 * cp-tree.h (struct lang_type_header): Remove
1688 uses_multiple_inheritance field.
1689 (TYPE_USES_MULTIPLE_INHERITANCE): Remove.
1690 (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): Remove.
1691 (TYPE_USES_VIRTUAL_BASECLASSES): Remove.
1692 (DECL_NEEDS_VTT_PARM_P): Use CLASSTYPE_VBASECLASSES.
1693 (TYPE_CONTAINS_VPTR_P): Likewise.
1694 * call.c (add_template_candidate_real): Use
1695 CLASSTYPE_VBASECLASSES.
1696 (build_special_member_call): Likewise.
1697 * class.c (finish_struct_bits): Remove
1698 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P & TYPE_USES_VIRTUAL_BASECLASSES
1700 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
1701 (create_vtable_ptr): Remove TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P
1703 (build_vtt_inits): Use CLASSTYPE_VBASECLASSES.
1704 (accumulate_vtbl_inits, build_vbase_offset_vtbl_entries):
1706 * decl.c (xref_basetypes): Remove TYPE_USES_MULTIPLE_INHERITANCE,
1707 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
1709 (cxx_maybe_build_cleanup): Use CLASSTYPE_VBASECLASSES.
1710 * decl2.c (maybe_retrofit_in_chrg): Likewise.
1711 * init.c (expand_member, push_base_cleanups): Likewise.
1712 * pt.c (instantiate_class_template): Remove
1713 TYPE_USES_MULTIPLE_INHERITANCE,
1714 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
1716 * ptree.c (cxx_print_type): Remove TYPE_USES_MULTIPLE_INHERITANCE
1718 * typeck2.c (process_init_constructor): Replace some sorrys with
1721 2004-09-21 Andreas Tobler <a.tobler@schweiz.ch>
1723 * decl.c (reshape_init_array): Initialize max_index_cst to fix
1726 2004-09-20 Mark Mitchell <mark@codesourcery.com>
1729 * pt.c (tsubst): Fix parentheses to accomodate emacs.
1730 (tsubst_baselink): If we get a single function, mark it as used.
1732 2004-09-20 Matt Austern <austern@apple.com>
1733 Zack Weinberg <zack@codesourcery.com>
1735 * decl.c (make_rtl_for_nonlocal_decl, start_preparsed_function):
1736 Apply lbasename to input_filename before passing to get_fileinfo.
1737 * semantics.c (begin_class_definition): Likewise.
1738 * lex.c (handle_pragma_interface): Apply get_fileinfo to the
1739 correct filename. Rename variables to be less confusing.
1740 (handle_pragma_implementation): Likewise. Disable "appears
1741 after file is included" diagnostic.
1743 * parser.c (struct cp_token): Add in_system_header fiag.
1744 (CP_TOKEN_BLOCK_NUM_TOKENS, struct cp_token_block)
1745 (CP_TOKEN_BUFFER_SIZE, cp_token_cache_push_token)
1746 (CPP_NONE, cp_lexer_read_token): Delete.
1747 (struct cp_lexer): Remove first_token, string_tokens,
1748 main_lexer_p fields. Clarify comments.
1749 (struct cp_token_cache): Now just a pair of pointers.
1750 (CP_LEXER_BUFFER_SIZE): New #define.
1751 (CPP_PURGED): New fake token type.
1752 (cp_lexer_new_from_token_array, cp_lexer_destroy)
1753 (cp_lexer_peek_token_emit_debug_info, cp_lexer_skip_purged_tokens)
1754 (cp_lexer_handle_pragma, cp_token_cache_new, cp_parser_string_literal):
1756 (cp_lexer_new_from_tokens): Now a simple wrapper around
1757 cp_lexer_new_from_token_array.
1758 (cp_lexer_set_source_position_from_token): Also update
1760 (cp_lexer_next_token, cp_lexer_prev_token, cp_lexer_advance_token):
1762 (cp_lexer_token_difference): Dont handle wrapping round.
1763 (cp_lexer_new_main): Enable pragma deferral and raw strings,
1764 read the entire translation unit through c_lex_with_flags into
1765 this lexer's buffer, then turn raw strings back off again.
1766 (cp_lexer_grow_buffer): Adjust for buffer no longer being circular.
1767 (cp_lexer_get_preprocessor_token): No need to handle not being
1768 the main lexer. Set token->in_system_header too.
1769 (cp_lexer_peek_token): Skip purged tokens. Feed pragma tokens
1770 to cp_lexer_handle_pragma. No need to call cp_lexer_read_token.
1771 (cp_lexer_peek_nth_token): Likewise.
1772 (cp_lexer_purge_token): Mark the token PURGED, don't shift all
1773 the other tokens down.
1774 (cp_lexer_purge_tokens_after): Likewise.
1775 (cp_lexer_save_tokens, cp_lexer_rollback_tokens): Don't worry
1776 about there being no tokens.
1777 (cp_lexer_print_token): Revise to give useful information on
1779 (struct cp_parser): Add field translate_strings_p.
1780 (cp_parser_new): Initialize it.
1781 (cp_parser_translation_unit): Destroy the lexer when done.
1782 (cp_parser_parameter_declaration): Restructure saving of
1784 (cp_parser_save_member_function_body): Likewise.
1785 (cp_parser_check_for_invalid_template_id)
1786 (cp_parser_nested_name_specifier_opt, cp_parser_template_id):
1787 Adjust calls to cp_lexer_advance_token.
1788 (cp_parser_skip_to_closing_parenthesis, cp_parser_declaration):
1789 No need to fiddle c_lex_string_translate.
1790 (cp_parser_primary_expression, cp_parser_linkage_specification)
1791 (cp_parser_asm_definition, cp_parser_asm_specification_opt)
1792 (cp_parser_asm_operand_list, cp_parser_asm_clobber_list)
1793 Use cp_parser_string_literal.
1794 (cp_parser_attribute_list): Save and restore
1795 parser->translate_strings_p, not c_lex_string_translate.
1796 (cp_parser_cache_group): Delete.
1797 (cp_parser_cache_group_1): Rename cp_parser_cache_group. Do
1798 not take a cache argument.
1800 2004-09-20 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1803 * decl.c (reshape_init): Extract array handling into...
1804 (reshape_init_array): New function. Use integers instead of trees
1805 for indices. Handle out-of-range designated initializers.
1807 2004-09-20 Steven Bosscher <stevenb@suse.de>
1809 * lex.c (cxx_init): Don't set the ridpointer for RID_NULL
1812 2004-09-19 Mark Mitchell <mark@codesourcery.com>
1814 * decl2.c (determine_visibility): Allow class visibility
1815 directives to override targetm.cxx.export_class_data.
1817 2004-09-18 Kazu Hirata <kazu@cs.umass.edu>
1819 * call.c, semantics.c: Follow spelling conventions.
1820 * class.c: Fix a comment typo.
1822 2004-09-16 Geoffrey Keating <geoffk@apple.com>
1825 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
1826 (handle_pragma_implementation): Likewise.
1828 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
1829 Zack Weinberg <zack@codesourcery.com>
1831 * cp-tree.def: Use tree_code_class enumeration constants
1832 instead of code letters.
1833 * call.c, class.c, cp-gimplify.c, cp-lang.c, cxx-pretty-print.c
1834 * mangle.c, pt.c, semantics.c, tree.c, typeck.c:
1835 Update for new tree-class enumeration constants.
1837 2004-09-16 Mark Mitchell <mark@codesourcery.com>
1840 * parser.c (cp_parser_simple_declaration): Commit to tentative
1841 parses after seeing a decl-specifier.
1842 (cp_parser_simple_declaration): Eliminate spurious message.
1843 (cp_parser_init_declarator): Adjust error message.
1846 * lex.c (unqualified_name_lookup_error): Mark the dummy
1847 declaration as used.
1850 * parser.c (cp_parser_nested_name_specifier): Do not resolve
1851 typename types if the user explicitly said "typename".
1853 2004-09-16 Andrew MacLeod <amacleod@redhat.com>
1855 * error.c (dump_decl): Make sure there is lang_specific info before
1856 checking for DTOR and CTOR decls.
1858 2004-09-16 Nathan Sidwell <nathan@codesourcery.com>
1860 * class.c (copy_virtuals): Remove.
1861 (build_primary_vtable): Use copy_list directly.
1862 (build_secondary_vtable): Likewise.
1863 (update_vtable_entry_for_fn): Clear BV_CALL_INDEX here.
1864 (create_vtable_ptr): Likewise.
1866 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
1868 * search.c: Follow spelling conventions.
1870 2004-09-16 Nathan Sidwell <nathan@codesourcery.com>
1872 * cp-tree.h (struct lang_type_class): Make pure_virtuals a
1874 (CLASSTYPE_INLINE_FRIENDS, CLASSTYPE_PURE_VIRTUALS): Update
1876 * call.c (build_new_method_call): Don't confirm a pure virtual is
1877 in CLASSTYPE_PURE_VIRTUALS. Reorder checks. Make it a warning.
1878 * class.c (check_methods): CLASSTYPE_INLINE_FRIENDS is a VEC(tree).
1879 (fixup_inline_methods, finish_struct): Likewise.
1880 * decl.c (finish_method): Likewise.
1881 * search.c (dfs_get_pure_virtuals, get_pure_virtuals):
1882 CLASSTYPE_PURE_VIRTUALS is a VEC(tree).
1883 * typeck2.c (abstract_virtuals_error): Likewise. Truncate the
1884 vector to avoid repeating the list in error messages.
1886 2004-09-15 Mark Mitchell <mark@codesourcery.com>
1888 * cp-objcp-common.h (LANG_HOOKS_COMDAT_GROUP): Define.
1889 * cp-tree.h (cxx_comdat_group): Declare.
1890 * decl.c (cxx_comdat_group): New function.
1892 2004-09-15 Nathan Sidwell <nathan@codesourcery.com>
1894 * search.c (get_pure_virtuals): Remove unused variables.
1896 * cp-tree.h (struct lang_decl_flags): Remove
1897 needs_final_overrider.
1898 (DECL_NEEDS_FINAL_OVERRIDER_P): Remove.
1899 * decl.c (duplicate_decls): Do not copy DECL_NEEDS_FINAL_OVERRIDER_P.
1900 * class.c (finish_struct_bits): Correct comment about
1901 CLASSTYPE_PURE_VIRTUALS.
1902 * search.c (get_pure_virtuals): Remove useless loop.
1904 2004-09-14 Mark Mitchell <mark@codesourcery.com>
1907 * mangle.c (partially_mangled_name): New variable.
1908 (partially_mangled_name_len): Likewise.
1909 (save_partially_mangled_name): New function.
1910 (restore_partially_mangled_name): Likewise.
1911 (write_encoding): Save and restore partially mangled names around
1912 calls to get_mostly_instantiated_function_type.
1913 (write_unqualified_name): Likewise.
1915 2004-09-14 Nathan Sidwell <nathan@codesourcery.com>
1917 * pt.c (unify): Replace gcc_unreachable with gcc_assert.
1919 2004-09-13 Mark Mitchell <mark@codesourcery.com>
1922 * parser.c (cp_parser_id_expression): Correct value for
1924 (cp_parser_nested_name_specifier_opt): Look through typenames as
1926 (cp_parser_template_name): Honor check_dependency_p.
1929 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name):
1933 * pt.c (unify): Add ENUMERAL_TYPE case. Replace sorry with
1936 2004-09-12 Richard Henderson <rth@redhat.com>
1939 * semantics.c (maybe_cleanup_point_expr): Don't call fold.
1940 * typeck.c (condition_conversion): Likewise.
1942 2004-09-11 Richard Henderson <rth@redhat.com>
1945 * pt.c (cur_stmt_expr): Move from tsubst_expr.
1946 (tsubst_expr) <case STMT_EXPR>: Move ...
1947 (tsubst_copy_and_build): ... here.
1949 2004-09-10 Zack Weinberg <zack@codesourcery.com>
1951 * cp-tree.h (interface_only, interface_unknown): Delete declarations;
1952 comment explaining them moved to c-common.h.
1953 * lex.c (interface_only, interface_unknown, extract_interface_info):
1955 (cxx_finish): Don't reset interface_unknown.
1956 (handle_pragma_interface): Don't set interface_only and
1957 interface_unknown; just the like-named fields in finfo.
1958 (handle_pragma_implementation): Adjust comment.
1959 * decl2.c (cp_finish_file): Don't reset interface_only and
1961 * method.c (synthesize_method): Don't reset interface_unknown or
1962 call extract_interface_info.
1963 * pt.c (pop_tinst_level): Don't call extract_interface_info.
1964 * decl.c (start_cleanup_fn): Don't save or restore interface_only
1965 and interface_unknown.
1966 (make_rtl_for_nonlocal_decl): Call get_fileinfo on input_filename
1967 and use the result instead of the interface_only/interface_unknown
1969 (start_preparsed_function): Likewise.
1970 * lex.c (cxx_make_type): Likewise.
1971 * semantics.c (begin_class_definition): Likewise.
1972 (expand_body): Don't call extract_interface_info.
1974 2004-09-10 Ziemowit Laski <zlaski@apple.com>
1976 * decl.c (objc_mark_locals_volatile): Make description of
1977 routine more descriptive; only mark VAR_DECLs at each
1980 2004-09-10 Richard Henderson <rth@redhat.com>
1983 * call.c (build_vfield_ref): Move...
1984 * class.c (build_vfield_ref): ... here. Convert datum to the
1985 primary base containing the vptr.
1986 (make_new_vtable): Simplify build_primary_vtable arguments.
1987 (finish_struct_1): Do not duplicate TYPE_VFIELD.
1988 * typeck.c (build_class_member_access_expr): Don't warn for
1989 null object access to base fields.
1991 2004-09-10 Ziemowit Laski <zlaski@apple.com>
1993 * decl.c (objc_get_current_scope, objc_mark_locals_volatile):
1994 New functions, to be called from ObjC++.
1996 2004-09-10 Kazu Hirata <kazu@cs.umass.edu>
1998 * class.c, cp-tree.h, decl.c, decl2.c, mangle.c,
1999 name-lookup.h, parser.c, search.c, semantics.c, typeck2.c: Fix
2002 2004-09-09 Ziemowit Laski <zlaski@apple.com>
2004 * typeck.c (build_c_cast): Preserve the cast if casting
2005 to and from an Objective-C type.
2007 2004-09-09 Ziemowit Laski <zlaski@apple.com>
2009 * Make-lang.in (cp/typeck.o): Depend on c-common.h.
2010 * typeck.c: Include c-common.h.
2011 (comptypes): For RECORD_TYPEs, call objc_comptypes() and
2012 return the result if nonnegative.
2014 2004-09-09 Zack Weinberg <zack@codesourcery.com>
2016 * decl2.c (import_export_class)
2017 * lex.c (handle_pragma_interface):
2018 Test MULTIPLE_SYMBOL_SPACES with if, not #ifdef.
2020 2004-09-08 Ziemowit Laski <zlaski@apple.com>
2022 * Make-lang.in (cp/semantics.o): Depend on c-common.h.
2023 * semantics.c: Include c-common.h.
2024 (finish_compound_stmt): Call objc_clear_super_receiver().
2026 2004-09-08 Ziemowit Laski <zlaski@apple.com>
2028 * cp-tree.h (do_poplevel): New prototype.
2029 * semantics.c (do_poplevel): Make externally visible.
2031 2004-09-08 Nathan Sidwell <nathan@codesourcery.com>
2033 * cp-tree.h (tree_pair_s): Define a GC'd vector.
2034 * name-lookup.h (cxx_saved_binding, cp_class_binding): Likewise.
2035 * semantics.c (deferred_access): Likewise.
2037 2004-09-06 Daniel Jacobowitz <dan@debian.org>
2039 * semantics.c (expand_body): Assert that we are not nested.
2041 2004-09-06 Zack Weinberg <zack@codesourcery.com>
2043 * decl.c (build_enumerator): Use add_double and int_fits_type_p
2044 instead of cp_build_binary_op, to avoid creating short-lived trees.
2045 * parser.c (cp_parse_type_specifier <RID_ENUM>): Use two-token
2046 lookahead instead of backtracking. Move some code to avoid a
2048 (cp_parser_enum_specifier): Avoid duplication of effort with caller.
2049 Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
2050 (cp_parser_enumerator_list, cp_parser_enumerator_definition):
2051 Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
2053 2004-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2055 * decl.c (grok_declarator): Remove a redundant semicolon.
2057 * parser.c (cp_parser_decl_specifier_seq, cp_parser_type_specifier):
2058 Correct comments describing function parameters.
2060 2004-09-03 Matt Austern <austern@apple.com>
2061 Compile speed improvement.
2062 * parser.c (cp_lexer_print_token): Only define if ENABLE_CHECKING set.
2063 Otherwise define a stub macro that expands to nothing.
2064 (cp_lexer_debugging_p): Only define if ENABLE_CHECKING set. Otherwise
2065 define a stub macro that expands to 0.
2066 (cp_lexer_start_debugging): Only define if ENABLE_CHECKING set.
2067 (cp_lexer_stop_debugging): Likewise.
2068 (cp_lexer_debug_stream): Only define if ENABLE_CHECKING set. Otherwise
2069 define a stub macro that expands to NULL.
2070 (cp_lexer_new_main): Only set debugging_p if ENABLE_CHECKING set.
2071 (cp_lexer_new_from_tokens): Likewise.
2073 2004-09-03 Jan Hubicka <jh@suse.cz>
2075 * decl.c (finish_function): Clean out pointers we no longer need.
2077 2004-09-03 Jan Beulich <jbeulich@novell.com>
2079 * g++spec.c (MATH_LIBRARY_PROFILE): Default to MATH_LIBRARY rather
2082 2004-09-02 Paul Brook <paul@codesourcery.com>
2084 * decl2.c (determine_visibility): Only check data visibility
2087 2004-08-31 Mark Mitchell <mark@codesourcery.com>
2089 * cp-tree.h (DECL_CONSTRUCTION_VTABLE_P): New macro.
2090 * class.c (build_ctor_vtbl_group): Set DECL_CONSTRUCTION_VTABLE_P.
2091 * decl2.c (determine_visibility): Honor
2092 TARGET_CXX_EXPORT_CLASS_DATA.
2094 * class.c (key_method): Rename to ...
2095 (determine_key_method): ... this.
2096 (finish_struct_1): Adjust accordingly.
2097 * cp-tree.h (key_method): Declare.
2098 * decl2.c (maybe_emit_vtables): Determine the key method here if
2099 it has not already been done.
2101 2004-08-31 Ziemowit Laski <zlaski@apple.com>
2103 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-objcp-common.o.
2104 (cp/cp-lang.o): Depend on debug.h, gtype-cp.h and cp/cp-objcp-common.h.
2105 (cp/cp-decl.c): Do not depend on gtype-cp.h.
2106 (cp/cp-objcp-common.o): New target.
2107 * cp-lang.c: Include debug.h, cp-objcp-common.h and gtype-cp.h.
2108 (cxx_get_alias_set, cxx_warn_unused_global_decl, cp_expr_size,
2109 cp_tree_size, cp_var_mod_type_p, cxx_initialize_diagnostics): Move
2110 prototypes and definitions to cp-objcp-common.h and cp-objcp-common.c,
2112 (LANG_HOOKS_TREE_SIZE, LANG_HOOKS_FINISH,
2113 LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_INIT_OPTIONS,
2114 LANG_HOOKS_INITIALIZE_DIAGNOSTICS, LANG_HOOKS_HANDLE_OPTION,
2115 LANG_HOOKS_HANDLE_FILENAME, LANG_HOOKS_MISSING_ARGUMENT,
2116 LANG_HOOKS_POST_OPTIONS, LANG_HOOKS_GET_ALIAS_SET,
2117 LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_EXPAND_EXPR,
2118 LANG_HOOKS_EXPAND_DECL, LANG_HOOKS_PARSE_FILE,
2119 LANG_HOOKS_DUP_LANG_SPECIFIC_DECL, LANG_HOOKS_TRUTHVALUE_CONVERSION,
2120 LANG_HOOKS_SET_DECL_ASSEMBLER_NAME, LANG_HOOKS_MARK_ADDRESSABLE,
2121 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
2122 LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
2123 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_PRINT_ERROR_FUNCTION,
2124 LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL, LANG_HOOKS_WRITE_GLOBALS,
2125 LANG_HOOKS_FUNCTION_INIT, LANG_HOOKS_FUNCTION_FINAL,
2126 LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P,
2127 LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE,
2128 LANG_HOOKS_ATTRIBUTE_TABLE, LANG_HOOKS_TREE_INLINING_WALK_SUBTREES,
2129 LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN,
2130 LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS,
2131 LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P,
2132 LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P,
2133 LANG_HOOKS_TREE_INLINING_VAR_MOD_TYPE_P,
2134 LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN,
2135 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN, LANG_HOOKS_EXPR_SIZE,
2136 LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR,
2137 LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, LANG_HOOKS_MAKE_TYPE,
2138 LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE,
2139 LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
2140 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE, LANG_HOOKS_INCOMPLETE_TYPE_ERROR,
2141 LANG_HOOKS_TYPE_PROMOTES_TO, LANG_HOOKS_REGISTER_BUILTIN_TYPE,
2142 LANG_HOOKS_GIMPLIFY_EXPR, LANG_HOOKS_FOLD_OBJ_TYPE_REF): Move
2143 hooks to cp-objcp-common.h.
2144 (finish_file): New function.
2145 * cp-objcp-common.c: New file.
2146 * cp-objcp-common.h: New file.
2147 * cp-tree.h (cp_finish_file): New prototype.
2148 * decl.c: Do not include gtype-cp.h.
2149 * decl2.c (finish_file): Rename to cp_finish_file.
2151 2004-08-31 Richard Henderson <rth@redhat.com>
2154 * pt.c (tsubst_expr): Move OFFSETOF_EXPR handling ...
2155 (tsubst_copy_and_build): ... here.
2157 2004-08-30 Mark Mitchell <mark@codesourcery.com>
2159 * cp-tree.h (initialize_artificial_var): Declare.
2160 * decl.c (initialize_artifical_var): New function.
2161 * class.c (initialize_array): Remove.
2162 (initialize_vtable): Use initialize_artificial_var.
2163 (build_vtt): Likewise.
2164 (build_ctor_vtbl_group): Likewise.
2166 2004-08-30 Richard Henderson <rth@redhat.com>
2168 * class.c (build_base_path): Use build_address directly.
2169 * typeck.c (build_unary_op): Don't lower &a.b to pointer
2170 arithmetic directly.
2171 * typeck2.c (store_init_value): Don't assume !TREE_CONSTANT
2172 means !initializer_constant_valid_p.
2174 2004-08-30 Richard Henderson <rth@redhat.com>
2176 * class.c (fixed_type_or_null): Use get_base_address before
2177 assuming an ADDR_EXPR is non-null.
2179 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
2181 * name-lookup.c (pop_binding, pushdecl,
2182 set_identifier_type_value_with_scope, push_overloaded_decl,
2183 arg_assoc_type): Replace abort with gcc_assert or gcc_unreachable.
2184 * parser.c (cp_parser_diagnose_invalid_type_name,
2185 cp_parser_postfix_expression, cp_parser_unary_expression,
2186 cp_parser_check_declarator_template_para): Likewise.
2187 * pt.c (push_inline_template_parms_recursive,
2188 check_explicit_specialization, convert_nontype_argument,
2189 coerce_template_template_parms, uses_template_parms,
2190 instantiate_class_template, tsubst_decl, tsubst, tsubst_copy,
2191 tsubst_expr, instantiate_template,
2192 maybe_adjust_types_for_deduction, type_unification_real,
2193 resolve_overloaded_unification, template_decl_level,
2194 type_dependent_expression_p): Likewise.
2195 * search.c (lookup_base_r): Likewise.
2196 * semantics.c (finish_stmt_expr, simplify_aggr_init_expr): Likewise.
2197 * tree.c (lvalue_p_1, count_functions, cxx_printable_name,
2198 verify_stmt_tree_r, get_type_decl, stabilize_call): Likewise.
2199 * typeck.c (common_type, get_member_function_from_ptrfunc,
2200 build_binary_op, build_unary_op, expand_ptrmemfunc_cst): Likewise.
2201 * typeck2.c (cxx_incomplete_type_diagnostic,
2202 split_nonconstant_init_1, store_init_value,
2203 process_init_constructor): Likewise.
2205 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
2207 * call.c (check_dtor_name): Replace abort with gcc_assert or
2209 (build_call, add_builtin_candidate, build_new_op,
2210 convert_like_real, build_over_call, in_charge_arg_for_name,
2211 source_type, joust): Likewise.
2212 * class.c (build_simple_base_path, get_vcall_index,
2213 finish_struct_1, instantiate_type, get_enclosing_class,
2214 add_vcall_offset_vtbl_entries_1, cp_fold_obj_type_ref): Likewise.
2215 * cp-gimplify.c (cp_genericize): Likewise.
2216 * cp-lang.c (cp_expr_size, cp_tree_size): Likewise.
2217 * cvt.c (cp_convert_to_pointer, ocp_convert): Likewise.
2218 * decl.c (poplevel, make_unbound_class_template, reshape_init,
2219 check_special_function_return_type, grokdeclarator,
2220 grok_op_properties, tag_name, xref_tag, start_preparsed_function,
2221 finish_function): Likewise.
2222 * decl2.c (grokfield, maybe_emit_vtables):Likewise.
2223 * error.c (dump_global_iord, dump_decl, dump_template_decl,
2224 language_to_string): Likewise.
2225 * except.c (choose_personality_routine): Likewise.
2226 * friend.c (do_friend): Likewise.
2227 * g++spec.c (lang_specific_driver): Likewise.
2228 * init.c (build_zero_init, expand_default_init, build_new_1,
2229 build_vec_delete_1, build_vec_init, build_dtor_call): Likewise.
2230 * lex.c (retrofit_lang_decl, cp_type_qual_from_rid): Likewise.
2231 * mangle.c (add_substitution, write_unscoped_name,
2232 write_template_prefix, write_identifier,
2233 write_special_name_destructor, write_type, write_builtin_type,
2234 write_expression, write_template_param,
2235 write_java_integer_type_codes): Likewise.
2236 * method.c (implicitly_declare_fn): Likewise.
2238 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
2240 * cp-tree.h (BINFO_PRIMARY_P): Use a binfo flag.
2241 (BINFO_INDIRECT_PRIMARY_P): Remove.
2242 * class.c (determine_primary_base): Rename to ...
2243 (determine_primary_bases): ... here. Set all primary bases.
2244 (set_primary_base): Remove.
2245 (mark_primary_bases): Remove.
2246 (build_simple_base_path, walk_subobject_offsets,
2247 propagate_binfo_offsets, end_of_class): Adjust.
2248 (layout_class_type): Rename determine_primary_base call.
2249 (dump_class_hierarchy_r, dump_vtable): Adjust. Don't pass a binfo
2251 (dfs_build_secondary_vptr_vtt_inits, dfs_accumulate_vtbl_inits,
2252 build_rtti_vtbl_entries): Adjust.
2253 * init.c (build_vtbl_address): Adjust.
2255 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Use gcc_assert.
2257 2004-08-28 Ziemowit Laski <zlaski@apple.com>
2259 * Make-lang.in (CXX_OBJS): Split up into CXX_OBJS and
2260 CXX_AND_OBJCXX_OBJS.
2261 (CXX_C_OBJS): Include in CXX_AND_OBJCXX_OBJS instead of listing
2262 separately on the link line.
2264 2004-08-28 Jason Merrill <jason@redhat.com>
2266 * decl.c (expand_static_init): Avoid bogus warnings.
2268 2004-08-27 Jason Merrill <jason@redhat.com>
2271 * tree.c (stabilize_init): See through a COMPOUND_EXPR.
2274 * decl.c (expand_static_init): Use thread-safety API.
2275 (register_dtor_fn): Return the call, don't expand it.
2276 * tree.c (add_stmt_to_compound): New fn.
2277 (stabilize_call): Use it.
2279 2004-08-27 Richard Henderson <rth@redhat.com>
2281 * cp-tree.def (OFFSETOF_EXPR): New.
2282 * parser.c (cp_parser_builtin_offsetof): Either built an
2283 OFFSETOF_EXPR, or call fold_offsetof immediately.
2284 * pt.c (tsubst_expr): Handle OFFSETOF_EXPR.
2286 2004-08-27 Nathan Sidwell <nathan@codesourcery.com>
2288 * call.c (validate_conversion_obstack): Replace
2289 my_friendly_assert with gcc_assert or gcc_unreachable.
2290 (direct_reference_binding, merge_conversion_sequences,
2291 build_user_type_conversion_1, perform_overload_resolution,
2292 build_op_delete_call, enforce_access, call_builtin_trap,
2293 build_over_call, build_special_member_call, build_new_method_call,
2294 initialize_reference): Likewise.
2295 * class.c (build_base_path, build_primary_vtable, alter_access,
2296 check_bases, update_vtable_entry_for_fn, layout_empty_base,
2297 clone_function_decl, adjust_clone_args,
2298 type_requires_array_cookie, include_empty_classes,
2299 finish_struct_1, resolve_address_of_overloaded_function,
2300 instantiate_type, get_vtbl_decl_for_binfo, build_vtt_inits,
2301 dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
2302 accumulate_vtbl_inits, build_vtbl_initializer,
2303 build_vbase_offset_vtbl_entries, build_rtti_vtbl_entries): Likewise.
2304 * cvt.c (build_up_reference, convert_to_reference): Likewise.
2305 * decl.c (poplevel, duplicate_decls, make_typename_type,
2306 cxx_init_decl_processing, reshape_init, check_initializer,
2307 make_rtl_for_nonlocal_decl, initialize_local_var, cp_finish_decl,
2308 expand_static_init, grokfndecl, grokvardecl, build_ptrmem_type,
2309 grokdeclarator, copy_fn_p, grok_op_properties, xref_tag,
2310 xref_basetypes, start_preparsed_function, save_function_data,
2311 finish_function, finish_method, maybe_register_incomplete_var,
2312 complete_vars): Likewise.
2313 * decl2.c (grok_array_decl, check_member_template,
2314 check_classfn, finish_static_data_member_decl, coerce_new_type,
2315 coerce_delete_type, import_export_class, decl_needed_p,
2316 determine_visibility, import_export_decl, build_cleanup,
2317 start_static_initialization_or_destructi, do_static_destruction,
2318 prune_vars_needing_no_initialization,
2319 build_offset_ref_call_from_tree): Likewise.
2320 * error.c (dump_decl, dump_expr): Likewise.
2321 * init.c (finish_init_stmts, build_zero_init,
2322 expand_virtual_init, expand_default_init, expand_aggr_init_1,
2323 build_offset_ref, build_new_1, build_delete, build_vbase_delete):
2325 * mangle.c (write_method_parms, write_template_args,
2326 write_expression, write_template_arg): Likewise.
2327 * method.c (make_thunk, finish_thunk, use_thunk): Likewise.
2328 * name-lookup.c (pop_binding, begin_scope, leave_scope,
2329 resume_scope, push_using_decl, validate_nonmember_using_decl,
2330 is_ancestor, poplevel_class, set_inherited_value_binding_p,
2331 push_class_level_binding, do_class_using_decl, push_namespace,
2332 pop_namespace, add_using_namespace, ambiguous_decl,
2333 lookup_namespace_name, lookup_type_current_level,
2334 maybe_process_template_type_declaration): Likewise.
2335 * parser.c (cp_lexer_peek_nth_token,
2336 cp_parser_parse_and_diagnose_invalid_typ,
2337 cp_parser_translation_unit, cp_parser_template_id,
2338 cp_parser_lookup_name, cp_parser_late_parsing_for_member): Likewise.
2339 * pt.c (push_access_scope, finish_member_template_decl,
2340 push_inline_template_parms_recursive, add_outermost_template_args,
2341 get_innermost_template_args, begin_explicit_instantiation,
2342 end_explicit_instantiation, retrieve_specialization,
2343 is_specialization_of, is_specialization_of_friend,
2344 register_specialization, check_explicit_specialization,
2345 comp_template_parms, process_template_parm,
2346 process_partial_specialization, convert_nontype_argument,
2347 coerce_template_template_parms, coerce_template_parms,
2348 mangle_class_name_for_template, lookup_template_function,
2349 lookup_template_class, instantiate_class_template, tsubst_decl,
2350 tsubst_function_type, tsubst, tsubst_qualified_id, tsubst_copy,
2351 instantiate_template, fn_type_unification, type_unification_real,
2352 get_template_base, regenerate_decl_from_template,
2353 template_for_substitution, instantiate_decl,
2354 get_mostly_instantiated_function_type, dependent_scope_ref_p,
2355 value_dependent_expression_p, resolve_typename_type): Likewise.
2356 * repo.c (repo_emit_p): Likewise.
2357 * rtti.c (build_headof, get_tinfo_decl, get_pseudo_ti_init,
2358 create_tinfo_types, emit_tinfo_decl): Likewise.
2359 * search.c (lookup_base_r, lookup_base, lookup_field_1,
2360 dfs_access_in_type, build_baselink, lookup_member,
2361 adjust_result_of_qualified_name_lookup, copied_binfo): Likewise.
2362 * semantics.c (perform_or_defer_access_check,
2363 finish_non_static_data_member, finish_stmt_expr_expr,
2364 finish_stmt_expr, finish_call_expr, finish_pseudo_destructor_expr,
2365 finish_template_template_parm, finish_member_declaration,
2366 emit_associated_thunks): Likewise.
2367 * tree.c (build_target_expr_with_type, force_target_expr,
2368 copy_binfo, get_first_fn, cp_tree_equal): Likewise.
2369 * typeck.c (type_after_usual_arithmetic_conversions, comptypes,
2370 cxx_sizeof_or_alignof_type, perform_integral_promotions,
2371 build_class_member_access_expr, finish_class_member_access_expr,
2372 build_ptrmemfunc_access_expr, build_unary_op,
2373 unary_complex_lvalue, cxx_mark_addressable, build_modify_expr,
2374 build_ptrmemfunc, expand_ptrmemfunc_cst, check_return_expr
2375 * typeck2.c (complete_type_check_abstract,
2376 abstract_virtuals_error, process_init_constructor,
2377 add_exception_specifier): Likewise.
2379 2004-08-27 Nathan Sidwell <nathan@codesourcery.com>
2381 * class.c (build_vtbl_initializer): Use ssize_int.
2382 * decl.c (complete_array_type): Likewise.
2383 * method.c (finish_thunk): Likewise.
2384 * search.c (get_dynamic_base_type): Likewise.
2386 2004-08-26 Richard Henderson <rth@redhat.com>
2388 * cp-tree.h (DECL_FIELD_IS_BASE): New.
2389 * class.c (build_base_field): Set it.
2390 (build_simple_base_path): Use it.
2391 (fixed_type_or_null): Don't consider base fields definitive.
2393 2004-08-25 Roger Sayle <roger@eyesopen.com>
2396 PR tree-optimization/16372
2397 * decl.c (finish_enum): Make the precision of the enumerated type
2398 the same width as the underlying integer type.
2400 2004-08-25 Mark Mitchell <mark@codesourcery.com>
2403 * lex.c (build_lang_decl): Set DECL_NO_STATIC_CHAIN for all C++
2406 * mangle.c (get_identifier_nocopy): Add cast.
2408 * cp-tree.h (mangle_type): Remove.
2409 * mangle.c (globals): GTY it.
2410 (mangle_obstack): New variable.
2411 (name_obstack): Likewise.
2412 (name_base): Likewise.
2413 (write_char): Adjust accordingly.
2414 (write_chars): Likewise.
2415 (write_string): Likewise.
2416 (start_mangling): Initialize G.substitutions only one. Add
2418 (finish_mangling): Use VARRAY_CLEAR to reclaim
2419 storage in G.substitutions. Use obstack_finish.
2420 (init_mangle): Adjust for changes to variable names above.
2421 Initialize G.substitutions.
2422 (mangle_decl_string): Adjust call to start_mangling.
2423 (get_identifier_nocopy): New function.
2424 (mangle_decl): Use it.
2425 (mangle_type_string): Adjust call to start_mangling.
2426 (mangle_special_for_type): Likewise.
2427 (mangle_vtt_for_type): Likewise.
2428 (mangle_ctor_vtbl_for_type): Likewise.
2429 (mangle_thunk): Likewise.
2430 (mangle_guard_variable): Likewise.
2431 (mangle_ref_init_variable): Likewise.
2433 2004-08-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2436 * pt.c (redeclare_class_template): Check the type of non-type and
2437 template template parameter.
2439 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
2441 * call.c (convert_class_to_reference): Adjust build_int_cst calls.
2442 (build_user_type_conversion_1, convert_like_real,
2443 build_java_interface_fn_ref, build_special_member_call): Likewise.
2444 * class.c (finish_struct_1, build_vtbl_initializer): Likewise.
2445 * cp-gimplify.c (cp_gimplify_expr): Likewise.
2446 * cvt.c (cp_convert_to_pointer): Likewise.
2447 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
2448 * decl2.c (start_static_initialization_or_destruction,
2449 generate_ctor_or_dtor_function): Likewise.
2450 * except.c (build_throw): Likewise.
2451 * mangle.c (write_integer_cst): Likewise.
2452 * method.c (finish_thunk): Likewise.
2453 * rtti.c (build_headof, get_tinfo_decl_dynamic,
2454 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
2455 get_pseudo_ti_init): Likewise.
2456 * search.c (get_dynamic_cast_base_type): Likewise.
2458 2004-08-25 Zack Weinberg <zack@codesourcery.com>
2460 * class.c, search.c: Remove references to DWARF_DEBUG.
2462 2004-08-25 Adam Nemet <anemet@lnxw.com>
2464 * repo.c (extract_string): Reset backquote after one character.
2465 (get_base_filename): Fix indentation.
2467 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
2469 * decl.c (cxx_init_decl_processing): Adjust
2470 build_common_tree_nodes call.
2472 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
2475 * (is_subobject_of_p): Resurrect & optimize.
2476 (lookup_field_r): Use it.
2478 2004-08-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2481 * search.c (friend_accessible_p): Increment processing_template_decl
2482 when deal with TEMPLATE_DECL of SCOPE.
2484 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
2487 * semantics.c (check_accessibility_of_qualified_id): Defer check
2488 if qualifying_type is a template parameter.
2490 2004-08-23 Mark Mitchell <mark@codesourcery.com>
2493 * pt.c (instantiate_decl): Do not try to apply
2494 DECL_DECLARED_INLINED_P to a VAR_DECL.
2496 * search.c (build_baselink): Fix typo in comment.
2498 2004-08-22 Andrew Pinski <apinski@apple.com>
2501 2004-08-22 Andrew Pinski <apinski@apple.com>
2503 * typeck.c (build_unary_op): Use &a.b if the folded lowered
2504 expression is not constant.
2506 2004-08-23 Nathan Sidwell <nathan@codesourcery.com>
2508 * name-lookup.c (pushdecl): Rename build_type_copy call.
2509 * tree.c (cp_build_qualified_type_real,
2510 build_exception_variant, handle_java_interface_attribute): Likewise.
2512 2004-08-22 Andrew Pinski <apinski@apple.com>
2515 * typeck.c (build_unary_op): Use &a.b if the folded lowered
2516 expression is not constant.
2518 2004-08-20 Mark Mitchell <mark@codesourcery.com>
2521 * decl.c (expand_static_init): Use DECL_FUNCTION_SCOPE_P.
2523 2004-08-21 Joseph S. Myers <jsm@polyomino.org.uk>
2526 * pt.c (tsubst_copy_and_build): Avoid clearing TREE_NO_WARNING for
2529 2004-08-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2531 * pt.c (register_specialization): Check DECL_TEMPLATE_SPECIALIZATION
2532 before calling comp_template_args.
2534 2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
2536 * class.c (build_vtbl_initializer): Use build_int_cst for
2537 negative size types.
2538 * decl.c (complete_array_type): Likewise.
2539 * method.c (finish_thunk): Likewise.
2541 2004-08-20 Andreas Tobler <a.tobler@schweiz.ch>
2543 * tree.c: Remove unused mark_local_for_remap_r.
2545 2004-08-19 Eric Christopher <echristo@redhat.com>
2547 * cp-tree.h (cxx_unsave_expr_now): Delete prototype.
2548 * tree.c (cxx_unsave_expr_now): Delete.
2549 (cp_unsave_r): Ditto.
2551 2004-08-19 Mark Mitchell <mark@codesourcery.com>
2554 * pt.c (push_template_decl_real): Disallow template allocation
2555 functions with fewer than two parameters.
2557 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
2559 * cp-tree.h (build_shared_int_cst): Remove.
2560 * tree.c (shared_int_cache): Remove.
2561 (build_shared_int_cst): Remove.
2562 * class.c (finish_struct_1): Use build_int_cst.
2564 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
2566 * decl.c (finish_enum): Do not copy value node early, copy
2568 * lex.c (cxx_init): Force null_node to be unique.
2570 2004-08-19 Joseph S. Myers <jsm@polyomino.org.uk>
2573 * pt.c (tsubst_copy, tsubst_copy_and_build): Copy TREE_NO_WARNING
2574 from input for MODOP_EXPR.
2576 2004-08-18 Mark Mitchell <mark@codesourcery.com>
2578 * pt.c (dependent_template_p): Fix typo in commment.
2581 * pt.c (dependent_template_p): Treat IDENTIFIER_NODEs as
2584 2004-08-17 Mark Mitchell <mark@codesourcery.com>
2587 * pt.c (unify): Tidy ARRAY_TYPE handling. Make sure that non-type
2588 arguments have the same type as the corresponding parameter.
2591 * parser.c (cp_parser_name_lookup_error): If parser->object_scope
2592 is set use it for diagnostic purposes.
2593 (cp_parser_pseudo_destructor_name): Remove special-case error
2597 * semantics.c (expand_or_defer_fn): Honor -fkeep-inline-functions.
2600 * cp-tree.h (qualified_name_lookup_error): Add parameter.
2601 * name-lookup.c (do_class_using_decl): Restrict set of entities
2602 passed to cp_emit_debug_info_for_using more carefully.
2603 (lookup_qualified_name): Allow lookup_member to return sets of
2605 * parser.c (cp_parser_lookup_name): Add ambiguous_p parameter.
2606 (cp_parser_primary_expression): Handle ambiguous lookups.
2607 (cp_parser_template_name): Adjust use of cp_parser_lookup_name.
2608 (cp_parser_template_argument): Likewise.
2609 (cp_parser_elaborate_type_specifier): Likewise.
2610 (cp_parser_namespace_name): Likewise.
2611 (cp_parser_class_name): Likewise.
2612 (cp_parser_lookup_name_simple): Likewise.
2613 * pt.c (tsubst_qualified_id): Handle ambiguous results.
2614 (tsubst_expr): Likewise.
2615 * semantics.c (qualified_name_lookup_error): Add decl paramter.
2616 For ambiguous lookups, print candidates.
2618 2004-08-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2621 * pt.c (instantiate_pending_templates): Add int parameter. Don't
2623 * cp-tree.h (instantiate_pending_templates): Adjust prototype.
2624 * decl2.c (finish_file): Adjust call to
2625 instantiate_pending_templates.
2627 2004-08-15 Roger Sayle <roger@eyesopen.com>
2629 * call.c (build_vfield_ref, build_call, build_conditional_expr,
2630 convert_arg_to_ellipsis, build_x_va_arg, build_over_call,
2631 build_java_interface_fn_ref, build_special_member_call,
2632 build_new_method_call, initialize_reference): Replace calls to
2633 build with calls to buildN.
2634 * class.c (build_base_path, convert_to_base_statically,
2635 build_vfn_ref, instantiate_type, dfs_accumulate_vtbl_inits,
2636 build_vtbl_initializer): Likewise.
2637 * cp-gimplify.c (genericize_try_block, genericize_catch_block,
2638 gimplify_if_stmt, cp_genericize_r): Likewise.
2639 * cvt.c (convert_to_void): Likewise.
2640 * decl.c (check_initializer, finish_constructor_body,
2641 finish_destructor_body): Likewise.
2642 * error.c (dump_expr): Likewise.
2643 * except.c (build_exc_ptr, expand_start_catch_block, build_throw):
2645 * init.c (perform_member_init, expand_virtual_init,
2646 expand_cleanup_for_base, build_init, expand_default_init,
2647 build_offset_ref, decl_constant_value, build_new, build_new_1,
2648 build_vec_delete_1, build_vec_init, build_delete,
2649 push_base_cleanups, build_vec_delete): Likewise.
2650 * mangle.c (write_integer_cst): Likewise.
2651 * method.c (thunk_adjust, do_build_copy_constructor,
2652 do_build_assign_ref): Likewise.
2653 * pt.c (lookup_template_function, tsubst, tsubst_copy_and_build,
2654 unify, build_non_dependent_expr): Likewise.
2655 * rtti.c (build_headof, build_typeid, ifnonnull,
2656 build_dyanmic_cast_1, tinfo_base_init): Likewise.
2657 * semantics.c (begin_compound_stmt, finish_call_expr,
2658 finish_pseudo_destructor_expr, finish_id_expression,
2659 simplify_aggr_init_expr, finalize_nrv_r): Likewise.
2660 * tree.c (build_target_expr, build_cplus_new, array_type_nelts_top,
2661 array_type_nelts_total, stabilize_call): Likewise.
2662 * typeck.c (decay_conversion, build_class_member_access_expr,
2663 lookup_destructor, build_ptrmemfunc_access_expr, build_array_ref,
2664 get_member_function_from_ptrfunc, build_binary_op, pointer_diff,
2665 build_x_unary_op, build_unary_op, unary_complex_lvalue,
2666 build_compound_expr, build_modify_expr, expand_ptrmemfunc_cst,
2667 check_return_expr): Likewise.
2668 * typeck2.c (split_nonconstant_1, split_nonconstant_init_1,
2669 split_nonconstant_init, store_init_value, build_m_component_ref):
2672 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
2674 * call.c (convert_class_to_reference,
2675 build_user_type_conversion_1, convert_like_real,
2676 build_java_interface_fn_ref, build_special_member_call): Use
2678 * class.c (build_vtbl_initializer): Likewise.
2679 * cp-gimplify.c (cp_gimplify_expr): Likewise.
2680 * cvt.c (cp_convert_to_pointer): Likewise.
2681 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
2682 * decl2.c (start_static_initialization_or_destruction,
2683 generate_ctor_or_dtor_function): Likewise.
2684 * except.c (build_throw): Likewise.
2685 * lex.c (cxx_init): Likewise.
2686 * mangle.c (write_integer_cst): Likewise.
2687 * rtti.c (build_headof, get_tinfo_decl_dynamic,
2688 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
2689 get_pseudo_ti_init): Likewise.
2690 * search.c (get_dynamic_cast_base_type): Likewise.
2691 * tree.c (build_shared_int_cst): Likewise.
2693 2004-08-12 Mark Mitchell <mark@codesourcery.com>
2696 * class.c (count_depth_data): New type.
2697 (dfs_depth_post): New function.
2698 (dfs_depth_q): Likewise.
2699 (find_final_overrider_data_s): Change type of vpath.
2701 (dfs_find_final_overrider_1): New function.
2702 (dfs_find_final_overrider): Use it.
2703 (dfs_find_final_overrider_q): Adjust use of vpath.
2704 (dfs_find_final_overrider_post): Likewise.
2705 (find_final_overrider): Use dfs_depth. Allocate and deallocate
2708 2004-08-12 Jan Beulich <jbeulich@novell.com>
2710 * parser.c (cp_parser_asm_definition): Properly consume scope operator
2711 tokens preceding the clobbers. Don't check for scope operator
2712 following inputs. Simplify inputs handling to match that now used for
2715 2004-08-11 Mark Mitchell <mark@codesourcery.com>
2718 * except.c (build_throw): Allocate cleanup_type and the function
2719 for __cxa_throw separately.
2722 * call.c (standard_conversion): Do not accept conversions between
2723 pointers to members if the class types are unrelated.
2726 * parser.c (cp_parser_builtin_offsetof): Cast to "const volatile
2727 char &" instead of just "char &".
2730 * pt.c (tsubst): Just return the unknown_type_node.
2732 2004-08-11 Mark Mitchell <mark@codesourcery.com>
2735 * parser.c (cp_parser_class_specifier): Robustify.
2738 * pt.c (tsubst_copy_and_build): Complain about invalid
2742 * pt.c (tsubst_default_argument): Clear out current_class_ptr and
2743 current_class_ref while tsubsting.
2745 2004-08-10 Mark Mitchell <mark@codesourcery.com>
2748 * parser.c (cp_parser_init_declarator): Robustify.
2750 2004-08-06 Richard Sandiford <rsandifo@redhat.com>
2752 * typeck2.c (process_init_constructor): Guard the missing field warning
2753 with warn_missing_field_initializers rather than extra_warnings.
2755 2004-08-06 Paolo Bonzini <bonzini@gnu.org>
2757 * class.c (instantiate_type) <ENTRY_VALUE_EXPR>: Do not handle.
2759 2004-08-05 Mark Mitchell <mark@codesourcery.com>
2761 * decl.c (start_preparsed_function): Move determine_visibility
2763 * decl2.c (determine_visibility): Incorporate dllexport testing.
2765 2004-08-05 Geoffrey Keating <geoffk@apple.com>
2767 * g++spec.c (lang_specific_driver): An -Xlinker or -Wl, option
2768 means that libstdc++ is needed.
2770 2004-08-05 Nathan Sidwell <nathan@codesourcery.com>
2772 * cvt.c (cp_convert_to_pointer): Adjust force_fit_type call.
2774 2004-08-04 Geoffrey Keating <geoffk@apple.com>
2776 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_ASSEMBLER_NAME rather
2777 than passing it as a parameter to rest_of_decl_compilation.
2778 * decl2.c (grokfield): Use set_user_assembler_name.
2780 2004-08-04 Nathan Sidwell <nathan@codesourcery.com>
2782 * decl.c (complete_array_type): Don't gratuitously copy
2783 maxindex. Its type is always set.
2785 2004-08-04 Paul Brook <paul@codesourcery.com>
2787 * Make-lang.in (cp/semantics.o, cp/optimize.o): Depend on TARGET_H.
2788 * cp-tree.h (struct language_function): Rename x_dtor_label to
2790 (dtor_label): Rename ...
2791 (cdtor_label): ... to this.
2792 * decl.c (begin_constructor_body): Remove.
2793 (check_special_function_return_type): Maybe change the return type.
2794 (grokdeclarator): Pass the class type.
2795 (start_preparsed_function): Constructors may need a return label.
2796 (finish_constructor_body, finish_destructor_body): Set the return
2798 (begin_function_body): Don't call begin_constructor_body.
2799 (finish_function): Don't warn for constructors or destructors.
2800 (implicitly_declare_fn): Maybe change the return type.
2801 * optimize.c: Include target.h.
2802 (maybe_clone_body): Remap the function result.
2803 * semantics.c: Include target.h.
2804 (finish_return_stmt): Maybe jump to return label for constructors.
2806 2004-08-03 Mark Mitchell <mark@codesourcery.com>
2808 * class.c (build_vtable): Do not set DECL_VISIBILITY here.
2809 (check_field_decls): Or here.
2810 (check_methods): Or here.
2811 (initialize_array): Don't mess with DECL_CONTEXT.
2812 * cp-tree.h (start_decl): Adjust prototype.
2813 (determine_visibility): New function.
2814 * decl.c (duplicate_decls): Remove checks for hidden "operator
2816 (build_library_fn_1): Give all library functions default
2818 (start_decl): Add pop_scope_p parameter. Tidy.
2819 (cp_finish_decl): Do not pop scopes here. Call
2820 determine_visibility for variable definitions.
2821 (start_preparsed_function): Call determine_visibility.
2822 * decl2.c (determine_visibility): New function.
2823 * method.c (use_thunk): Fix formatting.
2824 * parser.c (cp_parser_condition): Adjust calls to start_decl.
2825 (cp_parser_init_declarator): Likewise.
2826 * pt.c (instantiate_decl): Always call pop_nested_class.
2827 * rtti.c (get_tinfo_decl): Do not set DECL_VISIBILITY.
2828 (tinfo_base_init): Likewise.
2830 2004-08-02 Mark Mitchell <mark@codesourcery.com>
2833 * name-lookup.c (validate_nonmember_using_decl): Robustify.
2835 2004-08-01 Mark Mitchell <mark@codesourcery.com>
2838 * name-lookup.c (decl_namespace): Remove.
2839 (current_decl_namespace): Use decl_namespace_context instead of
2841 (push_decl_namespace): Likewise.
2842 (arg_assoc_class): Likewise.
2843 (arg_assoc_type): Likewise.
2844 * pt.c (check_specialization_namespace): New function.
2845 (maybe_process_partial_specialization): Use it.
2846 (register_specialization): Likewise.
2849 * cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): New macro.
2850 * call.c (null_ptr_cst_p): Handle variables with constant
2852 * pt.c (convert_nontype_argument): Use
2853 DECL_INTEGRAL_CONSTANT_VAR_P.
2854 * semantics.c (finish_id_expression): Likewise.
2857 * decl.c (duplicate_decls): Reject duplicate namespace
2861 * typeck.c (build_ptrmemfunc): Loosen assertion.
2863 2004-08-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
2865 * call.c (z_candidate::template_decl): Rename from template.
2866 (add_template_candidate_real): Adjust member reference.
2869 2004-07-29 Mark Mitchell <mark@codesourcery.com>
2871 * cp-tree.h (IDENTIFIER_REPO_CHOSEN): Define.
2872 (lang_decl_flags): Narrow the width of "languages". Add
2874 (DECL_NEEDED_P): Remove.
2875 (FOR_EACH_CLONE): New macro.
2876 (DECL_REPO_AVAILABLE_P): Likewise.
2877 (DECL_TINFO_P): Likewise.
2878 (set_linkage_according_to_type): Declare.
2879 (import_export_vtable): Remove.
2880 (import_export_tinfo): Likewise.
2881 (mark_needed): New function.
2882 (decl_needed_p): Likewise.
2883 (note_vauge_linkage_fn): Likewise.
2884 (init_repo): Change prototype.
2885 (repo_template_used): Remove.
2886 (repo_template_instantiated): Likewise.
2887 (repo_emit_p): New function.
2888 (repo_export_class_p): Likewise.
2889 (no_linkage_check): Change prototype.
2890 * class.c (set_linkage_according_to_type): New function.
2891 (build_vtable): Use it. Do not call import_export_vtable. Set
2892 DECL_IGNORED_P if appropriate.
2893 * decl.c (duplicate_decls): Preserve DECL_REPO_AVAILABLE_P.
2894 (make_rtL_for_nonlocal_decls): Check for template instantiations
2896 (grokfndecl): Adjust call to no_linkage_check.
2897 (set_linkage_for_static_data_member): New function.
2898 (grokvardecl): Use it. Adjust call to no_linkage_check.
2899 (grokdeclarator): Use set_linkage_for_static_data_member.
2900 * decl2.c (note_vague_linkage_fn): New function.
2901 (note_vague_linkage_var): Likewise.
2902 (finish_static_data_member_decl): Use it.
2903 (import_export_vtable): Remove.
2904 (import_export_class): Use repo_export_class_p.
2905 (var_finalized_p): Simplify.
2906 (maybe_emit_vtables): Simplify.
2907 (mark_needed): New function.
2908 (decl_needed_p): Likewise.
2909 (import_export_decl): Add documentation and consistency checks.
2910 Use repo_emit_p. Handle virtual tables and RTTI information
2912 (import_export_tinfo): Remove.
2913 (write_out_vars): Call import_export_decl.
2914 (cxx_callgraph_analyze_expr): Ensure that all vtables are emitted
2916 (finish_file): Use decl_needed_p. Do not call import_export_decl
2917 for undefined static data members. Do not warn about undefined
2918 inlines when using a repository.
2919 (mark_used): Use note_vague_linkage_fn. Always defer template
2921 * lex.c (cxx_init): Adjust call to init_repo. Always set
2922 flag_unit_at_a-time.
2923 * method.c (synthesize_method): Remove unncessary
2924 import_export_decl call.
2925 (implicitly_declare_fn): Use set_linkage_according_to_type.
2926 * optimize.c (maybe_clone_body): Use FOR_EACH_CLONE.
2927 * pt.c (instantiate_class_template): Don't redundantly add classes
2928 to keyed_classes. Don't call repo_template_used.
2929 (tsubst_decl): Set DECL_INTERFACE_KNOWN for instantiations of
2930 templates with internal linkage.
2931 (check_instantiated_args): Adjust call to no_linkage_check.
2932 (instantiate_template): Use FOR_EACH_CLONE.
2933 (mark_definable): New function.
2934 (mark_decl_instantiated): Use it.
2935 (do_decl_instantiation): Adjust tests for explicit instantiation
2936 after "extern template".
2937 (instantiate_class_member): Do not use repo_template_instantiated.
2938 (do_type_instantiation): Simplify.
2939 (instantiate_decl): Use mark_definable. Check repo_emit_p.
2941 * repo.c (repo_get_id): Remove.
2942 (original_repo): Remove.
2943 (IDENTIFIER_REPO_USED): Remove.
2944 (IDENTIFIER_REPO_CHOSEN): Remove.
2945 Remove all #if 0'd code.
2946 (repo_template_used): Remove.
2947 (repo_template_instantiated): Remove.
2948 (temporary_obstack_initialized_p): New variable.
2949 (init_repo): Register with lang_post_pch_load. Avoid creating
2950 identifiers unnecessarily. Don't use original_repo. Close the
2952 (reopen_repo_file_for_write): Not here.
2953 (finish_repo): Always write out a new repository file.
2954 (repo_emit_p): New function.
2955 (repo_export_class_p): Likewise.
2956 * rtti.c (get_tinfo_decl): Use set_linkage_according_to_type.
2957 (involves_incomplete_p): New function.
2958 (tinfo_base_init): Use it.
2959 (ptr_initializer): Remove non_public_ptr parameter.
2960 (ptm_initializer): Likewise.
2961 (get_pseudo_ti_init): Likewise.
2962 (unemitted_tinfo_decl_p): Remove.
2963 (emit_tinfo_decl): Use import_export_decl.
2964 * semantics.c (expand_body): Move updates of static_ctors and
2966 (expand_or_defer_fn): ... here.
2967 * tree.c (no_linkage_check): Add relaxed_p parameter.
2969 2004-07-28 Eric Christopher <echristo@redhat.com>
2971 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
2973 2004-07-28 Nathan Sidwell <nathan@codesourcery.com>
2975 * cp-tree.h (struct tree_pair_s): New.
2976 (typedef tree_pair_p): New.
2977 (DEF_VEC_O(tree_pair_s)): New.
2978 (struct lang_type_class): Make vcall_indices a VEC(tree_pair_s).
2979 (CLASSTYPE_VCALL_INDICES): Update documentation.
2980 * class.c (get_vcall_index): Adjust.
2981 (add_vcall_offset): Adjust.
2983 2004-07-27 Kelley Cook <kcook@gcc.gnu.org>
2985 * pt.c, typeck.c: Remove spurious carriage returns.
2987 2004-07-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2990 * pt.c (coerce_template_template_parms) <PARM_DECL case>: Only check
2991 when the type of ARG is not dependent.
2993 2004-07-26 Geoffrey Keating <geoffk@apple.com>
2995 * g++spec.c (LIBSTDCXX_PROFILE): Default to LIBSTDCXX.
2996 (lang_specific_driver): If the C++ or math library options don't
2997 start with '-l', don't count them as added libraries.
2999 2004-07-26 Nathan Sidwell <nathan@codesourcery.com>
3001 * decl.c (xref_basetypes): Adjust base access vector creation.
3002 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Adjust base
3004 * search.c (dynamic_cast_base_recurse, dfs_access_in_type): Likewise.
3006 2004-07-26 Niall Douglas <s_fsfeurope2@nedprod.com>
3007 Brian Ryner <bryner@brianryner.com>
3011 * class.c (check_field_decls): Apply hidden visibility if
3012 -fvisibility-inlines-hidden and inlined unless otherwise specified
3013 (build_vtable): Set vtable visibility to class visibility.
3014 (check_field_decls): Default static member visibility to class
3016 (check_methods): Default method visibility to class visibility.
3017 * cp-tree.h: Added CLASSTYPE_VISIBILITY and
3018 CLASSTYPE_VISIBILITY_SPECIFIED macro.
3019 * decl.c (duplicate_decls): New logic for merging definition decls
3020 with declaration decls. Added ignore & warning when non default
3021 applied to global operator new or delete.
3022 * method.c, optimize.c, rtti.c: Added setting of VISIBILITY_SPECIFIED
3023 wherever VISIBILITY was changed
3024 * rtti.c (get_tinfo_decl): Set typeinfo visibility to class
3026 (tinfo_base_init): Set typeinfo name visibility to class visibility.
3028 2004-07-25 Bernardo Innocenti <bernie@develer.com>
3030 * decl.c: Rename all identifiers named `class' to `cl'.
3031 * cp-tree.h: Likewise.
3033 2004-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
3035 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Use GGC_CNEW.
3036 * typeck2.c (abstract_virtuals_error): Use GGC_NEW.
3037 * name-lookup.c (binding_entry_make): Use GGC_NEW.
3038 (binding_table_construct): Use GGC_CNEWVEC.
3039 (binding_table_new): Use GGC_NEW.
3040 (cxx_binding_make): Likewise.
3041 (begin_scope): Likewise.
3042 (push_to_top_level): Use GCC_CNEW.
3043 * parser.c (cp_token_cache_new): Likewise.
3044 (cp_token_cache_push_token): Likewise.
3045 (cp_lexer_new_main): Likewise.
3046 (cp_lexer_new_from_tokens): Likewise.
3047 (cp_parser_context_new): Likewise.
3048 (cp_parser_new): Likewise.
3049 (cp_lexer_new_from_tokens): Use GGC_NEWVEC.
3050 * lex.c (cxx_make_type): Use GGC_CNEW.
3051 (retrofit_lang_decl): Use GGC_NEWVAR.
3052 (cxx_dup_lang_specific_decl): Likewise.
3053 (copy_lang_type): Likewise.
3054 * decl.c (use_label): Use GGC_NEW instead of ggc_alloc.
3055 (save_function_data): Likewise.
3056 (lookup_label): Use GGC_CNEW instead of ggc_alloc_cleared.
3057 (cxx_push_function_context): Likewise.
3059 2004-07-25 Richard Henderson <rth@redhat.com>
3061 * decl.c (start_preparsed_function): Set DECL_ARTIFICIAL and
3062 DECL_IGNORED_P on RESULT_DECL.
3063 * semantics.c (finalize_nrv): Copy them too.
3065 2004-07-23 Nathan Sidwell <nathan@codesourcery.com>
3067 * search.c (lookup_conversion_operator): Avoid two loops.
3068 (add_conversions): Remove.
3069 (check_hidden_convs, split_conversions,
3070 lookup_conversions_r): New.
3071 (lookup_conversions): Use lookup_conversions_r.
3073 2004-07-22 Nathan Sidwell <nathan@codesourcery.com>
3075 * pt.c (get_template_base): Check type is completable.
3077 2004-07-21 Eric Christopher <echristo@redhat.com>
3079 * decl.c (poplevel): Inline unused variable checking.
3082 2004-07-21 Paolo Bonzini <bonzini@gnu.org>
3084 * typeck.c (build_binary_op): Do not use RDIV_EXPR for
3087 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3090 * pt.c (check_explicit_specialization): Remove extension to accept
3091 specializations without template headers. Fall-through to normal
3094 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3097 * pt.c (determine_specialization): New parameter template_count.
3098 Disambiguate between member templates and member functions counting
3099 the template headers.
3100 (check_explicit_specialization): Update caller.
3101 (tsubst_friend_function): Likewise.
3103 2004-07-20 Steven Bosscher <stevenb@suse.de>
3105 * cp-tree.def (TINST_LEVEL): Make it an 'x' node.
3106 * cp-tree.h (tinst_level_t): New tree type.
3107 (union lang_tree_node): Handle it.
3108 (TINST_LOCATION): New accessor macro.
3109 (make_tinst_level): New prototype.
3110 * cp-lang.c (cp_tree_size): Handle TINST_LEVEL.
3111 * decl.c (cp_tree_node_structure): Likewise.
3112 * error.c (print_instantiation_full_context): Use TINST_LOCATION.
3113 (print_instantiation_partial_context): Likewise.
3114 * pt.c (pop_tinst_level): Likewise.
3115 (push_tinst_level): Use make_tinst_level.
3116 * tree.c (make_tinst_level): New function.
3117 (cp_walk_subtrees): Walk TINST_DECL for a TINST_LEVEL node.
3119 2004-07-20 Mark Mitchell <mark@codesourcery.com>
3121 * parser.c (cp_parser_simple_type_specifier): Fix typo.
3124 * parser.c (cp_parser_simple_type_specifier): Do not record usage
3125 of globally-qualified names.
3127 2004-07-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3130 * error.c (dump_type) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Output
3133 2004-07-19 Mark Mitchell <mark@codesourcery.com>
3136 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
3137 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
3138 * class.c (add_implicitly_declared_members): Use
3139 CLASSTYPE_LAZY_ASSIGNMENT_OP.
3140 * method.c (lazily_declare_fn): Clear
3141 CLASSTYPE_LAZY_ASSIGNMENT_OP.
3142 * search.c (lookup_fnfields_1): Check it.
3144 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
3146 * cp-tree.h (vec_binfo_member): Remove.
3147 * tree.c (vec_binfo_member): Remove.
3149 * cp-tree.h (struct lang_type_class): Remove vfields field.
3150 (CLASSTYPE_VFIELDS): Remove.
3151 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
3152 * class.c (determine_primary_base): Remove CLASSTYPE_VFIELDS
3154 (dfs_modify_vtables): Use TYPE_CONTAINS_VPTR_P.
3155 (finish_struct_1): Remove CLASSTYPE_VFIELDS handling.
3156 * init.c (dfs_initialize_vtbl_ptrs): Use TYPE_CONTAINS_VPTR_P.
3158 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
3160 * cp-tree.h (DEF_VEC_P(tree)): Remove here.
3161 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
3163 (BINFO_LANG_SLOTS): Remove.
3164 * tree.c (copy_binfo): Adjust BINFO creation and accessors.
3165 * decl.c (xref_basetypes): Adjust BINFO creation and accessors.
3166 * class.c (check_bases): Adjust BINFO accessors.
3167 (determine_primary_base, finish_struct_bits,
3168 maybe_warn_about_overly_private_class, warn_hidden,
3169 walk_subobject_offsets, propagate_binfo_offsets, end_of_class,
3170 warn_about_ambiguous_bases, get_vfield_name,
3171 dump_class_hierarchy_r, build_vtt_inits, accumulate_vtbl_inits,
3172 add_vcall_offset_vtbl_entries_r): Likewise.
3173 * dump.c (cp_dump_tree): Likewise.
3174 * init.c (sort_mem_initializers, expand_member_init, build_delete,
3175 push_base_cleanups): Likewise.
3176 * method.c (do_build_copy_constructor, do_build_assign_ref,
3177 synthesize_exception_spec): Likewise.
3178 name-lookup.c (arg_assoc_class): Likewise.
3179 * pt.c (instantiate_class_template,
3180 get_template_base_recursive): Likewise.
3181 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Likewise.
3182 * typeck2.c (process_init_constructor): Likewise.
3183 * search.c (lookup_base_r, dynamic_cast_base_recurse,
3184 dfs_access_in_type, dfs_walk_real, look_for_overrides,
3185 types_overlap_p, copied_binfo, original_binfo): Likewise.
3186 (binfo_for_vtable): Remove
3188 2004-07-20 Steven Bosscher <stevenb@suse.de>
3190 * cp-tree.h (struct lang_decl_flags): Unify the template_info and
3191 thunk_alias, and the access and virtual_offset fields.
3192 (THUNK_VIRTUAL_OFFSET, THUNK_ALIAS): Adjust.
3193 * decl.c (finish_case_label): Update c_add_case_node call.
3195 2004-07-19 Mark Mitchell <mark@codesourcery.com>
3197 Revert patch for PR c++/16623.
3199 2004-07-19 Kelley Cook <kcook@gcc.gnu.org>
3201 * except.c: Remove two spurious carriage returns.
3203 2004-07-19 Mark Mitchell <mark@codesourcery.com>
3206 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
3207 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
3208 * class.c (add_implicitly_declared_members): Use
3209 CLASSTYPE_LAZY_ASSIGNMENT_OP.
3210 * method.c (lazily_declare_fn): Clear
3211 CLASSTYPE_LAZY_ASSIGNMENT_OP.
3212 * search.c (lookup_fnfields_1): Check it.
3214 2004-07-19 Nathan Sidwell <nathan@codesourcery.com>
3216 * class.c (add_method): Delay adding the slot until the end.
3217 (determine_primary_base): Adjust VEC_iterate invokation.
3218 (resort_type_method_vec, finish_struct_methods, warn_hidden,
3219 walk_subobject_offsets, end_of_class, warn_about_ambiguous_bases,
3220 build_vtbl_initializer): Likewise.
3221 * init.c (sort_mem_initializers, build_delete, push_base_cleanups,
3222 build_vbase_delete): Likewise.
3223 * method.c (do_build_copy_constructor): Likewise.
3224 * name-lookup.c (new_class_binding, print_binding_level,
3225 poplevel_class, store_class_bindings, push_to_top_level,
3226 pop_from_top_level): Likewise.
3227 * pt.c (check_explicit_specialization): Likewise.
3228 * search.c (lookup_conversion_operator, lookup_fnfields_1,
3229 get_pure_virtuals, add_conversions, dfs_check_overlap,
3230 binfo_for_vbase): Likewise.
3232 2004-07-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3235 * pt.c (unify) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Use only
3236 innermost set of template arguments during deduction. Simplify.
3238 2004-07-19 Joseph S. Myers <jsm@polyomino.org.uk>
3240 * typeck.c (build_modify_expr, build_x_modify_expr): Set
3241 TREE_NO_WARNING on assignments with an operator other than '='.
3243 2004-07-10 Steven Bosscher <stevenb@suse.de>
3244 Joseph S. Myers <jsm@polyomino.org.uk>
3246 * cp-tree.h (C_SET_EXP_ORIGINAL_CODE): Remove.
3247 * decl2.c (grokfield): Don't check current_class_depth via
3248 unused TREE_COMPLEXITY.
3249 * semantics.c (finish_parenthesized_expr): Set TREE_NO_WARNING
3250 to avoid the missing parentheses warning.
3251 Don't set C_SET_EXP_ORIGINAL_CODE.
3253 2004-07-18 Mark Mitchell <mark@codesourcery.com>
3255 * tree.c (no_linkage_helper): Remove.
3256 (no_linkage_check): Don't use walk_tree_without_duplicates.
3258 * mangle.c (write_expression): Issue a sorry for zero-operand
3261 2004-07-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3264 * init.c (build_offset_ref): Build SCOPE_REF with non-null
3265 TREE_TYPE for non-dependent names.
3266 * typeck.c (build_x_unary_op): Handle non-dependent SCOPE_REF.
3267 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
3268 unknown_type_node as its TREE_TYPE.
3269 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
3270 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
3271 (dump_expr) <SCOPE_REF case>: Likewise.
3273 2004-07-17 Jason Merrill <jason@redhat.com>
3276 * call.c (type_passed_as): Make the invisible reference type
3278 * cp-gimplify.c (gimplify_cleanup_stmt): Rename to
3279 cp_genericize_r. Handle invisible reference lowering.
3280 (is_invisiref_parm): New fn.
3281 (cp_genericize): Adjust the types of invisible reference parms.
3282 Don't repeat the walk for clones.
3283 * decl.c (store_parm_decls): Don't generate any code for clones.
3285 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
3287 * cp-tree.h (builtin_function): Declare.
3289 2004-07-16 Mark Mitchell <mark@codesourcery.com>
3291 * class.c (finish_struct_methods): Remove unncessary code.
3292 (add_implicitly_declared_members): Create declarations for default
3293 constructors and copy constructors lazily.
3294 * cp-tree.h (lang_type_class): Remove lazy_default_ctor and
3296 (CLASSTYPE_LAZY_DEFAULT_CTOR): New macro.
3297 (CLASSTYPE_LAZY_COPY_CTOR): Likewise.
3298 * decl2.c (check_classfn): Robustify.
3299 (locate_dtor): Handle empty CLASSTYPE_METHOD_VEC.
3300 (locate_ctor): Handle lazy default constructors.
3301 (locate_copy): Handle lazy copy constructors.
3302 (implicitly_declare_fn): Make sure we're looking at the
3303 TYPE_MAIN_VARIANT for a class before creating functions. Don't
3304 set TYPE_HAS_CONSTRUCTOR.
3305 (lazily_declare_fn): New function.
3306 * name-lookup.c (constructor_name_full): Simplify.
3307 * search.c (lookup_fnfields_1): Lazily create methods, as
3309 (lookup_for_overrides): Handle empty CLASSTYPE_METHOD_VEC.
3311 2004-07-16 Steven Bosscher <stevenb@suse.de>
3313 * cp-tree.h (struct lang_type): Don't have three GTY options on a
3314 single bit GTY desc.
3316 2004-07-16 Richard Henderson <rth@redhat.com>
3318 * cp-lang.c (LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING): Die.
3319 * cp-tree.h (cp_copy_res_decl_for_inlining): Remove.
3320 * tree.c (cp_copy_res_decl_for_inlining): Remove.
3322 2004-07-16 Nathan Sidwell <nathan@codesourcery.com>
3324 * class.c (finish_struct_bits): Use for loop.
3325 (propagate_binfo_offsets): Do primary binfo outside of loop.
3328 * dump.c (cp_dump_tree): Don't dump the bases if there's no
3331 * pt.c (tsubst) <TREE_BINFO case>: We should never get here.
3333 2004-07-15 Mark Mitchell <mark@codesourcery.com>
3335 * cp-tree.h (lang_type_class): Remove has_real_assign_ref and
3336 has_abstract_assign_ref. Make methods a VEC(tree) *.
3337 (TYPE_HAS_CONST_ASSIGN_REF): Add documentation.
3338 (CLASSTYPE_CONSTRUCTORS): Adjust for changes to CLASSTYPE_METHOD_VEC.
3339 (CLASSTYPE_DESTRUCTORS): Likewise.
3340 (TYPE_HAS_REAL_ASSIGN_REF): Remove.
3341 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
3342 (add_method): Change prototoype.
3343 * class.c (add_method): Remove error_p parameter. Adjust for
3344 changes to CLASSTYPE_METHOD_VEC.
3345 (handle_using_decl): Adjust call to add_method.
3346 (maybe_warn_about_overly_private_class): Adjust for
3347 changes to CLASSTYPE_METHOD_VEC.
3348 (resort_type_method_vec): Likewise.
3349 (finish_struct_methods): Likewise.
3350 (check_for_override): Likewise.
3351 (warn_hidden): Likewise.
3352 (add_implicitly_declared_members): Defer creation of assignment
3353 operators. Adjust call to add_method.
3354 (clone_function_decl): Adjust call to add_method.
3355 (check_bases_and_members): Don't set TYPE_HAS_REAL_ASSIGN_REF.
3356 (finish_struct_1): Use CLASSTYPE_DESTRUCTORS.
3357 * decl.c (grok_special_member_properties): Don't set
3358 TYPE_HAS_ABSTRACT_ASSIGN_REF.
3359 * decl2.c (check_classfn): Adjust for
3360 changes to CLASSTYPE_METHOD_VEC.
3361 * method.c (locate_dtor): Use CLASSTYPE_DESTRUCTORS.
3362 (locate_ctor): Use CLASSTYPE_CONSTRUCTORS.
3363 (locate_copy): Adjust for changes to CLASSTYPE_METHOD_VEC.
3364 (implicitly_declare_fn): Set DECL_SOURCE_LOCATION. Do not call
3366 * pt.c (check_explicit_specialization): Adjust for
3367 changes to CLASSTYPE_METHOD_VEC.
3368 (instantiate_class_template): Do not set
3369 TYPE_HAS_ABSTRACT_ASSIGN_REF.
3370 * ptree.c (cxx_print_type): Don't try to print
3371 CLASSTYPE_METHOD_VEC.
3372 * rtti.c (emit_support_tinfos): Use CLASSTYPE_DESTRUCTORS.
3373 * search.c (lookup_field_r): Adjust for
3374 changes to CLASSTYPE_METHOD_VEC.
3375 (lookup_fnfields): Likewise.
3376 (lookup_conversion_operator): Likewise.
3377 (lookup_fnfields_1): Likewise. Create assignment operators
3379 (look_for_overrides_here): Adjust for
3380 changes to CLASSTYPE_METHOD_VEC.
3381 (add_conversions): Likewise.
3382 * semantics.c (finish_member_declaration): Adjust call to add_method.
3384 2004-07-15 Jason Merrill <jason@redhat.com>
3386 * cp-lang.c (cxx_types_compatible_p): To the middle-end,
3387 references and pointers are compatible.
3389 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
3391 * decl.c (xref_basetypes): Refactor.
3392 * tree.c (copy_base_binfos): Replace with ...
3393 (copy_binfo): ... this. Deep copy the given binfo, (not the just
3394 bases of the given base).
3395 * cp-tree.h (copy_base_binfo): Remove.
3396 (copy_binfo): Declare.
3398 2004-07-15 Mark Mitchell <mark@codesourcery.com>
3400 * name-lookup.c (set_inherited_value_binding_p): Add class_type
3402 (get_class_binding): Adjust.
3403 (push_class_level_binding): Don't use set_inherited_value_binding_p.
3405 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
3407 * class.c (finish_struct_bits): Don't set TYPE_HAS_CONVERSION here.
3408 * decl.c (xref_basetypes): Set it here.
3410 * class.c (check_bases): Don't set CLASSTYPE_NON_AGGREGATE here.
3411 Don't check for incomplete base.
3412 (get_vfield_name): Simplify while loop.
3413 * decl.c (xref_basetypes): Set CLASSTYPE_NON_AGGREGATE here.
3415 2004-07-14 Mark Mitchell <mark@codesourcery.com>
3417 * lex.c (cxx_make_type): Remove call to get_pointer_type.
3419 * cp-tree.h (IDENTIFIER_VALUE): Remove.
3420 (BINFO_PUSHDECLS_MARKED): Likewise.
3421 (maybe_inject_for_scope_var): Likewise.
3422 (push_class_decls): Likewise.
3423 * name-lookup.h (push_class_binding): Remove.
3424 (innermost_non_namespace_value): New function.
3425 (outer_binding): Likewise.
3426 * class.c (add_method): Push bindings before adding to
3428 (restore_class_cache): Do not restore class_shadowed.
3429 (pushclass): Do not add USING_DECLs. Do not call
3431 * config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c.
3432 * decl.c (pushdecl): Use outer_binding.
3433 (poplevel): Set the scope for an out-of-scope for-loop declaration
3435 (cp_finish_decl): Don't call maybe_inject_for_scope_var.
3436 * name-lookup.c (new_class_binding): New function.
3437 (push_binding): Use it.
3438 (pushdecl): Use innermost_non_namespace_value.
3439 (maybe_inject_for_scope_var): Remove.
3440 (push_class_binding): Remove.
3441 (set_inherited_value_binding_p): New function.
3442 (get_class_binding): New function.
3443 (push_class_level_binding): Assert that the current_class_type is
3445 (outer_binding): New function.
3446 (innermost_non_namespace_value): Likewise.
3447 (lookup_name_real): Use outer_binding.
3448 (lookup_name_current_level): Ignore out-of-scope variables.
3449 * pt.c (check_template_shadow): Use innermost_non_namespace_value.
3450 (lookup_template_class): Likewise.
3451 * search.c (dfs_push_type_decls): Remove.
3452 (dfs_push_decls): Likewise.
3453 (setup_class_bindings): Likewise.
3454 (lookup_field_1): Handle USING_DECLs from dependent scopes.
3455 (marked_pushdecls_p): Remove.
3456 (unmarked_pushdecls_p): Remove.
3457 (marked_identifiers): Remove.
3458 (setup_class_bindings): Remove.
3459 (dfs_push_type_decls): Remove.
3460 (dfs_push_decls): Remove.
3461 (push_class_decls): Remove.
3463 2004-07-13 Mark Mitchell <mark@codesourcery.com>
3467 * decl.c (grokvardecl): Make declspecs parameter const.
3468 (grokdeclarator): Likewise. Adjust accordingly.
3469 * decl.h (grokdeclarator): Adjust declaration.
3470 * parser.c (cp_parser_init_declarator): Do not clear
3471 decl_specifiers->attributes.
3473 * cp-tree.h (lang_identifier): Remove class_value.
3474 (IDENTIFIER_CLASS_VALUE): Remove.
3475 (pop_class_decls): Likewise.
3476 (init_search_processing): Likewise.
3477 * class.c (handle_using_decl): Use lookup_member, not
3478 IDENTIFIER_CLASS_VALUE.
3479 (restore_class_cache): New function, split out from ...
3480 (pushclass): ... here. Do not call clear_identifier_class_values.
3481 (invalidate_class_lookup_cache): Do not clear
3482 IDENTIFIER_CLASS_VALUE.
3483 (popclass): Do not call pop_class_decls.
3484 (maybe_note_name_used_in_class): Do not save names looked up after
3485 the class is complete. Use lookup_member, not
3486 IDENTIFIER_CLASS_VALUE.
3487 * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
3488 * decl.c (cxx_init_decl_processing): Do not call
3489 init_search_processing.
3490 * method.c (do_build_copy_constructor): Remove unnecessary code.
3491 (do_build_assign_ref): Likewise.
3492 * name-lookup.c (pushdecl): Use lookup_member, not
3493 IDENTIFIER_CLASS_VALUE.
3494 (set_identifier_type_value_with_scope): Set TREE_TYPE on the
3496 (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
3497 (push_class_binding): Do not set it.
3498 (clear_identifier_class_values): Remove.
3499 (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
3500 (store_binding): Do not save it.
3501 (pop_from_top_level): Do not restore it.
3502 * name-lookup.h (cxx_saved_binding): Remove class_value.
3503 (clear_identifier_class_values): Remove.
3504 * ptree.c (cxx_print_identifier): Do not print
3505 IDENTIFIER_CLASS_VALUE.
3506 * search.c (search_obstack): Remove.
3507 (push_stack_level): Remove.
3508 (pop_stack_level): Remove.
3509 (search_level): Remove.
3510 (search_stack): Remove.
3511 (lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
3512 (setup_class_bindings): Use IDENTIFIER_MARKED, not
3513 IDENTIFIER_CLASS_VALUE.
3514 (marked_identifiers): New variable.
3515 (push_class_decls): Clear IDENTIFIER_MARKED.
3516 (pop_class_decls): Don't call pop_search_level.
3517 (init_search_processing): Remove.
3519 2004-07-12 Mark Mitchell <mark@codesourcery.com>
3521 * cp-tree.h (get_aggr_typedef): Remove.
3522 * init.c (get_aggr_typedef): Likewise.
3524 * name-lookup.c (push_class_level_binding): Simplify.
3526 2004-07-12 Andrew Pinski <apinski@apple.com>
3530 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
3532 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
3535 2004-07-12 Eric Christopher <echristo@redhat.com>
3537 * parser.c (cp_parser_class_head): Remove unused variable.
3539 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3541 * decl.c (grok_op_properties): Reject [de-]allocation functions
3542 declared in a namespace, or declared as static.
3544 2004-07-12 Nathan Sidwell <nathan@codesourcery.com>
3546 * cp-tree.h (make_binfo): Remove.
3547 * decl.c (xref_basetypes): Use make_tree_binfo directly.
3548 * tree.h (copy_base_binfos): Likewise.
3549 (make_binfo): Remove.
3551 * call.c (build_user_type_conversion_1, build_new_op,
3552 check_constructor_callable, build_temp,
3553 perform_direct_initialization_of_possible): Pass type directly to
3554 lookup_fnfields & build_special_member_call.
3555 (build_special_member_call): Accept a type, and complete it.
3556 * class.c (finish_stuct_bits): Copy the BINFOs here.
3557 * cvt.c (ocp_convert): Pass type directly to
3558 build_special_member_call.
3559 * decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
3560 (xref_basetypes): Allocate the binfo here. Adjust.
3561 * init.c (build_init, build_new_1): Pass type directly to
3562 build_special_member_call.
3563 * lex.c (cxx_make_type): Do not allocate binfo here.
3564 * name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
3565 * parser.c (cp_parser_class_head): Always call xref_basetypes.
3566 * pt.c (instantiate_class_template): Likewise. Inhibit access
3567 checking for template friends.
3568 * ptree.c (cxx_print_type): Adjust record printing.
3569 * search.c (lookup_base): When taking a type, complete it before
3570 looking for a binfo.
3571 (lookup_member): Delay completing a type.
3572 (push_class_decls): Don't walk an incomplete type.
3573 (lookup_conversions): Likewise.
3574 * semantics.c (finish_stmt_expr_expr): Pass type directly to
3575 build_special_member_call.
3576 * tree.c (copy_base_binfos): Adjust.
3577 (make_binfo): Likewise.
3578 * typeck.c (build_modify_expr): Pass type directly to
3579 build_special_member_call.
3580 * typeck2.c (process_init_constructor): Check a binfo exists.
3581 (build_m_component_ref): Allow accessing an incomplete type.
3582 (build_functional_cast): Pass type directly to
3583 build_special_member_call.
3585 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3588 * config-lang.in (gtfiles): Add typeck2.c.
3589 * Make-lang.in: Tweak typeck2.c dependencies, and add rule for
3591 * cp-tree.h: Declare complete_type_check_abstract.
3592 * typeck2.c (pat_calc_hash, pat_compare,
3593 complete_type_check_abstract): New functions.
3594 (abstract_virtuals_error): If the type is abstract, register the
3595 declaration within abstract_pending_vars for further checks.
3596 Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
3597 * decl.c (cp_finish_decl): Do not strip array types.
3598 (create_array_type_for_decl): Check for abstractness of the element
3600 (complete_vars): Call complete_type_check_abstract.
3601 * class.c (finish_struct): Prepare a list of virtual functions for
3602 template types, and call complete_vars on it to check for abstractness.
3604 2004-07-12 Paolo Bonzini <bonzini@gnu.org>
3606 PR tree-optimization/14107
3607 * decl.c (finish_function): Remove temporary band-aid.
3609 2004-07-11 Mark Mitchell <mark@codesourcery.com>
3611 * call.c (build_operator_new_call): Avoid using push_to_top_level.
3612 (build_new_op): Adjust call to lookup_function_nonclass.
3613 * name-lookup.c (identifier_type_value): Adjust call to
3615 (lookup_name_real): Add block_p parameter.
3616 (lookup_name_nonclass): Adjust call to lookup_name_real.
3617 (lookup_function_nonclass): Likewise.
3618 (lookup_name): Likewise.
3619 * name-lookup.h (lookup_name_real): Change prototype.
3620 (lookup_name_nonclass): Likewise.
3621 * parser.c (cp_parser_lookup_name): Likewise.
3623 * cp-tree.h (saved_scope): Make old_bindings a vector.
3624 (unuse_fields): Remove.
3625 * name-lookup.h (cxx_saved_binding): Define it.
3626 * class.c (pushclass): Don't use unuse_fields.
3627 * name-lookup.c (cxx_saved_binding_make): Remove.
3628 (store_binding): Add new bindings to a vector, using an
3629 accumulator style, rather than adding them to a list.
3630 (store_bindings): Adjust accordingly.
3631 (store_class_bindings): Likewise.
3632 (push_to_top_level): Likewise.
3633 (pop_from_top_level): Likewise.
3634 * optimize.c (maybe_clone_body): Must push_to_top_level and
3635 pop_from_top_level calls outside of loop.
3636 * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope
3637 calls here from cp_parser_late_parsing_default_args.
3638 (cp_parser_save_default_args): Record the class type in which the
3639 function is declared.
3640 (cp_parser_late_parsing_default_args): Do not call
3641 push_nested_class/pop_nested_class.
3642 * search.c (dfs_unuse_fields): Remove.
3643 (unuse_fields): Remove.
3645 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
3647 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
3648 LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
3649 * cp-tree.h (poplevel): Declare.
3650 (set_block): Remove.
3651 * decl.c (set_block): Remove.
3653 2004-07-10 Mike Stump <mrs@apple.com>
3655 * decl2.c (import_export_class): Never export/import vtables
3656 with inline key functions.
3658 2004-07-09 Steven Bosscher <stevenb@suse.de>
3660 * typeck.c (c_expand_asm_operands): Remove.
3662 2004-07-09 Mike Stump <mrs@apple.com>
3664 * typeck.c (build_class_member_access_expr): Skip null deref
3665 warning when we don't dereference it.
3667 2004-07-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3671 * class.c (check_field_decls): Improve -Weffc++ warning: do not
3672 warn for pointers to functions/members, or for classes without
3675 2004-07-08 Mark Mitchell <mark@codesourcery.com>
3677 * name-lookup.h (struct cp_binding_level): Update documentation
3680 2004-07-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3683 * typeck.c (check_return_expr): Improve -Weffc++ warning: handle
3684 returning CALL_EXPR, and non-reference return type.
3686 2004-07-08 Nathan Sidwell <nathan@codesourcery.com>
3688 * name-lookup.c (push_binding): Use VEC_reserve.
3690 2004-07-08 Richard Henderson <rth@redhat.com>
3692 * cp-tree.h (expand_eh_spec_block): Remove.
3694 2004-07-07 Mark Mitchell <mark@codesourcery.com>
3696 * cp-tree.h (saved_scope): Remove x_previous_class_type and
3697 x_previous_class_values; add x_previous_class_level.
3698 (previous_class_type): Remove.
3699 (previous_class_values): Remove.
3700 (previous_class_level): New macro.
3701 * class.c (pushclass): Restore the identifier cache more
3703 (invalidate_class_lookup_cache): Use vector for class_shadowed and
3704 previous_class_values.
3705 * decl.c (poplevel): Likewise.
3706 * name-lookup.c (cxx_binding_init): New function.
3707 (cxx_binding_make): Use it.
3708 (push_binding): For a binding in a class level, use a vector of
3709 cp_class_binding nodes.
3710 (push_binding_level): New function.
3711 (begin_scope): Use it.
3712 (leave_scope): Do not put class binding levels on the free list.
3713 (print_binding_level): Adjust for the fact that class_shadowed is
3715 (poplevel_class): Likewise.
3716 (clear_identifier_class_values): Likewise.
3717 (push_class_level_binding): Likewise.
3718 (set_class_shadows): Remove.
3719 (store_binding): New function.
3720 (store_class_bindings): New function.
3721 (push_to_top_level): Use store_class_bindings as appropriate.
3722 (pop_from_top_level): Use previous_class_level, not
3723 previous_class_type.
3724 * name-lookup.h (cp_class_binding): New type.
3725 (cp_binding_level): Use a vector object for class_shadowed.
3726 (push_binding_level): Declare.
3727 (set_class_shadows): Remove.
3729 2004-07-07 Andrew Pinski <apinski@apple.com>
3731 * class.c (instantiate_type): BUFFER_REF is dead.
3732 * lex.c (init_operators): IN_EXPR is dead.
3734 2004-07-07 Jason Merrill <jason@redhat.com>
3737 * call.c (build_new_op): Give overload warnings for built-in
3740 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
3743 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
3746 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
3748 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
3749 * class.c (build_primary_vtable, check_bases,
3750 determine_primary_base, finish_struct_bits,
3751 maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
3752 get_basefndecls, warn_hidden, walk_subobject_offsets,
3753 build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
3754 layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
3755 finish_struct_1, get_vfield_name, contains_empty_class_p,
3756 dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
3757 dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
3758 add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
3760 * decl.c (xref_basetypes): Likewise.
3761 * dump.c (cp_dump_tree): Likewise.
3762 * error.c (dump_expr): Likewise.
3763 * init.c (sort_mem_initializers, expand_member_init,
3764 push_base_cleanups): Likewise.
3765 * method.c (do_build_copy_constructor, do_build_assign_reg,
3766 synthesize_exception_spec): Likewise.
3767 * name-lookup.c (arg_assoc_class): Likewise.
3768 * pt.c (instantiate_class_template, tsubst,
3769 get_template_base_recursive): Likewise.
3770 * ptree.c (cxx_print_type): Likewise.
3771 * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
3772 * search.c (lookup_base_r, dynamic_cast_base_recurse,
3773 dfs_access_in_type, access_in_type, lookup_field_queue_p,
3774 bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
3775 marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
3776 dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
3777 binfo_for_vtable, copied_binfo, original_binfo): Likewise
3778 * tree.c (copy_base_binfos, make_binfo): Likewise.
3779 * typeck.c (commmon_base_type): Likewise
3780 * typeck2.c (process_init_constructor): Likewise
3782 2004-07-06 Joseph S. Myers <jsm@polyomino.org.uk>
3784 * decl.c (check_tag_decl): Name redeclared type in diagnostic.
3786 2004-07-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3789 * pt.c (convert_nontype_argument): Disallow conversions between
3790 different enumeration types.
3792 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
3794 * cp-tree.h (BINFO_MARKED): Remove.
3795 (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
3796 BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
3797 BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
3798 (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
3799 * class.c (build_base_path): Use BINFO_VIRTUAL_P.
3800 (mark_primary_bases, determine_primary_base, base_derived_from,
3801 dfs_find_final_overrider, dfs_find_final_overrider_q,
3802 dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
3803 dfs_modify_vtables, walk_subobject_offsets,
3804 layout_nonempty_base_or_field, build_base_field,
3805 build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
3806 end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
3807 finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
3808 build_ctor_vtbl_group, accumulate_vtble_inits,
3809 dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
3810 build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
3811 add_vcall_offset_vtbl_entries_1): Likewise.
3812 * decl.c (xref_basetypes): Incomming virtual base indicated by
3814 * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
3815 * init.c (finish_init_stmts, sort_mem_initializers,
3816 emit_mem_initializers, build_vtble_address, expand_member_init,
3817 push_base_cleanups): Likewise.
3818 * method.c (do_build_copy_constructor): Likewise.
3819 * pt.c (instantiate_class_template,
3820 get_template_base_recursive): Likewise.
3821 * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
3822 get_pseudo_ti_desc): Likewise.
3823 * search.c (lookup_base_r, dynamic_cast_base_recurse,
3824 binfo_from_vbase, binfo_via_virtual, copied_binfo,
3825 original_binfo): Likewise.
3826 * semantics.c (finish_base_specifier): Virtualness is indicated
3828 * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
3830 2004-07-06 Mark Mitchell <mark@codesourcery.com>
3833 2004-06-24 Jason Merrill <jason@redhat.com>
3835 * decl.c (grokparms): Give the PARM_DECL reference type if the
3836 parameter is passed by invisible reference.
3838 2004-07-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3840 * cp-lang.c (cp_var_mod_type_p): Add extra arg.
3841 * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
3842 * pt.c (check_instantiated_args, unify): Likewise.
3844 2004-07-05 Phil Edwards <phil@codesourcery.com>
3846 * Make-lang.in (check-c++, lang_checks): Add some comments.
3848 2004-07-05 Zack Weinberg <zack@codesourcery.com>
3850 * cp-mudflap.c: Delete file.
3851 * Makefile.in: Remove all references to cp-mudflap.o.
3853 2004-07-05 Zack Weinberg <zack@codesourcery.com>
3855 * decl.c (cxx_init_decl_processing): Call
3856 build_common_tree_nodes before creating the global NAMESPACE_DECL.
3858 2004-07-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3861 * call.c (build_operator_new_call): Look only at global scope.
3863 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
3865 * call.c (enforce_access): Expect TREE_BINFO.
3866 * class.c (binfo_ctor_vtable): Check TREE_BINFO.
3867 * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
3868 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
3870 (BINFO_LANG_ELTS): Remove.
3871 (BINFO_LANG_SLOTS): New.
3872 (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
3873 (CLASSTYPE_TEMPLATE_INFO): Adjust.
3874 * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
3875 * search.c (lookup_member): Check TREE_BINFO.
3876 * semantics.c (perform_or_defer_access_check): Likewise.
3877 (check_accessibility_of_qualified_id): Check
3878 deferred_access_no_check.
3879 * tree.c (make_binfo): Use make_tree_binfo.
3881 2004-07-04 Mark Mitchell <mark@codesourcery.com>
3883 * method.c (implicitly_declare_fn): Set linkage of generated
3886 2004-07-04 Richard Henderson <rth@redhat.com>
3888 * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
3890 2004-07-03 Scott Brumbaugh <scottb.lists@verizon.net>
3893 * name-lookup.c (push_class_level_binding): Don't pass a
3894 TREE_LIST of ambiguous names to check_template_shadow as it
3895 only handles declarations. Instead, pull the declaration
3898 2004-07-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3901 * pt.c (check_explicit_specialization): Clarify error message.
3903 2004-07-02 Richard Henderson <rth@redhat.com>
3905 * tree.c (cp_unsave_r): Update remap_save_expr call.
3907 2004-07-02 Mark Mitchell <mark@codesourcery.com>
3910 * mangle.c (write_template_arg): Correct mangling.
3913 * decl.c (grokdeclarator): Robustify.
3915 2004-07-01 Richard Henderson <rth@redhat.com>
3917 * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
3918 * method.c (synthesize_method): Don't clear_last_expr.
3919 * name-lookup.c (maybe_push_cleanup_level): Likewise.
3921 2004-07-01 Nick Clifton <nickc@redhat.com>
3923 * decl2.c (import_export_class): Invoke the
3924 import_export_class field in the gcc_target structure if it is not
3927 2004-06-30 Richard Henderson (rth@redhat.com>
3929 * decl.c (start_preparsed_function): Don't set immediate_size_expand.
3930 * method.c (use_thunk): Likewise.
3932 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
3934 * call.c (build_over_call), typeck.c (build_function_call): Call
3935 check_function_arguments instead of check_function_format.
3937 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
3939 * call.c (build_over_call), typeck.c (build_function_call): Update
3940 calls to check_function_format.
3942 2004-06-30 Richard Henderson <rth@redhat.com>
3944 * call.c (build_over_call): Use __builtin_memcpy for copying
3945 CLASS_AS_BASE rather than funny casting.
3947 2004-06-30 Richard Henderson <rth@redhat.com>
3949 * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
3950 TYPE_SIZE_UNIT of full_type.
3952 2004-06-30 Per Bothner <per@bothner.com>
3954 Conditionally compile support for --enable-mapped_location.
3955 * decl.c (pop_label): Handle (imperfectly) USE_MAPPED_LOCATION case.
3956 * decl2.c: If USE_MAPPED_LOCATION, don't do some line number
3957 adjustments - which I don't understand.
3958 * error.c (dump_decl): Rename "<interrnal>" to "<built-in>".
3959 * error.c: Use LOCATION_FILE and EXPR_LOCATION macros.
3960 (print_instantiation_partial_context): Use expand_location.
3961 * decl.c (duplicate_decl): Use new DECL_IS_BUILTIN macro.
3962 * name-lookup.c: Likewise.
3963 * lex.c (cxx_init): Likewise. Also use BUILTINS_LOCATION.
3964 * name-lookup.c: Use input_line macro.
3965 * parser.c (cp_lexer_get_preprocessor_token): Use UNKNOWN_LOCATION.
3966 (cp_parser_statement): Rename locaal variable statement_locus to
3967 statement_location and use SET_EXPR_LOCATION macro.
3968 * pt.c: Handle USE_MAPPED_LOCATION case. Use new macros.
3969 * tree.c (cp_walk_subtrees): Likewise.
3971 2004-06-29 Per Bothner <per@bothner.com>
3973 * tree.c (build_min_nt, build_min, build_min_non_dep):
3974 Don't set TREE_COMPLEXITY from input_line.
3976 2004-06-29 Paul Brook <paul@codesourcery.com>
3978 * init.c: Include target.h.
3979 (get_cookie_size): Remove and replace with target hook.
3981 (build_new_1): Store the element size in the cookie.
3983 2004-06-29 Nathan Sidwell <nathan@codesourcery.com>
3986 * parser.c (cp_parser_template_declaration_after_export): Disable
3987 access checks here ...
3988 (cp_parser_class_specifier): ... not here.
3990 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
3992 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
3993 VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
3994 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
3997 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
3999 * cp-tree.h (struct deferred_access): Move to ...
4000 * semantics.c (struct deferred_access): ... here. Adjust.
4001 (deferred_access_stack): Make a VEC(deferred_access),
4002 (deferred_access_free_list): Remove.
4003 (deferred_access_no_check): New.
4004 (push_deferring_access_checks, resume_deferring_access_checks,
4005 stop_deferring_access_checks, pop_deferring_access_checks,
4006 get_deferred_access_checks, pop_to_parent_deferring_access_checks,
4007 perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
4009 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
4012 * call.c (build_temp): Declare.
4013 (check_constructor_callable): New.
4014 (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
4015 CONSTRUCTOR_CALLABLE.
4016 (convert_like_real, initialize_reference): Use
4017 check_constructor_callable.
4018 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
4019 (LOOKUP_*): Renumber.
4021 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
4023 * friend.c (add_friend): Only perform access checks when context
4025 * lex.c (cxx_make_type): Only create a binfo for aggregate types.
4026 * parser.c (cp_parser_class_specifier): Disable access checks here
4027 when parsing the body of a templated class.
4028 * semantics.c (perform_or_defer_access_checks): Reorder to allow
4029 NULL binfos when not checking access.
4031 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
4033 Use vector API for vbase list.
4034 * cp-tree.h: Include vec.h
4035 (DEF_VEC_P (tree)): New type.
4036 (struct lang_type_class): Change vbase's member type.
4037 (binfo_for_vbase): Declare.
4038 * class.c (determine_primary_base, base_derived_from,
4039 update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
4040 warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
4041 build_vtbl_initializer): Adjust.
4042 * decl.c (xref_basetypes): Adjust, accumulate upper bound of
4044 * init.c (sort_mem_initializers, expand_member_init,
4045 push_base_cleanups): Adjust.
4046 * method.c (do_build_copy_constructor): Adjust.
4047 * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
4048 (binfo_for_vbase): New.
4049 * tree.c (copy_base_binfos): Adjust.
4051 2004-06-28 Mark Mitchell <mark@codesourcery.com>
4053 * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
4055 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
4058 * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
4059 paranthesis in case of pointers to array members.
4060 * error.c (dump_type_prefix): Likewise.
4061 (dump_type_suffix): Maybe issue a whitespace when printing
4064 2004-06-27 Mark Mitchell <mark@codesourcery.com>
4067 * parser.c (cp_parser_set_decl_spec_type): Refine test for
4068 redefinition of built-in types.
4070 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
4072 * error.c (pp_template_argument_list_start): Remove.
4073 (pp_template_argument_list_end): Likewise.
4074 (pp_separate_with_comma): Use pp_cxx_separate_with.
4075 (reinit_global_formatting_buffer): Remove.
4076 (pp_non_consecutive_character): Likewise.
4077 (dump_scope): Use pp_cxx_colon_colon.
4078 (dump_template_parameter): Use pp_cxx_identifier,
4079 pp_cxx_tree_identifier and pp_cxx_whitespace.
4080 (dump_templat_bindings): Replace use of pp_string with sequence
4081 of pp_cxx_whitespace and pp_equal.
4082 (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
4083 pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set
4085 (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
4086 (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace,
4087 pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
4088 (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
4089 pp_cxx_right_bracket, pp_cxx_identifier throughout,
4090 (dump_decl): Likewise.
4091 (dump_template_decl): Likewise.
4092 (dump_function_decl): Likewise. Set padding as appropriate.
4093 (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
4095 (dump_exception_spec): Likewise.
4096 (dump_function_name): Use pp_cxx_tree_identifier and
4098 (dump_template_parms): Use pp_cxx_begin_template_argument_list and
4099 pp_cxx_end_template_argument_list.
4100 (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
4101 pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
4102 pp_cxx_whitespace throughout.
4103 (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
4105 (dump_unary_op): Likewise.
4106 (reinit_cxx_pp): New function.
4107 (type_as_string); Use it.
4108 (expr_as_string): Likewise.
4109 (decl_as_string); Likewise.
4110 (context_as_string): Likewise.
4111 (lang_decl_name): Likewise.
4112 (decl_to_string): Likewise.
4113 (expr_to_string): Likewise.
4114 (parm_to_string): Likewise.
4115 (type_to_string): Likewise.
4116 (args_to_string): Likewise.
4117 (cv_to_string): Likewise.
4119 2004-06-26 Mark Mitchell <mark@codesourcery.com>
4121 * cp-tree.h (cp_cv_quals): New type.
4122 (cp_declarator): Use it instead of "tree" as appropriate.
4123 (grok_method_quals): Adjust prototype.
4124 (grokclassfn): Likewise.
4125 (do_friend): Likewise.
4126 * decl.c (grokfndecl): Use cp_cv_quals, not tree.
4127 (grokdeclarator): Likewise.
4128 * decl2.c (grok_method_quals): Likewise.
4129 (grokclassfn): Likewise.
4130 * friend.c (do_friend): Likewise.
4131 * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
4132 * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
4133 (make_pointer_declarator): Likewise.
4134 (make_reference_declarator): Likewise.
4135 (make_ptrmem_declarator): Likewise.
4136 (cp_parser_ptr_operator): Likewise.
4137 (cp_parser_cv_qualifier_seq_opt): Likewise.
4138 (cp_parser_cv_qualifier_opt): Remove.
4139 (cp_parser_new_declarator_opt): Adjust call to
4140 cp_parser_ptr_operator.
4141 (cp_parser_conversion_declaration_opt): Likewise.
4142 (cp_parser_declarator): Use cp_cv_quals, not tree.
4143 (cp_parser_direct_declarator): Likewise.
4145 2004-06-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4147 * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
4148 Rename DECL_STMT to DECL_EXPR.
4149 * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
4150 * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
4151 * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
4153 2004-06-26 Jan Hubicka <jh@suse.cz>
4156 * decl2.c (maybe_emit_vtables): Always import_export_vtable for the
4157 reachability analysis.
4159 2004-06-25 Mark Mitchell <mark@codesourcery.com>
4161 * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
4164 2004-06-25 Paul Brook <paul@codesourcery.com>
4166 * decl2.c (get_guard): Call targetm.cxx.guard_type.
4167 (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
4169 2004-06-24 Mark Mitchell <mark@codesourcery.com>
4171 * decl.c (grokdeclarator): Restore error messages about __thread.
4172 * parser.c (cp_parser_decl_specifier_seq): Likewise.
4174 2004-06-24 Jason Merrill <jason@redhat.com>
4177 * decl.c (grokparms): Give the PARM_DECL reference type if the
4178 parameter is passed by invisible reference.
4180 2004-06-24 Andreas Schwab <schwab@suse.de>
4182 * cp-tree.h (enum cp_storage_class): Remove trailing comma.
4184 2004-06-23 Mark Mitchell <mark@codesourcery.com>
4186 * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
4187 (cp/decl.o): Likewise.
4188 (cp/decl2.o): Likewise.
4189 (cp/pt.o): Likewise.
4190 (cp/semantics.o): Likewise.
4191 * config-lang.in (gtfiles): Do not reference cp/lex.h.
4192 * class.c: Do not include lex.h.
4193 (add_implicitly_declared_members): Do not use
4194 adding_implicit_members.
4195 (check_bases_and_members): Do not talk about grok_x_components.
4196 * cp/cp-tree.h (adding_implicit_members): Remove.
4197 (cp_storage_class): New type.
4198 (cp_decl_spec): Likewise.
4199 (cp_decl_specifier_seq): Likewise.
4200 (cp_parameter_declarator): Use it for the decl_specifiers field.
4201 (check_tag_decl): Adjust prototype.
4202 (shadow_tag): Likewise.
4203 (groktypename): Likewise.
4204 (start_decl): Likewise.
4205 (start_function): Likewise.
4206 (start_method): Likewise.
4207 (grok_x_components): Remove.
4208 (grokfield): Adjust prototype.
4209 (grokbitfield): Likewise.
4210 (finish_member_class_template): Remove.
4211 * decl.c: Do not include lex.h.
4212 (adding_implicit_members): Do not define.
4213 (check_tag_decl): Do not use trees to represent decl-specifiers.
4214 (shadow_tag): Likewise.
4215 (groktypename): Likewise.
4216 (start_decl): Likewise.
4217 (grokvardecl): Likewise.
4218 (grokdeclarator): Likewise.
4219 (grokparms): Likewise.
4220 (start_function): Likewise.
4221 (start_method): Likewise.
4222 * decl.h (grokdeclarator): Adjust prototype.
4223 * decl2.c: Do not include lex.h.
4224 (grok_x_components): Remove.
4225 (grokfield): Do not use trees to represent decl-specifiers.
4226 (grokbitfield): Likewise.
4227 * lex.c: Do not include lex.h.
4229 * parser.c: Include target.h.
4230 (clear_decl_specs): New function.
4231 (cp_parser_translation_unit): Do not use trees to represent
4233 (cp_parser_postfix_expression): Likewise.
4234 (cp_parser_new_type_id): Likewise.
4235 (cp_parser_condition): Likewise.
4236 (cp_parser_simple_declaration): Likewise.
4237 (cp_parser_decl_specifier_seq): Likewise.
4238 (cp_parser_function_specifier_opt): Likewise.
4239 (cp_parser_conversion_type_id): Likewise.
4240 (cp_parser_template_parameter): Likewise.
4241 (cp_parser_explicit_instantiation): Likewise.
4242 (cp_parser_type_specifier): Likewise.
4243 (cp_parser_simple_type_specifier): Likewise.
4244 (cp_parser_init_declarator): Likewise.
4245 (cp_parser_type_id): Likewise.
4246 (cp_parser_type_specifier_seq): Likewise.
4247 (cp_parser_parameter_declaration): Likewise.
4248 (cp_parser_member_declaration): Likewise.
4249 (cp_parser_exception_declaration): Likewise.
4250 (cp_parser_function_definition_from_specifiers_and_declarator):
4252 (cp_parser_single_declaration): Likewise.
4253 (cp_parser_save_member_function_body): Likewise.
4254 (cp_parser_friend_p): Likewise.
4255 (cp_parser_set_storage_class): New function.
4256 (cp_parser_set_decl_spec_type): Likewise.
4257 * pt.c: Do not include lex.h.
4258 * semantics.c: Likewise.
4259 (finish_member_class_template): Remove.
4261 2004-06-23 Roger Sayle <roger@eyesopen.com>
4263 * call.c (build_cxx_call): Don't call expand_tree_builtin. No
4264 longer take both "args" and "convert_args" as arguments.
4265 (build_op_delete_call): Update call to build_cxx_call.
4266 (build_over_call): Likewise, update call to build_cxx_call.
4267 * cp-tree.h (build_cxx_call): Update funtion prototype.
4268 * typeck.c (build_function_call): Don't call expand_tree_builtin.
4269 * rtti.c (throw_bad_cast): Update call to build_cxx_call.
4270 (throw_bad_typeid): Likewise.
4271 (build_dynamic_cast_1): Likewise.
4273 2004-06-22 Richard Henderson <rth@redhat.com>
4275 * class.c (build_vfn_ref): Take a pointer not object. Build
4277 (cp_fold_obj_type_ref): New.
4278 * call.c (build_over_call): Update build_vfn_ref call.
4279 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
4280 * cp-tree.h (cp_fold_obj_type_ref): Declare.
4282 2004-06-21 Jason Merrill <jason@redhat.com>
4285 * cp-gimplify.c (cp_gimplify_init_expr): Look through
4288 2004-06-21 Mark Mitchell <mark@codesourcery.com>
4290 * cp-tree.def (NEW_EXPR): Add a fourth slot.
4291 * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
4292 (TREE_PARMLIST): Likewise.
4293 (CALL_DECLARATOR_PARMS): Likewise.
4294 (CALL_DECLARATOR_QUALS): Likewise.
4295 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
4296 (cp_declarator_kind): New type.
4297 (cp_parameter_declarator): Likewise.
4298 (cp_declarator): Likewise.
4299 (cp_error_declarator): Likewise.
4300 (no_parameters): Likewise.
4301 (groktypename): Change prototype.
4302 (start_decl): Likewise.
4303 (start_handler_parms): Likewise.
4304 (get_scope_of_declarator): Likewise.
4305 (start_function): Likewise.
4306 (start_preparsed_function): New function.
4307 (start_function): Change prototype.
4308 (start_method): Likewise.
4309 (grokfield): Likewise.
4310 (grokbitfield): Likewise.
4311 (build_new): Likewise.
4312 (make_pointer_declarator): Remove.
4313 (make_reference_declarator): Likewise.
4314 (make_call_declarator): Likewise.
4315 (set_quals_and_spec): Likewise.
4316 (process_template_parm): Change prototype.
4317 (begin_function_definition): Remove.
4318 (finish_parmlist): Remove.
4319 * decl.c (groktypename): Do not use trees to represent
4321 (start_decl): Likewise.
4322 (start_handler_parms): Remove.
4323 (get_scope_of_declarator): Reimplement.
4324 (grokdeclarator): Do not use trees to represent declarators.
4325 (grokparms): Likewise.
4326 (start_function): Likewise.
4327 (start_method): Likewise.
4328 (build_void_list_mode): Do not use TREE_PARMLIST.
4329 * decl.h (grokdeclarator): Change prototype.
4330 * decl2.c (grok_method_quals): Robustify.
4331 (grok_x_components): Do not use trees to represent declarators.
4332 (grokfield): Likewise.
4333 (grokbitfield): Likewise.
4334 (start_objects): Build FUNCTION_DECLs, not declarators.
4335 (start_static_storage_duration_function): Likewise.
4336 * init.c (build_new): Simplify.
4337 * lex.c (make_pointer_declarator): Remove.
4338 (make_reference_declarator): Likewise.
4339 (make_call_declarator): Likewise.
4340 (set_quals_and_spec): Likewise.
4341 * method.c (use_thunk): Use start_preparsed_function.
4342 (synthesize_method): Likewise.
4343 (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
4344 * optimize.c (maybe_clone_body): Use start_preparsed_function.
4345 * parser.c (cp_error_declarator): New variable.
4346 (declarator_obstack): Likewise.
4347 (alloc_declarator): New function.
4348 (make_declarator): Likewise.
4349 (make_id_declarator): Likewise.
4350 (make_pointer_declarator): Likewise.
4351 (make_reference_declarator): Likewise.
4352 (make_ptrmem_declarator): Likewise.
4353 (make_call_declarator): Likewise.
4354 (make_array_declarator): Likewise.
4355 (no_parameters): New variable.
4356 (make_parameter_declarator): Likewise.
4357 (cp_parser_check_for_definition_in_return_type): Do not use trees
4358 to represent declarators.
4359 (cp_parser_translation_unit): Likewise.
4360 (cp_parser_new_expression): Likewise.
4361 (cp_parser_new_type_id): Likewise.
4362 (cp_parser_new_declarator_opt): Likewise.
4363 (cp_parser_direct_new_declarator): Likewise.
4364 (cp_parser_condition): Likewise.
4365 (cp_parser_declaration_statement): Likewise.
4366 (cp_parser_declaration): Likewise.
4367 (cp_parser_conversion_type_id): Likewise.
4368 (cp_parser_conversion_declarator_opt): Likewise.
4369 (cp_parser_template_parameter_list): Likewise.
4370 (cp_parser_template_parameter): Likewise.
4371 (cp_parser_explicit_instantiation): Likewise.
4372 (cp_parser_init_declarator): Likewise.
4373 (cp_parser_declarator): Likewise.
4374 (cp_parser_direct_declarator): Likewise.
4375 (cp_parser_type_id): Likewise.
4376 (cp_parser_parameter_declaration_clause): Likewise.
4377 (cp_parser_parameter_declaration_list): Likewise.
4378 (cp_parser_parameter_declaration): Likewise.
4379 (cp_parser_member_declaration): Likewise.
4380 (cp_parser_exception_declaration): Likewise.
4381 (cp_parser_check_declarator_template_parameters): Likewise.
4382 (cp_parser_function_definition_from_specifiers_and_declarator):
4384 (cp_parser_save_member_function_body): Likewise.
4385 * pt.c (process_template_parm): Add is_non_type parameter.
4386 (convert_template_argument): Adjust call to groktypename.
4387 (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
4388 (tsubst): Do not expect declarators.
4389 (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
4391 (instantiate_decl): Use start_preparsed_function.
4392 * semantics.c (begin_function_definition): Remove.
4393 (finish_parmlist): Remove.
4394 * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
4397 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4399 * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
4400 (build_new_method_call): Likewise.
4401 * decl.c (local_variable_p_walkfn): Don't walk into types.
4402 * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
4403 (build_anon_union_vars): Add new operand for COMPONENT_REF.
4404 * init.c (buld_new): Add new operand for ARRAY_REF.
4405 * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
4406 (do_build_assign_ref): Likewise.
4407 * parser.c (cp_parser_direct_new_declarator): Add new operands
4409 (cp_parser_direct_declarator): Likewise.
4410 * pt.c (tsubst): Likewise.
4411 (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
4413 * semantics.c (finish_non_static_data_member): Add new operand
4415 * typeck.c (build_class_member_access_expr): Likewise.
4416 (build_class_member_access_expr, finish_class_member_access_expr):
4418 (build_ptrmemfunc_access_expr): Likewise.
4419 (build_array_ref): Add new operands for ARRAY_REF.
4420 * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
4421 * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
4423 2004-06-21 Richard Henderson <rth@redhat.com>
4425 * dump.c (cp_dump_tree): Don't use dump_next_stmt.
4426 * parser.c (cp_parser_jump_statement): Update commentary.
4427 * pt.c (tsubst_expr): Use RETURN_EXPR.
4428 * semantics.c (finish_return_stmt): Likewise.
4429 (finalize_nrv_r): Likewise.
4430 * typeck.c, typeck2.c: Update file start commentary.
4432 2004-06-21 Richard Henderson <rth@redhat.com>
4434 * semantics.c (finish_expr_stmt): Call verify_sequence_points.
4436 2004-06-20 Richard Henderson <rth@redhat.com>
4438 * cp-tree.h (add_decl_stmt): Declare.
4439 * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
4440 * semantics.c (maybe_cleanup_point_expr): New.
4441 (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
4442 finish_for_expr, finish_switch_cond): Use it.
4443 (finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN.
4445 2004-06-20 Richard Henderson <rth@redhat.com>
4447 * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
4448 * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
4449 (cp_gimplify_expr): Call it.
4450 (gimplify_cleanup_stmt): Move from c-gimplify.c.
4451 (cp_genericize): New.
4452 * decl.c (finish_function): Call it.
4453 * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
4454 (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
4455 (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
4456 (cp_genericize): Declare.
4457 * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
4458 * dump.c (cp_dump_tree): Likewise.
4459 * semantics.c (push_cleanup): Move from c-semantics.c.
4461 2004-06-20 Zack Weinberg <zack@codesourcery.com>
4463 * cp-lang.c (has_c_linkage): Implement.
4465 * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
4466 * decl.c (duplicate_decls): Use COPY_DECL_RTL.
4467 (builtin_function_1): Don't call make_decl_rtl.
4468 (build_cp_library_fn): Don't call set_mangled_name_for_decl.
4469 (grokvardecl): Don't call mangle_decl.
4470 * except.c (nothrow_libfn_p): Look at DECL_NAME, not
4471 DECL_ASSEMBLER_NAME.
4472 * method.c (set_mangled_name_for_decl): Delete.
4473 * name-lookup.c (pushdecl): When a local extern shadows a
4474 file-scope declaration of the same object, give both DECLs the
4476 * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
4477 on DECL_ASSEMBLER_NAME.
4479 2004-06-19 Richard Henderson <rth@redhat.com>
4481 * cp-gimplify.c: Remove unnecessary prototypes.
4482 (cp_gimplify_stmt): Merge into ...
4483 (cp_gimplify_expr): ... here. Move to end of file. Handle
4484 stmts_are_full_exprs_p frobbing.
4485 * cp-tree.h (cp_gimplify_stmt): Remove.
4486 * pt.c (tsubst_expr): Merge prep_stmt and unify.
4487 * tree.c (init_tree): Don't set lang_gimplify_stmt.
4489 2004-06-18 Richard Henderson <rth@redhat.com>
4492 * semantics.c (begin_cond): New.
4493 (finish_cond): Rewrite to handle template DECL_STMTs specially.
4494 Assume that non-template decls go land before the conditional.
4495 (simplify_loop_decl_cond): Likewise.
4496 (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
4497 finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
4498 begin_switch_stmt, finish_switch_cond): Update to match.
4500 2004-06-17 Jason Merrill <jason@redhat.com>
4503 * semantics.c (simplify_aggr_init_expr): Don't return the slot.
4504 (finish_stmt_expr_expr): Update type after conversions.
4505 (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
4506 Handle void initializer.
4507 * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
4509 2004-06-17 Geoffrey Keating <geoffk@apple.com>
4511 * class.c (build_clone): Don't call defer_fn, let mark_used do it.
4512 * cp-tree.h (defer_fn): Delete.
4513 * decl2.c (defer_fn): Delete.
4514 (finish_file): Simplify deferred_fns loops; check that
4515 only used inline functions get into deferred_fns.
4516 (mark_used): Inline previous contents of defer_fn.
4518 2004-06-16 Richard Henderson <rth@redhat.com>
4520 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
4521 (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
4522 * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
4523 of CTOR_INITIALIZER ...
4524 (pp_cxx_statement): ... here.
4525 * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
4526 (finish_function): Use alloc_stmt_list to zap entire function.
4527 * parser.c (cp_parser_compound_statement): Update commentary.
4528 * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
4529 * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
4530 (finish_stmt_expr): Don't look through COMPOUND_STMT.
4532 2004-06-16 Geoffrey Keating <geoffk@apple.com>
4534 * pt.c (mark_decl_instantiated): Don't call defer_fn.
4536 2004-06-16 Richard Henderson <rth@redhat.com>
4538 * parser.c (cp_parser_labeled_statement): Update commentary.
4539 * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
4540 * tree.c (mark_local_for_remap_r): Likewise.
4542 2004-06-16 Richard Henderson <rth@redhat.com>
4544 * parser.c (cp_parser_asm_definition): Update commentary.
4545 * pt.c (tsubst_expr): Use ASM_EXPR.
4546 * semantics.c (finish_asm_stmt): Likewise.
4548 2004-06-16 Richard Henderson <rth@redhat.com>
4550 * decl.c (finish_destructor_body): Use LABEL_EXPR.
4551 * parser.c (cp_parser_statement): Update commentary.
4552 * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
4553 * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
4554 * tree.c (mark_local_for_remap_r): Likewise.
4556 2004-06-16 Richard Henderson <rth@redhat.com>
4559 * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
4560 statement in FOR_INIT_STMT for templates.
4562 2004-06-15 Richard Henderson <rth@redhat.com>
4564 * call.c (initialize_reference): Don't build CLEANUP_STMT here.
4565 * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
4566 (genericize_try_block): Use gimplify_stmt.
4567 (genericize_catch_block, genericize_eh_spec_block): Likewise.
4568 (cp_gimplify_init_expr): Remove STMT_EXPR special case.
4569 (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
4570 * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
4571 (cp_tree_chain_matters_p): Remove.
4572 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
4573 (COMPOUND_STMT_BODY_BLOCK): New.
4574 (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
4575 (EXPR_STMT_STMT_EXPR_RESULT): New.
4576 (building_stmt_tree): Check cur_stmt_list.
4577 (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
4578 (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
4579 * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
4580 (cp_finish_decl): Use push_cleanup.
4581 (start_function, finish_function): Use statement lists.
4582 (finish_stmt): Do nothing.
4583 * except.c (begin_eh_spec_block): Use statement lists.
4584 (check_handlers_1, check_handlers): Likewise.
4585 * init.c (construct_virtual_base): Don't add extra compound stmts.
4586 (build_vec_init): Likewise.
4587 * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
4588 * name-lookup.h (struct cp_binding_level): Add statement_list.
4589 * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
4590 (cp_parser_labeled_statement, cp_parser_expression_statement,
4591 cp_parser_statement_seq_opt): Likewise.
4592 (cp_parser_compound_statement): Likewise. Take bool for try block.
4593 (cp_parser_selection_statement): Tidy if processing.
4594 (cp_parser_already_scoped_statement): Rewrite to do what it says.
4595 * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
4596 (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST.
4597 Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
4598 * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
4599 (finish_cond): New, rewritten from FINISH_COND.
4600 (simplify_loop_decl_cond): New.
4601 (finish_expr_stmt): Avoid nested EXPR_STMTs.
4602 (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
4603 begin_else_clause, finish_else_clause, finish_if_stmt,
4604 begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
4605 begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
4606 finish_for_cond, finish_for_stmt, begin_switch_stmt,
4607 finish_switch_cond, finish_switch_stmt, begin_try_block,
4608 finish_try_block, finish_cleanup_try_block, finish_function_try_block,
4609 finish_handler_sequence, finish_function_handler_sequence,
4610 begin_handler, finish_handler_parms, finish_handler,
4611 begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
4612 using statement lists.
4613 (begin_compound_stmt): Replace has_no_scope argument with flags.
4614 Update all callers. Use statement lists.
4615 (finish_compound_stmt): Likewise.
4616 (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
4617 (current_scope_stmt_stack): Remove.
4618 (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
4619 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
4620 Rewrite with statement lists.
4622 2004-06-15 Alexandre Oliva <aoliva@redhat.com>
4624 * parser.c: Change all assignments of c_lex_string_translate
4625 to true and false to 1 and 0.
4626 (cp_lexer_read_token): Convert type of the translated string.
4627 (cp_parser_skip_to_closing_parentheses): Preserve original
4628 value of c_lex_string_translate, and set it to -1 while
4630 (cp_parser_cache_group): Likewise.
4631 (cp_parser_cache_group_1): Renamed.
4632 (cp_parser_asm_operand_list): Remove redundant setting of
4633 c_lex_string_translate.
4634 (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
4635 Handle chained strings.
4637 2004-06-12 Andrew Pinski <apinski@apple.com>
4641 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
4643 * cp-tree.h: Fix typo.
4645 * cp-tree.h: Include cgraph.h
4646 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
4647 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
4649 2004-06-12 Jason Merrill <jason@redhat.com>
4651 PR tree-optimization/14107
4652 * decl.c (finish_function): Warn about no return in all functions.
4654 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
4656 * cp-tree.h (struct language_function): Remove cannot_inline.
4657 * decl.c (save_function_data): cannot_inline is no more.
4658 (cxx_push_function_context): Likewise.
4659 * decl2.c (start_objects, start_static_storage_duration_function):
4660 Reset DECL_INLINE, set DECL_UNINLINABLE.
4662 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4665 * search.c (lookup_field): Propagate the ambiguity list.
4666 (lookup_fnfields): Likewise.
4668 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4671 * parser.c (cp_parser_template_name): Ctors/dtors never need a
4672 template keyword to disambiguate.
4674 2004-06-14 Mark Mitchell <mark@codesourcery.com>
4677 * decl.c (grokdeclarator): Ignore pointer-to-members when
4678 computing template depth.
4681 * name-lookup.c (pushtag): Do not try to put class declarations in
4682 explicit specialization scopes.
4684 2004-06-11 Andrew Pinski <pinskia@physics.uc.edu>
4686 * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
4688 2004-06-11 Mark Mitchell <mark@codesourcery.com>
4691 * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
4692 bindings for undeclared built-ins.
4694 2004-06-11 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4696 * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
4697 appear at the correct location.
4699 2004-06-10 Jason Merrill <jason@redhat.com>
4703 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4704 * init.c (build_offset_ref): Build SCOPE_REF with non-null
4705 TREE_TYPE for non-dependent names.
4706 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
4707 unknown_type_node as its TREE_TYPE.
4708 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
4709 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
4710 (dump_expr) <SCOPE_REF case>: Likewise.
4712 2004-06-10 Mark Mitchell <mark@codesourcery.com>
4715 * parser.c (cp_parser_direct_declarator): Robustify.
4718 * pt.c (tsubst_copy): Use decl_constant_value on enumeration
4719 constants in non-dependent contexts.
4723 * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
4726 2004-06-10 Jakub Jelinek <jakub@redhat.com>
4729 * decl.c (duplicate_decls): Handle fileptr_type_node arguments
4732 2004-06-09 Mark Mitchell <mark@codesourcery.com>
4736 2004-06-07 Mark Mitchell <mark@codesourcery.com>
4737 * lex.c (handle_pragma_interface): Deprecate.
4738 (handle_pragma_implementation): Likewise.
4740 2004-06-09 Andrew Pinski <pinskia@physics.uc.edu>
4742 * g++spec.c (lang_specific_driver): Remove check for -lm
4743 and -lmath when check it see if it was the math library.
4745 2004-06-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4748 * parser.c (cp_parser_direct_declarator): Reject constructor named
4749 as qualified template-id.
4751 2004-06-07 Mark Mitchell <mark@codesourcery.com>
4754 * lex.c (handle_pragma_interface): Deprecate.
4755 (handle_pragma_implementation): Likewise.
4757 2004-06-07 Mark Mitchell <mark@codesourcery.com>
4760 * parser.c (cp_parser_iteration_statement): Fix typo in error
4764 * pt.c (tsubst_default_argument): Do not defer access checks
4765 while substituting into the default argument.
4768 * pt.c (tsubst_copy): Do not try to substitute for an enumeration
4769 constant in a non-dependent context.
4772 * except.c (build_throw): Ensure that temp_expr has been
4775 2004-06-06 Roger Sayle <roger@eyesopen.com>
4777 * cp/cp-tree.h (lvalue_or_else): Add function prototype.
4779 2004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4782 * parser.c (cp_parser_mem_initializer_id): Gracefully reject
4783 'typename', and accept 'template'.
4785 2004-06-03 Andrew Pinski <pinskia@physics.uc.edu>
4786 Jan Hubicka <jh@suse.cz>
4789 * method.c (use_think): Do not mark thunk as referenced.
4791 2004-06-03 Matt Austern <austern@apple.com>
4794 * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
4795 is nonzero, and if we see a noninline definition of a key method,
4796 make the vtables nonweak.
4798 2004-06-02 Matt Austern <austern@apple.com>
4800 * cp-tree.h (instantiate_decl): new boolean parameter,
4801 undefined_ok. Current behavior is equivalent to its being 0.
4802 * decl2.c (mark_used): Add new argument when calling instantiate_decl
4803 * pt.c (mark_decl_instantiated): Unconditionally make
4804 instantiations explicit unconditionally
4805 (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
4806 since mark_decl_instantiated now does it.
4807 (instantiate_class_member): New. Instantiate a member of an
4808 explicitly instantiated class template.
4809 (do_type_instantiation): Explicitly instantiate members of an
4810 explicitly instantiated class template.
4811 (instantiate_decl): if undefined_ok is nonzero, and if we're
4812 trying to explicitly instantiated a template with no definition,
4813 change it to an implicit instantiation.
4814 (instantiate_pending_templates): Add new argument to instantiate_decl.
4815 * tree.c (cp_cannot_inline_tree_fn): Likewise.
4817 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
4819 * cp-tree.h: Fix typo.
4821 * cp-tree.h: Include cgraph.h
4822 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
4823 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
4825 2004-06-01 Jason Merrill <jason@redhat.com>
4828 * call.c (call_builtin_trap): Remove type parm.
4829 (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
4830 (build_x_va_arg): Dereference a null pointer for a non-POD argument.
4832 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4835 * init.c (build_offset_ref): Build SCOPE_REF with non-null
4836 TREE_TYPE for non-dependent names.
4837 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
4838 unknown_type_node as its TREE_TYPE.
4839 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
4840 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
4841 (dump_expr) <SCOPE_REF case>: Likewise.
4843 2004-06-01 Richard Henderson <rth@redhat.com>
4844 Andrew Pinski <pinskia@physics.uc.edu>
4846 * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
4847 * parser.c (struct cp_parser): Remove in_offsetof.
4848 (cp_parser_new): Don't set it.
4849 (cp_parser_unary_expression): Don't check it.
4850 (cp_parser_postfix_open_square_expression): Split out from ...
4851 (cp_parser_postfix_expression): ... here.
4852 (cp_parser_postfix_dot_deref_expression): Likewise.
4853 (cp_parser_builtin_offsetof): New.
4854 (cp_parser_primary_expression): Use it.
4856 2004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4859 * parser.c (cp_parser_postfix_expression): Allow subscript
4860 operator in offsetof.
4862 2004-05-31 Mark Mitchell <mark@codesourcery.com>
4865 * friend.c (add_friend): Do not try to perform access checks for
4866 functions from dependent classes.
4868 2004-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
4870 * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
4871 (pp_cxx_begin_template_argument_list): Turn into a function.
4872 (pp_cxx_end_template_argument_list): Likewise.
4873 (pp_cxx_separate_with): Define.
4874 (pp_cxx_unqualified_id): Tidy.
4875 (pp_cxx_primary_expression): Likewise.
4876 (pp_cxx_postfix_expression): Likewise.
4877 (pp_cxx_expression): Likewise.
4878 (pp_cxx_simple_type_specifier): Likewise.
4879 (pp_cxx_type_specifier_seq): Likewise.
4880 (pp_cxx_parameter_declaration_clause): Likewise.
4881 (pp_cxx_exception_specification): Likewise.
4882 (pp_cxx_direct_declarator): Likewise.
4883 (pp_cxx_type_id): Likewise.
4884 * cxx-pretty-print.h (pp_cxx_whitespace): Export from
4886 (pp_cxx_left_paren): Likewise.
4887 (pp_cxx_right_paren): Likewise.
4888 (pp_cxx_left_brace): Likewise.
4889 (pp_cxx_right_brace): Likewise.
4890 (pp_cxx_left_bracket): Likewise.
4891 (pp_cxx_right_bracket): Likewise.
4892 (pp_cxx_dot): Likewise.
4893 (pp_cxx_identifier): Likewise.
4894 (pp_cxx_tree_identifier): Likewise.
4895 (pp_cxx_ampersand): New macro.
4896 (pp_cxx_star): Likewise.
4897 (pp_cxx_arrow): Likewise.
4898 (pp_cxx_semicolon): Likewise.
4899 (pp_cxx_complement): Likewise.
4900 (pp_cxx_begin_template_argument_list): Declaree.
4901 (pp_cxx_end_template_argument_list): Likewise.
4902 (pp_cxx_colon_colon): likewise.
4904 2004-05-31 Eric Botcazou <ebotcazou@libertysurf.fr>
4906 * parser.c (cp_parser_simple_type_specifier): Explicitly test
4909 2004-05-31 Kazu Hirata <kazu@cs.umass.edu>
4911 * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
4912 typeck.c: Fix comment formatting.
4914 2004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
4916 * cp-lang.c (cp_expand_decl): Remove.
4917 (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
4919 2004-05-30 Andreas Jaeger <aj@suse.de>
4921 * lang-specs.h: Add missing initializers for .ii.
4923 2004-05-28 Aldy Hernandez <aldyh@redhat.com>
4925 * decl.c (cp_make_fname_decl): Free return value from
4928 2004-05-28 Mark Mitchell <mark@codesourcery.com>
4931 * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
4933 * init.c (build_new): Likewise.
4936 * name-lookup.c (arg_assoc): Robustify.
4939 * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
4940 when determining the scope to use for a pointer to member.
4941 (lookup_anon_field): Give it external linkage.
4942 * cp-tree.h (lookup_anon_field): Declare it.
4943 * expr.c (cplus_expand_constant): Use it.
4945 2004-05-28 Mark Mitchell <mark@codesourcery.com>
4948 * parser.c (cp_parser_simple_type_specifier): Call
4949 maybe_note_name_used_in_class.
4951 2004-05-28 Tom Marshall <tmarshall@real.com>
4954 * class.c (finish_struct_1): Warn only if the dtor is non-private or
4955 the class has friends.
4957 2004-05-27 Adam Nemet <anemet@lnxw.com>
4960 * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
4961 TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
4963 2004-05-24 Geoffrey Keating <geoffk@apple.com>
4965 * method.c (implicitly_declare_fn): Don't call defer_fn; abort
4966 if it might be needed.
4967 * pt.c (mark_decl_instantiated): Only call defer_fn if
4968 the function actually needs processing in finish_file.
4969 * decl2.c (finish_file): Add check that elements in
4970 deferred_fns_used are really needed there. Remove unnecessary
4971 test of DECL_SAVED_TREE.
4973 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
4975 * Make-lang.in: No need to specify $(LIBCPP).
4977 2004-05-23 Mark Mitchell <mark@codesourcery.com>
4980 * parser.c (cp_parser_class_head): Robustify.
4983 * parser.c (cp_parser_decl_specifier_seq): Correct error in
4985 (cp_parser_constructor_declarator_p): Treat attributes
4989 * typeck.c (build_unary_op): Do not attempt to resolve casts to
4990 base classes in templates.
4992 2004-05-23 Mark Mitchell <mark@codesourcery.com>
4995 * pt.c (instantiate_template): Robustify.
4997 2004-05-23 Mark Mitchell <mark@codesourcery.com>
5000 * decl.c (xref_tag): Issue errors about redeclaring template
5001 classes as non-template classes.
5003 2004-05-23 Mark Mitchell <mark@codesourcery.com>
5006 * name-lookup.c (supplement_binding): Allow redefinitions of
5010 * parser.c (cp_parser_template_argument): Robustify.
5012 2004-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
5014 * class.c (alter_access): Use %E format specifier to print an
5015 identifier node. Avoid looking at the IDENTIFIER_POINTER.
5016 (push_lang_context): Likewise.
5017 * decl.c (lookup_label): Likewise.
5018 (grokdeclarator): Likewise.
5019 * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
5020 * pt.c (do_type_instantiation): Likewise.
5021 * tree.c (handle_java_interface_attribute): Likewise.
5022 (handle_com_interface_attribute): Likewise.
5023 (handle_init_priority_attribute): Likewise.
5025 2004-05-22 Mark Mitchell <mark@codesourcery.com>
5029 * pt.c (build_non_dependent_expr): Expand the set of tree nodes
5030 recognized as overloaded functions.
5032 2004-05-22 Mark Mitchell <mark@codesourcery.com>
5035 * class.c (layout_nonempty_base_or_field): Do not try to avoid
5036 layout conflicts for unions.
5039 * typeck.c (build_x_unary_op): Instantiate template class
5040 specializations before looking for "operator &".
5043 * typeck.c (complete_type): Layout non-dependent array types, even
5047 * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
5050 2004-05-22 Roger Sayle <roger@eyesopen.com>
5052 * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
5053 returning when TREE_TYPE is error_mark_node.
5054 * typeck.c (require_complete_type): Return error_mark_node if
5055 value's type is an error_mark_node.
5057 2004-05-20 Andrew Pinski <pinskia@physics.uc.edu>
5059 * optimize.c (calls_setjmp_r): Remove.
5060 (calls_setjmp_p): Remove.
5061 * cp-tree.c (calls_setjmp_p): Remove.
5062 * decl.c (finish_function): Do not call calls_setjmp_p.
5064 2004-05-18 Zack Weinberg <zack@codesourcery.com>
5066 * decl.c (cp_finish_decl): Use mark_decl_referenced.
5067 * decl2.c (maybe_make_one_only): Likewise.
5068 * method.c (use_thunk): Likewise.
5070 2004-05-18 Jason Merrill <jason@redhat.com>
5072 * class.c (build_base_path): Tidy a bit.
5074 2004-05-14 Geoffrey Keating <geoffk@apple.com>
5076 * name-lookup.c (struct scope_binding): New.
5077 (EMPTY_SCOPE_BINDING): New.
5078 (lookup_using_namespace): Take a scope_binding instead of a
5080 (qualified_lookup_using_namespace): Likewise.
5081 (cxx_binding_clear): Delete.
5082 (do_nonmember_using_decl): Use a scope_binding instead of a
5084 (lookup_tag): Don't call select_decl.
5085 (ambiguous_decl): Don't return anything (and change callers to match).
5086 Take a scope_binding as the second parameter.
5087 (lookup_namespace_name): Use a scope_binding instead of a
5089 (unqualified_namespace_lookup): Likewise.
5090 (lookup_qualified_name): Likewise.
5091 (select_decl): Take a scope_binding instead of a cxx_binding.
5092 Use macros rather than hand-coding tests for type-ness.
5094 2004-05-13 Diego Novillo <dnovillo@redhat.com>
5096 * cp-gimplify.c: Rename from cp-simplify.c.
5097 * Make-lang.in, optimize.c: Update.
5099 2004-05-13 Diego Novillo <dnovillo@redhat.com>
5101 Merge from tree-ssa-20020619-branch. See
5102 ChangeLog.tree-ssa for details.
5104 * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
5105 cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
5106 expr.c, init.c, name-lookup.h, optimize.c, parser.c,
5107 pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
5109 * cp-mudflap.c: New file.
5110 * cp-simplify.c:: New file.
5112 2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5115 * decl2.c (check_classfn): For member templates, compare also the
5116 template parameters to match the declaration.
5117 * cp-tree.h: Adjust declaration of check_classfn.
5118 * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
5119 * friend.c (do_friend): Likewise.
5120 * pt.c (tsubst_friend_function): Likewise.
5122 2004-05-01 Zack Weinberg <zack@codesourcery.com>
5124 * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
5125 Instead, dig into the representation type to find the array bound.
5127 2004-04-30 Jason Merrill <jason@redhat.com>
5129 Refer to base members using COMPONENT_REFs where possible.
5130 * class.c (build_simple_base_path): New fn.
5131 (build_base_path): Use it for non-virtual base references.
5132 (layout_class_type): Change base fields to their real type
5133 after layout is done.
5134 * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
5135 * cp-lang.c (cxx_get_alias_set): Use it.
5137 2004-04-30 Kazu Hirata <kazu@cs.umass.edu>
5139 * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
5142 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5145 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
5146 used in integral constant expressions.
5148 2004-04-22 Mark Mitchell <mark@codesourcery.com>
5150 * init.c (build_aggr_init): Fix accidental use of C99 construct in
5153 * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
5155 * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
5156 * decl.c (reshape_init): Use it.
5157 * init.c (perform_member_init): Remove redundant condition.
5158 (build_aggr_init): Adjust to handle brace-enclosed initializers
5160 (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
5162 * parser.c (cp_parser_initializer_clause): Do not set
5163 TREE_HAS_CONSTRUCTOR on the initializer.
5164 * rtti.c (tinfo_base_init): Likewise.
5165 (generic_initializer): Likewise.
5166 (ptr_initializer): Likewise.
5167 (ptm_initializer): Likewise.
5168 (class_initializer): Likewise.
5169 (get_pseudo_ti_init): Likewise.
5170 * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
5172 2004-04-22 Alan Modra <amodra@bigpond.net.au>
5174 * name-lookup.c (anonymous_namespace_name): Make static.
5176 2004-04-19 Roger Sayle <roger@eyesopen.com>
5179 * class.c (build_base_path): Call fold whilst building the NULL
5180 pointer check expression trees.
5182 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
5184 * init.c (build_new_1): Don't use type size argument for Java
5185 _Jv_AllocObject call.
5187 2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
5189 * method.c (make_alias_for_thunk): Remove preprocessor guard on
5190 declaration and definition.
5192 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
5195 * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
5196 than ASM_OUTPUT_DEF.
5198 2004-04-08 Jakub Jelinek <jakub@redhat.com>
5200 * decl2.c (mark_used): Don't segfault if cfun != NULL but
5201 current_function_decl == NULL.
5203 2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
5206 * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
5209 2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5211 * init.c (decl_constant_value): Don't look at DECL_INITIAL
5213 * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
5214 or TREE_SIDE_EFFECTS of a type.
5216 2004-04-02 Nathan Sidwell <nathan@codesourcery.com>
5219 * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
5220 cv-qualifier unification.
5221 * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
5223 2004-04-02 Jan Hubicka <jh@suse.cz>
5225 * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
5226 * cp-tree.h (cp_update_decl_after_saving): Declare.
5227 * tree.c (cp_update_decl_after_saving): Define.
5229 2004-04-01 Mark Mitchell <mark@codesourcery.com>
5232 * typeck.c (get_delta_difference): Call fold before returning the
5235 2004-04-01 Richard Henderson <rth@redhat.com>
5238 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
5239 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
5241 2004-04-01 Mark Mitchell <mark@codesourcery.com>
5244 * name-lookup.c (maybe_push_cleanup_level): Robustify.
5246 2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5248 * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
5250 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5252 * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
5253 * class.c (check_bitfield_decl): Likewise.
5254 * cvt.c (type_promotes_to): Likewise.
5255 * decl.c (finish_enum): Likewise.
5256 * mangle.c (write_builtin_type): Likewise.
5257 * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
5258 * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
5259 (build_binary_op): Likewise.
5261 2004-03-31 Jan Hubicka <jh@suse.cz>
5263 * tree.h (optimize_function): Kill prototype.
5264 * optimize.c (dump_function, optimize_function, dump_finction): Kill.
5265 * semantics.c (expand_body): Kill.
5267 2004-03-30 Mark Mitchell <mark@codesourcery.com>
5270 * decl.c (start_decl_1): Do not decide whether or not to create a
5271 new cleanup level until after the type has been completed.
5274 * pt.c (tsubst_default_argument): Clear current_function_decl.
5276 2004-03-30 Zack Weinberg <zack@codesourcery.com>
5278 * name-lookup.c, parser.c: Use new shorter form of GTY markers.
5280 2004-03-29 Zack Weinberg <zack@codesourcery.com>
5282 * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
5283 is null, just print the literal name and return.
5285 2004-03-25 Kazu Hirata <kazu@cs.umass.edu>
5287 * cxx-pretty-print.c: Fix comment typos.
5289 2004-03-24 Kazu Hirata <kazu@cs.umass.edu>
5291 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
5294 2004-03-23 Ziemowit Laski <zlaski@apple.com>
5296 * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
5297 * mangle.c (write_type): Add call to 'mangle_fundamental_type'
5300 2004-03-23 Zack Weinberg <zack@codesourcery.com>
5302 PR 12267, 12391, 12560, 13129, 14114, 14133
5303 * cp-lang.c (c_reset_state): Delete.
5304 (push_file_scope, pop_file_scope): New stubs.
5305 * parser.c (c_parse_file): Call sorry() here if called more than once.
5307 2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5309 * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
5312 2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5314 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
5316 2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
5318 * error.c (enum pad): Remove.
5319 (dump_qualifiers): Likewise.
5320 (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
5321 (dump_aggr_type): Likewise.
5322 (dump_type_suffix): Likewise.
5323 (dump_simple_decl): Likewise.
5324 (dump_function_decl): Likewise.
5325 (cv_to_string): Likewise.
5326 (dump_type_prefix): Likewise. Adjust return void.
5327 * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
5329 (pp_cxx_template_keyword_if_needed): Document.
5330 (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
5331 (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
5332 MUST_NOT_THROW_EXPR.
5334 2004-03-21 Mark Mitchell <mark@codesourcery.com>
5337 * decl.c (cp_finish_decl): Compute the size of arrays declared in
5338 templates, if their type is non-dependent.
5340 2004-03-19 Mark Mitchell <mark@codesourcery.com>
5342 * call.c (build_op_delete_call): Do not forget the placement
5343 arguments when iterating through mutiple delete operators.
5345 * cp-tree.h (svaed_scope): Remove last_parms.
5346 (NEW_DELETE_OPNAME_P): New macro.
5347 (last_function_parms): Remove.
5348 (do_friend): Adjust prototype.
5349 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
5350 using last_function_parms.
5351 (grokfndecl): Take the PARM_DECLs as an argument, rather than
5352 using last_function_parms.
5353 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
5354 for class-specific operator new and operator delete.
5355 (grok_op_properties): Do not look for allocation functions with
5357 (start_function): Use DECL_ARGUMENTS instead of
5358 last_function_parms.
5359 * decl.h (last_function_parms): Do not declare.
5360 * decl2.c (grokclassfn): Do not use last_function_parms.
5361 * friend.c (do_friend): Remove parmdecls parameter.
5362 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
5363 (pop_from_top_level): Do not restore it.
5364 * pt.c (check_explicit_specialization): Do not adjust
5365 last_function_parms.
5367 * name-lookup.c (do_local_using_decl): Create a local binding for
5368 types brought in via using declarations.
5370 * name-lookup.c (lookup_arg_dependent): Handle block-scope
5371 function declarations correctly.
5373 * semantics.c (finish_id_expression): Correct handling of
5374 conversion operators to dependent types.
5376 * typeck.c (lookup_destructor): Allow the use of destructors from
5379 2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5381 * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
5382 TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
5383 * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
5384 the field is named TEMPLATE_TYPE_PARM_INDEX.
5386 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5389 * parser.c (cp_parser_functional_cast): A cast to anything
5390 but integral or enumaration type is not an integral constant
5392 * pt.c (value_dependent_expression_p): Handle cast expressions
5393 without operands (such as "int()").
5395 2004-03-18 Mark Mitchell <mark@codesourcery.com>
5397 * semantics.c (finish_pseudo_destructor_expr): Allow differing
5398 cv-qualification between the type named by the
5399 pseudo-destructor-name and the object-type.
5401 * search.c (accessible_base_p): Handle non-proper bases.
5403 * name-lookup.c (do_nonmember_using_decl): If a using declaration
5404 refers to a single overloaded function, set the type of the
5406 * tree.c (lvalue_type): Simplify.
5407 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
5409 (build_unary_op): Handle OVERLOADs with known types.
5411 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
5414 * parser.c (cp_parser_postfix_expression): Handle the use of
5415 "typename" in non-dependent contexts. Convert appropriately when
5416 when using a qualified name after "->" or ".".
5418 * call.c (conditional_conversion): Honor the requirement that some
5419 conversions refer to the original object.
5421 2004-03-18 Mark Mitchell <mark@codesourcery.com>
5423 * call.c (build_conditional_expr): Do not call force_rvalue for
5424 operands of void_type when the conditional expression itself has
5426 * name-lookup.c (pushdecl): Don't consider a declaration of a
5427 function named "main" to be an overload of a type named "main".
5428 * parser.c (cp_parser_template_name): Perform name lookup when the
5429 template name is proceeded by "template" if the qualifying scope
5431 * typeck.c (composite_pointer_type_r): Correctly handle
5432 pointer-to-member types.
5433 (build_const_cast): Likewise.
5435 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5437 * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
5438 * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
5439 (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
5440 (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
5441 (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
5442 (TYPEOF_TYPE_EXPR): New macro.
5443 * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
5444 * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
5445 * pt.c (tsubst): Likewise.
5446 * semantics.c (finish_typeof): Likewise.
5447 * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
5448 and TEMPLATE_TYPE_PARM.
5449 * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
5450 (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
5452 2004-03-16 Mark Mitchell <mark@codesourcery.com>
5455 * cp-tree.h (build_new_op): Change prototype.
5456 (build_x_binary_op): Likewise.
5457 * call.c (build_new_op): Add overloaded_p parameter.
5458 * decl2.c (grok_array_decl): Adjust call to build_new_op.
5459 * parser.c (cp_parser_binary_expression): Note that uses of
5460 overloaded operators prevents an expression from being considered
5461 an integral constant.
5462 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
5464 * semantics.c (finish_call_expr): Likewise.
5465 * typeck.c (rationalize_conditional_expr): Likewise.
5466 (build_x_indirect_ref): Likewise.
5467 (build_x_binary_op): Likewise.
5468 (build_x_unary_op): Likewise.
5469 (build_x_compound_expr): Likewise.
5470 (build_modify_expr): Likewise.
5471 * typeck2.c (build_x_arrow): Likewise.
5473 2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
5475 * cp-lang.c, ptree.c: Update copyright.
5477 2004-03-13 Mark Mitchell <mark@codesourcery.com>
5480 * parser.c (cp_parser_non_integral_constant_expression): Encode
5481 more of the idiom that surrounded calls to this function within
5483 (cp_parser_primary_expression): Adjust accordingly.
5484 (cp_parser_postfix_expression): Likewise.
5485 (cp_parser_unary_expression): Likewise.
5486 (cp_parser_cast_expression): Likewise.
5487 (cp_parser_assignment_expression): Likewise.
5488 (cp_parser_expression): Likewise.
5489 (cp_parser_new_expression): Note that new-expressions are not
5490 allowed in integral constant expressions.
5491 (cp_parser_delete_expression): Likewise.
5493 2004-03-12 Matt Austern <austern@apple.com>
5495 * decl2.c (maybe_make_one_only): Look at
5496 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
5497 to make an explicit instantiation weak.
5498 * method.c (use_thunk): Make sure we call comdat_linkage
5500 * pt.c (do_type_instantiation): On systems where weak symbols
5501 don't go in a static archive's TOC, explicit instantiation of a
5502 class must imply *explicit* instantiation of its memeber.
5504 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
5506 * call.c, cp-tree.h, pt.c: Fix comment typos.
5508 2004-03-10 Mark Mitchell <mark@codesourcery.com>
5511 * decl.c (xref_tag): Disregard non-type declarations when
5512 looking up a tagged type.
5514 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
5517 * call.c (convert_like_real): Build a const qualified temporary,
5518 when testing ctor access.
5520 2004-03-09 Mark Mitchell <mark@codesourcery.com>
5522 * call.c (initialize_reference): Fix typo.
5524 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5527 * pt.c (determine_specialization): For member templates, match also
5531 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
5533 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
5535 2004-03-09 Mark Mitchell <mark@codesourcery.com>
5538 * call.c (initialize_reference): Handle initializers that are
5539 class-member access expressions applies to rvalues.
5541 2004-03-09 Mark Mitchell <mark@codesourcery.com>
5544 * name-lookup.c (supplement_binding): Ignore functions that are
5545 marked DECL_ANTICIPATED.
5547 2004-03-08 Mark Mitchell <mark@codesourcery.com>
5550 * class.c (check_field_decls): Complain about non-static data
5551 members of reference type in unions. Propagate
5552 CLASSTYPE_REF_FIELDS_NEED_INIT and
5553 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
5555 * init.c (perform_member_init): Complain about mbmers with const
5556 type that are not explicitly initialized.
5558 2004-03-08 Mark Mitchell <mark@codesourcery.com>
5560 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
5561 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
5562 (lang_identifier): Remove implicit_decl and error_locus.
5563 (IDENTIFIER_IMPLICIT_DECL): Remove.
5564 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
5565 (IDENTIFIER_ERROR_LOCUS): Likewise.
5566 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
5567 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
5568 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
5569 (implicitly_declare): Remove.
5570 * decl.c (warn_extern_redeclared_static): Remove check of
5571 IDENTIFIER_IMPLICIT_DECL.
5572 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
5573 (implicitly_declare): Remove.
5574 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
5575 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
5576 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
5577 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
5578 in the innermost scope, rather than at namespace scope.
5579 * name-lookup.c (push_local_binding): Give it external linkage.
5580 (pushdecl): Remove dead code.
5581 * name-lookup.h (push_local_binding): Declare it.
5582 * ptree.c (cxx_print_identifier): Don't print
5583 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
5584 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
5585 not IDENTIFIER_ERROR_LOCUS.
5586 * typeck.c (build_function_call): Remove dead code.
5588 2004-03-08 Jason Merrill <jason@redhat.com>
5591 * decl.c (xref_tag): Remove attribute handling.
5592 * cp-tree.h: Adjust prototype.
5593 * decl.c, parser.c, rtti.c: Adjust callers.
5594 * parser.c (cp_parser_class_head): Pass back attributes in the
5596 (cp_parser_class_specifier): Adjust.
5598 2004-03-08 Matt Austern <austern@apple.com>
5601 * name-lookup.c (add_decl_to_level): Add extern variables, as well
5602 as static, to static_decls array.
5604 2004-03-05 Jason Merrill <jason@redhat.com>
5606 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
5608 2004-03-04 Geoffrey Keating <geoffk@apple.com>
5610 * decl.c (grokfndecl): Update old incorrect comment.
5611 (grokvardecl): Diagnose C++ variables of type with no linkage.
5613 2004-03-01 Mark Mitchell <mark@codesourcery.com>
5616 * pt.c (build_non_dependent_expr): Do not create a
5617 NON_DEPENDENT_EXPR for a THROW_EXPR.
5619 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
5622 * error.c (dump_expr): Handle THROW_EXPR.
5624 2004-03-01 Mark Mitchell <mark@codesourcery.com>
5627 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
5628 lookup if ordinary name-lookup finds a non-function.
5629 * pt.c (tsubst_copy_and_build): Likewise.
5632 * parser.c (cp_parser_late_parsing_default_args): Check that there
5633 are no extra tokens after the end of the default-argument
5636 2004-03-01 Mark Mitchell <mark@codesourcery.com>
5639 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
5640 having C++ linkage for name-mangling purposes.
5643 * parser.c (cp_parser_direct_declarator): Recognize constructor
5644 declarators that use a template-id to name the class being
5648 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
5649 (tsubst_expr): Do not call tsubst_copy, even when
5650 processing_template_decl.
5652 2004-03-01 Jeff Law <law@redhat.com>
5654 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
5657 2004-02-29 Mark Mitchell <mark@codesourcery.com>
5660 * name-lookup.h (push_scope): Change prototype.
5661 * name-lookup.c (push_scope): Do not reenter the current class
5663 * decl.c (grokfndecl): Check return code from push_scope before
5665 * decl2.c (check_classfn): Likewise.
5666 * parser.c (cp_parser_conversion_function_id): Likewise.
5667 (cp_parser_init_declarator): Likewise.
5668 (cp_parser_direct_declarator): Likewise.
5669 (cp_parser_class_specifier): Likewise.
5670 (cp_parser_class_head): Likewise.
5671 (cp_parser_lookup_name): Likewise.
5672 (cp_parser_constructor_declarator_p): Likewise.
5673 * pt.c (instantiate_class_template): Likewise.
5674 (resolve_typename_type): Likewise.
5676 2004-02-29 Mark Mitchell <mark@codesourcery.com>
5679 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
5683 * class.c (update_vtable_entry_for_fn): Do not go through
5684 covariance machinery if the type returned by an overrider is the
5685 same as the original.
5687 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
5689 * call.c: Fix a comment typo.
5691 2004-02-27 Ziemowit Laski <zlaski@apple.com>
5693 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
5695 2004-02-26 Mark Mitchell <mark@codesourcery.com>
5698 * parser.c (cp_parser_parameter_declaration_list): Commit
5699 to fewer tentative parses.
5701 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5704 * pt.c (dependent_type_p_r): A template template parameter is a
5707 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5710 * mangle.c (write_template_arg_literal): Don't rely on identity for
5713 2004-02-24 Jason Merrill <jason@redhat.com>
5715 * tree.c (build_exception_variant): Use check_qualified_type.
5717 2004-02-23 Zack Weinberg <zack@codesourcery.com>
5718 Kazu Hirata <kazu@cs.umass.edu>
5720 * decl.c (cxx_init_decl_processing): Don't check
5721 flag_writable_strings.
5723 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
5726 * typeck.c (maybe_warn_about_returning_address_of_location):
5727 Change check for VAR_DECL to use DECL_P instead.
5729 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5732 * cvt.c (build_expr_type_conversion): Type must be complete before
5733 looking up for conversions.
5735 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5738 * name-lookup.c (arg_assoc_class): Don't look into template
5739 arguments if it is not a primary template.
5741 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
5744 * method.c (use_thunk): Always clone function argument tree.
5746 2004-02-20 Mark Mitchell <mark@codesourcery.com>
5749 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
5752 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
5753 for all type variants.
5755 2004-02-19 Mark Mitchell <mark@codesourcery.com>
5758 * decl.c (duplicate_decls): Return error_mark_node for invalid
5760 * name-lookup.c (push_namespace): Ignore the return value from
5762 * pt.c (push_template_decl_real): Robustify.
5765 * name-lookup.c (push_class_level_binding): Do not complain about
5766 adding a binding for a member whose name is the same as the
5767 enclosing class if the member is located in a base class of the
5770 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5773 * parser.c (cp_parser_new_expression): Parse an ill-formed
5774 direct-new-declarator after a parenthesized type-id to emit good
5777 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
5779 * cp-tree.def, cvt.c: Update copyright.
5781 2004-02-17 Mark Mitchell <mark@codesourcery.com>
5784 * cp-tree.h (abi_version_at_least): Remove.
5785 * mangle.c: Include flags.h.
5787 2004-02-15 Mark Mitchell <mark@codesourcery.com>
5790 * call.c (build_conditional_expr): Handle conversions between
5791 class types which result in differently cv-qualified type
5795 * class.c (delete_duplicate_fields_1): Remove.
5796 (delete_duplicate_fields): Likewise.
5797 (finish_struct_anon): Remove check for members with the same name
5798 as their enclosing class.
5799 (check_field_decls): Do not call duplicate_fields.
5800 * decl.c (grokdeclarator): Remove check for static data members
5801 with the same name as their enclosing class.
5802 * name-lookup.c (push_class_level_binding): Check for members with
5803 the same name as their enclosing class.
5805 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
5808 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
5810 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5813 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
5814 has full set of arguments.
5816 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5819 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
5821 2004-02-13 Mark Mitchell <mark@codesourcery.com>
5824 * cp-tree.h (delete_sanity): Change prototype.
5825 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
5826 Remove dead code. Adjust code to warn about deleting an array.
5827 * typekc.c (decay_conversion): Use build_address and build_nop.
5830 * search.c (accessible_p): Do not check access in thunks.
5833 * call.c (build_conditional_expr): Call force_rvalue on the
5834 non-void operand in the case that one result is a throw-expression
5835 and the other is not.
5837 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
5840 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
5841 the type name and look ahead for ::~, and bail out early with a
5842 better error message if the parse is going to fail.
5844 2004-02-12 Mark Mitchell <mark@codesourcery.com>
5846 * call.c (conversion_kind): New type.
5847 (conversion_rank): Likewise.
5848 (conversion): Likewise.
5849 (CONVERSION_RANK): New macro.
5850 (conversion_obstack): New variable.
5851 (obstack_initialized): Likewise.
5852 (z_candidate): Change type of convs and second_conv.
5853 (candidate_warning): New type.
5854 (IDENTITY_RANK): Remove.
5855 (EXACT_RANK): Likewise.
5856 (PROMO_RANK): Likewise.
5857 (STD_RANK): Likewise.
5858 (PBOOL_RANK): Likewise.
5859 (USER_RANK): Likewise.
5860 (ELLIPSIS_RANK): Likewise.
5861 (BAD_RANK): Likewise.
5862 (ICS_RANK): Likewise.
5863 (ICS_STD_RANK): Likewise.
5864 (ICS_USER_FLAG): Likewise.
5865 (ICS_ELLIPSIS_FLAG): Likewise.
5866 (ICS_THIS_FLAG): Likewise.
5867 (ICS_BAD_FLAG): Likewise.
5868 (NEED_TEMPORARY_P): Likewise.
5869 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
5870 (USER_CONV_CAND): Likewise.
5871 (USER_CONV_FN): Likewise.
5872 (conversion_obstack_alloc): New function.
5873 (alloc_conversion): Likewise.
5874 (validate_conversion_obstack): Likewise.
5875 (alloc_conversions): Likewise.
5876 (build_conv): Adjust to deal with new conversion data structures.
5877 (build_identity_conv): New function.
5878 (build_ambiguous_conv): Likewise.
5879 (standard_conversion): Adjust to deal with new conversion data
5881 (convert_class_to_reference): Likewise.
5882 (direct_reference_binding): Likewise.
5883 (reference_binding): Likewise.
5884 (implicit_conversion): Likewise.
5885 (add_candidate): Likewise.
5886 (add_function_candidate): Likewise.
5887 (add_conv_candidate): Likewise.
5888 (build_builtin_candidate): Likewise.
5889 (print_z_candidate): Likewise.
5890 (merge_conversion_sequences): Likewise.
5891 (build_user_type_conversion_1): Likewise.
5892 (build_user_type_conversion): Likewise.
5893 (build_new_function_call): Likewise.
5894 (build_object_call): Likewise.
5895 (conditional_conversion): Likewise.
5896 (build_conditional_expr): Likewise.
5897 (build_new_op): Likewise.
5898 (build_op_delete_call): Likewise.
5899 (convert_like_real): Likewise.
5900 (build_over_call): Likewise.
5901 (build_new_method_call): Likewise.
5902 (is_subseq): Likewise.
5903 (maybe_handle_implicit_object): Likewise.
5904 (maybe_handle_ref_bind): Likewise.
5905 (compare_ics): Likewise.
5906 (source_type): Likewise.
5907 (add_warning): Likewise.
5909 (can_convert_arg): Likewise.
5910 (can_convert_arg_bad): Likewise.
5911 (perform_implicit_conversion): Likewise.
5912 (perform_direct_initialization_if_possible): Likewise.
5913 (initialize_reference): Likewise.
5914 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
5915 * cp-tree.def (WRAPPER): Likewise.
5916 (IDENTITY_CONV): Remove.
5917 (LVALUE_CONV): Likewise.
5918 (QUAL_CONV): Likewise.
5919 (STD_CONV): Likewise.
5920 (PTR_CONV): Likewise.
5921 (PMEM_CONV): Likewise.
5922 (BASE_CONV): Likewise.
5923 (REF_BIND): Likewise.
5924 (USER_CONV): Likewise.
5925 (AMBIG_CONV): Likewise.
5926 (RVALUE_CONV): Likewise.
5927 * cp-tree.h (tree_wrapper): Remove.
5928 (WRAPPER_ZC): Remove.
5929 (lang_tree_node): Remove wrapper.
5930 (LOOKUP_SPECULATIVELY): Remove.
5931 (build_op_delete_call): Adjust prototype.
5932 (validate_conversion_obstack): Declare.
5933 (build_zc_wrapper): Remove.
5934 * cvt.c (convert_to_reference): Remove dead code.
5935 (ocp_convert): Likewise.
5936 * decl.c (redeclaration_error_message): Correct handling of
5938 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
5939 (cp_tree_node_structure): Remove WRAPPER case.
5940 * decl2.c (finish_file): Call validate_conversion_obstack.
5941 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
5942 (build_op_delete_call): Likewise.
5943 (build_x_delete): Likewise.
5944 (build_delete): Adjust call to build_op_delete_call.
5945 * pt.c (tsubst_friend_declaration): Adjust code to determine
5946 whether or not a friend template is a definition.
5947 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
5948 * tree.c (build_zc_wrapper): Remove.
5950 2004-02-12 Zack Weinberg <zack@codesourcery.com>
5952 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
5953 * cp-tree.h: Don't declare cxx_builtin_type_decls.
5954 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
5955 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
5957 2004-02-10 Mark Mitchell <mark@codesourcery.com>
5959 * typeck.c (lookup_destructor): Fix typo in error message.
5961 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
5963 * call.c, parser.c, tree.c: Fix comment typos.
5965 2004-02-07 Zack Weinberg <zack@codesourcery.com>
5968 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
5969 * decl.c (duplicate_decls, start_function): Likewise.
5971 2004-02-07 Zack Weinberg <zack@codesourcery.com>
5973 * name-lookup.c (pushdecl): Issue shadow warnings directly.
5974 * parser.c (free_parser_stacks): Delete.
5976 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
5978 * rtti.c: Update copyright.
5980 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5983 * decl.c (require_complete_types_for_parms): Do not insert
5984 error_mark_node in the parameter list.
5986 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5989 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
5990 error when terminator can not be found.
5992 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
5994 Make-lang.in (po-generated): Delete.
5996 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
5998 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
5999 targetm.calls.promote_prototypes.
6001 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
6005 2004-01-15 Geoffrey Keating <geoffk@apple.com>
6007 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
6008 (handle_pragma_implementation): Likewise.
6010 2004-02-05 Mark Mitchell <mark@codesourcery.com>
6013 * typeck.c (lookup_destructor): Tweak error message.
6015 2004-02-05 Jan Hubicka <jh@suse.cz>
6017 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
6020 2004-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6023 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
6024 code, only emits the diagnostic now. Added lookup of the identifier
6025 and support for qualified ids.
6026 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
6027 Parse an (invalid) type name as id-expression within a declarator.
6028 (cp_parser_simple_declaration): Use it.
6029 (cp_parser_member_declaration): Likewise.
6030 (cp_parser_make_typename_type): New function. Handle errors through
6031 cp_parser_diagnose_invalid_typename.
6032 (cp_parser_elaborated_type_specifier): Use it.
6034 2004-02-04 Mark Mitchell <mark@codesourcery.com>
6037 * call.c (convert_like_real): Use "converting" rather than
6038 "argument" as the descriptive keyword to
6039 dubious_conversion_warnings.
6040 * typeck.c (convert_for_assignment): Do not call
6041 dubious_conversion_warnings.
6043 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6046 * init.c (build_delete): Emit a more informative error message in
6047 case of an incomplete type, and on the correct source line.
6049 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
6051 * error.c, search.c: Update copyright.
6053 2004-02-04 Mark Mitchell <mark@codesourcery.com>
6056 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
6057 linkage for the typeinfo name string.
6059 2004-02-04 Mark Mitchell <mark@codesourcery.com>
6062 * cp-tree.h (fold_non_dependent_expr): New function.
6063 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
6064 (cp_parser_template_argument): Use fold_non_dependent_expr.
6065 (cp_parser_direct_declarator): Likewise.
6066 * pt.c (fold_non_dependent_expr): New function.
6067 (convert_nontype_argument): Use it.
6068 (tsubst_qualified_id): Simplify.
6069 (tsubst_copy_and_build): Likewise.
6071 2004-02-04 Mark Mitchell <mark@codesourcery.com>
6073 * decl.c (cxx_push_function_context): Do not set
6074 current_function_is_thunk.
6075 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
6078 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6081 * pt.c (more_specialized_class): Increase processing_template_decl
6082 while partial ordering.
6084 2004-02-03 Mark Mitchell <mark@codesourcery.com>
6087 * decl.c (start_function): Do not call pushdecl for any
6088 instantiation or specialization of a primary template.
6090 2004-02-03 Mark Mitchell <mark@codesourcery.com>
6093 * parser.c (cp_parser_class_name): Robustify.
6096 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
6099 * semantics.c (finish_id_expression): Do not return an
6100 IDENTIFIER_NODE when lookup finds a PARM_DECL.
6102 2004-02-03 Mark Mitchell <mark@codesourcery.com>
6105 * pt.c (build_non_dependent_expr): Do not build
6106 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
6109 * semantics.c (finish_id_expression): Do not return an
6110 IDENTIFIER_NODE when lookup finds a VAR_DECL.
6113 * parser.c (cp_parser_simple_declaration): When skipping to the
6114 end of the statement swallow the terminating semicolon.
6116 2004-02-02 Mark Mitchell <mark@codesourcery.com>
6119 * init.c (build_offset_ref): Improve error recovery for invalid
6120 uses of non-static member functions.
6123 * cp-tree.h (cp_build_type_attribute_variant): New function.
6124 * class.c (build_clone): Use cp_build_type_attribute_variant.
6125 * decl.c (duplicate_decls): Likewise.
6126 * pt.c (copy_default_args_to_explicit_spec): Likewise.
6127 (tsubst_function_type): Likewise.
6128 * tree.c (build_exception_variant): Check attributes before
6129 concluding that two types are the same.
6130 (cp_build_type-attribute_variant): New method.
6131 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
6134 * call.c (convert_class_to_reference): Keep better track of
6135 pedantically invalid user-defined conversions.
6137 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6140 * pt.c (tsubst_qualified_id): Improved error message when a type
6141 is expected but not found.
6143 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
6145 * class.c: Fix comment typos.
6147 * error.c: Likewise.
6148 * parser.c: Likewise.
6150 * search.c: Likewise.
6151 * typeck.c: Likewise.
6153 2004-01-30 Richard Henderson <rth@redhat.com>
6156 * method.c (use_thunk): Don't force_target_expr for void thunks.
6157 * tree.c (build_target_expr_with_type): Assert non-void type.
6158 (force_target_expr): Likewise.
6160 2004-01-30 Michael Matz <matz@suse.de>
6162 * parser.c (cp_parser_labeled_statement): Accept case ranges.
6164 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6168 * decl.c (grokdeclarator): Check immediatly type completeness for
6169 non-dependent types.
6171 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6174 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
6175 a sizeof expression.block
6177 2004-01-29 Mark Mitchell <mark@codesourcery.com>
6180 * mangle.c (write_encoding): Correct encoding of member template
6183 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6185 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
6186 template name as it was `<::' (digraph typo).
6187 (cp_parser_nth_token_starts_template_argument_list_p): New function.
6188 (cp_parser_id_expression): Use it.
6189 (cp_parser_nested_name_specifier_opt): Likewise.
6190 (cp_parser_template_name): Likewise.
6191 (cp_parser_class_name): Likewise.
6192 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
6194 2004-01-28 Mark Mitchell <mark@codesourcery.com>
6197 * typeck.c (merge_types): Do not merge attributes into
6201 * parser.c (cp_parser_direct_declarator): Do not prevent
6202 backtracking inside a parenthesized declarator.
6203 (cp_parser_parameter_declaration): Fix typo in comment.
6205 2004-01-28 Jan Hubicka <jh@suse.cz>
6207 * semantics.c (expand_body) Do emit_associated_thunks before
6210 2004-01-27 Devang Patel <dpatel@apple.com>
6212 * name-lookup.c: Include "debug.h"
6213 (do_namespace_alias): Invoke debug_hooks to emit debug info
6214 for namespace alias.
6215 (do_local_using_decl): Invoke debug_hooks to emit debug info
6217 (do_class_using_decl): Same.
6218 (do_toplevel_using_decl): Same.
6219 (do_using_directive): Same.
6220 (cp_emit_debug_info_for_using): New function.
6221 * Make-lang.in (cp/parser.o): Depend on debug.h
6222 (cp/name-lookup.o): Same.
6224 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6226 * cp-tree.h (language_function, lang_type_header): Use
6228 * name-lookup.h (cp_binding_level): Likewise.
6230 2004-01-26 Mark Mitchell <mark@codesourcery.com>
6233 * semantics.c (finish_for_expr): Check for unresolved overloaded
6236 * class.c (add_method): Just check processing_template_decl to
6237 determine whether or not we are within a template.
6238 * decl2.c (maybe_retrofit_in_chrg): Likewise.
6239 * init.c (decl_constant_value): Check the type of the declaration,
6241 * name-lookup.c (maybe_push_to_top_level): Rename to ...
6242 (push_to_top_level): ... this.
6243 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
6244 * pt.c (push_template_decl_real): Reorder condition for speed.
6245 (convert_template_argument): Use dependency-checking functions in
6246 place of uses_template_parms.
6247 (lookup_template_class): Avoid calling uses_template_parms more
6249 (uses_template_parms): Reimplement, using dependency-checking
6251 (instantiate_class_template): Use push_to_top_level, not
6252 maybe_push_to_top_level.
6253 (type_unification_real): Simplify.
6254 (type_dependent_expression_p): Handle OFFSET_REFs and
6256 (any_dependent_template_arguments_p): Handle multiple levels of
6258 * semantics.c (expand_or_defer_fn): Do not check
6259 uses_template_parms for template instantiations.
6260 * typeck.c (comptypes): Avoid calling cp_type_quals.
6262 2004-01-25 Mark Mitchell <mark@codesourcery.com>
6265 * call.c (build_over_call): Do not convert arguments when
6266 processing a template.
6267 * pt.c (build_non_dependent_expr): Do not build a
6268 NON_DEPENDENT_EXPR for arithmetic constants.
6270 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6273 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
6274 returns a TYPE_DECL. no further lookup is required.
6275 * semantics.c (check_template_template_default_arg): A TYPE_DECL
6276 is invalid. Rework to give better diagnostics.
6278 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6281 * pt.c (instantiate_class_template): Add an error_mark_node
6283 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
6285 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
6288 * decl.c (finish_function): Move the call to
6289 finish_fname_decls below the call to
6290 finish_eh_spec_block.
6292 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
6294 * optimize.c, typeck2.c: Update copyright.
6296 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
6298 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
6299 init.c, mangle.c, typeck.c: Update copyright.
6301 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
6303 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
6305 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
6307 * Make-lang.in: Replace $(docdir) with doc.
6308 (c++.info, c++.srcinfo): Dummy entry.
6309 (c++.man, c++.srcman): New rules.
6310 (c++.install-man): Revamp rule.
6312 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
6314 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
6315 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
6316 immediate $(shell) instead of deferred backquote.
6318 2004-01-19 Mark Mitchell <mark@codesourcery.com>
6321 * parser.c (cp_parser_postfix_expression): When encountering
6322 incomplete type on left-hand side of "->" or ".", treat the entire
6323 expression as erroneous.
6326 * call.c (build_field_call): Remove.
6327 (n_build_method_call): Likewise.
6328 (build_method_call): Likewise.
6329 (build_new_method_call): Do not call build_field_call.
6330 * class.c (n_build_method_call): Remove.
6331 (print_class_statistics): Do not print it.
6332 * cp-tree.h (build_method_call): Remove declaration.
6333 (finish_object_call_expr): Likewise.
6334 (build_new_1): Do not use build_method_call.
6335 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
6336 when the function appearing on the right-hand-side of "." or "->"
6337 is not actually a function.
6338 * pt.c (tsubst_copy_and_build): Likewise.
6339 * semantics.c (finish_object_call_expr): Remove.
6341 2004-01-18 Mark Mitchell <mark@codesourcery.com>
6344 * pt.c (tsubst): Use finish_typeof.
6346 2004-01-18 Jason Merrill <jason@redhat.com>
6349 * except.c (build_throw): In a template, set
6350 current_function_returns_abnormally.
6352 2004-01-17 Fred Fish <fnf@intrinsity.com>
6355 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
6356 except don't call array_type_nelts() with a VECTOR_TYPE.
6358 2004-01-16 Jan Hubicka <jh@suse.cz>
6360 * mangle.c (write_mangled_name): Remove inline modifier.
6362 2004-01-16 Mark Mitchell <mark@codesourcery.com>
6365 * decl.c (compute_array_index_type): Fix grammar in comment.
6366 * init.c (build_zero_init): Handle zero-sized arrays correctly.
6369 * call.c (name_as_c_string): Print conversion operator names
6373 * call.c (initialize_reference): Pass -1 for inner parameter to
6376 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6379 * parser.c (cp_parser_base_specifier): Check for an invalid
6380 keyword `typename' and emit an user-friendly error message.
6382 2004-01-15 Geoffrey Keating <geoffk@apple.com>
6385 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
6386 (handle_pragma_implementation): Likewise.
6388 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6391 * typeck.c (build_class_member_access_expr): Allow to access members
6392 of the currently open class.
6393 (finish_class_member_access_expr): Likewise.
6395 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
6398 * name-lookup.c (validate_nonmember_using_decl): Take scope and
6399 name by value, instead of computing them.
6400 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
6401 arguments. Pass them to validate_nonmember_using_decl.
6402 * name-lookup.h (do_local_using_decl): Adjust.
6403 (do_toplevel_using_decl): Likewise.
6404 * parser.c (cp_parser_using_declaration): Likewise.
6405 * pt.c (tsubst_expr): Likewise.
6407 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
6411 * name-lookup.c (qualified_lookup_using_namespace): Search
6412 strongly-associated namespaces first, and only then try other
6415 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
6417 * Make-lang.in (c++.srcextra): Dummy entry.
6419 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6422 * parser.c (cp_parser_template_name): Don't try to parse a
6423 conversion-function-id, as it cannot be a template-name.
6424 (cp_parser_simple_type_specifier): Check for invalid template-ids
6425 even after a built-in type.
6427 2004-01-14 Jan Hubicka <jh@suse.cz>
6430 * pt.c (instantiate_decl): Do not increase function_depth.
6432 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
6436 * parser.c (cp_parser_elaborated_type_specifier): Warn about
6437 attributes and discard.
6438 * decl.c (xref_tag): Don't overwite existing attributes with
6441 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6444 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
6445 is no destructor while looking up a BIT_NOT_EXPR.
6447 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
6449 * cxxfilt.c: Remove unused file.
6451 2004-01-14 Jan Hubicka <jh@suse.cz>
6453 Partial fix to PR c++/12850
6454 * decl2.c (mark_used): Do not proactively instantiate templates
6455 when compiling in unit-at-a-time or not optimizing.
6456 * optimize.c (maybe_clone_body): Do not increase function depth.
6458 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6461 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
6463 2004-01-12 Steven Bosscher <stevenb@suse.de>
6466 * parser.c (cp_parser_member_declaration): Any non-type is also
6467 not a class or a function.
6469 2004-01-12 Jason Merrill <jason@redhat.com>
6472 * class.c (build_base_path): Do not mark vtable references as
6474 (build_vtbl_ref_1): Likewise.
6476 2004-01-12 Richard Henderson <rth@redhat.com>
6479 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
6480 (store_init_value): Use it.
6481 * decl.c (check_initializer): Expect full initialization code
6482 from store_init_value.
6483 * init.c (expand_aggr_init_1): Likewise.
6484 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
6486 2004-01-12 Mark Mitchell <mark@codesourcery.com>
6488 * class.c (layout_class_type): For non-POD class types, also copy
6489 the DECL_SIZE and DECL_MODE of fields to the base class type.
6491 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6494 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
6495 calling regenerate_decl_from_template.
6497 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
6500 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
6501 decl-specifier occurring along with a class definition.
6503 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
6505 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
6506 clauses to comments describing declares_class_or_enum.
6507 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
6510 2004-01-12 Jan Hubicka <jh@suse.cz>
6512 * pt.c (for_each_template_parm): Do not check for duplicates.
6513 (for_each_template_parm): Use walk_tree duplicate checking code.
6515 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
6518 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
6519 is error_mark_node, don't add any more decl_specs.
6520 (cp_parser_init_declarator): After committing to a declaration, if
6521 the decl_specifiers start with error_mark_node, issue an error and
6522 change the type to "int".
6524 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
6527 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
6529 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6533 * pt.c (tsubst): Substitution must fail if we are attempting to
6534 create an array with element type that is an abstract class type.
6535 * decl.c (cp_finish_decl): Strip pointers and array types recursively
6536 before calling abstract_virtuals_error.
6538 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
6540 * name-lookup.c (qualified_lookup_using_namespace): Consider
6541 strong using directives even if we've already found a binding.
6543 2004-01-09 Mark Mitchell <mark@codesourcery.com>
6545 * cp-tree.h (cxx_expand_expr): Change prototype.
6546 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
6548 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6551 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
6552 looking into them recursively. They can be there because of the
6553 new __offsetof__ extension.
6555 2004-01-07 Zack Weinberg <zack@codesourcery.com>
6557 * parser.c (cp_parser_save_member_function_body): Mark the
6560 2004-01-05 Mark Mitchell <mark@codesourcery.com>
6563 * class.c (build_clone): Copy type attributes from the original
6564 function to the clone.
6567 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
6568 references as constant.
6571 * parser.c (cp_parser_explicit_instantiation): Improve error
6573 (cp_parser_require): Improve indication of the error location.
6576 * parser.c (cp_parser_class_head): Reorder logic to check for
6577 invalid qualification.
6579 2004-01-04 Mark Mitchell <mark@codesourcery.com>
6582 * name-lookup.c (lookup_using_namespace): Remove spacesp
6584 (unqualified_namespace_lookup): Likewise.
6585 (lookup_qualified_name): Adjust accordingly.
6586 (lookup_name_real): Likewise.
6587 (lookup_arg_dependent): Do not eliminate the namespace of the
6588 functions found by unqualified name lookup unless that is the
6591 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
6593 * semantics.c (push_deferring_access_checks): Fix format.
6594 (resume_deferring_access_checks): Likewise.
6595 (stop_deferring_access_checks): Likewise.
6596 (pop_deferring_access_checks): Likewise.
6597 (get_deferred_access_checks): Likewise.
6598 (pop_to_parent_deferring_access_checks): Likewise.
6599 (perform_deferred_access_checks): Likewise.
6600 (perform_or_defer_access_check): Likewise.
6602 2004-01-04 Richard Henderson <rth@redhat.com>
6604 * call.c (build_over_call): Don't create a save_expr of an
6605 aggregate, but rather its address.
6607 2004-01-04 Mark Mitchell <mark@codesourcery.com>
6610 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
6611 an offsetof expression.
6613 * parser.c (cp_parser_parameter_declaration): Fix comment.
6616 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
6617 (reference_binding): Set it when appropriate.
6618 (build_temp): New function, split out from ...
6619 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
6620 (initialize_reference): Likewise.
6623 * parser.c (cp_parser): Add in_type_id_in_expr_p.
6624 (cp_parser_new): Initialize it.
6625 (cp_parser_postfix_expression): Set it.
6626 (cp_parser_sizeof_operand): Likewise.
6627 (cp_parser_parameteR_declaration): Do not commit early to tenative
6628 parsers when in_type_id_in_expr_p is set.
6630 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6633 * parser.c (cp_parser_template_argument): Don't call
6634 make_unbound_class_template directly.
6635 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
6636 UNBOUND_CLASS_TEMPLATE tree node.
6638 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
6641 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
6643 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6646 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
6647 (DECL_FUNCTION_TEMPLATE_P): Use it.
6648 (DECL_CLASS_TEMPLATE_P): Likewise.
6649 * parser.c (cp_parser_lookup_name): Add is_template parameter.
6650 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
6651 (cp_parser_template_name): Likewise.
6652 (cp_parser_elaborated_type_specifier): Likewise.
6653 (cp_parser_namespace_name): Likewise.
6654 (cp_parser_class_name): Likewise.
6655 (cp_parser_lookup_name_simple): Likewise.
6657 See ChangeLog.3 for earlier changes.