1 2004-08-25 Zack Weinberg <zack@codesourcery.com>
3 * class.c, search.c: Remove references to DWARF_DEBUG.
5 2004-08-25 Adam Nemet <anemet@lnxw.com>
7 * repo.c (extract_string): Reset backquote after one character.
8 (get_base_filename): Fix indentation.
10 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
12 * cp/decl.c (cxx_init_decl_processing): Adjust
13 build_common_tree_nodes call.
15 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
18 * (is_subobject_of_p): Resurrect & optimize.
19 (lookup_field_r): Use it.
21 2004-08-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
24 * search.c (friend_accessible_p): Increment processing_template_decl
25 when deal with TEMPLATE_DECL of SCOPE.
27 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
30 * semantics.c (check_accessibility_of_qualified_id): Defer check
31 if qualifying_type is a template parameter.
33 2004-08-23 Mark Mitchell <mark@codesourcery.com>
36 * pt.c (instantiate_decl): Do not try to apply
37 DECL_DECLARED_INLINED_P to a VAR_DECL.
39 * search.c (build_baselink): Fix typo in comment.
41 2004-08-22 Andrew Pinski <apinski@apple.com>
44 2004-08-22 Andrew Pinski <apinski@apple.com>
46 * typeck.c (build_unary_op): Use &a.b if the folded lowered
47 expression is not constant.
49 2004-08-23 Nathan Sidwell <nathan@codesourcery.com>
51 * name-lookup.c (pushdecl): Rename build_type_copy call.
52 * tree.c (cp_build_qualified_type_real,
53 build_exception_variant, handle_java_interface_attribute): Likewise.
55 2004-08-22 Andrew Pinski <apinski@apple.com>
58 * typeck.c (build_unary_op): Use &a.b if the folded lowered
59 expression is not constant.
61 2004-08-20 Mark Mitchell <mark@codesourcery.com>
64 * decl.c (expand_static_init): Use DECL_FUNCTION_SCOPE_P.
66 2004-08-21 Joseph S. Myers <jsm@polyomino.org.uk>
69 * pt.c (tsubst_copy_and_build): Avoid clearing TREE_NO_WARNING for
72 2004-08-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
74 * pt.c (register_specialization): Check DECL_TEMPLATE_SPECIALIZATION
75 before calling comp_template_args.
77 2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
79 * class.c (build_vtbl_initializer): Use build_int_cst for
81 * decl.c (complete_array_type): Likewise.
82 * method.c (finish_thunk): Likewise.
84 2004-08-20 Andreas Tobler <a.tobler@schweiz.ch>
86 * tree.c: Remove unused mark_local_for_remap_r.
88 2004-08-19 Eric Christopher <echristo@redhat.com>
90 * cp-tree.h (cxx_unsave_expr_now): Delete prototype.
91 * tree.c (cxx_unsave_expr_now): Delete.
94 2004-08-19 Mark Mitchell <mark@codesourcery.com>
97 * pt.c (push_template_decl_real): Disallow template allocation
98 functions with fewer than two parameters.
100 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
102 * cp-tree.h (build_shared_int_cst): Remove.
103 * tree.c (shared_int_cache): Remove.
104 (build_shared_int_cst): Remove.
105 * class.c (finish_struct_1): Use build_int_cst.
107 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
109 * decl.c (finish_enum): Do not copy value node early, copy
111 * lex.c (cxx_init): Force null_node to be unique.
113 2004-08-19 Joseph S. Myers <jsm@polyomino.org.uk>
116 * pt.c (tsubst_copy, tsubst_copy_and_build): Copy TREE_NO_WARNING
117 from input for MODOP_EXPR.
119 2004-08-18 Mark Mitchell <mark@codesourcery.com>
121 * pt.c (dependent_template_p): Fix typo in commment.
124 * pt.c (dependent_template_p): Treat IDENTIFIER_NODEs as
127 2004-08-17 Mark Mitchell <mark@codesourcery.com>
130 * pt.c (unify): Tidy ARRAY_TYPE handling. Make sure that non-type
131 arguments have the same type as the corresponding parameter.
134 * parser.c (cp_parser_name_lookup_error): If parser->object_scope
135 is set use it for diagnostic purposes.
136 (cp_parser_pseudo_destructor_name): Remove special-case error
140 * semantics.c (expand_or_defer_fn): Honor -fkeep-inline-functions.
143 * cp-tree.h (qualified_name_lookup_error): Add parameter.
144 * name-lookup.c (do_class_using_decl): Restrict set of entities
145 passed to cp_emit_debug_info_for_using more carefully.
146 (lookup_qualified_name): Allow lookup_member to return sets of
148 * parser.c (cp_parser_lookup_name): Add ambiguous_p parameter.
149 (cp_parser_primary_expression): Handle ambiguous lookups.
150 (cp_parser_template_name): Adjust use of cp_parser_lookup_name.
151 (cp_parser_template_argument): Likewise.
152 (cp_parser_elaborate_type_specifier): Likewise.
153 (cp_parser_namespace_name): Likewise.
154 (cp_parser_class_name): Likewise.
155 (cp_parser_lookup_name_simple): Likewise.
156 * pt.c (tsubst_qualified_id): Handle ambiguous results.
157 (tsubst_expr): Likewise.
158 * semantics.c (qualified_name_lookup_error): Add decl paramter.
159 For ambiguous lookups, print candidates.
161 2004-08-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
164 * pt.c (instantiate_pending_templates): Add int parameter. Don't
166 * cp-tree.h (instantiate_pending_templates): Adjust prototype.
167 * decl2.c (finish_file): Adjust call to
168 instantiate_pending_templates.
170 2004-08-15 Roger Sayle <roger@eyesopen.com>
172 * call.c (build_vfield_ref, build_call, build_conditional_expr,
173 convert_arg_to_ellipsis, build_x_va_arg, build_over_call,
174 build_java_interface_fn_ref, build_special_member_call,
175 build_new_method_call, initialize_reference): Replace calls to
176 build with calls to buildN.
177 * class.c (build_base_path, convert_to_base_statically,
178 build_vfn_ref, instantiate_type, dfs_accumulate_vtbl_inits,
179 build_vtbl_initializer): Likewise.
180 * cp-gimplify.c (genericize_try_block, genericize_catch_block,
181 gimplify_if_stmt, cp_genericize_r): Likewise.
182 * cvt.c (convert_to_void): Likewise.
183 * decl.c (check_initializer, finish_constructor_body,
184 finish_destructor_body): Likewise.
185 * error.c (dump_expr): Likewise.
186 * except.c (build_exc_ptr, expand_start_catch_block, build_throw):
188 * init.c (perform_member_init, expand_virtual_init,
189 expand_cleanup_for_base, build_init, expand_default_init,
190 build_offset_ref, decl_constant_value, build_new, build_new_1,
191 build_vec_delete_1, build_vec_init, build_delete,
192 push_base_cleanups, build_vec_delete): Likewise.
193 * mangle.c (write_integer_cst): Likewise.
194 * method.c (thunk_adjust, do_build_copy_constructor,
195 do_build_assign_ref): Likewise.
196 * pt.c (lookup_template_function, tsubst, tsubst_copy_and_build,
197 unify, build_non_dependent_expr): Likewise.
198 * rtti.c (build_headof, build_typeid, ifnonnull,
199 build_dyanmic_cast_1, tinfo_base_init): Likewise.
200 * semantics.c (begin_compound_stmt, finish_call_expr,
201 finish_pseudo_destructor_expr, finish_id_expression,
202 simplify_aggr_init_expr, finalize_nrv_r): Likewise.
203 * tree.c (build_target_expr, build_cplus_new, array_type_nelts_top,
204 array_type_nelts_total, stabilize_call): Likewise.
205 * typeck.c (decay_conversion, build_class_member_access_expr,
206 lookup_destructor, build_ptrmemfunc_access_expr, build_array_ref,
207 get_member_function_from_ptrfunc, build_binary_op, pointer_diff,
208 build_x_unary_op, build_unary_op, unary_complex_lvalue,
209 build_compound_expr, build_modify_expr, expand_ptrmemfunc_cst,
210 check_return_expr): Likewise.
211 * typeck2.c (split_nonconstant_1, split_nonconstant_init_1,
212 split_nonconstant_init, store_init_value, build_m_component_ref):
215 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
217 * call.c (convert_class_to_reference,
218 build_user_type_conversion_1, convert_like_real,
219 build_java_interface_fn_ref, build_special_member_call): Use
221 * class.c (build_vtbl_initializer): Likewise.
222 * cp-gimplify.c (cp_gimplify_expr): Likewise.
223 * cvt.c (cp_convert_to_pointer): Likewise.
224 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
225 * decl2.c (start_static_initialization_or_destruction,
226 generate_ctor_or_dtor_function): Likewise.
227 * except.c (build_throw): Likewise.
228 * lex.c (cxx_init): Likewise.
229 * mangle.c (write_integer_cst): Likewise.
230 * rtti.c (build_headof, get_tinfo_decl_dynamic,
231 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
232 get_pseudo_ti_init): Likewise.
233 * search.c (get_dynamic_cast_base_type): Likewise.
234 * tree.c (build_shared_int_cst): Likewise.
236 2004-08-12 Mark Mitchell <mark@codesourcery.com>
239 * class.c (count_depth_data): New type.
240 (dfs_depth_post): New function.
241 (dfs_depth_q): Likewise.
242 (find_final_overrider_data_s): Change type of vpath.
244 (dfs_find_final_overrider_1): New function.
245 (dfs_find_final_overrider): Use it.
246 (dfs_find_final_overrider_q): Adjust use of vpath.
247 (dfs_find_final_overrider_post): Likewise.
248 (find_final_overrider): Use dfs_depth. Allocate and deallocate
251 2004-08-12 Jan Beulich <jbeulich@novell.com>
253 * parser.c (cp_parser_asm_definition): Properly consume scope operator
254 tokens preceding the clobbers. Don't check for scope operator
255 following inputs. Simplify inputs handling to match that now used for
258 2004-08-11 Mark Mitchell <mark@codesourcery.com>
261 * except.c (build_throw): Allocate cleanup_type and the function
262 for __cxa_throw separately.
265 * call.c (standard_conversion): Do not accept conversions between
266 pointers to members if the class types are unrelated.
269 * parser.c (cp_parser_builtin_offsetof): Cast to "const volatile
270 char &" instead of just "char &".
273 * pt.c (tsubst): Just return the unknown_type_node.
275 2004-08-11 Mark Mitchell <mark@codesourcery.com>
278 * parser.c (cp_parser_class_specifier): Robustify.
281 * pt.c (tsubst_copy_and_build): Complain about invalid
285 * pt.c (tsubst_default_argument): Clear out current_class_ptr and
286 current_class_ref while tsubsting.
288 2004-08-10 Mark Mitchell <mark@codesourcery.com>
291 * parser.c (cp_parser_init_declarator): Robustify.
293 2004-08-06 Richard Sandiford <rsandifo@redhat.com>
295 * typeck2.c (process_init_constructor): Guard the missing field warning
296 with warn_missing_field_initializers rather than extra_warnings.
298 2004-08-06 Paolo Bonzini <bonzini@gnu.org>
300 * class.c (instantiate_type) <ENTRY_VALUE_EXPR>: Do not handle.
302 2004-08-05 Mark Mitchell <mark@codesourcery.com>
304 * decl.c (start_preparsed_function): Move determine_visibility
306 * decl2.c (determine_visibility): Incorporate dllexport testing.
308 2004-08-05 Geoffrey Keating <geoffk@apple.com>
310 * g++spec.c (lang_specific_driver): An -Xlinker or -Wl, option
311 means that libstdc++ is needed.
313 2004-08-05 Nathan Sidwell <nathan@codesourcery.com>
315 * cvt.c (cp_convert_to_pointer): Adjust force_fit_type call.
317 2004-08-04 Geoffrey Keating <geoffk@apple.com>
319 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_ASSEMBLER_NAME rather
320 than passing it as a parameter to rest_of_decl_compilation.
321 * decl2.c (grokfield): Use set_user_assembler_name.
323 2004-08-04 Nathan Sidwell <nathan@codesourcery.com>
325 * decl.c (complete_array_type): Don't gratuitously copy
326 maxindex. Its type is always set.
328 2004-08-04 Paul Brook <paul@codesourcery.com>
330 * Make-lang.in (cp/semantics.o, cp/optimize.o): Depend on TARGET_H.
331 * cp-tree.h (struct language_function): Rename x_dtor_label to
333 (dtor_label): Rename ...
334 (cdtor_label): ... to this.
335 * decl.c (begin_constructor_body): Remove.
336 (check_special_function_return_type): Maybe change the return type.
337 (grokdeclarator): Pass the class type.
338 (start_preparsed_function): Constructors may need a return label.
339 (finish_constructor_body, finish_destructor_body): Set the return
341 (begin_function_body): Don't call begin_constructor_body.
342 (finish_function): Don't warn for constructors or destructors.
343 (implicitly_declare_fn): Maybe change the return type.
344 * optimize.c: Include target.h.
345 (maybe_clone_body): Remap the function result.
346 * semantics.c: Include target.h.
347 (finish_return_stmt): Maybe jump to return label for constructors.
349 2004-08-03 Mark Mitchell <mark@codesourcery.com>
351 * class.c (build_vtable): Do not set DECL_VISIBILITY here.
352 (check_field_decls): Or here.
353 (check_methods): Or here.
354 (initialize_array): Don't mess with DECL_CONTEXT.
355 * cp-tree.h (start_decl): Adjust prototype.
356 (determine_visibility): New function.
357 * decl.c (duplicate_decls): Remove checks for hidden "operator
359 (build_library_fn_1): Give all library functions default
361 (start_decl): Add pop_scope_p parameter. Tidy.
362 (cp_finish_decl): Do not pop scopes here. Call
363 determine_visibility for variable definitions.
364 (start_preparsed_function): Call determine_visibility.
365 * decl2.c (determine_visibility): New function.
366 * method.c (use_thunk): Fix formatting.
367 * parser.c (cp_parser_condition): Adjust calls to start_decl.
368 (cp_parser_init_declarator): Likewise.
369 * pt.c (instantiate_decl): Always call pop_nested_class.
370 * rtti.c (get_tinfo_decl): Do not set DECL_VISIBILITY.
371 (tinfo_base_init): Likewise.
373 2004-08-02 Mark Mitchell <mark@codesourcery.com>
376 * name-lookup.c (validate_nonmember_using_decl): Robustify.
378 2004-08-01 Mark Mitchell <mark@codesourcery.com>
381 * name-lookup.c (decl_namespace): Remove.
382 (current_decl_namespace): Use decl_namespace_context instead of
384 (push_decl_namespace): Likewise.
385 (arg_assoc_class): Likewise.
386 (arg_assoc_type): Likewise.
387 * pt.c (check_specialization_namespace): New function.
388 (maybe_process_partial_specialization): Use it.
389 (register_specialization): Likewise.
392 * cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): New macro.
393 * call.c (null_ptr_cst_p): Handle variables with constant
395 * pt.c (convert_nontype_argument): Use
396 DECL_INTEGRAL_CONSTANT_VAR_P.
397 * semantics.c (finish_id_expression): Likewise.
400 * decl.c (duplicate_decls): Reject duplicate namespace
404 * typeck.c (build_ptrmemfunc): Loosen assertion.
406 2004-08-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
408 * call.c (z_candidate::template_decl): Rename from template.
409 (add_template_candidate_real): Adjust member reference.
412 2004-07-29 Mark Mitchell <mark@codesourcery.com>
414 * cp-tree.h (IDENTIFIER_REPO_CHOSEN): Define.
415 (lang_decl_flags): Narrow the width of "languages". Add
417 (DECL_NEEDED_P): Remove.
418 (FOR_EACH_CLONE): New macro.
419 (DECL_REPO_AVAILABLE_P): Likewise.
420 (DECL_TINFO_P): Likewise.
421 (set_linkage_according_to_type): Declare.
422 (import_export_vtable): Remove.
423 (import_export_tinfo): Likewise.
424 (mark_needed): New function.
425 (decl_needed_p): Likewise.
426 (note_vauge_linkage_fn): Likewise.
427 (init_repo): Change prototype.
428 (repo_template_used): Remove.
429 (repo_template_instantiated): Likewise.
430 (repo_emit_p): New function.
431 (repo_export_class_p): Likewise.
432 (no_linkage_check): Change prototype.
433 * class.c (set_linkage_according_to_type): New function.
434 (build_vtable): Use it. Do not call import_export_vtable. Set
435 DECL_IGNORED_P if appropriate.
436 * decl.c (duplicate_decls): Preserve DECL_REPO_AVAILABLE_P.
437 (make_rtL_for_nonlocal_decls): Check for template instantiations
439 (grokfndecl): Adjust call to no_linkage_check.
440 (set_linkage_for_static_data_member): New function.
441 (grokvardecl): Use it. Adjust call to no_linkage_check.
442 (grokdeclarator): Use set_linkage_for_static_data_member.
443 * decl2.c (note_vague_linkage_fn): New function.
444 (note_vague_linkage_var): Likewise.
445 (finish_static_data_member_decl): Use it.
446 (import_export_vtable): Remove.
447 (import_export_class): Use repo_export_class_p.
448 (var_finalized_p): Simplify.
449 (maybe_emit_vtables): Simplify.
450 (mark_needed): New function.
451 (decl_needed_p): Likewise.
452 (import_export_decl): Add documentation and consistency checks.
453 Use repo_emit_p. Handle virtual tables and RTTI information
455 (import_export_tinfo): Remove.
456 (write_out_vars): Call import_export_decl.
457 (cxx_callgraph_analyze_expr): Ensure that all vtables are emitted
459 (finish_file): Use decl_needed_p. Do not call import_export_decl
460 for undefined static data members. Do not warn about undefined
461 inlines when using a repository.
462 (mark_used): Use note_vague_linkage_fn. Always defer template
464 * lex.c (cxx_init): Adjust call to init_repo. Always set
466 * method.c (synthesize_method): Remove unncessary
467 import_export_decl call.
468 (implicitly_declare_fn): Use set_linkage_according_to_type.
469 * optimize.c (maybe_clone_body): Use FOR_EACH_CLONE.
470 * pt.c (instantiate_class_template): Don't redundantly add classes
471 to keyed_classes. Don't call repo_template_used.
472 (tsubst_decl): Set DECL_INTERFACE_KNOWN for instantiations of
473 templates with internal linkage.
474 (check_instantiated_args): Adjust call to no_linkage_check.
475 (instantiate_template): Use FOR_EACH_CLONE.
476 (mark_definable): New function.
477 (mark_decl_instantiated): Use it.
478 (do_decl_instantiation): Adjust tests for explicit instantiation
479 after "extern template".
480 (instantiate_class_member): Do not use repo_template_instantiated.
481 (do_type_instantiation): Simplify.
482 (instantiate_decl): Use mark_definable. Check repo_emit_p.
484 * repo.c (repo_get_id): Remove.
485 (original_repo): Remove.
486 (IDENTIFIER_REPO_USED): Remove.
487 (IDENTIFIER_REPO_CHOSEN): Remove.
488 Remove all #if 0'd code.
489 (repo_template_used): Remove.
490 (repo_template_instantiated): Remove.
491 (temporary_obstack_initialized_p): New variable.
492 (init_repo): Register with lang_post_pch_load. Avoid creating
493 identifiers unnecessarily. Don't use original_repo. Close the
495 (reopen_repo_file_for_write): Not here.
496 (finish_repo): Always write out a new repository file.
497 (repo_emit_p): New function.
498 (repo_export_class_p): Likewise.
499 * rtti.c (get_tinfo_decl): Use set_linkage_according_to_type.
500 (involves_incomplete_p): New function.
501 (tinfo_base_init): Use it.
502 (ptr_initializer): Remove non_public_ptr parameter.
503 (ptm_initializer): Likewise.
504 (get_pseudo_ti_init): Likewise.
505 (unemitted_tinfo_decl_p): Remove.
506 (emit_tinfo_decl): Use import_export_decl.
507 * semantics.c (expand_body): Move updates of static_ctors and
509 (expand_or_defer_fn): ... here.
510 * tree.c (no_linkage_check): Add relaxed_p parameter.
512 2004-07-28 Eric Christopher <echristo@redhat.com>
514 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
516 2004-07-28 Nathan Sidwell <nathan@codesourcery.com>
518 * cp-tree.h (struct tree_pair_s): New.
519 (typedef tree_pair_p): New.
520 (DEF_VEC_O(tree_pair_s)): New.
521 (struct lang_type_class): Make vcall_indices a VEC(tree_pair_s).
522 (CLASSTYPE_VCALL_INDICES): Update documentation.
523 * class.c (get_vcall_index): Adjust.
524 (add_vcall_offset): Adjust.
526 2004-07-27 Kelley Cook <kcook@gcc.gnu.org>
528 * pt.c, typeck.c: Remove spurious carriage returns.
530 2004-07-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
533 * pt.c (coerce_template_template_parms) <PARM_DECL case>: Only check
534 when the type of ARG is not dependent.
536 2004-07-26 Geoffrey Keating <geoffk@apple.com>
538 * g++spec.c (LIBSTDCXX_PROFILE): Default to LIBSTDCXX.
539 (lang_specific_driver): If the C++ or math library options don't
540 start with '-l', don't count them as added libraries.
542 2004-07-26 Nathan Sidwell <nathan@codesourcery.com>
544 * decl.c (xref_basetypes): Adjust base access vector creation.
545 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Adjust base
547 * search.c (dynamic_cast_base_recurse, dfs_access_in_type): Likewise.
549 2004-07-26 Niall Douglas <s_fsfeurope2@nedprod.com>
550 Brian Ryner <bryner@brianryner.com>
554 * class.c (check_field_decls): Apply hidden visibility if
555 -fvisibility-inlines-hidden and inlined unless otherwise specified
556 (build_vtable): Set vtable visibility to class visibility.
557 (check_field_decls): Default static member visibility to class
559 (check_methods): Default method visibility to class visibility.
560 * cp-tree.h: Added CLASSTYPE_VISIBILITY and
561 CLASSTYPE_VISIBILITY_SPECIFIED macro.
562 * decl.c (duplicate_decls): New logic for merging definition decls
563 with declaration decls. Added ignore & warning when non default
564 applied to global operator new or delete.
565 * method.c, optimize.c, rtti.c: Added setting of VISIBILITY_SPECIFIED
566 wherever VISIBILITY was changed
567 * rtti.c (get_tinfo_decl): Set typeinfo visibility to class
569 (tinfo_base_init): Set typeinfo name visibility to class visibility.
571 2004-07-25 Bernardo Innocenti <bernie@develer.com>
573 * decl.c: Rename all identifiers named `class' to `cl'.
574 * cp-tree.h: Likewise.
576 2004-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
578 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Use GGC_CNEW.
579 * typeck2.c (abstract_virtuals_error): Use GGC_NEW.
580 * name-lookup.c (binding_entry_make): Use GGC_NEW.
581 (binding_table_construct): Use GGC_CNEWVEC.
582 (binding_table_new): Use GGC_NEW.
583 (cxx_binding_make): Likewise.
584 (begin_scope): Likewise.
585 (push_to_top_level): Use GCC_CNEW.
586 * parser.c (cp_token_cache_new): Likewise.
587 (cp_token_cache_push_token): Likewise.
588 (cp_lexer_new_main): Likewise.
589 (cp_lexer_new_from_tokens): Likewise.
590 (cp_parser_context_new): Likewise.
591 (cp_parser_new): Likewise.
592 (cp_lexer_new_from_tokens): Use GGC_NEWVEC.
593 * lex.c (cxx_make_type): Use GGC_CNEW.
594 (retrofit_lang_decl): Use GGC_NEWVAR.
595 (cxx_dup_lang_specific_decl): Likewise.
596 (copy_lang_type): Likewise.
597 * decl.c (use_label): Use GGC_NEW instead of ggc_alloc.
598 (save_function_data): Likewise.
599 (lookup_label): Use GGC_CNEW instead of ggc_alloc_cleared.
600 (cxx_push_function_context): Likewise.
602 2004-07-25 Richard Henderson <rth@redhat.com>
604 * decl.c (start_preparsed_function): Set DECL_ARTIFICIAL and
605 DECL_IGNORED_P on RESULT_DECL.
606 * semantics.c (finalize_nrv): Copy them too.
608 2004-07-23 Nathan Sidwell <nathan@codesourcery.com>
610 * search.c (lookup_conversion_operator): Avoid two loops.
611 (add_conversions): Remove.
612 (check_hidden_convs, split_conversions,
613 lookup_conversions_r): New.
614 (lookup_conversions): Use lookup_conversions_r.
616 2004-07-22 Nathan Sidwell <nathan@codesourcery.com>
618 * pt.c (get_template_base): Check type is completable.
620 2004-07-21 Eric Christopher <echristo@redhat.com>
622 * decl.c (poplevel): Inline unused variable checking.
625 2004-07-21 Paolo Bonzini <bonzini@gnu.org>
627 * typeck.c (build_binary_op): Do not use RDIV_EXPR for
630 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
633 * pt.c (check_explicit_specialization): Remove extension to accept
634 specializations without template headers. Fall-through to normal
637 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
640 * pt.c (determine_specialization): New parameter template_count.
641 Disambiguate between member templates and member functions counting
642 the template headers.
643 (check_explicit_specialization): Update caller.
644 (tsubst_friend_function): Likewise.
646 2004-07-20 Steven Bosscher <stevenb@suse.de>
648 * cp-tree.def (TINST_LEVEL): Make it an 'x' node.
649 * cp-tree.h (tinst_level_t): New tree type.
650 (union lang_tree_node): Handle it.
651 (TINST_LOCATION): New accessor macro.
652 (make_tinst_level): New prototype.
653 * cp-lang.c (cp_tree_size): Handle TINST_LEVEL.
654 * decl.c (cp_tree_node_structure): Likewise.
655 * error.c (print_instantiation_full_context): Use TINST_LOCATION.
656 (print_instantiation_partial_context): Likewise.
657 * pt.c (pop_tinst_level): Likewise.
658 (push_tinst_level): Use make_tinst_level.
659 * tree.c (make_tinst_level): New function.
660 (cp_walk_subtrees): Walk TINST_DECL for a TINST_LEVEL node.
662 2004-07-20 Mark Mitchell <mark@codesourcery.com>
664 * parser.c (cp_parser_simple_type_specifier): Fix typo.
667 * parser.c (cp_parser_simple_type_specifier): Do not record usage
668 of globally-qualified names.
670 2004-07-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
673 * error.c (dump_type) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Output
676 2004-07-19 Mark Mitchell <mark@codesourcery.com>
679 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
680 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
681 * class.c (add_implicitly_declared_members): Use
682 CLASSTYPE_LAZY_ASSIGNMENT_OP.
683 * method.c (lazily_declare_fn): Clear
684 CLASSTYPE_LAZY_ASSIGNMENT_OP.
685 * search.c (lookup_fnfields_1): Check it.
687 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
689 * cp-tree.h (vec_binfo_member): Remove.
690 * tree.c (vec_binfo_member): Remove.
692 * cp-tree.h (struct lang_type_class): Remove vfields field.
693 (CLASSTYPE_VFIELDS): Remove.
694 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
695 * class.c (determine_primary_base): Remove CLASSTYPE_VFIELDS
697 (dfs_modify_vtables): Use TYPE_CONTAINS_VPTR_P.
698 (finish_struct_1): Remove CLASSTYPE_VFIELDS handling.
699 * init.c (dfs_initialize_vtbl_ptrs): Use TYPE_CONTAINS_VPTR_P.
701 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
703 * cp-tree.h (DEF_VEC_P(tree)): Remove here.
704 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
706 (BINFO_LANG_SLOTS): Remove.
707 * tree.c (copy_binfo): Adjust BINFO creation and accessors.
708 * decl.c (xref_basetypes): Adjust BINFO creation and accessors.
709 * class.c (check_bases): Adjust BINFO accessors.
710 (determine_primary_base, finish_struct_bits,
711 maybe_warn_about_overly_private_class, warn_hidden,
712 walk_subobject_offsets, propagate_binfo_offsets, end_of_class,
713 warn_about_ambiguous_bases, get_vfield_name,
714 dump_class_hierarchy_r, build_vtt_inits, accumulate_vtbl_inits,
715 add_vcall_offset_vtbl_entries_r): Likewise.
716 * dump.c (cp_dump_tree): Likewise.
717 * init.c (sort_mem_initializers, expand_member_init, build_delete,
718 push_base_cleanups): Likewise.
719 * method.c (do_build_copy_constructor, do_build_assign_ref,
720 synthesize_exception_spec): Likewise.
721 name-lookup.c (arg_assoc_class): Likewise.
722 * pt.c (instantiate_class_template,
723 get_template_base_recursive): Likewise.
724 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Likewise.
725 * typeck2.c (process_init_constructor): Likewise.
726 * search.c (lookup_base_r, dynamic_cast_base_recurse,
727 dfs_access_in_type, dfs_walk_real, look_for_overrides,
728 types_overlap_p, copied_binfo, original_binfo): Likewise.
729 (binfo_for_vtable): Remove
731 2004-07-20 Steven Bosscher <stevenb@suse.de>
733 * cp-tree.h (struct lang_decl_flags): Unify the template_info and
734 thunk_alias, and the access and virtual_offset fields.
735 (THUNK_VIRTUAL_OFFSET, THUNK_ALIAS): Adjust.
736 * decl.c (finish_case_label): Update c_add_case_node call.
738 2004-07-19 Mark Mitchell <mark@codesourcery.com>
740 Revert patch for PR c++/16623.
742 2004-07-19 Kelley Cook <kcook@gcc.gnu.org>
744 * except.c: Remove two spurious carriage returns.
746 2004-07-19 Mark Mitchell <mark@codesourcery.com>
749 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
750 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
751 * class.c (add_implicitly_declared_members): Use
752 CLASSTYPE_LAZY_ASSIGNMENT_OP.
753 * method.c (lazily_declare_fn): Clear
754 CLASSTYPE_LAZY_ASSIGNMENT_OP.
755 * search.c (lookup_fnfields_1): Check it.
757 2004-07-19 Nathan Sidwell <nathan@codesourcery.com>
759 * class.c (add_method): Delay adding the slot until the end.
760 (determine_primary_base): Adjust VEC_iterate invokation.
761 (resort_type_method_vec, finish_struct_methods, warn_hidden,
762 walk_subobject_offsets, end_of_class, warn_about_ambiguous_bases,
763 build_vtbl_initializer): Likewise.
764 * init.c (sort_mem_initializers, build_delete, push_base_cleanups,
765 build_vbase_delete): Likewise.
766 * method.c (do_build_copy_constructor): Likewise.
767 * name-lookup.c (new_class_binding, print_binding_level,
768 poplevel_class, store_class_bindings, push_to_top_level,
769 pop_from_top_level): Likewise.
770 * pt.c (check_explicit_specialization): Likewise.
771 * search.c (lookup_conversion_operator, lookup_fnfields_1,
772 get_pure_virtuals, add_conversions, dfs_check_overlap,
773 binfo_for_vbase): Likewise.
775 2004-07-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
778 * pt.c (unify) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Use only
779 innermost set of template arguments during deduction. Simplify.
781 2004-07-19 Joseph S. Myers <jsm@polyomino.org.uk>
783 * typeck.c (build_modify_expr, build_x_modify_expr): Set
784 TREE_NO_WARNING on assignments with an operator other than '='.
786 2004-07-10 Steven Bosscher <stevenb@suse.de>
787 Joseph S. Myers <jsm@polyomino.org.uk>
789 * cp-tree.h (C_SET_EXP_ORIGINAL_CODE): Remove.
790 * decl2.c (grokfield): Don't check current_class_depth via
791 unused TREE_COMPLEXITY.
792 * semantics.c (finish_parenthesized_expr): Set TREE_NO_WARNING
793 to avoid the missing parentheses warning.
794 Don't set C_SET_EXP_ORIGINAL_CODE.
796 2004-07-18 Mark Mitchell <mark@codesourcery.com>
798 * tree.c (no_linkage_helper): Remove.
799 (no_linkage_check): Don't use walk_tree_without_duplicates.
801 * mangle.c (write_expression): Issue a sorry for zero-operand
804 2004-07-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
807 * init.c (build_offset_ref): Build SCOPE_REF with non-null
808 TREE_TYPE for non-dependent names.
809 * typeck.c (build_x_unary_op): Handle non-dependent SCOPE_REF.
810 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
811 unknown_type_node as its TREE_TYPE.
812 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
813 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
814 (dump_expr) <SCOPE_REF case>: Likewise.
816 2004-07-17 Jason Merrill <jason@redhat.com>
819 * call.c (type_passed_as): Make the invisible reference type
821 * cp-gimplify.c (gimplify_cleanup_stmt): Rename to
822 cp_genericize_r. Handle invisible reference lowering.
823 (is_invisiref_parm): New fn.
824 (cp_genericize): Adjust the types of invisible reference parms.
825 Don't repeat the walk for clones.
826 * decl.c (store_parm_decls): Don't generate any code for clones.
828 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
830 * cp-tree.h (builtin_function): Declare.
832 2004-07-16 Mark Mitchell <mark@codesourcery.com>
834 * class.c (finish_struct_methods): Remove unncessary code.
835 (add_implicitly_declared_members): Create declarations for default
836 constructors and copy constructors lazily.
837 * cp-tree.h (lang_type_class): Remove lazy_default_ctor and
839 (CLASSTYPE_LAZY_DEFAULT_CTOR): New macro.
840 (CLASSTYPE_LAZY_COPY_CTOR): Likewise.
841 * decl2.c (check_classfn): Robustify.
842 (locate_dtor): Handle empty CLASSTYPE_METHOD_VEC.
843 (locate_ctor): Handle lazy default constructors.
844 (locate_copy): Handle lazy copy constructors.
845 (implicitly_declare_fn): Make sure we're looking at the
846 TYPE_MAIN_VARIANT for a class before creating functions. Don't
847 set TYPE_HAS_CONSTRUCTOR.
848 (lazily_declare_fn): New function.
849 * name-lookup.c (constructor_name_full): Simplify.
850 * search.c (lookup_fnfields_1): Lazily create methods, as
852 (lookup_for_overrides): Handle empty CLASSTYPE_METHOD_VEC.
854 2004-07-16 Steven Bosscher <stevenb@suse.de>
856 * cp-tree.h (struct lang_type): Don't have three GTY options on a
859 2004-07-16 Richard Henderson <rth@redhat.com>
861 * cp-lang.c (LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING): Die.
862 * cp-tree.h (cp_copy_res_decl_for_inlining): Remove.
863 * tree.c (cp_copy_res_decl_for_inlining): Remove.
865 2004-07-16 Nathan Sidwell <nathan@codesourcery.com>
867 * class.c (finish_struct_bits): Use for loop.
868 (propagate_binfo_offsets): Do primary binfo outside of loop.
871 * dump.c (cp_dump_tree): Don't dump the bases if there's no
874 * pt.c (tsubst) <TREE_BINFO case>: We should never get here.
876 2004-07-15 Mark Mitchell <mark@codesourcery.com>
878 * cp-tree.h (lang_type_class): Remove has_real_assign_ref and
879 has_abstract_assign_ref. Make methods a VEC(tree) *.
880 (TYPE_HAS_CONST_ASSIGN_REF): Add documentation.
881 (CLASSTYPE_CONSTRUCTORS): Adjust for changes to CLASSTYPE_METHOD_VEC.
882 (CLASSTYPE_DESTRUCTORS): Likewise.
883 (TYPE_HAS_REAL_ASSIGN_REF): Remove.
884 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
885 (add_method): Change prototoype.
886 * class.c (add_method): Remove error_p parameter. Adjust for
887 changes to CLASSTYPE_METHOD_VEC.
888 (handle_using_decl): Adjust call to add_method.
889 (maybe_warn_about_overly_private_class): Adjust for
890 changes to CLASSTYPE_METHOD_VEC.
891 (resort_type_method_vec): Likewise.
892 (finish_struct_methods): Likewise.
893 (check_for_override): Likewise.
894 (warn_hidden): Likewise.
895 (add_implicitly_declared_members): Defer creation of assignment
896 operators. Adjust call to add_method.
897 (clone_function_decl): Adjust call to add_method.
898 (check_bases_and_members): Don't set TYPE_HAS_REAL_ASSIGN_REF.
899 (finish_struct_1): Use CLASSTYPE_DESTRUCTORS.
900 * decl.c (grok_special_member_properties): Don't set
901 TYPE_HAS_ABSTRACT_ASSIGN_REF.
902 * decl2.c (check_classfn): Adjust for
903 changes to CLASSTYPE_METHOD_VEC.
904 * method.c (locate_dtor): Use CLASSTYPE_DESTRUCTORS.
905 (locate_ctor): Use CLASSTYPE_CONSTRUCTORS.
906 (locate_copy): Adjust for changes to CLASSTYPE_METHOD_VEC.
907 (implicitly_declare_fn): Set DECL_SOURCE_LOCATION. Do not call
909 * pt.c (check_explicit_specialization): Adjust for
910 changes to CLASSTYPE_METHOD_VEC.
911 (instantiate_class_template): Do not set
912 TYPE_HAS_ABSTRACT_ASSIGN_REF.
913 * ptree.c (cxx_print_type): Don't try to print
914 CLASSTYPE_METHOD_VEC.
915 * rtti.c (emit_support_tinfos): Use CLASSTYPE_DESTRUCTORS.
916 * search.c (lookup_field_r): Adjust for
917 changes to CLASSTYPE_METHOD_VEC.
918 (lookup_fnfields): Likewise.
919 (lookup_conversion_operator): Likewise.
920 (lookup_fnfields_1): Likewise. Create assignment operators
922 (look_for_overrides_here): Adjust for
923 changes to CLASSTYPE_METHOD_VEC.
924 (add_conversions): Likewise.
925 * semantics.c (finish_member_declaration): Adjust call to add_method.
927 2004-07-15 Jason Merrill <jason@redhat.com>
929 * cp-lang.c (cxx_types_compatible_p): To the middle-end,
930 references and pointers are compatible.
932 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
934 * decl.c (xref_basetypes): Refactor.
935 * tree.c (copy_base_binfos): Replace with ...
936 (copy_binfo): ... this. Deep copy the given binfo, (not the just
937 bases of the given base).
938 * cp-tree.h (copy_base_binfo): Remove.
939 (copy_binfo): Declare.
941 2004-07-15 Mark Mitchell <mark@codesourcery.com>
943 * name-lookup.c (set_inherited_value_binding_p): Add class_type
945 (get_class_binding): Adjust.
946 (push_class_level_binding): Don't use set_inherited_value_binding_p.
948 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
950 * class.c (finish_struct_bits): Don't set TYPE_HAS_CONVERSION here.
951 * decl.c (xref_basetypes): Set it here.
953 * class.c (check_bases): Don't set CLASSTYPE_NON_AGGREGATE here.
954 Don't check for incomplete base.
955 (get_vfield_name): Simplify while loop.
956 * decl.c (xref_basetypes): Set CLASSTYPE_NON_AGGREGATE here.
958 2004-07-14 Mark Mitchell <mark@codesourcery.com>
960 * lex.c (cxx_make_type): Remove call to get_pointer_type.
962 * cp-tree.h (IDENTIFIER_VALUE): Remove.
963 (BINFO_PUSHDECLS_MARKED): Likewise.
964 (maybe_inject_for_scope_var): Likewise.
965 (push_class_decls): Likewise.
966 * name-lookup.h (push_class_binding): Remove.
967 (innermost_non_namespace_value): New function.
968 (outer_binding): Likewise.
969 * class.c (add_method): Push bindings before adding to
971 (restore_class_cache): Do not restore class_shadowed.
972 (pushclass): Do not add USING_DECLs. Do not call
974 * config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c.
975 * decl.c (pushdecl): Use outer_binding.
976 (poplevel): Set the scope for an out-of-scope for-loop declaration
978 (cp_finish_decl): Don't call maybe_inject_for_scope_var.
979 * name-lookup.c (new_class_binding): New function.
980 (push_binding): Use it.
981 (pushdecl): Use innermost_non_namespace_value.
982 (maybe_inject_for_scope_var): Remove.
983 (push_class_binding): Remove.
984 (set_inherited_value_binding_p): New function.
985 (get_class_binding): New function.
986 (push_class_level_binding): Assert that the current_class_type is
988 (outer_binding): New function.
989 (innermost_non_namespace_value): Likewise.
990 (lookup_name_real): Use outer_binding.
991 (lookup_name_current_level): Ignore out-of-scope variables.
992 * pt.c (check_template_shadow): Use innermost_non_namespace_value.
993 (lookup_template_class): Likewise.
994 * search.c (dfs_push_type_decls): Remove.
995 (dfs_push_decls): Likewise.
996 (setup_class_bindings): Likewise.
997 (lookup_field_1): Handle USING_DECLs from dependent scopes.
998 (marked_pushdecls_p): Remove.
999 (unmarked_pushdecls_p): Remove.
1000 (marked_identifiers): Remove.
1001 (setup_class_bindings): Remove.
1002 (dfs_push_type_decls): Remove.
1003 (dfs_push_decls): Remove.
1004 (push_class_decls): Remove.
1006 2004-07-13 Mark Mitchell <mark@codesourcery.com>
1010 * decl.c (grokvardecl): Make declspecs parameter const.
1011 (grokdeclarator): Likewise. Adjust accordingly.
1012 * decl.h (grokdeclarator): Adjust declaration.
1013 * parser.c (cp_parser_init_declarator): Do not clear
1014 decl_specifiers->attributes.
1016 * cp-tree.h (lang_identifier): Remove class_value.
1017 (IDENTIFIER_CLASS_VALUE): Remove.
1018 (pop_class_decls): Likewise.
1019 (init_search_processing): Likewise.
1020 * class.c (handle_using_decl): Use lookup_member, not
1021 IDENTIFIER_CLASS_VALUE.
1022 (restore_class_cache): New function, split out from ...
1023 (pushclass): ... here. Do not call clear_identifier_class_values.
1024 (invalidate_class_lookup_cache): Do not clear
1025 IDENTIFIER_CLASS_VALUE.
1026 (popclass): Do not call pop_class_decls.
1027 (maybe_note_name_used_in_class): Do not save names looked up after
1028 the class is complete. Use lookup_member, not
1029 IDENTIFIER_CLASS_VALUE.
1030 * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
1031 * decl.c (cxx_init_decl_processing): Do not call
1032 init_search_processing.
1033 * method.c (do_build_copy_constructor): Remove unnecessary code.
1034 (do_build_assign_ref): Likewise.
1035 * name-lookup.c (pushdecl): Use lookup_member, not
1036 IDENTIFIER_CLASS_VALUE.
1037 (set_identifier_type_value_with_scope): Set TREE_TYPE on the
1039 (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
1040 (push_class_binding): Do not set it.
1041 (clear_identifier_class_values): Remove.
1042 (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
1043 (store_binding): Do not save it.
1044 (pop_from_top_level): Do not restore it.
1045 * name-lookup.h (cxx_saved_binding): Remove class_value.
1046 (clear_identifier_class_values): Remove.
1047 * ptree.c (cxx_print_identifier): Do not print
1048 IDENTIFIER_CLASS_VALUE.
1049 * search.c (search_obstack): Remove.
1050 (push_stack_level): Remove.
1051 (pop_stack_level): Remove.
1052 (search_level): Remove.
1053 (search_stack): Remove.
1054 (lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
1055 (setup_class_bindings): Use IDENTIFIER_MARKED, not
1056 IDENTIFIER_CLASS_VALUE.
1057 (marked_identifiers): New variable.
1058 (push_class_decls): Clear IDENTIFIER_MARKED.
1059 (pop_class_decls): Don't call pop_search_level.
1060 (init_search_processing): Remove.
1062 2004-07-12 Mark Mitchell <mark@codesourcery.com>
1064 * cp-tree.h (get_aggr_typedef): Remove.
1065 * init.c (get_aggr_typedef): Likewise.
1067 * name-lookup.c (push_class_level_binding): Simplify.
1069 2004-07-12 Andrew Pinski <apinski@apple.com>
1073 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
1075 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
1078 2004-07-12 Eric Christopher <echristo@redhat.com>
1080 * parser.c (cp_parser_class_head): Remove unused variable.
1082 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1084 * decl.c (grok_op_properties): Reject [de-]allocation functions
1085 declared in a namespace, or declared as static.
1087 2004-07-12 Nathan Sidwell <nathan@codesourcery.com>
1089 * cp-tree.h (make_binfo): Remove.
1090 * decl.c (xref_basetypes): Use make_tree_binfo directly.
1091 * tree.h (copy_base_binfos): Likewise.
1092 (make_binfo): Remove.
1094 * call.c (build_user_type_conversion_1, build_new_op,
1095 check_constructor_callable, build_temp,
1096 perform_direct_initialization_of_possible): Pass type directly to
1097 lookup_fnfields & build_special_member_call.
1098 (build_special_member_call): Accept a type, and complete it.
1099 * class.c (finish_stuct_bits): Copy the BINFOs here.
1100 * cvt.c (ocp_convert): Pass type directly to
1101 build_special_member_call.
1102 * decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
1103 (xref_basetypes): Allocate the binfo here. Adjust.
1104 * init.c (build_init, build_new_1): Pass type directly to
1105 build_special_member_call.
1106 * lex.c (cxx_make_type): Do not allocate binfo here.
1107 * name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
1108 * parser.c (cp_parser_class_head): Always call xref_basetypes.
1109 * pt.c (instantiate_class_template): Likewise. Inhibit access
1110 checking for template friends.
1111 * ptree.c (cxx_print_type): Adjust record printing.
1112 * search.c (lookup_base): When taking a type, complete it before
1113 looking for a binfo.
1114 (lookup_member): Delay completing a type.
1115 (push_class_decls): Don't walk an incomplete type.
1116 (lookup_conversions): Likewise.
1117 * semantics.c (finish_stmt_expr_expr): Pass type directly to
1118 build_special_member_call.
1119 * tree.c (copy_base_binfos): Adjust.
1120 (make_binfo): Likewise.
1121 * typeck.c (build_modify_expr): Pass type directly to
1122 build_special_member_call.
1123 * typeck2.c (process_init_constructor): Check a binfo exists.
1124 (build_m_component_ref): Allow accessing an incomplete type.
1125 (build_functional_cast): Pass type directly to
1126 build_special_member_call.
1128 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1131 * config-lang.in (gtfiles): Add typeck2.c.
1132 * Make-lang.in: Tweak typeck2.c dependencies, and add rule for
1134 * cp-tree.h: Declare complete_type_check_abstract.
1135 * typeck2.c (pat_calc_hash, pat_compare,
1136 complete_type_check_abstract): New functions.
1137 (abstract_virtuals_error): If the type is abstract, register the
1138 declaration within abstract_pending_vars for further checks.
1139 Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
1140 * decl.c (cp_finish_decl): Do not strip array types.
1141 (create_array_type_for_decl): Check for abstractness of the element
1143 (complete_vars): Call complete_type_check_abstract.
1144 * class.c (finish_struct): Prepare a list of virtual functions for
1145 template types, and call complete_vars on it to check for abstractness.
1147 2004-07-12 Paolo Bonzini <bonzini@gnu.org>
1149 PR tree-optimization/14107
1150 * decl.c (finish_function): Remove temporary band-aid.
1152 2004-07-11 Mark Mitchell <mark@codesourcery.com>
1154 * call.c (build_operator_new_call): Avoid using push_to_top_level.
1155 (build_new_op): Adjust call to lookup_function_nonclass.
1156 * name-lookup.c (identifier_type_value): Adjust call to
1158 (lookup_name_real): Add block_p parameter.
1159 (lookup_name_nonclass): Adjust call to lookup_name_real.
1160 (lookup_function_nonclass): Likewise.
1161 (lookup_name): Likewise.
1162 * name-lookup.h (lookup_name_real): Change prototype.
1163 (lookup_name_nonclass): Likewise.
1164 * parser.c (cp_parser_lookup_name): Likewise.
1166 * cp-tree.h (saved_scope): Make old_bindings a vector.
1167 (unuse_fields): Remove.
1168 * name-lookup.h (cxx_saved_binding): Define it.
1169 * class.c (pushclass): Don't use unuse_fields.
1170 * name-lookup.c (cxx_saved_binding_make): Remove.
1171 (store_binding): Add new bindings to a vector, using an
1172 accumulator style, rather than adding them to a list.
1173 (store_bindings): Adjust accordingly.
1174 (store_class_bindings): Likewise.
1175 (push_to_top_level): Likewise.
1176 (pop_from_top_level): Likewise.
1177 * optimize.c (maybe_clone_body): Must push_to_top_level and
1178 pop_from_top_level calls outside of loop.
1179 * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope
1180 calls here from cp_parser_late_parsing_default_args.
1181 (cp_parser_save_default_args): Record the class type in which the
1182 function is declared.
1183 (cp_parser_late_parsing_default_args): Do not call
1184 push_nested_class/pop_nested_class.
1185 * search.c (dfs_unuse_fields): Remove.
1186 (unuse_fields): Remove.
1188 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
1190 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
1191 LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
1192 * cp-tree.h (poplevel): Declare.
1193 (set_block): Remove.
1194 * decl.c (set_block): Remove.
1196 2004-07-10 Mike Stump <mrs@apple.com>
1198 * decl2.c (import_export_class): Never export/import vtables
1199 with inline key functions.
1201 2004-07-09 Steven Bosscher <stevenb@suse.de>
1203 * typeck.c (c_expand_asm_operands): Remove.
1205 2004-07-09 Mike Stump <mrs@apple.com>
1207 * typeck.c (build_class_member_access_expr): Skip null deref
1208 warning when we don't dereference it.
1210 2004-07-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1214 * class.c (check_field_decls): Improve -Weffc++ warning: do not
1215 warn for pointers to functions/members, or for classes without
1218 2004-07-08 Mark Mitchell <mark@codesourcery.com>
1220 * name-lookup.h (struct cp_binding_level): Update documentation
1223 2004-07-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1226 * typeck.c (check_return_expr): Improve -Weffc++ warning: handle
1227 returning CALL_EXPR, and non-reference return type.
1229 2004-07-08 Nathan Sidwell <nathan@codesourcery.com>
1231 * name-lookup.c (push_binding): Use VEC_reserve.
1233 2004-07-08 Richard Henderson <rth@redhat.com>
1235 * cp-tree.h (expand_eh_spec_block): Remove.
1237 2004-07-07 Mark Mitchell <mark@codesourcery.com>
1239 * cp-tree.h (saved_scope): Remove x_previous_class_type and
1240 x_previous_class_values; add x_previous_class_level.
1241 (previous_class_type): Remove.
1242 (previous_class_values): Remove.
1243 (previous_class_level): New macro.
1244 * class.c (pushclass): Restore the identifier cache more
1246 (invalidate_class_lookup_cache): Use vector for class_shadowed and
1247 previous_class_values.
1248 * decl.c (poplevel): Likewise.
1249 * name-lookup.c (cxx_binding_init): New function.
1250 (cxx_binding_make): Use it.
1251 (push_binding): For a binding in a class level, use a vector of
1252 cp_class_binding nodes.
1253 (push_binding_level): New function.
1254 (begin_scope): Use it.
1255 (leave_scope): Do not put class binding levels on the free list.
1256 (print_binding_level): Adjust for the fact that class_shadowed is
1258 (poplevel_class): Likewise.
1259 (clear_identifier_class_values): Likewise.
1260 (push_class_level_binding): Likewise.
1261 (set_class_shadows): Remove.
1262 (store_binding): New function.
1263 (store_class_bindings): New function.
1264 (push_to_top_level): Use store_class_bindings as appropriate.
1265 (pop_from_top_level): Use previous_class_level, not
1266 previous_class_type.
1267 * name-lookup.h (cp_class_binding): New type.
1268 (cp_binding_level): Use a vector object for class_shadowed.
1269 (push_binding_level): Declare.
1270 (set_class_shadows): Remove.
1272 2004-07-07 Andrew Pinski <apinski@apple.com>
1274 * class.c (instantiate_type): BUFFER_REF is dead.
1275 * lex.c (init_operators): IN_EXPR is dead.
1277 2004-07-07 Jason Merrill <jason@redhat.com>
1280 * call.c (build_new_op): Give overload warnings for built-in
1283 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
1286 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
1289 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
1291 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
1292 * class.c (build_primary_vtable, check_bases,
1293 determine_primary_base, finish_struct_bits,
1294 maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
1295 get_basefndecls, warn_hidden, walk_subobject_offsets,
1296 build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
1297 layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
1298 finish_struct_1, get_vfield_name, contains_empty_class_p,
1299 dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
1300 dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
1301 add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
1303 * decl.c (xref_basetypes): Likewise.
1304 * dump.c (cp_dump_tree): Likewise.
1305 * error.c (dump_expr): Likewise.
1306 * init.c (sort_mem_initializers, expand_member_init,
1307 push_base_cleanups): Likewise.
1308 * method.c (do_build_copy_constructor, do_build_assign_reg,
1309 synthesize_exception_spec): Likewise.
1310 * name-lookup.c (arg_assoc_class): Likewise.
1311 * pt.c (instantiate_class_template, tsubst,
1312 get_template_base_recursive): Likewise.
1313 * ptree.c (cxx_print_type): Likewise.
1314 * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
1315 * search.c (lookup_base_r, dynamic_cast_base_recurse,
1316 dfs_access_in_type, access_in_type, lookup_field_queue_p,
1317 bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
1318 marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
1319 dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
1320 binfo_for_vtable, copied_binfo, original_binfo): Likewise
1321 * tree.c (copy_base_binfos, make_binfo): Likewise.
1322 * typeck.c (commmon_base_type): Likewise
1323 * typeck2.c (process_init_constructor): Likewise
1325 2004-07-06 Joseph S. Myers <jsm@polyomino.org.uk>
1327 * decl.c (check_tag_decl): Name redeclared type in diagnostic.
1329 2004-07-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1332 * pt.c (convert_nontype_argument): Disallow conversions between
1333 different enumeration types.
1335 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
1337 * cp-tree.h (BINFO_MARKED): Remove.
1338 (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
1339 BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
1340 BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
1341 (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
1342 * class.c (build_base_path): Use BINFO_VIRTUAL_P.
1343 (mark_primary_bases, determine_primary_base, base_derived_from,
1344 dfs_find_final_overrider, dfs_find_final_overrider_q,
1345 dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
1346 dfs_modify_vtables, walk_subobject_offsets,
1347 layout_nonempty_base_or_field, build_base_field,
1348 build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
1349 end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
1350 finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
1351 build_ctor_vtbl_group, accumulate_vtble_inits,
1352 dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
1353 build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
1354 add_vcall_offset_vtbl_entries_1): Likewise.
1355 * decl.c (xref_basetypes): Incomming virtual base indicated by
1357 * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
1358 * init.c (finish_init_stmts, sort_mem_initializers,
1359 emit_mem_initializers, build_vtble_address, expand_member_init,
1360 push_base_cleanups): Likewise.
1361 * method.c (do_build_copy_constructor): Likewise.
1362 * pt.c (instantiate_class_template,
1363 get_template_base_recursive): Likewise.
1364 * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
1365 get_pseudo_ti_desc): Likewise.
1366 * search.c (lookup_base_r, dynamic_cast_base_recurse,
1367 binfo_from_vbase, binfo_via_virtual, copied_binfo,
1368 original_binfo): Likewise.
1369 * semantics.c (finish_base_specifier): Virtualness is indicated
1371 * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
1373 2004-07-06 Mark Mitchell <mark@codesourcery.com>
1376 2004-06-24 Jason Merrill <jason@redhat.com>
1378 * decl.c (grokparms): Give the PARM_DECL reference type if the
1379 parameter is passed by invisible reference.
1381 2004-07-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1383 * cp-lang.c (cp_var_mod_type_p): Add extra arg.
1384 * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
1385 * pt.c (check_instantiated_args, unify): Likewise.
1387 2004-07-05 Phil Edwards <phil@codesourcery.com>
1389 * Make-lang.in (check-c++, lang_checks): Add some comments.
1391 2004-07-05 Zack Weinberg <zack@codesourcery.com>
1393 * cp-mudflap.c: Delete file.
1394 * Makefile.in: Remove all references to cp-mudflap.o.
1396 2004-07-05 Zack Weinberg <zack@codesourcery.com>
1398 * decl.c (cxx_init_decl_processing): Call
1399 build_common_tree_nodes before creating the global NAMESPACE_DECL.
1401 2004-07-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1404 * call.c (build_operator_new_call): Look only at global scope.
1406 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
1408 * call.c (enforce_access): Expect TREE_BINFO.
1409 * class.c (binfo_ctor_vtable): Check TREE_BINFO.
1410 * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
1411 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
1413 (BINFO_LANG_ELTS): Remove.
1414 (BINFO_LANG_SLOTS): New.
1415 (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
1416 (CLASSTYPE_TEMPLATE_INFO): Adjust.
1417 * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
1418 * search.c (lookup_member): Check TREE_BINFO.
1419 * semantics.c (perform_or_defer_access_check): Likewise.
1420 (check_accessibility_of_qualified_id): Check
1421 deferred_access_no_check.
1422 * tree.c (make_binfo): Use make_tree_binfo.
1424 2004-07-04 Mark Mitchell <mark@codesourcery.com>
1426 * method.c (implicitly_declare_fn): Set linkage of generated
1429 2004-07-04 Richard Henderson <rth@redhat.com>
1431 * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
1433 2004-07-03 Scott Brumbaugh <scottb.lists@verizon.net>
1436 * name-lookup.c (push_class_level_binding): Don't pass a
1437 TREE_LIST of ambiguous names to check_template_shadow as it
1438 only handles declarations. Instead, pull the declaration
1441 2004-07-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1444 * pt.c (check_explicit_specialization): Clarify error message.
1446 2004-07-02 Richard Henderson <rth@redhat.com>
1448 * tree.c (cp_unsave_r): Update remap_save_expr call.
1450 2004-07-02 Mark Mitchell <mark@codesourcery.com>
1453 * mangle.c (write_template_arg): Correct mangling.
1456 * decl.c (grokdeclarator): Robustify.
1458 2004-07-01 Richard Henderson <rth@redhat.com>
1460 * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
1461 * method.c (synthesize_method): Don't clear_last_expr.
1462 * name-lookup.c (maybe_push_cleanup_level): Likewise.
1464 2004-07-01 Nick Clifton <nickc@redhat.com>
1466 * decl2.c (import_export_class): Invoke the
1467 import_export_class field in the gcc_target structure if it is not
1470 2004-06-30 Richard Henderson (rth@redhat.com>
1472 * decl.c (start_preparsed_function): Don't set immediate_size_expand.
1473 * method.c (use_thunk): Likewise.
1475 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
1477 * call.c (build_over_call), typeck.c (build_function_call): Call
1478 check_function_arguments instead of check_function_format.
1480 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
1482 * call.c (build_over_call), typeck.c (build_function_call): Update
1483 calls to check_function_format.
1485 2004-06-30 Richard Henderson <rth@redhat.com>
1487 * call.c (build_over_call): Use __builtin_memcpy for copying
1488 CLASS_AS_BASE rather than funny casting.
1490 2004-06-30 Richard Henderson <rth@redhat.com>
1492 * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
1493 TYPE_SIZE_UNIT of full_type.
1495 2004-06-30 Per Bothner <per@bothner.com>
1497 Conditionally compile support for --enable-mapped_location.
1498 * decl.c (pop_label): Handle (imperfectly) USE_MAPPED_LOCATION case.
1499 * decl2.c: If USE_MAPPED_LOCATION, don't do some line number
1500 adjustments - which I don't understand.
1501 * error.c (dump_decl): Rename "<interrnal>" to "<built-in>".
1502 * error.c: Use LOCATION_FILE and EXPR_LOCATION macros.
1503 (print_instantiation_partial_context): Use expand_location.
1504 * decl.c (duplicate_decl): Use new DECL_IS_BUILTIN macro.
1505 * name-lookup.c: Likewise.
1506 * lex.c (cxx_init): Likewise. Also use BUILTINS_LOCATION.
1507 * name-lookup.c: Use input_line macro.
1508 * parser.c (cp_lexer_get_preprocessor_token): Use UNKNOWN_LOCATION.
1509 (cp_parser_statement): Rename locaal variable statement_locus to
1510 statement_location and use SET_EXPR_LOCATION macro.
1511 * pt.c: Handle USE_MAPPED_LOCATION case. Use new macros.
1512 * tree.c (cp_walk_subtrees): Likewise.
1514 2004-06-29 Per Bothner <per@bothner.com>
1516 * tree.c (build_min_nt, build_min, build_min_non_dep):
1517 Don't set TREE_COMPLEXITY from input_line.
1519 2004-06-29 Paul Brook <paul@codesourcery.com>
1521 * init.c: Include target.h.
1522 (get_cookie_size): Remove and replace with target hook.
1524 (build_new_1): Store the element size in the cookie.
1526 2004-06-29 Nathan Sidwell <nathan@codesourcery.com>
1529 * parser.c (cp_parser_template_declaration_after_export): Disable
1530 access checks here ...
1531 (cp_parser_class_specifier): ... not here.
1533 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1535 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
1536 VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
1537 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
1540 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1542 * cp-tree.h (struct deferred_access): Move to ...
1543 * semantics.c (struct deferred_access): ... here. Adjust.
1544 (deferred_access_stack): Make a VEC(deferred_access),
1545 (deferred_access_free_list): Remove.
1546 (deferred_access_no_check): New.
1547 (push_deferring_access_checks, resume_deferring_access_checks,
1548 stop_deferring_access_checks, pop_deferring_access_checks,
1549 get_deferred_access_checks, pop_to_parent_deferring_access_checks,
1550 perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
1552 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1555 * call.c (build_temp): Declare.
1556 (check_constructor_callable): New.
1557 (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
1558 CONSTRUCTOR_CALLABLE.
1559 (convert_like_real, initialize_reference): Use
1560 check_constructor_callable.
1561 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
1562 (LOOKUP_*): Renumber.
1564 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1566 * friend.c (add_friend): Only perform access checks when context
1568 * lex.c (cxx_make_type): Only create a binfo for aggregate types.
1569 * parser.c (cp_parser_class_specifier): Disable access checks here
1570 when parsing the body of a templated class.
1571 * semantics.c (perform_or_defer_access_checks): Reorder to allow
1572 NULL binfos when not checking access.
1574 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1576 Use vector API for vbase list.
1577 * cp-tree.h: Include vec.h
1578 (DEF_VEC_P (tree)): New type.
1579 (struct lang_type_class): Change vbase's member type.
1580 (binfo_for_vbase): Declare.
1581 * class.c (determine_primary_base, base_derived_from,
1582 update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
1583 warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
1584 build_vtbl_initializer): Adjust.
1585 * decl.c (xref_basetypes): Adjust, accumulate upper bound of
1587 * init.c (sort_mem_initializers, expand_member_init,
1588 push_base_cleanups): Adjust.
1589 * method.c (do_build_copy_constructor): Adjust.
1590 * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
1591 (binfo_for_vbase): New.
1592 * tree.c (copy_base_binfos): Adjust.
1594 2004-06-28 Mark Mitchell <mark@codesourcery.com>
1596 * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
1598 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
1601 * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
1602 paranthesis in case of pointers to array members.
1603 * error.c (dump_type_prefix): Likewise.
1604 (dump_type_suffix): Maybe issue a whitespace when printing
1607 2004-06-27 Mark Mitchell <mark@codesourcery.com>
1610 * parser.c (cp_parser_set_decl_spec_type): Refine test for
1611 redefinition of built-in types.
1613 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
1615 * error.c (pp_template_argument_list_start): Remove.
1616 (pp_template_argument_list_end): Likewise.
1617 (pp_separate_with_comma): Use pp_cxx_separate_with.
1618 (reinit_global_formatting_buffer): Remove.
1619 (pp_non_consecutive_character): Likewise.
1620 (dump_scope): Use pp_cxx_colon_colon.
1621 (dump_template_parameter): Use pp_cxx_identifier,
1622 pp_cxx_tree_identifier and pp_cxx_whitespace.
1623 (dump_templat_bindings): Replace use of pp_string with sequence
1624 of pp_cxx_whitespace and pp_equal.
1625 (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
1626 pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set
1628 (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
1629 (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace,
1630 pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
1631 (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
1632 pp_cxx_right_bracket, pp_cxx_identifier throughout,
1633 (dump_decl): Likewise.
1634 (dump_template_decl): Likewise.
1635 (dump_function_decl): Likewise. Set padding as appropriate.
1636 (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
1638 (dump_exception_spec): Likewise.
1639 (dump_function_name): Use pp_cxx_tree_identifier and
1641 (dump_template_parms): Use pp_cxx_begin_template_argument_list and
1642 pp_cxx_end_template_argument_list.
1643 (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
1644 pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
1645 pp_cxx_whitespace throughout.
1646 (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
1648 (dump_unary_op): Likewise.
1649 (reinit_cxx_pp): New function.
1650 (type_as_string); Use it.
1651 (expr_as_string): Likewise.
1652 (decl_as_string); Likewise.
1653 (context_as_string): Likewise.
1654 (lang_decl_name): Likewise.
1655 (decl_to_string): Likewise.
1656 (expr_to_string): Likewise.
1657 (parm_to_string): Likewise.
1658 (type_to_string): Likewise.
1659 (args_to_string): Likewise.
1660 (cv_to_string): Likewise.
1662 2004-06-26 Mark Mitchell <mark@codesourcery.com>
1664 * cp-tree.h (cp_cv_quals): New type.
1665 (cp_declarator): Use it instead of "tree" as appropriate.
1666 (grok_method_quals): Adjust prototype.
1667 (grokclassfn): Likewise.
1668 (do_friend): Likewise.
1669 * decl.c (grokfndecl): Use cp_cv_quals, not tree.
1670 (grokdeclarator): Likewise.
1671 * decl2.c (grok_method_quals): Likewise.
1672 (grokclassfn): Likewise.
1673 * friend.c (do_friend): Likewise.
1674 * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
1675 * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
1676 (make_pointer_declarator): Likewise.
1677 (make_reference_declarator): Likewise.
1678 (make_ptrmem_declarator): Likewise.
1679 (cp_parser_ptr_operator): Likewise.
1680 (cp_parser_cv_qualifier_seq_opt): Likewise.
1681 (cp_parser_cv_qualifier_opt): Remove.
1682 (cp_parser_new_declarator_opt): Adjust call to
1683 cp_parser_ptr_operator.
1684 (cp_parser_conversion_declaration_opt): Likewise.
1685 (cp_parser_declarator): Use cp_cv_quals, not tree.
1686 (cp_parser_direct_declarator): Likewise.
1688 2004-06-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1690 * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
1691 Rename DECL_STMT to DECL_EXPR.
1692 * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
1693 * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
1694 * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
1696 2004-06-26 Jan Hubicka <jh@suse.cz>
1699 * decl2.c (maybe_emit_vtables): Always import_export_vtable for the
1700 reachability analysis.
1702 2004-06-25 Mark Mitchell <mark@codesourcery.com>
1704 * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
1707 2004-06-25 Paul Brook <paul@codesourcery.com>
1709 * decl2.c (get_guard): Call targetm.cxx.guard_type.
1710 (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
1712 2004-06-24 Mark Mitchell <mark@codesourcery.com>
1714 * decl.c (grokdeclarator): Restore error messages about __thread.
1715 * parser.c (cp_parser_decl_specifier_seq): Likewise.
1717 2004-06-24 Jason Merrill <jason@redhat.com>
1720 * decl.c (grokparms): Give the PARM_DECL reference type if the
1721 parameter is passed by invisible reference.
1723 2004-06-24 Andreas Schwab <schwab@suse.de>
1725 * cp-tree.h (enum cp_storage_class): Remove trailing comma.
1727 2004-06-23 Mark Mitchell <mark@codesourcery.com>
1729 * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
1730 (cp/decl.o): Likewise.
1731 (cp/decl2.o): Likewise.
1732 (cp/pt.o): Likewise.
1733 (cp/semantics.o): Likewise.
1734 * config-lang.in (gtfiles): Do not reference cp/lex.h.
1735 * class.c: Do not include lex.h.
1736 (add_implicitly_declared_members): Do not use
1737 adding_implicit_members.
1738 (check_bases_and_members): Do not talk about grok_x_components.
1739 * cp/cp-tree.h (adding_implicit_members): Remove.
1740 (cp_storage_class): New type.
1741 (cp_decl_spec): Likewise.
1742 (cp_decl_specifier_seq): Likewise.
1743 (cp_parameter_declarator): Use it for the decl_specifiers field.
1744 (check_tag_decl): Adjust prototype.
1745 (shadow_tag): Likewise.
1746 (groktypename): Likewise.
1747 (start_decl): Likewise.
1748 (start_function): Likewise.
1749 (start_method): Likewise.
1750 (grok_x_components): Remove.
1751 (grokfield): Adjust prototype.
1752 (grokbitfield): Likewise.
1753 (finish_member_class_template): Remove.
1754 * decl.c: Do not include lex.h.
1755 (adding_implicit_members): Do not define.
1756 (check_tag_decl): Do not use trees to represent decl-specifiers.
1757 (shadow_tag): Likewise.
1758 (groktypename): Likewise.
1759 (start_decl): Likewise.
1760 (grokvardecl): Likewise.
1761 (grokdeclarator): Likewise.
1762 (grokparms): Likewise.
1763 (start_function): Likewise.
1764 (start_method): Likewise.
1765 * decl.h (grokdeclarator): Adjust prototype.
1766 * decl2.c: Do not include lex.h.
1767 (grok_x_components): Remove.
1768 (grokfield): Do not use trees to represent decl-specifiers.
1769 (grokbitfield): Likewise.
1770 * lex.c: Do not include lex.h.
1772 * parser.c: Include target.h.
1773 (clear_decl_specs): New function.
1774 (cp_parser_translation_unit): Do not use trees to represent
1776 (cp_parser_postfix_expression): Likewise.
1777 (cp_parser_new_type_id): Likewise.
1778 (cp_parser_condition): Likewise.
1779 (cp_parser_simple_declaration): Likewise.
1780 (cp_parser_decl_specifier_seq): Likewise.
1781 (cp_parser_function_specifier_opt): Likewise.
1782 (cp_parser_conversion_type_id): Likewise.
1783 (cp_parser_template_parameter): Likewise.
1784 (cp_parser_explicit_instantiation): Likewise.
1785 (cp_parser_type_specifier): Likewise.
1786 (cp_parser_simple_type_specifier): Likewise.
1787 (cp_parser_init_declarator): Likewise.
1788 (cp_parser_type_id): Likewise.
1789 (cp_parser_type_specifier_seq): Likewise.
1790 (cp_parser_parameter_declaration): Likewise.
1791 (cp_parser_member_declaration): Likewise.
1792 (cp_parser_exception_declaration): Likewise.
1793 (cp_parser_function_definition_from_specifiers_and_declarator):
1795 (cp_parser_single_declaration): Likewise.
1796 (cp_parser_save_member_function_body): Likewise.
1797 (cp_parser_friend_p): Likewise.
1798 (cp_parser_set_storage_class): New function.
1799 (cp_parser_set_decl_spec_type): Likewise.
1800 * pt.c: Do not include lex.h.
1801 * semantics.c: Likewise.
1802 (finish_member_class_template): Remove.
1804 2004-06-23 Roger Sayle <roger@eyesopen.com>
1806 * call.c (build_cxx_call): Don't call expand_tree_builtin. No
1807 longer take both "args" and "convert_args" as arguments.
1808 (build_op_delete_call): Update call to build_cxx_call.
1809 (build_over_call): Likewise, update call to build_cxx_call.
1810 * cp-tree.h (build_cxx_call): Update funtion prototype.
1811 * typeck.c (build_function_call): Don't call expand_tree_builtin.
1812 * rtti.c (throw_bad_cast): Update call to build_cxx_call.
1813 (throw_bad_typeid): Likewise.
1814 (build_dynamic_cast_1): Likewise.
1816 2004-06-22 Richard Henderson <rth@redhat.com>
1818 * class.c (build_vfn_ref): Take a pointer not object. Build
1820 (cp_fold_obj_type_ref): New.
1821 * call.c (build_over_call): Update build_vfn_ref call.
1822 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
1823 * cp-tree.h (cp_fold_obj_type_ref): Declare.
1825 2004-06-21 Jason Merrill <jason@redhat.com>
1828 * cp-gimplify.c (cp_gimplify_init_expr): Look through
1831 2004-06-21 Mark Mitchell <mark@codesourcery.com>
1833 * cp-tree.def (NEW_EXPR): Add a fourth slot.
1834 * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
1835 (TREE_PARMLIST): Likewise.
1836 (CALL_DECLARATOR_PARMS): Likewise.
1837 (CALL_DECLARATOR_QUALS): Likewise.
1838 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
1839 (cp_declarator_kind): New type.
1840 (cp_parameter_declarator): Likewise.
1841 (cp_declarator): Likewise.
1842 (cp_error_declarator): Likewise.
1843 (no_parameters): Likewise.
1844 (groktypename): Change prototype.
1845 (start_decl): Likewise.
1846 (start_handler_parms): Likewise.
1847 (get_scope_of_declarator): Likewise.
1848 (start_function): Likewise.
1849 (start_preparsed_function): New function.
1850 (start_function): Change prototype.
1851 (start_method): Likewise.
1852 (grokfield): Likewise.
1853 (grokbitfield): Likewise.
1854 (build_new): Likewise.
1855 (make_pointer_declarator): Remove.
1856 (make_reference_declarator): Likewise.
1857 (make_call_declarator): Likewise.
1858 (set_quals_and_spec): Likewise.
1859 (process_template_parm): Change prototype.
1860 (begin_function_definition): Remove.
1861 (finish_parmlist): Remove.
1862 * decl.c (groktypename): Do not use trees to represent
1864 (start_decl): Likewise.
1865 (start_handler_parms): Remove.
1866 (get_scope_of_declarator): Reimplement.
1867 (grokdeclarator): Do not use trees to represent declarators.
1868 (grokparms): Likewise.
1869 (start_function): Likewise.
1870 (start_method): Likewise.
1871 (build_void_list_mode): Do not use TREE_PARMLIST.
1872 * decl.h (grokdeclarator): Change prototype.
1873 * decl2.c (grok_method_quals): Robustify.
1874 (grok_x_components): Do not use trees to represent declarators.
1875 (grokfield): Likewise.
1876 (grokbitfield): Likewise.
1877 (start_objects): Build FUNCTION_DECLs, not declarators.
1878 (start_static_storage_duration_function): Likewise.
1879 * init.c (build_new): Simplify.
1880 * lex.c (make_pointer_declarator): Remove.
1881 (make_reference_declarator): Likewise.
1882 (make_call_declarator): Likewise.
1883 (set_quals_and_spec): Likewise.
1884 * method.c (use_thunk): Use start_preparsed_function.
1885 (synthesize_method): Likewise.
1886 (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
1887 * optimize.c (maybe_clone_body): Use start_preparsed_function.
1888 * parser.c (cp_error_declarator): New variable.
1889 (declarator_obstack): Likewise.
1890 (alloc_declarator): New function.
1891 (make_declarator): Likewise.
1892 (make_id_declarator): Likewise.
1893 (make_pointer_declarator): Likewise.
1894 (make_reference_declarator): Likewise.
1895 (make_ptrmem_declarator): Likewise.
1896 (make_call_declarator): Likewise.
1897 (make_array_declarator): Likewise.
1898 (no_parameters): New variable.
1899 (make_parameter_declarator): Likewise.
1900 (cp_parser_check_for_definition_in_return_type): Do not use trees
1901 to represent declarators.
1902 (cp_parser_translation_unit): Likewise.
1903 (cp_parser_new_expression): Likewise.
1904 (cp_parser_new_type_id): Likewise.
1905 (cp_parser_new_declarator_opt): Likewise.
1906 (cp_parser_direct_new_declarator): Likewise.
1907 (cp_parser_condition): Likewise.
1908 (cp_parser_declaration_statement): Likewise.
1909 (cp_parser_declaration): Likewise.
1910 (cp_parser_conversion_type_id): Likewise.
1911 (cp_parser_conversion_declarator_opt): Likewise.
1912 (cp_parser_template_parameter_list): Likewise.
1913 (cp_parser_template_parameter): Likewise.
1914 (cp_parser_explicit_instantiation): Likewise.
1915 (cp_parser_init_declarator): Likewise.
1916 (cp_parser_declarator): Likewise.
1917 (cp_parser_direct_declarator): Likewise.
1918 (cp_parser_type_id): Likewise.
1919 (cp_parser_parameter_declaration_clause): Likewise.
1920 (cp_parser_parameter_declaration_list): Likewise.
1921 (cp_parser_parameter_declaration): Likewise.
1922 (cp_parser_member_declaration): Likewise.
1923 (cp_parser_exception_declaration): Likewise.
1924 (cp_parser_check_declarator_template_parameters): Likewise.
1925 (cp_parser_function_definition_from_specifiers_and_declarator):
1927 (cp_parser_save_member_function_body): Likewise.
1928 * pt.c (process_template_parm): Add is_non_type parameter.
1929 (convert_template_argument): Adjust call to groktypename.
1930 (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
1931 (tsubst): Do not expect declarators.
1932 (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
1934 (instantiate_decl): Use start_preparsed_function.
1935 * semantics.c (begin_function_definition): Remove.
1936 (finish_parmlist): Remove.
1937 * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
1940 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1942 * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
1943 (build_new_method_call): Likewise.
1944 * decl.c (local_variable_p_walkfn): Don't walk into types.
1945 * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
1946 (build_anon_union_vars): Add new operand for COMPONENT_REF.
1947 * init.c (buld_new): Add new operand for ARRAY_REF.
1948 * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
1949 (do_build_assign_ref): Likewise.
1950 * parser.c (cp_parser_direct_new_declarator): Add new operands
1952 (cp_parser_direct_declarator): Likewise.
1953 * pt.c (tsubst): Likewise.
1954 (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
1956 * semantics.c (finish_non_static_data_member): Add new operand
1958 * typeck.c (build_class_member_access_expr): Likewise.
1959 (build_class_member_access_expr, finish_class_member_access_expr):
1961 (build_ptrmemfunc_access_expr): Likewise.
1962 (build_array_ref): Add new operands for ARRAY_REF.
1963 * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
1964 * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
1966 2004-06-21 Richard Henderson <rth@redhat.com>
1968 * dump.c (cp_dump_tree): Don't use dump_next_stmt.
1969 * parser.c (cp_parser_jump_statement): Update commentary.
1970 * pt.c (tsubst_expr): Use RETURN_EXPR.
1971 * semantics.c (finish_return_stmt): Likewise.
1972 (finalize_nrv_r): Likewise.
1973 * typeck.c, typeck2.c: Update file start commentary.
1975 2004-06-21 Richard Henderson <rth@redhat.com>
1977 * semantics.c (finish_expr_stmt): Call verify_sequence_points.
1979 2004-06-20 Richard Henderson <rth@redhat.com>
1981 * cp-tree.h (add_decl_stmt): Declare.
1982 * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
1983 * semantics.c (maybe_cleanup_point_expr): New.
1984 (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
1985 finish_for_expr, finish_switch_cond): Use it.
1986 (finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN.
1988 2004-06-20 Richard Henderson <rth@redhat.com>
1990 * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
1991 * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
1992 (cp_gimplify_expr): Call it.
1993 (gimplify_cleanup_stmt): Move from c-gimplify.c.
1994 (cp_genericize): New.
1995 * decl.c (finish_function): Call it.
1996 * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
1997 (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
1998 (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
1999 (cp_genericize): Declare.
2000 * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
2001 * dump.c (cp_dump_tree): Likewise.
2002 * semantics.c (push_cleanup): Move from c-semantics.c.
2004 2004-06-20 Zack Weinberg <zack@codesourcery.com>
2006 * cp-lang.c (has_c_linkage): Implement.
2008 * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
2009 * decl.c (duplicate_decls): Use COPY_DECL_RTL.
2010 (builtin_function_1): Don't call make_decl_rtl.
2011 (build_cp_library_fn): Don't call set_mangled_name_for_decl.
2012 (grokvardecl): Don't call mangle_decl.
2013 * except.c (nothrow_libfn_p): Look at DECL_NAME, not
2014 DECL_ASSEMBLER_NAME.
2015 * method.c (set_mangled_name_for_decl): Delete.
2016 * name-lookup.c (pushdecl): When a local extern shadows a
2017 file-scope declaration of the same object, give both DECLs the
2019 * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
2020 on DECL_ASSEMBLER_NAME.
2022 2004-06-19 Richard Henderson <rth@redhat.com>
2024 * cp-gimplify.c: Remove unnecessary prototypes.
2025 (cp_gimplify_stmt): Merge into ...
2026 (cp_gimplify_expr): ... here. Move to end of file. Handle
2027 stmts_are_full_exprs_p frobbing.
2028 * cp-tree.h (cp_gimplify_stmt): Remove.
2029 * pt.c (tsubst_expr): Merge prep_stmt and unify.
2030 * tree.c (init_tree): Don't set lang_gimplify_stmt.
2032 2004-06-18 Richard Henderson <rth@redhat.com>
2035 * semantics.c (begin_cond): New.
2036 (finish_cond): Rewrite to handle template DECL_STMTs specially.
2037 Assume that non-template decls go land before the conditional.
2038 (simplify_loop_decl_cond): Likewise.
2039 (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
2040 finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
2041 begin_switch_stmt, finish_switch_cond): Update to match.
2043 2004-06-17 Jason Merrill <jason@redhat.com>
2046 * semantics.c (simplify_aggr_init_expr): Don't return the slot.
2047 (finish_stmt_expr_expr): Update type after conversions.
2048 (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
2049 Handle void initializer.
2050 * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
2052 2004-06-17 Geoffrey Keating <geoffk@apple.com>
2054 * class.c (build_clone): Don't call defer_fn, let mark_used do it.
2055 * cp-tree.h (defer_fn): Delete.
2056 * decl2.c (defer_fn): Delete.
2057 (finish_file): Simplify deferred_fns loops; check that
2058 only used inline functions get into deferred_fns.
2059 (mark_used): Inline previous contents of defer_fn.
2061 2004-06-16 Richard Henderson <rth@redhat.com>
2063 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
2064 (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
2065 * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
2066 of CTOR_INITIALIZER ...
2067 (pp_cxx_statement): ... here.
2068 * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
2069 (finish_function): Use alloc_stmt_list to zap entire function.
2070 * parser.c (cp_parser_compound_statement): Update commentary.
2071 * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
2072 * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
2073 (finish_stmt_expr): Don't look through COMPOUND_STMT.
2075 2004-06-16 Geoffrey Keating <geoffk@apple.com>
2077 * pt.c (mark_decl_instantiated): Don't call defer_fn.
2079 2004-06-16 Richard Henderson <rth@redhat.com>
2081 * parser.c (cp_parser_labeled_statement): Update commentary.
2082 * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
2083 * tree.c (mark_local_for_remap_r): Likewise.
2085 2004-06-16 Richard Henderson <rth@redhat.com>
2087 * parser.c (cp_parser_asm_definition): Update commentary.
2088 * pt.c (tsubst_expr): Use ASM_EXPR.
2089 * semantics.c (finish_asm_stmt): Likewise.
2091 2004-06-16 Richard Henderson <rth@redhat.com>
2093 * decl.c (finish_destructor_body): Use LABEL_EXPR.
2094 * parser.c (cp_parser_statement): Update commentary.
2095 * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
2096 * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
2097 * tree.c (mark_local_for_remap_r): Likewise.
2099 2004-06-16 Richard Henderson <rth@redhat.com>
2102 * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
2103 statement in FOR_INIT_STMT for templates.
2105 2004-06-15 Richard Henderson <rth@redhat.com>
2107 * call.c (initialize_reference): Don't build CLEANUP_STMT here.
2108 * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
2109 (genericize_try_block): Use gimplify_stmt.
2110 (genericize_catch_block, genericize_eh_spec_block): Likewise.
2111 (cp_gimplify_init_expr): Remove STMT_EXPR special case.
2112 (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
2113 * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
2114 (cp_tree_chain_matters_p): Remove.
2115 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
2116 (COMPOUND_STMT_BODY_BLOCK): New.
2117 (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
2118 (EXPR_STMT_STMT_EXPR_RESULT): New.
2119 (building_stmt_tree): Check cur_stmt_list.
2120 (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
2121 (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
2122 * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
2123 (cp_finish_decl): Use push_cleanup.
2124 (start_function, finish_function): Use statement lists.
2125 (finish_stmt): Do nothing.
2126 * except.c (begin_eh_spec_block): Use statement lists.
2127 (check_handlers_1, check_handlers): Likewise.
2128 * init.c (construct_virtual_base): Don't add extra compound stmts.
2129 (build_vec_init): Likewise.
2130 * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
2131 * name-lookup.h (struct cp_binding_level): Add statement_list.
2132 * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
2133 (cp_parser_labeled_statement, cp_parser_expression_statement,
2134 cp_parser_statement_seq_opt): Likewise.
2135 (cp_parser_compound_statement): Likewise. Take bool for try block.
2136 (cp_parser_selection_statement): Tidy if processing.
2137 (cp_parser_already_scoped_statement): Rewrite to do what it says.
2138 * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
2139 (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST.
2140 Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
2141 * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
2142 (finish_cond): New, rewritten from FINISH_COND.
2143 (simplify_loop_decl_cond): New.
2144 (finish_expr_stmt): Avoid nested EXPR_STMTs.
2145 (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
2146 begin_else_clause, finish_else_clause, finish_if_stmt,
2147 begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
2148 begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
2149 finish_for_cond, finish_for_stmt, begin_switch_stmt,
2150 finish_switch_cond, finish_switch_stmt, begin_try_block,
2151 finish_try_block, finish_cleanup_try_block, finish_function_try_block,
2152 finish_handler_sequence, finish_function_handler_sequence,
2153 begin_handler, finish_handler_parms, finish_handler,
2154 begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
2155 using statement lists.
2156 (begin_compound_stmt): Replace has_no_scope argument with flags.
2157 Update all callers. Use statement lists.
2158 (finish_compound_stmt): Likewise.
2159 (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
2160 (current_scope_stmt_stack): Remove.
2161 (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
2162 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
2163 Rewrite with statement lists.
2165 2004-06-15 Alexandre Oliva <aoliva@redhat.com>
2167 * parser.c: Change all assignments of c_lex_string_translate
2168 to true and false to 1 and 0.
2169 (cp_lexer_read_token): Convert type of the translated string.
2170 (cp_parser_skip_to_closing_parentheses): Preserve original
2171 value of c_lex_string_translate, and set it to -1 while
2173 (cp_parser_cache_group): Likewise.
2174 (cp_parser_cache_group_1): Renamed.
2175 (cp_parser_asm_operand_list): Remove redundant setting of
2176 c_lex_string_translate.
2177 (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
2178 Handle chained strings.
2180 2004-06-12 Andrew Pinski <apinski@apple.com>
2184 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
2186 * cp-tree.h: Fix typo.
2188 * cp-tree.h: Include cgraph.h
2189 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
2190 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
2192 2004-06-12 Jason Merrill <jason@redhat.com>
2194 PR tree-optimization/14107
2195 * decl.c (finish_function): Warn about no return in all functions.
2197 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
2199 * cp-tree.h (struct language_function): Remove cannot_inline.
2200 * decl.c (save_function_data): cannot_inline is no more.
2201 (cxx_push_function_context): Likewise.
2202 * decl2.c (start_objects, start_static_storage_duration_function):
2203 Reset DECL_INLINE, set DECL_UNINLINABLE.
2205 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2208 * search.c (lookup_field): Propagate the ambiguity list.
2209 (lookup_fnfields): Likewise.
2211 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2214 * parser.c (cp_parser_template_name): Ctors/dtors never need a
2215 template keyword to disambiguate.
2217 2004-06-14 Mark Mitchell <mark@codesourcery.com>
2220 * decl.c (grokdeclarator): Ignore pointer-to-members when
2221 computing template depth.
2224 * name-lookup.c (pushtag): Do not try to put class declarations in
2225 explicit specialization scopes.
2227 2004-06-11 Andrew Pinski <pinskia@physics.uc.edu>
2229 * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
2231 2004-06-11 Mark Mitchell <mark@codesourcery.com>
2234 * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
2235 bindings for undeclared built-ins.
2237 2004-06-11 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2239 * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
2240 appear at the correct location.
2242 2004-06-10 Jason Merrill <jason@redhat.com>
2246 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2247 * init.c (build_offset_ref): Build SCOPE_REF with non-null
2248 TREE_TYPE for non-dependent names.
2249 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
2250 unknown_type_node as its TREE_TYPE.
2251 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
2252 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
2253 (dump_expr) <SCOPE_REF case>: Likewise.
2255 2004-06-10 Mark Mitchell <mark@codesourcery.com>
2258 * parser.c (cp_parser_direct_declarator): Robustify.
2261 * pt.c (tsubst_copy): Use decl_constant_value on enumeration
2262 constants in non-dependent contexts.
2266 * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
2269 2004-06-10 Jakub Jelinek <jakub@redhat.com>
2272 * decl.c (duplicate_decls): Handle fileptr_type_node arguments
2275 2004-06-09 Mark Mitchell <mark@codesourcery.com>
2279 2004-06-07 Mark Mitchell <mark@codesourcery.com>
2280 * lex.c (handle_pragma_interface): Deprecate.
2281 (handle_pragma_implementation): Likewise.
2283 2004-06-09 Andrew Pinski <pinskia@physics.uc.edu>
2285 * g++spec.c (lang_specific_driver): Remove check for -lm
2286 and -lmath when check it see if it was the math library.
2288 2004-06-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2291 * parser.c (cp_parser_direct_declarator): Reject constructor named
2292 as qualified template-id.
2294 2004-06-07 Mark Mitchell <mark@codesourcery.com>
2297 * lex.c (handle_pragma_interface): Deprecate.
2298 (handle_pragma_implementation): Likewise.
2300 2004-06-07 Mark Mitchell <mark@codesourcery.com>
2303 * parser.c (cp_parser_iteration_statement): Fix typo in error
2307 * pt.c (tsubst_default_argument): Do not defer access checks
2308 while substituting into the default argument.
2311 * pt.c (tsubst_copy): Do not try to substitute for an enumeration
2312 constant in a non-dependent context.
2315 * except.c (build_throw): Ensure that temp_expr has been
2318 2004-06-06 Roger Sayle <roger@eyesopen.com>
2320 * cp/cp-tree.h (lvalue_or_else): Add function prototype.
2322 2004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2325 * parser.c (cp_parser_mem_initializer_id): Gracefully reject
2326 'typename', and accept 'template'.
2328 2004-06-03 Andrew Pinski <pinskia@physics.uc.edu>
2329 Jan Hubicka <jh@suse.cz>
2332 * method.c (use_think): Do not mark thunk as referenced.
2334 2004-06-03 Matt Austern <austern@apple.com>
2337 * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
2338 is nonzero, and if we see a noninline definition of a key method,
2339 make the vtables nonweak.
2341 2004-06-02 Matt Austern <austern@apple.com>
2343 * cp-tree.h (instantiate_decl): new boolean parameter,
2344 undefined_ok. Current behavior is equivalent to its being 0.
2345 * decl2.c (mark_used): Add new argument when calling instantiate_decl
2346 * pt.c (mark_decl_instantiated): Unconditionally make
2347 instantiations explicit unconditionally
2348 (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
2349 since mark_decl_instantiated now does it.
2350 (instantiate_class_member): New. Instantiate a member of an
2351 explicitly instantiated class template.
2352 (do_type_instantiation): Explicitly instantiate members of an
2353 explicitly instantiated class template.
2354 (instantiate_decl): if undefined_ok is nonzero, and if we're
2355 trying to explicitly instantiated a template with no definition,
2356 change it to an implicit instantiation.
2357 (instantiate_pending_templates): Add new argument to instantiate_decl.
2358 * tree.c (cp_cannot_inline_tree_fn): Likewise.
2360 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
2362 * cp-tree.h: Fix typo.
2364 * cp-tree.h: Include cgraph.h
2365 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
2366 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
2368 2004-06-01 Jason Merrill <jason@redhat.com>
2371 * call.c (call_builtin_trap): Remove type parm.
2372 (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
2373 (build_x_va_arg): Dereference a null pointer for a non-POD argument.
2375 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2378 * init.c (build_offset_ref): Build SCOPE_REF with non-null
2379 TREE_TYPE for non-dependent names.
2380 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
2381 unknown_type_node as its TREE_TYPE.
2382 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
2383 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
2384 (dump_expr) <SCOPE_REF case>: Likewise.
2386 2004-06-01 Richard Henderson <rth@redhat.com>
2387 Andrew Pinski <pinskia@physics.uc.edu>
2389 * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
2390 * parser.c (struct cp_parser): Remove in_offsetof.
2391 (cp_parser_new): Don't set it.
2392 (cp_parser_unary_expression): Don't check it.
2393 (cp_parser_postfix_open_square_expression): Split out from ...
2394 (cp_parser_postfix_expression): ... here.
2395 (cp_parser_postfix_dot_deref_expression): Likewise.
2396 (cp_parser_builtin_offsetof): New.
2397 (cp_parser_primary_expression): Use it.
2399 2004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2402 * parser.c (cp_parser_postfix_expression): Allow subscript
2403 operator in offsetof.
2405 2004-05-31 Mark Mitchell <mark@codesourcery.com>
2408 * friend.c (add_friend): Do not try to perform access checks for
2409 functions from dependent classes.
2411 2004-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
2413 * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
2414 (pp_cxx_begin_template_argument_list): Turn into a function.
2415 (pp_cxx_end_template_argument_list): Likewise.
2416 (pp_cxx_separate_with): Define.
2417 (pp_cxx_unqualified_id): Tidy.
2418 (pp_cxx_primary_expression): Likewise.
2419 (pp_cxx_postfix_expression): Likewise.
2420 (pp_cxx_expression): Likewise.
2421 (pp_cxx_simple_type_specifier): Likewise.
2422 (pp_cxx_type_specifier_seq): Likewise.
2423 (pp_cxx_parameter_declaration_clause): Likewise.
2424 (pp_cxx_exception_specification): Likewise.
2425 (pp_cxx_direct_declarator): Likewise.
2426 (pp_cxx_type_id): Likewise.
2427 * cxx-pretty-print.h (pp_cxx_whitespace): Export from
2429 (pp_cxx_left_paren): Likewise.
2430 (pp_cxx_right_paren): Likewise.
2431 (pp_cxx_left_brace): Likewise.
2432 (pp_cxx_right_brace): Likewise.
2433 (pp_cxx_left_bracket): Likewise.
2434 (pp_cxx_right_bracket): Likewise.
2435 (pp_cxx_dot): Likewise.
2436 (pp_cxx_identifier): Likewise.
2437 (pp_cxx_tree_identifier): Likewise.
2438 (pp_cxx_ampersand): New macro.
2439 (pp_cxx_star): Likewise.
2440 (pp_cxx_arrow): Likewise.
2441 (pp_cxx_semicolon): Likewise.
2442 (pp_cxx_complement): Likewise.
2443 (pp_cxx_begin_template_argument_list): Declaree.
2444 (pp_cxx_end_template_argument_list): Likewise.
2445 (pp_cxx_colon_colon): likewise.
2447 2004-05-31 Eric Botcazou <ebotcazou@libertysurf.fr>
2449 * parser.c (cp_parser_simple_type_specifier): Explicitly test
2452 2004-05-31 Kazu Hirata <kazu@cs.umass.edu>
2454 * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
2455 typeck.c: Fix comment formatting.
2457 2004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
2459 * cp-lang.c (cp_expand_decl): Remove.
2460 (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
2462 2004-05-30 Andreas Jaeger <aj@suse.de>
2464 * lang-specs.h: Add missing initializers for .ii.
2466 2004-05-28 Aldy Hernandez <aldyh@redhat.com>
2468 * decl.c (cp_make_fname_decl): Free return value from
2471 2004-05-28 Mark Mitchell <mark@codesourcery.com>
2474 * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
2476 * init.c (build_new): Likewise.
2479 * name-lookup.c (arg_assoc): Robustify.
2482 * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
2483 when determining the scope to use for a pointer to member.
2484 (lookup_anon_field): Give it external linkage.
2485 * cp-tree.h (lookup_anon_field): Declare it.
2486 * expr.c (cplus_expand_constant): Use it.
2488 2004-05-28 Mark Mitchell <mark@codesourcery.com>
2491 * parser.c (cp_parser_simple_type_specifier): Call
2492 maybe_note_name_used_in_class.
2494 2004-05-28 Tom Marshall <tmarshall@real.com>
2497 * class.c (finish_struct_1): Warn only if the dtor is non-private or
2498 the class has friends.
2500 2004-05-27 Adam Nemet <anemet@lnxw.com>
2503 * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
2504 TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
2506 2004-05-24 Geoffrey Keating <geoffk@apple.com>
2508 * method.c (implicitly_declare_fn): Don't call defer_fn; abort
2509 if it might be needed.
2510 * pt.c (mark_decl_instantiated): Only call defer_fn if
2511 the function actually needs processing in finish_file.
2512 * decl2.c (finish_file): Add check that elements in
2513 deferred_fns_used are really needed there. Remove unnecessary
2514 test of DECL_SAVED_TREE.
2516 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
2518 * Make-lang.in: No need to specify $(LIBCPP).
2520 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2523 * parser.c (cp_parser_class_head): Robustify.
2526 * parser.c (cp_parser_decl_specifier_seq): Correct error in
2528 (cp_parser_constructor_declarator_p): Treat attributes
2532 * typeck.c (build_unary_op): Do not attempt to resolve casts to
2533 base classes in templates.
2535 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2538 * pt.c (instantiate_template): Robustify.
2540 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2543 * decl.c (xref_tag): Issue errors about redeclaring template
2544 classes as non-template classes.
2546 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2549 * name-lookup.c (supplement_binding): Allow redefinitions of
2553 * parser.c (cp_parser_template_argument): Robustify.
2555 2004-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
2557 * class.c (alter_access): Use %E format specifier to print an
2558 identifier node. Avoid looking at the IDENTIFIER_POINTER.
2559 (push_lang_context): Likewise.
2560 * decl.c (lookup_label): Likewise.
2561 (grokdeclarator): Likewise.
2562 * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
2563 * pt.c (do_type_instantiation): Likewise.
2564 * tree.c (handle_java_interface_attribute): Likewise.
2565 (handle_com_interface_attribute): Likewise.
2566 (handle_init_priority_attribute): Likewise.
2568 2004-05-22 Mark Mitchell <mark@codesourcery.com>
2572 * pt.c (build_non_dependent_expr): Expand the set of tree nodes
2573 recognized as overloaded functions.
2575 2004-05-22 Mark Mitchell <mark@codesourcery.com>
2578 * class.c (layout_nonempty_base_or_field): Do not try to avoid
2579 layout conflicts for unions.
2582 * typeck.c (build_x_unary_op): Instantiate template class
2583 specializations before looking for "operator &".
2586 * typeck.c (complete_type): Layout non-dependent array types, even
2590 * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
2593 2004-05-22 Roger Sayle <roger@eyesopen.com>
2595 * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
2596 returning when TREE_TYPE is error_mark_node.
2597 * typeck.c (require_complete_type): Return error_mark_node if
2598 value's type is an error_mark_node.
2600 2004-05-20 Andrew Pinski <pinskia@physics.uc.edu>
2602 * optimize.c (calls_setjmp_r): Remove.
2603 (calls_setjmp_p): Remove.
2604 * cp-tree.c (calls_setjmp_p): Remove.
2605 * decl.c (finish_function): Do not call calls_setjmp_p.
2607 2004-05-18 Zack Weinberg <zack@codesourcery.com>
2609 * decl.c (cp_finish_decl): Use mark_decl_referenced.
2610 * decl2.c (maybe_make_one_only): Likewise.
2611 * method.c (use_thunk): Likewise.
2613 2004-05-18 Jason Merrill <jason@redhat.com>
2615 * class.c (build_base_path): Tidy a bit.
2617 2004-05-14 Geoffrey Keating <geoffk@apple.com>
2619 * name-lookup.c (struct scope_binding): New.
2620 (EMPTY_SCOPE_BINDING): New.
2621 (lookup_using_namespace): Take a scope_binding instead of a
2623 (qualified_lookup_using_namespace): Likewise.
2624 (cxx_binding_clear): Delete.
2625 (do_nonmember_using_decl): Use a scope_binding instead of a
2627 (lookup_tag): Don't call select_decl.
2628 (ambiguous_decl): Don't return anything (and change callers to match).
2629 Take a scope_binding as the second parameter.
2630 (lookup_namespace_name): Use a scope_binding instead of a
2632 (unqualified_namespace_lookup): Likewise.
2633 (lookup_qualified_name): Likewise.
2634 (select_decl): Take a scope_binding instead of a cxx_binding.
2635 Use macros rather than hand-coding tests for type-ness.
2637 2004-05-13 Diego Novillo <dnovillo@redhat.com>
2639 * cp-gimplify.c: Rename from cp-simplify.c.
2640 * Make-lang.in, optimize.c: Update.
2642 2004-05-13 Diego Novillo <dnovillo@redhat.com>
2644 Merge from tree-ssa-20020619-branch. See
2645 ChangeLog.tree-ssa for details.
2647 * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
2648 cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
2649 expr.c, init.c, name-lookup.h, optimize.c, parser.c,
2650 pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
2652 * cp-mudflap.c: New file.
2653 * cp-simplify.c:: New file.
2655 2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2658 * decl2.c (check_classfn): For member templates, compare also the
2659 template parameters to match the declaration.
2660 * cp-tree.h: Adjust declaration of check_classfn.
2661 * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
2662 * friend.c (do_friend): Likewise.
2663 * pt.c (tsubst_friend_function): Likewise.
2665 2004-05-01 Zack Weinberg <zack@codesourcery.com>
2667 * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
2668 Instead, dig into the representation type to find the array bound.
2670 2004-04-30 Jason Merrill <jason@redhat.com>
2672 Refer to base members using COMPONENT_REFs where possible.
2673 * class.c (build_simple_base_path): New fn.
2674 (build_base_path): Use it for non-virtual base references.
2675 (layout_class_type): Change base fields to their real type
2676 after layout is done.
2677 * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
2678 * cp-lang.c (cxx_get_alias_set): Use it.
2680 2004-04-30 Kazu Hirata <kazu@cs.umass.edu>
2682 * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
2685 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2688 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
2689 used in integral constant expressions.
2691 2004-04-22 Mark Mitchell <mark@codesourcery.com>
2693 * init.c (build_aggr_init): Fix accidental use of C99 construct in
2696 * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
2698 * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
2699 * decl.c (reshape_init): Use it.
2700 * init.c (perform_member_init): Remove redundant condition.
2701 (build_aggr_init): Adjust to handle brace-enclosed initializers
2703 (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
2705 * parser.c (cp_parser_initializer_clause): Do not set
2706 TREE_HAS_CONSTRUCTOR on the initializer.
2707 * rtti.c (tinfo_base_init): Likewise.
2708 (generic_initializer): Likewise.
2709 (ptr_initializer): Likewise.
2710 (ptm_initializer): Likewise.
2711 (class_initializer): Likewise.
2712 (get_pseudo_ti_init): Likewise.
2713 * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
2715 2004-04-22 Alan Modra <amodra@bigpond.net.au>
2717 * name-lookup.c (anonymous_namespace_name): Make static.
2719 2004-04-19 Roger Sayle <roger@eyesopen.com>
2722 * class.c (build_base_path): Call fold whilst building the NULL
2723 pointer check expression trees.
2725 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
2727 * init.c (build_new_1): Don't use type size argument for Java
2728 _Jv_AllocObject call.
2730 2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
2732 * method.c (make_alias_for_thunk): Remove preprocessor guard on
2733 declaration and definition.
2735 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
2738 * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
2739 than ASM_OUTPUT_DEF.
2741 2004-04-08 Jakub Jelinek <jakub@redhat.com>
2743 * decl2.c (mark_used): Don't segfault if cfun != NULL but
2744 current_function_decl == NULL.
2746 2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
2749 * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
2752 2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2754 * init.c (decl_constant_value): Don't look at DECL_INITIAL
2756 * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
2757 or TREE_SIDE_EFFECTS of a type.
2759 2004-04-02 Nathan Sidwell <nathan@codesourcery.com>
2762 * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
2763 cv-qualifier unification.
2764 * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
2766 2004-04-02 Jan Hubicka <jh@suse.cz>
2768 * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
2769 * cp-tree.h (cp_update_decl_after_saving): Declare.
2770 * tree.c (cp_update_decl_after_saving): Define.
2772 2004-04-01 Mark Mitchell <mark@codesourcery.com>
2775 * typeck.c (get_delta_difference): Call fold before returning the
2778 2004-04-01 Richard Henderson <rth@redhat.com>
2781 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
2782 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
2784 2004-04-01 Mark Mitchell <mark@codesourcery.com>
2787 * name-lookup.c (maybe_push_cleanup_level): Robustify.
2789 2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2791 * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
2793 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2795 * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
2796 * class.c (check_bitfield_decl): Likewise.
2797 * cvt.c (type_promotes_to): Likewise.
2798 * decl.c (finish_enum): Likewise.
2799 * mangle.c (write_builtin_type): Likewise.
2800 * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
2801 * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
2802 (build_binary_op): Likewise.
2804 2004-03-31 Jan Hubicka <jh@suse.cz>
2806 * tree.h (optimize_function): Kill prototype.
2807 * optimize.c (dump_function, optimize_function, dump_finction): Kill.
2808 * semantics.c (expand_body): Kill.
2810 2004-03-30 Mark Mitchell <mark@codesourcery.com>
2813 * decl.c (start_decl_1): Do not decide whether or not to create a
2814 new cleanup level until after the type has been completed.
2817 * pt.c (tsubst_default_argument): Clear current_function_decl.
2819 2004-03-30 Zack Weinberg <zack@codesourcery.com>
2821 * name-lookup.c, parser.c: Use new shorter form of GTY markers.
2823 2004-03-29 Zack Weinberg <zack@codesourcery.com>
2825 * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
2826 is null, just print the literal name and return.
2828 2004-03-25 Kazu Hirata <kazu@cs.umass.edu>
2830 * cxx-pretty-print.c: Fix comment typos.
2832 2004-03-24 Kazu Hirata <kazu@cs.umass.edu>
2834 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
2837 2004-03-23 Ziemowit Laski <zlaski@apple.com>
2839 * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
2840 * mangle.c (write_type): Add call to 'mangle_fundamental_type'
2843 2004-03-23 Zack Weinberg <zack@codesourcery.com>
2845 PR 12267, 12391, 12560, 13129, 14114, 14133
2846 * cp-lang.c (c_reset_state): Delete.
2847 (push_file_scope, pop_file_scope): New stubs.
2848 * parser.c (c_parse_file): Call sorry() here if called more than once.
2850 2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2852 * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
2855 2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
2857 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
2859 2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
2861 * error.c (enum pad): Remove.
2862 (dump_qualifiers): Likewise.
2863 (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
2864 (dump_aggr_type): Likewise.
2865 (dump_type_suffix): Likewise.
2866 (dump_simple_decl): Likewise.
2867 (dump_function_decl): Likewise.
2868 (cv_to_string): Likewise.
2869 (dump_type_prefix): Likewise. Adjust return void.
2870 * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
2872 (pp_cxx_template_keyword_if_needed): Document.
2873 (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
2874 (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
2875 MUST_NOT_THROW_EXPR.
2877 2004-03-21 Mark Mitchell <mark@codesourcery.com>
2880 * decl.c (cp_finish_decl): Compute the size of arrays declared in
2881 templates, if their type is non-dependent.
2883 2004-03-19 Mark Mitchell <mark@codesourcery.com>
2885 * call.c (build_op_delete_call): Do not forget the placement
2886 arguments when iterating through mutiple delete operators.
2888 * cp-tree.h (svaed_scope): Remove last_parms.
2889 (NEW_DELETE_OPNAME_P): New macro.
2890 (last_function_parms): Remove.
2891 (do_friend): Adjust prototype.
2892 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
2893 using last_function_parms.
2894 (grokfndecl): Take the PARM_DECLs as an argument, rather than
2895 using last_function_parms.
2896 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
2897 for class-specific operator new and operator delete.
2898 (grok_op_properties): Do not look for allocation functions with
2900 (start_function): Use DECL_ARGUMENTS instead of
2901 last_function_parms.
2902 * decl.h (last_function_parms): Do not declare.
2903 * decl2.c (grokclassfn): Do not use last_function_parms.
2904 * friend.c (do_friend): Remove parmdecls parameter.
2905 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
2906 (pop_from_top_level): Do not restore it.
2907 * pt.c (check_explicit_specialization): Do not adjust
2908 last_function_parms.
2910 * name-lookup.c (do_local_using_decl): Create a local binding for
2911 types brought in via using declarations.
2913 * name-lookup.c (lookup_arg_dependent): Handle block-scope
2914 function declarations correctly.
2916 * semantics.c (finish_id_expression): Correct handling of
2917 conversion operators to dependent types.
2919 * typeck.c (lookup_destructor): Allow the use of destructors from
2922 2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2924 * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
2925 TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
2926 * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
2927 the field is named TEMPLATE_TYPE_PARM_INDEX.
2929 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2932 * parser.c (cp_parser_functional_cast): A cast to anything
2933 but integral or enumaration type is not an integral constant
2935 * pt.c (value_dependent_expression_p): Handle cast expressions
2936 without operands (such as "int()").
2938 2004-03-18 Mark Mitchell <mark@codesourcery.com>
2940 * semantics.c (finish_pseudo_destructor_expr): Allow differing
2941 cv-qualification between the type named by the
2942 pseudo-destructor-name and the object-type.
2944 * search.c (accessible_base_p): Handle non-proper bases.
2946 * name-lookup.c (do_nonmember_using_decl): If a using declaration
2947 refers to a single overloaded function, set the type of the
2949 * tree.c (lvalue_type): Simplify.
2950 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
2952 (build_unary_op): Handle OVERLOADs with known types.
2954 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
2957 * parser.c (cp_parser_postfix_expression): Handle the use of
2958 "typename" in non-dependent contexts. Convert appropriately when
2959 when using a qualified name after "->" or ".".
2961 * call.c (conditional_conversion): Honor the requirement that some
2962 conversions refer to the original object.
2964 2004-03-18 Mark Mitchell <mark@codesourcery.com>
2966 * call.c (build_conditional_expr): Do not call force_rvalue for
2967 operands of void_type when the conditional expression itself has
2969 * name-lookup.c (pushdecl): Don't consider a declaration of a
2970 function named "main" to be an overload of a type named "main".
2971 * parser.c (cp_parser_template_name): Perform name lookup when the
2972 template name is proceeded by "template" if the qualifying scope
2974 * typeck.c (composite_pointer_type_r): Correctly handle
2975 pointer-to-member types.
2976 (build_const_cast): Likewise.
2978 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2980 * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
2981 * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
2982 (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
2983 (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
2984 (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
2985 (TYPEOF_TYPE_EXPR): New macro.
2986 * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
2987 * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
2988 * pt.c (tsubst): Likewise.
2989 * semantics.c (finish_typeof): Likewise.
2990 * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
2991 and TEMPLATE_TYPE_PARM.
2992 * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
2993 (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
2995 2004-03-16 Mark Mitchell <mark@codesourcery.com>
2998 * cp-tree.h (build_new_op): Change prototype.
2999 (build_x_binary_op): Likewise.
3000 * call.c (build_new_op): Add overloaded_p parameter.
3001 * decl2.c (grok_array_decl): Adjust call to build_new_op.
3002 * parser.c (cp_parser_binary_expression): Note that uses of
3003 overloaded operators prevents an expression from being considered
3004 an integral constant.
3005 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
3007 * semantics.c (finish_call_expr): Likewise.
3008 * typeck.c (rationalize_conditional_expr): Likewise.
3009 (build_x_indirect_ref): Likewise.
3010 (build_x_binary_op): Likewise.
3011 (build_x_unary_op): Likewise.
3012 (build_x_compound_expr): Likewise.
3013 (build_modify_expr): Likewise.
3014 * typeck2.c (build_x_arrow): Likewise.
3016 2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
3018 * cp-lang.c, ptree.c: Update copyright.
3020 2004-03-13 Mark Mitchell <mark@codesourcery.com>
3023 * parser.c (cp_parser_non_integral_constant_expression): Encode
3024 more of the idiom that surrounded calls to this function within
3026 (cp_parser_primary_expression): Adjust accordingly.
3027 (cp_parser_postfix_expression): Likewise.
3028 (cp_parser_unary_expression): Likewise.
3029 (cp_parser_cast_expression): Likewise.
3030 (cp_parser_assignment_expression): Likewise.
3031 (cp_parser_expression): Likewise.
3032 (cp_parser_new_expression): Note that new-expressions are not
3033 allowed in integral constant expressions.
3034 (cp_parser_delete_expression): Likewise.
3036 2004-03-12 Matt Austern <austern@apple.com>
3038 * decl2.c (maybe_make_one_only): Look at
3039 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
3040 to make an explicit instantiation weak.
3041 * method.c (use_thunk): Make sure we call comdat_linkage
3043 * pt.c (do_type_instantiation): On systems where weak symbols
3044 don't go in a static archive's TOC, explicit instantiation of a
3045 class must imply *explicit* instantiation of its memeber.
3047 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
3049 * call.c, cp-tree.h, pt.c: Fix comment typos.
3051 2004-03-10 Mark Mitchell <mark@codesourcery.com>
3054 * decl.c (xref_tag): Disregard non-type declarations when
3055 looking up a tagged type.
3057 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
3060 * call.c (convert_like_real): Build a const qualified temporary,
3061 when testing ctor access.
3063 2004-03-09 Mark Mitchell <mark@codesourcery.com>
3065 * call.c (initialize_reference): Fix typo.
3067 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3070 * pt.c (determine_specialization): For member templates, match also
3074 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
3076 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
3078 2004-03-09 Mark Mitchell <mark@codesourcery.com>
3081 * call.c (initialize_reference): Handle initializers that are
3082 class-member access expressions applies to rvalues.
3084 2004-03-09 Mark Mitchell <mark@codesourcery.com>
3087 * name-lookup.c (supplement_binding): Ignore functions that are
3088 marked DECL_ANTICIPATED.
3090 2004-03-08 Mark Mitchell <mark@codesourcery.com>
3093 * class.c (check_field_decls): Complain about non-static data
3094 members of reference type in unions. Propagate
3095 CLASSTYPE_REF_FIELDS_NEED_INIT and
3096 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
3098 * init.c (perform_member_init): Complain about mbmers with const
3099 type that are not explicitly initialized.
3101 2004-03-08 Mark Mitchell <mark@codesourcery.com>
3103 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
3104 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
3105 (lang_identifier): Remove implicit_decl and error_locus.
3106 (IDENTIFIER_IMPLICIT_DECL): Remove.
3107 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
3108 (IDENTIFIER_ERROR_LOCUS): Likewise.
3109 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
3110 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
3111 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
3112 (implicitly_declare): Remove.
3113 * decl.c (warn_extern_redeclared_static): Remove check of
3114 IDENTIFIER_IMPLICIT_DECL.
3115 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
3116 (implicitly_declare): Remove.
3117 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
3118 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
3119 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
3120 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
3121 in the innermost scope, rather than at namespace scope.
3122 * name-lookup.c (push_local_binding): Give it external linkage.
3123 (pushdecl): Remove dead code.
3124 * name-lookup.h (push_local_binding): Declare it.
3125 * ptree.c (cxx_print_identifier): Don't print
3126 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
3127 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
3128 not IDENTIFIER_ERROR_LOCUS.
3129 * typeck.c (build_function_call): Remove dead code.
3131 2004-03-08 Jason Merrill <jason@redhat.com>
3134 * decl.c (xref_tag): Remove attribute handling.
3135 * cp-tree.h: Adjust prototype.
3136 * decl.c, parser.c, rtti.c: Adjust callers.
3137 * parser.c (cp_parser_class_head): Pass back attributes in the
3139 (cp_parser_class_specifier): Adjust.
3141 2004-03-08 Matt Austern <austern@apple.com>
3144 * name-lookup.c (add_decl_to_level): Add extern variables, as well
3145 as static, to static_decls array.
3147 2004-03-05 Jason Merrill <jason@redhat.com>
3149 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
3151 2004-03-04 Geoffrey Keating <geoffk@apple.com>
3153 * decl.c (grokfndecl): Update old incorrect comment.
3154 (grokvardecl): Diagnose C++ variables of type with no linkage.
3156 2004-03-01 Mark Mitchell <mark@codesourcery.com>
3159 * pt.c (build_non_dependent_expr): Do not create a
3160 NON_DEPENDENT_EXPR for a THROW_EXPR.
3162 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
3165 * error.c (dump_expr): Handle THROW_EXPR.
3167 2004-03-01 Mark Mitchell <mark@codesourcery.com>
3170 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
3171 lookup if ordinary name-lookup finds a non-function.
3172 * pt.c (tsubst_copy_and_build): Likewise.
3175 * parser.c (cp_parser_late_parsing_default_args): Check that there
3176 are no extra tokens after the end of the default-argument
3179 2004-03-01 Mark Mitchell <mark@codesourcery.com>
3182 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
3183 having C++ linkage for name-mangling purposes.
3186 * parser.c (cp_parser_direct_declarator): Recognize constructor
3187 declarators that use a template-id to name the class being
3191 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
3192 (tsubst_expr): Do not call tsubst_copy, even when
3193 processing_template_decl.
3195 2004-03-01 Jeff Law <law@redhat.com>
3197 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
3200 2004-02-29 Mark Mitchell <mark@codesourcery.com>
3203 * name-lookup.h (push_scope): Change prototype.
3204 * name-lookup.c (push_scope): Do not reenter the current class
3206 * decl.c (grokfndecl): Check return code from push_scope before
3208 * decl2.c (check_classfn): Likewise.
3209 * parser.c (cp_parser_conversion_function_id): Likewise.
3210 (cp_parser_init_declarator): Likewise.
3211 (cp_parser_direct_declarator): Likewise.
3212 (cp_parser_class_specifier): Likewise.
3213 (cp_parser_class_head): Likewise.
3214 (cp_parser_lookup_name): Likewise.
3215 (cp_parser_constructor_declarator_p): Likewise.
3216 * pt.c (instantiate_class_template): Likewise.
3217 (resolve_typename_type): Likewise.
3219 2004-02-29 Mark Mitchell <mark@codesourcery.com>
3222 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
3226 * class.c (update_vtable_entry_for_fn): Do not go through
3227 covariance machinery if the type returned by an overrider is the
3228 same as the original.
3230 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
3232 * call.c: Fix a comment typo.
3234 2004-02-27 Ziemowit Laski <zlaski@apple.com>
3236 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
3238 2004-02-26 Mark Mitchell <mark@codesourcery.com>
3241 * parser.c (cp_parser_parameter_declaration_list): Commit
3242 to fewer tentative parses.
3244 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3247 * pt.c (dependent_type_p_r): A template template parameter is a
3250 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3253 * mangle.c (write_template_arg_literal): Don't rely on identity for
3256 2004-02-24 Jason Merrill <jason@redhat.com>
3258 * tree.c (build_exception_variant): Use check_qualified_type.
3260 2004-02-23 Zack Weinberg <zack@codesourcery.com>
3261 Kazu Hirata <kazu@cs.umass.edu>
3263 * decl.c (cxx_init_decl_processing): Don't check
3264 flag_writable_strings.
3266 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
3269 * typeck.c (maybe_warn_about_returning_address_of_location):
3270 Change check for VAR_DECL to use DECL_P instead.
3272 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3275 * cvt.c (build_expr_type_conversion): Type must be complete before
3276 looking up for conversions.
3278 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3281 * name-lookup.c (arg_assoc_class): Don't look into template
3282 arguments if it is not a primary template.
3284 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3287 * method.c (use_thunk): Always clone function argument tree.
3289 2004-02-20 Mark Mitchell <mark@codesourcery.com>
3292 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
3295 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
3296 for all type variants.
3298 2004-02-19 Mark Mitchell <mark@codesourcery.com>
3301 * decl.c (duplicate_decls): Return error_mark_node for invalid
3303 * name-lookup.c (push_namespace): Ignore the return value from
3305 * pt.c (push_template_decl_real): Robustify.
3308 * name-lookup.c (push_class_level_binding): Do not complain about
3309 adding a binding for a member whose name is the same as the
3310 enclosing class if the member is located in a base class of the
3313 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3316 * parser.c (cp_parser_new_expression): Parse an ill-formed
3317 direct-new-declarator after a parenthesized type-id to emit good
3320 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
3322 * cp-tree.def, cvt.c: Update copyright.
3324 2004-02-17 Mark Mitchell <mark@codesourcery.com>
3327 * cp-tree.h (abi_version_at_least): Remove.
3328 * mangle.c: Include flags.h.
3330 2004-02-15 Mark Mitchell <mark@codesourcery.com>
3333 * call.c (build_conditional_expr): Handle conversions between
3334 class types which result in differently cv-qualified type
3338 * class.c (delete_duplicate_fields_1): Remove.
3339 (delete_duplicate_fields): Likewise.
3340 (finish_struct_anon): Remove check for members with the same name
3341 as their enclosing class.
3342 (check_field_decls): Do not call duplicate_fields.
3343 * decl.c (grokdeclarator): Remove check for static data members
3344 with the same name as their enclosing class.
3345 * name-lookup.c (push_class_level_binding): Check for members with
3346 the same name as their enclosing class.
3348 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
3351 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
3353 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3356 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
3357 has full set of arguments.
3359 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3362 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
3364 2004-02-13 Mark Mitchell <mark@codesourcery.com>
3367 * cp-tree.h (delete_sanity): Change prototype.
3368 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
3369 Remove dead code. Adjust code to warn about deleting an array.
3370 * typekc.c (decay_conversion): Use build_address and build_nop.
3373 * search.c (accessible_p): Do not check access in thunks.
3376 * call.c (build_conditional_expr): Call force_rvalue on the
3377 non-void operand in the case that one result is a throw-expression
3378 and the other is not.
3380 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
3383 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
3384 the type name and look ahead for ::~, and bail out early with a
3385 better error message if the parse is going to fail.
3387 2004-02-12 Mark Mitchell <mark@codesourcery.com>
3389 * call.c (conversion_kind): New type.
3390 (conversion_rank): Likewise.
3391 (conversion): Likewise.
3392 (CONVERSION_RANK): New macro.
3393 (conversion_obstack): New variable.
3394 (obstack_initialized): Likewise.
3395 (z_candidate): Change type of convs and second_conv.
3396 (candidate_warning): New type.
3397 (IDENTITY_RANK): Remove.
3398 (EXACT_RANK): Likewise.
3399 (PROMO_RANK): Likewise.
3400 (STD_RANK): Likewise.
3401 (PBOOL_RANK): Likewise.
3402 (USER_RANK): Likewise.
3403 (ELLIPSIS_RANK): Likewise.
3404 (BAD_RANK): Likewise.
3405 (ICS_RANK): Likewise.
3406 (ICS_STD_RANK): Likewise.
3407 (ICS_USER_FLAG): Likewise.
3408 (ICS_ELLIPSIS_FLAG): Likewise.
3409 (ICS_THIS_FLAG): Likewise.
3410 (ICS_BAD_FLAG): Likewise.
3411 (NEED_TEMPORARY_P): Likewise.
3412 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
3413 (USER_CONV_CAND): Likewise.
3414 (USER_CONV_FN): Likewise.
3415 (conversion_obstack_alloc): New function.
3416 (alloc_conversion): Likewise.
3417 (validate_conversion_obstack): Likewise.
3418 (alloc_conversions): Likewise.
3419 (build_conv): Adjust to deal with new conversion data structures.
3420 (build_identity_conv): New function.
3421 (build_ambiguous_conv): Likewise.
3422 (standard_conversion): Adjust to deal with new conversion data
3424 (convert_class_to_reference): Likewise.
3425 (direct_reference_binding): Likewise.
3426 (reference_binding): Likewise.
3427 (implicit_conversion): Likewise.
3428 (add_candidate): Likewise.
3429 (add_function_candidate): Likewise.
3430 (add_conv_candidate): Likewise.
3431 (build_builtin_candidate): Likewise.
3432 (print_z_candidate): Likewise.
3433 (merge_conversion_sequences): Likewise.
3434 (build_user_type_conversion_1): Likewise.
3435 (build_user_type_conversion): Likewise.
3436 (build_new_function_call): Likewise.
3437 (build_object_call): Likewise.
3438 (conditional_conversion): Likewise.
3439 (build_conditional_expr): Likewise.
3440 (build_new_op): Likewise.
3441 (build_op_delete_call): Likewise.
3442 (convert_like_real): Likewise.
3443 (build_over_call): Likewise.
3444 (build_new_method_call): Likewise.
3445 (is_subseq): Likewise.
3446 (maybe_handle_implicit_object): Likewise.
3447 (maybe_handle_ref_bind): Likewise.
3448 (compare_ics): Likewise.
3449 (source_type): Likewise.
3450 (add_warning): Likewise.
3452 (can_convert_arg): Likewise.
3453 (can_convert_arg_bad): Likewise.
3454 (perform_implicit_conversion): Likewise.
3455 (perform_direct_initialization_if_possible): Likewise.
3456 (initialize_reference): Likewise.
3457 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
3458 * cp-tree.def (WRAPPER): Likewise.
3459 (IDENTITY_CONV): Remove.
3460 (LVALUE_CONV): Likewise.
3461 (QUAL_CONV): Likewise.
3462 (STD_CONV): Likewise.
3463 (PTR_CONV): Likewise.
3464 (PMEM_CONV): Likewise.
3465 (BASE_CONV): Likewise.
3466 (REF_BIND): Likewise.
3467 (USER_CONV): Likewise.
3468 (AMBIG_CONV): Likewise.
3469 (RVALUE_CONV): Likewise.
3470 * cp-tree.h (tree_wrapper): Remove.
3471 (WRAPPER_ZC): Remove.
3472 (lang_tree_node): Remove wrapper.
3473 (LOOKUP_SPECULATIVELY): Remove.
3474 (build_op_delete_call): Adjust prototype.
3475 (validate_conversion_obstack): Declare.
3476 (build_zc_wrapper): Remove.
3477 * cvt.c (convert_to_reference): Remove dead code.
3478 (ocp_convert): Likewise.
3479 * decl.c (redeclaration_error_message): Correct handling of
3481 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
3482 (cp_tree_node_structure): Remove WRAPPER case.
3483 * decl2.c (finish_file): Call validate_conversion_obstack.
3484 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
3485 (build_op_delete_call): Likewise.
3486 (build_x_delete): Likewise.
3487 (build_delete): Adjust call to build_op_delete_call.
3488 * pt.c (tsubst_friend_declaration): Adjust code to determine
3489 whether or not a friend template is a definition.
3490 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
3491 * tree.c (build_zc_wrapper): Remove.
3493 2004-02-12 Zack Weinberg <zack@codesourcery.com>
3495 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
3496 * cp-tree.h: Don't declare cxx_builtin_type_decls.
3497 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
3498 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
3500 2004-02-10 Mark Mitchell <mark@codesourcery.com>
3502 * typeck.c (lookup_destructor): Fix typo in error message.
3504 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
3506 * call.c, parser.c, tree.c: Fix comment typos.
3508 2004-02-07 Zack Weinberg <zack@codesourcery.com>
3511 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
3512 * decl.c (duplicate_decls, start_function): Likewise.
3514 2004-02-07 Zack Weinberg <zack@codesourcery.com>
3516 * name-lookup.c (pushdecl): Issue shadow warnings directly.
3517 * parser.c (free_parser_stacks): Delete.
3519 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
3521 * rtti.c: Update copyright.
3523 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3526 * decl.c (require_complete_types_for_parms): Do not insert
3527 error_mark_node in the parameter list.
3529 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3532 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
3533 error when terminator can not be found.
3535 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
3537 Make-lang.in (po-generated): Delete.
3539 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
3541 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
3542 targetm.calls.promote_prototypes.
3544 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3548 2004-01-15 Geoffrey Keating <geoffk@apple.com>
3550 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
3551 (handle_pragma_implementation): Likewise.
3553 2004-02-05 Mark Mitchell <mark@codesourcery.com>
3556 * typeck.c (lookup_destructor): Tweak error message.
3558 2004-02-05 Jan Hubicka <jh@suse.cz>
3560 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
3563 2004-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3566 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
3567 code, only emits the diagnostic now. Added lookup of the identifier
3568 and support for qualified ids.
3569 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
3570 Parse an (invalid) type name as id-expression within a declarator.
3571 (cp_parser_simple_declaration): Use it.
3572 (cp_parser_member_declaration): Likewise.
3573 (cp_parser_make_typename_type): New function. Handle errors through
3574 cp_parser_diagnose_invalid_typename.
3575 (cp_parser_elaborated_type_specifier): Use it.
3577 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3580 * call.c (convert_like_real): Use "converting" rather than
3581 "argument" as the descriptive keyword to
3582 dubious_conversion_warnings.
3583 * typeck.c (convert_for_assignment): Do not call
3584 dubious_conversion_warnings.
3586 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3589 * init.c (build_delete): Emit a more informative error message in
3590 case of an incomplete type, and on the correct source line.
3592 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
3594 * error.c, search.c: Update copyright.
3596 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3599 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
3600 linkage for the typeinfo name string.
3602 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3605 * cp-tree.h (fold_non_dependent_expr): New function.
3606 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
3607 (cp_parser_template_argument): Use fold_non_dependent_expr.
3608 (cp_parser_direct_declarator): Likewise.
3609 * pt.c (fold_non_dependent_expr): New function.
3610 (convert_nontype_argument): Use it.
3611 (tsubst_qualified_id): Simplify.
3612 (tsubst_copy_and_build): Likewise.
3614 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3616 * decl.c (cxx_push_function_context): Do not set
3617 current_function_is_thunk.
3618 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
3621 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3624 * pt.c (more_specialized_class): Increase processing_template_decl
3625 while partial ordering.
3627 2004-02-03 Mark Mitchell <mark@codesourcery.com>
3630 * decl.c (start_function): Do not call pushdecl for any
3631 instantiation or specialization of a primary template.
3633 2004-02-03 Mark Mitchell <mark@codesourcery.com>
3636 * parser.c (cp_parser_class_name): Robustify.
3639 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
3642 * semantics.c (finish_id_expression): Do not return an
3643 IDENTIFIER_NODE when lookup finds a PARM_DECL.
3645 2004-02-03 Mark Mitchell <mark@codesourcery.com>
3648 * pt.c (build_non_dependent_expr): Do not build
3649 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
3652 * semantics.c (finish_id_expression): Do not return an
3653 IDENTIFIER_NODE when lookup finds a VAR_DECL.
3656 * parser.c (cp_parser_simple_declaration): When skipping to the
3657 end of the statement swallow the terminating semicolon.
3659 2004-02-02 Mark Mitchell <mark@codesourcery.com>
3662 * init.c (build_offset_ref): Improve error recovery for invalid
3663 uses of non-static member functions.
3666 * cp-tree.h (cp_build_type_attribute_variant): New function.
3667 * class.c (build_clone): Use cp_build_type_attribute_variant.
3668 * decl.c (duplicate_decls): Likewise.
3669 * pt.c (copy_default_args_to_explicit_spec): Likewise.
3670 (tsubst_function_type): Likewise.
3671 * tree.c (build_exception_variant): Check attributes before
3672 concluding that two types are the same.
3673 (cp_build_type-attribute_variant): New method.
3674 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
3677 * call.c (convert_class_to_reference): Keep better track of
3678 pedantically invalid user-defined conversions.
3680 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3683 * pt.c (tsubst_qualified_id): Improved error message when a type
3684 is expected but not found.
3686 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
3688 * class.c: Fix comment typos.
3690 * error.c: Likewise.
3691 * parser.c: Likewise.
3693 * search.c: Likewise.
3694 * typeck.c: Likewise.
3696 2004-01-30 Richard Henderson <rth@redhat.com>
3699 * method.c (use_thunk): Don't force_target_expr for void thunks.
3700 * tree.c (build_target_expr_with_type): Assert non-void type.
3701 (force_target_expr): Likewise.
3703 2004-01-30 Michael Matz <matz@suse.de>
3705 * parser.c (cp_parser_labeled_statement): Accept case ranges.
3707 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3711 * decl.c (grokdeclarator): Check immediatly type completeness for
3712 non-dependent types.
3714 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3717 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
3718 a sizeof expression.block
3720 2004-01-29 Mark Mitchell <mark@codesourcery.com>
3723 * mangle.c (write_encoding): Correct encoding of member template
3726 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3728 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
3729 template name as it was `<::' (digraph typo).
3730 (cp_parser_nth_token_starts_template_argument_list_p): New function.
3731 (cp_parser_id_expression): Use it.
3732 (cp_parser_nested_name_specifier_opt): Likewise.
3733 (cp_parser_template_name): Likewise.
3734 (cp_parser_class_name): Likewise.
3735 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
3737 2004-01-28 Mark Mitchell <mark@codesourcery.com>
3740 * typeck.c (merge_types): Do not merge attributes into
3744 * parser.c (cp_parser_direct_declarator): Do not prevent
3745 backtracking inside a parenthesized declarator.
3746 (cp_parser_parameter_declaration): Fix typo in comment.
3748 2004-01-28 Jan Hubicka <jh@suse.cz>
3750 * semantics.c (expand_body) Do emit_associated_thunks before
3753 2004-01-27 Devang Patel <dpatel@apple.com>
3755 * name-lookup.c: Include "debug.h"
3756 (do_namespace_alias): Invoke debug_hooks to emit debug info
3757 for namespace alias.
3758 (do_local_using_decl): Invoke debug_hooks to emit debug info
3760 (do_class_using_decl): Same.
3761 (do_toplevel_using_decl): Same.
3762 (do_using_directive): Same.
3763 (cp_emit_debug_info_for_using): New function.
3764 * Make-lang.in (cp/parser.o): Depend on debug.h
3765 (cp/name-lookup.o): Same.
3767 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3769 * cp-tree.h (language_function, lang_type_header): Use
3771 * name-lookup.h (cp_binding_level): Likewise.
3773 2004-01-26 Mark Mitchell <mark@codesourcery.com>
3776 * semantics.c (finish_for_expr): Check for unresolved overloaded
3779 * class.c (add_method): Just check processing_template_decl to
3780 determine whether or not we are within a template.
3781 * decl2.c (maybe_retrofit_in_chrg): Likewise.
3782 * init.c (decl_constant_value): Check the type of the declaration,
3784 * name-lookup.c (maybe_push_to_top_level): Rename to ...
3785 (push_to_top_level): ... this.
3786 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
3787 * pt.c (push_template_decl_real): Reorder condition for speed.
3788 (convert_template_argument): Use dependency-checking functions in
3789 place of uses_template_parms.
3790 (lookup_template_class): Avoid calling uses_template_parms more
3792 (uses_template_parms): Reimplement, using dependency-checking
3794 (instantiate_class_template): Use push_to_top_level, not
3795 maybe_push_to_top_level.
3796 (type_unification_real): Simplify.
3797 (type_dependent_expression_p): Handle OFFSET_REFs and
3799 (any_dependent_template_arguments_p): Handle multiple levels of
3801 * semantics.c (expand_or_defer_fn): Do not check
3802 uses_template_parms for template instantiations.
3803 * typeck.c (comptypes): Avoid calling cp_type_quals.
3805 2004-01-25 Mark Mitchell <mark@codesourcery.com>
3808 * call.c (build_over_call): Do not convert arguments when
3809 processing a template.
3810 * pt.c (build_non_dependent_expr): Do not build a
3811 NON_DEPENDENT_EXPR for arithmetic constants.
3813 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3816 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
3817 returns a TYPE_DECL. no further lookup is required.
3818 * semantics.c (check_template_template_default_arg): A TYPE_DECL
3819 is invalid. Rework to give better diagnostics.
3821 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3824 * pt.c (instantiate_class_template): Add an error_mark_node
3826 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
3828 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
3831 * decl.c (finish_function): Move the call to
3832 finish_fname_decls below the call to
3833 finish_eh_spec_block.
3835 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
3837 * optimize.c, typeck2.c: Update copyright.
3839 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
3841 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
3842 init.c, mangle.c, typeck.c: Update copyright.
3844 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
3846 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
3848 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
3850 * Make-lang.in: Replace $(docdir) with doc.
3851 (c++.info, c++.srcinfo): Dummy entry.
3852 (c++.man, c++.srcman): New rules.
3853 (c++.install-man): Revamp rule.
3855 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
3857 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
3858 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
3859 immediate $(shell) instead of deferred backquote.
3861 2004-01-19 Mark Mitchell <mark@codesourcery.com>
3864 * parser.c (cp_parser_postfix_expression): When encountering
3865 incomplete type on left-hand side of "->" or ".", treat the entire
3866 expression as erroneous.
3869 * call.c (build_field_call): Remove.
3870 (n_build_method_call): Likewise.
3871 (build_method_call): Likewise.
3872 (build_new_method_call): Do not call build_field_call.
3873 * class.c (n_build_method_call): Remove.
3874 (print_class_statistics): Do not print it.
3875 * cp-tree.h (build_method_call): Remove declaration.
3876 (finish_object_call_expr): Likewise.
3877 (build_new_1): Do not use build_method_call.
3878 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
3879 when the function appearing on the right-hand-side of "." or "->"
3880 is not actually a function.
3881 * pt.c (tsubst_copy_and_build): Likewise.
3882 * semantics.c (finish_object_call_expr): Remove.
3884 2004-01-18 Mark Mitchell <mark@codesourcery.com>
3887 * pt.c (tsubst): Use finish_typeof.
3889 2004-01-18 Jason Merrill <jason@redhat.com>
3892 * except.c (build_throw): In a template, set
3893 current_function_returns_abnormally.
3895 2004-01-17 Fred Fish <fnf@intrinsity.com>
3898 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
3899 except don't call array_type_nelts() with a VECTOR_TYPE.
3901 2004-01-16 Jan Hubicka <jh@suse.cz>
3903 * mangle.c (write_mangled_name): Remove inline modifier.
3905 2004-01-16 Mark Mitchell <mark@codesourcery.com>
3908 * decl.c (compute_array_index_type): Fix grammar in comment.
3909 * init.c (build_zero_init): Handle zero-sized arrays correctly.
3912 * call.c (name_as_c_string): Print conversion operator names
3916 * call.c (initialize_reference): Pass -1 for inner parameter to
3919 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3922 * parser.c (cp_parser_base_specifier): Check for an invalid
3923 keyword `typename' and emit an user-friendly error message.
3925 2004-01-15 Geoffrey Keating <geoffk@apple.com>
3928 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
3929 (handle_pragma_implementation): Likewise.
3931 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3934 * typeck.c (build_class_member_access_expr): Allow to access members
3935 of the currently open class.
3936 (finish_class_member_access_expr): Likewise.
3938 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
3941 * name-lookup.c (validate_nonmember_using_decl): Take scope and
3942 name by value, instead of computing them.
3943 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
3944 arguments. Pass them to validate_nonmember_using_decl.
3945 * name-lookup.h (do_local_using_decl): Adjust.
3946 (do_toplevel_using_decl): Likewise.
3947 * parser.c (cp_parser_using_declaration): Likewise.
3948 * pt.c (tsubst_expr): Likewise.
3950 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
3954 * name-lookup.c (qualified_lookup_using_namespace): Search
3955 strongly-associated namespaces first, and only then try other
3958 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
3960 * Make-lang.in (c++.srcextra): Dummy entry.
3962 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3965 * parser.c (cp_parser_template_name): Don't try to parse a
3966 conversion-function-id, as it cannot be a template-name.
3967 (cp_parser_simple_type_specifier): Check for invalid template-ids
3968 even after a built-in type.
3970 2004-01-14 Jan Hubicka <jh@suse.cz>
3973 * pt.c (instantiate_decl): Do not increase function_depth.
3975 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
3979 * parser.c (cp_parser_elaborated_type_specifier): Warn about
3980 attributes and discard.
3981 * decl.c (xref_tag): Don't overwite existing attributes with
3984 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3987 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
3988 is no destructor while looking up a BIT_NOT_EXPR.
3990 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
3992 * cxxfilt.c: Remove unused file.
3994 2004-01-14 Jan Hubicka <jh@suse.cz>
3996 Partial fix to PR c++/12850
3997 * decl2.c (mark_used): Do not proactively instantiate templates
3998 when compiling in unit-at-a-time or not optimizing.
3999 * optimize.c (maybe_clone_body): Do not increase function depth.
4001 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4004 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
4006 2004-01-12 Steven Bosscher <stevenb@suse.de>
4009 * parser.c (cp_parser_member_declaration): Any non-type is also
4010 not a class or a function.
4012 2004-01-12 Jason Merrill <jason@redhat.com>
4015 * class.c (build_base_path): Do not mark vtable references as
4017 (build_vtbl_ref_1): Likewise.
4019 2004-01-12 Richard Henderson <rth@redhat.com>
4022 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
4023 (store_init_value): Use it.
4024 * decl.c (check_initializer): Expect full initialization code
4025 from store_init_value.
4026 * init.c (expand_aggr_init_1): Likewise.
4027 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
4029 2004-01-12 Mark Mitchell <mark@codesourcery.com>
4031 * class.c (layout_class_type): For non-POD class types, also copy
4032 the DECL_SIZE and DECL_MODE of fields to the base class type.
4034 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4037 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
4038 calling regenerate_decl_from_template.
4040 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
4043 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
4044 decl-specifier occurring along with a class definition.
4046 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
4048 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
4049 clauses to comments describing declares_class_or_enum.
4050 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
4053 2004-01-12 Jan Hubicka <jh@suse.cz>
4055 * pt.c (for_each_template_parm): Do not check for duplicates.
4056 (for_each_template_parm): Use walk_tree duplicate checking code.
4058 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
4061 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
4062 is error_mark_node, don't add any more decl_specs.
4063 (cp_parser_init_declarator): After committing to a declaration, if
4064 the decl_specifiers start with error_mark_node, issue an error and
4065 change the type to "int".
4067 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
4070 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
4072 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4076 * pt.c (tsubst): Substitution must fail if we are attempting to
4077 create an array with element type that is an abstract class type.
4078 * decl.c (cp_finish_decl): Strip pointers and array types recursively
4079 before calling abstract_virtuals_error.
4081 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
4083 * name-lookup.c (qualified_lookup_using_namespace): Consider
4084 strong using directives even if we've already found a binding.
4086 2004-01-09 Mark Mitchell <mark@codesourcery.com>
4088 * cp-tree.h (cxx_expand_expr): Change prototype.
4089 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
4091 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4094 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
4095 looking into them recursively. They can be there because of the
4096 new __offsetof__ extension.
4098 2004-01-07 Zack Weinberg <zack@codesourcery.com>
4100 * parser.c (cp_parser_save_member_function_body): Mark the
4103 2004-01-05 Mark Mitchell <mark@codesourcery.com>
4106 * class.c (build_clone): Copy type attributes from the original
4107 function to the clone.
4110 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
4111 references as constant.
4114 * parser.c (cp_parser_explicit_instantiation): Improve error
4116 (cp_parser_require): Improve indication of the error location.
4119 * parser.c (cp_parser_class_head): Reorder logic to check for
4120 invalid qualification.
4122 2004-01-04 Mark Mitchell <mark@codesourcery.com>
4125 * name-lookup.c (lookup_using_namespace): Remove spacesp
4127 (unqualified_namespace_lookup): Likewise.
4128 (lookup_qualified_name): Adjust accordingly.
4129 (lookup_name_real): Likewise.
4130 (lookup_arg_dependent): Do not eliminate the namespace of the
4131 functions found by unqualified name lookup unless that is the
4134 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
4136 * semantics.c (push_deferring_access_checks): Fix format.
4137 (resume_deferring_access_checks): Likewise.
4138 (stop_deferring_access_checks): Likewise.
4139 (pop_deferring_access_checks): Likewise.
4140 (get_deferred_access_checks): Likewise.
4141 (pop_to_parent_deferring_access_checks): Likewise.
4142 (perform_deferred_access_checks): Likewise.
4143 (perform_or_defer_access_check): Likewise.
4145 2004-01-04 Richard Henderson <rth@redhat.com>
4147 * call.c (build_over_call): Don't create a save_expr of an
4148 aggregate, but rather its address.
4150 2004-01-04 Mark Mitchell <mark@codesourcery.com>
4153 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
4154 an offsetof expression.
4156 * parser.c (cp_parser_parameter_declaration): Fix comment.
4159 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
4160 (reference_binding): Set it when appropriate.
4161 (build_temp): New function, split out from ...
4162 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
4163 (initialize_reference): Likewise.
4166 * parser.c (cp_parser): Add in_type_id_in_expr_p.
4167 (cp_parser_new): Initialize it.
4168 (cp_parser_postfix_expression): Set it.
4169 (cp_parser_sizeof_operand): Likewise.
4170 (cp_parser_parameteR_declaration): Do not commit early to tenative
4171 parsers when in_type_id_in_expr_p is set.
4173 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4176 * parser.c (cp_parser_template_argument): Don't call
4177 make_unbound_class_template directly.
4178 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
4179 UNBOUND_CLASS_TEMPLATE tree node.
4181 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
4184 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
4186 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4189 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
4190 (DECL_FUNCTION_TEMPLATE_P): Use it.
4191 (DECL_CLASS_TEMPLATE_P): Likewise.
4192 * parser.c (cp_parser_lookup_name): Add is_template parameter.
4193 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
4194 (cp_parser_template_name): Likewise.
4195 (cp_parser_elaborated_type_specifier): Likewise.
4196 (cp_parser_namespace_name): Likewise.
4197 (cp_parser_class_name): Likewise.
4198 (cp_parser_lookup_name_simple): Likewise.
4200 See ChangeLog.3 for earlier changes.