1 2004-08-05 Geoffrey Keating <geoffk@apple.com>
3 * g++spec.c (lang_specific_driver): An -Xlinker or -Wl, option
4 means that libstdc++ is needed.
6 2004-08-05 Nathan Sidwell <nathan@codesourcery.com>
8 * cvt.c (cp_convert_to_pointer): Adjust force_fit_type call.
10 2004-08-04 Geoffrey Keating <geoffk@apple.com>
12 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_ASSEMBLER_NAME rather
13 than passing it as a parameter to rest_of_decl_compilation.
14 * decl2.c (grokfield): Use set_user_assembler_name.
16 2004-08-04 Nathan Sidwell <nathan@codesourcery.com>
18 * decl.c (complete_array_type): Don't gratuitously copy
19 maxindex. Its type is always set.
21 2004-08-04 Paul Brook <paul@codesourcery.com>
23 * Make-lang.in (cp/semantics.o, cp/optimize.o): Depend on TARGET_H.
24 * cp-tree.h (struct language_function): Rename x_dtor_label to
26 (dtor_label): Rename ...
27 (cdtor_label): ... to this.
28 * decl.c (begin_constructor_body): Remove.
29 (check_special_function_return_type): Maybe change the return type.
30 (grokdeclarator): Pass the class type.
31 (start_preparsed_function): Constructors may need a return label.
32 (finish_constructor_body, finish_destructor_body): Set the return
34 (begin_function_body): Don't call begin_constructor_body.
35 (finish_function): Don't warn for constructors or destructors.
36 (implicitly_declare_fn): Maybe change the return type.
37 * optimize.c: Include target.h.
38 (maybe_clone_body): Remap the function result.
39 * semantics.c: Include target.h.
40 (finish_return_stmt): Maybe jump to return label for constructors.
42 2004-08-03 Mark Mitchell <mark@codesourcery.com>
44 * class.c (build_vtable): Do not set DECL_VISIBILITY here.
45 (check_field_decls): Or here.
46 (check_methods): Or here.
47 (initialize_array): Don't mess with DECL_CONTEXT.
48 * cp-tree.h (start_decl): Adjust prototype.
49 (determine_visibility): New function.
50 * decl.c (duplicate_decls): Remove checks for hidden "operator
52 (build_library_fn_1): Give all library functions default
54 (start_decl): Add pop_scope_p parameter. Tidy.
55 (cp_finish_decl): Do not pop scopes here. Call
56 determine_visibility for variable definitions.
57 (start_preparsed_function): Call determine_visibility.
58 * decl2.c (determine_visibility): New function.
59 * method.c (use_thunk): Fix formatting.
60 * parser.c (cp_parser_condition): Adjust calls to start_decl.
61 (cp_parser_init_declarator): Likewise.
62 * pt.c (instantiate_decl): Always call pop_nested_class.
63 * rtti.c (get_tinfo_decl): Do not set DECL_VISIBILITY.
64 (tinfo_base_init): Likewise.
66 2004-08-02 Mark Mitchell <mark@codesourcery.com>
69 * name-lookup.c (validate_nonmember_using_decl): Robustify.
71 2004-08-01 Mark Mitchell <mark@codesourcery.com>
74 * name-lookup.c (decl_namespace): Remove.
75 (current_decl_namespace): Use decl_namespace_context instead of
77 (push_decl_namespace): Likewise.
78 (arg_assoc_class): Likewise.
79 (arg_assoc_type): Likewise.
80 * pt.c (check_specialization_namespace): New function.
81 (maybe_process_partial_specialization): Use it.
82 (register_specialization): Likewise.
85 * cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): New macro.
86 * call.c (null_ptr_cst_p): Handle variables with constant
88 * pt.c (convert_nontype_argument): Use
89 DECL_INTEGRAL_CONSTANT_VAR_P.
90 * semantics.c (finish_id_expression): Likewise.
93 * decl.c (duplicate_decls): Reject duplicate namespace
97 * typeck.c (build_ptrmemfunc): Loosen assertion.
99 2004-08-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
101 * call.c (z_candidate::template_decl): Rename from template.
102 (add_template_candidate_real): Adjust member reference.
105 2004-07-29 Mark Mitchell <mark@codesourcery.com>
107 * cp-tree.h (IDENTIFIER_REPO_CHOSEN): Define.
108 (lang_decl_flags): Narrow the width of "languages". Add
110 (DECL_NEEDED_P): Remove.
111 (FOR_EACH_CLONE): New macro.
112 (DECL_REPO_AVAILABLE_P): Likewise.
113 (DECL_TINFO_P): Likewise.
114 (set_linkage_according_to_type): Declare.
115 (import_export_vtable): Remove.
116 (import_export_tinfo): Likewise.
117 (mark_needed): New function.
118 (decl_needed_p): Likewise.
119 (note_vauge_linkage_fn): Likewise.
120 (init_repo): Change prototype.
121 (repo_template_used): Remove.
122 (repo_template_instantiated): Likewise.
123 (repo_emit_p): New function.
124 (repo_export_class_p): Likewise.
125 (no_linkage_check): Change prototype.
126 * class.c (set_linkage_according_to_type): New function.
127 (build_vtable): Use it. Do not call import_export_vtable. Set
128 DECL_IGNORED_P if appropriate.
129 * decl.c (duplicate_decls): Preserve DECL_REPO_AVAILABLE_P.
130 (make_rtL_for_nonlocal_decls): Check for template instantiations
132 (grokfndecl): Adjust call to no_linkage_check.
133 (set_linkage_for_static_data_member): New function.
134 (grokvardecl): Use it. Adjust call to no_linkage_check.
135 (grokdeclarator): Use set_linkage_for_static_data_member.
136 * decl2.c (note_vague_linkage_fn): New function.
137 (note_vague_linkage_var): Likewise.
138 (finish_static_data_member_decl): Use it.
139 (import_export_vtable): Remove.
140 (import_export_class): Use repo_export_class_p.
141 (var_finalized_p): Simplify.
142 (maybe_emit_vtables): Simplify.
143 (mark_needed): New function.
144 (decl_needed_p): Likewise.
145 (import_export_decl): Add documentation and consistency checks.
146 Use repo_emit_p. Handle virtual tables and RTTI information
148 (import_export_tinfo): Remove.
149 (write_out_vars): Call import_export_decl.
150 (cxx_callgraph_analyze_expr): Ensure that all vtables are emitted
152 (finish_file): Use decl_needed_p. Do not call import_export_decl
153 for undefined static data members. Do not warn about undefined
154 inlines when using a repository.
155 (mark_used): Use note_vague_linkage_fn. Always defer template
157 * lex.c (cxx_init): Adjust call to init_repo. Always set
159 * method.c (synthesize_method): Remove unncessary
160 import_export_decl call.
161 (implicitly_declare_fn): Use set_linkage_according_to_type.
162 * optimize.c (maybe_clone_body): Use FOR_EACH_CLONE.
163 * pt.c (instantiate_class_template): Don't redundantly add classes
164 to keyed_classes. Don't call repo_template_used.
165 (tsubst_decl): Set DECL_INTERFACE_KNOWN for instantiations of
166 templates with internal linkage.
167 (check_instantiated_args): Adjust call to no_linkage_check.
168 (instantiate_template): Use FOR_EACH_CLONE.
169 (mark_definable): New function.
170 (mark_decl_instantiated): Use it.
171 (do_decl_instantiation): Adjust tests for explicit instantiation
172 after "extern template".
173 (instantiate_class_member): Do not use repo_template_instantiated.
174 (do_type_instantiation): Simplify.
175 (instantiate_decl): Use mark_definable. Check repo_emit_p.
177 * repo.c (repo_get_id): Remove.
178 (original_repo): Remove.
179 (IDENTIFIER_REPO_USED): Remove.
180 (IDENTIFIER_REPO_CHOSEN): Remove.
181 Remove all #if 0'd code.
182 (repo_template_used): Remove.
183 (repo_template_instantiated): Remove.
184 (temporary_obstack_initialized_p): New variable.
185 (init_repo): Register with lang_post_pch_load. Avoid creating
186 identifiers unnecessarily. Don't use original_repo. Close the
188 (reopen_repo_file_for_write): Not here.
189 (finish_repo): Always write out a new repository file.
190 (repo_emit_p): New function.
191 (repo_export_class_p): Likewise.
192 * rtti.c (get_tinfo_decl): Use set_linkage_according_to_type.
193 (involves_incomplete_p): New function.
194 (tinfo_base_init): Use it.
195 (ptr_initializer): Remove non_public_ptr parameter.
196 (ptm_initializer): Likewise.
197 (get_pseudo_ti_init): Likewise.
198 (unemitted_tinfo_decl_p): Remove.
199 (emit_tinfo_decl): Use import_export_decl.
200 * semantics.c (expand_body): Move updates of static_ctors and
202 (expand_or_defer_fn): ... here.
203 * tree.c (no_linkage_check): Add relaxed_p parameter.
205 2004-07-28 Eric Christopher <echristo@redhat.com>
207 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
209 2004-07-28 Nathan Sidwell <nathan@codesourcery.com>
211 * cp-tree.h (struct tree_pair_s): New.
212 (typedef tree_pair_p): New.
213 (DEF_VEC_O(tree_pair_s)): New.
214 (struct lang_type_class): Make vcall_indices a VEC(tree_pair_s).
215 (CLASSTYPE_VCALL_INDICES): Update documentation.
216 * class.c (get_vcall_index): Adjust.
217 (add_vcall_offset): Adjust.
219 2004-07-27 Kelley Cook <kcook@gcc.gnu.org>
221 * pt.c, typeck.c: Remove spurious carriage returns.
223 2004-07-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
226 * pt.c (coerce_template_template_parms) <PARM_DECL case>: Only check
227 when the type of ARG is not dependent.
229 2004-07-26 Geoffrey Keating <geoffk@apple.com>
231 * g++spec.c (LIBSTDCXX_PROFILE): Default to LIBSTDCXX.
232 (lang_specific_driver): If the C++ or math library options don't
233 start with '-l', don't count them as added libraries.
235 2004-07-26 Nathan Sidwell <nathan@codesourcery.com>
237 * decl.c (xref_basetypes): Adjust base access vector creation.
238 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Adjust base
240 * search.c (dynamic_cast_base_recurse, dfs_access_in_type): Likewise.
242 2004-07-26 Niall Douglas <s_fsfeurope2@nedprod.com>
243 Brian Ryner <bryner@brianryner.com>
247 * class.c (check_field_decls): Apply hidden visibility if
248 -fvisibility-inlines-hidden and inlined unless otherwise specified
249 (build_vtable): Set vtable visibility to class visibility.
250 (check_field_decls): Default static member visibility to class
252 (check_methods): Default method visibility to class visibility.
253 * cp-tree.h: Added CLASSTYPE_VISIBILITY and
254 CLASSTYPE_VISIBILITY_SPECIFIED macro.
255 * decl.c (duplicate_decls): New logic for merging definition decls
256 with declaration decls. Added ignore & warning when non default
257 applied to global operator new or delete.
258 * method.c, optimize.c, rtti.c: Added setting of VISIBILITY_SPECIFIED
259 wherever VISIBILITY was changed
260 * rtti.c (get_tinfo_decl): Set typeinfo visibility to class
262 (tinfo_base_init): Set typeinfo name visibility to class visibility.
264 2004-07-25 Bernardo Innocenti <bernie@develer.com>
266 * decl.c: Rename all identifiers named `class' to `cl'.
267 * cp-tree.h: Likewise.
269 2004-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
271 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Use GGC_CNEW.
272 * typeck2.c (abstract_virtuals_error): Use GGC_NEW.
273 * name-lookup.c (binding_entry_make): Use GGC_NEW.
274 (binding_table_construct): Use GGC_CNEWVEC.
275 (binding_table_new): Use GGC_NEW.
276 (cxx_binding_make): Likewise.
277 (begin_scope): Likewise.
278 (push_to_top_level): Use GCC_CNEW.
279 * parser.c (cp_token_cache_new): Likewise.
280 (cp_token_cache_push_token): Likewise.
281 (cp_lexer_new_main): Likewise.
282 (cp_lexer_new_from_tokens): Likewise.
283 (cp_parser_context_new): Likewise.
284 (cp_parser_new): Likewise.
285 (cp_lexer_new_from_tokens): Use GGC_NEWVEC.
286 * lex.c (cxx_make_type): Use GGC_CNEW.
287 (retrofit_lang_decl): Use GGC_NEWVAR.
288 (cxx_dup_lang_specific_decl): Likewise.
289 (copy_lang_type): Likewise.
290 * decl.c (use_label): Use GGC_NEW instead of ggc_alloc.
291 (save_function_data): Likewise.
292 (lookup_label): Use GGC_CNEW instead of ggc_alloc_cleared.
293 (cxx_push_function_context): Likewise.
295 2004-07-25 Richard Henderson <rth@redhat.com>
297 * decl.c (start_preparsed_function): Set DECL_ARTIFICIAL and
298 DECL_IGNORED_P on RESULT_DECL.
299 * semantics.c (finalize_nrv): Copy them too.
301 2004-07-23 Nathan Sidwell <nathan@codesourcery.com>
303 * search.c (lookup_conversion_operator): Avoid two loops.
304 (add_conversions): Remove.
305 (check_hidden_convs, split_conversions,
306 lookup_conversions_r): New.
307 (lookup_conversions): Use lookup_conversions_r.
309 2004-07-22 Nathan Sidwell <nathan@codesourcery.com>
311 * pt.c (get_template_base): Check type is completable.
313 2004-07-21 Eric Christopher <echristo@redhat.com>
315 * decl.c (poplevel): Inline unused variable checking.
318 2004-07-21 Paolo Bonzini <bonzini@gnu.org>
320 * typeck.c (build_binary_op): Do not use RDIV_EXPR for
323 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
326 * pt.c (check_explicit_specialization): Remove extension to accept
327 specializations without template headers. Fall-through to normal
330 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
333 * pt.c (determine_specialization): New parameter template_count.
334 Disambiguate between member templates and member functions counting
335 the template headers.
336 (check_explicit_specialization): Update caller.
337 (tsubst_friend_function): Likewise.
339 2004-07-20 Steven Bosscher <stevenb@suse.de>
341 * cp-tree.def (TINST_LEVEL): Make it an 'x' node.
342 * cp-tree.h (tinst_level_t): New tree type.
343 (union lang_tree_node): Handle it.
344 (TINST_LOCATION): New accessor macro.
345 (make_tinst_level): New prototype.
346 * cp-lang.c (cp_tree_size): Handle TINST_LEVEL.
347 * decl.c (cp_tree_node_structure): Likewise.
348 * error.c (print_instantiation_full_context): Use TINST_LOCATION.
349 (print_instantiation_partial_context): Likewise.
350 * pt.c (pop_tinst_level): Likewise.
351 (push_tinst_level): Use make_tinst_level.
352 * tree.c (make_tinst_level): New function.
353 (cp_walk_subtrees): Walk TINST_DECL for a TINST_LEVEL node.
355 2004-07-20 Mark Mitchell <mark@codesourcery.com>
357 * parser.c (cp_parser_simple_type_specifier): Fix typo.
360 * parser.c (cp_parser_simple_type_specifier): Do not record usage
361 of globally-qualified names.
363 2004-07-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
366 * error.c (dump_type) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Output
369 2004-07-19 Mark Mitchell <mark@codesourcery.com>
372 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
373 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
374 * class.c (add_implicitly_declared_members): Use
375 CLASSTYPE_LAZY_ASSIGNMENT_OP.
376 * method.c (lazily_declare_fn): Clear
377 CLASSTYPE_LAZY_ASSIGNMENT_OP.
378 * search.c (lookup_fnfields_1): Check it.
380 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
382 * cp-tree.h (vec_binfo_member): Remove.
383 * tree.c (vec_binfo_member): Remove.
385 * cp-tree.h (struct lang_type_class): Remove vfields field.
386 (CLASSTYPE_VFIELDS): Remove.
387 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
388 * class.c (determine_primary_base): Remove CLASSTYPE_VFIELDS
390 (dfs_modify_vtables): Use TYPE_CONTAINS_VPTR_P.
391 (finish_struct_1): Remove CLASSTYPE_VFIELDS handling.
392 * init.c (dfs_initialize_vtbl_ptrs): Use TYPE_CONTAINS_VPTR_P.
394 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
396 * cp-tree.h (DEF_VEC_P(tree)): Remove here.
397 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
399 (BINFO_LANG_SLOTS): Remove.
400 * tree.c (copy_binfo): Adjust BINFO creation and accessors.
401 * decl.c (xref_basetypes): Adjust BINFO creation and accessors.
402 * class.c (check_bases): Adjust BINFO accessors.
403 (determine_primary_base, finish_struct_bits,
404 maybe_warn_about_overly_private_class, warn_hidden,
405 walk_subobject_offsets, propagate_binfo_offsets, end_of_class,
406 warn_about_ambiguous_bases, get_vfield_name,
407 dump_class_hierarchy_r, build_vtt_inits, accumulate_vtbl_inits,
408 add_vcall_offset_vtbl_entries_r): Likewise.
409 * dump.c (cp_dump_tree): Likewise.
410 * init.c (sort_mem_initializers, expand_member_init, build_delete,
411 push_base_cleanups): Likewise.
412 * method.c (do_build_copy_constructor, do_build_assign_ref,
413 synthesize_exception_spec): Likewise.
414 name-lookup.c (arg_assoc_class): Likewise.
415 * pt.c (instantiate_class_template,
416 get_template_base_recursive): Likewise.
417 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Likewise.
418 * typeck2.c (process_init_constructor): Likewise.
419 * search.c (lookup_base_r, dynamic_cast_base_recurse,
420 dfs_access_in_type, dfs_walk_real, look_for_overrides,
421 types_overlap_p, copied_binfo, original_binfo): Likewise.
422 (binfo_for_vtable): Remove
424 2004-07-20 Steven Bosscher <stevenb@suse.de>
426 * cp-tree.h (struct lang_decl_flags): Unify the template_info and
427 thunk_alias, and the access and virtual_offset fields.
428 (THUNK_VIRTUAL_OFFSET, THUNK_ALIAS): Adjust.
429 * decl.c (finish_case_label): Update c_add_case_node call.
431 2004-07-19 Mark Mitchell <mark@codesourcery.com>
433 Revert patch for PR c++/16623.
435 2004-07-19 Kelley Cook <kcook@gcc.gnu.org>
437 * except.c: Remove two spurious carriage returns.
439 2004-07-19 Mark Mitchell <mark@codesourcery.com>
442 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
443 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
444 * class.c (add_implicitly_declared_members): Use
445 CLASSTYPE_LAZY_ASSIGNMENT_OP.
446 * method.c (lazily_declare_fn): Clear
447 CLASSTYPE_LAZY_ASSIGNMENT_OP.
448 * search.c (lookup_fnfields_1): Check it.
450 2004-07-19 Nathan Sidwell <nathan@codesourcery.com>
452 * class.c (add_method): Delay adding the slot until the end.
453 (determine_primary_base): Adjust VEC_iterate invokation.
454 (resort_type_method_vec, finish_struct_methods, warn_hidden,
455 walk_subobject_offsets, end_of_class, warn_about_ambiguous_bases,
456 build_vtbl_initializer): Likewise.
457 * init.c (sort_mem_initializers, build_delete, push_base_cleanups,
458 build_vbase_delete): Likewise.
459 * method.c (do_build_copy_constructor): Likewise.
460 * name-lookup.c (new_class_binding, print_binding_level,
461 poplevel_class, store_class_bindings, push_to_top_level,
462 pop_from_top_level): Likewise.
463 * pt.c (check_explicit_specialization): Likewise.
464 * search.c (lookup_conversion_operator, lookup_fnfields_1,
465 get_pure_virtuals, add_conversions, dfs_check_overlap,
466 binfo_for_vbase): Likewise.
468 2004-07-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
471 * pt.c (unify) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Use only
472 innermost set of template arguments during deduction. Simplify.
474 2004-07-19 Joseph S. Myers <jsm@polyomino.org.uk>
476 * typeck.c (build_modify_expr, build_x_modify_expr): Set
477 TREE_NO_WARNING on assignments with an operator other than '='.
479 2004-07-10 Steven Bosscher <stevenb@suse.de>
480 Joseph S. Myers <jsm@polyomino.org.uk>
482 * cp-tree.h (C_SET_EXP_ORIGINAL_CODE): Remove.
483 * decl2.c (grokfield): Don't check current_class_depth via
484 unused TREE_COMPLEXITY.
485 * semantics.c (finish_parenthesized_expr): Set TREE_NO_WARNING
486 to avoid the missing parentheses warning.
487 Don't set C_SET_EXP_ORIGINAL_CODE.
489 2004-07-18 Mark Mitchell <mark@codesourcery.com>
491 * tree.c (no_linkage_helper): Remove.
492 (no_linkage_check): Don't use walk_tree_without_duplicates.
494 * mangle.c (write_expression): Issue a sorry for zero-operand
497 2004-07-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
500 * init.c (build_offset_ref): Build SCOPE_REF with non-null
501 TREE_TYPE for non-dependent names.
502 * typeck.c (build_x_unary_op): Handle non-dependent SCOPE_REF.
503 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
504 unknown_type_node as its TREE_TYPE.
505 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
506 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
507 (dump_expr) <SCOPE_REF case>: Likewise.
509 2004-07-17 Jason Merrill <jason@redhat.com>
512 * call.c (type_passed_as): Make the invisible reference type
514 * cp-gimplify.c (gimplify_cleanup_stmt): Rename to
515 cp_genericize_r. Handle invisible reference lowering.
516 (is_invisiref_parm): New fn.
517 (cp_genericize): Adjust the types of invisible reference parms.
518 Don't repeat the walk for clones.
519 * decl.c (store_parm_decls): Don't generate any code for clones.
521 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
523 * cp-tree.h (builtin_function): Declare.
525 2004-07-16 Mark Mitchell <mark@codesourcery.com>
527 * class.c (finish_struct_methods): Remove unncessary code.
528 (add_implicitly_declared_members): Create declarations for default
529 constructors and copy constructors lazily.
530 * cp-tree.h (lang_type_class): Remove lazy_default_ctor and
532 (CLASSTYPE_LAZY_DEFAULT_CTOR): New macro.
533 (CLASSTYPE_LAZY_COPY_CTOR): Likewise.
534 * decl2.c (check_classfn): Robustify.
535 (locate_dtor): Handle empty CLASSTYPE_METHOD_VEC.
536 (locate_ctor): Handle lazy default constructors.
537 (locate_copy): Handle lazy copy constructors.
538 (implicitly_declare_fn): Make sure we're looking at the
539 TYPE_MAIN_VARIANT for a class before creating functions. Don't
540 set TYPE_HAS_CONSTRUCTOR.
541 (lazily_declare_fn): New function.
542 * name-lookup.c (constructor_name_full): Simplify.
543 * search.c (lookup_fnfields_1): Lazily create methods, as
545 (lookup_for_overrides): Handle empty CLASSTYPE_METHOD_VEC.
547 2004-07-16 Steven Bosscher <stevenb@suse.de>
549 * cp-tree.h (struct lang_type): Don't have three GTY options on a
552 2004-07-16 Richard Henderson <rth@redhat.com>
554 * cp-lang.c (LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING): Die.
555 * cp-tree.h (cp_copy_res_decl_for_inlining): Remove.
556 * tree.c (cp_copy_res_decl_for_inlining): Remove.
558 2004-07-16 Nathan Sidwell <nathan@codesourcery.com>
560 * class.c (finish_struct_bits): Use for loop.
561 (propagate_binfo_offsets): Do primary binfo outside of loop.
564 * dump.c (cp_dump_tree): Don't dump the bases if there's no
567 * pt.c (tsubst) <TREE_BINFO case>: We should never get here.
569 2004-07-15 Mark Mitchell <mark@codesourcery.com>
571 * cp-tree.h (lang_type_class): Remove has_real_assign_ref and
572 has_abstract_assign_ref. Make methods a VEC(tree) *.
573 (TYPE_HAS_CONST_ASSIGN_REF): Add documentation.
574 (CLASSTYPE_CONSTRUCTORS): Adjust for changes to CLASSTYPE_METHOD_VEC.
575 (CLASSTYPE_DESTRUCTORS): Likewise.
576 (TYPE_HAS_REAL_ASSIGN_REF): Remove.
577 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
578 (add_method): Change prototoype.
579 * class.c (add_method): Remove error_p parameter. Adjust for
580 changes to CLASSTYPE_METHOD_VEC.
581 (handle_using_decl): Adjust call to add_method.
582 (maybe_warn_about_overly_private_class): Adjust for
583 changes to CLASSTYPE_METHOD_VEC.
584 (resort_type_method_vec): Likewise.
585 (finish_struct_methods): Likewise.
586 (check_for_override): Likewise.
587 (warn_hidden): Likewise.
588 (add_implicitly_declared_members): Defer creation of assignment
589 operators. Adjust call to add_method.
590 (clone_function_decl): Adjust call to add_method.
591 (check_bases_and_members): Don't set TYPE_HAS_REAL_ASSIGN_REF.
592 (finish_struct_1): Use CLASSTYPE_DESTRUCTORS.
593 * decl.c (grok_special_member_properties): Don't set
594 TYPE_HAS_ABSTRACT_ASSIGN_REF.
595 * decl2.c (check_classfn): Adjust for
596 changes to CLASSTYPE_METHOD_VEC.
597 * method.c (locate_dtor): Use CLASSTYPE_DESTRUCTORS.
598 (locate_ctor): Use CLASSTYPE_CONSTRUCTORS.
599 (locate_copy): Adjust for changes to CLASSTYPE_METHOD_VEC.
600 (implicitly_declare_fn): Set DECL_SOURCE_LOCATION. Do not call
602 * pt.c (check_explicit_specialization): Adjust for
603 changes to CLASSTYPE_METHOD_VEC.
604 (instantiate_class_template): Do not set
605 TYPE_HAS_ABSTRACT_ASSIGN_REF.
606 * ptree.c (cxx_print_type): Don't try to print
607 CLASSTYPE_METHOD_VEC.
608 * rtti.c (emit_support_tinfos): Use CLASSTYPE_DESTRUCTORS.
609 * search.c (lookup_field_r): Adjust for
610 changes to CLASSTYPE_METHOD_VEC.
611 (lookup_fnfields): Likewise.
612 (lookup_conversion_operator): Likewise.
613 (lookup_fnfields_1): Likewise. Create assignment operators
615 (look_for_overrides_here): Adjust for
616 changes to CLASSTYPE_METHOD_VEC.
617 (add_conversions): Likewise.
618 * semantics.c (finish_member_declaration): Adjust call to add_method.
620 2004-07-15 Jason Merrill <jason@redhat.com>
622 * cp-lang.c (cxx_types_compatible_p): To the middle-end,
623 references and pointers are compatible.
625 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
627 * decl.c (xref_basetypes): Refactor.
628 * tree.c (copy_base_binfos): Replace with ...
629 (copy_binfo): ... this. Deep copy the given binfo, (not the just
630 bases of the given base).
631 * cp-tree.h (copy_base_binfo): Remove.
632 (copy_binfo): Declare.
634 2004-07-15 Mark Mitchell <mark@codesourcery.com>
636 * name-lookup.c (set_inherited_value_binding_p): Add class_type
638 (get_class_binding): Adjust.
639 (push_class_level_binding): Don't use set_inherited_value_binding_p.
641 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
643 * class.c (finish_struct_bits): Don't set TYPE_HAS_CONVERSION here.
644 * decl.c (xref_basetypes): Set it here.
646 * class.c (check_bases): Don't set CLASSTYPE_NON_AGGREGATE here.
647 Don't check for incomplete base.
648 (get_vfield_name): Simplify while loop.
649 * decl.c (xref_basetypes): Set CLASSTYPE_NON_AGGREGATE here.
651 2004-07-14 Mark Mitchell <mark@codesourcery.com>
653 * lex.c (cxx_make_type): Remove call to get_pointer_type.
655 * cp-tree.h (IDENTIFIER_VALUE): Remove.
656 (BINFO_PUSHDECLS_MARKED): Likewise.
657 (maybe_inject_for_scope_var): Likewise.
658 (push_class_decls): Likewise.
659 * name-lookup.h (push_class_binding): Remove.
660 (innermost_non_namespace_value): New function.
661 (outer_binding): Likewise.
662 * class.c (add_method): Push bindings before adding to
664 (restore_class_cache): Do not restore class_shadowed.
665 (pushclass): Do not add USING_DECLs. Do not call
667 * config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c.
668 * decl.c (pushdecl): Use outer_binding.
669 (poplevel): Set the scope for an out-of-scope for-loop declaration
671 (cp_finish_decl): Don't call maybe_inject_for_scope_var.
672 * name-lookup.c (new_class_binding): New function.
673 (push_binding): Use it.
674 (pushdecl): Use innermost_non_namespace_value.
675 (maybe_inject_for_scope_var): Remove.
676 (push_class_binding): Remove.
677 (set_inherited_value_binding_p): New function.
678 (get_class_binding): New function.
679 (push_class_level_binding): Assert that the current_class_type is
681 (outer_binding): New function.
682 (innermost_non_namespace_value): Likewise.
683 (lookup_name_real): Use outer_binding.
684 (lookup_name_current_level): Ignore out-of-scope variables.
685 * pt.c (check_template_shadow): Use innermost_non_namespace_value.
686 (lookup_template_class): Likewise.
687 * search.c (dfs_push_type_decls): Remove.
688 (dfs_push_decls): Likewise.
689 (setup_class_bindings): Likewise.
690 (lookup_field_1): Handle USING_DECLs from dependent scopes.
691 (marked_pushdecls_p): Remove.
692 (unmarked_pushdecls_p): Remove.
693 (marked_identifiers): Remove.
694 (setup_class_bindings): Remove.
695 (dfs_push_type_decls): Remove.
696 (dfs_push_decls): Remove.
697 (push_class_decls): Remove.
699 2004-07-13 Mark Mitchell <mark@codesourcery.com>
703 * decl.c (grokvardecl): Make declspecs parameter const.
704 (grokdeclarator): Likewise. Adjust accordingly.
705 * decl.h (grokdeclarator): Adjust declaration.
706 * parser.c (cp_parser_init_declarator): Do not clear
707 decl_specifiers->attributes.
709 * cp-tree.h (lang_identifier): Remove class_value.
710 (IDENTIFIER_CLASS_VALUE): Remove.
711 (pop_class_decls): Likewise.
712 (init_search_processing): Likewise.
713 * class.c (handle_using_decl): Use lookup_member, not
714 IDENTIFIER_CLASS_VALUE.
715 (restore_class_cache): New function, split out from ...
716 (pushclass): ... here. Do not call clear_identifier_class_values.
717 (invalidate_class_lookup_cache): Do not clear
718 IDENTIFIER_CLASS_VALUE.
719 (popclass): Do not call pop_class_decls.
720 (maybe_note_name_used_in_class): Do not save names looked up after
721 the class is complete. Use lookup_member, not
722 IDENTIFIER_CLASS_VALUE.
723 * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
724 * decl.c (cxx_init_decl_processing): Do not call
725 init_search_processing.
726 * method.c (do_build_copy_constructor): Remove unnecessary code.
727 (do_build_assign_ref): Likewise.
728 * name-lookup.c (pushdecl): Use lookup_member, not
729 IDENTIFIER_CLASS_VALUE.
730 (set_identifier_type_value_with_scope): Set TREE_TYPE on the
732 (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
733 (push_class_binding): Do not set it.
734 (clear_identifier_class_values): Remove.
735 (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
736 (store_binding): Do not save it.
737 (pop_from_top_level): Do not restore it.
738 * name-lookup.h (cxx_saved_binding): Remove class_value.
739 (clear_identifier_class_values): Remove.
740 * ptree.c (cxx_print_identifier): Do not print
741 IDENTIFIER_CLASS_VALUE.
742 * search.c (search_obstack): Remove.
743 (push_stack_level): Remove.
744 (pop_stack_level): Remove.
745 (search_level): Remove.
746 (search_stack): Remove.
747 (lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
748 (setup_class_bindings): Use IDENTIFIER_MARKED, not
749 IDENTIFIER_CLASS_VALUE.
750 (marked_identifiers): New variable.
751 (push_class_decls): Clear IDENTIFIER_MARKED.
752 (pop_class_decls): Don't call pop_search_level.
753 (init_search_processing): Remove.
755 2004-07-12 Mark Mitchell <mark@codesourcery.com>
757 * cp-tree.h (get_aggr_typedef): Remove.
758 * init.c (get_aggr_typedef): Likewise.
760 * name-lookup.c (push_class_level_binding): Simplify.
762 2004-07-12 Andrew Pinski <apinski@apple.com>
766 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
768 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
771 2004-07-12 Eric Christopher <echristo@redhat.com>
773 * parser.c (cp_parser_class_head): Remove unused variable.
775 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
777 * decl.c (grok_op_properties): Reject [de-]allocation functions
778 declared in a namespace, or declared as static.
780 2004-07-12 Nathan Sidwell <nathan@codesourcery.com>
782 * cp-tree.h (make_binfo): Remove.
783 * decl.c (xref_basetypes): Use make_tree_binfo directly.
784 * tree.h (copy_base_binfos): Likewise.
785 (make_binfo): Remove.
787 * call.c (build_user_type_conversion_1, build_new_op,
788 check_constructor_callable, build_temp,
789 perform_direct_initialization_of_possible): Pass type directly to
790 lookup_fnfields & build_special_member_call.
791 (build_special_member_call): Accept a type, and complete it.
792 * class.c (finish_stuct_bits): Copy the BINFOs here.
793 * cvt.c (ocp_convert): Pass type directly to
794 build_special_member_call.
795 * decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
796 (xref_basetypes): Allocate the binfo here. Adjust.
797 * init.c (build_init, build_new_1): Pass type directly to
798 build_special_member_call.
799 * lex.c (cxx_make_type): Do not allocate binfo here.
800 * name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
801 * parser.c (cp_parser_class_head): Always call xref_basetypes.
802 * pt.c (instantiate_class_template): Likewise. Inhibit access
803 checking for template friends.
804 * ptree.c (cxx_print_type): Adjust record printing.
805 * search.c (lookup_base): When taking a type, complete it before
807 (lookup_member): Delay completing a type.
808 (push_class_decls): Don't walk an incomplete type.
809 (lookup_conversions): Likewise.
810 * semantics.c (finish_stmt_expr_expr): Pass type directly to
811 build_special_member_call.
812 * tree.c (copy_base_binfos): Adjust.
813 (make_binfo): Likewise.
814 * typeck.c (build_modify_expr): Pass type directly to
815 build_special_member_call.
816 * typeck2.c (process_init_constructor): Check a binfo exists.
817 (build_m_component_ref): Allow accessing an incomplete type.
818 (build_functional_cast): Pass type directly to
819 build_special_member_call.
821 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
824 * config-lang.in (gtfiles): Add typeck2.c.
825 * Make-lang.in: Tweak typeck2.c dependencies, and add rule for
827 * cp-tree.h: Declare complete_type_check_abstract.
828 * typeck2.c (pat_calc_hash, pat_compare,
829 complete_type_check_abstract): New functions.
830 (abstract_virtuals_error): If the type is abstract, register the
831 declaration within abstract_pending_vars for further checks.
832 Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
833 * decl.c (cp_finish_decl): Do not strip array types.
834 (create_array_type_for_decl): Check for abstractness of the element
836 (complete_vars): Call complete_type_check_abstract.
837 * class.c (finish_struct): Prepare a list of virtual functions for
838 template types, and call complete_vars on it to check for abstractness.
840 2004-07-12 Paolo Bonzini <bonzini@gnu.org>
842 PR tree-optimization/14107
843 * decl.c (finish_function): Remove temporary band-aid.
845 2004-07-11 Mark Mitchell <mark@codesourcery.com>
847 * call.c (build_operator_new_call): Avoid using push_to_top_level.
848 (build_new_op): Adjust call to lookup_function_nonclass.
849 * name-lookup.c (identifier_type_value): Adjust call to
851 (lookup_name_real): Add block_p parameter.
852 (lookup_name_nonclass): Adjust call to lookup_name_real.
853 (lookup_function_nonclass): Likewise.
854 (lookup_name): Likewise.
855 * name-lookup.h (lookup_name_real): Change prototype.
856 (lookup_name_nonclass): Likewise.
857 * parser.c (cp_parser_lookup_name): Likewise.
859 * cp-tree.h (saved_scope): Make old_bindings a vector.
860 (unuse_fields): Remove.
861 * name-lookup.h (cxx_saved_binding): Define it.
862 * class.c (pushclass): Don't use unuse_fields.
863 * name-lookup.c (cxx_saved_binding_make): Remove.
864 (store_binding): Add new bindings to a vector, using an
865 accumulator style, rather than adding them to a list.
866 (store_bindings): Adjust accordingly.
867 (store_class_bindings): Likewise.
868 (push_to_top_level): Likewise.
869 (pop_from_top_level): Likewise.
870 * optimize.c (maybe_clone_body): Must push_to_top_level and
871 pop_from_top_level calls outside of loop.
872 * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope
873 calls here from cp_parser_late_parsing_default_args.
874 (cp_parser_save_default_args): Record the class type in which the
875 function is declared.
876 (cp_parser_late_parsing_default_args): Do not call
877 push_nested_class/pop_nested_class.
878 * search.c (dfs_unuse_fields): Remove.
879 (unuse_fields): Remove.
881 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
883 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
884 LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
885 * cp-tree.h (poplevel): Declare.
887 * decl.c (set_block): Remove.
889 2004-07-10 Mike Stump <mrs@apple.com>
891 * decl2.c (import_export_class): Never export/import vtables
892 with inline key functions.
894 2004-07-09 Steven Bosscher <stevenb@suse.de>
896 * typeck.c (c_expand_asm_operands): Remove.
898 2004-07-09 Mike Stump <mrs@apple.com>
900 * typeck.c (build_class_member_access_expr): Skip null deref
901 warning when we don't dereference it.
903 2004-07-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
907 * class.c (check_field_decls): Improve -Weffc++ warning: do not
908 warn for pointers to functions/members, or for classes without
911 2004-07-08 Mark Mitchell <mark@codesourcery.com>
913 * name-lookup.h (struct cp_binding_level): Update documentation
916 2004-07-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
919 * typeck.c (check_return_expr): Improve -Weffc++ warning: handle
920 returning CALL_EXPR, and non-reference return type.
922 2004-07-08 Nathan Sidwell <nathan@codesourcery.com>
924 * name-lookup.c (push_binding): Use VEC_reserve.
926 2004-07-08 Richard Henderson <rth@redhat.com>
928 * cp-tree.h (expand_eh_spec_block): Remove.
930 2004-07-07 Mark Mitchell <mark@codesourcery.com>
932 * cp-tree.h (saved_scope): Remove x_previous_class_type and
933 x_previous_class_values; add x_previous_class_level.
934 (previous_class_type): Remove.
935 (previous_class_values): Remove.
936 (previous_class_level): New macro.
937 * class.c (pushclass): Restore the identifier cache more
939 (invalidate_class_lookup_cache): Use vector for class_shadowed and
940 previous_class_values.
941 * decl.c (poplevel): Likewise.
942 * name-lookup.c (cxx_binding_init): New function.
943 (cxx_binding_make): Use it.
944 (push_binding): For a binding in a class level, use a vector of
945 cp_class_binding nodes.
946 (push_binding_level): New function.
947 (begin_scope): Use it.
948 (leave_scope): Do not put class binding levels on the free list.
949 (print_binding_level): Adjust for the fact that class_shadowed is
951 (poplevel_class): Likewise.
952 (clear_identifier_class_values): Likewise.
953 (push_class_level_binding): Likewise.
954 (set_class_shadows): Remove.
955 (store_binding): New function.
956 (store_class_bindings): New function.
957 (push_to_top_level): Use store_class_bindings as appropriate.
958 (pop_from_top_level): Use previous_class_level, not
960 * name-lookup.h (cp_class_binding): New type.
961 (cp_binding_level): Use a vector object for class_shadowed.
962 (push_binding_level): Declare.
963 (set_class_shadows): Remove.
965 2004-07-07 Andrew Pinski <apinski@apple.com>
967 * class.c (instantiate_type): BUFFER_REF is dead.
968 * lex.c (init_operators): IN_EXPR is dead.
970 2004-07-07 Jason Merrill <jason@redhat.com>
973 * call.c (build_new_op): Give overload warnings for built-in
976 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
979 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
982 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
984 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
985 * class.c (build_primary_vtable, check_bases,
986 determine_primary_base, finish_struct_bits,
987 maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
988 get_basefndecls, warn_hidden, walk_subobject_offsets,
989 build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
990 layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
991 finish_struct_1, get_vfield_name, contains_empty_class_p,
992 dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
993 dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
994 add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
996 * decl.c (xref_basetypes): Likewise.
997 * dump.c (cp_dump_tree): Likewise.
998 * error.c (dump_expr): Likewise.
999 * init.c (sort_mem_initializers, expand_member_init,
1000 push_base_cleanups): Likewise.
1001 * method.c (do_build_copy_constructor, do_build_assign_reg,
1002 synthesize_exception_spec): Likewise.
1003 * name-lookup.c (arg_assoc_class): Likewise.
1004 * pt.c (instantiate_class_template, tsubst,
1005 get_template_base_recursive): Likewise.
1006 * ptree.c (cxx_print_type): Likewise.
1007 * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
1008 * search.c (lookup_base_r, dynamic_cast_base_recurse,
1009 dfs_access_in_type, access_in_type, lookup_field_queue_p,
1010 bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
1011 marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
1012 dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
1013 binfo_for_vtable, copied_binfo, original_binfo): Likewise
1014 * tree.c (copy_base_binfos, make_binfo): Likewise.
1015 * typeck.c (commmon_base_type): Likewise
1016 * typeck2.c (process_init_constructor): Likewise
1018 2004-07-06 Joseph S. Myers <jsm@polyomino.org.uk>
1020 * decl.c (check_tag_decl): Name redeclared type in diagnostic.
1022 2004-07-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1025 * pt.c (convert_nontype_argument): Disallow conversions between
1026 different enumeration types.
1028 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
1030 * cp-tree.h (BINFO_MARKED): Remove.
1031 (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
1032 BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
1033 BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
1034 (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
1035 * class.c (build_base_path): Use BINFO_VIRTUAL_P.
1036 (mark_primary_bases, determine_primary_base, base_derived_from,
1037 dfs_find_final_overrider, dfs_find_final_overrider_q,
1038 dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
1039 dfs_modify_vtables, walk_subobject_offsets,
1040 layout_nonempty_base_or_field, build_base_field,
1041 build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
1042 end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
1043 finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
1044 build_ctor_vtbl_group, accumulate_vtble_inits,
1045 dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
1046 build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
1047 add_vcall_offset_vtbl_entries_1): Likewise.
1048 * decl.c (xref_basetypes): Incomming virtual base indicated by
1050 * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
1051 * init.c (finish_init_stmts, sort_mem_initializers,
1052 emit_mem_initializers, build_vtble_address, expand_member_init,
1053 push_base_cleanups): Likewise.
1054 * method.c (do_build_copy_constructor): Likewise.
1055 * pt.c (instantiate_class_template,
1056 get_template_base_recursive): Likewise.
1057 * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
1058 get_pseudo_ti_desc): Likewise.
1059 * search.c (lookup_base_r, dynamic_cast_base_recurse,
1060 binfo_from_vbase, binfo_via_virtual, copied_binfo,
1061 original_binfo): Likewise.
1062 * semantics.c (finish_base_specifier): Virtualness is indicated
1064 * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
1066 2004-07-06 Mark Mitchell <mark@codesourcery.com>
1069 2004-06-24 Jason Merrill <jason@redhat.com>
1071 * decl.c (grokparms): Give the PARM_DECL reference type if the
1072 parameter is passed by invisible reference.
1074 2004-07-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1076 * cp-lang.c (cp_var_mod_type_p): Add extra arg.
1077 * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
1078 * pt.c (check_instantiated_args, unify): Likewise.
1080 2004-07-05 Phil Edwards <phil@codesourcery.com>
1082 * Make-lang.in (check-c++, lang_checks): Add some comments.
1084 2004-07-05 Zack Weinberg <zack@codesourcery.com>
1086 * cp-mudflap.c: Delete file.
1087 * Makefile.in: Remove all references to cp-mudflap.o.
1089 2004-07-05 Zack Weinberg <zack@codesourcery.com>
1091 * decl.c (cxx_init_decl_processing): Call
1092 build_common_tree_nodes before creating the global NAMESPACE_DECL.
1094 2004-07-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1097 * call.c (build_operator_new_call): Look only at global scope.
1099 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
1101 * call.c (enforce_access): Expect TREE_BINFO.
1102 * class.c (binfo_ctor_vtable): Check TREE_BINFO.
1103 * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
1104 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
1106 (BINFO_LANG_ELTS): Remove.
1107 (BINFO_LANG_SLOTS): New.
1108 (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
1109 (CLASSTYPE_TEMPLATE_INFO): Adjust.
1110 * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
1111 * search.c (lookup_member): Check TREE_BINFO.
1112 * semantics.c (perform_or_defer_access_check): Likewise.
1113 (check_accessibility_of_qualified_id): Check
1114 deferred_access_no_check.
1115 * tree.c (make_binfo): Use make_tree_binfo.
1117 2004-07-04 Mark Mitchell <mark@codesourcery.com>
1119 * method.c (implicitly_declare_fn): Set linkage of generated
1122 2004-07-04 Richard Henderson <rth@redhat.com>
1124 * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
1126 2004-07-03 Scott Brumbaugh <scottb.lists@verizon.net>
1129 * name-lookup.c (push_class_level_binding): Don't pass a
1130 TREE_LIST of ambiguous names to check_template_shadow as it
1131 only handles declarations. Instead, pull the declaration
1134 2004-07-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1137 * pt.c (check_explicit_specialization): Clarify error message.
1139 2004-07-02 Richard Henderson <rth@redhat.com>
1141 * tree.c (cp_unsave_r): Update remap_save_expr call.
1143 2004-07-02 Mark Mitchell <mark@codesourcery.com>
1146 * mangle.c (write_template_arg): Correct mangling.
1149 * decl.c (grokdeclarator): Robustify.
1151 2004-07-01 Richard Henderson <rth@redhat.com>
1153 * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
1154 * method.c (synthesize_method): Don't clear_last_expr.
1155 * name-lookup.c (maybe_push_cleanup_level): Likewise.
1157 2004-07-01 Nick Clifton <nickc@redhat.com>
1159 * decl2.c (import_export_class): Invoke the
1160 import_export_class field in the gcc_target structure if it is not
1163 2004-06-30 Richard Henderson (rth@redhat.com>
1165 * decl.c (start_preparsed_function): Don't set immediate_size_expand.
1166 * method.c (use_thunk): Likewise.
1168 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
1170 * call.c (build_over_call), typeck.c (build_function_call): Call
1171 check_function_arguments instead of check_function_format.
1173 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
1175 * call.c (build_over_call), typeck.c (build_function_call): Update
1176 calls to check_function_format.
1178 2004-06-30 Richard Henderson <rth@redhat.com>
1180 * call.c (build_over_call): Use __builtin_memcpy for copying
1181 CLASS_AS_BASE rather than funny casting.
1183 2004-06-30 Richard Henderson <rth@redhat.com>
1185 * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
1186 TYPE_SIZE_UNIT of full_type.
1188 2004-06-30 Per Bothner <per@bothner.com>
1190 Conditionally compile support for --enable-mapped_location.
1191 * decl.c (pop_label): Handle (imperfectly) USE_MAPPED_LOCATION case.
1192 * decl2.c: If USE_MAPPED_LOCATION, don't do some line number
1193 adjustments - which I don't understand.
1194 * error.c (dump_decl): Rename "<interrnal>" to "<built-in>".
1195 * error.c: Use LOCATION_FILE and EXPR_LOCATION macros.
1196 (print_instantiation_partial_context): Use expand_location.
1197 * decl.c (duplicate_decl): Use new DECL_IS_BUILTIN macro.
1198 * name-lookup.c: Likewise.
1199 * lex.c (cxx_init): Likewise. Also use BUILTINS_LOCATION.
1200 * name-lookup.c: Use input_line macro.
1201 * parser.c (cp_lexer_get_preprocessor_token): Use UNKNOWN_LOCATION.
1202 (cp_parser_statement): Rename locaal variable statement_locus to
1203 statement_location and use SET_EXPR_LOCATION macro.
1204 * pt.c: Handle USE_MAPPED_LOCATION case. Use new macros.
1205 * tree.c (cp_walk_subtrees): Likewise.
1207 2004-06-29 Per Bothner <per@bothner.com>
1209 * tree.c (build_min_nt, build_min, build_min_non_dep):
1210 Don't set TREE_COMPLEXITY from input_line.
1212 2004-06-29 Paul Brook <paul@codesourcery.com>
1214 * init.c: Include target.h.
1215 (get_cookie_size): Remove and replace with target hook.
1217 (build_new_1): Store the element size in the cookie.
1219 2004-06-29 Nathan Sidwell <nathan@codesourcery.com>
1222 * parser.c (cp_parser_template_declaration_after_export): Disable
1223 access checks here ...
1224 (cp_parser_class_specifier): ... not here.
1226 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1228 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
1229 VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
1230 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
1233 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1235 * cp-tree.h (struct deferred_access): Move to ...
1236 * semantics.c (struct deferred_access): ... here. Adjust.
1237 (deferred_access_stack): Make a VEC(deferred_access),
1238 (deferred_access_free_list): Remove.
1239 (deferred_access_no_check): New.
1240 (push_deferring_access_checks, resume_deferring_access_checks,
1241 stop_deferring_access_checks, pop_deferring_access_checks,
1242 get_deferred_access_checks, pop_to_parent_deferring_access_checks,
1243 perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
1245 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1248 * call.c (build_temp): Declare.
1249 (check_constructor_callable): New.
1250 (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
1251 CONSTRUCTOR_CALLABLE.
1252 (convert_like_real, initialize_reference): Use
1253 check_constructor_callable.
1254 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
1255 (LOOKUP_*): Renumber.
1257 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1259 * friend.c (add_friend): Only perform access checks when context
1261 * lex.c (cxx_make_type): Only create a binfo for aggregate types.
1262 * parser.c (cp_parser_class_specifier): Disable access checks here
1263 when parsing the body of a templated class.
1264 * semantics.c (perform_or_defer_access_checks): Reorder to allow
1265 NULL binfos when not checking access.
1267 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1269 Use vector API for vbase list.
1270 * cp-tree.h: Include vec.h
1271 (DEF_VEC_P (tree)): New type.
1272 (struct lang_type_class): Change vbase's member type.
1273 (binfo_for_vbase): Declare.
1274 * class.c (determine_primary_base, base_derived_from,
1275 update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
1276 warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
1277 build_vtbl_initializer): Adjust.
1278 * decl.c (xref_basetypes): Adjust, accumulate upper bound of
1280 * init.c (sort_mem_initializers, expand_member_init,
1281 push_base_cleanups): Adjust.
1282 * method.c (do_build_copy_constructor): Adjust.
1283 * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
1284 (binfo_for_vbase): New.
1285 * tree.c (copy_base_binfos): Adjust.
1287 2004-06-28 Mark Mitchell <mark@codesourcery.com>
1289 * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
1291 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
1294 * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
1295 paranthesis in case of pointers to array members.
1296 * error.c (dump_type_prefix): Likewise.
1297 (dump_type_suffix): Maybe issue a whitespace when printing
1300 2004-06-27 Mark Mitchell <mark@codesourcery.com>
1303 * parser.c (cp_parser_set_decl_spec_type): Refine test for
1304 redefinition of built-in types.
1306 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
1308 * error.c (pp_template_argument_list_start): Remove.
1309 (pp_template_argument_list_end): Likewise.
1310 (pp_separate_with_comma): Use pp_cxx_separate_with.
1311 (reinit_global_formatting_buffer): Remove.
1312 (pp_non_consecutive_character): Likewise.
1313 (dump_scope): Use pp_cxx_colon_colon.
1314 (dump_template_parameter): Use pp_cxx_identifier,
1315 pp_cxx_tree_identifier and pp_cxx_whitespace.
1316 (dump_templat_bindings): Replace use of pp_string with sequence
1317 of pp_cxx_whitespace and pp_equal.
1318 (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
1319 pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set
1321 (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
1322 (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace,
1323 pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
1324 (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
1325 pp_cxx_right_bracket, pp_cxx_identifier throughout,
1326 (dump_decl): Likewise.
1327 (dump_template_decl): Likewise.
1328 (dump_function_decl): Likewise. Set padding as appropriate.
1329 (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
1331 (dump_exception_spec): Likewise.
1332 (dump_function_name): Use pp_cxx_tree_identifier and
1334 (dump_template_parms): Use pp_cxx_begin_template_argument_list and
1335 pp_cxx_end_template_argument_list.
1336 (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
1337 pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
1338 pp_cxx_whitespace throughout.
1339 (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
1341 (dump_unary_op): Likewise.
1342 (reinit_cxx_pp): New function.
1343 (type_as_string); Use it.
1344 (expr_as_string): Likewise.
1345 (decl_as_string); Likewise.
1346 (context_as_string): Likewise.
1347 (lang_decl_name): Likewise.
1348 (decl_to_string): Likewise.
1349 (expr_to_string): Likewise.
1350 (parm_to_string): Likewise.
1351 (type_to_string): Likewise.
1352 (args_to_string): Likewise.
1353 (cv_to_string): Likewise.
1355 2004-06-26 Mark Mitchell <mark@codesourcery.com>
1357 * cp-tree.h (cp_cv_quals): New type.
1358 (cp_declarator): Use it instead of "tree" as appropriate.
1359 (grok_method_quals): Adjust prototype.
1360 (grokclassfn): Likewise.
1361 (do_friend): Likewise.
1362 * decl.c (grokfndecl): Use cp_cv_quals, not tree.
1363 (grokdeclarator): Likewise.
1364 * decl2.c (grok_method_quals): Likewise.
1365 (grokclassfn): Likewise.
1366 * friend.c (do_friend): Likewise.
1367 * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
1368 * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
1369 (make_pointer_declarator): Likewise.
1370 (make_reference_declarator): Likewise.
1371 (make_ptrmem_declarator): Likewise.
1372 (cp_parser_ptr_operator): Likewise.
1373 (cp_parser_cv_qualifier_seq_opt): Likewise.
1374 (cp_parser_cv_qualifier_opt): Remove.
1375 (cp_parser_new_declarator_opt): Adjust call to
1376 cp_parser_ptr_operator.
1377 (cp_parser_conversion_declaration_opt): Likewise.
1378 (cp_parser_declarator): Use cp_cv_quals, not tree.
1379 (cp_parser_direct_declarator): Likewise.
1381 2004-06-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1383 * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
1384 Rename DECL_STMT to DECL_EXPR.
1385 * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
1386 * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
1387 * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
1389 2004-06-26 Jan Hubicka <jh@suse.cz>
1392 * decl2.c (maybe_emit_vtables): Always import_export_vtable for the
1393 reachability analysis.
1395 2004-06-25 Mark Mitchell <mark@codesourcery.com>
1397 * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
1400 2004-06-25 Paul Brook <paul@codesourcery.com>
1402 * decl2.c (get_guard): Call targetm.cxx.guard_type.
1403 (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
1405 2004-06-24 Mark Mitchell <mark@codesourcery.com>
1407 * decl.c (grokdeclarator): Restore error messages about __thread.
1408 * parser.c (cp_parser_decl_specifier_seq): Likewise.
1410 2004-06-24 Jason Merrill <jason@redhat.com>
1413 * decl.c (grokparms): Give the PARM_DECL reference type if the
1414 parameter is passed by invisible reference.
1416 2004-06-24 Andreas Schwab <schwab@suse.de>
1418 * cp-tree.h (enum cp_storage_class): Remove trailing comma.
1420 2004-06-23 Mark Mitchell <mark@codesourcery.com>
1422 * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
1423 (cp/decl.o): Likewise.
1424 (cp/decl2.o): Likewise.
1425 (cp/pt.o): Likewise.
1426 (cp/semantics.o): Likewise.
1427 * config-lang.in (gtfiles): Do not reference cp/lex.h.
1428 * class.c: Do not include lex.h.
1429 (add_implicitly_declared_members): Do not use
1430 adding_implicit_members.
1431 (check_bases_and_members): Do not talk about grok_x_components.
1432 * cp/cp-tree.h (adding_implicit_members): Remove.
1433 (cp_storage_class): New type.
1434 (cp_decl_spec): Likewise.
1435 (cp_decl_specifier_seq): Likewise.
1436 (cp_parameter_declarator): Use it for the decl_specifiers field.
1437 (check_tag_decl): Adjust prototype.
1438 (shadow_tag): Likewise.
1439 (groktypename): Likewise.
1440 (start_decl): Likewise.
1441 (start_function): Likewise.
1442 (start_method): Likewise.
1443 (grok_x_components): Remove.
1444 (grokfield): Adjust prototype.
1445 (grokbitfield): Likewise.
1446 (finish_member_class_template): Remove.
1447 * decl.c: Do not include lex.h.
1448 (adding_implicit_members): Do not define.
1449 (check_tag_decl): Do not use trees to represent decl-specifiers.
1450 (shadow_tag): Likewise.
1451 (groktypename): Likewise.
1452 (start_decl): Likewise.
1453 (grokvardecl): Likewise.
1454 (grokdeclarator): Likewise.
1455 (grokparms): Likewise.
1456 (start_function): Likewise.
1457 (start_method): Likewise.
1458 * decl.h (grokdeclarator): Adjust prototype.
1459 * decl2.c: Do not include lex.h.
1460 (grok_x_components): Remove.
1461 (grokfield): Do not use trees to represent decl-specifiers.
1462 (grokbitfield): Likewise.
1463 * lex.c: Do not include lex.h.
1465 * parser.c: Include target.h.
1466 (clear_decl_specs): New function.
1467 (cp_parser_translation_unit): Do not use trees to represent
1469 (cp_parser_postfix_expression): Likewise.
1470 (cp_parser_new_type_id): Likewise.
1471 (cp_parser_condition): Likewise.
1472 (cp_parser_simple_declaration): Likewise.
1473 (cp_parser_decl_specifier_seq): Likewise.
1474 (cp_parser_function_specifier_opt): Likewise.
1475 (cp_parser_conversion_type_id): Likewise.
1476 (cp_parser_template_parameter): Likewise.
1477 (cp_parser_explicit_instantiation): Likewise.
1478 (cp_parser_type_specifier): Likewise.
1479 (cp_parser_simple_type_specifier): Likewise.
1480 (cp_parser_init_declarator): Likewise.
1481 (cp_parser_type_id): Likewise.
1482 (cp_parser_type_specifier_seq): Likewise.
1483 (cp_parser_parameter_declaration): Likewise.
1484 (cp_parser_member_declaration): Likewise.
1485 (cp_parser_exception_declaration): Likewise.
1486 (cp_parser_function_definition_from_specifiers_and_declarator):
1488 (cp_parser_single_declaration): Likewise.
1489 (cp_parser_save_member_function_body): Likewise.
1490 (cp_parser_friend_p): Likewise.
1491 (cp_parser_set_storage_class): New function.
1492 (cp_parser_set_decl_spec_type): Likewise.
1493 * pt.c: Do not include lex.h.
1494 * semantics.c: Likewise.
1495 (finish_member_class_template): Remove.
1497 2004-06-23 Roger Sayle <roger@eyesopen.com>
1499 * call.c (build_cxx_call): Don't call expand_tree_builtin. No
1500 longer take both "args" and "convert_args" as arguments.
1501 (build_op_delete_call): Update call to build_cxx_call.
1502 (build_over_call): Likewise, update call to build_cxx_call.
1503 * cp-tree.h (build_cxx_call): Update funtion prototype.
1504 * typeck.c (build_function_call): Don't call expand_tree_builtin.
1505 * rtti.c (throw_bad_cast): Update call to build_cxx_call.
1506 (throw_bad_typeid): Likewise.
1507 (build_dynamic_cast_1): Likewise.
1509 2004-06-22 Richard Henderson <rth@redhat.com>
1511 * class.c (build_vfn_ref): Take a pointer not object. Build
1513 (cp_fold_obj_type_ref): New.
1514 * call.c (build_over_call): Update build_vfn_ref call.
1515 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
1516 * cp-tree.h (cp_fold_obj_type_ref): Declare.
1518 2004-06-21 Jason Merrill <jason@redhat.com>
1521 * cp-gimplify.c (cp_gimplify_init_expr): Look through
1524 2004-06-21 Mark Mitchell <mark@codesourcery.com>
1526 * cp-tree.def (NEW_EXPR): Add a fourth slot.
1527 * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
1528 (TREE_PARMLIST): Likewise.
1529 (CALL_DECLARATOR_PARMS): Likewise.
1530 (CALL_DECLARATOR_QUALS): Likewise.
1531 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
1532 (cp_declarator_kind): New type.
1533 (cp_parameter_declarator): Likewise.
1534 (cp_declarator): Likewise.
1535 (cp_error_declarator): Likewise.
1536 (no_parameters): Likewise.
1537 (groktypename): Change prototype.
1538 (start_decl): Likewise.
1539 (start_handler_parms): Likewise.
1540 (get_scope_of_declarator): Likewise.
1541 (start_function): Likewise.
1542 (start_preparsed_function): New function.
1543 (start_function): Change prototype.
1544 (start_method): Likewise.
1545 (grokfield): Likewise.
1546 (grokbitfield): Likewise.
1547 (build_new): Likewise.
1548 (make_pointer_declarator): Remove.
1549 (make_reference_declarator): Likewise.
1550 (make_call_declarator): Likewise.
1551 (set_quals_and_spec): Likewise.
1552 (process_template_parm): Change prototype.
1553 (begin_function_definition): Remove.
1554 (finish_parmlist): Remove.
1555 * decl.c (groktypename): Do not use trees to represent
1557 (start_decl): Likewise.
1558 (start_handler_parms): Remove.
1559 (get_scope_of_declarator): Reimplement.
1560 (grokdeclarator): Do not use trees to represent declarators.
1561 (grokparms): Likewise.
1562 (start_function): Likewise.
1563 (start_method): Likewise.
1564 (build_void_list_mode): Do not use TREE_PARMLIST.
1565 * decl.h (grokdeclarator): Change prototype.
1566 * decl2.c (grok_method_quals): Robustify.
1567 (grok_x_components): Do not use trees to represent declarators.
1568 (grokfield): Likewise.
1569 (grokbitfield): Likewise.
1570 (start_objects): Build FUNCTION_DECLs, not declarators.
1571 (start_static_storage_duration_function): Likewise.
1572 * init.c (build_new): Simplify.
1573 * lex.c (make_pointer_declarator): Remove.
1574 (make_reference_declarator): Likewise.
1575 (make_call_declarator): Likewise.
1576 (set_quals_and_spec): Likewise.
1577 * method.c (use_thunk): Use start_preparsed_function.
1578 (synthesize_method): Likewise.
1579 (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
1580 * optimize.c (maybe_clone_body): Use start_preparsed_function.
1581 * parser.c (cp_error_declarator): New variable.
1582 (declarator_obstack): Likewise.
1583 (alloc_declarator): New function.
1584 (make_declarator): Likewise.
1585 (make_id_declarator): Likewise.
1586 (make_pointer_declarator): Likewise.
1587 (make_reference_declarator): Likewise.
1588 (make_ptrmem_declarator): Likewise.
1589 (make_call_declarator): Likewise.
1590 (make_array_declarator): Likewise.
1591 (no_parameters): New variable.
1592 (make_parameter_declarator): Likewise.
1593 (cp_parser_check_for_definition_in_return_type): Do not use trees
1594 to represent declarators.
1595 (cp_parser_translation_unit): Likewise.
1596 (cp_parser_new_expression): Likewise.
1597 (cp_parser_new_type_id): Likewise.
1598 (cp_parser_new_declarator_opt): Likewise.
1599 (cp_parser_direct_new_declarator): Likewise.
1600 (cp_parser_condition): Likewise.
1601 (cp_parser_declaration_statement): Likewise.
1602 (cp_parser_declaration): Likewise.
1603 (cp_parser_conversion_type_id): Likewise.
1604 (cp_parser_conversion_declarator_opt): Likewise.
1605 (cp_parser_template_parameter_list): Likewise.
1606 (cp_parser_template_parameter): Likewise.
1607 (cp_parser_explicit_instantiation): Likewise.
1608 (cp_parser_init_declarator): Likewise.
1609 (cp_parser_declarator): Likewise.
1610 (cp_parser_direct_declarator): Likewise.
1611 (cp_parser_type_id): Likewise.
1612 (cp_parser_parameter_declaration_clause): Likewise.
1613 (cp_parser_parameter_declaration_list): Likewise.
1614 (cp_parser_parameter_declaration): Likewise.
1615 (cp_parser_member_declaration): Likewise.
1616 (cp_parser_exception_declaration): Likewise.
1617 (cp_parser_check_declarator_template_parameters): Likewise.
1618 (cp_parser_function_definition_from_specifiers_and_declarator):
1620 (cp_parser_save_member_function_body): Likewise.
1621 * pt.c (process_template_parm): Add is_non_type parameter.
1622 (convert_template_argument): Adjust call to groktypename.
1623 (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
1624 (tsubst): Do not expect declarators.
1625 (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
1627 (instantiate_decl): Use start_preparsed_function.
1628 * semantics.c (begin_function_definition): Remove.
1629 (finish_parmlist): Remove.
1630 * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
1633 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1635 * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
1636 (build_new_method_call): Likewise.
1637 * decl.c (local_variable_p_walkfn): Don't walk into types.
1638 * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
1639 (build_anon_union_vars): Add new operand for COMPONENT_REF.
1640 * init.c (buld_new): Add new operand for ARRAY_REF.
1641 * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
1642 (do_build_assign_ref): Likewise.
1643 * parser.c (cp_parser_direct_new_declarator): Add new operands
1645 (cp_parser_direct_declarator): Likewise.
1646 * pt.c (tsubst): Likewise.
1647 (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
1649 * semantics.c (finish_non_static_data_member): Add new operand
1651 * typeck.c (build_class_member_access_expr): Likewise.
1652 (build_class_member_access_expr, finish_class_member_access_expr):
1654 (build_ptrmemfunc_access_expr): Likewise.
1655 (build_array_ref): Add new operands for ARRAY_REF.
1656 * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
1657 * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
1659 2004-06-21 Richard Henderson <rth@redhat.com>
1661 * dump.c (cp_dump_tree): Don't use dump_next_stmt.
1662 * parser.c (cp_parser_jump_statement): Update commentary.
1663 * pt.c (tsubst_expr): Use RETURN_EXPR.
1664 * semantics.c (finish_return_stmt): Likewise.
1665 (finalize_nrv_r): Likewise.
1666 * typeck.c, typeck2.c: Update file start commentary.
1668 2004-06-21 Richard Henderson <rth@redhat.com>
1670 * semantics.c (finish_expr_stmt): Call verify_sequence_points.
1672 2004-06-20 Richard Henderson <rth@redhat.com>
1674 * cp-tree.h (add_decl_stmt): Declare.
1675 * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
1676 * semantics.c (maybe_cleanup_point_expr): New.
1677 (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
1678 finish_for_expr, finish_switch_cond): Use it.
1679 (finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN.
1681 2004-06-20 Richard Henderson <rth@redhat.com>
1683 * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
1684 * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
1685 (cp_gimplify_expr): Call it.
1686 (gimplify_cleanup_stmt): Move from c-gimplify.c.
1687 (cp_genericize): New.
1688 * decl.c (finish_function): Call it.
1689 * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
1690 (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
1691 (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
1692 (cp_genericize): Declare.
1693 * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
1694 * dump.c (cp_dump_tree): Likewise.
1695 * semantics.c (push_cleanup): Move from c-semantics.c.
1697 2004-06-20 Zack Weinberg <zack@codesourcery.com>
1699 * cp-lang.c (has_c_linkage): Implement.
1701 * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
1702 * decl.c (duplicate_decls): Use COPY_DECL_RTL.
1703 (builtin_function_1): Don't call make_decl_rtl.
1704 (build_cp_library_fn): Don't call set_mangled_name_for_decl.
1705 (grokvardecl): Don't call mangle_decl.
1706 * except.c (nothrow_libfn_p): Look at DECL_NAME, not
1707 DECL_ASSEMBLER_NAME.
1708 * method.c (set_mangled_name_for_decl): Delete.
1709 * name-lookup.c (pushdecl): When a local extern shadows a
1710 file-scope declaration of the same object, give both DECLs the
1712 * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
1713 on DECL_ASSEMBLER_NAME.
1715 2004-06-19 Richard Henderson <rth@redhat.com>
1717 * cp-gimplify.c: Remove unnecessary prototypes.
1718 (cp_gimplify_stmt): Merge into ...
1719 (cp_gimplify_expr): ... here. Move to end of file. Handle
1720 stmts_are_full_exprs_p frobbing.
1721 * cp-tree.h (cp_gimplify_stmt): Remove.
1722 * pt.c (tsubst_expr): Merge prep_stmt and unify.
1723 * tree.c (init_tree): Don't set lang_gimplify_stmt.
1725 2004-06-18 Richard Henderson <rth@redhat.com>
1728 * semantics.c (begin_cond): New.
1729 (finish_cond): Rewrite to handle template DECL_STMTs specially.
1730 Assume that non-template decls go land before the conditional.
1731 (simplify_loop_decl_cond): Likewise.
1732 (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
1733 finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
1734 begin_switch_stmt, finish_switch_cond): Update to match.
1736 2004-06-17 Jason Merrill <jason@redhat.com>
1739 * semantics.c (simplify_aggr_init_expr): Don't return the slot.
1740 (finish_stmt_expr_expr): Update type after conversions.
1741 (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
1742 Handle void initializer.
1743 * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
1745 2004-06-17 Geoffrey Keating <geoffk@apple.com>
1747 * class.c (build_clone): Don't call defer_fn, let mark_used do it.
1748 * cp-tree.h (defer_fn): Delete.
1749 * decl2.c (defer_fn): Delete.
1750 (finish_file): Simplify deferred_fns loops; check that
1751 only used inline functions get into deferred_fns.
1752 (mark_used): Inline previous contents of defer_fn.
1754 2004-06-16 Richard Henderson <rth@redhat.com>
1756 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
1757 (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
1758 * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
1759 of CTOR_INITIALIZER ...
1760 (pp_cxx_statement): ... here.
1761 * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
1762 (finish_function): Use alloc_stmt_list to zap entire function.
1763 * parser.c (cp_parser_compound_statement): Update commentary.
1764 * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
1765 * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
1766 (finish_stmt_expr): Don't look through COMPOUND_STMT.
1768 2004-06-16 Geoffrey Keating <geoffk@apple.com>
1770 * pt.c (mark_decl_instantiated): Don't call defer_fn.
1772 2004-06-16 Richard Henderson <rth@redhat.com>
1774 * parser.c (cp_parser_labeled_statement): Update commentary.
1775 * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
1776 * tree.c (mark_local_for_remap_r): Likewise.
1778 2004-06-16 Richard Henderson <rth@redhat.com>
1780 * parser.c (cp_parser_asm_definition): Update commentary.
1781 * pt.c (tsubst_expr): Use ASM_EXPR.
1782 * semantics.c (finish_asm_stmt): Likewise.
1784 2004-06-16 Richard Henderson <rth@redhat.com>
1786 * decl.c (finish_destructor_body): Use LABEL_EXPR.
1787 * parser.c (cp_parser_statement): Update commentary.
1788 * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
1789 * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
1790 * tree.c (mark_local_for_remap_r): Likewise.
1792 2004-06-16 Richard Henderson <rth@redhat.com>
1795 * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
1796 statement in FOR_INIT_STMT for templates.
1798 2004-06-15 Richard Henderson <rth@redhat.com>
1800 * call.c (initialize_reference): Don't build CLEANUP_STMT here.
1801 * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
1802 (genericize_try_block): Use gimplify_stmt.
1803 (genericize_catch_block, genericize_eh_spec_block): Likewise.
1804 (cp_gimplify_init_expr): Remove STMT_EXPR special case.
1805 (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
1806 * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
1807 (cp_tree_chain_matters_p): Remove.
1808 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
1809 (COMPOUND_STMT_BODY_BLOCK): New.
1810 (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
1811 (EXPR_STMT_STMT_EXPR_RESULT): New.
1812 (building_stmt_tree): Check cur_stmt_list.
1813 (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
1814 (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
1815 * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
1816 (cp_finish_decl): Use push_cleanup.
1817 (start_function, finish_function): Use statement lists.
1818 (finish_stmt): Do nothing.
1819 * except.c (begin_eh_spec_block): Use statement lists.
1820 (check_handlers_1, check_handlers): Likewise.
1821 * init.c (construct_virtual_base): Don't add extra compound stmts.
1822 (build_vec_init): Likewise.
1823 * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
1824 * name-lookup.h (struct cp_binding_level): Add statement_list.
1825 * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
1826 (cp_parser_labeled_statement, cp_parser_expression_statement,
1827 cp_parser_statement_seq_opt): Likewise.
1828 (cp_parser_compound_statement): Likewise. Take bool for try block.
1829 (cp_parser_selection_statement): Tidy if processing.
1830 (cp_parser_already_scoped_statement): Rewrite to do what it says.
1831 * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
1832 (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST.
1833 Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
1834 * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
1835 (finish_cond): New, rewritten from FINISH_COND.
1836 (simplify_loop_decl_cond): New.
1837 (finish_expr_stmt): Avoid nested EXPR_STMTs.
1838 (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
1839 begin_else_clause, finish_else_clause, finish_if_stmt,
1840 begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
1841 begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
1842 finish_for_cond, finish_for_stmt, begin_switch_stmt,
1843 finish_switch_cond, finish_switch_stmt, begin_try_block,
1844 finish_try_block, finish_cleanup_try_block, finish_function_try_block,
1845 finish_handler_sequence, finish_function_handler_sequence,
1846 begin_handler, finish_handler_parms, finish_handler,
1847 begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
1848 using statement lists.
1849 (begin_compound_stmt): Replace has_no_scope argument with flags.
1850 Update all callers. Use statement lists.
1851 (finish_compound_stmt): Likewise.
1852 (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
1853 (current_scope_stmt_stack): Remove.
1854 (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
1855 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
1856 Rewrite with statement lists.
1858 2004-06-15 Alexandre Oliva <aoliva@redhat.com>
1860 * parser.c: Change all assignments of c_lex_string_translate
1861 to true and false to 1 and 0.
1862 (cp_lexer_read_token): Convert type of the translated string.
1863 (cp_parser_skip_to_closing_parentheses): Preserve original
1864 value of c_lex_string_translate, and set it to -1 while
1866 (cp_parser_cache_group): Likewise.
1867 (cp_parser_cache_group_1): Renamed.
1868 (cp_parser_asm_operand_list): Remove redundant setting of
1869 c_lex_string_translate.
1870 (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
1871 Handle chained strings.
1873 2004-06-12 Andrew Pinski <apinski@apple.com>
1877 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
1879 * cp-tree.h: Fix typo.
1881 * cp-tree.h: Include cgraph.h
1882 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
1883 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
1885 2004-06-12 Jason Merrill <jason@redhat.com>
1887 PR tree-optimization/14107
1888 * decl.c (finish_function): Warn about no return in all functions.
1890 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
1892 * cp-tree.h (struct language_function): Remove cannot_inline.
1893 * decl.c (save_function_data): cannot_inline is no more.
1894 (cxx_push_function_context): Likewise.
1895 * decl2.c (start_objects, start_static_storage_duration_function):
1896 Reset DECL_INLINE, set DECL_UNINLINABLE.
1898 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1901 * search.c (lookup_field): Propagate the ambiguity list.
1902 (lookup_fnfields): Likewise.
1904 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1907 * parser.c (cp_parser_template_name): Ctors/dtors never need a
1908 template keyword to disambiguate.
1910 2004-06-14 Mark Mitchell <mark@codesourcery.com>
1913 * decl.c (grokdeclarator): Ignore pointer-to-members when
1914 computing template depth.
1917 * name-lookup.c (pushtag): Do not try to put class declarations in
1918 explicit specialization scopes.
1920 2004-06-11 Andrew Pinski <pinskia@physics.uc.edu>
1922 * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
1924 2004-06-11 Mark Mitchell <mark@codesourcery.com>
1927 * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
1928 bindings for undeclared built-ins.
1930 2004-06-11 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1932 * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
1933 appear at the correct location.
1935 2004-06-10 Jason Merrill <jason@redhat.com>
1939 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1940 * init.c (build_offset_ref): Build SCOPE_REF with non-null
1941 TREE_TYPE for non-dependent names.
1942 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
1943 unknown_type_node as its TREE_TYPE.
1944 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
1945 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
1946 (dump_expr) <SCOPE_REF case>: Likewise.
1948 2004-06-10 Mark Mitchell <mark@codesourcery.com>
1951 * parser.c (cp_parser_direct_declarator): Robustify.
1954 * pt.c (tsubst_copy): Use decl_constant_value on enumeration
1955 constants in non-dependent contexts.
1959 * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
1962 2004-06-10 Jakub Jelinek <jakub@redhat.com>
1965 * decl.c (duplicate_decls): Handle fileptr_type_node arguments
1968 2004-06-09 Mark Mitchell <mark@codesourcery.com>
1972 2004-06-07 Mark Mitchell <mark@codesourcery.com>
1973 * lex.c (handle_pragma_interface): Deprecate.
1974 (handle_pragma_implementation): Likewise.
1976 2004-06-09 Andrew Pinski <pinskia@physics.uc.edu>
1978 * g++spec.c (lang_specific_driver): Remove check for -lm
1979 and -lmath when check it see if it was the math library.
1981 2004-06-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1984 * parser.c (cp_parser_direct_declarator): Reject constructor named
1985 as qualified template-id.
1987 2004-06-07 Mark Mitchell <mark@codesourcery.com>
1990 * lex.c (handle_pragma_interface): Deprecate.
1991 (handle_pragma_implementation): Likewise.
1993 2004-06-07 Mark Mitchell <mark@codesourcery.com>
1996 * parser.c (cp_parser_iteration_statement): Fix typo in error
2000 * pt.c (tsubst_default_argument): Do not defer access checks
2001 while substituting into the default argument.
2004 * pt.c (tsubst_copy): Do not try to substitute for an enumeration
2005 constant in a non-dependent context.
2008 * except.c (build_throw): Ensure that temp_expr has been
2011 2004-06-06 Roger Sayle <roger@eyesopen.com>
2013 * cp/cp-tree.h (lvalue_or_else): Add function prototype.
2015 2004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2018 * parser.c (cp_parser_mem_initializer_id): Gracefully reject
2019 'typename', and accept 'template'.
2021 2004-06-03 Andrew Pinski <pinskia@physics.uc.edu>
2022 Jan Hubicka <jh@suse.cz>
2025 * method.c (use_think): Do not mark thunk as referenced.
2027 2004-06-03 Matt Austern <austern@apple.com>
2030 * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
2031 is nonzero, and if we see a noninline definition of a key method,
2032 make the vtables nonweak.
2034 2004-06-02 Matt Austern <austern@apple.com>
2036 * cp-tree.h (instantiate_decl): new boolean parameter,
2037 undefined_ok. Current behavior is equivalent to its being 0.
2038 * decl2.c (mark_used): Add new argument when calling instantiate_decl
2039 * pt.c (mark_decl_instantiated): Unconditionally make
2040 instantiations explicit unconditionally
2041 (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
2042 since mark_decl_instantiated now does it.
2043 (instantiate_class_member): New. Instantiate a member of an
2044 explicitly instantiated class template.
2045 (do_type_instantiation): Explicitly instantiate members of an
2046 explicitly instantiated class template.
2047 (instantiate_decl): if undefined_ok is nonzero, and if we're
2048 trying to explicitly instantiated a template with no definition,
2049 change it to an implicit instantiation.
2050 (instantiate_pending_templates): Add new argument to instantiate_decl.
2051 * tree.c (cp_cannot_inline_tree_fn): Likewise.
2053 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
2055 * cp-tree.h: Fix typo.
2057 * cp-tree.h: Include cgraph.h
2058 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
2059 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
2061 2004-06-01 Jason Merrill <jason@redhat.com>
2064 * call.c (call_builtin_trap): Remove type parm.
2065 (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
2066 (build_x_va_arg): Dereference a null pointer for a non-POD argument.
2068 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2071 * init.c (build_offset_ref): Build SCOPE_REF with non-null
2072 TREE_TYPE for non-dependent names.
2073 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
2074 unknown_type_node as its TREE_TYPE.
2075 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
2076 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
2077 (dump_expr) <SCOPE_REF case>: Likewise.
2079 2004-06-01 Richard Henderson <rth@redhat.com>
2080 Andrew Pinski <pinskia@physics.uc.edu>
2082 * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
2083 * parser.c (struct cp_parser): Remove in_offsetof.
2084 (cp_parser_new): Don't set it.
2085 (cp_parser_unary_expression): Don't check it.
2086 (cp_parser_postfix_open_square_expression): Split out from ...
2087 (cp_parser_postfix_expression): ... here.
2088 (cp_parser_postfix_dot_deref_expression): Likewise.
2089 (cp_parser_builtin_offsetof): New.
2090 (cp_parser_primary_expression): Use it.
2092 2004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2095 * parser.c (cp_parser_postfix_expression): Allow subscript
2096 operator in offsetof.
2098 2004-05-31 Mark Mitchell <mark@codesourcery.com>
2101 * friend.c (add_friend): Do not try to perform access checks for
2102 functions from dependent classes.
2104 2004-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
2106 * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
2107 (pp_cxx_begin_template_argument_list): Turn into a function.
2108 (pp_cxx_end_template_argument_list): Likewise.
2109 (pp_cxx_separate_with): Define.
2110 (pp_cxx_unqualified_id): Tidy.
2111 (pp_cxx_primary_expression): Likewise.
2112 (pp_cxx_postfix_expression): Likewise.
2113 (pp_cxx_expression): Likewise.
2114 (pp_cxx_simple_type_specifier): Likewise.
2115 (pp_cxx_type_specifier_seq): Likewise.
2116 (pp_cxx_parameter_declaration_clause): Likewise.
2117 (pp_cxx_exception_specification): Likewise.
2118 (pp_cxx_direct_declarator): Likewise.
2119 (pp_cxx_type_id): Likewise.
2120 * cxx-pretty-print.h (pp_cxx_whitespace): Export from
2122 (pp_cxx_left_paren): Likewise.
2123 (pp_cxx_right_paren): Likewise.
2124 (pp_cxx_left_brace): Likewise.
2125 (pp_cxx_right_brace): Likewise.
2126 (pp_cxx_left_bracket): Likewise.
2127 (pp_cxx_right_bracket): Likewise.
2128 (pp_cxx_dot): Likewise.
2129 (pp_cxx_identifier): Likewise.
2130 (pp_cxx_tree_identifier): Likewise.
2131 (pp_cxx_ampersand): New macro.
2132 (pp_cxx_star): Likewise.
2133 (pp_cxx_arrow): Likewise.
2134 (pp_cxx_semicolon): Likewise.
2135 (pp_cxx_complement): Likewise.
2136 (pp_cxx_begin_template_argument_list): Declaree.
2137 (pp_cxx_end_template_argument_list): Likewise.
2138 (pp_cxx_colon_colon): likewise.
2140 2004-05-31 Eric Botcazou <ebotcazou@libertysurf.fr>
2142 * parser.c (cp_parser_simple_type_specifier): Explicitly test
2145 2004-05-31 Kazu Hirata <kazu@cs.umass.edu>
2147 * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
2148 typeck.c: Fix comment formatting.
2150 2004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
2152 * cp-lang.c (cp_expand_decl): Remove.
2153 (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
2155 2004-05-30 Andreas Jaeger <aj@suse.de>
2157 * lang-specs.h: Add missing initializers for .ii.
2159 2004-05-28 Aldy Hernandez <aldyh@redhat.com>
2161 * decl.c (cp_make_fname_decl): Free return value from
2164 2004-05-28 Mark Mitchell <mark@codesourcery.com>
2167 * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
2169 * init.c (build_new): Likewise.
2172 * name-lookup.c (arg_assoc): Robustify.
2175 * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
2176 when determining the scope to use for a pointer to member.
2177 (lookup_anon_field): Give it external linkage.
2178 * cp-tree.h (lookup_anon_field): Declare it.
2179 * expr.c (cplus_expand_constant): Use it.
2181 2004-05-28 Mark Mitchell <mark@codesourcery.com>
2184 * parser.c (cp_parser_simple_type_specifier): Call
2185 maybe_note_name_used_in_class.
2187 2004-05-28 Tom Marshall <tmarshall@real.com>
2190 * class.c (finish_struct_1): Warn only if the dtor is non-private or
2191 the class has friends.
2193 2004-05-27 Adam Nemet <anemet@lnxw.com>
2196 * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
2197 TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
2199 2004-05-24 Geoffrey Keating <geoffk@apple.com>
2201 * method.c (implicitly_declare_fn): Don't call defer_fn; abort
2202 if it might be needed.
2203 * pt.c (mark_decl_instantiated): Only call defer_fn if
2204 the function actually needs processing in finish_file.
2205 * decl2.c (finish_file): Add check that elements in
2206 deferred_fns_used are really needed there. Remove unnecessary
2207 test of DECL_SAVED_TREE.
2209 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
2211 * Make-lang.in: No need to specify $(LIBCPP).
2213 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2216 * parser.c (cp_parser_class_head): Robustify.
2219 * parser.c (cp_parser_decl_specifier_seq): Correct error in
2221 (cp_parser_constructor_declarator_p): Treat attributes
2225 * typeck.c (build_unary_op): Do not attempt to resolve casts to
2226 base classes in templates.
2228 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2231 * pt.c (instantiate_template): Robustify.
2233 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2236 * decl.c (xref_tag): Issue errors about redeclaring template
2237 classes as non-template classes.
2239 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2242 * name-lookup.c (supplement_binding): Allow redefinitions of
2246 * parser.c (cp_parser_template_argument): Robustify.
2248 2004-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
2250 * class.c (alter_access): Use %E format specifier to print an
2251 identifier node. Avoid looking at the IDENTIFIER_POINTER.
2252 (push_lang_context): Likewise.
2253 * decl.c (lookup_label): Likewise.
2254 (grokdeclarator): Likewise.
2255 * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
2256 * pt.c (do_type_instantiation): Likewise.
2257 * tree.c (handle_java_interface_attribute): Likewise.
2258 (handle_com_interface_attribute): Likewise.
2259 (handle_init_priority_attribute): Likewise.
2261 2004-05-22 Mark Mitchell <mark@codesourcery.com>
2265 * pt.c (build_non_dependent_expr): Expand the set of tree nodes
2266 recognized as overloaded functions.
2268 2004-05-22 Mark Mitchell <mark@codesourcery.com>
2271 * class.c (layout_nonempty_base_or_field): Do not try to avoid
2272 layout conflicts for unions.
2275 * typeck.c (build_x_unary_op): Instantiate template class
2276 specializations before looking for "operator &".
2279 * typeck.c (complete_type): Layout non-dependent array types, even
2283 * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
2286 2004-05-22 Roger Sayle <roger@eyesopen.com>
2288 * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
2289 returning when TREE_TYPE is error_mark_node.
2290 * typeck.c (require_complete_type): Return error_mark_node if
2291 value's type is an error_mark_node.
2293 2004-05-20 Andrew Pinski <pinskia@physics.uc.edu>
2295 * optimize.c (calls_setjmp_r): Remove.
2296 (calls_setjmp_p): Remove.
2297 * cp-tree.c (calls_setjmp_p): Remove.
2298 * decl.c (finish_function): Do not call calls_setjmp_p.
2300 2004-05-18 Zack Weinberg <zack@codesourcery.com>
2302 * decl.c (cp_finish_decl): Use mark_decl_referenced.
2303 * decl2.c (maybe_make_one_only): Likewise.
2304 * method.c (use_thunk): Likewise.
2306 2004-05-18 Jason Merrill <jason@redhat.com>
2308 * class.c (build_base_path): Tidy a bit.
2310 2004-05-14 Geoffrey Keating <geoffk@apple.com>
2312 * name-lookup.c (struct scope_binding): New.
2313 (EMPTY_SCOPE_BINDING): New.
2314 (lookup_using_namespace): Take a scope_binding instead of a
2316 (qualified_lookup_using_namespace): Likewise.
2317 (cxx_binding_clear): Delete.
2318 (do_nonmember_using_decl): Use a scope_binding instead of a
2320 (lookup_tag): Don't call select_decl.
2321 (ambiguous_decl): Don't return anything (and change callers to match).
2322 Take a scope_binding as the second parameter.
2323 (lookup_namespace_name): Use a scope_binding instead of a
2325 (unqualified_namespace_lookup): Likewise.
2326 (lookup_qualified_name): Likewise.
2327 (select_decl): Take a scope_binding instead of a cxx_binding.
2328 Use macros rather than hand-coding tests for type-ness.
2330 2004-05-13 Diego Novillo <dnovillo@redhat.com>
2332 * cp-gimplify.c: Rename from cp-simplify.c.
2333 * Make-lang.in, optimize.c: Update.
2335 2004-05-13 Diego Novillo <dnovillo@redhat.com>
2337 Merge from tree-ssa-20020619-branch. See
2338 ChangeLog.tree-ssa for details.
2340 * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
2341 cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
2342 expr.c, init.c, name-lookup.h, optimize.c, parser.c,
2343 pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
2345 * cp-mudflap.c: New file.
2346 * cp-simplify.c:: New file.
2348 2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2351 * decl2.c (check_classfn): For member templates, compare also the
2352 template parameters to match the declaration.
2353 * cp-tree.h: Adjust declaration of check_classfn.
2354 * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
2355 * friend.c (do_friend): Likewise.
2356 * pt.c (tsubst_friend_function): Likewise.
2358 2004-05-01 Zack Weinberg <zack@codesourcery.com>
2360 * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
2361 Instead, dig into the representation type to find the array bound.
2363 2004-04-30 Jason Merrill <jason@redhat.com>
2365 Refer to base members using COMPONENT_REFs where possible.
2366 * class.c (build_simple_base_path): New fn.
2367 (build_base_path): Use it for non-virtual base references.
2368 (layout_class_type): Change base fields to their real type
2369 after layout is done.
2370 * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
2371 * cp-lang.c (cxx_get_alias_set): Use it.
2373 2004-04-30 Kazu Hirata <kazu@cs.umass.edu>
2375 * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
2378 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2381 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
2382 used in integral constant expressions.
2384 2004-04-22 Mark Mitchell <mark@codesourcery.com>
2386 * init.c (build_aggr_init): Fix accidental use of C99 construct in
2389 * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
2391 * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
2392 * decl.c (reshape_init): Use it.
2393 * init.c (perform_member_init): Remove redundant condition.
2394 (build_aggr_init): Adjust to handle brace-enclosed initializers
2396 (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
2398 * parser.c (cp_parser_initializer_clause): Do not set
2399 TREE_HAS_CONSTRUCTOR on the initializer.
2400 * rtti.c (tinfo_base_init): Likewise.
2401 (generic_initializer): Likewise.
2402 (ptr_initializer): Likewise.
2403 (ptm_initializer): Likewise.
2404 (class_initializer): Likewise.
2405 (get_pseudo_ti_init): Likewise.
2406 * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
2408 2004-04-22 Alan Modra <amodra@bigpond.net.au>
2410 * name-lookup.c (anonymous_namespace_name): Make static.
2412 2004-04-19 Roger Sayle <roger@eyesopen.com>
2415 * class.c (build_base_path): Call fold whilst building the NULL
2416 pointer check expression trees.
2418 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
2420 * init.c (build_new_1): Don't use type size argument for Java
2421 _Jv_AllocObject call.
2423 2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
2425 * method.c (make_alias_for_thunk): Remove preprocessor guard on
2426 declaration and definition.
2428 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
2431 * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
2432 than ASM_OUTPUT_DEF.
2434 2004-04-08 Jakub Jelinek <jakub@redhat.com>
2436 * decl2.c (mark_used): Don't segfault if cfun != NULL but
2437 current_function_decl == NULL.
2439 2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
2442 * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
2445 2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2447 * init.c (decl_constant_value): Don't look at DECL_INITIAL
2449 * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
2450 or TREE_SIDE_EFFECTS of a type.
2452 2004-04-02 Nathan Sidwell <nathan@codesourcery.com>
2455 * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
2456 cv-qualifier unification.
2457 * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
2459 2004-04-02 Jan Hubicka <jh@suse.cz>
2461 * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
2462 * cp-tree.h (cp_update_decl_after_saving): Declare.
2463 * tree.c (cp_update_decl_after_saving): Define.
2465 2004-04-01 Mark Mitchell <mark@codesourcery.com>
2468 * typeck.c (get_delta_difference): Call fold before returning the
2471 2004-04-01 Richard Henderson <rth@redhat.com>
2474 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
2475 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
2477 2004-04-01 Mark Mitchell <mark@codesourcery.com>
2480 * name-lookup.c (maybe_push_cleanup_level): Robustify.
2482 2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2484 * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
2486 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2488 * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
2489 * class.c (check_bitfield_decl): Likewise.
2490 * cvt.c (type_promotes_to): Likewise.
2491 * decl.c (finish_enum): Likewise.
2492 * mangle.c (write_builtin_type): Likewise.
2493 * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
2494 * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
2495 (build_binary_op): Likewise.
2497 2004-03-31 Jan Hubicka <jh@suse.cz>
2499 * tree.h (optimize_function): Kill prototype.
2500 * optimize.c (dump_function, optimize_function, dump_finction): Kill.
2501 * semantics.c (expand_body): Kill.
2503 2004-03-30 Mark Mitchell <mark@codesourcery.com>
2506 * decl.c (start_decl_1): Do not decide whether or not to create a
2507 new cleanup level until after the type has been completed.
2510 * pt.c (tsubst_default_argument): Clear current_function_decl.
2512 2004-03-30 Zack Weinberg <zack@codesourcery.com>
2514 * name-lookup.c, parser.c: Use new shorter form of GTY markers.
2516 2004-03-29 Zack Weinberg <zack@codesourcery.com>
2518 * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
2519 is null, just print the literal name and return.
2521 2004-03-25 Kazu Hirata <kazu@cs.umass.edu>
2523 * cxx-pretty-print.c: Fix comment typos.
2525 2004-03-24 Kazu Hirata <kazu@cs.umass.edu>
2527 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
2530 2004-03-23 Ziemowit Laski <zlaski@apple.com>
2532 * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
2533 * mangle.c (write_type): Add call to 'mangle_fundamental_type'
2536 2004-03-23 Zack Weinberg <zack@codesourcery.com>
2538 PR 12267, 12391, 12560, 13129, 14114, 14133
2539 * cp-lang.c (c_reset_state): Delete.
2540 (push_file_scope, pop_file_scope): New stubs.
2541 * parser.c (c_parse_file): Call sorry() here if called more than once.
2543 2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2545 * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
2548 2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
2550 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
2552 2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
2554 * error.c (enum pad): Remove.
2555 (dump_qualifiers): Likewise.
2556 (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
2557 (dump_aggr_type): Likewise.
2558 (dump_type_suffix): Likewise.
2559 (dump_simple_decl): Likewise.
2560 (dump_function_decl): Likewise.
2561 (cv_to_string): Likewise.
2562 (dump_type_prefix): Likewise. Adjust return void.
2563 * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
2565 (pp_cxx_template_keyword_if_needed): Document.
2566 (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
2567 (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
2568 MUST_NOT_THROW_EXPR.
2570 2004-03-21 Mark Mitchell <mark@codesourcery.com>
2573 * decl.c (cp_finish_decl): Compute the size of arrays declared in
2574 templates, if their type is non-dependent.
2576 2004-03-19 Mark Mitchell <mark@codesourcery.com>
2578 * call.c (build_op_delete_call): Do not forget the placement
2579 arguments when iterating through mutiple delete operators.
2581 * cp-tree.h (svaed_scope): Remove last_parms.
2582 (NEW_DELETE_OPNAME_P): New macro.
2583 (last_function_parms): Remove.
2584 (do_friend): Adjust prototype.
2585 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
2586 using last_function_parms.
2587 (grokfndecl): Take the PARM_DECLs as an argument, rather than
2588 using last_function_parms.
2589 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
2590 for class-specific operator new and operator delete.
2591 (grok_op_properties): Do not look for allocation functions with
2593 (start_function): Use DECL_ARGUMENTS instead of
2594 last_function_parms.
2595 * decl.h (last_function_parms): Do not declare.
2596 * decl2.c (grokclassfn): Do not use last_function_parms.
2597 * friend.c (do_friend): Remove parmdecls parameter.
2598 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
2599 (pop_from_top_level): Do not restore it.
2600 * pt.c (check_explicit_specialization): Do not adjust
2601 last_function_parms.
2603 * name-lookup.c (do_local_using_decl): Create a local binding for
2604 types brought in via using declarations.
2606 * name-lookup.c (lookup_arg_dependent): Handle block-scope
2607 function declarations correctly.
2609 * semantics.c (finish_id_expression): Correct handling of
2610 conversion operators to dependent types.
2612 * typeck.c (lookup_destructor): Allow the use of destructors from
2615 2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2617 * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
2618 TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
2619 * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
2620 the field is named TEMPLATE_TYPE_PARM_INDEX.
2622 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2625 * parser.c (cp_parser_functional_cast): A cast to anything
2626 but integral or enumaration type is not an integral constant
2628 * pt.c (value_dependent_expression_p): Handle cast expressions
2629 without operands (such as "int()").
2631 2004-03-18 Mark Mitchell <mark@codesourcery.com>
2633 * semantics.c (finish_pseudo_destructor_expr): Allow differing
2634 cv-qualification between the type named by the
2635 pseudo-destructor-name and the object-type.
2637 * search.c (accessible_base_p): Handle non-proper bases.
2639 * name-lookup.c (do_nonmember_using_decl): If a using declaration
2640 refers to a single overloaded function, set the type of the
2642 * tree.c (lvalue_type): Simplify.
2643 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
2645 (build_unary_op): Handle OVERLOADs with known types.
2647 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
2650 * parser.c (cp_parser_postfix_expression): Handle the use of
2651 "typename" in non-dependent contexts. Convert appropriately when
2652 when using a qualified name after "->" or ".".
2654 * call.c (conditional_conversion): Honor the requirement that some
2655 conversions refer to the original object.
2657 2004-03-18 Mark Mitchell <mark@codesourcery.com>
2659 * call.c (build_conditional_expr): Do not call force_rvalue for
2660 operands of void_type when the conditional expression itself has
2662 * name-lookup.c (pushdecl): Don't consider a declaration of a
2663 function named "main" to be an overload of a type named "main".
2664 * parser.c (cp_parser_template_name): Perform name lookup when the
2665 template name is proceeded by "template" if the qualifying scope
2667 * typeck.c (composite_pointer_type_r): Correctly handle
2668 pointer-to-member types.
2669 (build_const_cast): Likewise.
2671 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2673 * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
2674 * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
2675 (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
2676 (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
2677 (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
2678 (TYPEOF_TYPE_EXPR): New macro.
2679 * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
2680 * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
2681 * pt.c (tsubst): Likewise.
2682 * semantics.c (finish_typeof): Likewise.
2683 * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
2684 and TEMPLATE_TYPE_PARM.
2685 * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
2686 (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
2688 2004-03-16 Mark Mitchell <mark@codesourcery.com>
2691 * cp-tree.h (build_new_op): Change prototype.
2692 (build_x_binary_op): Likewise.
2693 * call.c (build_new_op): Add overloaded_p parameter.
2694 * decl2.c (grok_array_decl): Adjust call to build_new_op.
2695 * parser.c (cp_parser_binary_expression): Note that uses of
2696 overloaded operators prevents an expression from being considered
2697 an integral constant.
2698 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
2700 * semantics.c (finish_call_expr): Likewise.
2701 * typeck.c (rationalize_conditional_expr): Likewise.
2702 (build_x_indirect_ref): Likewise.
2703 (build_x_binary_op): Likewise.
2704 (build_x_unary_op): Likewise.
2705 (build_x_compound_expr): Likewise.
2706 (build_modify_expr): Likewise.
2707 * typeck2.c (build_x_arrow): Likewise.
2709 2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
2711 * cp-lang.c, ptree.c: Update copyright.
2713 2004-03-13 Mark Mitchell <mark@codesourcery.com>
2716 * parser.c (cp_parser_non_integral_constant_expression): Encode
2717 more of the idiom that surrounded calls to this function within
2719 (cp_parser_primary_expression): Adjust accordingly.
2720 (cp_parser_postfix_expression): Likewise.
2721 (cp_parser_unary_expression): Likewise.
2722 (cp_parser_cast_expression): Likewise.
2723 (cp_parser_assignment_expression): Likewise.
2724 (cp_parser_expression): Likewise.
2725 (cp_parser_new_expression): Note that new-expressions are not
2726 allowed in integral constant expressions.
2727 (cp_parser_delete_expression): Likewise.
2729 2004-03-12 Matt Austern <austern@apple.com>
2731 * decl2.c (maybe_make_one_only): Look at
2732 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
2733 to make an explicit instantiation weak.
2734 * method.c (use_thunk): Make sure we call comdat_linkage
2736 * pt.c (do_type_instantiation): On systems where weak symbols
2737 don't go in a static archive's TOC, explicit instantiation of a
2738 class must imply *explicit* instantiation of its memeber.
2740 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
2742 * call.c, cp-tree.h, pt.c: Fix comment typos.
2744 2004-03-10 Mark Mitchell <mark@codesourcery.com>
2747 * decl.c (xref_tag): Disregard non-type declarations when
2748 looking up a tagged type.
2750 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
2753 * call.c (convert_like_real): Build a const qualified temporary,
2754 when testing ctor access.
2756 2004-03-09 Mark Mitchell <mark@codesourcery.com>
2758 * call.c (initialize_reference): Fix typo.
2760 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2763 * pt.c (determine_specialization): For member templates, match also
2767 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
2769 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
2771 2004-03-09 Mark Mitchell <mark@codesourcery.com>
2774 * call.c (initialize_reference): Handle initializers that are
2775 class-member access expressions applies to rvalues.
2777 2004-03-09 Mark Mitchell <mark@codesourcery.com>
2780 * name-lookup.c (supplement_binding): Ignore functions that are
2781 marked DECL_ANTICIPATED.
2783 2004-03-08 Mark Mitchell <mark@codesourcery.com>
2786 * class.c (check_field_decls): Complain about non-static data
2787 members of reference type in unions. Propagate
2788 CLASSTYPE_REF_FIELDS_NEED_INIT and
2789 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
2791 * init.c (perform_member_init): Complain about mbmers with const
2792 type that are not explicitly initialized.
2794 2004-03-08 Mark Mitchell <mark@codesourcery.com>
2796 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
2797 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
2798 (lang_identifier): Remove implicit_decl and error_locus.
2799 (IDENTIFIER_IMPLICIT_DECL): Remove.
2800 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
2801 (IDENTIFIER_ERROR_LOCUS): Likewise.
2802 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
2803 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
2804 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
2805 (implicitly_declare): Remove.
2806 * decl.c (warn_extern_redeclared_static): Remove check of
2807 IDENTIFIER_IMPLICIT_DECL.
2808 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
2809 (implicitly_declare): Remove.
2810 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
2811 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
2812 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
2813 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
2814 in the innermost scope, rather than at namespace scope.
2815 * name-lookup.c (push_local_binding): Give it external linkage.
2816 (pushdecl): Remove dead code.
2817 * name-lookup.h (push_local_binding): Declare it.
2818 * ptree.c (cxx_print_identifier): Don't print
2819 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
2820 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
2821 not IDENTIFIER_ERROR_LOCUS.
2822 * typeck.c (build_function_call): Remove dead code.
2824 2004-03-08 Jason Merrill <jason@redhat.com>
2827 * decl.c (xref_tag): Remove attribute handling.
2828 * cp-tree.h: Adjust prototype.
2829 * decl.c, parser.c, rtti.c: Adjust callers.
2830 * parser.c (cp_parser_class_head): Pass back attributes in the
2832 (cp_parser_class_specifier): Adjust.
2834 2004-03-08 Matt Austern <austern@apple.com>
2837 * name-lookup.c (add_decl_to_level): Add extern variables, as well
2838 as static, to static_decls array.
2840 2004-03-05 Jason Merrill <jason@redhat.com>
2842 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
2844 2004-03-04 Geoffrey Keating <geoffk@apple.com>
2846 * decl.c (grokfndecl): Update old incorrect comment.
2847 (grokvardecl): Diagnose C++ variables of type with no linkage.
2849 2004-03-01 Mark Mitchell <mark@codesourcery.com>
2852 * pt.c (build_non_dependent_expr): Do not create a
2853 NON_DEPENDENT_EXPR for a THROW_EXPR.
2855 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
2858 * error.c (dump_expr): Handle THROW_EXPR.
2860 2004-03-01 Mark Mitchell <mark@codesourcery.com>
2863 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
2864 lookup if ordinary name-lookup finds a non-function.
2865 * pt.c (tsubst_copy_and_build): Likewise.
2868 * parser.c (cp_parser_late_parsing_default_args): Check that there
2869 are no extra tokens after the end of the default-argument
2872 2004-03-01 Mark Mitchell <mark@codesourcery.com>
2875 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
2876 having C++ linkage for name-mangling purposes.
2879 * parser.c (cp_parser_direct_declarator): Recognize constructor
2880 declarators that use a template-id to name the class being
2884 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
2885 (tsubst_expr): Do not call tsubst_copy, even when
2886 processing_template_decl.
2888 2004-03-01 Jeff Law <law@redhat.com>
2890 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
2893 2004-02-29 Mark Mitchell <mark@codesourcery.com>
2896 * name-lookup.h (push_scope): Change prototype.
2897 * name-lookup.c (push_scope): Do not reenter the current class
2899 * decl.c (grokfndecl): Check return code from push_scope before
2901 * decl2.c (check_classfn): Likewise.
2902 * parser.c (cp_parser_conversion_function_id): Likewise.
2903 (cp_parser_init_declarator): Likewise.
2904 (cp_parser_direct_declarator): Likewise.
2905 (cp_parser_class_specifier): Likewise.
2906 (cp_parser_class_head): Likewise.
2907 (cp_parser_lookup_name): Likewise.
2908 (cp_parser_constructor_declarator_p): Likewise.
2909 * pt.c (instantiate_class_template): Likewise.
2910 (resolve_typename_type): Likewise.
2912 2004-02-29 Mark Mitchell <mark@codesourcery.com>
2915 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
2919 * class.c (update_vtable_entry_for_fn): Do not go through
2920 covariance machinery if the type returned by an overrider is the
2921 same as the original.
2923 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
2925 * call.c: Fix a comment typo.
2927 2004-02-27 Ziemowit Laski <zlaski@apple.com>
2929 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
2931 2004-02-26 Mark Mitchell <mark@codesourcery.com>
2934 * parser.c (cp_parser_parameter_declaration_list): Commit
2935 to fewer tentative parses.
2937 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2940 * pt.c (dependent_type_p_r): A template template parameter is a
2943 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2946 * mangle.c (write_template_arg_literal): Don't rely on identity for
2949 2004-02-24 Jason Merrill <jason@redhat.com>
2951 * tree.c (build_exception_variant): Use check_qualified_type.
2953 2004-02-23 Zack Weinberg <zack@codesourcery.com>
2954 Kazu Hirata <kazu@cs.umass.edu>
2956 * decl.c (cxx_init_decl_processing): Don't check
2957 flag_writable_strings.
2959 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
2962 * typeck.c (maybe_warn_about_returning_address_of_location):
2963 Change check for VAR_DECL to use DECL_P instead.
2965 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2968 * cvt.c (build_expr_type_conversion): Type must be complete before
2969 looking up for conversions.
2971 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2974 * name-lookup.c (arg_assoc_class): Don't look into template
2975 arguments if it is not a primary template.
2977 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
2980 * method.c (use_thunk): Always clone function argument tree.
2982 2004-02-20 Mark Mitchell <mark@codesourcery.com>
2985 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
2988 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
2989 for all type variants.
2991 2004-02-19 Mark Mitchell <mark@codesourcery.com>
2994 * decl.c (duplicate_decls): Return error_mark_node for invalid
2996 * name-lookup.c (push_namespace): Ignore the return value from
2998 * pt.c (push_template_decl_real): Robustify.
3001 * name-lookup.c (push_class_level_binding): Do not complain about
3002 adding a binding for a member whose name is the same as the
3003 enclosing class if the member is located in a base class of the
3006 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3009 * parser.c (cp_parser_new_expression): Parse an ill-formed
3010 direct-new-declarator after a parenthesized type-id to emit good
3013 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
3015 * cp-tree.def, cvt.c: Update copyright.
3017 2004-02-17 Mark Mitchell <mark@codesourcery.com>
3020 * cp-tree.h (abi_version_at_least): Remove.
3021 * mangle.c: Include flags.h.
3023 2004-02-15 Mark Mitchell <mark@codesourcery.com>
3026 * call.c (build_conditional_expr): Handle conversions between
3027 class types which result in differently cv-qualified type
3031 * class.c (delete_duplicate_fields_1): Remove.
3032 (delete_duplicate_fields): Likewise.
3033 (finish_struct_anon): Remove check for members with the same name
3034 as their enclosing class.
3035 (check_field_decls): Do not call duplicate_fields.
3036 * decl.c (grokdeclarator): Remove check for static data members
3037 with the same name as their enclosing class.
3038 * name-lookup.c (push_class_level_binding): Check for members with
3039 the same name as their enclosing class.
3041 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
3044 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
3046 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3049 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
3050 has full set of arguments.
3052 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3055 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
3057 2004-02-13 Mark Mitchell <mark@codesourcery.com>
3060 * cp-tree.h (delete_sanity): Change prototype.
3061 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
3062 Remove dead code. Adjust code to warn about deleting an array.
3063 * typekc.c (decay_conversion): Use build_address and build_nop.
3066 * search.c (accessible_p): Do not check access in thunks.
3069 * call.c (build_conditional_expr): Call force_rvalue on the
3070 non-void operand in the case that one result is a throw-expression
3071 and the other is not.
3073 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
3076 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
3077 the type name and look ahead for ::~, and bail out early with a
3078 better error message if the parse is going to fail.
3080 2004-02-12 Mark Mitchell <mark@codesourcery.com>
3082 * call.c (conversion_kind): New type.
3083 (conversion_rank): Likewise.
3084 (conversion): Likewise.
3085 (CONVERSION_RANK): New macro.
3086 (conversion_obstack): New variable.
3087 (obstack_initialized): Likewise.
3088 (z_candidate): Change type of convs and second_conv.
3089 (candidate_warning): New type.
3090 (IDENTITY_RANK): Remove.
3091 (EXACT_RANK): Likewise.
3092 (PROMO_RANK): Likewise.
3093 (STD_RANK): Likewise.
3094 (PBOOL_RANK): Likewise.
3095 (USER_RANK): Likewise.
3096 (ELLIPSIS_RANK): Likewise.
3097 (BAD_RANK): Likewise.
3098 (ICS_RANK): Likewise.
3099 (ICS_STD_RANK): Likewise.
3100 (ICS_USER_FLAG): Likewise.
3101 (ICS_ELLIPSIS_FLAG): Likewise.
3102 (ICS_THIS_FLAG): Likewise.
3103 (ICS_BAD_FLAG): Likewise.
3104 (NEED_TEMPORARY_P): Likewise.
3105 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
3106 (USER_CONV_CAND): Likewise.
3107 (USER_CONV_FN): Likewise.
3108 (conversion_obstack_alloc): New function.
3109 (alloc_conversion): Likewise.
3110 (validate_conversion_obstack): Likewise.
3111 (alloc_conversions): Likewise.
3112 (build_conv): Adjust to deal with new conversion data structures.
3113 (build_identity_conv): New function.
3114 (build_ambiguous_conv): Likewise.
3115 (standard_conversion): Adjust to deal with new conversion data
3117 (convert_class_to_reference): Likewise.
3118 (direct_reference_binding): Likewise.
3119 (reference_binding): Likewise.
3120 (implicit_conversion): Likewise.
3121 (add_candidate): Likewise.
3122 (add_function_candidate): Likewise.
3123 (add_conv_candidate): Likewise.
3124 (build_builtin_candidate): Likewise.
3125 (print_z_candidate): Likewise.
3126 (merge_conversion_sequences): Likewise.
3127 (build_user_type_conversion_1): Likewise.
3128 (build_user_type_conversion): Likewise.
3129 (build_new_function_call): Likewise.
3130 (build_object_call): Likewise.
3131 (conditional_conversion): Likewise.
3132 (build_conditional_expr): Likewise.
3133 (build_new_op): Likewise.
3134 (build_op_delete_call): Likewise.
3135 (convert_like_real): Likewise.
3136 (build_over_call): Likewise.
3137 (build_new_method_call): Likewise.
3138 (is_subseq): Likewise.
3139 (maybe_handle_implicit_object): Likewise.
3140 (maybe_handle_ref_bind): Likewise.
3141 (compare_ics): Likewise.
3142 (source_type): Likewise.
3143 (add_warning): Likewise.
3145 (can_convert_arg): Likewise.
3146 (can_convert_arg_bad): Likewise.
3147 (perform_implicit_conversion): Likewise.
3148 (perform_direct_initialization_if_possible): Likewise.
3149 (initialize_reference): Likewise.
3150 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
3151 * cp-tree.def (WRAPPER): Likewise.
3152 (IDENTITY_CONV): Remove.
3153 (LVALUE_CONV): Likewise.
3154 (QUAL_CONV): Likewise.
3155 (STD_CONV): Likewise.
3156 (PTR_CONV): Likewise.
3157 (PMEM_CONV): Likewise.
3158 (BASE_CONV): Likewise.
3159 (REF_BIND): Likewise.
3160 (USER_CONV): Likewise.
3161 (AMBIG_CONV): Likewise.
3162 (RVALUE_CONV): Likewise.
3163 * cp-tree.h (tree_wrapper): Remove.
3164 (WRAPPER_ZC): Remove.
3165 (lang_tree_node): Remove wrapper.
3166 (LOOKUP_SPECULATIVELY): Remove.
3167 (build_op_delete_call): Adjust prototype.
3168 (validate_conversion_obstack): Declare.
3169 (build_zc_wrapper): Remove.
3170 * cvt.c (convert_to_reference): Remove dead code.
3171 (ocp_convert): Likewise.
3172 * decl.c (redeclaration_error_message): Correct handling of
3174 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
3175 (cp_tree_node_structure): Remove WRAPPER case.
3176 * decl2.c (finish_file): Call validate_conversion_obstack.
3177 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
3178 (build_op_delete_call): Likewise.
3179 (build_x_delete): Likewise.
3180 (build_delete): Adjust call to build_op_delete_call.
3181 * pt.c (tsubst_friend_declaration): Adjust code to determine
3182 whether or not a friend template is a definition.
3183 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
3184 * tree.c (build_zc_wrapper): Remove.
3186 2004-02-12 Zack Weinberg <zack@codesourcery.com>
3188 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
3189 * cp-tree.h: Don't declare cxx_builtin_type_decls.
3190 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
3191 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
3193 2004-02-10 Mark Mitchell <mark@codesourcery.com>
3195 * typeck.c (lookup_destructor): Fix typo in error message.
3197 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
3199 * call.c, parser.c, tree.c: Fix comment typos.
3201 2004-02-07 Zack Weinberg <zack@codesourcery.com>
3204 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
3205 * decl.c (duplicate_decls, start_function): Likewise.
3207 2004-02-07 Zack Weinberg <zack@codesourcery.com>
3209 * name-lookup.c (pushdecl): Issue shadow warnings directly.
3210 * parser.c (free_parser_stacks): Delete.
3212 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
3214 * rtti.c: Update copyright.
3216 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3219 * decl.c (require_complete_types_for_parms): Do not insert
3220 error_mark_node in the parameter list.
3222 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3225 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
3226 error when terminator can not be found.
3228 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
3230 Make-lang.in (po-generated): Delete.
3232 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
3234 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
3235 targetm.calls.promote_prototypes.
3237 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3241 2004-01-15 Geoffrey Keating <geoffk@apple.com>
3243 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
3244 (handle_pragma_implementation): Likewise.
3246 2004-02-05 Mark Mitchell <mark@codesourcery.com>
3249 * typeck.c (lookup_destructor): Tweak error message.
3251 2004-02-05 Jan Hubicka <jh@suse.cz>
3253 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
3256 2004-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3259 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
3260 code, only emits the diagnostic now. Added lookup of the identifier
3261 and support for qualified ids.
3262 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
3263 Parse an (invalid) type name as id-expression within a declarator.
3264 (cp_parser_simple_declaration): Use it.
3265 (cp_parser_member_declaration): Likewise.
3266 (cp_parser_make_typename_type): New function. Handle errors through
3267 cp_parser_diagnose_invalid_typename.
3268 (cp_parser_elaborated_type_specifier): Use it.
3270 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3273 * call.c (convert_like_real): Use "converting" rather than
3274 "argument" as the descriptive keyword to
3275 dubious_conversion_warnings.
3276 * typeck.c (convert_for_assignment): Do not call
3277 dubious_conversion_warnings.
3279 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3282 * init.c (build_delete): Emit a more informative error message in
3283 case of an incomplete type, and on the correct source line.
3285 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
3287 * error.c, search.c: Update copyright.
3289 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3292 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
3293 linkage for the typeinfo name string.
3295 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3298 * cp-tree.h (fold_non_dependent_expr): New function.
3299 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
3300 (cp_parser_template_argument): Use fold_non_dependent_expr.
3301 (cp_parser_direct_declarator): Likewise.
3302 * pt.c (fold_non_dependent_expr): New function.
3303 (convert_nontype_argument): Use it.
3304 (tsubst_qualified_id): Simplify.
3305 (tsubst_copy_and_build): Likewise.
3307 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3309 * decl.c (cxx_push_function_context): Do not set
3310 current_function_is_thunk.
3311 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
3314 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3317 * pt.c (more_specialized_class): Increase processing_template_decl
3318 while partial ordering.
3320 2004-02-03 Mark Mitchell <mark@codesourcery.com>
3323 * decl.c (start_function): Do not call pushdecl for any
3324 instantiation or specialization of a primary template.
3326 2004-02-03 Mark Mitchell <mark@codesourcery.com>
3329 * parser.c (cp_parser_class_name): Robustify.
3332 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
3335 * semantics.c (finish_id_expression): Do not return an
3336 IDENTIFIER_NODE when lookup finds a PARM_DECL.
3338 2004-02-03 Mark Mitchell <mark@codesourcery.com>
3341 * pt.c (build_non_dependent_expr): Do not build
3342 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
3345 * semantics.c (finish_id_expression): Do not return an
3346 IDENTIFIER_NODE when lookup finds a VAR_DECL.
3349 * parser.c (cp_parser_simple_declaration): When skipping to the
3350 end of the statement swallow the terminating semicolon.
3352 2004-02-02 Mark Mitchell <mark@codesourcery.com>
3355 * init.c (build_offset_ref): Improve error recovery for invalid
3356 uses of non-static member functions.
3359 * cp-tree.h (cp_build_type_attribute_variant): New function.
3360 * class.c (build_clone): Use cp_build_type_attribute_variant.
3361 * decl.c (duplicate_decls): Likewise.
3362 * pt.c (copy_default_args_to_explicit_spec): Likewise.
3363 (tsubst_function_type): Likewise.
3364 * tree.c (build_exception_variant): Check attributes before
3365 concluding that two types are the same.
3366 (cp_build_type-attribute_variant): New method.
3367 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
3370 * call.c (convert_class_to_reference): Keep better track of
3371 pedantically invalid user-defined conversions.
3373 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3376 * pt.c (tsubst_qualified_id): Improved error message when a type
3377 is expected but not found.
3379 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
3381 * class.c: Fix comment typos.
3383 * error.c: Likewise.
3384 * parser.c: Likewise.
3386 * search.c: Likewise.
3387 * typeck.c: Likewise.
3389 2004-01-30 Richard Henderson <rth@redhat.com>
3392 * method.c (use_thunk): Don't force_target_expr for void thunks.
3393 * tree.c (build_target_expr_with_type): Assert non-void type.
3394 (force_target_expr): Likewise.
3396 2004-01-30 Michael Matz <matz@suse.de>
3398 * parser.c (cp_parser_labeled_statement): Accept case ranges.
3400 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3404 * decl.c (grokdeclarator): Check immediatly type completeness for
3405 non-dependent types.
3407 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3410 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
3411 a sizeof expression.block
3413 2004-01-29 Mark Mitchell <mark@codesourcery.com>
3416 * mangle.c (write_encoding): Correct encoding of member template
3419 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3421 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
3422 template name as it was `<::' (digraph typo).
3423 (cp_parser_nth_token_starts_template_argument_list_p): New function.
3424 (cp_parser_id_expression): Use it.
3425 (cp_parser_nested_name_specifier_opt): Likewise.
3426 (cp_parser_template_name): Likewise.
3427 (cp_parser_class_name): Likewise.
3428 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
3430 2004-01-28 Mark Mitchell <mark@codesourcery.com>
3433 * typeck.c (merge_types): Do not merge attributes into
3437 * parser.c (cp_parser_direct_declarator): Do not prevent
3438 backtracking inside a parenthesized declarator.
3439 (cp_parser_parameter_declaration): Fix typo in comment.
3441 2004-01-28 Jan Hubicka <jh@suse.cz>
3443 * semantics.c (expand_body) Do emit_associated_thunks before
3446 2004-01-27 Devang Patel <dpatel@apple.com>
3448 * name-lookup.c: Include "debug.h"
3449 (do_namespace_alias): Invoke debug_hooks to emit debug info
3450 for namespace alias.
3451 (do_local_using_decl): Invoke debug_hooks to emit debug info
3453 (do_class_using_decl): Same.
3454 (do_toplevel_using_decl): Same.
3455 (do_using_directive): Same.
3456 (cp_emit_debug_info_for_using): New function.
3457 * Make-lang.in (cp/parser.o): Depend on debug.h
3458 (cp/name-lookup.o): Same.
3460 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3462 * cp-tree.h (language_function, lang_type_header): Use
3464 * name-lookup.h (cp_binding_level): Likewise.
3466 2004-01-26 Mark Mitchell <mark@codesourcery.com>
3469 * semantics.c (finish_for_expr): Check for unresolved overloaded
3472 * class.c (add_method): Just check processing_template_decl to
3473 determine whether or not we are within a template.
3474 * decl2.c (maybe_retrofit_in_chrg): Likewise.
3475 * init.c (decl_constant_value): Check the type of the declaration,
3477 * name-lookup.c (maybe_push_to_top_level): Rename to ...
3478 (push_to_top_level): ... this.
3479 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
3480 * pt.c (push_template_decl_real): Reorder condition for speed.
3481 (convert_template_argument): Use dependency-checking functions in
3482 place of uses_template_parms.
3483 (lookup_template_class): Avoid calling uses_template_parms more
3485 (uses_template_parms): Reimplement, using dependency-checking
3487 (instantiate_class_template): Use push_to_top_level, not
3488 maybe_push_to_top_level.
3489 (type_unification_real): Simplify.
3490 (type_dependent_expression_p): Handle OFFSET_REFs and
3492 (any_dependent_template_arguments_p): Handle multiple levels of
3494 * semantics.c (expand_or_defer_fn): Do not check
3495 uses_template_parms for template instantiations.
3496 * typeck.c (comptypes): Avoid calling cp_type_quals.
3498 2004-01-25 Mark Mitchell <mark@codesourcery.com>
3501 * call.c (build_over_call): Do not convert arguments when
3502 processing a template.
3503 * pt.c (build_non_dependent_expr): Do not build a
3504 NON_DEPENDENT_EXPR for arithmetic constants.
3506 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3509 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
3510 returns a TYPE_DECL. no further lookup is required.
3511 * semantics.c (check_template_template_default_arg): A TYPE_DECL
3512 is invalid. Rework to give better diagnostics.
3514 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3517 * pt.c (instantiate_class_template): Add an error_mark_node
3519 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
3521 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
3524 * decl.c (finish_function): Move the call to
3525 finish_fname_decls below the call to
3526 finish_eh_spec_block.
3528 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
3530 * optimize.c, typeck2.c: Update copyright.
3532 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
3534 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
3535 init.c, mangle.c, typeck.c: Update copyright.
3537 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
3539 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
3541 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
3543 * Make-lang.in: Replace $(docdir) with doc.
3544 (c++.info, c++.srcinfo): Dummy entry.
3545 (c++.man, c++.srcman): New rules.
3546 (c++.install-man): Revamp rule.
3548 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
3550 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
3551 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
3552 immediate $(shell) instead of deferred backquote.
3554 2004-01-19 Mark Mitchell <mark@codesourcery.com>
3557 * parser.c (cp_parser_postfix_expression): When encountering
3558 incomplete type on left-hand side of "->" or ".", treat the entire
3559 expression as erroneous.
3562 * call.c (build_field_call): Remove.
3563 (n_build_method_call): Likewise.
3564 (build_method_call): Likewise.
3565 (build_new_method_call): Do not call build_field_call.
3566 * class.c (n_build_method_call): Remove.
3567 (print_class_statistics): Do not print it.
3568 * cp-tree.h (build_method_call): Remove declaration.
3569 (finish_object_call_expr): Likewise.
3570 (build_new_1): Do not use build_method_call.
3571 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
3572 when the function appearing on the right-hand-side of "." or "->"
3573 is not actually a function.
3574 * pt.c (tsubst_copy_and_build): Likewise.
3575 * semantics.c (finish_object_call_expr): Remove.
3577 2004-01-18 Mark Mitchell <mark@codesourcery.com>
3580 * pt.c (tsubst): Use finish_typeof.
3582 2004-01-18 Jason Merrill <jason@redhat.com>
3585 * except.c (build_throw): In a template, set
3586 current_function_returns_abnormally.
3588 2004-01-17 Fred Fish <fnf@intrinsity.com>
3591 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
3592 except don't call array_type_nelts() with a VECTOR_TYPE.
3594 2004-01-16 Jan Hubicka <jh@suse.cz>
3596 * mangle.c (write_mangled_name): Remove inline modifier.
3598 2004-01-16 Mark Mitchell <mark@codesourcery.com>
3601 * decl.c (compute_array_index_type): Fix grammar in comment.
3602 * init.c (build_zero_init): Handle zero-sized arrays correctly.
3605 * call.c (name_as_c_string): Print conversion operator names
3609 * call.c (initialize_reference): Pass -1 for inner parameter to
3612 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3615 * parser.c (cp_parser_base_specifier): Check for an invalid
3616 keyword `typename' and emit an user-friendly error message.
3618 2004-01-15 Geoffrey Keating <geoffk@apple.com>
3621 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
3622 (handle_pragma_implementation): Likewise.
3624 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3627 * typeck.c (build_class_member_access_expr): Allow to access members
3628 of the currently open class.
3629 (finish_class_member_access_expr): Likewise.
3631 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
3634 * name-lookup.c (validate_nonmember_using_decl): Take scope and
3635 name by value, instead of computing them.
3636 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
3637 arguments. Pass them to validate_nonmember_using_decl.
3638 * name-lookup.h (do_local_using_decl): Adjust.
3639 (do_toplevel_using_decl): Likewise.
3640 * parser.c (cp_parser_using_declaration): Likewise.
3641 * pt.c (tsubst_expr): Likewise.
3643 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
3647 * name-lookup.c (qualified_lookup_using_namespace): Search
3648 strongly-associated namespaces first, and only then try other
3651 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
3653 * Make-lang.in (c++.srcextra): Dummy entry.
3655 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3658 * parser.c (cp_parser_template_name): Don't try to parse a
3659 conversion-function-id, as it cannot be a template-name.
3660 (cp_parser_simple_type_specifier): Check for invalid template-ids
3661 even after a built-in type.
3663 2004-01-14 Jan Hubicka <jh@suse.cz>
3666 * pt.c (instantiate_decl): Do not increase function_depth.
3668 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
3672 * parser.c (cp_parser_elaborated_type_specifier): Warn about
3673 attributes and discard.
3674 * decl.c (xref_tag): Don't overwite existing attributes with
3677 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3680 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
3681 is no destructor while looking up a BIT_NOT_EXPR.
3683 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
3685 * cxxfilt.c: Remove unused file.
3687 2004-01-14 Jan Hubicka <jh@suse.cz>
3689 Partial fix to PR c++/12850
3690 * decl2.c (mark_used): Do not proactively instantiate templates
3691 when compiling in unit-at-a-time or not optimizing.
3692 * optimize.c (maybe_clone_body): Do not increase function depth.
3694 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3697 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
3699 2004-01-12 Steven Bosscher <stevenb@suse.de>
3702 * parser.c (cp_parser_member_declaration): Any non-type is also
3703 not a class or a function.
3705 2004-01-12 Jason Merrill <jason@redhat.com>
3708 * class.c (build_base_path): Do not mark vtable references as
3710 (build_vtbl_ref_1): Likewise.
3712 2004-01-12 Richard Henderson <rth@redhat.com>
3715 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
3716 (store_init_value): Use it.
3717 * decl.c (check_initializer): Expect full initialization code
3718 from store_init_value.
3719 * init.c (expand_aggr_init_1): Likewise.
3720 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
3722 2004-01-12 Mark Mitchell <mark@codesourcery.com>
3724 * class.c (layout_class_type): For non-POD class types, also copy
3725 the DECL_SIZE and DECL_MODE of fields to the base class type.
3727 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3730 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
3731 calling regenerate_decl_from_template.
3733 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
3736 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
3737 decl-specifier occurring along with a class definition.
3739 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
3741 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
3742 clauses to comments describing declares_class_or_enum.
3743 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
3746 2004-01-12 Jan Hubicka <jh@suse.cz>
3748 * pt.c (for_each_template_parm): Do not check for duplicates.
3749 (for_each_template_parm): Use walk_tree duplicate checking code.
3751 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
3754 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
3755 is error_mark_node, don't add any more decl_specs.
3756 (cp_parser_init_declarator): After committing to a declaration, if
3757 the decl_specifiers start with error_mark_node, issue an error and
3758 change the type to "int".
3760 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
3763 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
3765 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3769 * pt.c (tsubst): Substitution must fail if we are attempting to
3770 create an array with element type that is an abstract class type.
3771 * decl.c (cp_finish_decl): Strip pointers and array types recursively
3772 before calling abstract_virtuals_error.
3774 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
3776 * name-lookup.c (qualified_lookup_using_namespace): Consider
3777 strong using directives even if we've already found a binding.
3779 2004-01-09 Mark Mitchell <mark@codesourcery.com>
3781 * cp-tree.h (cxx_expand_expr): Change prototype.
3782 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
3784 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3787 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
3788 looking into them recursively. They can be there because of the
3789 new __offsetof__ extension.
3791 2004-01-07 Zack Weinberg <zack@codesourcery.com>
3793 * parser.c (cp_parser_save_member_function_body): Mark the
3796 2004-01-05 Mark Mitchell <mark@codesourcery.com>
3799 * class.c (build_clone): Copy type attributes from the original
3800 function to the clone.
3803 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
3804 references as constant.
3807 * parser.c (cp_parser_explicit_instantiation): Improve error
3809 (cp_parser_require): Improve indication of the error location.
3812 * parser.c (cp_parser_class_head): Reorder logic to check for
3813 invalid qualification.
3815 2004-01-04 Mark Mitchell <mark@codesourcery.com>
3818 * name-lookup.c (lookup_using_namespace): Remove spacesp
3820 (unqualified_namespace_lookup): Likewise.
3821 (lookup_qualified_name): Adjust accordingly.
3822 (lookup_name_real): Likewise.
3823 (lookup_arg_dependent): Do not eliminate the namespace of the
3824 functions found by unqualified name lookup unless that is the
3827 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
3829 * semantics.c (push_deferring_access_checks): Fix format.
3830 (resume_deferring_access_checks): Likewise.
3831 (stop_deferring_access_checks): Likewise.
3832 (pop_deferring_access_checks): Likewise.
3833 (get_deferred_access_checks): Likewise.
3834 (pop_to_parent_deferring_access_checks): Likewise.
3835 (perform_deferred_access_checks): Likewise.
3836 (perform_or_defer_access_check): Likewise.
3838 2004-01-04 Richard Henderson <rth@redhat.com>
3840 * call.c (build_over_call): Don't create a save_expr of an
3841 aggregate, but rather its address.
3843 2004-01-04 Mark Mitchell <mark@codesourcery.com>
3846 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
3847 an offsetof expression.
3849 * parser.c (cp_parser_parameter_declaration): Fix comment.
3852 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
3853 (reference_binding): Set it when appropriate.
3854 (build_temp): New function, split out from ...
3855 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
3856 (initialize_reference): Likewise.
3859 * parser.c (cp_parser): Add in_type_id_in_expr_p.
3860 (cp_parser_new): Initialize it.
3861 (cp_parser_postfix_expression): Set it.
3862 (cp_parser_sizeof_operand): Likewise.
3863 (cp_parser_parameteR_declaration): Do not commit early to tenative
3864 parsers when in_type_id_in_expr_p is set.
3866 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3869 * parser.c (cp_parser_template_argument): Don't call
3870 make_unbound_class_template directly.
3871 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
3872 UNBOUND_CLASS_TEMPLATE tree node.
3874 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
3877 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
3879 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3882 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
3883 (DECL_FUNCTION_TEMPLATE_P): Use it.
3884 (DECL_CLASS_TEMPLATE_P): Likewise.
3885 * parser.c (cp_parser_lookup_name): Add is_template parameter.
3886 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
3887 (cp_parser_template_name): Likewise.
3888 (cp_parser_elaborated_type_specifier): Likewise.
3889 (cp_parser_namespace_name): Likewise.
3890 (cp_parser_class_name): Likewise.
3891 (cp_parser_lookup_name_simple): Likewise.
3893 See ChangeLog.3 for earlier changes.