1 2004-08-04 Geoffrey Keating <geoffk@apple.com>
3 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_ASSEMBLER_NAME rather
4 than passing it as a parameter to rest_of_decl_compilation.
5 * decl2.c (grokfield): Use set_user_assembler_name.
7 2004-08-04 Nathan Sidwell <nathan@codesourcery.com>
9 * decl.c (complete_array_type): Don't gratuitously copy
10 maxindex. Its type is always set.
12 2004-08-04 Paul Brook <paul@codesourcery.com>
14 * Make-lang.in (cp/semantics.o, cp/optimize.o): Depend on TARGET_H.
15 * cp-tree.h (struct language_function): Rename x_dtor_label to
17 (dtor_label): Rename ...
18 (cdtor_label): ... to this.
19 * decl.c (begin_constructor_body): Remove.
20 (check_special_function_return_type): Maybe change the return type.
21 (grokdeclarator): Pass the class type.
22 (start_preparsed_function): Constructors may need a return label.
23 (finish_constructor_body, finish_destructor_body): Set the return
25 (begin_function_body): Don't call begin_constructor_body.
26 (finish_function): Don't warn for constructors or destructors.
27 (implicitly_declare_fn): Maybe change the return type.
28 * optimize.c: Include target.h.
29 (maybe_clone_body): Remap the function result.
30 * semantics.c: Include target.h.
31 (finish_return_stmt): Maybe jump to return label for constructors.
33 2004-08-03 Mark Mitchell <mark@codesourcery.com>
35 * class.c (build_vtable): Do not set DECL_VISIBILITY here.
36 (check_field_decls): Or here.
37 (check_methods): Or here.
38 (initialize_array): Don't mess with DECL_CONTEXT.
39 * cp-tree.h (start_decl): Adjust prototype.
40 (determine_visibility): New function.
41 * decl.c (duplicate_decls): Remove checks for hidden "operator
43 (build_library_fn_1): Give all library functions default
45 (start_decl): Add pop_scope_p parameter. Tidy.
46 (cp_finish_decl): Do not pop scopes here. Call
47 determine_visibility for variable definitions.
48 (start_preparsed_function): Call determine_visibility.
49 * decl2.c (determine_visibility): New function.
50 * method.c (use_thunk): Fix formatting.
51 * parser.c (cp_parser_condition): Adjust calls to start_decl.
52 (cp_parser_init_declarator): Likewise.
53 * pt.c (instantiate_decl): Always call pop_nested_class.
54 * rtti.c (get_tinfo_decl): Do not set DECL_VISIBILITY.
55 (tinfo_base_init): Likewise.
57 2004-08-02 Mark Mitchell <mark@codesourcery.com>
60 * name-lookup.c (validate_nonmember_using_decl): Robustify.
62 2004-08-01 Mark Mitchell <mark@codesourcery.com>
65 * name-lookup.c (decl_namespace): Remove.
66 (current_decl_namespace): Use decl_namespace_context instead of
68 (push_decl_namespace): Likewise.
69 (arg_assoc_class): Likewise.
70 (arg_assoc_type): Likewise.
71 * pt.c (check_specialization_namespace): New function.
72 (maybe_process_partial_specialization): Use it.
73 (register_specialization): Likewise.
76 * cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): New macro.
77 * call.c (null_ptr_cst_p): Handle variables with constant
79 * pt.c (convert_nontype_argument): Use
80 DECL_INTEGRAL_CONSTANT_VAR_P.
81 * semantics.c (finish_id_expression): Likewise.
84 * decl.c (duplicate_decls): Reject duplicate namespace
88 * typeck.c (build_ptrmemfunc): Loosen assertion.
90 2004-08-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
92 * call.c (z_candidate::template_decl): Rename from template.
93 (add_template_candidate_real): Adjust member reference.
96 2004-07-29 Mark Mitchell <mark@codesourcery.com>
98 * cp-tree.h (IDENTIFIER_REPO_CHOSEN): Define.
99 (lang_decl_flags): Narrow the width of "languages". Add
101 (DECL_NEEDED_P): Remove.
102 (FOR_EACH_CLONE): New macro.
103 (DECL_REPO_AVAILABLE_P): Likewise.
104 (DECL_TINFO_P): Likewise.
105 (set_linkage_according_to_type): Declare.
106 (import_export_vtable): Remove.
107 (import_export_tinfo): Likewise.
108 (mark_needed): New function.
109 (decl_needed_p): Likewise.
110 (note_vauge_linkage_fn): Likewise.
111 (init_repo): Change prototype.
112 (repo_template_used): Remove.
113 (repo_template_instantiated): Likewise.
114 (repo_emit_p): New function.
115 (repo_export_class_p): Likewise.
116 (no_linkage_check): Change prototype.
117 * class.c (set_linkage_according_to_type): New function.
118 (build_vtable): Use it. Do not call import_export_vtable. Set
119 DECL_IGNORED_P if appropriate.
120 * decl.c (duplicate_decls): Preserve DECL_REPO_AVAILABLE_P.
121 (make_rtL_for_nonlocal_decls): Check for template instantiations
123 (grokfndecl): Adjust call to no_linkage_check.
124 (set_linkage_for_static_data_member): New function.
125 (grokvardecl): Use it. Adjust call to no_linkage_check.
126 (grokdeclarator): Use set_linkage_for_static_data_member.
127 * decl2.c (note_vague_linkage_fn): New function.
128 (note_vague_linkage_var): Likewise.
129 (finish_static_data_member_decl): Use it.
130 (import_export_vtable): Remove.
131 (import_export_class): Use repo_export_class_p.
132 (var_finalized_p): Simplify.
133 (maybe_emit_vtables): Simplify.
134 (mark_needed): New function.
135 (decl_needed_p): Likewise.
136 (import_export_decl): Add documentation and consistency checks.
137 Use repo_emit_p. Handle virtual tables and RTTI information
139 (import_export_tinfo): Remove.
140 (write_out_vars): Call import_export_decl.
141 (cxx_callgraph_analyze_expr): Ensure that all vtables are emitted
143 (finish_file): Use decl_needed_p. Do not call import_export_decl
144 for undefined static data members. Do not warn about undefined
145 inlines when using a repository.
146 (mark_used): Use note_vague_linkage_fn. Always defer template
148 * lex.c (cxx_init): Adjust call to init_repo. Always set
150 * method.c (synthesize_method): Remove unncessary
151 import_export_decl call.
152 (implicitly_declare_fn): Use set_linkage_according_to_type.
153 * optimize.c (maybe_clone_body): Use FOR_EACH_CLONE.
154 * pt.c (instantiate_class_template): Don't redundantly add classes
155 to keyed_classes. Don't call repo_template_used.
156 (tsubst_decl): Set DECL_INTERFACE_KNOWN for instantiations of
157 templates with internal linkage.
158 (check_instantiated_args): Adjust call to no_linkage_check.
159 (instantiate_template): Use FOR_EACH_CLONE.
160 (mark_definable): New function.
161 (mark_decl_instantiated): Use it.
162 (do_decl_instantiation): Adjust tests for explicit instantiation
163 after "extern template".
164 (instantiate_class_member): Do not use repo_template_instantiated.
165 (do_type_instantiation): Simplify.
166 (instantiate_decl): Use mark_definable. Check repo_emit_p.
168 * repo.c (repo_get_id): Remove.
169 (original_repo): Remove.
170 (IDENTIFIER_REPO_USED): Remove.
171 (IDENTIFIER_REPO_CHOSEN): Remove.
172 Remove all #if 0'd code.
173 (repo_template_used): Remove.
174 (repo_template_instantiated): Remove.
175 (temporary_obstack_initialized_p): New variable.
176 (init_repo): Register with lang_post_pch_load. Avoid creating
177 identifiers unnecessarily. Don't use original_repo. Close the
179 (reopen_repo_file_for_write): Not here.
180 (finish_repo): Always write out a new repository file.
181 (repo_emit_p): New function.
182 (repo_export_class_p): Likewise.
183 * rtti.c (get_tinfo_decl): Use set_linkage_according_to_type.
184 (involves_incomplete_p): New function.
185 (tinfo_base_init): Use it.
186 (ptr_initializer): Remove non_public_ptr parameter.
187 (ptm_initializer): Likewise.
188 (get_pseudo_ti_init): Likewise.
189 (unemitted_tinfo_decl_p): Remove.
190 (emit_tinfo_decl): Use import_export_decl.
191 * semantics.c (expand_body): Move updates of static_ctors and
193 (expand_or_defer_fn): ... here.
194 * tree.c (no_linkage_check): Add relaxed_p parameter.
196 2004-07-28 Eric Christopher <echristo@redhat.com>
198 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
200 2004-07-28 Nathan Sidwell <nathan@codesourcery.com>
202 * cp-tree.h (struct tree_pair_s): New.
203 (typedef tree_pair_p): New.
204 (DEF_VEC_O(tree_pair_s)): New.
205 (struct lang_type_class): Make vcall_indices a VEC(tree_pair_s).
206 (CLASSTYPE_VCALL_INDICES): Update documentation.
207 * class.c (get_vcall_index): Adjust.
208 (add_vcall_offset): Adjust.
210 2004-07-27 Kelley Cook <kcook@gcc.gnu.org>
212 * pt.c, typeck.c: Remove spurious carriage returns.
214 2004-07-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
217 * pt.c (coerce_template_template_parms) <PARM_DECL case>: Only check
218 when the type of ARG is not dependent.
220 2004-07-26 Geoffrey Keating <geoffk@apple.com>
222 * g++spec.c (LIBSTDCXX_PROFILE): Default to LIBSTDCXX.
223 (lang_specific_driver): If the C++ or math library options don't
224 start with '-l', don't count them as added libraries.
226 2004-07-26 Nathan Sidwell <nathan@codesourcery.com>
228 * decl.c (xref_basetypes): Adjust base access vector creation.
229 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Adjust base
231 * search.c (dynamic_cast_base_recurse, dfs_access_in_type): Likewise.
233 2004-07-26 Niall Douglas <s_fsfeurope2@nedprod.com>
234 Brian Ryner <bryner@brianryner.com>
238 * class.c (check_field_decls): Apply hidden visibility if
239 -fvisibility-inlines-hidden and inlined unless otherwise specified
240 (build_vtable): Set vtable visibility to class visibility.
241 (check_field_decls): Default static member visibility to class
243 (check_methods): Default method visibility to class visibility.
244 * cp-tree.h: Added CLASSTYPE_VISIBILITY and
245 CLASSTYPE_VISIBILITY_SPECIFIED macro.
246 * decl.c (duplicate_decls): New logic for merging definition decls
247 with declaration decls. Added ignore & warning when non default
248 applied to global operator new or delete.
249 * method.c, optimize.c, rtti.c: Added setting of VISIBILITY_SPECIFIED
250 wherever VISIBILITY was changed
251 * rtti.c (get_tinfo_decl): Set typeinfo visibility to class
253 (tinfo_base_init): Set typeinfo name visibility to class visibility.
255 2004-07-25 Bernardo Innocenti <bernie@develer.com>
257 * decl.c: Rename all identifiers named `class' to `cl'.
258 * cp-tree.h: Likewise.
260 2004-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
262 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Use GGC_CNEW.
263 * typeck2.c (abstract_virtuals_error): Use GGC_NEW.
264 * name-lookup.c (binding_entry_make): Use GGC_NEW.
265 (binding_table_construct): Use GGC_CNEWVEC.
266 (binding_table_new): Use GGC_NEW.
267 (cxx_binding_make): Likewise.
268 (begin_scope): Likewise.
269 (push_to_top_level): Use GCC_CNEW.
270 * parser.c (cp_token_cache_new): Likewise.
271 (cp_token_cache_push_token): Likewise.
272 (cp_lexer_new_main): Likewise.
273 (cp_lexer_new_from_tokens): Likewise.
274 (cp_parser_context_new): Likewise.
275 (cp_parser_new): Likewise.
276 (cp_lexer_new_from_tokens): Use GGC_NEWVEC.
277 * lex.c (cxx_make_type): Use GGC_CNEW.
278 (retrofit_lang_decl): Use GGC_NEWVAR.
279 (cxx_dup_lang_specific_decl): Likewise.
280 (copy_lang_type): Likewise.
281 * decl.c (use_label): Use GGC_NEW instead of ggc_alloc.
282 (save_function_data): Likewise.
283 (lookup_label): Use GGC_CNEW instead of ggc_alloc_cleared.
284 (cxx_push_function_context): Likewise.
286 2004-07-25 Richard Henderson <rth@redhat.com>
288 * decl.c (start_preparsed_function): Set DECL_ARTIFICIAL and
289 DECL_IGNORED_P on RESULT_DECL.
290 * semantics.c (finalize_nrv): Copy them too.
292 2004-07-23 Nathan Sidwell <nathan@codesourcery.com>
294 * search.c (lookup_conversion_operator): Avoid two loops.
295 (add_conversions): Remove.
296 (check_hidden_convs, split_conversions,
297 lookup_conversions_r): New.
298 (lookup_conversions): Use lookup_conversions_r.
300 2004-07-22 Nathan Sidwell <nathan@codesourcery.com>
302 * pt.c (get_template_base): Check type is completable.
304 2004-07-21 Eric Christopher <echristo@redhat.com>
306 * decl.c (poplevel): Inline unused variable checking.
309 2004-07-21 Paolo Bonzini <bonzini@gnu.org>
311 * typeck.c (build_binary_op): Do not use RDIV_EXPR for
314 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
317 * pt.c (check_explicit_specialization): Remove extension to accept
318 specializations without template headers. Fall-through to normal
321 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
324 * pt.c (determine_specialization): New parameter template_count.
325 Disambiguate between member templates and member functions counting
326 the template headers.
327 (check_explicit_specialization): Update caller.
328 (tsubst_friend_function): Likewise.
330 2004-07-20 Steven Bosscher <stevenb@suse.de>
332 * cp-tree.def (TINST_LEVEL): Make it an 'x' node.
333 * cp-tree.h (tinst_level_t): New tree type.
334 (union lang_tree_node): Handle it.
335 (TINST_LOCATION): New accessor macro.
336 (make_tinst_level): New prototype.
337 * cp-lang.c (cp_tree_size): Handle TINST_LEVEL.
338 * decl.c (cp_tree_node_structure): Likewise.
339 * error.c (print_instantiation_full_context): Use TINST_LOCATION.
340 (print_instantiation_partial_context): Likewise.
341 * pt.c (pop_tinst_level): Likewise.
342 (push_tinst_level): Use make_tinst_level.
343 * tree.c (make_tinst_level): New function.
344 (cp_walk_subtrees): Walk TINST_DECL for a TINST_LEVEL node.
346 2004-07-20 Mark Mitchell <mark@codesourcery.com>
348 * parser.c (cp_parser_simple_type_specifier): Fix typo.
351 * parser.c (cp_parser_simple_type_specifier): Do not record usage
352 of globally-qualified names.
354 2004-07-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
357 * error.c (dump_type) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Output
360 2004-07-19 Mark Mitchell <mark@codesourcery.com>
363 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
364 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
365 * class.c (add_implicitly_declared_members): Use
366 CLASSTYPE_LAZY_ASSIGNMENT_OP.
367 * method.c (lazily_declare_fn): Clear
368 CLASSTYPE_LAZY_ASSIGNMENT_OP.
369 * search.c (lookup_fnfields_1): Check it.
371 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
373 * cp-tree.h (vec_binfo_member): Remove.
374 * tree.c (vec_binfo_member): Remove.
376 * cp-tree.h (struct lang_type_class): Remove vfields field.
377 (CLASSTYPE_VFIELDS): Remove.
378 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
379 * class.c (determine_primary_base): Remove CLASSTYPE_VFIELDS
381 (dfs_modify_vtables): Use TYPE_CONTAINS_VPTR_P.
382 (finish_struct_1): Remove CLASSTYPE_VFIELDS handling.
383 * init.c (dfs_initialize_vtbl_ptrs): Use TYPE_CONTAINS_VPTR_P.
385 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
387 * cp-tree.h (DEF_VEC_P(tree)): Remove here.
388 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
390 (BINFO_LANG_SLOTS): Remove.
391 * tree.c (copy_binfo): Adjust BINFO creation and accessors.
392 * decl.c (xref_basetypes): Adjust BINFO creation and accessors.
393 * class.c (check_bases): Adjust BINFO accessors.
394 (determine_primary_base, finish_struct_bits,
395 maybe_warn_about_overly_private_class, warn_hidden,
396 walk_subobject_offsets, propagate_binfo_offsets, end_of_class,
397 warn_about_ambiguous_bases, get_vfield_name,
398 dump_class_hierarchy_r, build_vtt_inits, accumulate_vtbl_inits,
399 add_vcall_offset_vtbl_entries_r): Likewise.
400 * dump.c (cp_dump_tree): Likewise.
401 * init.c (sort_mem_initializers, expand_member_init, build_delete,
402 push_base_cleanups): Likewise.
403 * method.c (do_build_copy_constructor, do_build_assign_ref,
404 synthesize_exception_spec): Likewise.
405 name-lookup.c (arg_assoc_class): Likewise.
406 * pt.c (instantiate_class_template,
407 get_template_base_recursive): Likewise.
408 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Likewise.
409 * typeck2.c (process_init_constructor): Likewise.
410 * search.c (lookup_base_r, dynamic_cast_base_recurse,
411 dfs_access_in_type, dfs_walk_real, look_for_overrides,
412 types_overlap_p, copied_binfo, original_binfo): Likewise.
413 (binfo_for_vtable): Remove
415 2004-07-20 Steven Bosscher <stevenb@suse.de>
417 * cp-tree.h (struct lang_decl_flags): Unify the template_info and
418 thunk_alias, and the access and virtual_offset fields.
419 (THUNK_VIRTUAL_OFFSET, THUNK_ALIAS): Adjust.
420 * decl.c (finish_case_label): Update c_add_case_node call.
422 2004-07-19 Mark Mitchell <mark@codesourcery.com>
424 Revert patch for PR c++/16623.
426 2004-07-19 Kelley Cook <kcook@gcc.gnu.org>
428 * except.c: Remove two spurious carriage returns.
430 2004-07-19 Mark Mitchell <mark@codesourcery.com>
433 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
434 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
435 * class.c (add_implicitly_declared_members): Use
436 CLASSTYPE_LAZY_ASSIGNMENT_OP.
437 * method.c (lazily_declare_fn): Clear
438 CLASSTYPE_LAZY_ASSIGNMENT_OP.
439 * search.c (lookup_fnfields_1): Check it.
441 2004-07-19 Nathan Sidwell <nathan@codesourcery.com>
443 * class.c (add_method): Delay adding the slot until the end.
444 (determine_primary_base): Adjust VEC_iterate invokation.
445 (resort_type_method_vec, finish_struct_methods, warn_hidden,
446 walk_subobject_offsets, end_of_class, warn_about_ambiguous_bases,
447 build_vtbl_initializer): Likewise.
448 * init.c (sort_mem_initializers, build_delete, push_base_cleanups,
449 build_vbase_delete): Likewise.
450 * method.c (do_build_copy_constructor): Likewise.
451 * name-lookup.c (new_class_binding, print_binding_level,
452 poplevel_class, store_class_bindings, push_to_top_level,
453 pop_from_top_level): Likewise.
454 * pt.c (check_explicit_specialization): Likewise.
455 * search.c (lookup_conversion_operator, lookup_fnfields_1,
456 get_pure_virtuals, add_conversions, dfs_check_overlap,
457 binfo_for_vbase): Likewise.
459 2004-07-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
462 * pt.c (unify) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Use only
463 innermost set of template arguments during deduction. Simplify.
465 2004-07-19 Joseph S. Myers <jsm@polyomino.org.uk>
467 * typeck.c (build_modify_expr, build_x_modify_expr): Set
468 TREE_NO_WARNING on assignments with an operator other than '='.
470 2004-07-10 Steven Bosscher <stevenb@suse.de>
471 Joseph S. Myers <jsm@polyomino.org.uk>
473 * cp-tree.h (C_SET_EXP_ORIGINAL_CODE): Remove.
474 * decl2.c (grokfield): Don't check current_class_depth via
475 unused TREE_COMPLEXITY.
476 * semantics.c (finish_parenthesized_expr): Set TREE_NO_WARNING
477 to avoid the missing parentheses warning.
478 Don't set C_SET_EXP_ORIGINAL_CODE.
480 2004-07-18 Mark Mitchell <mark@codesourcery.com>
482 * tree.c (no_linkage_helper): Remove.
483 (no_linkage_check): Don't use walk_tree_without_duplicates.
485 * mangle.c (write_expression): Issue a sorry for zero-operand
488 2004-07-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
491 * init.c (build_offset_ref): Build SCOPE_REF with non-null
492 TREE_TYPE for non-dependent names.
493 * typeck.c (build_x_unary_op): Handle non-dependent SCOPE_REF.
494 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
495 unknown_type_node as its TREE_TYPE.
496 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
497 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
498 (dump_expr) <SCOPE_REF case>: Likewise.
500 2004-07-17 Jason Merrill <jason@redhat.com>
503 * call.c (type_passed_as): Make the invisible reference type
505 * cp-gimplify.c (gimplify_cleanup_stmt): Rename to
506 cp_genericize_r. Handle invisible reference lowering.
507 (is_invisiref_parm): New fn.
508 (cp_genericize): Adjust the types of invisible reference parms.
509 Don't repeat the walk for clones.
510 * decl.c (store_parm_decls): Don't generate any code for clones.
512 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
514 * cp-tree.h (builtin_function): Declare.
516 2004-07-16 Mark Mitchell <mark@codesourcery.com>
518 * class.c (finish_struct_methods): Remove unncessary code.
519 (add_implicitly_declared_members): Create declarations for default
520 constructors and copy constructors lazily.
521 * cp-tree.h (lang_type_class): Remove lazy_default_ctor and
523 (CLASSTYPE_LAZY_DEFAULT_CTOR): New macro.
524 (CLASSTYPE_LAZY_COPY_CTOR): Likewise.
525 * decl2.c (check_classfn): Robustify.
526 (locate_dtor): Handle empty CLASSTYPE_METHOD_VEC.
527 (locate_ctor): Handle lazy default constructors.
528 (locate_copy): Handle lazy copy constructors.
529 (implicitly_declare_fn): Make sure we're looking at the
530 TYPE_MAIN_VARIANT for a class before creating functions. Don't
531 set TYPE_HAS_CONSTRUCTOR.
532 (lazily_declare_fn): New function.
533 * name-lookup.c (constructor_name_full): Simplify.
534 * search.c (lookup_fnfields_1): Lazily create methods, as
536 (lookup_for_overrides): Handle empty CLASSTYPE_METHOD_VEC.
538 2004-07-16 Steven Bosscher <stevenb@suse.de>
540 * cp-tree.h (struct lang_type): Don't have three GTY options on a
543 2004-07-16 Richard Henderson <rth@redhat.com>
545 * cp-lang.c (LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING): Die.
546 * cp-tree.h (cp_copy_res_decl_for_inlining): Remove.
547 * tree.c (cp_copy_res_decl_for_inlining): Remove.
549 2004-07-16 Nathan Sidwell <nathan@codesourcery.com>
551 * class.c (finish_struct_bits): Use for loop.
552 (propagate_binfo_offsets): Do primary binfo outside of loop.
555 * dump.c (cp_dump_tree): Don't dump the bases if there's no
558 * pt.c (tsubst) <TREE_BINFO case>: We should never get here.
560 2004-07-15 Mark Mitchell <mark@codesourcery.com>
562 * cp-tree.h (lang_type_class): Remove has_real_assign_ref and
563 has_abstract_assign_ref. Make methods a VEC(tree) *.
564 (TYPE_HAS_CONST_ASSIGN_REF): Add documentation.
565 (CLASSTYPE_CONSTRUCTORS): Adjust for changes to CLASSTYPE_METHOD_VEC.
566 (CLASSTYPE_DESTRUCTORS): Likewise.
567 (TYPE_HAS_REAL_ASSIGN_REF): Remove.
568 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
569 (add_method): Change prototoype.
570 * class.c (add_method): Remove error_p parameter. Adjust for
571 changes to CLASSTYPE_METHOD_VEC.
572 (handle_using_decl): Adjust call to add_method.
573 (maybe_warn_about_overly_private_class): Adjust for
574 changes to CLASSTYPE_METHOD_VEC.
575 (resort_type_method_vec): Likewise.
576 (finish_struct_methods): Likewise.
577 (check_for_override): Likewise.
578 (warn_hidden): Likewise.
579 (add_implicitly_declared_members): Defer creation of assignment
580 operators. Adjust call to add_method.
581 (clone_function_decl): Adjust call to add_method.
582 (check_bases_and_members): Don't set TYPE_HAS_REAL_ASSIGN_REF.
583 (finish_struct_1): Use CLASSTYPE_DESTRUCTORS.
584 * decl.c (grok_special_member_properties): Don't set
585 TYPE_HAS_ABSTRACT_ASSIGN_REF.
586 * decl2.c (check_classfn): Adjust for
587 changes to CLASSTYPE_METHOD_VEC.
588 * method.c (locate_dtor): Use CLASSTYPE_DESTRUCTORS.
589 (locate_ctor): Use CLASSTYPE_CONSTRUCTORS.
590 (locate_copy): Adjust for changes to CLASSTYPE_METHOD_VEC.
591 (implicitly_declare_fn): Set DECL_SOURCE_LOCATION. Do not call
593 * pt.c (check_explicit_specialization): Adjust for
594 changes to CLASSTYPE_METHOD_VEC.
595 (instantiate_class_template): Do not set
596 TYPE_HAS_ABSTRACT_ASSIGN_REF.
597 * ptree.c (cxx_print_type): Don't try to print
598 CLASSTYPE_METHOD_VEC.
599 * rtti.c (emit_support_tinfos): Use CLASSTYPE_DESTRUCTORS.
600 * search.c (lookup_field_r): Adjust for
601 changes to CLASSTYPE_METHOD_VEC.
602 (lookup_fnfields): Likewise.
603 (lookup_conversion_operator): Likewise.
604 (lookup_fnfields_1): Likewise. Create assignment operators
606 (look_for_overrides_here): Adjust for
607 changes to CLASSTYPE_METHOD_VEC.
608 (add_conversions): Likewise.
609 * semantics.c (finish_member_declaration): Adjust call to add_method.
611 2004-07-15 Jason Merrill <jason@redhat.com>
613 * cp-lang.c (cxx_types_compatible_p): To the middle-end,
614 references and pointers are compatible.
616 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
618 * decl.c (xref_basetypes): Refactor.
619 * tree.c (copy_base_binfos): Replace with ...
620 (copy_binfo): ... this. Deep copy the given binfo, (not the just
621 bases of the given base).
622 * cp-tree.h (copy_base_binfo): Remove.
623 (copy_binfo): Declare.
625 2004-07-15 Mark Mitchell <mark@codesourcery.com>
627 * name-lookup.c (set_inherited_value_binding_p): Add class_type
629 (get_class_binding): Adjust.
630 (push_class_level_binding): Don't use set_inherited_value_binding_p.
632 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
634 * class.c (finish_struct_bits): Don't set TYPE_HAS_CONVERSION here.
635 * decl.c (xref_basetypes): Set it here.
637 * class.c (check_bases): Don't set CLASSTYPE_NON_AGGREGATE here.
638 Don't check for incomplete base.
639 (get_vfield_name): Simplify while loop.
640 * decl.c (xref_basetypes): Set CLASSTYPE_NON_AGGREGATE here.
642 2004-07-14 Mark Mitchell <mark@codesourcery.com>
644 * lex.c (cxx_make_type): Remove call to get_pointer_type.
646 * cp-tree.h (IDENTIFIER_VALUE): Remove.
647 (BINFO_PUSHDECLS_MARKED): Likewise.
648 (maybe_inject_for_scope_var): Likewise.
649 (push_class_decls): Likewise.
650 * name-lookup.h (push_class_binding): Remove.
651 (innermost_non_namespace_value): New function.
652 (outer_binding): Likewise.
653 * class.c (add_method): Push bindings before adding to
655 (restore_class_cache): Do not restore class_shadowed.
656 (pushclass): Do not add USING_DECLs. Do not call
658 * config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c.
659 * decl.c (pushdecl): Use outer_binding.
660 (poplevel): Set the scope for an out-of-scope for-loop declaration
662 (cp_finish_decl): Don't call maybe_inject_for_scope_var.
663 * name-lookup.c (new_class_binding): New function.
664 (push_binding): Use it.
665 (pushdecl): Use innermost_non_namespace_value.
666 (maybe_inject_for_scope_var): Remove.
667 (push_class_binding): Remove.
668 (set_inherited_value_binding_p): New function.
669 (get_class_binding): New function.
670 (push_class_level_binding): Assert that the current_class_type is
672 (outer_binding): New function.
673 (innermost_non_namespace_value): Likewise.
674 (lookup_name_real): Use outer_binding.
675 (lookup_name_current_level): Ignore out-of-scope variables.
676 * pt.c (check_template_shadow): Use innermost_non_namespace_value.
677 (lookup_template_class): Likewise.
678 * search.c (dfs_push_type_decls): Remove.
679 (dfs_push_decls): Likewise.
680 (setup_class_bindings): Likewise.
681 (lookup_field_1): Handle USING_DECLs from dependent scopes.
682 (marked_pushdecls_p): Remove.
683 (unmarked_pushdecls_p): Remove.
684 (marked_identifiers): Remove.
685 (setup_class_bindings): Remove.
686 (dfs_push_type_decls): Remove.
687 (dfs_push_decls): Remove.
688 (push_class_decls): Remove.
690 2004-07-13 Mark Mitchell <mark@codesourcery.com>
694 * decl.c (grokvardecl): Make declspecs parameter const.
695 (grokdeclarator): Likewise. Adjust accordingly.
696 * decl.h (grokdeclarator): Adjust declaration.
697 * parser.c (cp_parser_init_declarator): Do not clear
698 decl_specifiers->attributes.
700 * cp-tree.h (lang_identifier): Remove class_value.
701 (IDENTIFIER_CLASS_VALUE): Remove.
702 (pop_class_decls): Likewise.
703 (init_search_processing): Likewise.
704 * class.c (handle_using_decl): Use lookup_member, not
705 IDENTIFIER_CLASS_VALUE.
706 (restore_class_cache): New function, split out from ...
707 (pushclass): ... here. Do not call clear_identifier_class_values.
708 (invalidate_class_lookup_cache): Do not clear
709 IDENTIFIER_CLASS_VALUE.
710 (popclass): Do not call pop_class_decls.
711 (maybe_note_name_used_in_class): Do not save names looked up after
712 the class is complete. Use lookup_member, not
713 IDENTIFIER_CLASS_VALUE.
714 * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
715 * decl.c (cxx_init_decl_processing): Do not call
716 init_search_processing.
717 * method.c (do_build_copy_constructor): Remove unnecessary code.
718 (do_build_assign_ref): Likewise.
719 * name-lookup.c (pushdecl): Use lookup_member, not
720 IDENTIFIER_CLASS_VALUE.
721 (set_identifier_type_value_with_scope): Set TREE_TYPE on the
723 (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
724 (push_class_binding): Do not set it.
725 (clear_identifier_class_values): Remove.
726 (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
727 (store_binding): Do not save it.
728 (pop_from_top_level): Do not restore it.
729 * name-lookup.h (cxx_saved_binding): Remove class_value.
730 (clear_identifier_class_values): Remove.
731 * ptree.c (cxx_print_identifier): Do not print
732 IDENTIFIER_CLASS_VALUE.
733 * search.c (search_obstack): Remove.
734 (push_stack_level): Remove.
735 (pop_stack_level): Remove.
736 (search_level): Remove.
737 (search_stack): Remove.
738 (lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
739 (setup_class_bindings): Use IDENTIFIER_MARKED, not
740 IDENTIFIER_CLASS_VALUE.
741 (marked_identifiers): New variable.
742 (push_class_decls): Clear IDENTIFIER_MARKED.
743 (pop_class_decls): Don't call pop_search_level.
744 (init_search_processing): Remove.
746 2004-07-12 Mark Mitchell <mark@codesourcery.com>
748 * cp-tree.h (get_aggr_typedef): Remove.
749 * init.c (get_aggr_typedef): Likewise.
751 * name-lookup.c (push_class_level_binding): Simplify.
753 2004-07-12 Andrew Pinski <apinski@apple.com>
757 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
759 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
762 2004-07-12 Eric Christopher <echristo@redhat.com>
764 * parser.c (cp_parser_class_head): Remove unused variable.
766 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
768 * decl.c (grok_op_properties): Reject [de-]allocation functions
769 declared in a namespace, or declared as static.
771 2004-07-12 Nathan Sidwell <nathan@codesourcery.com>
773 * cp-tree.h (make_binfo): Remove.
774 * decl.c (xref_basetypes): Use make_tree_binfo directly.
775 * tree.h (copy_base_binfos): Likewise.
776 (make_binfo): Remove.
778 * call.c (build_user_type_conversion_1, build_new_op,
779 check_constructor_callable, build_temp,
780 perform_direct_initialization_of_possible): Pass type directly to
781 lookup_fnfields & build_special_member_call.
782 (build_special_member_call): Accept a type, and complete it.
783 * class.c (finish_stuct_bits): Copy the BINFOs here.
784 * cvt.c (ocp_convert): Pass type directly to
785 build_special_member_call.
786 * decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
787 (xref_basetypes): Allocate the binfo here. Adjust.
788 * init.c (build_init, build_new_1): Pass type directly to
789 build_special_member_call.
790 * lex.c (cxx_make_type): Do not allocate binfo here.
791 * name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
792 * parser.c (cp_parser_class_head): Always call xref_basetypes.
793 * pt.c (instantiate_class_template): Likewise. Inhibit access
794 checking for template friends.
795 * ptree.c (cxx_print_type): Adjust record printing.
796 * search.c (lookup_base): When taking a type, complete it before
798 (lookup_member): Delay completing a type.
799 (push_class_decls): Don't walk an incomplete type.
800 (lookup_conversions): Likewise.
801 * semantics.c (finish_stmt_expr_expr): Pass type directly to
802 build_special_member_call.
803 * tree.c (copy_base_binfos): Adjust.
804 (make_binfo): Likewise.
805 * typeck.c (build_modify_expr): Pass type directly to
806 build_special_member_call.
807 * typeck2.c (process_init_constructor): Check a binfo exists.
808 (build_m_component_ref): Allow accessing an incomplete type.
809 (build_functional_cast): Pass type directly to
810 build_special_member_call.
812 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
815 * config-lang.in (gtfiles): Add typeck2.c.
816 * Make-lang.in: Tweak typeck2.c dependencies, and add rule for
818 * cp-tree.h: Declare complete_type_check_abstract.
819 * typeck2.c (pat_calc_hash, pat_compare,
820 complete_type_check_abstract): New functions.
821 (abstract_virtuals_error): If the type is abstract, register the
822 declaration within abstract_pending_vars for further checks.
823 Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
824 * decl.c (cp_finish_decl): Do not strip array types.
825 (create_array_type_for_decl): Check for abstractness of the element
827 (complete_vars): Call complete_type_check_abstract.
828 * class.c (finish_struct): Prepare a list of virtual functions for
829 template types, and call complete_vars on it to check for abstractness.
831 2004-07-12 Paolo Bonzini <bonzini@gnu.org>
833 PR tree-optimization/14107
834 * decl.c (finish_function): Remove temporary band-aid.
836 2004-07-11 Mark Mitchell <mark@codesourcery.com>
838 * call.c (build_operator_new_call): Avoid using push_to_top_level.
839 (build_new_op): Adjust call to lookup_function_nonclass.
840 * name-lookup.c (identifier_type_value): Adjust call to
842 (lookup_name_real): Add block_p parameter.
843 (lookup_name_nonclass): Adjust call to lookup_name_real.
844 (lookup_function_nonclass): Likewise.
845 (lookup_name): Likewise.
846 * name-lookup.h (lookup_name_real): Change prototype.
847 (lookup_name_nonclass): Likewise.
848 * parser.c (cp_parser_lookup_name): Likewise.
850 * cp-tree.h (saved_scope): Make old_bindings a vector.
851 (unuse_fields): Remove.
852 * name-lookup.h (cxx_saved_binding): Define it.
853 * class.c (pushclass): Don't use unuse_fields.
854 * name-lookup.c (cxx_saved_binding_make): Remove.
855 (store_binding): Add new bindings to a vector, using an
856 accumulator style, rather than adding them to a list.
857 (store_bindings): Adjust accordingly.
858 (store_class_bindings): Likewise.
859 (push_to_top_level): Likewise.
860 (pop_from_top_level): Likewise.
861 * optimize.c (maybe_clone_body): Must push_to_top_level and
862 pop_from_top_level calls outside of loop.
863 * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope
864 calls here from cp_parser_late_parsing_default_args.
865 (cp_parser_save_default_args): Record the class type in which the
866 function is declared.
867 (cp_parser_late_parsing_default_args): Do not call
868 push_nested_class/pop_nested_class.
869 * search.c (dfs_unuse_fields): Remove.
870 (unuse_fields): Remove.
872 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
874 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
875 LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
876 * cp-tree.h (poplevel): Declare.
878 * decl.c (set_block): Remove.
880 2004-07-10 Mike Stump <mrs@apple.com>
882 * decl2.c (import_export_class): Never export/import vtables
883 with inline key functions.
885 2004-07-09 Steven Bosscher <stevenb@suse.de>
887 * typeck.c (c_expand_asm_operands): Remove.
889 2004-07-09 Mike Stump <mrs@apple.com>
891 * typeck.c (build_class_member_access_expr): Skip null deref
892 warning when we don't dereference it.
894 2004-07-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
898 * class.c (check_field_decls): Improve -Weffc++ warning: do not
899 warn for pointers to functions/members, or for classes without
902 2004-07-08 Mark Mitchell <mark@codesourcery.com>
904 * name-lookup.h (struct cp_binding_level): Update documentation
907 2004-07-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
910 * typeck.c (check_return_expr): Improve -Weffc++ warning: handle
911 returning CALL_EXPR, and non-reference return type.
913 2004-07-08 Nathan Sidwell <nathan@codesourcery.com>
915 * name-lookup.c (push_binding): Use VEC_reserve.
917 2004-07-08 Richard Henderson <rth@redhat.com>
919 * cp-tree.h (expand_eh_spec_block): Remove.
921 2004-07-07 Mark Mitchell <mark@codesourcery.com>
923 * cp-tree.h (saved_scope): Remove x_previous_class_type and
924 x_previous_class_values; add x_previous_class_level.
925 (previous_class_type): Remove.
926 (previous_class_values): Remove.
927 (previous_class_level): New macro.
928 * class.c (pushclass): Restore the identifier cache more
930 (invalidate_class_lookup_cache): Use vector for class_shadowed and
931 previous_class_values.
932 * decl.c (poplevel): Likewise.
933 * name-lookup.c (cxx_binding_init): New function.
934 (cxx_binding_make): Use it.
935 (push_binding): For a binding in a class level, use a vector of
936 cp_class_binding nodes.
937 (push_binding_level): New function.
938 (begin_scope): Use it.
939 (leave_scope): Do not put class binding levels on the free list.
940 (print_binding_level): Adjust for the fact that class_shadowed is
942 (poplevel_class): Likewise.
943 (clear_identifier_class_values): Likewise.
944 (push_class_level_binding): Likewise.
945 (set_class_shadows): Remove.
946 (store_binding): New function.
947 (store_class_bindings): New function.
948 (push_to_top_level): Use store_class_bindings as appropriate.
949 (pop_from_top_level): Use previous_class_level, not
951 * name-lookup.h (cp_class_binding): New type.
952 (cp_binding_level): Use a vector object for class_shadowed.
953 (push_binding_level): Declare.
954 (set_class_shadows): Remove.
956 2004-07-07 Andrew Pinski <apinski@apple.com>
958 * class.c (instantiate_type): BUFFER_REF is dead.
959 * lex.c (init_operators): IN_EXPR is dead.
961 2004-07-07 Jason Merrill <jason@redhat.com>
964 * call.c (build_new_op): Give overload warnings for built-in
967 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
970 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
973 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
975 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
976 * class.c (build_primary_vtable, check_bases,
977 determine_primary_base, finish_struct_bits,
978 maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
979 get_basefndecls, warn_hidden, walk_subobject_offsets,
980 build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
981 layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
982 finish_struct_1, get_vfield_name, contains_empty_class_p,
983 dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
984 dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
985 add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
987 * decl.c (xref_basetypes): Likewise.
988 * dump.c (cp_dump_tree): Likewise.
989 * error.c (dump_expr): Likewise.
990 * init.c (sort_mem_initializers, expand_member_init,
991 push_base_cleanups): Likewise.
992 * method.c (do_build_copy_constructor, do_build_assign_reg,
993 synthesize_exception_spec): Likewise.
994 * name-lookup.c (arg_assoc_class): Likewise.
995 * pt.c (instantiate_class_template, tsubst,
996 get_template_base_recursive): Likewise.
997 * ptree.c (cxx_print_type): Likewise.
998 * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
999 * search.c (lookup_base_r, dynamic_cast_base_recurse,
1000 dfs_access_in_type, access_in_type, lookup_field_queue_p,
1001 bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
1002 marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
1003 dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
1004 binfo_for_vtable, copied_binfo, original_binfo): Likewise
1005 * tree.c (copy_base_binfos, make_binfo): Likewise.
1006 * typeck.c (commmon_base_type): Likewise
1007 * typeck2.c (process_init_constructor): Likewise
1009 2004-07-06 Joseph S. Myers <jsm@polyomino.org.uk>
1011 * decl.c (check_tag_decl): Name redeclared type in diagnostic.
1013 2004-07-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1016 * pt.c (convert_nontype_argument): Disallow conversions between
1017 different enumeration types.
1019 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
1021 * cp-tree.h (BINFO_MARKED): Remove.
1022 (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
1023 BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
1024 BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
1025 (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
1026 * class.c (build_base_path): Use BINFO_VIRTUAL_P.
1027 (mark_primary_bases, determine_primary_base, base_derived_from,
1028 dfs_find_final_overrider, dfs_find_final_overrider_q,
1029 dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
1030 dfs_modify_vtables, walk_subobject_offsets,
1031 layout_nonempty_base_or_field, build_base_field,
1032 build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
1033 end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
1034 finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
1035 build_ctor_vtbl_group, accumulate_vtble_inits,
1036 dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
1037 build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
1038 add_vcall_offset_vtbl_entries_1): Likewise.
1039 * decl.c (xref_basetypes): Incomming virtual base indicated by
1041 * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
1042 * init.c (finish_init_stmts, sort_mem_initializers,
1043 emit_mem_initializers, build_vtble_address, expand_member_init,
1044 push_base_cleanups): Likewise.
1045 * method.c (do_build_copy_constructor): Likewise.
1046 * pt.c (instantiate_class_template,
1047 get_template_base_recursive): Likewise.
1048 * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
1049 get_pseudo_ti_desc): Likewise.
1050 * search.c (lookup_base_r, dynamic_cast_base_recurse,
1051 binfo_from_vbase, binfo_via_virtual, copied_binfo,
1052 original_binfo): Likewise.
1053 * semantics.c (finish_base_specifier): Virtualness is indicated
1055 * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
1057 2004-07-06 Mark Mitchell <mark@codesourcery.com>
1060 2004-06-24 Jason Merrill <jason@redhat.com>
1062 * decl.c (grokparms): Give the PARM_DECL reference type if the
1063 parameter is passed by invisible reference.
1065 2004-07-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1067 * cp-lang.c (cp_var_mod_type_p): Add extra arg.
1068 * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
1069 * pt.c (check_instantiated_args, unify): Likewise.
1071 2004-07-05 Phil Edwards <phil@codesourcery.com>
1073 * Make-lang.in (check-c++, lang_checks): Add some comments.
1075 2004-07-05 Zack Weinberg <zack@codesourcery.com>
1077 * cp-mudflap.c: Delete file.
1078 * Makefile.in: Remove all references to cp-mudflap.o.
1080 2004-07-05 Zack Weinberg <zack@codesourcery.com>
1082 * decl.c (cxx_init_decl_processing): Call
1083 build_common_tree_nodes before creating the global NAMESPACE_DECL.
1085 2004-07-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1088 * call.c (build_operator_new_call): Look only at global scope.
1090 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
1092 * call.c (enforce_access): Expect TREE_BINFO.
1093 * class.c (binfo_ctor_vtable): Check TREE_BINFO.
1094 * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
1095 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
1097 (BINFO_LANG_ELTS): Remove.
1098 (BINFO_LANG_SLOTS): New.
1099 (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
1100 (CLASSTYPE_TEMPLATE_INFO): Adjust.
1101 * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
1102 * search.c (lookup_member): Check TREE_BINFO.
1103 * semantics.c (perform_or_defer_access_check): Likewise.
1104 (check_accessibility_of_qualified_id): Check
1105 deferred_access_no_check.
1106 * tree.c (make_binfo): Use make_tree_binfo.
1108 2004-07-04 Mark Mitchell <mark@codesourcery.com>
1110 * method.c (implicitly_declare_fn): Set linkage of generated
1113 2004-07-04 Richard Henderson <rth@redhat.com>
1115 * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
1117 2004-07-03 Scott Brumbaugh <scottb.lists@verizon.net>
1120 * name-lookup.c (push_class_level_binding): Don't pass a
1121 TREE_LIST of ambiguous names to check_template_shadow as it
1122 only handles declarations. Instead, pull the declaration
1125 2004-07-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1128 * pt.c (check_explicit_specialization): Clarify error message.
1130 2004-07-02 Richard Henderson <rth@redhat.com>
1132 * tree.c (cp_unsave_r): Update remap_save_expr call.
1134 2004-07-02 Mark Mitchell <mark@codesourcery.com>
1137 * mangle.c (write_template_arg): Correct mangling.
1140 * decl.c (grokdeclarator): Robustify.
1142 2004-07-01 Richard Henderson <rth@redhat.com>
1144 * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
1145 * method.c (synthesize_method): Don't clear_last_expr.
1146 * name-lookup.c (maybe_push_cleanup_level): Likewise.
1148 2004-07-01 Nick Clifton <nickc@redhat.com>
1150 * decl2.c (import_export_class): Invoke the
1151 import_export_class field in the gcc_target structure if it is not
1154 2004-06-30 Richard Henderson (rth@redhat.com>
1156 * decl.c (start_preparsed_function): Don't set immediate_size_expand.
1157 * method.c (use_thunk): Likewise.
1159 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
1161 * call.c (build_over_call), typeck.c (build_function_call): Call
1162 check_function_arguments instead of check_function_format.
1164 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
1166 * call.c (build_over_call), typeck.c (build_function_call): Update
1167 calls to check_function_format.
1169 2004-06-30 Richard Henderson <rth@redhat.com>
1171 * call.c (build_over_call): Use __builtin_memcpy for copying
1172 CLASS_AS_BASE rather than funny casting.
1174 2004-06-30 Richard Henderson <rth@redhat.com>
1176 * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
1177 TYPE_SIZE_UNIT of full_type.
1179 2004-06-30 Per Bothner <per@bothner.com>
1181 Conditionally compile support for --enable-mapped_location.
1182 * decl.c (pop_label): Handle (imperfectly) USE_MAPPED_LOCATION case.
1183 * decl2.c: If USE_MAPPED_LOCATION, don't do some line number
1184 adjustments - which I don't understand.
1185 * error.c (dump_decl): Rename "<interrnal>" to "<built-in>".
1186 * error.c: Use LOCATION_FILE and EXPR_LOCATION macros.
1187 (print_instantiation_partial_context): Use expand_location.
1188 * decl.c (duplicate_decl): Use new DECL_IS_BUILTIN macro.
1189 * name-lookup.c: Likewise.
1190 * lex.c (cxx_init): Likewise. Also use BUILTINS_LOCATION.
1191 * name-lookup.c: Use input_line macro.
1192 * parser.c (cp_lexer_get_preprocessor_token): Use UNKNOWN_LOCATION.
1193 (cp_parser_statement): Rename locaal variable statement_locus to
1194 statement_location and use SET_EXPR_LOCATION macro.
1195 * pt.c: Handle USE_MAPPED_LOCATION case. Use new macros.
1196 * tree.c (cp_walk_subtrees): Likewise.
1198 2004-06-29 Per Bothner <per@bothner.com>
1200 * tree.c (build_min_nt, build_min, build_min_non_dep):
1201 Don't set TREE_COMPLEXITY from input_line.
1203 2004-06-29 Paul Brook <paul@codesourcery.com>
1205 * init.c: Include target.h.
1206 (get_cookie_size): Remove and replace with target hook.
1208 (build_new_1): Store the element size in the cookie.
1210 2004-06-29 Nathan Sidwell <nathan@codesourcery.com>
1213 * parser.c (cp_parser_template_declaration_after_export): Disable
1214 access checks here ...
1215 (cp_parser_class_specifier): ... not here.
1217 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1219 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
1220 VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
1221 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
1224 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1226 * cp-tree.h (struct deferred_access): Move to ...
1227 * semantics.c (struct deferred_access): ... here. Adjust.
1228 (deferred_access_stack): Make a VEC(deferred_access),
1229 (deferred_access_free_list): Remove.
1230 (deferred_access_no_check): New.
1231 (push_deferring_access_checks, resume_deferring_access_checks,
1232 stop_deferring_access_checks, pop_deferring_access_checks,
1233 get_deferred_access_checks, pop_to_parent_deferring_access_checks,
1234 perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
1236 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1239 * call.c (build_temp): Declare.
1240 (check_constructor_callable): New.
1241 (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
1242 CONSTRUCTOR_CALLABLE.
1243 (convert_like_real, initialize_reference): Use
1244 check_constructor_callable.
1245 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
1246 (LOOKUP_*): Renumber.
1248 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1250 * friend.c (add_friend): Only perform access checks when context
1252 * lex.c (cxx_make_type): Only create a binfo for aggregate types.
1253 * parser.c (cp_parser_class_specifier): Disable access checks here
1254 when parsing the body of a templated class.
1255 * semantics.c (perform_or_defer_access_checks): Reorder to allow
1256 NULL binfos when not checking access.
1258 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1260 Use vector API for vbase list.
1261 * cp-tree.h: Include vec.h
1262 (DEF_VEC_P (tree)): New type.
1263 (struct lang_type_class): Change vbase's member type.
1264 (binfo_for_vbase): Declare.
1265 * class.c (determine_primary_base, base_derived_from,
1266 update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
1267 warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
1268 build_vtbl_initializer): Adjust.
1269 * decl.c (xref_basetypes): Adjust, accumulate upper bound of
1271 * init.c (sort_mem_initializers, expand_member_init,
1272 push_base_cleanups): Adjust.
1273 * method.c (do_build_copy_constructor): Adjust.
1274 * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
1275 (binfo_for_vbase): New.
1276 * tree.c (copy_base_binfos): Adjust.
1278 2004-06-28 Mark Mitchell <mark@codesourcery.com>
1280 * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
1282 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
1285 * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
1286 paranthesis in case of pointers to array members.
1287 * error.c (dump_type_prefix): Likewise.
1288 (dump_type_suffix): Maybe issue a whitespace when printing
1291 2004-06-27 Mark Mitchell <mark@codesourcery.com>
1294 * parser.c (cp_parser_set_decl_spec_type): Refine test for
1295 redefinition of built-in types.
1297 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
1299 * error.c (pp_template_argument_list_start): Remove.
1300 (pp_template_argument_list_end): Likewise.
1301 (pp_separate_with_comma): Use pp_cxx_separate_with.
1302 (reinit_global_formatting_buffer): Remove.
1303 (pp_non_consecutive_character): Likewise.
1304 (dump_scope): Use pp_cxx_colon_colon.
1305 (dump_template_parameter): Use pp_cxx_identifier,
1306 pp_cxx_tree_identifier and pp_cxx_whitespace.
1307 (dump_templat_bindings): Replace use of pp_string with sequence
1308 of pp_cxx_whitespace and pp_equal.
1309 (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
1310 pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set
1312 (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
1313 (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace,
1314 pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
1315 (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
1316 pp_cxx_right_bracket, pp_cxx_identifier throughout,
1317 (dump_decl): Likewise.
1318 (dump_template_decl): Likewise.
1319 (dump_function_decl): Likewise. Set padding as appropriate.
1320 (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
1322 (dump_exception_spec): Likewise.
1323 (dump_function_name): Use pp_cxx_tree_identifier and
1325 (dump_template_parms): Use pp_cxx_begin_template_argument_list and
1326 pp_cxx_end_template_argument_list.
1327 (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
1328 pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
1329 pp_cxx_whitespace throughout.
1330 (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
1332 (dump_unary_op): Likewise.
1333 (reinit_cxx_pp): New function.
1334 (type_as_string); Use it.
1335 (expr_as_string): Likewise.
1336 (decl_as_string); Likewise.
1337 (context_as_string): Likewise.
1338 (lang_decl_name): Likewise.
1339 (decl_to_string): Likewise.
1340 (expr_to_string): Likewise.
1341 (parm_to_string): Likewise.
1342 (type_to_string): Likewise.
1343 (args_to_string): Likewise.
1344 (cv_to_string): Likewise.
1346 2004-06-26 Mark Mitchell <mark@codesourcery.com>
1348 * cp-tree.h (cp_cv_quals): New type.
1349 (cp_declarator): Use it instead of "tree" as appropriate.
1350 (grok_method_quals): Adjust prototype.
1351 (grokclassfn): Likewise.
1352 (do_friend): Likewise.
1353 * decl.c (grokfndecl): Use cp_cv_quals, not tree.
1354 (grokdeclarator): Likewise.
1355 * decl2.c (grok_method_quals): Likewise.
1356 (grokclassfn): Likewise.
1357 * friend.c (do_friend): Likewise.
1358 * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
1359 * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
1360 (make_pointer_declarator): Likewise.
1361 (make_reference_declarator): Likewise.
1362 (make_ptrmem_declarator): Likewise.
1363 (cp_parser_ptr_operator): Likewise.
1364 (cp_parser_cv_qualifier_seq_opt): Likewise.
1365 (cp_parser_cv_qualifier_opt): Remove.
1366 (cp_parser_new_declarator_opt): Adjust call to
1367 cp_parser_ptr_operator.
1368 (cp_parser_conversion_declaration_opt): Likewise.
1369 (cp_parser_declarator): Use cp_cv_quals, not tree.
1370 (cp_parser_direct_declarator): Likewise.
1372 2004-06-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1374 * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
1375 Rename DECL_STMT to DECL_EXPR.
1376 * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
1377 * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
1378 * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
1380 2004-06-26 Jan Hubicka <jh@suse.cz>
1383 * decl2.c (maybe_emit_vtables): Always import_export_vtable for the
1384 reachability analysis.
1386 2004-06-25 Mark Mitchell <mark@codesourcery.com>
1388 * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
1391 2004-06-25 Paul Brook <paul@codesourcery.com>
1393 * decl2.c (get_guard): Call targetm.cxx.guard_type.
1394 (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
1396 2004-06-24 Mark Mitchell <mark@codesourcery.com>
1398 * decl.c (grokdeclarator): Restore error messages about __thread.
1399 * parser.c (cp_parser_decl_specifier_seq): Likewise.
1401 2004-06-24 Jason Merrill <jason@redhat.com>
1404 * decl.c (grokparms): Give the PARM_DECL reference type if the
1405 parameter is passed by invisible reference.
1407 2004-06-24 Andreas Schwab <schwab@suse.de>
1409 * cp-tree.h (enum cp_storage_class): Remove trailing comma.
1411 2004-06-23 Mark Mitchell <mark@codesourcery.com>
1413 * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
1414 (cp/decl.o): Likewise.
1415 (cp/decl2.o): Likewise.
1416 (cp/pt.o): Likewise.
1417 (cp/semantics.o): Likewise.
1418 * config-lang.in (gtfiles): Do not reference cp/lex.h.
1419 * class.c: Do not include lex.h.
1420 (add_implicitly_declared_members): Do not use
1421 adding_implicit_members.
1422 (check_bases_and_members): Do not talk about grok_x_components.
1423 * cp/cp-tree.h (adding_implicit_members): Remove.
1424 (cp_storage_class): New type.
1425 (cp_decl_spec): Likewise.
1426 (cp_decl_specifier_seq): Likewise.
1427 (cp_parameter_declarator): Use it for the decl_specifiers field.
1428 (check_tag_decl): Adjust prototype.
1429 (shadow_tag): Likewise.
1430 (groktypename): Likewise.
1431 (start_decl): Likewise.
1432 (start_function): Likewise.
1433 (start_method): Likewise.
1434 (grok_x_components): Remove.
1435 (grokfield): Adjust prototype.
1436 (grokbitfield): Likewise.
1437 (finish_member_class_template): Remove.
1438 * decl.c: Do not include lex.h.
1439 (adding_implicit_members): Do not define.
1440 (check_tag_decl): Do not use trees to represent decl-specifiers.
1441 (shadow_tag): Likewise.
1442 (groktypename): Likewise.
1443 (start_decl): Likewise.
1444 (grokvardecl): Likewise.
1445 (grokdeclarator): Likewise.
1446 (grokparms): Likewise.
1447 (start_function): Likewise.
1448 (start_method): Likewise.
1449 * decl.h (grokdeclarator): Adjust prototype.
1450 * decl2.c: Do not include lex.h.
1451 (grok_x_components): Remove.
1452 (grokfield): Do not use trees to represent decl-specifiers.
1453 (grokbitfield): Likewise.
1454 * lex.c: Do not include lex.h.
1456 * parser.c: Include target.h.
1457 (clear_decl_specs): New function.
1458 (cp_parser_translation_unit): Do not use trees to represent
1460 (cp_parser_postfix_expression): Likewise.
1461 (cp_parser_new_type_id): Likewise.
1462 (cp_parser_condition): Likewise.
1463 (cp_parser_simple_declaration): Likewise.
1464 (cp_parser_decl_specifier_seq): Likewise.
1465 (cp_parser_function_specifier_opt): Likewise.
1466 (cp_parser_conversion_type_id): Likewise.
1467 (cp_parser_template_parameter): Likewise.
1468 (cp_parser_explicit_instantiation): Likewise.
1469 (cp_parser_type_specifier): Likewise.
1470 (cp_parser_simple_type_specifier): Likewise.
1471 (cp_parser_init_declarator): Likewise.
1472 (cp_parser_type_id): Likewise.
1473 (cp_parser_type_specifier_seq): Likewise.
1474 (cp_parser_parameter_declaration): Likewise.
1475 (cp_parser_member_declaration): Likewise.
1476 (cp_parser_exception_declaration): Likewise.
1477 (cp_parser_function_definition_from_specifiers_and_declarator):
1479 (cp_parser_single_declaration): Likewise.
1480 (cp_parser_save_member_function_body): Likewise.
1481 (cp_parser_friend_p): Likewise.
1482 (cp_parser_set_storage_class): New function.
1483 (cp_parser_set_decl_spec_type): Likewise.
1484 * pt.c: Do not include lex.h.
1485 * semantics.c: Likewise.
1486 (finish_member_class_template): Remove.
1488 2004-06-23 Roger Sayle <roger@eyesopen.com>
1490 * call.c (build_cxx_call): Don't call expand_tree_builtin. No
1491 longer take both "args" and "convert_args" as arguments.
1492 (build_op_delete_call): Update call to build_cxx_call.
1493 (build_over_call): Likewise, update call to build_cxx_call.
1494 * cp-tree.h (build_cxx_call): Update funtion prototype.
1495 * typeck.c (build_function_call): Don't call expand_tree_builtin.
1496 * rtti.c (throw_bad_cast): Update call to build_cxx_call.
1497 (throw_bad_typeid): Likewise.
1498 (build_dynamic_cast_1): Likewise.
1500 2004-06-22 Richard Henderson <rth@redhat.com>
1502 * class.c (build_vfn_ref): Take a pointer not object. Build
1504 (cp_fold_obj_type_ref): New.
1505 * call.c (build_over_call): Update build_vfn_ref call.
1506 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
1507 * cp-tree.h (cp_fold_obj_type_ref): Declare.
1509 2004-06-21 Jason Merrill <jason@redhat.com>
1512 * cp-gimplify.c (cp_gimplify_init_expr): Look through
1515 2004-06-21 Mark Mitchell <mark@codesourcery.com>
1517 * cp-tree.def (NEW_EXPR): Add a fourth slot.
1518 * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
1519 (TREE_PARMLIST): Likewise.
1520 (CALL_DECLARATOR_PARMS): Likewise.
1521 (CALL_DECLARATOR_QUALS): Likewise.
1522 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
1523 (cp_declarator_kind): New type.
1524 (cp_parameter_declarator): Likewise.
1525 (cp_declarator): Likewise.
1526 (cp_error_declarator): Likewise.
1527 (no_parameters): Likewise.
1528 (groktypename): Change prototype.
1529 (start_decl): Likewise.
1530 (start_handler_parms): Likewise.
1531 (get_scope_of_declarator): Likewise.
1532 (start_function): Likewise.
1533 (start_preparsed_function): New function.
1534 (start_function): Change prototype.
1535 (start_method): Likewise.
1536 (grokfield): Likewise.
1537 (grokbitfield): Likewise.
1538 (build_new): Likewise.
1539 (make_pointer_declarator): Remove.
1540 (make_reference_declarator): Likewise.
1541 (make_call_declarator): Likewise.
1542 (set_quals_and_spec): Likewise.
1543 (process_template_parm): Change prototype.
1544 (begin_function_definition): Remove.
1545 (finish_parmlist): Remove.
1546 * decl.c (groktypename): Do not use trees to represent
1548 (start_decl): Likewise.
1549 (start_handler_parms): Remove.
1550 (get_scope_of_declarator): Reimplement.
1551 (grokdeclarator): Do not use trees to represent declarators.
1552 (grokparms): Likewise.
1553 (start_function): Likewise.
1554 (start_method): Likewise.
1555 (build_void_list_mode): Do not use TREE_PARMLIST.
1556 * decl.h (grokdeclarator): Change prototype.
1557 * decl2.c (grok_method_quals): Robustify.
1558 (grok_x_components): Do not use trees to represent declarators.
1559 (grokfield): Likewise.
1560 (grokbitfield): Likewise.
1561 (start_objects): Build FUNCTION_DECLs, not declarators.
1562 (start_static_storage_duration_function): Likewise.
1563 * init.c (build_new): Simplify.
1564 * lex.c (make_pointer_declarator): Remove.
1565 (make_reference_declarator): Likewise.
1566 (make_call_declarator): Likewise.
1567 (set_quals_and_spec): Likewise.
1568 * method.c (use_thunk): Use start_preparsed_function.
1569 (synthesize_method): Likewise.
1570 (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
1571 * optimize.c (maybe_clone_body): Use start_preparsed_function.
1572 * parser.c (cp_error_declarator): New variable.
1573 (declarator_obstack): Likewise.
1574 (alloc_declarator): New function.
1575 (make_declarator): Likewise.
1576 (make_id_declarator): Likewise.
1577 (make_pointer_declarator): Likewise.
1578 (make_reference_declarator): Likewise.
1579 (make_ptrmem_declarator): Likewise.
1580 (make_call_declarator): Likewise.
1581 (make_array_declarator): Likewise.
1582 (no_parameters): New variable.
1583 (make_parameter_declarator): Likewise.
1584 (cp_parser_check_for_definition_in_return_type): Do not use trees
1585 to represent declarators.
1586 (cp_parser_translation_unit): Likewise.
1587 (cp_parser_new_expression): Likewise.
1588 (cp_parser_new_type_id): Likewise.
1589 (cp_parser_new_declarator_opt): Likewise.
1590 (cp_parser_direct_new_declarator): Likewise.
1591 (cp_parser_condition): Likewise.
1592 (cp_parser_declaration_statement): Likewise.
1593 (cp_parser_declaration): Likewise.
1594 (cp_parser_conversion_type_id): Likewise.
1595 (cp_parser_conversion_declarator_opt): Likewise.
1596 (cp_parser_template_parameter_list): Likewise.
1597 (cp_parser_template_parameter): Likewise.
1598 (cp_parser_explicit_instantiation): Likewise.
1599 (cp_parser_init_declarator): Likewise.
1600 (cp_parser_declarator): Likewise.
1601 (cp_parser_direct_declarator): Likewise.
1602 (cp_parser_type_id): Likewise.
1603 (cp_parser_parameter_declaration_clause): Likewise.
1604 (cp_parser_parameter_declaration_list): Likewise.
1605 (cp_parser_parameter_declaration): Likewise.
1606 (cp_parser_member_declaration): Likewise.
1607 (cp_parser_exception_declaration): Likewise.
1608 (cp_parser_check_declarator_template_parameters): Likewise.
1609 (cp_parser_function_definition_from_specifiers_and_declarator):
1611 (cp_parser_save_member_function_body): Likewise.
1612 * pt.c (process_template_parm): Add is_non_type parameter.
1613 (convert_template_argument): Adjust call to groktypename.
1614 (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
1615 (tsubst): Do not expect declarators.
1616 (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
1618 (instantiate_decl): Use start_preparsed_function.
1619 * semantics.c (begin_function_definition): Remove.
1620 (finish_parmlist): Remove.
1621 * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
1624 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1626 * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
1627 (build_new_method_call): Likewise.
1628 * decl.c (local_variable_p_walkfn): Don't walk into types.
1629 * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
1630 (build_anon_union_vars): Add new operand for COMPONENT_REF.
1631 * init.c (buld_new): Add new operand for ARRAY_REF.
1632 * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
1633 (do_build_assign_ref): Likewise.
1634 * parser.c (cp_parser_direct_new_declarator): Add new operands
1636 (cp_parser_direct_declarator): Likewise.
1637 * pt.c (tsubst): Likewise.
1638 (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
1640 * semantics.c (finish_non_static_data_member): Add new operand
1642 * typeck.c (build_class_member_access_expr): Likewise.
1643 (build_class_member_access_expr, finish_class_member_access_expr):
1645 (build_ptrmemfunc_access_expr): Likewise.
1646 (build_array_ref): Add new operands for ARRAY_REF.
1647 * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
1648 * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
1650 2004-06-21 Richard Henderson <rth@redhat.com>
1652 * dump.c (cp_dump_tree): Don't use dump_next_stmt.
1653 * parser.c (cp_parser_jump_statement): Update commentary.
1654 * pt.c (tsubst_expr): Use RETURN_EXPR.
1655 * semantics.c (finish_return_stmt): Likewise.
1656 (finalize_nrv_r): Likewise.
1657 * typeck.c, typeck2.c: Update file start commentary.
1659 2004-06-21 Richard Henderson <rth@redhat.com>
1661 * semantics.c (finish_expr_stmt): Call verify_sequence_points.
1663 2004-06-20 Richard Henderson <rth@redhat.com>
1665 * cp-tree.h (add_decl_stmt): Declare.
1666 * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
1667 * semantics.c (maybe_cleanup_point_expr): New.
1668 (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
1669 finish_for_expr, finish_switch_cond): Use it.
1670 (finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN.
1672 2004-06-20 Richard Henderson <rth@redhat.com>
1674 * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
1675 * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
1676 (cp_gimplify_expr): Call it.
1677 (gimplify_cleanup_stmt): Move from c-gimplify.c.
1678 (cp_genericize): New.
1679 * decl.c (finish_function): Call it.
1680 * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
1681 (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
1682 (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
1683 (cp_genericize): Declare.
1684 * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
1685 * dump.c (cp_dump_tree): Likewise.
1686 * semantics.c (push_cleanup): Move from c-semantics.c.
1688 2004-06-20 Zack Weinberg <zack@codesourcery.com>
1690 * cp-lang.c (has_c_linkage): Implement.
1692 * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
1693 * decl.c (duplicate_decls): Use COPY_DECL_RTL.
1694 (builtin_function_1): Don't call make_decl_rtl.
1695 (build_cp_library_fn): Don't call set_mangled_name_for_decl.
1696 (grokvardecl): Don't call mangle_decl.
1697 * except.c (nothrow_libfn_p): Look at DECL_NAME, not
1698 DECL_ASSEMBLER_NAME.
1699 * method.c (set_mangled_name_for_decl): Delete.
1700 * name-lookup.c (pushdecl): When a local extern shadows a
1701 file-scope declaration of the same object, give both DECLs the
1703 * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
1704 on DECL_ASSEMBLER_NAME.
1706 2004-06-19 Richard Henderson <rth@redhat.com>
1708 * cp-gimplify.c: Remove unnecessary prototypes.
1709 (cp_gimplify_stmt): Merge into ...
1710 (cp_gimplify_expr): ... here. Move to end of file. Handle
1711 stmts_are_full_exprs_p frobbing.
1712 * cp-tree.h (cp_gimplify_stmt): Remove.
1713 * pt.c (tsubst_expr): Merge prep_stmt and unify.
1714 * tree.c (init_tree): Don't set lang_gimplify_stmt.
1716 2004-06-18 Richard Henderson <rth@redhat.com>
1719 * semantics.c (begin_cond): New.
1720 (finish_cond): Rewrite to handle template DECL_STMTs specially.
1721 Assume that non-template decls go land before the conditional.
1722 (simplify_loop_decl_cond): Likewise.
1723 (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
1724 finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
1725 begin_switch_stmt, finish_switch_cond): Update to match.
1727 2004-06-17 Jason Merrill <jason@redhat.com>
1730 * semantics.c (simplify_aggr_init_expr): Don't return the slot.
1731 (finish_stmt_expr_expr): Update type after conversions.
1732 (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
1733 Handle void initializer.
1734 * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
1736 2004-06-17 Geoffrey Keating <geoffk@apple.com>
1738 * class.c (build_clone): Don't call defer_fn, let mark_used do it.
1739 * cp-tree.h (defer_fn): Delete.
1740 * decl2.c (defer_fn): Delete.
1741 (finish_file): Simplify deferred_fns loops; check that
1742 only used inline functions get into deferred_fns.
1743 (mark_used): Inline previous contents of defer_fn.
1745 2004-06-16 Richard Henderson <rth@redhat.com>
1747 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
1748 (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
1749 * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
1750 of CTOR_INITIALIZER ...
1751 (pp_cxx_statement): ... here.
1752 * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
1753 (finish_function): Use alloc_stmt_list to zap entire function.
1754 * parser.c (cp_parser_compound_statement): Update commentary.
1755 * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
1756 * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
1757 (finish_stmt_expr): Don't look through COMPOUND_STMT.
1759 2004-06-16 Geoffrey Keating <geoffk@apple.com>
1761 * pt.c (mark_decl_instantiated): Don't call defer_fn.
1763 2004-06-16 Richard Henderson <rth@redhat.com>
1765 * parser.c (cp_parser_labeled_statement): Update commentary.
1766 * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
1767 * tree.c (mark_local_for_remap_r): Likewise.
1769 2004-06-16 Richard Henderson <rth@redhat.com>
1771 * parser.c (cp_parser_asm_definition): Update commentary.
1772 * pt.c (tsubst_expr): Use ASM_EXPR.
1773 * semantics.c (finish_asm_stmt): Likewise.
1775 2004-06-16 Richard Henderson <rth@redhat.com>
1777 * decl.c (finish_destructor_body): Use LABEL_EXPR.
1778 * parser.c (cp_parser_statement): Update commentary.
1779 * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
1780 * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
1781 * tree.c (mark_local_for_remap_r): Likewise.
1783 2004-06-16 Richard Henderson <rth@redhat.com>
1786 * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
1787 statement in FOR_INIT_STMT for templates.
1789 2004-06-15 Richard Henderson <rth@redhat.com>
1791 * call.c (initialize_reference): Don't build CLEANUP_STMT here.
1792 * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
1793 (genericize_try_block): Use gimplify_stmt.
1794 (genericize_catch_block, genericize_eh_spec_block): Likewise.
1795 (cp_gimplify_init_expr): Remove STMT_EXPR special case.
1796 (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
1797 * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
1798 (cp_tree_chain_matters_p): Remove.
1799 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
1800 (COMPOUND_STMT_BODY_BLOCK): New.
1801 (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
1802 (EXPR_STMT_STMT_EXPR_RESULT): New.
1803 (building_stmt_tree): Check cur_stmt_list.
1804 (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
1805 (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
1806 * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
1807 (cp_finish_decl): Use push_cleanup.
1808 (start_function, finish_function): Use statement lists.
1809 (finish_stmt): Do nothing.
1810 * except.c (begin_eh_spec_block): Use statement lists.
1811 (check_handlers_1, check_handlers): Likewise.
1812 * init.c (construct_virtual_base): Don't add extra compound stmts.
1813 (build_vec_init): Likewise.
1814 * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
1815 * name-lookup.h (struct cp_binding_level): Add statement_list.
1816 * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
1817 (cp_parser_labeled_statement, cp_parser_expression_statement,
1818 cp_parser_statement_seq_opt): Likewise.
1819 (cp_parser_compound_statement): Likewise. Take bool for try block.
1820 (cp_parser_selection_statement): Tidy if processing.
1821 (cp_parser_already_scoped_statement): Rewrite to do what it says.
1822 * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
1823 (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST.
1824 Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
1825 * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
1826 (finish_cond): New, rewritten from FINISH_COND.
1827 (simplify_loop_decl_cond): New.
1828 (finish_expr_stmt): Avoid nested EXPR_STMTs.
1829 (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
1830 begin_else_clause, finish_else_clause, finish_if_stmt,
1831 begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
1832 begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
1833 finish_for_cond, finish_for_stmt, begin_switch_stmt,
1834 finish_switch_cond, finish_switch_stmt, begin_try_block,
1835 finish_try_block, finish_cleanup_try_block, finish_function_try_block,
1836 finish_handler_sequence, finish_function_handler_sequence,
1837 begin_handler, finish_handler_parms, finish_handler,
1838 begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
1839 using statement lists.
1840 (begin_compound_stmt): Replace has_no_scope argument with flags.
1841 Update all callers. Use statement lists.
1842 (finish_compound_stmt): Likewise.
1843 (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
1844 (current_scope_stmt_stack): Remove.
1845 (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
1846 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
1847 Rewrite with statement lists.
1849 2004-06-15 Alexandre Oliva <aoliva@redhat.com>
1851 * parser.c: Change all assignments of c_lex_string_translate
1852 to true and false to 1 and 0.
1853 (cp_lexer_read_token): Convert type of the translated string.
1854 (cp_parser_skip_to_closing_parentheses): Preserve original
1855 value of c_lex_string_translate, and set it to -1 while
1857 (cp_parser_cache_group): Likewise.
1858 (cp_parser_cache_group_1): Renamed.
1859 (cp_parser_asm_operand_list): Remove redundant setting of
1860 c_lex_string_translate.
1861 (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
1862 Handle chained strings.
1864 2004-06-12 Andrew Pinski <apinski@apple.com>
1868 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
1870 * cp-tree.h: Fix typo.
1872 * cp-tree.h: Include cgraph.h
1873 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
1874 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
1876 2004-06-12 Jason Merrill <jason@redhat.com>
1878 PR tree-optimization/14107
1879 * decl.c (finish_function): Warn about no return in all functions.
1881 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
1883 * cp-tree.h (struct language_function): Remove cannot_inline.
1884 * decl.c (save_function_data): cannot_inline is no more.
1885 (cxx_push_function_context): Likewise.
1886 * decl2.c (start_objects, start_static_storage_duration_function):
1887 Reset DECL_INLINE, set DECL_UNINLINABLE.
1889 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1892 * search.c (lookup_field): Propagate the ambiguity list.
1893 (lookup_fnfields): Likewise.
1895 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1898 * parser.c (cp_parser_template_name): Ctors/dtors never need a
1899 template keyword to disambiguate.
1901 2004-06-14 Mark Mitchell <mark@codesourcery.com>
1904 * decl.c (grokdeclarator): Ignore pointer-to-members when
1905 computing template depth.
1908 * name-lookup.c (pushtag): Do not try to put class declarations in
1909 explicit specialization scopes.
1911 2004-06-11 Andrew Pinski <pinskia@physics.uc.edu>
1913 * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
1915 2004-06-11 Mark Mitchell <mark@codesourcery.com>
1918 * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
1919 bindings for undeclared built-ins.
1921 2004-06-11 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1923 * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
1924 appear at the correct location.
1926 2004-06-10 Jason Merrill <jason@redhat.com>
1930 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1931 * init.c (build_offset_ref): Build SCOPE_REF with non-null
1932 TREE_TYPE for non-dependent names.
1933 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
1934 unknown_type_node as its TREE_TYPE.
1935 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
1936 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
1937 (dump_expr) <SCOPE_REF case>: Likewise.
1939 2004-06-10 Mark Mitchell <mark@codesourcery.com>
1942 * parser.c (cp_parser_direct_declarator): Robustify.
1945 * pt.c (tsubst_copy): Use decl_constant_value on enumeration
1946 constants in non-dependent contexts.
1950 * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
1953 2004-06-10 Jakub Jelinek <jakub@redhat.com>
1956 * decl.c (duplicate_decls): Handle fileptr_type_node arguments
1959 2004-06-09 Mark Mitchell <mark@codesourcery.com>
1963 2004-06-07 Mark Mitchell <mark@codesourcery.com>
1964 * lex.c (handle_pragma_interface): Deprecate.
1965 (handle_pragma_implementation): Likewise.
1967 2004-06-09 Andrew Pinski <pinskia@physics.uc.edu>
1969 * g++spec.c (lang_specific_driver): Remove check for -lm
1970 and -lmath when check it see if it was the math library.
1972 2004-06-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1975 * parser.c (cp_parser_direct_declarator): Reject constructor named
1976 as qualified template-id.
1978 2004-06-07 Mark Mitchell <mark@codesourcery.com>
1981 * lex.c (handle_pragma_interface): Deprecate.
1982 (handle_pragma_implementation): Likewise.
1984 2004-06-07 Mark Mitchell <mark@codesourcery.com>
1987 * parser.c (cp_parser_iteration_statement): Fix typo in error
1991 * pt.c (tsubst_default_argument): Do not defer access checks
1992 while substituting into the default argument.
1995 * pt.c (tsubst_copy): Do not try to substitute for an enumeration
1996 constant in a non-dependent context.
1999 * except.c (build_throw): Ensure that temp_expr has been
2002 2004-06-06 Roger Sayle <roger@eyesopen.com>
2004 * cp/cp-tree.h (lvalue_or_else): Add function prototype.
2006 2004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2009 * parser.c (cp_parser_mem_initializer_id): Gracefully reject
2010 'typename', and accept 'template'.
2012 2004-06-03 Andrew Pinski <pinskia@physics.uc.edu>
2013 Jan Hubicka <jh@suse.cz>
2016 * method.c (use_think): Do not mark thunk as referenced.
2018 2004-06-03 Matt Austern <austern@apple.com>
2021 * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
2022 is nonzero, and if we see a noninline definition of a key method,
2023 make the vtables nonweak.
2025 2004-06-02 Matt Austern <austern@apple.com>
2027 * cp-tree.h (instantiate_decl): new boolean parameter,
2028 undefined_ok. Current behavior is equivalent to its being 0.
2029 * decl2.c (mark_used): Add new argument when calling instantiate_decl
2030 * pt.c (mark_decl_instantiated): Unconditionally make
2031 instantiations explicit unconditionally
2032 (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
2033 since mark_decl_instantiated now does it.
2034 (instantiate_class_member): New. Instantiate a member of an
2035 explicitly instantiated class template.
2036 (do_type_instantiation): Explicitly instantiate members of an
2037 explicitly instantiated class template.
2038 (instantiate_decl): if undefined_ok is nonzero, and if we're
2039 trying to explicitly instantiated a template with no definition,
2040 change it to an implicit instantiation.
2041 (instantiate_pending_templates): Add new argument to instantiate_decl.
2042 * tree.c (cp_cannot_inline_tree_fn): Likewise.
2044 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
2046 * cp-tree.h: Fix typo.
2048 * cp-tree.h: Include cgraph.h
2049 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
2050 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
2052 2004-06-01 Jason Merrill <jason@redhat.com>
2055 * call.c (call_builtin_trap): Remove type parm.
2056 (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
2057 (build_x_va_arg): Dereference a null pointer for a non-POD argument.
2059 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2062 * init.c (build_offset_ref): Build SCOPE_REF with non-null
2063 TREE_TYPE for non-dependent names.
2064 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
2065 unknown_type_node as its TREE_TYPE.
2066 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
2067 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
2068 (dump_expr) <SCOPE_REF case>: Likewise.
2070 2004-06-01 Richard Henderson <rth@redhat.com>
2071 Andrew Pinski <pinskia@physics.uc.edu>
2073 * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
2074 * parser.c (struct cp_parser): Remove in_offsetof.
2075 (cp_parser_new): Don't set it.
2076 (cp_parser_unary_expression): Don't check it.
2077 (cp_parser_postfix_open_square_expression): Split out from ...
2078 (cp_parser_postfix_expression): ... here.
2079 (cp_parser_postfix_dot_deref_expression): Likewise.
2080 (cp_parser_builtin_offsetof): New.
2081 (cp_parser_primary_expression): Use it.
2083 2004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2086 * parser.c (cp_parser_postfix_expression): Allow subscript
2087 operator in offsetof.
2089 2004-05-31 Mark Mitchell <mark@codesourcery.com>
2092 * friend.c (add_friend): Do not try to perform access checks for
2093 functions from dependent classes.
2095 2004-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
2097 * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
2098 (pp_cxx_begin_template_argument_list): Turn into a function.
2099 (pp_cxx_end_template_argument_list): Likewise.
2100 (pp_cxx_separate_with): Define.
2101 (pp_cxx_unqualified_id): Tidy.
2102 (pp_cxx_primary_expression): Likewise.
2103 (pp_cxx_postfix_expression): Likewise.
2104 (pp_cxx_expression): Likewise.
2105 (pp_cxx_simple_type_specifier): Likewise.
2106 (pp_cxx_type_specifier_seq): Likewise.
2107 (pp_cxx_parameter_declaration_clause): Likewise.
2108 (pp_cxx_exception_specification): Likewise.
2109 (pp_cxx_direct_declarator): Likewise.
2110 (pp_cxx_type_id): Likewise.
2111 * cxx-pretty-print.h (pp_cxx_whitespace): Export from
2113 (pp_cxx_left_paren): Likewise.
2114 (pp_cxx_right_paren): Likewise.
2115 (pp_cxx_left_brace): Likewise.
2116 (pp_cxx_right_brace): Likewise.
2117 (pp_cxx_left_bracket): Likewise.
2118 (pp_cxx_right_bracket): Likewise.
2119 (pp_cxx_dot): Likewise.
2120 (pp_cxx_identifier): Likewise.
2121 (pp_cxx_tree_identifier): Likewise.
2122 (pp_cxx_ampersand): New macro.
2123 (pp_cxx_star): Likewise.
2124 (pp_cxx_arrow): Likewise.
2125 (pp_cxx_semicolon): Likewise.
2126 (pp_cxx_complement): Likewise.
2127 (pp_cxx_begin_template_argument_list): Declaree.
2128 (pp_cxx_end_template_argument_list): Likewise.
2129 (pp_cxx_colon_colon): likewise.
2131 2004-05-31 Eric Botcazou <ebotcazou@libertysurf.fr>
2133 * parser.c (cp_parser_simple_type_specifier): Explicitly test
2136 2004-05-31 Kazu Hirata <kazu@cs.umass.edu>
2138 * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
2139 typeck.c: Fix comment formatting.
2141 2004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
2143 * cp-lang.c (cp_expand_decl): Remove.
2144 (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
2146 2004-05-30 Andreas Jaeger <aj@suse.de>
2148 * lang-specs.h: Add missing initializers for .ii.
2150 2004-05-28 Aldy Hernandez <aldyh@redhat.com>
2152 * decl.c (cp_make_fname_decl): Free return value from
2155 2004-05-28 Mark Mitchell <mark@codesourcery.com>
2158 * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
2160 * init.c (build_new): Likewise.
2163 * name-lookup.c (arg_assoc): Robustify.
2166 * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
2167 when determining the scope to use for a pointer to member.
2168 (lookup_anon_field): Give it external linkage.
2169 * cp-tree.h (lookup_anon_field): Declare it.
2170 * expr.c (cplus_expand_constant): Use it.
2172 2004-05-28 Mark Mitchell <mark@codesourcery.com>
2175 * parser.c (cp_parser_simple_type_specifier): Call
2176 maybe_note_name_used_in_class.
2178 2004-05-28 Tom Marshall <tmarshall@real.com>
2181 * class.c (finish_struct_1): Warn only if the dtor is non-private or
2182 the class has friends.
2184 2004-05-27 Adam Nemet <anemet@lnxw.com>
2187 * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
2188 TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
2190 2004-05-24 Geoffrey Keating <geoffk@apple.com>
2192 * method.c (implicitly_declare_fn): Don't call defer_fn; abort
2193 if it might be needed.
2194 * pt.c (mark_decl_instantiated): Only call defer_fn if
2195 the function actually needs processing in finish_file.
2196 * decl2.c (finish_file): Add check that elements in
2197 deferred_fns_used are really needed there. Remove unnecessary
2198 test of DECL_SAVED_TREE.
2200 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
2202 * Make-lang.in: No need to specify $(LIBCPP).
2204 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2207 * parser.c (cp_parser_class_head): Robustify.
2210 * parser.c (cp_parser_decl_specifier_seq): Correct error in
2212 (cp_parser_constructor_declarator_p): Treat attributes
2216 * typeck.c (build_unary_op): Do not attempt to resolve casts to
2217 base classes in templates.
2219 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2222 * pt.c (instantiate_template): Robustify.
2224 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2227 * decl.c (xref_tag): Issue errors about redeclaring template
2228 classes as non-template classes.
2230 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2233 * name-lookup.c (supplement_binding): Allow redefinitions of
2237 * parser.c (cp_parser_template_argument): Robustify.
2239 2004-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
2241 * class.c (alter_access): Use %E format specifier to print an
2242 identifier node. Avoid looking at the IDENTIFIER_POINTER.
2243 (push_lang_context): Likewise.
2244 * decl.c (lookup_label): Likewise.
2245 (grokdeclarator): Likewise.
2246 * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
2247 * pt.c (do_type_instantiation): Likewise.
2248 * tree.c (handle_java_interface_attribute): Likewise.
2249 (handle_com_interface_attribute): Likewise.
2250 (handle_init_priority_attribute): Likewise.
2252 2004-05-22 Mark Mitchell <mark@codesourcery.com>
2256 * pt.c (build_non_dependent_expr): Expand the set of tree nodes
2257 recognized as overloaded functions.
2259 2004-05-22 Mark Mitchell <mark@codesourcery.com>
2262 * class.c (layout_nonempty_base_or_field): Do not try to avoid
2263 layout conflicts for unions.
2266 * typeck.c (build_x_unary_op): Instantiate template class
2267 specializations before looking for "operator &".
2270 * typeck.c (complete_type): Layout non-dependent array types, even
2274 * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
2277 2004-05-22 Roger Sayle <roger@eyesopen.com>
2279 * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
2280 returning when TREE_TYPE is error_mark_node.
2281 * typeck.c (require_complete_type): Return error_mark_node if
2282 value's type is an error_mark_node.
2284 2004-05-20 Andrew Pinski <pinskia@physics.uc.edu>
2286 * optimize.c (calls_setjmp_r): Remove.
2287 (calls_setjmp_p): Remove.
2288 * cp-tree.c (calls_setjmp_p): Remove.
2289 * decl.c (finish_function): Do not call calls_setjmp_p.
2291 2004-05-18 Zack Weinberg <zack@codesourcery.com>
2293 * decl.c (cp_finish_decl): Use mark_decl_referenced.
2294 * decl2.c (maybe_make_one_only): Likewise.
2295 * method.c (use_thunk): Likewise.
2297 2004-05-18 Jason Merrill <jason@redhat.com>
2299 * class.c (build_base_path): Tidy a bit.
2301 2004-05-14 Geoffrey Keating <geoffk@apple.com>
2303 * name-lookup.c (struct scope_binding): New.
2304 (EMPTY_SCOPE_BINDING): New.
2305 (lookup_using_namespace): Take a scope_binding instead of a
2307 (qualified_lookup_using_namespace): Likewise.
2308 (cxx_binding_clear): Delete.
2309 (do_nonmember_using_decl): Use a scope_binding instead of a
2311 (lookup_tag): Don't call select_decl.
2312 (ambiguous_decl): Don't return anything (and change callers to match).
2313 Take a scope_binding as the second parameter.
2314 (lookup_namespace_name): Use a scope_binding instead of a
2316 (unqualified_namespace_lookup): Likewise.
2317 (lookup_qualified_name): Likewise.
2318 (select_decl): Take a scope_binding instead of a cxx_binding.
2319 Use macros rather than hand-coding tests for type-ness.
2321 2004-05-13 Diego Novillo <dnovillo@redhat.com>
2323 * cp-gimplify.c: Rename from cp-simplify.c.
2324 * Make-lang.in, optimize.c: Update.
2326 2004-05-13 Diego Novillo <dnovillo@redhat.com>
2328 Merge from tree-ssa-20020619-branch. See
2329 ChangeLog.tree-ssa for details.
2331 * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
2332 cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
2333 expr.c, init.c, name-lookup.h, optimize.c, parser.c,
2334 pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
2336 * cp-mudflap.c: New file.
2337 * cp-simplify.c:: New file.
2339 2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2342 * decl2.c (check_classfn): For member templates, compare also the
2343 template parameters to match the declaration.
2344 * cp-tree.h: Adjust declaration of check_classfn.
2345 * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
2346 * friend.c (do_friend): Likewise.
2347 * pt.c (tsubst_friend_function): Likewise.
2349 2004-05-01 Zack Weinberg <zack@codesourcery.com>
2351 * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
2352 Instead, dig into the representation type to find the array bound.
2354 2004-04-30 Jason Merrill <jason@redhat.com>
2356 Refer to base members using COMPONENT_REFs where possible.
2357 * class.c (build_simple_base_path): New fn.
2358 (build_base_path): Use it for non-virtual base references.
2359 (layout_class_type): Change base fields to their real type
2360 after layout is done.
2361 * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
2362 * cp-lang.c (cxx_get_alias_set): Use it.
2364 2004-04-30 Kazu Hirata <kazu@cs.umass.edu>
2366 * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
2369 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2372 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
2373 used in integral constant expressions.
2375 2004-04-22 Mark Mitchell <mark@codesourcery.com>
2377 * init.c (build_aggr_init): Fix accidental use of C99 construct in
2380 * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
2382 * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
2383 * decl.c (reshape_init): Use it.
2384 * init.c (perform_member_init): Remove redundant condition.
2385 (build_aggr_init): Adjust to handle brace-enclosed initializers
2387 (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
2389 * parser.c (cp_parser_initializer_clause): Do not set
2390 TREE_HAS_CONSTRUCTOR on the initializer.
2391 * rtti.c (tinfo_base_init): Likewise.
2392 (generic_initializer): Likewise.
2393 (ptr_initializer): Likewise.
2394 (ptm_initializer): Likewise.
2395 (class_initializer): Likewise.
2396 (get_pseudo_ti_init): Likewise.
2397 * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
2399 2004-04-22 Alan Modra <amodra@bigpond.net.au>
2401 * name-lookup.c (anonymous_namespace_name): Make static.
2403 2004-04-19 Roger Sayle <roger@eyesopen.com>
2406 * class.c (build_base_path): Call fold whilst building the NULL
2407 pointer check expression trees.
2409 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
2411 * init.c (build_new_1): Don't use type size argument for Java
2412 _Jv_AllocObject call.
2414 2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
2416 * method.c (make_alias_for_thunk): Remove preprocessor guard on
2417 declaration and definition.
2419 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
2422 * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
2423 than ASM_OUTPUT_DEF.
2425 2004-04-08 Jakub Jelinek <jakub@redhat.com>
2427 * decl2.c (mark_used): Don't segfault if cfun != NULL but
2428 current_function_decl == NULL.
2430 2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
2433 * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
2436 2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2438 * init.c (decl_constant_value): Don't look at DECL_INITIAL
2440 * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
2441 or TREE_SIDE_EFFECTS of a type.
2443 2004-04-02 Nathan Sidwell <nathan@codesourcery.com>
2446 * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
2447 cv-qualifier unification.
2448 * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
2450 2004-04-02 Jan Hubicka <jh@suse.cz>
2452 * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
2453 * cp-tree.h (cp_update_decl_after_saving): Declare.
2454 * tree.c (cp_update_decl_after_saving): Define.
2456 2004-04-01 Mark Mitchell <mark@codesourcery.com>
2459 * typeck.c (get_delta_difference): Call fold before returning the
2462 2004-04-01 Richard Henderson <rth@redhat.com>
2465 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
2466 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
2468 2004-04-01 Mark Mitchell <mark@codesourcery.com>
2471 * name-lookup.c (maybe_push_cleanup_level): Robustify.
2473 2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2475 * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
2477 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2479 * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
2480 * class.c (check_bitfield_decl): Likewise.
2481 * cvt.c (type_promotes_to): Likewise.
2482 * decl.c (finish_enum): Likewise.
2483 * mangle.c (write_builtin_type): Likewise.
2484 * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
2485 * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
2486 (build_binary_op): Likewise.
2488 2004-03-31 Jan Hubicka <jh@suse.cz>
2490 * tree.h (optimize_function): Kill prototype.
2491 * optimize.c (dump_function, optimize_function, dump_finction): Kill.
2492 * semantics.c (expand_body): Kill.
2494 2004-03-30 Mark Mitchell <mark@codesourcery.com>
2497 * decl.c (start_decl_1): Do not decide whether or not to create a
2498 new cleanup level until after the type has been completed.
2501 * pt.c (tsubst_default_argument): Clear current_function_decl.
2503 2004-03-30 Zack Weinberg <zack@codesourcery.com>
2505 * name-lookup.c, parser.c: Use new shorter form of GTY markers.
2507 2004-03-29 Zack Weinberg <zack@codesourcery.com>
2509 * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
2510 is null, just print the literal name and return.
2512 2004-03-25 Kazu Hirata <kazu@cs.umass.edu>
2514 * cxx-pretty-print.c: Fix comment typos.
2516 2004-03-24 Kazu Hirata <kazu@cs.umass.edu>
2518 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
2521 2004-03-23 Ziemowit Laski <zlaski@apple.com>
2523 * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
2524 * mangle.c (write_type): Add call to 'mangle_fundamental_type'
2527 2004-03-23 Zack Weinberg <zack@codesourcery.com>
2529 PR 12267, 12391, 12560, 13129, 14114, 14133
2530 * cp-lang.c (c_reset_state): Delete.
2531 (push_file_scope, pop_file_scope): New stubs.
2532 * parser.c (c_parse_file): Call sorry() here if called more than once.
2534 2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2536 * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
2539 2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
2541 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
2543 2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
2545 * error.c (enum pad): Remove.
2546 (dump_qualifiers): Likewise.
2547 (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
2548 (dump_aggr_type): Likewise.
2549 (dump_type_suffix): Likewise.
2550 (dump_simple_decl): Likewise.
2551 (dump_function_decl): Likewise.
2552 (cv_to_string): Likewise.
2553 (dump_type_prefix): Likewise. Adjust return void.
2554 * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
2556 (pp_cxx_template_keyword_if_needed): Document.
2557 (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
2558 (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
2559 MUST_NOT_THROW_EXPR.
2561 2004-03-21 Mark Mitchell <mark@codesourcery.com>
2564 * decl.c (cp_finish_decl): Compute the size of arrays declared in
2565 templates, if their type is non-dependent.
2567 2004-03-19 Mark Mitchell <mark@codesourcery.com>
2569 * call.c (build_op_delete_call): Do not forget the placement
2570 arguments when iterating through mutiple delete operators.
2572 * cp-tree.h (svaed_scope): Remove last_parms.
2573 (NEW_DELETE_OPNAME_P): New macro.
2574 (last_function_parms): Remove.
2575 (do_friend): Adjust prototype.
2576 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
2577 using last_function_parms.
2578 (grokfndecl): Take the PARM_DECLs as an argument, rather than
2579 using last_function_parms.
2580 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
2581 for class-specific operator new and operator delete.
2582 (grok_op_properties): Do not look for allocation functions with
2584 (start_function): Use DECL_ARGUMENTS instead of
2585 last_function_parms.
2586 * decl.h (last_function_parms): Do not declare.
2587 * decl2.c (grokclassfn): Do not use last_function_parms.
2588 * friend.c (do_friend): Remove parmdecls parameter.
2589 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
2590 (pop_from_top_level): Do not restore it.
2591 * pt.c (check_explicit_specialization): Do not adjust
2592 last_function_parms.
2594 * name-lookup.c (do_local_using_decl): Create a local binding for
2595 types brought in via using declarations.
2597 * name-lookup.c (lookup_arg_dependent): Handle block-scope
2598 function declarations correctly.
2600 * semantics.c (finish_id_expression): Correct handling of
2601 conversion operators to dependent types.
2603 * typeck.c (lookup_destructor): Allow the use of destructors from
2606 2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2608 * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
2609 TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
2610 * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
2611 the field is named TEMPLATE_TYPE_PARM_INDEX.
2613 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2616 * parser.c (cp_parser_functional_cast): A cast to anything
2617 but integral or enumaration type is not an integral constant
2619 * pt.c (value_dependent_expression_p): Handle cast expressions
2620 without operands (such as "int()").
2622 2004-03-18 Mark Mitchell <mark@codesourcery.com>
2624 * semantics.c (finish_pseudo_destructor_expr): Allow differing
2625 cv-qualification between the type named by the
2626 pseudo-destructor-name and the object-type.
2628 * search.c (accessible_base_p): Handle non-proper bases.
2630 * name-lookup.c (do_nonmember_using_decl): If a using declaration
2631 refers to a single overloaded function, set the type of the
2633 * tree.c (lvalue_type): Simplify.
2634 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
2636 (build_unary_op): Handle OVERLOADs with known types.
2638 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
2641 * parser.c (cp_parser_postfix_expression): Handle the use of
2642 "typename" in non-dependent contexts. Convert appropriately when
2643 when using a qualified name after "->" or ".".
2645 * call.c (conditional_conversion): Honor the requirement that some
2646 conversions refer to the original object.
2648 2004-03-18 Mark Mitchell <mark@codesourcery.com>
2650 * call.c (build_conditional_expr): Do not call force_rvalue for
2651 operands of void_type when the conditional expression itself has
2653 * name-lookup.c (pushdecl): Don't consider a declaration of a
2654 function named "main" to be an overload of a type named "main".
2655 * parser.c (cp_parser_template_name): Perform name lookup when the
2656 template name is proceeded by "template" if the qualifying scope
2658 * typeck.c (composite_pointer_type_r): Correctly handle
2659 pointer-to-member types.
2660 (build_const_cast): Likewise.
2662 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2664 * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
2665 * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
2666 (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
2667 (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
2668 (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
2669 (TYPEOF_TYPE_EXPR): New macro.
2670 * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
2671 * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
2672 * pt.c (tsubst): Likewise.
2673 * semantics.c (finish_typeof): Likewise.
2674 * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
2675 and TEMPLATE_TYPE_PARM.
2676 * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
2677 (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
2679 2004-03-16 Mark Mitchell <mark@codesourcery.com>
2682 * cp-tree.h (build_new_op): Change prototype.
2683 (build_x_binary_op): Likewise.
2684 * call.c (build_new_op): Add overloaded_p parameter.
2685 * decl2.c (grok_array_decl): Adjust call to build_new_op.
2686 * parser.c (cp_parser_binary_expression): Note that uses of
2687 overloaded operators prevents an expression from being considered
2688 an integral constant.
2689 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
2691 * semantics.c (finish_call_expr): Likewise.
2692 * typeck.c (rationalize_conditional_expr): Likewise.
2693 (build_x_indirect_ref): Likewise.
2694 (build_x_binary_op): Likewise.
2695 (build_x_unary_op): Likewise.
2696 (build_x_compound_expr): Likewise.
2697 (build_modify_expr): Likewise.
2698 * typeck2.c (build_x_arrow): Likewise.
2700 2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
2702 * cp-lang.c, ptree.c: Update copyright.
2704 2004-03-13 Mark Mitchell <mark@codesourcery.com>
2707 * parser.c (cp_parser_non_integral_constant_expression): Encode
2708 more of the idiom that surrounded calls to this function within
2710 (cp_parser_primary_expression): Adjust accordingly.
2711 (cp_parser_postfix_expression): Likewise.
2712 (cp_parser_unary_expression): Likewise.
2713 (cp_parser_cast_expression): Likewise.
2714 (cp_parser_assignment_expression): Likewise.
2715 (cp_parser_expression): Likewise.
2716 (cp_parser_new_expression): Note that new-expressions are not
2717 allowed in integral constant expressions.
2718 (cp_parser_delete_expression): Likewise.
2720 2004-03-12 Matt Austern <austern@apple.com>
2722 * decl2.c (maybe_make_one_only): Look at
2723 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
2724 to make an explicit instantiation weak.
2725 * method.c (use_thunk): Make sure we call comdat_linkage
2727 * pt.c (do_type_instantiation): On systems where weak symbols
2728 don't go in a static archive's TOC, explicit instantiation of a
2729 class must imply *explicit* instantiation of its memeber.
2731 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
2733 * call.c, cp-tree.h, pt.c: Fix comment typos.
2735 2004-03-10 Mark Mitchell <mark@codesourcery.com>
2738 * decl.c (xref_tag): Disregard non-type declarations when
2739 looking up a tagged type.
2741 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
2744 * call.c (convert_like_real): Build a const qualified temporary,
2745 when testing ctor access.
2747 2004-03-09 Mark Mitchell <mark@codesourcery.com>
2749 * call.c (initialize_reference): Fix typo.
2751 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2754 * pt.c (determine_specialization): For member templates, match also
2758 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
2760 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
2762 2004-03-09 Mark Mitchell <mark@codesourcery.com>
2765 * call.c (initialize_reference): Handle initializers that are
2766 class-member access expressions applies to rvalues.
2768 2004-03-09 Mark Mitchell <mark@codesourcery.com>
2771 * name-lookup.c (supplement_binding): Ignore functions that are
2772 marked DECL_ANTICIPATED.
2774 2004-03-08 Mark Mitchell <mark@codesourcery.com>
2777 * class.c (check_field_decls): Complain about non-static data
2778 members of reference type in unions. Propagate
2779 CLASSTYPE_REF_FIELDS_NEED_INIT and
2780 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
2782 * init.c (perform_member_init): Complain about mbmers with const
2783 type that are not explicitly initialized.
2785 2004-03-08 Mark Mitchell <mark@codesourcery.com>
2787 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
2788 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
2789 (lang_identifier): Remove implicit_decl and error_locus.
2790 (IDENTIFIER_IMPLICIT_DECL): Remove.
2791 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
2792 (IDENTIFIER_ERROR_LOCUS): Likewise.
2793 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
2794 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
2795 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
2796 (implicitly_declare): Remove.
2797 * decl.c (warn_extern_redeclared_static): Remove check of
2798 IDENTIFIER_IMPLICIT_DECL.
2799 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
2800 (implicitly_declare): Remove.
2801 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
2802 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
2803 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
2804 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
2805 in the innermost scope, rather than at namespace scope.
2806 * name-lookup.c (push_local_binding): Give it external linkage.
2807 (pushdecl): Remove dead code.
2808 * name-lookup.h (push_local_binding): Declare it.
2809 * ptree.c (cxx_print_identifier): Don't print
2810 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
2811 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
2812 not IDENTIFIER_ERROR_LOCUS.
2813 * typeck.c (build_function_call): Remove dead code.
2815 2004-03-08 Jason Merrill <jason@redhat.com>
2818 * decl.c (xref_tag): Remove attribute handling.
2819 * cp-tree.h: Adjust prototype.
2820 * decl.c, parser.c, rtti.c: Adjust callers.
2821 * parser.c (cp_parser_class_head): Pass back attributes in the
2823 (cp_parser_class_specifier): Adjust.
2825 2004-03-08 Matt Austern <austern@apple.com>
2828 * name-lookup.c (add_decl_to_level): Add extern variables, as well
2829 as static, to static_decls array.
2831 2004-03-05 Jason Merrill <jason@redhat.com>
2833 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
2835 2004-03-04 Geoffrey Keating <geoffk@apple.com>
2837 * decl.c (grokfndecl): Update old incorrect comment.
2838 (grokvardecl): Diagnose C++ variables of type with no linkage.
2840 2004-03-01 Mark Mitchell <mark@codesourcery.com>
2843 * pt.c (build_non_dependent_expr): Do not create a
2844 NON_DEPENDENT_EXPR for a THROW_EXPR.
2846 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
2849 * error.c (dump_expr): Handle THROW_EXPR.
2851 2004-03-01 Mark Mitchell <mark@codesourcery.com>
2854 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
2855 lookup if ordinary name-lookup finds a non-function.
2856 * pt.c (tsubst_copy_and_build): Likewise.
2859 * parser.c (cp_parser_late_parsing_default_args): Check that there
2860 are no extra tokens after the end of the default-argument
2863 2004-03-01 Mark Mitchell <mark@codesourcery.com>
2866 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
2867 having C++ linkage for name-mangling purposes.
2870 * parser.c (cp_parser_direct_declarator): Recognize constructor
2871 declarators that use a template-id to name the class being
2875 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
2876 (tsubst_expr): Do not call tsubst_copy, even when
2877 processing_template_decl.
2879 2004-03-01 Jeff Law <law@redhat.com>
2881 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
2884 2004-02-29 Mark Mitchell <mark@codesourcery.com>
2887 * name-lookup.h (push_scope): Change prototype.
2888 * name-lookup.c (push_scope): Do not reenter the current class
2890 * decl.c (grokfndecl): Check return code from push_scope before
2892 * decl2.c (check_classfn): Likewise.
2893 * parser.c (cp_parser_conversion_function_id): Likewise.
2894 (cp_parser_init_declarator): Likewise.
2895 (cp_parser_direct_declarator): Likewise.
2896 (cp_parser_class_specifier): Likewise.
2897 (cp_parser_class_head): Likewise.
2898 (cp_parser_lookup_name): Likewise.
2899 (cp_parser_constructor_declarator_p): Likewise.
2900 * pt.c (instantiate_class_template): Likewise.
2901 (resolve_typename_type): Likewise.
2903 2004-02-29 Mark Mitchell <mark@codesourcery.com>
2906 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
2910 * class.c (update_vtable_entry_for_fn): Do not go through
2911 covariance machinery if the type returned by an overrider is the
2912 same as the original.
2914 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
2916 * call.c: Fix a comment typo.
2918 2004-02-27 Ziemowit Laski <zlaski@apple.com>
2920 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
2922 2004-02-26 Mark Mitchell <mark@codesourcery.com>
2925 * parser.c (cp_parser_parameter_declaration_list): Commit
2926 to fewer tentative parses.
2928 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2931 * pt.c (dependent_type_p_r): A template template parameter is a
2934 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2937 * mangle.c (write_template_arg_literal): Don't rely on identity for
2940 2004-02-24 Jason Merrill <jason@redhat.com>
2942 * tree.c (build_exception_variant): Use check_qualified_type.
2944 2004-02-23 Zack Weinberg <zack@codesourcery.com>
2945 Kazu Hirata <kazu@cs.umass.edu>
2947 * decl.c (cxx_init_decl_processing): Don't check
2948 flag_writable_strings.
2950 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
2953 * typeck.c (maybe_warn_about_returning_address_of_location):
2954 Change check for VAR_DECL to use DECL_P instead.
2956 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2959 * cvt.c (build_expr_type_conversion): Type must be complete before
2960 looking up for conversions.
2962 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2965 * name-lookup.c (arg_assoc_class): Don't look into template
2966 arguments if it is not a primary template.
2968 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
2971 * method.c (use_thunk): Always clone function argument tree.
2973 2004-02-20 Mark Mitchell <mark@codesourcery.com>
2976 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
2979 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
2980 for all type variants.
2982 2004-02-19 Mark Mitchell <mark@codesourcery.com>
2985 * decl.c (duplicate_decls): Return error_mark_node for invalid
2987 * name-lookup.c (push_namespace): Ignore the return value from
2989 * pt.c (push_template_decl_real): Robustify.
2992 * name-lookup.c (push_class_level_binding): Do not complain about
2993 adding a binding for a member whose name is the same as the
2994 enclosing class if the member is located in a base class of the
2997 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3000 * parser.c (cp_parser_new_expression): Parse an ill-formed
3001 direct-new-declarator after a parenthesized type-id to emit good
3004 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
3006 * cp-tree.def, cvt.c: Update copyright.
3008 2004-02-17 Mark Mitchell <mark@codesourcery.com>
3011 * cp-tree.h (abi_version_at_least): Remove.
3012 * mangle.c: Include flags.h.
3014 2004-02-15 Mark Mitchell <mark@codesourcery.com>
3017 * call.c (build_conditional_expr): Handle conversions between
3018 class types which result in differently cv-qualified type
3022 * class.c (delete_duplicate_fields_1): Remove.
3023 (delete_duplicate_fields): Likewise.
3024 (finish_struct_anon): Remove check for members with the same name
3025 as their enclosing class.
3026 (check_field_decls): Do not call duplicate_fields.
3027 * decl.c (grokdeclarator): Remove check for static data members
3028 with the same name as their enclosing class.
3029 * name-lookup.c (push_class_level_binding): Check for members with
3030 the same name as their enclosing class.
3032 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
3035 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
3037 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3040 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
3041 has full set of arguments.
3043 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3046 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
3048 2004-02-13 Mark Mitchell <mark@codesourcery.com>
3051 * cp-tree.h (delete_sanity): Change prototype.
3052 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
3053 Remove dead code. Adjust code to warn about deleting an array.
3054 * typekc.c (decay_conversion): Use build_address and build_nop.
3057 * search.c (accessible_p): Do not check access in thunks.
3060 * call.c (build_conditional_expr): Call force_rvalue on the
3061 non-void operand in the case that one result is a throw-expression
3062 and the other is not.
3064 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
3067 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
3068 the type name and look ahead for ::~, and bail out early with a
3069 better error message if the parse is going to fail.
3071 2004-02-12 Mark Mitchell <mark@codesourcery.com>
3073 * call.c (conversion_kind): New type.
3074 (conversion_rank): Likewise.
3075 (conversion): Likewise.
3076 (CONVERSION_RANK): New macro.
3077 (conversion_obstack): New variable.
3078 (obstack_initialized): Likewise.
3079 (z_candidate): Change type of convs and second_conv.
3080 (candidate_warning): New type.
3081 (IDENTITY_RANK): Remove.
3082 (EXACT_RANK): Likewise.
3083 (PROMO_RANK): Likewise.
3084 (STD_RANK): Likewise.
3085 (PBOOL_RANK): Likewise.
3086 (USER_RANK): Likewise.
3087 (ELLIPSIS_RANK): Likewise.
3088 (BAD_RANK): Likewise.
3089 (ICS_RANK): Likewise.
3090 (ICS_STD_RANK): Likewise.
3091 (ICS_USER_FLAG): Likewise.
3092 (ICS_ELLIPSIS_FLAG): Likewise.
3093 (ICS_THIS_FLAG): Likewise.
3094 (ICS_BAD_FLAG): Likewise.
3095 (NEED_TEMPORARY_P): Likewise.
3096 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
3097 (USER_CONV_CAND): Likewise.
3098 (USER_CONV_FN): Likewise.
3099 (conversion_obstack_alloc): New function.
3100 (alloc_conversion): Likewise.
3101 (validate_conversion_obstack): Likewise.
3102 (alloc_conversions): Likewise.
3103 (build_conv): Adjust to deal with new conversion data structures.
3104 (build_identity_conv): New function.
3105 (build_ambiguous_conv): Likewise.
3106 (standard_conversion): Adjust to deal with new conversion data
3108 (convert_class_to_reference): Likewise.
3109 (direct_reference_binding): Likewise.
3110 (reference_binding): Likewise.
3111 (implicit_conversion): Likewise.
3112 (add_candidate): Likewise.
3113 (add_function_candidate): Likewise.
3114 (add_conv_candidate): Likewise.
3115 (build_builtin_candidate): Likewise.
3116 (print_z_candidate): Likewise.
3117 (merge_conversion_sequences): Likewise.
3118 (build_user_type_conversion_1): Likewise.
3119 (build_user_type_conversion): Likewise.
3120 (build_new_function_call): Likewise.
3121 (build_object_call): Likewise.
3122 (conditional_conversion): Likewise.
3123 (build_conditional_expr): Likewise.
3124 (build_new_op): Likewise.
3125 (build_op_delete_call): Likewise.
3126 (convert_like_real): Likewise.
3127 (build_over_call): Likewise.
3128 (build_new_method_call): Likewise.
3129 (is_subseq): Likewise.
3130 (maybe_handle_implicit_object): Likewise.
3131 (maybe_handle_ref_bind): Likewise.
3132 (compare_ics): Likewise.
3133 (source_type): Likewise.
3134 (add_warning): Likewise.
3136 (can_convert_arg): Likewise.
3137 (can_convert_arg_bad): Likewise.
3138 (perform_implicit_conversion): Likewise.
3139 (perform_direct_initialization_if_possible): Likewise.
3140 (initialize_reference): Likewise.
3141 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
3142 * cp-tree.def (WRAPPER): Likewise.
3143 (IDENTITY_CONV): Remove.
3144 (LVALUE_CONV): Likewise.
3145 (QUAL_CONV): Likewise.
3146 (STD_CONV): Likewise.
3147 (PTR_CONV): Likewise.
3148 (PMEM_CONV): Likewise.
3149 (BASE_CONV): Likewise.
3150 (REF_BIND): Likewise.
3151 (USER_CONV): Likewise.
3152 (AMBIG_CONV): Likewise.
3153 (RVALUE_CONV): Likewise.
3154 * cp-tree.h (tree_wrapper): Remove.
3155 (WRAPPER_ZC): Remove.
3156 (lang_tree_node): Remove wrapper.
3157 (LOOKUP_SPECULATIVELY): Remove.
3158 (build_op_delete_call): Adjust prototype.
3159 (validate_conversion_obstack): Declare.
3160 (build_zc_wrapper): Remove.
3161 * cvt.c (convert_to_reference): Remove dead code.
3162 (ocp_convert): Likewise.
3163 * decl.c (redeclaration_error_message): Correct handling of
3165 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
3166 (cp_tree_node_structure): Remove WRAPPER case.
3167 * decl2.c (finish_file): Call validate_conversion_obstack.
3168 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
3169 (build_op_delete_call): Likewise.
3170 (build_x_delete): Likewise.
3171 (build_delete): Adjust call to build_op_delete_call.
3172 * pt.c (tsubst_friend_declaration): Adjust code to determine
3173 whether or not a friend template is a definition.
3174 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
3175 * tree.c (build_zc_wrapper): Remove.
3177 2004-02-12 Zack Weinberg <zack@codesourcery.com>
3179 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
3180 * cp-tree.h: Don't declare cxx_builtin_type_decls.
3181 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
3182 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
3184 2004-02-10 Mark Mitchell <mark@codesourcery.com>
3186 * typeck.c (lookup_destructor): Fix typo in error message.
3188 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
3190 * call.c, parser.c, tree.c: Fix comment typos.
3192 2004-02-07 Zack Weinberg <zack@codesourcery.com>
3195 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
3196 * decl.c (duplicate_decls, start_function): Likewise.
3198 2004-02-07 Zack Weinberg <zack@codesourcery.com>
3200 * name-lookup.c (pushdecl): Issue shadow warnings directly.
3201 * parser.c (free_parser_stacks): Delete.
3203 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
3205 * rtti.c: Update copyright.
3207 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3210 * decl.c (require_complete_types_for_parms): Do not insert
3211 error_mark_node in the parameter list.
3213 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3216 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
3217 error when terminator can not be found.
3219 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
3221 Make-lang.in (po-generated): Delete.
3223 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
3225 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
3226 targetm.calls.promote_prototypes.
3228 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3232 2004-01-15 Geoffrey Keating <geoffk@apple.com>
3234 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
3235 (handle_pragma_implementation): Likewise.
3237 2004-02-05 Mark Mitchell <mark@codesourcery.com>
3240 * typeck.c (lookup_destructor): Tweak error message.
3242 2004-02-05 Jan Hubicka <jh@suse.cz>
3244 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
3247 2004-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3250 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
3251 code, only emits the diagnostic now. Added lookup of the identifier
3252 and support for qualified ids.
3253 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
3254 Parse an (invalid) type name as id-expression within a declarator.
3255 (cp_parser_simple_declaration): Use it.
3256 (cp_parser_member_declaration): Likewise.
3257 (cp_parser_make_typename_type): New function. Handle errors through
3258 cp_parser_diagnose_invalid_typename.
3259 (cp_parser_elaborated_type_specifier): Use it.
3261 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3264 * call.c (convert_like_real): Use "converting" rather than
3265 "argument" as the descriptive keyword to
3266 dubious_conversion_warnings.
3267 * typeck.c (convert_for_assignment): Do not call
3268 dubious_conversion_warnings.
3270 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3273 * init.c (build_delete): Emit a more informative error message in
3274 case of an incomplete type, and on the correct source line.
3276 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
3278 * error.c, search.c: Update copyright.
3280 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3283 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
3284 linkage for the typeinfo name string.
3286 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3289 * cp-tree.h (fold_non_dependent_expr): New function.
3290 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
3291 (cp_parser_template_argument): Use fold_non_dependent_expr.
3292 (cp_parser_direct_declarator): Likewise.
3293 * pt.c (fold_non_dependent_expr): New function.
3294 (convert_nontype_argument): Use it.
3295 (tsubst_qualified_id): Simplify.
3296 (tsubst_copy_and_build): Likewise.
3298 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3300 * decl.c (cxx_push_function_context): Do not set
3301 current_function_is_thunk.
3302 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
3305 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3308 * pt.c (more_specialized_class): Increase processing_template_decl
3309 while partial ordering.
3311 2004-02-03 Mark Mitchell <mark@codesourcery.com>
3314 * decl.c (start_function): Do not call pushdecl for any
3315 instantiation or specialization of a primary template.
3317 2004-02-03 Mark Mitchell <mark@codesourcery.com>
3320 * parser.c (cp_parser_class_name): Robustify.
3323 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
3326 * semantics.c (finish_id_expression): Do not return an
3327 IDENTIFIER_NODE when lookup finds a PARM_DECL.
3329 2004-02-03 Mark Mitchell <mark@codesourcery.com>
3332 * pt.c (build_non_dependent_expr): Do not build
3333 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
3336 * semantics.c (finish_id_expression): Do not return an
3337 IDENTIFIER_NODE when lookup finds a VAR_DECL.
3340 * parser.c (cp_parser_simple_declaration): When skipping to the
3341 end of the statement swallow the terminating semicolon.
3343 2004-02-02 Mark Mitchell <mark@codesourcery.com>
3346 * init.c (build_offset_ref): Improve error recovery for invalid
3347 uses of non-static member functions.
3350 * cp-tree.h (cp_build_type_attribute_variant): New function.
3351 * class.c (build_clone): Use cp_build_type_attribute_variant.
3352 * decl.c (duplicate_decls): Likewise.
3353 * pt.c (copy_default_args_to_explicit_spec): Likewise.
3354 (tsubst_function_type): Likewise.
3355 * tree.c (build_exception_variant): Check attributes before
3356 concluding that two types are the same.
3357 (cp_build_type-attribute_variant): New method.
3358 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
3361 * call.c (convert_class_to_reference): Keep better track of
3362 pedantically invalid user-defined conversions.
3364 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3367 * pt.c (tsubst_qualified_id): Improved error message when a type
3368 is expected but not found.
3370 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
3372 * class.c: Fix comment typos.
3374 * error.c: Likewise.
3375 * parser.c: Likewise.
3377 * search.c: Likewise.
3378 * typeck.c: Likewise.
3380 2004-01-30 Richard Henderson <rth@redhat.com>
3383 * method.c (use_thunk): Don't force_target_expr for void thunks.
3384 * tree.c (build_target_expr_with_type): Assert non-void type.
3385 (force_target_expr): Likewise.
3387 2004-01-30 Michael Matz <matz@suse.de>
3389 * parser.c (cp_parser_labeled_statement): Accept case ranges.
3391 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3395 * decl.c (grokdeclarator): Check immediatly type completeness for
3396 non-dependent types.
3398 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3401 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
3402 a sizeof expression.block
3404 2004-01-29 Mark Mitchell <mark@codesourcery.com>
3407 * mangle.c (write_encoding): Correct encoding of member template
3410 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3412 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
3413 template name as it was `<::' (digraph typo).
3414 (cp_parser_nth_token_starts_template_argument_list_p): New function.
3415 (cp_parser_id_expression): Use it.
3416 (cp_parser_nested_name_specifier_opt): Likewise.
3417 (cp_parser_template_name): Likewise.
3418 (cp_parser_class_name): Likewise.
3419 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
3421 2004-01-28 Mark Mitchell <mark@codesourcery.com>
3424 * typeck.c (merge_types): Do not merge attributes into
3428 * parser.c (cp_parser_direct_declarator): Do not prevent
3429 backtracking inside a parenthesized declarator.
3430 (cp_parser_parameter_declaration): Fix typo in comment.
3432 2004-01-28 Jan Hubicka <jh@suse.cz>
3434 * semantics.c (expand_body) Do emit_associated_thunks before
3437 2004-01-27 Devang Patel <dpatel@apple.com>
3439 * name-lookup.c: Include "debug.h"
3440 (do_namespace_alias): Invoke debug_hooks to emit debug info
3441 for namespace alias.
3442 (do_local_using_decl): Invoke debug_hooks to emit debug info
3444 (do_class_using_decl): Same.
3445 (do_toplevel_using_decl): Same.
3446 (do_using_directive): Same.
3447 (cp_emit_debug_info_for_using): New function.
3448 * Make-lang.in (cp/parser.o): Depend on debug.h
3449 (cp/name-lookup.o): Same.
3451 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3453 * cp-tree.h (language_function, lang_type_header): Use
3455 * name-lookup.h (cp_binding_level): Likewise.
3457 2004-01-26 Mark Mitchell <mark@codesourcery.com>
3460 * semantics.c (finish_for_expr): Check for unresolved overloaded
3463 * class.c (add_method): Just check processing_template_decl to
3464 determine whether or not we are within a template.
3465 * decl2.c (maybe_retrofit_in_chrg): Likewise.
3466 * init.c (decl_constant_value): Check the type of the declaration,
3468 * name-lookup.c (maybe_push_to_top_level): Rename to ...
3469 (push_to_top_level): ... this.
3470 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
3471 * pt.c (push_template_decl_real): Reorder condition for speed.
3472 (convert_template_argument): Use dependency-checking functions in
3473 place of uses_template_parms.
3474 (lookup_template_class): Avoid calling uses_template_parms more
3476 (uses_template_parms): Reimplement, using dependency-checking
3478 (instantiate_class_template): Use push_to_top_level, not
3479 maybe_push_to_top_level.
3480 (type_unification_real): Simplify.
3481 (type_dependent_expression_p): Handle OFFSET_REFs and
3483 (any_dependent_template_arguments_p): Handle multiple levels of
3485 * semantics.c (expand_or_defer_fn): Do not check
3486 uses_template_parms for template instantiations.
3487 * typeck.c (comptypes): Avoid calling cp_type_quals.
3489 2004-01-25 Mark Mitchell <mark@codesourcery.com>
3492 * call.c (build_over_call): Do not convert arguments when
3493 processing a template.
3494 * pt.c (build_non_dependent_expr): Do not build a
3495 NON_DEPENDENT_EXPR for arithmetic constants.
3497 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3500 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
3501 returns a TYPE_DECL. no further lookup is required.
3502 * semantics.c (check_template_template_default_arg): A TYPE_DECL
3503 is invalid. Rework to give better diagnostics.
3505 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3508 * pt.c (instantiate_class_template): Add an error_mark_node
3510 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
3512 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
3515 * decl.c (finish_function): Move the call to
3516 finish_fname_decls below the call to
3517 finish_eh_spec_block.
3519 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
3521 * optimize.c, typeck2.c: Update copyright.
3523 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
3525 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
3526 init.c, mangle.c, typeck.c: Update copyright.
3528 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
3530 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
3532 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
3534 * Make-lang.in: Replace $(docdir) with doc.
3535 (c++.info, c++.srcinfo): Dummy entry.
3536 (c++.man, c++.srcman): New rules.
3537 (c++.install-man): Revamp rule.
3539 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
3541 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
3542 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
3543 immediate $(shell) instead of deferred backquote.
3545 2004-01-19 Mark Mitchell <mark@codesourcery.com>
3548 * parser.c (cp_parser_postfix_expression): When encountering
3549 incomplete type on left-hand side of "->" or ".", treat the entire
3550 expression as erroneous.
3553 * call.c (build_field_call): Remove.
3554 (n_build_method_call): Likewise.
3555 (build_method_call): Likewise.
3556 (build_new_method_call): Do not call build_field_call.
3557 * class.c (n_build_method_call): Remove.
3558 (print_class_statistics): Do not print it.
3559 * cp-tree.h (build_method_call): Remove declaration.
3560 (finish_object_call_expr): Likewise.
3561 (build_new_1): Do not use build_method_call.
3562 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
3563 when the function appearing on the right-hand-side of "." or "->"
3564 is not actually a function.
3565 * pt.c (tsubst_copy_and_build): Likewise.
3566 * semantics.c (finish_object_call_expr): Remove.
3568 2004-01-18 Mark Mitchell <mark@codesourcery.com>
3571 * pt.c (tsubst): Use finish_typeof.
3573 2004-01-18 Jason Merrill <jason@redhat.com>
3576 * except.c (build_throw): In a template, set
3577 current_function_returns_abnormally.
3579 2004-01-17 Fred Fish <fnf@intrinsity.com>
3582 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
3583 except don't call array_type_nelts() with a VECTOR_TYPE.
3585 2004-01-16 Jan Hubicka <jh@suse.cz>
3587 * mangle.c (write_mangled_name): Remove inline modifier.
3589 2004-01-16 Mark Mitchell <mark@codesourcery.com>
3592 * decl.c (compute_array_index_type): Fix grammar in comment.
3593 * init.c (build_zero_init): Handle zero-sized arrays correctly.
3596 * call.c (name_as_c_string): Print conversion operator names
3600 * call.c (initialize_reference): Pass -1 for inner parameter to
3603 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3606 * parser.c (cp_parser_base_specifier): Check for an invalid
3607 keyword `typename' and emit an user-friendly error message.
3609 2004-01-15 Geoffrey Keating <geoffk@apple.com>
3612 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
3613 (handle_pragma_implementation): Likewise.
3615 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3618 * typeck.c (build_class_member_access_expr): Allow to access members
3619 of the currently open class.
3620 (finish_class_member_access_expr): Likewise.
3622 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
3625 * name-lookup.c (validate_nonmember_using_decl): Take scope and
3626 name by value, instead of computing them.
3627 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
3628 arguments. Pass them to validate_nonmember_using_decl.
3629 * name-lookup.h (do_local_using_decl): Adjust.
3630 (do_toplevel_using_decl): Likewise.
3631 * parser.c (cp_parser_using_declaration): Likewise.
3632 * pt.c (tsubst_expr): Likewise.
3634 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
3638 * name-lookup.c (qualified_lookup_using_namespace): Search
3639 strongly-associated namespaces first, and only then try other
3642 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
3644 * Make-lang.in (c++.srcextra): Dummy entry.
3646 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3649 * parser.c (cp_parser_template_name): Don't try to parse a
3650 conversion-function-id, as it cannot be a template-name.
3651 (cp_parser_simple_type_specifier): Check for invalid template-ids
3652 even after a built-in type.
3654 2004-01-14 Jan Hubicka <jh@suse.cz>
3657 * pt.c (instantiate_decl): Do not increase function_depth.
3659 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
3663 * parser.c (cp_parser_elaborated_type_specifier): Warn about
3664 attributes and discard.
3665 * decl.c (xref_tag): Don't overwite existing attributes with
3668 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3671 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
3672 is no destructor while looking up a BIT_NOT_EXPR.
3674 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
3676 * cxxfilt.c: Remove unused file.
3678 2004-01-14 Jan Hubicka <jh@suse.cz>
3680 Partial fix to PR c++/12850
3681 * decl2.c (mark_used): Do not proactively instantiate templates
3682 when compiling in unit-at-a-time or not optimizing.
3683 * optimize.c (maybe_clone_body): Do not increase function depth.
3685 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3688 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
3690 2004-01-12 Steven Bosscher <stevenb@suse.de>
3693 * parser.c (cp_parser_member_declaration): Any non-type is also
3694 not a class or a function.
3696 2004-01-12 Jason Merrill <jason@redhat.com>
3699 * class.c (build_base_path): Do not mark vtable references as
3701 (build_vtbl_ref_1): Likewise.
3703 2004-01-12 Richard Henderson <rth@redhat.com>
3706 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
3707 (store_init_value): Use it.
3708 * decl.c (check_initializer): Expect full initialization code
3709 from store_init_value.
3710 * init.c (expand_aggr_init_1): Likewise.
3711 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
3713 2004-01-12 Mark Mitchell <mark@codesourcery.com>
3715 * class.c (layout_class_type): For non-POD class types, also copy
3716 the DECL_SIZE and DECL_MODE of fields to the base class type.
3718 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3721 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
3722 calling regenerate_decl_from_template.
3724 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
3727 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
3728 decl-specifier occurring along with a class definition.
3730 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
3732 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
3733 clauses to comments describing declares_class_or_enum.
3734 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
3737 2004-01-12 Jan Hubicka <jh@suse.cz>
3739 * pt.c (for_each_template_parm): Do not check for duplicates.
3740 (for_each_template_parm): Use walk_tree duplicate checking code.
3742 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
3745 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
3746 is error_mark_node, don't add any more decl_specs.
3747 (cp_parser_init_declarator): After committing to a declaration, if
3748 the decl_specifiers start with error_mark_node, issue an error and
3749 change the type to "int".
3751 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
3754 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
3756 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3760 * pt.c (tsubst): Substitution must fail if we are attempting to
3761 create an array with element type that is an abstract class type.
3762 * decl.c (cp_finish_decl): Strip pointers and array types recursively
3763 before calling abstract_virtuals_error.
3765 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
3767 * name-lookup.c (qualified_lookup_using_namespace): Consider
3768 strong using directives even if we've already found a binding.
3770 2004-01-09 Mark Mitchell <mark@codesourcery.com>
3772 * cp-tree.h (cxx_expand_expr): Change prototype.
3773 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
3775 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3778 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
3779 looking into them recursively. They can be there because of the
3780 new __offsetof__ extension.
3782 2004-01-07 Zack Weinberg <zack@codesourcery.com>
3784 * parser.c (cp_parser_save_member_function_body): Mark the
3787 2004-01-05 Mark Mitchell <mark@codesourcery.com>
3790 * class.c (build_clone): Copy type attributes from the original
3791 function to the clone.
3794 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
3795 references as constant.
3798 * parser.c (cp_parser_explicit_instantiation): Improve error
3800 (cp_parser_require): Improve indication of the error location.
3803 * parser.c (cp_parser_class_head): Reorder logic to check for
3804 invalid qualification.
3806 2004-01-04 Mark Mitchell <mark@codesourcery.com>
3809 * name-lookup.c (lookup_using_namespace): Remove spacesp
3811 (unqualified_namespace_lookup): Likewise.
3812 (lookup_qualified_name): Adjust accordingly.
3813 (lookup_name_real): Likewise.
3814 (lookup_arg_dependent): Do not eliminate the namespace of the
3815 functions found by unqualified name lookup unless that is the
3818 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
3820 * semantics.c (push_deferring_access_checks): Fix format.
3821 (resume_deferring_access_checks): Likewise.
3822 (stop_deferring_access_checks): Likewise.
3823 (pop_deferring_access_checks): Likewise.
3824 (get_deferred_access_checks): Likewise.
3825 (pop_to_parent_deferring_access_checks): Likewise.
3826 (perform_deferred_access_checks): Likewise.
3827 (perform_or_defer_access_check): Likewise.
3829 2004-01-04 Richard Henderson <rth@redhat.com>
3831 * call.c (build_over_call): Don't create a save_expr of an
3832 aggregate, but rather its address.
3834 2004-01-04 Mark Mitchell <mark@codesourcery.com>
3837 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
3838 an offsetof expression.
3840 * parser.c (cp_parser_parameter_declaration): Fix comment.
3843 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
3844 (reference_binding): Set it when appropriate.
3845 (build_temp): New function, split out from ...
3846 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
3847 (initialize_reference): Likewise.
3850 * parser.c (cp_parser): Add in_type_id_in_expr_p.
3851 (cp_parser_new): Initialize it.
3852 (cp_parser_postfix_expression): Set it.
3853 (cp_parser_sizeof_operand): Likewise.
3854 (cp_parser_parameteR_declaration): Do not commit early to tenative
3855 parsers when in_type_id_in_expr_p is set.
3857 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3860 * parser.c (cp_parser_template_argument): Don't call
3861 make_unbound_class_template directly.
3862 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
3863 UNBOUND_CLASS_TEMPLATE tree node.
3865 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
3868 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
3870 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3873 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
3874 (DECL_FUNCTION_TEMPLATE_P): Use it.
3875 (DECL_CLASS_TEMPLATE_P): Likewise.
3876 * parser.c (cp_parser_lookup_name): Add is_template parameter.
3877 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
3878 (cp_parser_template_name): Likewise.
3879 (cp_parser_elaborated_type_specifier): Likewise.
3880 (cp_parser_namespace_name): Likewise.
3881 (cp_parser_class_name): Likewise.
3882 (cp_parser_lookup_name_simple): Likewise.
3884 See ChangeLog.3 for earlier changes.