1 2004-08-04 Paul Brook <paul@codesourcery.com>
3 * Make-lang.in (cp/semantics.o, cp/optimize.o): Depend on TARGET_H.
4 * cp-tree.h (struct language_function): Rename x_dtor_label to
6 (dtor_label): Rename ...
7 (cdtor_label): ... to this.
8 * decl.c (begin_constructor_body): Remove.
9 (check_special_function_return_type): Maybe change the return type.
10 (grokdeclarator): Pass the class type.
11 (start_preparsed_function): Constructors may need a return label.
12 (finish_constructor_body, finish_destructor_body): Set the return
14 (begin_function_body): Don't call begin_constructor_body.
15 (finish_function): Don't warn for constructors or destructors.
16 (implicitly_declare_fn): Maybe change the return type.
17 * optimize.c: Include target.h.
18 (maybe_clone_body): Remap the function result.
19 * semantics.c: Include target.h.
20 (finish_return_stmt): Maybe jump to return label for constructors.
22 2004-08-03 Mark Mitchell <mark@codesourcery.com>
24 * class.c (build_vtable): Do not set DECL_VISIBILITY here.
25 (check_field_decls): Or here.
26 (check_methods): Or here.
27 (initialize_array): Don't mess with DECL_CONTEXT.
28 * cp-tree.h (start_decl): Adjust prototype.
29 (determine_visibility): New function.
30 * decl.c (duplicate_decls): Remove checks for hidden "operator
32 (build_library_fn_1): Give all library functions default
34 (start_decl): Add pop_scope_p parameter. Tidy.
35 (cp_finish_decl): Do not pop scopes here. Call
36 determine_visibility for variable definitions.
37 (start_preparsed_function): Call determine_visibility.
38 * decl2.c (determine_visibility): New function.
39 * method.c (use_thunk): Fix formatting.
40 * parser.c (cp_parser_condition): Adjust calls to start_decl.
41 (cp_parser_init_declarator): Likewise.
42 * pt.c (instantiate_decl): Always call pop_nested_class.
43 * rtti.c (get_tinfo_decl): Do not set DECL_VISIBILITY.
44 (tinfo_base_init): Likewise.
46 2004-08-02 Mark Mitchell <mark@codesourcery.com>
49 * name-lookup.c (validate_nonmember_using_decl): Robustify.
51 2004-08-01 Mark Mitchell <mark@codesourcery.com>
54 * name-lookup.c (decl_namespace): Remove.
55 (current_decl_namespace): Use decl_namespace_context instead of
57 (push_decl_namespace): Likewise.
58 (arg_assoc_class): Likewise.
59 (arg_assoc_type): Likewise.
60 * pt.c (check_specialization_namespace): New function.
61 (maybe_process_partial_specialization): Use it.
62 (register_specialization): Likewise.
65 * cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): New macro.
66 * call.c (null_ptr_cst_p): Handle variables with constant
68 * pt.c (convert_nontype_argument): Use
69 DECL_INTEGRAL_CONSTANT_VAR_P.
70 * semantics.c (finish_id_expression): Likewise.
73 * decl.c (duplicate_decls): Reject duplicate namespace
77 * typeck.c (build_ptrmemfunc): Loosen assertion.
79 2004-08-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
81 * call.c (z_candidate::template_decl): Rename from template.
82 (add_template_candidate_real): Adjust member reference.
85 2004-07-29 Mark Mitchell <mark@codesourcery.com>
87 * cp-tree.h (IDENTIFIER_REPO_CHOSEN): Define.
88 (lang_decl_flags): Narrow the width of "languages". Add
90 (DECL_NEEDED_P): Remove.
91 (FOR_EACH_CLONE): New macro.
92 (DECL_REPO_AVAILABLE_P): Likewise.
93 (DECL_TINFO_P): Likewise.
94 (set_linkage_according_to_type): Declare.
95 (import_export_vtable): Remove.
96 (import_export_tinfo): Likewise.
97 (mark_needed): New function.
98 (decl_needed_p): Likewise.
99 (note_vauge_linkage_fn): Likewise.
100 (init_repo): Change prototype.
101 (repo_template_used): Remove.
102 (repo_template_instantiated): Likewise.
103 (repo_emit_p): New function.
104 (repo_export_class_p): Likewise.
105 (no_linkage_check): Change prototype.
106 * class.c (set_linkage_according_to_type): New function.
107 (build_vtable): Use it. Do not call import_export_vtable. Set
108 DECL_IGNORED_P if appropriate.
109 * decl.c (duplicate_decls): Preserve DECL_REPO_AVAILABLE_P.
110 (make_rtL_for_nonlocal_decls): Check for template instantiations
112 (grokfndecl): Adjust call to no_linkage_check.
113 (set_linkage_for_static_data_member): New function.
114 (grokvardecl): Use it. Adjust call to no_linkage_check.
115 (grokdeclarator): Use set_linkage_for_static_data_member.
116 * decl2.c (note_vague_linkage_fn): New function.
117 (note_vague_linkage_var): Likewise.
118 (finish_static_data_member_decl): Use it.
119 (import_export_vtable): Remove.
120 (import_export_class): Use repo_export_class_p.
121 (var_finalized_p): Simplify.
122 (maybe_emit_vtables): Simplify.
123 (mark_needed): New function.
124 (decl_needed_p): Likewise.
125 (import_export_decl): Add documentation and consistency checks.
126 Use repo_emit_p. Handle virtual tables and RTTI information
128 (import_export_tinfo): Remove.
129 (write_out_vars): Call import_export_decl.
130 (cxx_callgraph_analyze_expr): Ensure that all vtables are emitted
132 (finish_file): Use decl_needed_p. Do not call import_export_decl
133 for undefined static data members. Do not warn about undefined
134 inlines when using a repository.
135 (mark_used): Use note_vague_linkage_fn. Always defer template
137 * lex.c (cxx_init): Adjust call to init_repo. Always set
139 * method.c (synthesize_method): Remove unncessary
140 import_export_decl call.
141 (implicitly_declare_fn): Use set_linkage_according_to_type.
142 * optimize.c (maybe_clone_body): Use FOR_EACH_CLONE.
143 * pt.c (instantiate_class_template): Don't redundantly add classes
144 to keyed_classes. Don't call repo_template_used.
145 (tsubst_decl): Set DECL_INTERFACE_KNOWN for instantiations of
146 templates with internal linkage.
147 (check_instantiated_args): Adjust call to no_linkage_check.
148 (instantiate_template): Use FOR_EACH_CLONE.
149 (mark_definable): New function.
150 (mark_decl_instantiated): Use it.
151 (do_decl_instantiation): Adjust tests for explicit instantiation
152 after "extern template".
153 (instantiate_class_member): Do not use repo_template_instantiated.
154 (do_type_instantiation): Simplify.
155 (instantiate_decl): Use mark_definable. Check repo_emit_p.
157 * repo.c (repo_get_id): Remove.
158 (original_repo): Remove.
159 (IDENTIFIER_REPO_USED): Remove.
160 (IDENTIFIER_REPO_CHOSEN): Remove.
161 Remove all #if 0'd code.
162 (repo_template_used): Remove.
163 (repo_template_instantiated): Remove.
164 (temporary_obstack_initialized_p): New variable.
165 (init_repo): Register with lang_post_pch_load. Avoid creating
166 identifiers unnecessarily. Don't use original_repo. Close the
168 (reopen_repo_file_for_write): Not here.
169 (finish_repo): Always write out a new repository file.
170 (repo_emit_p): New function.
171 (repo_export_class_p): Likewise.
172 * rtti.c (get_tinfo_decl): Use set_linkage_according_to_type.
173 (involves_incomplete_p): New function.
174 (tinfo_base_init): Use it.
175 (ptr_initializer): Remove non_public_ptr parameter.
176 (ptm_initializer): Likewise.
177 (get_pseudo_ti_init): Likewise.
178 (unemitted_tinfo_decl_p): Remove.
179 (emit_tinfo_decl): Use import_export_decl.
180 * semantics.c (expand_body): Move updates of static_ctors and
182 (expand_or_defer_fn): ... here.
183 * tree.c (no_linkage_check): Add relaxed_p parameter.
185 2004-07-28 Eric Christopher <echristo@redhat.com>
187 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
189 2004-07-28 Nathan Sidwell <nathan@codesourcery.com>
191 * cp-tree.h (struct tree_pair_s): New.
192 (typedef tree_pair_p): New.
193 (DEF_VEC_O(tree_pair_s)): New.
194 (struct lang_type_class): Make vcall_indices a VEC(tree_pair_s).
195 (CLASSTYPE_VCALL_INDICES): Update documentation.
196 * class.c (get_vcall_index): Adjust.
197 (add_vcall_offset): Adjust.
199 2004-07-27 Kelley Cook <kcook@gcc.gnu.org>
201 * pt.c, typeck.c: Remove spurious carriage returns.
203 2004-07-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
206 * pt.c (coerce_template_template_parms) <PARM_DECL case>: Only check
207 when the type of ARG is not dependent.
209 2004-07-26 Geoffrey Keating <geoffk@apple.com>
211 * g++spec.c (LIBSTDCXX_PROFILE): Default to LIBSTDCXX.
212 (lang_specific_driver): If the C++ or math library options don't
213 start with '-l', don't count them as added libraries.
215 2004-07-26 Nathan Sidwell <nathan@codesourcery.com>
217 * decl.c (xref_basetypes): Adjust base access vector creation.
218 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Adjust base
220 * search.c (dynamic_cast_base_recurse, dfs_access_in_type): Likewise.
222 2004-07-26 Niall Douglas <s_fsfeurope2@nedprod.com>
223 Brian Ryner <bryner@brianryner.com>
227 * class.c (check_field_decls): Apply hidden visibility if
228 -fvisibility-inlines-hidden and inlined unless otherwise specified
229 (build_vtable): Set vtable visibility to class visibility.
230 (check_field_decls): Default static member visibility to class
232 (check_methods): Default method visibility to class visibility.
233 * cp-tree.h: Added CLASSTYPE_VISIBILITY and
234 CLASSTYPE_VISIBILITY_SPECIFIED macro.
235 * decl.c (duplicate_decls): New logic for merging definition decls
236 with declaration decls. Added ignore & warning when non default
237 applied to global operator new or delete.
238 * method.c, optimize.c, rtti.c: Added setting of VISIBILITY_SPECIFIED
239 wherever VISIBILITY was changed
240 * rtti.c (get_tinfo_decl): Set typeinfo visibility to class
242 (tinfo_base_init): Set typeinfo name visibility to class visibility.
244 2004-07-25 Bernardo Innocenti <bernie@develer.com>
246 * decl.c: Rename all identifiers named `class' to `cl'.
247 * cp-tree.h: Likewise.
249 2004-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
251 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Use GGC_CNEW.
252 * typeck2.c (abstract_virtuals_error): Use GGC_NEW.
253 * name-lookup.c (binding_entry_make): Use GGC_NEW.
254 (binding_table_construct): Use GGC_CNEWVEC.
255 (binding_table_new): Use GGC_NEW.
256 (cxx_binding_make): Likewise.
257 (begin_scope): Likewise.
258 (push_to_top_level): Use GCC_CNEW.
259 * parser.c (cp_token_cache_new): Likewise.
260 (cp_token_cache_push_token): Likewise.
261 (cp_lexer_new_main): Likewise.
262 (cp_lexer_new_from_tokens): Likewise.
263 (cp_parser_context_new): Likewise.
264 (cp_parser_new): Likewise.
265 (cp_lexer_new_from_tokens): Use GGC_NEWVEC.
266 * lex.c (cxx_make_type): Use GGC_CNEW.
267 (retrofit_lang_decl): Use GGC_NEWVAR.
268 (cxx_dup_lang_specific_decl): Likewise.
269 (copy_lang_type): Likewise.
270 * decl.c (use_label): Use GGC_NEW instead of ggc_alloc.
271 (save_function_data): Likewise.
272 (lookup_label): Use GGC_CNEW instead of ggc_alloc_cleared.
273 (cxx_push_function_context): Likewise.
275 2004-07-25 Richard Henderson <rth@redhat.com>
277 * decl.c (start_preparsed_function): Set DECL_ARTIFICIAL and
278 DECL_IGNORED_P on RESULT_DECL.
279 * semantics.c (finalize_nrv): Copy them too.
281 2004-07-23 Nathan Sidwell <nathan@codesourcery.com>
283 * search.c (lookup_conversion_operator): Avoid two loops.
284 (add_conversions): Remove.
285 (check_hidden_convs, split_conversions,
286 lookup_conversions_r): New.
287 (lookup_conversions): Use lookup_conversions_r.
289 2004-07-22 Nathan Sidwell <nathan@codesourcery.com>
291 * pt.c (get_template_base): Check type is completable.
293 2004-07-21 Eric Christopher <echristo@redhat.com>
295 * decl.c (poplevel): Inline unused variable checking.
298 2004-07-21 Paolo Bonzini <bonzini@gnu.org>
300 * typeck.c (build_binary_op): Do not use RDIV_EXPR for
303 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
306 * pt.c (check_explicit_specialization): Remove extension to accept
307 specializations without template headers. Fall-through to normal
310 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
313 * pt.c (determine_specialization): New parameter template_count.
314 Disambiguate between member templates and member functions counting
315 the template headers.
316 (check_explicit_specialization): Update caller.
317 (tsubst_friend_function): Likewise.
319 2004-07-20 Steven Bosscher <stevenb@suse.de>
321 * cp-tree.def (TINST_LEVEL): Make it an 'x' node.
322 * cp-tree.h (tinst_level_t): New tree type.
323 (union lang_tree_node): Handle it.
324 (TINST_LOCATION): New accessor macro.
325 (make_tinst_level): New prototype.
326 * cp-lang.c (cp_tree_size): Handle TINST_LEVEL.
327 * decl.c (cp_tree_node_structure): Likewise.
328 * error.c (print_instantiation_full_context): Use TINST_LOCATION.
329 (print_instantiation_partial_context): Likewise.
330 * pt.c (pop_tinst_level): Likewise.
331 (push_tinst_level): Use make_tinst_level.
332 * tree.c (make_tinst_level): New function.
333 (cp_walk_subtrees): Walk TINST_DECL for a TINST_LEVEL node.
335 2004-07-20 Mark Mitchell <mark@codesourcery.com>
337 * parser.c (cp_parser_simple_type_specifier): Fix typo.
340 * parser.c (cp_parser_simple_type_specifier): Do not record usage
341 of globally-qualified names.
343 2004-07-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
346 * error.c (dump_type) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Output
349 2004-07-19 Mark Mitchell <mark@codesourcery.com>
352 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
353 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
354 * class.c (add_implicitly_declared_members): Use
355 CLASSTYPE_LAZY_ASSIGNMENT_OP.
356 * method.c (lazily_declare_fn): Clear
357 CLASSTYPE_LAZY_ASSIGNMENT_OP.
358 * search.c (lookup_fnfields_1): Check it.
360 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
362 * cp-tree.h (vec_binfo_member): Remove.
363 * tree.c (vec_binfo_member): Remove.
365 * cp-tree.h (struct lang_type_class): Remove vfields field.
366 (CLASSTYPE_VFIELDS): Remove.
367 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
368 * class.c (determine_primary_base): Remove CLASSTYPE_VFIELDS
370 (dfs_modify_vtables): Use TYPE_CONTAINS_VPTR_P.
371 (finish_struct_1): Remove CLASSTYPE_VFIELDS handling.
372 * init.c (dfs_initialize_vtbl_ptrs): Use TYPE_CONTAINS_VPTR_P.
374 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
376 * cp-tree.h (DEF_VEC_P(tree)): Remove here.
377 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
379 (BINFO_LANG_SLOTS): Remove.
380 * tree.c (copy_binfo): Adjust BINFO creation and accessors.
381 * decl.c (xref_basetypes): Adjust BINFO creation and accessors.
382 * class.c (check_bases): Adjust BINFO accessors.
383 (determine_primary_base, finish_struct_bits,
384 maybe_warn_about_overly_private_class, warn_hidden,
385 walk_subobject_offsets, propagate_binfo_offsets, end_of_class,
386 warn_about_ambiguous_bases, get_vfield_name,
387 dump_class_hierarchy_r, build_vtt_inits, accumulate_vtbl_inits,
388 add_vcall_offset_vtbl_entries_r): Likewise.
389 * dump.c (cp_dump_tree): Likewise.
390 * init.c (sort_mem_initializers, expand_member_init, build_delete,
391 push_base_cleanups): Likewise.
392 * method.c (do_build_copy_constructor, do_build_assign_ref,
393 synthesize_exception_spec): Likewise.
394 name-lookup.c (arg_assoc_class): Likewise.
395 * pt.c (instantiate_class_template,
396 get_template_base_recursive): Likewise.
397 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Likewise.
398 * typeck2.c (process_init_constructor): Likewise.
399 * search.c (lookup_base_r, dynamic_cast_base_recurse,
400 dfs_access_in_type, dfs_walk_real, look_for_overrides,
401 types_overlap_p, copied_binfo, original_binfo): Likewise.
402 (binfo_for_vtable): Remove
404 2004-07-20 Steven Bosscher <stevenb@suse.de>
406 * cp-tree.h (struct lang_decl_flags): Unify the template_info and
407 thunk_alias, and the access and virtual_offset fields.
408 (THUNK_VIRTUAL_OFFSET, THUNK_ALIAS): Adjust.
409 * decl.c (finish_case_label): Update c_add_case_node call.
411 2004-07-19 Mark Mitchell <mark@codesourcery.com>
413 Revert patch for PR c++/16623.
415 2004-07-19 Kelley Cook <kcook@gcc.gnu.org>
417 * except.c: Remove two spurious carriage returns.
419 2004-07-19 Mark Mitchell <mark@codesourcery.com>
422 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
423 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
424 * class.c (add_implicitly_declared_members): Use
425 CLASSTYPE_LAZY_ASSIGNMENT_OP.
426 * method.c (lazily_declare_fn): Clear
427 CLASSTYPE_LAZY_ASSIGNMENT_OP.
428 * search.c (lookup_fnfields_1): Check it.
430 2004-07-19 Nathan Sidwell <nathan@codesourcery.com>
432 * class.c (add_method): Delay adding the slot until the end.
433 (determine_primary_base): Adjust VEC_iterate invokation.
434 (resort_type_method_vec, finish_struct_methods, warn_hidden,
435 walk_subobject_offsets, end_of_class, warn_about_ambiguous_bases,
436 build_vtbl_initializer): Likewise.
437 * init.c (sort_mem_initializers, build_delete, push_base_cleanups,
438 build_vbase_delete): Likewise.
439 * method.c (do_build_copy_constructor): Likewise.
440 * name-lookup.c (new_class_binding, print_binding_level,
441 poplevel_class, store_class_bindings, push_to_top_level,
442 pop_from_top_level): Likewise.
443 * pt.c (check_explicit_specialization): Likewise.
444 * search.c (lookup_conversion_operator, lookup_fnfields_1,
445 get_pure_virtuals, add_conversions, dfs_check_overlap,
446 binfo_for_vbase): Likewise.
448 2004-07-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
451 * pt.c (unify) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Use only
452 innermost set of template arguments during deduction. Simplify.
454 2004-07-19 Joseph S. Myers <jsm@polyomino.org.uk>
456 * typeck.c (build_modify_expr, build_x_modify_expr): Set
457 TREE_NO_WARNING on assignments with an operator other than '='.
459 2004-07-10 Steven Bosscher <stevenb@suse.de>
460 Joseph S. Myers <jsm@polyomino.org.uk>
462 * cp-tree.h (C_SET_EXP_ORIGINAL_CODE): Remove.
463 * decl2.c (grokfield): Don't check current_class_depth via
464 unused TREE_COMPLEXITY.
465 * semantics.c (finish_parenthesized_expr): Set TREE_NO_WARNING
466 to avoid the missing parentheses warning.
467 Don't set C_SET_EXP_ORIGINAL_CODE.
469 2004-07-18 Mark Mitchell <mark@codesourcery.com>
471 * tree.c (no_linkage_helper): Remove.
472 (no_linkage_check): Don't use walk_tree_without_duplicates.
474 * mangle.c (write_expression): Issue a sorry for zero-operand
477 2004-07-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
480 * init.c (build_offset_ref): Build SCOPE_REF with non-null
481 TREE_TYPE for non-dependent names.
482 * typeck.c (build_x_unary_op): Handle non-dependent SCOPE_REF.
483 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
484 unknown_type_node as its TREE_TYPE.
485 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
486 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
487 (dump_expr) <SCOPE_REF case>: Likewise.
489 2004-07-17 Jason Merrill <jason@redhat.com>
492 * call.c (type_passed_as): Make the invisible reference type
494 * cp-gimplify.c (gimplify_cleanup_stmt): Rename to
495 cp_genericize_r. Handle invisible reference lowering.
496 (is_invisiref_parm): New fn.
497 (cp_genericize): Adjust the types of invisible reference parms.
498 Don't repeat the walk for clones.
499 * decl.c (store_parm_decls): Don't generate any code for clones.
501 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
503 * cp-tree.h (builtin_function): Declare.
505 2004-07-16 Mark Mitchell <mark@codesourcery.com>
507 * class.c (finish_struct_methods): Remove unncessary code.
508 (add_implicitly_declared_members): Create declarations for default
509 constructors and copy constructors lazily.
510 * cp-tree.h (lang_type_class): Remove lazy_default_ctor and
512 (CLASSTYPE_LAZY_DEFAULT_CTOR): New macro.
513 (CLASSTYPE_LAZY_COPY_CTOR): Likewise.
514 * decl2.c (check_classfn): Robustify.
515 (locate_dtor): Handle empty CLASSTYPE_METHOD_VEC.
516 (locate_ctor): Handle lazy default constructors.
517 (locate_copy): Handle lazy copy constructors.
518 (implicitly_declare_fn): Make sure we're looking at the
519 TYPE_MAIN_VARIANT for a class before creating functions. Don't
520 set TYPE_HAS_CONSTRUCTOR.
521 (lazily_declare_fn): New function.
522 * name-lookup.c (constructor_name_full): Simplify.
523 * search.c (lookup_fnfields_1): Lazily create methods, as
525 (lookup_for_overrides): Handle empty CLASSTYPE_METHOD_VEC.
527 2004-07-16 Steven Bosscher <stevenb@suse.de>
529 * cp-tree.h (struct lang_type): Don't have three GTY options on a
532 2004-07-16 Richard Henderson <rth@redhat.com>
534 * cp-lang.c (LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING): Die.
535 * cp-tree.h (cp_copy_res_decl_for_inlining): Remove.
536 * tree.c (cp_copy_res_decl_for_inlining): Remove.
538 2004-07-16 Nathan Sidwell <nathan@codesourcery.com>
540 * class.c (finish_struct_bits): Use for loop.
541 (propagate_binfo_offsets): Do primary binfo outside of loop.
544 * dump.c (cp_dump_tree): Don't dump the bases if there's no
547 * pt.c (tsubst) <TREE_BINFO case>: We should never get here.
549 2004-07-15 Mark Mitchell <mark@codesourcery.com>
551 * cp-tree.h (lang_type_class): Remove has_real_assign_ref and
552 has_abstract_assign_ref. Make methods a VEC(tree) *.
553 (TYPE_HAS_CONST_ASSIGN_REF): Add documentation.
554 (CLASSTYPE_CONSTRUCTORS): Adjust for changes to CLASSTYPE_METHOD_VEC.
555 (CLASSTYPE_DESTRUCTORS): Likewise.
556 (TYPE_HAS_REAL_ASSIGN_REF): Remove.
557 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
558 (add_method): Change prototoype.
559 * class.c (add_method): Remove error_p parameter. Adjust for
560 changes to CLASSTYPE_METHOD_VEC.
561 (handle_using_decl): Adjust call to add_method.
562 (maybe_warn_about_overly_private_class): Adjust for
563 changes to CLASSTYPE_METHOD_VEC.
564 (resort_type_method_vec): Likewise.
565 (finish_struct_methods): Likewise.
566 (check_for_override): Likewise.
567 (warn_hidden): Likewise.
568 (add_implicitly_declared_members): Defer creation of assignment
569 operators. Adjust call to add_method.
570 (clone_function_decl): Adjust call to add_method.
571 (check_bases_and_members): Don't set TYPE_HAS_REAL_ASSIGN_REF.
572 (finish_struct_1): Use CLASSTYPE_DESTRUCTORS.
573 * decl.c (grok_special_member_properties): Don't set
574 TYPE_HAS_ABSTRACT_ASSIGN_REF.
575 * decl2.c (check_classfn): Adjust for
576 changes to CLASSTYPE_METHOD_VEC.
577 * method.c (locate_dtor): Use CLASSTYPE_DESTRUCTORS.
578 (locate_ctor): Use CLASSTYPE_CONSTRUCTORS.
579 (locate_copy): Adjust for changes to CLASSTYPE_METHOD_VEC.
580 (implicitly_declare_fn): Set DECL_SOURCE_LOCATION. Do not call
582 * pt.c (check_explicit_specialization): Adjust for
583 changes to CLASSTYPE_METHOD_VEC.
584 (instantiate_class_template): Do not set
585 TYPE_HAS_ABSTRACT_ASSIGN_REF.
586 * ptree.c (cxx_print_type): Don't try to print
587 CLASSTYPE_METHOD_VEC.
588 * rtti.c (emit_support_tinfos): Use CLASSTYPE_DESTRUCTORS.
589 * search.c (lookup_field_r): Adjust for
590 changes to CLASSTYPE_METHOD_VEC.
591 (lookup_fnfields): Likewise.
592 (lookup_conversion_operator): Likewise.
593 (lookup_fnfields_1): Likewise. Create assignment operators
595 (look_for_overrides_here): Adjust for
596 changes to CLASSTYPE_METHOD_VEC.
597 (add_conversions): Likewise.
598 * semantics.c (finish_member_declaration): Adjust call to add_method.
600 2004-07-15 Jason Merrill <jason@redhat.com>
602 * cp-lang.c (cxx_types_compatible_p): To the middle-end,
603 references and pointers are compatible.
605 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
607 * decl.c (xref_basetypes): Refactor.
608 * tree.c (copy_base_binfos): Replace with ...
609 (copy_binfo): ... this. Deep copy the given binfo, (not the just
610 bases of the given base).
611 * cp-tree.h (copy_base_binfo): Remove.
612 (copy_binfo): Declare.
614 2004-07-15 Mark Mitchell <mark@codesourcery.com>
616 * name-lookup.c (set_inherited_value_binding_p): Add class_type
618 (get_class_binding): Adjust.
619 (push_class_level_binding): Don't use set_inherited_value_binding_p.
621 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
623 * class.c (finish_struct_bits): Don't set TYPE_HAS_CONVERSION here.
624 * decl.c (xref_basetypes): Set it here.
626 * class.c (check_bases): Don't set CLASSTYPE_NON_AGGREGATE here.
627 Don't check for incomplete base.
628 (get_vfield_name): Simplify while loop.
629 * decl.c (xref_basetypes): Set CLASSTYPE_NON_AGGREGATE here.
631 2004-07-14 Mark Mitchell <mark@codesourcery.com>
633 * lex.c (cxx_make_type): Remove call to get_pointer_type.
635 * cp-tree.h (IDENTIFIER_VALUE): Remove.
636 (BINFO_PUSHDECLS_MARKED): Likewise.
637 (maybe_inject_for_scope_var): Likewise.
638 (push_class_decls): Likewise.
639 * name-lookup.h (push_class_binding): Remove.
640 (innermost_non_namespace_value): New function.
641 (outer_binding): Likewise.
642 * class.c (add_method): Push bindings before adding to
644 (restore_class_cache): Do not restore class_shadowed.
645 (pushclass): Do not add USING_DECLs. Do not call
647 * config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c.
648 * decl.c (pushdecl): Use outer_binding.
649 (poplevel): Set the scope for an out-of-scope for-loop declaration
651 (cp_finish_decl): Don't call maybe_inject_for_scope_var.
652 * name-lookup.c (new_class_binding): New function.
653 (push_binding): Use it.
654 (pushdecl): Use innermost_non_namespace_value.
655 (maybe_inject_for_scope_var): Remove.
656 (push_class_binding): Remove.
657 (set_inherited_value_binding_p): New function.
658 (get_class_binding): New function.
659 (push_class_level_binding): Assert that the current_class_type is
661 (outer_binding): New function.
662 (innermost_non_namespace_value): Likewise.
663 (lookup_name_real): Use outer_binding.
664 (lookup_name_current_level): Ignore out-of-scope variables.
665 * pt.c (check_template_shadow): Use innermost_non_namespace_value.
666 (lookup_template_class): Likewise.
667 * search.c (dfs_push_type_decls): Remove.
668 (dfs_push_decls): Likewise.
669 (setup_class_bindings): Likewise.
670 (lookup_field_1): Handle USING_DECLs from dependent scopes.
671 (marked_pushdecls_p): Remove.
672 (unmarked_pushdecls_p): Remove.
673 (marked_identifiers): Remove.
674 (setup_class_bindings): Remove.
675 (dfs_push_type_decls): Remove.
676 (dfs_push_decls): Remove.
677 (push_class_decls): Remove.
679 2004-07-13 Mark Mitchell <mark@codesourcery.com>
683 * decl.c (grokvardecl): Make declspecs parameter const.
684 (grokdeclarator): Likewise. Adjust accordingly.
685 * decl.h (grokdeclarator): Adjust declaration.
686 * parser.c (cp_parser_init_declarator): Do not clear
687 decl_specifiers->attributes.
689 * cp-tree.h (lang_identifier): Remove class_value.
690 (IDENTIFIER_CLASS_VALUE): Remove.
691 (pop_class_decls): Likewise.
692 (init_search_processing): Likewise.
693 * class.c (handle_using_decl): Use lookup_member, not
694 IDENTIFIER_CLASS_VALUE.
695 (restore_class_cache): New function, split out from ...
696 (pushclass): ... here. Do not call clear_identifier_class_values.
697 (invalidate_class_lookup_cache): Do not clear
698 IDENTIFIER_CLASS_VALUE.
699 (popclass): Do not call pop_class_decls.
700 (maybe_note_name_used_in_class): Do not save names looked up after
701 the class is complete. Use lookup_member, not
702 IDENTIFIER_CLASS_VALUE.
703 * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
704 * decl.c (cxx_init_decl_processing): Do not call
705 init_search_processing.
706 * method.c (do_build_copy_constructor): Remove unnecessary code.
707 (do_build_assign_ref): Likewise.
708 * name-lookup.c (pushdecl): Use lookup_member, not
709 IDENTIFIER_CLASS_VALUE.
710 (set_identifier_type_value_with_scope): Set TREE_TYPE on the
712 (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
713 (push_class_binding): Do not set it.
714 (clear_identifier_class_values): Remove.
715 (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
716 (store_binding): Do not save it.
717 (pop_from_top_level): Do not restore it.
718 * name-lookup.h (cxx_saved_binding): Remove class_value.
719 (clear_identifier_class_values): Remove.
720 * ptree.c (cxx_print_identifier): Do not print
721 IDENTIFIER_CLASS_VALUE.
722 * search.c (search_obstack): Remove.
723 (push_stack_level): Remove.
724 (pop_stack_level): Remove.
725 (search_level): Remove.
726 (search_stack): Remove.
727 (lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
728 (setup_class_bindings): Use IDENTIFIER_MARKED, not
729 IDENTIFIER_CLASS_VALUE.
730 (marked_identifiers): New variable.
731 (push_class_decls): Clear IDENTIFIER_MARKED.
732 (pop_class_decls): Don't call pop_search_level.
733 (init_search_processing): Remove.
735 2004-07-12 Mark Mitchell <mark@codesourcery.com>
737 * cp-tree.h (get_aggr_typedef): Remove.
738 * init.c (get_aggr_typedef): Likewise.
740 * name-lookup.c (push_class_level_binding): Simplify.
742 2004-07-12 Andrew Pinski <apinski@apple.com>
746 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
748 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
751 2004-07-12 Eric Christopher <echristo@redhat.com>
753 * parser.c (cp_parser_class_head): Remove unused variable.
755 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
757 * decl.c (grok_op_properties): Reject [de-]allocation functions
758 declared in a namespace, or declared as static.
760 2004-07-12 Nathan Sidwell <nathan@codesourcery.com>
762 * cp-tree.h (make_binfo): Remove.
763 * decl.c (xref_basetypes): Use make_tree_binfo directly.
764 * tree.h (copy_base_binfos): Likewise.
765 (make_binfo): Remove.
767 * call.c (build_user_type_conversion_1, build_new_op,
768 check_constructor_callable, build_temp,
769 perform_direct_initialization_of_possible): Pass type directly to
770 lookup_fnfields & build_special_member_call.
771 (build_special_member_call): Accept a type, and complete it.
772 * class.c (finish_stuct_bits): Copy the BINFOs here.
773 * cvt.c (ocp_convert): Pass type directly to
774 build_special_member_call.
775 * decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
776 (xref_basetypes): Allocate the binfo here. Adjust.
777 * init.c (build_init, build_new_1): Pass type directly to
778 build_special_member_call.
779 * lex.c (cxx_make_type): Do not allocate binfo here.
780 * name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
781 * parser.c (cp_parser_class_head): Always call xref_basetypes.
782 * pt.c (instantiate_class_template): Likewise. Inhibit access
783 checking for template friends.
784 * ptree.c (cxx_print_type): Adjust record printing.
785 * search.c (lookup_base): When taking a type, complete it before
787 (lookup_member): Delay completing a type.
788 (push_class_decls): Don't walk an incomplete type.
789 (lookup_conversions): Likewise.
790 * semantics.c (finish_stmt_expr_expr): Pass type directly to
791 build_special_member_call.
792 * tree.c (copy_base_binfos): Adjust.
793 (make_binfo): Likewise.
794 * typeck.c (build_modify_expr): Pass type directly to
795 build_special_member_call.
796 * typeck2.c (process_init_constructor): Check a binfo exists.
797 (build_m_component_ref): Allow accessing an incomplete type.
798 (build_functional_cast): Pass type directly to
799 build_special_member_call.
801 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
804 * config-lang.in (gtfiles): Add typeck2.c.
805 * Make-lang.in: Tweak typeck2.c dependencies, and add rule for
807 * cp-tree.h: Declare complete_type_check_abstract.
808 * typeck2.c (pat_calc_hash, pat_compare,
809 complete_type_check_abstract): New functions.
810 (abstract_virtuals_error): If the type is abstract, register the
811 declaration within abstract_pending_vars for further checks.
812 Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
813 * decl.c (cp_finish_decl): Do not strip array types.
814 (create_array_type_for_decl): Check for abstractness of the element
816 (complete_vars): Call complete_type_check_abstract.
817 * class.c (finish_struct): Prepare a list of virtual functions for
818 template types, and call complete_vars on it to check for abstractness.
820 2004-07-12 Paolo Bonzini <bonzini@gnu.org>
822 PR tree-optimization/14107
823 * decl.c (finish_function): Remove temporary band-aid.
825 2004-07-11 Mark Mitchell <mark@codesourcery.com>
827 * call.c (build_operator_new_call): Avoid using push_to_top_level.
828 (build_new_op): Adjust call to lookup_function_nonclass.
829 * name-lookup.c (identifier_type_value): Adjust call to
831 (lookup_name_real): Add block_p parameter.
832 (lookup_name_nonclass): Adjust call to lookup_name_real.
833 (lookup_function_nonclass): Likewise.
834 (lookup_name): Likewise.
835 * name-lookup.h (lookup_name_real): Change prototype.
836 (lookup_name_nonclass): Likewise.
837 * parser.c (cp_parser_lookup_name): Likewise.
839 * cp-tree.h (saved_scope): Make old_bindings a vector.
840 (unuse_fields): Remove.
841 * name-lookup.h (cxx_saved_binding): Define it.
842 * class.c (pushclass): Don't use unuse_fields.
843 * name-lookup.c (cxx_saved_binding_make): Remove.
844 (store_binding): Add new bindings to a vector, using an
845 accumulator style, rather than adding them to a list.
846 (store_bindings): Adjust accordingly.
847 (store_class_bindings): Likewise.
848 (push_to_top_level): Likewise.
849 (pop_from_top_level): Likewise.
850 * optimize.c (maybe_clone_body): Must push_to_top_level and
851 pop_from_top_level calls outside of loop.
852 * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope
853 calls here from cp_parser_late_parsing_default_args.
854 (cp_parser_save_default_args): Record the class type in which the
855 function is declared.
856 (cp_parser_late_parsing_default_args): Do not call
857 push_nested_class/pop_nested_class.
858 * search.c (dfs_unuse_fields): Remove.
859 (unuse_fields): Remove.
861 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
863 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
864 LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
865 * cp-tree.h (poplevel): Declare.
867 * decl.c (set_block): Remove.
869 2004-07-10 Mike Stump <mrs@apple.com>
871 * decl2.c (import_export_class): Never export/import vtables
872 with inline key functions.
874 2004-07-09 Steven Bosscher <stevenb@suse.de>
876 * typeck.c (c_expand_asm_operands): Remove.
878 2004-07-09 Mike Stump <mrs@apple.com>
880 * typeck.c (build_class_member_access_expr): Skip null deref
881 warning when we don't dereference it.
883 2004-07-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
887 * class.c (check_field_decls): Improve -Weffc++ warning: do not
888 warn for pointers to functions/members, or for classes without
891 2004-07-08 Mark Mitchell <mark@codesourcery.com>
893 * name-lookup.h (struct cp_binding_level): Update documentation
896 2004-07-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
899 * typeck.c (check_return_expr): Improve -Weffc++ warning: handle
900 returning CALL_EXPR, and non-reference return type.
902 2004-07-08 Nathan Sidwell <nathan@codesourcery.com>
904 * name-lookup.c (push_binding): Use VEC_reserve.
906 2004-07-08 Richard Henderson <rth@redhat.com>
908 * cp-tree.h (expand_eh_spec_block): Remove.
910 2004-07-07 Mark Mitchell <mark@codesourcery.com>
912 * cp-tree.h (saved_scope): Remove x_previous_class_type and
913 x_previous_class_values; add x_previous_class_level.
914 (previous_class_type): Remove.
915 (previous_class_values): Remove.
916 (previous_class_level): New macro.
917 * class.c (pushclass): Restore the identifier cache more
919 (invalidate_class_lookup_cache): Use vector for class_shadowed and
920 previous_class_values.
921 * decl.c (poplevel): Likewise.
922 * name-lookup.c (cxx_binding_init): New function.
923 (cxx_binding_make): Use it.
924 (push_binding): For a binding in a class level, use a vector of
925 cp_class_binding nodes.
926 (push_binding_level): New function.
927 (begin_scope): Use it.
928 (leave_scope): Do not put class binding levels on the free list.
929 (print_binding_level): Adjust for the fact that class_shadowed is
931 (poplevel_class): Likewise.
932 (clear_identifier_class_values): Likewise.
933 (push_class_level_binding): Likewise.
934 (set_class_shadows): Remove.
935 (store_binding): New function.
936 (store_class_bindings): New function.
937 (push_to_top_level): Use store_class_bindings as appropriate.
938 (pop_from_top_level): Use previous_class_level, not
940 * name-lookup.h (cp_class_binding): New type.
941 (cp_binding_level): Use a vector object for class_shadowed.
942 (push_binding_level): Declare.
943 (set_class_shadows): Remove.
945 2004-07-07 Andrew Pinski <apinski@apple.com>
947 * class.c (instantiate_type): BUFFER_REF is dead.
948 * lex.c (init_operators): IN_EXPR is dead.
950 2004-07-07 Jason Merrill <jason@redhat.com>
953 * call.c (build_new_op): Give overload warnings for built-in
956 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
959 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
962 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
964 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
965 * class.c (build_primary_vtable, check_bases,
966 determine_primary_base, finish_struct_bits,
967 maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
968 get_basefndecls, warn_hidden, walk_subobject_offsets,
969 build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
970 layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
971 finish_struct_1, get_vfield_name, contains_empty_class_p,
972 dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
973 dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
974 add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
976 * decl.c (xref_basetypes): Likewise.
977 * dump.c (cp_dump_tree): Likewise.
978 * error.c (dump_expr): Likewise.
979 * init.c (sort_mem_initializers, expand_member_init,
980 push_base_cleanups): Likewise.
981 * method.c (do_build_copy_constructor, do_build_assign_reg,
982 synthesize_exception_spec): Likewise.
983 * name-lookup.c (arg_assoc_class): Likewise.
984 * pt.c (instantiate_class_template, tsubst,
985 get_template_base_recursive): Likewise.
986 * ptree.c (cxx_print_type): Likewise.
987 * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
988 * search.c (lookup_base_r, dynamic_cast_base_recurse,
989 dfs_access_in_type, access_in_type, lookup_field_queue_p,
990 bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
991 marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
992 dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
993 binfo_for_vtable, copied_binfo, original_binfo): Likewise
994 * tree.c (copy_base_binfos, make_binfo): Likewise.
995 * typeck.c (commmon_base_type): Likewise
996 * typeck2.c (process_init_constructor): Likewise
998 2004-07-06 Joseph S. Myers <jsm@polyomino.org.uk>
1000 * decl.c (check_tag_decl): Name redeclared type in diagnostic.
1002 2004-07-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1005 * pt.c (convert_nontype_argument): Disallow conversions between
1006 different enumeration types.
1008 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
1010 * cp-tree.h (BINFO_MARKED): Remove.
1011 (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
1012 BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
1013 BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
1014 (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
1015 * class.c (build_base_path): Use BINFO_VIRTUAL_P.
1016 (mark_primary_bases, determine_primary_base, base_derived_from,
1017 dfs_find_final_overrider, dfs_find_final_overrider_q,
1018 dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
1019 dfs_modify_vtables, walk_subobject_offsets,
1020 layout_nonempty_base_or_field, build_base_field,
1021 build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
1022 end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
1023 finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
1024 build_ctor_vtbl_group, accumulate_vtble_inits,
1025 dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
1026 build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
1027 add_vcall_offset_vtbl_entries_1): Likewise.
1028 * decl.c (xref_basetypes): Incomming virtual base indicated by
1030 * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
1031 * init.c (finish_init_stmts, sort_mem_initializers,
1032 emit_mem_initializers, build_vtble_address, expand_member_init,
1033 push_base_cleanups): Likewise.
1034 * method.c (do_build_copy_constructor): Likewise.
1035 * pt.c (instantiate_class_template,
1036 get_template_base_recursive): Likewise.
1037 * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
1038 get_pseudo_ti_desc): Likewise.
1039 * search.c (lookup_base_r, dynamic_cast_base_recurse,
1040 binfo_from_vbase, binfo_via_virtual, copied_binfo,
1041 original_binfo): Likewise.
1042 * semantics.c (finish_base_specifier): Virtualness is indicated
1044 * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
1046 2004-07-06 Mark Mitchell <mark@codesourcery.com>
1049 2004-06-24 Jason Merrill <jason@redhat.com>
1051 * decl.c (grokparms): Give the PARM_DECL reference type if the
1052 parameter is passed by invisible reference.
1054 2004-07-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1056 * cp-lang.c (cp_var_mod_type_p): Add extra arg.
1057 * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
1058 * pt.c (check_instantiated_args, unify): Likewise.
1060 2004-07-05 Phil Edwards <phil@codesourcery.com>
1062 * Make-lang.in (check-c++, lang_checks): Add some comments.
1064 2004-07-05 Zack Weinberg <zack@codesourcery.com>
1066 * cp-mudflap.c: Delete file.
1067 * Makefile.in: Remove all references to cp-mudflap.o.
1069 2004-07-05 Zack Weinberg <zack@codesourcery.com>
1071 * decl.c (cxx_init_decl_processing): Call
1072 build_common_tree_nodes before creating the global NAMESPACE_DECL.
1074 2004-07-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1077 * call.c (build_operator_new_call): Look only at global scope.
1079 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
1081 * call.c (enforce_access): Expect TREE_BINFO.
1082 * class.c (binfo_ctor_vtable): Check TREE_BINFO.
1083 * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
1084 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
1086 (BINFO_LANG_ELTS): Remove.
1087 (BINFO_LANG_SLOTS): New.
1088 (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
1089 (CLASSTYPE_TEMPLATE_INFO): Adjust.
1090 * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
1091 * search.c (lookup_member): Check TREE_BINFO.
1092 * semantics.c (perform_or_defer_access_check): Likewise.
1093 (check_accessibility_of_qualified_id): Check
1094 deferred_access_no_check.
1095 * tree.c (make_binfo): Use make_tree_binfo.
1097 2004-07-04 Mark Mitchell <mark@codesourcery.com>
1099 * method.c (implicitly_declare_fn): Set linkage of generated
1102 2004-07-04 Richard Henderson <rth@redhat.com>
1104 * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
1106 2004-07-03 Scott Brumbaugh <scottb.lists@verizon.net>
1109 * name-lookup.c (push_class_level_binding): Don't pass a
1110 TREE_LIST of ambiguous names to check_template_shadow as it
1111 only handles declarations. Instead, pull the declaration
1114 2004-07-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1117 * pt.c (check_explicit_specialization): Clarify error message.
1119 2004-07-02 Richard Henderson <rth@redhat.com>
1121 * tree.c (cp_unsave_r): Update remap_save_expr call.
1123 2004-07-02 Mark Mitchell <mark@codesourcery.com>
1126 * mangle.c (write_template_arg): Correct mangling.
1129 * decl.c (grokdeclarator): Robustify.
1131 2004-07-01 Richard Henderson <rth@redhat.com>
1133 * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
1134 * method.c (synthesize_method): Don't clear_last_expr.
1135 * name-lookup.c (maybe_push_cleanup_level): Likewise.
1137 2004-07-01 Nick Clifton <nickc@redhat.com>
1139 * decl2.c (import_export_class): Invoke the
1140 import_export_class field in the gcc_target structure if it is not
1143 2004-06-30 Richard Henderson (rth@redhat.com>
1145 * decl.c (start_preparsed_function): Don't set immediate_size_expand.
1146 * method.c (use_thunk): Likewise.
1148 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
1150 * call.c (build_over_call), typeck.c (build_function_call): Call
1151 check_function_arguments instead of check_function_format.
1153 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
1155 * call.c (build_over_call), typeck.c (build_function_call): Update
1156 calls to check_function_format.
1158 2004-06-30 Richard Henderson <rth@redhat.com>
1160 * call.c (build_over_call): Use __builtin_memcpy for copying
1161 CLASS_AS_BASE rather than funny casting.
1163 2004-06-30 Richard Henderson <rth@redhat.com>
1165 * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
1166 TYPE_SIZE_UNIT of full_type.
1168 2004-06-30 Per Bothner <per@bothner.com>
1170 Conditionally compile support for --enable-mapped_location.
1171 * decl.c (pop_label): Handle (imperfectly) USE_MAPPED_LOCATION case.
1172 * decl2.c: If USE_MAPPED_LOCATION, don't do some line number
1173 adjustments - which I don't understand.
1174 * error.c (dump_decl): Rename "<interrnal>" to "<built-in>".
1175 * error.c: Use LOCATION_FILE and EXPR_LOCATION macros.
1176 (print_instantiation_partial_context): Use expand_location.
1177 * decl.c (duplicate_decl): Use new DECL_IS_BUILTIN macro.
1178 * name-lookup.c: Likewise.
1179 * lex.c (cxx_init): Likewise. Also use BUILTINS_LOCATION.
1180 * name-lookup.c: Use input_line macro.
1181 * parser.c (cp_lexer_get_preprocessor_token): Use UNKNOWN_LOCATION.
1182 (cp_parser_statement): Rename locaal variable statement_locus to
1183 statement_location and use SET_EXPR_LOCATION macro.
1184 * pt.c: Handle USE_MAPPED_LOCATION case. Use new macros.
1185 * tree.c (cp_walk_subtrees): Likewise.
1187 2004-06-29 Per Bothner <per@bothner.com>
1189 * tree.c (build_min_nt, build_min, build_min_non_dep):
1190 Don't set TREE_COMPLEXITY from input_line.
1192 2004-06-29 Paul Brook <paul@codesourcery.com>
1194 * init.c: Include target.h.
1195 (get_cookie_size): Remove and replace with target hook.
1197 (build_new_1): Store the element size in the cookie.
1199 2004-06-29 Nathan Sidwell <nathan@codesourcery.com>
1202 * parser.c (cp_parser_template_declaration_after_export): Disable
1203 access checks here ...
1204 (cp_parser_class_specifier): ... not here.
1206 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1208 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
1209 VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
1210 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
1213 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1215 * cp-tree.h (struct deferred_access): Move to ...
1216 * semantics.c (struct deferred_access): ... here. Adjust.
1217 (deferred_access_stack): Make a VEC(deferred_access),
1218 (deferred_access_free_list): Remove.
1219 (deferred_access_no_check): New.
1220 (push_deferring_access_checks, resume_deferring_access_checks,
1221 stop_deferring_access_checks, pop_deferring_access_checks,
1222 get_deferred_access_checks, pop_to_parent_deferring_access_checks,
1223 perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
1225 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1228 * call.c (build_temp): Declare.
1229 (check_constructor_callable): New.
1230 (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
1231 CONSTRUCTOR_CALLABLE.
1232 (convert_like_real, initialize_reference): Use
1233 check_constructor_callable.
1234 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
1235 (LOOKUP_*): Renumber.
1237 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1239 * friend.c (add_friend): Only perform access checks when context
1241 * lex.c (cxx_make_type): Only create a binfo for aggregate types.
1242 * parser.c (cp_parser_class_specifier): Disable access checks here
1243 when parsing the body of a templated class.
1244 * semantics.c (perform_or_defer_access_checks): Reorder to allow
1245 NULL binfos when not checking access.
1247 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1249 Use vector API for vbase list.
1250 * cp-tree.h: Include vec.h
1251 (DEF_VEC_P (tree)): New type.
1252 (struct lang_type_class): Change vbase's member type.
1253 (binfo_for_vbase): Declare.
1254 * class.c (determine_primary_base, base_derived_from,
1255 update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
1256 warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
1257 build_vtbl_initializer): Adjust.
1258 * decl.c (xref_basetypes): Adjust, accumulate upper bound of
1260 * init.c (sort_mem_initializers, expand_member_init,
1261 push_base_cleanups): Adjust.
1262 * method.c (do_build_copy_constructor): Adjust.
1263 * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
1264 (binfo_for_vbase): New.
1265 * tree.c (copy_base_binfos): Adjust.
1267 2004-06-28 Mark Mitchell <mark@codesourcery.com>
1269 * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
1271 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
1274 * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
1275 paranthesis in case of pointers to array members.
1276 * error.c (dump_type_prefix): Likewise.
1277 (dump_type_suffix): Maybe issue a whitespace when printing
1280 2004-06-27 Mark Mitchell <mark@codesourcery.com>
1283 * parser.c (cp_parser_set_decl_spec_type): Refine test for
1284 redefinition of built-in types.
1286 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
1288 * error.c (pp_template_argument_list_start): Remove.
1289 (pp_template_argument_list_end): Likewise.
1290 (pp_separate_with_comma): Use pp_cxx_separate_with.
1291 (reinit_global_formatting_buffer): Remove.
1292 (pp_non_consecutive_character): Likewise.
1293 (dump_scope): Use pp_cxx_colon_colon.
1294 (dump_template_parameter): Use pp_cxx_identifier,
1295 pp_cxx_tree_identifier and pp_cxx_whitespace.
1296 (dump_templat_bindings): Replace use of pp_string with sequence
1297 of pp_cxx_whitespace and pp_equal.
1298 (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
1299 pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set
1301 (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
1302 (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace,
1303 pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
1304 (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
1305 pp_cxx_right_bracket, pp_cxx_identifier throughout,
1306 (dump_decl): Likewise.
1307 (dump_template_decl): Likewise.
1308 (dump_function_decl): Likewise. Set padding as appropriate.
1309 (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
1311 (dump_exception_spec): Likewise.
1312 (dump_function_name): Use pp_cxx_tree_identifier and
1314 (dump_template_parms): Use pp_cxx_begin_template_argument_list and
1315 pp_cxx_end_template_argument_list.
1316 (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
1317 pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
1318 pp_cxx_whitespace throughout.
1319 (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
1321 (dump_unary_op): Likewise.
1322 (reinit_cxx_pp): New function.
1323 (type_as_string); Use it.
1324 (expr_as_string): Likewise.
1325 (decl_as_string); Likewise.
1326 (context_as_string): Likewise.
1327 (lang_decl_name): Likewise.
1328 (decl_to_string): Likewise.
1329 (expr_to_string): Likewise.
1330 (parm_to_string): Likewise.
1331 (type_to_string): Likewise.
1332 (args_to_string): Likewise.
1333 (cv_to_string): Likewise.
1335 2004-06-26 Mark Mitchell <mark@codesourcery.com>
1337 * cp-tree.h (cp_cv_quals): New type.
1338 (cp_declarator): Use it instead of "tree" as appropriate.
1339 (grok_method_quals): Adjust prototype.
1340 (grokclassfn): Likewise.
1341 (do_friend): Likewise.
1342 * decl.c (grokfndecl): Use cp_cv_quals, not tree.
1343 (grokdeclarator): Likewise.
1344 * decl2.c (grok_method_quals): Likewise.
1345 (grokclassfn): Likewise.
1346 * friend.c (do_friend): Likewise.
1347 * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
1348 * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
1349 (make_pointer_declarator): Likewise.
1350 (make_reference_declarator): Likewise.
1351 (make_ptrmem_declarator): Likewise.
1352 (cp_parser_ptr_operator): Likewise.
1353 (cp_parser_cv_qualifier_seq_opt): Likewise.
1354 (cp_parser_cv_qualifier_opt): Remove.
1355 (cp_parser_new_declarator_opt): Adjust call to
1356 cp_parser_ptr_operator.
1357 (cp_parser_conversion_declaration_opt): Likewise.
1358 (cp_parser_declarator): Use cp_cv_quals, not tree.
1359 (cp_parser_direct_declarator): Likewise.
1361 2004-06-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1363 * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
1364 Rename DECL_STMT to DECL_EXPR.
1365 * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
1366 * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
1367 * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
1369 2004-06-26 Jan Hubicka <jh@suse.cz>
1372 * decl2.c (maybe_emit_vtables): Always import_export_vtable for the
1373 reachability analysis.
1375 2004-06-25 Mark Mitchell <mark@codesourcery.com>
1377 * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
1380 2004-06-25 Paul Brook <paul@codesourcery.com>
1382 * decl2.c (get_guard): Call targetm.cxx.guard_type.
1383 (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
1385 2004-06-24 Mark Mitchell <mark@codesourcery.com>
1387 * decl.c (grokdeclarator): Restore error messages about __thread.
1388 * parser.c (cp_parser_decl_specifier_seq): Likewise.
1390 2004-06-24 Jason Merrill <jason@redhat.com>
1393 * decl.c (grokparms): Give the PARM_DECL reference type if the
1394 parameter is passed by invisible reference.
1396 2004-06-24 Andreas Schwab <schwab@suse.de>
1398 * cp-tree.h (enum cp_storage_class): Remove trailing comma.
1400 2004-06-23 Mark Mitchell <mark@codesourcery.com>
1402 * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
1403 (cp/decl.o): Likewise.
1404 (cp/decl2.o): Likewise.
1405 (cp/pt.o): Likewise.
1406 (cp/semantics.o): Likewise.
1407 * config-lang.in (gtfiles): Do not reference cp/lex.h.
1408 * class.c: Do not include lex.h.
1409 (add_implicitly_declared_members): Do not use
1410 adding_implicit_members.
1411 (check_bases_and_members): Do not talk about grok_x_components.
1412 * cp/cp-tree.h (adding_implicit_members): Remove.
1413 (cp_storage_class): New type.
1414 (cp_decl_spec): Likewise.
1415 (cp_decl_specifier_seq): Likewise.
1416 (cp_parameter_declarator): Use it for the decl_specifiers field.
1417 (check_tag_decl): Adjust prototype.
1418 (shadow_tag): Likewise.
1419 (groktypename): Likewise.
1420 (start_decl): Likewise.
1421 (start_function): Likewise.
1422 (start_method): Likewise.
1423 (grok_x_components): Remove.
1424 (grokfield): Adjust prototype.
1425 (grokbitfield): Likewise.
1426 (finish_member_class_template): Remove.
1427 * decl.c: Do not include lex.h.
1428 (adding_implicit_members): Do not define.
1429 (check_tag_decl): Do not use trees to represent decl-specifiers.
1430 (shadow_tag): Likewise.
1431 (groktypename): Likewise.
1432 (start_decl): Likewise.
1433 (grokvardecl): Likewise.
1434 (grokdeclarator): Likewise.
1435 (grokparms): Likewise.
1436 (start_function): Likewise.
1437 (start_method): Likewise.
1438 * decl.h (grokdeclarator): Adjust prototype.
1439 * decl2.c: Do not include lex.h.
1440 (grok_x_components): Remove.
1441 (grokfield): Do not use trees to represent decl-specifiers.
1442 (grokbitfield): Likewise.
1443 * lex.c: Do not include lex.h.
1445 * parser.c: Include target.h.
1446 (clear_decl_specs): New function.
1447 (cp_parser_translation_unit): Do not use trees to represent
1449 (cp_parser_postfix_expression): Likewise.
1450 (cp_parser_new_type_id): Likewise.
1451 (cp_parser_condition): Likewise.
1452 (cp_parser_simple_declaration): Likewise.
1453 (cp_parser_decl_specifier_seq): Likewise.
1454 (cp_parser_function_specifier_opt): Likewise.
1455 (cp_parser_conversion_type_id): Likewise.
1456 (cp_parser_template_parameter): Likewise.
1457 (cp_parser_explicit_instantiation): Likewise.
1458 (cp_parser_type_specifier): Likewise.
1459 (cp_parser_simple_type_specifier): Likewise.
1460 (cp_parser_init_declarator): Likewise.
1461 (cp_parser_type_id): Likewise.
1462 (cp_parser_type_specifier_seq): Likewise.
1463 (cp_parser_parameter_declaration): Likewise.
1464 (cp_parser_member_declaration): Likewise.
1465 (cp_parser_exception_declaration): Likewise.
1466 (cp_parser_function_definition_from_specifiers_and_declarator):
1468 (cp_parser_single_declaration): Likewise.
1469 (cp_parser_save_member_function_body): Likewise.
1470 (cp_parser_friend_p): Likewise.
1471 (cp_parser_set_storage_class): New function.
1472 (cp_parser_set_decl_spec_type): Likewise.
1473 * pt.c: Do not include lex.h.
1474 * semantics.c: Likewise.
1475 (finish_member_class_template): Remove.
1477 2004-06-23 Roger Sayle <roger@eyesopen.com>
1479 * call.c (build_cxx_call): Don't call expand_tree_builtin. No
1480 longer take both "args" and "convert_args" as arguments.
1481 (build_op_delete_call): Update call to build_cxx_call.
1482 (build_over_call): Likewise, update call to build_cxx_call.
1483 * cp-tree.h (build_cxx_call): Update funtion prototype.
1484 * typeck.c (build_function_call): Don't call expand_tree_builtin.
1485 * rtti.c (throw_bad_cast): Update call to build_cxx_call.
1486 (throw_bad_typeid): Likewise.
1487 (build_dynamic_cast_1): Likewise.
1489 2004-06-22 Richard Henderson <rth@redhat.com>
1491 * class.c (build_vfn_ref): Take a pointer not object. Build
1493 (cp_fold_obj_type_ref): New.
1494 * call.c (build_over_call): Update build_vfn_ref call.
1495 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
1496 * cp-tree.h (cp_fold_obj_type_ref): Declare.
1498 2004-06-21 Jason Merrill <jason@redhat.com>
1501 * cp-gimplify.c (cp_gimplify_init_expr): Look through
1504 2004-06-21 Mark Mitchell <mark@codesourcery.com>
1506 * cp-tree.def (NEW_EXPR): Add a fourth slot.
1507 * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
1508 (TREE_PARMLIST): Likewise.
1509 (CALL_DECLARATOR_PARMS): Likewise.
1510 (CALL_DECLARATOR_QUALS): Likewise.
1511 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
1512 (cp_declarator_kind): New type.
1513 (cp_parameter_declarator): Likewise.
1514 (cp_declarator): Likewise.
1515 (cp_error_declarator): Likewise.
1516 (no_parameters): Likewise.
1517 (groktypename): Change prototype.
1518 (start_decl): Likewise.
1519 (start_handler_parms): Likewise.
1520 (get_scope_of_declarator): Likewise.
1521 (start_function): Likewise.
1522 (start_preparsed_function): New function.
1523 (start_function): Change prototype.
1524 (start_method): Likewise.
1525 (grokfield): Likewise.
1526 (grokbitfield): Likewise.
1527 (build_new): Likewise.
1528 (make_pointer_declarator): Remove.
1529 (make_reference_declarator): Likewise.
1530 (make_call_declarator): Likewise.
1531 (set_quals_and_spec): Likewise.
1532 (process_template_parm): Change prototype.
1533 (begin_function_definition): Remove.
1534 (finish_parmlist): Remove.
1535 * decl.c (groktypename): Do not use trees to represent
1537 (start_decl): Likewise.
1538 (start_handler_parms): Remove.
1539 (get_scope_of_declarator): Reimplement.
1540 (grokdeclarator): Do not use trees to represent declarators.
1541 (grokparms): Likewise.
1542 (start_function): Likewise.
1543 (start_method): Likewise.
1544 (build_void_list_mode): Do not use TREE_PARMLIST.
1545 * decl.h (grokdeclarator): Change prototype.
1546 * decl2.c (grok_method_quals): Robustify.
1547 (grok_x_components): Do not use trees to represent declarators.
1548 (grokfield): Likewise.
1549 (grokbitfield): Likewise.
1550 (start_objects): Build FUNCTION_DECLs, not declarators.
1551 (start_static_storage_duration_function): Likewise.
1552 * init.c (build_new): Simplify.
1553 * lex.c (make_pointer_declarator): Remove.
1554 (make_reference_declarator): Likewise.
1555 (make_call_declarator): Likewise.
1556 (set_quals_and_spec): Likewise.
1557 * method.c (use_thunk): Use start_preparsed_function.
1558 (synthesize_method): Likewise.
1559 (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
1560 * optimize.c (maybe_clone_body): Use start_preparsed_function.
1561 * parser.c (cp_error_declarator): New variable.
1562 (declarator_obstack): Likewise.
1563 (alloc_declarator): New function.
1564 (make_declarator): Likewise.
1565 (make_id_declarator): Likewise.
1566 (make_pointer_declarator): Likewise.
1567 (make_reference_declarator): Likewise.
1568 (make_ptrmem_declarator): Likewise.
1569 (make_call_declarator): Likewise.
1570 (make_array_declarator): Likewise.
1571 (no_parameters): New variable.
1572 (make_parameter_declarator): Likewise.
1573 (cp_parser_check_for_definition_in_return_type): Do not use trees
1574 to represent declarators.
1575 (cp_parser_translation_unit): Likewise.
1576 (cp_parser_new_expression): Likewise.
1577 (cp_parser_new_type_id): Likewise.
1578 (cp_parser_new_declarator_opt): Likewise.
1579 (cp_parser_direct_new_declarator): Likewise.
1580 (cp_parser_condition): Likewise.
1581 (cp_parser_declaration_statement): Likewise.
1582 (cp_parser_declaration): Likewise.
1583 (cp_parser_conversion_type_id): Likewise.
1584 (cp_parser_conversion_declarator_opt): Likewise.
1585 (cp_parser_template_parameter_list): Likewise.
1586 (cp_parser_template_parameter): Likewise.
1587 (cp_parser_explicit_instantiation): Likewise.
1588 (cp_parser_init_declarator): Likewise.
1589 (cp_parser_declarator): Likewise.
1590 (cp_parser_direct_declarator): Likewise.
1591 (cp_parser_type_id): Likewise.
1592 (cp_parser_parameter_declaration_clause): Likewise.
1593 (cp_parser_parameter_declaration_list): Likewise.
1594 (cp_parser_parameter_declaration): Likewise.
1595 (cp_parser_member_declaration): Likewise.
1596 (cp_parser_exception_declaration): Likewise.
1597 (cp_parser_check_declarator_template_parameters): Likewise.
1598 (cp_parser_function_definition_from_specifiers_and_declarator):
1600 (cp_parser_save_member_function_body): Likewise.
1601 * pt.c (process_template_parm): Add is_non_type parameter.
1602 (convert_template_argument): Adjust call to groktypename.
1603 (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
1604 (tsubst): Do not expect declarators.
1605 (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
1607 (instantiate_decl): Use start_preparsed_function.
1608 * semantics.c (begin_function_definition): Remove.
1609 (finish_parmlist): Remove.
1610 * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
1613 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1615 * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
1616 (build_new_method_call): Likewise.
1617 * decl.c (local_variable_p_walkfn): Don't walk into types.
1618 * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
1619 (build_anon_union_vars): Add new operand for COMPONENT_REF.
1620 * init.c (buld_new): Add new operand for ARRAY_REF.
1621 * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
1622 (do_build_assign_ref): Likewise.
1623 * parser.c (cp_parser_direct_new_declarator): Add new operands
1625 (cp_parser_direct_declarator): Likewise.
1626 * pt.c (tsubst): Likewise.
1627 (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
1629 * semantics.c (finish_non_static_data_member): Add new operand
1631 * typeck.c (build_class_member_access_expr): Likewise.
1632 (build_class_member_access_expr, finish_class_member_access_expr):
1634 (build_ptrmemfunc_access_expr): Likewise.
1635 (build_array_ref): Add new operands for ARRAY_REF.
1636 * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
1637 * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
1639 2004-06-21 Richard Henderson <rth@redhat.com>
1641 * dump.c (cp_dump_tree): Don't use dump_next_stmt.
1642 * parser.c (cp_parser_jump_statement): Update commentary.
1643 * pt.c (tsubst_expr): Use RETURN_EXPR.
1644 * semantics.c (finish_return_stmt): Likewise.
1645 (finalize_nrv_r): Likewise.
1646 * typeck.c, typeck2.c: Update file start commentary.
1648 2004-06-21 Richard Henderson <rth@redhat.com>
1650 * semantics.c (finish_expr_stmt): Call verify_sequence_points.
1652 2004-06-20 Richard Henderson <rth@redhat.com>
1654 * cp-tree.h (add_decl_stmt): Declare.
1655 * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
1656 * semantics.c (maybe_cleanup_point_expr): New.
1657 (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
1658 finish_for_expr, finish_switch_cond): Use it.
1659 (finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN.
1661 2004-06-20 Richard Henderson <rth@redhat.com>
1663 * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
1664 * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
1665 (cp_gimplify_expr): Call it.
1666 (gimplify_cleanup_stmt): Move from c-gimplify.c.
1667 (cp_genericize): New.
1668 * decl.c (finish_function): Call it.
1669 * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
1670 (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
1671 (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
1672 (cp_genericize): Declare.
1673 * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
1674 * dump.c (cp_dump_tree): Likewise.
1675 * semantics.c (push_cleanup): Move from c-semantics.c.
1677 2004-06-20 Zack Weinberg <zack@codesourcery.com>
1679 * cp-lang.c (has_c_linkage): Implement.
1681 * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
1682 * decl.c (duplicate_decls): Use COPY_DECL_RTL.
1683 (builtin_function_1): Don't call make_decl_rtl.
1684 (build_cp_library_fn): Don't call set_mangled_name_for_decl.
1685 (grokvardecl): Don't call mangle_decl.
1686 * except.c (nothrow_libfn_p): Look at DECL_NAME, not
1687 DECL_ASSEMBLER_NAME.
1688 * method.c (set_mangled_name_for_decl): Delete.
1689 * name-lookup.c (pushdecl): When a local extern shadows a
1690 file-scope declaration of the same object, give both DECLs the
1692 * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
1693 on DECL_ASSEMBLER_NAME.
1695 2004-06-19 Richard Henderson <rth@redhat.com>
1697 * cp-gimplify.c: Remove unnecessary prototypes.
1698 (cp_gimplify_stmt): Merge into ...
1699 (cp_gimplify_expr): ... here. Move to end of file. Handle
1700 stmts_are_full_exprs_p frobbing.
1701 * cp-tree.h (cp_gimplify_stmt): Remove.
1702 * pt.c (tsubst_expr): Merge prep_stmt and unify.
1703 * tree.c (init_tree): Don't set lang_gimplify_stmt.
1705 2004-06-18 Richard Henderson <rth@redhat.com>
1708 * semantics.c (begin_cond): New.
1709 (finish_cond): Rewrite to handle template DECL_STMTs specially.
1710 Assume that non-template decls go land before the conditional.
1711 (simplify_loop_decl_cond): Likewise.
1712 (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
1713 finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
1714 begin_switch_stmt, finish_switch_cond): Update to match.
1716 2004-06-17 Jason Merrill <jason@redhat.com>
1719 * semantics.c (simplify_aggr_init_expr): Don't return the slot.
1720 (finish_stmt_expr_expr): Update type after conversions.
1721 (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
1722 Handle void initializer.
1723 * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
1725 2004-06-17 Geoffrey Keating <geoffk@apple.com>
1727 * class.c (build_clone): Don't call defer_fn, let mark_used do it.
1728 * cp-tree.h (defer_fn): Delete.
1729 * decl2.c (defer_fn): Delete.
1730 (finish_file): Simplify deferred_fns loops; check that
1731 only used inline functions get into deferred_fns.
1732 (mark_used): Inline previous contents of defer_fn.
1734 2004-06-16 Richard Henderson <rth@redhat.com>
1736 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
1737 (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
1738 * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
1739 of CTOR_INITIALIZER ...
1740 (pp_cxx_statement): ... here.
1741 * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
1742 (finish_function): Use alloc_stmt_list to zap entire function.
1743 * parser.c (cp_parser_compound_statement): Update commentary.
1744 * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
1745 * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
1746 (finish_stmt_expr): Don't look through COMPOUND_STMT.
1748 2004-06-16 Geoffrey Keating <geoffk@apple.com>
1750 * pt.c (mark_decl_instantiated): Don't call defer_fn.
1752 2004-06-16 Richard Henderson <rth@redhat.com>
1754 * parser.c (cp_parser_labeled_statement): Update commentary.
1755 * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
1756 * tree.c (mark_local_for_remap_r): Likewise.
1758 2004-06-16 Richard Henderson <rth@redhat.com>
1760 * parser.c (cp_parser_asm_definition): Update commentary.
1761 * pt.c (tsubst_expr): Use ASM_EXPR.
1762 * semantics.c (finish_asm_stmt): Likewise.
1764 2004-06-16 Richard Henderson <rth@redhat.com>
1766 * decl.c (finish_destructor_body): Use LABEL_EXPR.
1767 * parser.c (cp_parser_statement): Update commentary.
1768 * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
1769 * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
1770 * tree.c (mark_local_for_remap_r): Likewise.
1772 2004-06-16 Richard Henderson <rth@redhat.com>
1775 * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
1776 statement in FOR_INIT_STMT for templates.
1778 2004-06-15 Richard Henderson <rth@redhat.com>
1780 * call.c (initialize_reference): Don't build CLEANUP_STMT here.
1781 * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
1782 (genericize_try_block): Use gimplify_stmt.
1783 (genericize_catch_block, genericize_eh_spec_block): Likewise.
1784 (cp_gimplify_init_expr): Remove STMT_EXPR special case.
1785 (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
1786 * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
1787 (cp_tree_chain_matters_p): Remove.
1788 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
1789 (COMPOUND_STMT_BODY_BLOCK): New.
1790 (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
1791 (EXPR_STMT_STMT_EXPR_RESULT): New.
1792 (building_stmt_tree): Check cur_stmt_list.
1793 (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
1794 (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
1795 * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
1796 (cp_finish_decl): Use push_cleanup.
1797 (start_function, finish_function): Use statement lists.
1798 (finish_stmt): Do nothing.
1799 * except.c (begin_eh_spec_block): Use statement lists.
1800 (check_handlers_1, check_handlers): Likewise.
1801 * init.c (construct_virtual_base): Don't add extra compound stmts.
1802 (build_vec_init): Likewise.
1803 * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
1804 * name-lookup.h (struct cp_binding_level): Add statement_list.
1805 * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
1806 (cp_parser_labeled_statement, cp_parser_expression_statement,
1807 cp_parser_statement_seq_opt): Likewise.
1808 (cp_parser_compound_statement): Likewise. Take bool for try block.
1809 (cp_parser_selection_statement): Tidy if processing.
1810 (cp_parser_already_scoped_statement): Rewrite to do what it says.
1811 * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
1812 (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST.
1813 Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
1814 * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
1815 (finish_cond): New, rewritten from FINISH_COND.
1816 (simplify_loop_decl_cond): New.
1817 (finish_expr_stmt): Avoid nested EXPR_STMTs.
1818 (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
1819 begin_else_clause, finish_else_clause, finish_if_stmt,
1820 begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
1821 begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
1822 finish_for_cond, finish_for_stmt, begin_switch_stmt,
1823 finish_switch_cond, finish_switch_stmt, begin_try_block,
1824 finish_try_block, finish_cleanup_try_block, finish_function_try_block,
1825 finish_handler_sequence, finish_function_handler_sequence,
1826 begin_handler, finish_handler_parms, finish_handler,
1827 begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
1828 using statement lists.
1829 (begin_compound_stmt): Replace has_no_scope argument with flags.
1830 Update all callers. Use statement lists.
1831 (finish_compound_stmt): Likewise.
1832 (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
1833 (current_scope_stmt_stack): Remove.
1834 (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
1835 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
1836 Rewrite with statement lists.
1838 2004-06-15 Alexandre Oliva <aoliva@redhat.com>
1840 * parser.c: Change all assignments of c_lex_string_translate
1841 to true and false to 1 and 0.
1842 (cp_lexer_read_token): Convert type of the translated string.
1843 (cp_parser_skip_to_closing_parentheses): Preserve original
1844 value of c_lex_string_translate, and set it to -1 while
1846 (cp_parser_cache_group): Likewise.
1847 (cp_parser_cache_group_1): Renamed.
1848 (cp_parser_asm_operand_list): Remove redundant setting of
1849 c_lex_string_translate.
1850 (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
1851 Handle chained strings.
1853 2004-06-12 Andrew Pinski <apinski@apple.com>
1857 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
1859 * cp-tree.h: Fix typo.
1861 * cp-tree.h: Include cgraph.h
1862 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
1863 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
1865 2004-06-12 Jason Merrill <jason@redhat.com>
1867 PR tree-optimization/14107
1868 * decl.c (finish_function): Warn about no return in all functions.
1870 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
1872 * cp-tree.h (struct language_function): Remove cannot_inline.
1873 * decl.c (save_function_data): cannot_inline is no more.
1874 (cxx_push_function_context): Likewise.
1875 * decl2.c (start_objects, start_static_storage_duration_function):
1876 Reset DECL_INLINE, set DECL_UNINLINABLE.
1878 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1881 * search.c (lookup_field): Propagate the ambiguity list.
1882 (lookup_fnfields): Likewise.
1884 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1887 * parser.c (cp_parser_template_name): Ctors/dtors never need a
1888 template keyword to disambiguate.
1890 2004-06-14 Mark Mitchell <mark@codesourcery.com>
1893 * decl.c (grokdeclarator): Ignore pointer-to-members when
1894 computing template depth.
1897 * name-lookup.c (pushtag): Do not try to put class declarations in
1898 explicit specialization scopes.
1900 2004-06-11 Andrew Pinski <pinskia@physics.uc.edu>
1902 * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
1904 2004-06-11 Mark Mitchell <mark@codesourcery.com>
1907 * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
1908 bindings for undeclared built-ins.
1910 2004-06-11 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1912 * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
1913 appear at the correct location.
1915 2004-06-10 Jason Merrill <jason@redhat.com>
1919 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1920 * init.c (build_offset_ref): Build SCOPE_REF with non-null
1921 TREE_TYPE for non-dependent names.
1922 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
1923 unknown_type_node as its TREE_TYPE.
1924 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
1925 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
1926 (dump_expr) <SCOPE_REF case>: Likewise.
1928 2004-06-10 Mark Mitchell <mark@codesourcery.com>
1931 * parser.c (cp_parser_direct_declarator): Robustify.
1934 * pt.c (tsubst_copy): Use decl_constant_value on enumeration
1935 constants in non-dependent contexts.
1939 * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
1942 2004-06-10 Jakub Jelinek <jakub@redhat.com>
1945 * decl.c (duplicate_decls): Handle fileptr_type_node arguments
1948 2004-06-09 Mark Mitchell <mark@codesourcery.com>
1952 2004-06-07 Mark Mitchell <mark@codesourcery.com>
1953 * lex.c (handle_pragma_interface): Deprecate.
1954 (handle_pragma_implementation): Likewise.
1956 2004-06-09 Andrew Pinski <pinskia@physics.uc.edu>
1958 * g++spec.c (lang_specific_driver): Remove check for -lm
1959 and -lmath when check it see if it was the math library.
1961 2004-06-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1964 * parser.c (cp_parser_direct_declarator): Reject constructor named
1965 as qualified template-id.
1967 2004-06-07 Mark Mitchell <mark@codesourcery.com>
1970 * lex.c (handle_pragma_interface): Deprecate.
1971 (handle_pragma_implementation): Likewise.
1973 2004-06-07 Mark Mitchell <mark@codesourcery.com>
1976 * parser.c (cp_parser_iteration_statement): Fix typo in error
1980 * pt.c (tsubst_default_argument): Do not defer access checks
1981 while substituting into the default argument.
1984 * pt.c (tsubst_copy): Do not try to substitute for an enumeration
1985 constant in a non-dependent context.
1988 * except.c (build_throw): Ensure that temp_expr has been
1991 2004-06-06 Roger Sayle <roger@eyesopen.com>
1993 * cp/cp-tree.h (lvalue_or_else): Add function prototype.
1995 2004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1998 * parser.c (cp_parser_mem_initializer_id): Gracefully reject
1999 'typename', and accept 'template'.
2001 2004-06-03 Andrew Pinski <pinskia@physics.uc.edu>
2002 Jan Hubicka <jh@suse.cz>
2005 * method.c (use_think): Do not mark thunk as referenced.
2007 2004-06-03 Matt Austern <austern@apple.com>
2010 * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
2011 is nonzero, and if we see a noninline definition of a key method,
2012 make the vtables nonweak.
2014 2004-06-02 Matt Austern <austern@apple.com>
2016 * cp-tree.h (instantiate_decl): new boolean parameter,
2017 undefined_ok. Current behavior is equivalent to its being 0.
2018 * decl2.c (mark_used): Add new argument when calling instantiate_decl
2019 * pt.c (mark_decl_instantiated): Unconditionally make
2020 instantiations explicit unconditionally
2021 (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
2022 since mark_decl_instantiated now does it.
2023 (instantiate_class_member): New. Instantiate a member of an
2024 explicitly instantiated class template.
2025 (do_type_instantiation): Explicitly instantiate members of an
2026 explicitly instantiated class template.
2027 (instantiate_decl): if undefined_ok is nonzero, and if we're
2028 trying to explicitly instantiated a template with no definition,
2029 change it to an implicit instantiation.
2030 (instantiate_pending_templates): Add new argument to instantiate_decl.
2031 * tree.c (cp_cannot_inline_tree_fn): Likewise.
2033 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
2035 * cp-tree.h: Fix typo.
2037 * cp-tree.h: Include cgraph.h
2038 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
2039 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
2041 2004-06-01 Jason Merrill <jason@redhat.com>
2044 * call.c (call_builtin_trap): Remove type parm.
2045 (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
2046 (build_x_va_arg): Dereference a null pointer for a non-POD argument.
2048 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2051 * init.c (build_offset_ref): Build SCOPE_REF with non-null
2052 TREE_TYPE for non-dependent names.
2053 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
2054 unknown_type_node as its TREE_TYPE.
2055 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
2056 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
2057 (dump_expr) <SCOPE_REF case>: Likewise.
2059 2004-06-01 Richard Henderson <rth@redhat.com>
2060 Andrew Pinski <pinskia@physics.uc.edu>
2062 * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
2063 * parser.c (struct cp_parser): Remove in_offsetof.
2064 (cp_parser_new): Don't set it.
2065 (cp_parser_unary_expression): Don't check it.
2066 (cp_parser_postfix_open_square_expression): Split out from ...
2067 (cp_parser_postfix_expression): ... here.
2068 (cp_parser_postfix_dot_deref_expression): Likewise.
2069 (cp_parser_builtin_offsetof): New.
2070 (cp_parser_primary_expression): Use it.
2072 2004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2075 * parser.c (cp_parser_postfix_expression): Allow subscript
2076 operator in offsetof.
2078 2004-05-31 Mark Mitchell <mark@codesourcery.com>
2081 * friend.c (add_friend): Do not try to perform access checks for
2082 functions from dependent classes.
2084 2004-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
2086 * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
2087 (pp_cxx_begin_template_argument_list): Turn into a function.
2088 (pp_cxx_end_template_argument_list): Likewise.
2089 (pp_cxx_separate_with): Define.
2090 (pp_cxx_unqualified_id): Tidy.
2091 (pp_cxx_primary_expression): Likewise.
2092 (pp_cxx_postfix_expression): Likewise.
2093 (pp_cxx_expression): Likewise.
2094 (pp_cxx_simple_type_specifier): Likewise.
2095 (pp_cxx_type_specifier_seq): Likewise.
2096 (pp_cxx_parameter_declaration_clause): Likewise.
2097 (pp_cxx_exception_specification): Likewise.
2098 (pp_cxx_direct_declarator): Likewise.
2099 (pp_cxx_type_id): Likewise.
2100 * cxx-pretty-print.h (pp_cxx_whitespace): Export from
2102 (pp_cxx_left_paren): Likewise.
2103 (pp_cxx_right_paren): Likewise.
2104 (pp_cxx_left_brace): Likewise.
2105 (pp_cxx_right_brace): Likewise.
2106 (pp_cxx_left_bracket): Likewise.
2107 (pp_cxx_right_bracket): Likewise.
2108 (pp_cxx_dot): Likewise.
2109 (pp_cxx_identifier): Likewise.
2110 (pp_cxx_tree_identifier): Likewise.
2111 (pp_cxx_ampersand): New macro.
2112 (pp_cxx_star): Likewise.
2113 (pp_cxx_arrow): Likewise.
2114 (pp_cxx_semicolon): Likewise.
2115 (pp_cxx_complement): Likewise.
2116 (pp_cxx_begin_template_argument_list): Declaree.
2117 (pp_cxx_end_template_argument_list): Likewise.
2118 (pp_cxx_colon_colon): likewise.
2120 2004-05-31 Eric Botcazou <ebotcazou@libertysurf.fr>
2122 * parser.c (cp_parser_simple_type_specifier): Explicitly test
2125 2004-05-31 Kazu Hirata <kazu@cs.umass.edu>
2127 * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
2128 typeck.c: Fix comment formatting.
2130 2004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
2132 * cp-lang.c (cp_expand_decl): Remove.
2133 (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
2135 2004-05-30 Andreas Jaeger <aj@suse.de>
2137 * lang-specs.h: Add missing initializers for .ii.
2139 2004-05-28 Aldy Hernandez <aldyh@redhat.com>
2141 * decl.c (cp_make_fname_decl): Free return value from
2144 2004-05-28 Mark Mitchell <mark@codesourcery.com>
2147 * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
2149 * init.c (build_new): Likewise.
2152 * name-lookup.c (arg_assoc): Robustify.
2155 * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
2156 when determining the scope to use for a pointer to member.
2157 (lookup_anon_field): Give it external linkage.
2158 * cp-tree.h (lookup_anon_field): Declare it.
2159 * expr.c (cplus_expand_constant): Use it.
2161 2004-05-28 Mark Mitchell <mark@codesourcery.com>
2164 * parser.c (cp_parser_simple_type_specifier): Call
2165 maybe_note_name_used_in_class.
2167 2004-05-28 Tom Marshall <tmarshall@real.com>
2170 * class.c (finish_struct_1): Warn only if the dtor is non-private or
2171 the class has friends.
2173 2004-05-27 Adam Nemet <anemet@lnxw.com>
2176 * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
2177 TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
2179 2004-05-24 Geoffrey Keating <geoffk@apple.com>
2181 * method.c (implicitly_declare_fn): Don't call defer_fn; abort
2182 if it might be needed.
2183 * pt.c (mark_decl_instantiated): Only call defer_fn if
2184 the function actually needs processing in finish_file.
2185 * decl2.c (finish_file): Add check that elements in
2186 deferred_fns_used are really needed there. Remove unnecessary
2187 test of DECL_SAVED_TREE.
2189 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
2191 * Make-lang.in: No need to specify $(LIBCPP).
2193 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2196 * parser.c (cp_parser_class_head): Robustify.
2199 * parser.c (cp_parser_decl_specifier_seq): Correct error in
2201 (cp_parser_constructor_declarator_p): Treat attributes
2205 * typeck.c (build_unary_op): Do not attempt to resolve casts to
2206 base classes in templates.
2208 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2211 * pt.c (instantiate_template): Robustify.
2213 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2216 * decl.c (xref_tag): Issue errors about redeclaring template
2217 classes as non-template classes.
2219 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2222 * name-lookup.c (supplement_binding): Allow redefinitions of
2226 * parser.c (cp_parser_template_argument): Robustify.
2228 2004-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
2230 * class.c (alter_access): Use %E format specifier to print an
2231 identifier node. Avoid looking at the IDENTIFIER_POINTER.
2232 (push_lang_context): Likewise.
2233 * decl.c (lookup_label): Likewise.
2234 (grokdeclarator): Likewise.
2235 * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
2236 * pt.c (do_type_instantiation): Likewise.
2237 * tree.c (handle_java_interface_attribute): Likewise.
2238 (handle_com_interface_attribute): Likewise.
2239 (handle_init_priority_attribute): Likewise.
2241 2004-05-22 Mark Mitchell <mark@codesourcery.com>
2245 * pt.c (build_non_dependent_expr): Expand the set of tree nodes
2246 recognized as overloaded functions.
2248 2004-05-22 Mark Mitchell <mark@codesourcery.com>
2251 * class.c (layout_nonempty_base_or_field): Do not try to avoid
2252 layout conflicts for unions.
2255 * typeck.c (build_x_unary_op): Instantiate template class
2256 specializations before looking for "operator &".
2259 * typeck.c (complete_type): Layout non-dependent array types, even
2263 * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
2266 2004-05-22 Roger Sayle <roger@eyesopen.com>
2268 * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
2269 returning when TREE_TYPE is error_mark_node.
2270 * typeck.c (require_complete_type): Return error_mark_node if
2271 value's type is an error_mark_node.
2273 2004-05-20 Andrew Pinski <pinskia@physics.uc.edu>
2275 * optimize.c (calls_setjmp_r): Remove.
2276 (calls_setjmp_p): Remove.
2277 * cp-tree.c (calls_setjmp_p): Remove.
2278 * decl.c (finish_function): Do not call calls_setjmp_p.
2280 2004-05-18 Zack Weinberg <zack@codesourcery.com>
2282 * decl.c (cp_finish_decl): Use mark_decl_referenced.
2283 * decl2.c (maybe_make_one_only): Likewise.
2284 * method.c (use_thunk): Likewise.
2286 2004-05-18 Jason Merrill <jason@redhat.com>
2288 * class.c (build_base_path): Tidy a bit.
2290 2004-05-14 Geoffrey Keating <geoffk@apple.com>
2292 * name-lookup.c (struct scope_binding): New.
2293 (EMPTY_SCOPE_BINDING): New.
2294 (lookup_using_namespace): Take a scope_binding instead of a
2296 (qualified_lookup_using_namespace): Likewise.
2297 (cxx_binding_clear): Delete.
2298 (do_nonmember_using_decl): Use a scope_binding instead of a
2300 (lookup_tag): Don't call select_decl.
2301 (ambiguous_decl): Don't return anything (and change callers to match).
2302 Take a scope_binding as the second parameter.
2303 (lookup_namespace_name): Use a scope_binding instead of a
2305 (unqualified_namespace_lookup): Likewise.
2306 (lookup_qualified_name): Likewise.
2307 (select_decl): Take a scope_binding instead of a cxx_binding.
2308 Use macros rather than hand-coding tests for type-ness.
2310 2004-05-13 Diego Novillo <dnovillo@redhat.com>
2312 * cp-gimplify.c: Rename from cp-simplify.c.
2313 * Make-lang.in, optimize.c: Update.
2315 2004-05-13 Diego Novillo <dnovillo@redhat.com>
2317 Merge from tree-ssa-20020619-branch. See
2318 ChangeLog.tree-ssa for details.
2320 * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
2321 cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
2322 expr.c, init.c, name-lookup.h, optimize.c, parser.c,
2323 pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
2325 * cp-mudflap.c: New file.
2326 * cp-simplify.c:: New file.
2328 2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2331 * decl2.c (check_classfn): For member templates, compare also the
2332 template parameters to match the declaration.
2333 * cp-tree.h: Adjust declaration of check_classfn.
2334 * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
2335 * friend.c (do_friend): Likewise.
2336 * pt.c (tsubst_friend_function): Likewise.
2338 2004-05-01 Zack Weinberg <zack@codesourcery.com>
2340 * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
2341 Instead, dig into the representation type to find the array bound.
2343 2004-04-30 Jason Merrill <jason@redhat.com>
2345 Refer to base members using COMPONENT_REFs where possible.
2346 * class.c (build_simple_base_path): New fn.
2347 (build_base_path): Use it for non-virtual base references.
2348 (layout_class_type): Change base fields to their real type
2349 after layout is done.
2350 * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
2351 * cp-lang.c (cxx_get_alias_set): Use it.
2353 2004-04-30 Kazu Hirata <kazu@cs.umass.edu>
2355 * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
2358 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2361 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
2362 used in integral constant expressions.
2364 2004-04-22 Mark Mitchell <mark@codesourcery.com>
2366 * init.c (build_aggr_init): Fix accidental use of C99 construct in
2369 * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
2371 * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
2372 * decl.c (reshape_init): Use it.
2373 * init.c (perform_member_init): Remove redundant condition.
2374 (build_aggr_init): Adjust to handle brace-enclosed initializers
2376 (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
2378 * parser.c (cp_parser_initializer_clause): Do not set
2379 TREE_HAS_CONSTRUCTOR on the initializer.
2380 * rtti.c (tinfo_base_init): Likewise.
2381 (generic_initializer): Likewise.
2382 (ptr_initializer): Likewise.
2383 (ptm_initializer): Likewise.
2384 (class_initializer): Likewise.
2385 (get_pseudo_ti_init): Likewise.
2386 * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
2388 2004-04-22 Alan Modra <amodra@bigpond.net.au>
2390 * name-lookup.c (anonymous_namespace_name): Make static.
2392 2004-04-19 Roger Sayle <roger@eyesopen.com>
2395 * class.c (build_base_path): Call fold whilst building the NULL
2396 pointer check expression trees.
2398 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
2400 * init.c (build_new_1): Don't use type size argument for Java
2401 _Jv_AllocObject call.
2403 2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
2405 * method.c (make_alias_for_thunk): Remove preprocessor guard on
2406 declaration and definition.
2408 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
2411 * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
2412 than ASM_OUTPUT_DEF.
2414 2004-04-08 Jakub Jelinek <jakub@redhat.com>
2416 * decl2.c (mark_used): Don't segfault if cfun != NULL but
2417 current_function_decl == NULL.
2419 2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
2422 * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
2425 2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2427 * init.c (decl_constant_value): Don't look at DECL_INITIAL
2429 * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
2430 or TREE_SIDE_EFFECTS of a type.
2432 2004-04-02 Nathan Sidwell <nathan@codesourcery.com>
2435 * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
2436 cv-qualifier unification.
2437 * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
2439 2004-04-02 Jan Hubicka <jh@suse.cz>
2441 * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
2442 * cp-tree.h (cp_update_decl_after_saving): Declare.
2443 * tree.c (cp_update_decl_after_saving): Define.
2445 2004-04-01 Mark Mitchell <mark@codesourcery.com>
2448 * typeck.c (get_delta_difference): Call fold before returning the
2451 2004-04-01 Richard Henderson <rth@redhat.com>
2454 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
2455 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
2457 2004-04-01 Mark Mitchell <mark@codesourcery.com>
2460 * name-lookup.c (maybe_push_cleanup_level): Robustify.
2462 2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2464 * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
2466 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2468 * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
2469 * class.c (check_bitfield_decl): Likewise.
2470 * cvt.c (type_promotes_to): Likewise.
2471 * decl.c (finish_enum): Likewise.
2472 * mangle.c (write_builtin_type): Likewise.
2473 * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
2474 * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
2475 (build_binary_op): Likewise.
2477 2004-03-31 Jan Hubicka <jh@suse.cz>
2479 * tree.h (optimize_function): Kill prototype.
2480 * optimize.c (dump_function, optimize_function, dump_finction): Kill.
2481 * semantics.c (expand_body): Kill.
2483 2004-03-30 Mark Mitchell <mark@codesourcery.com>
2486 * decl.c (start_decl_1): Do not decide whether or not to create a
2487 new cleanup level until after the type has been completed.
2490 * pt.c (tsubst_default_argument): Clear current_function_decl.
2492 2004-03-30 Zack Weinberg <zack@codesourcery.com>
2494 * name-lookup.c, parser.c: Use new shorter form of GTY markers.
2496 2004-03-29 Zack Weinberg <zack@codesourcery.com>
2498 * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
2499 is null, just print the literal name and return.
2501 2004-03-25 Kazu Hirata <kazu@cs.umass.edu>
2503 * cxx-pretty-print.c: Fix comment typos.
2505 2004-03-24 Kazu Hirata <kazu@cs.umass.edu>
2507 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
2510 2004-03-23 Ziemowit Laski <zlaski@apple.com>
2512 * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
2513 * mangle.c (write_type): Add call to 'mangle_fundamental_type'
2516 2004-03-23 Zack Weinberg <zack@codesourcery.com>
2518 PR 12267, 12391, 12560, 13129, 14114, 14133
2519 * cp-lang.c (c_reset_state): Delete.
2520 (push_file_scope, pop_file_scope): New stubs.
2521 * parser.c (c_parse_file): Call sorry() here if called more than once.
2523 2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2525 * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
2528 2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
2530 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
2532 2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
2534 * error.c (enum pad): Remove.
2535 (dump_qualifiers): Likewise.
2536 (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
2537 (dump_aggr_type): Likewise.
2538 (dump_type_suffix): Likewise.
2539 (dump_simple_decl): Likewise.
2540 (dump_function_decl): Likewise.
2541 (cv_to_string): Likewise.
2542 (dump_type_prefix): Likewise. Adjust return void.
2543 * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
2545 (pp_cxx_template_keyword_if_needed): Document.
2546 (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
2547 (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
2548 MUST_NOT_THROW_EXPR.
2550 2004-03-21 Mark Mitchell <mark@codesourcery.com>
2553 * decl.c (cp_finish_decl): Compute the size of arrays declared in
2554 templates, if their type is non-dependent.
2556 2004-03-19 Mark Mitchell <mark@codesourcery.com>
2558 * call.c (build_op_delete_call): Do not forget the placement
2559 arguments when iterating through mutiple delete operators.
2561 * cp-tree.h (svaed_scope): Remove last_parms.
2562 (NEW_DELETE_OPNAME_P): New macro.
2563 (last_function_parms): Remove.
2564 (do_friend): Adjust prototype.
2565 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
2566 using last_function_parms.
2567 (grokfndecl): Take the PARM_DECLs as an argument, rather than
2568 using last_function_parms.
2569 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
2570 for class-specific operator new and operator delete.
2571 (grok_op_properties): Do not look for allocation functions with
2573 (start_function): Use DECL_ARGUMENTS instead of
2574 last_function_parms.
2575 * decl.h (last_function_parms): Do not declare.
2576 * decl2.c (grokclassfn): Do not use last_function_parms.
2577 * friend.c (do_friend): Remove parmdecls parameter.
2578 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
2579 (pop_from_top_level): Do not restore it.
2580 * pt.c (check_explicit_specialization): Do not adjust
2581 last_function_parms.
2583 * name-lookup.c (do_local_using_decl): Create a local binding for
2584 types brought in via using declarations.
2586 * name-lookup.c (lookup_arg_dependent): Handle block-scope
2587 function declarations correctly.
2589 * semantics.c (finish_id_expression): Correct handling of
2590 conversion operators to dependent types.
2592 * typeck.c (lookup_destructor): Allow the use of destructors from
2595 2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2597 * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
2598 TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
2599 * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
2600 the field is named TEMPLATE_TYPE_PARM_INDEX.
2602 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2605 * parser.c (cp_parser_functional_cast): A cast to anything
2606 but integral or enumaration type is not an integral constant
2608 * pt.c (value_dependent_expression_p): Handle cast expressions
2609 without operands (such as "int()").
2611 2004-03-18 Mark Mitchell <mark@codesourcery.com>
2613 * semantics.c (finish_pseudo_destructor_expr): Allow differing
2614 cv-qualification between the type named by the
2615 pseudo-destructor-name and the object-type.
2617 * search.c (accessible_base_p): Handle non-proper bases.
2619 * name-lookup.c (do_nonmember_using_decl): If a using declaration
2620 refers to a single overloaded function, set the type of the
2622 * tree.c (lvalue_type): Simplify.
2623 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
2625 (build_unary_op): Handle OVERLOADs with known types.
2627 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
2630 * parser.c (cp_parser_postfix_expression): Handle the use of
2631 "typename" in non-dependent contexts. Convert appropriately when
2632 when using a qualified name after "->" or ".".
2634 * call.c (conditional_conversion): Honor the requirement that some
2635 conversions refer to the original object.
2637 2004-03-18 Mark Mitchell <mark@codesourcery.com>
2639 * call.c (build_conditional_expr): Do not call force_rvalue for
2640 operands of void_type when the conditional expression itself has
2642 * name-lookup.c (pushdecl): Don't consider a declaration of a
2643 function named "main" to be an overload of a type named "main".
2644 * parser.c (cp_parser_template_name): Perform name lookup when the
2645 template name is proceeded by "template" if the qualifying scope
2647 * typeck.c (composite_pointer_type_r): Correctly handle
2648 pointer-to-member types.
2649 (build_const_cast): Likewise.
2651 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2653 * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
2654 * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
2655 (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
2656 (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
2657 (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
2658 (TYPEOF_TYPE_EXPR): New macro.
2659 * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
2660 * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
2661 * pt.c (tsubst): Likewise.
2662 * semantics.c (finish_typeof): Likewise.
2663 * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
2664 and TEMPLATE_TYPE_PARM.
2665 * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
2666 (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
2668 2004-03-16 Mark Mitchell <mark@codesourcery.com>
2671 * cp-tree.h (build_new_op): Change prototype.
2672 (build_x_binary_op): Likewise.
2673 * call.c (build_new_op): Add overloaded_p parameter.
2674 * decl2.c (grok_array_decl): Adjust call to build_new_op.
2675 * parser.c (cp_parser_binary_expression): Note that uses of
2676 overloaded operators prevents an expression from being considered
2677 an integral constant.
2678 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
2680 * semantics.c (finish_call_expr): Likewise.
2681 * typeck.c (rationalize_conditional_expr): Likewise.
2682 (build_x_indirect_ref): Likewise.
2683 (build_x_binary_op): Likewise.
2684 (build_x_unary_op): Likewise.
2685 (build_x_compound_expr): Likewise.
2686 (build_modify_expr): Likewise.
2687 * typeck2.c (build_x_arrow): Likewise.
2689 2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
2691 * cp-lang.c, ptree.c: Update copyright.
2693 2004-03-13 Mark Mitchell <mark@codesourcery.com>
2696 * parser.c (cp_parser_non_integral_constant_expression): Encode
2697 more of the idiom that surrounded calls to this function within
2699 (cp_parser_primary_expression): Adjust accordingly.
2700 (cp_parser_postfix_expression): Likewise.
2701 (cp_parser_unary_expression): Likewise.
2702 (cp_parser_cast_expression): Likewise.
2703 (cp_parser_assignment_expression): Likewise.
2704 (cp_parser_expression): Likewise.
2705 (cp_parser_new_expression): Note that new-expressions are not
2706 allowed in integral constant expressions.
2707 (cp_parser_delete_expression): Likewise.
2709 2004-03-12 Matt Austern <austern@apple.com>
2711 * decl2.c (maybe_make_one_only): Look at
2712 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
2713 to make an explicit instantiation weak.
2714 * method.c (use_thunk): Make sure we call comdat_linkage
2716 * pt.c (do_type_instantiation): On systems where weak symbols
2717 don't go in a static archive's TOC, explicit instantiation of a
2718 class must imply *explicit* instantiation of its memeber.
2720 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
2722 * call.c, cp-tree.h, pt.c: Fix comment typos.
2724 2004-03-10 Mark Mitchell <mark@codesourcery.com>
2727 * decl.c (xref_tag): Disregard non-type declarations when
2728 looking up a tagged type.
2730 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
2733 * call.c (convert_like_real): Build a const qualified temporary,
2734 when testing ctor access.
2736 2004-03-09 Mark Mitchell <mark@codesourcery.com>
2738 * call.c (initialize_reference): Fix typo.
2740 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2743 * pt.c (determine_specialization): For member templates, match also
2747 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
2749 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
2751 2004-03-09 Mark Mitchell <mark@codesourcery.com>
2754 * call.c (initialize_reference): Handle initializers that are
2755 class-member access expressions applies to rvalues.
2757 2004-03-09 Mark Mitchell <mark@codesourcery.com>
2760 * name-lookup.c (supplement_binding): Ignore functions that are
2761 marked DECL_ANTICIPATED.
2763 2004-03-08 Mark Mitchell <mark@codesourcery.com>
2766 * class.c (check_field_decls): Complain about non-static data
2767 members of reference type in unions. Propagate
2768 CLASSTYPE_REF_FIELDS_NEED_INIT and
2769 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
2771 * init.c (perform_member_init): Complain about mbmers with const
2772 type that are not explicitly initialized.
2774 2004-03-08 Mark Mitchell <mark@codesourcery.com>
2776 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
2777 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
2778 (lang_identifier): Remove implicit_decl and error_locus.
2779 (IDENTIFIER_IMPLICIT_DECL): Remove.
2780 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
2781 (IDENTIFIER_ERROR_LOCUS): Likewise.
2782 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
2783 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
2784 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
2785 (implicitly_declare): Remove.
2786 * decl.c (warn_extern_redeclared_static): Remove check of
2787 IDENTIFIER_IMPLICIT_DECL.
2788 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
2789 (implicitly_declare): Remove.
2790 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
2791 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
2792 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
2793 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
2794 in the innermost scope, rather than at namespace scope.
2795 * name-lookup.c (push_local_binding): Give it external linkage.
2796 (pushdecl): Remove dead code.
2797 * name-lookup.h (push_local_binding): Declare it.
2798 * ptree.c (cxx_print_identifier): Don't print
2799 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
2800 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
2801 not IDENTIFIER_ERROR_LOCUS.
2802 * typeck.c (build_function_call): Remove dead code.
2804 2004-03-08 Jason Merrill <jason@redhat.com>
2807 * decl.c (xref_tag): Remove attribute handling.
2808 * cp-tree.h: Adjust prototype.
2809 * decl.c, parser.c, rtti.c: Adjust callers.
2810 * parser.c (cp_parser_class_head): Pass back attributes in the
2812 (cp_parser_class_specifier): Adjust.
2814 2004-03-08 Matt Austern <austern@apple.com>
2817 * name-lookup.c (add_decl_to_level): Add extern variables, as well
2818 as static, to static_decls array.
2820 2004-03-05 Jason Merrill <jason@redhat.com>
2822 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
2824 2004-03-04 Geoffrey Keating <geoffk@apple.com>
2826 * decl.c (grokfndecl): Update old incorrect comment.
2827 (grokvardecl): Diagnose C++ variables of type with no linkage.
2829 2004-03-01 Mark Mitchell <mark@codesourcery.com>
2832 * pt.c (build_non_dependent_expr): Do not create a
2833 NON_DEPENDENT_EXPR for a THROW_EXPR.
2835 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
2838 * error.c (dump_expr): Handle THROW_EXPR.
2840 2004-03-01 Mark Mitchell <mark@codesourcery.com>
2843 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
2844 lookup if ordinary name-lookup finds a non-function.
2845 * pt.c (tsubst_copy_and_build): Likewise.
2848 * parser.c (cp_parser_late_parsing_default_args): Check that there
2849 are no extra tokens after the end of the default-argument
2852 2004-03-01 Mark Mitchell <mark@codesourcery.com>
2855 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
2856 having C++ linkage for name-mangling purposes.
2859 * parser.c (cp_parser_direct_declarator): Recognize constructor
2860 declarators that use a template-id to name the class being
2864 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
2865 (tsubst_expr): Do not call tsubst_copy, even when
2866 processing_template_decl.
2868 2004-03-01 Jeff Law <law@redhat.com>
2870 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
2873 2004-02-29 Mark Mitchell <mark@codesourcery.com>
2876 * name-lookup.h (push_scope): Change prototype.
2877 * name-lookup.c (push_scope): Do not reenter the current class
2879 * decl.c (grokfndecl): Check return code from push_scope before
2881 * decl2.c (check_classfn): Likewise.
2882 * parser.c (cp_parser_conversion_function_id): Likewise.
2883 (cp_parser_init_declarator): Likewise.
2884 (cp_parser_direct_declarator): Likewise.
2885 (cp_parser_class_specifier): Likewise.
2886 (cp_parser_class_head): Likewise.
2887 (cp_parser_lookup_name): Likewise.
2888 (cp_parser_constructor_declarator_p): Likewise.
2889 * pt.c (instantiate_class_template): Likewise.
2890 (resolve_typename_type): Likewise.
2892 2004-02-29 Mark Mitchell <mark@codesourcery.com>
2895 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
2899 * class.c (update_vtable_entry_for_fn): Do not go through
2900 covariance machinery if the type returned by an overrider is the
2901 same as the original.
2903 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
2905 * call.c: Fix a comment typo.
2907 2004-02-27 Ziemowit Laski <zlaski@apple.com>
2909 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
2911 2004-02-26 Mark Mitchell <mark@codesourcery.com>
2914 * parser.c (cp_parser_parameter_declaration_list): Commit
2915 to fewer tentative parses.
2917 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2920 * pt.c (dependent_type_p_r): A template template parameter is a
2923 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2926 * mangle.c (write_template_arg_literal): Don't rely on identity for
2929 2004-02-24 Jason Merrill <jason@redhat.com>
2931 * tree.c (build_exception_variant): Use check_qualified_type.
2933 2004-02-23 Zack Weinberg <zack@codesourcery.com>
2934 Kazu Hirata <kazu@cs.umass.edu>
2936 * decl.c (cxx_init_decl_processing): Don't check
2937 flag_writable_strings.
2939 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
2942 * typeck.c (maybe_warn_about_returning_address_of_location):
2943 Change check for VAR_DECL to use DECL_P instead.
2945 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2948 * cvt.c (build_expr_type_conversion): Type must be complete before
2949 looking up for conversions.
2951 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2954 * name-lookup.c (arg_assoc_class): Don't look into template
2955 arguments if it is not a primary template.
2957 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
2960 * method.c (use_thunk): Always clone function argument tree.
2962 2004-02-20 Mark Mitchell <mark@codesourcery.com>
2965 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
2968 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
2969 for all type variants.
2971 2004-02-19 Mark Mitchell <mark@codesourcery.com>
2974 * decl.c (duplicate_decls): Return error_mark_node for invalid
2976 * name-lookup.c (push_namespace): Ignore the return value from
2978 * pt.c (push_template_decl_real): Robustify.
2981 * name-lookup.c (push_class_level_binding): Do not complain about
2982 adding a binding for a member whose name is the same as the
2983 enclosing class if the member is located in a base class of the
2986 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2989 * parser.c (cp_parser_new_expression): Parse an ill-formed
2990 direct-new-declarator after a parenthesized type-id to emit good
2993 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
2995 * cp-tree.def, cvt.c: Update copyright.
2997 2004-02-17 Mark Mitchell <mark@codesourcery.com>
3000 * cp-tree.h (abi_version_at_least): Remove.
3001 * mangle.c: Include flags.h.
3003 2004-02-15 Mark Mitchell <mark@codesourcery.com>
3006 * call.c (build_conditional_expr): Handle conversions between
3007 class types which result in differently cv-qualified type
3011 * class.c (delete_duplicate_fields_1): Remove.
3012 (delete_duplicate_fields): Likewise.
3013 (finish_struct_anon): Remove check for members with the same name
3014 as their enclosing class.
3015 (check_field_decls): Do not call duplicate_fields.
3016 * decl.c (grokdeclarator): Remove check for static data members
3017 with the same name as their enclosing class.
3018 * name-lookup.c (push_class_level_binding): Check for members with
3019 the same name as their enclosing class.
3021 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
3024 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
3026 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3029 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
3030 has full set of arguments.
3032 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3035 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
3037 2004-02-13 Mark Mitchell <mark@codesourcery.com>
3040 * cp-tree.h (delete_sanity): Change prototype.
3041 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
3042 Remove dead code. Adjust code to warn about deleting an array.
3043 * typekc.c (decay_conversion): Use build_address and build_nop.
3046 * search.c (accessible_p): Do not check access in thunks.
3049 * call.c (build_conditional_expr): Call force_rvalue on the
3050 non-void operand in the case that one result is a throw-expression
3051 and the other is not.
3053 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
3056 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
3057 the type name and look ahead for ::~, and bail out early with a
3058 better error message if the parse is going to fail.
3060 2004-02-12 Mark Mitchell <mark@codesourcery.com>
3062 * call.c (conversion_kind): New type.
3063 (conversion_rank): Likewise.
3064 (conversion): Likewise.
3065 (CONVERSION_RANK): New macro.
3066 (conversion_obstack): New variable.
3067 (obstack_initialized): Likewise.
3068 (z_candidate): Change type of convs and second_conv.
3069 (candidate_warning): New type.
3070 (IDENTITY_RANK): Remove.
3071 (EXACT_RANK): Likewise.
3072 (PROMO_RANK): Likewise.
3073 (STD_RANK): Likewise.
3074 (PBOOL_RANK): Likewise.
3075 (USER_RANK): Likewise.
3076 (ELLIPSIS_RANK): Likewise.
3077 (BAD_RANK): Likewise.
3078 (ICS_RANK): Likewise.
3079 (ICS_STD_RANK): Likewise.
3080 (ICS_USER_FLAG): Likewise.
3081 (ICS_ELLIPSIS_FLAG): Likewise.
3082 (ICS_THIS_FLAG): Likewise.
3083 (ICS_BAD_FLAG): Likewise.
3084 (NEED_TEMPORARY_P): Likewise.
3085 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
3086 (USER_CONV_CAND): Likewise.
3087 (USER_CONV_FN): Likewise.
3088 (conversion_obstack_alloc): New function.
3089 (alloc_conversion): Likewise.
3090 (validate_conversion_obstack): Likewise.
3091 (alloc_conversions): Likewise.
3092 (build_conv): Adjust to deal with new conversion data structures.
3093 (build_identity_conv): New function.
3094 (build_ambiguous_conv): Likewise.
3095 (standard_conversion): Adjust to deal with new conversion data
3097 (convert_class_to_reference): Likewise.
3098 (direct_reference_binding): Likewise.
3099 (reference_binding): Likewise.
3100 (implicit_conversion): Likewise.
3101 (add_candidate): Likewise.
3102 (add_function_candidate): Likewise.
3103 (add_conv_candidate): Likewise.
3104 (build_builtin_candidate): Likewise.
3105 (print_z_candidate): Likewise.
3106 (merge_conversion_sequences): Likewise.
3107 (build_user_type_conversion_1): Likewise.
3108 (build_user_type_conversion): Likewise.
3109 (build_new_function_call): Likewise.
3110 (build_object_call): Likewise.
3111 (conditional_conversion): Likewise.
3112 (build_conditional_expr): Likewise.
3113 (build_new_op): Likewise.
3114 (build_op_delete_call): Likewise.
3115 (convert_like_real): Likewise.
3116 (build_over_call): Likewise.
3117 (build_new_method_call): Likewise.
3118 (is_subseq): Likewise.
3119 (maybe_handle_implicit_object): Likewise.
3120 (maybe_handle_ref_bind): Likewise.
3121 (compare_ics): Likewise.
3122 (source_type): Likewise.
3123 (add_warning): Likewise.
3125 (can_convert_arg): Likewise.
3126 (can_convert_arg_bad): Likewise.
3127 (perform_implicit_conversion): Likewise.
3128 (perform_direct_initialization_if_possible): Likewise.
3129 (initialize_reference): Likewise.
3130 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
3131 * cp-tree.def (WRAPPER): Likewise.
3132 (IDENTITY_CONV): Remove.
3133 (LVALUE_CONV): Likewise.
3134 (QUAL_CONV): Likewise.
3135 (STD_CONV): Likewise.
3136 (PTR_CONV): Likewise.
3137 (PMEM_CONV): Likewise.
3138 (BASE_CONV): Likewise.
3139 (REF_BIND): Likewise.
3140 (USER_CONV): Likewise.
3141 (AMBIG_CONV): Likewise.
3142 (RVALUE_CONV): Likewise.
3143 * cp-tree.h (tree_wrapper): Remove.
3144 (WRAPPER_ZC): Remove.
3145 (lang_tree_node): Remove wrapper.
3146 (LOOKUP_SPECULATIVELY): Remove.
3147 (build_op_delete_call): Adjust prototype.
3148 (validate_conversion_obstack): Declare.
3149 (build_zc_wrapper): Remove.
3150 * cvt.c (convert_to_reference): Remove dead code.
3151 (ocp_convert): Likewise.
3152 * decl.c (redeclaration_error_message): Correct handling of
3154 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
3155 (cp_tree_node_structure): Remove WRAPPER case.
3156 * decl2.c (finish_file): Call validate_conversion_obstack.
3157 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
3158 (build_op_delete_call): Likewise.
3159 (build_x_delete): Likewise.
3160 (build_delete): Adjust call to build_op_delete_call.
3161 * pt.c (tsubst_friend_declaration): Adjust code to determine
3162 whether or not a friend template is a definition.
3163 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
3164 * tree.c (build_zc_wrapper): Remove.
3166 2004-02-12 Zack Weinberg <zack@codesourcery.com>
3168 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
3169 * cp-tree.h: Don't declare cxx_builtin_type_decls.
3170 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
3171 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
3173 2004-02-10 Mark Mitchell <mark@codesourcery.com>
3175 * typeck.c (lookup_destructor): Fix typo in error message.
3177 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
3179 * call.c, parser.c, tree.c: Fix comment typos.
3181 2004-02-07 Zack Weinberg <zack@codesourcery.com>
3184 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
3185 * decl.c (duplicate_decls, start_function): Likewise.
3187 2004-02-07 Zack Weinberg <zack@codesourcery.com>
3189 * name-lookup.c (pushdecl): Issue shadow warnings directly.
3190 * parser.c (free_parser_stacks): Delete.
3192 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
3194 * rtti.c: Update copyright.
3196 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3199 * decl.c (require_complete_types_for_parms): Do not insert
3200 error_mark_node in the parameter list.
3202 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3205 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
3206 error when terminator can not be found.
3208 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
3210 Make-lang.in (po-generated): Delete.
3212 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
3214 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
3215 targetm.calls.promote_prototypes.
3217 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3221 2004-01-15 Geoffrey Keating <geoffk@apple.com>
3223 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
3224 (handle_pragma_implementation): Likewise.
3226 2004-02-05 Mark Mitchell <mark@codesourcery.com>
3229 * typeck.c (lookup_destructor): Tweak error message.
3231 2004-02-05 Jan Hubicka <jh@suse.cz>
3233 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
3236 2004-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3239 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
3240 code, only emits the diagnostic now. Added lookup of the identifier
3241 and support for qualified ids.
3242 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
3243 Parse an (invalid) type name as id-expression within a declarator.
3244 (cp_parser_simple_declaration): Use it.
3245 (cp_parser_member_declaration): Likewise.
3246 (cp_parser_make_typename_type): New function. Handle errors through
3247 cp_parser_diagnose_invalid_typename.
3248 (cp_parser_elaborated_type_specifier): Use it.
3250 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3253 * call.c (convert_like_real): Use "converting" rather than
3254 "argument" as the descriptive keyword to
3255 dubious_conversion_warnings.
3256 * typeck.c (convert_for_assignment): Do not call
3257 dubious_conversion_warnings.
3259 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3262 * init.c (build_delete): Emit a more informative error message in
3263 case of an incomplete type, and on the correct source line.
3265 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
3267 * error.c, search.c: Update copyright.
3269 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3272 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
3273 linkage for the typeinfo name string.
3275 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3278 * cp-tree.h (fold_non_dependent_expr): New function.
3279 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
3280 (cp_parser_template_argument): Use fold_non_dependent_expr.
3281 (cp_parser_direct_declarator): Likewise.
3282 * pt.c (fold_non_dependent_expr): New function.
3283 (convert_nontype_argument): Use it.
3284 (tsubst_qualified_id): Simplify.
3285 (tsubst_copy_and_build): Likewise.
3287 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3289 * decl.c (cxx_push_function_context): Do not set
3290 current_function_is_thunk.
3291 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
3294 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3297 * pt.c (more_specialized_class): Increase processing_template_decl
3298 while partial ordering.
3300 2004-02-03 Mark Mitchell <mark@codesourcery.com>
3303 * decl.c (start_function): Do not call pushdecl for any
3304 instantiation or specialization of a primary template.
3306 2004-02-03 Mark Mitchell <mark@codesourcery.com>
3309 * parser.c (cp_parser_class_name): Robustify.
3312 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
3315 * semantics.c (finish_id_expression): Do not return an
3316 IDENTIFIER_NODE when lookup finds a PARM_DECL.
3318 2004-02-03 Mark Mitchell <mark@codesourcery.com>
3321 * pt.c (build_non_dependent_expr): Do not build
3322 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
3325 * semantics.c (finish_id_expression): Do not return an
3326 IDENTIFIER_NODE when lookup finds a VAR_DECL.
3329 * parser.c (cp_parser_simple_declaration): When skipping to the
3330 end of the statement swallow the terminating semicolon.
3332 2004-02-02 Mark Mitchell <mark@codesourcery.com>
3335 * init.c (build_offset_ref): Improve error recovery for invalid
3336 uses of non-static member functions.
3339 * cp-tree.h (cp_build_type_attribute_variant): New function.
3340 * class.c (build_clone): Use cp_build_type_attribute_variant.
3341 * decl.c (duplicate_decls): Likewise.
3342 * pt.c (copy_default_args_to_explicit_spec): Likewise.
3343 (tsubst_function_type): Likewise.
3344 * tree.c (build_exception_variant): Check attributes before
3345 concluding that two types are the same.
3346 (cp_build_type-attribute_variant): New method.
3347 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
3350 * call.c (convert_class_to_reference): Keep better track of
3351 pedantically invalid user-defined conversions.
3353 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3356 * pt.c (tsubst_qualified_id): Improved error message when a type
3357 is expected but not found.
3359 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
3361 * class.c: Fix comment typos.
3363 * error.c: Likewise.
3364 * parser.c: Likewise.
3366 * search.c: Likewise.
3367 * typeck.c: Likewise.
3369 2004-01-30 Richard Henderson <rth@redhat.com>
3372 * method.c (use_thunk): Don't force_target_expr for void thunks.
3373 * tree.c (build_target_expr_with_type): Assert non-void type.
3374 (force_target_expr): Likewise.
3376 2004-01-30 Michael Matz <matz@suse.de>
3378 * parser.c (cp_parser_labeled_statement): Accept case ranges.
3380 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3384 * decl.c (grokdeclarator): Check immediatly type completeness for
3385 non-dependent types.
3387 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3390 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
3391 a sizeof expression.block
3393 2004-01-29 Mark Mitchell <mark@codesourcery.com>
3396 * mangle.c (write_encoding): Correct encoding of member template
3399 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3401 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
3402 template name as it was `<::' (digraph typo).
3403 (cp_parser_nth_token_starts_template_argument_list_p): New function.
3404 (cp_parser_id_expression): Use it.
3405 (cp_parser_nested_name_specifier_opt): Likewise.
3406 (cp_parser_template_name): Likewise.
3407 (cp_parser_class_name): Likewise.
3408 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
3410 2004-01-28 Mark Mitchell <mark@codesourcery.com>
3413 * typeck.c (merge_types): Do not merge attributes into
3417 * parser.c (cp_parser_direct_declarator): Do not prevent
3418 backtracking inside a parenthesized declarator.
3419 (cp_parser_parameter_declaration): Fix typo in comment.
3421 2004-01-28 Jan Hubicka <jh@suse.cz>
3423 * semantics.c (expand_body) Do emit_associated_thunks before
3426 2004-01-27 Devang Patel <dpatel@apple.com>
3428 * name-lookup.c: Include "debug.h"
3429 (do_namespace_alias): Invoke debug_hooks to emit debug info
3430 for namespace alias.
3431 (do_local_using_decl): Invoke debug_hooks to emit debug info
3433 (do_class_using_decl): Same.
3434 (do_toplevel_using_decl): Same.
3435 (do_using_directive): Same.
3436 (cp_emit_debug_info_for_using): New function.
3437 * Make-lang.in (cp/parser.o): Depend on debug.h
3438 (cp/name-lookup.o): Same.
3440 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3442 * cp-tree.h (language_function, lang_type_header): Use
3444 * name-lookup.h (cp_binding_level): Likewise.
3446 2004-01-26 Mark Mitchell <mark@codesourcery.com>
3449 * semantics.c (finish_for_expr): Check for unresolved overloaded
3452 * class.c (add_method): Just check processing_template_decl to
3453 determine whether or not we are within a template.
3454 * decl2.c (maybe_retrofit_in_chrg): Likewise.
3455 * init.c (decl_constant_value): Check the type of the declaration,
3457 * name-lookup.c (maybe_push_to_top_level): Rename to ...
3458 (push_to_top_level): ... this.
3459 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
3460 * pt.c (push_template_decl_real): Reorder condition for speed.
3461 (convert_template_argument): Use dependency-checking functions in
3462 place of uses_template_parms.
3463 (lookup_template_class): Avoid calling uses_template_parms more
3465 (uses_template_parms): Reimplement, using dependency-checking
3467 (instantiate_class_template): Use push_to_top_level, not
3468 maybe_push_to_top_level.
3469 (type_unification_real): Simplify.
3470 (type_dependent_expression_p): Handle OFFSET_REFs and
3472 (any_dependent_template_arguments_p): Handle multiple levels of
3474 * semantics.c (expand_or_defer_fn): Do not check
3475 uses_template_parms for template instantiations.
3476 * typeck.c (comptypes): Avoid calling cp_type_quals.
3478 2004-01-25 Mark Mitchell <mark@codesourcery.com>
3481 * call.c (build_over_call): Do not convert arguments when
3482 processing a template.
3483 * pt.c (build_non_dependent_expr): Do not build a
3484 NON_DEPENDENT_EXPR for arithmetic constants.
3486 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3489 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
3490 returns a TYPE_DECL. no further lookup is required.
3491 * semantics.c (check_template_template_default_arg): A TYPE_DECL
3492 is invalid. Rework to give better diagnostics.
3494 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3497 * pt.c (instantiate_class_template): Add an error_mark_node
3499 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
3501 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
3504 * decl.c (finish_function): Move the call to
3505 finish_fname_decls below the call to
3506 finish_eh_spec_block.
3508 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
3510 * optimize.c, typeck2.c: Update copyright.
3512 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
3514 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
3515 init.c, mangle.c, typeck.c: Update copyright.
3517 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
3519 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
3521 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
3523 * Make-lang.in: Replace $(docdir) with doc.
3524 (c++.info, c++.srcinfo): Dummy entry.
3525 (c++.man, c++.srcman): New rules.
3526 (c++.install-man): Revamp rule.
3528 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
3530 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
3531 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
3532 immediate $(shell) instead of deferred backquote.
3534 2004-01-19 Mark Mitchell <mark@codesourcery.com>
3537 * parser.c (cp_parser_postfix_expression): When encountering
3538 incomplete type on left-hand side of "->" or ".", treat the entire
3539 expression as erroneous.
3542 * call.c (build_field_call): Remove.
3543 (n_build_method_call): Likewise.
3544 (build_method_call): Likewise.
3545 (build_new_method_call): Do not call build_field_call.
3546 * class.c (n_build_method_call): Remove.
3547 (print_class_statistics): Do not print it.
3548 * cp-tree.h (build_method_call): Remove declaration.
3549 (finish_object_call_expr): Likewise.
3550 (build_new_1): Do not use build_method_call.
3551 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
3552 when the function appearing on the right-hand-side of "." or "->"
3553 is not actually a function.
3554 * pt.c (tsubst_copy_and_build): Likewise.
3555 * semantics.c (finish_object_call_expr): Remove.
3557 2004-01-18 Mark Mitchell <mark@codesourcery.com>
3560 * pt.c (tsubst): Use finish_typeof.
3562 2004-01-18 Jason Merrill <jason@redhat.com>
3565 * except.c (build_throw): In a template, set
3566 current_function_returns_abnormally.
3568 2004-01-17 Fred Fish <fnf@intrinsity.com>
3571 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
3572 except don't call array_type_nelts() with a VECTOR_TYPE.
3574 2004-01-16 Jan Hubicka <jh@suse.cz>
3576 * mangle.c (write_mangled_name): Remove inline modifier.
3578 2004-01-16 Mark Mitchell <mark@codesourcery.com>
3581 * decl.c (compute_array_index_type): Fix grammar in comment.
3582 * init.c (build_zero_init): Handle zero-sized arrays correctly.
3585 * call.c (name_as_c_string): Print conversion operator names
3589 * call.c (initialize_reference): Pass -1 for inner parameter to
3592 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3595 * parser.c (cp_parser_base_specifier): Check for an invalid
3596 keyword `typename' and emit an user-friendly error message.
3598 2004-01-15 Geoffrey Keating <geoffk@apple.com>
3601 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
3602 (handle_pragma_implementation): Likewise.
3604 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3607 * typeck.c (build_class_member_access_expr): Allow to access members
3608 of the currently open class.
3609 (finish_class_member_access_expr): Likewise.
3611 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
3614 * name-lookup.c (validate_nonmember_using_decl): Take scope and
3615 name by value, instead of computing them.
3616 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
3617 arguments. Pass them to validate_nonmember_using_decl.
3618 * name-lookup.h (do_local_using_decl): Adjust.
3619 (do_toplevel_using_decl): Likewise.
3620 * parser.c (cp_parser_using_declaration): Likewise.
3621 * pt.c (tsubst_expr): Likewise.
3623 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
3627 * name-lookup.c (qualified_lookup_using_namespace): Search
3628 strongly-associated namespaces first, and only then try other
3631 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
3633 * Make-lang.in (c++.srcextra): Dummy entry.
3635 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3638 * parser.c (cp_parser_template_name): Don't try to parse a
3639 conversion-function-id, as it cannot be a template-name.
3640 (cp_parser_simple_type_specifier): Check for invalid template-ids
3641 even after a built-in type.
3643 2004-01-14 Jan Hubicka <jh@suse.cz>
3646 * pt.c (instantiate_decl): Do not increase function_depth.
3648 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
3652 * parser.c (cp_parser_elaborated_type_specifier): Warn about
3653 attributes and discard.
3654 * decl.c (xref_tag): Don't overwite existing attributes with
3657 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3660 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
3661 is no destructor while looking up a BIT_NOT_EXPR.
3663 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
3665 * cxxfilt.c: Remove unused file.
3667 2004-01-14 Jan Hubicka <jh@suse.cz>
3669 Partial fix to PR c++/12850
3670 * decl2.c (mark_used): Do not proactively instantiate templates
3671 when compiling in unit-at-a-time or not optimizing.
3672 * optimize.c (maybe_clone_body): Do not increase function depth.
3674 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3677 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
3679 2004-01-12 Steven Bosscher <stevenb@suse.de>
3682 * parser.c (cp_parser_member_declaration): Any non-type is also
3683 not a class or a function.
3685 2004-01-12 Jason Merrill <jason@redhat.com>
3688 * class.c (build_base_path): Do not mark vtable references as
3690 (build_vtbl_ref_1): Likewise.
3692 2004-01-12 Richard Henderson <rth@redhat.com>
3695 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
3696 (store_init_value): Use it.
3697 * decl.c (check_initializer): Expect full initialization code
3698 from store_init_value.
3699 * init.c (expand_aggr_init_1): Likewise.
3700 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
3702 2004-01-12 Mark Mitchell <mark@codesourcery.com>
3704 * class.c (layout_class_type): For non-POD class types, also copy
3705 the DECL_SIZE and DECL_MODE of fields to the base class type.
3707 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3710 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
3711 calling regenerate_decl_from_template.
3713 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
3716 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
3717 decl-specifier occurring along with a class definition.
3719 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
3721 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
3722 clauses to comments describing declares_class_or_enum.
3723 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
3726 2004-01-12 Jan Hubicka <jh@suse.cz>
3728 * pt.c (for_each_template_parm): Do not check for duplicates.
3729 (for_each_template_parm): Use walk_tree duplicate checking code.
3731 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
3734 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
3735 is error_mark_node, don't add any more decl_specs.
3736 (cp_parser_init_declarator): After committing to a declaration, if
3737 the decl_specifiers start with error_mark_node, issue an error and
3738 change the type to "int".
3740 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
3743 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
3745 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3749 * pt.c (tsubst): Substitution must fail if we are attempting to
3750 create an array with element type that is an abstract class type.
3751 * decl.c (cp_finish_decl): Strip pointers and array types recursively
3752 before calling abstract_virtuals_error.
3754 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
3756 * name-lookup.c (qualified_lookup_using_namespace): Consider
3757 strong using directives even if we've already found a binding.
3759 2004-01-09 Mark Mitchell <mark@codesourcery.com>
3761 * cp-tree.h (cxx_expand_expr): Change prototype.
3762 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
3764 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3767 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
3768 looking into them recursively. They can be there because of the
3769 new __offsetof__ extension.
3771 2004-01-07 Zack Weinberg <zack@codesourcery.com>
3773 * parser.c (cp_parser_save_member_function_body): Mark the
3776 2004-01-05 Mark Mitchell <mark@codesourcery.com>
3779 * class.c (build_clone): Copy type attributes from the original
3780 function to the clone.
3783 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
3784 references as constant.
3787 * parser.c (cp_parser_explicit_instantiation): Improve error
3789 (cp_parser_require): Improve indication of the error location.
3792 * parser.c (cp_parser_class_head): Reorder logic to check for
3793 invalid qualification.
3795 2004-01-04 Mark Mitchell <mark@codesourcery.com>
3798 * name-lookup.c (lookup_using_namespace): Remove spacesp
3800 (unqualified_namespace_lookup): Likewise.
3801 (lookup_qualified_name): Adjust accordingly.
3802 (lookup_name_real): Likewise.
3803 (lookup_arg_dependent): Do not eliminate the namespace of the
3804 functions found by unqualified name lookup unless that is the
3807 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
3809 * semantics.c (push_deferring_access_checks): Fix format.
3810 (resume_deferring_access_checks): Likewise.
3811 (stop_deferring_access_checks): Likewise.
3812 (pop_deferring_access_checks): Likewise.
3813 (get_deferred_access_checks): Likewise.
3814 (pop_to_parent_deferring_access_checks): Likewise.
3815 (perform_deferred_access_checks): Likewise.
3816 (perform_or_defer_access_check): Likewise.
3818 2004-01-04 Richard Henderson <rth@redhat.com>
3820 * call.c (build_over_call): Don't create a save_expr of an
3821 aggregate, but rather its address.
3823 2004-01-04 Mark Mitchell <mark@codesourcery.com>
3826 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
3827 an offsetof expression.
3829 * parser.c (cp_parser_parameter_declaration): Fix comment.
3832 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
3833 (reference_binding): Set it when appropriate.
3834 (build_temp): New function, split out from ...
3835 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
3836 (initialize_reference): Likewise.
3839 * parser.c (cp_parser): Add in_type_id_in_expr_p.
3840 (cp_parser_new): Initialize it.
3841 (cp_parser_postfix_expression): Set it.
3842 (cp_parser_sizeof_operand): Likewise.
3843 (cp_parser_parameteR_declaration): Do not commit early to tenative
3844 parsers when in_type_id_in_expr_p is set.
3846 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3849 * parser.c (cp_parser_template_argument): Don't call
3850 make_unbound_class_template directly.
3851 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
3852 UNBOUND_CLASS_TEMPLATE tree node.
3854 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
3857 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
3859 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3862 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
3863 (DECL_FUNCTION_TEMPLATE_P): Use it.
3864 (DECL_CLASS_TEMPLATE_P): Likewise.
3865 * parser.c (cp_parser_lookup_name): Add is_template parameter.
3866 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
3867 (cp_parser_template_name): Likewise.
3868 (cp_parser_elaborated_type_specifier): Likewise.
3869 (cp_parser_namespace_name): Likewise.
3870 (cp_parser_class_name): Likewise.
3871 (cp_parser_lookup_name_simple): Likewise.
3873 See ChangeLog.3 for earlier changes.