1 2004-07-13 Mark Mitchell <mark@codesourcery.com>
5 * decl.c (grokvardecl): Make declspecs parameter const.
6 (grokdeclarator): Likewise. Adjust accordingly.
7 * decl.h (grokdeclarator): Adjust declaration.
8 * parser.c (cp_parser_init_declarator): Do not clear
9 decl_specifiers->attributes.
11 * cp-tree.h (lang_identifier): Remove class_value.
12 (IDENTIFIER_CLASS_VALUE): Remove.
13 (pop_class_decls): Likewise.
14 (init_search_processing): Likewise.
15 * class.c (handle_using_decl): Use lookup_member, not
16 IDENTIFIER_CLASS_VALUE.
17 (restore_class_cache): New function, split out from ...
18 (pushclass): ... here. Do not call clear_identifier_class_values.
19 (invalidate_class_lookup_cache): Do not clear
20 IDENTIFIER_CLASS_VALUE.
21 (popclass): Do not call pop_class_decls.
22 (maybe_note_name_used_in_class): Do not save names looked up after
23 the class is complete. Use lookup_member, not
24 IDENTIFIER_CLASS_VALUE.
25 * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
26 * decl.c (cxx_init_decl_processing): Do not call
27 init_search_processing.
28 * method.c (do_build_copy_constructor): Remove unnecessary code.
29 (do_build_assign_ref): Likewise.
30 * name-lookup.c (pushdecl): Use lookup_member, not
31 IDENTIFIER_CLASS_VALUE.
32 (set_identifier_type_value_with_scope): Set TREE_TYPE on the
34 (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
35 (push_class_binding): Do not set it.
36 (clear_identifier_class_values): Remove.
37 (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
38 (store_binding): Do not save it.
39 (pop_from_top_level): Do not restore it.
40 * name-lookup.h (cxx_saved_binding): Remove class_value.
41 (clear_identifier_class_values): Remove.
42 * ptree.c (cxx_print_identifier): Do not print
43 IDENTIFIER_CLASS_VALUE.
44 * search.c (search_obstack): Remove.
45 (push_stack_level): Remove.
46 (pop_stack_level): Remove.
47 (search_level): Remove.
48 (search_stack): Remove.
49 (lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
50 (setup_class_bindings): Use IDENTIFIER_MARKED, not
51 IDENTIFIER_CLASS_VALUE.
52 (marked_identifiers): New variable.
53 (push_class_decls): Clear IDENTIFIER_MARKED.
54 (pop_class_decls): Don't call pop_search_level.
55 (init_search_processing): Remove.
57 2004-07-12 Mark Mitchell <mark@codesourcery.com>
59 * cp-tree.h (get_aggr_typedef): Remove.
60 * init.c (get_aggr_typedef): Likewise.
62 * name-lookup.c (push_class_level_binding): Simplify.
64 2004-07-12 Andrew Pinski <apinski@apple.com>
68 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
70 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
73 2004-07-12 Eric Christopher <echristo@redhat.com>
75 * parser.c (cp_parser_class_head): Remove unused variable.
77 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
79 * decl.c (grok_op_properties): Reject [de-]allocation functions
80 declared in a namespace, or declared as static.
82 2004-07-12 Nathan Sidwell <nathan@codesourcery.com>
84 * cp-tree.h (make_binfo): Remove.
85 * decl.c (xref_basetypes): Use make_tree_binfo directly.
86 * tree.h (copy_base_binfos): Likewise.
89 * call.c (build_user_type_conversion_1, build_new_op,
90 check_constructor_callable, build_temp,
91 perform_direct_initialization_of_possible): Pass type directly to
92 lookup_fnfields & build_special_member_call.
93 (build_special_member_call): Accept a type, and complete it.
94 * class.c (finish_stuct_bits): Copy the BINFOs here.
95 * cvt.c (ocp_convert): Pass type directly to
96 build_special_member_call.
97 * decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
98 (xref_basetypes): Allocate the binfo here. Adjust.
99 * init.c (build_init, build_new_1): Pass type directly to
100 build_special_member_call.
101 * lex.c (cxx_make_type): Do not allocate binfo here.
102 * name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
103 * parser.c (cp_parser_class_head): Always call xref_basetypes.
104 * pt.c (instantiate_class_template): Likewise. Inhibit access
105 checking for template friends.
106 * ptree.c (cxx_print_type): Adjust record printing.
107 * search.c (lookup_base): When taking a type, complete it before
109 (lookup_member): Delay completing a type.
110 (push_class_decls): Don't walk an incomplete type.
111 (lookup_conversions): Likewise.
112 * semantics.c (finish_stmt_expr_expr): Pass type directly to
113 build_special_member_call.
114 * tree.c (copy_base_binfos): Adjust.
115 (make_binfo): Likewise.
116 * typeck.c (build_modify_expr): Pass type directly to
117 build_special_member_call.
118 * typeck2.c (process_init_constructor): Check a binfo exists.
119 (build_m_component_ref): Allow accessing an incomplete type.
120 (build_functional_cast): Pass type directly to
121 build_special_member_call.
123 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
126 * config-lang.in (gtfiles): Add typeck2.c.
127 * Make-lang.in: Tweak typeck2.c dependencies, and add rule for
129 * cp-tree.h: Declare complete_type_check_abstract.
130 * typeck2.c (pat_calc_hash, pat_compare,
131 complete_type_check_abstract): New functions.
132 (abstract_virtuals_error): If the type is abstract, register the
133 declaration within abstract_pending_vars for further checks.
134 Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
135 * decl.c (cp_finish_decl): Do not strip array types.
136 (create_array_type_for_decl): Check for abstractness of the element
138 (complete_vars): Call complete_type_check_abstract.
139 * class.c (finish_struct): Prepare a list of virtual functions for
140 template types, and call complete_vars on it to check for abstractness.
142 2004-07-12 Paolo Bonzini <bonzini@gnu.org>
144 PR tree-optimization/14107
145 * decl.c (finish_function): Remove temporary band-aid.
147 2004-07-11 Mark Mitchell <mark@codesourcery.com>
149 * call.c (build_operator_new_call): Avoid using push_to_top_level.
150 (build_new_op): Adjust call to lookup_function_nonclass.
151 * name-lookup.c (identifier_type_value): Adjust call to
153 (lookup_name_real): Add block_p parameter.
154 (lookup_name_nonclass): Adjust call to lookup_name_real.
155 (lookup_function_nonclass): Likewise.
156 (lookup_name): Likewise.
157 * name-lookup.h (lookup_name_real): Change prototype.
158 (lookup_name_nonclass): Likewise.
159 * parser.c (cp_parser_lookup_name): Likewise.
161 * cp-tree.h (saved_scope): Make old_bindings a vector.
162 (unuse_fields): Remove.
163 * name-lookup.h (cxx_saved_binding): Define it.
164 * class.c (pushclass): Don't use unuse_fields.
165 * name-lookup.c (cxx_saved_binding_make): Remove.
166 (store_binding): Add new bindings to a vector, using an
167 accumulator style, rather than adding them to a list.
168 (store_bindings): Adjust accordingly.
169 (store_class_bindings): Likewise.
170 (push_to_top_level): Likewise.
171 (pop_from_top_level): Likewise.
172 * optimize.c (maybe_clone_body): Must push_to_top_level and
173 pop_from_top_level calls outside of loop.
174 * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope
175 calls here from cp_parser_late_parsing_default_args.
176 (cp_parser_save_default_args): Record the class type in which the
177 function is declared.
178 (cp_parser_late_parsing_default_args): Do not call
179 push_nested_class/pop_nested_class.
180 * search.c (dfs_unuse_fields): Remove.
181 (unuse_fields): Remove.
183 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
185 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
186 LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
187 * cp-tree.h (poplevel): Declare.
189 * decl.c (set_block): Remove.
191 2004-07-10 Mike Stump <mrs@apple.com>
193 * decl2.c (import_export_class): Never export/import vtables
194 with inline key functions.
196 2004-07-09 Steven Bosscher <stevenb@suse.de>
198 * typeck.c (c_expand_asm_operands): Remove.
200 2004-07-09 Mike Stump <mrs@apple.com>
202 * typeck.c (build_class_member_access_expr): Skip null deref
203 warning when we don't dereference it.
205 2004-07-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
209 * class.c (check_field_decls): Improve -Weffc++ warning: do not
210 warn for pointers to functions/members, or for classes without
213 2004-07-08 Mark Mitchell <mark@codesourcery.com>
215 * name-lookup.h (struct cp_binding_level): Update documentation
218 2004-07-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
221 * typeck.c (check_return_expr): Improve -Weffc++ warning: handle
222 returning CALL_EXPR, and non-reference return type.
224 2004-07-08 Nathan Sidwell <nathan@codesourcery.com>
226 * name-lookup.c (push_binding): Use VEC_reserve.
228 2004-07-08 Richard Henderson <rth@redhat.com>
230 * cp-tree.h (expand_eh_spec_block): Remove.
232 2004-07-07 Mark Mitchell <mark@codesourcery.com>
234 * cp-tree.h (saved_scope): Remove x_previous_class_type and
235 x_previous_class_values; add x_previous_class_level.
236 (previous_class_type): Remove.
237 (previous_class_values): Remove.
238 (previous_class_level): New macro.
239 * class.c (pushclass): Restore the identifier cache more
241 (invalidate_class_lookup_cache): Use vector for class_shadowed and
242 previous_class_values.
243 * decl.c (poplevel): Likewise.
244 * name-lookup.c (cxx_binding_init): New function.
245 (cxx_binding_make): Use it.
246 (push_binding): For a binding in a class level, use a vector of
247 cp_class_binding nodes.
248 (push_binding_level): New function.
249 (begin_scope): Use it.
250 (leave_scope): Do not put class binding levels on the free list.
251 (print_binding_level): Adjust for the fact that class_shadowed is
253 (poplevel_class): Likewise.
254 (clear_identifier_class_values): Likewise.
255 (push_class_level_binding): Likewise.
256 (set_class_shadows): Remove.
257 (store_binding): New function.
258 (store_class_bindings): New function.
259 (push_to_top_level): Use store_class_bindings as appropriate.
260 (pop_from_top_level): Use previous_class_level, not
262 * name-lookup.h (cp_class_binding): New type.
263 (cp_binding_level): Use a vector object for class_shadowed.
264 (push_binding_level): Declare.
265 (set_class_shadows): Remove.
267 2004-07-07 Andrew Pinski <apinski@apple.com>
269 * class.c (instantiate_type): BUFFER_REF is dead.
270 * lex.c (init_operators): IN_EXPR is dead.
272 2004-07-07 Jason Merrill <jason@redhat.com>
275 * call.c (build_new_op): Give overload warnings for built-in
278 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
281 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
284 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
286 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
287 * class.c (build_primary_vtable, check_bases,
288 determine_primary_base, finish_struct_bits,
289 maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
290 get_basefndecls, warn_hidden, walk_subobject_offsets,
291 build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
292 layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
293 finish_struct_1, get_vfield_name, contains_empty_class_p,
294 dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
295 dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
296 add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
298 * decl.c (xref_basetypes): Likewise.
299 * dump.c (cp_dump_tree): Likewise.
300 * error.c (dump_expr): Likewise.
301 * init.c (sort_mem_initializers, expand_member_init,
302 push_base_cleanups): Likewise.
303 * method.c (do_build_copy_constructor, do_build_assign_reg,
304 synthesize_exception_spec): Likewise.
305 * name-lookup.c (arg_assoc_class):
306 * pt.c (instantiate_class_template, tsubst,
307 get_template_base_recursive):
308 * ptree.c (cxx_print_type):
309 * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
310 * search.c (lookup_base_r, dynamic_cast_base_recurse,
311 dfs_access_in_type, access_in_type, lookup_field_queue_p,
312 bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
313 marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
314 dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
315 binfo_for_vtable, copied_binfo, original_binfo): Likewise
316 * tree.c (copy_base_binfos, make_binfo): Likewise.
317 * typeck.c (commmon_base_type): Likewise
318 * typeck2.c (process_init_constructor): Likewise
320 2004-07-06 Joseph S. Myers <jsm@polyomino.org.uk>
322 * decl.c (check_tag_decl): Name redeclared type in diagnostic.
324 2004-07-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
327 * pt.c (convert_nontype_argument): Disallow conversions between
328 different enumeration types.
330 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
332 * cp-tree.h (BINFO_MARKED): Remove.
333 (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
334 BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
335 BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
336 (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
337 * class.c (build_base_path): Use BINFO_VIRTUAL_P.
338 (mark_primary_bases, determine_primary_base, base_derived_from,
339 dfs_find_final_overrider, dfs_find_final_overrider_q,
340 dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
341 dfs_modify_vtables, walk_subobject_offsets,
342 layout_nonempty_base_or_field, build_base_field,
343 build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
344 end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
345 finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
346 build_ctor_vtbl_group, accumulate_vtble_inits,
347 dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
348 build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
349 add_vcall_offset_vtbl_entries_1): Likewise.
350 * decl.c (xref_basetypes): Incomming virtual base indicated by
352 * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
353 * init.c (finish_init_stmts, sort_mem_initializers,
354 emit_mem_initializers, build_vtble_address, expand_member_init,
355 push_base_cleanups): Likewise.
356 * method.c (do_build_copy_constructor): Likewise.
357 * pt.c (instantiate_class_template,
358 get_template_base_recursive): Likewise.
359 * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
360 get_pseudo_ti_desc): Likewise.
361 * search.c (lookup_base_r, dynamic_cast_base_recurse,
362 binfo_from_vbase, binfo_via_virtual, copied_binfo,
363 original_binfo): Likewise.
364 * semantics.c (finish_base_specifier): Virtualness is indicated
366 * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
368 2004-07-06 Mark Mitchell <mark@codesourcery.com>
371 2004-06-24 Jason Merrill <jason@redhat.com>
373 * decl.c (grokparms): Give the PARM_DECL reference type if the
374 parameter is passed by invisible reference.
376 2004-07-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
378 * cp-lang.c (cp_var_mod_type_p): Add extra arg.
379 * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
380 * pt.c (check_instantiated_args, unify): Likewise.
382 2004-07-05 Phil Edwards <phil@codesourcery.com>
384 * Make-lang.in (check-c++, lang_checks): Add some comments.
386 2004-07-05 Zack Weinberg <zack@codesourcery.com>
388 * cp-mudflap.c: Delete file.
389 * Makefile.in: Remove all references to cp-mudflap.o.
391 2004-07-05 Zack Weinberg <zack@codesourcery.com>
393 * decl.c (cxx_init_decl_processing): Call
394 build_common_tree_nodes before creating the global NAMESPACE_DECL.
396 2004-07-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
399 * call.c (build_operator_new_call): Look only at global scope.
401 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
403 * call.c (enforce_access): Expect TREE_BINFO.
404 * class.c (binfo_ctor_vtable): Check TREE_BINFO.
405 * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
406 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
408 (BINFO_LANG_ELTS): Remove.
409 (BINFO_LANG_SLOTS): New.
410 (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
411 (CLASSTYPE_TEMPLATE_INFO): Adjust.
412 * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
413 * search.c (lookup_member): Check TREE_BINFO.
414 * semantics.c (perform_or_defer_access_check): Likewise.
415 (check_accessibility_of_qualified_id): Check
416 deferred_access_no_check.
417 * tree.c (make_binfo): Use make_tree_binfo.
419 2004-07-04 Mark Mitchell <mark@codesourcery.com>
421 * method.c (implicitly_declare_fn): Set linkage of generated
424 2004-07-04 Richard Henderson <rth@redhat.com>
426 * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
428 2004-07-03 Scott Brumbaugh <scottb.lists@verizon.net>
431 * name-lookup.c (push_class_level_binding): Don't pass a
432 TREE_LIST of ambiguous names to check_template_shadow as it
433 only handles declarations. Instead, pull the declaration
436 2004-07-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
439 * pt.c (check_explicit_specialization): Clarify error message.
441 2004-07-02 Richard Henderson <rth@redhat.com>
443 * tree.c (cp_unsave_r): Update remap_save_expr call.
445 2004-07-02 Mark Mitchell <mark@codesourcery.com>
448 * mangle.c (write_template_arg): Correct mangling.
451 * decl.c (grokdeclarator): Robustify.
453 2004-07-01 Richard Henderson <rth@redhat.com>
455 * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
456 * method.c (synthesize_method): Don't clear_last_expr.
457 * name-lookup.c (maybe_push_cleanup_level): Likewise.
459 2004-07-01 Nick Clifton <nickc@redhat.com>
461 * decl2.c (import_export_class): Invoke the
462 import_export_class field in the gcc_target structure if it is not
465 2004-06-30 Richard Henderson (rth@redhat.com>
467 * decl.c (start_preparsed_function): Don't set immediate_size_expand.
468 * method.c (use_thunk): Likewise.
470 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
472 * call.c (build_over_call), typeck.c (build_function_call): Call
473 check_function_arguments instead of check_function_format.
475 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
477 * call.c (build_over_call), typeck.c (build_function_call): Update
478 calls to check_function_format.
480 2004-06-30 Richard Henderson <rth@redhat.com>
482 * call.c (build_over_call): Use __builtin_memcpy for copying
483 CLASS_AS_BASE rather than funny casting.
485 2004-06-30 Richard Henderson <rth@redhat.com>
487 * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
488 TYPE_SIZE_UNIT of full_type.
490 2004-06-30 Per Bothner <per@bothner.com>
492 Conditionally compile support for --enable-mapped_location.
493 * decl.c (pop_label): Handle (imperfectly) USE_MAPPED_LOCATION case.
494 * decl2.c: If USE_MAPPED_LOCATION, don't do some line number
495 adjustments - which I don't understand.
496 * error.c (dump_decl): Rename "<interrnal>" to "<built-in>".
497 * error.c: Use LOCATION_FILE and EXPR_LOCATION macros.
498 (print_instantiation_partial_context): Use expand_location.
499 * decl.c (duplicate_decl): Use new DECL_IS_BUILTIN macro.
500 * name-lookup.c: Likewise.
501 * lex.c (cxx_init): Likewise. Also use BUILTINS_LOCATION.
502 * name-lookup.c: Use input_line macro.
503 * parser.c (cp_lexer_get_preprocessor_token): Use UNKNOWN_LOCATION.
504 (cp_parser_statement): Rename locaal variable statement_locus to
505 statement_location and use SET_EXPR_LOCATION macro.
506 * pt.c: Handle USE_MAPPED_LOCATION case. Use new macros.
507 * tree.c (cp_walk_subtrees): Likewise.
509 2004-06-29 Per Bothner <per@bothner.com>
511 * tree.c (build_min_nt, build_min, build_min_non_dep):
512 Don't set TREE_COMPLEXITY from input_line.
514 2004-06-29 Paul Brook <paul@codesourcery.com>
516 * init.c: Include target.h.
517 (get_cookie_size): Remove and replace with target hook.
519 (build_new_1): Store the element size in the cookie.
521 2004-06-29 Nathan Sidwell <nathan@codesourcery.com>
524 * parser.c (cp_parser_template_declaration_after_export): Disable
525 access checks here ...
526 (cp_parser_class_specifier): ... not here.
528 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
530 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
531 VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
532 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
535 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
537 * cp-tree.h (struct deferred_access): Move to ...
538 * semantics.c (struct deferred_access): ... here. Adjust.
539 (deferred_access_stack): Make a VEC(deferred_access),
540 (deferred_access_free_list): Remove.
541 (deferred_access_no_check): New.
542 (push_deferring_access_checks, resume_deferring_access_checks,
543 stop_deferring_access_checks, pop_deferring_access_checks,
544 get_deferred_access_checks, pop_to_parent_deferring_access_checks,
545 perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
547 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
550 * call.c (build_temp): Declare.
551 (check_constructor_callable): New.
552 (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
553 CONSTRUCTOR_CALLABLE.
554 (convert_like_real, initialize_reference): Use
555 check_constructor_callable.
556 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
557 (LOOKUP_*): Renumber.
559 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
561 * friend.c (add_friend): Only perform access checks when context
563 * lex.c (cxx_make_type): Only create a binfo for aggregate types.
564 * parser.c (cp_parser_class_specifier): Disable access checks here
565 when parsing the body of a templated class.
566 * semantics.c (perform_or_defer_access_checks): Reorder to allow
567 NULL binfos when not checking access.
569 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
571 Use vector API for vbase list.
572 * cp-tree.h: Include vec.h
573 (DEF_VEC_P (tree)): New type.
574 (struct lang_type_class): Change vbase's member type.
575 (binfo_for_vbase): Declare.
576 * class.c (determine_primary_base, base_derived_from,
577 update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
578 warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
579 build_vtbl_initializer): Adjust.
580 * decl.c (xref_basetypes): Adjust, accumulate upper bound of
582 * init.c (sort_mem_initializers, expand_member_init,
583 push_base_cleanups): Adjust.
584 * method.c (do_build_copy_constructor): Adjust.
585 * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
586 (binfo_for_vbase): New.
587 * tree.c (copy_base_binfos): Adjust.
589 2004-06-28 Mark Mitchell <mark@codesourcery.com>
591 * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
593 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
596 * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
597 paranthesis in case of pointers to array members.
598 * error.c (dump_type_prefix): Likewise.
599 (dump_type_suffix): Maybe issue a whitespace when printing
602 2004-06-27 Mark Mitchell <mark@codesourcery.com>
605 * parser.c (cp_parser_set_decl_spec_type): Refine test for
606 redefinition of built-in types.
608 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
610 * error.c (pp_template_argument_list_start): Remove.
611 (pp_template_argument_list_end): Likewise.
612 (pp_separate_with_comma): Use pp_cxx_separate_with.
613 (reinit_global_formatting_buffer): Remove.
614 (pp_non_consecutive_character): Likewise.
615 (dump_scope): Use pp_cxx_colon_colon.
616 (dump_template_parameter): Use pp_cxx_identifier,
617 pp_cxx_tree_identifier and pp_cxx_whitespace.
618 (dump_templat_bindings): Replace use of pp_string with sequence
619 of pp_cxx_whitespace and pp_equal.
620 (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
621 pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set
623 (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
624 (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace,
625 pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
626 (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
627 pp_cxx_right_bracket, pp_cxx_identifier throughout,
628 (dump_decl): Likewise.
629 (dump_template_decl): Likewise.
630 (dump_function_decl): Likewise. Set padding as appropriate.
631 (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
633 (dump_exception_spec): Likewise.
634 (dump_function_name): Use pp_cxx_tree_identifier and
636 (dump_template_parms): Use pp_cxx_begin_template_argument_list and
637 pp_cxx_end_template_argument_list.
638 (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
639 pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
640 pp_cxx_whitespace throughout.
641 (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
643 (dump_unary_op): Likewise.
644 (reinit_cxx_pp): New function.
645 (type_as_string); Use it.
646 (expr_as_string): Likewise.
647 (decl_as_string); Likewise.
648 (context_as_string): Likewise.
649 (lang_decl_name): Likewise.
650 (decl_to_string): Likewise.
651 (expr_to_string): Likewise.
652 (parm_to_string): Likewise.
653 (type_to_string): Likewise.
654 (args_to_string): Likewise.
655 (cv_to_string): Likewise.
657 2004-06-26 Mark Mitchell <mark@codesourcery.com>
659 * cp-tree.h (cp_cv_quals): New type.
660 (cp_declarator): Use it instead of "tree" as appropriate.
661 (grok_method_quals): Adjust prototype.
662 (grokclassfn): Likewise.
663 (do_friend): Likewise.
664 * decl.c (grokfndecl): Use cp_cv_quals, not tree.
665 (grokdeclarator): Likewise.
666 * decl2.c (grok_method_quals): Likewise.
667 (grokclassfn): Likewise.
668 * friend.c (do_friend): Likewise.
669 * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
670 * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
671 (make_pointer_declarator): Likewise.
672 (make_reference_declarator): Likewise.
673 (make_ptrmem_declarator): Likewise.
674 (cp_parser_ptr_operator): Likewise.
675 (cp_parser_cv_qualifier_seq_opt): Likewise.
676 (cp_parser_cv_qualifier_opt): Remove.
677 (cp_parser_new_declarator_opt): Adjust call to
678 cp_parser_ptr_operator.
679 (cp_parser_conversion_declaration_opt): Likewise.
680 (cp_parser_declarator): Use cp_cv_quals, not tree.
681 (cp_parser_direct_declarator): Likewise.
683 2004-06-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
685 * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
686 Rename DECL_STMT to DECL_EXPR.
687 * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
688 * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
689 * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
691 2004-06-26 Jan Hubicka <jh@suse.cz>
694 * decl2.c (maybe_emit_vtables): Always import_export_vtable for the
695 reachability analysis.
697 2004-06-25 Mark Mitchell <mark@codesourcery.com>
699 * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
702 2004-06-25 Paul Brook <paul@codesourcery.com>
704 * decl2.c (get_guard): Call targetm.cxx.guard_type.
705 (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
707 2004-06-24 Mark Mitchell <mark@codesourcery.com>
709 * decl.c (grokdeclarator): Restore error messages about __thread.
710 * parser.c (cp_parser_decl_specifier_seq): Likewise.
712 2004-06-24 Jason Merrill <jason@redhat.com>
715 * decl.c (grokparms): Give the PARM_DECL reference type if the
716 parameter is passed by invisible reference.
718 2004-06-24 Andreas Schwab <schwab@suse.de>
720 * cp-tree.h (enum cp_storage_class): Remove trailing comma.
722 2004-06-23 Mark Mitchell <mark@codesourcery.com>
724 * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
725 (cp/decl.o): Likewise.
726 (cp/decl2.o): Likewise.
728 (cp/semantics.o): Likewise.
729 * config-lang.in (gtfiles): Do not reference cp/lex.h.
730 * class.c: Do not include lex.h.
731 (add_implicitly_declared_members): Do not use
732 adding_implicit_members.
733 (check_bases_and_members): Do not talk about grok_x_components.
734 * cp/cp-tree.h (adding_implicit_members): Remove.
735 (cp_storage_class): New type.
736 (cp_decl_spec): Likewise.
737 (cp_decl_specifier_seq): Likewise.
738 (cp_parameter_declarator): Use it for the decl_specifiers field.
739 (check_tag_decl): Adjust prototype.
740 (shadow_tag): Likewise.
741 (groktypename): Likewise.
742 (start_decl): Likewise.
743 (start_function): Likewise.
744 (start_method): Likewise.
745 (grok_x_components): Remove.
746 (grokfield): Adjust prototype.
747 (grokbitfield): Likewise.
748 (finish_member_class_template): Remove.
749 * decl.c: Do not include lex.h.
750 (adding_implicit_members): Do not define.
751 (check_tag_decl): Do not use trees to represent decl-specifiers.
752 (shadow_tag): Likewise.
753 (groktypename): Likewise.
754 (start_decl): Likewise.
755 (grokvardecl): Likewise.
756 (grokdeclarator): Likewise.
757 (grokparms): Likewise.
758 (start_function): Likewise.
759 (start_method): Likewise.
760 * decl.h (grokdeclarator): Adjust prototype.
761 * decl2.c: Do not include lex.h.
762 (grok_x_components): Remove.
763 (grokfield): Do not use trees to represent decl-specifiers.
764 (grokbitfield): Likewise.
765 * lex.c: Do not include lex.h.
767 * parser.c: Include target.h.
768 (clear_decl_specs): New function.
769 (cp_parser_translation_unit): Do not use trees to represent
771 (cp_parser_postfix_expression): Likewise.
772 (cp_parser_new_type_id): Likewise.
773 (cp_parser_condition): Likewise.
774 (cp_parser_simple_declaration): Likewise.
775 (cp_parser_decl_specifier_seq): Likewise.
776 (cp_parser_function_specifier_opt): Likewise.
777 (cp_parser_conversion_type_id): Likewise.
778 (cp_parser_template_parameter): Likewise.
779 (cp_parser_explicit_instantiation): Likewise.
780 (cp_parser_type_specifier): Likewise.
781 (cp_parser_simple_type_specifier): Likewise.
782 (cp_parser_init_declarator): Likewise.
783 (cp_parser_type_id): Likewise.
784 (cp_parser_type_specifier_seq): Likewise.
785 (cp_parser_parameter_declaration): Likewise.
786 (cp_parser_member_declaration): Likewise.
787 (cp_parser_exception_declaration): Likewise.
788 (cp_parser_function_definition_from_specifiers_and_declarator):
790 (cp_parser_single_declaration): Likewise.
791 (cp_parser_save_member_function_body): Likewise.
792 (cp_parser_friend_p): Likewise.
793 (cp_parser_set_storage_class): New function.
794 (cp_parser_set_decl_spec_type): Likewise.
795 * pt.c: Do not include lex.h.
796 * semantics.c: Likewise.
797 (finish_member_class_template): Remove.
799 2004-06-23 Roger Sayle <roger@eyesopen.com>
801 * call.c (build_cxx_call): Don't call expand_tree_builtin. No
802 longer take both "args" and "convert_args" as arguments.
803 (build_op_delete_call): Update call to build_cxx_call.
804 (build_over_call): Likewise, update call to build_cxx_call.
805 * cp-tree.h (build_cxx_call): Update funtion prototype.
806 * typeck.c (build_function_call): Don't call expand_tree_builtin.
807 * rtti.c (throw_bad_cast): Update call to build_cxx_call.
808 (throw_bad_typeid): Likewise.
809 (build_dynamic_cast_1): Likewise.
811 2004-06-22 Richard Henderson <rth@redhat.com>
813 * class.c (build_vfn_ref): Take a pointer not object. Build
815 (cp_fold_obj_type_ref): New.
816 * call.c (build_over_call): Update build_vfn_ref call.
817 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
818 * cp-tree.h (cp_fold_obj_type_ref): Declare.
820 2004-06-21 Jason Merrill <jason@redhat.com>
823 * cp-gimplify.c (cp_gimplify_init_expr): Look through
826 2004-06-21 Mark Mitchell <mark@codesourcery.com>
828 * cp-tree.def (NEW_EXPR): Add a fourth slot.
829 * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
830 (TREE_PARMLIST): Likewise.
831 (CALL_DECLARATOR_PARMS): Likewise.
832 (CALL_DECLARATOR_QUALS): Likewise.
833 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
834 (cp_declarator_kind): New type.
835 (cp_parameter_declarator): Likewise.
836 (cp_declarator): Likewise.
837 (cp_error_declarator): Likewise.
838 (no_parameters): Likewise.
839 (groktypename): Change prototype.
840 (start_decl): Likewise.
841 (start_handler_parms): Likewise.
842 (get_scope_of_declarator): Likewise.
843 (start_function): Likewise.
844 (start_preparsed_function): New function.
845 (start_function): Change prototype.
846 (start_method): Likewise.
847 (grokfield): Likewise.
848 (grokbitfield): Likewise.
849 (build_new): Likewise.
850 (make_pointer_declarator): Remove.
851 (make_reference_declarator): Likewise.
852 (make_call_declarator): Likewise.
853 (set_quals_and_spec): Likewise.
854 (process_template_parm): Change prototype.
855 (begin_function_definition): Remove.
856 (finish_parmlist): Remove.
857 * decl.c (groktypename): Do not use trees to represent
859 (start_decl): Likewise.
860 (start_handler_parms): Remove.
861 (get_scope_of_declarator): Reimplement.
862 (grokdeclarator): Do not use trees to represent declarators.
863 (grokparms): Likewise.
864 (start_function): Likewise.
865 (start_method): Likewise.
866 (build_void_list_mode): Do not use TREE_PARMLIST.
867 * decl.h (grokdeclarator): Change prototype.
868 * decl2.c (grok_method_quals): Robustify.
869 (grok_x_components): Do not use trees to represent declarators.
870 (grokfield): Likewise.
871 (grokbitfield): Likewise.
872 (start_objects): Build FUNCTION_DECLs, not declarators.
873 (start_static_storage_duration_function): Likewise.
874 * init.c (build_new): Simplify.
875 * lex.c (make_pointer_declarator): Remove.
876 (make_reference_declarator): Likewise.
877 (make_call_declarator): Likewise.
878 (set_quals_and_spec): Likewise.
879 * method.c (use_thunk): Use start_preparsed_function.
880 (synthesize_method): Likewise.
881 (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
882 * optimize.c (maybe_clone_body): Use start_preparsed_function.
883 * parser.c (cp_error_declarator): New variable.
884 (declarator_obstack): Likewise.
885 (alloc_declarator): New function.
886 (make_declarator): Likewise.
887 (make_id_declarator): Likewise.
888 (make_pointer_declarator): Likewise.
889 (make_reference_declarator): Likewise.
890 (make_ptrmem_declarator): Likewise.
891 (make_call_declarator): Likewise.
892 (make_array_declarator): Likewise.
893 (no_parameters): New variable.
894 (make_parameter_declarator): Likewise.
895 (cp_parser_check_for_definition_in_return_type): Do not use trees
896 to represent declarators.
897 (cp_parser_translation_unit): Likewise.
898 (cp_parser_new_expression): Likewise.
899 (cp_parser_new_type_id): Likewise.
900 (cp_parser_new_declarator_opt): Likewise.
901 (cp_parser_direct_new_declarator): Likewise.
902 (cp_parser_condition): Likewise.
903 (cp_parser_declaration_statement): Likewise.
904 (cp_parser_declaration): Likewise.
905 (cp_parser_conversion_type_id): Likewise.
906 (cp_parser_conversion_declarator_opt): Likewise.
907 (cp_parser_template_parameter_list): Likewise.
908 (cp_parser_template_parameter): Likewise.
909 (cp_parser_explicit_instantiation): Likewise.
910 (cp_parser_init_declarator): Likewise.
911 (cp_parser_declarator): Likewise.
912 (cp_parser_direct_declarator): Likewise.
913 (cp_parser_type_id): Likewise.
914 (cp_parser_parameter_declaration_clause): Likewise.
915 (cp_parser_parameter_declaration_list): Likewise.
916 (cp_parser_parameter_declaration): Likewise.
917 (cp_parser_member_declaration): Likewise.
918 (cp_parser_exception_declaration): Likewise.
919 (cp_parser_check_declarator_template_parameters): Likewise.
920 (cp_parser_function_definition_from_specifiers_and_declarator):
922 (cp_parser_save_member_function_body): Likewise.
923 * pt.c (process_template_parm): Add is_non_type parameter.
924 (convert_template_argument): Adjust call to groktypename.
925 (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
926 (tsubst): Do not expect declarators.
927 (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
929 (instantiate_decl): Use start_preparsed_function.
930 * semantics.c (begin_function_definition): Remove.
931 (finish_parmlist): Remove.
932 * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
935 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
937 * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
938 (build_new_method_call): Likewise.
939 * decl.c (local_variable_p_walkfn): Don't walk into types.
940 * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
941 (build_anon_union_vars): Add new operand for COMPONENT_REF.
942 * init.c (buld_new): Add new operand for ARRAY_REF.
943 * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
944 (do_build_assign_ref): Likewise.
945 * parser.c (cp_parser_direct_new_declarator): Add new operands
947 (cp_parser_direct_declarator): Likewise.
948 * pt.c (tsubst): Likewise.
949 (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
951 * semantics.c (finish_non_static_data_member): Add new operand
953 * typeck.c (build_class_member_access_expr): Likewise.
954 (build_class_member_access_expr, finish_class_member_access_expr):
956 (build_ptrmemfunc_access_expr): Likewise.
957 (build_array_ref): Add new operands for ARRAY_REF.
958 * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
959 * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
961 2004-06-21 Richard Henderson <rth@redhat.com>
963 * dump.c (cp_dump_tree): Don't use dump_next_stmt.
964 * parser.c (cp_parser_jump_statement): Update commentary.
965 * pt.c (tsubst_expr): Use RETURN_EXPR.
966 * semantics.c (finish_return_stmt): Likewise.
967 (finalize_nrv_r): Likewise.
968 * typeck.c, typeck2.c: Update file start commentary.
970 2004-06-21 Richard Henderson <rth@redhat.com>
972 * semantics.c (finish_expr_stmt): Call verify_sequence_points.
974 2004-06-20 Richard Henderson <rth@redhat.com>
976 * cp-tree.h (add_decl_stmt): Declare.
977 * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
978 * semantics.c (maybe_cleanup_point_expr): New.
979 (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
980 finish_for_expr, finish_switch_cond): Use it.
981 (finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN.
983 2004-06-20 Richard Henderson <rth@redhat.com>
985 * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
986 * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
987 (cp_gimplify_expr): Call it.
988 (gimplify_cleanup_stmt): Move from c-gimplify.c.
989 (cp_genericize): New.
990 * decl.c (finish_function): Call it.
991 * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
992 (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
993 (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
994 (cp_genericize): Declare.
995 * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
996 * dump.c (cp_dump_tree): Likewise.
997 * semantics.c (push_cleanup): Move from c-semantics.c.
999 2004-06-20 Zack Weinberg <zack@codesourcery.com>
1001 * cp-lang.c (has_c_linkage): Implement.
1003 * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
1004 * decl.c (duplicate_decls): Use COPY_DECL_RTL.
1005 (builtin_function_1): Don't call make_decl_rtl.
1006 (build_cp_library_fn): Don't call set_mangled_name_for_decl.
1007 (grokvardecl): Don't call mangle_decl.
1008 * except.c (nothrow_libfn_p): Look at DECL_NAME, not
1009 DECL_ASSEMBLER_NAME.
1010 * method.c (set_mangled_name_for_decl): Delete.
1011 * name-lookup.c (pushdecl): When a local extern shadows a
1012 file-scope declaration of the same object, give both DECLs the
1014 * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
1015 on DECL_ASSEMBLER_NAME.
1017 2004-06-19 Richard Henderson <rth@redhat.com>
1019 * cp-gimplify.c: Remove unnecessary prototypes.
1020 (cp_gimplify_stmt): Merge into ...
1021 (cp_gimplify_expr): ... here. Move to end of file. Handle
1022 stmts_are_full_exprs_p frobbing.
1023 * cp-tree.h (cp_gimplify_stmt): Remove.
1024 * pt.c (tsubst_expr): Merge prep_stmt and unify.
1025 * tree.c (init_tree): Don't set lang_gimplify_stmt.
1027 2004-06-18 Richard Henderson <rth@redhat.com>
1030 * semantics.c (begin_cond): New.
1031 (finish_cond): Rewrite to handle template DECL_STMTs specially.
1032 Assume that non-template decls go land before the conditional.
1033 (simplify_loop_decl_cond): Likewise.
1034 (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
1035 finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
1036 begin_switch_stmt, finish_switch_cond): Update to match.
1038 2004-06-17 Jason Merrill <jason@redhat.com>
1041 * semantics.c (simplify_aggr_init_expr): Don't return the slot.
1042 (finish_stmt_expr_expr): Update type after conversions.
1043 (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
1044 Handle void initializer.
1045 * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
1047 2004-06-17 Geoffrey Keating <geoffk@apple.com>
1049 * class.c (build_clone): Don't call defer_fn, let mark_used do it.
1050 * cp-tree.h (defer_fn): Delete.
1051 * decl2.c (defer_fn): Delete.
1052 (finish_file): Simplify deferred_fns loops; check that
1053 only used inline functions get into deferred_fns.
1054 (mark_used): Inline previous contents of defer_fn.
1056 2004-06-16 Richard Henderson <rth@redhat.com>
1058 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
1059 (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
1060 * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
1061 of CTOR_INITIALIZER ...
1062 (pp_cxx_statement): ... here.
1063 * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
1064 (finish_function): Use alloc_stmt_list to zap entire function.
1065 * parser.c (cp_parser_compound_statement): Update commentary.
1066 * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
1067 * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
1068 (finish_stmt_expr): Don't look through COMPOUND_STMT.
1070 2004-06-16 Geoffrey Keating <geoffk@apple.com>
1072 * pt.c (mark_decl_instantiated): Don't call defer_fn.
1074 2004-06-16 Richard Henderson <rth@redhat.com>
1076 * parser.c (cp_parser_labeled_statement): Update commentary.
1077 * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
1078 * tree.c (mark_local_for_remap_r): Likewise.
1080 2004-06-16 Richard Henderson <rth@redhat.com>
1082 * parser.c (cp_parser_asm_definition): Update commentary.
1083 * pt.c (tsubst_expr): Use ASM_EXPR.
1084 * semantics.c (finish_asm_stmt): Likewise.
1086 2004-06-16 Richard Henderson <rth@redhat.com>
1088 * decl.c (finish_destructor_body): Use LABEL_EXPR.
1089 * parser.c (cp_parser_statement): Update commentary.
1090 * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
1091 * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
1092 * tree.c (mark_local_for_remap_r): Likewise.
1094 2004-06-16 Richard Henderson <rth@redhat.com>
1097 * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
1098 statement in FOR_INIT_STMT for templates.
1100 2004-06-15 Richard Henderson <rth@redhat.com>
1102 * call.c (initialize_reference): Don't build CLEANUP_STMT here.
1103 * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
1104 (genericize_try_block): Use gimplify_stmt.
1105 (genericize_catch_block, genericize_eh_spec_block): Likewise.
1106 (cp_gimplify_init_expr): Remove STMT_EXPR special case.
1107 (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
1108 * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
1109 (cp_tree_chain_matters_p): Remove.
1110 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
1111 (COMPOUND_STMT_BODY_BLOCK): New.
1112 (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
1113 (EXPR_STMT_STMT_EXPR_RESULT): New.
1114 (building_stmt_tree): Check cur_stmt_list.
1115 (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
1116 (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
1117 * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
1118 (cp_finish_decl): Use push_cleanup.
1119 (start_function, finish_function): Use statement lists.
1120 (finish_stmt): Do nothing.
1121 * except.c (begin_eh_spec_block): Use statement lists.
1122 (check_handlers_1, check_handlers): Likewise.
1123 * init.c (construct_virtual_base): Don't add extra compound stmts.
1124 (build_vec_init): Likewise.
1125 * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
1126 * name-lookup.h (struct cp_binding_level): Add statement_list.
1127 * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
1128 (cp_parser_labeled_statement, cp_parser_expression_statement,
1129 cp_parser_statement_seq_opt): Likewise.
1130 (cp_parser_compound_statement): Likewise. Take bool for try block.
1131 (cp_parser_selection_statement): Tidy if processing.
1132 (cp_parser_already_scoped_statement): Rewrite to do what it says.
1133 * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
1134 (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST.
1135 Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
1136 * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
1137 (finish_cond): New, rewritten from FINISH_COND.
1138 (simplify_loop_decl_cond): New.
1139 (finish_expr_stmt): Avoid nested EXPR_STMTs.
1140 (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
1141 begin_else_clause, finish_else_clause, finish_if_stmt,
1142 begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
1143 begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
1144 finish_for_cond, finish_for_stmt, begin_switch_stmt,
1145 finish_switch_cond, finish_switch_stmt, begin_try_block,
1146 finish_try_block, finish_cleanup_try_block, finish_function_try_block,
1147 finish_handler_sequence, finish_function_handler_sequence,
1148 begin_handler, finish_handler_parms, finish_handler,
1149 begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
1150 using statement lists.
1151 (begin_compound_stmt): Replace has_no_scope argument with flags.
1152 Update all callers. Use statement lists.
1153 (finish_compound_stmt): Likewise.
1154 (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
1155 (current_scope_stmt_stack): Remove.
1156 (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
1157 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
1158 Rewrite with statement lists.
1160 2004-06-15 Alexandre Oliva <aoliva@redhat.com>
1162 * parser.c: Change all assignments of c_lex_string_translate
1163 to true and false to 1 and 0.
1164 (cp_lexer_read_token): Convert type of the translated string.
1165 (cp_parser_skip_to_closing_parentheses): Preserve original
1166 value of c_lex_string_translate, and set it to -1 while
1168 (cp_parser_cache_group): Likewise.
1169 (cp_parser_cache_group_1): Renamed.
1170 (cp_parser_asm_operand_list): Remove redundant setting of
1171 c_lex_string_translate.
1172 (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
1173 Handle chained strings.
1175 2004-06-12 Andrew Pinski <apinski@apple.com>
1179 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
1181 * cp-tree.h: Fix typo.
1183 * cp-tree.h: Include cgraph.h
1184 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
1185 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
1187 2004-06-12 Jason Merrill <jason@redhat.com>
1189 PR tree-optimization/14107
1190 * decl.c (finish_function): Warn about no return in all functions.
1192 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
1194 * cp-tree.h (struct language_function): Remove cannot_inline.
1195 * decl.c (save_function_data): cannot_inline is no more.
1196 (cxx_push_function_context): Likewise.
1197 * decl2.c (start_objects, start_static_storage_duration_function):
1198 Reset DECL_INLINE, set DECL_UNINLINABLE.
1200 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1203 * search.c (lookup_field): Propagate the ambiguity list.
1204 (lookup_fnfields): Likewise.
1206 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1209 * parser.c (cp_parser_template_name): Ctors/dtors never need a
1210 template keyword to disambiguate.
1212 2004-06-14 Mark Mitchell <mark@codesourcery.com>
1215 * decl.c (grokdeclarator): Ignore pointer-to-members when
1216 computing template depth.
1219 * name-lookup.c (pushtag): Do not try to put class declarations in
1220 explicit specialization scopes.
1222 2004-06-11 Andrew Pinski <pinskia@physics.uc.edu>
1224 * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
1226 2004-06-11 Mark Mitchell <mark@codesourcery.com>
1229 * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
1230 bindings for undeclared built-ins.
1232 2004-06-11 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1234 * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
1235 appear at the correct location.
1237 2004-06-10 Jason Merrill <jason@redhat.com>
1241 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1242 * init.c (build_offset_ref): Build SCOPE_REF with non-null
1243 TREE_TYPE for non-dependent names.
1244 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
1245 unknown_type_node as its TREE_TYPE.
1246 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
1247 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
1248 (dump_expr) <SCOPE_REF case>: Likewise.
1250 2004-06-10 Mark Mitchell <mark@codesourcery.com>
1253 * parser.c (cp_parser_direct_declarator): Robustify.
1256 * pt.c (tsubst_copy): Use decl_constant_value on enumeration
1257 constants in non-dependent contexts.
1261 * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
1264 2004-06-10 Jakub Jelinek <jakub@redhat.com>
1267 * decl.c (duplicate_decls): Handle fileptr_type_node arguments
1270 2004-06-09 Mark Mitchell <mark@codesourcery.com>
1274 2004-06-07 Mark Mitchell <mark@codesourcery.com>
1275 * lex.c (handle_pragma_interface): Deprecate.
1276 (handle_pragma_implementation): Likewise.
1278 2004-06-09 Andrew Pinski <pinskia@physics.uc.edu>
1280 * g++spec.c (lang_specific_driver): Remove check for -lm
1281 and -lmath when check it see if it was the math library.
1283 2004-06-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1286 * parser.c (cp_parser_direct_declarator): Reject constructor named
1287 as qualified template-id.
1289 2004-06-07 Mark Mitchell <mark@codesourcery.com>
1292 * lex.c (handle_pragma_interface): Deprecate.
1293 (handle_pragma_implementation): Likewise.
1295 2004-06-07 Mark Mitchell <mark@codesourcery.com>
1298 * parser.c (cp_parser_iteration_statement): Fix typo in error
1302 * pt.c (tsubst_default_argument): Do not defer access checks
1303 while substituting into the default argument.
1306 * pt.c (tsubst_copy): Do not try to substitute for an enumeration
1307 constant in a non-dependent context.
1310 * except.c (build_throw): Ensure that temp_expr has been
1313 2004-06-06 Roger Sayle <roger@eyesopen.com>
1315 * cp/cp-tree.h (lvalue_or_else): Add function prototype.
1317 2004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1320 * parser.c (cp_parser_mem_initializer_id): Gracefully reject
1321 'typename', and accept 'template'.
1323 2004-06-03 Andrew Pinski <pinskia@physics.uc.edu>
1324 Jan Hubicka <jh@suse.cz>
1327 * method.c (use_think): Do not mark thunk as referenced.
1329 2004-06-03 Matt Austern <austern@apple.com>
1332 * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
1333 is nonzero, and if we see a noninline definition of a key method,
1334 make the vtables nonweak.
1336 2004-06-02 Matt Austern <austern@apple.com>
1338 * cp-tree.h (instantiate_decl): new boolean parameter,
1339 undefined_ok. Current behavior is equivalent to its being 0.
1340 * decl2.c (mark_used): Add new argument when calling instantiate_decl
1341 * pt.c (mark_decl_instantiated): Unconditionally make
1342 instantiations explicit unconditionally
1343 (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
1344 since mark_decl_instantiated now does it.
1345 (instantiate_class_member): New. Instantiate a member of an
1346 explicitly instantiated class template.
1347 (do_type_instantiation): Explicitly instantiate members of an
1348 explicitly instantiated class template.
1349 (instantiate_decl): if undefined_ok is nonzero, and if we're
1350 trying to explicitly instantiated a template with no definition,
1351 change it to an implicit instantiation.
1352 (instantiate_pending_templates): Add new argument to instantiate_decl.
1353 * tree.c (cp_cannot_inline_tree_fn): Likewise.
1355 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
1357 * cp-tree.h: Fix typo.
1359 * cp-tree.h: Include cgraph.h
1360 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
1361 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
1363 2004-06-01 Jason Merrill <jason@redhat.com>
1366 * call.c (call_builtin_trap): Remove type parm.
1367 (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
1368 (build_x_va_arg): Dereference a null pointer for a non-POD argument.
1370 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1373 * init.c (build_offset_ref): Build SCOPE_REF with non-null
1374 TREE_TYPE for non-dependent names.
1375 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
1376 unknown_type_node as its TREE_TYPE.
1377 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
1378 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
1379 (dump_expr) <SCOPE_REF case>: Likewise.
1381 2004-06-01 Richard Henderson <rth@redhat.com>
1382 Andrew Pinski <pinskia@physics.uc.edu>
1384 * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
1385 * parser.c (struct cp_parser): Remove in_offsetof.
1386 (cp_parser_new): Don't set it.
1387 (cp_parser_unary_expression): Don't check it.
1388 (cp_parser_postfix_open_square_expression): Split out from ...
1389 (cp_parser_postfix_expression): ... here.
1390 (cp_parser_postfix_dot_deref_expression): Likewise.
1391 (cp_parser_builtin_offsetof): New.
1392 (cp_parser_primary_expression): Use it.
1394 2004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1397 * parser.c (cp_parser_postfix_expression): Allow subscript
1398 operator in offsetof.
1400 2004-05-31 Mark Mitchell <mark@codesourcery.com>
1403 * friend.c (add_friend): Do not try to perform access checks for
1404 functions from dependent classes.
1406 2004-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
1408 * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
1409 (pp_cxx_begin_template_argument_list): Turn into a function.
1410 (pp_cxx_end_template_argument_list): Likewise.
1411 (pp_cxx_separate_with): Define.
1412 (pp_cxx_unqualified_id): Tidy.
1413 (pp_cxx_primary_expression): Likewise.
1414 (pp_cxx_postfix_expression): Likewise.
1415 (pp_cxx_expression): Likewise.
1416 (pp_cxx_simple_type_specifier): Likewise.
1417 (pp_cxx_type_specifier_seq): Likewise.
1418 (pp_cxx_parameter_declaration_clause): Likewise.
1419 (pp_cxx_exception_specification): Likewise.
1420 (pp_cxx_direct_declarator): Likewise.
1421 (pp_cxx_type_id): Likewise.
1422 * cxx-pretty-print.h (pp_cxx_whitespace): Export from
1424 (pp_cxx_left_paren): Likewise.
1425 (pp_cxx_right_paren): Likewise.
1426 (pp_cxx_left_brace): Likewise.
1427 (pp_cxx_right_brace): Likewise.
1428 (pp_cxx_left_bracket): Likewise.
1429 (pp_cxx_right_bracket): Likewise.
1430 (pp_cxx_dot): Likewise.
1431 (pp_cxx_identifier): Likewise.
1432 (pp_cxx_tree_identifier): Likewise.
1433 (pp_cxx_ampersand): New macro.
1434 (pp_cxx_star): Likewise.
1435 (pp_cxx_arrow): Likewise.
1436 (pp_cxx_semicolon): Likewise.
1437 (pp_cxx_complement): Likewise.
1438 (pp_cxx_begin_template_argument_list): Declaree.
1439 (pp_cxx_end_template_argument_list): Likewise.
1440 (pp_cxx_colon_colon): likewise.
1442 2004-05-31 Eric Botcazou <ebotcazou@libertysurf.fr>
1444 * parser.c (cp_parser_simple_type_specifier): Explicitly test
1447 2004-05-31 Kazu Hirata <kazu@cs.umass.edu>
1449 * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
1450 typeck.c: Fix comment formatting.
1452 2004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
1454 * cp-lang.c (cp_expand_decl): Remove.
1455 (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
1457 2004-05-30 Andreas Jaeger <aj@suse.de>
1459 * lang-specs.h: Add missing initializers for .ii.
1461 2004-05-28 Aldy Hernandez <aldyh@redhat.com>
1463 * decl.c (cp_make_fname_decl): Free return value from
1466 2004-05-28 Mark Mitchell <mark@codesourcery.com>
1469 * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
1471 * init.c (build_new): Likewise.
1474 * name-lookup.c (arg_assoc): Robustify.
1477 * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
1478 when determining the scope to use for a pointer to member.
1479 (lookup_anon_field): Give it external linkage.
1480 * cp-tree.h (lookup_anon_field): Declare it.
1481 * expr.c (cplus_expand_constant): Use it.
1483 2004-05-28 Mark Mitchell <mark@codesourcery.com>
1486 * parser.c (cp_parser_simple_type_specifier): Call
1487 maybe_note_name_used_in_class.
1489 2004-05-28 Tom Marshall <tmarshall@real.com>
1492 * class.c (finish_struct_1): Warn only if the dtor is non-private or
1493 the class has friends.
1495 2004-05-27 Adam Nemet <anemet@lnxw.com>
1498 * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
1499 TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
1501 2004-05-24 Geoffrey Keating <geoffk@apple.com>
1503 * method.c (implicitly_declare_fn): Don't call defer_fn; abort
1504 if it might be needed.
1505 * pt.c (mark_decl_instantiated): Only call defer_fn if
1506 the function actually needs processing in finish_file.
1507 * decl2.c (finish_file): Add check that elements in
1508 deferred_fns_used are really needed there. Remove unnecessary
1509 test of DECL_SAVED_TREE.
1511 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
1513 * Make-lang.in: No need to specify $(LIBCPP).
1515 2004-05-23 Mark Mitchell <mark@codesourcery.com>
1518 * parser.c (cp_parser_class_head): Robustify.
1521 * parser.c (cp_parser_decl_specifier_seq): Correct error in
1523 (cp_parser_constructor_declarator_p): Treat attributes
1527 * typeck.c (build_unary_op): Do not attempt to resolve casts to
1528 base classes in templates.
1530 2004-05-23 Mark Mitchell <mark@codesourcery.com>
1533 * pt.c (instantiate_template): Robustify.
1535 2004-05-23 Mark Mitchell <mark@codesourcery.com>
1538 * decl.c (xref_tag): Issue errors about redeclaring template
1539 classes as non-template classes.
1541 2004-05-23 Mark Mitchell <mark@codesourcery.com>
1544 * name-lookup.c (supplement_binding): Allow redefinitions of
1548 * parser.c (cp_parser_template_argument): Robustify.
1550 2004-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
1552 * class.c (alter_access): Use %E format specifier to print an
1553 identifier node. Avoid looking at the IDENTIFIER_POINTER.
1554 (push_lang_context): Likewise.
1555 * decl.c (lookup_label): Likewise.
1556 (grokdeclarator): Likewise.
1557 * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
1558 * pt.c (do_type_instantiation): Likewise.
1559 * tree.c (handle_java_interface_attribute): Likewise.
1560 (handle_com_interface_attribute): Likewise.
1561 (handle_init_priority_attribute): Likewise.
1563 2004-05-22 Mark Mitchell <mark@codesourcery.com>
1567 * pt.c (build_non_dependent_expr): Expand the set of tree nodes
1568 recognized as overloaded functions.
1570 2004-05-22 Mark Mitchell <mark@codesourcery.com>
1573 * class.c (layout_nonempty_base_or_field): Do not try to avoid
1574 layout conflicts for unions.
1577 * typeck.c (build_x_unary_op): Instantiate template class
1578 specializations before looking for "operator &".
1581 * typeck.c (complete_type): Layout non-dependent array types, even
1585 * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
1588 2004-05-22 Roger Sayle <roger@eyesopen.com>
1590 * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
1591 returning when TREE_TYPE is error_mark_node.
1592 * typeck.c (require_complete_type): Return error_mark_node if
1593 value's type is an error_mark_node.
1595 2004-05-20 Andrew Pinski <pinskia@physics.uc.edu>
1597 * optimize.c (calls_setjmp_r): Remove.
1598 (calls_setjmp_p): Remove.
1599 * cp-tree.c (calls_setjmp_p): Remove.
1600 * decl.c (finish_function): Do not call calls_setjmp_p.
1602 2004-05-18 Zack Weinberg <zack@codesourcery.com>
1604 * decl.c (cp_finish_decl): Use mark_decl_referenced.
1605 * decl2.c (maybe_make_one_only): Likewise.
1606 * method.c (use_thunk): Likewise.
1608 2004-05-18 Jason Merrill <jason@redhat.com>
1610 * class.c (build_base_path): Tidy a bit.
1612 2004-05-14 Geoffrey Keating <geoffk@apple.com>
1614 * name-lookup.c (struct scope_binding): New.
1615 (EMPTY_SCOPE_BINDING): New.
1616 (lookup_using_namespace): Take a scope_binding instead of a
1618 (qualified_lookup_using_namespace): Likewise.
1619 (cxx_binding_clear): Delete.
1620 (do_nonmember_using_decl): Use a scope_binding instead of a
1622 (lookup_tag): Don't call select_decl.
1623 (ambiguous_decl): Don't return anything (and change callers to match).
1624 Take a scope_binding as the second parameter.
1625 (lookup_namespace_name): Use a scope_binding instead of a
1627 (unqualified_namespace_lookup): Likewise.
1628 (lookup_qualified_name): Likewise.
1629 (select_decl): Take a scope_binding instead of a cxx_binding.
1630 Use macros rather than hand-coding tests for type-ness.
1632 2004-05-13 Diego Novillo <dnovillo@redhat.com>
1634 * cp-gimplify.c: Rename from cp-simplify.c.
1635 * Make-lang.in, optimize.c: Update.
1637 2004-05-13 Diego Novillo <dnovillo@redhat.com>
1639 Merge from tree-ssa-20020619-branch. See
1640 ChangeLog.tree-ssa for details.
1642 * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
1643 cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
1644 expr.c, init.c, name-lookup.h, optimize.c, parser.c,
1645 pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
1647 * cp-mudflap.c: New file.
1648 * cp-simplify.c:: New file.
1650 2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1653 * decl2.c (check_classfn): For member templates, compare also the
1654 template parameters to match the declaration.
1655 * cp-tree.h: Adjust declaration of check_classfn.
1656 * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
1657 * friend.c (do_friend): Likewise.
1658 * pt.c (tsubst_friend_function): Likewise.
1660 2004-05-01 Zack Weinberg <zack@codesourcery.com>
1662 * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
1663 Instead, dig into the representation type to find the array bound.
1665 2004-04-30 Jason Merrill <jason@redhat.com>
1667 Refer to base members using COMPONENT_REFs where possible.
1668 * class.c (build_simple_base_path): New fn.
1669 (build_base_path): Use it for non-virtual base references.
1670 (layout_class_type): Change base fields to their real type
1671 after layout is done.
1672 * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
1673 * cp-lang.c (cxx_get_alias_set): Use it.
1675 2004-04-30 Kazu Hirata <kazu@cs.umass.edu>
1677 * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
1680 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1683 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
1684 used in integral constant expressions.
1686 2004-04-22 Mark Mitchell <mark@codesourcery.com>
1688 * init.c (build_aggr_init): Fix accidental use of C99 construct in
1691 * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
1693 * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
1694 * decl.c (reshape_init): Use it.
1695 * init.c (perform_member_init): Remove redundant condition.
1696 (build_aggr_init): Adjust to handle brace-enclosed initializers
1698 (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
1700 * parser.c (cp_parser_initializer_clause): Do not set
1701 TREE_HAS_CONSTRUCTOR on the initializer.
1702 * rtti.c (tinfo_base_init): Likewise.
1703 (generic_initializer): Likewise.
1704 (ptr_initializer): Likewise.
1705 (ptm_initializer): Likewise.
1706 (class_initializer): Likewise.
1707 (get_pseudo_ti_init): Likewise.
1708 * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
1710 2004-04-22 Alan Modra <amodra@bigpond.net.au>
1712 * name-lookup.c (anonymous_namespace_name): Make static.
1714 2004-04-19 Roger Sayle <roger@eyesopen.com>
1717 * class.c (build_base_path): Call fold whilst building the NULL
1718 pointer check expression trees.
1720 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
1722 * init.c (build_new_1): Don't use type size argument for Java
1723 _Jv_AllocObject call.
1725 2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
1727 * method.c (make_alias_for_thunk): Remove preprocessor guard on
1728 declaration and definition.
1730 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
1733 * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
1734 than ASM_OUTPUT_DEF.
1736 2004-04-08 Jakub Jelinek <jakub@redhat.com>
1738 * decl2.c (mark_used): Don't segfault if cfun != NULL but
1739 current_function_decl == NULL.
1741 2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
1744 * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
1747 2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1749 * init.c (decl_constant_value): Don't look at DECL_INITIAL
1751 * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
1752 or TREE_SIDE_EFFECTS of a type.
1754 2004-04-02 Nathan Sidwell <nathan@codesourcery.com>
1757 * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
1758 cv-qualifier unification.
1759 * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
1761 2004-04-02 Jan Hubicka <jh@suse.cz>
1763 * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
1764 * cp-tree.h (cp_update_decl_after_saving): Declare.
1765 * tree.c (cp_update_decl_after_saving): Define.
1767 2004-04-01 Mark Mitchell <mark@codesourcery.com>
1770 * typeck.c (get_delta_difference): Call fold before returning the
1773 2004-04-01 Richard Henderson <rth@redhat.com>
1776 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
1777 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
1779 2004-04-01 Mark Mitchell <mark@codesourcery.com>
1782 * name-lookup.c (maybe_push_cleanup_level): Robustify.
1784 2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1786 * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
1788 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1790 * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
1791 * class.c (check_bitfield_decl): Likewise.
1792 * cvt.c (type_promotes_to): Likewise.
1793 * decl.c (finish_enum): Likewise.
1794 * mangle.c (write_builtin_type): Likewise.
1795 * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
1796 * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
1797 (build_binary_op): Likewise.
1799 2004-03-31 Jan Hubicka <jh@suse.cz>
1801 * tree.h (optimize_function): Kill prototype.
1802 * optimize.c (dump_function, optimize_function, dump_finction): Kill.
1803 * semantics.c (expand_body): Kill.
1805 2004-03-30 Mark Mitchell <mark@codesourcery.com>
1808 * decl.c (start_decl_1): Do not decide whether or not to create a
1809 new cleanup level until after the type has been completed.
1812 * pt.c (tsubst_default_argument): Clear current_function_decl.
1814 2004-03-30 Zack Weinberg <zack@codesourcery.com>
1816 * name-lookup.c, parser.c: Use new shorter form of GTY markers.
1818 2004-03-29 Zack Weinberg <zack@codesourcery.com>
1820 * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
1821 is null, just print the literal name and return.
1823 2004-03-25 Kazu Hirata <kazu@cs.umass.edu>
1825 * cxx-pretty-print.c: Fix comment typos.
1827 2004-03-24 Kazu Hirata <kazu@cs.umass.edu>
1829 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
1832 2004-03-23 Ziemowit Laski <zlaski@apple.com>
1834 * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
1835 * mangle.c (write_type): Add call to 'mangle_fundamental_type'
1838 2004-03-23 Zack Weinberg <zack@codesourcery.com>
1840 PR 12267, 12391, 12560, 13129, 14114, 14133
1841 * cp-lang.c (c_reset_state): Delete.
1842 (push_file_scope, pop_file_scope): New stubs.
1843 * parser.c (c_parse_file): Call sorry() here if called more than once.
1845 2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1847 * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
1850 2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
1852 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
1854 2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
1856 * error.c (enum pad): Remove.
1857 (dump_qualifiers): Likewise.
1858 (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
1859 (dump_aggr_type): Likewise.
1860 (dump_type_suffix): Likewise.
1861 (dump_simple_decl): Likewise.
1862 (dump_function_decl): Likewise.
1863 (cv_to_string): Likewise.
1864 (dump_type_prefix): Likewise. Adjust return void.
1865 * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
1867 (pp_cxx_template_keyword_if_needed): Document.
1868 (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
1869 (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
1870 MUST_NOT_THROW_EXPR.
1872 2004-03-21 Mark Mitchell <mark@codesourcery.com>
1875 * decl.c (cp_finish_decl): Compute the size of arrays declared in
1876 templates, if their type is non-dependent.
1878 2004-03-19 Mark Mitchell <mark@codesourcery.com>
1880 * call.c (build_op_delete_call): Do not forget the placement
1881 arguments when iterating through mutiple delete operators.
1883 * cp-tree.h (svaed_scope): Remove last_parms.
1884 (NEW_DELETE_OPNAME_P): New macro.
1885 (last_function_parms): Remove.
1886 (do_friend): Adjust prototype.
1887 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
1888 using last_function_parms.
1889 (grokfndecl): Take the PARM_DECLs as an argument, rather than
1890 using last_function_parms.
1891 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
1892 for class-specific operator new and operator delete.
1893 (grok_op_properties): Do not look for allocation functions with
1895 (start_function): Use DECL_ARGUMENTS instead of
1896 last_function_parms.
1897 * decl.h (last_function_parms): Do not declare.
1898 * decl2.c (grokclassfn): Do not use last_function_parms.
1899 * friend.c (do_friend): Remove parmdecls parameter.
1900 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
1901 (pop_from_top_level): Do not restore it.
1902 * pt.c (check_explicit_specialization): Do not adjust
1903 last_function_parms.
1905 * name-lookup.c (do_local_using_decl): Create a local binding for
1906 types brought in via using declarations.
1908 * name-lookup.c (lookup_arg_dependent): Handle block-scope
1909 function declarations correctly.
1911 * semantics.c (finish_id_expression): Correct handling of
1912 conversion operators to dependent types.
1914 * typeck.c (lookup_destructor): Allow the use of destructors from
1917 2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1919 * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
1920 TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
1921 * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
1922 the field is named TEMPLATE_TYPE_PARM_INDEX.
1924 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1927 * parser.c (cp_parser_functional_cast): A cast to anything
1928 but integral or enumaration type is not an integral constant
1930 * pt.c (value_dependent_expression_p): Handle cast expressions
1931 without operands (such as "int()").
1933 2004-03-18 Mark Mitchell <mark@codesourcery.com>
1935 * semantics.c (finish_pseudo_destructor_expr): Allow differing
1936 cv-qualification between the type named by the
1937 pseudo-destructor-name and the object-type.
1939 * search.c (accessible_base_p): Handle non-proper bases.
1941 * name-lookup.c (do_nonmember_using_decl): If a using declaration
1942 refers to a single overloaded function, set the type of the
1944 * tree.c (lvalue_type): Simplify.
1945 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
1947 (build_unary_op): Handle OVERLOADs with known types.
1949 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
1952 * parser.c (cp_parser_postfix_expression): Handle the use of
1953 "typename" in non-dependent contexts. Convert appropriately when
1954 when using a qualified name after "->" or ".".
1956 * call.c (conditional_conversion): Honor the requirement that some
1957 conversions refer to the original object.
1959 2004-03-18 Mark Mitchell <mark@codesourcery.com>
1961 * call.c (build_conditional_expr): Do not call force_rvalue for
1962 operands of void_type when the conditional expression itself has
1964 * name-lookup.c (pushdecl): Don't consider a declaration of a
1965 function named "main" to be an overload of a type named "main".
1966 * parser.c (cp_parser_template_name): Perform name lookup when the
1967 template name is proceeded by "template" if the qualifying scope
1969 * typeck.c (composite_pointer_type_r): Correctly handle
1970 pointer-to-member types.
1971 (build_const_cast): Likewise.
1973 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1975 * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
1976 * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
1977 (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
1978 (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
1979 (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
1980 (TYPEOF_TYPE_EXPR): New macro.
1981 * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
1982 * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
1983 * pt.c (tsubst): Likewise.
1984 * semantics.c (finish_typeof): Likewise.
1985 * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
1986 and TEMPLATE_TYPE_PARM.
1987 * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
1988 (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
1990 2004-03-16 Mark Mitchell <mark@codesourcery.com>
1993 * cp-tree.h (build_new_op): Change prototype.
1994 (build_x_binary_op): Likewise.
1995 * call.c (build_new_op): Add overloaded_p parameter.
1996 * decl2.c (grok_array_decl): Adjust call to build_new_op.
1997 * parser.c (cp_parser_binary_expression): Note that uses of
1998 overloaded operators prevents an expression from being considered
1999 an integral constant.
2000 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
2002 * semantics.c (finish_call_expr): Likewise.
2003 * typeck.c (rationalize_conditional_expr): Likewise.
2004 (build_x_indirect_ref): Likewise.
2005 (build_x_binary_op): Likewise.
2006 (build_x_unary_op): Likewise.
2007 (build_x_compound_expr): Likewise.
2008 (build_modify_expr): Likewise.
2009 * typeck2.c (build_x_arrow): Likewise.
2011 2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
2013 * cp-lang.c, ptree.c: Update copyright.
2015 2004-03-13 Mark Mitchell <mark@codesourcery.com>
2018 * parser.c (cp_parser_non_integral_constant_expression): Encode
2019 more of the idiom that surrounded calls to this function within
2021 (cp_parser_primary_expression): Adjust accordingly.
2022 (cp_parser_postfix_expression): Likewise.
2023 (cp_parser_unary_expression): Likewise.
2024 (cp_parser_cast_expression): Likewise.
2025 (cp_parser_assignment_expression): Likewise.
2026 (cp_parser_expression): Likewise.
2027 (cp_parser_new_expression): Note that new-expressions are not
2028 allowed in integral constant expressions.
2029 (cp_parser_delete_expression): Likewise.
2031 2004-03-12 Matt Austern <austern@apple.com>
2033 * decl2.c (maybe_make_one_only): Look at
2034 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
2035 to make an explicit instantiation weak.
2036 * method.c (use_thunk): Make sure we call comdat_linkage
2038 * pt.c (do_type_instantiation): On systems where weak symbols
2039 don't go in a static archive's TOC, explicit instantiation of a
2040 class must imply *explicit* instantiation of its memeber.
2042 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
2044 * call.c, cp-tree.h, pt.c: Fix comment typos.
2046 2004-03-10 Mark Mitchell <mark@codesourcery.com>
2049 * decl.c (xref_tag): Disregard non-type declarations when
2050 looking up a tagged type.
2052 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
2055 * call.c (convert_like_real): Build a const qualified temporary,
2056 when testing ctor access.
2058 2004-03-09 Mark Mitchell <mark@codesourcery.com>
2060 * call.c (initialize_reference): Fix typo.
2062 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2065 * pt.c (determine_specialization): For member templates, match also
2069 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
2071 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
2073 2004-03-09 Mark Mitchell <mark@codesourcery.com>
2076 * call.c (initialize_reference): Handle initializers that are
2077 class-member access expressions applies to rvalues.
2079 2004-03-09 Mark Mitchell <mark@codesourcery.com>
2082 * name-lookup.c (supplement_binding): Ignore functions that are
2083 marked DECL_ANTICIPATED.
2085 2004-03-08 Mark Mitchell <mark@codesourcery.com>
2088 * class.c (check_field_decls): Complain about non-static data
2089 members of reference type in unions. Propagate
2090 CLASSTYPE_REF_FIELDS_NEED_INIT and
2091 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
2093 * init.c (perform_member_init): Complain about mbmers with const
2094 type that are not explicitly initialized.
2096 2004-03-08 Mark Mitchell <mark@codesourcery.com>
2098 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
2099 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
2100 (lang_identifier): Remove implicit_decl and error_locus.
2101 (IDENTIFIER_IMPLICIT_DECL): Remove.
2102 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
2103 (IDENTIFIER_ERROR_LOCUS): Likewise.
2104 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
2105 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
2106 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
2107 (implicitly_declare): Remove.
2108 * decl.c (warn_extern_redeclared_static): Remove check of
2109 IDENTIFIER_IMPLICIT_DECL.
2110 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
2111 (implicitly_declare): Remove.
2112 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
2113 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
2114 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
2115 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
2116 in the innermost scope, rather than at namespace scope.
2117 * name-lookup.c (push_local_binding): Give it external linkage.
2118 (pushdecl): Remove dead code.
2119 * name-lookup.h (push_local_binding): Declare it.
2120 * ptree.c (cxx_print_identifier): Don't print
2121 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
2122 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
2123 not IDENTIFIER_ERROR_LOCUS.
2124 * typeck.c (build_function_call): Remove dead code.
2126 2004-03-08 Jason Merrill <jason@redhat.com>
2129 * decl.c (xref_tag): Remove attribute handling.
2130 * cp-tree.h: Adjust prototype.
2131 * decl.c, parser.c, rtti.c: Adjust callers.
2132 * parser.c (cp_parser_class_head): Pass back attributes in the
2134 (cp_parser_class_specifier): Adjust.
2136 2004-03-08 Matt Austern <austern@apple.com>
2139 * name-lookup.c (add_decl_to_level): Add extern variables, as well
2140 as static, to static_decls array.
2142 2004-03-05 Jason Merrill <jason@redhat.com>
2144 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
2146 2004-03-04 Geoffrey Keating <geoffk@apple.com>
2148 * decl.c (grokfndecl): Update old incorrect comment.
2149 (grokvardecl): Diagnose C++ variables of type with no linkage.
2151 2004-03-01 Mark Mitchell <mark@codesourcery.com>
2154 * pt.c (build_non_dependent_expr): Do not create a
2155 NON_DEPENDENT_EXPR for a THROW_EXPR.
2157 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
2160 * error.c (dump_expr): Handle THROW_EXPR.
2162 2004-03-01 Mark Mitchell <mark@codesourcery.com>
2165 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
2166 lookup if ordinary name-lookup finds a non-function.
2167 * pt.c (tsubst_copy_and_build): Likewise.
2170 * parser.c (cp_parser_late_parsing_default_args): Check that there
2171 are no extra tokens after the end of the default-argument
2174 2004-03-01 Mark Mitchell <mark@codesourcery.com>
2177 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
2178 having C++ linkage for name-mangling purposes.
2181 * parser.c (cp_parser_direct_declarator): Recognize constructor
2182 declarators that use a template-id to name the class being
2186 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
2187 (tsubst_expr): Do not call tsubst_copy, even when
2188 processing_template_decl.
2190 2004-03-01 Jeff Law <law@redhat.com>
2192 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
2195 2004-02-29 Mark Mitchell <mark@codesourcery.com>
2198 * name-lookup.h (push_scope): Change prototype.
2199 * name-lookup.c (push_scope): Do not reenter the current class
2201 * decl.c (grokfndecl): Check return code from push_scope before
2203 * decl2.c (check_classfn): Likewise.
2204 * parser.c (cp_parser_conversion_function_id): Likewise.
2205 (cp_parser_init_declarator): Likewise.
2206 (cp_parser_direct_declarator): Likewise.
2207 (cp_parser_class_specifier): Likewise.
2208 (cp_parser_class_head): Likewise.
2209 (cp_parser_lookup_name): Likewise.
2210 (cp_parser_constructor_declarator_p): Likewise.
2211 * pt.c (instantiate_class_template): Likewise.
2212 (resolve_typename_type): Likewise.
2214 2004-02-29 Mark Mitchell <mark@codesourcery.com>
2217 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
2221 * class.c (update_vtable_entry_for_fn): Do not go through
2222 covariance machinery if the type returned by an overrider is the
2223 same as the original.
2225 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
2227 * call.c: Fix a comment typo.
2229 2004-02-27 Ziemowit Laski <zlaski@apple.com>
2231 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
2233 2004-02-26 Mark Mitchell <mark@codesourcery.com>
2236 * parser.c (cp_parser_parameter_declaration_list): Commit
2237 to fewer tentative parses.
2239 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2242 * pt.c (dependent_type_p_r): A template template parameter is a
2245 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2248 * mangle.c (write_template_arg_literal): Don't rely on identity for
2251 2004-02-24 Jason Merrill <jason@redhat.com>
2253 * tree.c (build_exception_variant): Use check_qualified_type.
2255 2004-02-23 Zack Weinberg <zack@codesourcery.com>
2256 Kazu Hirata <kazu@cs.umass.edu>
2258 * decl.c (cxx_init_decl_processing): Don't check
2259 flag_writable_strings.
2261 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
2264 * typeck.c (maybe_warn_about_returning_address_of_location):
2265 Change check for VAR_DECL to use DECL_P instead.
2267 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2270 * cvt.c (build_expr_type_conversion): Type must be complete before
2271 looking up for conversions.
2273 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2276 * name-lookup.c (arg_assoc_class): Don't look into template
2277 arguments if it is not a primary template.
2279 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
2282 * method.c (use_thunk): Always clone function argument tree.
2284 2004-02-20 Mark Mitchell <mark@codesourcery.com>
2287 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
2290 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
2291 for all type variants.
2293 2004-02-19 Mark Mitchell <mark@codesourcery.com>
2296 * decl.c (duplicate_decls): Return error_mark_node for invalid
2298 * name-lookup.c (push_namespace): Ignore the return value from
2300 * pt.c (push_template_decl_real): Robustify.
2303 * name-lookup.c (push_class_level_binding): Do not complain about
2304 adding a binding for a member whose name is the same as the
2305 enclosing class if the member is located in a base class of the
2308 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2311 * parser.c (cp_parser_new_expression): Parse an ill-formed
2312 direct-new-declarator after a parenthesized type-id to emit good
2315 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
2317 * cp-tree.def, cvt.c: Update copyright.
2319 2004-02-17 Mark Mitchell <mark@codesourcery.com>
2322 * cp-tree.h (abi_version_at_least): Remove.
2323 * mangle.c: Include flags.h.
2325 2004-02-15 Mark Mitchell <mark@codesourcery.com>
2328 * call.c (build_conditional_expr): Handle conversions between
2329 class types which result in differently cv-qualified type
2333 * class.c (delete_duplicate_fields_1): Remove.
2334 (delete_duplicate_fields): Likewise.
2335 (finish_struct_anon): Remove check for members with the same name
2336 as their enclosing class.
2337 (check_field_decls): Do not call duplicate_fields.
2338 * decl.c (grokdeclarator): Remove check for static data members
2339 with the same name as their enclosing class.
2340 * name-lookup.c (push_class_level_binding): Check for members with
2341 the same name as their enclosing class.
2343 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
2346 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
2348 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2351 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
2352 has full set of arguments.
2354 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2357 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
2359 2004-02-13 Mark Mitchell <mark@codesourcery.com>
2362 * cp-tree.h (delete_sanity): Change prototype.
2363 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
2364 Remove dead code. Adjust code to warn about deleting an array.
2365 * typekc.c (decay_conversion): Use build_address and build_nop.
2368 * search.c (accessible_p): Do not check access in thunks.
2371 * call.c (build_conditional_expr): Call force_rvalue on the
2372 non-void operand in the case that one result is a throw-expression
2373 and the other is not.
2375 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
2378 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
2379 the type name and look ahead for ::~, and bail out early with a
2380 better error message if the parse is going to fail.
2382 2004-02-12 Mark Mitchell <mark@codesourcery.com>
2384 * call.c (conversion_kind): New type.
2385 (conversion_rank): Likewise.
2386 (conversion): Likewise.
2387 (CONVERSION_RANK): New macro.
2388 (conversion_obstack): New variable.
2389 (obstack_initialized): Likewise.
2390 (z_candidate): Change type of convs and second_conv.
2391 (candidate_warning): New type.
2392 (IDENTITY_RANK): Remove.
2393 (EXACT_RANK): Likewise.
2394 (PROMO_RANK): Likewise.
2395 (STD_RANK): Likewise.
2396 (PBOOL_RANK): Likewise.
2397 (USER_RANK): Likewise.
2398 (ELLIPSIS_RANK): Likewise.
2399 (BAD_RANK): Likewise.
2400 (ICS_RANK): Likewise.
2401 (ICS_STD_RANK): Likewise.
2402 (ICS_USER_FLAG): Likewise.
2403 (ICS_ELLIPSIS_FLAG): Likewise.
2404 (ICS_THIS_FLAG): Likewise.
2405 (ICS_BAD_FLAG): Likewise.
2406 (NEED_TEMPORARY_P): Likewise.
2407 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
2408 (USER_CONV_CAND): Likewise.
2409 (USER_CONV_FN): Likewise.
2410 (conversion_obstack_alloc): New function.
2411 (alloc_conversion): Likewise.
2412 (validate_conversion_obstack): Likewise.
2413 (alloc_conversions): Likewise.
2414 (build_conv): Adjust to deal with new conversion data structures.
2415 (build_identity_conv): New function.
2416 (build_ambiguous_conv): Likewise.
2417 (standard_conversion): Adjust to deal with new conversion data
2419 (convert_class_to_reference): Likewise.
2420 (direct_reference_binding): Likewise.
2421 (reference_binding): Likewise.
2422 (implicit_conversion): Likewise.
2423 (add_candidate): Likewise.
2424 (add_function_candidate): Likewise.
2425 (add_conv_candidate): Likewise.
2426 (build_builtin_candidate): Likewise.
2427 (print_z_candidate): Likewise.
2428 (merge_conversion_sequences): Likewise.
2429 (build_user_type_conversion_1): Likewise.
2430 (build_user_type_conversion): Likewise.
2431 (build_new_function_call): Likewise.
2432 (build_object_call): Likewise.
2433 (conditional_conversion): Likewise.
2434 (build_conditional_expr): Likewise.
2435 (build_new_op): Likewise.
2436 (build_op_delete_call): Likewise.
2437 (convert_like_real): Likewise.
2438 (build_over_call): Likewise.
2439 (build_new_method_call): Likewise.
2440 (is_subseq): Likewise.
2441 (maybe_handle_implicit_object): Likewise.
2442 (maybe_handle_ref_bind): Likewise.
2443 (compare_ics): Likewise.
2444 (source_type): Likewise.
2445 (add_warning): Likewise.
2447 (can_convert_arg): Likewise.
2448 (can_convert_arg_bad): Likewise.
2449 (perform_implicit_conversion): Likewise.
2450 (perform_direct_initialization_if_possible): Likewise.
2451 (initialize_reference): Likewise.
2452 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
2453 * cp-tree.def (WRAPPER): Likewise.
2454 (IDENTITY_CONV): Remove.
2455 (LVALUE_CONV): Likewise.
2456 (QUAL_CONV): Likewise.
2457 (STD_CONV): Likewise.
2458 (PTR_CONV): Likewise.
2459 (PMEM_CONV): Likewise.
2460 (BASE_CONV): Likewise.
2461 (REF_BIND): Likewise.
2462 (USER_CONV): Likewise.
2463 (AMBIG_CONV): Likewise.
2464 (RVALUE_CONV): Likewise.
2465 * cp-tree.h (tree_wrapper): Remove.
2466 (WRAPPER_ZC): Remove.
2467 (lang_tree_node): Remove wrapper.
2468 (LOOKUP_SPECULATIVELY): Remove.
2469 (build_op_delete_call): Adjust prototype.
2470 (validate_conversion_obstack): Declare.
2471 (build_zc_wrapper): Remove.
2472 * cvt.c (convert_to_reference): Remove dead code.
2473 (ocp_convert): Likewise.
2474 * decl.c (redeclaration_error_message): Correct handling of
2476 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
2477 (cp_tree_node_structure): Remove WRAPPER case.
2478 * decl2.c (finish_file): Call validate_conversion_obstack.
2479 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
2480 (build_op_delete_call): Likewise.
2481 (build_x_delete): Likewise.
2482 (build_delete): Adjust call to build_op_delete_call.
2483 * pt.c (tsubst_friend_declaration): Adjust code to determine
2484 whether or not a friend template is a definition.
2485 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
2486 * tree.c (build_zc_wrapper): Remove.
2488 2004-02-12 Zack Weinberg <zack@codesourcery.com>
2490 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
2491 * cp-tree.h: Don't declare cxx_builtin_type_decls.
2492 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
2493 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
2495 2004-02-10 Mark Mitchell <mark@codesourcery.com>
2497 * typeck.c (lookup_destructor): Fix typo in error message.
2499 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
2501 * call.c, parser.c, tree.c: Fix comment typos.
2503 2004-02-07 Zack Weinberg <zack@codesourcery.com>
2506 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
2507 * decl.c (duplicate_decls, start_function): Likewise.
2509 2004-02-07 Zack Weinberg <zack@codesourcery.com>
2511 * name-lookup.c (pushdecl): Issue shadow warnings directly.
2512 * parser.c (free_parser_stacks): Delete.
2514 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
2516 * rtti.c: Update copyright.
2518 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2521 * decl.c (require_complete_types_for_parms): Do not insert
2522 error_mark_node in the parameter list.
2524 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2527 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
2528 error when terminator can not be found.
2530 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
2532 Make-lang.in (po-generated): Delete.
2534 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
2536 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
2537 targetm.calls.promote_prototypes.
2539 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
2543 2004-01-15 Geoffrey Keating <geoffk@apple.com>
2545 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
2546 (handle_pragma_implementation): Likewise.
2548 2004-02-05 Mark Mitchell <mark@codesourcery.com>
2551 * typeck.c (lookup_destructor): Tweak error message.
2553 2004-02-05 Jan Hubicka <jh@suse.cz>
2555 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
2558 2004-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2561 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
2562 code, only emits the diagnostic now. Added lookup of the identifier
2563 and support for qualified ids.
2564 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
2565 Parse an (invalid) type name as id-expression within a declarator.
2566 (cp_parser_simple_declaration): Use it.
2567 (cp_parser_member_declaration): Likewise.
2568 (cp_parser_make_typename_type): New function. Handle errors through
2569 cp_parser_diagnose_invalid_typename.
2570 (cp_parser_elaborated_type_specifier): Use it.
2572 2004-02-04 Mark Mitchell <mark@codesourcery.com>
2575 * call.c (convert_like_real): Use "converting" rather than
2576 "argument" as the descriptive keyword to
2577 dubious_conversion_warnings.
2578 * typeck.c (convert_for_assignment): Do not call
2579 dubious_conversion_warnings.
2581 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2584 * init.c (build_delete): Emit a more informative error message in
2585 case of an incomplete type, and on the correct source line.
2587 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
2589 * error.c, search.c: Update copyright.
2591 2004-02-04 Mark Mitchell <mark@codesourcery.com>
2594 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
2595 linkage for the typeinfo name string.
2597 2004-02-04 Mark Mitchell <mark@codesourcery.com>
2600 * cp-tree.h (fold_non_dependent_expr): New function.
2601 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
2602 (cp_parser_template_argument): Use fold_non_dependent_expr.
2603 (cp_parser_direct_declarator): Likewise.
2604 * pt.c (fold_non_dependent_expr): New function.
2605 (convert_nontype_argument): Use it.
2606 (tsubst_qualified_id): Simplify.
2607 (tsubst_copy_and_build): Likewise.
2609 2004-02-04 Mark Mitchell <mark@codesourcery.com>
2611 * decl.c (cxx_push_function_context): Do not set
2612 current_function_is_thunk.
2613 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
2616 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2619 * pt.c (more_specialized_class): Increase processing_template_decl
2620 while partial ordering.
2622 2004-02-03 Mark Mitchell <mark@codesourcery.com>
2625 * decl.c (start_function): Do not call pushdecl for any
2626 instantiation or specialization of a primary template.
2628 2004-02-03 Mark Mitchell <mark@codesourcery.com>
2631 * parser.c (cp_parser_class_name): Robustify.
2634 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
2637 * semantics.c (finish_id_expression): Do not return an
2638 IDENTIFIER_NODE when lookup finds a PARM_DECL.
2640 2004-02-03 Mark Mitchell <mark@codesourcery.com>
2643 * pt.c (build_non_dependent_expr): Do not build
2644 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
2647 * semantics.c (finish_id_expression): Do not return an
2648 IDENTIFIER_NODE when lookup finds a VAR_DECL.
2651 * parser.c (cp_parser_simple_declaration): When skipping to the
2652 end of the statement swallow the terminating semicolon.
2654 2004-02-02 Mark Mitchell <mark@codesourcery.com>
2657 * init.c (build_offset_ref): Improve error recovery for invalid
2658 uses of non-static member functions.
2661 * cp-tree.h (cp_build_type_attribute_variant): New function.
2662 * class.c (build_clone): Use cp_build_type_attribute_variant.
2663 * decl.c (duplicate_decls): Likewise.
2664 * pt.c (copy_default_args_to_explicit_spec): Likewise.
2665 (tsubst_function_type): Likewise.
2666 * tree.c (build_exception_variant): Check attributes before
2667 concluding that two types are the same.
2668 (cp_build_type-attribute_variant): New method.
2669 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
2672 * call.c (convert_class_to_reference): Keep better track of
2673 pedantically invalid user-defined conversions.
2675 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2678 * pt.c (tsubst_qualified_id): Improved error message when a type
2679 is expected but not found.
2681 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
2683 * class.c: Fix comment typos.
2685 * error.c: Likewise.
2686 * parser.c: Likewise.
2688 * search.c: Likewise.
2689 * typeck.c: Likewise.
2691 2004-01-30 Richard Henderson <rth@redhat.com>
2694 * method.c (use_thunk): Don't force_target_expr for void thunks.
2695 * tree.c (build_target_expr_with_type): Assert non-void type.
2696 (force_target_expr): Likewise.
2698 2004-01-30 Michael Matz <matz@suse.de>
2700 * parser.c (cp_parser_labeled_statement): Accept case ranges.
2702 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2706 * decl.c (grokdeclarator): Check immediatly type completeness for
2707 non-dependent types.
2709 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2712 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
2713 a sizeof expression.block
2715 2004-01-29 Mark Mitchell <mark@codesourcery.com>
2718 * mangle.c (write_encoding): Correct encoding of member template
2721 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2723 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
2724 template name as it was `<::' (digraph typo).
2725 (cp_parser_nth_token_starts_template_argument_list_p): New function.
2726 (cp_parser_id_expression): Use it.
2727 (cp_parser_nested_name_specifier_opt): Likewise.
2728 (cp_parser_template_name): Likewise.
2729 (cp_parser_class_name): Likewise.
2730 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
2732 2004-01-28 Mark Mitchell <mark@codesourcery.com>
2735 * typeck.c (merge_types): Do not merge attributes into
2739 * parser.c (cp_parser_direct_declarator): Do not prevent
2740 backtracking inside a parenthesized declarator.
2741 (cp_parser_parameter_declaration): Fix typo in comment.
2743 2004-01-28 Jan Hubicka <jh@suse.cz>
2745 * semantics.c (expand_body) Do emit_associated_thunks before
2748 2004-01-27 Devang Patel <dpatel@apple.com>
2750 * name-lookup.c: Include "debug.h"
2751 (do_namespace_alias): Invoke debug_hooks to emit debug info
2752 for namespace alias.
2753 (do_local_using_decl): Invoke debug_hooks to emit debug info
2755 (do_class_using_decl): Same.
2756 (do_toplevel_using_decl): Same.
2757 (do_using_directive): Same.
2758 (cp_emit_debug_info_for_using): New function.
2759 * Make-lang.in (cp/parser.o): Depend on debug.h
2760 (cp/name-lookup.o): Same.
2762 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2764 * cp-tree.h (language_function, lang_type_header): Use
2766 * name-lookup.h (cp_binding_level): Likewise.
2768 2004-01-26 Mark Mitchell <mark@codesourcery.com>
2771 * semantics.c (finish_for_expr): Check for unresolved overloaded
2774 * class.c (add_method): Just check processing_template_decl to
2775 determine whether or not we are within a template.
2776 * decl2.c (maybe_retrofit_in_chrg): Likewise.
2777 * init.c (decl_constant_value): Check the type of the declaration,
2779 * name-lookup.c (maybe_push_to_top_level): Rename to ...
2780 (push_to_top_level): ... this.
2781 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
2782 * pt.c (push_template_decl_real): Reorder condition for speed.
2783 (convert_template_argument): Use dependency-checking functions in
2784 place of uses_template_parms.
2785 (lookup_template_class): Avoid calling uses_template_parms more
2787 (uses_template_parms): Reimplement, using dependency-checking
2789 (instantiate_class_template): Use push_to_top_level, not
2790 maybe_push_to_top_level.
2791 (type_unification_real): Simplify.
2792 (type_dependent_expression_p): Handle OFFSET_REFs and
2794 (any_dependent_template_arguments_p): Handle multiple levels of
2796 * semantics.c (expand_or_defer_fn): Do not check
2797 uses_template_parms for template instantiations.
2798 * typeck.c (comptypes): Avoid calling cp_type_quals.
2800 2004-01-25 Mark Mitchell <mark@codesourcery.com>
2803 * call.c (build_over_call): Do not convert arguments when
2804 processing a template.
2805 * pt.c (build_non_dependent_expr): Do not build a
2806 NON_DEPENDENT_EXPR for arithmetic constants.
2808 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2811 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
2812 returns a TYPE_DECL. no further lookup is required.
2813 * semantics.c (check_template_template_default_arg): A TYPE_DECL
2814 is invalid. Rework to give better diagnostics.
2816 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2819 * pt.c (instantiate_class_template): Add an error_mark_node
2821 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
2823 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
2826 * decl.c (finish_function): Move the call to
2827 finish_fname_decls below the call to
2828 finish_eh_spec_block.
2830 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
2832 * optimize.c, typeck2.c: Update copyright.
2834 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
2836 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
2837 init.c, mangle.c, typeck.c: Update copyright.
2839 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
2841 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
2843 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
2845 * Make-lang.in: Replace $(docdir) with doc.
2846 (c++.info, c++.srcinfo): Dummy entry.
2847 (c++.man, c++.srcman): New rules.
2848 (c++.install-man): Revamp rule.
2850 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
2852 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
2853 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
2854 immediate $(shell) instead of deferred backquote.
2856 2004-01-19 Mark Mitchell <mark@codesourcery.com>
2859 * parser.c (cp_parser_postfix_expression): When encountering
2860 incomplete type on left-hand side of "->" or ".", treat the entire
2861 expression as erroneous.
2864 * call.c (build_field_call): Remove.
2865 (n_build_method_call): Likewise.
2866 (build_method_call): Likewise.
2867 (build_new_method_call): Do not call build_field_call.
2868 * class.c (n_build_method_call): Remove.
2869 (print_class_statistics): Do not print it.
2870 * cp-tree.h (build_method_call): Remove declaration.
2871 (finish_object_call_expr): Likewise.
2872 (build_new_1): Do not use build_method_call.
2873 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
2874 when the function appearing on the right-hand-side of "." or "->"
2875 is not actually a function.
2876 * pt.c (tsubst_copy_and_build): Likewise.
2877 * semantics.c (finish_object_call_expr): Remove.
2879 2004-01-18 Mark Mitchell <mark@codesourcery.com>
2882 * pt.c (tsubst): Use finish_typeof.
2884 2004-01-18 Jason Merrill <jason@redhat.com>
2887 * except.c (build_throw): In a template, set
2888 current_function_returns_abnormally.
2890 2004-01-17 Fred Fish <fnf@intrinsity.com>
2893 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
2894 except don't call array_type_nelts() with a VECTOR_TYPE.
2896 2004-01-16 Jan Hubicka <jh@suse.cz>
2898 * mangle.c (write_mangled_name): Remove inline modifier.
2900 2004-01-16 Mark Mitchell <mark@codesourcery.com>
2903 * decl.c (compute_array_index_type): Fix grammar in comment.
2904 * init.c (build_zero_init): Handle zero-sized arrays correctly.
2907 * call.c (name_as_c_string): Print conversion operator names
2911 * call.c (initialize_reference): Pass -1 for inner parameter to
2914 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2917 * parser.c (cp_parser_base_specifier): Check for an invalid
2918 keyword `typename' and emit an user-friendly error message.
2920 2004-01-15 Geoffrey Keating <geoffk@apple.com>
2923 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
2924 (handle_pragma_implementation): Likewise.
2926 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2929 * typeck.c (build_class_member_access_expr): Allow to access members
2930 of the currently open class.
2931 (finish_class_member_access_expr): Likewise.
2933 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
2936 * name-lookup.c (validate_nonmember_using_decl): Take scope and
2937 name by value, instead of computing them.
2938 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
2939 arguments. Pass them to validate_nonmember_using_decl.
2940 * name-lookup.h (do_local_using_decl): Adjust.
2941 (do_toplevel_using_decl): Likewise.
2942 * parser.c (cp_parser_using_declaration): Likewise.
2943 * pt.c (tsubst_expr): Likewise.
2945 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
2949 * name-lookup.c (qualified_lookup_using_namespace): Search
2950 strongly-associated namespaces first, and only then try other
2953 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
2955 * Make-lang.in (c++.srcextra): Dummy entry.
2957 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2960 * parser.c (cp_parser_template_name): Don't try to parse a
2961 conversion-function-id, as it cannot be a template-name.
2962 (cp_parser_simple_type_specifier): Check for invalid template-ids
2963 even after a built-in type.
2965 2004-01-14 Jan Hubicka <jh@suse.cz>
2968 * pt.c (instantiate_decl): Do not increase function_depth.
2970 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
2974 * parser.c (cp_parser_elaborated_type_specifier): Warn about
2975 attributes and discard.
2976 * decl.c (xref_tag): Don't overwite existing attributes with
2979 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2982 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
2983 is no destructor while looking up a BIT_NOT_EXPR.
2985 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
2987 * cxxfilt.c: Remove unused file.
2989 2004-01-14 Jan Hubicka <jh@suse.cz>
2991 Partial fix to PR c++/12850
2992 * decl2.c (mark_used): Do not proactively instantiate templates
2993 when compiling in unit-at-a-time or not optimizing.
2994 * optimize.c (maybe_clone_body): Do not increase function depth.
2996 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2999 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
3001 2004-01-12 Steven Bosscher <stevenb@suse.de>
3004 * parser.c (cp_parser_member_declaration): Any non-type is also
3005 not a class or a function.
3007 2004-01-12 Jason Merrill <jason@redhat.com>
3010 * class.c (build_base_path): Do not mark vtable references as
3012 (build_vtbl_ref_1): Likewise.
3014 2004-01-12 Richard Henderson <rth@redhat.com>
3017 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
3018 (store_init_value): Use it.
3019 * decl.c (check_initializer): Expect full initialization code
3020 from store_init_value.
3021 * init.c (expand_aggr_init_1): Likewise.
3022 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
3024 2004-01-12 Mark Mitchell <mark@codesourcery.com>
3026 * class.c (layout_class_type): For non-POD class types, also copy
3027 the DECL_SIZE and DECL_MODE of fields to the base class type.
3029 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3032 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
3033 calling regenerate_decl_from_template.
3035 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
3038 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
3039 decl-specifier occurring along with a class definition.
3041 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
3043 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
3044 clauses to comments describing declares_class_or_enum.
3045 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
3048 2004-01-12 Jan Hubicka <jh@suse.cz>
3050 * pt.c (for_each_template_parm): Do not check for duplicates.
3051 (for_each_template_parm): Use walk_tree duplicate checking code.
3053 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
3056 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
3057 is error_mark_node, don't add any more decl_specs.
3058 (cp_parser_init_declarator): After committing to a declaration, if
3059 the decl_specifiers start with error_mark_node, issue an error and
3060 change the type to "int".
3062 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
3065 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
3067 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3071 * pt.c (tsubst): Substitution must fail if we are attempting to
3072 create an array with element type that is an abstract class type.
3073 * decl.c (cp_finish_decl): Strip pointers and array types recursively
3074 before calling abstract_virtuals_error.
3076 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
3078 * name-lookup.c (qualified_lookup_using_namespace): Consider
3079 strong using directives even if we've already found a binding.
3081 2004-01-09 Mark Mitchell <mark@codesourcery.com>
3083 * cp-tree.h (cxx_expand_expr): Change prototype.
3084 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
3086 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3089 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
3090 looking into them recursively. They can be there because of the
3091 new __offsetof__ extension.
3093 2004-01-07 Zack Weinberg <zack@codesourcery.com>
3095 * parser.c (cp_parser_save_member_function_body): Mark the
3098 2004-01-05 Mark Mitchell <mark@codesourcery.com>
3101 * class.c (build_clone): Copy type attributes from the original
3102 function to the clone.
3105 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
3106 references as constant.
3109 * parser.c (cp_parser_explicit_instantiation): Improve error
3111 (cp_parser_require): Improve indication of the error location.
3114 * parser.c (cp_parser_class_head): Reorder logic to check for
3115 invalid qualification.
3117 2004-01-04 Mark Mitchell <mark@codesourcery.com>
3120 * name-lookup.c (lookup_using_namespace): Remove spacesp
3122 (unqualified_namespace_lookup): Likewise.
3123 (lookup_qualified_name): Adjust accordingly.
3124 (lookup_name_real): Likewise.
3125 (lookup_arg_dependent): Do not eliminate the namespace of the
3126 functions found by unqualified name lookup unless that is the
3129 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
3131 * semantics.c (push_deferring_access_checks): Fix format.
3132 (resume_deferring_access_checks): Likewise.
3133 (stop_deferring_access_checks): Likewise.
3134 (pop_deferring_access_checks): Likewise.
3135 (get_deferred_access_checks): Likewise.
3136 (pop_to_parent_deferring_access_checks): Likewise.
3137 (perform_deferred_access_checks): Likewise.
3138 (perform_or_defer_access_check): Likewise.
3140 2004-01-04 Richard Henderson <rth@redhat.com>
3142 * call.c (build_over_call): Don't create a save_expr of an
3143 aggregate, but rather its address.
3145 2004-01-04 Mark Mitchell <mark@codesourcery.com>
3148 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
3149 an offsetof expression.
3151 * parser.c (cp_parser_parameter_declaration): Fix comment.
3154 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
3155 (reference_binding): Set it when appropriate.
3156 (build_temp): New function, split out from ...
3157 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
3158 (initialize_reference): Likewise.
3161 * parser.c (cp_parser): Add in_type_id_in_expr_p.
3162 (cp_parser_new): Initialize it.
3163 (cp_parser_postfix_expression): Set it.
3164 (cp_parser_sizeof_operand): Likewise.
3165 (cp_parser_parameteR_declaration): Do not commit early to tenative
3166 parsers when in_type_id_in_expr_p is set.
3168 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3171 * parser.c (cp_parser_template_argument): Don't call
3172 make_unbound_class_template directly.
3173 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
3174 UNBOUND_CLASS_TEMPLATE tree node.
3176 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
3179 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
3181 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3184 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
3185 (DECL_FUNCTION_TEMPLATE_P): Use it.
3186 (DECL_CLASS_TEMPLATE_P): Likewise.
3187 * parser.c (cp_parser_lookup_name): Add is_template parameter.
3188 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
3189 (cp_parser_template_name): Likewise.
3190 (cp_parser_elaborated_type_specifier): Likewise.
3191 (cp_parser_namespace_name): Likewise.
3192 (cp_parser_class_name): Likewise.
3193 (cp_parser_lookup_name_simple): Likewise.
3195 See ChangeLog.3 for earlier changes.