1 2004-08-25 Roger Sayle <roger@eyesopen.com>
4 PR tree-optimization/16372
5 * decl.c (finish_enum): Make the precision of the enumerated type
6 the same width as the underlying integer type.
8 2004-08-25 Mark Mitchell <mark@codesourcery.com>
11 * lex.c (build_lang_decl): Set DECL_NO_STATIC_CHAIN for all C++
14 * mangle.c (get_identifier_nocopy): Add cast.
16 * cp-tree.h (mangle_type): Remove.
17 * mangle.c (globals): GTY it.
18 (mangle_obstack): New variable.
19 (name_obstack): Likewise.
20 (name_base): Likewise.
21 (write_char): Adjust accordingly.
22 (write_chars): Likewise.
23 (write_string): Likewise.
24 (start_mangling): Initialize G.substitutions only one. Add
26 (finish_mangling): Use VARRAY_CLEAR to reclaim
27 storage in G.substitutions. Use obstack_finish.
28 (init_mangle): Adjust for changes to variable names above.
29 Initialize G.substitutions.
30 (mangle_decl_string): Adjust call to start_mangling.
31 (get_identifier_nocopy): New function.
32 (mangle_decl): Use it.
33 (mangle_type_string): Adjust call to start_mangling.
34 (mangle_special_for_type): Likewise.
35 (mangle_vtt_for_type): Likewise.
36 (mangle_ctor_vtbl_for_type): Likewise.
37 (mangle_thunk): Likewise.
38 (mangle_guard_variable): Likewise.
39 (mangle_ref_init_variable): Likewise.
41 2004-08-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
44 * pt.c (redeclare_class_template): Check the type of non-type and
45 template template parameter.
47 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
50 * call.c (convert_class_to_reference): Adjust build_int_cst calls.
51 (build_user_type_conversion_1, convert_like_real,
52 build_java_interface_fn_ref, build_special_member_call): Likewise.
53 * class.c (finish_struct_1, build_vtbl_initializer): Likewise.
54 * cp-gimplify.c (cp_gimplify_expr): Likewise.
55 * cvt.c (cp_convert_to_pointer): Likewise.
56 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
57 * decl2.c (start_static_initialization_or_destruction,
58 generate_ctor_or_dtor_function): Likewise.
59 * except.c (build_throw): Likewise.
60 * mangle.c (write_integer_cst): Likewise.
61 * method.c (finish_thunk): Likewise.
62 * rtti.c (build_headof, get_tinfo_decl_dynamic,
63 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
64 get_pseudo_ti_init): Likewise.
65 * search.c (get_dynamic_cast_base_type): Likewise.
67 2004-08-25 Zack Weinberg <zack@codesourcery.com>
69 * class.c, search.c: Remove references to DWARF_DEBUG.
71 2004-08-25 Adam Nemet <anemet@lnxw.com>
73 * repo.c (extract_string): Reset backquote after one character.
74 (get_base_filename): Fix indentation.
75 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
77 * decl.c (cxx_init_decl_processing): Adjust
78 build_common_tree_nodes call.
80 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
83 * (is_subobject_of_p): Resurrect & optimize.
84 (lookup_field_r): Use it.
86 2004-08-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
89 * search.c (friend_accessible_p): Increment processing_template_decl
90 when deal with TEMPLATE_DECL of SCOPE.
92 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
95 * semantics.c (check_accessibility_of_qualified_id): Defer check
96 if qualifying_type is a template parameter.
98 2004-08-23 Mark Mitchell <mark@codesourcery.com>
101 * pt.c (instantiate_decl): Do not try to apply
102 DECL_DECLARED_INLINED_P to a VAR_DECL.
104 * search.c (build_baselink): Fix typo in comment.
106 2004-08-22 Andrew Pinski <apinski@apple.com>
109 2004-08-22 Andrew Pinski <apinski@apple.com>
111 * typeck.c (build_unary_op): Use &a.b if the folded lowered
112 expression is not constant.
114 2004-08-23 Nathan Sidwell <nathan@codesourcery.com>
116 * name-lookup.c (pushdecl): Rename build_type_copy call.
117 * tree.c (cp_build_qualified_type_real,
118 build_exception_variant, handle_java_interface_attribute): Likewise.
120 2004-08-22 Andrew Pinski <apinski@apple.com>
123 * typeck.c (build_unary_op): Use &a.b if the folded lowered
124 expression is not constant.
126 2004-08-20 Mark Mitchell <mark@codesourcery.com>
129 * decl.c (expand_static_init): Use DECL_FUNCTION_SCOPE_P.
131 2004-08-21 Joseph S. Myers <jsm@polyomino.org.uk>
134 * pt.c (tsubst_copy_and_build): Avoid clearing TREE_NO_WARNING for
137 2004-08-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
139 * pt.c (register_specialization): Check DECL_TEMPLATE_SPECIALIZATION
140 before calling comp_template_args.
142 2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
144 * class.c (build_vtbl_initializer): Use build_int_cst for
146 * decl.c (complete_array_type): Likewise.
147 * method.c (finish_thunk): Likewise.
149 2004-08-20 Andreas Tobler <a.tobler@schweiz.ch>
151 * tree.c: Remove unused mark_local_for_remap_r.
153 2004-08-19 Eric Christopher <echristo@redhat.com>
155 * cp-tree.h (cxx_unsave_expr_now): Delete prototype.
156 * tree.c (cxx_unsave_expr_now): Delete.
157 (cp_unsave_r): Ditto.
159 2004-08-19 Mark Mitchell <mark@codesourcery.com>
162 * pt.c (push_template_decl_real): Disallow template allocation
163 functions with fewer than two parameters.
165 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
167 * cp-tree.h (build_shared_int_cst): Remove.
168 * tree.c (shared_int_cache): Remove.
169 (build_shared_int_cst): Remove.
170 * class.c (finish_struct_1): Use build_int_cst.
172 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
174 * decl.c (finish_enum): Do not copy value node early, copy
176 * lex.c (cxx_init): Force null_node to be unique.
178 2004-08-19 Joseph S. Myers <jsm@polyomino.org.uk>
181 * pt.c (tsubst_copy, tsubst_copy_and_build): Copy TREE_NO_WARNING
182 from input for MODOP_EXPR.
184 2004-08-18 Mark Mitchell <mark@codesourcery.com>
186 * pt.c (dependent_template_p): Fix typo in commment.
189 * pt.c (dependent_template_p): Treat IDENTIFIER_NODEs as
192 2004-08-17 Mark Mitchell <mark@codesourcery.com>
195 * pt.c (unify): Tidy ARRAY_TYPE handling. Make sure that non-type
196 arguments have the same type as the corresponding parameter.
199 * parser.c (cp_parser_name_lookup_error): If parser->object_scope
200 is set use it for diagnostic purposes.
201 (cp_parser_pseudo_destructor_name): Remove special-case error
205 * semantics.c (expand_or_defer_fn): Honor -fkeep-inline-functions.
208 * cp-tree.h (qualified_name_lookup_error): Add parameter.
209 * name-lookup.c (do_class_using_decl): Restrict set of entities
210 passed to cp_emit_debug_info_for_using more carefully.
211 (lookup_qualified_name): Allow lookup_member to return sets of
213 * parser.c (cp_parser_lookup_name): Add ambiguous_p parameter.
214 (cp_parser_primary_expression): Handle ambiguous lookups.
215 (cp_parser_template_name): Adjust use of cp_parser_lookup_name.
216 (cp_parser_template_argument): Likewise.
217 (cp_parser_elaborate_type_specifier): Likewise.
218 (cp_parser_namespace_name): Likewise.
219 (cp_parser_class_name): Likewise.
220 (cp_parser_lookup_name_simple): Likewise.
221 * pt.c (tsubst_qualified_id): Handle ambiguous results.
222 (tsubst_expr): Likewise.
223 * semantics.c (qualified_name_lookup_error): Add decl paramter.
224 For ambiguous lookups, print candidates.
226 2004-08-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
229 * pt.c (instantiate_pending_templates): Add int parameter. Don't
231 * cp-tree.h (instantiate_pending_templates): Adjust prototype.
232 * decl2.c (finish_file): Adjust call to
233 instantiate_pending_templates.
235 2004-08-15 Roger Sayle <roger@eyesopen.com>
237 * call.c (build_vfield_ref, build_call, build_conditional_expr,
238 convert_arg_to_ellipsis, build_x_va_arg, build_over_call,
239 build_java_interface_fn_ref, build_special_member_call,
240 build_new_method_call, initialize_reference): Replace calls to
241 build with calls to buildN.
242 * class.c (build_base_path, convert_to_base_statically,
243 build_vfn_ref, instantiate_type, dfs_accumulate_vtbl_inits,
244 build_vtbl_initializer): Likewise.
245 * cp-gimplify.c (genericize_try_block, genericize_catch_block,
246 gimplify_if_stmt, cp_genericize_r): Likewise.
247 * cvt.c (convert_to_void): Likewise.
248 * decl.c (check_initializer, finish_constructor_body,
249 finish_destructor_body): Likewise.
250 * error.c (dump_expr): Likewise.
251 * except.c (build_exc_ptr, expand_start_catch_block, build_throw):
253 * init.c (perform_member_init, expand_virtual_init,
254 expand_cleanup_for_base, build_init, expand_default_init,
255 build_offset_ref, decl_constant_value, build_new, build_new_1,
256 build_vec_delete_1, build_vec_init, build_delete,
257 push_base_cleanups, build_vec_delete): Likewise.
258 * mangle.c (write_integer_cst): Likewise.
259 * method.c (thunk_adjust, do_build_copy_constructor,
260 do_build_assign_ref): Likewise.
261 * pt.c (lookup_template_function, tsubst, tsubst_copy_and_build,
262 unify, build_non_dependent_expr): Likewise.
263 * rtti.c (build_headof, build_typeid, ifnonnull,
264 build_dyanmic_cast_1, tinfo_base_init): Likewise.
265 * semantics.c (begin_compound_stmt, finish_call_expr,
266 finish_pseudo_destructor_expr, finish_id_expression,
267 simplify_aggr_init_expr, finalize_nrv_r): Likewise.
268 * tree.c (build_target_expr, build_cplus_new, array_type_nelts_top,
269 array_type_nelts_total, stabilize_call): Likewise.
270 * typeck.c (decay_conversion, build_class_member_access_expr,
271 lookup_destructor, build_ptrmemfunc_access_expr, build_array_ref,
272 get_member_function_from_ptrfunc, build_binary_op, pointer_diff,
273 build_x_unary_op, build_unary_op, unary_complex_lvalue,
274 build_compound_expr, build_modify_expr, expand_ptrmemfunc_cst,
275 check_return_expr): Likewise.
276 * typeck2.c (split_nonconstant_1, split_nonconstant_init_1,
277 split_nonconstant_init, store_init_value, build_m_component_ref):
280 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
282 * call.c (convert_class_to_reference,
283 build_user_type_conversion_1, convert_like_real,
284 build_java_interface_fn_ref, build_special_member_call): Use
286 * class.c (build_vtbl_initializer): Likewise.
287 * cp-gimplify.c (cp_gimplify_expr): Likewise.
288 * cvt.c (cp_convert_to_pointer): Likewise.
289 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
290 * decl2.c (start_static_initialization_or_destruction,
291 generate_ctor_or_dtor_function): Likewise.
292 * except.c (build_throw): Likewise.
293 * lex.c (cxx_init): Likewise.
294 * mangle.c (write_integer_cst): Likewise.
295 * rtti.c (build_headof, get_tinfo_decl_dynamic,
296 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
297 get_pseudo_ti_init): Likewise.
298 * search.c (get_dynamic_cast_base_type): Likewise.
299 * tree.c (build_shared_int_cst): Likewise.
301 2004-08-12 Mark Mitchell <mark@codesourcery.com>
304 * class.c (count_depth_data): New type.
305 (dfs_depth_post): New function.
306 (dfs_depth_q): Likewise.
307 (find_final_overrider_data_s): Change type of vpath.
309 (dfs_find_final_overrider_1): New function.
310 (dfs_find_final_overrider): Use it.
311 (dfs_find_final_overrider_q): Adjust use of vpath.
312 (dfs_find_final_overrider_post): Likewise.
313 (find_final_overrider): Use dfs_depth. Allocate and deallocate
316 2004-08-12 Jan Beulich <jbeulich@novell.com>
318 * parser.c (cp_parser_asm_definition): Properly consume scope operator
319 tokens preceding the clobbers. Don't check for scope operator
320 following inputs. Simplify inputs handling to match that now used for
323 2004-08-11 Mark Mitchell <mark@codesourcery.com>
326 * except.c (build_throw): Allocate cleanup_type and the function
327 for __cxa_throw separately.
330 * call.c (standard_conversion): Do not accept conversions between
331 pointers to members if the class types are unrelated.
334 * parser.c (cp_parser_builtin_offsetof): Cast to "const volatile
335 char &" instead of just "char &".
338 * pt.c (tsubst): Just return the unknown_type_node.
340 2004-08-11 Mark Mitchell <mark@codesourcery.com>
343 * parser.c (cp_parser_class_specifier): Robustify.
346 * pt.c (tsubst_copy_and_build): Complain about invalid
350 * pt.c (tsubst_default_argument): Clear out current_class_ptr and
351 current_class_ref while tsubsting.
353 2004-08-10 Mark Mitchell <mark@codesourcery.com>
356 * parser.c (cp_parser_init_declarator): Robustify.
358 2004-08-06 Richard Sandiford <rsandifo@redhat.com>
360 * typeck2.c (process_init_constructor): Guard the missing field warning
361 with warn_missing_field_initializers rather than extra_warnings.
363 2004-08-06 Paolo Bonzini <bonzini@gnu.org>
365 * class.c (instantiate_type) <ENTRY_VALUE_EXPR>: Do not handle.
367 2004-08-05 Mark Mitchell <mark@codesourcery.com>
369 * decl.c (start_preparsed_function): Move determine_visibility
371 * decl2.c (determine_visibility): Incorporate dllexport testing.
373 2004-08-05 Geoffrey Keating <geoffk@apple.com>
375 * g++spec.c (lang_specific_driver): An -Xlinker or -Wl, option
376 means that libstdc++ is needed.
378 2004-08-05 Nathan Sidwell <nathan@codesourcery.com>
380 * cvt.c (cp_convert_to_pointer): Adjust force_fit_type call.
382 2004-08-04 Geoffrey Keating <geoffk@apple.com>
384 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_ASSEMBLER_NAME rather
385 than passing it as a parameter to rest_of_decl_compilation.
386 * decl2.c (grokfield): Use set_user_assembler_name.
388 2004-08-04 Nathan Sidwell <nathan@codesourcery.com>
390 * decl.c (complete_array_type): Don't gratuitously copy
391 maxindex. Its type is always set.
393 2004-08-04 Paul Brook <paul@codesourcery.com>
395 * Make-lang.in (cp/semantics.o, cp/optimize.o): Depend on TARGET_H.
396 * cp-tree.h (struct language_function): Rename x_dtor_label to
398 (dtor_label): Rename ...
399 (cdtor_label): ... to this.
400 * decl.c (begin_constructor_body): Remove.
401 (check_special_function_return_type): Maybe change the return type.
402 (grokdeclarator): Pass the class type.
403 (start_preparsed_function): Constructors may need a return label.
404 (finish_constructor_body, finish_destructor_body): Set the return
406 (begin_function_body): Don't call begin_constructor_body.
407 (finish_function): Don't warn for constructors or destructors.
408 (implicitly_declare_fn): Maybe change the return type.
409 * optimize.c: Include target.h.
410 (maybe_clone_body): Remap the function result.
411 * semantics.c: Include target.h.
412 (finish_return_stmt): Maybe jump to return label for constructors.
414 2004-08-03 Mark Mitchell <mark@codesourcery.com>
416 * class.c (build_vtable): Do not set DECL_VISIBILITY here.
417 (check_field_decls): Or here.
418 (check_methods): Or here.
419 (initialize_array): Don't mess with DECL_CONTEXT.
420 * cp-tree.h (start_decl): Adjust prototype.
421 (determine_visibility): New function.
422 * decl.c (duplicate_decls): Remove checks for hidden "operator
424 (build_library_fn_1): Give all library functions default
426 (start_decl): Add pop_scope_p parameter. Tidy.
427 (cp_finish_decl): Do not pop scopes here. Call
428 determine_visibility for variable definitions.
429 (start_preparsed_function): Call determine_visibility.
430 * decl2.c (determine_visibility): New function.
431 * method.c (use_thunk): Fix formatting.
432 * parser.c (cp_parser_condition): Adjust calls to start_decl.
433 (cp_parser_init_declarator): Likewise.
434 * pt.c (instantiate_decl): Always call pop_nested_class.
435 * rtti.c (get_tinfo_decl): Do not set DECL_VISIBILITY.
436 (tinfo_base_init): Likewise.
438 2004-08-02 Mark Mitchell <mark@codesourcery.com>
441 * name-lookup.c (validate_nonmember_using_decl): Robustify.
443 2004-08-01 Mark Mitchell <mark@codesourcery.com>
446 * name-lookup.c (decl_namespace): Remove.
447 (current_decl_namespace): Use decl_namespace_context instead of
449 (push_decl_namespace): Likewise.
450 (arg_assoc_class): Likewise.
451 (arg_assoc_type): Likewise.
452 * pt.c (check_specialization_namespace): New function.
453 (maybe_process_partial_specialization): Use it.
454 (register_specialization): Likewise.
457 * cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): New macro.
458 * call.c (null_ptr_cst_p): Handle variables with constant
460 * pt.c (convert_nontype_argument): Use
461 DECL_INTEGRAL_CONSTANT_VAR_P.
462 * semantics.c (finish_id_expression): Likewise.
465 * decl.c (duplicate_decls): Reject duplicate namespace
469 * typeck.c (build_ptrmemfunc): Loosen assertion.
471 2004-08-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
473 * call.c (z_candidate::template_decl): Rename from template.
474 (add_template_candidate_real): Adjust member reference.
477 2004-07-29 Mark Mitchell <mark@codesourcery.com>
479 * cp-tree.h (IDENTIFIER_REPO_CHOSEN): Define.
480 (lang_decl_flags): Narrow the width of "languages". Add
482 (DECL_NEEDED_P): Remove.
483 (FOR_EACH_CLONE): New macro.
484 (DECL_REPO_AVAILABLE_P): Likewise.
485 (DECL_TINFO_P): Likewise.
486 (set_linkage_according_to_type): Declare.
487 (import_export_vtable): Remove.
488 (import_export_tinfo): Likewise.
489 (mark_needed): New function.
490 (decl_needed_p): Likewise.
491 (note_vauge_linkage_fn): Likewise.
492 (init_repo): Change prototype.
493 (repo_template_used): Remove.
494 (repo_template_instantiated): Likewise.
495 (repo_emit_p): New function.
496 (repo_export_class_p): Likewise.
497 (no_linkage_check): Change prototype.
498 * class.c (set_linkage_according_to_type): New function.
499 (build_vtable): Use it. Do not call import_export_vtable. Set
500 DECL_IGNORED_P if appropriate.
501 * decl.c (duplicate_decls): Preserve DECL_REPO_AVAILABLE_P.
502 (make_rtL_for_nonlocal_decls): Check for template instantiations
504 (grokfndecl): Adjust call to no_linkage_check.
505 (set_linkage_for_static_data_member): New function.
506 (grokvardecl): Use it. Adjust call to no_linkage_check.
507 (grokdeclarator): Use set_linkage_for_static_data_member.
508 * decl2.c (note_vague_linkage_fn): New function.
509 (note_vague_linkage_var): Likewise.
510 (finish_static_data_member_decl): Use it.
511 (import_export_vtable): Remove.
512 (import_export_class): Use repo_export_class_p.
513 (var_finalized_p): Simplify.
514 (maybe_emit_vtables): Simplify.
515 (mark_needed): New function.
516 (decl_needed_p): Likewise.
517 (import_export_decl): Add documentation and consistency checks.
518 Use repo_emit_p. Handle virtual tables and RTTI information
520 (import_export_tinfo): Remove.
521 (write_out_vars): Call import_export_decl.
522 (cxx_callgraph_analyze_expr): Ensure that all vtables are emitted
524 (finish_file): Use decl_needed_p. Do not call import_export_decl
525 for undefined static data members. Do not warn about undefined
526 inlines when using a repository.
527 (mark_used): Use note_vague_linkage_fn. Always defer template
529 * lex.c (cxx_init): Adjust call to init_repo. Always set
531 * method.c (synthesize_method): Remove unncessary
532 import_export_decl call.
533 (implicitly_declare_fn): Use set_linkage_according_to_type.
534 * optimize.c (maybe_clone_body): Use FOR_EACH_CLONE.
535 * pt.c (instantiate_class_template): Don't redundantly add classes
536 to keyed_classes. Don't call repo_template_used.
537 (tsubst_decl): Set DECL_INTERFACE_KNOWN for instantiations of
538 templates with internal linkage.
539 (check_instantiated_args): Adjust call to no_linkage_check.
540 (instantiate_template): Use FOR_EACH_CLONE.
541 (mark_definable): New function.
542 (mark_decl_instantiated): Use it.
543 (do_decl_instantiation): Adjust tests for explicit instantiation
544 after "extern template".
545 (instantiate_class_member): Do not use repo_template_instantiated.
546 (do_type_instantiation): Simplify.
547 (instantiate_decl): Use mark_definable. Check repo_emit_p.
549 * repo.c (repo_get_id): Remove.
550 (original_repo): Remove.
551 (IDENTIFIER_REPO_USED): Remove.
552 (IDENTIFIER_REPO_CHOSEN): Remove.
553 Remove all #if 0'd code.
554 (repo_template_used): Remove.
555 (repo_template_instantiated): Remove.
556 (temporary_obstack_initialized_p): New variable.
557 (init_repo): Register with lang_post_pch_load. Avoid creating
558 identifiers unnecessarily. Don't use original_repo. Close the
560 (reopen_repo_file_for_write): Not here.
561 (finish_repo): Always write out a new repository file.
562 (repo_emit_p): New function.
563 (repo_export_class_p): Likewise.
564 * rtti.c (get_tinfo_decl): Use set_linkage_according_to_type.
565 (involves_incomplete_p): New function.
566 (tinfo_base_init): Use it.
567 (ptr_initializer): Remove non_public_ptr parameter.
568 (ptm_initializer): Likewise.
569 (get_pseudo_ti_init): Likewise.
570 (unemitted_tinfo_decl_p): Remove.
571 (emit_tinfo_decl): Use import_export_decl.
572 * semantics.c (expand_body): Move updates of static_ctors and
574 (expand_or_defer_fn): ... here.
575 * tree.c (no_linkage_check): Add relaxed_p parameter.
577 2004-07-28 Eric Christopher <echristo@redhat.com>
579 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
581 2004-07-28 Nathan Sidwell <nathan@codesourcery.com>
583 * cp-tree.h (struct tree_pair_s): New.
584 (typedef tree_pair_p): New.
585 (DEF_VEC_O(tree_pair_s)): New.
586 (struct lang_type_class): Make vcall_indices a VEC(tree_pair_s).
587 (CLASSTYPE_VCALL_INDICES): Update documentation.
588 * class.c (get_vcall_index): Adjust.
589 (add_vcall_offset): Adjust.
591 2004-07-27 Kelley Cook <kcook@gcc.gnu.org>
593 * pt.c, typeck.c: Remove spurious carriage returns.
595 2004-07-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
598 * pt.c (coerce_template_template_parms) <PARM_DECL case>: Only check
599 when the type of ARG is not dependent.
601 2004-07-26 Geoffrey Keating <geoffk@apple.com>
603 * g++spec.c (LIBSTDCXX_PROFILE): Default to LIBSTDCXX.
604 (lang_specific_driver): If the C++ or math library options don't
605 start with '-l', don't count them as added libraries.
607 2004-07-26 Nathan Sidwell <nathan@codesourcery.com>
609 * decl.c (xref_basetypes): Adjust base access vector creation.
610 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Adjust base
612 * search.c (dynamic_cast_base_recurse, dfs_access_in_type): Likewise.
614 2004-07-26 Niall Douglas <s_fsfeurope2@nedprod.com>
615 Brian Ryner <bryner@brianryner.com>
619 * class.c (check_field_decls): Apply hidden visibility if
620 -fvisibility-inlines-hidden and inlined unless otherwise specified
621 (build_vtable): Set vtable visibility to class visibility.
622 (check_field_decls): Default static member visibility to class
624 (check_methods): Default method visibility to class visibility.
625 * cp-tree.h: Added CLASSTYPE_VISIBILITY and
626 CLASSTYPE_VISIBILITY_SPECIFIED macro.
627 * decl.c (duplicate_decls): New logic for merging definition decls
628 with declaration decls. Added ignore & warning when non default
629 applied to global operator new or delete.
630 * method.c, optimize.c, rtti.c: Added setting of VISIBILITY_SPECIFIED
631 wherever VISIBILITY was changed
632 * rtti.c (get_tinfo_decl): Set typeinfo visibility to class
634 (tinfo_base_init): Set typeinfo name visibility to class visibility.
636 2004-07-25 Bernardo Innocenti <bernie@develer.com>
638 * decl.c: Rename all identifiers named `class' to `cl'.
639 * cp-tree.h: Likewise.
641 2004-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
643 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Use GGC_CNEW.
644 * typeck2.c (abstract_virtuals_error): Use GGC_NEW.
645 * name-lookup.c (binding_entry_make): Use GGC_NEW.
646 (binding_table_construct): Use GGC_CNEWVEC.
647 (binding_table_new): Use GGC_NEW.
648 (cxx_binding_make): Likewise.
649 (begin_scope): Likewise.
650 (push_to_top_level): Use GCC_CNEW.
651 * parser.c (cp_token_cache_new): Likewise.
652 (cp_token_cache_push_token): Likewise.
653 (cp_lexer_new_main): Likewise.
654 (cp_lexer_new_from_tokens): Likewise.
655 (cp_parser_context_new): Likewise.
656 (cp_parser_new): Likewise.
657 (cp_lexer_new_from_tokens): Use GGC_NEWVEC.
658 * lex.c (cxx_make_type): Use GGC_CNEW.
659 (retrofit_lang_decl): Use GGC_NEWVAR.
660 (cxx_dup_lang_specific_decl): Likewise.
661 (copy_lang_type): Likewise.
662 * decl.c (use_label): Use GGC_NEW instead of ggc_alloc.
663 (save_function_data): Likewise.
664 (lookup_label): Use GGC_CNEW instead of ggc_alloc_cleared.
665 (cxx_push_function_context): Likewise.
667 2004-07-25 Richard Henderson <rth@redhat.com>
669 * decl.c (start_preparsed_function): Set DECL_ARTIFICIAL and
670 DECL_IGNORED_P on RESULT_DECL.
671 * semantics.c (finalize_nrv): Copy them too.
673 2004-07-23 Nathan Sidwell <nathan@codesourcery.com>
675 * search.c (lookup_conversion_operator): Avoid two loops.
676 (add_conversions): Remove.
677 (check_hidden_convs, split_conversions,
678 lookup_conversions_r): New.
679 (lookup_conversions): Use lookup_conversions_r.
681 2004-07-22 Nathan Sidwell <nathan@codesourcery.com>
683 * pt.c (get_template_base): Check type is completable.
685 2004-07-21 Eric Christopher <echristo@redhat.com>
687 * decl.c (poplevel): Inline unused variable checking.
690 2004-07-21 Paolo Bonzini <bonzini@gnu.org>
692 * typeck.c (build_binary_op): Do not use RDIV_EXPR for
695 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
698 * pt.c (check_explicit_specialization): Remove extension to accept
699 specializations without template headers. Fall-through to normal
702 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
705 * pt.c (determine_specialization): New parameter template_count.
706 Disambiguate between member templates and member functions counting
707 the template headers.
708 (check_explicit_specialization): Update caller.
709 (tsubst_friend_function): Likewise.
711 2004-07-20 Steven Bosscher <stevenb@suse.de>
713 * cp-tree.def (TINST_LEVEL): Make it an 'x' node.
714 * cp-tree.h (tinst_level_t): New tree type.
715 (union lang_tree_node): Handle it.
716 (TINST_LOCATION): New accessor macro.
717 (make_tinst_level): New prototype.
718 * cp-lang.c (cp_tree_size): Handle TINST_LEVEL.
719 * decl.c (cp_tree_node_structure): Likewise.
720 * error.c (print_instantiation_full_context): Use TINST_LOCATION.
721 (print_instantiation_partial_context): Likewise.
722 * pt.c (pop_tinst_level): Likewise.
723 (push_tinst_level): Use make_tinst_level.
724 * tree.c (make_tinst_level): New function.
725 (cp_walk_subtrees): Walk TINST_DECL for a TINST_LEVEL node.
727 2004-07-20 Mark Mitchell <mark@codesourcery.com>
729 * parser.c (cp_parser_simple_type_specifier): Fix typo.
732 * parser.c (cp_parser_simple_type_specifier): Do not record usage
733 of globally-qualified names.
735 2004-07-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
738 * error.c (dump_type) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Output
741 2004-07-19 Mark Mitchell <mark@codesourcery.com>
744 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
745 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
746 * class.c (add_implicitly_declared_members): Use
747 CLASSTYPE_LAZY_ASSIGNMENT_OP.
748 * method.c (lazily_declare_fn): Clear
749 CLASSTYPE_LAZY_ASSIGNMENT_OP.
750 * search.c (lookup_fnfields_1): Check it.
752 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
754 * cp-tree.h (vec_binfo_member): Remove.
755 * tree.c (vec_binfo_member): Remove.
757 * cp-tree.h (struct lang_type_class): Remove vfields field.
758 (CLASSTYPE_VFIELDS): Remove.
759 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
760 * class.c (determine_primary_base): Remove CLASSTYPE_VFIELDS
762 (dfs_modify_vtables): Use TYPE_CONTAINS_VPTR_P.
763 (finish_struct_1): Remove CLASSTYPE_VFIELDS handling.
764 * init.c (dfs_initialize_vtbl_ptrs): Use TYPE_CONTAINS_VPTR_P.
766 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
768 * cp-tree.h (DEF_VEC_P(tree)): Remove here.
769 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
771 (BINFO_LANG_SLOTS): Remove.
772 * tree.c (copy_binfo): Adjust BINFO creation and accessors.
773 * decl.c (xref_basetypes): Adjust BINFO creation and accessors.
774 * class.c (check_bases): Adjust BINFO accessors.
775 (determine_primary_base, finish_struct_bits,
776 maybe_warn_about_overly_private_class, warn_hidden,
777 walk_subobject_offsets, propagate_binfo_offsets, end_of_class,
778 warn_about_ambiguous_bases, get_vfield_name,
779 dump_class_hierarchy_r, build_vtt_inits, accumulate_vtbl_inits,
780 add_vcall_offset_vtbl_entries_r): Likewise.
781 * dump.c (cp_dump_tree): Likewise.
782 * init.c (sort_mem_initializers, expand_member_init, build_delete,
783 push_base_cleanups): Likewise.
784 * method.c (do_build_copy_constructor, do_build_assign_ref,
785 synthesize_exception_spec): Likewise.
786 name-lookup.c (arg_assoc_class): Likewise.
787 * pt.c (instantiate_class_template,
788 get_template_base_recursive): Likewise.
789 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Likewise.
790 * typeck2.c (process_init_constructor): Likewise.
791 * search.c (lookup_base_r, dynamic_cast_base_recurse,
792 dfs_access_in_type, dfs_walk_real, look_for_overrides,
793 types_overlap_p, copied_binfo, original_binfo): Likewise.
794 (binfo_for_vtable): Remove
796 2004-07-20 Steven Bosscher <stevenb@suse.de>
798 * cp-tree.h (struct lang_decl_flags): Unify the template_info and
799 thunk_alias, and the access and virtual_offset fields.
800 (THUNK_VIRTUAL_OFFSET, THUNK_ALIAS): Adjust.
801 * decl.c (finish_case_label): Update c_add_case_node call.
803 2004-07-19 Mark Mitchell <mark@codesourcery.com>
805 Revert patch for PR c++/16623.
807 2004-07-19 Kelley Cook <kcook@gcc.gnu.org>
809 * except.c: Remove two spurious carriage returns.
811 2004-07-19 Mark Mitchell <mark@codesourcery.com>
814 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
815 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
816 * class.c (add_implicitly_declared_members): Use
817 CLASSTYPE_LAZY_ASSIGNMENT_OP.
818 * method.c (lazily_declare_fn): Clear
819 CLASSTYPE_LAZY_ASSIGNMENT_OP.
820 * search.c (lookup_fnfields_1): Check it.
822 2004-07-19 Nathan Sidwell <nathan@codesourcery.com>
824 * class.c (add_method): Delay adding the slot until the end.
825 (determine_primary_base): Adjust VEC_iterate invokation.
826 (resort_type_method_vec, finish_struct_methods, warn_hidden,
827 walk_subobject_offsets, end_of_class, warn_about_ambiguous_bases,
828 build_vtbl_initializer): Likewise.
829 * init.c (sort_mem_initializers, build_delete, push_base_cleanups,
830 build_vbase_delete): Likewise.
831 * method.c (do_build_copy_constructor): Likewise.
832 * name-lookup.c (new_class_binding, print_binding_level,
833 poplevel_class, store_class_bindings, push_to_top_level,
834 pop_from_top_level): Likewise.
835 * pt.c (check_explicit_specialization): Likewise.
836 * search.c (lookup_conversion_operator, lookup_fnfields_1,
837 get_pure_virtuals, add_conversions, dfs_check_overlap,
838 binfo_for_vbase): Likewise.
840 2004-07-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
843 * pt.c (unify) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Use only
844 innermost set of template arguments during deduction. Simplify.
846 2004-07-19 Joseph S. Myers <jsm@polyomino.org.uk>
848 * typeck.c (build_modify_expr, build_x_modify_expr): Set
849 TREE_NO_WARNING on assignments with an operator other than '='.
851 2004-07-10 Steven Bosscher <stevenb@suse.de>
852 Joseph S. Myers <jsm@polyomino.org.uk>
854 * cp-tree.h (C_SET_EXP_ORIGINAL_CODE): Remove.
855 * decl2.c (grokfield): Don't check current_class_depth via
856 unused TREE_COMPLEXITY.
857 * semantics.c (finish_parenthesized_expr): Set TREE_NO_WARNING
858 to avoid the missing parentheses warning.
859 Don't set C_SET_EXP_ORIGINAL_CODE.
861 2004-07-18 Mark Mitchell <mark@codesourcery.com>
863 * tree.c (no_linkage_helper): Remove.
864 (no_linkage_check): Don't use walk_tree_without_duplicates.
866 * mangle.c (write_expression): Issue a sorry for zero-operand
869 2004-07-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
872 * init.c (build_offset_ref): Build SCOPE_REF with non-null
873 TREE_TYPE for non-dependent names.
874 * typeck.c (build_x_unary_op): Handle non-dependent SCOPE_REF.
875 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
876 unknown_type_node as its TREE_TYPE.
877 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
878 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
879 (dump_expr) <SCOPE_REF case>: Likewise.
881 2004-07-17 Jason Merrill <jason@redhat.com>
884 * call.c (type_passed_as): Make the invisible reference type
886 * cp-gimplify.c (gimplify_cleanup_stmt): Rename to
887 cp_genericize_r. Handle invisible reference lowering.
888 (is_invisiref_parm): New fn.
889 (cp_genericize): Adjust the types of invisible reference parms.
890 Don't repeat the walk for clones.
891 * decl.c (store_parm_decls): Don't generate any code for clones.
893 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
895 * cp-tree.h (builtin_function): Declare.
897 2004-07-16 Mark Mitchell <mark@codesourcery.com>
899 * class.c (finish_struct_methods): Remove unncessary code.
900 (add_implicitly_declared_members): Create declarations for default
901 constructors and copy constructors lazily.
902 * cp-tree.h (lang_type_class): Remove lazy_default_ctor and
904 (CLASSTYPE_LAZY_DEFAULT_CTOR): New macro.
905 (CLASSTYPE_LAZY_COPY_CTOR): Likewise.
906 * decl2.c (check_classfn): Robustify.
907 (locate_dtor): Handle empty CLASSTYPE_METHOD_VEC.
908 (locate_ctor): Handle lazy default constructors.
909 (locate_copy): Handle lazy copy constructors.
910 (implicitly_declare_fn): Make sure we're looking at the
911 TYPE_MAIN_VARIANT for a class before creating functions. Don't
912 set TYPE_HAS_CONSTRUCTOR.
913 (lazily_declare_fn): New function.
914 * name-lookup.c (constructor_name_full): Simplify.
915 * search.c (lookup_fnfields_1): Lazily create methods, as
917 (lookup_for_overrides): Handle empty CLASSTYPE_METHOD_VEC.
919 2004-07-16 Steven Bosscher <stevenb@suse.de>
921 * cp-tree.h (struct lang_type): Don't have three GTY options on a
924 2004-07-16 Richard Henderson <rth@redhat.com>
926 * cp-lang.c (LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING): Die.
927 * cp-tree.h (cp_copy_res_decl_for_inlining): Remove.
928 * tree.c (cp_copy_res_decl_for_inlining): Remove.
930 2004-07-16 Nathan Sidwell <nathan@codesourcery.com>
932 * class.c (finish_struct_bits): Use for loop.
933 (propagate_binfo_offsets): Do primary binfo outside of loop.
936 * dump.c (cp_dump_tree): Don't dump the bases if there's no
939 * pt.c (tsubst) <TREE_BINFO case>: We should never get here.
941 2004-07-15 Mark Mitchell <mark@codesourcery.com>
943 * cp-tree.h (lang_type_class): Remove has_real_assign_ref and
944 has_abstract_assign_ref. Make methods a VEC(tree) *.
945 (TYPE_HAS_CONST_ASSIGN_REF): Add documentation.
946 (CLASSTYPE_CONSTRUCTORS): Adjust for changes to CLASSTYPE_METHOD_VEC.
947 (CLASSTYPE_DESTRUCTORS): Likewise.
948 (TYPE_HAS_REAL_ASSIGN_REF): Remove.
949 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
950 (add_method): Change prototoype.
951 * class.c (add_method): Remove error_p parameter. Adjust for
952 changes to CLASSTYPE_METHOD_VEC.
953 (handle_using_decl): Adjust call to add_method.
954 (maybe_warn_about_overly_private_class): Adjust for
955 changes to CLASSTYPE_METHOD_VEC.
956 (resort_type_method_vec): Likewise.
957 (finish_struct_methods): Likewise.
958 (check_for_override): Likewise.
959 (warn_hidden): Likewise.
960 (add_implicitly_declared_members): Defer creation of assignment
961 operators. Adjust call to add_method.
962 (clone_function_decl): Adjust call to add_method.
963 (check_bases_and_members): Don't set TYPE_HAS_REAL_ASSIGN_REF.
964 (finish_struct_1): Use CLASSTYPE_DESTRUCTORS.
965 * decl.c (grok_special_member_properties): Don't set
966 TYPE_HAS_ABSTRACT_ASSIGN_REF.
967 * decl2.c (check_classfn): Adjust for
968 changes to CLASSTYPE_METHOD_VEC.
969 * method.c (locate_dtor): Use CLASSTYPE_DESTRUCTORS.
970 (locate_ctor): Use CLASSTYPE_CONSTRUCTORS.
971 (locate_copy): Adjust for changes to CLASSTYPE_METHOD_VEC.
972 (implicitly_declare_fn): Set DECL_SOURCE_LOCATION. Do not call
974 * pt.c (check_explicit_specialization): Adjust for
975 changes to CLASSTYPE_METHOD_VEC.
976 (instantiate_class_template): Do not set
977 TYPE_HAS_ABSTRACT_ASSIGN_REF.
978 * ptree.c (cxx_print_type): Don't try to print
979 CLASSTYPE_METHOD_VEC.
980 * rtti.c (emit_support_tinfos): Use CLASSTYPE_DESTRUCTORS.
981 * search.c (lookup_field_r): Adjust for
982 changes to CLASSTYPE_METHOD_VEC.
983 (lookup_fnfields): Likewise.
984 (lookup_conversion_operator): Likewise.
985 (lookup_fnfields_1): Likewise. Create assignment operators
987 (look_for_overrides_here): Adjust for
988 changes to CLASSTYPE_METHOD_VEC.
989 (add_conversions): Likewise.
990 * semantics.c (finish_member_declaration): Adjust call to add_method.
992 2004-07-15 Jason Merrill <jason@redhat.com>
994 * cp-lang.c (cxx_types_compatible_p): To the middle-end,
995 references and pointers are compatible.
997 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
999 * decl.c (xref_basetypes): Refactor.
1000 * tree.c (copy_base_binfos): Replace with ...
1001 (copy_binfo): ... this. Deep copy the given binfo, (not the just
1002 bases of the given base).
1003 * cp-tree.h (copy_base_binfo): Remove.
1004 (copy_binfo): Declare.
1006 2004-07-15 Mark Mitchell <mark@codesourcery.com>
1008 * name-lookup.c (set_inherited_value_binding_p): Add class_type
1010 (get_class_binding): Adjust.
1011 (push_class_level_binding): Don't use set_inherited_value_binding_p.
1013 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
1015 * class.c (finish_struct_bits): Don't set TYPE_HAS_CONVERSION here.
1016 * decl.c (xref_basetypes): Set it here.
1018 * class.c (check_bases): Don't set CLASSTYPE_NON_AGGREGATE here.
1019 Don't check for incomplete base.
1020 (get_vfield_name): Simplify while loop.
1021 * decl.c (xref_basetypes): Set CLASSTYPE_NON_AGGREGATE here.
1023 2004-07-14 Mark Mitchell <mark@codesourcery.com>
1025 * lex.c (cxx_make_type): Remove call to get_pointer_type.
1027 * cp-tree.h (IDENTIFIER_VALUE): Remove.
1028 (BINFO_PUSHDECLS_MARKED): Likewise.
1029 (maybe_inject_for_scope_var): Likewise.
1030 (push_class_decls): Likewise.
1031 * name-lookup.h (push_class_binding): Remove.
1032 (innermost_non_namespace_value): New function.
1033 (outer_binding): Likewise.
1034 * class.c (add_method): Push bindings before adding to
1036 (restore_class_cache): Do not restore class_shadowed.
1037 (pushclass): Do not add USING_DECLs. Do not call
1039 * config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c.
1040 * decl.c (pushdecl): Use outer_binding.
1041 (poplevel): Set the scope for an out-of-scope for-loop declaration
1043 (cp_finish_decl): Don't call maybe_inject_for_scope_var.
1044 * name-lookup.c (new_class_binding): New function.
1045 (push_binding): Use it.
1046 (pushdecl): Use innermost_non_namespace_value.
1047 (maybe_inject_for_scope_var): Remove.
1048 (push_class_binding): Remove.
1049 (set_inherited_value_binding_p): New function.
1050 (get_class_binding): New function.
1051 (push_class_level_binding): Assert that the current_class_type is
1053 (outer_binding): New function.
1054 (innermost_non_namespace_value): Likewise.
1055 (lookup_name_real): Use outer_binding.
1056 (lookup_name_current_level): Ignore out-of-scope variables.
1057 * pt.c (check_template_shadow): Use innermost_non_namespace_value.
1058 (lookup_template_class): Likewise.
1059 * search.c (dfs_push_type_decls): Remove.
1060 (dfs_push_decls): Likewise.
1061 (setup_class_bindings): Likewise.
1062 (lookup_field_1): Handle USING_DECLs from dependent scopes.
1063 (marked_pushdecls_p): Remove.
1064 (unmarked_pushdecls_p): Remove.
1065 (marked_identifiers): Remove.
1066 (setup_class_bindings): Remove.
1067 (dfs_push_type_decls): Remove.
1068 (dfs_push_decls): Remove.
1069 (push_class_decls): Remove.
1071 2004-07-13 Mark Mitchell <mark@codesourcery.com>
1075 * decl.c (grokvardecl): Make declspecs parameter const.
1076 (grokdeclarator): Likewise. Adjust accordingly.
1077 * decl.h (grokdeclarator): Adjust declaration.
1078 * parser.c (cp_parser_init_declarator): Do not clear
1079 decl_specifiers->attributes.
1081 * cp-tree.h (lang_identifier): Remove class_value.
1082 (IDENTIFIER_CLASS_VALUE): Remove.
1083 (pop_class_decls): Likewise.
1084 (init_search_processing): Likewise.
1085 * class.c (handle_using_decl): Use lookup_member, not
1086 IDENTIFIER_CLASS_VALUE.
1087 (restore_class_cache): New function, split out from ...
1088 (pushclass): ... here. Do not call clear_identifier_class_values.
1089 (invalidate_class_lookup_cache): Do not clear
1090 IDENTIFIER_CLASS_VALUE.
1091 (popclass): Do not call pop_class_decls.
1092 (maybe_note_name_used_in_class): Do not save names looked up after
1093 the class is complete. Use lookup_member, not
1094 IDENTIFIER_CLASS_VALUE.
1095 * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
1096 * decl.c (cxx_init_decl_processing): Do not call
1097 init_search_processing.
1098 * method.c (do_build_copy_constructor): Remove unnecessary code.
1099 (do_build_assign_ref): Likewise.
1100 * name-lookup.c (pushdecl): Use lookup_member, not
1101 IDENTIFIER_CLASS_VALUE.
1102 (set_identifier_type_value_with_scope): Set TREE_TYPE on the
1104 (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
1105 (push_class_binding): Do not set it.
1106 (clear_identifier_class_values): Remove.
1107 (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
1108 (store_binding): Do not save it.
1109 (pop_from_top_level): Do not restore it.
1110 * name-lookup.h (cxx_saved_binding): Remove class_value.
1111 (clear_identifier_class_values): Remove.
1112 * ptree.c (cxx_print_identifier): Do not print
1113 IDENTIFIER_CLASS_VALUE.
1114 * search.c (search_obstack): Remove.
1115 (push_stack_level): Remove.
1116 (pop_stack_level): Remove.
1117 (search_level): Remove.
1118 (search_stack): Remove.
1119 (lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
1120 (setup_class_bindings): Use IDENTIFIER_MARKED, not
1121 IDENTIFIER_CLASS_VALUE.
1122 (marked_identifiers): New variable.
1123 (push_class_decls): Clear IDENTIFIER_MARKED.
1124 (pop_class_decls): Don't call pop_search_level.
1125 (init_search_processing): Remove.
1127 2004-07-12 Mark Mitchell <mark@codesourcery.com>
1129 * cp-tree.h (get_aggr_typedef): Remove.
1130 * init.c (get_aggr_typedef): Likewise.
1132 * name-lookup.c (push_class_level_binding): Simplify.
1134 2004-07-12 Andrew Pinski <apinski@apple.com>
1138 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
1140 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
1143 2004-07-12 Eric Christopher <echristo@redhat.com>
1145 * parser.c (cp_parser_class_head): Remove unused variable.
1147 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1149 * decl.c (grok_op_properties): Reject [de-]allocation functions
1150 declared in a namespace, or declared as static.
1152 2004-07-12 Nathan Sidwell <nathan@codesourcery.com>
1154 * cp-tree.h (make_binfo): Remove.
1155 * decl.c (xref_basetypes): Use make_tree_binfo directly.
1156 * tree.h (copy_base_binfos): Likewise.
1157 (make_binfo): Remove.
1159 * call.c (build_user_type_conversion_1, build_new_op,
1160 check_constructor_callable, build_temp,
1161 perform_direct_initialization_of_possible): Pass type directly to
1162 lookup_fnfields & build_special_member_call.
1163 (build_special_member_call): Accept a type, and complete it.
1164 * class.c (finish_stuct_bits): Copy the BINFOs here.
1165 * cvt.c (ocp_convert): Pass type directly to
1166 build_special_member_call.
1167 * decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
1168 (xref_basetypes): Allocate the binfo here. Adjust.
1169 * init.c (build_init, build_new_1): Pass type directly to
1170 build_special_member_call.
1171 * lex.c (cxx_make_type): Do not allocate binfo here.
1172 * name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
1173 * parser.c (cp_parser_class_head): Always call xref_basetypes.
1174 * pt.c (instantiate_class_template): Likewise. Inhibit access
1175 checking for template friends.
1176 * ptree.c (cxx_print_type): Adjust record printing.
1177 * search.c (lookup_base): When taking a type, complete it before
1178 looking for a binfo.
1179 (lookup_member): Delay completing a type.
1180 (push_class_decls): Don't walk an incomplete type.
1181 (lookup_conversions): Likewise.
1182 * semantics.c (finish_stmt_expr_expr): Pass type directly to
1183 build_special_member_call.
1184 * tree.c (copy_base_binfos): Adjust.
1185 (make_binfo): Likewise.
1186 * typeck.c (build_modify_expr): Pass type directly to
1187 build_special_member_call.
1188 * typeck2.c (process_init_constructor): Check a binfo exists.
1189 (build_m_component_ref): Allow accessing an incomplete type.
1190 (build_functional_cast): Pass type directly to
1191 build_special_member_call.
1193 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1196 * config-lang.in (gtfiles): Add typeck2.c.
1197 * Make-lang.in: Tweak typeck2.c dependencies, and add rule for
1199 * cp-tree.h: Declare complete_type_check_abstract.
1200 * typeck2.c (pat_calc_hash, pat_compare,
1201 complete_type_check_abstract): New functions.
1202 (abstract_virtuals_error): If the type is abstract, register the
1203 declaration within abstract_pending_vars for further checks.
1204 Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
1205 * decl.c (cp_finish_decl): Do not strip array types.
1206 (create_array_type_for_decl): Check for abstractness of the element
1208 (complete_vars): Call complete_type_check_abstract.
1209 * class.c (finish_struct): Prepare a list of virtual functions for
1210 template types, and call complete_vars on it to check for abstractness.
1212 2004-07-12 Paolo Bonzini <bonzini@gnu.org>
1214 PR tree-optimization/14107
1215 * decl.c (finish_function): Remove temporary band-aid.
1217 2004-07-11 Mark Mitchell <mark@codesourcery.com>
1219 * call.c (build_operator_new_call): Avoid using push_to_top_level.
1220 (build_new_op): Adjust call to lookup_function_nonclass.
1221 * name-lookup.c (identifier_type_value): Adjust call to
1223 (lookup_name_real): Add block_p parameter.
1224 (lookup_name_nonclass): Adjust call to lookup_name_real.
1225 (lookup_function_nonclass): Likewise.
1226 (lookup_name): Likewise.
1227 * name-lookup.h (lookup_name_real): Change prototype.
1228 (lookup_name_nonclass): Likewise.
1229 * parser.c (cp_parser_lookup_name): Likewise.
1231 * cp-tree.h (saved_scope): Make old_bindings a vector.
1232 (unuse_fields): Remove.
1233 * name-lookup.h (cxx_saved_binding): Define it.
1234 * class.c (pushclass): Don't use unuse_fields.
1235 * name-lookup.c (cxx_saved_binding_make): Remove.
1236 (store_binding): Add new bindings to a vector, using an
1237 accumulator style, rather than adding them to a list.
1238 (store_bindings): Adjust accordingly.
1239 (store_class_bindings): Likewise.
1240 (push_to_top_level): Likewise.
1241 (pop_from_top_level): Likewise.
1242 * optimize.c (maybe_clone_body): Must push_to_top_level and
1243 pop_from_top_level calls outside of loop.
1244 * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope
1245 calls here from cp_parser_late_parsing_default_args.
1246 (cp_parser_save_default_args): Record the class type in which the
1247 function is declared.
1248 (cp_parser_late_parsing_default_args): Do not call
1249 push_nested_class/pop_nested_class.
1250 * search.c (dfs_unuse_fields): Remove.
1251 (unuse_fields): Remove.
1253 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
1255 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
1256 LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
1257 * cp-tree.h (poplevel): Declare.
1258 (set_block): Remove.
1259 * decl.c (set_block): Remove.
1261 2004-07-10 Mike Stump <mrs@apple.com>
1263 * decl2.c (import_export_class): Never export/import vtables
1264 with inline key functions.
1266 2004-07-09 Steven Bosscher <stevenb@suse.de>
1268 * typeck.c (c_expand_asm_operands): Remove.
1270 2004-07-09 Mike Stump <mrs@apple.com>
1272 * typeck.c (build_class_member_access_expr): Skip null deref
1273 warning when we don't dereference it.
1275 2004-07-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1279 * class.c (check_field_decls): Improve -Weffc++ warning: do not
1280 warn for pointers to functions/members, or for classes without
1283 2004-07-08 Mark Mitchell <mark@codesourcery.com>
1285 * name-lookup.h (struct cp_binding_level): Update documentation
1288 2004-07-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1291 * typeck.c (check_return_expr): Improve -Weffc++ warning: handle
1292 returning CALL_EXPR, and non-reference return type.
1294 2004-07-08 Nathan Sidwell <nathan@codesourcery.com>
1296 * name-lookup.c (push_binding): Use VEC_reserve.
1298 2004-07-08 Richard Henderson <rth@redhat.com>
1300 * cp-tree.h (expand_eh_spec_block): Remove.
1302 2004-07-07 Mark Mitchell <mark@codesourcery.com>
1304 * cp-tree.h (saved_scope): Remove x_previous_class_type and
1305 x_previous_class_values; add x_previous_class_level.
1306 (previous_class_type): Remove.
1307 (previous_class_values): Remove.
1308 (previous_class_level): New macro.
1309 * class.c (pushclass): Restore the identifier cache more
1311 (invalidate_class_lookup_cache): Use vector for class_shadowed and
1312 previous_class_values.
1313 * decl.c (poplevel): Likewise.
1314 * name-lookup.c (cxx_binding_init): New function.
1315 (cxx_binding_make): Use it.
1316 (push_binding): For a binding in a class level, use a vector of
1317 cp_class_binding nodes.
1318 (push_binding_level): New function.
1319 (begin_scope): Use it.
1320 (leave_scope): Do not put class binding levels on the free list.
1321 (print_binding_level): Adjust for the fact that class_shadowed is
1323 (poplevel_class): Likewise.
1324 (clear_identifier_class_values): Likewise.
1325 (push_class_level_binding): Likewise.
1326 (set_class_shadows): Remove.
1327 (store_binding): New function.
1328 (store_class_bindings): New function.
1329 (push_to_top_level): Use store_class_bindings as appropriate.
1330 (pop_from_top_level): Use previous_class_level, not
1331 previous_class_type.
1332 * name-lookup.h (cp_class_binding): New type.
1333 (cp_binding_level): Use a vector object for class_shadowed.
1334 (push_binding_level): Declare.
1335 (set_class_shadows): Remove.
1337 2004-07-07 Andrew Pinski <apinski@apple.com>
1339 * class.c (instantiate_type): BUFFER_REF is dead.
1340 * lex.c (init_operators): IN_EXPR is dead.
1342 2004-07-07 Jason Merrill <jason@redhat.com>
1345 * call.c (build_new_op): Give overload warnings for built-in
1348 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
1351 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
1354 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
1356 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
1357 * class.c (build_primary_vtable, check_bases,
1358 determine_primary_base, finish_struct_bits,
1359 maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
1360 get_basefndecls, warn_hidden, walk_subobject_offsets,
1361 build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
1362 layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
1363 finish_struct_1, get_vfield_name, contains_empty_class_p,
1364 dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
1365 dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
1366 add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
1368 * decl.c (xref_basetypes): Likewise.
1369 * dump.c (cp_dump_tree): Likewise.
1370 * error.c (dump_expr): Likewise.
1371 * init.c (sort_mem_initializers, expand_member_init,
1372 push_base_cleanups): Likewise.
1373 * method.c (do_build_copy_constructor, do_build_assign_reg,
1374 synthesize_exception_spec): Likewise.
1375 * name-lookup.c (arg_assoc_class): Likewise.
1376 * pt.c (instantiate_class_template, tsubst,
1377 get_template_base_recursive): Likewise.
1378 * ptree.c (cxx_print_type): Likewise.
1379 * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
1380 * search.c (lookup_base_r, dynamic_cast_base_recurse,
1381 dfs_access_in_type, access_in_type, lookup_field_queue_p,
1382 bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
1383 marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
1384 dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
1385 binfo_for_vtable, copied_binfo, original_binfo): Likewise
1386 * tree.c (copy_base_binfos, make_binfo): Likewise.
1387 * typeck.c (commmon_base_type): Likewise
1388 * typeck2.c (process_init_constructor): Likewise
1390 2004-07-06 Joseph S. Myers <jsm@polyomino.org.uk>
1392 * decl.c (check_tag_decl): Name redeclared type in diagnostic.
1394 2004-07-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1397 * pt.c (convert_nontype_argument): Disallow conversions between
1398 different enumeration types.
1400 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
1402 * cp-tree.h (BINFO_MARKED): Remove.
1403 (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
1404 BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
1405 BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
1406 (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
1407 * class.c (build_base_path): Use BINFO_VIRTUAL_P.
1408 (mark_primary_bases, determine_primary_base, base_derived_from,
1409 dfs_find_final_overrider, dfs_find_final_overrider_q,
1410 dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
1411 dfs_modify_vtables, walk_subobject_offsets,
1412 layout_nonempty_base_or_field, build_base_field,
1413 build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
1414 end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
1415 finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
1416 build_ctor_vtbl_group, accumulate_vtble_inits,
1417 dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
1418 build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
1419 add_vcall_offset_vtbl_entries_1): Likewise.
1420 * decl.c (xref_basetypes): Incomming virtual base indicated by
1422 * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
1423 * init.c (finish_init_stmts, sort_mem_initializers,
1424 emit_mem_initializers, build_vtble_address, expand_member_init,
1425 push_base_cleanups): Likewise.
1426 * method.c (do_build_copy_constructor): Likewise.
1427 * pt.c (instantiate_class_template,
1428 get_template_base_recursive): Likewise.
1429 * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
1430 get_pseudo_ti_desc): Likewise.
1431 * search.c (lookup_base_r, dynamic_cast_base_recurse,
1432 binfo_from_vbase, binfo_via_virtual, copied_binfo,
1433 original_binfo): Likewise.
1434 * semantics.c (finish_base_specifier): Virtualness is indicated
1436 * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
1438 2004-07-06 Mark Mitchell <mark@codesourcery.com>
1441 2004-06-24 Jason Merrill <jason@redhat.com>
1443 * decl.c (grokparms): Give the PARM_DECL reference type if the
1444 parameter is passed by invisible reference.
1446 2004-07-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1448 * cp-lang.c (cp_var_mod_type_p): Add extra arg.
1449 * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
1450 * pt.c (check_instantiated_args, unify): Likewise.
1452 2004-07-05 Phil Edwards <phil@codesourcery.com>
1454 * Make-lang.in (check-c++, lang_checks): Add some comments.
1456 2004-07-05 Zack Weinberg <zack@codesourcery.com>
1458 * cp-mudflap.c: Delete file.
1459 * Makefile.in: Remove all references to cp-mudflap.o.
1461 2004-07-05 Zack Weinberg <zack@codesourcery.com>
1463 * decl.c (cxx_init_decl_processing): Call
1464 build_common_tree_nodes before creating the global NAMESPACE_DECL.
1466 2004-07-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1469 * call.c (build_operator_new_call): Look only at global scope.
1471 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
1473 * call.c (enforce_access): Expect TREE_BINFO.
1474 * class.c (binfo_ctor_vtable): Check TREE_BINFO.
1475 * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
1476 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
1478 (BINFO_LANG_ELTS): Remove.
1479 (BINFO_LANG_SLOTS): New.
1480 (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
1481 (CLASSTYPE_TEMPLATE_INFO): Adjust.
1482 * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
1483 * search.c (lookup_member): Check TREE_BINFO.
1484 * semantics.c (perform_or_defer_access_check): Likewise.
1485 (check_accessibility_of_qualified_id): Check
1486 deferred_access_no_check.
1487 * tree.c (make_binfo): Use make_tree_binfo.
1489 2004-07-04 Mark Mitchell <mark@codesourcery.com>
1491 * method.c (implicitly_declare_fn): Set linkage of generated
1494 2004-07-04 Richard Henderson <rth@redhat.com>
1496 * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
1498 2004-07-03 Scott Brumbaugh <scottb.lists@verizon.net>
1501 * name-lookup.c (push_class_level_binding): Don't pass a
1502 TREE_LIST of ambiguous names to check_template_shadow as it
1503 only handles declarations. Instead, pull the declaration
1506 2004-07-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1509 * pt.c (check_explicit_specialization): Clarify error message.
1511 2004-07-02 Richard Henderson <rth@redhat.com>
1513 * tree.c (cp_unsave_r): Update remap_save_expr call.
1515 2004-07-02 Mark Mitchell <mark@codesourcery.com>
1518 * mangle.c (write_template_arg): Correct mangling.
1521 * decl.c (grokdeclarator): Robustify.
1523 2004-07-01 Richard Henderson <rth@redhat.com>
1525 * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
1526 * method.c (synthesize_method): Don't clear_last_expr.
1527 * name-lookup.c (maybe_push_cleanup_level): Likewise.
1529 2004-07-01 Nick Clifton <nickc@redhat.com>
1531 * decl2.c (import_export_class): Invoke the
1532 import_export_class field in the gcc_target structure if it is not
1535 2004-06-30 Richard Henderson (rth@redhat.com>
1537 * decl.c (start_preparsed_function): Don't set immediate_size_expand.
1538 * method.c (use_thunk): Likewise.
1540 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
1542 * call.c (build_over_call), typeck.c (build_function_call): Call
1543 check_function_arguments instead of check_function_format.
1545 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
1547 * call.c (build_over_call), typeck.c (build_function_call): Update
1548 calls to check_function_format.
1550 2004-06-30 Richard Henderson <rth@redhat.com>
1552 * call.c (build_over_call): Use __builtin_memcpy for copying
1553 CLASS_AS_BASE rather than funny casting.
1555 2004-06-30 Richard Henderson <rth@redhat.com>
1557 * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
1558 TYPE_SIZE_UNIT of full_type.
1560 2004-06-30 Per Bothner <per@bothner.com>
1562 Conditionally compile support for --enable-mapped_location.
1563 * decl.c (pop_label): Handle (imperfectly) USE_MAPPED_LOCATION case.
1564 * decl2.c: If USE_MAPPED_LOCATION, don't do some line number
1565 adjustments - which I don't understand.
1566 * error.c (dump_decl): Rename "<interrnal>" to "<built-in>".
1567 * error.c: Use LOCATION_FILE and EXPR_LOCATION macros.
1568 (print_instantiation_partial_context): Use expand_location.
1569 * decl.c (duplicate_decl): Use new DECL_IS_BUILTIN macro.
1570 * name-lookup.c: Likewise.
1571 * lex.c (cxx_init): Likewise. Also use BUILTINS_LOCATION.
1572 * name-lookup.c: Use input_line macro.
1573 * parser.c (cp_lexer_get_preprocessor_token): Use UNKNOWN_LOCATION.
1574 (cp_parser_statement): Rename locaal variable statement_locus to
1575 statement_location and use SET_EXPR_LOCATION macro.
1576 * pt.c: Handle USE_MAPPED_LOCATION case. Use new macros.
1577 * tree.c (cp_walk_subtrees): Likewise.
1579 2004-06-29 Per Bothner <per@bothner.com>
1581 * tree.c (build_min_nt, build_min, build_min_non_dep):
1582 Don't set TREE_COMPLEXITY from input_line.
1584 2004-06-29 Paul Brook <paul@codesourcery.com>
1586 * init.c: Include target.h.
1587 (get_cookie_size): Remove and replace with target hook.
1589 (build_new_1): Store the element size in the cookie.
1591 2004-06-29 Nathan Sidwell <nathan@codesourcery.com>
1594 * parser.c (cp_parser_template_declaration_after_export): Disable
1595 access checks here ...
1596 (cp_parser_class_specifier): ... not here.
1598 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1600 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
1601 VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
1602 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
1605 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1607 * cp-tree.h (struct deferred_access): Move to ...
1608 * semantics.c (struct deferred_access): ... here. Adjust.
1609 (deferred_access_stack): Make a VEC(deferred_access),
1610 (deferred_access_free_list): Remove.
1611 (deferred_access_no_check): New.
1612 (push_deferring_access_checks, resume_deferring_access_checks,
1613 stop_deferring_access_checks, pop_deferring_access_checks,
1614 get_deferred_access_checks, pop_to_parent_deferring_access_checks,
1615 perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
1617 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1620 * call.c (build_temp): Declare.
1621 (check_constructor_callable): New.
1622 (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
1623 CONSTRUCTOR_CALLABLE.
1624 (convert_like_real, initialize_reference): Use
1625 check_constructor_callable.
1626 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
1627 (LOOKUP_*): Renumber.
1629 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1631 * friend.c (add_friend): Only perform access checks when context
1633 * lex.c (cxx_make_type): Only create a binfo for aggregate types.
1634 * parser.c (cp_parser_class_specifier): Disable access checks here
1635 when parsing the body of a templated class.
1636 * semantics.c (perform_or_defer_access_checks): Reorder to allow
1637 NULL binfos when not checking access.
1639 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1641 Use vector API for vbase list.
1642 * cp-tree.h: Include vec.h
1643 (DEF_VEC_P (tree)): New type.
1644 (struct lang_type_class): Change vbase's member type.
1645 (binfo_for_vbase): Declare.
1646 * class.c (determine_primary_base, base_derived_from,
1647 update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
1648 warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
1649 build_vtbl_initializer): Adjust.
1650 * decl.c (xref_basetypes): Adjust, accumulate upper bound of
1652 * init.c (sort_mem_initializers, expand_member_init,
1653 push_base_cleanups): Adjust.
1654 * method.c (do_build_copy_constructor): Adjust.
1655 * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
1656 (binfo_for_vbase): New.
1657 * tree.c (copy_base_binfos): Adjust.
1659 2004-06-28 Mark Mitchell <mark@codesourcery.com>
1661 * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
1663 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
1666 * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
1667 paranthesis in case of pointers to array members.
1668 * error.c (dump_type_prefix): Likewise.
1669 (dump_type_suffix): Maybe issue a whitespace when printing
1672 2004-06-27 Mark Mitchell <mark@codesourcery.com>
1675 * parser.c (cp_parser_set_decl_spec_type): Refine test for
1676 redefinition of built-in types.
1678 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
1680 * error.c (pp_template_argument_list_start): Remove.
1681 (pp_template_argument_list_end): Likewise.
1682 (pp_separate_with_comma): Use pp_cxx_separate_with.
1683 (reinit_global_formatting_buffer): Remove.
1684 (pp_non_consecutive_character): Likewise.
1685 (dump_scope): Use pp_cxx_colon_colon.
1686 (dump_template_parameter): Use pp_cxx_identifier,
1687 pp_cxx_tree_identifier and pp_cxx_whitespace.
1688 (dump_templat_bindings): Replace use of pp_string with sequence
1689 of pp_cxx_whitespace and pp_equal.
1690 (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
1691 pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set
1693 (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
1694 (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace,
1695 pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
1696 (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
1697 pp_cxx_right_bracket, pp_cxx_identifier throughout,
1698 (dump_decl): Likewise.
1699 (dump_template_decl): Likewise.
1700 (dump_function_decl): Likewise. Set padding as appropriate.
1701 (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
1703 (dump_exception_spec): Likewise.
1704 (dump_function_name): Use pp_cxx_tree_identifier and
1706 (dump_template_parms): Use pp_cxx_begin_template_argument_list and
1707 pp_cxx_end_template_argument_list.
1708 (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
1709 pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
1710 pp_cxx_whitespace throughout.
1711 (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
1713 (dump_unary_op): Likewise.
1714 (reinit_cxx_pp): New function.
1715 (type_as_string); Use it.
1716 (expr_as_string): Likewise.
1717 (decl_as_string); Likewise.
1718 (context_as_string): Likewise.
1719 (lang_decl_name): Likewise.
1720 (decl_to_string): Likewise.
1721 (expr_to_string): Likewise.
1722 (parm_to_string): Likewise.
1723 (type_to_string): Likewise.
1724 (args_to_string): Likewise.
1725 (cv_to_string): Likewise.
1727 2004-06-26 Mark Mitchell <mark@codesourcery.com>
1729 * cp-tree.h (cp_cv_quals): New type.
1730 (cp_declarator): Use it instead of "tree" as appropriate.
1731 (grok_method_quals): Adjust prototype.
1732 (grokclassfn): Likewise.
1733 (do_friend): Likewise.
1734 * decl.c (grokfndecl): Use cp_cv_quals, not tree.
1735 (grokdeclarator): Likewise.
1736 * decl2.c (grok_method_quals): Likewise.
1737 (grokclassfn): Likewise.
1738 * friend.c (do_friend): Likewise.
1739 * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
1740 * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
1741 (make_pointer_declarator): Likewise.
1742 (make_reference_declarator): Likewise.
1743 (make_ptrmem_declarator): Likewise.
1744 (cp_parser_ptr_operator): Likewise.
1745 (cp_parser_cv_qualifier_seq_opt): Likewise.
1746 (cp_parser_cv_qualifier_opt): Remove.
1747 (cp_parser_new_declarator_opt): Adjust call to
1748 cp_parser_ptr_operator.
1749 (cp_parser_conversion_declaration_opt): Likewise.
1750 (cp_parser_declarator): Use cp_cv_quals, not tree.
1751 (cp_parser_direct_declarator): Likewise.
1753 2004-06-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1755 * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
1756 Rename DECL_STMT to DECL_EXPR.
1757 * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
1758 * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
1759 * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
1761 2004-06-26 Jan Hubicka <jh@suse.cz>
1764 * decl2.c (maybe_emit_vtables): Always import_export_vtable for the
1765 reachability analysis.
1767 2004-06-25 Mark Mitchell <mark@codesourcery.com>
1769 * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
1772 2004-06-25 Paul Brook <paul@codesourcery.com>
1774 * decl2.c (get_guard): Call targetm.cxx.guard_type.
1775 (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
1777 2004-06-24 Mark Mitchell <mark@codesourcery.com>
1779 * decl.c (grokdeclarator): Restore error messages about __thread.
1780 * parser.c (cp_parser_decl_specifier_seq): Likewise.
1782 2004-06-24 Jason Merrill <jason@redhat.com>
1785 * decl.c (grokparms): Give the PARM_DECL reference type if the
1786 parameter is passed by invisible reference.
1788 2004-06-24 Andreas Schwab <schwab@suse.de>
1790 * cp-tree.h (enum cp_storage_class): Remove trailing comma.
1792 2004-06-23 Mark Mitchell <mark@codesourcery.com>
1794 * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
1795 (cp/decl.o): Likewise.
1796 (cp/decl2.o): Likewise.
1797 (cp/pt.o): Likewise.
1798 (cp/semantics.o): Likewise.
1799 * config-lang.in (gtfiles): Do not reference cp/lex.h.
1800 * class.c: Do not include lex.h.
1801 (add_implicitly_declared_members): Do not use
1802 adding_implicit_members.
1803 (check_bases_and_members): Do not talk about grok_x_components.
1804 * cp/cp-tree.h (adding_implicit_members): Remove.
1805 (cp_storage_class): New type.
1806 (cp_decl_spec): Likewise.
1807 (cp_decl_specifier_seq): Likewise.
1808 (cp_parameter_declarator): Use it for the decl_specifiers field.
1809 (check_tag_decl): Adjust prototype.
1810 (shadow_tag): Likewise.
1811 (groktypename): Likewise.
1812 (start_decl): Likewise.
1813 (start_function): Likewise.
1814 (start_method): Likewise.
1815 (grok_x_components): Remove.
1816 (grokfield): Adjust prototype.
1817 (grokbitfield): Likewise.
1818 (finish_member_class_template): Remove.
1819 * decl.c: Do not include lex.h.
1820 (adding_implicit_members): Do not define.
1821 (check_tag_decl): Do not use trees to represent decl-specifiers.
1822 (shadow_tag): Likewise.
1823 (groktypename): Likewise.
1824 (start_decl): Likewise.
1825 (grokvardecl): Likewise.
1826 (grokdeclarator): Likewise.
1827 (grokparms): Likewise.
1828 (start_function): Likewise.
1829 (start_method): Likewise.
1830 * decl.h (grokdeclarator): Adjust prototype.
1831 * decl2.c: Do not include lex.h.
1832 (grok_x_components): Remove.
1833 (grokfield): Do not use trees to represent decl-specifiers.
1834 (grokbitfield): Likewise.
1835 * lex.c: Do not include lex.h.
1837 * parser.c: Include target.h.
1838 (clear_decl_specs): New function.
1839 (cp_parser_translation_unit): Do not use trees to represent
1841 (cp_parser_postfix_expression): Likewise.
1842 (cp_parser_new_type_id): Likewise.
1843 (cp_parser_condition): Likewise.
1844 (cp_parser_simple_declaration): Likewise.
1845 (cp_parser_decl_specifier_seq): Likewise.
1846 (cp_parser_function_specifier_opt): Likewise.
1847 (cp_parser_conversion_type_id): Likewise.
1848 (cp_parser_template_parameter): Likewise.
1849 (cp_parser_explicit_instantiation): Likewise.
1850 (cp_parser_type_specifier): Likewise.
1851 (cp_parser_simple_type_specifier): Likewise.
1852 (cp_parser_init_declarator): Likewise.
1853 (cp_parser_type_id): Likewise.
1854 (cp_parser_type_specifier_seq): Likewise.
1855 (cp_parser_parameter_declaration): Likewise.
1856 (cp_parser_member_declaration): Likewise.
1857 (cp_parser_exception_declaration): Likewise.
1858 (cp_parser_function_definition_from_specifiers_and_declarator):
1860 (cp_parser_single_declaration): Likewise.
1861 (cp_parser_save_member_function_body): Likewise.
1862 (cp_parser_friend_p): Likewise.
1863 (cp_parser_set_storage_class): New function.
1864 (cp_parser_set_decl_spec_type): Likewise.
1865 * pt.c: Do not include lex.h.
1866 * semantics.c: Likewise.
1867 (finish_member_class_template): Remove.
1869 2004-06-23 Roger Sayle <roger@eyesopen.com>
1871 * call.c (build_cxx_call): Don't call expand_tree_builtin. No
1872 longer take both "args" and "convert_args" as arguments.
1873 (build_op_delete_call): Update call to build_cxx_call.
1874 (build_over_call): Likewise, update call to build_cxx_call.
1875 * cp-tree.h (build_cxx_call): Update funtion prototype.
1876 * typeck.c (build_function_call): Don't call expand_tree_builtin.
1877 * rtti.c (throw_bad_cast): Update call to build_cxx_call.
1878 (throw_bad_typeid): Likewise.
1879 (build_dynamic_cast_1): Likewise.
1881 2004-06-22 Richard Henderson <rth@redhat.com>
1883 * class.c (build_vfn_ref): Take a pointer not object. Build
1885 (cp_fold_obj_type_ref): New.
1886 * call.c (build_over_call): Update build_vfn_ref call.
1887 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
1888 * cp-tree.h (cp_fold_obj_type_ref): Declare.
1890 2004-06-21 Jason Merrill <jason@redhat.com>
1893 * cp-gimplify.c (cp_gimplify_init_expr): Look through
1896 2004-06-21 Mark Mitchell <mark@codesourcery.com>
1898 * cp-tree.def (NEW_EXPR): Add a fourth slot.
1899 * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
1900 (TREE_PARMLIST): Likewise.
1901 (CALL_DECLARATOR_PARMS): Likewise.
1902 (CALL_DECLARATOR_QUALS): Likewise.
1903 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
1904 (cp_declarator_kind): New type.
1905 (cp_parameter_declarator): Likewise.
1906 (cp_declarator): Likewise.
1907 (cp_error_declarator): Likewise.
1908 (no_parameters): Likewise.
1909 (groktypename): Change prototype.
1910 (start_decl): Likewise.
1911 (start_handler_parms): Likewise.
1912 (get_scope_of_declarator): Likewise.
1913 (start_function): Likewise.
1914 (start_preparsed_function): New function.
1915 (start_function): Change prototype.
1916 (start_method): Likewise.
1917 (grokfield): Likewise.
1918 (grokbitfield): Likewise.
1919 (build_new): Likewise.
1920 (make_pointer_declarator): Remove.
1921 (make_reference_declarator): Likewise.
1922 (make_call_declarator): Likewise.
1923 (set_quals_and_spec): Likewise.
1924 (process_template_parm): Change prototype.
1925 (begin_function_definition): Remove.
1926 (finish_parmlist): Remove.
1927 * decl.c (groktypename): Do not use trees to represent
1929 (start_decl): Likewise.
1930 (start_handler_parms): Remove.
1931 (get_scope_of_declarator): Reimplement.
1932 (grokdeclarator): Do not use trees to represent declarators.
1933 (grokparms): Likewise.
1934 (start_function): Likewise.
1935 (start_method): Likewise.
1936 (build_void_list_mode): Do not use TREE_PARMLIST.
1937 * decl.h (grokdeclarator): Change prototype.
1938 * decl2.c (grok_method_quals): Robustify.
1939 (grok_x_components): Do not use trees to represent declarators.
1940 (grokfield): Likewise.
1941 (grokbitfield): Likewise.
1942 (start_objects): Build FUNCTION_DECLs, not declarators.
1943 (start_static_storage_duration_function): Likewise.
1944 * init.c (build_new): Simplify.
1945 * lex.c (make_pointer_declarator): Remove.
1946 (make_reference_declarator): Likewise.
1947 (make_call_declarator): Likewise.
1948 (set_quals_and_spec): Likewise.
1949 * method.c (use_thunk): Use start_preparsed_function.
1950 (synthesize_method): Likewise.
1951 (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
1952 * optimize.c (maybe_clone_body): Use start_preparsed_function.
1953 * parser.c (cp_error_declarator): New variable.
1954 (declarator_obstack): Likewise.
1955 (alloc_declarator): New function.
1956 (make_declarator): Likewise.
1957 (make_id_declarator): Likewise.
1958 (make_pointer_declarator): Likewise.
1959 (make_reference_declarator): Likewise.
1960 (make_ptrmem_declarator): Likewise.
1961 (make_call_declarator): Likewise.
1962 (make_array_declarator): Likewise.
1963 (no_parameters): New variable.
1964 (make_parameter_declarator): Likewise.
1965 (cp_parser_check_for_definition_in_return_type): Do not use trees
1966 to represent declarators.
1967 (cp_parser_translation_unit): Likewise.
1968 (cp_parser_new_expression): Likewise.
1969 (cp_parser_new_type_id): Likewise.
1970 (cp_parser_new_declarator_opt): Likewise.
1971 (cp_parser_direct_new_declarator): Likewise.
1972 (cp_parser_condition): Likewise.
1973 (cp_parser_declaration_statement): Likewise.
1974 (cp_parser_declaration): Likewise.
1975 (cp_parser_conversion_type_id): Likewise.
1976 (cp_parser_conversion_declarator_opt): Likewise.
1977 (cp_parser_template_parameter_list): Likewise.
1978 (cp_parser_template_parameter): Likewise.
1979 (cp_parser_explicit_instantiation): Likewise.
1980 (cp_parser_init_declarator): Likewise.
1981 (cp_parser_declarator): Likewise.
1982 (cp_parser_direct_declarator): Likewise.
1983 (cp_parser_type_id): Likewise.
1984 (cp_parser_parameter_declaration_clause): Likewise.
1985 (cp_parser_parameter_declaration_list): Likewise.
1986 (cp_parser_parameter_declaration): Likewise.
1987 (cp_parser_member_declaration): Likewise.
1988 (cp_parser_exception_declaration): Likewise.
1989 (cp_parser_check_declarator_template_parameters): Likewise.
1990 (cp_parser_function_definition_from_specifiers_and_declarator):
1992 (cp_parser_save_member_function_body): Likewise.
1993 * pt.c (process_template_parm): Add is_non_type parameter.
1994 (convert_template_argument): Adjust call to groktypename.
1995 (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
1996 (tsubst): Do not expect declarators.
1997 (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
1999 (instantiate_decl): Use start_preparsed_function.
2000 * semantics.c (begin_function_definition): Remove.
2001 (finish_parmlist): Remove.
2002 * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
2005 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2007 * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
2008 (build_new_method_call): Likewise.
2009 * decl.c (local_variable_p_walkfn): Don't walk into types.
2010 * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
2011 (build_anon_union_vars): Add new operand for COMPONENT_REF.
2012 * init.c (buld_new): Add new operand for ARRAY_REF.
2013 * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
2014 (do_build_assign_ref): Likewise.
2015 * parser.c (cp_parser_direct_new_declarator): Add new operands
2017 (cp_parser_direct_declarator): Likewise.
2018 * pt.c (tsubst): Likewise.
2019 (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
2021 * semantics.c (finish_non_static_data_member): Add new operand
2023 * typeck.c (build_class_member_access_expr): Likewise.
2024 (build_class_member_access_expr, finish_class_member_access_expr):
2026 (build_ptrmemfunc_access_expr): Likewise.
2027 (build_array_ref): Add new operands for ARRAY_REF.
2028 * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
2029 * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
2031 2004-06-21 Richard Henderson <rth@redhat.com>
2033 * dump.c (cp_dump_tree): Don't use dump_next_stmt.
2034 * parser.c (cp_parser_jump_statement): Update commentary.
2035 * pt.c (tsubst_expr): Use RETURN_EXPR.
2036 * semantics.c (finish_return_stmt): Likewise.
2037 (finalize_nrv_r): Likewise.
2038 * typeck.c, typeck2.c: Update file start commentary.
2040 2004-06-21 Richard Henderson <rth@redhat.com>
2042 * semantics.c (finish_expr_stmt): Call verify_sequence_points.
2044 2004-06-20 Richard Henderson <rth@redhat.com>
2046 * cp-tree.h (add_decl_stmt): Declare.
2047 * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
2048 * semantics.c (maybe_cleanup_point_expr): New.
2049 (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
2050 finish_for_expr, finish_switch_cond): Use it.
2051 (finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN.
2053 2004-06-20 Richard Henderson <rth@redhat.com>
2055 * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
2056 * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
2057 (cp_gimplify_expr): Call it.
2058 (gimplify_cleanup_stmt): Move from c-gimplify.c.
2059 (cp_genericize): New.
2060 * decl.c (finish_function): Call it.
2061 * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
2062 (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
2063 (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
2064 (cp_genericize): Declare.
2065 * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
2066 * dump.c (cp_dump_tree): Likewise.
2067 * semantics.c (push_cleanup): Move from c-semantics.c.
2069 2004-06-20 Zack Weinberg <zack@codesourcery.com>
2071 * cp-lang.c (has_c_linkage): Implement.
2073 * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
2074 * decl.c (duplicate_decls): Use COPY_DECL_RTL.
2075 (builtin_function_1): Don't call make_decl_rtl.
2076 (build_cp_library_fn): Don't call set_mangled_name_for_decl.
2077 (grokvardecl): Don't call mangle_decl.
2078 * except.c (nothrow_libfn_p): Look at DECL_NAME, not
2079 DECL_ASSEMBLER_NAME.
2080 * method.c (set_mangled_name_for_decl): Delete.
2081 * name-lookup.c (pushdecl): When a local extern shadows a
2082 file-scope declaration of the same object, give both DECLs the
2084 * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
2085 on DECL_ASSEMBLER_NAME.
2087 2004-06-19 Richard Henderson <rth@redhat.com>
2089 * cp-gimplify.c: Remove unnecessary prototypes.
2090 (cp_gimplify_stmt): Merge into ...
2091 (cp_gimplify_expr): ... here. Move to end of file. Handle
2092 stmts_are_full_exprs_p frobbing.
2093 * cp-tree.h (cp_gimplify_stmt): Remove.
2094 * pt.c (tsubst_expr): Merge prep_stmt and unify.
2095 * tree.c (init_tree): Don't set lang_gimplify_stmt.
2097 2004-06-18 Richard Henderson <rth@redhat.com>
2100 * semantics.c (begin_cond): New.
2101 (finish_cond): Rewrite to handle template DECL_STMTs specially.
2102 Assume that non-template decls go land before the conditional.
2103 (simplify_loop_decl_cond): Likewise.
2104 (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
2105 finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
2106 begin_switch_stmt, finish_switch_cond): Update to match.
2108 2004-06-17 Jason Merrill <jason@redhat.com>
2111 * semantics.c (simplify_aggr_init_expr): Don't return the slot.
2112 (finish_stmt_expr_expr): Update type after conversions.
2113 (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
2114 Handle void initializer.
2115 * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
2117 2004-06-17 Geoffrey Keating <geoffk@apple.com>
2119 * class.c (build_clone): Don't call defer_fn, let mark_used do it.
2120 * cp-tree.h (defer_fn): Delete.
2121 * decl2.c (defer_fn): Delete.
2122 (finish_file): Simplify deferred_fns loops; check that
2123 only used inline functions get into deferred_fns.
2124 (mark_used): Inline previous contents of defer_fn.
2126 2004-06-16 Richard Henderson <rth@redhat.com>
2128 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
2129 (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
2130 * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
2131 of CTOR_INITIALIZER ...
2132 (pp_cxx_statement): ... here.
2133 * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
2134 (finish_function): Use alloc_stmt_list to zap entire function.
2135 * parser.c (cp_parser_compound_statement): Update commentary.
2136 * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
2137 * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
2138 (finish_stmt_expr): Don't look through COMPOUND_STMT.
2140 2004-06-16 Geoffrey Keating <geoffk@apple.com>
2142 * pt.c (mark_decl_instantiated): Don't call defer_fn.
2144 2004-06-16 Richard Henderson <rth@redhat.com>
2146 * parser.c (cp_parser_labeled_statement): Update commentary.
2147 * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
2148 * tree.c (mark_local_for_remap_r): Likewise.
2150 2004-06-16 Richard Henderson <rth@redhat.com>
2152 * parser.c (cp_parser_asm_definition): Update commentary.
2153 * pt.c (tsubst_expr): Use ASM_EXPR.
2154 * semantics.c (finish_asm_stmt): Likewise.
2156 2004-06-16 Richard Henderson <rth@redhat.com>
2158 * decl.c (finish_destructor_body): Use LABEL_EXPR.
2159 * parser.c (cp_parser_statement): Update commentary.
2160 * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
2161 * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
2162 * tree.c (mark_local_for_remap_r): Likewise.
2164 2004-06-16 Richard Henderson <rth@redhat.com>
2167 * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
2168 statement in FOR_INIT_STMT for templates.
2170 2004-06-15 Richard Henderson <rth@redhat.com>
2172 * call.c (initialize_reference): Don't build CLEANUP_STMT here.
2173 * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
2174 (genericize_try_block): Use gimplify_stmt.
2175 (genericize_catch_block, genericize_eh_spec_block): Likewise.
2176 (cp_gimplify_init_expr): Remove STMT_EXPR special case.
2177 (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
2178 * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
2179 (cp_tree_chain_matters_p): Remove.
2180 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
2181 (COMPOUND_STMT_BODY_BLOCK): New.
2182 (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
2183 (EXPR_STMT_STMT_EXPR_RESULT): New.
2184 (building_stmt_tree): Check cur_stmt_list.
2185 (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
2186 (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
2187 * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
2188 (cp_finish_decl): Use push_cleanup.
2189 (start_function, finish_function): Use statement lists.
2190 (finish_stmt): Do nothing.
2191 * except.c (begin_eh_spec_block): Use statement lists.
2192 (check_handlers_1, check_handlers): Likewise.
2193 * init.c (construct_virtual_base): Don't add extra compound stmts.
2194 (build_vec_init): Likewise.
2195 * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
2196 * name-lookup.h (struct cp_binding_level): Add statement_list.
2197 * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
2198 (cp_parser_labeled_statement, cp_parser_expression_statement,
2199 cp_parser_statement_seq_opt): Likewise.
2200 (cp_parser_compound_statement): Likewise. Take bool for try block.
2201 (cp_parser_selection_statement): Tidy if processing.
2202 (cp_parser_already_scoped_statement): Rewrite to do what it says.
2203 * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
2204 (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST.
2205 Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
2206 * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
2207 (finish_cond): New, rewritten from FINISH_COND.
2208 (simplify_loop_decl_cond): New.
2209 (finish_expr_stmt): Avoid nested EXPR_STMTs.
2210 (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
2211 begin_else_clause, finish_else_clause, finish_if_stmt,
2212 begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
2213 begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
2214 finish_for_cond, finish_for_stmt, begin_switch_stmt,
2215 finish_switch_cond, finish_switch_stmt, begin_try_block,
2216 finish_try_block, finish_cleanup_try_block, finish_function_try_block,
2217 finish_handler_sequence, finish_function_handler_sequence,
2218 begin_handler, finish_handler_parms, finish_handler,
2219 begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
2220 using statement lists.
2221 (begin_compound_stmt): Replace has_no_scope argument with flags.
2222 Update all callers. Use statement lists.
2223 (finish_compound_stmt): Likewise.
2224 (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
2225 (current_scope_stmt_stack): Remove.
2226 (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
2227 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
2228 Rewrite with statement lists.
2230 2004-06-15 Alexandre Oliva <aoliva@redhat.com>
2232 * parser.c: Change all assignments of c_lex_string_translate
2233 to true and false to 1 and 0.
2234 (cp_lexer_read_token): Convert type of the translated string.
2235 (cp_parser_skip_to_closing_parentheses): Preserve original
2236 value of c_lex_string_translate, and set it to -1 while
2238 (cp_parser_cache_group): Likewise.
2239 (cp_parser_cache_group_1): Renamed.
2240 (cp_parser_asm_operand_list): Remove redundant setting of
2241 c_lex_string_translate.
2242 (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
2243 Handle chained strings.
2245 2004-06-12 Andrew Pinski <apinski@apple.com>
2249 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
2251 * cp-tree.h: Fix typo.
2253 * cp-tree.h: Include cgraph.h
2254 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
2255 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
2257 2004-06-12 Jason Merrill <jason@redhat.com>
2259 PR tree-optimization/14107
2260 * decl.c (finish_function): Warn about no return in all functions.
2262 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
2264 * cp-tree.h (struct language_function): Remove cannot_inline.
2265 * decl.c (save_function_data): cannot_inline is no more.
2266 (cxx_push_function_context): Likewise.
2267 * decl2.c (start_objects, start_static_storage_duration_function):
2268 Reset DECL_INLINE, set DECL_UNINLINABLE.
2270 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2273 * search.c (lookup_field): Propagate the ambiguity list.
2274 (lookup_fnfields): Likewise.
2276 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2279 * parser.c (cp_parser_template_name): Ctors/dtors never need a
2280 template keyword to disambiguate.
2282 2004-06-14 Mark Mitchell <mark@codesourcery.com>
2285 * decl.c (grokdeclarator): Ignore pointer-to-members when
2286 computing template depth.
2289 * name-lookup.c (pushtag): Do not try to put class declarations in
2290 explicit specialization scopes.
2292 2004-06-11 Andrew Pinski <pinskia@physics.uc.edu>
2294 * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
2296 2004-06-11 Mark Mitchell <mark@codesourcery.com>
2299 * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
2300 bindings for undeclared built-ins.
2302 2004-06-11 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2304 * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
2305 appear at the correct location.
2307 2004-06-10 Jason Merrill <jason@redhat.com>
2311 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2312 * init.c (build_offset_ref): Build SCOPE_REF with non-null
2313 TREE_TYPE for non-dependent names.
2314 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
2315 unknown_type_node as its TREE_TYPE.
2316 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
2317 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
2318 (dump_expr) <SCOPE_REF case>: Likewise.
2320 2004-06-10 Mark Mitchell <mark@codesourcery.com>
2323 * parser.c (cp_parser_direct_declarator): Robustify.
2326 * pt.c (tsubst_copy): Use decl_constant_value on enumeration
2327 constants in non-dependent contexts.
2331 * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
2334 2004-06-10 Jakub Jelinek <jakub@redhat.com>
2337 * decl.c (duplicate_decls): Handle fileptr_type_node arguments
2340 2004-06-09 Mark Mitchell <mark@codesourcery.com>
2344 2004-06-07 Mark Mitchell <mark@codesourcery.com>
2345 * lex.c (handle_pragma_interface): Deprecate.
2346 (handle_pragma_implementation): Likewise.
2348 2004-06-09 Andrew Pinski <pinskia@physics.uc.edu>
2350 * g++spec.c (lang_specific_driver): Remove check for -lm
2351 and -lmath when check it see if it was the math library.
2353 2004-06-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2356 * parser.c (cp_parser_direct_declarator): Reject constructor named
2357 as qualified template-id.
2359 2004-06-07 Mark Mitchell <mark@codesourcery.com>
2362 * lex.c (handle_pragma_interface): Deprecate.
2363 (handle_pragma_implementation): Likewise.
2365 2004-06-07 Mark Mitchell <mark@codesourcery.com>
2368 * parser.c (cp_parser_iteration_statement): Fix typo in error
2372 * pt.c (tsubst_default_argument): Do not defer access checks
2373 while substituting into the default argument.
2376 * pt.c (tsubst_copy): Do not try to substitute for an enumeration
2377 constant in a non-dependent context.
2380 * except.c (build_throw): Ensure that temp_expr has been
2383 2004-06-06 Roger Sayle <roger@eyesopen.com>
2385 * cp/cp-tree.h (lvalue_or_else): Add function prototype.
2387 2004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2390 * parser.c (cp_parser_mem_initializer_id): Gracefully reject
2391 'typename', and accept 'template'.
2393 2004-06-03 Andrew Pinski <pinskia@physics.uc.edu>
2394 Jan Hubicka <jh@suse.cz>
2397 * method.c (use_think): Do not mark thunk as referenced.
2399 2004-06-03 Matt Austern <austern@apple.com>
2402 * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
2403 is nonzero, and if we see a noninline definition of a key method,
2404 make the vtables nonweak.
2406 2004-06-02 Matt Austern <austern@apple.com>
2408 * cp-tree.h (instantiate_decl): new boolean parameter,
2409 undefined_ok. Current behavior is equivalent to its being 0.
2410 * decl2.c (mark_used): Add new argument when calling instantiate_decl
2411 * pt.c (mark_decl_instantiated): Unconditionally make
2412 instantiations explicit unconditionally
2413 (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
2414 since mark_decl_instantiated now does it.
2415 (instantiate_class_member): New. Instantiate a member of an
2416 explicitly instantiated class template.
2417 (do_type_instantiation): Explicitly instantiate members of an
2418 explicitly instantiated class template.
2419 (instantiate_decl): if undefined_ok is nonzero, and if we're
2420 trying to explicitly instantiated a template with no definition,
2421 change it to an implicit instantiation.
2422 (instantiate_pending_templates): Add new argument to instantiate_decl.
2423 * tree.c (cp_cannot_inline_tree_fn): Likewise.
2425 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
2427 * cp-tree.h: Fix typo.
2429 * cp-tree.h: Include cgraph.h
2430 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
2431 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
2433 2004-06-01 Jason Merrill <jason@redhat.com>
2436 * call.c (call_builtin_trap): Remove type parm.
2437 (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
2438 (build_x_va_arg): Dereference a null pointer for a non-POD argument.
2440 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2443 * init.c (build_offset_ref): Build SCOPE_REF with non-null
2444 TREE_TYPE for non-dependent names.
2445 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
2446 unknown_type_node as its TREE_TYPE.
2447 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
2448 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
2449 (dump_expr) <SCOPE_REF case>: Likewise.
2451 2004-06-01 Richard Henderson <rth@redhat.com>
2452 Andrew Pinski <pinskia@physics.uc.edu>
2454 * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
2455 * parser.c (struct cp_parser): Remove in_offsetof.
2456 (cp_parser_new): Don't set it.
2457 (cp_parser_unary_expression): Don't check it.
2458 (cp_parser_postfix_open_square_expression): Split out from ...
2459 (cp_parser_postfix_expression): ... here.
2460 (cp_parser_postfix_dot_deref_expression): Likewise.
2461 (cp_parser_builtin_offsetof): New.
2462 (cp_parser_primary_expression): Use it.
2464 2004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2467 * parser.c (cp_parser_postfix_expression): Allow subscript
2468 operator in offsetof.
2470 2004-05-31 Mark Mitchell <mark@codesourcery.com>
2473 * friend.c (add_friend): Do not try to perform access checks for
2474 functions from dependent classes.
2476 2004-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
2478 * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
2479 (pp_cxx_begin_template_argument_list): Turn into a function.
2480 (pp_cxx_end_template_argument_list): Likewise.
2481 (pp_cxx_separate_with): Define.
2482 (pp_cxx_unqualified_id): Tidy.
2483 (pp_cxx_primary_expression): Likewise.
2484 (pp_cxx_postfix_expression): Likewise.
2485 (pp_cxx_expression): Likewise.
2486 (pp_cxx_simple_type_specifier): Likewise.
2487 (pp_cxx_type_specifier_seq): Likewise.
2488 (pp_cxx_parameter_declaration_clause): Likewise.
2489 (pp_cxx_exception_specification): Likewise.
2490 (pp_cxx_direct_declarator): Likewise.
2491 (pp_cxx_type_id): Likewise.
2492 * cxx-pretty-print.h (pp_cxx_whitespace): Export from
2494 (pp_cxx_left_paren): Likewise.
2495 (pp_cxx_right_paren): Likewise.
2496 (pp_cxx_left_brace): Likewise.
2497 (pp_cxx_right_brace): Likewise.
2498 (pp_cxx_left_bracket): Likewise.
2499 (pp_cxx_right_bracket): Likewise.
2500 (pp_cxx_dot): Likewise.
2501 (pp_cxx_identifier): Likewise.
2502 (pp_cxx_tree_identifier): Likewise.
2503 (pp_cxx_ampersand): New macro.
2504 (pp_cxx_star): Likewise.
2505 (pp_cxx_arrow): Likewise.
2506 (pp_cxx_semicolon): Likewise.
2507 (pp_cxx_complement): Likewise.
2508 (pp_cxx_begin_template_argument_list): Declaree.
2509 (pp_cxx_end_template_argument_list): Likewise.
2510 (pp_cxx_colon_colon): likewise.
2512 2004-05-31 Eric Botcazou <ebotcazou@libertysurf.fr>
2514 * parser.c (cp_parser_simple_type_specifier): Explicitly test
2517 2004-05-31 Kazu Hirata <kazu@cs.umass.edu>
2519 * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
2520 typeck.c: Fix comment formatting.
2522 2004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
2524 * cp-lang.c (cp_expand_decl): Remove.
2525 (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
2527 2004-05-30 Andreas Jaeger <aj@suse.de>
2529 * lang-specs.h: Add missing initializers for .ii.
2531 2004-05-28 Aldy Hernandez <aldyh@redhat.com>
2533 * decl.c (cp_make_fname_decl): Free return value from
2536 2004-05-28 Mark Mitchell <mark@codesourcery.com>
2539 * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
2541 * init.c (build_new): Likewise.
2544 * name-lookup.c (arg_assoc): Robustify.
2547 * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
2548 when determining the scope to use for a pointer to member.
2549 (lookup_anon_field): Give it external linkage.
2550 * cp-tree.h (lookup_anon_field): Declare it.
2551 * expr.c (cplus_expand_constant): Use it.
2553 2004-05-28 Mark Mitchell <mark@codesourcery.com>
2556 * parser.c (cp_parser_simple_type_specifier): Call
2557 maybe_note_name_used_in_class.
2559 2004-05-28 Tom Marshall <tmarshall@real.com>
2562 * class.c (finish_struct_1): Warn only if the dtor is non-private or
2563 the class has friends.
2565 2004-05-27 Adam Nemet <anemet@lnxw.com>
2568 * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
2569 TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
2571 2004-05-24 Geoffrey Keating <geoffk@apple.com>
2573 * method.c (implicitly_declare_fn): Don't call defer_fn; abort
2574 if it might be needed.
2575 * pt.c (mark_decl_instantiated): Only call defer_fn if
2576 the function actually needs processing in finish_file.
2577 * decl2.c (finish_file): Add check that elements in
2578 deferred_fns_used are really needed there. Remove unnecessary
2579 test of DECL_SAVED_TREE.
2581 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
2583 * Make-lang.in: No need to specify $(LIBCPP).
2585 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2588 * parser.c (cp_parser_class_head): Robustify.
2591 * parser.c (cp_parser_decl_specifier_seq): Correct error in
2593 (cp_parser_constructor_declarator_p): Treat attributes
2597 * typeck.c (build_unary_op): Do not attempt to resolve casts to
2598 base classes in templates.
2600 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2603 * pt.c (instantiate_template): Robustify.
2605 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2608 * decl.c (xref_tag): Issue errors about redeclaring template
2609 classes as non-template classes.
2611 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2614 * name-lookup.c (supplement_binding): Allow redefinitions of
2618 * parser.c (cp_parser_template_argument): Robustify.
2620 2004-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
2622 * class.c (alter_access): Use %E format specifier to print an
2623 identifier node. Avoid looking at the IDENTIFIER_POINTER.
2624 (push_lang_context): Likewise.
2625 * decl.c (lookup_label): Likewise.
2626 (grokdeclarator): Likewise.
2627 * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
2628 * pt.c (do_type_instantiation): Likewise.
2629 * tree.c (handle_java_interface_attribute): Likewise.
2630 (handle_com_interface_attribute): Likewise.
2631 (handle_init_priority_attribute): Likewise.
2633 2004-05-22 Mark Mitchell <mark@codesourcery.com>
2637 * pt.c (build_non_dependent_expr): Expand the set of tree nodes
2638 recognized as overloaded functions.
2640 2004-05-22 Mark Mitchell <mark@codesourcery.com>
2643 * class.c (layout_nonempty_base_or_field): Do not try to avoid
2644 layout conflicts for unions.
2647 * typeck.c (build_x_unary_op): Instantiate template class
2648 specializations before looking for "operator &".
2651 * typeck.c (complete_type): Layout non-dependent array types, even
2655 * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
2658 2004-05-22 Roger Sayle <roger@eyesopen.com>
2660 * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
2661 returning when TREE_TYPE is error_mark_node.
2662 * typeck.c (require_complete_type): Return error_mark_node if
2663 value's type is an error_mark_node.
2665 2004-05-20 Andrew Pinski <pinskia@physics.uc.edu>
2667 * optimize.c (calls_setjmp_r): Remove.
2668 (calls_setjmp_p): Remove.
2669 * cp-tree.c (calls_setjmp_p): Remove.
2670 * decl.c (finish_function): Do not call calls_setjmp_p.
2672 2004-05-18 Zack Weinberg <zack@codesourcery.com>
2674 * decl.c (cp_finish_decl): Use mark_decl_referenced.
2675 * decl2.c (maybe_make_one_only): Likewise.
2676 * method.c (use_thunk): Likewise.
2678 2004-05-18 Jason Merrill <jason@redhat.com>
2680 * class.c (build_base_path): Tidy a bit.
2682 2004-05-14 Geoffrey Keating <geoffk@apple.com>
2684 * name-lookup.c (struct scope_binding): New.
2685 (EMPTY_SCOPE_BINDING): New.
2686 (lookup_using_namespace): Take a scope_binding instead of a
2688 (qualified_lookup_using_namespace): Likewise.
2689 (cxx_binding_clear): Delete.
2690 (do_nonmember_using_decl): Use a scope_binding instead of a
2692 (lookup_tag): Don't call select_decl.
2693 (ambiguous_decl): Don't return anything (and change callers to match).
2694 Take a scope_binding as the second parameter.
2695 (lookup_namespace_name): Use a scope_binding instead of a
2697 (unqualified_namespace_lookup): Likewise.
2698 (lookup_qualified_name): Likewise.
2699 (select_decl): Take a scope_binding instead of a cxx_binding.
2700 Use macros rather than hand-coding tests for type-ness.
2702 2004-05-13 Diego Novillo <dnovillo@redhat.com>
2704 * cp-gimplify.c: Rename from cp-simplify.c.
2705 * Make-lang.in, optimize.c: Update.
2707 2004-05-13 Diego Novillo <dnovillo@redhat.com>
2709 Merge from tree-ssa-20020619-branch. See
2710 ChangeLog.tree-ssa for details.
2712 * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
2713 cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
2714 expr.c, init.c, name-lookup.h, optimize.c, parser.c,
2715 pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
2717 * cp-mudflap.c: New file.
2718 * cp-simplify.c:: New file.
2720 2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2723 * decl2.c (check_classfn): For member templates, compare also the
2724 template parameters to match the declaration.
2725 * cp-tree.h: Adjust declaration of check_classfn.
2726 * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
2727 * friend.c (do_friend): Likewise.
2728 * pt.c (tsubst_friend_function): Likewise.
2730 2004-05-01 Zack Weinberg <zack@codesourcery.com>
2732 * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
2733 Instead, dig into the representation type to find the array bound.
2735 2004-04-30 Jason Merrill <jason@redhat.com>
2737 Refer to base members using COMPONENT_REFs where possible.
2738 * class.c (build_simple_base_path): New fn.
2739 (build_base_path): Use it for non-virtual base references.
2740 (layout_class_type): Change base fields to their real type
2741 after layout is done.
2742 * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
2743 * cp-lang.c (cxx_get_alias_set): Use it.
2745 2004-04-30 Kazu Hirata <kazu@cs.umass.edu>
2747 * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
2750 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2753 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
2754 used in integral constant expressions.
2756 2004-04-22 Mark Mitchell <mark@codesourcery.com>
2758 * init.c (build_aggr_init): Fix accidental use of C99 construct in
2761 * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
2763 * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
2764 * decl.c (reshape_init): Use it.
2765 * init.c (perform_member_init): Remove redundant condition.
2766 (build_aggr_init): Adjust to handle brace-enclosed initializers
2768 (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
2770 * parser.c (cp_parser_initializer_clause): Do not set
2771 TREE_HAS_CONSTRUCTOR on the initializer.
2772 * rtti.c (tinfo_base_init): Likewise.
2773 (generic_initializer): Likewise.
2774 (ptr_initializer): Likewise.
2775 (ptm_initializer): Likewise.
2776 (class_initializer): Likewise.
2777 (get_pseudo_ti_init): Likewise.
2778 * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
2780 2004-04-22 Alan Modra <amodra@bigpond.net.au>
2782 * name-lookup.c (anonymous_namespace_name): Make static.
2784 2004-04-19 Roger Sayle <roger@eyesopen.com>
2787 * class.c (build_base_path): Call fold whilst building the NULL
2788 pointer check expression trees.
2790 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
2792 * init.c (build_new_1): Don't use type size argument for Java
2793 _Jv_AllocObject call.
2795 2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
2797 * method.c (make_alias_for_thunk): Remove preprocessor guard on
2798 declaration and definition.
2800 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
2803 * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
2804 than ASM_OUTPUT_DEF.
2806 2004-04-08 Jakub Jelinek <jakub@redhat.com>
2808 * decl2.c (mark_used): Don't segfault if cfun != NULL but
2809 current_function_decl == NULL.
2811 2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
2814 * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
2817 2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2819 * init.c (decl_constant_value): Don't look at DECL_INITIAL
2821 * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
2822 or TREE_SIDE_EFFECTS of a type.
2824 2004-04-02 Nathan Sidwell <nathan@codesourcery.com>
2827 * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
2828 cv-qualifier unification.
2829 * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
2831 2004-04-02 Jan Hubicka <jh@suse.cz>
2833 * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
2834 * cp-tree.h (cp_update_decl_after_saving): Declare.
2835 * tree.c (cp_update_decl_after_saving): Define.
2837 2004-04-01 Mark Mitchell <mark@codesourcery.com>
2840 * typeck.c (get_delta_difference): Call fold before returning the
2843 2004-04-01 Richard Henderson <rth@redhat.com>
2846 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
2847 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
2849 2004-04-01 Mark Mitchell <mark@codesourcery.com>
2852 * name-lookup.c (maybe_push_cleanup_level): Robustify.
2854 2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2856 * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
2858 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2860 * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
2861 * class.c (check_bitfield_decl): Likewise.
2862 * cvt.c (type_promotes_to): Likewise.
2863 * decl.c (finish_enum): Likewise.
2864 * mangle.c (write_builtin_type): Likewise.
2865 * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
2866 * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
2867 (build_binary_op): Likewise.
2869 2004-03-31 Jan Hubicka <jh@suse.cz>
2871 * tree.h (optimize_function): Kill prototype.
2872 * optimize.c (dump_function, optimize_function, dump_finction): Kill.
2873 * semantics.c (expand_body): Kill.
2875 2004-03-30 Mark Mitchell <mark@codesourcery.com>
2878 * decl.c (start_decl_1): Do not decide whether or not to create a
2879 new cleanup level until after the type has been completed.
2882 * pt.c (tsubst_default_argument): Clear current_function_decl.
2884 2004-03-30 Zack Weinberg <zack@codesourcery.com>
2886 * name-lookup.c, parser.c: Use new shorter form of GTY markers.
2888 2004-03-29 Zack Weinberg <zack@codesourcery.com>
2890 * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
2891 is null, just print the literal name and return.
2893 2004-03-25 Kazu Hirata <kazu@cs.umass.edu>
2895 * cxx-pretty-print.c: Fix comment typos.
2897 2004-03-24 Kazu Hirata <kazu@cs.umass.edu>
2899 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
2902 2004-03-23 Ziemowit Laski <zlaski@apple.com>
2904 * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
2905 * mangle.c (write_type): Add call to 'mangle_fundamental_type'
2908 2004-03-23 Zack Weinberg <zack@codesourcery.com>
2910 PR 12267, 12391, 12560, 13129, 14114, 14133
2911 * cp-lang.c (c_reset_state): Delete.
2912 (push_file_scope, pop_file_scope): New stubs.
2913 * parser.c (c_parse_file): Call sorry() here if called more than once.
2915 2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2917 * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
2920 2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
2922 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
2924 2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
2926 * error.c (enum pad): Remove.
2927 (dump_qualifiers): Likewise.
2928 (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
2929 (dump_aggr_type): Likewise.
2930 (dump_type_suffix): Likewise.
2931 (dump_simple_decl): Likewise.
2932 (dump_function_decl): Likewise.
2933 (cv_to_string): Likewise.
2934 (dump_type_prefix): Likewise. Adjust return void.
2935 * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
2937 (pp_cxx_template_keyword_if_needed): Document.
2938 (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
2939 (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
2940 MUST_NOT_THROW_EXPR.
2942 2004-03-21 Mark Mitchell <mark@codesourcery.com>
2945 * decl.c (cp_finish_decl): Compute the size of arrays declared in
2946 templates, if their type is non-dependent.
2948 2004-03-19 Mark Mitchell <mark@codesourcery.com>
2950 * call.c (build_op_delete_call): Do not forget the placement
2951 arguments when iterating through mutiple delete operators.
2953 * cp-tree.h (svaed_scope): Remove last_parms.
2954 (NEW_DELETE_OPNAME_P): New macro.
2955 (last_function_parms): Remove.
2956 (do_friend): Adjust prototype.
2957 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
2958 using last_function_parms.
2959 (grokfndecl): Take the PARM_DECLs as an argument, rather than
2960 using last_function_parms.
2961 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
2962 for class-specific operator new and operator delete.
2963 (grok_op_properties): Do not look for allocation functions with
2965 (start_function): Use DECL_ARGUMENTS instead of
2966 last_function_parms.
2967 * decl.h (last_function_parms): Do not declare.
2968 * decl2.c (grokclassfn): Do not use last_function_parms.
2969 * friend.c (do_friend): Remove parmdecls parameter.
2970 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
2971 (pop_from_top_level): Do not restore it.
2972 * pt.c (check_explicit_specialization): Do not adjust
2973 last_function_parms.
2975 * name-lookup.c (do_local_using_decl): Create a local binding for
2976 types brought in via using declarations.
2978 * name-lookup.c (lookup_arg_dependent): Handle block-scope
2979 function declarations correctly.
2981 * semantics.c (finish_id_expression): Correct handling of
2982 conversion operators to dependent types.
2984 * typeck.c (lookup_destructor): Allow the use of destructors from
2987 2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2989 * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
2990 TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
2991 * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
2992 the field is named TEMPLATE_TYPE_PARM_INDEX.
2994 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2997 * parser.c (cp_parser_functional_cast): A cast to anything
2998 but integral or enumaration type is not an integral constant
3000 * pt.c (value_dependent_expression_p): Handle cast expressions
3001 without operands (such as "int()").
3003 2004-03-18 Mark Mitchell <mark@codesourcery.com>
3005 * semantics.c (finish_pseudo_destructor_expr): Allow differing
3006 cv-qualification between the type named by the
3007 pseudo-destructor-name and the object-type.
3009 * search.c (accessible_base_p): Handle non-proper bases.
3011 * name-lookup.c (do_nonmember_using_decl): If a using declaration
3012 refers to a single overloaded function, set the type of the
3014 * tree.c (lvalue_type): Simplify.
3015 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
3017 (build_unary_op): Handle OVERLOADs with known types.
3019 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
3022 * parser.c (cp_parser_postfix_expression): Handle the use of
3023 "typename" in non-dependent contexts. Convert appropriately when
3024 when using a qualified name after "->" or ".".
3026 * call.c (conditional_conversion): Honor the requirement that some
3027 conversions refer to the original object.
3029 2004-03-18 Mark Mitchell <mark@codesourcery.com>
3031 * call.c (build_conditional_expr): Do not call force_rvalue for
3032 operands of void_type when the conditional expression itself has
3034 * name-lookup.c (pushdecl): Don't consider a declaration of a
3035 function named "main" to be an overload of a type named "main".
3036 * parser.c (cp_parser_template_name): Perform name lookup when the
3037 template name is proceeded by "template" if the qualifying scope
3039 * typeck.c (composite_pointer_type_r): Correctly handle
3040 pointer-to-member types.
3041 (build_const_cast): Likewise.
3043 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3045 * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
3046 * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
3047 (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
3048 (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
3049 (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
3050 (TYPEOF_TYPE_EXPR): New macro.
3051 * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
3052 * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
3053 * pt.c (tsubst): Likewise.
3054 * semantics.c (finish_typeof): Likewise.
3055 * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
3056 and TEMPLATE_TYPE_PARM.
3057 * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
3058 (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
3060 2004-03-16 Mark Mitchell <mark@codesourcery.com>
3063 * cp-tree.h (build_new_op): Change prototype.
3064 (build_x_binary_op): Likewise.
3065 * call.c (build_new_op): Add overloaded_p parameter.
3066 * decl2.c (grok_array_decl): Adjust call to build_new_op.
3067 * parser.c (cp_parser_binary_expression): Note that uses of
3068 overloaded operators prevents an expression from being considered
3069 an integral constant.
3070 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
3072 * semantics.c (finish_call_expr): Likewise.
3073 * typeck.c (rationalize_conditional_expr): Likewise.
3074 (build_x_indirect_ref): Likewise.
3075 (build_x_binary_op): Likewise.
3076 (build_x_unary_op): Likewise.
3077 (build_x_compound_expr): Likewise.
3078 (build_modify_expr): Likewise.
3079 * typeck2.c (build_x_arrow): Likewise.
3081 2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
3083 * cp-lang.c, ptree.c: Update copyright.
3085 2004-03-13 Mark Mitchell <mark@codesourcery.com>
3088 * parser.c (cp_parser_non_integral_constant_expression): Encode
3089 more of the idiom that surrounded calls to this function within
3091 (cp_parser_primary_expression): Adjust accordingly.
3092 (cp_parser_postfix_expression): Likewise.
3093 (cp_parser_unary_expression): Likewise.
3094 (cp_parser_cast_expression): Likewise.
3095 (cp_parser_assignment_expression): Likewise.
3096 (cp_parser_expression): Likewise.
3097 (cp_parser_new_expression): Note that new-expressions are not
3098 allowed in integral constant expressions.
3099 (cp_parser_delete_expression): Likewise.
3101 2004-03-12 Matt Austern <austern@apple.com>
3103 * decl2.c (maybe_make_one_only): Look at
3104 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
3105 to make an explicit instantiation weak.
3106 * method.c (use_thunk): Make sure we call comdat_linkage
3108 * pt.c (do_type_instantiation): On systems where weak symbols
3109 don't go in a static archive's TOC, explicit instantiation of a
3110 class must imply *explicit* instantiation of its memeber.
3112 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
3114 * call.c, cp-tree.h, pt.c: Fix comment typos.
3116 2004-03-10 Mark Mitchell <mark@codesourcery.com>
3119 * decl.c (xref_tag): Disregard non-type declarations when
3120 looking up a tagged type.
3122 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
3125 * call.c (convert_like_real): Build a const qualified temporary,
3126 when testing ctor access.
3128 2004-03-09 Mark Mitchell <mark@codesourcery.com>
3130 * call.c (initialize_reference): Fix typo.
3132 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3135 * pt.c (determine_specialization): For member templates, match also
3139 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
3141 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
3143 2004-03-09 Mark Mitchell <mark@codesourcery.com>
3146 * call.c (initialize_reference): Handle initializers that are
3147 class-member access expressions applies to rvalues.
3149 2004-03-09 Mark Mitchell <mark@codesourcery.com>
3152 * name-lookup.c (supplement_binding): Ignore functions that are
3153 marked DECL_ANTICIPATED.
3155 2004-03-08 Mark Mitchell <mark@codesourcery.com>
3158 * class.c (check_field_decls): Complain about non-static data
3159 members of reference type in unions. Propagate
3160 CLASSTYPE_REF_FIELDS_NEED_INIT and
3161 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
3163 * init.c (perform_member_init): Complain about mbmers with const
3164 type that are not explicitly initialized.
3166 2004-03-08 Mark Mitchell <mark@codesourcery.com>
3168 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
3169 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
3170 (lang_identifier): Remove implicit_decl and error_locus.
3171 (IDENTIFIER_IMPLICIT_DECL): Remove.
3172 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
3173 (IDENTIFIER_ERROR_LOCUS): Likewise.
3174 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
3175 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
3176 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
3177 (implicitly_declare): Remove.
3178 * decl.c (warn_extern_redeclared_static): Remove check of
3179 IDENTIFIER_IMPLICIT_DECL.
3180 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
3181 (implicitly_declare): Remove.
3182 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
3183 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
3184 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
3185 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
3186 in the innermost scope, rather than at namespace scope.
3187 * name-lookup.c (push_local_binding): Give it external linkage.
3188 (pushdecl): Remove dead code.
3189 * name-lookup.h (push_local_binding): Declare it.
3190 * ptree.c (cxx_print_identifier): Don't print
3191 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
3192 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
3193 not IDENTIFIER_ERROR_LOCUS.
3194 * typeck.c (build_function_call): Remove dead code.
3196 2004-03-08 Jason Merrill <jason@redhat.com>
3199 * decl.c (xref_tag): Remove attribute handling.
3200 * cp-tree.h: Adjust prototype.
3201 * decl.c, parser.c, rtti.c: Adjust callers.
3202 * parser.c (cp_parser_class_head): Pass back attributes in the
3204 (cp_parser_class_specifier): Adjust.
3206 2004-03-08 Matt Austern <austern@apple.com>
3209 * name-lookup.c (add_decl_to_level): Add extern variables, as well
3210 as static, to static_decls array.
3212 2004-03-05 Jason Merrill <jason@redhat.com>
3214 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
3216 2004-03-04 Geoffrey Keating <geoffk@apple.com>
3218 * decl.c (grokfndecl): Update old incorrect comment.
3219 (grokvardecl): Diagnose C++ variables of type with no linkage.
3221 2004-03-01 Mark Mitchell <mark@codesourcery.com>
3224 * pt.c (build_non_dependent_expr): Do not create a
3225 NON_DEPENDENT_EXPR for a THROW_EXPR.
3227 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
3230 * error.c (dump_expr): Handle THROW_EXPR.
3232 2004-03-01 Mark Mitchell <mark@codesourcery.com>
3235 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
3236 lookup if ordinary name-lookup finds a non-function.
3237 * pt.c (tsubst_copy_and_build): Likewise.
3240 * parser.c (cp_parser_late_parsing_default_args): Check that there
3241 are no extra tokens after the end of the default-argument
3244 2004-03-01 Mark Mitchell <mark@codesourcery.com>
3247 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
3248 having C++ linkage for name-mangling purposes.
3251 * parser.c (cp_parser_direct_declarator): Recognize constructor
3252 declarators that use a template-id to name the class being
3256 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
3257 (tsubst_expr): Do not call tsubst_copy, even when
3258 processing_template_decl.
3260 2004-03-01 Jeff Law <law@redhat.com>
3262 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
3265 2004-02-29 Mark Mitchell <mark@codesourcery.com>
3268 * name-lookup.h (push_scope): Change prototype.
3269 * name-lookup.c (push_scope): Do not reenter the current class
3271 * decl.c (grokfndecl): Check return code from push_scope before
3273 * decl2.c (check_classfn): Likewise.
3274 * parser.c (cp_parser_conversion_function_id): Likewise.
3275 (cp_parser_init_declarator): Likewise.
3276 (cp_parser_direct_declarator): Likewise.
3277 (cp_parser_class_specifier): Likewise.
3278 (cp_parser_class_head): Likewise.
3279 (cp_parser_lookup_name): Likewise.
3280 (cp_parser_constructor_declarator_p): Likewise.
3281 * pt.c (instantiate_class_template): Likewise.
3282 (resolve_typename_type): Likewise.
3284 2004-02-29 Mark Mitchell <mark@codesourcery.com>
3287 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
3291 * class.c (update_vtable_entry_for_fn): Do not go through
3292 covariance machinery if the type returned by an overrider is the
3293 same as the original.
3295 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
3297 * call.c: Fix a comment typo.
3299 2004-02-27 Ziemowit Laski <zlaski@apple.com>
3301 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
3303 2004-02-26 Mark Mitchell <mark@codesourcery.com>
3306 * parser.c (cp_parser_parameter_declaration_list): Commit
3307 to fewer tentative parses.
3309 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3312 * pt.c (dependent_type_p_r): A template template parameter is a
3315 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3318 * mangle.c (write_template_arg_literal): Don't rely on identity for
3321 2004-02-24 Jason Merrill <jason@redhat.com>
3323 * tree.c (build_exception_variant): Use check_qualified_type.
3325 2004-02-23 Zack Weinberg <zack@codesourcery.com>
3326 Kazu Hirata <kazu@cs.umass.edu>
3328 * decl.c (cxx_init_decl_processing): Don't check
3329 flag_writable_strings.
3331 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
3334 * typeck.c (maybe_warn_about_returning_address_of_location):
3335 Change check for VAR_DECL to use DECL_P instead.
3337 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3340 * cvt.c (build_expr_type_conversion): Type must be complete before
3341 looking up for conversions.
3343 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3346 * name-lookup.c (arg_assoc_class): Don't look into template
3347 arguments if it is not a primary template.
3349 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3352 * method.c (use_thunk): Always clone function argument tree.
3354 2004-02-20 Mark Mitchell <mark@codesourcery.com>
3357 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
3360 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
3361 for all type variants.
3363 2004-02-19 Mark Mitchell <mark@codesourcery.com>
3366 * decl.c (duplicate_decls): Return error_mark_node for invalid
3368 * name-lookup.c (push_namespace): Ignore the return value from
3370 * pt.c (push_template_decl_real): Robustify.
3373 * name-lookup.c (push_class_level_binding): Do not complain about
3374 adding a binding for a member whose name is the same as the
3375 enclosing class if the member is located in a base class of the
3378 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3381 * parser.c (cp_parser_new_expression): Parse an ill-formed
3382 direct-new-declarator after a parenthesized type-id to emit good
3385 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
3387 * cp-tree.def, cvt.c: Update copyright.
3389 2004-02-17 Mark Mitchell <mark@codesourcery.com>
3392 * cp-tree.h (abi_version_at_least): Remove.
3393 * mangle.c: Include flags.h.
3395 2004-02-15 Mark Mitchell <mark@codesourcery.com>
3398 * call.c (build_conditional_expr): Handle conversions between
3399 class types which result in differently cv-qualified type
3403 * class.c (delete_duplicate_fields_1): Remove.
3404 (delete_duplicate_fields): Likewise.
3405 (finish_struct_anon): Remove check for members with the same name
3406 as their enclosing class.
3407 (check_field_decls): Do not call duplicate_fields.
3408 * decl.c (grokdeclarator): Remove check for static data members
3409 with the same name as their enclosing class.
3410 * name-lookup.c (push_class_level_binding): Check for members with
3411 the same name as their enclosing class.
3413 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
3416 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
3418 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3421 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
3422 has full set of arguments.
3424 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3427 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
3429 2004-02-13 Mark Mitchell <mark@codesourcery.com>
3432 * cp-tree.h (delete_sanity): Change prototype.
3433 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
3434 Remove dead code. Adjust code to warn about deleting an array.
3435 * typekc.c (decay_conversion): Use build_address and build_nop.
3438 * search.c (accessible_p): Do not check access in thunks.
3441 * call.c (build_conditional_expr): Call force_rvalue on the
3442 non-void operand in the case that one result is a throw-expression
3443 and the other is not.
3445 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
3448 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
3449 the type name and look ahead for ::~, and bail out early with a
3450 better error message if the parse is going to fail.
3452 2004-02-12 Mark Mitchell <mark@codesourcery.com>
3454 * call.c (conversion_kind): New type.
3455 (conversion_rank): Likewise.
3456 (conversion): Likewise.
3457 (CONVERSION_RANK): New macro.
3458 (conversion_obstack): New variable.
3459 (obstack_initialized): Likewise.
3460 (z_candidate): Change type of convs and second_conv.
3461 (candidate_warning): New type.
3462 (IDENTITY_RANK): Remove.
3463 (EXACT_RANK): Likewise.
3464 (PROMO_RANK): Likewise.
3465 (STD_RANK): Likewise.
3466 (PBOOL_RANK): Likewise.
3467 (USER_RANK): Likewise.
3468 (ELLIPSIS_RANK): Likewise.
3469 (BAD_RANK): Likewise.
3470 (ICS_RANK): Likewise.
3471 (ICS_STD_RANK): Likewise.
3472 (ICS_USER_FLAG): Likewise.
3473 (ICS_ELLIPSIS_FLAG): Likewise.
3474 (ICS_THIS_FLAG): Likewise.
3475 (ICS_BAD_FLAG): Likewise.
3476 (NEED_TEMPORARY_P): Likewise.
3477 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
3478 (USER_CONV_CAND): Likewise.
3479 (USER_CONV_FN): Likewise.
3480 (conversion_obstack_alloc): New function.
3481 (alloc_conversion): Likewise.
3482 (validate_conversion_obstack): Likewise.
3483 (alloc_conversions): Likewise.
3484 (build_conv): Adjust to deal with new conversion data structures.
3485 (build_identity_conv): New function.
3486 (build_ambiguous_conv): Likewise.
3487 (standard_conversion): Adjust to deal with new conversion data
3489 (convert_class_to_reference): Likewise.
3490 (direct_reference_binding): Likewise.
3491 (reference_binding): Likewise.
3492 (implicit_conversion): Likewise.
3493 (add_candidate): Likewise.
3494 (add_function_candidate): Likewise.
3495 (add_conv_candidate): Likewise.
3496 (build_builtin_candidate): Likewise.
3497 (print_z_candidate): Likewise.
3498 (merge_conversion_sequences): Likewise.
3499 (build_user_type_conversion_1): Likewise.
3500 (build_user_type_conversion): Likewise.
3501 (build_new_function_call): Likewise.
3502 (build_object_call): Likewise.
3503 (conditional_conversion): Likewise.
3504 (build_conditional_expr): Likewise.
3505 (build_new_op): Likewise.
3506 (build_op_delete_call): Likewise.
3507 (convert_like_real): Likewise.
3508 (build_over_call): Likewise.
3509 (build_new_method_call): Likewise.
3510 (is_subseq): Likewise.
3511 (maybe_handle_implicit_object): Likewise.
3512 (maybe_handle_ref_bind): Likewise.
3513 (compare_ics): Likewise.
3514 (source_type): Likewise.
3515 (add_warning): Likewise.
3517 (can_convert_arg): Likewise.
3518 (can_convert_arg_bad): Likewise.
3519 (perform_implicit_conversion): Likewise.
3520 (perform_direct_initialization_if_possible): Likewise.
3521 (initialize_reference): Likewise.
3522 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
3523 * cp-tree.def (WRAPPER): Likewise.
3524 (IDENTITY_CONV): Remove.
3525 (LVALUE_CONV): Likewise.
3526 (QUAL_CONV): Likewise.
3527 (STD_CONV): Likewise.
3528 (PTR_CONV): Likewise.
3529 (PMEM_CONV): Likewise.
3530 (BASE_CONV): Likewise.
3531 (REF_BIND): Likewise.
3532 (USER_CONV): Likewise.
3533 (AMBIG_CONV): Likewise.
3534 (RVALUE_CONV): Likewise.
3535 * cp-tree.h (tree_wrapper): Remove.
3536 (WRAPPER_ZC): Remove.
3537 (lang_tree_node): Remove wrapper.
3538 (LOOKUP_SPECULATIVELY): Remove.
3539 (build_op_delete_call): Adjust prototype.
3540 (validate_conversion_obstack): Declare.
3541 (build_zc_wrapper): Remove.
3542 * cvt.c (convert_to_reference): Remove dead code.
3543 (ocp_convert): Likewise.
3544 * decl.c (redeclaration_error_message): Correct handling of
3546 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
3547 (cp_tree_node_structure): Remove WRAPPER case.
3548 * decl2.c (finish_file): Call validate_conversion_obstack.
3549 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
3550 (build_op_delete_call): Likewise.
3551 (build_x_delete): Likewise.
3552 (build_delete): Adjust call to build_op_delete_call.
3553 * pt.c (tsubst_friend_declaration): Adjust code to determine
3554 whether or not a friend template is a definition.
3555 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
3556 * tree.c (build_zc_wrapper): Remove.
3558 2004-02-12 Zack Weinberg <zack@codesourcery.com>
3560 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
3561 * cp-tree.h: Don't declare cxx_builtin_type_decls.
3562 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
3563 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
3565 2004-02-10 Mark Mitchell <mark@codesourcery.com>
3567 * typeck.c (lookup_destructor): Fix typo in error message.
3569 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
3571 * call.c, parser.c, tree.c: Fix comment typos.
3573 2004-02-07 Zack Weinberg <zack@codesourcery.com>
3576 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
3577 * decl.c (duplicate_decls, start_function): Likewise.
3579 2004-02-07 Zack Weinberg <zack@codesourcery.com>
3581 * name-lookup.c (pushdecl): Issue shadow warnings directly.
3582 * parser.c (free_parser_stacks): Delete.
3584 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
3586 * rtti.c: Update copyright.
3588 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3591 * decl.c (require_complete_types_for_parms): Do not insert
3592 error_mark_node in the parameter list.
3594 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3597 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
3598 error when terminator can not be found.
3600 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
3602 Make-lang.in (po-generated): Delete.
3604 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
3606 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
3607 targetm.calls.promote_prototypes.
3609 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3613 2004-01-15 Geoffrey Keating <geoffk@apple.com>
3615 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
3616 (handle_pragma_implementation): Likewise.
3618 2004-02-05 Mark Mitchell <mark@codesourcery.com>
3621 * typeck.c (lookup_destructor): Tweak error message.
3623 2004-02-05 Jan Hubicka <jh@suse.cz>
3625 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
3628 2004-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3631 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
3632 code, only emits the diagnostic now. Added lookup of the identifier
3633 and support for qualified ids.
3634 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
3635 Parse an (invalid) type name as id-expression within a declarator.
3636 (cp_parser_simple_declaration): Use it.
3637 (cp_parser_member_declaration): Likewise.
3638 (cp_parser_make_typename_type): New function. Handle errors through
3639 cp_parser_diagnose_invalid_typename.
3640 (cp_parser_elaborated_type_specifier): Use it.
3642 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3645 * call.c (convert_like_real): Use "converting" rather than
3646 "argument" as the descriptive keyword to
3647 dubious_conversion_warnings.
3648 * typeck.c (convert_for_assignment): Do not call
3649 dubious_conversion_warnings.
3651 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3654 * init.c (build_delete): Emit a more informative error message in
3655 case of an incomplete type, and on the correct source line.
3657 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
3659 * error.c, search.c: Update copyright.
3661 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3664 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
3665 linkage for the typeinfo name string.
3667 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3670 * cp-tree.h (fold_non_dependent_expr): New function.
3671 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
3672 (cp_parser_template_argument): Use fold_non_dependent_expr.
3673 (cp_parser_direct_declarator): Likewise.
3674 * pt.c (fold_non_dependent_expr): New function.
3675 (convert_nontype_argument): Use it.
3676 (tsubst_qualified_id): Simplify.
3677 (tsubst_copy_and_build): Likewise.
3679 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3681 * decl.c (cxx_push_function_context): Do not set
3682 current_function_is_thunk.
3683 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
3686 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3689 * pt.c (more_specialized_class): Increase processing_template_decl
3690 while partial ordering.
3692 2004-02-03 Mark Mitchell <mark@codesourcery.com>
3695 * decl.c (start_function): Do not call pushdecl for any
3696 instantiation or specialization of a primary template.
3698 2004-02-03 Mark Mitchell <mark@codesourcery.com>
3701 * parser.c (cp_parser_class_name): Robustify.
3704 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
3707 * semantics.c (finish_id_expression): Do not return an
3708 IDENTIFIER_NODE when lookup finds a PARM_DECL.
3710 2004-02-03 Mark Mitchell <mark@codesourcery.com>
3713 * pt.c (build_non_dependent_expr): Do not build
3714 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
3717 * semantics.c (finish_id_expression): Do not return an
3718 IDENTIFIER_NODE when lookup finds a VAR_DECL.
3721 * parser.c (cp_parser_simple_declaration): When skipping to the
3722 end of the statement swallow the terminating semicolon.
3724 2004-02-02 Mark Mitchell <mark@codesourcery.com>
3727 * init.c (build_offset_ref): Improve error recovery for invalid
3728 uses of non-static member functions.
3731 * cp-tree.h (cp_build_type_attribute_variant): New function.
3732 * class.c (build_clone): Use cp_build_type_attribute_variant.
3733 * decl.c (duplicate_decls): Likewise.
3734 * pt.c (copy_default_args_to_explicit_spec): Likewise.
3735 (tsubst_function_type): Likewise.
3736 * tree.c (build_exception_variant): Check attributes before
3737 concluding that two types are the same.
3738 (cp_build_type-attribute_variant): New method.
3739 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
3742 * call.c (convert_class_to_reference): Keep better track of
3743 pedantically invalid user-defined conversions.
3745 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3748 * pt.c (tsubst_qualified_id): Improved error message when a type
3749 is expected but not found.
3751 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
3753 * class.c: Fix comment typos.
3755 * error.c: Likewise.
3756 * parser.c: Likewise.
3758 * search.c: Likewise.
3759 * typeck.c: Likewise.
3761 2004-01-30 Richard Henderson <rth@redhat.com>
3764 * method.c (use_thunk): Don't force_target_expr for void thunks.
3765 * tree.c (build_target_expr_with_type): Assert non-void type.
3766 (force_target_expr): Likewise.
3768 2004-01-30 Michael Matz <matz@suse.de>
3770 * parser.c (cp_parser_labeled_statement): Accept case ranges.
3772 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3776 * decl.c (grokdeclarator): Check immediatly type completeness for
3777 non-dependent types.
3779 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3782 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
3783 a sizeof expression.block
3785 2004-01-29 Mark Mitchell <mark@codesourcery.com>
3788 * mangle.c (write_encoding): Correct encoding of member template
3791 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3793 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
3794 template name as it was `<::' (digraph typo).
3795 (cp_parser_nth_token_starts_template_argument_list_p): New function.
3796 (cp_parser_id_expression): Use it.
3797 (cp_parser_nested_name_specifier_opt): Likewise.
3798 (cp_parser_template_name): Likewise.
3799 (cp_parser_class_name): Likewise.
3800 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
3802 2004-01-28 Mark Mitchell <mark@codesourcery.com>
3805 * typeck.c (merge_types): Do not merge attributes into
3809 * parser.c (cp_parser_direct_declarator): Do not prevent
3810 backtracking inside a parenthesized declarator.
3811 (cp_parser_parameter_declaration): Fix typo in comment.
3813 2004-01-28 Jan Hubicka <jh@suse.cz>
3815 * semantics.c (expand_body) Do emit_associated_thunks before
3818 2004-01-27 Devang Patel <dpatel@apple.com>
3820 * name-lookup.c: Include "debug.h"
3821 (do_namespace_alias): Invoke debug_hooks to emit debug info
3822 for namespace alias.
3823 (do_local_using_decl): Invoke debug_hooks to emit debug info
3825 (do_class_using_decl): Same.
3826 (do_toplevel_using_decl): Same.
3827 (do_using_directive): Same.
3828 (cp_emit_debug_info_for_using): New function.
3829 * Make-lang.in (cp/parser.o): Depend on debug.h
3830 (cp/name-lookup.o): Same.
3832 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3834 * cp-tree.h (language_function, lang_type_header): Use
3836 * name-lookup.h (cp_binding_level): Likewise.
3838 2004-01-26 Mark Mitchell <mark@codesourcery.com>
3841 * semantics.c (finish_for_expr): Check for unresolved overloaded
3844 * class.c (add_method): Just check processing_template_decl to
3845 determine whether or not we are within a template.
3846 * decl2.c (maybe_retrofit_in_chrg): Likewise.
3847 * init.c (decl_constant_value): Check the type of the declaration,
3849 * name-lookup.c (maybe_push_to_top_level): Rename to ...
3850 (push_to_top_level): ... this.
3851 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
3852 * pt.c (push_template_decl_real): Reorder condition for speed.
3853 (convert_template_argument): Use dependency-checking functions in
3854 place of uses_template_parms.
3855 (lookup_template_class): Avoid calling uses_template_parms more
3857 (uses_template_parms): Reimplement, using dependency-checking
3859 (instantiate_class_template): Use push_to_top_level, not
3860 maybe_push_to_top_level.
3861 (type_unification_real): Simplify.
3862 (type_dependent_expression_p): Handle OFFSET_REFs and
3864 (any_dependent_template_arguments_p): Handle multiple levels of
3866 * semantics.c (expand_or_defer_fn): Do not check
3867 uses_template_parms for template instantiations.
3868 * typeck.c (comptypes): Avoid calling cp_type_quals.
3870 2004-01-25 Mark Mitchell <mark@codesourcery.com>
3873 * call.c (build_over_call): Do not convert arguments when
3874 processing a template.
3875 * pt.c (build_non_dependent_expr): Do not build a
3876 NON_DEPENDENT_EXPR for arithmetic constants.
3878 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3881 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
3882 returns a TYPE_DECL. no further lookup is required.
3883 * semantics.c (check_template_template_default_arg): A TYPE_DECL
3884 is invalid. Rework to give better diagnostics.
3886 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3889 * pt.c (instantiate_class_template): Add an error_mark_node
3891 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
3893 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
3896 * decl.c (finish_function): Move the call to
3897 finish_fname_decls below the call to
3898 finish_eh_spec_block.
3900 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
3902 * optimize.c, typeck2.c: Update copyright.
3904 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
3906 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
3907 init.c, mangle.c, typeck.c: Update copyright.
3909 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
3911 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
3913 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
3915 * Make-lang.in: Replace $(docdir) with doc.
3916 (c++.info, c++.srcinfo): Dummy entry.
3917 (c++.man, c++.srcman): New rules.
3918 (c++.install-man): Revamp rule.
3920 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
3922 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
3923 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
3924 immediate $(shell) instead of deferred backquote.
3926 2004-01-19 Mark Mitchell <mark@codesourcery.com>
3929 * parser.c (cp_parser_postfix_expression): When encountering
3930 incomplete type on left-hand side of "->" or ".", treat the entire
3931 expression as erroneous.
3934 * call.c (build_field_call): Remove.
3935 (n_build_method_call): Likewise.
3936 (build_method_call): Likewise.
3937 (build_new_method_call): Do not call build_field_call.
3938 * class.c (n_build_method_call): Remove.
3939 (print_class_statistics): Do not print it.
3940 * cp-tree.h (build_method_call): Remove declaration.
3941 (finish_object_call_expr): Likewise.
3942 (build_new_1): Do not use build_method_call.
3943 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
3944 when the function appearing on the right-hand-side of "." or "->"
3945 is not actually a function.
3946 * pt.c (tsubst_copy_and_build): Likewise.
3947 * semantics.c (finish_object_call_expr): Remove.
3949 2004-01-18 Mark Mitchell <mark@codesourcery.com>
3952 * pt.c (tsubst): Use finish_typeof.
3954 2004-01-18 Jason Merrill <jason@redhat.com>
3957 * except.c (build_throw): In a template, set
3958 current_function_returns_abnormally.
3960 2004-01-17 Fred Fish <fnf@intrinsity.com>
3963 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
3964 except don't call array_type_nelts() with a VECTOR_TYPE.
3966 2004-01-16 Jan Hubicka <jh@suse.cz>
3968 * mangle.c (write_mangled_name): Remove inline modifier.
3970 2004-01-16 Mark Mitchell <mark@codesourcery.com>
3973 * decl.c (compute_array_index_type): Fix grammar in comment.
3974 * init.c (build_zero_init): Handle zero-sized arrays correctly.
3977 * call.c (name_as_c_string): Print conversion operator names
3981 * call.c (initialize_reference): Pass -1 for inner parameter to
3984 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3987 * parser.c (cp_parser_base_specifier): Check for an invalid
3988 keyword `typename' and emit an user-friendly error message.
3990 2004-01-15 Geoffrey Keating <geoffk@apple.com>
3993 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
3994 (handle_pragma_implementation): Likewise.
3996 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3999 * typeck.c (build_class_member_access_expr): Allow to access members
4000 of the currently open class.
4001 (finish_class_member_access_expr): Likewise.
4003 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
4006 * name-lookup.c (validate_nonmember_using_decl): Take scope and
4007 name by value, instead of computing them.
4008 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
4009 arguments. Pass them to validate_nonmember_using_decl.
4010 * name-lookup.h (do_local_using_decl): Adjust.
4011 (do_toplevel_using_decl): Likewise.
4012 * parser.c (cp_parser_using_declaration): Likewise.
4013 * pt.c (tsubst_expr): Likewise.
4015 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
4019 * name-lookup.c (qualified_lookup_using_namespace): Search
4020 strongly-associated namespaces first, and only then try other
4023 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
4025 * Make-lang.in (c++.srcextra): Dummy entry.
4027 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4030 * parser.c (cp_parser_template_name): Don't try to parse a
4031 conversion-function-id, as it cannot be a template-name.
4032 (cp_parser_simple_type_specifier): Check for invalid template-ids
4033 even after a built-in type.
4035 2004-01-14 Jan Hubicka <jh@suse.cz>
4038 * pt.c (instantiate_decl): Do not increase function_depth.
4040 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
4044 * parser.c (cp_parser_elaborated_type_specifier): Warn about
4045 attributes and discard.
4046 * decl.c (xref_tag): Don't overwite existing attributes with
4049 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4052 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
4053 is no destructor while looking up a BIT_NOT_EXPR.
4055 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
4057 * cxxfilt.c: Remove unused file.
4059 2004-01-14 Jan Hubicka <jh@suse.cz>
4061 Partial fix to PR c++/12850
4062 * decl2.c (mark_used): Do not proactively instantiate templates
4063 when compiling in unit-at-a-time or not optimizing.
4064 * optimize.c (maybe_clone_body): Do not increase function depth.
4066 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4069 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
4071 2004-01-12 Steven Bosscher <stevenb@suse.de>
4074 * parser.c (cp_parser_member_declaration): Any non-type is also
4075 not a class or a function.
4077 2004-01-12 Jason Merrill <jason@redhat.com>
4080 * class.c (build_base_path): Do not mark vtable references as
4082 (build_vtbl_ref_1): Likewise.
4084 2004-01-12 Richard Henderson <rth@redhat.com>
4087 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
4088 (store_init_value): Use it.
4089 * decl.c (check_initializer): Expect full initialization code
4090 from store_init_value.
4091 * init.c (expand_aggr_init_1): Likewise.
4092 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
4094 2004-01-12 Mark Mitchell <mark@codesourcery.com>
4096 * class.c (layout_class_type): For non-POD class types, also copy
4097 the DECL_SIZE and DECL_MODE of fields to the base class type.
4099 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4102 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
4103 calling regenerate_decl_from_template.
4105 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
4108 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
4109 decl-specifier occurring along with a class definition.
4111 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
4113 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
4114 clauses to comments describing declares_class_or_enum.
4115 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
4118 2004-01-12 Jan Hubicka <jh@suse.cz>
4120 * pt.c (for_each_template_parm): Do not check for duplicates.
4121 (for_each_template_parm): Use walk_tree duplicate checking code.
4123 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
4126 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
4127 is error_mark_node, don't add any more decl_specs.
4128 (cp_parser_init_declarator): After committing to a declaration, if
4129 the decl_specifiers start with error_mark_node, issue an error and
4130 change the type to "int".
4132 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
4135 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
4137 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4141 * pt.c (tsubst): Substitution must fail if we are attempting to
4142 create an array with element type that is an abstract class type.
4143 * decl.c (cp_finish_decl): Strip pointers and array types recursively
4144 before calling abstract_virtuals_error.
4146 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
4148 * name-lookup.c (qualified_lookup_using_namespace): Consider
4149 strong using directives even if we've already found a binding.
4151 2004-01-09 Mark Mitchell <mark@codesourcery.com>
4153 * cp-tree.h (cxx_expand_expr): Change prototype.
4154 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
4156 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4159 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
4160 looking into them recursively. They can be there because of the
4161 new __offsetof__ extension.
4163 2004-01-07 Zack Weinberg <zack@codesourcery.com>
4165 * parser.c (cp_parser_save_member_function_body): Mark the
4168 2004-01-05 Mark Mitchell <mark@codesourcery.com>
4171 * class.c (build_clone): Copy type attributes from the original
4172 function to the clone.
4175 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
4176 references as constant.
4179 * parser.c (cp_parser_explicit_instantiation): Improve error
4181 (cp_parser_require): Improve indication of the error location.
4184 * parser.c (cp_parser_class_head): Reorder logic to check for
4185 invalid qualification.
4187 2004-01-04 Mark Mitchell <mark@codesourcery.com>
4190 * name-lookup.c (lookup_using_namespace): Remove spacesp
4192 (unqualified_namespace_lookup): Likewise.
4193 (lookup_qualified_name): Adjust accordingly.
4194 (lookup_name_real): Likewise.
4195 (lookup_arg_dependent): Do not eliminate the namespace of the
4196 functions found by unqualified name lookup unless that is the
4199 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
4201 * semantics.c (push_deferring_access_checks): Fix format.
4202 (resume_deferring_access_checks): Likewise.
4203 (stop_deferring_access_checks): Likewise.
4204 (pop_deferring_access_checks): Likewise.
4205 (get_deferred_access_checks): Likewise.
4206 (pop_to_parent_deferring_access_checks): Likewise.
4207 (perform_deferred_access_checks): Likewise.
4208 (perform_or_defer_access_check): Likewise.
4210 2004-01-04 Richard Henderson <rth@redhat.com>
4212 * call.c (build_over_call): Don't create a save_expr of an
4213 aggregate, but rather its address.
4215 2004-01-04 Mark Mitchell <mark@codesourcery.com>
4218 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
4219 an offsetof expression.
4221 * parser.c (cp_parser_parameter_declaration): Fix comment.
4224 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
4225 (reference_binding): Set it when appropriate.
4226 (build_temp): New function, split out from ...
4227 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
4228 (initialize_reference): Likewise.
4231 * parser.c (cp_parser): Add in_type_id_in_expr_p.
4232 (cp_parser_new): Initialize it.
4233 (cp_parser_postfix_expression): Set it.
4234 (cp_parser_sizeof_operand): Likewise.
4235 (cp_parser_parameteR_declaration): Do not commit early to tenative
4236 parsers when in_type_id_in_expr_p is set.
4238 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4241 * parser.c (cp_parser_template_argument): Don't call
4242 make_unbound_class_template directly.
4243 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
4244 UNBOUND_CLASS_TEMPLATE tree node.
4246 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
4249 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
4251 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4254 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
4255 (DECL_FUNCTION_TEMPLATE_P): Use it.
4256 (DECL_CLASS_TEMPLATE_P): Likewise.
4257 * parser.c (cp_parser_lookup_name): Add is_template parameter.
4258 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
4259 (cp_parser_template_name): Likewise.
4260 (cp_parser_elaborated_type_specifier): Likewise.
4261 (cp_parser_namespace_name): Likewise.
4262 (cp_parser_class_name): Likewise.
4263 (cp_parser_lookup_name_simple): Likewise.
4265 See ChangeLog.3 for earlier changes.