1 2004-08-19 Eric Christopher <echristo@redhat.com>
3 * cp-tree.h (cxx_unsave_expr_now): Delete prototype.
4 * tree.c (cxx_unsave_expr_now): Delete.
7 2004-08-19 Mark Mitchell <mark@codesourcery.com>
10 * pt.c (push_template_decl_real): Disallow template allocation
11 functions with fewer than two parameters.
13 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
15 * cp-tree.h (build_shared_int_cst): Remove.
16 * tree.c (shared_int_cache): Remove.
17 (build_shared_int_cst): Remove.
18 * class.c (finish_struct_1): Use build_int_cst.
20 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
22 * decl.c (finish_enum): Do not copy value node early, copy
24 * lex.c (cxx_init): Force null_node to be unique.
26 2004-08-19 Joseph S. Myers <jsm@polyomino.org.uk>
29 * pt.c (tsubst_copy, tsubst_copy_and_build): Copy TREE_NO_WARNING
30 from input for MODOP_EXPR.
32 2004-08-18 Mark Mitchell <mark@codesourcery.com>
34 * pt.c (dependent_template_p): Fix typo in commment.
37 * pt.c (dependent_template_p): Treat IDENTIFIER_NODEs as
40 2004-08-17 Mark Mitchell <mark@codesourcery.com>
43 * pt.c (unify): Tidy ARRAY_TYPE handling. Make sure that non-type
44 arguments have the same type as the corresponding parameter.
47 * parser.c (cp_parser_name_lookup_error): If parser->object_scope
48 is set use it for diagnostic purposes.
49 (cp_parser_pseudo_destructor_name): Remove special-case error
53 * semantics.c (expand_or_defer_fn): Honor -fkeep-inline-functions.
56 * cp-tree.h (qualified_name_lookup_error): Add parameter.
57 * name-lookup.c (do_class_using_decl): Restrict set of entities
58 passed to cp_emit_debug_info_for_using more carefully.
59 (lookup_qualified_name): Allow lookup_member to return sets of
61 * parser.c (cp_parser_lookup_name): Add ambiguous_p parameter.
62 (cp_parser_primary_expression): Handle ambiguous lookups.
63 (cp_parser_template_name): Adjust use of cp_parser_lookup_name.
64 (cp_parser_template_argument): Likewise.
65 (cp_parser_elaborate_type_specifier): Likewise.
66 (cp_parser_namespace_name): Likewise.
67 (cp_parser_class_name): Likewise.
68 (cp_parser_lookup_name_simple): Likewise.
69 * pt.c (tsubst_qualified_id): Handle ambiguous results.
70 (tsubst_expr): Likewise.
71 * semantics.c (qualified_name_lookup_error): Add decl paramter.
72 For ambiguous lookups, print candidates.
74 2004-08-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
77 * pt.c (instantiate_pending_templates): Add int parameter. Don't
79 * cp-tree.h (instantiate_pending_templates): Adjust prototype.
80 * decl2.c (finish_file): Adjust call to
81 instantiate_pending_templates.
83 2004-08-15 Roger Sayle <roger@eyesopen.com>
85 * call.c (build_vfield_ref, build_call, build_conditional_expr,
86 convert_arg_to_ellipsis, build_x_va_arg, build_over_call,
87 build_java_interface_fn_ref, build_special_member_call,
88 build_new_method_call, initialize_reference): Replace calls to
89 build with calls to buildN.
90 * class.c (build_base_path, convert_to_base_statically,
91 build_vfn_ref, instantiate_type, dfs_accumulate_vtbl_inits,
92 build_vtbl_initializer): Likewise.
93 * cp-gimplify.c (genericize_try_block, genericize_catch_block,
94 gimplify_if_stmt, cp_genericize_r): Likewise.
95 * cvt.c (convert_to_void): Likewise.
96 * decl.c (check_initializer, finish_constructor_body,
97 finish_destructor_body): Likewise.
98 * error.c (dump_expr): Likewise.
99 * except.c (build_exc_ptr, expand_start_catch_block, build_throw):
101 * init.c (perform_member_init, expand_virtual_init,
102 expand_cleanup_for_base, build_init, expand_default_init,
103 build_offset_ref, decl_constant_value, build_new, build_new_1,
104 build_vec_delete_1, build_vec_init, build_delete,
105 push_base_cleanups, build_vec_delete): Likewise.
106 * mangle.c (write_integer_cst): Likewise.
107 * method.c (thunk_adjust, do_build_copy_constructor,
108 do_build_assign_ref): Likewise.
109 * pt.c (lookup_template_function, tsubst, tsubst_copy_and_build,
110 unify, build_non_dependent_expr): Likewise.
111 * rtti.c (build_headof, build_typeid, ifnonnull,
112 build_dyanmic_cast_1, tinfo_base_init): Likewise.
113 * semantics.c (begin_compound_stmt, finish_call_expr,
114 finish_pseudo_destructor_expr, finish_id_expression,
115 simplify_aggr_init_expr, finalize_nrv_r): Likewise.
116 * tree.c (build_target_expr, build_cplus_new, array_type_nelts_top,
117 array_type_nelts_total, stabilize_call): Likewise.
118 * typeck.c (decay_conversion, build_class_member_access_expr,
119 lookup_destructor, build_ptrmemfunc_access_expr, build_array_ref,
120 get_member_function_from_ptrfunc, build_binary_op, pointer_diff,
121 build_x_unary_op, build_unary_op, unary_complex_lvalue,
122 build_compound_expr, build_modify_expr, expand_ptrmemfunc_cst,
123 check_return_expr): Likewise.
124 * typeck2.c (split_nonconstant_1, split_nonconstant_init_1,
125 split_nonconstant_init, store_init_value, build_m_component_ref):
128 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
130 * call.c (convert_class_to_reference,
131 build_user_type_conversion_1, convert_like_real,
132 build_java_interface_fn_ref, build_special_member_call): Use
134 * class.c (build_vtbl_initializer): Likewise.
135 * cp-gimplify.c (cp_gimplify_expr): Likewise.
136 * cvt.c (cp_convert_to_pointer): Likewise.
137 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
138 * decl2.c (start_static_initialization_or_destruction,
139 generate_ctor_or_dtor_function): Likewise.
140 * except.c (build_throw): Likewise.
141 * lex.c (cxx_init): Likewise.
142 * mangle.c (write_integer_cst): Likewise.
143 * rtti.c (build_headof, get_tinfo_decl_dynamic,
144 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
145 get_pseudo_ti_init): Likewise.
146 * search.c (get_dynamic_cast_base_type): Likewise.
147 * tree.c (build_shared_int_cst): Likewise.
149 2004-08-12 Mark Mitchell <mark@codesourcery.com>
152 * class.c (count_depth_data): New type.
153 (dfs_depth_post): New function.
154 (dfs_depth_q): Likewise.
155 (find_final_overrider_data_s): Change type of vpath.
157 (dfs_find_final_overrider_1): New function.
158 (dfs_find_final_overrider): Use it.
159 (dfs_find_final_overrider_q): Adjust use of vpath.
160 (dfs_find_final_overrider_post): Likewise.
161 (find_final_overrider): Use dfs_depth. Allocate and deallocate
164 2004-08-12 Jan Beulich <jbeulich@novell.com>
166 * parser.c (cp_parser_asm_definition): Properly consume scope operator
167 tokens preceding the clobbers. Don't check for scope operator
168 following inputs. Simplify inputs handling to match that now used for
171 2004-08-11 Mark Mitchell <mark@codesourcery.com>
174 * except.c (build_throw): Allocate cleanup_type and the function
175 for __cxa_throw separately.
178 * call.c (standard_conversion): Do not accept conversions between
179 pointers to members if the class types are unrelated.
182 * parser.c (cp_parser_builtin_offsetof): Cast to "const volatile
183 char &" instead of just "char &".
186 * pt.c (tsubst): Just return the unknown_type_node.
188 2004-08-11 Mark Mitchell <mark@codesourcery.com>
191 * parser.c (cp_parser_class_specifier): Robustify.
194 * pt.c (tsubst_copy_and_build): Complain about invalid
198 * pt.c (tsubst_default_argument): Clear out current_class_ptr and
199 current_class_ref while tsubsting.
201 2004-08-10 Mark Mitchell <mark@codesourcery.com>
204 * parser.c (cp_parser_init_declarator): Robustify.
206 2004-08-06 Richard Sandiford <rsandifo@redhat.com>
208 * typeck2.c (process_init_constructor): Guard the missing field warning
209 with warn_missing_field_initializers rather than extra_warnings.
211 2004-08-06 Paolo Bonzini <bonzini@gnu.org>
213 * class.c (instantiate_type) <ENTRY_VALUE_EXPR>: Do not handle.
215 2004-08-05 Mark Mitchell <mark@codesourcery.com>
217 * decl.c (start_preparsed_function): Move determine_visibility
219 * decl2.c (determine_visibility): Incorporate dllexport testing.
221 2004-08-05 Geoffrey Keating <geoffk@apple.com>
223 * g++spec.c (lang_specific_driver): An -Xlinker or -Wl, option
224 means that libstdc++ is needed.
226 2004-08-05 Nathan Sidwell <nathan@codesourcery.com>
228 * cvt.c (cp_convert_to_pointer): Adjust force_fit_type call.
230 2004-08-04 Geoffrey Keating <geoffk@apple.com>
232 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_ASSEMBLER_NAME rather
233 than passing it as a parameter to rest_of_decl_compilation.
234 * decl2.c (grokfield): Use set_user_assembler_name.
236 2004-08-04 Nathan Sidwell <nathan@codesourcery.com>
238 * decl.c (complete_array_type): Don't gratuitously copy
239 maxindex. Its type is always set.
241 2004-08-04 Paul Brook <paul@codesourcery.com>
243 * Make-lang.in (cp/semantics.o, cp/optimize.o): Depend on TARGET_H.
244 * cp-tree.h (struct language_function): Rename x_dtor_label to
246 (dtor_label): Rename ...
247 (cdtor_label): ... to this.
248 * decl.c (begin_constructor_body): Remove.
249 (check_special_function_return_type): Maybe change the return type.
250 (grokdeclarator): Pass the class type.
251 (start_preparsed_function): Constructors may need a return label.
252 (finish_constructor_body, finish_destructor_body): Set the return
254 (begin_function_body): Don't call begin_constructor_body.
255 (finish_function): Don't warn for constructors or destructors.
256 (implicitly_declare_fn): Maybe change the return type.
257 * optimize.c: Include target.h.
258 (maybe_clone_body): Remap the function result.
259 * semantics.c: Include target.h.
260 (finish_return_stmt): Maybe jump to return label for constructors.
262 2004-08-03 Mark Mitchell <mark@codesourcery.com>
264 * class.c (build_vtable): Do not set DECL_VISIBILITY here.
265 (check_field_decls): Or here.
266 (check_methods): Or here.
267 (initialize_array): Don't mess with DECL_CONTEXT.
268 * cp-tree.h (start_decl): Adjust prototype.
269 (determine_visibility): New function.
270 * decl.c (duplicate_decls): Remove checks for hidden "operator
272 (build_library_fn_1): Give all library functions default
274 (start_decl): Add pop_scope_p parameter. Tidy.
275 (cp_finish_decl): Do not pop scopes here. Call
276 determine_visibility for variable definitions.
277 (start_preparsed_function): Call determine_visibility.
278 * decl2.c (determine_visibility): New function.
279 * method.c (use_thunk): Fix formatting.
280 * parser.c (cp_parser_condition): Adjust calls to start_decl.
281 (cp_parser_init_declarator): Likewise.
282 * pt.c (instantiate_decl): Always call pop_nested_class.
283 * rtti.c (get_tinfo_decl): Do not set DECL_VISIBILITY.
284 (tinfo_base_init): Likewise.
286 2004-08-02 Mark Mitchell <mark@codesourcery.com>
289 * name-lookup.c (validate_nonmember_using_decl): Robustify.
291 2004-08-01 Mark Mitchell <mark@codesourcery.com>
294 * name-lookup.c (decl_namespace): Remove.
295 (current_decl_namespace): Use decl_namespace_context instead of
297 (push_decl_namespace): Likewise.
298 (arg_assoc_class): Likewise.
299 (arg_assoc_type): Likewise.
300 * pt.c (check_specialization_namespace): New function.
301 (maybe_process_partial_specialization): Use it.
302 (register_specialization): Likewise.
305 * cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): New macro.
306 * call.c (null_ptr_cst_p): Handle variables with constant
308 * pt.c (convert_nontype_argument): Use
309 DECL_INTEGRAL_CONSTANT_VAR_P.
310 * semantics.c (finish_id_expression): Likewise.
313 * decl.c (duplicate_decls): Reject duplicate namespace
317 * typeck.c (build_ptrmemfunc): Loosen assertion.
319 2004-08-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
321 * call.c (z_candidate::template_decl): Rename from template.
322 (add_template_candidate_real): Adjust member reference.
325 2004-07-29 Mark Mitchell <mark@codesourcery.com>
327 * cp-tree.h (IDENTIFIER_REPO_CHOSEN): Define.
328 (lang_decl_flags): Narrow the width of "languages". Add
330 (DECL_NEEDED_P): Remove.
331 (FOR_EACH_CLONE): New macro.
332 (DECL_REPO_AVAILABLE_P): Likewise.
333 (DECL_TINFO_P): Likewise.
334 (set_linkage_according_to_type): Declare.
335 (import_export_vtable): Remove.
336 (import_export_tinfo): Likewise.
337 (mark_needed): New function.
338 (decl_needed_p): Likewise.
339 (note_vauge_linkage_fn): Likewise.
340 (init_repo): Change prototype.
341 (repo_template_used): Remove.
342 (repo_template_instantiated): Likewise.
343 (repo_emit_p): New function.
344 (repo_export_class_p): Likewise.
345 (no_linkage_check): Change prototype.
346 * class.c (set_linkage_according_to_type): New function.
347 (build_vtable): Use it. Do not call import_export_vtable. Set
348 DECL_IGNORED_P if appropriate.
349 * decl.c (duplicate_decls): Preserve DECL_REPO_AVAILABLE_P.
350 (make_rtL_for_nonlocal_decls): Check for template instantiations
352 (grokfndecl): Adjust call to no_linkage_check.
353 (set_linkage_for_static_data_member): New function.
354 (grokvardecl): Use it. Adjust call to no_linkage_check.
355 (grokdeclarator): Use set_linkage_for_static_data_member.
356 * decl2.c (note_vague_linkage_fn): New function.
357 (note_vague_linkage_var): Likewise.
358 (finish_static_data_member_decl): Use it.
359 (import_export_vtable): Remove.
360 (import_export_class): Use repo_export_class_p.
361 (var_finalized_p): Simplify.
362 (maybe_emit_vtables): Simplify.
363 (mark_needed): New function.
364 (decl_needed_p): Likewise.
365 (import_export_decl): Add documentation and consistency checks.
366 Use repo_emit_p. Handle virtual tables and RTTI information
368 (import_export_tinfo): Remove.
369 (write_out_vars): Call import_export_decl.
370 (cxx_callgraph_analyze_expr): Ensure that all vtables are emitted
372 (finish_file): Use decl_needed_p. Do not call import_export_decl
373 for undefined static data members. Do not warn about undefined
374 inlines when using a repository.
375 (mark_used): Use note_vague_linkage_fn. Always defer template
377 * lex.c (cxx_init): Adjust call to init_repo. Always set
379 * method.c (synthesize_method): Remove unncessary
380 import_export_decl call.
381 (implicitly_declare_fn): Use set_linkage_according_to_type.
382 * optimize.c (maybe_clone_body): Use FOR_EACH_CLONE.
383 * pt.c (instantiate_class_template): Don't redundantly add classes
384 to keyed_classes. Don't call repo_template_used.
385 (tsubst_decl): Set DECL_INTERFACE_KNOWN for instantiations of
386 templates with internal linkage.
387 (check_instantiated_args): Adjust call to no_linkage_check.
388 (instantiate_template): Use FOR_EACH_CLONE.
389 (mark_definable): New function.
390 (mark_decl_instantiated): Use it.
391 (do_decl_instantiation): Adjust tests for explicit instantiation
392 after "extern template".
393 (instantiate_class_member): Do not use repo_template_instantiated.
394 (do_type_instantiation): Simplify.
395 (instantiate_decl): Use mark_definable. Check repo_emit_p.
397 * repo.c (repo_get_id): Remove.
398 (original_repo): Remove.
399 (IDENTIFIER_REPO_USED): Remove.
400 (IDENTIFIER_REPO_CHOSEN): Remove.
401 Remove all #if 0'd code.
402 (repo_template_used): Remove.
403 (repo_template_instantiated): Remove.
404 (temporary_obstack_initialized_p): New variable.
405 (init_repo): Register with lang_post_pch_load. Avoid creating
406 identifiers unnecessarily. Don't use original_repo. Close the
408 (reopen_repo_file_for_write): Not here.
409 (finish_repo): Always write out a new repository file.
410 (repo_emit_p): New function.
411 (repo_export_class_p): Likewise.
412 * rtti.c (get_tinfo_decl): Use set_linkage_according_to_type.
413 (involves_incomplete_p): New function.
414 (tinfo_base_init): Use it.
415 (ptr_initializer): Remove non_public_ptr parameter.
416 (ptm_initializer): Likewise.
417 (get_pseudo_ti_init): Likewise.
418 (unemitted_tinfo_decl_p): Remove.
419 (emit_tinfo_decl): Use import_export_decl.
420 * semantics.c (expand_body): Move updates of static_ctors and
422 (expand_or_defer_fn): ... here.
423 * tree.c (no_linkage_check): Add relaxed_p parameter.
425 2004-07-28 Eric Christopher <echristo@redhat.com>
427 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
429 2004-07-28 Nathan Sidwell <nathan@codesourcery.com>
431 * cp-tree.h (struct tree_pair_s): New.
432 (typedef tree_pair_p): New.
433 (DEF_VEC_O(tree_pair_s)): New.
434 (struct lang_type_class): Make vcall_indices a VEC(tree_pair_s).
435 (CLASSTYPE_VCALL_INDICES): Update documentation.
436 * class.c (get_vcall_index): Adjust.
437 (add_vcall_offset): Adjust.
439 2004-07-27 Kelley Cook <kcook@gcc.gnu.org>
441 * pt.c, typeck.c: Remove spurious carriage returns.
443 2004-07-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
446 * pt.c (coerce_template_template_parms) <PARM_DECL case>: Only check
447 when the type of ARG is not dependent.
449 2004-07-26 Geoffrey Keating <geoffk@apple.com>
451 * g++spec.c (LIBSTDCXX_PROFILE): Default to LIBSTDCXX.
452 (lang_specific_driver): If the C++ or math library options don't
453 start with '-l', don't count them as added libraries.
455 2004-07-26 Nathan Sidwell <nathan@codesourcery.com>
457 * decl.c (xref_basetypes): Adjust base access vector creation.
458 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Adjust base
460 * search.c (dynamic_cast_base_recurse, dfs_access_in_type): Likewise.
462 2004-07-26 Niall Douglas <s_fsfeurope2@nedprod.com>
463 Brian Ryner <bryner@brianryner.com>
467 * class.c (check_field_decls): Apply hidden visibility if
468 -fvisibility-inlines-hidden and inlined unless otherwise specified
469 (build_vtable): Set vtable visibility to class visibility.
470 (check_field_decls): Default static member visibility to class
472 (check_methods): Default method visibility to class visibility.
473 * cp-tree.h: Added CLASSTYPE_VISIBILITY and
474 CLASSTYPE_VISIBILITY_SPECIFIED macro.
475 * decl.c (duplicate_decls): New logic for merging definition decls
476 with declaration decls. Added ignore & warning when non default
477 applied to global operator new or delete.
478 * method.c, optimize.c, rtti.c: Added setting of VISIBILITY_SPECIFIED
479 wherever VISIBILITY was changed
480 * rtti.c (get_tinfo_decl): Set typeinfo visibility to class
482 (tinfo_base_init): Set typeinfo name visibility to class visibility.
484 2004-07-25 Bernardo Innocenti <bernie@develer.com>
486 * decl.c: Rename all identifiers named `class' to `cl'.
487 * cp-tree.h: Likewise.
489 2004-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
491 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Use GGC_CNEW.
492 * typeck2.c (abstract_virtuals_error): Use GGC_NEW.
493 * name-lookup.c (binding_entry_make): Use GGC_NEW.
494 (binding_table_construct): Use GGC_CNEWVEC.
495 (binding_table_new): Use GGC_NEW.
496 (cxx_binding_make): Likewise.
497 (begin_scope): Likewise.
498 (push_to_top_level): Use GCC_CNEW.
499 * parser.c (cp_token_cache_new): Likewise.
500 (cp_token_cache_push_token): Likewise.
501 (cp_lexer_new_main): Likewise.
502 (cp_lexer_new_from_tokens): Likewise.
503 (cp_parser_context_new): Likewise.
504 (cp_parser_new): Likewise.
505 (cp_lexer_new_from_tokens): Use GGC_NEWVEC.
506 * lex.c (cxx_make_type): Use GGC_CNEW.
507 (retrofit_lang_decl): Use GGC_NEWVAR.
508 (cxx_dup_lang_specific_decl): Likewise.
509 (copy_lang_type): Likewise.
510 * decl.c (use_label): Use GGC_NEW instead of ggc_alloc.
511 (save_function_data): Likewise.
512 (lookup_label): Use GGC_CNEW instead of ggc_alloc_cleared.
513 (cxx_push_function_context): Likewise.
515 2004-07-25 Richard Henderson <rth@redhat.com>
517 * decl.c (start_preparsed_function): Set DECL_ARTIFICIAL and
518 DECL_IGNORED_P on RESULT_DECL.
519 * semantics.c (finalize_nrv): Copy them too.
521 2004-07-23 Nathan Sidwell <nathan@codesourcery.com>
523 * search.c (lookup_conversion_operator): Avoid two loops.
524 (add_conversions): Remove.
525 (check_hidden_convs, split_conversions,
526 lookup_conversions_r): New.
527 (lookup_conversions): Use lookup_conversions_r.
529 2004-07-22 Nathan Sidwell <nathan@codesourcery.com>
531 * pt.c (get_template_base): Check type is completable.
533 2004-07-21 Eric Christopher <echristo@redhat.com>
535 * decl.c (poplevel): Inline unused variable checking.
538 2004-07-21 Paolo Bonzini <bonzini@gnu.org>
540 * typeck.c (build_binary_op): Do not use RDIV_EXPR for
543 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
546 * pt.c (check_explicit_specialization): Remove extension to accept
547 specializations without template headers. Fall-through to normal
550 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
553 * pt.c (determine_specialization): New parameter template_count.
554 Disambiguate between member templates and member functions counting
555 the template headers.
556 (check_explicit_specialization): Update caller.
557 (tsubst_friend_function): Likewise.
559 2004-07-20 Steven Bosscher <stevenb@suse.de>
561 * cp-tree.def (TINST_LEVEL): Make it an 'x' node.
562 * cp-tree.h (tinst_level_t): New tree type.
563 (union lang_tree_node): Handle it.
564 (TINST_LOCATION): New accessor macro.
565 (make_tinst_level): New prototype.
566 * cp-lang.c (cp_tree_size): Handle TINST_LEVEL.
567 * decl.c (cp_tree_node_structure): Likewise.
568 * error.c (print_instantiation_full_context): Use TINST_LOCATION.
569 (print_instantiation_partial_context): Likewise.
570 * pt.c (pop_tinst_level): Likewise.
571 (push_tinst_level): Use make_tinst_level.
572 * tree.c (make_tinst_level): New function.
573 (cp_walk_subtrees): Walk TINST_DECL for a TINST_LEVEL node.
575 2004-07-20 Mark Mitchell <mark@codesourcery.com>
577 * parser.c (cp_parser_simple_type_specifier): Fix typo.
580 * parser.c (cp_parser_simple_type_specifier): Do not record usage
581 of globally-qualified names.
583 2004-07-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
586 * error.c (dump_type) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Output
589 2004-07-19 Mark Mitchell <mark@codesourcery.com>
592 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
593 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
594 * class.c (add_implicitly_declared_members): Use
595 CLASSTYPE_LAZY_ASSIGNMENT_OP.
596 * method.c (lazily_declare_fn): Clear
597 CLASSTYPE_LAZY_ASSIGNMENT_OP.
598 * search.c (lookup_fnfields_1): Check it.
600 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
602 * cp-tree.h (vec_binfo_member): Remove.
603 * tree.c (vec_binfo_member): Remove.
605 * cp-tree.h (struct lang_type_class): Remove vfields field.
606 (CLASSTYPE_VFIELDS): Remove.
607 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
608 * class.c (determine_primary_base): Remove CLASSTYPE_VFIELDS
610 (dfs_modify_vtables): Use TYPE_CONTAINS_VPTR_P.
611 (finish_struct_1): Remove CLASSTYPE_VFIELDS handling.
612 * init.c (dfs_initialize_vtbl_ptrs): Use TYPE_CONTAINS_VPTR_P.
614 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
616 * cp-tree.h (DEF_VEC_P(tree)): Remove here.
617 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
619 (BINFO_LANG_SLOTS): Remove.
620 * tree.c (copy_binfo): Adjust BINFO creation and accessors.
621 * decl.c (xref_basetypes): Adjust BINFO creation and accessors.
622 * class.c (check_bases): Adjust BINFO accessors.
623 (determine_primary_base, finish_struct_bits,
624 maybe_warn_about_overly_private_class, warn_hidden,
625 walk_subobject_offsets, propagate_binfo_offsets, end_of_class,
626 warn_about_ambiguous_bases, get_vfield_name,
627 dump_class_hierarchy_r, build_vtt_inits, accumulate_vtbl_inits,
628 add_vcall_offset_vtbl_entries_r): Likewise.
629 * dump.c (cp_dump_tree): Likewise.
630 * init.c (sort_mem_initializers, expand_member_init, build_delete,
631 push_base_cleanups): Likewise.
632 * method.c (do_build_copy_constructor, do_build_assign_ref,
633 synthesize_exception_spec): Likewise.
634 name-lookup.c (arg_assoc_class): Likewise.
635 * pt.c (instantiate_class_template,
636 get_template_base_recursive): Likewise.
637 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Likewise.
638 * typeck2.c (process_init_constructor): Likewise.
639 * search.c (lookup_base_r, dynamic_cast_base_recurse,
640 dfs_access_in_type, dfs_walk_real, look_for_overrides,
641 types_overlap_p, copied_binfo, original_binfo): Likewise.
642 (binfo_for_vtable): Remove
644 2004-07-20 Steven Bosscher <stevenb@suse.de>
646 * cp-tree.h (struct lang_decl_flags): Unify the template_info and
647 thunk_alias, and the access and virtual_offset fields.
648 (THUNK_VIRTUAL_OFFSET, THUNK_ALIAS): Adjust.
649 * decl.c (finish_case_label): Update c_add_case_node call.
651 2004-07-19 Mark Mitchell <mark@codesourcery.com>
653 Revert patch for PR c++/16623.
655 2004-07-19 Kelley Cook <kcook@gcc.gnu.org>
657 * except.c: Remove two spurious carriage returns.
659 2004-07-19 Mark Mitchell <mark@codesourcery.com>
662 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
663 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
664 * class.c (add_implicitly_declared_members): Use
665 CLASSTYPE_LAZY_ASSIGNMENT_OP.
666 * method.c (lazily_declare_fn): Clear
667 CLASSTYPE_LAZY_ASSIGNMENT_OP.
668 * search.c (lookup_fnfields_1): Check it.
670 2004-07-19 Nathan Sidwell <nathan@codesourcery.com>
672 * class.c (add_method): Delay adding the slot until the end.
673 (determine_primary_base): Adjust VEC_iterate invokation.
674 (resort_type_method_vec, finish_struct_methods, warn_hidden,
675 walk_subobject_offsets, end_of_class, warn_about_ambiguous_bases,
676 build_vtbl_initializer): Likewise.
677 * init.c (sort_mem_initializers, build_delete, push_base_cleanups,
678 build_vbase_delete): Likewise.
679 * method.c (do_build_copy_constructor): Likewise.
680 * name-lookup.c (new_class_binding, print_binding_level,
681 poplevel_class, store_class_bindings, push_to_top_level,
682 pop_from_top_level): Likewise.
683 * pt.c (check_explicit_specialization): Likewise.
684 * search.c (lookup_conversion_operator, lookup_fnfields_1,
685 get_pure_virtuals, add_conversions, dfs_check_overlap,
686 binfo_for_vbase): Likewise.
688 2004-07-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
691 * pt.c (unify) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Use only
692 innermost set of template arguments during deduction. Simplify.
694 2004-07-19 Joseph S. Myers <jsm@polyomino.org.uk>
696 * typeck.c (build_modify_expr, build_x_modify_expr): Set
697 TREE_NO_WARNING on assignments with an operator other than '='.
699 2004-07-10 Steven Bosscher <stevenb@suse.de>
700 Joseph S. Myers <jsm@polyomino.org.uk>
702 * cp-tree.h (C_SET_EXP_ORIGINAL_CODE): Remove.
703 * decl2.c (grokfield): Don't check current_class_depth via
704 unused TREE_COMPLEXITY.
705 * semantics.c (finish_parenthesized_expr): Set TREE_NO_WARNING
706 to avoid the missing parentheses warning.
707 Don't set C_SET_EXP_ORIGINAL_CODE.
709 2004-07-18 Mark Mitchell <mark@codesourcery.com>
711 * tree.c (no_linkage_helper): Remove.
712 (no_linkage_check): Don't use walk_tree_without_duplicates.
714 * mangle.c (write_expression): Issue a sorry for zero-operand
717 2004-07-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
720 * init.c (build_offset_ref): Build SCOPE_REF with non-null
721 TREE_TYPE for non-dependent names.
722 * typeck.c (build_x_unary_op): Handle non-dependent SCOPE_REF.
723 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
724 unknown_type_node as its TREE_TYPE.
725 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
726 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
727 (dump_expr) <SCOPE_REF case>: Likewise.
729 2004-07-17 Jason Merrill <jason@redhat.com>
732 * call.c (type_passed_as): Make the invisible reference type
734 * cp-gimplify.c (gimplify_cleanup_stmt): Rename to
735 cp_genericize_r. Handle invisible reference lowering.
736 (is_invisiref_parm): New fn.
737 (cp_genericize): Adjust the types of invisible reference parms.
738 Don't repeat the walk for clones.
739 * decl.c (store_parm_decls): Don't generate any code for clones.
741 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
743 * cp-tree.h (builtin_function): Declare.
745 2004-07-16 Mark Mitchell <mark@codesourcery.com>
747 * class.c (finish_struct_methods): Remove unncessary code.
748 (add_implicitly_declared_members): Create declarations for default
749 constructors and copy constructors lazily.
750 * cp-tree.h (lang_type_class): Remove lazy_default_ctor and
752 (CLASSTYPE_LAZY_DEFAULT_CTOR): New macro.
753 (CLASSTYPE_LAZY_COPY_CTOR): Likewise.
754 * decl2.c (check_classfn): Robustify.
755 (locate_dtor): Handle empty CLASSTYPE_METHOD_VEC.
756 (locate_ctor): Handle lazy default constructors.
757 (locate_copy): Handle lazy copy constructors.
758 (implicitly_declare_fn): Make sure we're looking at the
759 TYPE_MAIN_VARIANT for a class before creating functions. Don't
760 set TYPE_HAS_CONSTRUCTOR.
761 (lazily_declare_fn): New function.
762 * name-lookup.c (constructor_name_full): Simplify.
763 * search.c (lookup_fnfields_1): Lazily create methods, as
765 (lookup_for_overrides): Handle empty CLASSTYPE_METHOD_VEC.
767 2004-07-16 Steven Bosscher <stevenb@suse.de>
769 * cp-tree.h (struct lang_type): Don't have three GTY options on a
772 2004-07-16 Richard Henderson <rth@redhat.com>
774 * cp-lang.c (LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING): Die.
775 * cp-tree.h (cp_copy_res_decl_for_inlining): Remove.
776 * tree.c (cp_copy_res_decl_for_inlining): Remove.
778 2004-07-16 Nathan Sidwell <nathan@codesourcery.com>
780 * class.c (finish_struct_bits): Use for loop.
781 (propagate_binfo_offsets): Do primary binfo outside of loop.
784 * dump.c (cp_dump_tree): Don't dump the bases if there's no
787 * pt.c (tsubst) <TREE_BINFO case>: We should never get here.
789 2004-07-15 Mark Mitchell <mark@codesourcery.com>
791 * cp-tree.h (lang_type_class): Remove has_real_assign_ref and
792 has_abstract_assign_ref. Make methods a VEC(tree) *.
793 (TYPE_HAS_CONST_ASSIGN_REF): Add documentation.
794 (CLASSTYPE_CONSTRUCTORS): Adjust for changes to CLASSTYPE_METHOD_VEC.
795 (CLASSTYPE_DESTRUCTORS): Likewise.
796 (TYPE_HAS_REAL_ASSIGN_REF): Remove.
797 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
798 (add_method): Change prototoype.
799 * class.c (add_method): Remove error_p parameter. Adjust for
800 changes to CLASSTYPE_METHOD_VEC.
801 (handle_using_decl): Adjust call to add_method.
802 (maybe_warn_about_overly_private_class): Adjust for
803 changes to CLASSTYPE_METHOD_VEC.
804 (resort_type_method_vec): Likewise.
805 (finish_struct_methods): Likewise.
806 (check_for_override): Likewise.
807 (warn_hidden): Likewise.
808 (add_implicitly_declared_members): Defer creation of assignment
809 operators. Adjust call to add_method.
810 (clone_function_decl): Adjust call to add_method.
811 (check_bases_and_members): Don't set TYPE_HAS_REAL_ASSIGN_REF.
812 (finish_struct_1): Use CLASSTYPE_DESTRUCTORS.
813 * decl.c (grok_special_member_properties): Don't set
814 TYPE_HAS_ABSTRACT_ASSIGN_REF.
815 * decl2.c (check_classfn): Adjust for
816 changes to CLASSTYPE_METHOD_VEC.
817 * method.c (locate_dtor): Use CLASSTYPE_DESTRUCTORS.
818 (locate_ctor): Use CLASSTYPE_CONSTRUCTORS.
819 (locate_copy): Adjust for changes to CLASSTYPE_METHOD_VEC.
820 (implicitly_declare_fn): Set DECL_SOURCE_LOCATION. Do not call
822 * pt.c (check_explicit_specialization): Adjust for
823 changes to CLASSTYPE_METHOD_VEC.
824 (instantiate_class_template): Do not set
825 TYPE_HAS_ABSTRACT_ASSIGN_REF.
826 * ptree.c (cxx_print_type): Don't try to print
827 CLASSTYPE_METHOD_VEC.
828 * rtti.c (emit_support_tinfos): Use CLASSTYPE_DESTRUCTORS.
829 * search.c (lookup_field_r): Adjust for
830 changes to CLASSTYPE_METHOD_VEC.
831 (lookup_fnfields): Likewise.
832 (lookup_conversion_operator): Likewise.
833 (lookup_fnfields_1): Likewise. Create assignment operators
835 (look_for_overrides_here): Adjust for
836 changes to CLASSTYPE_METHOD_VEC.
837 (add_conversions): Likewise.
838 * semantics.c (finish_member_declaration): Adjust call to add_method.
840 2004-07-15 Jason Merrill <jason@redhat.com>
842 * cp-lang.c (cxx_types_compatible_p): To the middle-end,
843 references and pointers are compatible.
845 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
847 * decl.c (xref_basetypes): Refactor.
848 * tree.c (copy_base_binfos): Replace with ...
849 (copy_binfo): ... this. Deep copy the given binfo, (not the just
850 bases of the given base).
851 * cp-tree.h (copy_base_binfo): Remove.
852 (copy_binfo): Declare.
854 2004-07-15 Mark Mitchell <mark@codesourcery.com>
856 * name-lookup.c (set_inherited_value_binding_p): Add class_type
858 (get_class_binding): Adjust.
859 (push_class_level_binding): Don't use set_inherited_value_binding_p.
861 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
863 * class.c (finish_struct_bits): Don't set TYPE_HAS_CONVERSION here.
864 * decl.c (xref_basetypes): Set it here.
866 * class.c (check_bases): Don't set CLASSTYPE_NON_AGGREGATE here.
867 Don't check for incomplete base.
868 (get_vfield_name): Simplify while loop.
869 * decl.c (xref_basetypes): Set CLASSTYPE_NON_AGGREGATE here.
871 2004-07-14 Mark Mitchell <mark@codesourcery.com>
873 * lex.c (cxx_make_type): Remove call to get_pointer_type.
875 * cp-tree.h (IDENTIFIER_VALUE): Remove.
876 (BINFO_PUSHDECLS_MARKED): Likewise.
877 (maybe_inject_for_scope_var): Likewise.
878 (push_class_decls): Likewise.
879 * name-lookup.h (push_class_binding): Remove.
880 (innermost_non_namespace_value): New function.
881 (outer_binding): Likewise.
882 * class.c (add_method): Push bindings before adding to
884 (restore_class_cache): Do not restore class_shadowed.
885 (pushclass): Do not add USING_DECLs. Do not call
887 * config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c.
888 * decl.c (pushdecl): Use outer_binding.
889 (poplevel): Set the scope for an out-of-scope for-loop declaration
891 (cp_finish_decl): Don't call maybe_inject_for_scope_var.
892 * name-lookup.c (new_class_binding): New function.
893 (push_binding): Use it.
894 (pushdecl): Use innermost_non_namespace_value.
895 (maybe_inject_for_scope_var): Remove.
896 (push_class_binding): Remove.
897 (set_inherited_value_binding_p): New function.
898 (get_class_binding): New function.
899 (push_class_level_binding): Assert that the current_class_type is
901 (outer_binding): New function.
902 (innermost_non_namespace_value): Likewise.
903 (lookup_name_real): Use outer_binding.
904 (lookup_name_current_level): Ignore out-of-scope variables.
905 * pt.c (check_template_shadow): Use innermost_non_namespace_value.
906 (lookup_template_class): Likewise.
907 * search.c (dfs_push_type_decls): Remove.
908 (dfs_push_decls): Likewise.
909 (setup_class_bindings): Likewise.
910 (lookup_field_1): Handle USING_DECLs from dependent scopes.
911 (marked_pushdecls_p): Remove.
912 (unmarked_pushdecls_p): Remove.
913 (marked_identifiers): Remove.
914 (setup_class_bindings): Remove.
915 (dfs_push_type_decls): Remove.
916 (dfs_push_decls): Remove.
917 (push_class_decls): Remove.
919 2004-07-13 Mark Mitchell <mark@codesourcery.com>
923 * decl.c (grokvardecl): Make declspecs parameter const.
924 (grokdeclarator): Likewise. Adjust accordingly.
925 * decl.h (grokdeclarator): Adjust declaration.
926 * parser.c (cp_parser_init_declarator): Do not clear
927 decl_specifiers->attributes.
929 * cp-tree.h (lang_identifier): Remove class_value.
930 (IDENTIFIER_CLASS_VALUE): Remove.
931 (pop_class_decls): Likewise.
932 (init_search_processing): Likewise.
933 * class.c (handle_using_decl): Use lookup_member, not
934 IDENTIFIER_CLASS_VALUE.
935 (restore_class_cache): New function, split out from ...
936 (pushclass): ... here. Do not call clear_identifier_class_values.
937 (invalidate_class_lookup_cache): Do not clear
938 IDENTIFIER_CLASS_VALUE.
939 (popclass): Do not call pop_class_decls.
940 (maybe_note_name_used_in_class): Do not save names looked up after
941 the class is complete. Use lookup_member, not
942 IDENTIFIER_CLASS_VALUE.
943 * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
944 * decl.c (cxx_init_decl_processing): Do not call
945 init_search_processing.
946 * method.c (do_build_copy_constructor): Remove unnecessary code.
947 (do_build_assign_ref): Likewise.
948 * name-lookup.c (pushdecl): Use lookup_member, not
949 IDENTIFIER_CLASS_VALUE.
950 (set_identifier_type_value_with_scope): Set TREE_TYPE on the
952 (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
953 (push_class_binding): Do not set it.
954 (clear_identifier_class_values): Remove.
955 (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
956 (store_binding): Do not save it.
957 (pop_from_top_level): Do not restore it.
958 * name-lookup.h (cxx_saved_binding): Remove class_value.
959 (clear_identifier_class_values): Remove.
960 * ptree.c (cxx_print_identifier): Do not print
961 IDENTIFIER_CLASS_VALUE.
962 * search.c (search_obstack): Remove.
963 (push_stack_level): Remove.
964 (pop_stack_level): Remove.
965 (search_level): Remove.
966 (search_stack): Remove.
967 (lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
968 (setup_class_bindings): Use IDENTIFIER_MARKED, not
969 IDENTIFIER_CLASS_VALUE.
970 (marked_identifiers): New variable.
971 (push_class_decls): Clear IDENTIFIER_MARKED.
972 (pop_class_decls): Don't call pop_search_level.
973 (init_search_processing): Remove.
975 2004-07-12 Mark Mitchell <mark@codesourcery.com>
977 * cp-tree.h (get_aggr_typedef): Remove.
978 * init.c (get_aggr_typedef): Likewise.
980 * name-lookup.c (push_class_level_binding): Simplify.
982 2004-07-12 Andrew Pinski <apinski@apple.com>
986 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
988 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
991 2004-07-12 Eric Christopher <echristo@redhat.com>
993 * parser.c (cp_parser_class_head): Remove unused variable.
995 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
997 * decl.c (grok_op_properties): Reject [de-]allocation functions
998 declared in a namespace, or declared as static.
1000 2004-07-12 Nathan Sidwell <nathan@codesourcery.com>
1002 * cp-tree.h (make_binfo): Remove.
1003 * decl.c (xref_basetypes): Use make_tree_binfo directly.
1004 * tree.h (copy_base_binfos): Likewise.
1005 (make_binfo): Remove.
1007 * call.c (build_user_type_conversion_1, build_new_op,
1008 check_constructor_callable, build_temp,
1009 perform_direct_initialization_of_possible): Pass type directly to
1010 lookup_fnfields & build_special_member_call.
1011 (build_special_member_call): Accept a type, and complete it.
1012 * class.c (finish_stuct_bits): Copy the BINFOs here.
1013 * cvt.c (ocp_convert): Pass type directly to
1014 build_special_member_call.
1015 * decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
1016 (xref_basetypes): Allocate the binfo here. Adjust.
1017 * init.c (build_init, build_new_1): Pass type directly to
1018 build_special_member_call.
1019 * lex.c (cxx_make_type): Do not allocate binfo here.
1020 * name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
1021 * parser.c (cp_parser_class_head): Always call xref_basetypes.
1022 * pt.c (instantiate_class_template): Likewise. Inhibit access
1023 checking for template friends.
1024 * ptree.c (cxx_print_type): Adjust record printing.
1025 * search.c (lookup_base): When taking a type, complete it before
1026 looking for a binfo.
1027 (lookup_member): Delay completing a type.
1028 (push_class_decls): Don't walk an incomplete type.
1029 (lookup_conversions): Likewise.
1030 * semantics.c (finish_stmt_expr_expr): Pass type directly to
1031 build_special_member_call.
1032 * tree.c (copy_base_binfos): Adjust.
1033 (make_binfo): Likewise.
1034 * typeck.c (build_modify_expr): Pass type directly to
1035 build_special_member_call.
1036 * typeck2.c (process_init_constructor): Check a binfo exists.
1037 (build_m_component_ref): Allow accessing an incomplete type.
1038 (build_functional_cast): Pass type directly to
1039 build_special_member_call.
1041 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1044 * config-lang.in (gtfiles): Add typeck2.c.
1045 * Make-lang.in: Tweak typeck2.c dependencies, and add rule for
1047 * cp-tree.h: Declare complete_type_check_abstract.
1048 * typeck2.c (pat_calc_hash, pat_compare,
1049 complete_type_check_abstract): New functions.
1050 (abstract_virtuals_error): If the type is abstract, register the
1051 declaration within abstract_pending_vars for further checks.
1052 Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
1053 * decl.c (cp_finish_decl): Do not strip array types.
1054 (create_array_type_for_decl): Check for abstractness of the element
1056 (complete_vars): Call complete_type_check_abstract.
1057 * class.c (finish_struct): Prepare a list of virtual functions for
1058 template types, and call complete_vars on it to check for abstractness.
1060 2004-07-12 Paolo Bonzini <bonzini@gnu.org>
1062 PR tree-optimization/14107
1063 * decl.c (finish_function): Remove temporary band-aid.
1065 2004-07-11 Mark Mitchell <mark@codesourcery.com>
1067 * call.c (build_operator_new_call): Avoid using push_to_top_level.
1068 (build_new_op): Adjust call to lookup_function_nonclass.
1069 * name-lookup.c (identifier_type_value): Adjust call to
1071 (lookup_name_real): Add block_p parameter.
1072 (lookup_name_nonclass): Adjust call to lookup_name_real.
1073 (lookup_function_nonclass): Likewise.
1074 (lookup_name): Likewise.
1075 * name-lookup.h (lookup_name_real): Change prototype.
1076 (lookup_name_nonclass): Likewise.
1077 * parser.c (cp_parser_lookup_name): Likewise.
1079 * cp-tree.h (saved_scope): Make old_bindings a vector.
1080 (unuse_fields): Remove.
1081 * name-lookup.h (cxx_saved_binding): Define it.
1082 * class.c (pushclass): Don't use unuse_fields.
1083 * name-lookup.c (cxx_saved_binding_make): Remove.
1084 (store_binding): Add new bindings to a vector, using an
1085 accumulator style, rather than adding them to a list.
1086 (store_bindings): Adjust accordingly.
1087 (store_class_bindings): Likewise.
1088 (push_to_top_level): Likewise.
1089 (pop_from_top_level): Likewise.
1090 * optimize.c (maybe_clone_body): Must push_to_top_level and
1091 pop_from_top_level calls outside of loop.
1092 * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope
1093 calls here from cp_parser_late_parsing_default_args.
1094 (cp_parser_save_default_args): Record the class type in which the
1095 function is declared.
1096 (cp_parser_late_parsing_default_args): Do not call
1097 push_nested_class/pop_nested_class.
1098 * search.c (dfs_unuse_fields): Remove.
1099 (unuse_fields): Remove.
1101 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
1103 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
1104 LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
1105 * cp-tree.h (poplevel): Declare.
1106 (set_block): Remove.
1107 * decl.c (set_block): Remove.
1109 2004-07-10 Mike Stump <mrs@apple.com>
1111 * decl2.c (import_export_class): Never export/import vtables
1112 with inline key functions.
1114 2004-07-09 Steven Bosscher <stevenb@suse.de>
1116 * typeck.c (c_expand_asm_operands): Remove.
1118 2004-07-09 Mike Stump <mrs@apple.com>
1120 * typeck.c (build_class_member_access_expr): Skip null deref
1121 warning when we don't dereference it.
1123 2004-07-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1127 * class.c (check_field_decls): Improve -Weffc++ warning: do not
1128 warn for pointers to functions/members, or for classes without
1131 2004-07-08 Mark Mitchell <mark@codesourcery.com>
1133 * name-lookup.h (struct cp_binding_level): Update documentation
1136 2004-07-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1139 * typeck.c (check_return_expr): Improve -Weffc++ warning: handle
1140 returning CALL_EXPR, and non-reference return type.
1142 2004-07-08 Nathan Sidwell <nathan@codesourcery.com>
1144 * name-lookup.c (push_binding): Use VEC_reserve.
1146 2004-07-08 Richard Henderson <rth@redhat.com>
1148 * cp-tree.h (expand_eh_spec_block): Remove.
1150 2004-07-07 Mark Mitchell <mark@codesourcery.com>
1152 * cp-tree.h (saved_scope): Remove x_previous_class_type and
1153 x_previous_class_values; add x_previous_class_level.
1154 (previous_class_type): Remove.
1155 (previous_class_values): Remove.
1156 (previous_class_level): New macro.
1157 * class.c (pushclass): Restore the identifier cache more
1159 (invalidate_class_lookup_cache): Use vector for class_shadowed and
1160 previous_class_values.
1161 * decl.c (poplevel): Likewise.
1162 * name-lookup.c (cxx_binding_init): New function.
1163 (cxx_binding_make): Use it.
1164 (push_binding): For a binding in a class level, use a vector of
1165 cp_class_binding nodes.
1166 (push_binding_level): New function.
1167 (begin_scope): Use it.
1168 (leave_scope): Do not put class binding levels on the free list.
1169 (print_binding_level): Adjust for the fact that class_shadowed is
1171 (poplevel_class): Likewise.
1172 (clear_identifier_class_values): Likewise.
1173 (push_class_level_binding): Likewise.
1174 (set_class_shadows): Remove.
1175 (store_binding): New function.
1176 (store_class_bindings): New function.
1177 (push_to_top_level): Use store_class_bindings as appropriate.
1178 (pop_from_top_level): Use previous_class_level, not
1179 previous_class_type.
1180 * name-lookup.h (cp_class_binding): New type.
1181 (cp_binding_level): Use a vector object for class_shadowed.
1182 (push_binding_level): Declare.
1183 (set_class_shadows): Remove.
1185 2004-07-07 Andrew Pinski <apinski@apple.com>
1187 * class.c (instantiate_type): BUFFER_REF is dead.
1188 * lex.c (init_operators): IN_EXPR is dead.
1190 2004-07-07 Jason Merrill <jason@redhat.com>
1193 * call.c (build_new_op): Give overload warnings for built-in
1196 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
1199 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
1202 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
1204 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
1205 * class.c (build_primary_vtable, check_bases,
1206 determine_primary_base, finish_struct_bits,
1207 maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
1208 get_basefndecls, warn_hidden, walk_subobject_offsets,
1209 build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
1210 layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
1211 finish_struct_1, get_vfield_name, contains_empty_class_p,
1212 dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
1213 dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
1214 add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
1216 * decl.c (xref_basetypes): Likewise.
1217 * dump.c (cp_dump_tree): Likewise.
1218 * error.c (dump_expr): Likewise.
1219 * init.c (sort_mem_initializers, expand_member_init,
1220 push_base_cleanups): Likewise.
1221 * method.c (do_build_copy_constructor, do_build_assign_reg,
1222 synthesize_exception_spec): Likewise.
1223 * name-lookup.c (arg_assoc_class): Likewise.
1224 * pt.c (instantiate_class_template, tsubst,
1225 get_template_base_recursive): Likewise.
1226 * ptree.c (cxx_print_type): Likewise.
1227 * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
1228 * search.c (lookup_base_r, dynamic_cast_base_recurse,
1229 dfs_access_in_type, access_in_type, lookup_field_queue_p,
1230 bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
1231 marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
1232 dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
1233 binfo_for_vtable, copied_binfo, original_binfo): Likewise
1234 * tree.c (copy_base_binfos, make_binfo): Likewise.
1235 * typeck.c (commmon_base_type): Likewise
1236 * typeck2.c (process_init_constructor): Likewise
1238 2004-07-06 Joseph S. Myers <jsm@polyomino.org.uk>
1240 * decl.c (check_tag_decl): Name redeclared type in diagnostic.
1242 2004-07-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1245 * pt.c (convert_nontype_argument): Disallow conversions between
1246 different enumeration types.
1248 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
1250 * cp-tree.h (BINFO_MARKED): Remove.
1251 (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
1252 BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
1253 BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
1254 (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
1255 * class.c (build_base_path): Use BINFO_VIRTUAL_P.
1256 (mark_primary_bases, determine_primary_base, base_derived_from,
1257 dfs_find_final_overrider, dfs_find_final_overrider_q,
1258 dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
1259 dfs_modify_vtables, walk_subobject_offsets,
1260 layout_nonempty_base_or_field, build_base_field,
1261 build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
1262 end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
1263 finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
1264 build_ctor_vtbl_group, accumulate_vtble_inits,
1265 dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
1266 build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
1267 add_vcall_offset_vtbl_entries_1): Likewise.
1268 * decl.c (xref_basetypes): Incomming virtual base indicated by
1270 * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
1271 * init.c (finish_init_stmts, sort_mem_initializers,
1272 emit_mem_initializers, build_vtble_address, expand_member_init,
1273 push_base_cleanups): Likewise.
1274 * method.c (do_build_copy_constructor): Likewise.
1275 * pt.c (instantiate_class_template,
1276 get_template_base_recursive): Likewise.
1277 * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
1278 get_pseudo_ti_desc): Likewise.
1279 * search.c (lookup_base_r, dynamic_cast_base_recurse,
1280 binfo_from_vbase, binfo_via_virtual, copied_binfo,
1281 original_binfo): Likewise.
1282 * semantics.c (finish_base_specifier): Virtualness is indicated
1284 * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
1286 2004-07-06 Mark Mitchell <mark@codesourcery.com>
1289 2004-06-24 Jason Merrill <jason@redhat.com>
1291 * decl.c (grokparms): Give the PARM_DECL reference type if the
1292 parameter is passed by invisible reference.
1294 2004-07-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1296 * cp-lang.c (cp_var_mod_type_p): Add extra arg.
1297 * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
1298 * pt.c (check_instantiated_args, unify): Likewise.
1300 2004-07-05 Phil Edwards <phil@codesourcery.com>
1302 * Make-lang.in (check-c++, lang_checks): Add some comments.
1304 2004-07-05 Zack Weinberg <zack@codesourcery.com>
1306 * cp-mudflap.c: Delete file.
1307 * Makefile.in: Remove all references to cp-mudflap.o.
1309 2004-07-05 Zack Weinberg <zack@codesourcery.com>
1311 * decl.c (cxx_init_decl_processing): Call
1312 build_common_tree_nodes before creating the global NAMESPACE_DECL.
1314 2004-07-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1317 * call.c (build_operator_new_call): Look only at global scope.
1319 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
1321 * call.c (enforce_access): Expect TREE_BINFO.
1322 * class.c (binfo_ctor_vtable): Check TREE_BINFO.
1323 * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
1324 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
1326 (BINFO_LANG_ELTS): Remove.
1327 (BINFO_LANG_SLOTS): New.
1328 (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
1329 (CLASSTYPE_TEMPLATE_INFO): Adjust.
1330 * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
1331 * search.c (lookup_member): Check TREE_BINFO.
1332 * semantics.c (perform_or_defer_access_check): Likewise.
1333 (check_accessibility_of_qualified_id): Check
1334 deferred_access_no_check.
1335 * tree.c (make_binfo): Use make_tree_binfo.
1337 2004-07-04 Mark Mitchell <mark@codesourcery.com>
1339 * method.c (implicitly_declare_fn): Set linkage of generated
1342 2004-07-04 Richard Henderson <rth@redhat.com>
1344 * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
1346 2004-07-03 Scott Brumbaugh <scottb.lists@verizon.net>
1349 * name-lookup.c (push_class_level_binding): Don't pass a
1350 TREE_LIST of ambiguous names to check_template_shadow as it
1351 only handles declarations. Instead, pull the declaration
1354 2004-07-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1357 * pt.c (check_explicit_specialization): Clarify error message.
1359 2004-07-02 Richard Henderson <rth@redhat.com>
1361 * tree.c (cp_unsave_r): Update remap_save_expr call.
1363 2004-07-02 Mark Mitchell <mark@codesourcery.com>
1366 * mangle.c (write_template_arg): Correct mangling.
1369 * decl.c (grokdeclarator): Robustify.
1371 2004-07-01 Richard Henderson <rth@redhat.com>
1373 * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
1374 * method.c (synthesize_method): Don't clear_last_expr.
1375 * name-lookup.c (maybe_push_cleanup_level): Likewise.
1377 2004-07-01 Nick Clifton <nickc@redhat.com>
1379 * decl2.c (import_export_class): Invoke the
1380 import_export_class field in the gcc_target structure if it is not
1383 2004-06-30 Richard Henderson (rth@redhat.com>
1385 * decl.c (start_preparsed_function): Don't set immediate_size_expand.
1386 * method.c (use_thunk): Likewise.
1388 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
1390 * call.c (build_over_call), typeck.c (build_function_call): Call
1391 check_function_arguments instead of check_function_format.
1393 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
1395 * call.c (build_over_call), typeck.c (build_function_call): Update
1396 calls to check_function_format.
1398 2004-06-30 Richard Henderson <rth@redhat.com>
1400 * call.c (build_over_call): Use __builtin_memcpy for copying
1401 CLASS_AS_BASE rather than funny casting.
1403 2004-06-30 Richard Henderson <rth@redhat.com>
1405 * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
1406 TYPE_SIZE_UNIT of full_type.
1408 2004-06-30 Per Bothner <per@bothner.com>
1410 Conditionally compile support for --enable-mapped_location.
1411 * decl.c (pop_label): Handle (imperfectly) USE_MAPPED_LOCATION case.
1412 * decl2.c: If USE_MAPPED_LOCATION, don't do some line number
1413 adjustments - which I don't understand.
1414 * error.c (dump_decl): Rename "<interrnal>" to "<built-in>".
1415 * error.c: Use LOCATION_FILE and EXPR_LOCATION macros.
1416 (print_instantiation_partial_context): Use expand_location.
1417 * decl.c (duplicate_decl): Use new DECL_IS_BUILTIN macro.
1418 * name-lookup.c: Likewise.
1419 * lex.c (cxx_init): Likewise. Also use BUILTINS_LOCATION.
1420 * name-lookup.c: Use input_line macro.
1421 * parser.c (cp_lexer_get_preprocessor_token): Use UNKNOWN_LOCATION.
1422 (cp_parser_statement): Rename locaal variable statement_locus to
1423 statement_location and use SET_EXPR_LOCATION macro.
1424 * pt.c: Handle USE_MAPPED_LOCATION case. Use new macros.
1425 * tree.c (cp_walk_subtrees): Likewise.
1427 2004-06-29 Per Bothner <per@bothner.com>
1429 * tree.c (build_min_nt, build_min, build_min_non_dep):
1430 Don't set TREE_COMPLEXITY from input_line.
1432 2004-06-29 Paul Brook <paul@codesourcery.com>
1434 * init.c: Include target.h.
1435 (get_cookie_size): Remove and replace with target hook.
1437 (build_new_1): Store the element size in the cookie.
1439 2004-06-29 Nathan Sidwell <nathan@codesourcery.com>
1442 * parser.c (cp_parser_template_declaration_after_export): Disable
1443 access checks here ...
1444 (cp_parser_class_specifier): ... not here.
1446 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1448 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
1449 VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
1450 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
1453 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1455 * cp-tree.h (struct deferred_access): Move to ...
1456 * semantics.c (struct deferred_access): ... here. Adjust.
1457 (deferred_access_stack): Make a VEC(deferred_access),
1458 (deferred_access_free_list): Remove.
1459 (deferred_access_no_check): New.
1460 (push_deferring_access_checks, resume_deferring_access_checks,
1461 stop_deferring_access_checks, pop_deferring_access_checks,
1462 get_deferred_access_checks, pop_to_parent_deferring_access_checks,
1463 perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
1465 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1468 * call.c (build_temp): Declare.
1469 (check_constructor_callable): New.
1470 (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
1471 CONSTRUCTOR_CALLABLE.
1472 (convert_like_real, initialize_reference): Use
1473 check_constructor_callable.
1474 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
1475 (LOOKUP_*): Renumber.
1477 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1479 * friend.c (add_friend): Only perform access checks when context
1481 * lex.c (cxx_make_type): Only create a binfo for aggregate types.
1482 * parser.c (cp_parser_class_specifier): Disable access checks here
1483 when parsing the body of a templated class.
1484 * semantics.c (perform_or_defer_access_checks): Reorder to allow
1485 NULL binfos when not checking access.
1487 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1489 Use vector API for vbase list.
1490 * cp-tree.h: Include vec.h
1491 (DEF_VEC_P (tree)): New type.
1492 (struct lang_type_class): Change vbase's member type.
1493 (binfo_for_vbase): Declare.
1494 * class.c (determine_primary_base, base_derived_from,
1495 update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
1496 warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
1497 build_vtbl_initializer): Adjust.
1498 * decl.c (xref_basetypes): Adjust, accumulate upper bound of
1500 * init.c (sort_mem_initializers, expand_member_init,
1501 push_base_cleanups): Adjust.
1502 * method.c (do_build_copy_constructor): Adjust.
1503 * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
1504 (binfo_for_vbase): New.
1505 * tree.c (copy_base_binfos): Adjust.
1507 2004-06-28 Mark Mitchell <mark@codesourcery.com>
1509 * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
1511 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
1514 * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
1515 paranthesis in case of pointers to array members.
1516 * error.c (dump_type_prefix): Likewise.
1517 (dump_type_suffix): Maybe issue a whitespace when printing
1520 2004-06-27 Mark Mitchell <mark@codesourcery.com>
1523 * parser.c (cp_parser_set_decl_spec_type): Refine test for
1524 redefinition of built-in types.
1526 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
1528 * error.c (pp_template_argument_list_start): Remove.
1529 (pp_template_argument_list_end): Likewise.
1530 (pp_separate_with_comma): Use pp_cxx_separate_with.
1531 (reinit_global_formatting_buffer): Remove.
1532 (pp_non_consecutive_character): Likewise.
1533 (dump_scope): Use pp_cxx_colon_colon.
1534 (dump_template_parameter): Use pp_cxx_identifier,
1535 pp_cxx_tree_identifier and pp_cxx_whitespace.
1536 (dump_templat_bindings): Replace use of pp_string with sequence
1537 of pp_cxx_whitespace and pp_equal.
1538 (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
1539 pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set
1541 (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
1542 (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace,
1543 pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
1544 (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
1545 pp_cxx_right_bracket, pp_cxx_identifier throughout,
1546 (dump_decl): Likewise.
1547 (dump_template_decl): Likewise.
1548 (dump_function_decl): Likewise. Set padding as appropriate.
1549 (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
1551 (dump_exception_spec): Likewise.
1552 (dump_function_name): Use pp_cxx_tree_identifier and
1554 (dump_template_parms): Use pp_cxx_begin_template_argument_list and
1555 pp_cxx_end_template_argument_list.
1556 (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
1557 pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
1558 pp_cxx_whitespace throughout.
1559 (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
1561 (dump_unary_op): Likewise.
1562 (reinit_cxx_pp): New function.
1563 (type_as_string); Use it.
1564 (expr_as_string): Likewise.
1565 (decl_as_string); Likewise.
1566 (context_as_string): Likewise.
1567 (lang_decl_name): Likewise.
1568 (decl_to_string): Likewise.
1569 (expr_to_string): Likewise.
1570 (parm_to_string): Likewise.
1571 (type_to_string): Likewise.
1572 (args_to_string): Likewise.
1573 (cv_to_string): Likewise.
1575 2004-06-26 Mark Mitchell <mark@codesourcery.com>
1577 * cp-tree.h (cp_cv_quals): New type.
1578 (cp_declarator): Use it instead of "tree" as appropriate.
1579 (grok_method_quals): Adjust prototype.
1580 (grokclassfn): Likewise.
1581 (do_friend): Likewise.
1582 * decl.c (grokfndecl): Use cp_cv_quals, not tree.
1583 (grokdeclarator): Likewise.
1584 * decl2.c (grok_method_quals): Likewise.
1585 (grokclassfn): Likewise.
1586 * friend.c (do_friend): Likewise.
1587 * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
1588 * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
1589 (make_pointer_declarator): Likewise.
1590 (make_reference_declarator): Likewise.
1591 (make_ptrmem_declarator): Likewise.
1592 (cp_parser_ptr_operator): Likewise.
1593 (cp_parser_cv_qualifier_seq_opt): Likewise.
1594 (cp_parser_cv_qualifier_opt): Remove.
1595 (cp_parser_new_declarator_opt): Adjust call to
1596 cp_parser_ptr_operator.
1597 (cp_parser_conversion_declaration_opt): Likewise.
1598 (cp_parser_declarator): Use cp_cv_quals, not tree.
1599 (cp_parser_direct_declarator): Likewise.
1601 2004-06-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1603 * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
1604 Rename DECL_STMT to DECL_EXPR.
1605 * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
1606 * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
1607 * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
1609 2004-06-26 Jan Hubicka <jh@suse.cz>
1612 * decl2.c (maybe_emit_vtables): Always import_export_vtable for the
1613 reachability analysis.
1615 2004-06-25 Mark Mitchell <mark@codesourcery.com>
1617 * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
1620 2004-06-25 Paul Brook <paul@codesourcery.com>
1622 * decl2.c (get_guard): Call targetm.cxx.guard_type.
1623 (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
1625 2004-06-24 Mark Mitchell <mark@codesourcery.com>
1627 * decl.c (grokdeclarator): Restore error messages about __thread.
1628 * parser.c (cp_parser_decl_specifier_seq): Likewise.
1630 2004-06-24 Jason Merrill <jason@redhat.com>
1633 * decl.c (grokparms): Give the PARM_DECL reference type if the
1634 parameter is passed by invisible reference.
1636 2004-06-24 Andreas Schwab <schwab@suse.de>
1638 * cp-tree.h (enum cp_storage_class): Remove trailing comma.
1640 2004-06-23 Mark Mitchell <mark@codesourcery.com>
1642 * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
1643 (cp/decl.o): Likewise.
1644 (cp/decl2.o): Likewise.
1645 (cp/pt.o): Likewise.
1646 (cp/semantics.o): Likewise.
1647 * config-lang.in (gtfiles): Do not reference cp/lex.h.
1648 * class.c: Do not include lex.h.
1649 (add_implicitly_declared_members): Do not use
1650 adding_implicit_members.
1651 (check_bases_and_members): Do not talk about grok_x_components.
1652 * cp/cp-tree.h (adding_implicit_members): Remove.
1653 (cp_storage_class): New type.
1654 (cp_decl_spec): Likewise.
1655 (cp_decl_specifier_seq): Likewise.
1656 (cp_parameter_declarator): Use it for the decl_specifiers field.
1657 (check_tag_decl): Adjust prototype.
1658 (shadow_tag): Likewise.
1659 (groktypename): Likewise.
1660 (start_decl): Likewise.
1661 (start_function): Likewise.
1662 (start_method): Likewise.
1663 (grok_x_components): Remove.
1664 (grokfield): Adjust prototype.
1665 (grokbitfield): Likewise.
1666 (finish_member_class_template): Remove.
1667 * decl.c: Do not include lex.h.
1668 (adding_implicit_members): Do not define.
1669 (check_tag_decl): Do not use trees to represent decl-specifiers.
1670 (shadow_tag): Likewise.
1671 (groktypename): Likewise.
1672 (start_decl): Likewise.
1673 (grokvardecl): Likewise.
1674 (grokdeclarator): Likewise.
1675 (grokparms): Likewise.
1676 (start_function): Likewise.
1677 (start_method): Likewise.
1678 * decl.h (grokdeclarator): Adjust prototype.
1679 * decl2.c: Do not include lex.h.
1680 (grok_x_components): Remove.
1681 (grokfield): Do not use trees to represent decl-specifiers.
1682 (grokbitfield): Likewise.
1683 * lex.c: Do not include lex.h.
1685 * parser.c: Include target.h.
1686 (clear_decl_specs): New function.
1687 (cp_parser_translation_unit): Do not use trees to represent
1689 (cp_parser_postfix_expression): Likewise.
1690 (cp_parser_new_type_id): Likewise.
1691 (cp_parser_condition): Likewise.
1692 (cp_parser_simple_declaration): Likewise.
1693 (cp_parser_decl_specifier_seq): Likewise.
1694 (cp_parser_function_specifier_opt): Likewise.
1695 (cp_parser_conversion_type_id): Likewise.
1696 (cp_parser_template_parameter): Likewise.
1697 (cp_parser_explicit_instantiation): Likewise.
1698 (cp_parser_type_specifier): Likewise.
1699 (cp_parser_simple_type_specifier): Likewise.
1700 (cp_parser_init_declarator): Likewise.
1701 (cp_parser_type_id): Likewise.
1702 (cp_parser_type_specifier_seq): Likewise.
1703 (cp_parser_parameter_declaration): Likewise.
1704 (cp_parser_member_declaration): Likewise.
1705 (cp_parser_exception_declaration): Likewise.
1706 (cp_parser_function_definition_from_specifiers_and_declarator):
1708 (cp_parser_single_declaration): Likewise.
1709 (cp_parser_save_member_function_body): Likewise.
1710 (cp_parser_friend_p): Likewise.
1711 (cp_parser_set_storage_class): New function.
1712 (cp_parser_set_decl_spec_type): Likewise.
1713 * pt.c: Do not include lex.h.
1714 * semantics.c: Likewise.
1715 (finish_member_class_template): Remove.
1717 2004-06-23 Roger Sayle <roger@eyesopen.com>
1719 * call.c (build_cxx_call): Don't call expand_tree_builtin. No
1720 longer take both "args" and "convert_args" as arguments.
1721 (build_op_delete_call): Update call to build_cxx_call.
1722 (build_over_call): Likewise, update call to build_cxx_call.
1723 * cp-tree.h (build_cxx_call): Update funtion prototype.
1724 * typeck.c (build_function_call): Don't call expand_tree_builtin.
1725 * rtti.c (throw_bad_cast): Update call to build_cxx_call.
1726 (throw_bad_typeid): Likewise.
1727 (build_dynamic_cast_1): Likewise.
1729 2004-06-22 Richard Henderson <rth@redhat.com>
1731 * class.c (build_vfn_ref): Take a pointer not object. Build
1733 (cp_fold_obj_type_ref): New.
1734 * call.c (build_over_call): Update build_vfn_ref call.
1735 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
1736 * cp-tree.h (cp_fold_obj_type_ref): Declare.
1738 2004-06-21 Jason Merrill <jason@redhat.com>
1741 * cp-gimplify.c (cp_gimplify_init_expr): Look through
1744 2004-06-21 Mark Mitchell <mark@codesourcery.com>
1746 * cp-tree.def (NEW_EXPR): Add a fourth slot.
1747 * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
1748 (TREE_PARMLIST): Likewise.
1749 (CALL_DECLARATOR_PARMS): Likewise.
1750 (CALL_DECLARATOR_QUALS): Likewise.
1751 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
1752 (cp_declarator_kind): New type.
1753 (cp_parameter_declarator): Likewise.
1754 (cp_declarator): Likewise.
1755 (cp_error_declarator): Likewise.
1756 (no_parameters): Likewise.
1757 (groktypename): Change prototype.
1758 (start_decl): Likewise.
1759 (start_handler_parms): Likewise.
1760 (get_scope_of_declarator): Likewise.
1761 (start_function): Likewise.
1762 (start_preparsed_function): New function.
1763 (start_function): Change prototype.
1764 (start_method): Likewise.
1765 (grokfield): Likewise.
1766 (grokbitfield): Likewise.
1767 (build_new): Likewise.
1768 (make_pointer_declarator): Remove.
1769 (make_reference_declarator): Likewise.
1770 (make_call_declarator): Likewise.
1771 (set_quals_and_spec): Likewise.
1772 (process_template_parm): Change prototype.
1773 (begin_function_definition): Remove.
1774 (finish_parmlist): Remove.
1775 * decl.c (groktypename): Do not use trees to represent
1777 (start_decl): Likewise.
1778 (start_handler_parms): Remove.
1779 (get_scope_of_declarator): Reimplement.
1780 (grokdeclarator): Do not use trees to represent declarators.
1781 (grokparms): Likewise.
1782 (start_function): Likewise.
1783 (start_method): Likewise.
1784 (build_void_list_mode): Do not use TREE_PARMLIST.
1785 * decl.h (grokdeclarator): Change prototype.
1786 * decl2.c (grok_method_quals): Robustify.
1787 (grok_x_components): Do not use trees to represent declarators.
1788 (grokfield): Likewise.
1789 (grokbitfield): Likewise.
1790 (start_objects): Build FUNCTION_DECLs, not declarators.
1791 (start_static_storage_duration_function): Likewise.
1792 * init.c (build_new): Simplify.
1793 * lex.c (make_pointer_declarator): Remove.
1794 (make_reference_declarator): Likewise.
1795 (make_call_declarator): Likewise.
1796 (set_quals_and_spec): Likewise.
1797 * method.c (use_thunk): Use start_preparsed_function.
1798 (synthesize_method): Likewise.
1799 (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
1800 * optimize.c (maybe_clone_body): Use start_preparsed_function.
1801 * parser.c (cp_error_declarator): New variable.
1802 (declarator_obstack): Likewise.
1803 (alloc_declarator): New function.
1804 (make_declarator): Likewise.
1805 (make_id_declarator): Likewise.
1806 (make_pointer_declarator): Likewise.
1807 (make_reference_declarator): Likewise.
1808 (make_ptrmem_declarator): Likewise.
1809 (make_call_declarator): Likewise.
1810 (make_array_declarator): Likewise.
1811 (no_parameters): New variable.
1812 (make_parameter_declarator): Likewise.
1813 (cp_parser_check_for_definition_in_return_type): Do not use trees
1814 to represent declarators.
1815 (cp_parser_translation_unit): Likewise.
1816 (cp_parser_new_expression): Likewise.
1817 (cp_parser_new_type_id): Likewise.
1818 (cp_parser_new_declarator_opt): Likewise.
1819 (cp_parser_direct_new_declarator): Likewise.
1820 (cp_parser_condition): Likewise.
1821 (cp_parser_declaration_statement): Likewise.
1822 (cp_parser_declaration): Likewise.
1823 (cp_parser_conversion_type_id): Likewise.
1824 (cp_parser_conversion_declarator_opt): Likewise.
1825 (cp_parser_template_parameter_list): Likewise.
1826 (cp_parser_template_parameter): Likewise.
1827 (cp_parser_explicit_instantiation): Likewise.
1828 (cp_parser_init_declarator): Likewise.
1829 (cp_parser_declarator): Likewise.
1830 (cp_parser_direct_declarator): Likewise.
1831 (cp_parser_type_id): Likewise.
1832 (cp_parser_parameter_declaration_clause): Likewise.
1833 (cp_parser_parameter_declaration_list): Likewise.
1834 (cp_parser_parameter_declaration): Likewise.
1835 (cp_parser_member_declaration): Likewise.
1836 (cp_parser_exception_declaration): Likewise.
1837 (cp_parser_check_declarator_template_parameters): Likewise.
1838 (cp_parser_function_definition_from_specifiers_and_declarator):
1840 (cp_parser_save_member_function_body): Likewise.
1841 * pt.c (process_template_parm): Add is_non_type parameter.
1842 (convert_template_argument): Adjust call to groktypename.
1843 (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
1844 (tsubst): Do not expect declarators.
1845 (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
1847 (instantiate_decl): Use start_preparsed_function.
1848 * semantics.c (begin_function_definition): Remove.
1849 (finish_parmlist): Remove.
1850 * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
1853 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1855 * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
1856 (build_new_method_call): Likewise.
1857 * decl.c (local_variable_p_walkfn): Don't walk into types.
1858 * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
1859 (build_anon_union_vars): Add new operand for COMPONENT_REF.
1860 * init.c (buld_new): Add new operand for ARRAY_REF.
1861 * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
1862 (do_build_assign_ref): Likewise.
1863 * parser.c (cp_parser_direct_new_declarator): Add new operands
1865 (cp_parser_direct_declarator): Likewise.
1866 * pt.c (tsubst): Likewise.
1867 (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
1869 * semantics.c (finish_non_static_data_member): Add new operand
1871 * typeck.c (build_class_member_access_expr): Likewise.
1872 (build_class_member_access_expr, finish_class_member_access_expr):
1874 (build_ptrmemfunc_access_expr): Likewise.
1875 (build_array_ref): Add new operands for ARRAY_REF.
1876 * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
1877 * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
1879 2004-06-21 Richard Henderson <rth@redhat.com>
1881 * dump.c (cp_dump_tree): Don't use dump_next_stmt.
1882 * parser.c (cp_parser_jump_statement): Update commentary.
1883 * pt.c (tsubst_expr): Use RETURN_EXPR.
1884 * semantics.c (finish_return_stmt): Likewise.
1885 (finalize_nrv_r): Likewise.
1886 * typeck.c, typeck2.c: Update file start commentary.
1888 2004-06-21 Richard Henderson <rth@redhat.com>
1890 * semantics.c (finish_expr_stmt): Call verify_sequence_points.
1892 2004-06-20 Richard Henderson <rth@redhat.com>
1894 * cp-tree.h (add_decl_stmt): Declare.
1895 * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
1896 * semantics.c (maybe_cleanup_point_expr): New.
1897 (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
1898 finish_for_expr, finish_switch_cond): Use it.
1899 (finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN.
1901 2004-06-20 Richard Henderson <rth@redhat.com>
1903 * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
1904 * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
1905 (cp_gimplify_expr): Call it.
1906 (gimplify_cleanup_stmt): Move from c-gimplify.c.
1907 (cp_genericize): New.
1908 * decl.c (finish_function): Call it.
1909 * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
1910 (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
1911 (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
1912 (cp_genericize): Declare.
1913 * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
1914 * dump.c (cp_dump_tree): Likewise.
1915 * semantics.c (push_cleanup): Move from c-semantics.c.
1917 2004-06-20 Zack Weinberg <zack@codesourcery.com>
1919 * cp-lang.c (has_c_linkage): Implement.
1921 * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
1922 * decl.c (duplicate_decls): Use COPY_DECL_RTL.
1923 (builtin_function_1): Don't call make_decl_rtl.
1924 (build_cp_library_fn): Don't call set_mangled_name_for_decl.
1925 (grokvardecl): Don't call mangle_decl.
1926 * except.c (nothrow_libfn_p): Look at DECL_NAME, not
1927 DECL_ASSEMBLER_NAME.
1928 * method.c (set_mangled_name_for_decl): Delete.
1929 * name-lookup.c (pushdecl): When a local extern shadows a
1930 file-scope declaration of the same object, give both DECLs the
1932 * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
1933 on DECL_ASSEMBLER_NAME.
1935 2004-06-19 Richard Henderson <rth@redhat.com>
1937 * cp-gimplify.c: Remove unnecessary prototypes.
1938 (cp_gimplify_stmt): Merge into ...
1939 (cp_gimplify_expr): ... here. Move to end of file. Handle
1940 stmts_are_full_exprs_p frobbing.
1941 * cp-tree.h (cp_gimplify_stmt): Remove.
1942 * pt.c (tsubst_expr): Merge prep_stmt and unify.
1943 * tree.c (init_tree): Don't set lang_gimplify_stmt.
1945 2004-06-18 Richard Henderson <rth@redhat.com>
1948 * semantics.c (begin_cond): New.
1949 (finish_cond): Rewrite to handle template DECL_STMTs specially.
1950 Assume that non-template decls go land before the conditional.
1951 (simplify_loop_decl_cond): Likewise.
1952 (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
1953 finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
1954 begin_switch_stmt, finish_switch_cond): Update to match.
1956 2004-06-17 Jason Merrill <jason@redhat.com>
1959 * semantics.c (simplify_aggr_init_expr): Don't return the slot.
1960 (finish_stmt_expr_expr): Update type after conversions.
1961 (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
1962 Handle void initializer.
1963 * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
1965 2004-06-17 Geoffrey Keating <geoffk@apple.com>
1967 * class.c (build_clone): Don't call defer_fn, let mark_used do it.
1968 * cp-tree.h (defer_fn): Delete.
1969 * decl2.c (defer_fn): Delete.
1970 (finish_file): Simplify deferred_fns loops; check that
1971 only used inline functions get into deferred_fns.
1972 (mark_used): Inline previous contents of defer_fn.
1974 2004-06-16 Richard Henderson <rth@redhat.com>
1976 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
1977 (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
1978 * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
1979 of CTOR_INITIALIZER ...
1980 (pp_cxx_statement): ... here.
1981 * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
1982 (finish_function): Use alloc_stmt_list to zap entire function.
1983 * parser.c (cp_parser_compound_statement): Update commentary.
1984 * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
1985 * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
1986 (finish_stmt_expr): Don't look through COMPOUND_STMT.
1988 2004-06-16 Geoffrey Keating <geoffk@apple.com>
1990 * pt.c (mark_decl_instantiated): Don't call defer_fn.
1992 2004-06-16 Richard Henderson <rth@redhat.com>
1994 * parser.c (cp_parser_labeled_statement): Update commentary.
1995 * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
1996 * tree.c (mark_local_for_remap_r): Likewise.
1998 2004-06-16 Richard Henderson <rth@redhat.com>
2000 * parser.c (cp_parser_asm_definition): Update commentary.
2001 * pt.c (tsubst_expr): Use ASM_EXPR.
2002 * semantics.c (finish_asm_stmt): Likewise.
2004 2004-06-16 Richard Henderson <rth@redhat.com>
2006 * decl.c (finish_destructor_body): Use LABEL_EXPR.
2007 * parser.c (cp_parser_statement): Update commentary.
2008 * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
2009 * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
2010 * tree.c (mark_local_for_remap_r): Likewise.
2012 2004-06-16 Richard Henderson <rth@redhat.com>
2015 * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
2016 statement in FOR_INIT_STMT for templates.
2018 2004-06-15 Richard Henderson <rth@redhat.com>
2020 * call.c (initialize_reference): Don't build CLEANUP_STMT here.
2021 * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
2022 (genericize_try_block): Use gimplify_stmt.
2023 (genericize_catch_block, genericize_eh_spec_block): Likewise.
2024 (cp_gimplify_init_expr): Remove STMT_EXPR special case.
2025 (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
2026 * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
2027 (cp_tree_chain_matters_p): Remove.
2028 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
2029 (COMPOUND_STMT_BODY_BLOCK): New.
2030 (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
2031 (EXPR_STMT_STMT_EXPR_RESULT): New.
2032 (building_stmt_tree): Check cur_stmt_list.
2033 (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
2034 (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
2035 * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
2036 (cp_finish_decl): Use push_cleanup.
2037 (start_function, finish_function): Use statement lists.
2038 (finish_stmt): Do nothing.
2039 * except.c (begin_eh_spec_block): Use statement lists.
2040 (check_handlers_1, check_handlers): Likewise.
2041 * init.c (construct_virtual_base): Don't add extra compound stmts.
2042 (build_vec_init): Likewise.
2043 * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
2044 * name-lookup.h (struct cp_binding_level): Add statement_list.
2045 * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
2046 (cp_parser_labeled_statement, cp_parser_expression_statement,
2047 cp_parser_statement_seq_opt): Likewise.
2048 (cp_parser_compound_statement): Likewise. Take bool for try block.
2049 (cp_parser_selection_statement): Tidy if processing.
2050 (cp_parser_already_scoped_statement): Rewrite to do what it says.
2051 * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
2052 (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST.
2053 Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
2054 * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
2055 (finish_cond): New, rewritten from FINISH_COND.
2056 (simplify_loop_decl_cond): New.
2057 (finish_expr_stmt): Avoid nested EXPR_STMTs.
2058 (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
2059 begin_else_clause, finish_else_clause, finish_if_stmt,
2060 begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
2061 begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
2062 finish_for_cond, finish_for_stmt, begin_switch_stmt,
2063 finish_switch_cond, finish_switch_stmt, begin_try_block,
2064 finish_try_block, finish_cleanup_try_block, finish_function_try_block,
2065 finish_handler_sequence, finish_function_handler_sequence,
2066 begin_handler, finish_handler_parms, finish_handler,
2067 begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
2068 using statement lists.
2069 (begin_compound_stmt): Replace has_no_scope argument with flags.
2070 Update all callers. Use statement lists.
2071 (finish_compound_stmt): Likewise.
2072 (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
2073 (current_scope_stmt_stack): Remove.
2074 (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
2075 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
2076 Rewrite with statement lists.
2078 2004-06-15 Alexandre Oliva <aoliva@redhat.com>
2080 * parser.c: Change all assignments of c_lex_string_translate
2081 to true and false to 1 and 0.
2082 (cp_lexer_read_token): Convert type of the translated string.
2083 (cp_parser_skip_to_closing_parentheses): Preserve original
2084 value of c_lex_string_translate, and set it to -1 while
2086 (cp_parser_cache_group): Likewise.
2087 (cp_parser_cache_group_1): Renamed.
2088 (cp_parser_asm_operand_list): Remove redundant setting of
2089 c_lex_string_translate.
2090 (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
2091 Handle chained strings.
2093 2004-06-12 Andrew Pinski <apinski@apple.com>
2097 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
2099 * cp-tree.h: Fix typo.
2101 * cp-tree.h: Include cgraph.h
2102 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
2103 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
2105 2004-06-12 Jason Merrill <jason@redhat.com>
2107 PR tree-optimization/14107
2108 * decl.c (finish_function): Warn about no return in all functions.
2110 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
2112 * cp-tree.h (struct language_function): Remove cannot_inline.
2113 * decl.c (save_function_data): cannot_inline is no more.
2114 (cxx_push_function_context): Likewise.
2115 * decl2.c (start_objects, start_static_storage_duration_function):
2116 Reset DECL_INLINE, set DECL_UNINLINABLE.
2118 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2121 * search.c (lookup_field): Propagate the ambiguity list.
2122 (lookup_fnfields): Likewise.
2124 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2127 * parser.c (cp_parser_template_name): Ctors/dtors never need a
2128 template keyword to disambiguate.
2130 2004-06-14 Mark Mitchell <mark@codesourcery.com>
2133 * decl.c (grokdeclarator): Ignore pointer-to-members when
2134 computing template depth.
2137 * name-lookup.c (pushtag): Do not try to put class declarations in
2138 explicit specialization scopes.
2140 2004-06-11 Andrew Pinski <pinskia@physics.uc.edu>
2142 * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
2144 2004-06-11 Mark Mitchell <mark@codesourcery.com>
2147 * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
2148 bindings for undeclared built-ins.
2150 2004-06-11 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2152 * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
2153 appear at the correct location.
2155 2004-06-10 Jason Merrill <jason@redhat.com>
2159 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2160 * init.c (build_offset_ref): Build SCOPE_REF with non-null
2161 TREE_TYPE for non-dependent names.
2162 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
2163 unknown_type_node as its TREE_TYPE.
2164 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
2165 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
2166 (dump_expr) <SCOPE_REF case>: Likewise.
2168 2004-06-10 Mark Mitchell <mark@codesourcery.com>
2171 * parser.c (cp_parser_direct_declarator): Robustify.
2174 * pt.c (tsubst_copy): Use decl_constant_value on enumeration
2175 constants in non-dependent contexts.
2179 * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
2182 2004-06-10 Jakub Jelinek <jakub@redhat.com>
2185 * decl.c (duplicate_decls): Handle fileptr_type_node arguments
2188 2004-06-09 Mark Mitchell <mark@codesourcery.com>
2192 2004-06-07 Mark Mitchell <mark@codesourcery.com>
2193 * lex.c (handle_pragma_interface): Deprecate.
2194 (handle_pragma_implementation): Likewise.
2196 2004-06-09 Andrew Pinski <pinskia@physics.uc.edu>
2198 * g++spec.c (lang_specific_driver): Remove check for -lm
2199 and -lmath when check it see if it was the math library.
2201 2004-06-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2204 * parser.c (cp_parser_direct_declarator): Reject constructor named
2205 as qualified template-id.
2207 2004-06-07 Mark Mitchell <mark@codesourcery.com>
2210 * lex.c (handle_pragma_interface): Deprecate.
2211 (handle_pragma_implementation): Likewise.
2213 2004-06-07 Mark Mitchell <mark@codesourcery.com>
2216 * parser.c (cp_parser_iteration_statement): Fix typo in error
2220 * pt.c (tsubst_default_argument): Do not defer access checks
2221 while substituting into the default argument.
2224 * pt.c (tsubst_copy): Do not try to substitute for an enumeration
2225 constant in a non-dependent context.
2228 * except.c (build_throw): Ensure that temp_expr has been
2231 2004-06-06 Roger Sayle <roger@eyesopen.com>
2233 * cp/cp-tree.h (lvalue_or_else): Add function prototype.
2235 2004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2238 * parser.c (cp_parser_mem_initializer_id): Gracefully reject
2239 'typename', and accept 'template'.
2241 2004-06-03 Andrew Pinski <pinskia@physics.uc.edu>
2242 Jan Hubicka <jh@suse.cz>
2245 * method.c (use_think): Do not mark thunk as referenced.
2247 2004-06-03 Matt Austern <austern@apple.com>
2250 * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
2251 is nonzero, and if we see a noninline definition of a key method,
2252 make the vtables nonweak.
2254 2004-06-02 Matt Austern <austern@apple.com>
2256 * cp-tree.h (instantiate_decl): new boolean parameter,
2257 undefined_ok. Current behavior is equivalent to its being 0.
2258 * decl2.c (mark_used): Add new argument when calling instantiate_decl
2259 * pt.c (mark_decl_instantiated): Unconditionally make
2260 instantiations explicit unconditionally
2261 (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
2262 since mark_decl_instantiated now does it.
2263 (instantiate_class_member): New. Instantiate a member of an
2264 explicitly instantiated class template.
2265 (do_type_instantiation): Explicitly instantiate members of an
2266 explicitly instantiated class template.
2267 (instantiate_decl): if undefined_ok is nonzero, and if we're
2268 trying to explicitly instantiated a template with no definition,
2269 change it to an implicit instantiation.
2270 (instantiate_pending_templates): Add new argument to instantiate_decl.
2271 * tree.c (cp_cannot_inline_tree_fn): Likewise.
2273 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
2275 * cp-tree.h: Fix typo.
2277 * cp-tree.h: Include cgraph.h
2278 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
2279 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
2281 2004-06-01 Jason Merrill <jason@redhat.com>
2284 * call.c (call_builtin_trap): Remove type parm.
2285 (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
2286 (build_x_va_arg): Dereference a null pointer for a non-POD argument.
2288 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2291 * init.c (build_offset_ref): Build SCOPE_REF with non-null
2292 TREE_TYPE for non-dependent names.
2293 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
2294 unknown_type_node as its TREE_TYPE.
2295 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
2296 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
2297 (dump_expr) <SCOPE_REF case>: Likewise.
2299 2004-06-01 Richard Henderson <rth@redhat.com>
2300 Andrew Pinski <pinskia@physics.uc.edu>
2302 * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
2303 * parser.c (struct cp_parser): Remove in_offsetof.
2304 (cp_parser_new): Don't set it.
2305 (cp_parser_unary_expression): Don't check it.
2306 (cp_parser_postfix_open_square_expression): Split out from ...
2307 (cp_parser_postfix_expression): ... here.
2308 (cp_parser_postfix_dot_deref_expression): Likewise.
2309 (cp_parser_builtin_offsetof): New.
2310 (cp_parser_primary_expression): Use it.
2312 2004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2315 * parser.c (cp_parser_postfix_expression): Allow subscript
2316 operator in offsetof.
2318 2004-05-31 Mark Mitchell <mark@codesourcery.com>
2321 * friend.c (add_friend): Do not try to perform access checks for
2322 functions from dependent classes.
2324 2004-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
2326 * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
2327 (pp_cxx_begin_template_argument_list): Turn into a function.
2328 (pp_cxx_end_template_argument_list): Likewise.
2329 (pp_cxx_separate_with): Define.
2330 (pp_cxx_unqualified_id): Tidy.
2331 (pp_cxx_primary_expression): Likewise.
2332 (pp_cxx_postfix_expression): Likewise.
2333 (pp_cxx_expression): Likewise.
2334 (pp_cxx_simple_type_specifier): Likewise.
2335 (pp_cxx_type_specifier_seq): Likewise.
2336 (pp_cxx_parameter_declaration_clause): Likewise.
2337 (pp_cxx_exception_specification): Likewise.
2338 (pp_cxx_direct_declarator): Likewise.
2339 (pp_cxx_type_id): Likewise.
2340 * cxx-pretty-print.h (pp_cxx_whitespace): Export from
2342 (pp_cxx_left_paren): Likewise.
2343 (pp_cxx_right_paren): Likewise.
2344 (pp_cxx_left_brace): Likewise.
2345 (pp_cxx_right_brace): Likewise.
2346 (pp_cxx_left_bracket): Likewise.
2347 (pp_cxx_right_bracket): Likewise.
2348 (pp_cxx_dot): Likewise.
2349 (pp_cxx_identifier): Likewise.
2350 (pp_cxx_tree_identifier): Likewise.
2351 (pp_cxx_ampersand): New macro.
2352 (pp_cxx_star): Likewise.
2353 (pp_cxx_arrow): Likewise.
2354 (pp_cxx_semicolon): Likewise.
2355 (pp_cxx_complement): Likewise.
2356 (pp_cxx_begin_template_argument_list): Declaree.
2357 (pp_cxx_end_template_argument_list): Likewise.
2358 (pp_cxx_colon_colon): likewise.
2360 2004-05-31 Eric Botcazou <ebotcazou@libertysurf.fr>
2362 * parser.c (cp_parser_simple_type_specifier): Explicitly test
2365 2004-05-31 Kazu Hirata <kazu@cs.umass.edu>
2367 * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
2368 typeck.c: Fix comment formatting.
2370 2004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
2372 * cp-lang.c (cp_expand_decl): Remove.
2373 (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
2375 2004-05-30 Andreas Jaeger <aj@suse.de>
2377 * lang-specs.h: Add missing initializers for .ii.
2379 2004-05-28 Aldy Hernandez <aldyh@redhat.com>
2381 * decl.c (cp_make_fname_decl): Free return value from
2384 2004-05-28 Mark Mitchell <mark@codesourcery.com>
2387 * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
2389 * init.c (build_new): Likewise.
2392 * name-lookup.c (arg_assoc): Robustify.
2395 * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
2396 when determining the scope to use for a pointer to member.
2397 (lookup_anon_field): Give it external linkage.
2398 * cp-tree.h (lookup_anon_field): Declare it.
2399 * expr.c (cplus_expand_constant): Use it.
2401 2004-05-28 Mark Mitchell <mark@codesourcery.com>
2404 * parser.c (cp_parser_simple_type_specifier): Call
2405 maybe_note_name_used_in_class.
2407 2004-05-28 Tom Marshall <tmarshall@real.com>
2410 * class.c (finish_struct_1): Warn only if the dtor is non-private or
2411 the class has friends.
2413 2004-05-27 Adam Nemet <anemet@lnxw.com>
2416 * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
2417 TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
2419 2004-05-24 Geoffrey Keating <geoffk@apple.com>
2421 * method.c (implicitly_declare_fn): Don't call defer_fn; abort
2422 if it might be needed.
2423 * pt.c (mark_decl_instantiated): Only call defer_fn if
2424 the function actually needs processing in finish_file.
2425 * decl2.c (finish_file): Add check that elements in
2426 deferred_fns_used are really needed there. Remove unnecessary
2427 test of DECL_SAVED_TREE.
2429 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
2431 * Make-lang.in: No need to specify $(LIBCPP).
2433 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2436 * parser.c (cp_parser_class_head): Robustify.
2439 * parser.c (cp_parser_decl_specifier_seq): Correct error in
2441 (cp_parser_constructor_declarator_p): Treat attributes
2445 * typeck.c (build_unary_op): Do not attempt to resolve casts to
2446 base classes in templates.
2448 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2451 * pt.c (instantiate_template): Robustify.
2453 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2456 * decl.c (xref_tag): Issue errors about redeclaring template
2457 classes as non-template classes.
2459 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2462 * name-lookup.c (supplement_binding): Allow redefinitions of
2466 * parser.c (cp_parser_template_argument): Robustify.
2468 2004-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
2470 * class.c (alter_access): Use %E format specifier to print an
2471 identifier node. Avoid looking at the IDENTIFIER_POINTER.
2472 (push_lang_context): Likewise.
2473 * decl.c (lookup_label): Likewise.
2474 (grokdeclarator): Likewise.
2475 * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
2476 * pt.c (do_type_instantiation): Likewise.
2477 * tree.c (handle_java_interface_attribute): Likewise.
2478 (handle_com_interface_attribute): Likewise.
2479 (handle_init_priority_attribute): Likewise.
2481 2004-05-22 Mark Mitchell <mark@codesourcery.com>
2485 * pt.c (build_non_dependent_expr): Expand the set of tree nodes
2486 recognized as overloaded functions.
2488 2004-05-22 Mark Mitchell <mark@codesourcery.com>
2491 * class.c (layout_nonempty_base_or_field): Do not try to avoid
2492 layout conflicts for unions.
2495 * typeck.c (build_x_unary_op): Instantiate template class
2496 specializations before looking for "operator &".
2499 * typeck.c (complete_type): Layout non-dependent array types, even
2503 * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
2506 2004-05-22 Roger Sayle <roger@eyesopen.com>
2508 * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
2509 returning when TREE_TYPE is error_mark_node.
2510 * typeck.c (require_complete_type): Return error_mark_node if
2511 value's type is an error_mark_node.
2513 2004-05-20 Andrew Pinski <pinskia@physics.uc.edu>
2515 * optimize.c (calls_setjmp_r): Remove.
2516 (calls_setjmp_p): Remove.
2517 * cp-tree.c (calls_setjmp_p): Remove.
2518 * decl.c (finish_function): Do not call calls_setjmp_p.
2520 2004-05-18 Zack Weinberg <zack@codesourcery.com>
2522 * decl.c (cp_finish_decl): Use mark_decl_referenced.
2523 * decl2.c (maybe_make_one_only): Likewise.
2524 * method.c (use_thunk): Likewise.
2526 2004-05-18 Jason Merrill <jason@redhat.com>
2528 * class.c (build_base_path): Tidy a bit.
2530 2004-05-14 Geoffrey Keating <geoffk@apple.com>
2532 * name-lookup.c (struct scope_binding): New.
2533 (EMPTY_SCOPE_BINDING): New.
2534 (lookup_using_namespace): Take a scope_binding instead of a
2536 (qualified_lookup_using_namespace): Likewise.
2537 (cxx_binding_clear): Delete.
2538 (do_nonmember_using_decl): Use a scope_binding instead of a
2540 (lookup_tag): Don't call select_decl.
2541 (ambiguous_decl): Don't return anything (and change callers to match).
2542 Take a scope_binding as the second parameter.
2543 (lookup_namespace_name): Use a scope_binding instead of a
2545 (unqualified_namespace_lookup): Likewise.
2546 (lookup_qualified_name): Likewise.
2547 (select_decl): Take a scope_binding instead of a cxx_binding.
2548 Use macros rather than hand-coding tests for type-ness.
2550 2004-05-13 Diego Novillo <dnovillo@redhat.com>
2552 * cp-gimplify.c: Rename from cp-simplify.c.
2553 * Make-lang.in, optimize.c: Update.
2555 2004-05-13 Diego Novillo <dnovillo@redhat.com>
2557 Merge from tree-ssa-20020619-branch. See
2558 ChangeLog.tree-ssa for details.
2560 * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
2561 cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
2562 expr.c, init.c, name-lookup.h, optimize.c, parser.c,
2563 pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
2565 * cp-mudflap.c: New file.
2566 * cp-simplify.c:: New file.
2568 2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2571 * decl2.c (check_classfn): For member templates, compare also the
2572 template parameters to match the declaration.
2573 * cp-tree.h: Adjust declaration of check_classfn.
2574 * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
2575 * friend.c (do_friend): Likewise.
2576 * pt.c (tsubst_friend_function): Likewise.
2578 2004-05-01 Zack Weinberg <zack@codesourcery.com>
2580 * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
2581 Instead, dig into the representation type to find the array bound.
2583 2004-04-30 Jason Merrill <jason@redhat.com>
2585 Refer to base members using COMPONENT_REFs where possible.
2586 * class.c (build_simple_base_path): New fn.
2587 (build_base_path): Use it for non-virtual base references.
2588 (layout_class_type): Change base fields to their real type
2589 after layout is done.
2590 * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
2591 * cp-lang.c (cxx_get_alias_set): Use it.
2593 2004-04-30 Kazu Hirata <kazu@cs.umass.edu>
2595 * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
2598 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2601 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
2602 used in integral constant expressions.
2604 2004-04-22 Mark Mitchell <mark@codesourcery.com>
2606 * init.c (build_aggr_init): Fix accidental use of C99 construct in
2609 * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
2611 * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
2612 * decl.c (reshape_init): Use it.
2613 * init.c (perform_member_init): Remove redundant condition.
2614 (build_aggr_init): Adjust to handle brace-enclosed initializers
2616 (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
2618 * parser.c (cp_parser_initializer_clause): Do not set
2619 TREE_HAS_CONSTRUCTOR on the initializer.
2620 * rtti.c (tinfo_base_init): Likewise.
2621 (generic_initializer): Likewise.
2622 (ptr_initializer): Likewise.
2623 (ptm_initializer): Likewise.
2624 (class_initializer): Likewise.
2625 (get_pseudo_ti_init): Likewise.
2626 * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
2628 2004-04-22 Alan Modra <amodra@bigpond.net.au>
2630 * name-lookup.c (anonymous_namespace_name): Make static.
2632 2004-04-19 Roger Sayle <roger@eyesopen.com>
2635 * class.c (build_base_path): Call fold whilst building the NULL
2636 pointer check expression trees.
2638 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
2640 * init.c (build_new_1): Don't use type size argument for Java
2641 _Jv_AllocObject call.
2643 2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
2645 * method.c (make_alias_for_thunk): Remove preprocessor guard on
2646 declaration and definition.
2648 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
2651 * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
2652 than ASM_OUTPUT_DEF.
2654 2004-04-08 Jakub Jelinek <jakub@redhat.com>
2656 * decl2.c (mark_used): Don't segfault if cfun != NULL but
2657 current_function_decl == NULL.
2659 2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
2662 * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
2665 2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2667 * init.c (decl_constant_value): Don't look at DECL_INITIAL
2669 * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
2670 or TREE_SIDE_EFFECTS of a type.
2672 2004-04-02 Nathan Sidwell <nathan@codesourcery.com>
2675 * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
2676 cv-qualifier unification.
2677 * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
2679 2004-04-02 Jan Hubicka <jh@suse.cz>
2681 * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
2682 * cp-tree.h (cp_update_decl_after_saving): Declare.
2683 * tree.c (cp_update_decl_after_saving): Define.
2685 2004-04-01 Mark Mitchell <mark@codesourcery.com>
2688 * typeck.c (get_delta_difference): Call fold before returning the
2691 2004-04-01 Richard Henderson <rth@redhat.com>
2694 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
2695 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
2697 2004-04-01 Mark Mitchell <mark@codesourcery.com>
2700 * name-lookup.c (maybe_push_cleanup_level): Robustify.
2702 2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2704 * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
2706 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2708 * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
2709 * class.c (check_bitfield_decl): Likewise.
2710 * cvt.c (type_promotes_to): Likewise.
2711 * decl.c (finish_enum): Likewise.
2712 * mangle.c (write_builtin_type): Likewise.
2713 * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
2714 * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
2715 (build_binary_op): Likewise.
2717 2004-03-31 Jan Hubicka <jh@suse.cz>
2719 * tree.h (optimize_function): Kill prototype.
2720 * optimize.c (dump_function, optimize_function, dump_finction): Kill.
2721 * semantics.c (expand_body): Kill.
2723 2004-03-30 Mark Mitchell <mark@codesourcery.com>
2726 * decl.c (start_decl_1): Do not decide whether or not to create a
2727 new cleanup level until after the type has been completed.
2730 * pt.c (tsubst_default_argument): Clear current_function_decl.
2732 2004-03-30 Zack Weinberg <zack@codesourcery.com>
2734 * name-lookup.c, parser.c: Use new shorter form of GTY markers.
2736 2004-03-29 Zack Weinberg <zack@codesourcery.com>
2738 * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
2739 is null, just print the literal name and return.
2741 2004-03-25 Kazu Hirata <kazu@cs.umass.edu>
2743 * cxx-pretty-print.c: Fix comment typos.
2745 2004-03-24 Kazu Hirata <kazu@cs.umass.edu>
2747 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
2750 2004-03-23 Ziemowit Laski <zlaski@apple.com>
2752 * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
2753 * mangle.c (write_type): Add call to 'mangle_fundamental_type'
2756 2004-03-23 Zack Weinberg <zack@codesourcery.com>
2758 PR 12267, 12391, 12560, 13129, 14114, 14133
2759 * cp-lang.c (c_reset_state): Delete.
2760 (push_file_scope, pop_file_scope): New stubs.
2761 * parser.c (c_parse_file): Call sorry() here if called more than once.
2763 2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2765 * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
2768 2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
2770 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
2772 2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
2774 * error.c (enum pad): Remove.
2775 (dump_qualifiers): Likewise.
2776 (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
2777 (dump_aggr_type): Likewise.
2778 (dump_type_suffix): Likewise.
2779 (dump_simple_decl): Likewise.
2780 (dump_function_decl): Likewise.
2781 (cv_to_string): Likewise.
2782 (dump_type_prefix): Likewise. Adjust return void.
2783 * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
2785 (pp_cxx_template_keyword_if_needed): Document.
2786 (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
2787 (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
2788 MUST_NOT_THROW_EXPR.
2790 2004-03-21 Mark Mitchell <mark@codesourcery.com>
2793 * decl.c (cp_finish_decl): Compute the size of arrays declared in
2794 templates, if their type is non-dependent.
2796 2004-03-19 Mark Mitchell <mark@codesourcery.com>
2798 * call.c (build_op_delete_call): Do not forget the placement
2799 arguments when iterating through mutiple delete operators.
2801 * cp-tree.h (svaed_scope): Remove last_parms.
2802 (NEW_DELETE_OPNAME_P): New macro.
2803 (last_function_parms): Remove.
2804 (do_friend): Adjust prototype.
2805 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
2806 using last_function_parms.
2807 (grokfndecl): Take the PARM_DECLs as an argument, rather than
2808 using last_function_parms.
2809 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
2810 for class-specific operator new and operator delete.
2811 (grok_op_properties): Do not look for allocation functions with
2813 (start_function): Use DECL_ARGUMENTS instead of
2814 last_function_parms.
2815 * decl.h (last_function_parms): Do not declare.
2816 * decl2.c (grokclassfn): Do not use last_function_parms.
2817 * friend.c (do_friend): Remove parmdecls parameter.
2818 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
2819 (pop_from_top_level): Do not restore it.
2820 * pt.c (check_explicit_specialization): Do not adjust
2821 last_function_parms.
2823 * name-lookup.c (do_local_using_decl): Create a local binding for
2824 types brought in via using declarations.
2826 * name-lookup.c (lookup_arg_dependent): Handle block-scope
2827 function declarations correctly.
2829 * semantics.c (finish_id_expression): Correct handling of
2830 conversion operators to dependent types.
2832 * typeck.c (lookup_destructor): Allow the use of destructors from
2835 2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2837 * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
2838 TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
2839 * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
2840 the field is named TEMPLATE_TYPE_PARM_INDEX.
2842 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2845 * parser.c (cp_parser_functional_cast): A cast to anything
2846 but integral or enumaration type is not an integral constant
2848 * pt.c (value_dependent_expression_p): Handle cast expressions
2849 without operands (such as "int()").
2851 2004-03-18 Mark Mitchell <mark@codesourcery.com>
2853 * semantics.c (finish_pseudo_destructor_expr): Allow differing
2854 cv-qualification between the type named by the
2855 pseudo-destructor-name and the object-type.
2857 * search.c (accessible_base_p): Handle non-proper bases.
2859 * name-lookup.c (do_nonmember_using_decl): If a using declaration
2860 refers to a single overloaded function, set the type of the
2862 * tree.c (lvalue_type): Simplify.
2863 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
2865 (build_unary_op): Handle OVERLOADs with known types.
2867 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
2870 * parser.c (cp_parser_postfix_expression): Handle the use of
2871 "typename" in non-dependent contexts. Convert appropriately when
2872 when using a qualified name after "->" or ".".
2874 * call.c (conditional_conversion): Honor the requirement that some
2875 conversions refer to the original object.
2877 2004-03-18 Mark Mitchell <mark@codesourcery.com>
2879 * call.c (build_conditional_expr): Do not call force_rvalue for
2880 operands of void_type when the conditional expression itself has
2882 * name-lookup.c (pushdecl): Don't consider a declaration of a
2883 function named "main" to be an overload of a type named "main".
2884 * parser.c (cp_parser_template_name): Perform name lookup when the
2885 template name is proceeded by "template" if the qualifying scope
2887 * typeck.c (composite_pointer_type_r): Correctly handle
2888 pointer-to-member types.
2889 (build_const_cast): Likewise.
2891 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2893 * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
2894 * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
2895 (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
2896 (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
2897 (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
2898 (TYPEOF_TYPE_EXPR): New macro.
2899 * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
2900 * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
2901 * pt.c (tsubst): Likewise.
2902 * semantics.c (finish_typeof): Likewise.
2903 * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
2904 and TEMPLATE_TYPE_PARM.
2905 * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
2906 (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
2908 2004-03-16 Mark Mitchell <mark@codesourcery.com>
2911 * cp-tree.h (build_new_op): Change prototype.
2912 (build_x_binary_op): Likewise.
2913 * call.c (build_new_op): Add overloaded_p parameter.
2914 * decl2.c (grok_array_decl): Adjust call to build_new_op.
2915 * parser.c (cp_parser_binary_expression): Note that uses of
2916 overloaded operators prevents an expression from being considered
2917 an integral constant.
2918 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
2920 * semantics.c (finish_call_expr): Likewise.
2921 * typeck.c (rationalize_conditional_expr): Likewise.
2922 (build_x_indirect_ref): Likewise.
2923 (build_x_binary_op): Likewise.
2924 (build_x_unary_op): Likewise.
2925 (build_x_compound_expr): Likewise.
2926 (build_modify_expr): Likewise.
2927 * typeck2.c (build_x_arrow): Likewise.
2929 2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
2931 * cp-lang.c, ptree.c: Update copyright.
2933 2004-03-13 Mark Mitchell <mark@codesourcery.com>
2936 * parser.c (cp_parser_non_integral_constant_expression): Encode
2937 more of the idiom that surrounded calls to this function within
2939 (cp_parser_primary_expression): Adjust accordingly.
2940 (cp_parser_postfix_expression): Likewise.
2941 (cp_parser_unary_expression): Likewise.
2942 (cp_parser_cast_expression): Likewise.
2943 (cp_parser_assignment_expression): Likewise.
2944 (cp_parser_expression): Likewise.
2945 (cp_parser_new_expression): Note that new-expressions are not
2946 allowed in integral constant expressions.
2947 (cp_parser_delete_expression): Likewise.
2949 2004-03-12 Matt Austern <austern@apple.com>
2951 * decl2.c (maybe_make_one_only): Look at
2952 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
2953 to make an explicit instantiation weak.
2954 * method.c (use_thunk): Make sure we call comdat_linkage
2956 * pt.c (do_type_instantiation): On systems where weak symbols
2957 don't go in a static archive's TOC, explicit instantiation of a
2958 class must imply *explicit* instantiation of its memeber.
2960 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
2962 * call.c, cp-tree.h, pt.c: Fix comment typos.
2964 2004-03-10 Mark Mitchell <mark@codesourcery.com>
2967 * decl.c (xref_tag): Disregard non-type declarations when
2968 looking up a tagged type.
2970 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
2973 * call.c (convert_like_real): Build a const qualified temporary,
2974 when testing ctor access.
2976 2004-03-09 Mark Mitchell <mark@codesourcery.com>
2978 * call.c (initialize_reference): Fix typo.
2980 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2983 * pt.c (determine_specialization): For member templates, match also
2987 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
2989 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
2991 2004-03-09 Mark Mitchell <mark@codesourcery.com>
2994 * call.c (initialize_reference): Handle initializers that are
2995 class-member access expressions applies to rvalues.
2997 2004-03-09 Mark Mitchell <mark@codesourcery.com>
3000 * name-lookup.c (supplement_binding): Ignore functions that are
3001 marked DECL_ANTICIPATED.
3003 2004-03-08 Mark Mitchell <mark@codesourcery.com>
3006 * class.c (check_field_decls): Complain about non-static data
3007 members of reference type in unions. Propagate
3008 CLASSTYPE_REF_FIELDS_NEED_INIT and
3009 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
3011 * init.c (perform_member_init): Complain about mbmers with const
3012 type that are not explicitly initialized.
3014 2004-03-08 Mark Mitchell <mark@codesourcery.com>
3016 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
3017 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
3018 (lang_identifier): Remove implicit_decl and error_locus.
3019 (IDENTIFIER_IMPLICIT_DECL): Remove.
3020 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
3021 (IDENTIFIER_ERROR_LOCUS): Likewise.
3022 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
3023 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
3024 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
3025 (implicitly_declare): Remove.
3026 * decl.c (warn_extern_redeclared_static): Remove check of
3027 IDENTIFIER_IMPLICIT_DECL.
3028 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
3029 (implicitly_declare): Remove.
3030 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
3031 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
3032 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
3033 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
3034 in the innermost scope, rather than at namespace scope.
3035 * name-lookup.c (push_local_binding): Give it external linkage.
3036 (pushdecl): Remove dead code.
3037 * name-lookup.h (push_local_binding): Declare it.
3038 * ptree.c (cxx_print_identifier): Don't print
3039 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
3040 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
3041 not IDENTIFIER_ERROR_LOCUS.
3042 * typeck.c (build_function_call): Remove dead code.
3044 2004-03-08 Jason Merrill <jason@redhat.com>
3047 * decl.c (xref_tag): Remove attribute handling.
3048 * cp-tree.h: Adjust prototype.
3049 * decl.c, parser.c, rtti.c: Adjust callers.
3050 * parser.c (cp_parser_class_head): Pass back attributes in the
3052 (cp_parser_class_specifier): Adjust.
3054 2004-03-08 Matt Austern <austern@apple.com>
3057 * name-lookup.c (add_decl_to_level): Add extern variables, as well
3058 as static, to static_decls array.
3060 2004-03-05 Jason Merrill <jason@redhat.com>
3062 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
3064 2004-03-04 Geoffrey Keating <geoffk@apple.com>
3066 * decl.c (grokfndecl): Update old incorrect comment.
3067 (grokvardecl): Diagnose C++ variables of type with no linkage.
3069 2004-03-01 Mark Mitchell <mark@codesourcery.com>
3072 * pt.c (build_non_dependent_expr): Do not create a
3073 NON_DEPENDENT_EXPR for a THROW_EXPR.
3075 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
3078 * error.c (dump_expr): Handle THROW_EXPR.
3080 2004-03-01 Mark Mitchell <mark@codesourcery.com>
3083 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
3084 lookup if ordinary name-lookup finds a non-function.
3085 * pt.c (tsubst_copy_and_build): Likewise.
3088 * parser.c (cp_parser_late_parsing_default_args): Check that there
3089 are no extra tokens after the end of the default-argument
3092 2004-03-01 Mark Mitchell <mark@codesourcery.com>
3095 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
3096 having C++ linkage for name-mangling purposes.
3099 * parser.c (cp_parser_direct_declarator): Recognize constructor
3100 declarators that use a template-id to name the class being
3104 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
3105 (tsubst_expr): Do not call tsubst_copy, even when
3106 processing_template_decl.
3108 2004-03-01 Jeff Law <law@redhat.com>
3110 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
3113 2004-02-29 Mark Mitchell <mark@codesourcery.com>
3116 * name-lookup.h (push_scope): Change prototype.
3117 * name-lookup.c (push_scope): Do not reenter the current class
3119 * decl.c (grokfndecl): Check return code from push_scope before
3121 * decl2.c (check_classfn): Likewise.
3122 * parser.c (cp_parser_conversion_function_id): Likewise.
3123 (cp_parser_init_declarator): Likewise.
3124 (cp_parser_direct_declarator): Likewise.
3125 (cp_parser_class_specifier): Likewise.
3126 (cp_parser_class_head): Likewise.
3127 (cp_parser_lookup_name): Likewise.
3128 (cp_parser_constructor_declarator_p): Likewise.
3129 * pt.c (instantiate_class_template): Likewise.
3130 (resolve_typename_type): Likewise.
3132 2004-02-29 Mark Mitchell <mark@codesourcery.com>
3135 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
3139 * class.c (update_vtable_entry_for_fn): Do not go through
3140 covariance machinery if the type returned by an overrider is the
3141 same as the original.
3143 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
3145 * call.c: Fix a comment typo.
3147 2004-02-27 Ziemowit Laski <zlaski@apple.com>
3149 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
3151 2004-02-26 Mark Mitchell <mark@codesourcery.com>
3154 * parser.c (cp_parser_parameter_declaration_list): Commit
3155 to fewer tentative parses.
3157 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3160 * pt.c (dependent_type_p_r): A template template parameter is a
3163 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3166 * mangle.c (write_template_arg_literal): Don't rely on identity for
3169 2004-02-24 Jason Merrill <jason@redhat.com>
3171 * tree.c (build_exception_variant): Use check_qualified_type.
3173 2004-02-23 Zack Weinberg <zack@codesourcery.com>
3174 Kazu Hirata <kazu@cs.umass.edu>
3176 * decl.c (cxx_init_decl_processing): Don't check
3177 flag_writable_strings.
3179 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
3182 * typeck.c (maybe_warn_about_returning_address_of_location):
3183 Change check for VAR_DECL to use DECL_P instead.
3185 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3188 * cvt.c (build_expr_type_conversion): Type must be complete before
3189 looking up for conversions.
3191 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3194 * name-lookup.c (arg_assoc_class): Don't look into template
3195 arguments if it is not a primary template.
3197 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3200 * method.c (use_thunk): Always clone function argument tree.
3202 2004-02-20 Mark Mitchell <mark@codesourcery.com>
3205 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
3208 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
3209 for all type variants.
3211 2004-02-19 Mark Mitchell <mark@codesourcery.com>
3214 * decl.c (duplicate_decls): Return error_mark_node for invalid
3216 * name-lookup.c (push_namespace): Ignore the return value from
3218 * pt.c (push_template_decl_real): Robustify.
3221 * name-lookup.c (push_class_level_binding): Do not complain about
3222 adding a binding for a member whose name is the same as the
3223 enclosing class if the member is located in a base class of the
3226 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3229 * parser.c (cp_parser_new_expression): Parse an ill-formed
3230 direct-new-declarator after a parenthesized type-id to emit good
3233 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
3235 * cp-tree.def, cvt.c: Update copyright.
3237 2004-02-17 Mark Mitchell <mark@codesourcery.com>
3240 * cp-tree.h (abi_version_at_least): Remove.
3241 * mangle.c: Include flags.h.
3243 2004-02-15 Mark Mitchell <mark@codesourcery.com>
3246 * call.c (build_conditional_expr): Handle conversions between
3247 class types which result in differently cv-qualified type
3251 * class.c (delete_duplicate_fields_1): Remove.
3252 (delete_duplicate_fields): Likewise.
3253 (finish_struct_anon): Remove check for members with the same name
3254 as their enclosing class.
3255 (check_field_decls): Do not call duplicate_fields.
3256 * decl.c (grokdeclarator): Remove check for static data members
3257 with the same name as their enclosing class.
3258 * name-lookup.c (push_class_level_binding): Check for members with
3259 the same name as their enclosing class.
3261 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
3264 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
3266 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3269 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
3270 has full set of arguments.
3272 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3275 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
3277 2004-02-13 Mark Mitchell <mark@codesourcery.com>
3280 * cp-tree.h (delete_sanity): Change prototype.
3281 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
3282 Remove dead code. Adjust code to warn about deleting an array.
3283 * typekc.c (decay_conversion): Use build_address and build_nop.
3286 * search.c (accessible_p): Do not check access in thunks.
3289 * call.c (build_conditional_expr): Call force_rvalue on the
3290 non-void operand in the case that one result is a throw-expression
3291 and the other is not.
3293 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
3296 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
3297 the type name and look ahead for ::~, and bail out early with a
3298 better error message if the parse is going to fail.
3300 2004-02-12 Mark Mitchell <mark@codesourcery.com>
3302 * call.c (conversion_kind): New type.
3303 (conversion_rank): Likewise.
3304 (conversion): Likewise.
3305 (CONVERSION_RANK): New macro.
3306 (conversion_obstack): New variable.
3307 (obstack_initialized): Likewise.
3308 (z_candidate): Change type of convs and second_conv.
3309 (candidate_warning): New type.
3310 (IDENTITY_RANK): Remove.
3311 (EXACT_RANK): Likewise.
3312 (PROMO_RANK): Likewise.
3313 (STD_RANK): Likewise.
3314 (PBOOL_RANK): Likewise.
3315 (USER_RANK): Likewise.
3316 (ELLIPSIS_RANK): Likewise.
3317 (BAD_RANK): Likewise.
3318 (ICS_RANK): Likewise.
3319 (ICS_STD_RANK): Likewise.
3320 (ICS_USER_FLAG): Likewise.
3321 (ICS_ELLIPSIS_FLAG): Likewise.
3322 (ICS_THIS_FLAG): Likewise.
3323 (ICS_BAD_FLAG): Likewise.
3324 (NEED_TEMPORARY_P): Likewise.
3325 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
3326 (USER_CONV_CAND): Likewise.
3327 (USER_CONV_FN): Likewise.
3328 (conversion_obstack_alloc): New function.
3329 (alloc_conversion): Likewise.
3330 (validate_conversion_obstack): Likewise.
3331 (alloc_conversions): Likewise.
3332 (build_conv): Adjust to deal with new conversion data structures.
3333 (build_identity_conv): New function.
3334 (build_ambiguous_conv): Likewise.
3335 (standard_conversion): Adjust to deal with new conversion data
3337 (convert_class_to_reference): Likewise.
3338 (direct_reference_binding): Likewise.
3339 (reference_binding): Likewise.
3340 (implicit_conversion): Likewise.
3341 (add_candidate): Likewise.
3342 (add_function_candidate): Likewise.
3343 (add_conv_candidate): Likewise.
3344 (build_builtin_candidate): Likewise.
3345 (print_z_candidate): Likewise.
3346 (merge_conversion_sequences): Likewise.
3347 (build_user_type_conversion_1): Likewise.
3348 (build_user_type_conversion): Likewise.
3349 (build_new_function_call): Likewise.
3350 (build_object_call): Likewise.
3351 (conditional_conversion): Likewise.
3352 (build_conditional_expr): Likewise.
3353 (build_new_op): Likewise.
3354 (build_op_delete_call): Likewise.
3355 (convert_like_real): Likewise.
3356 (build_over_call): Likewise.
3357 (build_new_method_call): Likewise.
3358 (is_subseq): Likewise.
3359 (maybe_handle_implicit_object): Likewise.
3360 (maybe_handle_ref_bind): Likewise.
3361 (compare_ics): Likewise.
3362 (source_type): Likewise.
3363 (add_warning): Likewise.
3365 (can_convert_arg): Likewise.
3366 (can_convert_arg_bad): Likewise.
3367 (perform_implicit_conversion): Likewise.
3368 (perform_direct_initialization_if_possible): Likewise.
3369 (initialize_reference): Likewise.
3370 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
3371 * cp-tree.def (WRAPPER): Likewise.
3372 (IDENTITY_CONV): Remove.
3373 (LVALUE_CONV): Likewise.
3374 (QUAL_CONV): Likewise.
3375 (STD_CONV): Likewise.
3376 (PTR_CONV): Likewise.
3377 (PMEM_CONV): Likewise.
3378 (BASE_CONV): Likewise.
3379 (REF_BIND): Likewise.
3380 (USER_CONV): Likewise.
3381 (AMBIG_CONV): Likewise.
3382 (RVALUE_CONV): Likewise.
3383 * cp-tree.h (tree_wrapper): Remove.
3384 (WRAPPER_ZC): Remove.
3385 (lang_tree_node): Remove wrapper.
3386 (LOOKUP_SPECULATIVELY): Remove.
3387 (build_op_delete_call): Adjust prototype.
3388 (validate_conversion_obstack): Declare.
3389 (build_zc_wrapper): Remove.
3390 * cvt.c (convert_to_reference): Remove dead code.
3391 (ocp_convert): Likewise.
3392 * decl.c (redeclaration_error_message): Correct handling of
3394 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
3395 (cp_tree_node_structure): Remove WRAPPER case.
3396 * decl2.c (finish_file): Call validate_conversion_obstack.
3397 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
3398 (build_op_delete_call): Likewise.
3399 (build_x_delete): Likewise.
3400 (build_delete): Adjust call to build_op_delete_call.
3401 * pt.c (tsubst_friend_declaration): Adjust code to determine
3402 whether or not a friend template is a definition.
3403 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
3404 * tree.c (build_zc_wrapper): Remove.
3406 2004-02-12 Zack Weinberg <zack@codesourcery.com>
3408 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
3409 * cp-tree.h: Don't declare cxx_builtin_type_decls.
3410 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
3411 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
3413 2004-02-10 Mark Mitchell <mark@codesourcery.com>
3415 * typeck.c (lookup_destructor): Fix typo in error message.
3417 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
3419 * call.c, parser.c, tree.c: Fix comment typos.
3421 2004-02-07 Zack Weinberg <zack@codesourcery.com>
3424 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
3425 * decl.c (duplicate_decls, start_function): Likewise.
3427 2004-02-07 Zack Weinberg <zack@codesourcery.com>
3429 * name-lookup.c (pushdecl): Issue shadow warnings directly.
3430 * parser.c (free_parser_stacks): Delete.
3432 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
3434 * rtti.c: Update copyright.
3436 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3439 * decl.c (require_complete_types_for_parms): Do not insert
3440 error_mark_node in the parameter list.
3442 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3445 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
3446 error when terminator can not be found.
3448 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
3450 Make-lang.in (po-generated): Delete.
3452 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
3454 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
3455 targetm.calls.promote_prototypes.
3457 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3461 2004-01-15 Geoffrey Keating <geoffk@apple.com>
3463 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
3464 (handle_pragma_implementation): Likewise.
3466 2004-02-05 Mark Mitchell <mark@codesourcery.com>
3469 * typeck.c (lookup_destructor): Tweak error message.
3471 2004-02-05 Jan Hubicka <jh@suse.cz>
3473 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
3476 2004-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3479 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
3480 code, only emits the diagnostic now. Added lookup of the identifier
3481 and support for qualified ids.
3482 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
3483 Parse an (invalid) type name as id-expression within a declarator.
3484 (cp_parser_simple_declaration): Use it.
3485 (cp_parser_member_declaration): Likewise.
3486 (cp_parser_make_typename_type): New function. Handle errors through
3487 cp_parser_diagnose_invalid_typename.
3488 (cp_parser_elaborated_type_specifier): Use it.
3490 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3493 * call.c (convert_like_real): Use "converting" rather than
3494 "argument" as the descriptive keyword to
3495 dubious_conversion_warnings.
3496 * typeck.c (convert_for_assignment): Do not call
3497 dubious_conversion_warnings.
3499 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3502 * init.c (build_delete): Emit a more informative error message in
3503 case of an incomplete type, and on the correct source line.
3505 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
3507 * error.c, search.c: Update copyright.
3509 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3512 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
3513 linkage for the typeinfo name string.
3515 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3518 * cp-tree.h (fold_non_dependent_expr): New function.
3519 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
3520 (cp_parser_template_argument): Use fold_non_dependent_expr.
3521 (cp_parser_direct_declarator): Likewise.
3522 * pt.c (fold_non_dependent_expr): New function.
3523 (convert_nontype_argument): Use it.
3524 (tsubst_qualified_id): Simplify.
3525 (tsubst_copy_and_build): Likewise.
3527 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3529 * decl.c (cxx_push_function_context): Do not set
3530 current_function_is_thunk.
3531 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
3534 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3537 * pt.c (more_specialized_class): Increase processing_template_decl
3538 while partial ordering.
3540 2004-02-03 Mark Mitchell <mark@codesourcery.com>
3543 * decl.c (start_function): Do not call pushdecl for any
3544 instantiation or specialization of a primary template.
3546 2004-02-03 Mark Mitchell <mark@codesourcery.com>
3549 * parser.c (cp_parser_class_name): Robustify.
3552 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
3555 * semantics.c (finish_id_expression): Do not return an
3556 IDENTIFIER_NODE when lookup finds a PARM_DECL.
3558 2004-02-03 Mark Mitchell <mark@codesourcery.com>
3561 * pt.c (build_non_dependent_expr): Do not build
3562 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
3565 * semantics.c (finish_id_expression): Do not return an
3566 IDENTIFIER_NODE when lookup finds a VAR_DECL.
3569 * parser.c (cp_parser_simple_declaration): When skipping to the
3570 end of the statement swallow the terminating semicolon.
3572 2004-02-02 Mark Mitchell <mark@codesourcery.com>
3575 * init.c (build_offset_ref): Improve error recovery for invalid
3576 uses of non-static member functions.
3579 * cp-tree.h (cp_build_type_attribute_variant): New function.
3580 * class.c (build_clone): Use cp_build_type_attribute_variant.
3581 * decl.c (duplicate_decls): Likewise.
3582 * pt.c (copy_default_args_to_explicit_spec): Likewise.
3583 (tsubst_function_type): Likewise.
3584 * tree.c (build_exception_variant): Check attributes before
3585 concluding that two types are the same.
3586 (cp_build_type-attribute_variant): New method.
3587 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
3590 * call.c (convert_class_to_reference): Keep better track of
3591 pedantically invalid user-defined conversions.
3593 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3596 * pt.c (tsubst_qualified_id): Improved error message when a type
3597 is expected but not found.
3599 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
3601 * class.c: Fix comment typos.
3603 * error.c: Likewise.
3604 * parser.c: Likewise.
3606 * search.c: Likewise.
3607 * typeck.c: Likewise.
3609 2004-01-30 Richard Henderson <rth@redhat.com>
3612 * method.c (use_thunk): Don't force_target_expr for void thunks.
3613 * tree.c (build_target_expr_with_type): Assert non-void type.
3614 (force_target_expr): Likewise.
3616 2004-01-30 Michael Matz <matz@suse.de>
3618 * parser.c (cp_parser_labeled_statement): Accept case ranges.
3620 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3624 * decl.c (grokdeclarator): Check immediatly type completeness for
3625 non-dependent types.
3627 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3630 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
3631 a sizeof expression.block
3633 2004-01-29 Mark Mitchell <mark@codesourcery.com>
3636 * mangle.c (write_encoding): Correct encoding of member template
3639 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3641 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
3642 template name as it was `<::' (digraph typo).
3643 (cp_parser_nth_token_starts_template_argument_list_p): New function.
3644 (cp_parser_id_expression): Use it.
3645 (cp_parser_nested_name_specifier_opt): Likewise.
3646 (cp_parser_template_name): Likewise.
3647 (cp_parser_class_name): Likewise.
3648 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
3650 2004-01-28 Mark Mitchell <mark@codesourcery.com>
3653 * typeck.c (merge_types): Do not merge attributes into
3657 * parser.c (cp_parser_direct_declarator): Do not prevent
3658 backtracking inside a parenthesized declarator.
3659 (cp_parser_parameter_declaration): Fix typo in comment.
3661 2004-01-28 Jan Hubicka <jh@suse.cz>
3663 * semantics.c (expand_body) Do emit_associated_thunks before
3666 2004-01-27 Devang Patel <dpatel@apple.com>
3668 * name-lookup.c: Include "debug.h"
3669 (do_namespace_alias): Invoke debug_hooks to emit debug info
3670 for namespace alias.
3671 (do_local_using_decl): Invoke debug_hooks to emit debug info
3673 (do_class_using_decl): Same.
3674 (do_toplevel_using_decl): Same.
3675 (do_using_directive): Same.
3676 (cp_emit_debug_info_for_using): New function.
3677 * Make-lang.in (cp/parser.o): Depend on debug.h
3678 (cp/name-lookup.o): Same.
3680 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3682 * cp-tree.h (language_function, lang_type_header): Use
3684 * name-lookup.h (cp_binding_level): Likewise.
3686 2004-01-26 Mark Mitchell <mark@codesourcery.com>
3689 * semantics.c (finish_for_expr): Check for unresolved overloaded
3692 * class.c (add_method): Just check processing_template_decl to
3693 determine whether or not we are within a template.
3694 * decl2.c (maybe_retrofit_in_chrg): Likewise.
3695 * init.c (decl_constant_value): Check the type of the declaration,
3697 * name-lookup.c (maybe_push_to_top_level): Rename to ...
3698 (push_to_top_level): ... this.
3699 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
3700 * pt.c (push_template_decl_real): Reorder condition for speed.
3701 (convert_template_argument): Use dependency-checking functions in
3702 place of uses_template_parms.
3703 (lookup_template_class): Avoid calling uses_template_parms more
3705 (uses_template_parms): Reimplement, using dependency-checking
3707 (instantiate_class_template): Use push_to_top_level, not
3708 maybe_push_to_top_level.
3709 (type_unification_real): Simplify.
3710 (type_dependent_expression_p): Handle OFFSET_REFs and
3712 (any_dependent_template_arguments_p): Handle multiple levels of
3714 * semantics.c (expand_or_defer_fn): Do not check
3715 uses_template_parms for template instantiations.
3716 * typeck.c (comptypes): Avoid calling cp_type_quals.
3718 2004-01-25 Mark Mitchell <mark@codesourcery.com>
3721 * call.c (build_over_call): Do not convert arguments when
3722 processing a template.
3723 * pt.c (build_non_dependent_expr): Do not build a
3724 NON_DEPENDENT_EXPR for arithmetic constants.
3726 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3729 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
3730 returns a TYPE_DECL. no further lookup is required.
3731 * semantics.c (check_template_template_default_arg): A TYPE_DECL
3732 is invalid. Rework to give better diagnostics.
3734 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3737 * pt.c (instantiate_class_template): Add an error_mark_node
3739 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
3741 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
3744 * decl.c (finish_function): Move the call to
3745 finish_fname_decls below the call to
3746 finish_eh_spec_block.
3748 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
3750 * optimize.c, typeck2.c: Update copyright.
3752 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
3754 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
3755 init.c, mangle.c, typeck.c: Update copyright.
3757 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
3759 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
3761 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
3763 * Make-lang.in: Replace $(docdir) with doc.
3764 (c++.info, c++.srcinfo): Dummy entry.
3765 (c++.man, c++.srcman): New rules.
3766 (c++.install-man): Revamp rule.
3768 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
3770 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
3771 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
3772 immediate $(shell) instead of deferred backquote.
3774 2004-01-19 Mark Mitchell <mark@codesourcery.com>
3777 * parser.c (cp_parser_postfix_expression): When encountering
3778 incomplete type on left-hand side of "->" or ".", treat the entire
3779 expression as erroneous.
3782 * call.c (build_field_call): Remove.
3783 (n_build_method_call): Likewise.
3784 (build_method_call): Likewise.
3785 (build_new_method_call): Do not call build_field_call.
3786 * class.c (n_build_method_call): Remove.
3787 (print_class_statistics): Do not print it.
3788 * cp-tree.h (build_method_call): Remove declaration.
3789 (finish_object_call_expr): Likewise.
3790 (build_new_1): Do not use build_method_call.
3791 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
3792 when the function appearing on the right-hand-side of "." or "->"
3793 is not actually a function.
3794 * pt.c (tsubst_copy_and_build): Likewise.
3795 * semantics.c (finish_object_call_expr): Remove.
3797 2004-01-18 Mark Mitchell <mark@codesourcery.com>
3800 * pt.c (tsubst): Use finish_typeof.
3802 2004-01-18 Jason Merrill <jason@redhat.com>
3805 * except.c (build_throw): In a template, set
3806 current_function_returns_abnormally.
3808 2004-01-17 Fred Fish <fnf@intrinsity.com>
3811 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
3812 except don't call array_type_nelts() with a VECTOR_TYPE.
3814 2004-01-16 Jan Hubicka <jh@suse.cz>
3816 * mangle.c (write_mangled_name): Remove inline modifier.
3818 2004-01-16 Mark Mitchell <mark@codesourcery.com>
3821 * decl.c (compute_array_index_type): Fix grammar in comment.
3822 * init.c (build_zero_init): Handle zero-sized arrays correctly.
3825 * call.c (name_as_c_string): Print conversion operator names
3829 * call.c (initialize_reference): Pass -1 for inner parameter to
3832 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3835 * parser.c (cp_parser_base_specifier): Check for an invalid
3836 keyword `typename' and emit an user-friendly error message.
3838 2004-01-15 Geoffrey Keating <geoffk@apple.com>
3841 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
3842 (handle_pragma_implementation): Likewise.
3844 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3847 * typeck.c (build_class_member_access_expr): Allow to access members
3848 of the currently open class.
3849 (finish_class_member_access_expr): Likewise.
3851 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
3854 * name-lookup.c (validate_nonmember_using_decl): Take scope and
3855 name by value, instead of computing them.
3856 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
3857 arguments. Pass them to validate_nonmember_using_decl.
3858 * name-lookup.h (do_local_using_decl): Adjust.
3859 (do_toplevel_using_decl): Likewise.
3860 * parser.c (cp_parser_using_declaration): Likewise.
3861 * pt.c (tsubst_expr): Likewise.
3863 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
3867 * name-lookup.c (qualified_lookup_using_namespace): Search
3868 strongly-associated namespaces first, and only then try other
3871 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
3873 * Make-lang.in (c++.srcextra): Dummy entry.
3875 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3878 * parser.c (cp_parser_template_name): Don't try to parse a
3879 conversion-function-id, as it cannot be a template-name.
3880 (cp_parser_simple_type_specifier): Check for invalid template-ids
3881 even after a built-in type.
3883 2004-01-14 Jan Hubicka <jh@suse.cz>
3886 * pt.c (instantiate_decl): Do not increase function_depth.
3888 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
3892 * parser.c (cp_parser_elaborated_type_specifier): Warn about
3893 attributes and discard.
3894 * decl.c (xref_tag): Don't overwite existing attributes with
3897 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3900 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
3901 is no destructor while looking up a BIT_NOT_EXPR.
3903 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
3905 * cxxfilt.c: Remove unused file.
3907 2004-01-14 Jan Hubicka <jh@suse.cz>
3909 Partial fix to PR c++/12850
3910 * decl2.c (mark_used): Do not proactively instantiate templates
3911 when compiling in unit-at-a-time or not optimizing.
3912 * optimize.c (maybe_clone_body): Do not increase function depth.
3914 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3917 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
3919 2004-01-12 Steven Bosscher <stevenb@suse.de>
3922 * parser.c (cp_parser_member_declaration): Any non-type is also
3923 not a class or a function.
3925 2004-01-12 Jason Merrill <jason@redhat.com>
3928 * class.c (build_base_path): Do not mark vtable references as
3930 (build_vtbl_ref_1): Likewise.
3932 2004-01-12 Richard Henderson <rth@redhat.com>
3935 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
3936 (store_init_value): Use it.
3937 * decl.c (check_initializer): Expect full initialization code
3938 from store_init_value.
3939 * init.c (expand_aggr_init_1): Likewise.
3940 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
3942 2004-01-12 Mark Mitchell <mark@codesourcery.com>
3944 * class.c (layout_class_type): For non-POD class types, also copy
3945 the DECL_SIZE and DECL_MODE of fields to the base class type.
3947 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3950 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
3951 calling regenerate_decl_from_template.
3953 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
3956 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
3957 decl-specifier occurring along with a class definition.
3959 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
3961 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
3962 clauses to comments describing declares_class_or_enum.
3963 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
3966 2004-01-12 Jan Hubicka <jh@suse.cz>
3968 * pt.c (for_each_template_parm): Do not check for duplicates.
3969 (for_each_template_parm): Use walk_tree duplicate checking code.
3971 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
3974 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
3975 is error_mark_node, don't add any more decl_specs.
3976 (cp_parser_init_declarator): After committing to a declaration, if
3977 the decl_specifiers start with error_mark_node, issue an error and
3978 change the type to "int".
3980 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
3983 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
3985 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3989 * pt.c (tsubst): Substitution must fail if we are attempting to
3990 create an array with element type that is an abstract class type.
3991 * decl.c (cp_finish_decl): Strip pointers and array types recursively
3992 before calling abstract_virtuals_error.
3994 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
3996 * name-lookup.c (qualified_lookup_using_namespace): Consider
3997 strong using directives even if we've already found a binding.
3999 2004-01-09 Mark Mitchell <mark@codesourcery.com>
4001 * cp-tree.h (cxx_expand_expr): Change prototype.
4002 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
4004 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4007 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
4008 looking into them recursively. They can be there because of the
4009 new __offsetof__ extension.
4011 2004-01-07 Zack Weinberg <zack@codesourcery.com>
4013 * parser.c (cp_parser_save_member_function_body): Mark the
4016 2004-01-05 Mark Mitchell <mark@codesourcery.com>
4019 * class.c (build_clone): Copy type attributes from the original
4020 function to the clone.
4023 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
4024 references as constant.
4027 * parser.c (cp_parser_explicit_instantiation): Improve error
4029 (cp_parser_require): Improve indication of the error location.
4032 * parser.c (cp_parser_class_head): Reorder logic to check for
4033 invalid qualification.
4035 2004-01-04 Mark Mitchell <mark@codesourcery.com>
4038 * name-lookup.c (lookup_using_namespace): Remove spacesp
4040 (unqualified_namespace_lookup): Likewise.
4041 (lookup_qualified_name): Adjust accordingly.
4042 (lookup_name_real): Likewise.
4043 (lookup_arg_dependent): Do not eliminate the namespace of the
4044 functions found by unqualified name lookup unless that is the
4047 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
4049 * semantics.c (push_deferring_access_checks): Fix format.
4050 (resume_deferring_access_checks): Likewise.
4051 (stop_deferring_access_checks): Likewise.
4052 (pop_deferring_access_checks): Likewise.
4053 (get_deferred_access_checks): Likewise.
4054 (pop_to_parent_deferring_access_checks): Likewise.
4055 (perform_deferred_access_checks): Likewise.
4056 (perform_or_defer_access_check): Likewise.
4058 2004-01-04 Richard Henderson <rth@redhat.com>
4060 * call.c (build_over_call): Don't create a save_expr of an
4061 aggregate, but rather its address.
4063 2004-01-04 Mark Mitchell <mark@codesourcery.com>
4066 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
4067 an offsetof expression.
4069 * parser.c (cp_parser_parameter_declaration): Fix comment.
4072 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
4073 (reference_binding): Set it when appropriate.
4074 (build_temp): New function, split out from ...
4075 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
4076 (initialize_reference): Likewise.
4079 * parser.c (cp_parser): Add in_type_id_in_expr_p.
4080 (cp_parser_new): Initialize it.
4081 (cp_parser_postfix_expression): Set it.
4082 (cp_parser_sizeof_operand): Likewise.
4083 (cp_parser_parameteR_declaration): Do not commit early to tenative
4084 parsers when in_type_id_in_expr_p is set.
4086 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4089 * parser.c (cp_parser_template_argument): Don't call
4090 make_unbound_class_template directly.
4091 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
4092 UNBOUND_CLASS_TEMPLATE tree node.
4094 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
4097 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
4099 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4102 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
4103 (DECL_FUNCTION_TEMPLATE_P): Use it.
4104 (DECL_CLASS_TEMPLATE_P): Likewise.
4105 * parser.c (cp_parser_lookup_name): Add is_template parameter.
4106 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
4107 (cp_parser_template_name): Likewise.
4108 (cp_parser_elaborated_type_specifier): Likewise.
4109 (cp_parser_namespace_name): Likewise.
4110 (cp_parser_class_name): Likewise.
4111 (cp_parser_lookup_name_simple): Likewise.
4113 See ChangeLog.3 for earlier changes.