1 2004-08-23 Nathan Sidwell <nathan@codesourcery.com>
3 * name-lookup.c (pushdecl): Rename build_type_copy call.
4 * tree.c (cp_build_qualified_type_real,
5 build_exception_variant, handle_java_interface_attribute): Likewise.
7 2004-08-22 Andrew Pinski <apinski@apple.com>
10 * typeck.c (build_unary_op): Use &a.b if the foldded lowered
11 expression is not constant.
13 2004-08-20 Mark Mitchell <mark@codesourcery.com>
16 * decl.c (expand_static_init): Use DECL_FUNCTION_SCOPE_P.
18 2004-08-21 Joseph S. Myers <jsm@polyomino.org.uk>
21 * pt.c (tsubst_copy_and_build): Avoid clearing TREE_NO_WARNING for
24 2004-08-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
26 * pt.c (register_specialization): Check DECL_TEMPLATE_SPECIALIZATION
27 before calling comp_template_args.
29 2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
31 * class.c (build_vtbl_initializer): Use build_int_cst for
33 * decl.c (complete_array_type): Likewise.
34 * method.c (finish_thunk): Likewise.
36 2004-08-20 Andreas Tobler <a.tobler@schweiz.ch>
38 * tree.c: Remove unused mark_local_for_remap_r.
40 2004-08-19 Eric Christopher <echristo@redhat.com>
42 * cp-tree.h (cxx_unsave_expr_now): Delete prototype.
43 * tree.c (cxx_unsave_expr_now): Delete.
46 2004-08-19 Mark Mitchell <mark@codesourcery.com>
49 * pt.c (push_template_decl_real): Disallow template allocation
50 functions with fewer than two parameters.
52 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
54 * cp-tree.h (build_shared_int_cst): Remove.
55 * tree.c (shared_int_cache): Remove.
56 (build_shared_int_cst): Remove.
57 * class.c (finish_struct_1): Use build_int_cst.
59 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
61 * decl.c (finish_enum): Do not copy value node early, copy
63 * lex.c (cxx_init): Force null_node to be unique.
65 2004-08-19 Joseph S. Myers <jsm@polyomino.org.uk>
68 * pt.c (tsubst_copy, tsubst_copy_and_build): Copy TREE_NO_WARNING
69 from input for MODOP_EXPR.
71 2004-08-18 Mark Mitchell <mark@codesourcery.com>
73 * pt.c (dependent_template_p): Fix typo in commment.
76 * pt.c (dependent_template_p): Treat IDENTIFIER_NODEs as
79 2004-08-17 Mark Mitchell <mark@codesourcery.com>
82 * pt.c (unify): Tidy ARRAY_TYPE handling. Make sure that non-type
83 arguments have the same type as the corresponding parameter.
86 * parser.c (cp_parser_name_lookup_error): If parser->object_scope
87 is set use it for diagnostic purposes.
88 (cp_parser_pseudo_destructor_name): Remove special-case error
92 * semantics.c (expand_or_defer_fn): Honor -fkeep-inline-functions.
95 * cp-tree.h (qualified_name_lookup_error): Add parameter.
96 * name-lookup.c (do_class_using_decl): Restrict set of entities
97 passed to cp_emit_debug_info_for_using more carefully.
98 (lookup_qualified_name): Allow lookup_member to return sets of
100 * parser.c (cp_parser_lookup_name): Add ambiguous_p parameter.
101 (cp_parser_primary_expression): Handle ambiguous lookups.
102 (cp_parser_template_name): Adjust use of cp_parser_lookup_name.
103 (cp_parser_template_argument): Likewise.
104 (cp_parser_elaborate_type_specifier): Likewise.
105 (cp_parser_namespace_name): Likewise.
106 (cp_parser_class_name): Likewise.
107 (cp_parser_lookup_name_simple): Likewise.
108 * pt.c (tsubst_qualified_id): Handle ambiguous results.
109 (tsubst_expr): Likewise.
110 * semantics.c (qualified_name_lookup_error): Add decl paramter.
111 For ambiguous lookups, print candidates.
113 2004-08-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
116 * pt.c (instantiate_pending_templates): Add int parameter. Don't
118 * cp-tree.h (instantiate_pending_templates): Adjust prototype.
119 * decl2.c (finish_file): Adjust call to
120 instantiate_pending_templates.
122 2004-08-15 Roger Sayle <roger@eyesopen.com>
124 * call.c (build_vfield_ref, build_call, build_conditional_expr,
125 convert_arg_to_ellipsis, build_x_va_arg, build_over_call,
126 build_java_interface_fn_ref, build_special_member_call,
127 build_new_method_call, initialize_reference): Replace calls to
128 build with calls to buildN.
129 * class.c (build_base_path, convert_to_base_statically,
130 build_vfn_ref, instantiate_type, dfs_accumulate_vtbl_inits,
131 build_vtbl_initializer): Likewise.
132 * cp-gimplify.c (genericize_try_block, genericize_catch_block,
133 gimplify_if_stmt, cp_genericize_r): Likewise.
134 * cvt.c (convert_to_void): Likewise.
135 * decl.c (check_initializer, finish_constructor_body,
136 finish_destructor_body): Likewise.
137 * error.c (dump_expr): Likewise.
138 * except.c (build_exc_ptr, expand_start_catch_block, build_throw):
140 * init.c (perform_member_init, expand_virtual_init,
141 expand_cleanup_for_base, build_init, expand_default_init,
142 build_offset_ref, decl_constant_value, build_new, build_new_1,
143 build_vec_delete_1, build_vec_init, build_delete,
144 push_base_cleanups, build_vec_delete): Likewise.
145 * mangle.c (write_integer_cst): Likewise.
146 * method.c (thunk_adjust, do_build_copy_constructor,
147 do_build_assign_ref): Likewise.
148 * pt.c (lookup_template_function, tsubst, tsubst_copy_and_build,
149 unify, build_non_dependent_expr): Likewise.
150 * rtti.c (build_headof, build_typeid, ifnonnull,
151 build_dyanmic_cast_1, tinfo_base_init): Likewise.
152 * semantics.c (begin_compound_stmt, finish_call_expr,
153 finish_pseudo_destructor_expr, finish_id_expression,
154 simplify_aggr_init_expr, finalize_nrv_r): Likewise.
155 * tree.c (build_target_expr, build_cplus_new, array_type_nelts_top,
156 array_type_nelts_total, stabilize_call): Likewise.
157 * typeck.c (decay_conversion, build_class_member_access_expr,
158 lookup_destructor, build_ptrmemfunc_access_expr, build_array_ref,
159 get_member_function_from_ptrfunc, build_binary_op, pointer_diff,
160 build_x_unary_op, build_unary_op, unary_complex_lvalue,
161 build_compound_expr, build_modify_expr, expand_ptrmemfunc_cst,
162 check_return_expr): Likewise.
163 * typeck2.c (split_nonconstant_1, split_nonconstant_init_1,
164 split_nonconstant_init, store_init_value, build_m_component_ref):
167 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
169 * call.c (convert_class_to_reference,
170 build_user_type_conversion_1, convert_like_real,
171 build_java_interface_fn_ref, build_special_member_call): Use
173 * class.c (build_vtbl_initializer): Likewise.
174 * cp-gimplify.c (cp_gimplify_expr): Likewise.
175 * cvt.c (cp_convert_to_pointer): Likewise.
176 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
177 * decl2.c (start_static_initialization_or_destruction,
178 generate_ctor_or_dtor_function): Likewise.
179 * except.c (build_throw): Likewise.
180 * lex.c (cxx_init): Likewise.
181 * mangle.c (write_integer_cst): Likewise.
182 * rtti.c (build_headof, get_tinfo_decl_dynamic,
183 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
184 get_pseudo_ti_init): Likewise.
185 * search.c (get_dynamic_cast_base_type): Likewise.
186 * tree.c (build_shared_int_cst): Likewise.
188 2004-08-12 Mark Mitchell <mark@codesourcery.com>
191 * class.c (count_depth_data): New type.
192 (dfs_depth_post): New function.
193 (dfs_depth_q): Likewise.
194 (find_final_overrider_data_s): Change type of vpath.
196 (dfs_find_final_overrider_1): New function.
197 (dfs_find_final_overrider): Use it.
198 (dfs_find_final_overrider_q): Adjust use of vpath.
199 (dfs_find_final_overrider_post): Likewise.
200 (find_final_overrider): Use dfs_depth. Allocate and deallocate
203 2004-08-12 Jan Beulich <jbeulich@novell.com>
205 * parser.c (cp_parser_asm_definition): Properly consume scope operator
206 tokens preceding the clobbers. Don't check for scope operator
207 following inputs. Simplify inputs handling to match that now used for
210 2004-08-11 Mark Mitchell <mark@codesourcery.com>
213 * except.c (build_throw): Allocate cleanup_type and the function
214 for __cxa_throw separately.
217 * call.c (standard_conversion): Do not accept conversions between
218 pointers to members if the class types are unrelated.
221 * parser.c (cp_parser_builtin_offsetof): Cast to "const volatile
222 char &" instead of just "char &".
225 * pt.c (tsubst): Just return the unknown_type_node.
227 2004-08-11 Mark Mitchell <mark@codesourcery.com>
230 * parser.c (cp_parser_class_specifier): Robustify.
233 * pt.c (tsubst_copy_and_build): Complain about invalid
237 * pt.c (tsubst_default_argument): Clear out current_class_ptr and
238 current_class_ref while tsubsting.
240 2004-08-10 Mark Mitchell <mark@codesourcery.com>
243 * parser.c (cp_parser_init_declarator): Robustify.
245 2004-08-06 Richard Sandiford <rsandifo@redhat.com>
247 * typeck2.c (process_init_constructor): Guard the missing field warning
248 with warn_missing_field_initializers rather than extra_warnings.
250 2004-08-06 Paolo Bonzini <bonzini@gnu.org>
252 * class.c (instantiate_type) <ENTRY_VALUE_EXPR>: Do not handle.
254 2004-08-05 Mark Mitchell <mark@codesourcery.com>
256 * decl.c (start_preparsed_function): Move determine_visibility
258 * decl2.c (determine_visibility): Incorporate dllexport testing.
260 2004-08-05 Geoffrey Keating <geoffk@apple.com>
262 * g++spec.c (lang_specific_driver): An -Xlinker or -Wl, option
263 means that libstdc++ is needed.
265 2004-08-05 Nathan Sidwell <nathan@codesourcery.com>
267 * cvt.c (cp_convert_to_pointer): Adjust force_fit_type call.
269 2004-08-04 Geoffrey Keating <geoffk@apple.com>
271 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_ASSEMBLER_NAME rather
272 than passing it as a parameter to rest_of_decl_compilation.
273 * decl2.c (grokfield): Use set_user_assembler_name.
275 2004-08-04 Nathan Sidwell <nathan@codesourcery.com>
277 * decl.c (complete_array_type): Don't gratuitously copy
278 maxindex. Its type is always set.
280 2004-08-04 Paul Brook <paul@codesourcery.com>
282 * Make-lang.in (cp/semantics.o, cp/optimize.o): Depend on TARGET_H.
283 * cp-tree.h (struct language_function): Rename x_dtor_label to
285 (dtor_label): Rename ...
286 (cdtor_label): ... to this.
287 * decl.c (begin_constructor_body): Remove.
288 (check_special_function_return_type): Maybe change the return type.
289 (grokdeclarator): Pass the class type.
290 (start_preparsed_function): Constructors may need a return label.
291 (finish_constructor_body, finish_destructor_body): Set the return
293 (begin_function_body): Don't call begin_constructor_body.
294 (finish_function): Don't warn for constructors or destructors.
295 (implicitly_declare_fn): Maybe change the return type.
296 * optimize.c: Include target.h.
297 (maybe_clone_body): Remap the function result.
298 * semantics.c: Include target.h.
299 (finish_return_stmt): Maybe jump to return label for constructors.
301 2004-08-03 Mark Mitchell <mark@codesourcery.com>
303 * class.c (build_vtable): Do not set DECL_VISIBILITY here.
304 (check_field_decls): Or here.
305 (check_methods): Or here.
306 (initialize_array): Don't mess with DECL_CONTEXT.
307 * cp-tree.h (start_decl): Adjust prototype.
308 (determine_visibility): New function.
309 * decl.c (duplicate_decls): Remove checks for hidden "operator
311 (build_library_fn_1): Give all library functions default
313 (start_decl): Add pop_scope_p parameter. Tidy.
314 (cp_finish_decl): Do not pop scopes here. Call
315 determine_visibility for variable definitions.
316 (start_preparsed_function): Call determine_visibility.
317 * decl2.c (determine_visibility): New function.
318 * method.c (use_thunk): Fix formatting.
319 * parser.c (cp_parser_condition): Adjust calls to start_decl.
320 (cp_parser_init_declarator): Likewise.
321 * pt.c (instantiate_decl): Always call pop_nested_class.
322 * rtti.c (get_tinfo_decl): Do not set DECL_VISIBILITY.
323 (tinfo_base_init): Likewise.
325 2004-08-02 Mark Mitchell <mark@codesourcery.com>
328 * name-lookup.c (validate_nonmember_using_decl): Robustify.
330 2004-08-01 Mark Mitchell <mark@codesourcery.com>
333 * name-lookup.c (decl_namespace): Remove.
334 (current_decl_namespace): Use decl_namespace_context instead of
336 (push_decl_namespace): Likewise.
337 (arg_assoc_class): Likewise.
338 (arg_assoc_type): Likewise.
339 * pt.c (check_specialization_namespace): New function.
340 (maybe_process_partial_specialization): Use it.
341 (register_specialization): Likewise.
344 * cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): New macro.
345 * call.c (null_ptr_cst_p): Handle variables with constant
347 * pt.c (convert_nontype_argument): Use
348 DECL_INTEGRAL_CONSTANT_VAR_P.
349 * semantics.c (finish_id_expression): Likewise.
352 * decl.c (duplicate_decls): Reject duplicate namespace
356 * typeck.c (build_ptrmemfunc): Loosen assertion.
358 2004-08-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
360 * call.c (z_candidate::template_decl): Rename from template.
361 (add_template_candidate_real): Adjust member reference.
364 2004-07-29 Mark Mitchell <mark@codesourcery.com>
366 * cp-tree.h (IDENTIFIER_REPO_CHOSEN): Define.
367 (lang_decl_flags): Narrow the width of "languages". Add
369 (DECL_NEEDED_P): Remove.
370 (FOR_EACH_CLONE): New macro.
371 (DECL_REPO_AVAILABLE_P): Likewise.
372 (DECL_TINFO_P): Likewise.
373 (set_linkage_according_to_type): Declare.
374 (import_export_vtable): Remove.
375 (import_export_tinfo): Likewise.
376 (mark_needed): New function.
377 (decl_needed_p): Likewise.
378 (note_vauge_linkage_fn): Likewise.
379 (init_repo): Change prototype.
380 (repo_template_used): Remove.
381 (repo_template_instantiated): Likewise.
382 (repo_emit_p): New function.
383 (repo_export_class_p): Likewise.
384 (no_linkage_check): Change prototype.
385 * class.c (set_linkage_according_to_type): New function.
386 (build_vtable): Use it. Do not call import_export_vtable. Set
387 DECL_IGNORED_P if appropriate.
388 * decl.c (duplicate_decls): Preserve DECL_REPO_AVAILABLE_P.
389 (make_rtL_for_nonlocal_decls): Check for template instantiations
391 (grokfndecl): Adjust call to no_linkage_check.
392 (set_linkage_for_static_data_member): New function.
393 (grokvardecl): Use it. Adjust call to no_linkage_check.
394 (grokdeclarator): Use set_linkage_for_static_data_member.
395 * decl2.c (note_vague_linkage_fn): New function.
396 (note_vague_linkage_var): Likewise.
397 (finish_static_data_member_decl): Use it.
398 (import_export_vtable): Remove.
399 (import_export_class): Use repo_export_class_p.
400 (var_finalized_p): Simplify.
401 (maybe_emit_vtables): Simplify.
402 (mark_needed): New function.
403 (decl_needed_p): Likewise.
404 (import_export_decl): Add documentation and consistency checks.
405 Use repo_emit_p. Handle virtual tables and RTTI information
407 (import_export_tinfo): Remove.
408 (write_out_vars): Call import_export_decl.
409 (cxx_callgraph_analyze_expr): Ensure that all vtables are emitted
411 (finish_file): Use decl_needed_p. Do not call import_export_decl
412 for undefined static data members. Do not warn about undefined
413 inlines when using a repository.
414 (mark_used): Use note_vague_linkage_fn. Always defer template
416 * lex.c (cxx_init): Adjust call to init_repo. Always set
418 * method.c (synthesize_method): Remove unncessary
419 import_export_decl call.
420 (implicitly_declare_fn): Use set_linkage_according_to_type.
421 * optimize.c (maybe_clone_body): Use FOR_EACH_CLONE.
422 * pt.c (instantiate_class_template): Don't redundantly add classes
423 to keyed_classes. Don't call repo_template_used.
424 (tsubst_decl): Set DECL_INTERFACE_KNOWN for instantiations of
425 templates with internal linkage.
426 (check_instantiated_args): Adjust call to no_linkage_check.
427 (instantiate_template): Use FOR_EACH_CLONE.
428 (mark_definable): New function.
429 (mark_decl_instantiated): Use it.
430 (do_decl_instantiation): Adjust tests for explicit instantiation
431 after "extern template".
432 (instantiate_class_member): Do not use repo_template_instantiated.
433 (do_type_instantiation): Simplify.
434 (instantiate_decl): Use mark_definable. Check repo_emit_p.
436 * repo.c (repo_get_id): Remove.
437 (original_repo): Remove.
438 (IDENTIFIER_REPO_USED): Remove.
439 (IDENTIFIER_REPO_CHOSEN): Remove.
440 Remove all #if 0'd code.
441 (repo_template_used): Remove.
442 (repo_template_instantiated): Remove.
443 (temporary_obstack_initialized_p): New variable.
444 (init_repo): Register with lang_post_pch_load. Avoid creating
445 identifiers unnecessarily. Don't use original_repo. Close the
447 (reopen_repo_file_for_write): Not here.
448 (finish_repo): Always write out a new repository file.
449 (repo_emit_p): New function.
450 (repo_export_class_p): Likewise.
451 * rtti.c (get_tinfo_decl): Use set_linkage_according_to_type.
452 (involves_incomplete_p): New function.
453 (tinfo_base_init): Use it.
454 (ptr_initializer): Remove non_public_ptr parameter.
455 (ptm_initializer): Likewise.
456 (get_pseudo_ti_init): Likewise.
457 (unemitted_tinfo_decl_p): Remove.
458 (emit_tinfo_decl): Use import_export_decl.
459 * semantics.c (expand_body): Move updates of static_ctors and
461 (expand_or_defer_fn): ... here.
462 * tree.c (no_linkage_check): Add relaxed_p parameter.
464 2004-07-28 Eric Christopher <echristo@redhat.com>
466 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
468 2004-07-28 Nathan Sidwell <nathan@codesourcery.com>
470 * cp-tree.h (struct tree_pair_s): New.
471 (typedef tree_pair_p): New.
472 (DEF_VEC_O(tree_pair_s)): New.
473 (struct lang_type_class): Make vcall_indices a VEC(tree_pair_s).
474 (CLASSTYPE_VCALL_INDICES): Update documentation.
475 * class.c (get_vcall_index): Adjust.
476 (add_vcall_offset): Adjust.
478 2004-07-27 Kelley Cook <kcook@gcc.gnu.org>
480 * pt.c, typeck.c: Remove spurious carriage returns.
482 2004-07-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
485 * pt.c (coerce_template_template_parms) <PARM_DECL case>: Only check
486 when the type of ARG is not dependent.
488 2004-07-26 Geoffrey Keating <geoffk@apple.com>
490 * g++spec.c (LIBSTDCXX_PROFILE): Default to LIBSTDCXX.
491 (lang_specific_driver): If the C++ or math library options don't
492 start with '-l', don't count them as added libraries.
494 2004-07-26 Nathan Sidwell <nathan@codesourcery.com>
496 * decl.c (xref_basetypes): Adjust base access vector creation.
497 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Adjust base
499 * search.c (dynamic_cast_base_recurse, dfs_access_in_type): Likewise.
501 2004-07-26 Niall Douglas <s_fsfeurope2@nedprod.com>
502 Brian Ryner <bryner@brianryner.com>
506 * class.c (check_field_decls): Apply hidden visibility if
507 -fvisibility-inlines-hidden and inlined unless otherwise specified
508 (build_vtable): Set vtable visibility to class visibility.
509 (check_field_decls): Default static member visibility to class
511 (check_methods): Default method visibility to class visibility.
512 * cp-tree.h: Added CLASSTYPE_VISIBILITY and
513 CLASSTYPE_VISIBILITY_SPECIFIED macro.
514 * decl.c (duplicate_decls): New logic for merging definition decls
515 with declaration decls. Added ignore & warning when non default
516 applied to global operator new or delete.
517 * method.c, optimize.c, rtti.c: Added setting of VISIBILITY_SPECIFIED
518 wherever VISIBILITY was changed
519 * rtti.c (get_tinfo_decl): Set typeinfo visibility to class
521 (tinfo_base_init): Set typeinfo name visibility to class visibility.
523 2004-07-25 Bernardo Innocenti <bernie@develer.com>
525 * decl.c: Rename all identifiers named `class' to `cl'.
526 * cp-tree.h: Likewise.
528 2004-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
530 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Use GGC_CNEW.
531 * typeck2.c (abstract_virtuals_error): Use GGC_NEW.
532 * name-lookup.c (binding_entry_make): Use GGC_NEW.
533 (binding_table_construct): Use GGC_CNEWVEC.
534 (binding_table_new): Use GGC_NEW.
535 (cxx_binding_make): Likewise.
536 (begin_scope): Likewise.
537 (push_to_top_level): Use GCC_CNEW.
538 * parser.c (cp_token_cache_new): Likewise.
539 (cp_token_cache_push_token): Likewise.
540 (cp_lexer_new_main): Likewise.
541 (cp_lexer_new_from_tokens): Likewise.
542 (cp_parser_context_new): Likewise.
543 (cp_parser_new): Likewise.
544 (cp_lexer_new_from_tokens): Use GGC_NEWVEC.
545 * lex.c (cxx_make_type): Use GGC_CNEW.
546 (retrofit_lang_decl): Use GGC_NEWVAR.
547 (cxx_dup_lang_specific_decl): Likewise.
548 (copy_lang_type): Likewise.
549 * decl.c (use_label): Use GGC_NEW instead of ggc_alloc.
550 (save_function_data): Likewise.
551 (lookup_label): Use GGC_CNEW instead of ggc_alloc_cleared.
552 (cxx_push_function_context): Likewise.
554 2004-07-25 Richard Henderson <rth@redhat.com>
556 * decl.c (start_preparsed_function): Set DECL_ARTIFICIAL and
557 DECL_IGNORED_P on RESULT_DECL.
558 * semantics.c (finalize_nrv): Copy them too.
560 2004-07-23 Nathan Sidwell <nathan@codesourcery.com>
562 * search.c (lookup_conversion_operator): Avoid two loops.
563 (add_conversions): Remove.
564 (check_hidden_convs, split_conversions,
565 lookup_conversions_r): New.
566 (lookup_conversions): Use lookup_conversions_r.
568 2004-07-22 Nathan Sidwell <nathan@codesourcery.com>
570 * pt.c (get_template_base): Check type is completable.
572 2004-07-21 Eric Christopher <echristo@redhat.com>
574 * decl.c (poplevel): Inline unused variable checking.
577 2004-07-21 Paolo Bonzini <bonzini@gnu.org>
579 * typeck.c (build_binary_op): Do not use RDIV_EXPR for
582 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
585 * pt.c (check_explicit_specialization): Remove extension to accept
586 specializations without template headers. Fall-through to normal
589 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
592 * pt.c (determine_specialization): New parameter template_count.
593 Disambiguate between member templates and member functions counting
594 the template headers.
595 (check_explicit_specialization): Update caller.
596 (tsubst_friend_function): Likewise.
598 2004-07-20 Steven Bosscher <stevenb@suse.de>
600 * cp-tree.def (TINST_LEVEL): Make it an 'x' node.
601 * cp-tree.h (tinst_level_t): New tree type.
602 (union lang_tree_node): Handle it.
603 (TINST_LOCATION): New accessor macro.
604 (make_tinst_level): New prototype.
605 * cp-lang.c (cp_tree_size): Handle TINST_LEVEL.
606 * decl.c (cp_tree_node_structure): Likewise.
607 * error.c (print_instantiation_full_context): Use TINST_LOCATION.
608 (print_instantiation_partial_context): Likewise.
609 * pt.c (pop_tinst_level): Likewise.
610 (push_tinst_level): Use make_tinst_level.
611 * tree.c (make_tinst_level): New function.
612 (cp_walk_subtrees): Walk TINST_DECL for a TINST_LEVEL node.
614 2004-07-20 Mark Mitchell <mark@codesourcery.com>
616 * parser.c (cp_parser_simple_type_specifier): Fix typo.
619 * parser.c (cp_parser_simple_type_specifier): Do not record usage
620 of globally-qualified names.
622 2004-07-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
625 * error.c (dump_type) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Output
628 2004-07-19 Mark Mitchell <mark@codesourcery.com>
631 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
632 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
633 * class.c (add_implicitly_declared_members): Use
634 CLASSTYPE_LAZY_ASSIGNMENT_OP.
635 * method.c (lazily_declare_fn): Clear
636 CLASSTYPE_LAZY_ASSIGNMENT_OP.
637 * search.c (lookup_fnfields_1): Check it.
639 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
641 * cp-tree.h (vec_binfo_member): Remove.
642 * tree.c (vec_binfo_member): Remove.
644 * cp-tree.h (struct lang_type_class): Remove vfields field.
645 (CLASSTYPE_VFIELDS): Remove.
646 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
647 * class.c (determine_primary_base): Remove CLASSTYPE_VFIELDS
649 (dfs_modify_vtables): Use TYPE_CONTAINS_VPTR_P.
650 (finish_struct_1): Remove CLASSTYPE_VFIELDS handling.
651 * init.c (dfs_initialize_vtbl_ptrs): Use TYPE_CONTAINS_VPTR_P.
653 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
655 * cp-tree.h (DEF_VEC_P(tree)): Remove here.
656 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
658 (BINFO_LANG_SLOTS): Remove.
659 * tree.c (copy_binfo): Adjust BINFO creation and accessors.
660 * decl.c (xref_basetypes): Adjust BINFO creation and accessors.
661 * class.c (check_bases): Adjust BINFO accessors.
662 (determine_primary_base, finish_struct_bits,
663 maybe_warn_about_overly_private_class, warn_hidden,
664 walk_subobject_offsets, propagate_binfo_offsets, end_of_class,
665 warn_about_ambiguous_bases, get_vfield_name,
666 dump_class_hierarchy_r, build_vtt_inits, accumulate_vtbl_inits,
667 add_vcall_offset_vtbl_entries_r): Likewise.
668 * dump.c (cp_dump_tree): Likewise.
669 * init.c (sort_mem_initializers, expand_member_init, build_delete,
670 push_base_cleanups): Likewise.
671 * method.c (do_build_copy_constructor, do_build_assign_ref,
672 synthesize_exception_spec): Likewise.
673 name-lookup.c (arg_assoc_class): Likewise.
674 * pt.c (instantiate_class_template,
675 get_template_base_recursive): Likewise.
676 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Likewise.
677 * typeck2.c (process_init_constructor): Likewise.
678 * search.c (lookup_base_r, dynamic_cast_base_recurse,
679 dfs_access_in_type, dfs_walk_real, look_for_overrides,
680 types_overlap_p, copied_binfo, original_binfo): Likewise.
681 (binfo_for_vtable): Remove
683 2004-07-20 Steven Bosscher <stevenb@suse.de>
685 * cp-tree.h (struct lang_decl_flags): Unify the template_info and
686 thunk_alias, and the access and virtual_offset fields.
687 (THUNK_VIRTUAL_OFFSET, THUNK_ALIAS): Adjust.
688 * decl.c (finish_case_label): Update c_add_case_node call.
690 2004-07-19 Mark Mitchell <mark@codesourcery.com>
692 Revert patch for PR c++/16623.
694 2004-07-19 Kelley Cook <kcook@gcc.gnu.org>
696 * except.c: Remove two spurious carriage returns.
698 2004-07-19 Mark Mitchell <mark@codesourcery.com>
701 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
702 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
703 * class.c (add_implicitly_declared_members): Use
704 CLASSTYPE_LAZY_ASSIGNMENT_OP.
705 * method.c (lazily_declare_fn): Clear
706 CLASSTYPE_LAZY_ASSIGNMENT_OP.
707 * search.c (lookup_fnfields_1): Check it.
709 2004-07-19 Nathan Sidwell <nathan@codesourcery.com>
711 * class.c (add_method): Delay adding the slot until the end.
712 (determine_primary_base): Adjust VEC_iterate invokation.
713 (resort_type_method_vec, finish_struct_methods, warn_hidden,
714 walk_subobject_offsets, end_of_class, warn_about_ambiguous_bases,
715 build_vtbl_initializer): Likewise.
716 * init.c (sort_mem_initializers, build_delete, push_base_cleanups,
717 build_vbase_delete): Likewise.
718 * method.c (do_build_copy_constructor): Likewise.
719 * name-lookup.c (new_class_binding, print_binding_level,
720 poplevel_class, store_class_bindings, push_to_top_level,
721 pop_from_top_level): Likewise.
722 * pt.c (check_explicit_specialization): Likewise.
723 * search.c (lookup_conversion_operator, lookup_fnfields_1,
724 get_pure_virtuals, add_conversions, dfs_check_overlap,
725 binfo_for_vbase): Likewise.
727 2004-07-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
730 * pt.c (unify) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Use only
731 innermost set of template arguments during deduction. Simplify.
733 2004-07-19 Joseph S. Myers <jsm@polyomino.org.uk>
735 * typeck.c (build_modify_expr, build_x_modify_expr): Set
736 TREE_NO_WARNING on assignments with an operator other than '='.
738 2004-07-10 Steven Bosscher <stevenb@suse.de>
739 Joseph S. Myers <jsm@polyomino.org.uk>
741 * cp-tree.h (C_SET_EXP_ORIGINAL_CODE): Remove.
742 * decl2.c (grokfield): Don't check current_class_depth via
743 unused TREE_COMPLEXITY.
744 * semantics.c (finish_parenthesized_expr): Set TREE_NO_WARNING
745 to avoid the missing parentheses warning.
746 Don't set C_SET_EXP_ORIGINAL_CODE.
748 2004-07-18 Mark Mitchell <mark@codesourcery.com>
750 * tree.c (no_linkage_helper): Remove.
751 (no_linkage_check): Don't use walk_tree_without_duplicates.
753 * mangle.c (write_expression): Issue a sorry for zero-operand
756 2004-07-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
759 * init.c (build_offset_ref): Build SCOPE_REF with non-null
760 TREE_TYPE for non-dependent names.
761 * typeck.c (build_x_unary_op): Handle non-dependent SCOPE_REF.
762 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
763 unknown_type_node as its TREE_TYPE.
764 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
765 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
766 (dump_expr) <SCOPE_REF case>: Likewise.
768 2004-07-17 Jason Merrill <jason@redhat.com>
771 * call.c (type_passed_as): Make the invisible reference type
773 * cp-gimplify.c (gimplify_cleanup_stmt): Rename to
774 cp_genericize_r. Handle invisible reference lowering.
775 (is_invisiref_parm): New fn.
776 (cp_genericize): Adjust the types of invisible reference parms.
777 Don't repeat the walk for clones.
778 * decl.c (store_parm_decls): Don't generate any code for clones.
780 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
782 * cp-tree.h (builtin_function): Declare.
784 2004-07-16 Mark Mitchell <mark@codesourcery.com>
786 * class.c (finish_struct_methods): Remove unncessary code.
787 (add_implicitly_declared_members): Create declarations for default
788 constructors and copy constructors lazily.
789 * cp-tree.h (lang_type_class): Remove lazy_default_ctor and
791 (CLASSTYPE_LAZY_DEFAULT_CTOR): New macro.
792 (CLASSTYPE_LAZY_COPY_CTOR): Likewise.
793 * decl2.c (check_classfn): Robustify.
794 (locate_dtor): Handle empty CLASSTYPE_METHOD_VEC.
795 (locate_ctor): Handle lazy default constructors.
796 (locate_copy): Handle lazy copy constructors.
797 (implicitly_declare_fn): Make sure we're looking at the
798 TYPE_MAIN_VARIANT for a class before creating functions. Don't
799 set TYPE_HAS_CONSTRUCTOR.
800 (lazily_declare_fn): New function.
801 * name-lookup.c (constructor_name_full): Simplify.
802 * search.c (lookup_fnfields_1): Lazily create methods, as
804 (lookup_for_overrides): Handle empty CLASSTYPE_METHOD_VEC.
806 2004-07-16 Steven Bosscher <stevenb@suse.de>
808 * cp-tree.h (struct lang_type): Don't have three GTY options on a
811 2004-07-16 Richard Henderson <rth@redhat.com>
813 * cp-lang.c (LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING): Die.
814 * cp-tree.h (cp_copy_res_decl_for_inlining): Remove.
815 * tree.c (cp_copy_res_decl_for_inlining): Remove.
817 2004-07-16 Nathan Sidwell <nathan@codesourcery.com>
819 * class.c (finish_struct_bits): Use for loop.
820 (propagate_binfo_offsets): Do primary binfo outside of loop.
823 * dump.c (cp_dump_tree): Don't dump the bases if there's no
826 * pt.c (tsubst) <TREE_BINFO case>: We should never get here.
828 2004-07-15 Mark Mitchell <mark@codesourcery.com>
830 * cp-tree.h (lang_type_class): Remove has_real_assign_ref and
831 has_abstract_assign_ref. Make methods a VEC(tree) *.
832 (TYPE_HAS_CONST_ASSIGN_REF): Add documentation.
833 (CLASSTYPE_CONSTRUCTORS): Adjust for changes to CLASSTYPE_METHOD_VEC.
834 (CLASSTYPE_DESTRUCTORS): Likewise.
835 (TYPE_HAS_REAL_ASSIGN_REF): Remove.
836 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
837 (add_method): Change prototoype.
838 * class.c (add_method): Remove error_p parameter. Adjust for
839 changes to CLASSTYPE_METHOD_VEC.
840 (handle_using_decl): Adjust call to add_method.
841 (maybe_warn_about_overly_private_class): Adjust for
842 changes to CLASSTYPE_METHOD_VEC.
843 (resort_type_method_vec): Likewise.
844 (finish_struct_methods): Likewise.
845 (check_for_override): Likewise.
846 (warn_hidden): Likewise.
847 (add_implicitly_declared_members): Defer creation of assignment
848 operators. Adjust call to add_method.
849 (clone_function_decl): Adjust call to add_method.
850 (check_bases_and_members): Don't set TYPE_HAS_REAL_ASSIGN_REF.
851 (finish_struct_1): Use CLASSTYPE_DESTRUCTORS.
852 * decl.c (grok_special_member_properties): Don't set
853 TYPE_HAS_ABSTRACT_ASSIGN_REF.
854 * decl2.c (check_classfn): Adjust for
855 changes to CLASSTYPE_METHOD_VEC.
856 * method.c (locate_dtor): Use CLASSTYPE_DESTRUCTORS.
857 (locate_ctor): Use CLASSTYPE_CONSTRUCTORS.
858 (locate_copy): Adjust for changes to CLASSTYPE_METHOD_VEC.
859 (implicitly_declare_fn): Set DECL_SOURCE_LOCATION. Do not call
861 * pt.c (check_explicit_specialization): Adjust for
862 changes to CLASSTYPE_METHOD_VEC.
863 (instantiate_class_template): Do not set
864 TYPE_HAS_ABSTRACT_ASSIGN_REF.
865 * ptree.c (cxx_print_type): Don't try to print
866 CLASSTYPE_METHOD_VEC.
867 * rtti.c (emit_support_tinfos): Use CLASSTYPE_DESTRUCTORS.
868 * search.c (lookup_field_r): Adjust for
869 changes to CLASSTYPE_METHOD_VEC.
870 (lookup_fnfields): Likewise.
871 (lookup_conversion_operator): Likewise.
872 (lookup_fnfields_1): Likewise. Create assignment operators
874 (look_for_overrides_here): Adjust for
875 changes to CLASSTYPE_METHOD_VEC.
876 (add_conversions): Likewise.
877 * semantics.c (finish_member_declaration): Adjust call to add_method.
879 2004-07-15 Jason Merrill <jason@redhat.com>
881 * cp-lang.c (cxx_types_compatible_p): To the middle-end,
882 references and pointers are compatible.
884 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
886 * decl.c (xref_basetypes): Refactor.
887 * tree.c (copy_base_binfos): Replace with ...
888 (copy_binfo): ... this. Deep copy the given binfo, (not the just
889 bases of the given base).
890 * cp-tree.h (copy_base_binfo): Remove.
891 (copy_binfo): Declare.
893 2004-07-15 Mark Mitchell <mark@codesourcery.com>
895 * name-lookup.c (set_inherited_value_binding_p): Add class_type
897 (get_class_binding): Adjust.
898 (push_class_level_binding): Don't use set_inherited_value_binding_p.
900 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
902 * class.c (finish_struct_bits): Don't set TYPE_HAS_CONVERSION here.
903 * decl.c (xref_basetypes): Set it here.
905 * class.c (check_bases): Don't set CLASSTYPE_NON_AGGREGATE here.
906 Don't check for incomplete base.
907 (get_vfield_name): Simplify while loop.
908 * decl.c (xref_basetypes): Set CLASSTYPE_NON_AGGREGATE here.
910 2004-07-14 Mark Mitchell <mark@codesourcery.com>
912 * lex.c (cxx_make_type): Remove call to get_pointer_type.
914 * cp-tree.h (IDENTIFIER_VALUE): Remove.
915 (BINFO_PUSHDECLS_MARKED): Likewise.
916 (maybe_inject_for_scope_var): Likewise.
917 (push_class_decls): Likewise.
918 * name-lookup.h (push_class_binding): Remove.
919 (innermost_non_namespace_value): New function.
920 (outer_binding): Likewise.
921 * class.c (add_method): Push bindings before adding to
923 (restore_class_cache): Do not restore class_shadowed.
924 (pushclass): Do not add USING_DECLs. Do not call
926 * config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c.
927 * decl.c (pushdecl): Use outer_binding.
928 (poplevel): Set the scope for an out-of-scope for-loop declaration
930 (cp_finish_decl): Don't call maybe_inject_for_scope_var.
931 * name-lookup.c (new_class_binding): New function.
932 (push_binding): Use it.
933 (pushdecl): Use innermost_non_namespace_value.
934 (maybe_inject_for_scope_var): Remove.
935 (push_class_binding): Remove.
936 (set_inherited_value_binding_p): New function.
937 (get_class_binding): New function.
938 (push_class_level_binding): Assert that the current_class_type is
940 (outer_binding): New function.
941 (innermost_non_namespace_value): Likewise.
942 (lookup_name_real): Use outer_binding.
943 (lookup_name_current_level): Ignore out-of-scope variables.
944 * pt.c (check_template_shadow): Use innermost_non_namespace_value.
945 (lookup_template_class): Likewise.
946 * search.c (dfs_push_type_decls): Remove.
947 (dfs_push_decls): Likewise.
948 (setup_class_bindings): Likewise.
949 (lookup_field_1): Handle USING_DECLs from dependent scopes.
950 (marked_pushdecls_p): Remove.
951 (unmarked_pushdecls_p): Remove.
952 (marked_identifiers): Remove.
953 (setup_class_bindings): Remove.
954 (dfs_push_type_decls): Remove.
955 (dfs_push_decls): Remove.
956 (push_class_decls): Remove.
958 2004-07-13 Mark Mitchell <mark@codesourcery.com>
962 * decl.c (grokvardecl): Make declspecs parameter const.
963 (grokdeclarator): Likewise. Adjust accordingly.
964 * decl.h (grokdeclarator): Adjust declaration.
965 * parser.c (cp_parser_init_declarator): Do not clear
966 decl_specifiers->attributes.
968 * cp-tree.h (lang_identifier): Remove class_value.
969 (IDENTIFIER_CLASS_VALUE): Remove.
970 (pop_class_decls): Likewise.
971 (init_search_processing): Likewise.
972 * class.c (handle_using_decl): Use lookup_member, not
973 IDENTIFIER_CLASS_VALUE.
974 (restore_class_cache): New function, split out from ...
975 (pushclass): ... here. Do not call clear_identifier_class_values.
976 (invalidate_class_lookup_cache): Do not clear
977 IDENTIFIER_CLASS_VALUE.
978 (popclass): Do not call pop_class_decls.
979 (maybe_note_name_used_in_class): Do not save names looked up after
980 the class is complete. Use lookup_member, not
981 IDENTIFIER_CLASS_VALUE.
982 * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
983 * decl.c (cxx_init_decl_processing): Do not call
984 init_search_processing.
985 * method.c (do_build_copy_constructor): Remove unnecessary code.
986 (do_build_assign_ref): Likewise.
987 * name-lookup.c (pushdecl): Use lookup_member, not
988 IDENTIFIER_CLASS_VALUE.
989 (set_identifier_type_value_with_scope): Set TREE_TYPE on the
991 (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
992 (push_class_binding): Do not set it.
993 (clear_identifier_class_values): Remove.
994 (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
995 (store_binding): Do not save it.
996 (pop_from_top_level): Do not restore it.
997 * name-lookup.h (cxx_saved_binding): Remove class_value.
998 (clear_identifier_class_values): Remove.
999 * ptree.c (cxx_print_identifier): Do not print
1000 IDENTIFIER_CLASS_VALUE.
1001 * search.c (search_obstack): Remove.
1002 (push_stack_level): Remove.
1003 (pop_stack_level): Remove.
1004 (search_level): Remove.
1005 (search_stack): Remove.
1006 (lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
1007 (setup_class_bindings): Use IDENTIFIER_MARKED, not
1008 IDENTIFIER_CLASS_VALUE.
1009 (marked_identifiers): New variable.
1010 (push_class_decls): Clear IDENTIFIER_MARKED.
1011 (pop_class_decls): Don't call pop_search_level.
1012 (init_search_processing): Remove.
1014 2004-07-12 Mark Mitchell <mark@codesourcery.com>
1016 * cp-tree.h (get_aggr_typedef): Remove.
1017 * init.c (get_aggr_typedef): Likewise.
1019 * name-lookup.c (push_class_level_binding): Simplify.
1021 2004-07-12 Andrew Pinski <apinski@apple.com>
1025 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
1027 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
1030 2004-07-12 Eric Christopher <echristo@redhat.com>
1032 * parser.c (cp_parser_class_head): Remove unused variable.
1034 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1036 * decl.c (grok_op_properties): Reject [de-]allocation functions
1037 declared in a namespace, or declared as static.
1039 2004-07-12 Nathan Sidwell <nathan@codesourcery.com>
1041 * cp-tree.h (make_binfo): Remove.
1042 * decl.c (xref_basetypes): Use make_tree_binfo directly.
1043 * tree.h (copy_base_binfos): Likewise.
1044 (make_binfo): Remove.
1046 * call.c (build_user_type_conversion_1, build_new_op,
1047 check_constructor_callable, build_temp,
1048 perform_direct_initialization_of_possible): Pass type directly to
1049 lookup_fnfields & build_special_member_call.
1050 (build_special_member_call): Accept a type, and complete it.
1051 * class.c (finish_stuct_bits): Copy the BINFOs here.
1052 * cvt.c (ocp_convert): Pass type directly to
1053 build_special_member_call.
1054 * decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
1055 (xref_basetypes): Allocate the binfo here. Adjust.
1056 * init.c (build_init, build_new_1): Pass type directly to
1057 build_special_member_call.
1058 * lex.c (cxx_make_type): Do not allocate binfo here.
1059 * name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
1060 * parser.c (cp_parser_class_head): Always call xref_basetypes.
1061 * pt.c (instantiate_class_template): Likewise. Inhibit access
1062 checking for template friends.
1063 * ptree.c (cxx_print_type): Adjust record printing.
1064 * search.c (lookup_base): When taking a type, complete it before
1065 looking for a binfo.
1066 (lookup_member): Delay completing a type.
1067 (push_class_decls): Don't walk an incomplete type.
1068 (lookup_conversions): Likewise.
1069 * semantics.c (finish_stmt_expr_expr): Pass type directly to
1070 build_special_member_call.
1071 * tree.c (copy_base_binfos): Adjust.
1072 (make_binfo): Likewise.
1073 * typeck.c (build_modify_expr): Pass type directly to
1074 build_special_member_call.
1075 * typeck2.c (process_init_constructor): Check a binfo exists.
1076 (build_m_component_ref): Allow accessing an incomplete type.
1077 (build_functional_cast): Pass type directly to
1078 build_special_member_call.
1080 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1083 * config-lang.in (gtfiles): Add typeck2.c.
1084 * Make-lang.in: Tweak typeck2.c dependencies, and add rule for
1086 * cp-tree.h: Declare complete_type_check_abstract.
1087 * typeck2.c (pat_calc_hash, pat_compare,
1088 complete_type_check_abstract): New functions.
1089 (abstract_virtuals_error): If the type is abstract, register the
1090 declaration within abstract_pending_vars for further checks.
1091 Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
1092 * decl.c (cp_finish_decl): Do not strip array types.
1093 (create_array_type_for_decl): Check for abstractness of the element
1095 (complete_vars): Call complete_type_check_abstract.
1096 * class.c (finish_struct): Prepare a list of virtual functions for
1097 template types, and call complete_vars on it to check for abstractness.
1099 2004-07-12 Paolo Bonzini <bonzini@gnu.org>
1101 PR tree-optimization/14107
1102 * decl.c (finish_function): Remove temporary band-aid.
1104 2004-07-11 Mark Mitchell <mark@codesourcery.com>
1106 * call.c (build_operator_new_call): Avoid using push_to_top_level.
1107 (build_new_op): Adjust call to lookup_function_nonclass.
1108 * name-lookup.c (identifier_type_value): Adjust call to
1110 (lookup_name_real): Add block_p parameter.
1111 (lookup_name_nonclass): Adjust call to lookup_name_real.
1112 (lookup_function_nonclass): Likewise.
1113 (lookup_name): Likewise.
1114 * name-lookup.h (lookup_name_real): Change prototype.
1115 (lookup_name_nonclass): Likewise.
1116 * parser.c (cp_parser_lookup_name): Likewise.
1118 * cp-tree.h (saved_scope): Make old_bindings a vector.
1119 (unuse_fields): Remove.
1120 * name-lookup.h (cxx_saved_binding): Define it.
1121 * class.c (pushclass): Don't use unuse_fields.
1122 * name-lookup.c (cxx_saved_binding_make): Remove.
1123 (store_binding): Add new bindings to a vector, using an
1124 accumulator style, rather than adding them to a list.
1125 (store_bindings): Adjust accordingly.
1126 (store_class_bindings): Likewise.
1127 (push_to_top_level): Likewise.
1128 (pop_from_top_level): Likewise.
1129 * optimize.c (maybe_clone_body): Must push_to_top_level and
1130 pop_from_top_level calls outside of loop.
1131 * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope
1132 calls here from cp_parser_late_parsing_default_args.
1133 (cp_parser_save_default_args): Record the class type in which the
1134 function is declared.
1135 (cp_parser_late_parsing_default_args): Do not call
1136 push_nested_class/pop_nested_class.
1137 * search.c (dfs_unuse_fields): Remove.
1138 (unuse_fields): Remove.
1140 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
1142 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
1143 LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
1144 * cp-tree.h (poplevel): Declare.
1145 (set_block): Remove.
1146 * decl.c (set_block): Remove.
1148 2004-07-10 Mike Stump <mrs@apple.com>
1150 * decl2.c (import_export_class): Never export/import vtables
1151 with inline key functions.
1153 2004-07-09 Steven Bosscher <stevenb@suse.de>
1155 * typeck.c (c_expand_asm_operands): Remove.
1157 2004-07-09 Mike Stump <mrs@apple.com>
1159 * typeck.c (build_class_member_access_expr): Skip null deref
1160 warning when we don't dereference it.
1162 2004-07-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1166 * class.c (check_field_decls): Improve -Weffc++ warning: do not
1167 warn for pointers to functions/members, or for classes without
1170 2004-07-08 Mark Mitchell <mark@codesourcery.com>
1172 * name-lookup.h (struct cp_binding_level): Update documentation
1175 2004-07-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1178 * typeck.c (check_return_expr): Improve -Weffc++ warning: handle
1179 returning CALL_EXPR, and non-reference return type.
1181 2004-07-08 Nathan Sidwell <nathan@codesourcery.com>
1183 * name-lookup.c (push_binding): Use VEC_reserve.
1185 2004-07-08 Richard Henderson <rth@redhat.com>
1187 * cp-tree.h (expand_eh_spec_block): Remove.
1189 2004-07-07 Mark Mitchell <mark@codesourcery.com>
1191 * cp-tree.h (saved_scope): Remove x_previous_class_type and
1192 x_previous_class_values; add x_previous_class_level.
1193 (previous_class_type): Remove.
1194 (previous_class_values): Remove.
1195 (previous_class_level): New macro.
1196 * class.c (pushclass): Restore the identifier cache more
1198 (invalidate_class_lookup_cache): Use vector for class_shadowed and
1199 previous_class_values.
1200 * decl.c (poplevel): Likewise.
1201 * name-lookup.c (cxx_binding_init): New function.
1202 (cxx_binding_make): Use it.
1203 (push_binding): For a binding in a class level, use a vector of
1204 cp_class_binding nodes.
1205 (push_binding_level): New function.
1206 (begin_scope): Use it.
1207 (leave_scope): Do not put class binding levels on the free list.
1208 (print_binding_level): Adjust for the fact that class_shadowed is
1210 (poplevel_class): Likewise.
1211 (clear_identifier_class_values): Likewise.
1212 (push_class_level_binding): Likewise.
1213 (set_class_shadows): Remove.
1214 (store_binding): New function.
1215 (store_class_bindings): New function.
1216 (push_to_top_level): Use store_class_bindings as appropriate.
1217 (pop_from_top_level): Use previous_class_level, not
1218 previous_class_type.
1219 * name-lookup.h (cp_class_binding): New type.
1220 (cp_binding_level): Use a vector object for class_shadowed.
1221 (push_binding_level): Declare.
1222 (set_class_shadows): Remove.
1224 2004-07-07 Andrew Pinski <apinski@apple.com>
1226 * class.c (instantiate_type): BUFFER_REF is dead.
1227 * lex.c (init_operators): IN_EXPR is dead.
1229 2004-07-07 Jason Merrill <jason@redhat.com>
1232 * call.c (build_new_op): Give overload warnings for built-in
1235 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
1238 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
1241 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
1243 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
1244 * class.c (build_primary_vtable, check_bases,
1245 determine_primary_base, finish_struct_bits,
1246 maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
1247 get_basefndecls, warn_hidden, walk_subobject_offsets,
1248 build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
1249 layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
1250 finish_struct_1, get_vfield_name, contains_empty_class_p,
1251 dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
1252 dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
1253 add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
1255 * decl.c (xref_basetypes): Likewise.
1256 * dump.c (cp_dump_tree): Likewise.
1257 * error.c (dump_expr): Likewise.
1258 * init.c (sort_mem_initializers, expand_member_init,
1259 push_base_cleanups): Likewise.
1260 * method.c (do_build_copy_constructor, do_build_assign_reg,
1261 synthesize_exception_spec): Likewise.
1262 * name-lookup.c (arg_assoc_class): Likewise.
1263 * pt.c (instantiate_class_template, tsubst,
1264 get_template_base_recursive): Likewise.
1265 * ptree.c (cxx_print_type): Likewise.
1266 * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
1267 * search.c (lookup_base_r, dynamic_cast_base_recurse,
1268 dfs_access_in_type, access_in_type, lookup_field_queue_p,
1269 bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
1270 marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
1271 dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
1272 binfo_for_vtable, copied_binfo, original_binfo): Likewise
1273 * tree.c (copy_base_binfos, make_binfo): Likewise.
1274 * typeck.c (commmon_base_type): Likewise
1275 * typeck2.c (process_init_constructor): Likewise
1277 2004-07-06 Joseph S. Myers <jsm@polyomino.org.uk>
1279 * decl.c (check_tag_decl): Name redeclared type in diagnostic.
1281 2004-07-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1284 * pt.c (convert_nontype_argument): Disallow conversions between
1285 different enumeration types.
1287 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
1289 * cp-tree.h (BINFO_MARKED): Remove.
1290 (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
1291 BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
1292 BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
1293 (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
1294 * class.c (build_base_path): Use BINFO_VIRTUAL_P.
1295 (mark_primary_bases, determine_primary_base, base_derived_from,
1296 dfs_find_final_overrider, dfs_find_final_overrider_q,
1297 dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
1298 dfs_modify_vtables, walk_subobject_offsets,
1299 layout_nonempty_base_or_field, build_base_field,
1300 build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
1301 end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
1302 finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
1303 build_ctor_vtbl_group, accumulate_vtble_inits,
1304 dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
1305 build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
1306 add_vcall_offset_vtbl_entries_1): Likewise.
1307 * decl.c (xref_basetypes): Incomming virtual base indicated by
1309 * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
1310 * init.c (finish_init_stmts, sort_mem_initializers,
1311 emit_mem_initializers, build_vtble_address, expand_member_init,
1312 push_base_cleanups): Likewise.
1313 * method.c (do_build_copy_constructor): Likewise.
1314 * pt.c (instantiate_class_template,
1315 get_template_base_recursive): Likewise.
1316 * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
1317 get_pseudo_ti_desc): Likewise.
1318 * search.c (lookup_base_r, dynamic_cast_base_recurse,
1319 binfo_from_vbase, binfo_via_virtual, copied_binfo,
1320 original_binfo): Likewise.
1321 * semantics.c (finish_base_specifier): Virtualness is indicated
1323 * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
1325 2004-07-06 Mark Mitchell <mark@codesourcery.com>
1328 2004-06-24 Jason Merrill <jason@redhat.com>
1330 * decl.c (grokparms): Give the PARM_DECL reference type if the
1331 parameter is passed by invisible reference.
1333 2004-07-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1335 * cp-lang.c (cp_var_mod_type_p): Add extra arg.
1336 * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
1337 * pt.c (check_instantiated_args, unify): Likewise.
1339 2004-07-05 Phil Edwards <phil@codesourcery.com>
1341 * Make-lang.in (check-c++, lang_checks): Add some comments.
1343 2004-07-05 Zack Weinberg <zack@codesourcery.com>
1345 * cp-mudflap.c: Delete file.
1346 * Makefile.in: Remove all references to cp-mudflap.o.
1348 2004-07-05 Zack Weinberg <zack@codesourcery.com>
1350 * decl.c (cxx_init_decl_processing): Call
1351 build_common_tree_nodes before creating the global NAMESPACE_DECL.
1353 2004-07-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1356 * call.c (build_operator_new_call): Look only at global scope.
1358 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
1360 * call.c (enforce_access): Expect TREE_BINFO.
1361 * class.c (binfo_ctor_vtable): Check TREE_BINFO.
1362 * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
1363 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
1365 (BINFO_LANG_ELTS): Remove.
1366 (BINFO_LANG_SLOTS): New.
1367 (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
1368 (CLASSTYPE_TEMPLATE_INFO): Adjust.
1369 * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
1370 * search.c (lookup_member): Check TREE_BINFO.
1371 * semantics.c (perform_or_defer_access_check): Likewise.
1372 (check_accessibility_of_qualified_id): Check
1373 deferred_access_no_check.
1374 * tree.c (make_binfo): Use make_tree_binfo.
1376 2004-07-04 Mark Mitchell <mark@codesourcery.com>
1378 * method.c (implicitly_declare_fn): Set linkage of generated
1381 2004-07-04 Richard Henderson <rth@redhat.com>
1383 * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
1385 2004-07-03 Scott Brumbaugh <scottb.lists@verizon.net>
1388 * name-lookup.c (push_class_level_binding): Don't pass a
1389 TREE_LIST of ambiguous names to check_template_shadow as it
1390 only handles declarations. Instead, pull the declaration
1393 2004-07-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1396 * pt.c (check_explicit_specialization): Clarify error message.
1398 2004-07-02 Richard Henderson <rth@redhat.com>
1400 * tree.c (cp_unsave_r): Update remap_save_expr call.
1402 2004-07-02 Mark Mitchell <mark@codesourcery.com>
1405 * mangle.c (write_template_arg): Correct mangling.
1408 * decl.c (grokdeclarator): Robustify.
1410 2004-07-01 Richard Henderson <rth@redhat.com>
1412 * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
1413 * method.c (synthesize_method): Don't clear_last_expr.
1414 * name-lookup.c (maybe_push_cleanup_level): Likewise.
1416 2004-07-01 Nick Clifton <nickc@redhat.com>
1418 * decl2.c (import_export_class): Invoke the
1419 import_export_class field in the gcc_target structure if it is not
1422 2004-06-30 Richard Henderson (rth@redhat.com>
1424 * decl.c (start_preparsed_function): Don't set immediate_size_expand.
1425 * method.c (use_thunk): Likewise.
1427 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
1429 * call.c (build_over_call), typeck.c (build_function_call): Call
1430 check_function_arguments instead of check_function_format.
1432 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
1434 * call.c (build_over_call), typeck.c (build_function_call): Update
1435 calls to check_function_format.
1437 2004-06-30 Richard Henderson <rth@redhat.com>
1439 * call.c (build_over_call): Use __builtin_memcpy for copying
1440 CLASS_AS_BASE rather than funny casting.
1442 2004-06-30 Richard Henderson <rth@redhat.com>
1444 * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
1445 TYPE_SIZE_UNIT of full_type.
1447 2004-06-30 Per Bothner <per@bothner.com>
1449 Conditionally compile support for --enable-mapped_location.
1450 * decl.c (pop_label): Handle (imperfectly) USE_MAPPED_LOCATION case.
1451 * decl2.c: If USE_MAPPED_LOCATION, don't do some line number
1452 adjustments - which I don't understand.
1453 * error.c (dump_decl): Rename "<interrnal>" to "<built-in>".
1454 * error.c: Use LOCATION_FILE and EXPR_LOCATION macros.
1455 (print_instantiation_partial_context): Use expand_location.
1456 * decl.c (duplicate_decl): Use new DECL_IS_BUILTIN macro.
1457 * name-lookup.c: Likewise.
1458 * lex.c (cxx_init): Likewise. Also use BUILTINS_LOCATION.
1459 * name-lookup.c: Use input_line macro.
1460 * parser.c (cp_lexer_get_preprocessor_token): Use UNKNOWN_LOCATION.
1461 (cp_parser_statement): Rename locaal variable statement_locus to
1462 statement_location and use SET_EXPR_LOCATION macro.
1463 * pt.c: Handle USE_MAPPED_LOCATION case. Use new macros.
1464 * tree.c (cp_walk_subtrees): Likewise.
1466 2004-06-29 Per Bothner <per@bothner.com>
1468 * tree.c (build_min_nt, build_min, build_min_non_dep):
1469 Don't set TREE_COMPLEXITY from input_line.
1471 2004-06-29 Paul Brook <paul@codesourcery.com>
1473 * init.c: Include target.h.
1474 (get_cookie_size): Remove and replace with target hook.
1476 (build_new_1): Store the element size in the cookie.
1478 2004-06-29 Nathan Sidwell <nathan@codesourcery.com>
1481 * parser.c (cp_parser_template_declaration_after_export): Disable
1482 access checks here ...
1483 (cp_parser_class_specifier): ... not here.
1485 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1487 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
1488 VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
1489 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
1492 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1494 * cp-tree.h (struct deferred_access): Move to ...
1495 * semantics.c (struct deferred_access): ... here. Adjust.
1496 (deferred_access_stack): Make a VEC(deferred_access),
1497 (deferred_access_free_list): Remove.
1498 (deferred_access_no_check): New.
1499 (push_deferring_access_checks, resume_deferring_access_checks,
1500 stop_deferring_access_checks, pop_deferring_access_checks,
1501 get_deferred_access_checks, pop_to_parent_deferring_access_checks,
1502 perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
1504 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1507 * call.c (build_temp): Declare.
1508 (check_constructor_callable): New.
1509 (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
1510 CONSTRUCTOR_CALLABLE.
1511 (convert_like_real, initialize_reference): Use
1512 check_constructor_callable.
1513 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
1514 (LOOKUP_*): Renumber.
1516 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1518 * friend.c (add_friend): Only perform access checks when context
1520 * lex.c (cxx_make_type): Only create a binfo for aggregate types.
1521 * parser.c (cp_parser_class_specifier): Disable access checks here
1522 when parsing the body of a templated class.
1523 * semantics.c (perform_or_defer_access_checks): Reorder to allow
1524 NULL binfos when not checking access.
1526 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1528 Use vector API for vbase list.
1529 * cp-tree.h: Include vec.h
1530 (DEF_VEC_P (tree)): New type.
1531 (struct lang_type_class): Change vbase's member type.
1532 (binfo_for_vbase): Declare.
1533 * class.c (determine_primary_base, base_derived_from,
1534 update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
1535 warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
1536 build_vtbl_initializer): Adjust.
1537 * decl.c (xref_basetypes): Adjust, accumulate upper bound of
1539 * init.c (sort_mem_initializers, expand_member_init,
1540 push_base_cleanups): Adjust.
1541 * method.c (do_build_copy_constructor): Adjust.
1542 * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
1543 (binfo_for_vbase): New.
1544 * tree.c (copy_base_binfos): Adjust.
1546 2004-06-28 Mark Mitchell <mark@codesourcery.com>
1548 * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
1550 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
1553 * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
1554 paranthesis in case of pointers to array members.
1555 * error.c (dump_type_prefix): Likewise.
1556 (dump_type_suffix): Maybe issue a whitespace when printing
1559 2004-06-27 Mark Mitchell <mark@codesourcery.com>
1562 * parser.c (cp_parser_set_decl_spec_type): Refine test for
1563 redefinition of built-in types.
1565 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
1567 * error.c (pp_template_argument_list_start): Remove.
1568 (pp_template_argument_list_end): Likewise.
1569 (pp_separate_with_comma): Use pp_cxx_separate_with.
1570 (reinit_global_formatting_buffer): Remove.
1571 (pp_non_consecutive_character): Likewise.
1572 (dump_scope): Use pp_cxx_colon_colon.
1573 (dump_template_parameter): Use pp_cxx_identifier,
1574 pp_cxx_tree_identifier and pp_cxx_whitespace.
1575 (dump_templat_bindings): Replace use of pp_string with sequence
1576 of pp_cxx_whitespace and pp_equal.
1577 (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
1578 pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set
1580 (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
1581 (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace,
1582 pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
1583 (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
1584 pp_cxx_right_bracket, pp_cxx_identifier throughout,
1585 (dump_decl): Likewise.
1586 (dump_template_decl): Likewise.
1587 (dump_function_decl): Likewise. Set padding as appropriate.
1588 (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
1590 (dump_exception_spec): Likewise.
1591 (dump_function_name): Use pp_cxx_tree_identifier and
1593 (dump_template_parms): Use pp_cxx_begin_template_argument_list and
1594 pp_cxx_end_template_argument_list.
1595 (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
1596 pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
1597 pp_cxx_whitespace throughout.
1598 (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
1600 (dump_unary_op): Likewise.
1601 (reinit_cxx_pp): New function.
1602 (type_as_string); Use it.
1603 (expr_as_string): Likewise.
1604 (decl_as_string); Likewise.
1605 (context_as_string): Likewise.
1606 (lang_decl_name): Likewise.
1607 (decl_to_string): Likewise.
1608 (expr_to_string): Likewise.
1609 (parm_to_string): Likewise.
1610 (type_to_string): Likewise.
1611 (args_to_string): Likewise.
1612 (cv_to_string): Likewise.
1614 2004-06-26 Mark Mitchell <mark@codesourcery.com>
1616 * cp-tree.h (cp_cv_quals): New type.
1617 (cp_declarator): Use it instead of "tree" as appropriate.
1618 (grok_method_quals): Adjust prototype.
1619 (grokclassfn): Likewise.
1620 (do_friend): Likewise.
1621 * decl.c (grokfndecl): Use cp_cv_quals, not tree.
1622 (grokdeclarator): Likewise.
1623 * decl2.c (grok_method_quals): Likewise.
1624 (grokclassfn): Likewise.
1625 * friend.c (do_friend): Likewise.
1626 * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
1627 * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
1628 (make_pointer_declarator): Likewise.
1629 (make_reference_declarator): Likewise.
1630 (make_ptrmem_declarator): Likewise.
1631 (cp_parser_ptr_operator): Likewise.
1632 (cp_parser_cv_qualifier_seq_opt): Likewise.
1633 (cp_parser_cv_qualifier_opt): Remove.
1634 (cp_parser_new_declarator_opt): Adjust call to
1635 cp_parser_ptr_operator.
1636 (cp_parser_conversion_declaration_opt): Likewise.
1637 (cp_parser_declarator): Use cp_cv_quals, not tree.
1638 (cp_parser_direct_declarator): Likewise.
1640 2004-06-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1642 * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
1643 Rename DECL_STMT to DECL_EXPR.
1644 * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
1645 * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
1646 * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
1648 2004-06-26 Jan Hubicka <jh@suse.cz>
1651 * decl2.c (maybe_emit_vtables): Always import_export_vtable for the
1652 reachability analysis.
1654 2004-06-25 Mark Mitchell <mark@codesourcery.com>
1656 * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
1659 2004-06-25 Paul Brook <paul@codesourcery.com>
1661 * decl2.c (get_guard): Call targetm.cxx.guard_type.
1662 (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
1664 2004-06-24 Mark Mitchell <mark@codesourcery.com>
1666 * decl.c (grokdeclarator): Restore error messages about __thread.
1667 * parser.c (cp_parser_decl_specifier_seq): Likewise.
1669 2004-06-24 Jason Merrill <jason@redhat.com>
1672 * decl.c (grokparms): Give the PARM_DECL reference type if the
1673 parameter is passed by invisible reference.
1675 2004-06-24 Andreas Schwab <schwab@suse.de>
1677 * cp-tree.h (enum cp_storage_class): Remove trailing comma.
1679 2004-06-23 Mark Mitchell <mark@codesourcery.com>
1681 * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
1682 (cp/decl.o): Likewise.
1683 (cp/decl2.o): Likewise.
1684 (cp/pt.o): Likewise.
1685 (cp/semantics.o): Likewise.
1686 * config-lang.in (gtfiles): Do not reference cp/lex.h.
1687 * class.c: Do not include lex.h.
1688 (add_implicitly_declared_members): Do not use
1689 adding_implicit_members.
1690 (check_bases_and_members): Do not talk about grok_x_components.
1691 * cp/cp-tree.h (adding_implicit_members): Remove.
1692 (cp_storage_class): New type.
1693 (cp_decl_spec): Likewise.
1694 (cp_decl_specifier_seq): Likewise.
1695 (cp_parameter_declarator): Use it for the decl_specifiers field.
1696 (check_tag_decl): Adjust prototype.
1697 (shadow_tag): Likewise.
1698 (groktypename): Likewise.
1699 (start_decl): Likewise.
1700 (start_function): Likewise.
1701 (start_method): Likewise.
1702 (grok_x_components): Remove.
1703 (grokfield): Adjust prototype.
1704 (grokbitfield): Likewise.
1705 (finish_member_class_template): Remove.
1706 * decl.c: Do not include lex.h.
1707 (adding_implicit_members): Do not define.
1708 (check_tag_decl): Do not use trees to represent decl-specifiers.
1709 (shadow_tag): Likewise.
1710 (groktypename): Likewise.
1711 (start_decl): Likewise.
1712 (grokvardecl): Likewise.
1713 (grokdeclarator): Likewise.
1714 (grokparms): Likewise.
1715 (start_function): Likewise.
1716 (start_method): Likewise.
1717 * decl.h (grokdeclarator): Adjust prototype.
1718 * decl2.c: Do not include lex.h.
1719 (grok_x_components): Remove.
1720 (grokfield): Do not use trees to represent decl-specifiers.
1721 (grokbitfield): Likewise.
1722 * lex.c: Do not include lex.h.
1724 * parser.c: Include target.h.
1725 (clear_decl_specs): New function.
1726 (cp_parser_translation_unit): Do not use trees to represent
1728 (cp_parser_postfix_expression): Likewise.
1729 (cp_parser_new_type_id): Likewise.
1730 (cp_parser_condition): Likewise.
1731 (cp_parser_simple_declaration): Likewise.
1732 (cp_parser_decl_specifier_seq): Likewise.
1733 (cp_parser_function_specifier_opt): Likewise.
1734 (cp_parser_conversion_type_id): Likewise.
1735 (cp_parser_template_parameter): Likewise.
1736 (cp_parser_explicit_instantiation): Likewise.
1737 (cp_parser_type_specifier): Likewise.
1738 (cp_parser_simple_type_specifier): Likewise.
1739 (cp_parser_init_declarator): Likewise.
1740 (cp_parser_type_id): Likewise.
1741 (cp_parser_type_specifier_seq): Likewise.
1742 (cp_parser_parameter_declaration): Likewise.
1743 (cp_parser_member_declaration): Likewise.
1744 (cp_parser_exception_declaration): Likewise.
1745 (cp_parser_function_definition_from_specifiers_and_declarator):
1747 (cp_parser_single_declaration): Likewise.
1748 (cp_parser_save_member_function_body): Likewise.
1749 (cp_parser_friend_p): Likewise.
1750 (cp_parser_set_storage_class): New function.
1751 (cp_parser_set_decl_spec_type): Likewise.
1752 * pt.c: Do not include lex.h.
1753 * semantics.c: Likewise.
1754 (finish_member_class_template): Remove.
1756 2004-06-23 Roger Sayle <roger@eyesopen.com>
1758 * call.c (build_cxx_call): Don't call expand_tree_builtin. No
1759 longer take both "args" and "convert_args" as arguments.
1760 (build_op_delete_call): Update call to build_cxx_call.
1761 (build_over_call): Likewise, update call to build_cxx_call.
1762 * cp-tree.h (build_cxx_call): Update funtion prototype.
1763 * typeck.c (build_function_call): Don't call expand_tree_builtin.
1764 * rtti.c (throw_bad_cast): Update call to build_cxx_call.
1765 (throw_bad_typeid): Likewise.
1766 (build_dynamic_cast_1): Likewise.
1768 2004-06-22 Richard Henderson <rth@redhat.com>
1770 * class.c (build_vfn_ref): Take a pointer not object. Build
1772 (cp_fold_obj_type_ref): New.
1773 * call.c (build_over_call): Update build_vfn_ref call.
1774 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
1775 * cp-tree.h (cp_fold_obj_type_ref): Declare.
1777 2004-06-21 Jason Merrill <jason@redhat.com>
1780 * cp-gimplify.c (cp_gimplify_init_expr): Look through
1783 2004-06-21 Mark Mitchell <mark@codesourcery.com>
1785 * cp-tree.def (NEW_EXPR): Add a fourth slot.
1786 * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
1787 (TREE_PARMLIST): Likewise.
1788 (CALL_DECLARATOR_PARMS): Likewise.
1789 (CALL_DECLARATOR_QUALS): Likewise.
1790 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
1791 (cp_declarator_kind): New type.
1792 (cp_parameter_declarator): Likewise.
1793 (cp_declarator): Likewise.
1794 (cp_error_declarator): Likewise.
1795 (no_parameters): Likewise.
1796 (groktypename): Change prototype.
1797 (start_decl): Likewise.
1798 (start_handler_parms): Likewise.
1799 (get_scope_of_declarator): Likewise.
1800 (start_function): Likewise.
1801 (start_preparsed_function): New function.
1802 (start_function): Change prototype.
1803 (start_method): Likewise.
1804 (grokfield): Likewise.
1805 (grokbitfield): Likewise.
1806 (build_new): Likewise.
1807 (make_pointer_declarator): Remove.
1808 (make_reference_declarator): Likewise.
1809 (make_call_declarator): Likewise.
1810 (set_quals_and_spec): Likewise.
1811 (process_template_parm): Change prototype.
1812 (begin_function_definition): Remove.
1813 (finish_parmlist): Remove.
1814 * decl.c (groktypename): Do not use trees to represent
1816 (start_decl): Likewise.
1817 (start_handler_parms): Remove.
1818 (get_scope_of_declarator): Reimplement.
1819 (grokdeclarator): Do not use trees to represent declarators.
1820 (grokparms): Likewise.
1821 (start_function): Likewise.
1822 (start_method): Likewise.
1823 (build_void_list_mode): Do not use TREE_PARMLIST.
1824 * decl.h (grokdeclarator): Change prototype.
1825 * decl2.c (grok_method_quals): Robustify.
1826 (grok_x_components): Do not use trees to represent declarators.
1827 (grokfield): Likewise.
1828 (grokbitfield): Likewise.
1829 (start_objects): Build FUNCTION_DECLs, not declarators.
1830 (start_static_storage_duration_function): Likewise.
1831 * init.c (build_new): Simplify.
1832 * lex.c (make_pointer_declarator): Remove.
1833 (make_reference_declarator): Likewise.
1834 (make_call_declarator): Likewise.
1835 (set_quals_and_spec): Likewise.
1836 * method.c (use_thunk): Use start_preparsed_function.
1837 (synthesize_method): Likewise.
1838 (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
1839 * optimize.c (maybe_clone_body): Use start_preparsed_function.
1840 * parser.c (cp_error_declarator): New variable.
1841 (declarator_obstack): Likewise.
1842 (alloc_declarator): New function.
1843 (make_declarator): Likewise.
1844 (make_id_declarator): Likewise.
1845 (make_pointer_declarator): Likewise.
1846 (make_reference_declarator): Likewise.
1847 (make_ptrmem_declarator): Likewise.
1848 (make_call_declarator): Likewise.
1849 (make_array_declarator): Likewise.
1850 (no_parameters): New variable.
1851 (make_parameter_declarator): Likewise.
1852 (cp_parser_check_for_definition_in_return_type): Do not use trees
1853 to represent declarators.
1854 (cp_parser_translation_unit): Likewise.
1855 (cp_parser_new_expression): Likewise.
1856 (cp_parser_new_type_id): Likewise.
1857 (cp_parser_new_declarator_opt): Likewise.
1858 (cp_parser_direct_new_declarator): Likewise.
1859 (cp_parser_condition): Likewise.
1860 (cp_parser_declaration_statement): Likewise.
1861 (cp_parser_declaration): Likewise.
1862 (cp_parser_conversion_type_id): Likewise.
1863 (cp_parser_conversion_declarator_opt): Likewise.
1864 (cp_parser_template_parameter_list): Likewise.
1865 (cp_parser_template_parameter): Likewise.
1866 (cp_parser_explicit_instantiation): Likewise.
1867 (cp_parser_init_declarator): Likewise.
1868 (cp_parser_declarator): Likewise.
1869 (cp_parser_direct_declarator): Likewise.
1870 (cp_parser_type_id): Likewise.
1871 (cp_parser_parameter_declaration_clause): Likewise.
1872 (cp_parser_parameter_declaration_list): Likewise.
1873 (cp_parser_parameter_declaration): Likewise.
1874 (cp_parser_member_declaration): Likewise.
1875 (cp_parser_exception_declaration): Likewise.
1876 (cp_parser_check_declarator_template_parameters): Likewise.
1877 (cp_parser_function_definition_from_specifiers_and_declarator):
1879 (cp_parser_save_member_function_body): Likewise.
1880 * pt.c (process_template_parm): Add is_non_type parameter.
1881 (convert_template_argument): Adjust call to groktypename.
1882 (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
1883 (tsubst): Do not expect declarators.
1884 (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
1886 (instantiate_decl): Use start_preparsed_function.
1887 * semantics.c (begin_function_definition): Remove.
1888 (finish_parmlist): Remove.
1889 * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
1892 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1894 * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
1895 (build_new_method_call): Likewise.
1896 * decl.c (local_variable_p_walkfn): Don't walk into types.
1897 * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
1898 (build_anon_union_vars): Add new operand for COMPONENT_REF.
1899 * init.c (buld_new): Add new operand for ARRAY_REF.
1900 * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
1901 (do_build_assign_ref): Likewise.
1902 * parser.c (cp_parser_direct_new_declarator): Add new operands
1904 (cp_parser_direct_declarator): Likewise.
1905 * pt.c (tsubst): Likewise.
1906 (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
1908 * semantics.c (finish_non_static_data_member): Add new operand
1910 * typeck.c (build_class_member_access_expr): Likewise.
1911 (build_class_member_access_expr, finish_class_member_access_expr):
1913 (build_ptrmemfunc_access_expr): Likewise.
1914 (build_array_ref): Add new operands for ARRAY_REF.
1915 * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
1916 * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
1918 2004-06-21 Richard Henderson <rth@redhat.com>
1920 * dump.c (cp_dump_tree): Don't use dump_next_stmt.
1921 * parser.c (cp_parser_jump_statement): Update commentary.
1922 * pt.c (tsubst_expr): Use RETURN_EXPR.
1923 * semantics.c (finish_return_stmt): Likewise.
1924 (finalize_nrv_r): Likewise.
1925 * typeck.c, typeck2.c: Update file start commentary.
1927 2004-06-21 Richard Henderson <rth@redhat.com>
1929 * semantics.c (finish_expr_stmt): Call verify_sequence_points.
1931 2004-06-20 Richard Henderson <rth@redhat.com>
1933 * cp-tree.h (add_decl_stmt): Declare.
1934 * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
1935 * semantics.c (maybe_cleanup_point_expr): New.
1936 (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
1937 finish_for_expr, finish_switch_cond): Use it.
1938 (finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN.
1940 2004-06-20 Richard Henderson <rth@redhat.com>
1942 * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
1943 * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
1944 (cp_gimplify_expr): Call it.
1945 (gimplify_cleanup_stmt): Move from c-gimplify.c.
1946 (cp_genericize): New.
1947 * decl.c (finish_function): Call it.
1948 * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
1949 (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
1950 (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
1951 (cp_genericize): Declare.
1952 * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
1953 * dump.c (cp_dump_tree): Likewise.
1954 * semantics.c (push_cleanup): Move from c-semantics.c.
1956 2004-06-20 Zack Weinberg <zack@codesourcery.com>
1958 * cp-lang.c (has_c_linkage): Implement.
1960 * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
1961 * decl.c (duplicate_decls): Use COPY_DECL_RTL.
1962 (builtin_function_1): Don't call make_decl_rtl.
1963 (build_cp_library_fn): Don't call set_mangled_name_for_decl.
1964 (grokvardecl): Don't call mangle_decl.
1965 * except.c (nothrow_libfn_p): Look at DECL_NAME, not
1966 DECL_ASSEMBLER_NAME.
1967 * method.c (set_mangled_name_for_decl): Delete.
1968 * name-lookup.c (pushdecl): When a local extern shadows a
1969 file-scope declaration of the same object, give both DECLs the
1971 * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
1972 on DECL_ASSEMBLER_NAME.
1974 2004-06-19 Richard Henderson <rth@redhat.com>
1976 * cp-gimplify.c: Remove unnecessary prototypes.
1977 (cp_gimplify_stmt): Merge into ...
1978 (cp_gimplify_expr): ... here. Move to end of file. Handle
1979 stmts_are_full_exprs_p frobbing.
1980 * cp-tree.h (cp_gimplify_stmt): Remove.
1981 * pt.c (tsubst_expr): Merge prep_stmt and unify.
1982 * tree.c (init_tree): Don't set lang_gimplify_stmt.
1984 2004-06-18 Richard Henderson <rth@redhat.com>
1987 * semantics.c (begin_cond): New.
1988 (finish_cond): Rewrite to handle template DECL_STMTs specially.
1989 Assume that non-template decls go land before the conditional.
1990 (simplify_loop_decl_cond): Likewise.
1991 (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
1992 finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
1993 begin_switch_stmt, finish_switch_cond): Update to match.
1995 2004-06-17 Jason Merrill <jason@redhat.com>
1998 * semantics.c (simplify_aggr_init_expr): Don't return the slot.
1999 (finish_stmt_expr_expr): Update type after conversions.
2000 (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
2001 Handle void initializer.
2002 * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
2004 2004-06-17 Geoffrey Keating <geoffk@apple.com>
2006 * class.c (build_clone): Don't call defer_fn, let mark_used do it.
2007 * cp-tree.h (defer_fn): Delete.
2008 * decl2.c (defer_fn): Delete.
2009 (finish_file): Simplify deferred_fns loops; check that
2010 only used inline functions get into deferred_fns.
2011 (mark_used): Inline previous contents of defer_fn.
2013 2004-06-16 Richard Henderson <rth@redhat.com>
2015 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
2016 (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
2017 * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
2018 of CTOR_INITIALIZER ...
2019 (pp_cxx_statement): ... here.
2020 * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
2021 (finish_function): Use alloc_stmt_list to zap entire function.
2022 * parser.c (cp_parser_compound_statement): Update commentary.
2023 * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
2024 * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
2025 (finish_stmt_expr): Don't look through COMPOUND_STMT.
2027 2004-06-16 Geoffrey Keating <geoffk@apple.com>
2029 * pt.c (mark_decl_instantiated): Don't call defer_fn.
2031 2004-06-16 Richard Henderson <rth@redhat.com>
2033 * parser.c (cp_parser_labeled_statement): Update commentary.
2034 * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
2035 * tree.c (mark_local_for_remap_r): Likewise.
2037 2004-06-16 Richard Henderson <rth@redhat.com>
2039 * parser.c (cp_parser_asm_definition): Update commentary.
2040 * pt.c (tsubst_expr): Use ASM_EXPR.
2041 * semantics.c (finish_asm_stmt): Likewise.
2043 2004-06-16 Richard Henderson <rth@redhat.com>
2045 * decl.c (finish_destructor_body): Use LABEL_EXPR.
2046 * parser.c (cp_parser_statement): Update commentary.
2047 * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
2048 * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
2049 * tree.c (mark_local_for_remap_r): Likewise.
2051 2004-06-16 Richard Henderson <rth@redhat.com>
2054 * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
2055 statement in FOR_INIT_STMT for templates.
2057 2004-06-15 Richard Henderson <rth@redhat.com>
2059 * call.c (initialize_reference): Don't build CLEANUP_STMT here.
2060 * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
2061 (genericize_try_block): Use gimplify_stmt.
2062 (genericize_catch_block, genericize_eh_spec_block): Likewise.
2063 (cp_gimplify_init_expr): Remove STMT_EXPR special case.
2064 (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
2065 * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
2066 (cp_tree_chain_matters_p): Remove.
2067 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
2068 (COMPOUND_STMT_BODY_BLOCK): New.
2069 (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
2070 (EXPR_STMT_STMT_EXPR_RESULT): New.
2071 (building_stmt_tree): Check cur_stmt_list.
2072 (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
2073 (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
2074 * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
2075 (cp_finish_decl): Use push_cleanup.
2076 (start_function, finish_function): Use statement lists.
2077 (finish_stmt): Do nothing.
2078 * except.c (begin_eh_spec_block): Use statement lists.
2079 (check_handlers_1, check_handlers): Likewise.
2080 * init.c (construct_virtual_base): Don't add extra compound stmts.
2081 (build_vec_init): Likewise.
2082 * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
2083 * name-lookup.h (struct cp_binding_level): Add statement_list.
2084 * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
2085 (cp_parser_labeled_statement, cp_parser_expression_statement,
2086 cp_parser_statement_seq_opt): Likewise.
2087 (cp_parser_compound_statement): Likewise. Take bool for try block.
2088 (cp_parser_selection_statement): Tidy if processing.
2089 (cp_parser_already_scoped_statement): Rewrite to do what it says.
2090 * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
2091 (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST.
2092 Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
2093 * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
2094 (finish_cond): New, rewritten from FINISH_COND.
2095 (simplify_loop_decl_cond): New.
2096 (finish_expr_stmt): Avoid nested EXPR_STMTs.
2097 (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
2098 begin_else_clause, finish_else_clause, finish_if_stmt,
2099 begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
2100 begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
2101 finish_for_cond, finish_for_stmt, begin_switch_stmt,
2102 finish_switch_cond, finish_switch_stmt, begin_try_block,
2103 finish_try_block, finish_cleanup_try_block, finish_function_try_block,
2104 finish_handler_sequence, finish_function_handler_sequence,
2105 begin_handler, finish_handler_parms, finish_handler,
2106 begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
2107 using statement lists.
2108 (begin_compound_stmt): Replace has_no_scope argument with flags.
2109 Update all callers. Use statement lists.
2110 (finish_compound_stmt): Likewise.
2111 (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
2112 (current_scope_stmt_stack): Remove.
2113 (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
2114 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
2115 Rewrite with statement lists.
2117 2004-06-15 Alexandre Oliva <aoliva@redhat.com>
2119 * parser.c: Change all assignments of c_lex_string_translate
2120 to true and false to 1 and 0.
2121 (cp_lexer_read_token): Convert type of the translated string.
2122 (cp_parser_skip_to_closing_parentheses): Preserve original
2123 value of c_lex_string_translate, and set it to -1 while
2125 (cp_parser_cache_group): Likewise.
2126 (cp_parser_cache_group_1): Renamed.
2127 (cp_parser_asm_operand_list): Remove redundant setting of
2128 c_lex_string_translate.
2129 (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
2130 Handle chained strings.
2132 2004-06-12 Andrew Pinski <apinski@apple.com>
2136 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
2138 * cp-tree.h: Fix typo.
2140 * cp-tree.h: Include cgraph.h
2141 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
2142 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
2144 2004-06-12 Jason Merrill <jason@redhat.com>
2146 PR tree-optimization/14107
2147 * decl.c (finish_function): Warn about no return in all functions.
2149 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
2151 * cp-tree.h (struct language_function): Remove cannot_inline.
2152 * decl.c (save_function_data): cannot_inline is no more.
2153 (cxx_push_function_context): Likewise.
2154 * decl2.c (start_objects, start_static_storage_duration_function):
2155 Reset DECL_INLINE, set DECL_UNINLINABLE.
2157 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2160 * search.c (lookup_field): Propagate the ambiguity list.
2161 (lookup_fnfields): Likewise.
2163 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2166 * parser.c (cp_parser_template_name): Ctors/dtors never need a
2167 template keyword to disambiguate.
2169 2004-06-14 Mark Mitchell <mark@codesourcery.com>
2172 * decl.c (grokdeclarator): Ignore pointer-to-members when
2173 computing template depth.
2176 * name-lookup.c (pushtag): Do not try to put class declarations in
2177 explicit specialization scopes.
2179 2004-06-11 Andrew Pinski <pinskia@physics.uc.edu>
2181 * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
2183 2004-06-11 Mark Mitchell <mark@codesourcery.com>
2186 * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
2187 bindings for undeclared built-ins.
2189 2004-06-11 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2191 * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
2192 appear at the correct location.
2194 2004-06-10 Jason Merrill <jason@redhat.com>
2198 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2199 * init.c (build_offset_ref): Build SCOPE_REF with non-null
2200 TREE_TYPE for non-dependent names.
2201 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
2202 unknown_type_node as its TREE_TYPE.
2203 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
2204 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
2205 (dump_expr) <SCOPE_REF case>: Likewise.
2207 2004-06-10 Mark Mitchell <mark@codesourcery.com>
2210 * parser.c (cp_parser_direct_declarator): Robustify.
2213 * pt.c (tsubst_copy): Use decl_constant_value on enumeration
2214 constants in non-dependent contexts.
2218 * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
2221 2004-06-10 Jakub Jelinek <jakub@redhat.com>
2224 * decl.c (duplicate_decls): Handle fileptr_type_node arguments
2227 2004-06-09 Mark Mitchell <mark@codesourcery.com>
2231 2004-06-07 Mark Mitchell <mark@codesourcery.com>
2232 * lex.c (handle_pragma_interface): Deprecate.
2233 (handle_pragma_implementation): Likewise.
2235 2004-06-09 Andrew Pinski <pinskia@physics.uc.edu>
2237 * g++spec.c (lang_specific_driver): Remove check for -lm
2238 and -lmath when check it see if it was the math library.
2240 2004-06-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2243 * parser.c (cp_parser_direct_declarator): Reject constructor named
2244 as qualified template-id.
2246 2004-06-07 Mark Mitchell <mark@codesourcery.com>
2249 * lex.c (handle_pragma_interface): Deprecate.
2250 (handle_pragma_implementation): Likewise.
2252 2004-06-07 Mark Mitchell <mark@codesourcery.com>
2255 * parser.c (cp_parser_iteration_statement): Fix typo in error
2259 * pt.c (tsubst_default_argument): Do not defer access checks
2260 while substituting into the default argument.
2263 * pt.c (tsubst_copy): Do not try to substitute for an enumeration
2264 constant in a non-dependent context.
2267 * except.c (build_throw): Ensure that temp_expr has been
2270 2004-06-06 Roger Sayle <roger@eyesopen.com>
2272 * cp/cp-tree.h (lvalue_or_else): Add function prototype.
2274 2004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2277 * parser.c (cp_parser_mem_initializer_id): Gracefully reject
2278 'typename', and accept 'template'.
2280 2004-06-03 Andrew Pinski <pinskia@physics.uc.edu>
2281 Jan Hubicka <jh@suse.cz>
2284 * method.c (use_think): Do not mark thunk as referenced.
2286 2004-06-03 Matt Austern <austern@apple.com>
2289 * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
2290 is nonzero, and if we see a noninline definition of a key method,
2291 make the vtables nonweak.
2293 2004-06-02 Matt Austern <austern@apple.com>
2295 * cp-tree.h (instantiate_decl): new boolean parameter,
2296 undefined_ok. Current behavior is equivalent to its being 0.
2297 * decl2.c (mark_used): Add new argument when calling instantiate_decl
2298 * pt.c (mark_decl_instantiated): Unconditionally make
2299 instantiations explicit unconditionally
2300 (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
2301 since mark_decl_instantiated now does it.
2302 (instantiate_class_member): New. Instantiate a member of an
2303 explicitly instantiated class template.
2304 (do_type_instantiation): Explicitly instantiate members of an
2305 explicitly instantiated class template.
2306 (instantiate_decl): if undefined_ok is nonzero, and if we're
2307 trying to explicitly instantiated a template with no definition,
2308 change it to an implicit instantiation.
2309 (instantiate_pending_templates): Add new argument to instantiate_decl.
2310 * tree.c (cp_cannot_inline_tree_fn): Likewise.
2312 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
2314 * cp-tree.h: Fix typo.
2316 * cp-tree.h: Include cgraph.h
2317 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
2318 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
2320 2004-06-01 Jason Merrill <jason@redhat.com>
2323 * call.c (call_builtin_trap): Remove type parm.
2324 (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
2325 (build_x_va_arg): Dereference a null pointer for a non-POD argument.
2327 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2330 * init.c (build_offset_ref): Build SCOPE_REF with non-null
2331 TREE_TYPE for non-dependent names.
2332 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
2333 unknown_type_node as its TREE_TYPE.
2334 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
2335 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
2336 (dump_expr) <SCOPE_REF case>: Likewise.
2338 2004-06-01 Richard Henderson <rth@redhat.com>
2339 Andrew Pinski <pinskia@physics.uc.edu>
2341 * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
2342 * parser.c (struct cp_parser): Remove in_offsetof.
2343 (cp_parser_new): Don't set it.
2344 (cp_parser_unary_expression): Don't check it.
2345 (cp_parser_postfix_open_square_expression): Split out from ...
2346 (cp_parser_postfix_expression): ... here.
2347 (cp_parser_postfix_dot_deref_expression): Likewise.
2348 (cp_parser_builtin_offsetof): New.
2349 (cp_parser_primary_expression): Use it.
2351 2004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2354 * parser.c (cp_parser_postfix_expression): Allow subscript
2355 operator in offsetof.
2357 2004-05-31 Mark Mitchell <mark@codesourcery.com>
2360 * friend.c (add_friend): Do not try to perform access checks for
2361 functions from dependent classes.
2363 2004-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
2365 * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
2366 (pp_cxx_begin_template_argument_list): Turn into a function.
2367 (pp_cxx_end_template_argument_list): Likewise.
2368 (pp_cxx_separate_with): Define.
2369 (pp_cxx_unqualified_id): Tidy.
2370 (pp_cxx_primary_expression): Likewise.
2371 (pp_cxx_postfix_expression): Likewise.
2372 (pp_cxx_expression): Likewise.
2373 (pp_cxx_simple_type_specifier): Likewise.
2374 (pp_cxx_type_specifier_seq): Likewise.
2375 (pp_cxx_parameter_declaration_clause): Likewise.
2376 (pp_cxx_exception_specification): Likewise.
2377 (pp_cxx_direct_declarator): Likewise.
2378 (pp_cxx_type_id): Likewise.
2379 * cxx-pretty-print.h (pp_cxx_whitespace): Export from
2381 (pp_cxx_left_paren): Likewise.
2382 (pp_cxx_right_paren): Likewise.
2383 (pp_cxx_left_brace): Likewise.
2384 (pp_cxx_right_brace): Likewise.
2385 (pp_cxx_left_bracket): Likewise.
2386 (pp_cxx_right_bracket): Likewise.
2387 (pp_cxx_dot): Likewise.
2388 (pp_cxx_identifier): Likewise.
2389 (pp_cxx_tree_identifier): Likewise.
2390 (pp_cxx_ampersand): New macro.
2391 (pp_cxx_star): Likewise.
2392 (pp_cxx_arrow): Likewise.
2393 (pp_cxx_semicolon): Likewise.
2394 (pp_cxx_complement): Likewise.
2395 (pp_cxx_begin_template_argument_list): Declaree.
2396 (pp_cxx_end_template_argument_list): Likewise.
2397 (pp_cxx_colon_colon): likewise.
2399 2004-05-31 Eric Botcazou <ebotcazou@libertysurf.fr>
2401 * parser.c (cp_parser_simple_type_specifier): Explicitly test
2404 2004-05-31 Kazu Hirata <kazu@cs.umass.edu>
2406 * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
2407 typeck.c: Fix comment formatting.
2409 2004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
2411 * cp-lang.c (cp_expand_decl): Remove.
2412 (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
2414 2004-05-30 Andreas Jaeger <aj@suse.de>
2416 * lang-specs.h: Add missing initializers for .ii.
2418 2004-05-28 Aldy Hernandez <aldyh@redhat.com>
2420 * decl.c (cp_make_fname_decl): Free return value from
2423 2004-05-28 Mark Mitchell <mark@codesourcery.com>
2426 * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
2428 * init.c (build_new): Likewise.
2431 * name-lookup.c (arg_assoc): Robustify.
2434 * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
2435 when determining the scope to use for a pointer to member.
2436 (lookup_anon_field): Give it external linkage.
2437 * cp-tree.h (lookup_anon_field): Declare it.
2438 * expr.c (cplus_expand_constant): Use it.
2440 2004-05-28 Mark Mitchell <mark@codesourcery.com>
2443 * parser.c (cp_parser_simple_type_specifier): Call
2444 maybe_note_name_used_in_class.
2446 2004-05-28 Tom Marshall <tmarshall@real.com>
2449 * class.c (finish_struct_1): Warn only if the dtor is non-private or
2450 the class has friends.
2452 2004-05-27 Adam Nemet <anemet@lnxw.com>
2455 * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
2456 TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
2458 2004-05-24 Geoffrey Keating <geoffk@apple.com>
2460 * method.c (implicitly_declare_fn): Don't call defer_fn; abort
2461 if it might be needed.
2462 * pt.c (mark_decl_instantiated): Only call defer_fn if
2463 the function actually needs processing in finish_file.
2464 * decl2.c (finish_file): Add check that elements in
2465 deferred_fns_used are really needed there. Remove unnecessary
2466 test of DECL_SAVED_TREE.
2468 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
2470 * Make-lang.in: No need to specify $(LIBCPP).
2472 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2475 * parser.c (cp_parser_class_head): Robustify.
2478 * parser.c (cp_parser_decl_specifier_seq): Correct error in
2480 (cp_parser_constructor_declarator_p): Treat attributes
2484 * typeck.c (build_unary_op): Do not attempt to resolve casts to
2485 base classes in templates.
2487 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2490 * pt.c (instantiate_template): Robustify.
2492 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2495 * decl.c (xref_tag): Issue errors about redeclaring template
2496 classes as non-template classes.
2498 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2501 * name-lookup.c (supplement_binding): Allow redefinitions of
2505 * parser.c (cp_parser_template_argument): Robustify.
2507 2004-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
2509 * class.c (alter_access): Use %E format specifier to print an
2510 identifier node. Avoid looking at the IDENTIFIER_POINTER.
2511 (push_lang_context): Likewise.
2512 * decl.c (lookup_label): Likewise.
2513 (grokdeclarator): Likewise.
2514 * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
2515 * pt.c (do_type_instantiation): Likewise.
2516 * tree.c (handle_java_interface_attribute): Likewise.
2517 (handle_com_interface_attribute): Likewise.
2518 (handle_init_priority_attribute): Likewise.
2520 2004-05-22 Mark Mitchell <mark@codesourcery.com>
2524 * pt.c (build_non_dependent_expr): Expand the set of tree nodes
2525 recognized as overloaded functions.
2527 2004-05-22 Mark Mitchell <mark@codesourcery.com>
2530 * class.c (layout_nonempty_base_or_field): Do not try to avoid
2531 layout conflicts for unions.
2534 * typeck.c (build_x_unary_op): Instantiate template class
2535 specializations before looking for "operator &".
2538 * typeck.c (complete_type): Layout non-dependent array types, even
2542 * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
2545 2004-05-22 Roger Sayle <roger@eyesopen.com>
2547 * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
2548 returning when TREE_TYPE is error_mark_node.
2549 * typeck.c (require_complete_type): Return error_mark_node if
2550 value's type is an error_mark_node.
2552 2004-05-20 Andrew Pinski <pinskia@physics.uc.edu>
2554 * optimize.c (calls_setjmp_r): Remove.
2555 (calls_setjmp_p): Remove.
2556 * cp-tree.c (calls_setjmp_p): Remove.
2557 * decl.c (finish_function): Do not call calls_setjmp_p.
2559 2004-05-18 Zack Weinberg <zack@codesourcery.com>
2561 * decl.c (cp_finish_decl): Use mark_decl_referenced.
2562 * decl2.c (maybe_make_one_only): Likewise.
2563 * method.c (use_thunk): Likewise.
2565 2004-05-18 Jason Merrill <jason@redhat.com>
2567 * class.c (build_base_path): Tidy a bit.
2569 2004-05-14 Geoffrey Keating <geoffk@apple.com>
2571 * name-lookup.c (struct scope_binding): New.
2572 (EMPTY_SCOPE_BINDING): New.
2573 (lookup_using_namespace): Take a scope_binding instead of a
2575 (qualified_lookup_using_namespace): Likewise.
2576 (cxx_binding_clear): Delete.
2577 (do_nonmember_using_decl): Use a scope_binding instead of a
2579 (lookup_tag): Don't call select_decl.
2580 (ambiguous_decl): Don't return anything (and change callers to match).
2581 Take a scope_binding as the second parameter.
2582 (lookup_namespace_name): Use a scope_binding instead of a
2584 (unqualified_namespace_lookup): Likewise.
2585 (lookup_qualified_name): Likewise.
2586 (select_decl): Take a scope_binding instead of a cxx_binding.
2587 Use macros rather than hand-coding tests for type-ness.
2589 2004-05-13 Diego Novillo <dnovillo@redhat.com>
2591 * cp-gimplify.c: Rename from cp-simplify.c.
2592 * Make-lang.in, optimize.c: Update.
2594 2004-05-13 Diego Novillo <dnovillo@redhat.com>
2596 Merge from tree-ssa-20020619-branch. See
2597 ChangeLog.tree-ssa for details.
2599 * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
2600 cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
2601 expr.c, init.c, name-lookup.h, optimize.c, parser.c,
2602 pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
2604 * cp-mudflap.c: New file.
2605 * cp-simplify.c:: New file.
2607 2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2610 * decl2.c (check_classfn): For member templates, compare also the
2611 template parameters to match the declaration.
2612 * cp-tree.h: Adjust declaration of check_classfn.
2613 * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
2614 * friend.c (do_friend): Likewise.
2615 * pt.c (tsubst_friend_function): Likewise.
2617 2004-05-01 Zack Weinberg <zack@codesourcery.com>
2619 * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
2620 Instead, dig into the representation type to find the array bound.
2622 2004-04-30 Jason Merrill <jason@redhat.com>
2624 Refer to base members using COMPONENT_REFs where possible.
2625 * class.c (build_simple_base_path): New fn.
2626 (build_base_path): Use it for non-virtual base references.
2627 (layout_class_type): Change base fields to their real type
2628 after layout is done.
2629 * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
2630 * cp-lang.c (cxx_get_alias_set): Use it.
2632 2004-04-30 Kazu Hirata <kazu@cs.umass.edu>
2634 * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
2637 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2640 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
2641 used in integral constant expressions.
2643 2004-04-22 Mark Mitchell <mark@codesourcery.com>
2645 * init.c (build_aggr_init): Fix accidental use of C99 construct in
2648 * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
2650 * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
2651 * decl.c (reshape_init): Use it.
2652 * init.c (perform_member_init): Remove redundant condition.
2653 (build_aggr_init): Adjust to handle brace-enclosed initializers
2655 (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
2657 * parser.c (cp_parser_initializer_clause): Do not set
2658 TREE_HAS_CONSTRUCTOR on the initializer.
2659 * rtti.c (tinfo_base_init): Likewise.
2660 (generic_initializer): Likewise.
2661 (ptr_initializer): Likewise.
2662 (ptm_initializer): Likewise.
2663 (class_initializer): Likewise.
2664 (get_pseudo_ti_init): Likewise.
2665 * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
2667 2004-04-22 Alan Modra <amodra@bigpond.net.au>
2669 * name-lookup.c (anonymous_namespace_name): Make static.
2671 2004-04-19 Roger Sayle <roger@eyesopen.com>
2674 * class.c (build_base_path): Call fold whilst building the NULL
2675 pointer check expression trees.
2677 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
2679 * init.c (build_new_1): Don't use type size argument for Java
2680 _Jv_AllocObject call.
2682 2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
2684 * method.c (make_alias_for_thunk): Remove preprocessor guard on
2685 declaration and definition.
2687 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
2690 * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
2691 than ASM_OUTPUT_DEF.
2693 2004-04-08 Jakub Jelinek <jakub@redhat.com>
2695 * decl2.c (mark_used): Don't segfault if cfun != NULL but
2696 current_function_decl == NULL.
2698 2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
2701 * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
2704 2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2706 * init.c (decl_constant_value): Don't look at DECL_INITIAL
2708 * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
2709 or TREE_SIDE_EFFECTS of a type.
2711 2004-04-02 Nathan Sidwell <nathan@codesourcery.com>
2714 * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
2715 cv-qualifier unification.
2716 * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
2718 2004-04-02 Jan Hubicka <jh@suse.cz>
2720 * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
2721 * cp-tree.h (cp_update_decl_after_saving): Declare.
2722 * tree.c (cp_update_decl_after_saving): Define.
2724 2004-04-01 Mark Mitchell <mark@codesourcery.com>
2727 * typeck.c (get_delta_difference): Call fold before returning the
2730 2004-04-01 Richard Henderson <rth@redhat.com>
2733 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
2734 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
2736 2004-04-01 Mark Mitchell <mark@codesourcery.com>
2739 * name-lookup.c (maybe_push_cleanup_level): Robustify.
2741 2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2743 * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
2745 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2747 * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
2748 * class.c (check_bitfield_decl): Likewise.
2749 * cvt.c (type_promotes_to): Likewise.
2750 * decl.c (finish_enum): Likewise.
2751 * mangle.c (write_builtin_type): Likewise.
2752 * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
2753 * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
2754 (build_binary_op): Likewise.
2756 2004-03-31 Jan Hubicka <jh@suse.cz>
2758 * tree.h (optimize_function): Kill prototype.
2759 * optimize.c (dump_function, optimize_function, dump_finction): Kill.
2760 * semantics.c (expand_body): Kill.
2762 2004-03-30 Mark Mitchell <mark@codesourcery.com>
2765 * decl.c (start_decl_1): Do not decide whether or not to create a
2766 new cleanup level until after the type has been completed.
2769 * pt.c (tsubst_default_argument): Clear current_function_decl.
2771 2004-03-30 Zack Weinberg <zack@codesourcery.com>
2773 * name-lookup.c, parser.c: Use new shorter form of GTY markers.
2775 2004-03-29 Zack Weinberg <zack@codesourcery.com>
2777 * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
2778 is null, just print the literal name and return.
2780 2004-03-25 Kazu Hirata <kazu@cs.umass.edu>
2782 * cxx-pretty-print.c: Fix comment typos.
2784 2004-03-24 Kazu Hirata <kazu@cs.umass.edu>
2786 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
2789 2004-03-23 Ziemowit Laski <zlaski@apple.com>
2791 * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
2792 * mangle.c (write_type): Add call to 'mangle_fundamental_type'
2795 2004-03-23 Zack Weinberg <zack@codesourcery.com>
2797 PR 12267, 12391, 12560, 13129, 14114, 14133
2798 * cp-lang.c (c_reset_state): Delete.
2799 (push_file_scope, pop_file_scope): New stubs.
2800 * parser.c (c_parse_file): Call sorry() here if called more than once.
2802 2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2804 * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
2807 2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
2809 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
2811 2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
2813 * error.c (enum pad): Remove.
2814 (dump_qualifiers): Likewise.
2815 (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
2816 (dump_aggr_type): Likewise.
2817 (dump_type_suffix): Likewise.
2818 (dump_simple_decl): Likewise.
2819 (dump_function_decl): Likewise.
2820 (cv_to_string): Likewise.
2821 (dump_type_prefix): Likewise. Adjust return void.
2822 * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
2824 (pp_cxx_template_keyword_if_needed): Document.
2825 (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
2826 (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
2827 MUST_NOT_THROW_EXPR.
2829 2004-03-21 Mark Mitchell <mark@codesourcery.com>
2832 * decl.c (cp_finish_decl): Compute the size of arrays declared in
2833 templates, if their type is non-dependent.
2835 2004-03-19 Mark Mitchell <mark@codesourcery.com>
2837 * call.c (build_op_delete_call): Do not forget the placement
2838 arguments when iterating through mutiple delete operators.
2840 * cp-tree.h (svaed_scope): Remove last_parms.
2841 (NEW_DELETE_OPNAME_P): New macro.
2842 (last_function_parms): Remove.
2843 (do_friend): Adjust prototype.
2844 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
2845 using last_function_parms.
2846 (grokfndecl): Take the PARM_DECLs as an argument, rather than
2847 using last_function_parms.
2848 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
2849 for class-specific operator new and operator delete.
2850 (grok_op_properties): Do not look for allocation functions with
2852 (start_function): Use DECL_ARGUMENTS instead of
2853 last_function_parms.
2854 * decl.h (last_function_parms): Do not declare.
2855 * decl2.c (grokclassfn): Do not use last_function_parms.
2856 * friend.c (do_friend): Remove parmdecls parameter.
2857 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
2858 (pop_from_top_level): Do not restore it.
2859 * pt.c (check_explicit_specialization): Do not adjust
2860 last_function_parms.
2862 * name-lookup.c (do_local_using_decl): Create a local binding for
2863 types brought in via using declarations.
2865 * name-lookup.c (lookup_arg_dependent): Handle block-scope
2866 function declarations correctly.
2868 * semantics.c (finish_id_expression): Correct handling of
2869 conversion operators to dependent types.
2871 * typeck.c (lookup_destructor): Allow the use of destructors from
2874 2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2876 * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
2877 TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
2878 * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
2879 the field is named TEMPLATE_TYPE_PARM_INDEX.
2881 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2884 * parser.c (cp_parser_functional_cast): A cast to anything
2885 but integral or enumaration type is not an integral constant
2887 * pt.c (value_dependent_expression_p): Handle cast expressions
2888 without operands (such as "int()").
2890 2004-03-18 Mark Mitchell <mark@codesourcery.com>
2892 * semantics.c (finish_pseudo_destructor_expr): Allow differing
2893 cv-qualification between the type named by the
2894 pseudo-destructor-name and the object-type.
2896 * search.c (accessible_base_p): Handle non-proper bases.
2898 * name-lookup.c (do_nonmember_using_decl): If a using declaration
2899 refers to a single overloaded function, set the type of the
2901 * tree.c (lvalue_type): Simplify.
2902 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
2904 (build_unary_op): Handle OVERLOADs with known types.
2906 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
2909 * parser.c (cp_parser_postfix_expression): Handle the use of
2910 "typename" in non-dependent contexts. Convert appropriately when
2911 when using a qualified name after "->" or ".".
2913 * call.c (conditional_conversion): Honor the requirement that some
2914 conversions refer to the original object.
2916 2004-03-18 Mark Mitchell <mark@codesourcery.com>
2918 * call.c (build_conditional_expr): Do not call force_rvalue for
2919 operands of void_type when the conditional expression itself has
2921 * name-lookup.c (pushdecl): Don't consider a declaration of a
2922 function named "main" to be an overload of a type named "main".
2923 * parser.c (cp_parser_template_name): Perform name lookup when the
2924 template name is proceeded by "template" if the qualifying scope
2926 * typeck.c (composite_pointer_type_r): Correctly handle
2927 pointer-to-member types.
2928 (build_const_cast): Likewise.
2930 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2932 * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
2933 * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
2934 (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
2935 (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
2936 (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
2937 (TYPEOF_TYPE_EXPR): New macro.
2938 * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
2939 * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
2940 * pt.c (tsubst): Likewise.
2941 * semantics.c (finish_typeof): Likewise.
2942 * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
2943 and TEMPLATE_TYPE_PARM.
2944 * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
2945 (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
2947 2004-03-16 Mark Mitchell <mark@codesourcery.com>
2950 * cp-tree.h (build_new_op): Change prototype.
2951 (build_x_binary_op): Likewise.
2952 * call.c (build_new_op): Add overloaded_p parameter.
2953 * decl2.c (grok_array_decl): Adjust call to build_new_op.
2954 * parser.c (cp_parser_binary_expression): Note that uses of
2955 overloaded operators prevents an expression from being considered
2956 an integral constant.
2957 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
2959 * semantics.c (finish_call_expr): Likewise.
2960 * typeck.c (rationalize_conditional_expr): Likewise.
2961 (build_x_indirect_ref): Likewise.
2962 (build_x_binary_op): Likewise.
2963 (build_x_unary_op): Likewise.
2964 (build_x_compound_expr): Likewise.
2965 (build_modify_expr): Likewise.
2966 * typeck2.c (build_x_arrow): Likewise.
2968 2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
2970 * cp-lang.c, ptree.c: Update copyright.
2972 2004-03-13 Mark Mitchell <mark@codesourcery.com>
2975 * parser.c (cp_parser_non_integral_constant_expression): Encode
2976 more of the idiom that surrounded calls to this function within
2978 (cp_parser_primary_expression): Adjust accordingly.
2979 (cp_parser_postfix_expression): Likewise.
2980 (cp_parser_unary_expression): Likewise.
2981 (cp_parser_cast_expression): Likewise.
2982 (cp_parser_assignment_expression): Likewise.
2983 (cp_parser_expression): Likewise.
2984 (cp_parser_new_expression): Note that new-expressions are not
2985 allowed in integral constant expressions.
2986 (cp_parser_delete_expression): Likewise.
2988 2004-03-12 Matt Austern <austern@apple.com>
2990 * decl2.c (maybe_make_one_only): Look at
2991 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
2992 to make an explicit instantiation weak.
2993 * method.c (use_thunk): Make sure we call comdat_linkage
2995 * pt.c (do_type_instantiation): On systems where weak symbols
2996 don't go in a static archive's TOC, explicit instantiation of a
2997 class must imply *explicit* instantiation of its memeber.
2999 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
3001 * call.c, cp-tree.h, pt.c: Fix comment typos.
3003 2004-03-10 Mark Mitchell <mark@codesourcery.com>
3006 * decl.c (xref_tag): Disregard non-type declarations when
3007 looking up a tagged type.
3009 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
3012 * call.c (convert_like_real): Build a const qualified temporary,
3013 when testing ctor access.
3015 2004-03-09 Mark Mitchell <mark@codesourcery.com>
3017 * call.c (initialize_reference): Fix typo.
3019 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3022 * pt.c (determine_specialization): For member templates, match also
3026 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
3028 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
3030 2004-03-09 Mark Mitchell <mark@codesourcery.com>
3033 * call.c (initialize_reference): Handle initializers that are
3034 class-member access expressions applies to rvalues.
3036 2004-03-09 Mark Mitchell <mark@codesourcery.com>
3039 * name-lookup.c (supplement_binding): Ignore functions that are
3040 marked DECL_ANTICIPATED.
3042 2004-03-08 Mark Mitchell <mark@codesourcery.com>
3045 * class.c (check_field_decls): Complain about non-static data
3046 members of reference type in unions. Propagate
3047 CLASSTYPE_REF_FIELDS_NEED_INIT and
3048 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
3050 * init.c (perform_member_init): Complain about mbmers with const
3051 type that are not explicitly initialized.
3053 2004-03-08 Mark Mitchell <mark@codesourcery.com>
3055 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
3056 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
3057 (lang_identifier): Remove implicit_decl and error_locus.
3058 (IDENTIFIER_IMPLICIT_DECL): Remove.
3059 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
3060 (IDENTIFIER_ERROR_LOCUS): Likewise.
3061 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
3062 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
3063 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
3064 (implicitly_declare): Remove.
3065 * decl.c (warn_extern_redeclared_static): Remove check of
3066 IDENTIFIER_IMPLICIT_DECL.
3067 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
3068 (implicitly_declare): Remove.
3069 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
3070 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
3071 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
3072 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
3073 in the innermost scope, rather than at namespace scope.
3074 * name-lookup.c (push_local_binding): Give it external linkage.
3075 (pushdecl): Remove dead code.
3076 * name-lookup.h (push_local_binding): Declare it.
3077 * ptree.c (cxx_print_identifier): Don't print
3078 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
3079 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
3080 not IDENTIFIER_ERROR_LOCUS.
3081 * typeck.c (build_function_call): Remove dead code.
3083 2004-03-08 Jason Merrill <jason@redhat.com>
3086 * decl.c (xref_tag): Remove attribute handling.
3087 * cp-tree.h: Adjust prototype.
3088 * decl.c, parser.c, rtti.c: Adjust callers.
3089 * parser.c (cp_parser_class_head): Pass back attributes in the
3091 (cp_parser_class_specifier): Adjust.
3093 2004-03-08 Matt Austern <austern@apple.com>
3096 * name-lookup.c (add_decl_to_level): Add extern variables, as well
3097 as static, to static_decls array.
3099 2004-03-05 Jason Merrill <jason@redhat.com>
3101 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
3103 2004-03-04 Geoffrey Keating <geoffk@apple.com>
3105 * decl.c (grokfndecl): Update old incorrect comment.
3106 (grokvardecl): Diagnose C++ variables of type with no linkage.
3108 2004-03-01 Mark Mitchell <mark@codesourcery.com>
3111 * pt.c (build_non_dependent_expr): Do not create a
3112 NON_DEPENDENT_EXPR for a THROW_EXPR.
3114 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
3117 * error.c (dump_expr): Handle THROW_EXPR.
3119 2004-03-01 Mark Mitchell <mark@codesourcery.com>
3122 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
3123 lookup if ordinary name-lookup finds a non-function.
3124 * pt.c (tsubst_copy_and_build): Likewise.
3127 * parser.c (cp_parser_late_parsing_default_args): Check that there
3128 are no extra tokens after the end of the default-argument
3131 2004-03-01 Mark Mitchell <mark@codesourcery.com>
3134 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
3135 having C++ linkage for name-mangling purposes.
3138 * parser.c (cp_parser_direct_declarator): Recognize constructor
3139 declarators that use a template-id to name the class being
3143 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
3144 (tsubst_expr): Do not call tsubst_copy, even when
3145 processing_template_decl.
3147 2004-03-01 Jeff Law <law@redhat.com>
3149 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
3152 2004-02-29 Mark Mitchell <mark@codesourcery.com>
3155 * name-lookup.h (push_scope): Change prototype.
3156 * name-lookup.c (push_scope): Do not reenter the current class
3158 * decl.c (grokfndecl): Check return code from push_scope before
3160 * decl2.c (check_classfn): Likewise.
3161 * parser.c (cp_parser_conversion_function_id): Likewise.
3162 (cp_parser_init_declarator): Likewise.
3163 (cp_parser_direct_declarator): Likewise.
3164 (cp_parser_class_specifier): Likewise.
3165 (cp_parser_class_head): Likewise.
3166 (cp_parser_lookup_name): Likewise.
3167 (cp_parser_constructor_declarator_p): Likewise.
3168 * pt.c (instantiate_class_template): Likewise.
3169 (resolve_typename_type): Likewise.
3171 2004-02-29 Mark Mitchell <mark@codesourcery.com>
3174 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
3178 * class.c (update_vtable_entry_for_fn): Do not go through
3179 covariance machinery if the type returned by an overrider is the
3180 same as the original.
3182 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
3184 * call.c: Fix a comment typo.
3186 2004-02-27 Ziemowit Laski <zlaski@apple.com>
3188 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
3190 2004-02-26 Mark Mitchell <mark@codesourcery.com>
3193 * parser.c (cp_parser_parameter_declaration_list): Commit
3194 to fewer tentative parses.
3196 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3199 * pt.c (dependent_type_p_r): A template template parameter is a
3202 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3205 * mangle.c (write_template_arg_literal): Don't rely on identity for
3208 2004-02-24 Jason Merrill <jason@redhat.com>
3210 * tree.c (build_exception_variant): Use check_qualified_type.
3212 2004-02-23 Zack Weinberg <zack@codesourcery.com>
3213 Kazu Hirata <kazu@cs.umass.edu>
3215 * decl.c (cxx_init_decl_processing): Don't check
3216 flag_writable_strings.
3218 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
3221 * typeck.c (maybe_warn_about_returning_address_of_location):
3222 Change check for VAR_DECL to use DECL_P instead.
3224 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3227 * cvt.c (build_expr_type_conversion): Type must be complete before
3228 looking up for conversions.
3230 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3233 * name-lookup.c (arg_assoc_class): Don't look into template
3234 arguments if it is not a primary template.
3236 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3239 * method.c (use_thunk): Always clone function argument tree.
3241 2004-02-20 Mark Mitchell <mark@codesourcery.com>
3244 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
3247 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
3248 for all type variants.
3250 2004-02-19 Mark Mitchell <mark@codesourcery.com>
3253 * decl.c (duplicate_decls): Return error_mark_node for invalid
3255 * name-lookup.c (push_namespace): Ignore the return value from
3257 * pt.c (push_template_decl_real): Robustify.
3260 * name-lookup.c (push_class_level_binding): Do not complain about
3261 adding a binding for a member whose name is the same as the
3262 enclosing class if the member is located in a base class of the
3265 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3268 * parser.c (cp_parser_new_expression): Parse an ill-formed
3269 direct-new-declarator after a parenthesized type-id to emit good
3272 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
3274 * cp-tree.def, cvt.c: Update copyright.
3276 2004-02-17 Mark Mitchell <mark@codesourcery.com>
3279 * cp-tree.h (abi_version_at_least): Remove.
3280 * mangle.c: Include flags.h.
3282 2004-02-15 Mark Mitchell <mark@codesourcery.com>
3285 * call.c (build_conditional_expr): Handle conversions between
3286 class types which result in differently cv-qualified type
3290 * class.c (delete_duplicate_fields_1): Remove.
3291 (delete_duplicate_fields): Likewise.
3292 (finish_struct_anon): Remove check for members with the same name
3293 as their enclosing class.
3294 (check_field_decls): Do not call duplicate_fields.
3295 * decl.c (grokdeclarator): Remove check for static data members
3296 with the same name as their enclosing class.
3297 * name-lookup.c (push_class_level_binding): Check for members with
3298 the same name as their enclosing class.
3300 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
3303 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
3305 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3308 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
3309 has full set of arguments.
3311 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3314 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
3316 2004-02-13 Mark Mitchell <mark@codesourcery.com>
3319 * cp-tree.h (delete_sanity): Change prototype.
3320 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
3321 Remove dead code. Adjust code to warn about deleting an array.
3322 * typekc.c (decay_conversion): Use build_address and build_nop.
3325 * search.c (accessible_p): Do not check access in thunks.
3328 * call.c (build_conditional_expr): Call force_rvalue on the
3329 non-void operand in the case that one result is a throw-expression
3330 and the other is not.
3332 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
3335 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
3336 the type name and look ahead for ::~, and bail out early with a
3337 better error message if the parse is going to fail.
3339 2004-02-12 Mark Mitchell <mark@codesourcery.com>
3341 * call.c (conversion_kind): New type.
3342 (conversion_rank): Likewise.
3343 (conversion): Likewise.
3344 (CONVERSION_RANK): New macro.
3345 (conversion_obstack): New variable.
3346 (obstack_initialized): Likewise.
3347 (z_candidate): Change type of convs and second_conv.
3348 (candidate_warning): New type.
3349 (IDENTITY_RANK): Remove.
3350 (EXACT_RANK): Likewise.
3351 (PROMO_RANK): Likewise.
3352 (STD_RANK): Likewise.
3353 (PBOOL_RANK): Likewise.
3354 (USER_RANK): Likewise.
3355 (ELLIPSIS_RANK): Likewise.
3356 (BAD_RANK): Likewise.
3357 (ICS_RANK): Likewise.
3358 (ICS_STD_RANK): Likewise.
3359 (ICS_USER_FLAG): Likewise.
3360 (ICS_ELLIPSIS_FLAG): Likewise.
3361 (ICS_THIS_FLAG): Likewise.
3362 (ICS_BAD_FLAG): Likewise.
3363 (NEED_TEMPORARY_P): Likewise.
3364 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
3365 (USER_CONV_CAND): Likewise.
3366 (USER_CONV_FN): Likewise.
3367 (conversion_obstack_alloc): New function.
3368 (alloc_conversion): Likewise.
3369 (validate_conversion_obstack): Likewise.
3370 (alloc_conversions): Likewise.
3371 (build_conv): Adjust to deal with new conversion data structures.
3372 (build_identity_conv): New function.
3373 (build_ambiguous_conv): Likewise.
3374 (standard_conversion): Adjust to deal with new conversion data
3376 (convert_class_to_reference): Likewise.
3377 (direct_reference_binding): Likewise.
3378 (reference_binding): Likewise.
3379 (implicit_conversion): Likewise.
3380 (add_candidate): Likewise.
3381 (add_function_candidate): Likewise.
3382 (add_conv_candidate): Likewise.
3383 (build_builtin_candidate): Likewise.
3384 (print_z_candidate): Likewise.
3385 (merge_conversion_sequences): Likewise.
3386 (build_user_type_conversion_1): Likewise.
3387 (build_user_type_conversion): Likewise.
3388 (build_new_function_call): Likewise.
3389 (build_object_call): Likewise.
3390 (conditional_conversion): Likewise.
3391 (build_conditional_expr): Likewise.
3392 (build_new_op): Likewise.
3393 (build_op_delete_call): Likewise.
3394 (convert_like_real): Likewise.
3395 (build_over_call): Likewise.
3396 (build_new_method_call): Likewise.
3397 (is_subseq): Likewise.
3398 (maybe_handle_implicit_object): Likewise.
3399 (maybe_handle_ref_bind): Likewise.
3400 (compare_ics): Likewise.
3401 (source_type): Likewise.
3402 (add_warning): Likewise.
3404 (can_convert_arg): Likewise.
3405 (can_convert_arg_bad): Likewise.
3406 (perform_implicit_conversion): Likewise.
3407 (perform_direct_initialization_if_possible): Likewise.
3408 (initialize_reference): Likewise.
3409 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
3410 * cp-tree.def (WRAPPER): Likewise.
3411 (IDENTITY_CONV): Remove.
3412 (LVALUE_CONV): Likewise.
3413 (QUAL_CONV): Likewise.
3414 (STD_CONV): Likewise.
3415 (PTR_CONV): Likewise.
3416 (PMEM_CONV): Likewise.
3417 (BASE_CONV): Likewise.
3418 (REF_BIND): Likewise.
3419 (USER_CONV): Likewise.
3420 (AMBIG_CONV): Likewise.
3421 (RVALUE_CONV): Likewise.
3422 * cp-tree.h (tree_wrapper): Remove.
3423 (WRAPPER_ZC): Remove.
3424 (lang_tree_node): Remove wrapper.
3425 (LOOKUP_SPECULATIVELY): Remove.
3426 (build_op_delete_call): Adjust prototype.
3427 (validate_conversion_obstack): Declare.
3428 (build_zc_wrapper): Remove.
3429 * cvt.c (convert_to_reference): Remove dead code.
3430 (ocp_convert): Likewise.
3431 * decl.c (redeclaration_error_message): Correct handling of
3433 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
3434 (cp_tree_node_structure): Remove WRAPPER case.
3435 * decl2.c (finish_file): Call validate_conversion_obstack.
3436 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
3437 (build_op_delete_call): Likewise.
3438 (build_x_delete): Likewise.
3439 (build_delete): Adjust call to build_op_delete_call.
3440 * pt.c (tsubst_friend_declaration): Adjust code to determine
3441 whether or not a friend template is a definition.
3442 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
3443 * tree.c (build_zc_wrapper): Remove.
3445 2004-02-12 Zack Weinberg <zack@codesourcery.com>
3447 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
3448 * cp-tree.h: Don't declare cxx_builtin_type_decls.
3449 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
3450 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
3452 2004-02-10 Mark Mitchell <mark@codesourcery.com>
3454 * typeck.c (lookup_destructor): Fix typo in error message.
3456 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
3458 * call.c, parser.c, tree.c: Fix comment typos.
3460 2004-02-07 Zack Weinberg <zack@codesourcery.com>
3463 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
3464 * decl.c (duplicate_decls, start_function): Likewise.
3466 2004-02-07 Zack Weinberg <zack@codesourcery.com>
3468 * name-lookup.c (pushdecl): Issue shadow warnings directly.
3469 * parser.c (free_parser_stacks): Delete.
3471 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
3473 * rtti.c: Update copyright.
3475 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3478 * decl.c (require_complete_types_for_parms): Do not insert
3479 error_mark_node in the parameter list.
3481 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3484 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
3485 error when terminator can not be found.
3487 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
3489 Make-lang.in (po-generated): Delete.
3491 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
3493 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
3494 targetm.calls.promote_prototypes.
3496 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3500 2004-01-15 Geoffrey Keating <geoffk@apple.com>
3502 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
3503 (handle_pragma_implementation): Likewise.
3505 2004-02-05 Mark Mitchell <mark@codesourcery.com>
3508 * typeck.c (lookup_destructor): Tweak error message.
3510 2004-02-05 Jan Hubicka <jh@suse.cz>
3512 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
3515 2004-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3518 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
3519 code, only emits the diagnostic now. Added lookup of the identifier
3520 and support for qualified ids.
3521 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
3522 Parse an (invalid) type name as id-expression within a declarator.
3523 (cp_parser_simple_declaration): Use it.
3524 (cp_parser_member_declaration): Likewise.
3525 (cp_parser_make_typename_type): New function. Handle errors through
3526 cp_parser_diagnose_invalid_typename.
3527 (cp_parser_elaborated_type_specifier): Use it.
3529 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3532 * call.c (convert_like_real): Use "converting" rather than
3533 "argument" as the descriptive keyword to
3534 dubious_conversion_warnings.
3535 * typeck.c (convert_for_assignment): Do not call
3536 dubious_conversion_warnings.
3538 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3541 * init.c (build_delete): Emit a more informative error message in
3542 case of an incomplete type, and on the correct source line.
3544 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
3546 * error.c, search.c: Update copyright.
3548 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3551 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
3552 linkage for the typeinfo name string.
3554 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3557 * cp-tree.h (fold_non_dependent_expr): New function.
3558 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
3559 (cp_parser_template_argument): Use fold_non_dependent_expr.
3560 (cp_parser_direct_declarator): Likewise.
3561 * pt.c (fold_non_dependent_expr): New function.
3562 (convert_nontype_argument): Use it.
3563 (tsubst_qualified_id): Simplify.
3564 (tsubst_copy_and_build): Likewise.
3566 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3568 * decl.c (cxx_push_function_context): Do not set
3569 current_function_is_thunk.
3570 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
3573 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3576 * pt.c (more_specialized_class): Increase processing_template_decl
3577 while partial ordering.
3579 2004-02-03 Mark Mitchell <mark@codesourcery.com>
3582 * decl.c (start_function): Do not call pushdecl for any
3583 instantiation or specialization of a primary template.
3585 2004-02-03 Mark Mitchell <mark@codesourcery.com>
3588 * parser.c (cp_parser_class_name): Robustify.
3591 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
3594 * semantics.c (finish_id_expression): Do not return an
3595 IDENTIFIER_NODE when lookup finds a PARM_DECL.
3597 2004-02-03 Mark Mitchell <mark@codesourcery.com>
3600 * pt.c (build_non_dependent_expr): Do not build
3601 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
3604 * semantics.c (finish_id_expression): Do not return an
3605 IDENTIFIER_NODE when lookup finds a VAR_DECL.
3608 * parser.c (cp_parser_simple_declaration): When skipping to the
3609 end of the statement swallow the terminating semicolon.
3611 2004-02-02 Mark Mitchell <mark@codesourcery.com>
3614 * init.c (build_offset_ref): Improve error recovery for invalid
3615 uses of non-static member functions.
3618 * cp-tree.h (cp_build_type_attribute_variant): New function.
3619 * class.c (build_clone): Use cp_build_type_attribute_variant.
3620 * decl.c (duplicate_decls): Likewise.
3621 * pt.c (copy_default_args_to_explicit_spec): Likewise.
3622 (tsubst_function_type): Likewise.
3623 * tree.c (build_exception_variant): Check attributes before
3624 concluding that two types are the same.
3625 (cp_build_type-attribute_variant): New method.
3626 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
3629 * call.c (convert_class_to_reference): Keep better track of
3630 pedantically invalid user-defined conversions.
3632 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3635 * pt.c (tsubst_qualified_id): Improved error message when a type
3636 is expected but not found.
3638 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
3640 * class.c: Fix comment typos.
3642 * error.c: Likewise.
3643 * parser.c: Likewise.
3645 * search.c: Likewise.
3646 * typeck.c: Likewise.
3648 2004-01-30 Richard Henderson <rth@redhat.com>
3651 * method.c (use_thunk): Don't force_target_expr for void thunks.
3652 * tree.c (build_target_expr_with_type): Assert non-void type.
3653 (force_target_expr): Likewise.
3655 2004-01-30 Michael Matz <matz@suse.de>
3657 * parser.c (cp_parser_labeled_statement): Accept case ranges.
3659 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3663 * decl.c (grokdeclarator): Check immediatly type completeness for
3664 non-dependent types.
3666 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3669 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
3670 a sizeof expression.block
3672 2004-01-29 Mark Mitchell <mark@codesourcery.com>
3675 * mangle.c (write_encoding): Correct encoding of member template
3678 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3680 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
3681 template name as it was `<::' (digraph typo).
3682 (cp_parser_nth_token_starts_template_argument_list_p): New function.
3683 (cp_parser_id_expression): Use it.
3684 (cp_parser_nested_name_specifier_opt): Likewise.
3685 (cp_parser_template_name): Likewise.
3686 (cp_parser_class_name): Likewise.
3687 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
3689 2004-01-28 Mark Mitchell <mark@codesourcery.com>
3692 * typeck.c (merge_types): Do not merge attributes into
3696 * parser.c (cp_parser_direct_declarator): Do not prevent
3697 backtracking inside a parenthesized declarator.
3698 (cp_parser_parameter_declaration): Fix typo in comment.
3700 2004-01-28 Jan Hubicka <jh@suse.cz>
3702 * semantics.c (expand_body) Do emit_associated_thunks before
3705 2004-01-27 Devang Patel <dpatel@apple.com>
3707 * name-lookup.c: Include "debug.h"
3708 (do_namespace_alias): Invoke debug_hooks to emit debug info
3709 for namespace alias.
3710 (do_local_using_decl): Invoke debug_hooks to emit debug info
3712 (do_class_using_decl): Same.
3713 (do_toplevel_using_decl): Same.
3714 (do_using_directive): Same.
3715 (cp_emit_debug_info_for_using): New function.
3716 * Make-lang.in (cp/parser.o): Depend on debug.h
3717 (cp/name-lookup.o): Same.
3719 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3721 * cp-tree.h (language_function, lang_type_header): Use
3723 * name-lookup.h (cp_binding_level): Likewise.
3725 2004-01-26 Mark Mitchell <mark@codesourcery.com>
3728 * semantics.c (finish_for_expr): Check for unresolved overloaded
3731 * class.c (add_method): Just check processing_template_decl to
3732 determine whether or not we are within a template.
3733 * decl2.c (maybe_retrofit_in_chrg): Likewise.
3734 * init.c (decl_constant_value): Check the type of the declaration,
3736 * name-lookup.c (maybe_push_to_top_level): Rename to ...
3737 (push_to_top_level): ... this.
3738 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
3739 * pt.c (push_template_decl_real): Reorder condition for speed.
3740 (convert_template_argument): Use dependency-checking functions in
3741 place of uses_template_parms.
3742 (lookup_template_class): Avoid calling uses_template_parms more
3744 (uses_template_parms): Reimplement, using dependency-checking
3746 (instantiate_class_template): Use push_to_top_level, not
3747 maybe_push_to_top_level.
3748 (type_unification_real): Simplify.
3749 (type_dependent_expression_p): Handle OFFSET_REFs and
3751 (any_dependent_template_arguments_p): Handle multiple levels of
3753 * semantics.c (expand_or_defer_fn): Do not check
3754 uses_template_parms for template instantiations.
3755 * typeck.c (comptypes): Avoid calling cp_type_quals.
3757 2004-01-25 Mark Mitchell <mark@codesourcery.com>
3760 * call.c (build_over_call): Do not convert arguments when
3761 processing a template.
3762 * pt.c (build_non_dependent_expr): Do not build a
3763 NON_DEPENDENT_EXPR for arithmetic constants.
3765 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3768 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
3769 returns a TYPE_DECL. no further lookup is required.
3770 * semantics.c (check_template_template_default_arg): A TYPE_DECL
3771 is invalid. Rework to give better diagnostics.
3773 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3776 * pt.c (instantiate_class_template): Add an error_mark_node
3778 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
3780 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
3783 * decl.c (finish_function): Move the call to
3784 finish_fname_decls below the call to
3785 finish_eh_spec_block.
3787 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
3789 * optimize.c, typeck2.c: Update copyright.
3791 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
3793 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
3794 init.c, mangle.c, typeck.c: Update copyright.
3796 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
3798 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
3800 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
3802 * Make-lang.in: Replace $(docdir) with doc.
3803 (c++.info, c++.srcinfo): Dummy entry.
3804 (c++.man, c++.srcman): New rules.
3805 (c++.install-man): Revamp rule.
3807 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
3809 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
3810 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
3811 immediate $(shell) instead of deferred backquote.
3813 2004-01-19 Mark Mitchell <mark@codesourcery.com>
3816 * parser.c (cp_parser_postfix_expression): When encountering
3817 incomplete type on left-hand side of "->" or ".", treat the entire
3818 expression as erroneous.
3821 * call.c (build_field_call): Remove.
3822 (n_build_method_call): Likewise.
3823 (build_method_call): Likewise.
3824 (build_new_method_call): Do not call build_field_call.
3825 * class.c (n_build_method_call): Remove.
3826 (print_class_statistics): Do not print it.
3827 * cp-tree.h (build_method_call): Remove declaration.
3828 (finish_object_call_expr): Likewise.
3829 (build_new_1): Do not use build_method_call.
3830 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
3831 when the function appearing on the right-hand-side of "." or "->"
3832 is not actually a function.
3833 * pt.c (tsubst_copy_and_build): Likewise.
3834 * semantics.c (finish_object_call_expr): Remove.
3836 2004-01-18 Mark Mitchell <mark@codesourcery.com>
3839 * pt.c (tsubst): Use finish_typeof.
3841 2004-01-18 Jason Merrill <jason@redhat.com>
3844 * except.c (build_throw): In a template, set
3845 current_function_returns_abnormally.
3847 2004-01-17 Fred Fish <fnf@intrinsity.com>
3850 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
3851 except don't call array_type_nelts() with a VECTOR_TYPE.
3853 2004-01-16 Jan Hubicka <jh@suse.cz>
3855 * mangle.c (write_mangled_name): Remove inline modifier.
3857 2004-01-16 Mark Mitchell <mark@codesourcery.com>
3860 * decl.c (compute_array_index_type): Fix grammar in comment.
3861 * init.c (build_zero_init): Handle zero-sized arrays correctly.
3864 * call.c (name_as_c_string): Print conversion operator names
3868 * call.c (initialize_reference): Pass -1 for inner parameter to
3871 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3874 * parser.c (cp_parser_base_specifier): Check for an invalid
3875 keyword `typename' and emit an user-friendly error message.
3877 2004-01-15 Geoffrey Keating <geoffk@apple.com>
3880 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
3881 (handle_pragma_implementation): Likewise.
3883 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3886 * typeck.c (build_class_member_access_expr): Allow to access members
3887 of the currently open class.
3888 (finish_class_member_access_expr): Likewise.
3890 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
3893 * name-lookup.c (validate_nonmember_using_decl): Take scope and
3894 name by value, instead of computing them.
3895 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
3896 arguments. Pass them to validate_nonmember_using_decl.
3897 * name-lookup.h (do_local_using_decl): Adjust.
3898 (do_toplevel_using_decl): Likewise.
3899 * parser.c (cp_parser_using_declaration): Likewise.
3900 * pt.c (tsubst_expr): Likewise.
3902 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
3906 * name-lookup.c (qualified_lookup_using_namespace): Search
3907 strongly-associated namespaces first, and only then try other
3910 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
3912 * Make-lang.in (c++.srcextra): Dummy entry.
3914 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3917 * parser.c (cp_parser_template_name): Don't try to parse a
3918 conversion-function-id, as it cannot be a template-name.
3919 (cp_parser_simple_type_specifier): Check for invalid template-ids
3920 even after a built-in type.
3922 2004-01-14 Jan Hubicka <jh@suse.cz>
3925 * pt.c (instantiate_decl): Do not increase function_depth.
3927 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
3931 * parser.c (cp_parser_elaborated_type_specifier): Warn about
3932 attributes and discard.
3933 * decl.c (xref_tag): Don't overwite existing attributes with
3936 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3939 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
3940 is no destructor while looking up a BIT_NOT_EXPR.
3942 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
3944 * cxxfilt.c: Remove unused file.
3946 2004-01-14 Jan Hubicka <jh@suse.cz>
3948 Partial fix to PR c++/12850
3949 * decl2.c (mark_used): Do not proactively instantiate templates
3950 when compiling in unit-at-a-time or not optimizing.
3951 * optimize.c (maybe_clone_body): Do not increase function depth.
3953 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3956 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
3958 2004-01-12 Steven Bosscher <stevenb@suse.de>
3961 * parser.c (cp_parser_member_declaration): Any non-type is also
3962 not a class or a function.
3964 2004-01-12 Jason Merrill <jason@redhat.com>
3967 * class.c (build_base_path): Do not mark vtable references as
3969 (build_vtbl_ref_1): Likewise.
3971 2004-01-12 Richard Henderson <rth@redhat.com>
3974 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
3975 (store_init_value): Use it.
3976 * decl.c (check_initializer): Expect full initialization code
3977 from store_init_value.
3978 * init.c (expand_aggr_init_1): Likewise.
3979 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
3981 2004-01-12 Mark Mitchell <mark@codesourcery.com>
3983 * class.c (layout_class_type): For non-POD class types, also copy
3984 the DECL_SIZE and DECL_MODE of fields to the base class type.
3986 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3989 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
3990 calling regenerate_decl_from_template.
3992 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
3995 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
3996 decl-specifier occurring along with a class definition.
3998 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
4000 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
4001 clauses to comments describing declares_class_or_enum.
4002 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
4005 2004-01-12 Jan Hubicka <jh@suse.cz>
4007 * pt.c (for_each_template_parm): Do not check for duplicates.
4008 (for_each_template_parm): Use walk_tree duplicate checking code.
4010 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
4013 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
4014 is error_mark_node, don't add any more decl_specs.
4015 (cp_parser_init_declarator): After committing to a declaration, if
4016 the decl_specifiers start with error_mark_node, issue an error and
4017 change the type to "int".
4019 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
4022 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
4024 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4028 * pt.c (tsubst): Substitution must fail if we are attempting to
4029 create an array with element type that is an abstract class type.
4030 * decl.c (cp_finish_decl): Strip pointers and array types recursively
4031 before calling abstract_virtuals_error.
4033 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
4035 * name-lookup.c (qualified_lookup_using_namespace): Consider
4036 strong using directives even if we've already found a binding.
4038 2004-01-09 Mark Mitchell <mark@codesourcery.com>
4040 * cp-tree.h (cxx_expand_expr): Change prototype.
4041 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
4043 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4046 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
4047 looking into them recursively. They can be there because of the
4048 new __offsetof__ extension.
4050 2004-01-07 Zack Weinberg <zack@codesourcery.com>
4052 * parser.c (cp_parser_save_member_function_body): Mark the
4055 2004-01-05 Mark Mitchell <mark@codesourcery.com>
4058 * class.c (build_clone): Copy type attributes from the original
4059 function to the clone.
4062 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
4063 references as constant.
4066 * parser.c (cp_parser_explicit_instantiation): Improve error
4068 (cp_parser_require): Improve indication of the error location.
4071 * parser.c (cp_parser_class_head): Reorder logic to check for
4072 invalid qualification.
4074 2004-01-04 Mark Mitchell <mark@codesourcery.com>
4077 * name-lookup.c (lookup_using_namespace): Remove spacesp
4079 (unqualified_namespace_lookup): Likewise.
4080 (lookup_qualified_name): Adjust accordingly.
4081 (lookup_name_real): Likewise.
4082 (lookup_arg_dependent): Do not eliminate the namespace of the
4083 functions found by unqualified name lookup unless that is the
4086 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
4088 * semantics.c (push_deferring_access_checks): Fix format.
4089 (resume_deferring_access_checks): Likewise.
4090 (stop_deferring_access_checks): Likewise.
4091 (pop_deferring_access_checks): Likewise.
4092 (get_deferred_access_checks): Likewise.
4093 (pop_to_parent_deferring_access_checks): Likewise.
4094 (perform_deferred_access_checks): Likewise.
4095 (perform_or_defer_access_check): Likewise.
4097 2004-01-04 Richard Henderson <rth@redhat.com>
4099 * call.c (build_over_call): Don't create a save_expr of an
4100 aggregate, but rather its address.
4102 2004-01-04 Mark Mitchell <mark@codesourcery.com>
4105 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
4106 an offsetof expression.
4108 * parser.c (cp_parser_parameter_declaration): Fix comment.
4111 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
4112 (reference_binding): Set it when appropriate.
4113 (build_temp): New function, split out from ...
4114 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
4115 (initialize_reference): Likewise.
4118 * parser.c (cp_parser): Add in_type_id_in_expr_p.
4119 (cp_parser_new): Initialize it.
4120 (cp_parser_postfix_expression): Set it.
4121 (cp_parser_sizeof_operand): Likewise.
4122 (cp_parser_parameteR_declaration): Do not commit early to tenative
4123 parsers when in_type_id_in_expr_p is set.
4125 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4128 * parser.c (cp_parser_template_argument): Don't call
4129 make_unbound_class_template directly.
4130 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
4131 UNBOUND_CLASS_TEMPLATE tree node.
4133 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
4136 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
4138 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4141 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
4142 (DECL_FUNCTION_TEMPLATE_P): Use it.
4143 (DECL_CLASS_TEMPLATE_P): Likewise.
4144 * parser.c (cp_parser_lookup_name): Add is_template parameter.
4145 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
4146 (cp_parser_template_name): Likewise.
4147 (cp_parser_elaborated_type_specifier): Likewise.
4148 (cp_parser_namespace_name): Likewise.
4149 (cp_parser_class_name): Likewise.
4150 (cp_parser_lookup_name_simple): Likewise.
4152 See ChangeLog.3 for earlier changes.