1 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
3 * cp-tree.h (build_shared_int_cst): Remove.
4 * tree.c (shared_int_cache): Remove.
5 (build_shared_int_cst): Remove.
6 * class.c (finish_struct_1): Use build_int_cst.
8 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
10 * decl.c (finish_enum): Do not copy value node early, copy
12 * lex.c (cxx_init): Force null_node to be unique.
14 2004-08-19 Joseph S. Myers <jsm@polyomino.org.uk>
17 * pt.c (tsubst_copy, tsubst_copy_and_build): Copy TREE_NO_WARNING
18 from input for MODOP_EXPR.
20 2004-08-18 Mark Mitchell <mark@codesourcery.com>
22 * pt.c (dependent_template_p): Fix typo in commment.
25 * pt.c (dependent_template_p): Treat IDENTIFIER_NODEs as
28 2004-08-17 Mark Mitchell <mark@codesourcery.com>
31 * pt.c (unify): Tidy ARRAY_TYPE handling. Make sure that non-type
32 arguments have the same type as the corresponding parameter.
35 * parser.c (cp_parser_name_lookup_error): If parser->object_scope
36 is set use it for diagnostic purposes.
37 (cp_parser_pseudo_destructor_name): Remove special-case error
41 * semantics.c (expand_or_defer_fn): Honor -fkeep-inline-functions.
44 * cp-tree.h (qualified_name_lookup_error): Add parameter.
45 * name-lookup.c (do_class_using_decl): Restrict set of entities
46 passed to cp_emit_debug_info_for_using more carefully.
47 (lookup_qualified_name): Allow lookup_member to return sets of
49 * parser.c (cp_parser_lookup_name): Add ambiguous_p parameter.
50 (cp_parser_primary_expression): Handle ambiguous lookups.
51 (cp_parser_template_name): Adjust use of cp_parser_lookup_name.
52 (cp_parser_template_argument): Likewise.
53 (cp_parser_elaborate_type_specifier): Likewise.
54 (cp_parser_namespace_name): Likewise.
55 (cp_parser_class_name): Likewise.
56 (cp_parser_lookup_name_simple): Likewise.
57 * pt.c (tsubst_qualified_id): Handle ambiguous results.
58 (tsubst_expr): Likewise.
59 * semantics.c (qualified_name_lookup_error): Add decl paramter.
60 For ambiguous lookups, print candidates.
62 2004-08-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
65 * pt.c (instantiate_pending_templates): Add int parameter. Don't
67 * cp-tree.h (instantiate_pending_templates): Adjust prototype.
68 * decl2.c (finish_file): Adjust call to
69 instantiate_pending_templates.
71 2004-08-15 Roger Sayle <roger@eyesopen.com>
73 * call.c (build_vfield_ref, build_call, build_conditional_expr,
74 convert_arg_to_ellipsis, build_x_va_arg, build_over_call,
75 build_java_interface_fn_ref, build_special_member_call,
76 build_new_method_call, initialize_reference): Replace calls to
77 build with calls to buildN.
78 * class.c (build_base_path, convert_to_base_statically,
79 build_vfn_ref, instantiate_type, dfs_accumulate_vtbl_inits,
80 build_vtbl_initializer): Likewise.
81 * cp-gimplify.c (genericize_try_block, genericize_catch_block,
82 gimplify_if_stmt, cp_genericize_r): Likewise.
83 * cvt.c (convert_to_void): Likewise.
84 * decl.c (check_initializer, finish_constructor_body,
85 finish_destructor_body): Likewise.
86 * error.c (dump_expr): Likewise.
87 * except.c (build_exc_ptr, expand_start_catch_block, build_throw):
89 * init.c (perform_member_init, expand_virtual_init,
90 expand_cleanup_for_base, build_init, expand_default_init,
91 build_offset_ref, decl_constant_value, build_new, build_new_1,
92 build_vec_delete_1, build_vec_init, build_delete,
93 push_base_cleanups, build_vec_delete): Likewise.
94 * mangle.c (write_integer_cst): Likewise.
95 * method.c (thunk_adjust, do_build_copy_constructor,
96 do_build_assign_ref): Likewise.
97 * pt.c (lookup_template_function, tsubst, tsubst_copy_and_build,
98 unify, build_non_dependent_expr): Likewise.
99 * rtti.c (build_headof, build_typeid, ifnonnull,
100 build_dyanmic_cast_1, tinfo_base_init): Likewise.
101 * semantics.c (begin_compound_stmt, finish_call_expr,
102 finish_pseudo_destructor_expr, finish_id_expression,
103 simplify_aggr_init_expr, finalize_nrv_r): Likewise.
104 * tree.c (build_target_expr, build_cplus_new, array_type_nelts_top,
105 array_type_nelts_total, stabilize_call): Likewise.
106 * typeck.c (decay_conversion, build_class_member_access_expr,
107 lookup_destructor, build_ptrmemfunc_access_expr, build_array_ref,
108 get_member_function_from_ptrfunc, build_binary_op, pointer_diff,
109 build_x_unary_op, build_unary_op, unary_complex_lvalue,
110 build_compound_expr, build_modify_expr, expand_ptrmemfunc_cst,
111 check_return_expr): Likewise.
112 * typeck2.c (split_nonconstant_1, split_nonconstant_init_1,
113 split_nonconstant_init, store_init_value, build_m_component_ref):
116 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
118 * call.c (convert_class_to_reference,
119 build_user_type_conversion_1, convert_like_real,
120 build_java_interface_fn_ref, build_special_member_call): Use
122 * class.c (build_vtbl_initializer): Likewise.
123 * cp-gimplify.c (cp_gimplify_expr): Likewise.
124 * cvt.c (cp_convert_to_pointer): Likewise.
125 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
126 * decl2.c (start_static_initialization_or_destruction,
127 generate_ctor_or_dtor_function): Likewise.
128 * except.c (build_throw): Likewise.
129 * lex.c (cxx_init): Likewise.
130 * mangle.c (write_integer_cst): Likewise.
131 * rtti.c (build_headof, get_tinfo_decl_dynamic,
132 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
133 get_pseudo_ti_init): Likewise.
134 * search.c (get_dynamic_cast_base_type): Likewise.
135 * tree.c (build_shared_int_cst): Likewise.
137 2004-08-12 Mark Mitchell <mark@codesourcery.com>
140 * class.c (count_depth_data): New type.
141 (dfs_depth_post): New function.
142 (dfs_depth_q): Likewise.
143 (find_final_overrider_data_s): Change type of vpath.
145 (dfs_find_final_overrider_1): New function.
146 (dfs_find_final_overrider): Use it.
147 (dfs_find_final_overrider_q): Adjust use of vpath.
148 (dfs_find_final_overrider_post): Likewise.
149 (find_final_overrider): Use dfs_depth. Allocate and deallocate
152 2004-08-12 Jan Beulich <jbeulich@novell.com>
154 * parser.c (cp_parser_asm_definition): Properly consume scope operator
155 tokens preceding the clobbers. Don't check for scope operator
156 following inputs. Simplify inputs handling to match that now used for
159 2004-08-11 Mark Mitchell <mark@codesourcery.com>
162 * except.c (build_throw): Allocate cleanup_type and the function
163 for __cxa_throw separately.
166 * call.c (standard_conversion): Do not accept conversions between
167 pointers to members if the class types are unrelated.
170 * parser.c (cp_parser_builtin_offsetof): Cast to "const volatile
171 char &" instead of just "char &".
174 * pt.c (tsubst): Just return the unknown_type_node.
176 2004-08-11 Mark Mitchell <mark@codesourcery.com>
179 * parser.c (cp_parser_class_specifier): Robustify.
182 * pt.c (tsubst_copy_and_build): Complain about invalid
186 * pt.c (tsubst_default_argument): Clear out current_class_ptr and
187 current_class_ref while tsubsting.
189 2004-08-10 Mark Mitchell <mark@codesourcery.com>
192 * parser.c (cp_parser_init_declarator): Robustify.
194 2004-08-06 Richard Sandiford <rsandifo@redhat.com>
196 * typeck2.c (process_init_constructor): Guard the missing field warning
197 with warn_missing_field_initializers rather than extra_warnings.
199 2004-08-06 Paolo Bonzini <bonzini@gnu.org>
201 * class.c (instantiate_type) <ENTRY_VALUE_EXPR>: Do not handle.
203 2004-08-05 Mark Mitchell <mark@codesourcery.com>
205 * decl.c (start_preparsed_function): Move determine_visibility
207 * decl2.c (determine_visibility): Incorporate dllexport testing.
209 2004-08-05 Geoffrey Keating <geoffk@apple.com>
211 * g++spec.c (lang_specific_driver): An -Xlinker or -Wl, option
212 means that libstdc++ is needed.
214 2004-08-05 Nathan Sidwell <nathan@codesourcery.com>
216 * cvt.c (cp_convert_to_pointer): Adjust force_fit_type call.
218 2004-08-04 Geoffrey Keating <geoffk@apple.com>
220 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_ASSEMBLER_NAME rather
221 than passing it as a parameter to rest_of_decl_compilation.
222 * decl2.c (grokfield): Use set_user_assembler_name.
224 2004-08-04 Nathan Sidwell <nathan@codesourcery.com>
226 * decl.c (complete_array_type): Don't gratuitously copy
227 maxindex. Its type is always set.
229 2004-08-04 Paul Brook <paul@codesourcery.com>
231 * Make-lang.in (cp/semantics.o, cp/optimize.o): Depend on TARGET_H.
232 * cp-tree.h (struct language_function): Rename x_dtor_label to
234 (dtor_label): Rename ...
235 (cdtor_label): ... to this.
236 * decl.c (begin_constructor_body): Remove.
237 (check_special_function_return_type): Maybe change the return type.
238 (grokdeclarator): Pass the class type.
239 (start_preparsed_function): Constructors may need a return label.
240 (finish_constructor_body, finish_destructor_body): Set the return
242 (begin_function_body): Don't call begin_constructor_body.
243 (finish_function): Don't warn for constructors or destructors.
244 (implicitly_declare_fn): Maybe change the return type.
245 * optimize.c: Include target.h.
246 (maybe_clone_body): Remap the function result.
247 * semantics.c: Include target.h.
248 (finish_return_stmt): Maybe jump to return label for constructors.
250 2004-08-03 Mark Mitchell <mark@codesourcery.com>
252 * class.c (build_vtable): Do not set DECL_VISIBILITY here.
253 (check_field_decls): Or here.
254 (check_methods): Or here.
255 (initialize_array): Don't mess with DECL_CONTEXT.
256 * cp-tree.h (start_decl): Adjust prototype.
257 (determine_visibility): New function.
258 * decl.c (duplicate_decls): Remove checks for hidden "operator
260 (build_library_fn_1): Give all library functions default
262 (start_decl): Add pop_scope_p parameter. Tidy.
263 (cp_finish_decl): Do not pop scopes here. Call
264 determine_visibility for variable definitions.
265 (start_preparsed_function): Call determine_visibility.
266 * decl2.c (determine_visibility): New function.
267 * method.c (use_thunk): Fix formatting.
268 * parser.c (cp_parser_condition): Adjust calls to start_decl.
269 (cp_parser_init_declarator): Likewise.
270 * pt.c (instantiate_decl): Always call pop_nested_class.
271 * rtti.c (get_tinfo_decl): Do not set DECL_VISIBILITY.
272 (tinfo_base_init): Likewise.
274 2004-08-02 Mark Mitchell <mark@codesourcery.com>
277 * name-lookup.c (validate_nonmember_using_decl): Robustify.
279 2004-08-01 Mark Mitchell <mark@codesourcery.com>
282 * name-lookup.c (decl_namespace): Remove.
283 (current_decl_namespace): Use decl_namespace_context instead of
285 (push_decl_namespace): Likewise.
286 (arg_assoc_class): Likewise.
287 (arg_assoc_type): Likewise.
288 * pt.c (check_specialization_namespace): New function.
289 (maybe_process_partial_specialization): Use it.
290 (register_specialization): Likewise.
293 * cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): New macro.
294 * call.c (null_ptr_cst_p): Handle variables with constant
296 * pt.c (convert_nontype_argument): Use
297 DECL_INTEGRAL_CONSTANT_VAR_P.
298 * semantics.c (finish_id_expression): Likewise.
301 * decl.c (duplicate_decls): Reject duplicate namespace
305 * typeck.c (build_ptrmemfunc): Loosen assertion.
307 2004-08-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
309 * call.c (z_candidate::template_decl): Rename from template.
310 (add_template_candidate_real): Adjust member reference.
313 2004-07-29 Mark Mitchell <mark@codesourcery.com>
315 * cp-tree.h (IDENTIFIER_REPO_CHOSEN): Define.
316 (lang_decl_flags): Narrow the width of "languages". Add
318 (DECL_NEEDED_P): Remove.
319 (FOR_EACH_CLONE): New macro.
320 (DECL_REPO_AVAILABLE_P): Likewise.
321 (DECL_TINFO_P): Likewise.
322 (set_linkage_according_to_type): Declare.
323 (import_export_vtable): Remove.
324 (import_export_tinfo): Likewise.
325 (mark_needed): New function.
326 (decl_needed_p): Likewise.
327 (note_vauge_linkage_fn): Likewise.
328 (init_repo): Change prototype.
329 (repo_template_used): Remove.
330 (repo_template_instantiated): Likewise.
331 (repo_emit_p): New function.
332 (repo_export_class_p): Likewise.
333 (no_linkage_check): Change prototype.
334 * class.c (set_linkage_according_to_type): New function.
335 (build_vtable): Use it. Do not call import_export_vtable. Set
336 DECL_IGNORED_P if appropriate.
337 * decl.c (duplicate_decls): Preserve DECL_REPO_AVAILABLE_P.
338 (make_rtL_for_nonlocal_decls): Check for template instantiations
340 (grokfndecl): Adjust call to no_linkage_check.
341 (set_linkage_for_static_data_member): New function.
342 (grokvardecl): Use it. Adjust call to no_linkage_check.
343 (grokdeclarator): Use set_linkage_for_static_data_member.
344 * decl2.c (note_vague_linkage_fn): New function.
345 (note_vague_linkage_var): Likewise.
346 (finish_static_data_member_decl): Use it.
347 (import_export_vtable): Remove.
348 (import_export_class): Use repo_export_class_p.
349 (var_finalized_p): Simplify.
350 (maybe_emit_vtables): Simplify.
351 (mark_needed): New function.
352 (decl_needed_p): Likewise.
353 (import_export_decl): Add documentation and consistency checks.
354 Use repo_emit_p. Handle virtual tables and RTTI information
356 (import_export_tinfo): Remove.
357 (write_out_vars): Call import_export_decl.
358 (cxx_callgraph_analyze_expr): Ensure that all vtables are emitted
360 (finish_file): Use decl_needed_p. Do not call import_export_decl
361 for undefined static data members. Do not warn about undefined
362 inlines when using a repository.
363 (mark_used): Use note_vague_linkage_fn. Always defer template
365 * lex.c (cxx_init): Adjust call to init_repo. Always set
367 * method.c (synthesize_method): Remove unncessary
368 import_export_decl call.
369 (implicitly_declare_fn): Use set_linkage_according_to_type.
370 * optimize.c (maybe_clone_body): Use FOR_EACH_CLONE.
371 * pt.c (instantiate_class_template): Don't redundantly add classes
372 to keyed_classes. Don't call repo_template_used.
373 (tsubst_decl): Set DECL_INTERFACE_KNOWN for instantiations of
374 templates with internal linkage.
375 (check_instantiated_args): Adjust call to no_linkage_check.
376 (instantiate_template): Use FOR_EACH_CLONE.
377 (mark_definable): New function.
378 (mark_decl_instantiated): Use it.
379 (do_decl_instantiation): Adjust tests for explicit instantiation
380 after "extern template".
381 (instantiate_class_member): Do not use repo_template_instantiated.
382 (do_type_instantiation): Simplify.
383 (instantiate_decl): Use mark_definable. Check repo_emit_p.
385 * repo.c (repo_get_id): Remove.
386 (original_repo): Remove.
387 (IDENTIFIER_REPO_USED): Remove.
388 (IDENTIFIER_REPO_CHOSEN): Remove.
389 Remove all #if 0'd code.
390 (repo_template_used): Remove.
391 (repo_template_instantiated): Remove.
392 (temporary_obstack_initialized_p): New variable.
393 (init_repo): Register with lang_post_pch_load. Avoid creating
394 identifiers unnecessarily. Don't use original_repo. Close the
396 (reopen_repo_file_for_write): Not here.
397 (finish_repo): Always write out a new repository file.
398 (repo_emit_p): New function.
399 (repo_export_class_p): Likewise.
400 * rtti.c (get_tinfo_decl): Use set_linkage_according_to_type.
401 (involves_incomplete_p): New function.
402 (tinfo_base_init): Use it.
403 (ptr_initializer): Remove non_public_ptr parameter.
404 (ptm_initializer): Likewise.
405 (get_pseudo_ti_init): Likewise.
406 (unemitted_tinfo_decl_p): Remove.
407 (emit_tinfo_decl): Use import_export_decl.
408 * semantics.c (expand_body): Move updates of static_ctors and
410 (expand_or_defer_fn): ... here.
411 * tree.c (no_linkage_check): Add relaxed_p parameter.
413 2004-07-28 Eric Christopher <echristo@redhat.com>
415 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
417 2004-07-28 Nathan Sidwell <nathan@codesourcery.com>
419 * cp-tree.h (struct tree_pair_s): New.
420 (typedef tree_pair_p): New.
421 (DEF_VEC_O(tree_pair_s)): New.
422 (struct lang_type_class): Make vcall_indices a VEC(tree_pair_s).
423 (CLASSTYPE_VCALL_INDICES): Update documentation.
424 * class.c (get_vcall_index): Adjust.
425 (add_vcall_offset): Adjust.
427 2004-07-27 Kelley Cook <kcook@gcc.gnu.org>
429 * pt.c, typeck.c: Remove spurious carriage returns.
431 2004-07-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
434 * pt.c (coerce_template_template_parms) <PARM_DECL case>: Only check
435 when the type of ARG is not dependent.
437 2004-07-26 Geoffrey Keating <geoffk@apple.com>
439 * g++spec.c (LIBSTDCXX_PROFILE): Default to LIBSTDCXX.
440 (lang_specific_driver): If the C++ or math library options don't
441 start with '-l', don't count them as added libraries.
443 2004-07-26 Nathan Sidwell <nathan@codesourcery.com>
445 * decl.c (xref_basetypes): Adjust base access vector creation.
446 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Adjust base
448 * search.c (dynamic_cast_base_recurse, dfs_access_in_type): Likewise.
450 2004-07-26 Niall Douglas <s_fsfeurope2@nedprod.com>
451 Brian Ryner <bryner@brianryner.com>
455 * class.c (check_field_decls): Apply hidden visibility if
456 -fvisibility-inlines-hidden and inlined unless otherwise specified
457 (build_vtable): Set vtable visibility to class visibility.
458 (check_field_decls): Default static member visibility to class
460 (check_methods): Default method visibility to class visibility.
461 * cp-tree.h: Added CLASSTYPE_VISIBILITY and
462 CLASSTYPE_VISIBILITY_SPECIFIED macro.
463 * decl.c (duplicate_decls): New logic for merging definition decls
464 with declaration decls. Added ignore & warning when non default
465 applied to global operator new or delete.
466 * method.c, optimize.c, rtti.c: Added setting of VISIBILITY_SPECIFIED
467 wherever VISIBILITY was changed
468 * rtti.c (get_tinfo_decl): Set typeinfo visibility to class
470 (tinfo_base_init): Set typeinfo name visibility to class visibility.
472 2004-07-25 Bernardo Innocenti <bernie@develer.com>
474 * decl.c: Rename all identifiers named `class' to `cl'.
475 * cp-tree.h: Likewise.
477 2004-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
479 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Use GGC_CNEW.
480 * typeck2.c (abstract_virtuals_error): Use GGC_NEW.
481 * name-lookup.c (binding_entry_make): Use GGC_NEW.
482 (binding_table_construct): Use GGC_CNEWVEC.
483 (binding_table_new): Use GGC_NEW.
484 (cxx_binding_make): Likewise.
485 (begin_scope): Likewise.
486 (push_to_top_level): Use GCC_CNEW.
487 * parser.c (cp_token_cache_new): Likewise.
488 (cp_token_cache_push_token): Likewise.
489 (cp_lexer_new_main): Likewise.
490 (cp_lexer_new_from_tokens): Likewise.
491 (cp_parser_context_new): Likewise.
492 (cp_parser_new): Likewise.
493 (cp_lexer_new_from_tokens): Use GGC_NEWVEC.
494 * lex.c (cxx_make_type): Use GGC_CNEW.
495 (retrofit_lang_decl): Use GGC_NEWVAR.
496 (cxx_dup_lang_specific_decl): Likewise.
497 (copy_lang_type): Likewise.
498 * decl.c (use_label): Use GGC_NEW instead of ggc_alloc.
499 (save_function_data): Likewise.
500 (lookup_label): Use GGC_CNEW instead of ggc_alloc_cleared.
501 (cxx_push_function_context): Likewise.
503 2004-07-25 Richard Henderson <rth@redhat.com>
505 * decl.c (start_preparsed_function): Set DECL_ARTIFICIAL and
506 DECL_IGNORED_P on RESULT_DECL.
507 * semantics.c (finalize_nrv): Copy them too.
509 2004-07-23 Nathan Sidwell <nathan@codesourcery.com>
511 * search.c (lookup_conversion_operator): Avoid two loops.
512 (add_conversions): Remove.
513 (check_hidden_convs, split_conversions,
514 lookup_conversions_r): New.
515 (lookup_conversions): Use lookup_conversions_r.
517 2004-07-22 Nathan Sidwell <nathan@codesourcery.com>
519 * pt.c (get_template_base): Check type is completable.
521 2004-07-21 Eric Christopher <echristo@redhat.com>
523 * decl.c (poplevel): Inline unused variable checking.
526 2004-07-21 Paolo Bonzini <bonzini@gnu.org>
528 * typeck.c (build_binary_op): Do not use RDIV_EXPR for
531 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
534 * pt.c (check_explicit_specialization): Remove extension to accept
535 specializations without template headers. Fall-through to normal
538 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
541 * pt.c (determine_specialization): New parameter template_count.
542 Disambiguate between member templates and member functions counting
543 the template headers.
544 (check_explicit_specialization): Update caller.
545 (tsubst_friend_function): Likewise.
547 2004-07-20 Steven Bosscher <stevenb@suse.de>
549 * cp-tree.def (TINST_LEVEL): Make it an 'x' node.
550 * cp-tree.h (tinst_level_t): New tree type.
551 (union lang_tree_node): Handle it.
552 (TINST_LOCATION): New accessor macro.
553 (make_tinst_level): New prototype.
554 * cp-lang.c (cp_tree_size): Handle TINST_LEVEL.
555 * decl.c (cp_tree_node_structure): Likewise.
556 * error.c (print_instantiation_full_context): Use TINST_LOCATION.
557 (print_instantiation_partial_context): Likewise.
558 * pt.c (pop_tinst_level): Likewise.
559 (push_tinst_level): Use make_tinst_level.
560 * tree.c (make_tinst_level): New function.
561 (cp_walk_subtrees): Walk TINST_DECL for a TINST_LEVEL node.
563 2004-07-20 Mark Mitchell <mark@codesourcery.com>
565 * parser.c (cp_parser_simple_type_specifier): Fix typo.
568 * parser.c (cp_parser_simple_type_specifier): Do not record usage
569 of globally-qualified names.
571 2004-07-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
574 * error.c (dump_type) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Output
577 2004-07-19 Mark Mitchell <mark@codesourcery.com>
580 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
581 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
582 * class.c (add_implicitly_declared_members): Use
583 CLASSTYPE_LAZY_ASSIGNMENT_OP.
584 * method.c (lazily_declare_fn): Clear
585 CLASSTYPE_LAZY_ASSIGNMENT_OP.
586 * search.c (lookup_fnfields_1): Check it.
588 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
590 * cp-tree.h (vec_binfo_member): Remove.
591 * tree.c (vec_binfo_member): Remove.
593 * cp-tree.h (struct lang_type_class): Remove vfields field.
594 (CLASSTYPE_VFIELDS): Remove.
595 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
596 * class.c (determine_primary_base): Remove CLASSTYPE_VFIELDS
598 (dfs_modify_vtables): Use TYPE_CONTAINS_VPTR_P.
599 (finish_struct_1): Remove CLASSTYPE_VFIELDS handling.
600 * init.c (dfs_initialize_vtbl_ptrs): Use TYPE_CONTAINS_VPTR_P.
602 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
604 * cp-tree.h (DEF_VEC_P(tree)): Remove here.
605 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
607 (BINFO_LANG_SLOTS): Remove.
608 * tree.c (copy_binfo): Adjust BINFO creation and accessors.
609 * decl.c (xref_basetypes): Adjust BINFO creation and accessors.
610 * class.c (check_bases): Adjust BINFO accessors.
611 (determine_primary_base, finish_struct_bits,
612 maybe_warn_about_overly_private_class, warn_hidden,
613 walk_subobject_offsets, propagate_binfo_offsets, end_of_class,
614 warn_about_ambiguous_bases, get_vfield_name,
615 dump_class_hierarchy_r, build_vtt_inits, accumulate_vtbl_inits,
616 add_vcall_offset_vtbl_entries_r): Likewise.
617 * dump.c (cp_dump_tree): Likewise.
618 * init.c (sort_mem_initializers, expand_member_init, build_delete,
619 push_base_cleanups): Likewise.
620 * method.c (do_build_copy_constructor, do_build_assign_ref,
621 synthesize_exception_spec): Likewise.
622 name-lookup.c (arg_assoc_class): Likewise.
623 * pt.c (instantiate_class_template,
624 get_template_base_recursive): Likewise.
625 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Likewise.
626 * typeck2.c (process_init_constructor): Likewise.
627 * search.c (lookup_base_r, dynamic_cast_base_recurse,
628 dfs_access_in_type, dfs_walk_real, look_for_overrides,
629 types_overlap_p, copied_binfo, original_binfo): Likewise.
630 (binfo_for_vtable): Remove
632 2004-07-20 Steven Bosscher <stevenb@suse.de>
634 * cp-tree.h (struct lang_decl_flags): Unify the template_info and
635 thunk_alias, and the access and virtual_offset fields.
636 (THUNK_VIRTUAL_OFFSET, THUNK_ALIAS): Adjust.
637 * decl.c (finish_case_label): Update c_add_case_node call.
639 2004-07-19 Mark Mitchell <mark@codesourcery.com>
641 Revert patch for PR c++/16623.
643 2004-07-19 Kelley Cook <kcook@gcc.gnu.org>
645 * except.c: Remove two spurious carriage returns.
647 2004-07-19 Mark Mitchell <mark@codesourcery.com>
650 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
651 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
652 * class.c (add_implicitly_declared_members): Use
653 CLASSTYPE_LAZY_ASSIGNMENT_OP.
654 * method.c (lazily_declare_fn): Clear
655 CLASSTYPE_LAZY_ASSIGNMENT_OP.
656 * search.c (lookup_fnfields_1): Check it.
658 2004-07-19 Nathan Sidwell <nathan@codesourcery.com>
660 * class.c (add_method): Delay adding the slot until the end.
661 (determine_primary_base): Adjust VEC_iterate invokation.
662 (resort_type_method_vec, finish_struct_methods, warn_hidden,
663 walk_subobject_offsets, end_of_class, warn_about_ambiguous_bases,
664 build_vtbl_initializer): Likewise.
665 * init.c (sort_mem_initializers, build_delete, push_base_cleanups,
666 build_vbase_delete): Likewise.
667 * method.c (do_build_copy_constructor): Likewise.
668 * name-lookup.c (new_class_binding, print_binding_level,
669 poplevel_class, store_class_bindings, push_to_top_level,
670 pop_from_top_level): Likewise.
671 * pt.c (check_explicit_specialization): Likewise.
672 * search.c (lookup_conversion_operator, lookup_fnfields_1,
673 get_pure_virtuals, add_conversions, dfs_check_overlap,
674 binfo_for_vbase): Likewise.
676 2004-07-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
679 * pt.c (unify) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Use only
680 innermost set of template arguments during deduction. Simplify.
682 2004-07-19 Joseph S. Myers <jsm@polyomino.org.uk>
684 * typeck.c (build_modify_expr, build_x_modify_expr): Set
685 TREE_NO_WARNING on assignments with an operator other than '='.
687 2004-07-10 Steven Bosscher <stevenb@suse.de>
688 Joseph S. Myers <jsm@polyomino.org.uk>
690 * cp-tree.h (C_SET_EXP_ORIGINAL_CODE): Remove.
691 * decl2.c (grokfield): Don't check current_class_depth via
692 unused TREE_COMPLEXITY.
693 * semantics.c (finish_parenthesized_expr): Set TREE_NO_WARNING
694 to avoid the missing parentheses warning.
695 Don't set C_SET_EXP_ORIGINAL_CODE.
697 2004-07-18 Mark Mitchell <mark@codesourcery.com>
699 * tree.c (no_linkage_helper): Remove.
700 (no_linkage_check): Don't use walk_tree_without_duplicates.
702 * mangle.c (write_expression): Issue a sorry for zero-operand
705 2004-07-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
708 * init.c (build_offset_ref): Build SCOPE_REF with non-null
709 TREE_TYPE for non-dependent names.
710 * typeck.c (build_x_unary_op): Handle non-dependent SCOPE_REF.
711 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
712 unknown_type_node as its TREE_TYPE.
713 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
714 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
715 (dump_expr) <SCOPE_REF case>: Likewise.
717 2004-07-17 Jason Merrill <jason@redhat.com>
720 * call.c (type_passed_as): Make the invisible reference type
722 * cp-gimplify.c (gimplify_cleanup_stmt): Rename to
723 cp_genericize_r. Handle invisible reference lowering.
724 (is_invisiref_parm): New fn.
725 (cp_genericize): Adjust the types of invisible reference parms.
726 Don't repeat the walk for clones.
727 * decl.c (store_parm_decls): Don't generate any code for clones.
729 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
731 * cp-tree.h (builtin_function): Declare.
733 2004-07-16 Mark Mitchell <mark@codesourcery.com>
735 * class.c (finish_struct_methods): Remove unncessary code.
736 (add_implicitly_declared_members): Create declarations for default
737 constructors and copy constructors lazily.
738 * cp-tree.h (lang_type_class): Remove lazy_default_ctor and
740 (CLASSTYPE_LAZY_DEFAULT_CTOR): New macro.
741 (CLASSTYPE_LAZY_COPY_CTOR): Likewise.
742 * decl2.c (check_classfn): Robustify.
743 (locate_dtor): Handle empty CLASSTYPE_METHOD_VEC.
744 (locate_ctor): Handle lazy default constructors.
745 (locate_copy): Handle lazy copy constructors.
746 (implicitly_declare_fn): Make sure we're looking at the
747 TYPE_MAIN_VARIANT for a class before creating functions. Don't
748 set TYPE_HAS_CONSTRUCTOR.
749 (lazily_declare_fn): New function.
750 * name-lookup.c (constructor_name_full): Simplify.
751 * search.c (lookup_fnfields_1): Lazily create methods, as
753 (lookup_for_overrides): Handle empty CLASSTYPE_METHOD_VEC.
755 2004-07-16 Steven Bosscher <stevenb@suse.de>
757 * cp-tree.h (struct lang_type): Don't have three GTY options on a
760 2004-07-16 Richard Henderson <rth@redhat.com>
762 * cp-lang.c (LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING): Die.
763 * cp-tree.h (cp_copy_res_decl_for_inlining): Remove.
764 * tree.c (cp_copy_res_decl_for_inlining): Remove.
766 2004-07-16 Nathan Sidwell <nathan@codesourcery.com>
768 * class.c (finish_struct_bits): Use for loop.
769 (propagate_binfo_offsets): Do primary binfo outside of loop.
772 * dump.c (cp_dump_tree): Don't dump the bases if there's no
775 * pt.c (tsubst) <TREE_BINFO case>: We should never get here.
777 2004-07-15 Mark Mitchell <mark@codesourcery.com>
779 * cp-tree.h (lang_type_class): Remove has_real_assign_ref and
780 has_abstract_assign_ref. Make methods a VEC(tree) *.
781 (TYPE_HAS_CONST_ASSIGN_REF): Add documentation.
782 (CLASSTYPE_CONSTRUCTORS): Adjust for changes to CLASSTYPE_METHOD_VEC.
783 (CLASSTYPE_DESTRUCTORS): Likewise.
784 (TYPE_HAS_REAL_ASSIGN_REF): Remove.
785 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
786 (add_method): Change prototoype.
787 * class.c (add_method): Remove error_p parameter. Adjust for
788 changes to CLASSTYPE_METHOD_VEC.
789 (handle_using_decl): Adjust call to add_method.
790 (maybe_warn_about_overly_private_class): Adjust for
791 changes to CLASSTYPE_METHOD_VEC.
792 (resort_type_method_vec): Likewise.
793 (finish_struct_methods): Likewise.
794 (check_for_override): Likewise.
795 (warn_hidden): Likewise.
796 (add_implicitly_declared_members): Defer creation of assignment
797 operators. Adjust call to add_method.
798 (clone_function_decl): Adjust call to add_method.
799 (check_bases_and_members): Don't set TYPE_HAS_REAL_ASSIGN_REF.
800 (finish_struct_1): Use CLASSTYPE_DESTRUCTORS.
801 * decl.c (grok_special_member_properties): Don't set
802 TYPE_HAS_ABSTRACT_ASSIGN_REF.
803 * decl2.c (check_classfn): Adjust for
804 changes to CLASSTYPE_METHOD_VEC.
805 * method.c (locate_dtor): Use CLASSTYPE_DESTRUCTORS.
806 (locate_ctor): Use CLASSTYPE_CONSTRUCTORS.
807 (locate_copy): Adjust for changes to CLASSTYPE_METHOD_VEC.
808 (implicitly_declare_fn): Set DECL_SOURCE_LOCATION. Do not call
810 * pt.c (check_explicit_specialization): Adjust for
811 changes to CLASSTYPE_METHOD_VEC.
812 (instantiate_class_template): Do not set
813 TYPE_HAS_ABSTRACT_ASSIGN_REF.
814 * ptree.c (cxx_print_type): Don't try to print
815 CLASSTYPE_METHOD_VEC.
816 * rtti.c (emit_support_tinfos): Use CLASSTYPE_DESTRUCTORS.
817 * search.c (lookup_field_r): Adjust for
818 changes to CLASSTYPE_METHOD_VEC.
819 (lookup_fnfields): Likewise.
820 (lookup_conversion_operator): Likewise.
821 (lookup_fnfields_1): Likewise. Create assignment operators
823 (look_for_overrides_here): Adjust for
824 changes to CLASSTYPE_METHOD_VEC.
825 (add_conversions): Likewise.
826 * semantics.c (finish_member_declaration): Adjust call to add_method.
828 2004-07-15 Jason Merrill <jason@redhat.com>
830 * cp-lang.c (cxx_types_compatible_p): To the middle-end,
831 references and pointers are compatible.
833 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
835 * decl.c (xref_basetypes): Refactor.
836 * tree.c (copy_base_binfos): Replace with ...
837 (copy_binfo): ... this. Deep copy the given binfo, (not the just
838 bases of the given base).
839 * cp-tree.h (copy_base_binfo): Remove.
840 (copy_binfo): Declare.
842 2004-07-15 Mark Mitchell <mark@codesourcery.com>
844 * name-lookup.c (set_inherited_value_binding_p): Add class_type
846 (get_class_binding): Adjust.
847 (push_class_level_binding): Don't use set_inherited_value_binding_p.
849 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
851 * class.c (finish_struct_bits): Don't set TYPE_HAS_CONVERSION here.
852 * decl.c (xref_basetypes): Set it here.
854 * class.c (check_bases): Don't set CLASSTYPE_NON_AGGREGATE here.
855 Don't check for incomplete base.
856 (get_vfield_name): Simplify while loop.
857 * decl.c (xref_basetypes): Set CLASSTYPE_NON_AGGREGATE here.
859 2004-07-14 Mark Mitchell <mark@codesourcery.com>
861 * lex.c (cxx_make_type): Remove call to get_pointer_type.
863 * cp-tree.h (IDENTIFIER_VALUE): Remove.
864 (BINFO_PUSHDECLS_MARKED): Likewise.
865 (maybe_inject_for_scope_var): Likewise.
866 (push_class_decls): Likewise.
867 * name-lookup.h (push_class_binding): Remove.
868 (innermost_non_namespace_value): New function.
869 (outer_binding): Likewise.
870 * class.c (add_method): Push bindings before adding to
872 (restore_class_cache): Do not restore class_shadowed.
873 (pushclass): Do not add USING_DECLs. Do not call
875 * config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c.
876 * decl.c (pushdecl): Use outer_binding.
877 (poplevel): Set the scope for an out-of-scope for-loop declaration
879 (cp_finish_decl): Don't call maybe_inject_for_scope_var.
880 * name-lookup.c (new_class_binding): New function.
881 (push_binding): Use it.
882 (pushdecl): Use innermost_non_namespace_value.
883 (maybe_inject_for_scope_var): Remove.
884 (push_class_binding): Remove.
885 (set_inherited_value_binding_p): New function.
886 (get_class_binding): New function.
887 (push_class_level_binding): Assert that the current_class_type is
889 (outer_binding): New function.
890 (innermost_non_namespace_value): Likewise.
891 (lookup_name_real): Use outer_binding.
892 (lookup_name_current_level): Ignore out-of-scope variables.
893 * pt.c (check_template_shadow): Use innermost_non_namespace_value.
894 (lookup_template_class): Likewise.
895 * search.c (dfs_push_type_decls): Remove.
896 (dfs_push_decls): Likewise.
897 (setup_class_bindings): Likewise.
898 (lookup_field_1): Handle USING_DECLs from dependent scopes.
899 (marked_pushdecls_p): Remove.
900 (unmarked_pushdecls_p): Remove.
901 (marked_identifiers): Remove.
902 (setup_class_bindings): Remove.
903 (dfs_push_type_decls): Remove.
904 (dfs_push_decls): Remove.
905 (push_class_decls): Remove.
907 2004-07-13 Mark Mitchell <mark@codesourcery.com>
911 * decl.c (grokvardecl): Make declspecs parameter const.
912 (grokdeclarator): Likewise. Adjust accordingly.
913 * decl.h (grokdeclarator): Adjust declaration.
914 * parser.c (cp_parser_init_declarator): Do not clear
915 decl_specifiers->attributes.
917 * cp-tree.h (lang_identifier): Remove class_value.
918 (IDENTIFIER_CLASS_VALUE): Remove.
919 (pop_class_decls): Likewise.
920 (init_search_processing): Likewise.
921 * class.c (handle_using_decl): Use lookup_member, not
922 IDENTIFIER_CLASS_VALUE.
923 (restore_class_cache): New function, split out from ...
924 (pushclass): ... here. Do not call clear_identifier_class_values.
925 (invalidate_class_lookup_cache): Do not clear
926 IDENTIFIER_CLASS_VALUE.
927 (popclass): Do not call pop_class_decls.
928 (maybe_note_name_used_in_class): Do not save names looked up after
929 the class is complete. Use lookup_member, not
930 IDENTIFIER_CLASS_VALUE.
931 * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
932 * decl.c (cxx_init_decl_processing): Do not call
933 init_search_processing.
934 * method.c (do_build_copy_constructor): Remove unnecessary code.
935 (do_build_assign_ref): Likewise.
936 * name-lookup.c (pushdecl): Use lookup_member, not
937 IDENTIFIER_CLASS_VALUE.
938 (set_identifier_type_value_with_scope): Set TREE_TYPE on the
940 (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
941 (push_class_binding): Do not set it.
942 (clear_identifier_class_values): Remove.
943 (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
944 (store_binding): Do not save it.
945 (pop_from_top_level): Do not restore it.
946 * name-lookup.h (cxx_saved_binding): Remove class_value.
947 (clear_identifier_class_values): Remove.
948 * ptree.c (cxx_print_identifier): Do not print
949 IDENTIFIER_CLASS_VALUE.
950 * search.c (search_obstack): Remove.
951 (push_stack_level): Remove.
952 (pop_stack_level): Remove.
953 (search_level): Remove.
954 (search_stack): Remove.
955 (lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
956 (setup_class_bindings): Use IDENTIFIER_MARKED, not
957 IDENTIFIER_CLASS_VALUE.
958 (marked_identifiers): New variable.
959 (push_class_decls): Clear IDENTIFIER_MARKED.
960 (pop_class_decls): Don't call pop_search_level.
961 (init_search_processing): Remove.
963 2004-07-12 Mark Mitchell <mark@codesourcery.com>
965 * cp-tree.h (get_aggr_typedef): Remove.
966 * init.c (get_aggr_typedef): Likewise.
968 * name-lookup.c (push_class_level_binding): Simplify.
970 2004-07-12 Andrew Pinski <apinski@apple.com>
974 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
976 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
979 2004-07-12 Eric Christopher <echristo@redhat.com>
981 * parser.c (cp_parser_class_head): Remove unused variable.
983 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
985 * decl.c (grok_op_properties): Reject [de-]allocation functions
986 declared in a namespace, or declared as static.
988 2004-07-12 Nathan Sidwell <nathan@codesourcery.com>
990 * cp-tree.h (make_binfo): Remove.
991 * decl.c (xref_basetypes): Use make_tree_binfo directly.
992 * tree.h (copy_base_binfos): Likewise.
993 (make_binfo): Remove.
995 * call.c (build_user_type_conversion_1, build_new_op,
996 check_constructor_callable, build_temp,
997 perform_direct_initialization_of_possible): Pass type directly to
998 lookup_fnfields & build_special_member_call.
999 (build_special_member_call): Accept a type, and complete it.
1000 * class.c (finish_stuct_bits): Copy the BINFOs here.
1001 * cvt.c (ocp_convert): Pass type directly to
1002 build_special_member_call.
1003 * decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
1004 (xref_basetypes): Allocate the binfo here. Adjust.
1005 * init.c (build_init, build_new_1): Pass type directly to
1006 build_special_member_call.
1007 * lex.c (cxx_make_type): Do not allocate binfo here.
1008 * name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
1009 * parser.c (cp_parser_class_head): Always call xref_basetypes.
1010 * pt.c (instantiate_class_template): Likewise. Inhibit access
1011 checking for template friends.
1012 * ptree.c (cxx_print_type): Adjust record printing.
1013 * search.c (lookup_base): When taking a type, complete it before
1014 looking for a binfo.
1015 (lookup_member): Delay completing a type.
1016 (push_class_decls): Don't walk an incomplete type.
1017 (lookup_conversions): Likewise.
1018 * semantics.c (finish_stmt_expr_expr): Pass type directly to
1019 build_special_member_call.
1020 * tree.c (copy_base_binfos): Adjust.
1021 (make_binfo): Likewise.
1022 * typeck.c (build_modify_expr): Pass type directly to
1023 build_special_member_call.
1024 * typeck2.c (process_init_constructor): Check a binfo exists.
1025 (build_m_component_ref): Allow accessing an incomplete type.
1026 (build_functional_cast): Pass type directly to
1027 build_special_member_call.
1029 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1032 * config-lang.in (gtfiles): Add typeck2.c.
1033 * Make-lang.in: Tweak typeck2.c dependencies, and add rule for
1035 * cp-tree.h: Declare complete_type_check_abstract.
1036 * typeck2.c (pat_calc_hash, pat_compare,
1037 complete_type_check_abstract): New functions.
1038 (abstract_virtuals_error): If the type is abstract, register the
1039 declaration within abstract_pending_vars for further checks.
1040 Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
1041 * decl.c (cp_finish_decl): Do not strip array types.
1042 (create_array_type_for_decl): Check for abstractness of the element
1044 (complete_vars): Call complete_type_check_abstract.
1045 * class.c (finish_struct): Prepare a list of virtual functions for
1046 template types, and call complete_vars on it to check for abstractness.
1048 2004-07-12 Paolo Bonzini <bonzini@gnu.org>
1050 PR tree-optimization/14107
1051 * decl.c (finish_function): Remove temporary band-aid.
1053 2004-07-11 Mark Mitchell <mark@codesourcery.com>
1055 * call.c (build_operator_new_call): Avoid using push_to_top_level.
1056 (build_new_op): Adjust call to lookup_function_nonclass.
1057 * name-lookup.c (identifier_type_value): Adjust call to
1059 (lookup_name_real): Add block_p parameter.
1060 (lookup_name_nonclass): Adjust call to lookup_name_real.
1061 (lookup_function_nonclass): Likewise.
1062 (lookup_name): Likewise.
1063 * name-lookup.h (lookup_name_real): Change prototype.
1064 (lookup_name_nonclass): Likewise.
1065 * parser.c (cp_parser_lookup_name): Likewise.
1067 * cp-tree.h (saved_scope): Make old_bindings a vector.
1068 (unuse_fields): Remove.
1069 * name-lookup.h (cxx_saved_binding): Define it.
1070 * class.c (pushclass): Don't use unuse_fields.
1071 * name-lookup.c (cxx_saved_binding_make): Remove.
1072 (store_binding): Add new bindings to a vector, using an
1073 accumulator style, rather than adding them to a list.
1074 (store_bindings): Adjust accordingly.
1075 (store_class_bindings): Likewise.
1076 (push_to_top_level): Likewise.
1077 (pop_from_top_level): Likewise.
1078 * optimize.c (maybe_clone_body): Must push_to_top_level and
1079 pop_from_top_level calls outside of loop.
1080 * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope
1081 calls here from cp_parser_late_parsing_default_args.
1082 (cp_parser_save_default_args): Record the class type in which the
1083 function is declared.
1084 (cp_parser_late_parsing_default_args): Do not call
1085 push_nested_class/pop_nested_class.
1086 * search.c (dfs_unuse_fields): Remove.
1087 (unuse_fields): Remove.
1089 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
1091 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
1092 LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
1093 * cp-tree.h (poplevel): Declare.
1094 (set_block): Remove.
1095 * decl.c (set_block): Remove.
1097 2004-07-10 Mike Stump <mrs@apple.com>
1099 * decl2.c (import_export_class): Never export/import vtables
1100 with inline key functions.
1102 2004-07-09 Steven Bosscher <stevenb@suse.de>
1104 * typeck.c (c_expand_asm_operands): Remove.
1106 2004-07-09 Mike Stump <mrs@apple.com>
1108 * typeck.c (build_class_member_access_expr): Skip null deref
1109 warning when we don't dereference it.
1111 2004-07-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1115 * class.c (check_field_decls): Improve -Weffc++ warning: do not
1116 warn for pointers to functions/members, or for classes without
1119 2004-07-08 Mark Mitchell <mark@codesourcery.com>
1121 * name-lookup.h (struct cp_binding_level): Update documentation
1124 2004-07-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1127 * typeck.c (check_return_expr): Improve -Weffc++ warning: handle
1128 returning CALL_EXPR, and non-reference return type.
1130 2004-07-08 Nathan Sidwell <nathan@codesourcery.com>
1132 * name-lookup.c (push_binding): Use VEC_reserve.
1134 2004-07-08 Richard Henderson <rth@redhat.com>
1136 * cp-tree.h (expand_eh_spec_block): Remove.
1138 2004-07-07 Mark Mitchell <mark@codesourcery.com>
1140 * cp-tree.h (saved_scope): Remove x_previous_class_type and
1141 x_previous_class_values; add x_previous_class_level.
1142 (previous_class_type): Remove.
1143 (previous_class_values): Remove.
1144 (previous_class_level): New macro.
1145 * class.c (pushclass): Restore the identifier cache more
1147 (invalidate_class_lookup_cache): Use vector for class_shadowed and
1148 previous_class_values.
1149 * decl.c (poplevel): Likewise.
1150 * name-lookup.c (cxx_binding_init): New function.
1151 (cxx_binding_make): Use it.
1152 (push_binding): For a binding in a class level, use a vector of
1153 cp_class_binding nodes.
1154 (push_binding_level): New function.
1155 (begin_scope): Use it.
1156 (leave_scope): Do not put class binding levels on the free list.
1157 (print_binding_level): Adjust for the fact that class_shadowed is
1159 (poplevel_class): Likewise.
1160 (clear_identifier_class_values): Likewise.
1161 (push_class_level_binding): Likewise.
1162 (set_class_shadows): Remove.
1163 (store_binding): New function.
1164 (store_class_bindings): New function.
1165 (push_to_top_level): Use store_class_bindings as appropriate.
1166 (pop_from_top_level): Use previous_class_level, not
1167 previous_class_type.
1168 * name-lookup.h (cp_class_binding): New type.
1169 (cp_binding_level): Use a vector object for class_shadowed.
1170 (push_binding_level): Declare.
1171 (set_class_shadows): Remove.
1173 2004-07-07 Andrew Pinski <apinski@apple.com>
1175 * class.c (instantiate_type): BUFFER_REF is dead.
1176 * lex.c (init_operators): IN_EXPR is dead.
1178 2004-07-07 Jason Merrill <jason@redhat.com>
1181 * call.c (build_new_op): Give overload warnings for built-in
1184 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
1187 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
1190 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
1192 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
1193 * class.c (build_primary_vtable, check_bases,
1194 determine_primary_base, finish_struct_bits,
1195 maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
1196 get_basefndecls, warn_hidden, walk_subobject_offsets,
1197 build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
1198 layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
1199 finish_struct_1, get_vfield_name, contains_empty_class_p,
1200 dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
1201 dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
1202 add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
1204 * decl.c (xref_basetypes): Likewise.
1205 * dump.c (cp_dump_tree): Likewise.
1206 * error.c (dump_expr): Likewise.
1207 * init.c (sort_mem_initializers, expand_member_init,
1208 push_base_cleanups): Likewise.
1209 * method.c (do_build_copy_constructor, do_build_assign_reg,
1210 synthesize_exception_spec): Likewise.
1211 * name-lookup.c (arg_assoc_class): Likewise.
1212 * pt.c (instantiate_class_template, tsubst,
1213 get_template_base_recursive): Likewise.
1214 * ptree.c (cxx_print_type): Likewise.
1215 * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
1216 * search.c (lookup_base_r, dynamic_cast_base_recurse,
1217 dfs_access_in_type, access_in_type, lookup_field_queue_p,
1218 bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
1219 marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
1220 dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
1221 binfo_for_vtable, copied_binfo, original_binfo): Likewise
1222 * tree.c (copy_base_binfos, make_binfo): Likewise.
1223 * typeck.c (commmon_base_type): Likewise
1224 * typeck2.c (process_init_constructor): Likewise
1226 2004-07-06 Joseph S. Myers <jsm@polyomino.org.uk>
1228 * decl.c (check_tag_decl): Name redeclared type in diagnostic.
1230 2004-07-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1233 * pt.c (convert_nontype_argument): Disallow conversions between
1234 different enumeration types.
1236 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
1238 * cp-tree.h (BINFO_MARKED): Remove.
1239 (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
1240 BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
1241 BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
1242 (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
1243 * class.c (build_base_path): Use BINFO_VIRTUAL_P.
1244 (mark_primary_bases, determine_primary_base, base_derived_from,
1245 dfs_find_final_overrider, dfs_find_final_overrider_q,
1246 dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
1247 dfs_modify_vtables, walk_subobject_offsets,
1248 layout_nonempty_base_or_field, build_base_field,
1249 build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
1250 end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
1251 finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
1252 build_ctor_vtbl_group, accumulate_vtble_inits,
1253 dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
1254 build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
1255 add_vcall_offset_vtbl_entries_1): Likewise.
1256 * decl.c (xref_basetypes): Incomming virtual base indicated by
1258 * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
1259 * init.c (finish_init_stmts, sort_mem_initializers,
1260 emit_mem_initializers, build_vtble_address, expand_member_init,
1261 push_base_cleanups): Likewise.
1262 * method.c (do_build_copy_constructor): Likewise.
1263 * pt.c (instantiate_class_template,
1264 get_template_base_recursive): Likewise.
1265 * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
1266 get_pseudo_ti_desc): Likewise.
1267 * search.c (lookup_base_r, dynamic_cast_base_recurse,
1268 binfo_from_vbase, binfo_via_virtual, copied_binfo,
1269 original_binfo): Likewise.
1270 * semantics.c (finish_base_specifier): Virtualness is indicated
1272 * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
1274 2004-07-06 Mark Mitchell <mark@codesourcery.com>
1277 2004-06-24 Jason Merrill <jason@redhat.com>
1279 * decl.c (grokparms): Give the PARM_DECL reference type if the
1280 parameter is passed by invisible reference.
1282 2004-07-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1284 * cp-lang.c (cp_var_mod_type_p): Add extra arg.
1285 * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
1286 * pt.c (check_instantiated_args, unify): Likewise.
1288 2004-07-05 Phil Edwards <phil@codesourcery.com>
1290 * Make-lang.in (check-c++, lang_checks): Add some comments.
1292 2004-07-05 Zack Weinberg <zack@codesourcery.com>
1294 * cp-mudflap.c: Delete file.
1295 * Makefile.in: Remove all references to cp-mudflap.o.
1297 2004-07-05 Zack Weinberg <zack@codesourcery.com>
1299 * decl.c (cxx_init_decl_processing): Call
1300 build_common_tree_nodes before creating the global NAMESPACE_DECL.
1302 2004-07-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1305 * call.c (build_operator_new_call): Look only at global scope.
1307 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
1309 * call.c (enforce_access): Expect TREE_BINFO.
1310 * class.c (binfo_ctor_vtable): Check TREE_BINFO.
1311 * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
1312 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
1314 (BINFO_LANG_ELTS): Remove.
1315 (BINFO_LANG_SLOTS): New.
1316 (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
1317 (CLASSTYPE_TEMPLATE_INFO): Adjust.
1318 * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
1319 * search.c (lookup_member): Check TREE_BINFO.
1320 * semantics.c (perform_or_defer_access_check): Likewise.
1321 (check_accessibility_of_qualified_id): Check
1322 deferred_access_no_check.
1323 * tree.c (make_binfo): Use make_tree_binfo.
1325 2004-07-04 Mark Mitchell <mark@codesourcery.com>
1327 * method.c (implicitly_declare_fn): Set linkage of generated
1330 2004-07-04 Richard Henderson <rth@redhat.com>
1332 * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
1334 2004-07-03 Scott Brumbaugh <scottb.lists@verizon.net>
1337 * name-lookup.c (push_class_level_binding): Don't pass a
1338 TREE_LIST of ambiguous names to check_template_shadow as it
1339 only handles declarations. Instead, pull the declaration
1342 2004-07-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1345 * pt.c (check_explicit_specialization): Clarify error message.
1347 2004-07-02 Richard Henderson <rth@redhat.com>
1349 * tree.c (cp_unsave_r): Update remap_save_expr call.
1351 2004-07-02 Mark Mitchell <mark@codesourcery.com>
1354 * mangle.c (write_template_arg): Correct mangling.
1357 * decl.c (grokdeclarator): Robustify.
1359 2004-07-01 Richard Henderson <rth@redhat.com>
1361 * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
1362 * method.c (synthesize_method): Don't clear_last_expr.
1363 * name-lookup.c (maybe_push_cleanup_level): Likewise.
1365 2004-07-01 Nick Clifton <nickc@redhat.com>
1367 * decl2.c (import_export_class): Invoke the
1368 import_export_class field in the gcc_target structure if it is not
1371 2004-06-30 Richard Henderson (rth@redhat.com>
1373 * decl.c (start_preparsed_function): Don't set immediate_size_expand.
1374 * method.c (use_thunk): Likewise.
1376 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
1378 * call.c (build_over_call), typeck.c (build_function_call): Call
1379 check_function_arguments instead of check_function_format.
1381 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
1383 * call.c (build_over_call), typeck.c (build_function_call): Update
1384 calls to check_function_format.
1386 2004-06-30 Richard Henderson <rth@redhat.com>
1388 * call.c (build_over_call): Use __builtin_memcpy for copying
1389 CLASS_AS_BASE rather than funny casting.
1391 2004-06-30 Richard Henderson <rth@redhat.com>
1393 * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
1394 TYPE_SIZE_UNIT of full_type.
1396 2004-06-30 Per Bothner <per@bothner.com>
1398 Conditionally compile support for --enable-mapped_location.
1399 * decl.c (pop_label): Handle (imperfectly) USE_MAPPED_LOCATION case.
1400 * decl2.c: If USE_MAPPED_LOCATION, don't do some line number
1401 adjustments - which I don't understand.
1402 * error.c (dump_decl): Rename "<interrnal>" to "<built-in>".
1403 * error.c: Use LOCATION_FILE and EXPR_LOCATION macros.
1404 (print_instantiation_partial_context): Use expand_location.
1405 * decl.c (duplicate_decl): Use new DECL_IS_BUILTIN macro.
1406 * name-lookup.c: Likewise.
1407 * lex.c (cxx_init): Likewise. Also use BUILTINS_LOCATION.
1408 * name-lookup.c: Use input_line macro.
1409 * parser.c (cp_lexer_get_preprocessor_token): Use UNKNOWN_LOCATION.
1410 (cp_parser_statement): Rename locaal variable statement_locus to
1411 statement_location and use SET_EXPR_LOCATION macro.
1412 * pt.c: Handle USE_MAPPED_LOCATION case. Use new macros.
1413 * tree.c (cp_walk_subtrees): Likewise.
1415 2004-06-29 Per Bothner <per@bothner.com>
1417 * tree.c (build_min_nt, build_min, build_min_non_dep):
1418 Don't set TREE_COMPLEXITY from input_line.
1420 2004-06-29 Paul Brook <paul@codesourcery.com>
1422 * init.c: Include target.h.
1423 (get_cookie_size): Remove and replace with target hook.
1425 (build_new_1): Store the element size in the cookie.
1427 2004-06-29 Nathan Sidwell <nathan@codesourcery.com>
1430 * parser.c (cp_parser_template_declaration_after_export): Disable
1431 access checks here ...
1432 (cp_parser_class_specifier): ... not here.
1434 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1436 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
1437 VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
1438 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
1441 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1443 * cp-tree.h (struct deferred_access): Move to ...
1444 * semantics.c (struct deferred_access): ... here. Adjust.
1445 (deferred_access_stack): Make a VEC(deferred_access),
1446 (deferred_access_free_list): Remove.
1447 (deferred_access_no_check): New.
1448 (push_deferring_access_checks, resume_deferring_access_checks,
1449 stop_deferring_access_checks, pop_deferring_access_checks,
1450 get_deferred_access_checks, pop_to_parent_deferring_access_checks,
1451 perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
1453 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1456 * call.c (build_temp): Declare.
1457 (check_constructor_callable): New.
1458 (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
1459 CONSTRUCTOR_CALLABLE.
1460 (convert_like_real, initialize_reference): Use
1461 check_constructor_callable.
1462 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
1463 (LOOKUP_*): Renumber.
1465 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1467 * friend.c (add_friend): Only perform access checks when context
1469 * lex.c (cxx_make_type): Only create a binfo for aggregate types.
1470 * parser.c (cp_parser_class_specifier): Disable access checks here
1471 when parsing the body of a templated class.
1472 * semantics.c (perform_or_defer_access_checks): Reorder to allow
1473 NULL binfos when not checking access.
1475 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1477 Use vector API for vbase list.
1478 * cp-tree.h: Include vec.h
1479 (DEF_VEC_P (tree)): New type.
1480 (struct lang_type_class): Change vbase's member type.
1481 (binfo_for_vbase): Declare.
1482 * class.c (determine_primary_base, base_derived_from,
1483 update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
1484 warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
1485 build_vtbl_initializer): Adjust.
1486 * decl.c (xref_basetypes): Adjust, accumulate upper bound of
1488 * init.c (sort_mem_initializers, expand_member_init,
1489 push_base_cleanups): Adjust.
1490 * method.c (do_build_copy_constructor): Adjust.
1491 * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
1492 (binfo_for_vbase): New.
1493 * tree.c (copy_base_binfos): Adjust.
1495 2004-06-28 Mark Mitchell <mark@codesourcery.com>
1497 * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
1499 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
1502 * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
1503 paranthesis in case of pointers to array members.
1504 * error.c (dump_type_prefix): Likewise.
1505 (dump_type_suffix): Maybe issue a whitespace when printing
1508 2004-06-27 Mark Mitchell <mark@codesourcery.com>
1511 * parser.c (cp_parser_set_decl_spec_type): Refine test for
1512 redefinition of built-in types.
1514 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
1516 * error.c (pp_template_argument_list_start): Remove.
1517 (pp_template_argument_list_end): Likewise.
1518 (pp_separate_with_comma): Use pp_cxx_separate_with.
1519 (reinit_global_formatting_buffer): Remove.
1520 (pp_non_consecutive_character): Likewise.
1521 (dump_scope): Use pp_cxx_colon_colon.
1522 (dump_template_parameter): Use pp_cxx_identifier,
1523 pp_cxx_tree_identifier and pp_cxx_whitespace.
1524 (dump_templat_bindings): Replace use of pp_string with sequence
1525 of pp_cxx_whitespace and pp_equal.
1526 (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
1527 pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set
1529 (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
1530 (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace,
1531 pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
1532 (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
1533 pp_cxx_right_bracket, pp_cxx_identifier throughout,
1534 (dump_decl): Likewise.
1535 (dump_template_decl): Likewise.
1536 (dump_function_decl): Likewise. Set padding as appropriate.
1537 (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
1539 (dump_exception_spec): Likewise.
1540 (dump_function_name): Use pp_cxx_tree_identifier and
1542 (dump_template_parms): Use pp_cxx_begin_template_argument_list and
1543 pp_cxx_end_template_argument_list.
1544 (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
1545 pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
1546 pp_cxx_whitespace throughout.
1547 (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
1549 (dump_unary_op): Likewise.
1550 (reinit_cxx_pp): New function.
1551 (type_as_string); Use it.
1552 (expr_as_string): Likewise.
1553 (decl_as_string); Likewise.
1554 (context_as_string): Likewise.
1555 (lang_decl_name): Likewise.
1556 (decl_to_string): Likewise.
1557 (expr_to_string): Likewise.
1558 (parm_to_string): Likewise.
1559 (type_to_string): Likewise.
1560 (args_to_string): Likewise.
1561 (cv_to_string): Likewise.
1563 2004-06-26 Mark Mitchell <mark@codesourcery.com>
1565 * cp-tree.h (cp_cv_quals): New type.
1566 (cp_declarator): Use it instead of "tree" as appropriate.
1567 (grok_method_quals): Adjust prototype.
1568 (grokclassfn): Likewise.
1569 (do_friend): Likewise.
1570 * decl.c (grokfndecl): Use cp_cv_quals, not tree.
1571 (grokdeclarator): Likewise.
1572 * decl2.c (grok_method_quals): Likewise.
1573 (grokclassfn): Likewise.
1574 * friend.c (do_friend): Likewise.
1575 * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
1576 * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
1577 (make_pointer_declarator): Likewise.
1578 (make_reference_declarator): Likewise.
1579 (make_ptrmem_declarator): Likewise.
1580 (cp_parser_ptr_operator): Likewise.
1581 (cp_parser_cv_qualifier_seq_opt): Likewise.
1582 (cp_parser_cv_qualifier_opt): Remove.
1583 (cp_parser_new_declarator_opt): Adjust call to
1584 cp_parser_ptr_operator.
1585 (cp_parser_conversion_declaration_opt): Likewise.
1586 (cp_parser_declarator): Use cp_cv_quals, not tree.
1587 (cp_parser_direct_declarator): Likewise.
1589 2004-06-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1591 * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
1592 Rename DECL_STMT to DECL_EXPR.
1593 * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
1594 * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
1595 * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
1597 2004-06-26 Jan Hubicka <jh@suse.cz>
1600 * decl2.c (maybe_emit_vtables): Always import_export_vtable for the
1601 reachability analysis.
1603 2004-06-25 Mark Mitchell <mark@codesourcery.com>
1605 * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
1608 2004-06-25 Paul Brook <paul@codesourcery.com>
1610 * decl2.c (get_guard): Call targetm.cxx.guard_type.
1611 (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
1613 2004-06-24 Mark Mitchell <mark@codesourcery.com>
1615 * decl.c (grokdeclarator): Restore error messages about __thread.
1616 * parser.c (cp_parser_decl_specifier_seq): Likewise.
1618 2004-06-24 Jason Merrill <jason@redhat.com>
1621 * decl.c (grokparms): Give the PARM_DECL reference type if the
1622 parameter is passed by invisible reference.
1624 2004-06-24 Andreas Schwab <schwab@suse.de>
1626 * cp-tree.h (enum cp_storage_class): Remove trailing comma.
1628 2004-06-23 Mark Mitchell <mark@codesourcery.com>
1630 * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
1631 (cp/decl.o): Likewise.
1632 (cp/decl2.o): Likewise.
1633 (cp/pt.o): Likewise.
1634 (cp/semantics.o): Likewise.
1635 * config-lang.in (gtfiles): Do not reference cp/lex.h.
1636 * class.c: Do not include lex.h.
1637 (add_implicitly_declared_members): Do not use
1638 adding_implicit_members.
1639 (check_bases_and_members): Do not talk about grok_x_components.
1640 * cp/cp-tree.h (adding_implicit_members): Remove.
1641 (cp_storage_class): New type.
1642 (cp_decl_spec): Likewise.
1643 (cp_decl_specifier_seq): Likewise.
1644 (cp_parameter_declarator): Use it for the decl_specifiers field.
1645 (check_tag_decl): Adjust prototype.
1646 (shadow_tag): Likewise.
1647 (groktypename): Likewise.
1648 (start_decl): Likewise.
1649 (start_function): Likewise.
1650 (start_method): Likewise.
1651 (grok_x_components): Remove.
1652 (grokfield): Adjust prototype.
1653 (grokbitfield): Likewise.
1654 (finish_member_class_template): Remove.
1655 * decl.c: Do not include lex.h.
1656 (adding_implicit_members): Do not define.
1657 (check_tag_decl): Do not use trees to represent decl-specifiers.
1658 (shadow_tag): Likewise.
1659 (groktypename): Likewise.
1660 (start_decl): Likewise.
1661 (grokvardecl): Likewise.
1662 (grokdeclarator): Likewise.
1663 (grokparms): Likewise.
1664 (start_function): Likewise.
1665 (start_method): Likewise.
1666 * decl.h (grokdeclarator): Adjust prototype.
1667 * decl2.c: Do not include lex.h.
1668 (grok_x_components): Remove.
1669 (grokfield): Do not use trees to represent decl-specifiers.
1670 (grokbitfield): Likewise.
1671 * lex.c: Do not include lex.h.
1673 * parser.c: Include target.h.
1674 (clear_decl_specs): New function.
1675 (cp_parser_translation_unit): Do not use trees to represent
1677 (cp_parser_postfix_expression): Likewise.
1678 (cp_parser_new_type_id): Likewise.
1679 (cp_parser_condition): Likewise.
1680 (cp_parser_simple_declaration): Likewise.
1681 (cp_parser_decl_specifier_seq): Likewise.
1682 (cp_parser_function_specifier_opt): Likewise.
1683 (cp_parser_conversion_type_id): Likewise.
1684 (cp_parser_template_parameter): Likewise.
1685 (cp_parser_explicit_instantiation): Likewise.
1686 (cp_parser_type_specifier): Likewise.
1687 (cp_parser_simple_type_specifier): Likewise.
1688 (cp_parser_init_declarator): Likewise.
1689 (cp_parser_type_id): Likewise.
1690 (cp_parser_type_specifier_seq): Likewise.
1691 (cp_parser_parameter_declaration): Likewise.
1692 (cp_parser_member_declaration): Likewise.
1693 (cp_parser_exception_declaration): Likewise.
1694 (cp_parser_function_definition_from_specifiers_and_declarator):
1696 (cp_parser_single_declaration): Likewise.
1697 (cp_parser_save_member_function_body): Likewise.
1698 (cp_parser_friend_p): Likewise.
1699 (cp_parser_set_storage_class): New function.
1700 (cp_parser_set_decl_spec_type): Likewise.
1701 * pt.c: Do not include lex.h.
1702 * semantics.c: Likewise.
1703 (finish_member_class_template): Remove.
1705 2004-06-23 Roger Sayle <roger@eyesopen.com>
1707 * call.c (build_cxx_call): Don't call expand_tree_builtin. No
1708 longer take both "args" and "convert_args" as arguments.
1709 (build_op_delete_call): Update call to build_cxx_call.
1710 (build_over_call): Likewise, update call to build_cxx_call.
1711 * cp-tree.h (build_cxx_call): Update funtion prototype.
1712 * typeck.c (build_function_call): Don't call expand_tree_builtin.
1713 * rtti.c (throw_bad_cast): Update call to build_cxx_call.
1714 (throw_bad_typeid): Likewise.
1715 (build_dynamic_cast_1): Likewise.
1717 2004-06-22 Richard Henderson <rth@redhat.com>
1719 * class.c (build_vfn_ref): Take a pointer not object. Build
1721 (cp_fold_obj_type_ref): New.
1722 * call.c (build_over_call): Update build_vfn_ref call.
1723 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
1724 * cp-tree.h (cp_fold_obj_type_ref): Declare.
1726 2004-06-21 Jason Merrill <jason@redhat.com>
1729 * cp-gimplify.c (cp_gimplify_init_expr): Look through
1732 2004-06-21 Mark Mitchell <mark@codesourcery.com>
1734 * cp-tree.def (NEW_EXPR): Add a fourth slot.
1735 * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
1736 (TREE_PARMLIST): Likewise.
1737 (CALL_DECLARATOR_PARMS): Likewise.
1738 (CALL_DECLARATOR_QUALS): Likewise.
1739 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
1740 (cp_declarator_kind): New type.
1741 (cp_parameter_declarator): Likewise.
1742 (cp_declarator): Likewise.
1743 (cp_error_declarator): Likewise.
1744 (no_parameters): Likewise.
1745 (groktypename): Change prototype.
1746 (start_decl): Likewise.
1747 (start_handler_parms): Likewise.
1748 (get_scope_of_declarator): Likewise.
1749 (start_function): Likewise.
1750 (start_preparsed_function): New function.
1751 (start_function): Change prototype.
1752 (start_method): Likewise.
1753 (grokfield): Likewise.
1754 (grokbitfield): Likewise.
1755 (build_new): Likewise.
1756 (make_pointer_declarator): Remove.
1757 (make_reference_declarator): Likewise.
1758 (make_call_declarator): Likewise.
1759 (set_quals_and_spec): Likewise.
1760 (process_template_parm): Change prototype.
1761 (begin_function_definition): Remove.
1762 (finish_parmlist): Remove.
1763 * decl.c (groktypename): Do not use trees to represent
1765 (start_decl): Likewise.
1766 (start_handler_parms): Remove.
1767 (get_scope_of_declarator): Reimplement.
1768 (grokdeclarator): Do not use trees to represent declarators.
1769 (grokparms): Likewise.
1770 (start_function): Likewise.
1771 (start_method): Likewise.
1772 (build_void_list_mode): Do not use TREE_PARMLIST.
1773 * decl.h (grokdeclarator): Change prototype.
1774 * decl2.c (grok_method_quals): Robustify.
1775 (grok_x_components): Do not use trees to represent declarators.
1776 (grokfield): Likewise.
1777 (grokbitfield): Likewise.
1778 (start_objects): Build FUNCTION_DECLs, not declarators.
1779 (start_static_storage_duration_function): Likewise.
1780 * init.c (build_new): Simplify.
1781 * lex.c (make_pointer_declarator): Remove.
1782 (make_reference_declarator): Likewise.
1783 (make_call_declarator): Likewise.
1784 (set_quals_and_spec): Likewise.
1785 * method.c (use_thunk): Use start_preparsed_function.
1786 (synthesize_method): Likewise.
1787 (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
1788 * optimize.c (maybe_clone_body): Use start_preparsed_function.
1789 * parser.c (cp_error_declarator): New variable.
1790 (declarator_obstack): Likewise.
1791 (alloc_declarator): New function.
1792 (make_declarator): Likewise.
1793 (make_id_declarator): Likewise.
1794 (make_pointer_declarator): Likewise.
1795 (make_reference_declarator): Likewise.
1796 (make_ptrmem_declarator): Likewise.
1797 (make_call_declarator): Likewise.
1798 (make_array_declarator): Likewise.
1799 (no_parameters): New variable.
1800 (make_parameter_declarator): Likewise.
1801 (cp_parser_check_for_definition_in_return_type): Do not use trees
1802 to represent declarators.
1803 (cp_parser_translation_unit): Likewise.
1804 (cp_parser_new_expression): Likewise.
1805 (cp_parser_new_type_id): Likewise.
1806 (cp_parser_new_declarator_opt): Likewise.
1807 (cp_parser_direct_new_declarator): Likewise.
1808 (cp_parser_condition): Likewise.
1809 (cp_parser_declaration_statement): Likewise.
1810 (cp_parser_declaration): Likewise.
1811 (cp_parser_conversion_type_id): Likewise.
1812 (cp_parser_conversion_declarator_opt): Likewise.
1813 (cp_parser_template_parameter_list): Likewise.
1814 (cp_parser_template_parameter): Likewise.
1815 (cp_parser_explicit_instantiation): Likewise.
1816 (cp_parser_init_declarator): Likewise.
1817 (cp_parser_declarator): Likewise.
1818 (cp_parser_direct_declarator): Likewise.
1819 (cp_parser_type_id): Likewise.
1820 (cp_parser_parameter_declaration_clause): Likewise.
1821 (cp_parser_parameter_declaration_list): Likewise.
1822 (cp_parser_parameter_declaration): Likewise.
1823 (cp_parser_member_declaration): Likewise.
1824 (cp_parser_exception_declaration): Likewise.
1825 (cp_parser_check_declarator_template_parameters): Likewise.
1826 (cp_parser_function_definition_from_specifiers_and_declarator):
1828 (cp_parser_save_member_function_body): Likewise.
1829 * pt.c (process_template_parm): Add is_non_type parameter.
1830 (convert_template_argument): Adjust call to groktypename.
1831 (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
1832 (tsubst): Do not expect declarators.
1833 (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
1835 (instantiate_decl): Use start_preparsed_function.
1836 * semantics.c (begin_function_definition): Remove.
1837 (finish_parmlist): Remove.
1838 * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
1841 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1843 * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
1844 (build_new_method_call): Likewise.
1845 * decl.c (local_variable_p_walkfn): Don't walk into types.
1846 * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
1847 (build_anon_union_vars): Add new operand for COMPONENT_REF.
1848 * init.c (buld_new): Add new operand for ARRAY_REF.
1849 * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
1850 (do_build_assign_ref): Likewise.
1851 * parser.c (cp_parser_direct_new_declarator): Add new operands
1853 (cp_parser_direct_declarator): Likewise.
1854 * pt.c (tsubst): Likewise.
1855 (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
1857 * semantics.c (finish_non_static_data_member): Add new operand
1859 * typeck.c (build_class_member_access_expr): Likewise.
1860 (build_class_member_access_expr, finish_class_member_access_expr):
1862 (build_ptrmemfunc_access_expr): Likewise.
1863 (build_array_ref): Add new operands for ARRAY_REF.
1864 * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
1865 * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
1867 2004-06-21 Richard Henderson <rth@redhat.com>
1869 * dump.c (cp_dump_tree): Don't use dump_next_stmt.
1870 * parser.c (cp_parser_jump_statement): Update commentary.
1871 * pt.c (tsubst_expr): Use RETURN_EXPR.
1872 * semantics.c (finish_return_stmt): Likewise.
1873 (finalize_nrv_r): Likewise.
1874 * typeck.c, typeck2.c: Update file start commentary.
1876 2004-06-21 Richard Henderson <rth@redhat.com>
1878 * semantics.c (finish_expr_stmt): Call verify_sequence_points.
1880 2004-06-20 Richard Henderson <rth@redhat.com>
1882 * cp-tree.h (add_decl_stmt): Declare.
1883 * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
1884 * semantics.c (maybe_cleanup_point_expr): New.
1885 (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
1886 finish_for_expr, finish_switch_cond): Use it.
1887 (finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN.
1889 2004-06-20 Richard Henderson <rth@redhat.com>
1891 * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
1892 * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
1893 (cp_gimplify_expr): Call it.
1894 (gimplify_cleanup_stmt): Move from c-gimplify.c.
1895 (cp_genericize): New.
1896 * decl.c (finish_function): Call it.
1897 * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
1898 (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
1899 (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
1900 (cp_genericize): Declare.
1901 * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
1902 * dump.c (cp_dump_tree): Likewise.
1903 * semantics.c (push_cleanup): Move from c-semantics.c.
1905 2004-06-20 Zack Weinberg <zack@codesourcery.com>
1907 * cp-lang.c (has_c_linkage): Implement.
1909 * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
1910 * decl.c (duplicate_decls): Use COPY_DECL_RTL.
1911 (builtin_function_1): Don't call make_decl_rtl.
1912 (build_cp_library_fn): Don't call set_mangled_name_for_decl.
1913 (grokvardecl): Don't call mangle_decl.
1914 * except.c (nothrow_libfn_p): Look at DECL_NAME, not
1915 DECL_ASSEMBLER_NAME.
1916 * method.c (set_mangled_name_for_decl): Delete.
1917 * name-lookup.c (pushdecl): When a local extern shadows a
1918 file-scope declaration of the same object, give both DECLs the
1920 * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
1921 on DECL_ASSEMBLER_NAME.
1923 2004-06-19 Richard Henderson <rth@redhat.com>
1925 * cp-gimplify.c: Remove unnecessary prototypes.
1926 (cp_gimplify_stmt): Merge into ...
1927 (cp_gimplify_expr): ... here. Move to end of file. Handle
1928 stmts_are_full_exprs_p frobbing.
1929 * cp-tree.h (cp_gimplify_stmt): Remove.
1930 * pt.c (tsubst_expr): Merge prep_stmt and unify.
1931 * tree.c (init_tree): Don't set lang_gimplify_stmt.
1933 2004-06-18 Richard Henderson <rth@redhat.com>
1936 * semantics.c (begin_cond): New.
1937 (finish_cond): Rewrite to handle template DECL_STMTs specially.
1938 Assume that non-template decls go land before the conditional.
1939 (simplify_loop_decl_cond): Likewise.
1940 (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
1941 finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
1942 begin_switch_stmt, finish_switch_cond): Update to match.
1944 2004-06-17 Jason Merrill <jason@redhat.com>
1947 * semantics.c (simplify_aggr_init_expr): Don't return the slot.
1948 (finish_stmt_expr_expr): Update type after conversions.
1949 (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
1950 Handle void initializer.
1951 * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
1953 2004-06-17 Geoffrey Keating <geoffk@apple.com>
1955 * class.c (build_clone): Don't call defer_fn, let mark_used do it.
1956 * cp-tree.h (defer_fn): Delete.
1957 * decl2.c (defer_fn): Delete.
1958 (finish_file): Simplify deferred_fns loops; check that
1959 only used inline functions get into deferred_fns.
1960 (mark_used): Inline previous contents of defer_fn.
1962 2004-06-16 Richard Henderson <rth@redhat.com>
1964 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
1965 (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
1966 * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
1967 of CTOR_INITIALIZER ...
1968 (pp_cxx_statement): ... here.
1969 * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
1970 (finish_function): Use alloc_stmt_list to zap entire function.
1971 * parser.c (cp_parser_compound_statement): Update commentary.
1972 * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
1973 * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
1974 (finish_stmt_expr): Don't look through COMPOUND_STMT.
1976 2004-06-16 Geoffrey Keating <geoffk@apple.com>
1978 * pt.c (mark_decl_instantiated): Don't call defer_fn.
1980 2004-06-16 Richard Henderson <rth@redhat.com>
1982 * parser.c (cp_parser_labeled_statement): Update commentary.
1983 * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
1984 * tree.c (mark_local_for_remap_r): Likewise.
1986 2004-06-16 Richard Henderson <rth@redhat.com>
1988 * parser.c (cp_parser_asm_definition): Update commentary.
1989 * pt.c (tsubst_expr): Use ASM_EXPR.
1990 * semantics.c (finish_asm_stmt): Likewise.
1992 2004-06-16 Richard Henderson <rth@redhat.com>
1994 * decl.c (finish_destructor_body): Use LABEL_EXPR.
1995 * parser.c (cp_parser_statement): Update commentary.
1996 * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
1997 * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
1998 * tree.c (mark_local_for_remap_r): Likewise.
2000 2004-06-16 Richard Henderson <rth@redhat.com>
2003 * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
2004 statement in FOR_INIT_STMT for templates.
2006 2004-06-15 Richard Henderson <rth@redhat.com>
2008 * call.c (initialize_reference): Don't build CLEANUP_STMT here.
2009 * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
2010 (genericize_try_block): Use gimplify_stmt.
2011 (genericize_catch_block, genericize_eh_spec_block): Likewise.
2012 (cp_gimplify_init_expr): Remove STMT_EXPR special case.
2013 (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
2014 * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
2015 (cp_tree_chain_matters_p): Remove.
2016 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
2017 (COMPOUND_STMT_BODY_BLOCK): New.
2018 (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
2019 (EXPR_STMT_STMT_EXPR_RESULT): New.
2020 (building_stmt_tree): Check cur_stmt_list.
2021 (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
2022 (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
2023 * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
2024 (cp_finish_decl): Use push_cleanup.
2025 (start_function, finish_function): Use statement lists.
2026 (finish_stmt): Do nothing.
2027 * except.c (begin_eh_spec_block): Use statement lists.
2028 (check_handlers_1, check_handlers): Likewise.
2029 * init.c (construct_virtual_base): Don't add extra compound stmts.
2030 (build_vec_init): Likewise.
2031 * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
2032 * name-lookup.h (struct cp_binding_level): Add statement_list.
2033 * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
2034 (cp_parser_labeled_statement, cp_parser_expression_statement,
2035 cp_parser_statement_seq_opt): Likewise.
2036 (cp_parser_compound_statement): Likewise. Take bool for try block.
2037 (cp_parser_selection_statement): Tidy if processing.
2038 (cp_parser_already_scoped_statement): Rewrite to do what it says.
2039 * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
2040 (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST.
2041 Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
2042 * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
2043 (finish_cond): New, rewritten from FINISH_COND.
2044 (simplify_loop_decl_cond): New.
2045 (finish_expr_stmt): Avoid nested EXPR_STMTs.
2046 (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
2047 begin_else_clause, finish_else_clause, finish_if_stmt,
2048 begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
2049 begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
2050 finish_for_cond, finish_for_stmt, begin_switch_stmt,
2051 finish_switch_cond, finish_switch_stmt, begin_try_block,
2052 finish_try_block, finish_cleanup_try_block, finish_function_try_block,
2053 finish_handler_sequence, finish_function_handler_sequence,
2054 begin_handler, finish_handler_parms, finish_handler,
2055 begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
2056 using statement lists.
2057 (begin_compound_stmt): Replace has_no_scope argument with flags.
2058 Update all callers. Use statement lists.
2059 (finish_compound_stmt): Likewise.
2060 (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
2061 (current_scope_stmt_stack): Remove.
2062 (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
2063 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
2064 Rewrite with statement lists.
2066 2004-06-15 Alexandre Oliva <aoliva@redhat.com>
2068 * parser.c: Change all assignments of c_lex_string_translate
2069 to true and false to 1 and 0.
2070 (cp_lexer_read_token): Convert type of the translated string.
2071 (cp_parser_skip_to_closing_parentheses): Preserve original
2072 value of c_lex_string_translate, and set it to -1 while
2074 (cp_parser_cache_group): Likewise.
2075 (cp_parser_cache_group_1): Renamed.
2076 (cp_parser_asm_operand_list): Remove redundant setting of
2077 c_lex_string_translate.
2078 (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
2079 Handle chained strings.
2081 2004-06-12 Andrew Pinski <apinski@apple.com>
2085 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
2087 * cp-tree.h: Fix typo.
2089 * cp-tree.h: Include cgraph.h
2090 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
2091 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
2093 2004-06-12 Jason Merrill <jason@redhat.com>
2095 PR tree-optimization/14107
2096 * decl.c (finish_function): Warn about no return in all functions.
2098 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
2100 * cp-tree.h (struct language_function): Remove cannot_inline.
2101 * decl.c (save_function_data): cannot_inline is no more.
2102 (cxx_push_function_context): Likewise.
2103 * decl2.c (start_objects, start_static_storage_duration_function):
2104 Reset DECL_INLINE, set DECL_UNINLINABLE.
2106 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2109 * search.c (lookup_field): Propagate the ambiguity list.
2110 (lookup_fnfields): Likewise.
2112 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2115 * parser.c (cp_parser_template_name): Ctors/dtors never need a
2116 template keyword to disambiguate.
2118 2004-06-14 Mark Mitchell <mark@codesourcery.com>
2121 * decl.c (grokdeclarator): Ignore pointer-to-members when
2122 computing template depth.
2125 * name-lookup.c (pushtag): Do not try to put class declarations in
2126 explicit specialization scopes.
2128 2004-06-11 Andrew Pinski <pinskia@physics.uc.edu>
2130 * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
2132 2004-06-11 Mark Mitchell <mark@codesourcery.com>
2135 * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
2136 bindings for undeclared built-ins.
2138 2004-06-11 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2140 * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
2141 appear at the correct location.
2143 2004-06-10 Jason Merrill <jason@redhat.com>
2147 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2148 * init.c (build_offset_ref): Build SCOPE_REF with non-null
2149 TREE_TYPE for non-dependent names.
2150 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
2151 unknown_type_node as its TREE_TYPE.
2152 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
2153 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
2154 (dump_expr) <SCOPE_REF case>: Likewise.
2156 2004-06-10 Mark Mitchell <mark@codesourcery.com>
2159 * parser.c (cp_parser_direct_declarator): Robustify.
2162 * pt.c (tsubst_copy): Use decl_constant_value on enumeration
2163 constants in non-dependent contexts.
2167 * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
2170 2004-06-10 Jakub Jelinek <jakub@redhat.com>
2173 * decl.c (duplicate_decls): Handle fileptr_type_node arguments
2176 2004-06-09 Mark Mitchell <mark@codesourcery.com>
2180 2004-06-07 Mark Mitchell <mark@codesourcery.com>
2181 * lex.c (handle_pragma_interface): Deprecate.
2182 (handle_pragma_implementation): Likewise.
2184 2004-06-09 Andrew Pinski <pinskia@physics.uc.edu>
2186 * g++spec.c (lang_specific_driver): Remove check for -lm
2187 and -lmath when check it see if it was the math library.
2189 2004-06-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2192 * parser.c (cp_parser_direct_declarator): Reject constructor named
2193 as qualified template-id.
2195 2004-06-07 Mark Mitchell <mark@codesourcery.com>
2198 * lex.c (handle_pragma_interface): Deprecate.
2199 (handle_pragma_implementation): Likewise.
2201 2004-06-07 Mark Mitchell <mark@codesourcery.com>
2204 * parser.c (cp_parser_iteration_statement): Fix typo in error
2208 * pt.c (tsubst_default_argument): Do not defer access checks
2209 while substituting into the default argument.
2212 * pt.c (tsubst_copy): Do not try to substitute for an enumeration
2213 constant in a non-dependent context.
2216 * except.c (build_throw): Ensure that temp_expr has been
2219 2004-06-06 Roger Sayle <roger@eyesopen.com>
2221 * cp/cp-tree.h (lvalue_or_else): Add function prototype.
2223 2004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2226 * parser.c (cp_parser_mem_initializer_id): Gracefully reject
2227 'typename', and accept 'template'.
2229 2004-06-03 Andrew Pinski <pinskia@physics.uc.edu>
2230 Jan Hubicka <jh@suse.cz>
2233 * method.c (use_think): Do not mark thunk as referenced.
2235 2004-06-03 Matt Austern <austern@apple.com>
2238 * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
2239 is nonzero, and if we see a noninline definition of a key method,
2240 make the vtables nonweak.
2242 2004-06-02 Matt Austern <austern@apple.com>
2244 * cp-tree.h (instantiate_decl): new boolean parameter,
2245 undefined_ok. Current behavior is equivalent to its being 0.
2246 * decl2.c (mark_used): Add new argument when calling instantiate_decl
2247 * pt.c (mark_decl_instantiated): Unconditionally make
2248 instantiations explicit unconditionally
2249 (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
2250 since mark_decl_instantiated now does it.
2251 (instantiate_class_member): New. Instantiate a member of an
2252 explicitly instantiated class template.
2253 (do_type_instantiation): Explicitly instantiate members of an
2254 explicitly instantiated class template.
2255 (instantiate_decl): if undefined_ok is nonzero, and if we're
2256 trying to explicitly instantiated a template with no definition,
2257 change it to an implicit instantiation.
2258 (instantiate_pending_templates): Add new argument to instantiate_decl.
2259 * tree.c (cp_cannot_inline_tree_fn): Likewise.
2261 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
2263 * cp-tree.h: Fix typo.
2265 * cp-tree.h: Include cgraph.h
2266 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
2267 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
2269 2004-06-01 Jason Merrill <jason@redhat.com>
2272 * call.c (call_builtin_trap): Remove type parm.
2273 (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
2274 (build_x_va_arg): Dereference a null pointer for a non-POD argument.
2276 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2279 * init.c (build_offset_ref): Build SCOPE_REF with non-null
2280 TREE_TYPE for non-dependent names.
2281 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
2282 unknown_type_node as its TREE_TYPE.
2283 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
2284 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
2285 (dump_expr) <SCOPE_REF case>: Likewise.
2287 2004-06-01 Richard Henderson <rth@redhat.com>
2288 Andrew Pinski <pinskia@physics.uc.edu>
2290 * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
2291 * parser.c (struct cp_parser): Remove in_offsetof.
2292 (cp_parser_new): Don't set it.
2293 (cp_parser_unary_expression): Don't check it.
2294 (cp_parser_postfix_open_square_expression): Split out from ...
2295 (cp_parser_postfix_expression): ... here.
2296 (cp_parser_postfix_dot_deref_expression): Likewise.
2297 (cp_parser_builtin_offsetof): New.
2298 (cp_parser_primary_expression): Use it.
2300 2004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2303 * parser.c (cp_parser_postfix_expression): Allow subscript
2304 operator in offsetof.
2306 2004-05-31 Mark Mitchell <mark@codesourcery.com>
2309 * friend.c (add_friend): Do not try to perform access checks for
2310 functions from dependent classes.
2312 2004-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
2314 * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
2315 (pp_cxx_begin_template_argument_list): Turn into a function.
2316 (pp_cxx_end_template_argument_list): Likewise.
2317 (pp_cxx_separate_with): Define.
2318 (pp_cxx_unqualified_id): Tidy.
2319 (pp_cxx_primary_expression): Likewise.
2320 (pp_cxx_postfix_expression): Likewise.
2321 (pp_cxx_expression): Likewise.
2322 (pp_cxx_simple_type_specifier): Likewise.
2323 (pp_cxx_type_specifier_seq): Likewise.
2324 (pp_cxx_parameter_declaration_clause): Likewise.
2325 (pp_cxx_exception_specification): Likewise.
2326 (pp_cxx_direct_declarator): Likewise.
2327 (pp_cxx_type_id): Likewise.
2328 * cxx-pretty-print.h (pp_cxx_whitespace): Export from
2330 (pp_cxx_left_paren): Likewise.
2331 (pp_cxx_right_paren): Likewise.
2332 (pp_cxx_left_brace): Likewise.
2333 (pp_cxx_right_brace): Likewise.
2334 (pp_cxx_left_bracket): Likewise.
2335 (pp_cxx_right_bracket): Likewise.
2336 (pp_cxx_dot): Likewise.
2337 (pp_cxx_identifier): Likewise.
2338 (pp_cxx_tree_identifier): Likewise.
2339 (pp_cxx_ampersand): New macro.
2340 (pp_cxx_star): Likewise.
2341 (pp_cxx_arrow): Likewise.
2342 (pp_cxx_semicolon): Likewise.
2343 (pp_cxx_complement): Likewise.
2344 (pp_cxx_begin_template_argument_list): Declaree.
2345 (pp_cxx_end_template_argument_list): Likewise.
2346 (pp_cxx_colon_colon): likewise.
2348 2004-05-31 Eric Botcazou <ebotcazou@libertysurf.fr>
2350 * parser.c (cp_parser_simple_type_specifier): Explicitly test
2353 2004-05-31 Kazu Hirata <kazu@cs.umass.edu>
2355 * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
2356 typeck.c: Fix comment formatting.
2358 2004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
2360 * cp-lang.c (cp_expand_decl): Remove.
2361 (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
2363 2004-05-30 Andreas Jaeger <aj@suse.de>
2365 * lang-specs.h: Add missing initializers for .ii.
2367 2004-05-28 Aldy Hernandez <aldyh@redhat.com>
2369 * decl.c (cp_make_fname_decl): Free return value from
2372 2004-05-28 Mark Mitchell <mark@codesourcery.com>
2375 * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
2377 * init.c (build_new): Likewise.
2380 * name-lookup.c (arg_assoc): Robustify.
2383 * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
2384 when determining the scope to use for a pointer to member.
2385 (lookup_anon_field): Give it external linkage.
2386 * cp-tree.h (lookup_anon_field): Declare it.
2387 * expr.c (cplus_expand_constant): Use it.
2389 2004-05-28 Mark Mitchell <mark@codesourcery.com>
2392 * parser.c (cp_parser_simple_type_specifier): Call
2393 maybe_note_name_used_in_class.
2395 2004-05-28 Tom Marshall <tmarshall@real.com>
2398 * class.c (finish_struct_1): Warn only if the dtor is non-private or
2399 the class has friends.
2401 2004-05-27 Adam Nemet <anemet@lnxw.com>
2404 * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
2405 TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
2407 2004-05-24 Geoffrey Keating <geoffk@apple.com>
2409 * method.c (implicitly_declare_fn): Don't call defer_fn; abort
2410 if it might be needed.
2411 * pt.c (mark_decl_instantiated): Only call defer_fn if
2412 the function actually needs processing in finish_file.
2413 * decl2.c (finish_file): Add check that elements in
2414 deferred_fns_used are really needed there. Remove unnecessary
2415 test of DECL_SAVED_TREE.
2417 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
2419 * Make-lang.in: No need to specify $(LIBCPP).
2421 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2424 * parser.c (cp_parser_class_head): Robustify.
2427 * parser.c (cp_parser_decl_specifier_seq): Correct error in
2429 (cp_parser_constructor_declarator_p): Treat attributes
2433 * typeck.c (build_unary_op): Do not attempt to resolve casts to
2434 base classes in templates.
2436 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2439 * pt.c (instantiate_template): Robustify.
2441 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2444 * decl.c (xref_tag): Issue errors about redeclaring template
2445 classes as non-template classes.
2447 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2450 * name-lookup.c (supplement_binding): Allow redefinitions of
2454 * parser.c (cp_parser_template_argument): Robustify.
2456 2004-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
2458 * class.c (alter_access): Use %E format specifier to print an
2459 identifier node. Avoid looking at the IDENTIFIER_POINTER.
2460 (push_lang_context): Likewise.
2461 * decl.c (lookup_label): Likewise.
2462 (grokdeclarator): Likewise.
2463 * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
2464 * pt.c (do_type_instantiation): Likewise.
2465 * tree.c (handle_java_interface_attribute): Likewise.
2466 (handle_com_interface_attribute): Likewise.
2467 (handle_init_priority_attribute): Likewise.
2469 2004-05-22 Mark Mitchell <mark@codesourcery.com>
2473 * pt.c (build_non_dependent_expr): Expand the set of tree nodes
2474 recognized as overloaded functions.
2476 2004-05-22 Mark Mitchell <mark@codesourcery.com>
2479 * class.c (layout_nonempty_base_or_field): Do not try to avoid
2480 layout conflicts for unions.
2483 * typeck.c (build_x_unary_op): Instantiate template class
2484 specializations before looking for "operator &".
2487 * typeck.c (complete_type): Layout non-dependent array types, even
2491 * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
2494 2004-05-22 Roger Sayle <roger@eyesopen.com>
2496 * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
2497 returning when TREE_TYPE is error_mark_node.
2498 * typeck.c (require_complete_type): Return error_mark_node if
2499 value's type is an error_mark_node.
2501 2004-05-20 Andrew Pinski <pinskia@physics.uc.edu>
2503 * optimize.c (calls_setjmp_r): Remove.
2504 (calls_setjmp_p): Remove.
2505 * cp-tree.c (calls_setjmp_p): Remove.
2506 * decl.c (finish_function): Do not call calls_setjmp_p.
2508 2004-05-18 Zack Weinberg <zack@codesourcery.com>
2510 * decl.c (cp_finish_decl): Use mark_decl_referenced.
2511 * decl2.c (maybe_make_one_only): Likewise.
2512 * method.c (use_thunk): Likewise.
2514 2004-05-18 Jason Merrill <jason@redhat.com>
2516 * class.c (build_base_path): Tidy a bit.
2518 2004-05-14 Geoffrey Keating <geoffk@apple.com>
2520 * name-lookup.c (struct scope_binding): New.
2521 (EMPTY_SCOPE_BINDING): New.
2522 (lookup_using_namespace): Take a scope_binding instead of a
2524 (qualified_lookup_using_namespace): Likewise.
2525 (cxx_binding_clear): Delete.
2526 (do_nonmember_using_decl): Use a scope_binding instead of a
2528 (lookup_tag): Don't call select_decl.
2529 (ambiguous_decl): Don't return anything (and change callers to match).
2530 Take a scope_binding as the second parameter.
2531 (lookup_namespace_name): Use a scope_binding instead of a
2533 (unqualified_namespace_lookup): Likewise.
2534 (lookup_qualified_name): Likewise.
2535 (select_decl): Take a scope_binding instead of a cxx_binding.
2536 Use macros rather than hand-coding tests for type-ness.
2538 2004-05-13 Diego Novillo <dnovillo@redhat.com>
2540 * cp-gimplify.c: Rename from cp-simplify.c.
2541 * Make-lang.in, optimize.c: Update.
2543 2004-05-13 Diego Novillo <dnovillo@redhat.com>
2545 Merge from tree-ssa-20020619-branch. See
2546 ChangeLog.tree-ssa for details.
2548 * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
2549 cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
2550 expr.c, init.c, name-lookup.h, optimize.c, parser.c,
2551 pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
2553 * cp-mudflap.c: New file.
2554 * cp-simplify.c:: New file.
2556 2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2559 * decl2.c (check_classfn): For member templates, compare also the
2560 template parameters to match the declaration.
2561 * cp-tree.h: Adjust declaration of check_classfn.
2562 * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
2563 * friend.c (do_friend): Likewise.
2564 * pt.c (tsubst_friend_function): Likewise.
2566 2004-05-01 Zack Weinberg <zack@codesourcery.com>
2568 * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
2569 Instead, dig into the representation type to find the array bound.
2571 2004-04-30 Jason Merrill <jason@redhat.com>
2573 Refer to base members using COMPONENT_REFs where possible.
2574 * class.c (build_simple_base_path): New fn.
2575 (build_base_path): Use it for non-virtual base references.
2576 (layout_class_type): Change base fields to their real type
2577 after layout is done.
2578 * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
2579 * cp-lang.c (cxx_get_alias_set): Use it.
2581 2004-04-30 Kazu Hirata <kazu@cs.umass.edu>
2583 * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
2586 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2589 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
2590 used in integral constant expressions.
2592 2004-04-22 Mark Mitchell <mark@codesourcery.com>
2594 * init.c (build_aggr_init): Fix accidental use of C99 construct in
2597 * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
2599 * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
2600 * decl.c (reshape_init): Use it.
2601 * init.c (perform_member_init): Remove redundant condition.
2602 (build_aggr_init): Adjust to handle brace-enclosed initializers
2604 (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
2606 * parser.c (cp_parser_initializer_clause): Do not set
2607 TREE_HAS_CONSTRUCTOR on the initializer.
2608 * rtti.c (tinfo_base_init): Likewise.
2609 (generic_initializer): Likewise.
2610 (ptr_initializer): Likewise.
2611 (ptm_initializer): Likewise.
2612 (class_initializer): Likewise.
2613 (get_pseudo_ti_init): Likewise.
2614 * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
2616 2004-04-22 Alan Modra <amodra@bigpond.net.au>
2618 * name-lookup.c (anonymous_namespace_name): Make static.
2620 2004-04-19 Roger Sayle <roger@eyesopen.com>
2623 * class.c (build_base_path): Call fold whilst building the NULL
2624 pointer check expression trees.
2626 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
2628 * init.c (build_new_1): Don't use type size argument for Java
2629 _Jv_AllocObject call.
2631 2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
2633 * method.c (make_alias_for_thunk): Remove preprocessor guard on
2634 declaration and definition.
2636 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
2639 * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
2640 than ASM_OUTPUT_DEF.
2642 2004-04-08 Jakub Jelinek <jakub@redhat.com>
2644 * decl2.c (mark_used): Don't segfault if cfun != NULL but
2645 current_function_decl == NULL.
2647 2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
2650 * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
2653 2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2655 * init.c (decl_constant_value): Don't look at DECL_INITIAL
2657 * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
2658 or TREE_SIDE_EFFECTS of a type.
2660 2004-04-02 Nathan Sidwell <nathan@codesourcery.com>
2663 * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
2664 cv-qualifier unification.
2665 * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
2667 2004-04-02 Jan Hubicka <jh@suse.cz>
2669 * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
2670 * cp-tree.h (cp_update_decl_after_saving): Declare.
2671 * tree.c (cp_update_decl_after_saving): Define.
2673 2004-04-01 Mark Mitchell <mark@codesourcery.com>
2676 * typeck.c (get_delta_difference): Call fold before returning the
2679 2004-04-01 Richard Henderson <rth@redhat.com>
2682 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
2683 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
2685 2004-04-01 Mark Mitchell <mark@codesourcery.com>
2688 * name-lookup.c (maybe_push_cleanup_level): Robustify.
2690 2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2692 * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
2694 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2696 * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
2697 * class.c (check_bitfield_decl): Likewise.
2698 * cvt.c (type_promotes_to): Likewise.
2699 * decl.c (finish_enum): Likewise.
2700 * mangle.c (write_builtin_type): Likewise.
2701 * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
2702 * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
2703 (build_binary_op): Likewise.
2705 2004-03-31 Jan Hubicka <jh@suse.cz>
2707 * tree.h (optimize_function): Kill prototype.
2708 * optimize.c (dump_function, optimize_function, dump_finction): Kill.
2709 * semantics.c (expand_body): Kill.
2711 2004-03-30 Mark Mitchell <mark@codesourcery.com>
2714 * decl.c (start_decl_1): Do not decide whether or not to create a
2715 new cleanup level until after the type has been completed.
2718 * pt.c (tsubst_default_argument): Clear current_function_decl.
2720 2004-03-30 Zack Weinberg <zack@codesourcery.com>
2722 * name-lookup.c, parser.c: Use new shorter form of GTY markers.
2724 2004-03-29 Zack Weinberg <zack@codesourcery.com>
2726 * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
2727 is null, just print the literal name and return.
2729 2004-03-25 Kazu Hirata <kazu@cs.umass.edu>
2731 * cxx-pretty-print.c: Fix comment typos.
2733 2004-03-24 Kazu Hirata <kazu@cs.umass.edu>
2735 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
2738 2004-03-23 Ziemowit Laski <zlaski@apple.com>
2740 * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
2741 * mangle.c (write_type): Add call to 'mangle_fundamental_type'
2744 2004-03-23 Zack Weinberg <zack@codesourcery.com>
2746 PR 12267, 12391, 12560, 13129, 14114, 14133
2747 * cp-lang.c (c_reset_state): Delete.
2748 (push_file_scope, pop_file_scope): New stubs.
2749 * parser.c (c_parse_file): Call sorry() here if called more than once.
2751 2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2753 * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
2756 2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
2758 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
2760 2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
2762 * error.c (enum pad): Remove.
2763 (dump_qualifiers): Likewise.
2764 (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
2765 (dump_aggr_type): Likewise.
2766 (dump_type_suffix): Likewise.
2767 (dump_simple_decl): Likewise.
2768 (dump_function_decl): Likewise.
2769 (cv_to_string): Likewise.
2770 (dump_type_prefix): Likewise. Adjust return void.
2771 * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
2773 (pp_cxx_template_keyword_if_needed): Document.
2774 (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
2775 (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
2776 MUST_NOT_THROW_EXPR.
2778 2004-03-21 Mark Mitchell <mark@codesourcery.com>
2781 * decl.c (cp_finish_decl): Compute the size of arrays declared in
2782 templates, if their type is non-dependent.
2784 2004-03-19 Mark Mitchell <mark@codesourcery.com>
2786 * call.c (build_op_delete_call): Do not forget the placement
2787 arguments when iterating through mutiple delete operators.
2789 * cp-tree.h (svaed_scope): Remove last_parms.
2790 (NEW_DELETE_OPNAME_P): New macro.
2791 (last_function_parms): Remove.
2792 (do_friend): Adjust prototype.
2793 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
2794 using last_function_parms.
2795 (grokfndecl): Take the PARM_DECLs as an argument, rather than
2796 using last_function_parms.
2797 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
2798 for class-specific operator new and operator delete.
2799 (grok_op_properties): Do not look for allocation functions with
2801 (start_function): Use DECL_ARGUMENTS instead of
2802 last_function_parms.
2803 * decl.h (last_function_parms): Do not declare.
2804 * decl2.c (grokclassfn): Do not use last_function_parms.
2805 * friend.c (do_friend): Remove parmdecls parameter.
2806 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
2807 (pop_from_top_level): Do not restore it.
2808 * pt.c (check_explicit_specialization): Do not adjust
2809 last_function_parms.
2811 * name-lookup.c (do_local_using_decl): Create a local binding for
2812 types brought in via using declarations.
2814 * name-lookup.c (lookup_arg_dependent): Handle block-scope
2815 function declarations correctly.
2817 * semantics.c (finish_id_expression): Correct handling of
2818 conversion operators to dependent types.
2820 * typeck.c (lookup_destructor): Allow the use of destructors from
2823 2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2825 * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
2826 TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
2827 * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
2828 the field is named TEMPLATE_TYPE_PARM_INDEX.
2830 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2833 * parser.c (cp_parser_functional_cast): A cast to anything
2834 but integral or enumaration type is not an integral constant
2836 * pt.c (value_dependent_expression_p): Handle cast expressions
2837 without operands (such as "int()").
2839 2004-03-18 Mark Mitchell <mark@codesourcery.com>
2841 * semantics.c (finish_pseudo_destructor_expr): Allow differing
2842 cv-qualification between the type named by the
2843 pseudo-destructor-name and the object-type.
2845 * search.c (accessible_base_p): Handle non-proper bases.
2847 * name-lookup.c (do_nonmember_using_decl): If a using declaration
2848 refers to a single overloaded function, set the type of the
2850 * tree.c (lvalue_type): Simplify.
2851 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
2853 (build_unary_op): Handle OVERLOADs with known types.
2855 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
2858 * parser.c (cp_parser_postfix_expression): Handle the use of
2859 "typename" in non-dependent contexts. Convert appropriately when
2860 when using a qualified name after "->" or ".".
2862 * call.c (conditional_conversion): Honor the requirement that some
2863 conversions refer to the original object.
2865 2004-03-18 Mark Mitchell <mark@codesourcery.com>
2867 * call.c (build_conditional_expr): Do not call force_rvalue for
2868 operands of void_type when the conditional expression itself has
2870 * name-lookup.c (pushdecl): Don't consider a declaration of a
2871 function named "main" to be an overload of a type named "main".
2872 * parser.c (cp_parser_template_name): Perform name lookup when the
2873 template name is proceeded by "template" if the qualifying scope
2875 * typeck.c (composite_pointer_type_r): Correctly handle
2876 pointer-to-member types.
2877 (build_const_cast): Likewise.
2879 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2881 * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
2882 * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
2883 (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
2884 (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
2885 (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
2886 (TYPEOF_TYPE_EXPR): New macro.
2887 * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
2888 * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
2889 * pt.c (tsubst): Likewise.
2890 * semantics.c (finish_typeof): Likewise.
2891 * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
2892 and TEMPLATE_TYPE_PARM.
2893 * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
2894 (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
2896 2004-03-16 Mark Mitchell <mark@codesourcery.com>
2899 * cp-tree.h (build_new_op): Change prototype.
2900 (build_x_binary_op): Likewise.
2901 * call.c (build_new_op): Add overloaded_p parameter.
2902 * decl2.c (grok_array_decl): Adjust call to build_new_op.
2903 * parser.c (cp_parser_binary_expression): Note that uses of
2904 overloaded operators prevents an expression from being considered
2905 an integral constant.
2906 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
2908 * semantics.c (finish_call_expr): Likewise.
2909 * typeck.c (rationalize_conditional_expr): Likewise.
2910 (build_x_indirect_ref): Likewise.
2911 (build_x_binary_op): Likewise.
2912 (build_x_unary_op): Likewise.
2913 (build_x_compound_expr): Likewise.
2914 (build_modify_expr): Likewise.
2915 * typeck2.c (build_x_arrow): Likewise.
2917 2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
2919 * cp-lang.c, ptree.c: Update copyright.
2921 2004-03-13 Mark Mitchell <mark@codesourcery.com>
2924 * parser.c (cp_parser_non_integral_constant_expression): Encode
2925 more of the idiom that surrounded calls to this function within
2927 (cp_parser_primary_expression): Adjust accordingly.
2928 (cp_parser_postfix_expression): Likewise.
2929 (cp_parser_unary_expression): Likewise.
2930 (cp_parser_cast_expression): Likewise.
2931 (cp_parser_assignment_expression): Likewise.
2932 (cp_parser_expression): Likewise.
2933 (cp_parser_new_expression): Note that new-expressions are not
2934 allowed in integral constant expressions.
2935 (cp_parser_delete_expression): Likewise.
2937 2004-03-12 Matt Austern <austern@apple.com>
2939 * decl2.c (maybe_make_one_only): Look at
2940 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
2941 to make an explicit instantiation weak.
2942 * method.c (use_thunk): Make sure we call comdat_linkage
2944 * pt.c (do_type_instantiation): On systems where weak symbols
2945 don't go in a static archive's TOC, explicit instantiation of a
2946 class must imply *explicit* instantiation of its memeber.
2948 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
2950 * call.c, cp-tree.h, pt.c: Fix comment typos.
2952 2004-03-10 Mark Mitchell <mark@codesourcery.com>
2955 * decl.c (xref_tag): Disregard non-type declarations when
2956 looking up a tagged type.
2958 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
2961 * call.c (convert_like_real): Build a const qualified temporary,
2962 when testing ctor access.
2964 2004-03-09 Mark Mitchell <mark@codesourcery.com>
2966 * call.c (initialize_reference): Fix typo.
2968 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2971 * pt.c (determine_specialization): For member templates, match also
2975 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
2977 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
2979 2004-03-09 Mark Mitchell <mark@codesourcery.com>
2982 * call.c (initialize_reference): Handle initializers that are
2983 class-member access expressions applies to rvalues.
2985 2004-03-09 Mark Mitchell <mark@codesourcery.com>
2988 * name-lookup.c (supplement_binding): Ignore functions that are
2989 marked DECL_ANTICIPATED.
2991 2004-03-08 Mark Mitchell <mark@codesourcery.com>
2994 * class.c (check_field_decls): Complain about non-static data
2995 members of reference type in unions. Propagate
2996 CLASSTYPE_REF_FIELDS_NEED_INIT and
2997 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
2999 * init.c (perform_member_init): Complain about mbmers with const
3000 type that are not explicitly initialized.
3002 2004-03-08 Mark Mitchell <mark@codesourcery.com>
3004 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
3005 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
3006 (lang_identifier): Remove implicit_decl and error_locus.
3007 (IDENTIFIER_IMPLICIT_DECL): Remove.
3008 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
3009 (IDENTIFIER_ERROR_LOCUS): Likewise.
3010 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
3011 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
3012 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
3013 (implicitly_declare): Remove.
3014 * decl.c (warn_extern_redeclared_static): Remove check of
3015 IDENTIFIER_IMPLICIT_DECL.
3016 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
3017 (implicitly_declare): Remove.
3018 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
3019 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
3020 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
3021 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
3022 in the innermost scope, rather than at namespace scope.
3023 * name-lookup.c (push_local_binding): Give it external linkage.
3024 (pushdecl): Remove dead code.
3025 * name-lookup.h (push_local_binding): Declare it.
3026 * ptree.c (cxx_print_identifier): Don't print
3027 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
3028 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
3029 not IDENTIFIER_ERROR_LOCUS.
3030 * typeck.c (build_function_call): Remove dead code.
3032 2004-03-08 Jason Merrill <jason@redhat.com>
3035 * decl.c (xref_tag): Remove attribute handling.
3036 * cp-tree.h: Adjust prototype.
3037 * decl.c, parser.c, rtti.c: Adjust callers.
3038 * parser.c (cp_parser_class_head): Pass back attributes in the
3040 (cp_parser_class_specifier): Adjust.
3042 2004-03-08 Matt Austern <austern@apple.com>
3045 * name-lookup.c (add_decl_to_level): Add extern variables, as well
3046 as static, to static_decls array.
3048 2004-03-05 Jason Merrill <jason@redhat.com>
3050 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
3052 2004-03-04 Geoffrey Keating <geoffk@apple.com>
3054 * decl.c (grokfndecl): Update old incorrect comment.
3055 (grokvardecl): Diagnose C++ variables of type with no linkage.
3057 2004-03-01 Mark Mitchell <mark@codesourcery.com>
3060 * pt.c (build_non_dependent_expr): Do not create a
3061 NON_DEPENDENT_EXPR for a THROW_EXPR.
3063 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
3066 * error.c (dump_expr): Handle THROW_EXPR.
3068 2004-03-01 Mark Mitchell <mark@codesourcery.com>
3071 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
3072 lookup if ordinary name-lookup finds a non-function.
3073 * pt.c (tsubst_copy_and_build): Likewise.
3076 * parser.c (cp_parser_late_parsing_default_args): Check that there
3077 are no extra tokens after the end of the default-argument
3080 2004-03-01 Mark Mitchell <mark@codesourcery.com>
3083 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
3084 having C++ linkage for name-mangling purposes.
3087 * parser.c (cp_parser_direct_declarator): Recognize constructor
3088 declarators that use a template-id to name the class being
3092 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
3093 (tsubst_expr): Do not call tsubst_copy, even when
3094 processing_template_decl.
3096 2004-03-01 Jeff Law <law@redhat.com>
3098 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
3101 2004-02-29 Mark Mitchell <mark@codesourcery.com>
3104 * name-lookup.h (push_scope): Change prototype.
3105 * name-lookup.c (push_scope): Do not reenter the current class
3107 * decl.c (grokfndecl): Check return code from push_scope before
3109 * decl2.c (check_classfn): Likewise.
3110 * parser.c (cp_parser_conversion_function_id): Likewise.
3111 (cp_parser_init_declarator): Likewise.
3112 (cp_parser_direct_declarator): Likewise.
3113 (cp_parser_class_specifier): Likewise.
3114 (cp_parser_class_head): Likewise.
3115 (cp_parser_lookup_name): Likewise.
3116 (cp_parser_constructor_declarator_p): Likewise.
3117 * pt.c (instantiate_class_template): Likewise.
3118 (resolve_typename_type): Likewise.
3120 2004-02-29 Mark Mitchell <mark@codesourcery.com>
3123 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
3127 * class.c (update_vtable_entry_for_fn): Do not go through
3128 covariance machinery if the type returned by an overrider is the
3129 same as the original.
3131 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
3133 * call.c: Fix a comment typo.
3135 2004-02-27 Ziemowit Laski <zlaski@apple.com>
3137 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
3139 2004-02-26 Mark Mitchell <mark@codesourcery.com>
3142 * parser.c (cp_parser_parameter_declaration_list): Commit
3143 to fewer tentative parses.
3145 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3148 * pt.c (dependent_type_p_r): A template template parameter is a
3151 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3154 * mangle.c (write_template_arg_literal): Don't rely on identity for
3157 2004-02-24 Jason Merrill <jason@redhat.com>
3159 * tree.c (build_exception_variant): Use check_qualified_type.
3161 2004-02-23 Zack Weinberg <zack@codesourcery.com>
3162 Kazu Hirata <kazu@cs.umass.edu>
3164 * decl.c (cxx_init_decl_processing): Don't check
3165 flag_writable_strings.
3167 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
3170 * typeck.c (maybe_warn_about_returning_address_of_location):
3171 Change check for VAR_DECL to use DECL_P instead.
3173 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3176 * cvt.c (build_expr_type_conversion): Type must be complete before
3177 looking up for conversions.
3179 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3182 * name-lookup.c (arg_assoc_class): Don't look into template
3183 arguments if it is not a primary template.
3185 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3188 * method.c (use_thunk): Always clone function argument tree.
3190 2004-02-20 Mark Mitchell <mark@codesourcery.com>
3193 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
3196 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
3197 for all type variants.
3199 2004-02-19 Mark Mitchell <mark@codesourcery.com>
3202 * decl.c (duplicate_decls): Return error_mark_node for invalid
3204 * name-lookup.c (push_namespace): Ignore the return value from
3206 * pt.c (push_template_decl_real): Robustify.
3209 * name-lookup.c (push_class_level_binding): Do not complain about
3210 adding a binding for a member whose name is the same as the
3211 enclosing class if the member is located in a base class of the
3214 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3217 * parser.c (cp_parser_new_expression): Parse an ill-formed
3218 direct-new-declarator after a parenthesized type-id to emit good
3221 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
3223 * cp-tree.def, cvt.c: Update copyright.
3225 2004-02-17 Mark Mitchell <mark@codesourcery.com>
3228 * cp-tree.h (abi_version_at_least): Remove.
3229 * mangle.c: Include flags.h.
3231 2004-02-15 Mark Mitchell <mark@codesourcery.com>
3234 * call.c (build_conditional_expr): Handle conversions between
3235 class types which result in differently cv-qualified type
3239 * class.c (delete_duplicate_fields_1): Remove.
3240 (delete_duplicate_fields): Likewise.
3241 (finish_struct_anon): Remove check for members with the same name
3242 as their enclosing class.
3243 (check_field_decls): Do not call duplicate_fields.
3244 * decl.c (grokdeclarator): Remove check for static data members
3245 with the same name as their enclosing class.
3246 * name-lookup.c (push_class_level_binding): Check for members with
3247 the same name as their enclosing class.
3249 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
3252 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
3254 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3257 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
3258 has full set of arguments.
3260 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3263 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
3265 2004-02-13 Mark Mitchell <mark@codesourcery.com>
3268 * cp-tree.h (delete_sanity): Change prototype.
3269 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
3270 Remove dead code. Adjust code to warn about deleting an array.
3271 * typekc.c (decay_conversion): Use build_address and build_nop.
3274 * search.c (accessible_p): Do not check access in thunks.
3277 * call.c (build_conditional_expr): Call force_rvalue on the
3278 non-void operand in the case that one result is a throw-expression
3279 and the other is not.
3281 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
3284 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
3285 the type name and look ahead for ::~, and bail out early with a
3286 better error message if the parse is going to fail.
3288 2004-02-12 Mark Mitchell <mark@codesourcery.com>
3290 * call.c (conversion_kind): New type.
3291 (conversion_rank): Likewise.
3292 (conversion): Likewise.
3293 (CONVERSION_RANK): New macro.
3294 (conversion_obstack): New variable.
3295 (obstack_initialized): Likewise.
3296 (z_candidate): Change type of convs and second_conv.
3297 (candidate_warning): New type.
3298 (IDENTITY_RANK): Remove.
3299 (EXACT_RANK): Likewise.
3300 (PROMO_RANK): Likewise.
3301 (STD_RANK): Likewise.
3302 (PBOOL_RANK): Likewise.
3303 (USER_RANK): Likewise.
3304 (ELLIPSIS_RANK): Likewise.
3305 (BAD_RANK): Likewise.
3306 (ICS_RANK): Likewise.
3307 (ICS_STD_RANK): Likewise.
3308 (ICS_USER_FLAG): Likewise.
3309 (ICS_ELLIPSIS_FLAG): Likewise.
3310 (ICS_THIS_FLAG): Likewise.
3311 (ICS_BAD_FLAG): Likewise.
3312 (NEED_TEMPORARY_P): Likewise.
3313 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
3314 (USER_CONV_CAND): Likewise.
3315 (USER_CONV_FN): Likewise.
3316 (conversion_obstack_alloc): New function.
3317 (alloc_conversion): Likewise.
3318 (validate_conversion_obstack): Likewise.
3319 (alloc_conversions): Likewise.
3320 (build_conv): Adjust to deal with new conversion data structures.
3321 (build_identity_conv): New function.
3322 (build_ambiguous_conv): Likewise.
3323 (standard_conversion): Adjust to deal with new conversion data
3325 (convert_class_to_reference): Likewise.
3326 (direct_reference_binding): Likewise.
3327 (reference_binding): Likewise.
3328 (implicit_conversion): Likewise.
3329 (add_candidate): Likewise.
3330 (add_function_candidate): Likewise.
3331 (add_conv_candidate): Likewise.
3332 (build_builtin_candidate): Likewise.
3333 (print_z_candidate): Likewise.
3334 (merge_conversion_sequences): Likewise.
3335 (build_user_type_conversion_1): Likewise.
3336 (build_user_type_conversion): Likewise.
3337 (build_new_function_call): Likewise.
3338 (build_object_call): Likewise.
3339 (conditional_conversion): Likewise.
3340 (build_conditional_expr): Likewise.
3341 (build_new_op): Likewise.
3342 (build_op_delete_call): Likewise.
3343 (convert_like_real): Likewise.
3344 (build_over_call): Likewise.
3345 (build_new_method_call): Likewise.
3346 (is_subseq): Likewise.
3347 (maybe_handle_implicit_object): Likewise.
3348 (maybe_handle_ref_bind): Likewise.
3349 (compare_ics): Likewise.
3350 (source_type): Likewise.
3351 (add_warning): Likewise.
3353 (can_convert_arg): Likewise.
3354 (can_convert_arg_bad): Likewise.
3355 (perform_implicit_conversion): Likewise.
3356 (perform_direct_initialization_if_possible): Likewise.
3357 (initialize_reference): Likewise.
3358 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
3359 * cp-tree.def (WRAPPER): Likewise.
3360 (IDENTITY_CONV): Remove.
3361 (LVALUE_CONV): Likewise.
3362 (QUAL_CONV): Likewise.
3363 (STD_CONV): Likewise.
3364 (PTR_CONV): Likewise.
3365 (PMEM_CONV): Likewise.
3366 (BASE_CONV): Likewise.
3367 (REF_BIND): Likewise.
3368 (USER_CONV): Likewise.
3369 (AMBIG_CONV): Likewise.
3370 (RVALUE_CONV): Likewise.
3371 * cp-tree.h (tree_wrapper): Remove.
3372 (WRAPPER_ZC): Remove.
3373 (lang_tree_node): Remove wrapper.
3374 (LOOKUP_SPECULATIVELY): Remove.
3375 (build_op_delete_call): Adjust prototype.
3376 (validate_conversion_obstack): Declare.
3377 (build_zc_wrapper): Remove.
3378 * cvt.c (convert_to_reference): Remove dead code.
3379 (ocp_convert): Likewise.
3380 * decl.c (redeclaration_error_message): Correct handling of
3382 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
3383 (cp_tree_node_structure): Remove WRAPPER case.
3384 * decl2.c (finish_file): Call validate_conversion_obstack.
3385 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
3386 (build_op_delete_call): Likewise.
3387 (build_x_delete): Likewise.
3388 (build_delete): Adjust call to build_op_delete_call.
3389 * pt.c (tsubst_friend_declaration): Adjust code to determine
3390 whether or not a friend template is a definition.
3391 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
3392 * tree.c (build_zc_wrapper): Remove.
3394 2004-02-12 Zack Weinberg <zack@codesourcery.com>
3396 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
3397 * cp-tree.h: Don't declare cxx_builtin_type_decls.
3398 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
3399 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
3401 2004-02-10 Mark Mitchell <mark@codesourcery.com>
3403 * typeck.c (lookup_destructor): Fix typo in error message.
3405 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
3407 * call.c, parser.c, tree.c: Fix comment typos.
3409 2004-02-07 Zack Weinberg <zack@codesourcery.com>
3412 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
3413 * decl.c (duplicate_decls, start_function): Likewise.
3415 2004-02-07 Zack Weinberg <zack@codesourcery.com>
3417 * name-lookup.c (pushdecl): Issue shadow warnings directly.
3418 * parser.c (free_parser_stacks): Delete.
3420 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
3422 * rtti.c: Update copyright.
3424 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3427 * decl.c (require_complete_types_for_parms): Do not insert
3428 error_mark_node in the parameter list.
3430 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3433 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
3434 error when terminator can not be found.
3436 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
3438 Make-lang.in (po-generated): Delete.
3440 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
3442 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
3443 targetm.calls.promote_prototypes.
3445 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3449 2004-01-15 Geoffrey Keating <geoffk@apple.com>
3451 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
3452 (handle_pragma_implementation): Likewise.
3454 2004-02-05 Mark Mitchell <mark@codesourcery.com>
3457 * typeck.c (lookup_destructor): Tweak error message.
3459 2004-02-05 Jan Hubicka <jh@suse.cz>
3461 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
3464 2004-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3467 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
3468 code, only emits the diagnostic now. Added lookup of the identifier
3469 and support for qualified ids.
3470 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
3471 Parse an (invalid) type name as id-expression within a declarator.
3472 (cp_parser_simple_declaration): Use it.
3473 (cp_parser_member_declaration): Likewise.
3474 (cp_parser_make_typename_type): New function. Handle errors through
3475 cp_parser_diagnose_invalid_typename.
3476 (cp_parser_elaborated_type_specifier): Use it.
3478 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3481 * call.c (convert_like_real): Use "converting" rather than
3482 "argument" as the descriptive keyword to
3483 dubious_conversion_warnings.
3484 * typeck.c (convert_for_assignment): Do not call
3485 dubious_conversion_warnings.
3487 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3490 * init.c (build_delete): Emit a more informative error message in
3491 case of an incomplete type, and on the correct source line.
3493 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
3495 * error.c, search.c: Update copyright.
3497 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3500 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
3501 linkage for the typeinfo name string.
3503 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3506 * cp-tree.h (fold_non_dependent_expr): New function.
3507 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
3508 (cp_parser_template_argument): Use fold_non_dependent_expr.
3509 (cp_parser_direct_declarator): Likewise.
3510 * pt.c (fold_non_dependent_expr): New function.
3511 (convert_nontype_argument): Use it.
3512 (tsubst_qualified_id): Simplify.
3513 (tsubst_copy_and_build): Likewise.
3515 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3517 * decl.c (cxx_push_function_context): Do not set
3518 current_function_is_thunk.
3519 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
3522 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3525 * pt.c (more_specialized_class): Increase processing_template_decl
3526 while partial ordering.
3528 2004-02-03 Mark Mitchell <mark@codesourcery.com>
3531 * decl.c (start_function): Do not call pushdecl for any
3532 instantiation or specialization of a primary template.
3534 2004-02-03 Mark Mitchell <mark@codesourcery.com>
3537 * parser.c (cp_parser_class_name): Robustify.
3540 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
3543 * semantics.c (finish_id_expression): Do not return an
3544 IDENTIFIER_NODE when lookup finds a PARM_DECL.
3546 2004-02-03 Mark Mitchell <mark@codesourcery.com>
3549 * pt.c (build_non_dependent_expr): Do not build
3550 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
3553 * semantics.c (finish_id_expression): Do not return an
3554 IDENTIFIER_NODE when lookup finds a VAR_DECL.
3557 * parser.c (cp_parser_simple_declaration): When skipping to the
3558 end of the statement swallow the terminating semicolon.
3560 2004-02-02 Mark Mitchell <mark@codesourcery.com>
3563 * init.c (build_offset_ref): Improve error recovery for invalid
3564 uses of non-static member functions.
3567 * cp-tree.h (cp_build_type_attribute_variant): New function.
3568 * class.c (build_clone): Use cp_build_type_attribute_variant.
3569 * decl.c (duplicate_decls): Likewise.
3570 * pt.c (copy_default_args_to_explicit_spec): Likewise.
3571 (tsubst_function_type): Likewise.
3572 * tree.c (build_exception_variant): Check attributes before
3573 concluding that two types are the same.
3574 (cp_build_type-attribute_variant): New method.
3575 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
3578 * call.c (convert_class_to_reference): Keep better track of
3579 pedantically invalid user-defined conversions.
3581 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3584 * pt.c (tsubst_qualified_id): Improved error message when a type
3585 is expected but not found.
3587 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
3589 * class.c: Fix comment typos.
3591 * error.c: Likewise.
3592 * parser.c: Likewise.
3594 * search.c: Likewise.
3595 * typeck.c: Likewise.
3597 2004-01-30 Richard Henderson <rth@redhat.com>
3600 * method.c (use_thunk): Don't force_target_expr for void thunks.
3601 * tree.c (build_target_expr_with_type): Assert non-void type.
3602 (force_target_expr): Likewise.
3604 2004-01-30 Michael Matz <matz@suse.de>
3606 * parser.c (cp_parser_labeled_statement): Accept case ranges.
3608 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3612 * decl.c (grokdeclarator): Check immediatly type completeness for
3613 non-dependent types.
3615 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3618 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
3619 a sizeof expression.block
3621 2004-01-29 Mark Mitchell <mark@codesourcery.com>
3624 * mangle.c (write_encoding): Correct encoding of member template
3627 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3629 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
3630 template name as it was `<::' (digraph typo).
3631 (cp_parser_nth_token_starts_template_argument_list_p): New function.
3632 (cp_parser_id_expression): Use it.
3633 (cp_parser_nested_name_specifier_opt): Likewise.
3634 (cp_parser_template_name): Likewise.
3635 (cp_parser_class_name): Likewise.
3636 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
3638 2004-01-28 Mark Mitchell <mark@codesourcery.com>
3641 * typeck.c (merge_types): Do not merge attributes into
3645 * parser.c (cp_parser_direct_declarator): Do not prevent
3646 backtracking inside a parenthesized declarator.
3647 (cp_parser_parameter_declaration): Fix typo in comment.
3649 2004-01-28 Jan Hubicka <jh@suse.cz>
3651 * semantics.c (expand_body) Do emit_associated_thunks before
3654 2004-01-27 Devang Patel <dpatel@apple.com>
3656 * name-lookup.c: Include "debug.h"
3657 (do_namespace_alias): Invoke debug_hooks to emit debug info
3658 for namespace alias.
3659 (do_local_using_decl): Invoke debug_hooks to emit debug info
3661 (do_class_using_decl): Same.
3662 (do_toplevel_using_decl): Same.
3663 (do_using_directive): Same.
3664 (cp_emit_debug_info_for_using): New function.
3665 * Make-lang.in (cp/parser.o): Depend on debug.h
3666 (cp/name-lookup.o): Same.
3668 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3670 * cp-tree.h (language_function, lang_type_header): Use
3672 * name-lookup.h (cp_binding_level): Likewise.
3674 2004-01-26 Mark Mitchell <mark@codesourcery.com>
3677 * semantics.c (finish_for_expr): Check for unresolved overloaded
3680 * class.c (add_method): Just check processing_template_decl to
3681 determine whether or not we are within a template.
3682 * decl2.c (maybe_retrofit_in_chrg): Likewise.
3683 * init.c (decl_constant_value): Check the type of the declaration,
3685 * name-lookup.c (maybe_push_to_top_level): Rename to ...
3686 (push_to_top_level): ... this.
3687 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
3688 * pt.c (push_template_decl_real): Reorder condition for speed.
3689 (convert_template_argument): Use dependency-checking functions in
3690 place of uses_template_parms.
3691 (lookup_template_class): Avoid calling uses_template_parms more
3693 (uses_template_parms): Reimplement, using dependency-checking
3695 (instantiate_class_template): Use push_to_top_level, not
3696 maybe_push_to_top_level.
3697 (type_unification_real): Simplify.
3698 (type_dependent_expression_p): Handle OFFSET_REFs and
3700 (any_dependent_template_arguments_p): Handle multiple levels of
3702 * semantics.c (expand_or_defer_fn): Do not check
3703 uses_template_parms for template instantiations.
3704 * typeck.c (comptypes): Avoid calling cp_type_quals.
3706 2004-01-25 Mark Mitchell <mark@codesourcery.com>
3709 * call.c (build_over_call): Do not convert arguments when
3710 processing a template.
3711 * pt.c (build_non_dependent_expr): Do not build a
3712 NON_DEPENDENT_EXPR for arithmetic constants.
3714 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3717 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
3718 returns a TYPE_DECL. no further lookup is required.
3719 * semantics.c (check_template_template_default_arg): A TYPE_DECL
3720 is invalid. Rework to give better diagnostics.
3722 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3725 * pt.c (instantiate_class_template): Add an error_mark_node
3727 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
3729 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
3732 * decl.c (finish_function): Move the call to
3733 finish_fname_decls below the call to
3734 finish_eh_spec_block.
3736 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
3738 * optimize.c, typeck2.c: Update copyright.
3740 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
3742 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
3743 init.c, mangle.c, typeck.c: Update copyright.
3745 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
3747 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
3749 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
3751 * Make-lang.in: Replace $(docdir) with doc.
3752 (c++.info, c++.srcinfo): Dummy entry.
3753 (c++.man, c++.srcman): New rules.
3754 (c++.install-man): Revamp rule.
3756 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
3758 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
3759 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
3760 immediate $(shell) instead of deferred backquote.
3762 2004-01-19 Mark Mitchell <mark@codesourcery.com>
3765 * parser.c (cp_parser_postfix_expression): When encountering
3766 incomplete type on left-hand side of "->" or ".", treat the entire
3767 expression as erroneous.
3770 * call.c (build_field_call): Remove.
3771 (n_build_method_call): Likewise.
3772 (build_method_call): Likewise.
3773 (build_new_method_call): Do not call build_field_call.
3774 * class.c (n_build_method_call): Remove.
3775 (print_class_statistics): Do not print it.
3776 * cp-tree.h (build_method_call): Remove declaration.
3777 (finish_object_call_expr): Likewise.
3778 (build_new_1): Do not use build_method_call.
3779 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
3780 when the function appearing on the right-hand-side of "." or "->"
3781 is not actually a function.
3782 * pt.c (tsubst_copy_and_build): Likewise.
3783 * semantics.c (finish_object_call_expr): Remove.
3785 2004-01-18 Mark Mitchell <mark@codesourcery.com>
3788 * pt.c (tsubst): Use finish_typeof.
3790 2004-01-18 Jason Merrill <jason@redhat.com>
3793 * except.c (build_throw): In a template, set
3794 current_function_returns_abnormally.
3796 2004-01-17 Fred Fish <fnf@intrinsity.com>
3799 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
3800 except don't call array_type_nelts() with a VECTOR_TYPE.
3802 2004-01-16 Jan Hubicka <jh@suse.cz>
3804 * mangle.c (write_mangled_name): Remove inline modifier.
3806 2004-01-16 Mark Mitchell <mark@codesourcery.com>
3809 * decl.c (compute_array_index_type): Fix grammar in comment.
3810 * init.c (build_zero_init): Handle zero-sized arrays correctly.
3813 * call.c (name_as_c_string): Print conversion operator names
3817 * call.c (initialize_reference): Pass -1 for inner parameter to
3820 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3823 * parser.c (cp_parser_base_specifier): Check for an invalid
3824 keyword `typename' and emit an user-friendly error message.
3826 2004-01-15 Geoffrey Keating <geoffk@apple.com>
3829 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
3830 (handle_pragma_implementation): Likewise.
3832 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3835 * typeck.c (build_class_member_access_expr): Allow to access members
3836 of the currently open class.
3837 (finish_class_member_access_expr): Likewise.
3839 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
3842 * name-lookup.c (validate_nonmember_using_decl): Take scope and
3843 name by value, instead of computing them.
3844 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
3845 arguments. Pass them to validate_nonmember_using_decl.
3846 * name-lookup.h (do_local_using_decl): Adjust.
3847 (do_toplevel_using_decl): Likewise.
3848 * parser.c (cp_parser_using_declaration): Likewise.
3849 * pt.c (tsubst_expr): Likewise.
3851 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
3855 * name-lookup.c (qualified_lookup_using_namespace): Search
3856 strongly-associated namespaces first, and only then try other
3859 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
3861 * Make-lang.in (c++.srcextra): Dummy entry.
3863 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3866 * parser.c (cp_parser_template_name): Don't try to parse a
3867 conversion-function-id, as it cannot be a template-name.
3868 (cp_parser_simple_type_specifier): Check for invalid template-ids
3869 even after a built-in type.
3871 2004-01-14 Jan Hubicka <jh@suse.cz>
3874 * pt.c (instantiate_decl): Do not increase function_depth.
3876 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
3880 * parser.c (cp_parser_elaborated_type_specifier): Warn about
3881 attributes and discard.
3882 * decl.c (xref_tag): Don't overwite existing attributes with
3885 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3888 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
3889 is no destructor while looking up a BIT_NOT_EXPR.
3891 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
3893 * cxxfilt.c: Remove unused file.
3895 2004-01-14 Jan Hubicka <jh@suse.cz>
3897 Partial fix to PR c++/12850
3898 * decl2.c (mark_used): Do not proactively instantiate templates
3899 when compiling in unit-at-a-time or not optimizing.
3900 * optimize.c (maybe_clone_body): Do not increase function depth.
3902 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3905 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
3907 2004-01-12 Steven Bosscher <stevenb@suse.de>
3910 * parser.c (cp_parser_member_declaration): Any non-type is also
3911 not a class or a function.
3913 2004-01-12 Jason Merrill <jason@redhat.com>
3916 * class.c (build_base_path): Do not mark vtable references as
3918 (build_vtbl_ref_1): Likewise.
3920 2004-01-12 Richard Henderson <rth@redhat.com>
3923 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
3924 (store_init_value): Use it.
3925 * decl.c (check_initializer): Expect full initialization code
3926 from store_init_value.
3927 * init.c (expand_aggr_init_1): Likewise.
3928 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
3930 2004-01-12 Mark Mitchell <mark@codesourcery.com>
3932 * class.c (layout_class_type): For non-POD class types, also copy
3933 the DECL_SIZE and DECL_MODE of fields to the base class type.
3935 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3938 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
3939 calling regenerate_decl_from_template.
3941 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
3944 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
3945 decl-specifier occurring along with a class definition.
3947 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
3949 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
3950 clauses to comments describing declares_class_or_enum.
3951 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
3954 2004-01-12 Jan Hubicka <jh@suse.cz>
3956 * pt.c (for_each_template_parm): Do not check for duplicates.
3957 (for_each_template_parm): Use walk_tree duplicate checking code.
3959 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
3962 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
3963 is error_mark_node, don't add any more decl_specs.
3964 (cp_parser_init_declarator): After committing to a declaration, if
3965 the decl_specifiers start with error_mark_node, issue an error and
3966 change the type to "int".
3968 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
3971 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
3973 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3977 * pt.c (tsubst): Substitution must fail if we are attempting to
3978 create an array with element type that is an abstract class type.
3979 * decl.c (cp_finish_decl): Strip pointers and array types recursively
3980 before calling abstract_virtuals_error.
3982 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
3984 * name-lookup.c (qualified_lookup_using_namespace): Consider
3985 strong using directives even if we've already found a binding.
3987 2004-01-09 Mark Mitchell <mark@codesourcery.com>
3989 * cp-tree.h (cxx_expand_expr): Change prototype.
3990 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
3992 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3995 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
3996 looking into them recursively. They can be there because of the
3997 new __offsetof__ extension.
3999 2004-01-07 Zack Weinberg <zack@codesourcery.com>
4001 * parser.c (cp_parser_save_member_function_body): Mark the
4004 2004-01-05 Mark Mitchell <mark@codesourcery.com>
4007 * class.c (build_clone): Copy type attributes from the original
4008 function to the clone.
4011 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
4012 references as constant.
4015 * parser.c (cp_parser_explicit_instantiation): Improve error
4017 (cp_parser_require): Improve indication of the error location.
4020 * parser.c (cp_parser_class_head): Reorder logic to check for
4021 invalid qualification.
4023 2004-01-04 Mark Mitchell <mark@codesourcery.com>
4026 * name-lookup.c (lookup_using_namespace): Remove spacesp
4028 (unqualified_namespace_lookup): Likewise.
4029 (lookup_qualified_name): Adjust accordingly.
4030 (lookup_name_real): Likewise.
4031 (lookup_arg_dependent): Do not eliminate the namespace of the
4032 functions found by unqualified name lookup unless that is the
4035 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
4037 * semantics.c (push_deferring_access_checks): Fix format.
4038 (resume_deferring_access_checks): Likewise.
4039 (stop_deferring_access_checks): Likewise.
4040 (pop_deferring_access_checks): Likewise.
4041 (get_deferred_access_checks): Likewise.
4042 (pop_to_parent_deferring_access_checks): Likewise.
4043 (perform_deferred_access_checks): Likewise.
4044 (perform_or_defer_access_check): Likewise.
4046 2004-01-04 Richard Henderson <rth@redhat.com>
4048 * call.c (build_over_call): Don't create a save_expr of an
4049 aggregate, but rather its address.
4051 2004-01-04 Mark Mitchell <mark@codesourcery.com>
4054 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
4055 an offsetof expression.
4057 * parser.c (cp_parser_parameter_declaration): Fix comment.
4060 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
4061 (reference_binding): Set it when appropriate.
4062 (build_temp): New function, split out from ...
4063 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
4064 (initialize_reference): Likewise.
4067 * parser.c (cp_parser): Add in_type_id_in_expr_p.
4068 (cp_parser_new): Initialize it.
4069 (cp_parser_postfix_expression): Set it.
4070 (cp_parser_sizeof_operand): Likewise.
4071 (cp_parser_parameteR_declaration): Do not commit early to tenative
4072 parsers when in_type_id_in_expr_p is set.
4074 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4077 * parser.c (cp_parser_template_argument): Don't call
4078 make_unbound_class_template directly.
4079 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
4080 UNBOUND_CLASS_TEMPLATE tree node.
4082 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
4085 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
4087 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4090 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
4091 (DECL_FUNCTION_TEMPLATE_P): Use it.
4092 (DECL_CLASS_TEMPLATE_P): Likewise.
4093 * parser.c (cp_parser_lookup_name): Add is_template parameter.
4094 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
4095 (cp_parser_template_name): Likewise.
4096 (cp_parser_elaborated_type_specifier): Likewise.
4097 (cp_parser_namespace_name): Likewise.
4098 (cp_parser_class_name): Likewise.
4099 (cp_parser_lookup_name_simple): Likewise.
4101 See ChangeLog.3 for earlier changes.