1 2004-08-04 Nathan Sidwell <nathan@codesourcery.com>
3 * decl.c (complete_array_type): Don't gratuitously copy
4 maxindex. Its type is always set.
6 2004-08-04 Paul Brook <paul@codesourcery.com>
8 * Make-lang.in (cp/semantics.o, cp/optimize.o): Depend on TARGET_H.
9 * cp-tree.h (struct language_function): Rename x_dtor_label to
11 (dtor_label): Rename ...
12 (cdtor_label): ... to this.
13 * decl.c (begin_constructor_body): Remove.
14 (check_special_function_return_type): Maybe change the return type.
15 (grokdeclarator): Pass the class type.
16 (start_preparsed_function): Constructors may need a return label.
17 (finish_constructor_body, finish_destructor_body): Set the return
19 (begin_function_body): Don't call begin_constructor_body.
20 (finish_function): Don't warn for constructors or destructors.
21 (implicitly_declare_fn): Maybe change the return type.
22 * optimize.c: Include target.h.
23 (maybe_clone_body): Remap the function result.
24 * semantics.c: Include target.h.
25 (finish_return_stmt): Maybe jump to return label for constructors.
27 2004-08-03 Mark Mitchell <mark@codesourcery.com>
29 * class.c (build_vtable): Do not set DECL_VISIBILITY here.
30 (check_field_decls): Or here.
31 (check_methods): Or here.
32 (initialize_array): Don't mess with DECL_CONTEXT.
33 * cp-tree.h (start_decl): Adjust prototype.
34 (determine_visibility): New function.
35 * decl.c (duplicate_decls): Remove checks for hidden "operator
37 (build_library_fn_1): Give all library functions default
39 (start_decl): Add pop_scope_p parameter. Tidy.
40 (cp_finish_decl): Do not pop scopes here. Call
41 determine_visibility for variable definitions.
42 (start_preparsed_function): Call determine_visibility.
43 * decl2.c (determine_visibility): New function.
44 * method.c (use_thunk): Fix formatting.
45 * parser.c (cp_parser_condition): Adjust calls to start_decl.
46 (cp_parser_init_declarator): Likewise.
47 * pt.c (instantiate_decl): Always call pop_nested_class.
48 * rtti.c (get_tinfo_decl): Do not set DECL_VISIBILITY.
49 (tinfo_base_init): Likewise.
51 2004-08-02 Mark Mitchell <mark@codesourcery.com>
54 * name-lookup.c (validate_nonmember_using_decl): Robustify.
56 2004-08-01 Mark Mitchell <mark@codesourcery.com>
59 * name-lookup.c (decl_namespace): Remove.
60 (current_decl_namespace): Use decl_namespace_context instead of
62 (push_decl_namespace): Likewise.
63 (arg_assoc_class): Likewise.
64 (arg_assoc_type): Likewise.
65 * pt.c (check_specialization_namespace): New function.
66 (maybe_process_partial_specialization): Use it.
67 (register_specialization): Likewise.
70 * cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): New macro.
71 * call.c (null_ptr_cst_p): Handle variables with constant
73 * pt.c (convert_nontype_argument): Use
74 DECL_INTEGRAL_CONSTANT_VAR_P.
75 * semantics.c (finish_id_expression): Likewise.
78 * decl.c (duplicate_decls): Reject duplicate namespace
82 * typeck.c (build_ptrmemfunc): Loosen assertion.
84 2004-08-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
86 * call.c (z_candidate::template_decl): Rename from template.
87 (add_template_candidate_real): Adjust member reference.
90 2004-07-29 Mark Mitchell <mark@codesourcery.com>
92 * cp-tree.h (IDENTIFIER_REPO_CHOSEN): Define.
93 (lang_decl_flags): Narrow the width of "languages". Add
95 (DECL_NEEDED_P): Remove.
96 (FOR_EACH_CLONE): New macro.
97 (DECL_REPO_AVAILABLE_P): Likewise.
98 (DECL_TINFO_P): Likewise.
99 (set_linkage_according_to_type): Declare.
100 (import_export_vtable): Remove.
101 (import_export_tinfo): Likewise.
102 (mark_needed): New function.
103 (decl_needed_p): Likewise.
104 (note_vauge_linkage_fn): Likewise.
105 (init_repo): Change prototype.
106 (repo_template_used): Remove.
107 (repo_template_instantiated): Likewise.
108 (repo_emit_p): New function.
109 (repo_export_class_p): Likewise.
110 (no_linkage_check): Change prototype.
111 * class.c (set_linkage_according_to_type): New function.
112 (build_vtable): Use it. Do not call import_export_vtable. Set
113 DECL_IGNORED_P if appropriate.
114 * decl.c (duplicate_decls): Preserve DECL_REPO_AVAILABLE_P.
115 (make_rtL_for_nonlocal_decls): Check for template instantiations
117 (grokfndecl): Adjust call to no_linkage_check.
118 (set_linkage_for_static_data_member): New function.
119 (grokvardecl): Use it. Adjust call to no_linkage_check.
120 (grokdeclarator): Use set_linkage_for_static_data_member.
121 * decl2.c (note_vague_linkage_fn): New function.
122 (note_vague_linkage_var): Likewise.
123 (finish_static_data_member_decl): Use it.
124 (import_export_vtable): Remove.
125 (import_export_class): Use repo_export_class_p.
126 (var_finalized_p): Simplify.
127 (maybe_emit_vtables): Simplify.
128 (mark_needed): New function.
129 (decl_needed_p): Likewise.
130 (import_export_decl): Add documentation and consistency checks.
131 Use repo_emit_p. Handle virtual tables and RTTI information
133 (import_export_tinfo): Remove.
134 (write_out_vars): Call import_export_decl.
135 (cxx_callgraph_analyze_expr): Ensure that all vtables are emitted
137 (finish_file): Use decl_needed_p. Do not call import_export_decl
138 for undefined static data members. Do not warn about undefined
139 inlines when using a repository.
140 (mark_used): Use note_vague_linkage_fn. Always defer template
142 * lex.c (cxx_init): Adjust call to init_repo. Always set
144 * method.c (synthesize_method): Remove unncessary
145 import_export_decl call.
146 (implicitly_declare_fn): Use set_linkage_according_to_type.
147 * optimize.c (maybe_clone_body): Use FOR_EACH_CLONE.
148 * pt.c (instantiate_class_template): Don't redundantly add classes
149 to keyed_classes. Don't call repo_template_used.
150 (tsubst_decl): Set DECL_INTERFACE_KNOWN for instantiations of
151 templates with internal linkage.
152 (check_instantiated_args): Adjust call to no_linkage_check.
153 (instantiate_template): Use FOR_EACH_CLONE.
154 (mark_definable): New function.
155 (mark_decl_instantiated): Use it.
156 (do_decl_instantiation): Adjust tests for explicit instantiation
157 after "extern template".
158 (instantiate_class_member): Do not use repo_template_instantiated.
159 (do_type_instantiation): Simplify.
160 (instantiate_decl): Use mark_definable. Check repo_emit_p.
162 * repo.c (repo_get_id): Remove.
163 (original_repo): Remove.
164 (IDENTIFIER_REPO_USED): Remove.
165 (IDENTIFIER_REPO_CHOSEN): Remove.
166 Remove all #if 0'd code.
167 (repo_template_used): Remove.
168 (repo_template_instantiated): Remove.
169 (temporary_obstack_initialized_p): New variable.
170 (init_repo): Register with lang_post_pch_load. Avoid creating
171 identifiers unnecessarily. Don't use original_repo. Close the
173 (reopen_repo_file_for_write): Not here.
174 (finish_repo): Always write out a new repository file.
175 (repo_emit_p): New function.
176 (repo_export_class_p): Likewise.
177 * rtti.c (get_tinfo_decl): Use set_linkage_according_to_type.
178 (involves_incomplete_p): New function.
179 (tinfo_base_init): Use it.
180 (ptr_initializer): Remove non_public_ptr parameter.
181 (ptm_initializer): Likewise.
182 (get_pseudo_ti_init): Likewise.
183 (unemitted_tinfo_decl_p): Remove.
184 (emit_tinfo_decl): Use import_export_decl.
185 * semantics.c (expand_body): Move updates of static_ctors and
187 (expand_or_defer_fn): ... here.
188 * tree.c (no_linkage_check): Add relaxed_p parameter.
190 2004-07-28 Eric Christopher <echristo@redhat.com>
192 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
194 2004-07-28 Nathan Sidwell <nathan@codesourcery.com>
196 * cp-tree.h (struct tree_pair_s): New.
197 (typedef tree_pair_p): New.
198 (DEF_VEC_O(tree_pair_s)): New.
199 (struct lang_type_class): Make vcall_indices a VEC(tree_pair_s).
200 (CLASSTYPE_VCALL_INDICES): Update documentation.
201 * class.c (get_vcall_index): Adjust.
202 (add_vcall_offset): Adjust.
204 2004-07-27 Kelley Cook <kcook@gcc.gnu.org>
206 * pt.c, typeck.c: Remove spurious carriage returns.
208 2004-07-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
211 * pt.c (coerce_template_template_parms) <PARM_DECL case>: Only check
212 when the type of ARG is not dependent.
214 2004-07-26 Geoffrey Keating <geoffk@apple.com>
216 * g++spec.c (LIBSTDCXX_PROFILE): Default to LIBSTDCXX.
217 (lang_specific_driver): If the C++ or math library options don't
218 start with '-l', don't count them as added libraries.
220 2004-07-26 Nathan Sidwell <nathan@codesourcery.com>
222 * decl.c (xref_basetypes): Adjust base access vector creation.
223 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Adjust base
225 * search.c (dynamic_cast_base_recurse, dfs_access_in_type): Likewise.
227 2004-07-26 Niall Douglas <s_fsfeurope2@nedprod.com>
228 Brian Ryner <bryner@brianryner.com>
232 * class.c (check_field_decls): Apply hidden visibility if
233 -fvisibility-inlines-hidden and inlined unless otherwise specified
234 (build_vtable): Set vtable visibility to class visibility.
235 (check_field_decls): Default static member visibility to class
237 (check_methods): Default method visibility to class visibility.
238 * cp-tree.h: Added CLASSTYPE_VISIBILITY and
239 CLASSTYPE_VISIBILITY_SPECIFIED macro.
240 * decl.c (duplicate_decls): New logic for merging definition decls
241 with declaration decls. Added ignore & warning when non default
242 applied to global operator new or delete.
243 * method.c, optimize.c, rtti.c: Added setting of VISIBILITY_SPECIFIED
244 wherever VISIBILITY was changed
245 * rtti.c (get_tinfo_decl): Set typeinfo visibility to class
247 (tinfo_base_init): Set typeinfo name visibility to class visibility.
249 2004-07-25 Bernardo Innocenti <bernie@develer.com>
251 * decl.c: Rename all identifiers named `class' to `cl'.
252 * cp-tree.h: Likewise.
254 2004-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
256 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Use GGC_CNEW.
257 * typeck2.c (abstract_virtuals_error): Use GGC_NEW.
258 * name-lookup.c (binding_entry_make): Use GGC_NEW.
259 (binding_table_construct): Use GGC_CNEWVEC.
260 (binding_table_new): Use GGC_NEW.
261 (cxx_binding_make): Likewise.
262 (begin_scope): Likewise.
263 (push_to_top_level): Use GCC_CNEW.
264 * parser.c (cp_token_cache_new): Likewise.
265 (cp_token_cache_push_token): Likewise.
266 (cp_lexer_new_main): Likewise.
267 (cp_lexer_new_from_tokens): Likewise.
268 (cp_parser_context_new): Likewise.
269 (cp_parser_new): Likewise.
270 (cp_lexer_new_from_tokens): Use GGC_NEWVEC.
271 * lex.c (cxx_make_type): Use GGC_CNEW.
272 (retrofit_lang_decl): Use GGC_NEWVAR.
273 (cxx_dup_lang_specific_decl): Likewise.
274 (copy_lang_type): Likewise.
275 * decl.c (use_label): Use GGC_NEW instead of ggc_alloc.
276 (save_function_data): Likewise.
277 (lookup_label): Use GGC_CNEW instead of ggc_alloc_cleared.
278 (cxx_push_function_context): Likewise.
280 2004-07-25 Richard Henderson <rth@redhat.com>
282 * decl.c (start_preparsed_function): Set DECL_ARTIFICIAL and
283 DECL_IGNORED_P on RESULT_DECL.
284 * semantics.c (finalize_nrv): Copy them too.
286 2004-07-23 Nathan Sidwell <nathan@codesourcery.com>
288 * search.c (lookup_conversion_operator): Avoid two loops.
289 (add_conversions): Remove.
290 (check_hidden_convs, split_conversions,
291 lookup_conversions_r): New.
292 (lookup_conversions): Use lookup_conversions_r.
294 2004-07-22 Nathan Sidwell <nathan@codesourcery.com>
296 * pt.c (get_template_base): Check type is completable.
298 2004-07-21 Eric Christopher <echristo@redhat.com>
300 * decl.c (poplevel): Inline unused variable checking.
303 2004-07-21 Paolo Bonzini <bonzini@gnu.org>
305 * typeck.c (build_binary_op): Do not use RDIV_EXPR for
308 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
311 * pt.c (check_explicit_specialization): Remove extension to accept
312 specializations without template headers. Fall-through to normal
315 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
318 * pt.c (determine_specialization): New parameter template_count.
319 Disambiguate between member templates and member functions counting
320 the template headers.
321 (check_explicit_specialization): Update caller.
322 (tsubst_friend_function): Likewise.
324 2004-07-20 Steven Bosscher <stevenb@suse.de>
326 * cp-tree.def (TINST_LEVEL): Make it an 'x' node.
327 * cp-tree.h (tinst_level_t): New tree type.
328 (union lang_tree_node): Handle it.
329 (TINST_LOCATION): New accessor macro.
330 (make_tinst_level): New prototype.
331 * cp-lang.c (cp_tree_size): Handle TINST_LEVEL.
332 * decl.c (cp_tree_node_structure): Likewise.
333 * error.c (print_instantiation_full_context): Use TINST_LOCATION.
334 (print_instantiation_partial_context): Likewise.
335 * pt.c (pop_tinst_level): Likewise.
336 (push_tinst_level): Use make_tinst_level.
337 * tree.c (make_tinst_level): New function.
338 (cp_walk_subtrees): Walk TINST_DECL for a TINST_LEVEL node.
340 2004-07-20 Mark Mitchell <mark@codesourcery.com>
342 * parser.c (cp_parser_simple_type_specifier): Fix typo.
345 * parser.c (cp_parser_simple_type_specifier): Do not record usage
346 of globally-qualified names.
348 2004-07-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
351 * error.c (dump_type) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Output
354 2004-07-19 Mark Mitchell <mark@codesourcery.com>
357 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
358 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
359 * class.c (add_implicitly_declared_members): Use
360 CLASSTYPE_LAZY_ASSIGNMENT_OP.
361 * method.c (lazily_declare_fn): Clear
362 CLASSTYPE_LAZY_ASSIGNMENT_OP.
363 * search.c (lookup_fnfields_1): Check it.
365 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
367 * cp-tree.h (vec_binfo_member): Remove.
368 * tree.c (vec_binfo_member): Remove.
370 * cp-tree.h (struct lang_type_class): Remove vfields field.
371 (CLASSTYPE_VFIELDS): Remove.
372 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
373 * class.c (determine_primary_base): Remove CLASSTYPE_VFIELDS
375 (dfs_modify_vtables): Use TYPE_CONTAINS_VPTR_P.
376 (finish_struct_1): Remove CLASSTYPE_VFIELDS handling.
377 * init.c (dfs_initialize_vtbl_ptrs): Use TYPE_CONTAINS_VPTR_P.
379 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
381 * cp-tree.h (DEF_VEC_P(tree)): Remove here.
382 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
384 (BINFO_LANG_SLOTS): Remove.
385 * tree.c (copy_binfo): Adjust BINFO creation and accessors.
386 * decl.c (xref_basetypes): Adjust BINFO creation and accessors.
387 * class.c (check_bases): Adjust BINFO accessors.
388 (determine_primary_base, finish_struct_bits,
389 maybe_warn_about_overly_private_class, warn_hidden,
390 walk_subobject_offsets, propagate_binfo_offsets, end_of_class,
391 warn_about_ambiguous_bases, get_vfield_name,
392 dump_class_hierarchy_r, build_vtt_inits, accumulate_vtbl_inits,
393 add_vcall_offset_vtbl_entries_r): Likewise.
394 * dump.c (cp_dump_tree): Likewise.
395 * init.c (sort_mem_initializers, expand_member_init, build_delete,
396 push_base_cleanups): Likewise.
397 * method.c (do_build_copy_constructor, do_build_assign_ref,
398 synthesize_exception_spec): Likewise.
399 name-lookup.c (arg_assoc_class): Likewise.
400 * pt.c (instantiate_class_template,
401 get_template_base_recursive): Likewise.
402 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Likewise.
403 * typeck2.c (process_init_constructor): Likewise.
404 * search.c (lookup_base_r, dynamic_cast_base_recurse,
405 dfs_access_in_type, dfs_walk_real, look_for_overrides,
406 types_overlap_p, copied_binfo, original_binfo): Likewise.
407 (binfo_for_vtable): Remove
409 2004-07-20 Steven Bosscher <stevenb@suse.de>
411 * cp-tree.h (struct lang_decl_flags): Unify the template_info and
412 thunk_alias, and the access and virtual_offset fields.
413 (THUNK_VIRTUAL_OFFSET, THUNK_ALIAS): Adjust.
414 * decl.c (finish_case_label): Update c_add_case_node call.
416 2004-07-19 Mark Mitchell <mark@codesourcery.com>
418 Revert patch for PR c++/16623.
420 2004-07-19 Kelley Cook <kcook@gcc.gnu.org>
422 * except.c: Remove two spurious carriage returns.
424 2004-07-19 Mark Mitchell <mark@codesourcery.com>
427 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
428 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
429 * class.c (add_implicitly_declared_members): Use
430 CLASSTYPE_LAZY_ASSIGNMENT_OP.
431 * method.c (lazily_declare_fn): Clear
432 CLASSTYPE_LAZY_ASSIGNMENT_OP.
433 * search.c (lookup_fnfields_1): Check it.
435 2004-07-19 Nathan Sidwell <nathan@codesourcery.com>
437 * class.c (add_method): Delay adding the slot until the end.
438 (determine_primary_base): Adjust VEC_iterate invokation.
439 (resort_type_method_vec, finish_struct_methods, warn_hidden,
440 walk_subobject_offsets, end_of_class, warn_about_ambiguous_bases,
441 build_vtbl_initializer): Likewise.
442 * init.c (sort_mem_initializers, build_delete, push_base_cleanups,
443 build_vbase_delete): Likewise.
444 * method.c (do_build_copy_constructor): Likewise.
445 * name-lookup.c (new_class_binding, print_binding_level,
446 poplevel_class, store_class_bindings, push_to_top_level,
447 pop_from_top_level): Likewise.
448 * pt.c (check_explicit_specialization): Likewise.
449 * search.c (lookup_conversion_operator, lookup_fnfields_1,
450 get_pure_virtuals, add_conversions, dfs_check_overlap,
451 binfo_for_vbase): Likewise.
453 2004-07-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
456 * pt.c (unify) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Use only
457 innermost set of template arguments during deduction. Simplify.
459 2004-07-19 Joseph S. Myers <jsm@polyomino.org.uk>
461 * typeck.c (build_modify_expr, build_x_modify_expr): Set
462 TREE_NO_WARNING on assignments with an operator other than '='.
464 2004-07-10 Steven Bosscher <stevenb@suse.de>
465 Joseph S. Myers <jsm@polyomino.org.uk>
467 * cp-tree.h (C_SET_EXP_ORIGINAL_CODE): Remove.
468 * decl2.c (grokfield): Don't check current_class_depth via
469 unused TREE_COMPLEXITY.
470 * semantics.c (finish_parenthesized_expr): Set TREE_NO_WARNING
471 to avoid the missing parentheses warning.
472 Don't set C_SET_EXP_ORIGINAL_CODE.
474 2004-07-18 Mark Mitchell <mark@codesourcery.com>
476 * tree.c (no_linkage_helper): Remove.
477 (no_linkage_check): Don't use walk_tree_without_duplicates.
479 * mangle.c (write_expression): Issue a sorry for zero-operand
482 2004-07-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
485 * init.c (build_offset_ref): Build SCOPE_REF with non-null
486 TREE_TYPE for non-dependent names.
487 * typeck.c (build_x_unary_op): Handle non-dependent SCOPE_REF.
488 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
489 unknown_type_node as its TREE_TYPE.
490 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
491 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
492 (dump_expr) <SCOPE_REF case>: Likewise.
494 2004-07-17 Jason Merrill <jason@redhat.com>
497 * call.c (type_passed_as): Make the invisible reference type
499 * cp-gimplify.c (gimplify_cleanup_stmt): Rename to
500 cp_genericize_r. Handle invisible reference lowering.
501 (is_invisiref_parm): New fn.
502 (cp_genericize): Adjust the types of invisible reference parms.
503 Don't repeat the walk for clones.
504 * decl.c (store_parm_decls): Don't generate any code for clones.
506 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
508 * cp-tree.h (builtin_function): Declare.
510 2004-07-16 Mark Mitchell <mark@codesourcery.com>
512 * class.c (finish_struct_methods): Remove unncessary code.
513 (add_implicitly_declared_members): Create declarations for default
514 constructors and copy constructors lazily.
515 * cp-tree.h (lang_type_class): Remove lazy_default_ctor and
517 (CLASSTYPE_LAZY_DEFAULT_CTOR): New macro.
518 (CLASSTYPE_LAZY_COPY_CTOR): Likewise.
519 * decl2.c (check_classfn): Robustify.
520 (locate_dtor): Handle empty CLASSTYPE_METHOD_VEC.
521 (locate_ctor): Handle lazy default constructors.
522 (locate_copy): Handle lazy copy constructors.
523 (implicitly_declare_fn): Make sure we're looking at the
524 TYPE_MAIN_VARIANT for a class before creating functions. Don't
525 set TYPE_HAS_CONSTRUCTOR.
526 (lazily_declare_fn): New function.
527 * name-lookup.c (constructor_name_full): Simplify.
528 * search.c (lookup_fnfields_1): Lazily create methods, as
530 (lookup_for_overrides): Handle empty CLASSTYPE_METHOD_VEC.
532 2004-07-16 Steven Bosscher <stevenb@suse.de>
534 * cp-tree.h (struct lang_type): Don't have three GTY options on a
537 2004-07-16 Richard Henderson <rth@redhat.com>
539 * cp-lang.c (LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING): Die.
540 * cp-tree.h (cp_copy_res_decl_for_inlining): Remove.
541 * tree.c (cp_copy_res_decl_for_inlining): Remove.
543 2004-07-16 Nathan Sidwell <nathan@codesourcery.com>
545 * class.c (finish_struct_bits): Use for loop.
546 (propagate_binfo_offsets): Do primary binfo outside of loop.
549 * dump.c (cp_dump_tree): Don't dump the bases if there's no
552 * pt.c (tsubst) <TREE_BINFO case>: We should never get here.
554 2004-07-15 Mark Mitchell <mark@codesourcery.com>
556 * cp-tree.h (lang_type_class): Remove has_real_assign_ref and
557 has_abstract_assign_ref. Make methods a VEC(tree) *.
558 (TYPE_HAS_CONST_ASSIGN_REF): Add documentation.
559 (CLASSTYPE_CONSTRUCTORS): Adjust for changes to CLASSTYPE_METHOD_VEC.
560 (CLASSTYPE_DESTRUCTORS): Likewise.
561 (TYPE_HAS_REAL_ASSIGN_REF): Remove.
562 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
563 (add_method): Change prototoype.
564 * class.c (add_method): Remove error_p parameter. Adjust for
565 changes to CLASSTYPE_METHOD_VEC.
566 (handle_using_decl): Adjust call to add_method.
567 (maybe_warn_about_overly_private_class): Adjust for
568 changes to CLASSTYPE_METHOD_VEC.
569 (resort_type_method_vec): Likewise.
570 (finish_struct_methods): Likewise.
571 (check_for_override): Likewise.
572 (warn_hidden): Likewise.
573 (add_implicitly_declared_members): Defer creation of assignment
574 operators. Adjust call to add_method.
575 (clone_function_decl): Adjust call to add_method.
576 (check_bases_and_members): Don't set TYPE_HAS_REAL_ASSIGN_REF.
577 (finish_struct_1): Use CLASSTYPE_DESTRUCTORS.
578 * decl.c (grok_special_member_properties): Don't set
579 TYPE_HAS_ABSTRACT_ASSIGN_REF.
580 * decl2.c (check_classfn): Adjust for
581 changes to CLASSTYPE_METHOD_VEC.
582 * method.c (locate_dtor): Use CLASSTYPE_DESTRUCTORS.
583 (locate_ctor): Use CLASSTYPE_CONSTRUCTORS.
584 (locate_copy): Adjust for changes to CLASSTYPE_METHOD_VEC.
585 (implicitly_declare_fn): Set DECL_SOURCE_LOCATION. Do not call
587 * pt.c (check_explicit_specialization): Adjust for
588 changes to CLASSTYPE_METHOD_VEC.
589 (instantiate_class_template): Do not set
590 TYPE_HAS_ABSTRACT_ASSIGN_REF.
591 * ptree.c (cxx_print_type): Don't try to print
592 CLASSTYPE_METHOD_VEC.
593 * rtti.c (emit_support_tinfos): Use CLASSTYPE_DESTRUCTORS.
594 * search.c (lookup_field_r): Adjust for
595 changes to CLASSTYPE_METHOD_VEC.
596 (lookup_fnfields): Likewise.
597 (lookup_conversion_operator): Likewise.
598 (lookup_fnfields_1): Likewise. Create assignment operators
600 (look_for_overrides_here): Adjust for
601 changes to CLASSTYPE_METHOD_VEC.
602 (add_conversions): Likewise.
603 * semantics.c (finish_member_declaration): Adjust call to add_method.
605 2004-07-15 Jason Merrill <jason@redhat.com>
607 * cp-lang.c (cxx_types_compatible_p): To the middle-end,
608 references and pointers are compatible.
610 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
612 * decl.c (xref_basetypes): Refactor.
613 * tree.c (copy_base_binfos): Replace with ...
614 (copy_binfo): ... this. Deep copy the given binfo, (not the just
615 bases of the given base).
616 * cp-tree.h (copy_base_binfo): Remove.
617 (copy_binfo): Declare.
619 2004-07-15 Mark Mitchell <mark@codesourcery.com>
621 * name-lookup.c (set_inherited_value_binding_p): Add class_type
623 (get_class_binding): Adjust.
624 (push_class_level_binding): Don't use set_inherited_value_binding_p.
626 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
628 * class.c (finish_struct_bits): Don't set TYPE_HAS_CONVERSION here.
629 * decl.c (xref_basetypes): Set it here.
631 * class.c (check_bases): Don't set CLASSTYPE_NON_AGGREGATE here.
632 Don't check for incomplete base.
633 (get_vfield_name): Simplify while loop.
634 * decl.c (xref_basetypes): Set CLASSTYPE_NON_AGGREGATE here.
636 2004-07-14 Mark Mitchell <mark@codesourcery.com>
638 * lex.c (cxx_make_type): Remove call to get_pointer_type.
640 * cp-tree.h (IDENTIFIER_VALUE): Remove.
641 (BINFO_PUSHDECLS_MARKED): Likewise.
642 (maybe_inject_for_scope_var): Likewise.
643 (push_class_decls): Likewise.
644 * name-lookup.h (push_class_binding): Remove.
645 (innermost_non_namespace_value): New function.
646 (outer_binding): Likewise.
647 * class.c (add_method): Push bindings before adding to
649 (restore_class_cache): Do not restore class_shadowed.
650 (pushclass): Do not add USING_DECLs. Do not call
652 * config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c.
653 * decl.c (pushdecl): Use outer_binding.
654 (poplevel): Set the scope for an out-of-scope for-loop declaration
656 (cp_finish_decl): Don't call maybe_inject_for_scope_var.
657 * name-lookup.c (new_class_binding): New function.
658 (push_binding): Use it.
659 (pushdecl): Use innermost_non_namespace_value.
660 (maybe_inject_for_scope_var): Remove.
661 (push_class_binding): Remove.
662 (set_inherited_value_binding_p): New function.
663 (get_class_binding): New function.
664 (push_class_level_binding): Assert that the current_class_type is
666 (outer_binding): New function.
667 (innermost_non_namespace_value): Likewise.
668 (lookup_name_real): Use outer_binding.
669 (lookup_name_current_level): Ignore out-of-scope variables.
670 * pt.c (check_template_shadow): Use innermost_non_namespace_value.
671 (lookup_template_class): Likewise.
672 * search.c (dfs_push_type_decls): Remove.
673 (dfs_push_decls): Likewise.
674 (setup_class_bindings): Likewise.
675 (lookup_field_1): Handle USING_DECLs from dependent scopes.
676 (marked_pushdecls_p): Remove.
677 (unmarked_pushdecls_p): Remove.
678 (marked_identifiers): Remove.
679 (setup_class_bindings): Remove.
680 (dfs_push_type_decls): Remove.
681 (dfs_push_decls): Remove.
682 (push_class_decls): Remove.
684 2004-07-13 Mark Mitchell <mark@codesourcery.com>
688 * decl.c (grokvardecl): Make declspecs parameter const.
689 (grokdeclarator): Likewise. Adjust accordingly.
690 * decl.h (grokdeclarator): Adjust declaration.
691 * parser.c (cp_parser_init_declarator): Do not clear
692 decl_specifiers->attributes.
694 * cp-tree.h (lang_identifier): Remove class_value.
695 (IDENTIFIER_CLASS_VALUE): Remove.
696 (pop_class_decls): Likewise.
697 (init_search_processing): Likewise.
698 * class.c (handle_using_decl): Use lookup_member, not
699 IDENTIFIER_CLASS_VALUE.
700 (restore_class_cache): New function, split out from ...
701 (pushclass): ... here. Do not call clear_identifier_class_values.
702 (invalidate_class_lookup_cache): Do not clear
703 IDENTIFIER_CLASS_VALUE.
704 (popclass): Do not call pop_class_decls.
705 (maybe_note_name_used_in_class): Do not save names looked up after
706 the class is complete. Use lookup_member, not
707 IDENTIFIER_CLASS_VALUE.
708 * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
709 * decl.c (cxx_init_decl_processing): Do not call
710 init_search_processing.
711 * method.c (do_build_copy_constructor): Remove unnecessary code.
712 (do_build_assign_ref): Likewise.
713 * name-lookup.c (pushdecl): Use lookup_member, not
714 IDENTIFIER_CLASS_VALUE.
715 (set_identifier_type_value_with_scope): Set TREE_TYPE on the
717 (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
718 (push_class_binding): Do not set it.
719 (clear_identifier_class_values): Remove.
720 (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
721 (store_binding): Do not save it.
722 (pop_from_top_level): Do not restore it.
723 * name-lookup.h (cxx_saved_binding): Remove class_value.
724 (clear_identifier_class_values): Remove.
725 * ptree.c (cxx_print_identifier): Do not print
726 IDENTIFIER_CLASS_VALUE.
727 * search.c (search_obstack): Remove.
728 (push_stack_level): Remove.
729 (pop_stack_level): Remove.
730 (search_level): Remove.
731 (search_stack): Remove.
732 (lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
733 (setup_class_bindings): Use IDENTIFIER_MARKED, not
734 IDENTIFIER_CLASS_VALUE.
735 (marked_identifiers): New variable.
736 (push_class_decls): Clear IDENTIFIER_MARKED.
737 (pop_class_decls): Don't call pop_search_level.
738 (init_search_processing): Remove.
740 2004-07-12 Mark Mitchell <mark@codesourcery.com>
742 * cp-tree.h (get_aggr_typedef): Remove.
743 * init.c (get_aggr_typedef): Likewise.
745 * name-lookup.c (push_class_level_binding): Simplify.
747 2004-07-12 Andrew Pinski <apinski@apple.com>
751 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
753 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
756 2004-07-12 Eric Christopher <echristo@redhat.com>
758 * parser.c (cp_parser_class_head): Remove unused variable.
760 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
762 * decl.c (grok_op_properties): Reject [de-]allocation functions
763 declared in a namespace, or declared as static.
765 2004-07-12 Nathan Sidwell <nathan@codesourcery.com>
767 * cp-tree.h (make_binfo): Remove.
768 * decl.c (xref_basetypes): Use make_tree_binfo directly.
769 * tree.h (copy_base_binfos): Likewise.
770 (make_binfo): Remove.
772 * call.c (build_user_type_conversion_1, build_new_op,
773 check_constructor_callable, build_temp,
774 perform_direct_initialization_of_possible): Pass type directly to
775 lookup_fnfields & build_special_member_call.
776 (build_special_member_call): Accept a type, and complete it.
777 * class.c (finish_stuct_bits): Copy the BINFOs here.
778 * cvt.c (ocp_convert): Pass type directly to
779 build_special_member_call.
780 * decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
781 (xref_basetypes): Allocate the binfo here. Adjust.
782 * init.c (build_init, build_new_1): Pass type directly to
783 build_special_member_call.
784 * lex.c (cxx_make_type): Do not allocate binfo here.
785 * name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
786 * parser.c (cp_parser_class_head): Always call xref_basetypes.
787 * pt.c (instantiate_class_template): Likewise. Inhibit access
788 checking for template friends.
789 * ptree.c (cxx_print_type): Adjust record printing.
790 * search.c (lookup_base): When taking a type, complete it before
792 (lookup_member): Delay completing a type.
793 (push_class_decls): Don't walk an incomplete type.
794 (lookup_conversions): Likewise.
795 * semantics.c (finish_stmt_expr_expr): Pass type directly to
796 build_special_member_call.
797 * tree.c (copy_base_binfos): Adjust.
798 (make_binfo): Likewise.
799 * typeck.c (build_modify_expr): Pass type directly to
800 build_special_member_call.
801 * typeck2.c (process_init_constructor): Check a binfo exists.
802 (build_m_component_ref): Allow accessing an incomplete type.
803 (build_functional_cast): Pass type directly to
804 build_special_member_call.
806 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
809 * config-lang.in (gtfiles): Add typeck2.c.
810 * Make-lang.in: Tweak typeck2.c dependencies, and add rule for
812 * cp-tree.h: Declare complete_type_check_abstract.
813 * typeck2.c (pat_calc_hash, pat_compare,
814 complete_type_check_abstract): New functions.
815 (abstract_virtuals_error): If the type is abstract, register the
816 declaration within abstract_pending_vars for further checks.
817 Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
818 * decl.c (cp_finish_decl): Do not strip array types.
819 (create_array_type_for_decl): Check for abstractness of the element
821 (complete_vars): Call complete_type_check_abstract.
822 * class.c (finish_struct): Prepare a list of virtual functions for
823 template types, and call complete_vars on it to check for abstractness.
825 2004-07-12 Paolo Bonzini <bonzini@gnu.org>
827 PR tree-optimization/14107
828 * decl.c (finish_function): Remove temporary band-aid.
830 2004-07-11 Mark Mitchell <mark@codesourcery.com>
832 * call.c (build_operator_new_call): Avoid using push_to_top_level.
833 (build_new_op): Adjust call to lookup_function_nonclass.
834 * name-lookup.c (identifier_type_value): Adjust call to
836 (lookup_name_real): Add block_p parameter.
837 (lookup_name_nonclass): Adjust call to lookup_name_real.
838 (lookup_function_nonclass): Likewise.
839 (lookup_name): Likewise.
840 * name-lookup.h (lookup_name_real): Change prototype.
841 (lookup_name_nonclass): Likewise.
842 * parser.c (cp_parser_lookup_name): Likewise.
844 * cp-tree.h (saved_scope): Make old_bindings a vector.
845 (unuse_fields): Remove.
846 * name-lookup.h (cxx_saved_binding): Define it.
847 * class.c (pushclass): Don't use unuse_fields.
848 * name-lookup.c (cxx_saved_binding_make): Remove.
849 (store_binding): Add new bindings to a vector, using an
850 accumulator style, rather than adding them to a list.
851 (store_bindings): Adjust accordingly.
852 (store_class_bindings): Likewise.
853 (push_to_top_level): Likewise.
854 (pop_from_top_level): Likewise.
855 * optimize.c (maybe_clone_body): Must push_to_top_level and
856 pop_from_top_level calls outside of loop.
857 * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope
858 calls here from cp_parser_late_parsing_default_args.
859 (cp_parser_save_default_args): Record the class type in which the
860 function is declared.
861 (cp_parser_late_parsing_default_args): Do not call
862 push_nested_class/pop_nested_class.
863 * search.c (dfs_unuse_fields): Remove.
864 (unuse_fields): Remove.
866 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
868 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
869 LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
870 * cp-tree.h (poplevel): Declare.
872 * decl.c (set_block): Remove.
874 2004-07-10 Mike Stump <mrs@apple.com>
876 * decl2.c (import_export_class): Never export/import vtables
877 with inline key functions.
879 2004-07-09 Steven Bosscher <stevenb@suse.de>
881 * typeck.c (c_expand_asm_operands): Remove.
883 2004-07-09 Mike Stump <mrs@apple.com>
885 * typeck.c (build_class_member_access_expr): Skip null deref
886 warning when we don't dereference it.
888 2004-07-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
892 * class.c (check_field_decls): Improve -Weffc++ warning: do not
893 warn for pointers to functions/members, or for classes without
896 2004-07-08 Mark Mitchell <mark@codesourcery.com>
898 * name-lookup.h (struct cp_binding_level): Update documentation
901 2004-07-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
904 * typeck.c (check_return_expr): Improve -Weffc++ warning: handle
905 returning CALL_EXPR, and non-reference return type.
907 2004-07-08 Nathan Sidwell <nathan@codesourcery.com>
909 * name-lookup.c (push_binding): Use VEC_reserve.
911 2004-07-08 Richard Henderson <rth@redhat.com>
913 * cp-tree.h (expand_eh_spec_block): Remove.
915 2004-07-07 Mark Mitchell <mark@codesourcery.com>
917 * cp-tree.h (saved_scope): Remove x_previous_class_type and
918 x_previous_class_values; add x_previous_class_level.
919 (previous_class_type): Remove.
920 (previous_class_values): Remove.
921 (previous_class_level): New macro.
922 * class.c (pushclass): Restore the identifier cache more
924 (invalidate_class_lookup_cache): Use vector for class_shadowed and
925 previous_class_values.
926 * decl.c (poplevel): Likewise.
927 * name-lookup.c (cxx_binding_init): New function.
928 (cxx_binding_make): Use it.
929 (push_binding): For a binding in a class level, use a vector of
930 cp_class_binding nodes.
931 (push_binding_level): New function.
932 (begin_scope): Use it.
933 (leave_scope): Do not put class binding levels on the free list.
934 (print_binding_level): Adjust for the fact that class_shadowed is
936 (poplevel_class): Likewise.
937 (clear_identifier_class_values): Likewise.
938 (push_class_level_binding): Likewise.
939 (set_class_shadows): Remove.
940 (store_binding): New function.
941 (store_class_bindings): New function.
942 (push_to_top_level): Use store_class_bindings as appropriate.
943 (pop_from_top_level): Use previous_class_level, not
945 * name-lookup.h (cp_class_binding): New type.
946 (cp_binding_level): Use a vector object for class_shadowed.
947 (push_binding_level): Declare.
948 (set_class_shadows): Remove.
950 2004-07-07 Andrew Pinski <apinski@apple.com>
952 * class.c (instantiate_type): BUFFER_REF is dead.
953 * lex.c (init_operators): IN_EXPR is dead.
955 2004-07-07 Jason Merrill <jason@redhat.com>
958 * call.c (build_new_op): Give overload warnings for built-in
961 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
964 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
967 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
969 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
970 * class.c (build_primary_vtable, check_bases,
971 determine_primary_base, finish_struct_bits,
972 maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
973 get_basefndecls, warn_hidden, walk_subobject_offsets,
974 build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
975 layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
976 finish_struct_1, get_vfield_name, contains_empty_class_p,
977 dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
978 dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
979 add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
981 * decl.c (xref_basetypes): Likewise.
982 * dump.c (cp_dump_tree): Likewise.
983 * error.c (dump_expr): Likewise.
984 * init.c (sort_mem_initializers, expand_member_init,
985 push_base_cleanups): Likewise.
986 * method.c (do_build_copy_constructor, do_build_assign_reg,
987 synthesize_exception_spec): Likewise.
988 * name-lookup.c (arg_assoc_class): Likewise.
989 * pt.c (instantiate_class_template, tsubst,
990 get_template_base_recursive): Likewise.
991 * ptree.c (cxx_print_type): Likewise.
992 * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
993 * search.c (lookup_base_r, dynamic_cast_base_recurse,
994 dfs_access_in_type, access_in_type, lookup_field_queue_p,
995 bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
996 marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
997 dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
998 binfo_for_vtable, copied_binfo, original_binfo): Likewise
999 * tree.c (copy_base_binfos, make_binfo): Likewise.
1000 * typeck.c (commmon_base_type): Likewise
1001 * typeck2.c (process_init_constructor): Likewise
1003 2004-07-06 Joseph S. Myers <jsm@polyomino.org.uk>
1005 * decl.c (check_tag_decl): Name redeclared type in diagnostic.
1007 2004-07-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1010 * pt.c (convert_nontype_argument): Disallow conversions between
1011 different enumeration types.
1013 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
1015 * cp-tree.h (BINFO_MARKED): Remove.
1016 (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
1017 BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
1018 BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
1019 (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
1020 * class.c (build_base_path): Use BINFO_VIRTUAL_P.
1021 (mark_primary_bases, determine_primary_base, base_derived_from,
1022 dfs_find_final_overrider, dfs_find_final_overrider_q,
1023 dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
1024 dfs_modify_vtables, walk_subobject_offsets,
1025 layout_nonempty_base_or_field, build_base_field,
1026 build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
1027 end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
1028 finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
1029 build_ctor_vtbl_group, accumulate_vtble_inits,
1030 dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
1031 build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
1032 add_vcall_offset_vtbl_entries_1): Likewise.
1033 * decl.c (xref_basetypes): Incomming virtual base indicated by
1035 * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
1036 * init.c (finish_init_stmts, sort_mem_initializers,
1037 emit_mem_initializers, build_vtble_address, expand_member_init,
1038 push_base_cleanups): Likewise.
1039 * method.c (do_build_copy_constructor): Likewise.
1040 * pt.c (instantiate_class_template,
1041 get_template_base_recursive): Likewise.
1042 * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
1043 get_pseudo_ti_desc): Likewise.
1044 * search.c (lookup_base_r, dynamic_cast_base_recurse,
1045 binfo_from_vbase, binfo_via_virtual, copied_binfo,
1046 original_binfo): Likewise.
1047 * semantics.c (finish_base_specifier): Virtualness is indicated
1049 * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
1051 2004-07-06 Mark Mitchell <mark@codesourcery.com>
1054 2004-06-24 Jason Merrill <jason@redhat.com>
1056 * decl.c (grokparms): Give the PARM_DECL reference type if the
1057 parameter is passed by invisible reference.
1059 2004-07-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1061 * cp-lang.c (cp_var_mod_type_p): Add extra arg.
1062 * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
1063 * pt.c (check_instantiated_args, unify): Likewise.
1065 2004-07-05 Phil Edwards <phil@codesourcery.com>
1067 * Make-lang.in (check-c++, lang_checks): Add some comments.
1069 2004-07-05 Zack Weinberg <zack@codesourcery.com>
1071 * cp-mudflap.c: Delete file.
1072 * Makefile.in: Remove all references to cp-mudflap.o.
1074 2004-07-05 Zack Weinberg <zack@codesourcery.com>
1076 * decl.c (cxx_init_decl_processing): Call
1077 build_common_tree_nodes before creating the global NAMESPACE_DECL.
1079 2004-07-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1082 * call.c (build_operator_new_call): Look only at global scope.
1084 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
1086 * call.c (enforce_access): Expect TREE_BINFO.
1087 * class.c (binfo_ctor_vtable): Check TREE_BINFO.
1088 * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
1089 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
1091 (BINFO_LANG_ELTS): Remove.
1092 (BINFO_LANG_SLOTS): New.
1093 (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
1094 (CLASSTYPE_TEMPLATE_INFO): Adjust.
1095 * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
1096 * search.c (lookup_member): Check TREE_BINFO.
1097 * semantics.c (perform_or_defer_access_check): Likewise.
1098 (check_accessibility_of_qualified_id): Check
1099 deferred_access_no_check.
1100 * tree.c (make_binfo): Use make_tree_binfo.
1102 2004-07-04 Mark Mitchell <mark@codesourcery.com>
1104 * method.c (implicitly_declare_fn): Set linkage of generated
1107 2004-07-04 Richard Henderson <rth@redhat.com>
1109 * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
1111 2004-07-03 Scott Brumbaugh <scottb.lists@verizon.net>
1114 * name-lookup.c (push_class_level_binding): Don't pass a
1115 TREE_LIST of ambiguous names to check_template_shadow as it
1116 only handles declarations. Instead, pull the declaration
1119 2004-07-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1122 * pt.c (check_explicit_specialization): Clarify error message.
1124 2004-07-02 Richard Henderson <rth@redhat.com>
1126 * tree.c (cp_unsave_r): Update remap_save_expr call.
1128 2004-07-02 Mark Mitchell <mark@codesourcery.com>
1131 * mangle.c (write_template_arg): Correct mangling.
1134 * decl.c (grokdeclarator): Robustify.
1136 2004-07-01 Richard Henderson <rth@redhat.com>
1138 * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
1139 * method.c (synthesize_method): Don't clear_last_expr.
1140 * name-lookup.c (maybe_push_cleanup_level): Likewise.
1142 2004-07-01 Nick Clifton <nickc@redhat.com>
1144 * decl2.c (import_export_class): Invoke the
1145 import_export_class field in the gcc_target structure if it is not
1148 2004-06-30 Richard Henderson (rth@redhat.com>
1150 * decl.c (start_preparsed_function): Don't set immediate_size_expand.
1151 * method.c (use_thunk): Likewise.
1153 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
1155 * call.c (build_over_call), typeck.c (build_function_call): Call
1156 check_function_arguments instead of check_function_format.
1158 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
1160 * call.c (build_over_call), typeck.c (build_function_call): Update
1161 calls to check_function_format.
1163 2004-06-30 Richard Henderson <rth@redhat.com>
1165 * call.c (build_over_call): Use __builtin_memcpy for copying
1166 CLASS_AS_BASE rather than funny casting.
1168 2004-06-30 Richard Henderson <rth@redhat.com>
1170 * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
1171 TYPE_SIZE_UNIT of full_type.
1173 2004-06-30 Per Bothner <per@bothner.com>
1175 Conditionally compile support for --enable-mapped_location.
1176 * decl.c (pop_label): Handle (imperfectly) USE_MAPPED_LOCATION case.
1177 * decl2.c: If USE_MAPPED_LOCATION, don't do some line number
1178 adjustments - which I don't understand.
1179 * error.c (dump_decl): Rename "<interrnal>" to "<built-in>".
1180 * error.c: Use LOCATION_FILE and EXPR_LOCATION macros.
1181 (print_instantiation_partial_context): Use expand_location.
1182 * decl.c (duplicate_decl): Use new DECL_IS_BUILTIN macro.
1183 * name-lookup.c: Likewise.
1184 * lex.c (cxx_init): Likewise. Also use BUILTINS_LOCATION.
1185 * name-lookup.c: Use input_line macro.
1186 * parser.c (cp_lexer_get_preprocessor_token): Use UNKNOWN_LOCATION.
1187 (cp_parser_statement): Rename locaal variable statement_locus to
1188 statement_location and use SET_EXPR_LOCATION macro.
1189 * pt.c: Handle USE_MAPPED_LOCATION case. Use new macros.
1190 * tree.c (cp_walk_subtrees): Likewise.
1192 2004-06-29 Per Bothner <per@bothner.com>
1194 * tree.c (build_min_nt, build_min, build_min_non_dep):
1195 Don't set TREE_COMPLEXITY from input_line.
1197 2004-06-29 Paul Brook <paul@codesourcery.com>
1199 * init.c: Include target.h.
1200 (get_cookie_size): Remove and replace with target hook.
1202 (build_new_1): Store the element size in the cookie.
1204 2004-06-29 Nathan Sidwell <nathan@codesourcery.com>
1207 * parser.c (cp_parser_template_declaration_after_export): Disable
1208 access checks here ...
1209 (cp_parser_class_specifier): ... not here.
1211 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1213 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
1214 VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
1215 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
1218 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1220 * cp-tree.h (struct deferred_access): Move to ...
1221 * semantics.c (struct deferred_access): ... here. Adjust.
1222 (deferred_access_stack): Make a VEC(deferred_access),
1223 (deferred_access_free_list): Remove.
1224 (deferred_access_no_check): New.
1225 (push_deferring_access_checks, resume_deferring_access_checks,
1226 stop_deferring_access_checks, pop_deferring_access_checks,
1227 get_deferred_access_checks, pop_to_parent_deferring_access_checks,
1228 perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
1230 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1233 * call.c (build_temp): Declare.
1234 (check_constructor_callable): New.
1235 (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
1236 CONSTRUCTOR_CALLABLE.
1237 (convert_like_real, initialize_reference): Use
1238 check_constructor_callable.
1239 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
1240 (LOOKUP_*): Renumber.
1242 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1244 * friend.c (add_friend): Only perform access checks when context
1246 * lex.c (cxx_make_type): Only create a binfo for aggregate types.
1247 * parser.c (cp_parser_class_specifier): Disable access checks here
1248 when parsing the body of a templated class.
1249 * semantics.c (perform_or_defer_access_checks): Reorder to allow
1250 NULL binfos when not checking access.
1252 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1254 Use vector API for vbase list.
1255 * cp-tree.h: Include vec.h
1256 (DEF_VEC_P (tree)): New type.
1257 (struct lang_type_class): Change vbase's member type.
1258 (binfo_for_vbase): Declare.
1259 * class.c (determine_primary_base, base_derived_from,
1260 update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
1261 warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
1262 build_vtbl_initializer): Adjust.
1263 * decl.c (xref_basetypes): Adjust, accumulate upper bound of
1265 * init.c (sort_mem_initializers, expand_member_init,
1266 push_base_cleanups): Adjust.
1267 * method.c (do_build_copy_constructor): Adjust.
1268 * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
1269 (binfo_for_vbase): New.
1270 * tree.c (copy_base_binfos): Adjust.
1272 2004-06-28 Mark Mitchell <mark@codesourcery.com>
1274 * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
1276 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
1279 * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
1280 paranthesis in case of pointers to array members.
1281 * error.c (dump_type_prefix): Likewise.
1282 (dump_type_suffix): Maybe issue a whitespace when printing
1285 2004-06-27 Mark Mitchell <mark@codesourcery.com>
1288 * parser.c (cp_parser_set_decl_spec_type): Refine test for
1289 redefinition of built-in types.
1291 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
1293 * error.c (pp_template_argument_list_start): Remove.
1294 (pp_template_argument_list_end): Likewise.
1295 (pp_separate_with_comma): Use pp_cxx_separate_with.
1296 (reinit_global_formatting_buffer): Remove.
1297 (pp_non_consecutive_character): Likewise.
1298 (dump_scope): Use pp_cxx_colon_colon.
1299 (dump_template_parameter): Use pp_cxx_identifier,
1300 pp_cxx_tree_identifier and pp_cxx_whitespace.
1301 (dump_templat_bindings): Replace use of pp_string with sequence
1302 of pp_cxx_whitespace and pp_equal.
1303 (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
1304 pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set
1306 (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
1307 (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace,
1308 pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
1309 (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
1310 pp_cxx_right_bracket, pp_cxx_identifier throughout,
1311 (dump_decl): Likewise.
1312 (dump_template_decl): Likewise.
1313 (dump_function_decl): Likewise. Set padding as appropriate.
1314 (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
1316 (dump_exception_spec): Likewise.
1317 (dump_function_name): Use pp_cxx_tree_identifier and
1319 (dump_template_parms): Use pp_cxx_begin_template_argument_list and
1320 pp_cxx_end_template_argument_list.
1321 (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
1322 pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
1323 pp_cxx_whitespace throughout.
1324 (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
1326 (dump_unary_op): Likewise.
1327 (reinit_cxx_pp): New function.
1328 (type_as_string); Use it.
1329 (expr_as_string): Likewise.
1330 (decl_as_string); Likewise.
1331 (context_as_string): Likewise.
1332 (lang_decl_name): Likewise.
1333 (decl_to_string): Likewise.
1334 (expr_to_string): Likewise.
1335 (parm_to_string): Likewise.
1336 (type_to_string): Likewise.
1337 (args_to_string): Likewise.
1338 (cv_to_string): Likewise.
1340 2004-06-26 Mark Mitchell <mark@codesourcery.com>
1342 * cp-tree.h (cp_cv_quals): New type.
1343 (cp_declarator): Use it instead of "tree" as appropriate.
1344 (grok_method_quals): Adjust prototype.
1345 (grokclassfn): Likewise.
1346 (do_friend): Likewise.
1347 * decl.c (grokfndecl): Use cp_cv_quals, not tree.
1348 (grokdeclarator): Likewise.
1349 * decl2.c (grok_method_quals): Likewise.
1350 (grokclassfn): Likewise.
1351 * friend.c (do_friend): Likewise.
1352 * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
1353 * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
1354 (make_pointer_declarator): Likewise.
1355 (make_reference_declarator): Likewise.
1356 (make_ptrmem_declarator): Likewise.
1357 (cp_parser_ptr_operator): Likewise.
1358 (cp_parser_cv_qualifier_seq_opt): Likewise.
1359 (cp_parser_cv_qualifier_opt): Remove.
1360 (cp_parser_new_declarator_opt): Adjust call to
1361 cp_parser_ptr_operator.
1362 (cp_parser_conversion_declaration_opt): Likewise.
1363 (cp_parser_declarator): Use cp_cv_quals, not tree.
1364 (cp_parser_direct_declarator): Likewise.
1366 2004-06-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1368 * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
1369 Rename DECL_STMT to DECL_EXPR.
1370 * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
1371 * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
1372 * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
1374 2004-06-26 Jan Hubicka <jh@suse.cz>
1377 * decl2.c (maybe_emit_vtables): Always import_export_vtable for the
1378 reachability analysis.
1380 2004-06-25 Mark Mitchell <mark@codesourcery.com>
1382 * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
1385 2004-06-25 Paul Brook <paul@codesourcery.com>
1387 * decl2.c (get_guard): Call targetm.cxx.guard_type.
1388 (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
1390 2004-06-24 Mark Mitchell <mark@codesourcery.com>
1392 * decl.c (grokdeclarator): Restore error messages about __thread.
1393 * parser.c (cp_parser_decl_specifier_seq): Likewise.
1395 2004-06-24 Jason Merrill <jason@redhat.com>
1398 * decl.c (grokparms): Give the PARM_DECL reference type if the
1399 parameter is passed by invisible reference.
1401 2004-06-24 Andreas Schwab <schwab@suse.de>
1403 * cp-tree.h (enum cp_storage_class): Remove trailing comma.
1405 2004-06-23 Mark Mitchell <mark@codesourcery.com>
1407 * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
1408 (cp/decl.o): Likewise.
1409 (cp/decl2.o): Likewise.
1410 (cp/pt.o): Likewise.
1411 (cp/semantics.o): Likewise.
1412 * config-lang.in (gtfiles): Do not reference cp/lex.h.
1413 * class.c: Do not include lex.h.
1414 (add_implicitly_declared_members): Do not use
1415 adding_implicit_members.
1416 (check_bases_and_members): Do not talk about grok_x_components.
1417 * cp/cp-tree.h (adding_implicit_members): Remove.
1418 (cp_storage_class): New type.
1419 (cp_decl_spec): Likewise.
1420 (cp_decl_specifier_seq): Likewise.
1421 (cp_parameter_declarator): Use it for the decl_specifiers field.
1422 (check_tag_decl): Adjust prototype.
1423 (shadow_tag): Likewise.
1424 (groktypename): Likewise.
1425 (start_decl): Likewise.
1426 (start_function): Likewise.
1427 (start_method): Likewise.
1428 (grok_x_components): Remove.
1429 (grokfield): Adjust prototype.
1430 (grokbitfield): Likewise.
1431 (finish_member_class_template): Remove.
1432 * decl.c: Do not include lex.h.
1433 (adding_implicit_members): Do not define.
1434 (check_tag_decl): Do not use trees to represent decl-specifiers.
1435 (shadow_tag): Likewise.
1436 (groktypename): Likewise.
1437 (start_decl): Likewise.
1438 (grokvardecl): Likewise.
1439 (grokdeclarator): Likewise.
1440 (grokparms): Likewise.
1441 (start_function): Likewise.
1442 (start_method): Likewise.
1443 * decl.h (grokdeclarator): Adjust prototype.
1444 * decl2.c: Do not include lex.h.
1445 (grok_x_components): Remove.
1446 (grokfield): Do not use trees to represent decl-specifiers.
1447 (grokbitfield): Likewise.
1448 * lex.c: Do not include lex.h.
1450 * parser.c: Include target.h.
1451 (clear_decl_specs): New function.
1452 (cp_parser_translation_unit): Do not use trees to represent
1454 (cp_parser_postfix_expression): Likewise.
1455 (cp_parser_new_type_id): Likewise.
1456 (cp_parser_condition): Likewise.
1457 (cp_parser_simple_declaration): Likewise.
1458 (cp_parser_decl_specifier_seq): Likewise.
1459 (cp_parser_function_specifier_opt): Likewise.
1460 (cp_parser_conversion_type_id): Likewise.
1461 (cp_parser_template_parameter): Likewise.
1462 (cp_parser_explicit_instantiation): Likewise.
1463 (cp_parser_type_specifier): Likewise.
1464 (cp_parser_simple_type_specifier): Likewise.
1465 (cp_parser_init_declarator): Likewise.
1466 (cp_parser_type_id): Likewise.
1467 (cp_parser_type_specifier_seq): Likewise.
1468 (cp_parser_parameter_declaration): Likewise.
1469 (cp_parser_member_declaration): Likewise.
1470 (cp_parser_exception_declaration): Likewise.
1471 (cp_parser_function_definition_from_specifiers_and_declarator):
1473 (cp_parser_single_declaration): Likewise.
1474 (cp_parser_save_member_function_body): Likewise.
1475 (cp_parser_friend_p): Likewise.
1476 (cp_parser_set_storage_class): New function.
1477 (cp_parser_set_decl_spec_type): Likewise.
1478 * pt.c: Do not include lex.h.
1479 * semantics.c: Likewise.
1480 (finish_member_class_template): Remove.
1482 2004-06-23 Roger Sayle <roger@eyesopen.com>
1484 * call.c (build_cxx_call): Don't call expand_tree_builtin. No
1485 longer take both "args" and "convert_args" as arguments.
1486 (build_op_delete_call): Update call to build_cxx_call.
1487 (build_over_call): Likewise, update call to build_cxx_call.
1488 * cp-tree.h (build_cxx_call): Update funtion prototype.
1489 * typeck.c (build_function_call): Don't call expand_tree_builtin.
1490 * rtti.c (throw_bad_cast): Update call to build_cxx_call.
1491 (throw_bad_typeid): Likewise.
1492 (build_dynamic_cast_1): Likewise.
1494 2004-06-22 Richard Henderson <rth@redhat.com>
1496 * class.c (build_vfn_ref): Take a pointer not object. Build
1498 (cp_fold_obj_type_ref): New.
1499 * call.c (build_over_call): Update build_vfn_ref call.
1500 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
1501 * cp-tree.h (cp_fold_obj_type_ref): Declare.
1503 2004-06-21 Jason Merrill <jason@redhat.com>
1506 * cp-gimplify.c (cp_gimplify_init_expr): Look through
1509 2004-06-21 Mark Mitchell <mark@codesourcery.com>
1511 * cp-tree.def (NEW_EXPR): Add a fourth slot.
1512 * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
1513 (TREE_PARMLIST): Likewise.
1514 (CALL_DECLARATOR_PARMS): Likewise.
1515 (CALL_DECLARATOR_QUALS): Likewise.
1516 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
1517 (cp_declarator_kind): New type.
1518 (cp_parameter_declarator): Likewise.
1519 (cp_declarator): Likewise.
1520 (cp_error_declarator): Likewise.
1521 (no_parameters): Likewise.
1522 (groktypename): Change prototype.
1523 (start_decl): Likewise.
1524 (start_handler_parms): Likewise.
1525 (get_scope_of_declarator): Likewise.
1526 (start_function): Likewise.
1527 (start_preparsed_function): New function.
1528 (start_function): Change prototype.
1529 (start_method): Likewise.
1530 (grokfield): Likewise.
1531 (grokbitfield): Likewise.
1532 (build_new): Likewise.
1533 (make_pointer_declarator): Remove.
1534 (make_reference_declarator): Likewise.
1535 (make_call_declarator): Likewise.
1536 (set_quals_and_spec): Likewise.
1537 (process_template_parm): Change prototype.
1538 (begin_function_definition): Remove.
1539 (finish_parmlist): Remove.
1540 * decl.c (groktypename): Do not use trees to represent
1542 (start_decl): Likewise.
1543 (start_handler_parms): Remove.
1544 (get_scope_of_declarator): Reimplement.
1545 (grokdeclarator): Do not use trees to represent declarators.
1546 (grokparms): Likewise.
1547 (start_function): Likewise.
1548 (start_method): Likewise.
1549 (build_void_list_mode): Do not use TREE_PARMLIST.
1550 * decl.h (grokdeclarator): Change prototype.
1551 * decl2.c (grok_method_quals): Robustify.
1552 (grok_x_components): Do not use trees to represent declarators.
1553 (grokfield): Likewise.
1554 (grokbitfield): Likewise.
1555 (start_objects): Build FUNCTION_DECLs, not declarators.
1556 (start_static_storage_duration_function): Likewise.
1557 * init.c (build_new): Simplify.
1558 * lex.c (make_pointer_declarator): Remove.
1559 (make_reference_declarator): Likewise.
1560 (make_call_declarator): Likewise.
1561 (set_quals_and_spec): Likewise.
1562 * method.c (use_thunk): Use start_preparsed_function.
1563 (synthesize_method): Likewise.
1564 (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
1565 * optimize.c (maybe_clone_body): Use start_preparsed_function.
1566 * parser.c (cp_error_declarator): New variable.
1567 (declarator_obstack): Likewise.
1568 (alloc_declarator): New function.
1569 (make_declarator): Likewise.
1570 (make_id_declarator): Likewise.
1571 (make_pointer_declarator): Likewise.
1572 (make_reference_declarator): Likewise.
1573 (make_ptrmem_declarator): Likewise.
1574 (make_call_declarator): Likewise.
1575 (make_array_declarator): Likewise.
1576 (no_parameters): New variable.
1577 (make_parameter_declarator): Likewise.
1578 (cp_parser_check_for_definition_in_return_type): Do not use trees
1579 to represent declarators.
1580 (cp_parser_translation_unit): Likewise.
1581 (cp_parser_new_expression): Likewise.
1582 (cp_parser_new_type_id): Likewise.
1583 (cp_parser_new_declarator_opt): Likewise.
1584 (cp_parser_direct_new_declarator): Likewise.
1585 (cp_parser_condition): Likewise.
1586 (cp_parser_declaration_statement): Likewise.
1587 (cp_parser_declaration): Likewise.
1588 (cp_parser_conversion_type_id): Likewise.
1589 (cp_parser_conversion_declarator_opt): Likewise.
1590 (cp_parser_template_parameter_list): Likewise.
1591 (cp_parser_template_parameter): Likewise.
1592 (cp_parser_explicit_instantiation): Likewise.
1593 (cp_parser_init_declarator): Likewise.
1594 (cp_parser_declarator): Likewise.
1595 (cp_parser_direct_declarator): Likewise.
1596 (cp_parser_type_id): Likewise.
1597 (cp_parser_parameter_declaration_clause): Likewise.
1598 (cp_parser_parameter_declaration_list): Likewise.
1599 (cp_parser_parameter_declaration): Likewise.
1600 (cp_parser_member_declaration): Likewise.
1601 (cp_parser_exception_declaration): Likewise.
1602 (cp_parser_check_declarator_template_parameters): Likewise.
1603 (cp_parser_function_definition_from_specifiers_and_declarator):
1605 (cp_parser_save_member_function_body): Likewise.
1606 * pt.c (process_template_parm): Add is_non_type parameter.
1607 (convert_template_argument): Adjust call to groktypename.
1608 (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
1609 (tsubst): Do not expect declarators.
1610 (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
1612 (instantiate_decl): Use start_preparsed_function.
1613 * semantics.c (begin_function_definition): Remove.
1614 (finish_parmlist): Remove.
1615 * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
1618 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1620 * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
1621 (build_new_method_call): Likewise.
1622 * decl.c (local_variable_p_walkfn): Don't walk into types.
1623 * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
1624 (build_anon_union_vars): Add new operand for COMPONENT_REF.
1625 * init.c (buld_new): Add new operand for ARRAY_REF.
1626 * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
1627 (do_build_assign_ref): Likewise.
1628 * parser.c (cp_parser_direct_new_declarator): Add new operands
1630 (cp_parser_direct_declarator): Likewise.
1631 * pt.c (tsubst): Likewise.
1632 (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
1634 * semantics.c (finish_non_static_data_member): Add new operand
1636 * typeck.c (build_class_member_access_expr): Likewise.
1637 (build_class_member_access_expr, finish_class_member_access_expr):
1639 (build_ptrmemfunc_access_expr): Likewise.
1640 (build_array_ref): Add new operands for ARRAY_REF.
1641 * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
1642 * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
1644 2004-06-21 Richard Henderson <rth@redhat.com>
1646 * dump.c (cp_dump_tree): Don't use dump_next_stmt.
1647 * parser.c (cp_parser_jump_statement): Update commentary.
1648 * pt.c (tsubst_expr): Use RETURN_EXPR.
1649 * semantics.c (finish_return_stmt): Likewise.
1650 (finalize_nrv_r): Likewise.
1651 * typeck.c, typeck2.c: Update file start commentary.
1653 2004-06-21 Richard Henderson <rth@redhat.com>
1655 * semantics.c (finish_expr_stmt): Call verify_sequence_points.
1657 2004-06-20 Richard Henderson <rth@redhat.com>
1659 * cp-tree.h (add_decl_stmt): Declare.
1660 * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
1661 * semantics.c (maybe_cleanup_point_expr): New.
1662 (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
1663 finish_for_expr, finish_switch_cond): Use it.
1664 (finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN.
1666 2004-06-20 Richard Henderson <rth@redhat.com>
1668 * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
1669 * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
1670 (cp_gimplify_expr): Call it.
1671 (gimplify_cleanup_stmt): Move from c-gimplify.c.
1672 (cp_genericize): New.
1673 * decl.c (finish_function): Call it.
1674 * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
1675 (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
1676 (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
1677 (cp_genericize): Declare.
1678 * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
1679 * dump.c (cp_dump_tree): Likewise.
1680 * semantics.c (push_cleanup): Move from c-semantics.c.
1682 2004-06-20 Zack Weinberg <zack@codesourcery.com>
1684 * cp-lang.c (has_c_linkage): Implement.
1686 * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
1687 * decl.c (duplicate_decls): Use COPY_DECL_RTL.
1688 (builtin_function_1): Don't call make_decl_rtl.
1689 (build_cp_library_fn): Don't call set_mangled_name_for_decl.
1690 (grokvardecl): Don't call mangle_decl.
1691 * except.c (nothrow_libfn_p): Look at DECL_NAME, not
1692 DECL_ASSEMBLER_NAME.
1693 * method.c (set_mangled_name_for_decl): Delete.
1694 * name-lookup.c (pushdecl): When a local extern shadows a
1695 file-scope declaration of the same object, give both DECLs the
1697 * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
1698 on DECL_ASSEMBLER_NAME.
1700 2004-06-19 Richard Henderson <rth@redhat.com>
1702 * cp-gimplify.c: Remove unnecessary prototypes.
1703 (cp_gimplify_stmt): Merge into ...
1704 (cp_gimplify_expr): ... here. Move to end of file. Handle
1705 stmts_are_full_exprs_p frobbing.
1706 * cp-tree.h (cp_gimplify_stmt): Remove.
1707 * pt.c (tsubst_expr): Merge prep_stmt and unify.
1708 * tree.c (init_tree): Don't set lang_gimplify_stmt.
1710 2004-06-18 Richard Henderson <rth@redhat.com>
1713 * semantics.c (begin_cond): New.
1714 (finish_cond): Rewrite to handle template DECL_STMTs specially.
1715 Assume that non-template decls go land before the conditional.
1716 (simplify_loop_decl_cond): Likewise.
1717 (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
1718 finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
1719 begin_switch_stmt, finish_switch_cond): Update to match.
1721 2004-06-17 Jason Merrill <jason@redhat.com>
1724 * semantics.c (simplify_aggr_init_expr): Don't return the slot.
1725 (finish_stmt_expr_expr): Update type after conversions.
1726 (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
1727 Handle void initializer.
1728 * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
1730 2004-06-17 Geoffrey Keating <geoffk@apple.com>
1732 * class.c (build_clone): Don't call defer_fn, let mark_used do it.
1733 * cp-tree.h (defer_fn): Delete.
1734 * decl2.c (defer_fn): Delete.
1735 (finish_file): Simplify deferred_fns loops; check that
1736 only used inline functions get into deferred_fns.
1737 (mark_used): Inline previous contents of defer_fn.
1739 2004-06-16 Richard Henderson <rth@redhat.com>
1741 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
1742 (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
1743 * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
1744 of CTOR_INITIALIZER ...
1745 (pp_cxx_statement): ... here.
1746 * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
1747 (finish_function): Use alloc_stmt_list to zap entire function.
1748 * parser.c (cp_parser_compound_statement): Update commentary.
1749 * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
1750 * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
1751 (finish_stmt_expr): Don't look through COMPOUND_STMT.
1753 2004-06-16 Geoffrey Keating <geoffk@apple.com>
1755 * pt.c (mark_decl_instantiated): Don't call defer_fn.
1757 2004-06-16 Richard Henderson <rth@redhat.com>
1759 * parser.c (cp_parser_labeled_statement): Update commentary.
1760 * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
1761 * tree.c (mark_local_for_remap_r): Likewise.
1763 2004-06-16 Richard Henderson <rth@redhat.com>
1765 * parser.c (cp_parser_asm_definition): Update commentary.
1766 * pt.c (tsubst_expr): Use ASM_EXPR.
1767 * semantics.c (finish_asm_stmt): Likewise.
1769 2004-06-16 Richard Henderson <rth@redhat.com>
1771 * decl.c (finish_destructor_body): Use LABEL_EXPR.
1772 * parser.c (cp_parser_statement): Update commentary.
1773 * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
1774 * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
1775 * tree.c (mark_local_for_remap_r): Likewise.
1777 2004-06-16 Richard Henderson <rth@redhat.com>
1780 * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
1781 statement in FOR_INIT_STMT for templates.
1783 2004-06-15 Richard Henderson <rth@redhat.com>
1785 * call.c (initialize_reference): Don't build CLEANUP_STMT here.
1786 * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
1787 (genericize_try_block): Use gimplify_stmt.
1788 (genericize_catch_block, genericize_eh_spec_block): Likewise.
1789 (cp_gimplify_init_expr): Remove STMT_EXPR special case.
1790 (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
1791 * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
1792 (cp_tree_chain_matters_p): Remove.
1793 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
1794 (COMPOUND_STMT_BODY_BLOCK): New.
1795 (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
1796 (EXPR_STMT_STMT_EXPR_RESULT): New.
1797 (building_stmt_tree): Check cur_stmt_list.
1798 (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
1799 (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
1800 * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
1801 (cp_finish_decl): Use push_cleanup.
1802 (start_function, finish_function): Use statement lists.
1803 (finish_stmt): Do nothing.
1804 * except.c (begin_eh_spec_block): Use statement lists.
1805 (check_handlers_1, check_handlers): Likewise.
1806 * init.c (construct_virtual_base): Don't add extra compound stmts.
1807 (build_vec_init): Likewise.
1808 * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
1809 * name-lookup.h (struct cp_binding_level): Add statement_list.
1810 * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
1811 (cp_parser_labeled_statement, cp_parser_expression_statement,
1812 cp_parser_statement_seq_opt): Likewise.
1813 (cp_parser_compound_statement): Likewise. Take bool for try block.
1814 (cp_parser_selection_statement): Tidy if processing.
1815 (cp_parser_already_scoped_statement): Rewrite to do what it says.
1816 * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
1817 (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST.
1818 Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
1819 * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
1820 (finish_cond): New, rewritten from FINISH_COND.
1821 (simplify_loop_decl_cond): New.
1822 (finish_expr_stmt): Avoid nested EXPR_STMTs.
1823 (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
1824 begin_else_clause, finish_else_clause, finish_if_stmt,
1825 begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
1826 begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
1827 finish_for_cond, finish_for_stmt, begin_switch_stmt,
1828 finish_switch_cond, finish_switch_stmt, begin_try_block,
1829 finish_try_block, finish_cleanup_try_block, finish_function_try_block,
1830 finish_handler_sequence, finish_function_handler_sequence,
1831 begin_handler, finish_handler_parms, finish_handler,
1832 begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
1833 using statement lists.
1834 (begin_compound_stmt): Replace has_no_scope argument with flags.
1835 Update all callers. Use statement lists.
1836 (finish_compound_stmt): Likewise.
1837 (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
1838 (current_scope_stmt_stack): Remove.
1839 (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
1840 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
1841 Rewrite with statement lists.
1843 2004-06-15 Alexandre Oliva <aoliva@redhat.com>
1845 * parser.c: Change all assignments of c_lex_string_translate
1846 to true and false to 1 and 0.
1847 (cp_lexer_read_token): Convert type of the translated string.
1848 (cp_parser_skip_to_closing_parentheses): Preserve original
1849 value of c_lex_string_translate, and set it to -1 while
1851 (cp_parser_cache_group): Likewise.
1852 (cp_parser_cache_group_1): Renamed.
1853 (cp_parser_asm_operand_list): Remove redundant setting of
1854 c_lex_string_translate.
1855 (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
1856 Handle chained strings.
1858 2004-06-12 Andrew Pinski <apinski@apple.com>
1862 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
1864 * cp-tree.h: Fix typo.
1866 * cp-tree.h: Include cgraph.h
1867 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
1868 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
1870 2004-06-12 Jason Merrill <jason@redhat.com>
1872 PR tree-optimization/14107
1873 * decl.c (finish_function): Warn about no return in all functions.
1875 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
1877 * cp-tree.h (struct language_function): Remove cannot_inline.
1878 * decl.c (save_function_data): cannot_inline is no more.
1879 (cxx_push_function_context): Likewise.
1880 * decl2.c (start_objects, start_static_storage_duration_function):
1881 Reset DECL_INLINE, set DECL_UNINLINABLE.
1883 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1886 * search.c (lookup_field): Propagate the ambiguity list.
1887 (lookup_fnfields): Likewise.
1889 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1892 * parser.c (cp_parser_template_name): Ctors/dtors never need a
1893 template keyword to disambiguate.
1895 2004-06-14 Mark Mitchell <mark@codesourcery.com>
1898 * decl.c (grokdeclarator): Ignore pointer-to-members when
1899 computing template depth.
1902 * name-lookup.c (pushtag): Do not try to put class declarations in
1903 explicit specialization scopes.
1905 2004-06-11 Andrew Pinski <pinskia@physics.uc.edu>
1907 * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
1909 2004-06-11 Mark Mitchell <mark@codesourcery.com>
1912 * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
1913 bindings for undeclared built-ins.
1915 2004-06-11 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1917 * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
1918 appear at the correct location.
1920 2004-06-10 Jason Merrill <jason@redhat.com>
1924 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1925 * init.c (build_offset_ref): Build SCOPE_REF with non-null
1926 TREE_TYPE for non-dependent names.
1927 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
1928 unknown_type_node as its TREE_TYPE.
1929 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
1930 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
1931 (dump_expr) <SCOPE_REF case>: Likewise.
1933 2004-06-10 Mark Mitchell <mark@codesourcery.com>
1936 * parser.c (cp_parser_direct_declarator): Robustify.
1939 * pt.c (tsubst_copy): Use decl_constant_value on enumeration
1940 constants in non-dependent contexts.
1944 * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
1947 2004-06-10 Jakub Jelinek <jakub@redhat.com>
1950 * decl.c (duplicate_decls): Handle fileptr_type_node arguments
1953 2004-06-09 Mark Mitchell <mark@codesourcery.com>
1957 2004-06-07 Mark Mitchell <mark@codesourcery.com>
1958 * lex.c (handle_pragma_interface): Deprecate.
1959 (handle_pragma_implementation): Likewise.
1961 2004-06-09 Andrew Pinski <pinskia@physics.uc.edu>
1963 * g++spec.c (lang_specific_driver): Remove check for -lm
1964 and -lmath when check it see if it was the math library.
1966 2004-06-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1969 * parser.c (cp_parser_direct_declarator): Reject constructor named
1970 as qualified template-id.
1972 2004-06-07 Mark Mitchell <mark@codesourcery.com>
1975 * lex.c (handle_pragma_interface): Deprecate.
1976 (handle_pragma_implementation): Likewise.
1978 2004-06-07 Mark Mitchell <mark@codesourcery.com>
1981 * parser.c (cp_parser_iteration_statement): Fix typo in error
1985 * pt.c (tsubst_default_argument): Do not defer access checks
1986 while substituting into the default argument.
1989 * pt.c (tsubst_copy): Do not try to substitute for an enumeration
1990 constant in a non-dependent context.
1993 * except.c (build_throw): Ensure that temp_expr has been
1996 2004-06-06 Roger Sayle <roger@eyesopen.com>
1998 * cp/cp-tree.h (lvalue_or_else): Add function prototype.
2000 2004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2003 * parser.c (cp_parser_mem_initializer_id): Gracefully reject
2004 'typename', and accept 'template'.
2006 2004-06-03 Andrew Pinski <pinskia@physics.uc.edu>
2007 Jan Hubicka <jh@suse.cz>
2010 * method.c (use_think): Do not mark thunk as referenced.
2012 2004-06-03 Matt Austern <austern@apple.com>
2015 * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
2016 is nonzero, and if we see a noninline definition of a key method,
2017 make the vtables nonweak.
2019 2004-06-02 Matt Austern <austern@apple.com>
2021 * cp-tree.h (instantiate_decl): new boolean parameter,
2022 undefined_ok. Current behavior is equivalent to its being 0.
2023 * decl2.c (mark_used): Add new argument when calling instantiate_decl
2024 * pt.c (mark_decl_instantiated): Unconditionally make
2025 instantiations explicit unconditionally
2026 (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
2027 since mark_decl_instantiated now does it.
2028 (instantiate_class_member): New. Instantiate a member of an
2029 explicitly instantiated class template.
2030 (do_type_instantiation): Explicitly instantiate members of an
2031 explicitly instantiated class template.
2032 (instantiate_decl): if undefined_ok is nonzero, and if we're
2033 trying to explicitly instantiated a template with no definition,
2034 change it to an implicit instantiation.
2035 (instantiate_pending_templates): Add new argument to instantiate_decl.
2036 * tree.c (cp_cannot_inline_tree_fn): Likewise.
2038 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
2040 * cp-tree.h: Fix typo.
2042 * cp-tree.h: Include cgraph.h
2043 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
2044 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
2046 2004-06-01 Jason Merrill <jason@redhat.com>
2049 * call.c (call_builtin_trap): Remove type parm.
2050 (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
2051 (build_x_va_arg): Dereference a null pointer for a non-POD argument.
2053 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2056 * init.c (build_offset_ref): Build SCOPE_REF with non-null
2057 TREE_TYPE for non-dependent names.
2058 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
2059 unknown_type_node as its TREE_TYPE.
2060 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
2061 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
2062 (dump_expr) <SCOPE_REF case>: Likewise.
2064 2004-06-01 Richard Henderson <rth@redhat.com>
2065 Andrew Pinski <pinskia@physics.uc.edu>
2067 * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
2068 * parser.c (struct cp_parser): Remove in_offsetof.
2069 (cp_parser_new): Don't set it.
2070 (cp_parser_unary_expression): Don't check it.
2071 (cp_parser_postfix_open_square_expression): Split out from ...
2072 (cp_parser_postfix_expression): ... here.
2073 (cp_parser_postfix_dot_deref_expression): Likewise.
2074 (cp_parser_builtin_offsetof): New.
2075 (cp_parser_primary_expression): Use it.
2077 2004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2080 * parser.c (cp_parser_postfix_expression): Allow subscript
2081 operator in offsetof.
2083 2004-05-31 Mark Mitchell <mark@codesourcery.com>
2086 * friend.c (add_friend): Do not try to perform access checks for
2087 functions from dependent classes.
2089 2004-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
2091 * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
2092 (pp_cxx_begin_template_argument_list): Turn into a function.
2093 (pp_cxx_end_template_argument_list): Likewise.
2094 (pp_cxx_separate_with): Define.
2095 (pp_cxx_unqualified_id): Tidy.
2096 (pp_cxx_primary_expression): Likewise.
2097 (pp_cxx_postfix_expression): Likewise.
2098 (pp_cxx_expression): Likewise.
2099 (pp_cxx_simple_type_specifier): Likewise.
2100 (pp_cxx_type_specifier_seq): Likewise.
2101 (pp_cxx_parameter_declaration_clause): Likewise.
2102 (pp_cxx_exception_specification): Likewise.
2103 (pp_cxx_direct_declarator): Likewise.
2104 (pp_cxx_type_id): Likewise.
2105 * cxx-pretty-print.h (pp_cxx_whitespace): Export from
2107 (pp_cxx_left_paren): Likewise.
2108 (pp_cxx_right_paren): Likewise.
2109 (pp_cxx_left_brace): Likewise.
2110 (pp_cxx_right_brace): Likewise.
2111 (pp_cxx_left_bracket): Likewise.
2112 (pp_cxx_right_bracket): Likewise.
2113 (pp_cxx_dot): Likewise.
2114 (pp_cxx_identifier): Likewise.
2115 (pp_cxx_tree_identifier): Likewise.
2116 (pp_cxx_ampersand): New macro.
2117 (pp_cxx_star): Likewise.
2118 (pp_cxx_arrow): Likewise.
2119 (pp_cxx_semicolon): Likewise.
2120 (pp_cxx_complement): Likewise.
2121 (pp_cxx_begin_template_argument_list): Declaree.
2122 (pp_cxx_end_template_argument_list): Likewise.
2123 (pp_cxx_colon_colon): likewise.
2125 2004-05-31 Eric Botcazou <ebotcazou@libertysurf.fr>
2127 * parser.c (cp_parser_simple_type_specifier): Explicitly test
2130 2004-05-31 Kazu Hirata <kazu@cs.umass.edu>
2132 * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
2133 typeck.c: Fix comment formatting.
2135 2004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
2137 * cp-lang.c (cp_expand_decl): Remove.
2138 (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
2140 2004-05-30 Andreas Jaeger <aj@suse.de>
2142 * lang-specs.h: Add missing initializers for .ii.
2144 2004-05-28 Aldy Hernandez <aldyh@redhat.com>
2146 * decl.c (cp_make_fname_decl): Free return value from
2149 2004-05-28 Mark Mitchell <mark@codesourcery.com>
2152 * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
2154 * init.c (build_new): Likewise.
2157 * name-lookup.c (arg_assoc): Robustify.
2160 * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
2161 when determining the scope to use for a pointer to member.
2162 (lookup_anon_field): Give it external linkage.
2163 * cp-tree.h (lookup_anon_field): Declare it.
2164 * expr.c (cplus_expand_constant): Use it.
2166 2004-05-28 Mark Mitchell <mark@codesourcery.com>
2169 * parser.c (cp_parser_simple_type_specifier): Call
2170 maybe_note_name_used_in_class.
2172 2004-05-28 Tom Marshall <tmarshall@real.com>
2175 * class.c (finish_struct_1): Warn only if the dtor is non-private or
2176 the class has friends.
2178 2004-05-27 Adam Nemet <anemet@lnxw.com>
2181 * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
2182 TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
2184 2004-05-24 Geoffrey Keating <geoffk@apple.com>
2186 * method.c (implicitly_declare_fn): Don't call defer_fn; abort
2187 if it might be needed.
2188 * pt.c (mark_decl_instantiated): Only call defer_fn if
2189 the function actually needs processing in finish_file.
2190 * decl2.c (finish_file): Add check that elements in
2191 deferred_fns_used are really needed there. Remove unnecessary
2192 test of DECL_SAVED_TREE.
2194 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
2196 * Make-lang.in: No need to specify $(LIBCPP).
2198 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2201 * parser.c (cp_parser_class_head): Robustify.
2204 * parser.c (cp_parser_decl_specifier_seq): Correct error in
2206 (cp_parser_constructor_declarator_p): Treat attributes
2210 * typeck.c (build_unary_op): Do not attempt to resolve casts to
2211 base classes in templates.
2213 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2216 * pt.c (instantiate_template): Robustify.
2218 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2221 * decl.c (xref_tag): Issue errors about redeclaring template
2222 classes as non-template classes.
2224 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2227 * name-lookup.c (supplement_binding): Allow redefinitions of
2231 * parser.c (cp_parser_template_argument): Robustify.
2233 2004-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
2235 * class.c (alter_access): Use %E format specifier to print an
2236 identifier node. Avoid looking at the IDENTIFIER_POINTER.
2237 (push_lang_context): Likewise.
2238 * decl.c (lookup_label): Likewise.
2239 (grokdeclarator): Likewise.
2240 * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
2241 * pt.c (do_type_instantiation): Likewise.
2242 * tree.c (handle_java_interface_attribute): Likewise.
2243 (handle_com_interface_attribute): Likewise.
2244 (handle_init_priority_attribute): Likewise.
2246 2004-05-22 Mark Mitchell <mark@codesourcery.com>
2250 * pt.c (build_non_dependent_expr): Expand the set of tree nodes
2251 recognized as overloaded functions.
2253 2004-05-22 Mark Mitchell <mark@codesourcery.com>
2256 * class.c (layout_nonempty_base_or_field): Do not try to avoid
2257 layout conflicts for unions.
2260 * typeck.c (build_x_unary_op): Instantiate template class
2261 specializations before looking for "operator &".
2264 * typeck.c (complete_type): Layout non-dependent array types, even
2268 * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
2271 2004-05-22 Roger Sayle <roger@eyesopen.com>
2273 * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
2274 returning when TREE_TYPE is error_mark_node.
2275 * typeck.c (require_complete_type): Return error_mark_node if
2276 value's type is an error_mark_node.
2278 2004-05-20 Andrew Pinski <pinskia@physics.uc.edu>
2280 * optimize.c (calls_setjmp_r): Remove.
2281 (calls_setjmp_p): Remove.
2282 * cp-tree.c (calls_setjmp_p): Remove.
2283 * decl.c (finish_function): Do not call calls_setjmp_p.
2285 2004-05-18 Zack Weinberg <zack@codesourcery.com>
2287 * decl.c (cp_finish_decl): Use mark_decl_referenced.
2288 * decl2.c (maybe_make_one_only): Likewise.
2289 * method.c (use_thunk): Likewise.
2291 2004-05-18 Jason Merrill <jason@redhat.com>
2293 * class.c (build_base_path): Tidy a bit.
2295 2004-05-14 Geoffrey Keating <geoffk@apple.com>
2297 * name-lookup.c (struct scope_binding): New.
2298 (EMPTY_SCOPE_BINDING): New.
2299 (lookup_using_namespace): Take a scope_binding instead of a
2301 (qualified_lookup_using_namespace): Likewise.
2302 (cxx_binding_clear): Delete.
2303 (do_nonmember_using_decl): Use a scope_binding instead of a
2305 (lookup_tag): Don't call select_decl.
2306 (ambiguous_decl): Don't return anything (and change callers to match).
2307 Take a scope_binding as the second parameter.
2308 (lookup_namespace_name): Use a scope_binding instead of a
2310 (unqualified_namespace_lookup): Likewise.
2311 (lookup_qualified_name): Likewise.
2312 (select_decl): Take a scope_binding instead of a cxx_binding.
2313 Use macros rather than hand-coding tests for type-ness.
2315 2004-05-13 Diego Novillo <dnovillo@redhat.com>
2317 * cp-gimplify.c: Rename from cp-simplify.c.
2318 * Make-lang.in, optimize.c: Update.
2320 2004-05-13 Diego Novillo <dnovillo@redhat.com>
2322 Merge from tree-ssa-20020619-branch. See
2323 ChangeLog.tree-ssa for details.
2325 * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
2326 cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
2327 expr.c, init.c, name-lookup.h, optimize.c, parser.c,
2328 pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
2330 * cp-mudflap.c: New file.
2331 * cp-simplify.c:: New file.
2333 2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2336 * decl2.c (check_classfn): For member templates, compare also the
2337 template parameters to match the declaration.
2338 * cp-tree.h: Adjust declaration of check_classfn.
2339 * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
2340 * friend.c (do_friend): Likewise.
2341 * pt.c (tsubst_friend_function): Likewise.
2343 2004-05-01 Zack Weinberg <zack@codesourcery.com>
2345 * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
2346 Instead, dig into the representation type to find the array bound.
2348 2004-04-30 Jason Merrill <jason@redhat.com>
2350 Refer to base members using COMPONENT_REFs where possible.
2351 * class.c (build_simple_base_path): New fn.
2352 (build_base_path): Use it for non-virtual base references.
2353 (layout_class_type): Change base fields to their real type
2354 after layout is done.
2355 * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
2356 * cp-lang.c (cxx_get_alias_set): Use it.
2358 2004-04-30 Kazu Hirata <kazu@cs.umass.edu>
2360 * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
2363 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2366 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
2367 used in integral constant expressions.
2369 2004-04-22 Mark Mitchell <mark@codesourcery.com>
2371 * init.c (build_aggr_init): Fix accidental use of C99 construct in
2374 * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
2376 * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
2377 * decl.c (reshape_init): Use it.
2378 * init.c (perform_member_init): Remove redundant condition.
2379 (build_aggr_init): Adjust to handle brace-enclosed initializers
2381 (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
2383 * parser.c (cp_parser_initializer_clause): Do not set
2384 TREE_HAS_CONSTRUCTOR on the initializer.
2385 * rtti.c (tinfo_base_init): Likewise.
2386 (generic_initializer): Likewise.
2387 (ptr_initializer): Likewise.
2388 (ptm_initializer): Likewise.
2389 (class_initializer): Likewise.
2390 (get_pseudo_ti_init): Likewise.
2391 * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
2393 2004-04-22 Alan Modra <amodra@bigpond.net.au>
2395 * name-lookup.c (anonymous_namespace_name): Make static.
2397 2004-04-19 Roger Sayle <roger@eyesopen.com>
2400 * class.c (build_base_path): Call fold whilst building the NULL
2401 pointer check expression trees.
2403 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
2405 * init.c (build_new_1): Don't use type size argument for Java
2406 _Jv_AllocObject call.
2408 2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
2410 * method.c (make_alias_for_thunk): Remove preprocessor guard on
2411 declaration and definition.
2413 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
2416 * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
2417 than ASM_OUTPUT_DEF.
2419 2004-04-08 Jakub Jelinek <jakub@redhat.com>
2421 * decl2.c (mark_used): Don't segfault if cfun != NULL but
2422 current_function_decl == NULL.
2424 2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
2427 * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
2430 2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2432 * init.c (decl_constant_value): Don't look at DECL_INITIAL
2434 * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
2435 or TREE_SIDE_EFFECTS of a type.
2437 2004-04-02 Nathan Sidwell <nathan@codesourcery.com>
2440 * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
2441 cv-qualifier unification.
2442 * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
2444 2004-04-02 Jan Hubicka <jh@suse.cz>
2446 * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
2447 * cp-tree.h (cp_update_decl_after_saving): Declare.
2448 * tree.c (cp_update_decl_after_saving): Define.
2450 2004-04-01 Mark Mitchell <mark@codesourcery.com>
2453 * typeck.c (get_delta_difference): Call fold before returning the
2456 2004-04-01 Richard Henderson <rth@redhat.com>
2459 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
2460 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
2462 2004-04-01 Mark Mitchell <mark@codesourcery.com>
2465 * name-lookup.c (maybe_push_cleanup_level): Robustify.
2467 2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2469 * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
2471 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2473 * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
2474 * class.c (check_bitfield_decl): Likewise.
2475 * cvt.c (type_promotes_to): Likewise.
2476 * decl.c (finish_enum): Likewise.
2477 * mangle.c (write_builtin_type): Likewise.
2478 * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
2479 * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
2480 (build_binary_op): Likewise.
2482 2004-03-31 Jan Hubicka <jh@suse.cz>
2484 * tree.h (optimize_function): Kill prototype.
2485 * optimize.c (dump_function, optimize_function, dump_finction): Kill.
2486 * semantics.c (expand_body): Kill.
2488 2004-03-30 Mark Mitchell <mark@codesourcery.com>
2491 * decl.c (start_decl_1): Do not decide whether or not to create a
2492 new cleanup level until after the type has been completed.
2495 * pt.c (tsubst_default_argument): Clear current_function_decl.
2497 2004-03-30 Zack Weinberg <zack@codesourcery.com>
2499 * name-lookup.c, parser.c: Use new shorter form of GTY markers.
2501 2004-03-29 Zack Weinberg <zack@codesourcery.com>
2503 * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
2504 is null, just print the literal name and return.
2506 2004-03-25 Kazu Hirata <kazu@cs.umass.edu>
2508 * cxx-pretty-print.c: Fix comment typos.
2510 2004-03-24 Kazu Hirata <kazu@cs.umass.edu>
2512 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
2515 2004-03-23 Ziemowit Laski <zlaski@apple.com>
2517 * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
2518 * mangle.c (write_type): Add call to 'mangle_fundamental_type'
2521 2004-03-23 Zack Weinberg <zack@codesourcery.com>
2523 PR 12267, 12391, 12560, 13129, 14114, 14133
2524 * cp-lang.c (c_reset_state): Delete.
2525 (push_file_scope, pop_file_scope): New stubs.
2526 * parser.c (c_parse_file): Call sorry() here if called more than once.
2528 2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2530 * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
2533 2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
2535 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
2537 2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
2539 * error.c (enum pad): Remove.
2540 (dump_qualifiers): Likewise.
2541 (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
2542 (dump_aggr_type): Likewise.
2543 (dump_type_suffix): Likewise.
2544 (dump_simple_decl): Likewise.
2545 (dump_function_decl): Likewise.
2546 (cv_to_string): Likewise.
2547 (dump_type_prefix): Likewise. Adjust return void.
2548 * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
2550 (pp_cxx_template_keyword_if_needed): Document.
2551 (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
2552 (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
2553 MUST_NOT_THROW_EXPR.
2555 2004-03-21 Mark Mitchell <mark@codesourcery.com>
2558 * decl.c (cp_finish_decl): Compute the size of arrays declared in
2559 templates, if their type is non-dependent.
2561 2004-03-19 Mark Mitchell <mark@codesourcery.com>
2563 * call.c (build_op_delete_call): Do not forget the placement
2564 arguments when iterating through mutiple delete operators.
2566 * cp-tree.h (svaed_scope): Remove last_parms.
2567 (NEW_DELETE_OPNAME_P): New macro.
2568 (last_function_parms): Remove.
2569 (do_friend): Adjust prototype.
2570 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
2571 using last_function_parms.
2572 (grokfndecl): Take the PARM_DECLs as an argument, rather than
2573 using last_function_parms.
2574 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
2575 for class-specific operator new and operator delete.
2576 (grok_op_properties): Do not look for allocation functions with
2578 (start_function): Use DECL_ARGUMENTS instead of
2579 last_function_parms.
2580 * decl.h (last_function_parms): Do not declare.
2581 * decl2.c (grokclassfn): Do not use last_function_parms.
2582 * friend.c (do_friend): Remove parmdecls parameter.
2583 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
2584 (pop_from_top_level): Do not restore it.
2585 * pt.c (check_explicit_specialization): Do not adjust
2586 last_function_parms.
2588 * name-lookup.c (do_local_using_decl): Create a local binding for
2589 types brought in via using declarations.
2591 * name-lookup.c (lookup_arg_dependent): Handle block-scope
2592 function declarations correctly.
2594 * semantics.c (finish_id_expression): Correct handling of
2595 conversion operators to dependent types.
2597 * typeck.c (lookup_destructor): Allow the use of destructors from
2600 2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2602 * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
2603 TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
2604 * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
2605 the field is named TEMPLATE_TYPE_PARM_INDEX.
2607 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2610 * parser.c (cp_parser_functional_cast): A cast to anything
2611 but integral or enumaration type is not an integral constant
2613 * pt.c (value_dependent_expression_p): Handle cast expressions
2614 without operands (such as "int()").
2616 2004-03-18 Mark Mitchell <mark@codesourcery.com>
2618 * semantics.c (finish_pseudo_destructor_expr): Allow differing
2619 cv-qualification between the type named by the
2620 pseudo-destructor-name and the object-type.
2622 * search.c (accessible_base_p): Handle non-proper bases.
2624 * name-lookup.c (do_nonmember_using_decl): If a using declaration
2625 refers to a single overloaded function, set the type of the
2627 * tree.c (lvalue_type): Simplify.
2628 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
2630 (build_unary_op): Handle OVERLOADs with known types.
2632 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
2635 * parser.c (cp_parser_postfix_expression): Handle the use of
2636 "typename" in non-dependent contexts. Convert appropriately when
2637 when using a qualified name after "->" or ".".
2639 * call.c (conditional_conversion): Honor the requirement that some
2640 conversions refer to the original object.
2642 2004-03-18 Mark Mitchell <mark@codesourcery.com>
2644 * call.c (build_conditional_expr): Do not call force_rvalue for
2645 operands of void_type when the conditional expression itself has
2647 * name-lookup.c (pushdecl): Don't consider a declaration of a
2648 function named "main" to be an overload of a type named "main".
2649 * parser.c (cp_parser_template_name): Perform name lookup when the
2650 template name is proceeded by "template" if the qualifying scope
2652 * typeck.c (composite_pointer_type_r): Correctly handle
2653 pointer-to-member types.
2654 (build_const_cast): Likewise.
2656 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2658 * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
2659 * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
2660 (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
2661 (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
2662 (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
2663 (TYPEOF_TYPE_EXPR): New macro.
2664 * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
2665 * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
2666 * pt.c (tsubst): Likewise.
2667 * semantics.c (finish_typeof): Likewise.
2668 * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
2669 and TEMPLATE_TYPE_PARM.
2670 * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
2671 (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
2673 2004-03-16 Mark Mitchell <mark@codesourcery.com>
2676 * cp-tree.h (build_new_op): Change prototype.
2677 (build_x_binary_op): Likewise.
2678 * call.c (build_new_op): Add overloaded_p parameter.
2679 * decl2.c (grok_array_decl): Adjust call to build_new_op.
2680 * parser.c (cp_parser_binary_expression): Note that uses of
2681 overloaded operators prevents an expression from being considered
2682 an integral constant.
2683 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
2685 * semantics.c (finish_call_expr): Likewise.
2686 * typeck.c (rationalize_conditional_expr): Likewise.
2687 (build_x_indirect_ref): Likewise.
2688 (build_x_binary_op): Likewise.
2689 (build_x_unary_op): Likewise.
2690 (build_x_compound_expr): Likewise.
2691 (build_modify_expr): Likewise.
2692 * typeck2.c (build_x_arrow): Likewise.
2694 2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
2696 * cp-lang.c, ptree.c: Update copyright.
2698 2004-03-13 Mark Mitchell <mark@codesourcery.com>
2701 * parser.c (cp_parser_non_integral_constant_expression): Encode
2702 more of the idiom that surrounded calls to this function within
2704 (cp_parser_primary_expression): Adjust accordingly.
2705 (cp_parser_postfix_expression): Likewise.
2706 (cp_parser_unary_expression): Likewise.
2707 (cp_parser_cast_expression): Likewise.
2708 (cp_parser_assignment_expression): Likewise.
2709 (cp_parser_expression): Likewise.
2710 (cp_parser_new_expression): Note that new-expressions are not
2711 allowed in integral constant expressions.
2712 (cp_parser_delete_expression): Likewise.
2714 2004-03-12 Matt Austern <austern@apple.com>
2716 * decl2.c (maybe_make_one_only): Look at
2717 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
2718 to make an explicit instantiation weak.
2719 * method.c (use_thunk): Make sure we call comdat_linkage
2721 * pt.c (do_type_instantiation): On systems where weak symbols
2722 don't go in a static archive's TOC, explicit instantiation of a
2723 class must imply *explicit* instantiation of its memeber.
2725 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
2727 * call.c, cp-tree.h, pt.c: Fix comment typos.
2729 2004-03-10 Mark Mitchell <mark@codesourcery.com>
2732 * decl.c (xref_tag): Disregard non-type declarations when
2733 looking up a tagged type.
2735 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
2738 * call.c (convert_like_real): Build a const qualified temporary,
2739 when testing ctor access.
2741 2004-03-09 Mark Mitchell <mark@codesourcery.com>
2743 * call.c (initialize_reference): Fix typo.
2745 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2748 * pt.c (determine_specialization): For member templates, match also
2752 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
2754 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
2756 2004-03-09 Mark Mitchell <mark@codesourcery.com>
2759 * call.c (initialize_reference): Handle initializers that are
2760 class-member access expressions applies to rvalues.
2762 2004-03-09 Mark Mitchell <mark@codesourcery.com>
2765 * name-lookup.c (supplement_binding): Ignore functions that are
2766 marked DECL_ANTICIPATED.
2768 2004-03-08 Mark Mitchell <mark@codesourcery.com>
2771 * class.c (check_field_decls): Complain about non-static data
2772 members of reference type in unions. Propagate
2773 CLASSTYPE_REF_FIELDS_NEED_INIT and
2774 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
2776 * init.c (perform_member_init): Complain about mbmers with const
2777 type that are not explicitly initialized.
2779 2004-03-08 Mark Mitchell <mark@codesourcery.com>
2781 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
2782 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
2783 (lang_identifier): Remove implicit_decl and error_locus.
2784 (IDENTIFIER_IMPLICIT_DECL): Remove.
2785 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
2786 (IDENTIFIER_ERROR_LOCUS): Likewise.
2787 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
2788 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
2789 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
2790 (implicitly_declare): Remove.
2791 * decl.c (warn_extern_redeclared_static): Remove check of
2792 IDENTIFIER_IMPLICIT_DECL.
2793 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
2794 (implicitly_declare): Remove.
2795 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
2796 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
2797 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
2798 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
2799 in the innermost scope, rather than at namespace scope.
2800 * name-lookup.c (push_local_binding): Give it external linkage.
2801 (pushdecl): Remove dead code.
2802 * name-lookup.h (push_local_binding): Declare it.
2803 * ptree.c (cxx_print_identifier): Don't print
2804 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
2805 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
2806 not IDENTIFIER_ERROR_LOCUS.
2807 * typeck.c (build_function_call): Remove dead code.
2809 2004-03-08 Jason Merrill <jason@redhat.com>
2812 * decl.c (xref_tag): Remove attribute handling.
2813 * cp-tree.h: Adjust prototype.
2814 * decl.c, parser.c, rtti.c: Adjust callers.
2815 * parser.c (cp_parser_class_head): Pass back attributes in the
2817 (cp_parser_class_specifier): Adjust.
2819 2004-03-08 Matt Austern <austern@apple.com>
2822 * name-lookup.c (add_decl_to_level): Add extern variables, as well
2823 as static, to static_decls array.
2825 2004-03-05 Jason Merrill <jason@redhat.com>
2827 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
2829 2004-03-04 Geoffrey Keating <geoffk@apple.com>
2831 * decl.c (grokfndecl): Update old incorrect comment.
2832 (grokvardecl): Diagnose C++ variables of type with no linkage.
2834 2004-03-01 Mark Mitchell <mark@codesourcery.com>
2837 * pt.c (build_non_dependent_expr): Do not create a
2838 NON_DEPENDENT_EXPR for a THROW_EXPR.
2840 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
2843 * error.c (dump_expr): Handle THROW_EXPR.
2845 2004-03-01 Mark Mitchell <mark@codesourcery.com>
2848 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
2849 lookup if ordinary name-lookup finds a non-function.
2850 * pt.c (tsubst_copy_and_build): Likewise.
2853 * parser.c (cp_parser_late_parsing_default_args): Check that there
2854 are no extra tokens after the end of the default-argument
2857 2004-03-01 Mark Mitchell <mark@codesourcery.com>
2860 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
2861 having C++ linkage for name-mangling purposes.
2864 * parser.c (cp_parser_direct_declarator): Recognize constructor
2865 declarators that use a template-id to name the class being
2869 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
2870 (tsubst_expr): Do not call tsubst_copy, even when
2871 processing_template_decl.
2873 2004-03-01 Jeff Law <law@redhat.com>
2875 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
2878 2004-02-29 Mark Mitchell <mark@codesourcery.com>
2881 * name-lookup.h (push_scope): Change prototype.
2882 * name-lookup.c (push_scope): Do not reenter the current class
2884 * decl.c (grokfndecl): Check return code from push_scope before
2886 * decl2.c (check_classfn): Likewise.
2887 * parser.c (cp_parser_conversion_function_id): Likewise.
2888 (cp_parser_init_declarator): Likewise.
2889 (cp_parser_direct_declarator): Likewise.
2890 (cp_parser_class_specifier): Likewise.
2891 (cp_parser_class_head): Likewise.
2892 (cp_parser_lookup_name): Likewise.
2893 (cp_parser_constructor_declarator_p): Likewise.
2894 * pt.c (instantiate_class_template): Likewise.
2895 (resolve_typename_type): Likewise.
2897 2004-02-29 Mark Mitchell <mark@codesourcery.com>
2900 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
2904 * class.c (update_vtable_entry_for_fn): Do not go through
2905 covariance machinery if the type returned by an overrider is the
2906 same as the original.
2908 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
2910 * call.c: Fix a comment typo.
2912 2004-02-27 Ziemowit Laski <zlaski@apple.com>
2914 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
2916 2004-02-26 Mark Mitchell <mark@codesourcery.com>
2919 * parser.c (cp_parser_parameter_declaration_list): Commit
2920 to fewer tentative parses.
2922 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2925 * pt.c (dependent_type_p_r): A template template parameter is a
2928 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2931 * mangle.c (write_template_arg_literal): Don't rely on identity for
2934 2004-02-24 Jason Merrill <jason@redhat.com>
2936 * tree.c (build_exception_variant): Use check_qualified_type.
2938 2004-02-23 Zack Weinberg <zack@codesourcery.com>
2939 Kazu Hirata <kazu@cs.umass.edu>
2941 * decl.c (cxx_init_decl_processing): Don't check
2942 flag_writable_strings.
2944 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
2947 * typeck.c (maybe_warn_about_returning_address_of_location):
2948 Change check for VAR_DECL to use DECL_P instead.
2950 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2953 * cvt.c (build_expr_type_conversion): Type must be complete before
2954 looking up for conversions.
2956 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2959 * name-lookup.c (arg_assoc_class): Don't look into template
2960 arguments if it is not a primary template.
2962 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
2965 * method.c (use_thunk): Always clone function argument tree.
2967 2004-02-20 Mark Mitchell <mark@codesourcery.com>
2970 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
2973 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
2974 for all type variants.
2976 2004-02-19 Mark Mitchell <mark@codesourcery.com>
2979 * decl.c (duplicate_decls): Return error_mark_node for invalid
2981 * name-lookup.c (push_namespace): Ignore the return value from
2983 * pt.c (push_template_decl_real): Robustify.
2986 * name-lookup.c (push_class_level_binding): Do not complain about
2987 adding a binding for a member whose name is the same as the
2988 enclosing class if the member is located in a base class of the
2991 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2994 * parser.c (cp_parser_new_expression): Parse an ill-formed
2995 direct-new-declarator after a parenthesized type-id to emit good
2998 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
3000 * cp-tree.def, cvt.c: Update copyright.
3002 2004-02-17 Mark Mitchell <mark@codesourcery.com>
3005 * cp-tree.h (abi_version_at_least): Remove.
3006 * mangle.c: Include flags.h.
3008 2004-02-15 Mark Mitchell <mark@codesourcery.com>
3011 * call.c (build_conditional_expr): Handle conversions between
3012 class types which result in differently cv-qualified type
3016 * class.c (delete_duplicate_fields_1): Remove.
3017 (delete_duplicate_fields): Likewise.
3018 (finish_struct_anon): Remove check for members with the same name
3019 as their enclosing class.
3020 (check_field_decls): Do not call duplicate_fields.
3021 * decl.c (grokdeclarator): Remove check for static data members
3022 with the same name as their enclosing class.
3023 * name-lookup.c (push_class_level_binding): Check for members with
3024 the same name as their enclosing class.
3026 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
3029 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
3031 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3034 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
3035 has full set of arguments.
3037 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3040 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
3042 2004-02-13 Mark Mitchell <mark@codesourcery.com>
3045 * cp-tree.h (delete_sanity): Change prototype.
3046 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
3047 Remove dead code. Adjust code to warn about deleting an array.
3048 * typekc.c (decay_conversion): Use build_address and build_nop.
3051 * search.c (accessible_p): Do not check access in thunks.
3054 * call.c (build_conditional_expr): Call force_rvalue on the
3055 non-void operand in the case that one result is a throw-expression
3056 and the other is not.
3058 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
3061 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
3062 the type name and look ahead for ::~, and bail out early with a
3063 better error message if the parse is going to fail.
3065 2004-02-12 Mark Mitchell <mark@codesourcery.com>
3067 * call.c (conversion_kind): New type.
3068 (conversion_rank): Likewise.
3069 (conversion): Likewise.
3070 (CONVERSION_RANK): New macro.
3071 (conversion_obstack): New variable.
3072 (obstack_initialized): Likewise.
3073 (z_candidate): Change type of convs and second_conv.
3074 (candidate_warning): New type.
3075 (IDENTITY_RANK): Remove.
3076 (EXACT_RANK): Likewise.
3077 (PROMO_RANK): Likewise.
3078 (STD_RANK): Likewise.
3079 (PBOOL_RANK): Likewise.
3080 (USER_RANK): Likewise.
3081 (ELLIPSIS_RANK): Likewise.
3082 (BAD_RANK): Likewise.
3083 (ICS_RANK): Likewise.
3084 (ICS_STD_RANK): Likewise.
3085 (ICS_USER_FLAG): Likewise.
3086 (ICS_ELLIPSIS_FLAG): Likewise.
3087 (ICS_THIS_FLAG): Likewise.
3088 (ICS_BAD_FLAG): Likewise.
3089 (NEED_TEMPORARY_P): Likewise.
3090 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
3091 (USER_CONV_CAND): Likewise.
3092 (USER_CONV_FN): Likewise.
3093 (conversion_obstack_alloc): New function.
3094 (alloc_conversion): Likewise.
3095 (validate_conversion_obstack): Likewise.
3096 (alloc_conversions): Likewise.
3097 (build_conv): Adjust to deal with new conversion data structures.
3098 (build_identity_conv): New function.
3099 (build_ambiguous_conv): Likewise.
3100 (standard_conversion): Adjust to deal with new conversion data
3102 (convert_class_to_reference): Likewise.
3103 (direct_reference_binding): Likewise.
3104 (reference_binding): Likewise.
3105 (implicit_conversion): Likewise.
3106 (add_candidate): Likewise.
3107 (add_function_candidate): Likewise.
3108 (add_conv_candidate): Likewise.
3109 (build_builtin_candidate): Likewise.
3110 (print_z_candidate): Likewise.
3111 (merge_conversion_sequences): Likewise.
3112 (build_user_type_conversion_1): Likewise.
3113 (build_user_type_conversion): Likewise.
3114 (build_new_function_call): Likewise.
3115 (build_object_call): Likewise.
3116 (conditional_conversion): Likewise.
3117 (build_conditional_expr): Likewise.
3118 (build_new_op): Likewise.
3119 (build_op_delete_call): Likewise.
3120 (convert_like_real): Likewise.
3121 (build_over_call): Likewise.
3122 (build_new_method_call): Likewise.
3123 (is_subseq): Likewise.
3124 (maybe_handle_implicit_object): Likewise.
3125 (maybe_handle_ref_bind): Likewise.
3126 (compare_ics): Likewise.
3127 (source_type): Likewise.
3128 (add_warning): Likewise.
3130 (can_convert_arg): Likewise.
3131 (can_convert_arg_bad): Likewise.
3132 (perform_implicit_conversion): Likewise.
3133 (perform_direct_initialization_if_possible): Likewise.
3134 (initialize_reference): Likewise.
3135 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
3136 * cp-tree.def (WRAPPER): Likewise.
3137 (IDENTITY_CONV): Remove.
3138 (LVALUE_CONV): Likewise.
3139 (QUAL_CONV): Likewise.
3140 (STD_CONV): Likewise.
3141 (PTR_CONV): Likewise.
3142 (PMEM_CONV): Likewise.
3143 (BASE_CONV): Likewise.
3144 (REF_BIND): Likewise.
3145 (USER_CONV): Likewise.
3146 (AMBIG_CONV): Likewise.
3147 (RVALUE_CONV): Likewise.
3148 * cp-tree.h (tree_wrapper): Remove.
3149 (WRAPPER_ZC): Remove.
3150 (lang_tree_node): Remove wrapper.
3151 (LOOKUP_SPECULATIVELY): Remove.
3152 (build_op_delete_call): Adjust prototype.
3153 (validate_conversion_obstack): Declare.
3154 (build_zc_wrapper): Remove.
3155 * cvt.c (convert_to_reference): Remove dead code.
3156 (ocp_convert): Likewise.
3157 * decl.c (redeclaration_error_message): Correct handling of
3159 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
3160 (cp_tree_node_structure): Remove WRAPPER case.
3161 * decl2.c (finish_file): Call validate_conversion_obstack.
3162 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
3163 (build_op_delete_call): Likewise.
3164 (build_x_delete): Likewise.
3165 (build_delete): Adjust call to build_op_delete_call.
3166 * pt.c (tsubst_friend_declaration): Adjust code to determine
3167 whether or not a friend template is a definition.
3168 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
3169 * tree.c (build_zc_wrapper): Remove.
3171 2004-02-12 Zack Weinberg <zack@codesourcery.com>
3173 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
3174 * cp-tree.h: Don't declare cxx_builtin_type_decls.
3175 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
3176 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
3178 2004-02-10 Mark Mitchell <mark@codesourcery.com>
3180 * typeck.c (lookup_destructor): Fix typo in error message.
3182 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
3184 * call.c, parser.c, tree.c: Fix comment typos.
3186 2004-02-07 Zack Weinberg <zack@codesourcery.com>
3189 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
3190 * decl.c (duplicate_decls, start_function): Likewise.
3192 2004-02-07 Zack Weinberg <zack@codesourcery.com>
3194 * name-lookup.c (pushdecl): Issue shadow warnings directly.
3195 * parser.c (free_parser_stacks): Delete.
3197 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
3199 * rtti.c: Update copyright.
3201 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3204 * decl.c (require_complete_types_for_parms): Do not insert
3205 error_mark_node in the parameter list.
3207 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3210 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
3211 error when terminator can not be found.
3213 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
3215 Make-lang.in (po-generated): Delete.
3217 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
3219 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
3220 targetm.calls.promote_prototypes.
3222 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3226 2004-01-15 Geoffrey Keating <geoffk@apple.com>
3228 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
3229 (handle_pragma_implementation): Likewise.
3231 2004-02-05 Mark Mitchell <mark@codesourcery.com>
3234 * typeck.c (lookup_destructor): Tweak error message.
3236 2004-02-05 Jan Hubicka <jh@suse.cz>
3238 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
3241 2004-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3244 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
3245 code, only emits the diagnostic now. Added lookup of the identifier
3246 and support for qualified ids.
3247 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
3248 Parse an (invalid) type name as id-expression within a declarator.
3249 (cp_parser_simple_declaration): Use it.
3250 (cp_parser_member_declaration): Likewise.
3251 (cp_parser_make_typename_type): New function. Handle errors through
3252 cp_parser_diagnose_invalid_typename.
3253 (cp_parser_elaborated_type_specifier): Use it.
3255 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3258 * call.c (convert_like_real): Use "converting" rather than
3259 "argument" as the descriptive keyword to
3260 dubious_conversion_warnings.
3261 * typeck.c (convert_for_assignment): Do not call
3262 dubious_conversion_warnings.
3264 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3267 * init.c (build_delete): Emit a more informative error message in
3268 case of an incomplete type, and on the correct source line.
3270 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
3272 * error.c, search.c: Update copyright.
3274 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3277 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
3278 linkage for the typeinfo name string.
3280 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3283 * cp-tree.h (fold_non_dependent_expr): New function.
3284 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
3285 (cp_parser_template_argument): Use fold_non_dependent_expr.
3286 (cp_parser_direct_declarator): Likewise.
3287 * pt.c (fold_non_dependent_expr): New function.
3288 (convert_nontype_argument): Use it.
3289 (tsubst_qualified_id): Simplify.
3290 (tsubst_copy_and_build): Likewise.
3292 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3294 * decl.c (cxx_push_function_context): Do not set
3295 current_function_is_thunk.
3296 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
3299 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3302 * pt.c (more_specialized_class): Increase processing_template_decl
3303 while partial ordering.
3305 2004-02-03 Mark Mitchell <mark@codesourcery.com>
3308 * decl.c (start_function): Do not call pushdecl for any
3309 instantiation or specialization of a primary template.
3311 2004-02-03 Mark Mitchell <mark@codesourcery.com>
3314 * parser.c (cp_parser_class_name): Robustify.
3317 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
3320 * semantics.c (finish_id_expression): Do not return an
3321 IDENTIFIER_NODE when lookup finds a PARM_DECL.
3323 2004-02-03 Mark Mitchell <mark@codesourcery.com>
3326 * pt.c (build_non_dependent_expr): Do not build
3327 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
3330 * semantics.c (finish_id_expression): Do not return an
3331 IDENTIFIER_NODE when lookup finds a VAR_DECL.
3334 * parser.c (cp_parser_simple_declaration): When skipping to the
3335 end of the statement swallow the terminating semicolon.
3337 2004-02-02 Mark Mitchell <mark@codesourcery.com>
3340 * init.c (build_offset_ref): Improve error recovery for invalid
3341 uses of non-static member functions.
3344 * cp-tree.h (cp_build_type_attribute_variant): New function.
3345 * class.c (build_clone): Use cp_build_type_attribute_variant.
3346 * decl.c (duplicate_decls): Likewise.
3347 * pt.c (copy_default_args_to_explicit_spec): Likewise.
3348 (tsubst_function_type): Likewise.
3349 * tree.c (build_exception_variant): Check attributes before
3350 concluding that two types are the same.
3351 (cp_build_type-attribute_variant): New method.
3352 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
3355 * call.c (convert_class_to_reference): Keep better track of
3356 pedantically invalid user-defined conversions.
3358 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3361 * pt.c (tsubst_qualified_id): Improved error message when a type
3362 is expected but not found.
3364 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
3366 * class.c: Fix comment typos.
3368 * error.c: Likewise.
3369 * parser.c: Likewise.
3371 * search.c: Likewise.
3372 * typeck.c: Likewise.
3374 2004-01-30 Richard Henderson <rth@redhat.com>
3377 * method.c (use_thunk): Don't force_target_expr for void thunks.
3378 * tree.c (build_target_expr_with_type): Assert non-void type.
3379 (force_target_expr): Likewise.
3381 2004-01-30 Michael Matz <matz@suse.de>
3383 * parser.c (cp_parser_labeled_statement): Accept case ranges.
3385 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3389 * decl.c (grokdeclarator): Check immediatly type completeness for
3390 non-dependent types.
3392 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3395 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
3396 a sizeof expression.block
3398 2004-01-29 Mark Mitchell <mark@codesourcery.com>
3401 * mangle.c (write_encoding): Correct encoding of member template
3404 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3406 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
3407 template name as it was `<::' (digraph typo).
3408 (cp_parser_nth_token_starts_template_argument_list_p): New function.
3409 (cp_parser_id_expression): Use it.
3410 (cp_parser_nested_name_specifier_opt): Likewise.
3411 (cp_parser_template_name): Likewise.
3412 (cp_parser_class_name): Likewise.
3413 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
3415 2004-01-28 Mark Mitchell <mark@codesourcery.com>
3418 * typeck.c (merge_types): Do not merge attributes into
3422 * parser.c (cp_parser_direct_declarator): Do not prevent
3423 backtracking inside a parenthesized declarator.
3424 (cp_parser_parameter_declaration): Fix typo in comment.
3426 2004-01-28 Jan Hubicka <jh@suse.cz>
3428 * semantics.c (expand_body) Do emit_associated_thunks before
3431 2004-01-27 Devang Patel <dpatel@apple.com>
3433 * name-lookup.c: Include "debug.h"
3434 (do_namespace_alias): Invoke debug_hooks to emit debug info
3435 for namespace alias.
3436 (do_local_using_decl): Invoke debug_hooks to emit debug info
3438 (do_class_using_decl): Same.
3439 (do_toplevel_using_decl): Same.
3440 (do_using_directive): Same.
3441 (cp_emit_debug_info_for_using): New function.
3442 * Make-lang.in (cp/parser.o): Depend on debug.h
3443 (cp/name-lookup.o): Same.
3445 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3447 * cp-tree.h (language_function, lang_type_header): Use
3449 * name-lookup.h (cp_binding_level): Likewise.
3451 2004-01-26 Mark Mitchell <mark@codesourcery.com>
3454 * semantics.c (finish_for_expr): Check for unresolved overloaded
3457 * class.c (add_method): Just check processing_template_decl to
3458 determine whether or not we are within a template.
3459 * decl2.c (maybe_retrofit_in_chrg): Likewise.
3460 * init.c (decl_constant_value): Check the type of the declaration,
3462 * name-lookup.c (maybe_push_to_top_level): Rename to ...
3463 (push_to_top_level): ... this.
3464 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
3465 * pt.c (push_template_decl_real): Reorder condition for speed.
3466 (convert_template_argument): Use dependency-checking functions in
3467 place of uses_template_parms.
3468 (lookup_template_class): Avoid calling uses_template_parms more
3470 (uses_template_parms): Reimplement, using dependency-checking
3472 (instantiate_class_template): Use push_to_top_level, not
3473 maybe_push_to_top_level.
3474 (type_unification_real): Simplify.
3475 (type_dependent_expression_p): Handle OFFSET_REFs and
3477 (any_dependent_template_arguments_p): Handle multiple levels of
3479 * semantics.c (expand_or_defer_fn): Do not check
3480 uses_template_parms for template instantiations.
3481 * typeck.c (comptypes): Avoid calling cp_type_quals.
3483 2004-01-25 Mark Mitchell <mark@codesourcery.com>
3486 * call.c (build_over_call): Do not convert arguments when
3487 processing a template.
3488 * pt.c (build_non_dependent_expr): Do not build a
3489 NON_DEPENDENT_EXPR for arithmetic constants.
3491 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3494 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
3495 returns a TYPE_DECL. no further lookup is required.
3496 * semantics.c (check_template_template_default_arg): A TYPE_DECL
3497 is invalid. Rework to give better diagnostics.
3499 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3502 * pt.c (instantiate_class_template): Add an error_mark_node
3504 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
3506 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
3509 * decl.c (finish_function): Move the call to
3510 finish_fname_decls below the call to
3511 finish_eh_spec_block.
3513 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
3515 * optimize.c, typeck2.c: Update copyright.
3517 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
3519 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
3520 init.c, mangle.c, typeck.c: Update copyright.
3522 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
3524 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
3526 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
3528 * Make-lang.in: Replace $(docdir) with doc.
3529 (c++.info, c++.srcinfo): Dummy entry.
3530 (c++.man, c++.srcman): New rules.
3531 (c++.install-man): Revamp rule.
3533 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
3535 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
3536 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
3537 immediate $(shell) instead of deferred backquote.
3539 2004-01-19 Mark Mitchell <mark@codesourcery.com>
3542 * parser.c (cp_parser_postfix_expression): When encountering
3543 incomplete type on left-hand side of "->" or ".", treat the entire
3544 expression as erroneous.
3547 * call.c (build_field_call): Remove.
3548 (n_build_method_call): Likewise.
3549 (build_method_call): Likewise.
3550 (build_new_method_call): Do not call build_field_call.
3551 * class.c (n_build_method_call): Remove.
3552 (print_class_statistics): Do not print it.
3553 * cp-tree.h (build_method_call): Remove declaration.
3554 (finish_object_call_expr): Likewise.
3555 (build_new_1): Do not use build_method_call.
3556 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
3557 when the function appearing on the right-hand-side of "." or "->"
3558 is not actually a function.
3559 * pt.c (tsubst_copy_and_build): Likewise.
3560 * semantics.c (finish_object_call_expr): Remove.
3562 2004-01-18 Mark Mitchell <mark@codesourcery.com>
3565 * pt.c (tsubst): Use finish_typeof.
3567 2004-01-18 Jason Merrill <jason@redhat.com>
3570 * except.c (build_throw): In a template, set
3571 current_function_returns_abnormally.
3573 2004-01-17 Fred Fish <fnf@intrinsity.com>
3576 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
3577 except don't call array_type_nelts() with a VECTOR_TYPE.
3579 2004-01-16 Jan Hubicka <jh@suse.cz>
3581 * mangle.c (write_mangled_name): Remove inline modifier.
3583 2004-01-16 Mark Mitchell <mark@codesourcery.com>
3586 * decl.c (compute_array_index_type): Fix grammar in comment.
3587 * init.c (build_zero_init): Handle zero-sized arrays correctly.
3590 * call.c (name_as_c_string): Print conversion operator names
3594 * call.c (initialize_reference): Pass -1 for inner parameter to
3597 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3600 * parser.c (cp_parser_base_specifier): Check for an invalid
3601 keyword `typename' and emit an user-friendly error message.
3603 2004-01-15 Geoffrey Keating <geoffk@apple.com>
3606 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
3607 (handle_pragma_implementation): Likewise.
3609 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3612 * typeck.c (build_class_member_access_expr): Allow to access members
3613 of the currently open class.
3614 (finish_class_member_access_expr): Likewise.
3616 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
3619 * name-lookup.c (validate_nonmember_using_decl): Take scope and
3620 name by value, instead of computing them.
3621 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
3622 arguments. Pass them to validate_nonmember_using_decl.
3623 * name-lookup.h (do_local_using_decl): Adjust.
3624 (do_toplevel_using_decl): Likewise.
3625 * parser.c (cp_parser_using_declaration): Likewise.
3626 * pt.c (tsubst_expr): Likewise.
3628 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
3632 * name-lookup.c (qualified_lookup_using_namespace): Search
3633 strongly-associated namespaces first, and only then try other
3636 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
3638 * Make-lang.in (c++.srcextra): Dummy entry.
3640 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3643 * parser.c (cp_parser_template_name): Don't try to parse a
3644 conversion-function-id, as it cannot be a template-name.
3645 (cp_parser_simple_type_specifier): Check for invalid template-ids
3646 even after a built-in type.
3648 2004-01-14 Jan Hubicka <jh@suse.cz>
3651 * pt.c (instantiate_decl): Do not increase function_depth.
3653 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
3657 * parser.c (cp_parser_elaborated_type_specifier): Warn about
3658 attributes and discard.
3659 * decl.c (xref_tag): Don't overwite existing attributes with
3662 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3665 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
3666 is no destructor while looking up a BIT_NOT_EXPR.
3668 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
3670 * cxxfilt.c: Remove unused file.
3672 2004-01-14 Jan Hubicka <jh@suse.cz>
3674 Partial fix to PR c++/12850
3675 * decl2.c (mark_used): Do not proactively instantiate templates
3676 when compiling in unit-at-a-time or not optimizing.
3677 * optimize.c (maybe_clone_body): Do not increase function depth.
3679 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3682 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
3684 2004-01-12 Steven Bosscher <stevenb@suse.de>
3687 * parser.c (cp_parser_member_declaration): Any non-type is also
3688 not a class or a function.
3690 2004-01-12 Jason Merrill <jason@redhat.com>
3693 * class.c (build_base_path): Do not mark vtable references as
3695 (build_vtbl_ref_1): Likewise.
3697 2004-01-12 Richard Henderson <rth@redhat.com>
3700 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
3701 (store_init_value): Use it.
3702 * decl.c (check_initializer): Expect full initialization code
3703 from store_init_value.
3704 * init.c (expand_aggr_init_1): Likewise.
3705 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
3707 2004-01-12 Mark Mitchell <mark@codesourcery.com>
3709 * class.c (layout_class_type): For non-POD class types, also copy
3710 the DECL_SIZE and DECL_MODE of fields to the base class type.
3712 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3715 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
3716 calling regenerate_decl_from_template.
3718 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
3721 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
3722 decl-specifier occurring along with a class definition.
3724 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
3726 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
3727 clauses to comments describing declares_class_or_enum.
3728 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
3731 2004-01-12 Jan Hubicka <jh@suse.cz>
3733 * pt.c (for_each_template_parm): Do not check for duplicates.
3734 (for_each_template_parm): Use walk_tree duplicate checking code.
3736 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
3739 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
3740 is error_mark_node, don't add any more decl_specs.
3741 (cp_parser_init_declarator): After committing to a declaration, if
3742 the decl_specifiers start with error_mark_node, issue an error and
3743 change the type to "int".
3745 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
3748 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
3750 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3754 * pt.c (tsubst): Substitution must fail if we are attempting to
3755 create an array with element type that is an abstract class type.
3756 * decl.c (cp_finish_decl): Strip pointers and array types recursively
3757 before calling abstract_virtuals_error.
3759 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
3761 * name-lookup.c (qualified_lookup_using_namespace): Consider
3762 strong using directives even if we've already found a binding.
3764 2004-01-09 Mark Mitchell <mark@codesourcery.com>
3766 * cp-tree.h (cxx_expand_expr): Change prototype.
3767 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
3769 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3772 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
3773 looking into them recursively. They can be there because of the
3774 new __offsetof__ extension.
3776 2004-01-07 Zack Weinberg <zack@codesourcery.com>
3778 * parser.c (cp_parser_save_member_function_body): Mark the
3781 2004-01-05 Mark Mitchell <mark@codesourcery.com>
3784 * class.c (build_clone): Copy type attributes from the original
3785 function to the clone.
3788 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
3789 references as constant.
3792 * parser.c (cp_parser_explicit_instantiation): Improve error
3794 (cp_parser_require): Improve indication of the error location.
3797 * parser.c (cp_parser_class_head): Reorder logic to check for
3798 invalid qualification.
3800 2004-01-04 Mark Mitchell <mark@codesourcery.com>
3803 * name-lookup.c (lookup_using_namespace): Remove spacesp
3805 (unqualified_namespace_lookup): Likewise.
3806 (lookup_qualified_name): Adjust accordingly.
3807 (lookup_name_real): Likewise.
3808 (lookup_arg_dependent): Do not eliminate the namespace of the
3809 functions found by unqualified name lookup unless that is the
3812 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
3814 * semantics.c (push_deferring_access_checks): Fix format.
3815 (resume_deferring_access_checks): Likewise.
3816 (stop_deferring_access_checks): Likewise.
3817 (pop_deferring_access_checks): Likewise.
3818 (get_deferred_access_checks): Likewise.
3819 (pop_to_parent_deferring_access_checks): Likewise.
3820 (perform_deferred_access_checks): Likewise.
3821 (perform_or_defer_access_check): Likewise.
3823 2004-01-04 Richard Henderson <rth@redhat.com>
3825 * call.c (build_over_call): Don't create a save_expr of an
3826 aggregate, but rather its address.
3828 2004-01-04 Mark Mitchell <mark@codesourcery.com>
3831 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
3832 an offsetof expression.
3834 * parser.c (cp_parser_parameter_declaration): Fix comment.
3837 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
3838 (reference_binding): Set it when appropriate.
3839 (build_temp): New function, split out from ...
3840 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
3841 (initialize_reference): Likewise.
3844 * parser.c (cp_parser): Add in_type_id_in_expr_p.
3845 (cp_parser_new): Initialize it.
3846 (cp_parser_postfix_expression): Set it.
3847 (cp_parser_sizeof_operand): Likewise.
3848 (cp_parser_parameteR_declaration): Do not commit early to tenative
3849 parsers when in_type_id_in_expr_p is set.
3851 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3854 * parser.c (cp_parser_template_argument): Don't call
3855 make_unbound_class_template directly.
3856 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
3857 UNBOUND_CLASS_TEMPLATE tree node.
3859 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
3862 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
3864 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3867 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
3868 (DECL_FUNCTION_TEMPLATE_P): Use it.
3869 (DECL_CLASS_TEMPLATE_P): Likewise.
3870 * parser.c (cp_parser_lookup_name): Add is_template parameter.
3871 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
3872 (cp_parser_template_name): Likewise.
3873 (cp_parser_elaborated_type_specifier): Likewise.
3874 (cp_parser_namespace_name): Likewise.
3875 (cp_parser_class_name): Likewise.
3876 (cp_parser_lookup_name_simple): Likewise.
3878 See ChangeLog.3 for earlier changes.