1 2004-07-09 Steven Bosscher <stevenb@suse.de>
3 * typeck.c (c_expand_asm_operands): Remove.
5 2004-07-09 Mike Stump <mrs@apple.com>
7 * typeck.c (build_class_member_access_expr): Skip null deref
8 warning when we don't dereference it.
10 2004-07-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
14 * class.c (check_field_decls): Improve -Weffc++ warning: do not
15 warn for pointers to functions/members, or for classes without
18 2004-07-08 Mark Mitchell <mark@codesourcery.com>
20 * name-lookup.h (struct cp_binding_level): Update documentation
23 2004-07-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
26 * typeck.c (check_return_expr): Improve -Weffc++ warning: handle
27 returning CALL_EXPR, and non-reference return type.
29 2004-07-08 Nathan Sidwell <nathan@codesourcery.com>
31 * name-lookup.c (push_binding): Use VEC_reserve.
33 2004-07-08 Richard Henderson <rth@redhat.com>
35 * cp-tree.h (expand_eh_spec_block): Remove.
37 2004-07-07 Mark Mitchell <mark@codesourcery.com>
39 * cp-tree.h (saved_scope): Remove x_previous_class_type and
40 x_previous_class_values; add x_previous_class_level.
41 (previous_class_type): Remove.
42 (previous_class_values): Remove.
43 (previous_class_level): New macro.
44 * class.c (pushclass): Restore the identifier cache more
46 (invalidate_class_lookup_cache): Use vector for class_shadowed and
47 previous_class_values.
48 * decl.c (poplevel): Likewise.
49 * name-lookup.c (cxx_binding_init): New function.
50 (cxx_binding_make): Use it.
51 (push_binding): For a binding in a class level, use a vector of
52 cp_class_binding nodes.
53 (push_binding_level): New function.
54 (begin_scope): Use it.
55 (leave_scope): Do not put class binding levels on the free list.
56 (print_binding_level): Adjust for the fact that class_shadowed is
58 (poplevel_class): Likewise.
59 (clear_identifier_class_values): Likewise.
60 (push_class_level_binding): Likewise.
61 (set_class_shadows): Remove.
62 (store_binding): New function.
63 (store_class_bindings): New function.
64 (push_to_top_level): Use store_class_bindings as appropriate.
65 (pop_from_top_level): Use previous_class_level, not
67 * name-lookup.h (cp_class_binding): New type.
68 (cp_binding_level): Use a vector object for class_shadowed.
69 (push_binding_level): Declare.
70 (set_class_shadows): Remove.
72 2004-07-07 Andrew Pinski <apinski@apple.com>
74 * class.c (instantiate_type): BUFFER_REF is dead.
75 * lex.c (init_operators): IN_EXPR is dead.
77 2004-07-07 Jason Merrill <jason@redhat.com>
80 * call.c (build_new_op): Give overload warnings for built-in
83 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
86 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
89 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
91 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
92 * class.c (build_primary_vtable, check_bases,
93 determine_primary_base, finish_struct_bits,
94 maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
95 get_basefndecls, warn_hidden, walk_subobject_offsets,
96 build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
97 layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
98 finish_struct_1, get_vfield_name, contains_empty_class_p,
99 dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
100 dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
101 add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
103 * decl.c (xref_basetypes): Likewise.
104 * dump.c (cp_dump_tree): Likewise.
105 * error.c (dump_expr): Likewise.
106 * init.c (sort_mem_initializers, expand_member_init,
107 push_base_cleanups): Likewise.
108 * method.c (do_build_copy_constructor, do_build_assign_reg,
109 synthesize_exception_spec): Likewise.
110 * name-lookup.c (arg_assoc_class):
111 * pt.c (instantiate_class_template, tsubst,
112 get_template_base_recursive):
113 * ptree.c (cxx_print_type):
114 * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
115 * search.c (lookup_base_r, dynamic_cast_base_recurse,
116 dfs_access_in_type, access_in_type, lookup_field_queue_p,
117 bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
118 marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
119 dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
120 binfo_for_vtable, copied_binfo, original_binfo): Likewise
121 * tree.c (copy_base_binfos, make_binfo): Likewise.
122 * typeck.c (commmon_base_type): Likewise
123 * typeck2.c (process_init_constructor): Likewise
125 2004-07-06 Joseph S. Myers <jsm@polyomino.org.uk>
127 * decl.c (check_tag_decl): Name redeclared type in diagnostic.
129 2004-07-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
132 * pt.c (convert_nontype_argument): Disallow conversions between
133 different enumeration types.
135 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
137 * cp-tree.h (BINFO_MARKED): Remove.
138 (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
139 BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
140 BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
141 (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
142 * class.c (build_base_path): Use BINFO_VIRTUAL_P.
143 (mark_primary_bases, determine_primary_base, base_derived_from,
144 dfs_find_final_overrider, dfs_find_final_overrider_q,
145 dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
146 dfs_modify_vtables, walk_subobject_offsets,
147 layout_nonempty_base_or_field, build_base_field,
148 build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
149 end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
150 finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
151 build_ctor_vtbl_group, accumulate_vtble_inits,
152 dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
153 build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
154 add_vcall_offset_vtbl_entries_1): Likewise.
155 * decl.c (xref_basetypes): Incomming virtual base indicated by
157 * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
158 * init.c (finish_init_stmts, sort_mem_initializers,
159 emit_mem_initializers, build_vtble_address, expand_member_init,
160 push_base_cleanups): Likewise.
161 * method.c (do_build_copy_constructor): Likewise.
162 * pt.c (instantiate_class_template,
163 get_template_base_recursive): Likewise.
164 * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
165 get_pseudo_ti_desc): Likewise.
166 * search.c (lookup_base_r, dynamic_cast_base_recurse,
167 binfo_from_vbase, binfo_via_virtual, copied_binfo,
168 original_binfo): Likewise.
169 * semantics.c (finish_base_specifier): Virtualness is indicated
171 * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
173 2004-07-06 Mark Mitchell <mark@codesourcery.com>
176 2004-06-24 Jason Merrill <jason@redhat.com>
178 * decl.c (grokparms): Give the PARM_DECL reference type if the
179 parameter is passed by invisible reference.
181 2004-07-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
183 * cp-lang.c (cp_var_mod_type_p): Add extra arg.
184 * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
185 * pt.c (check_instantiated_args, unify): Likewise.
187 2004-07-05 Phil Edwards <phil@codesourcery.com>
189 * Make-lang.in (check-c++, lang_checks): Add some comments.
191 2004-07-05 Zack Weinberg <zack@codesourcery.com>
193 * cp-mudflap.c: Delete file.
194 * Makefile.in: Remove all references to cp-mudflap.o.
196 2004-07-05 Zack Weinberg <zack@codesourcery.com>
198 * decl.c (cxx_init_decl_processing): Call
199 build_common_tree_nodes before creating the global NAMESPACE_DECL.
201 2004-07-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
204 * call.c (build_operator_new_call): Look only at global scope.
206 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
208 * call.c (enforce_access): Expect TREE_BINFO.
209 * class.c (binfo_ctor_vtable): Check TREE_BINFO.
210 * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
211 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
213 (BINFO_LANG_ELTS): Remove.
214 (BINFO_LANG_SLOTS): New.
215 (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
216 (CLASSTYPE_TEMPLATE_INFO): Adjust.
217 * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
218 * search.c (lookup_member): Check TREE_BINFO.
219 * semantics.c (perform_or_defer_access_check): Likewise.
220 (check_accessibility_of_qualified_id): Check
221 deferred_access_no_check.
222 * tree.c (make_binfo): Use make_tree_binfo.
224 2004-07-04 Mark Mitchell <mark@codesourcery.com>
226 * method.c (implicitly_declare_fn): Set linkage of generated
229 2004-07-04 Richard Henderson <rth@redhat.com>
231 * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
233 2004-07-03 Scott Brumbaugh <scottb.lists@verizon.net>
236 * name-lookup.c (push_class_level_binding): Don't pass a
237 TREE_LIST of ambiguous names to check_template_shadow as it
238 only handles declarations. Instead, pull the declaration
241 2004-07-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
244 * pt.c (check_explicit_specialization): Clarify error message.
246 2004-07-02 Richard Henderson <rth@redhat.com>
248 * tree.c (cp_unsave_r): Update remap_save_expr call.
250 2004-07-02 Mark Mitchell <mark@codesourcery.com>
253 * mangle.c (write_template_arg): Correct mangling.
256 * decl.c (grokdeclarator): Robustify.
258 2004-07-01 Richard Henderson <rth@redhat.com>
260 * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
261 * method.c (synthesize_method): Don't clear_last_expr.
262 * name-lookup.c (maybe_push_cleanup_level): Likewise.
264 2004-07-01 Nick Clifton <nickc@redhat.com>
266 * decl2.c (import_export_class): Invoke the
267 import_export_class field in the gcc_target structure if it is not
270 2004-06-30 Richard Henderson (rth@redhat.com>
272 * decl.c (start_preparsed_function): Don't set immediate_size_expand.
273 * method.c (use_thunk): Likewise.
275 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
277 * call.c (build_over_call), typeck.c (build_function_call): Call
278 check_function_arguments instead of check_function_format.
280 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
282 * call.c (build_over_call), typeck.c (build_function_call): Update
283 calls to check_function_format.
285 2004-06-30 Richard Henderson <rth@redhat.com>
287 * call.c (build_over_call): Use __builtin_memcpy for copying
288 CLASS_AS_BASE rather than funny casting.
290 2004-06-30 Richard Henderson <rth@redhat.com>
292 * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
293 TYPE_SIZE_UNIT of full_type.
295 2004-06-30 Per Bothner <per@bothner.com>
297 Conditionally compile support for --enable-mapped_location.
298 * decl.c (pop_label): Handle (imperfectly) USE_MAPPED_LOCATION case.
299 * decl2.c: If USE_MAPPED_LOCATION, don't do some line number
300 adjustments - which I don't understand.
301 * error.c (dump_decl): Rename "<interrnal>" to "<built-in>".
302 * error.c: Use LOCATION_FILE and EXPR_LOCATION macros.
303 (print_instantiation_partial_context): Use expand_location.
304 * decl.c (duplicate_decl): Use new DECL_IS_BUILTIN macro.
305 * name-lookup.c: Likewise.
306 * lex.c (cxx_init): Likewise. Also use BUILTINS_LOCATION.
307 * name-lookup.c: Use input_line macro.
308 * parser.c (cp_lexer_get_preprocessor_token): Use UNKNOWN_LOCATION.
309 (cp_parser_statement): Rename locaal variable statement_locus to
310 statement_location and use SET_EXPR_LOCATION macro.
311 * pt.c: Handle USE_MAPPED_LOCATION case. Use new macros.
312 * tree.c (cp_walk_subtrees): Likewise.
314 2004-06-29 Per Bothner <per@bothner.com>
316 * tree.c (build_min_nt, build_min, build_min_non_dep):
317 Don't set TREE_COMPLEXITY from input_line.
319 2004-06-29 Paul Brook <paul@codesourcery.com>
321 * init.c: Include target.h.
322 (get_cookie_size): Remove and replace with target hook.
324 (build_new_1): Store the element size in the cookie.
326 2004-06-29 Nathan Sidwell <nathan@codesourcery.com>
329 * parser.c (cp_parser_template_declaration_after_export): Disable
330 access checks here ...
331 (cp_parser_class_specifier): ... not here.
333 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
335 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
336 VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
337 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
340 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
342 * cp-tree.h (struct deferred_access): Move to ...
343 * semantics.c (struct deferred_access): ... here. Adjust.
344 (deferred_access_stack): Make a VEC(deferred_access),
345 (deferred_access_free_list): Remove.
346 (deferred_access_no_check): New.
347 (push_deferring_access_checks, resume_deferring_access_checks,
348 stop_deferring_access_checks, pop_deferring_access_checks,
349 get_deferred_access_checks, pop_to_parent_deferring_access_checks,
350 perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
352 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
355 * call.c (build_temp): Declare.
356 (check_constructor_callable): New.
357 (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
358 CONSTRUCTOR_CALLABLE.
359 (convert_like_real, initialize_reference): Use
360 check_constructor_callable.
361 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
362 (LOOKUP_*): Renumber.
364 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
366 * friend.c (add_friend): Only perform access checks when context
368 * lex.c (cxx_make_type): Only create a binfo for aggregate types.
369 * parser.c (cp_parser_class_specifier): Disable access checks here
370 when parsing the body of a templated class.
371 * semantics.c (perform_or_defer_access_checks): Reorder to allow
372 NULL binfos when not checking access.
374 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
376 Use vector API for vbase list.
377 * cp-tree.h: Include vec.h
378 (DEF_VEC_P (tree)): New type.
379 (struct lang_type_class): Change vbase's member type.
380 (binfo_for_vbase): Declare.
381 * class.c (determine_primary_base, base_derived_from,
382 update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
383 warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
384 build_vtbl_initializer): Adjust.
385 * decl.c (xref_basetypes): Adjust, accumulate upper bound of
387 * init.c (sort_mem_initializers, expand_member_init,
388 push_base_cleanups): Adjust.
389 * method.c (do_build_copy_constructor): Adjust.
390 * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
391 (binfo_for_vbase): New.
392 * tree.c (copy_base_binfos): Adjust.
394 2004-06-28 Mark Mitchell <mark@codesourcery.com>
396 * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
398 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
401 * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
402 paranthesis in case of pointers to array members.
403 * error.c (dump_type_prefix): Likewise.
404 (dump_type_suffix): Maybe issue a whitespace when printing
407 2004-06-27 Mark Mitchell <mark@codesourcery.com>
410 * parser.c (cp_parser_set_decl_spec_type): Refine test for
411 redefinition of built-in types.
413 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
415 * error.c (pp_template_argument_list_start): Remove.
416 (pp_template_argument_list_end): Likewise.
417 (pp_separate_with_comma): Use pp_cxx_separate_with.
418 (reinit_global_formatting_buffer): Remove.
419 (pp_non_consecutive_character): Likewise.
420 (dump_scope): Use pp_cxx_colon_colon.
421 (dump_template_parameter): Use pp_cxx_identifier,
422 pp_cxx_tree_identifier and pp_cxx_whitespace.
423 (dump_templat_bindings): Replace use of pp_string with sequence
424 of pp_cxx_whitespace and pp_equal.
425 (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
426 pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set
428 (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
429 (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace,
430 pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
431 (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
432 pp_cxx_right_bracket, pp_cxx_identifier throughout,
433 (dump_decl): Likewise.
434 (dump_template_decl): Likewise.
435 (dump_function_decl): Likewise. Set padding as appropriate.
436 (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
438 (dump_exception_spec): Likewise.
439 (dump_function_name): Use pp_cxx_tree_identifier and
441 (dump_template_parms): Use pp_cxx_begin_template_argument_list and
442 pp_cxx_end_template_argument_list.
443 (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
444 pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
445 pp_cxx_whitespace throughout.
446 (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
448 (dump_unary_op): Likewise.
449 (reinit_cxx_pp): New function.
450 (type_as_string); Use it.
451 (expr_as_string): Likewise.
452 (decl_as_string); Likewise.
453 (context_as_string): Likewise.
454 (lang_decl_name): Likewise.
455 (decl_to_string): Likewise.
456 (expr_to_string): Likewise.
457 (parm_to_string): Likewise.
458 (type_to_string): Likewise.
459 (args_to_string): Likewise.
460 (cv_to_string): Likewise.
462 2004-06-26 Mark Mitchell <mark@codesourcery.com>
464 * cp-tree.h (cp_cv_quals): New type.
465 (cp_declarator): Use it instead of "tree" as appropriate.
466 (grok_method_quals): Adjust prototype.
467 (grokclassfn): Likewise.
468 (do_friend): Likewise.
469 * decl.c (grokfndecl): Use cp_cv_quals, not tree.
470 (grokdeclarator): Likewise.
471 * decl2.c (grok_method_quals): Likewise.
472 (grokclassfn): Likewise.
473 * friend.c (do_friend): Likewise.
474 * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
475 * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
476 (make_pointer_declarator): Likewise.
477 (make_reference_declarator): Likewise.
478 (make_ptrmem_declarator): Likewise.
479 (cp_parser_ptr_operator): Likewise.
480 (cp_parser_cv_qualifier_seq_opt): Likewise.
481 (cp_parser_cv_qualifier_opt): Remove.
482 (cp_parser_new_declarator_opt): Adjust call to
483 cp_parser_ptr_operator.
484 (cp_parser_conversion_declaration_opt): Likewise.
485 (cp_parser_declarator): Use cp_cv_quals, not tree.
486 (cp_parser_direct_declarator): Likewise.
488 2004-06-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
490 * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
491 Rename DECL_STMT to DECL_EXPR.
492 * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
493 * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
494 * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
496 2004-06-26 Jan Hubicka <jh@suse.cz>
499 * decl2.c (maybe_emit_vtables): Always import_export_vtable for the
500 reachability analysis.
502 2004-06-25 Mark Mitchell <mark@codesourcery.com>
504 * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
507 2004-06-25 Paul Brook <paul@codesourcery.com>
509 * decl2.c (get_guard): Call targetm.cxx.guard_type.
510 (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
512 2004-06-24 Mark Mitchell <mark@codesourcery.com>
514 * decl.c (grokdeclarator): Restore error messages about __thread.
515 * parser.c (cp_parser_decl_specifier_seq): Likewise.
517 2004-06-24 Jason Merrill <jason@redhat.com>
520 * decl.c (grokparms): Give the PARM_DECL reference type if the
521 parameter is passed by invisible reference.
523 2004-06-24 Andreas Schwab <schwab@suse.de>
525 * cp-tree.h (enum cp_storage_class): Remove trailing comma.
527 2004-06-23 Mark Mitchell <mark@codesourcery.com>
529 * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
530 (cp/decl.o): Likewise.
531 (cp/decl2.o): Likewise.
533 (cp/semantics.o): Likewise.
534 * config-lang.in (gtfiles): Do not reference cp/lex.h.
535 * class.c: Do not include lex.h.
536 (add_implicitly_declared_members): Do not use
537 adding_implicit_members.
538 (check_bases_and_members): Do not talk about grok_x_components.
539 * cp/cp-tree.h (adding_implicit_members): Remove.
540 (cp_storage_class): New type.
541 (cp_decl_spec): Likewise.
542 (cp_decl_specifier_seq): Likewise.
543 (cp_parameter_declarator): Use it for the decl_specifiers field.
544 (check_tag_decl): Adjust prototype.
545 (shadow_tag): Likewise.
546 (groktypename): Likewise.
547 (start_decl): Likewise.
548 (start_function): Likewise.
549 (start_method): Likewise.
550 (grok_x_components): Remove.
551 (grokfield): Adjust prototype.
552 (grokbitfield): Likewise.
553 (finish_member_class_template): Remove.
554 * decl.c: Do not include lex.h.
555 (adding_implicit_members): Do not define.
556 (check_tag_decl): Do not use trees to represent decl-specifiers.
557 (shadow_tag): Likewise.
558 (groktypename): Likewise.
559 (start_decl): Likewise.
560 (grokvardecl): Likewise.
561 (grokdeclarator): Likewise.
562 (grokparms): Likewise.
563 (start_function): Likewise.
564 (start_method): Likewise.
565 * decl.h (grokdeclarator): Adjust prototype.
566 * decl2.c: Do not include lex.h.
567 (grok_x_components): Remove.
568 (grokfield): Do not use trees to represent decl-specifiers.
569 (grokbitfield): Likewise.
570 * lex.c: Do not include lex.h.
572 * parser.c: Include target.h.
573 (clear_decl_specs): New function.
574 (cp_parser_translation_unit): Do not use trees to represent
576 (cp_parser_postfix_expression): Likewise.
577 (cp_parser_new_type_id): Likewise.
578 (cp_parser_condition): Likewise.
579 (cp_parser_simple_declaration): Likewise.
580 (cp_parser_decl_specifier_seq): Likewise.
581 (cp_parser_function_specifier_opt): Likewise.
582 (cp_parser_conversion_type_id): Likewise.
583 (cp_parser_template_parameter): Likewise.
584 (cp_parser_explicit_instantiation): Likewise.
585 (cp_parser_type_specifier): Likewise.
586 (cp_parser_simple_type_specifier): Likewise.
587 (cp_parser_init_declarator): Likewise.
588 (cp_parser_type_id): Likewise.
589 (cp_parser_type_specifier_seq): Likewise.
590 (cp_parser_parameter_declaration): Likewise.
591 (cp_parser_member_declaration): Likewise.
592 (cp_parser_exception_declaration): Likewise.
593 (cp_parser_function_definition_from_specifiers_and_declarator):
595 (cp_parser_single_declaration): Likewise.
596 (cp_parser_save_member_function_body): Likewise.
597 (cp_parser_friend_p): Likewise.
598 (cp_parser_set_storage_class): New function.
599 (cp_parser_set_decl_spec_type): Likewise.
600 * pt.c: Do not include lex.h.
601 * semantics.c: Likewise.
602 (finish_member_class_template): Remove.
604 2004-06-23 Roger Sayle <roger@eyesopen.com>
606 * call.c (build_cxx_call): Don't call expand_tree_builtin. No
607 longer take both "args" and "convert_args" as arguments.
608 (build_op_delete_call): Update call to build_cxx_call.
609 (build_over_call): Likewise, update call to build_cxx_call.
610 * cp-tree.h (build_cxx_call): Update funtion prototype.
611 * typeck.c (build_function_call): Don't call expand_tree_builtin.
612 * rtti.c (throw_bad_cast): Update call to build_cxx_call.
613 (throw_bad_typeid): Likewise.
614 (build_dynamic_cast_1): Likewise.
616 2004-06-22 Richard Henderson <rth@redhat.com>
618 * class.c (build_vfn_ref): Take a pointer not object. Build
620 (cp_fold_obj_type_ref): New.
621 * call.c (build_over_call): Update build_vfn_ref call.
622 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
623 * cp-tree.h (cp_fold_obj_type_ref): Declare.
625 2004-06-21 Jason Merrill <jason@redhat.com>
628 * cp-gimplify.c (cp_gimplify_init_expr): Look through
631 2004-06-21 Mark Mitchell <mark@codesourcery.com>
633 * cp-tree.def (NEW_EXPR): Add a fourth slot.
634 * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
635 (TREE_PARMLIST): Likewise.
636 (CALL_DECLARATOR_PARMS): Likewise.
637 (CALL_DECLARATOR_QUALS): Likewise.
638 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
639 (cp_declarator_kind): New type.
640 (cp_parameter_declarator): Likewise.
641 (cp_declarator): Likewise.
642 (cp_error_declarator): Likewise.
643 (no_parameters): Likewise.
644 (groktypename): Change prototype.
645 (start_decl): Likewise.
646 (start_handler_parms): Likewise.
647 (get_scope_of_declarator): Likewise.
648 (start_function): Likewise.
649 (start_preparsed_function): New function.
650 (start_function): Change prototype.
651 (start_method): Likewise.
652 (grokfield): Likewise.
653 (grokbitfield): Likewise.
654 (build_new): Likewise.
655 (make_pointer_declarator): Remove.
656 (make_reference_declarator): Likewise.
657 (make_call_declarator): Likewise.
658 (set_quals_and_spec): Likewise.
659 (process_template_parm): Change prototype.
660 (begin_function_definition): Remove.
661 (finish_parmlist): Remove.
662 * decl.c (groktypename): Do not use trees to represent
664 (start_decl): Likewise.
665 (start_handler_parms): Remove.
666 (get_scope_of_declarator): Reimplement.
667 (grokdeclarator): Do not use trees to represent declarators.
668 (grokparms): Likewise.
669 (start_function): Likewise.
670 (start_method): Likewise.
671 (build_void_list_mode): Do not use TREE_PARMLIST.
672 * decl.h (grokdeclarator): Change prototype.
673 * decl2.c (grok_method_quals): Robustify.
674 (grok_x_components): Do not use trees to represent declarators.
675 (grokfield): Likewise.
676 (grokbitfield): Likewise.
677 (start_objects): Build FUNCTION_DECLs, not declarators.
678 (start_static_storage_duration_function): Likewise.
679 * init.c (build_new): Simplify.
680 * lex.c (make_pointer_declarator): Remove.
681 (make_reference_declarator): Likewise.
682 (make_call_declarator): Likewise.
683 (set_quals_and_spec): Likewise.
684 * method.c (use_thunk): Use start_preparsed_function.
685 (synthesize_method): Likewise.
686 (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
687 * optimize.c (maybe_clone_body): Use start_preparsed_function.
688 * parser.c (cp_error_declarator): New variable.
689 (declarator_obstack): Likewise.
690 (alloc_declarator): New function.
691 (make_declarator): Likewise.
692 (make_id_declarator): Likewise.
693 (make_pointer_declarator): Likewise.
694 (make_reference_declarator): Likewise.
695 (make_ptrmem_declarator): Likewise.
696 (make_call_declarator): Likewise.
697 (make_array_declarator): Likewise.
698 (no_parameters): New variable.
699 (make_parameter_declarator): Likewise.
700 (cp_parser_check_for_definition_in_return_type): Do not use trees
701 to represent declarators.
702 (cp_parser_translation_unit): Likewise.
703 (cp_parser_new_expression): Likewise.
704 (cp_parser_new_type_id): Likewise.
705 (cp_parser_new_declarator_opt): Likewise.
706 (cp_parser_direct_new_declarator): Likewise.
707 (cp_parser_condition): Likewise.
708 (cp_parser_declaration_statement): Likewise.
709 (cp_parser_declaration): Likewise.
710 (cp_parser_conversion_type_id): Likewise.
711 (cp_parser_conversion_declarator_opt): Likewise.
712 (cp_parser_template_parameter_list): Likewise.
713 (cp_parser_template_parameter): Likewise.
714 (cp_parser_explicit_instantiation): Likewise.
715 (cp_parser_init_declarator): Likewise.
716 (cp_parser_declarator): Likewise.
717 (cp_parser_direct_declarator): Likewise.
718 (cp_parser_type_id): Likewise.
719 (cp_parser_parameter_declaration_clause): Likewise.
720 (cp_parser_parameter_declaration_list): Likewise.
721 (cp_parser_parameter_declaration): Likewise.
722 (cp_parser_member_declaration): Likewise.
723 (cp_parser_exception_declaration): Likewise.
724 (cp_parser_check_declarator_template_parameters): Likewise.
725 (cp_parser_function_definition_from_specifiers_and_declarator):
727 (cp_parser_save_member_function_body): Likewise.
728 * pt.c (process_template_parm): Add is_non_type parameter.
729 (convert_template_argument): Adjust call to groktypename.
730 (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
731 (tsubst): Do not expect declarators.
732 (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
734 (instantiate_decl): Use start_preparsed_function.
735 * semantics.c (begin_function_definition): Remove.
736 (finish_parmlist): Remove.
737 * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
740 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
742 * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
743 (build_new_method_call): Likewise.
744 * decl.c (local_variable_p_walkfn): Don't walk into types.
745 * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
746 (build_anon_union_vars): Add new operand for COMPONENT_REF.
747 * init.c (buld_new): Add new operand for ARRAY_REF.
748 * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
749 (do_build_assign_ref): Likewise.
750 * parser.c (cp_parser_direct_new_declarator): Add new operands
752 (cp_parser_direct_declarator): Likewise.
753 * pt.c (tsubst): Likewise.
754 (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
756 * semantics.c (finish_non_static_data_member): Add new operand
758 * typeck.c (build_class_member_access_expr): Likewise.
759 (build_class_member_access_expr, finish_class_member_access_expr):
761 (build_ptrmemfunc_access_expr): Likewise.
762 (build_array_ref): Add new operands for ARRAY_REF.
763 * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
764 * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
766 2004-06-21 Richard Henderson <rth@redhat.com>
768 * dump.c (cp_dump_tree): Don't use dump_next_stmt.
769 * parser.c (cp_parser_jump_statement): Update commentary.
770 * pt.c (tsubst_expr): Use RETURN_EXPR.
771 * semantics.c (finish_return_stmt): Likewise.
772 (finalize_nrv_r): Likewise.
773 * typeck.c, typeck2.c: Update file start commentary.
775 2004-06-21 Richard Henderson <rth@redhat.com>
777 * semantics.c (finish_expr_stmt): Call verify_sequence_points.
779 2004-06-20 Richard Henderson <rth@redhat.com>
781 * cp-tree.h (add_decl_stmt): Declare.
782 * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
783 * semantics.c (maybe_cleanup_point_expr): New.
784 (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
785 finish_for_expr, finish_switch_cond): Use it.
786 (finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN.
788 2004-06-20 Richard Henderson <rth@redhat.com>
790 * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
791 * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
792 (cp_gimplify_expr): Call it.
793 (gimplify_cleanup_stmt): Move from c-gimplify.c.
794 (cp_genericize): New.
795 * decl.c (finish_function): Call it.
796 * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
797 (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
798 (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
799 (cp_genericize): Declare.
800 * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
801 * dump.c (cp_dump_tree): Likewise.
802 * semantics.c (push_cleanup): Move from c-semantics.c.
804 2004-06-20 Zack Weinberg <zack@codesourcery.com>
806 * cp-lang.c (has_c_linkage): Implement.
808 * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
809 * decl.c (duplicate_decls): Use COPY_DECL_RTL.
810 (builtin_function_1): Don't call make_decl_rtl.
811 (build_cp_library_fn): Don't call set_mangled_name_for_decl.
812 (grokvardecl): Don't call mangle_decl.
813 * except.c (nothrow_libfn_p): Look at DECL_NAME, not
815 * method.c (set_mangled_name_for_decl): Delete.
816 * name-lookup.c (pushdecl): When a local extern shadows a
817 file-scope declaration of the same object, give both DECLs the
819 * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
820 on DECL_ASSEMBLER_NAME.
822 2004-06-19 Richard Henderson <rth@redhat.com>
824 * cp-gimplify.c: Remove unnecessary prototypes.
825 (cp_gimplify_stmt): Merge into ...
826 (cp_gimplify_expr): ... here. Move to end of file. Handle
827 stmts_are_full_exprs_p frobbing.
828 * cp-tree.h (cp_gimplify_stmt): Remove.
829 * pt.c (tsubst_expr): Merge prep_stmt and unify.
830 * tree.c (init_tree): Don't set lang_gimplify_stmt.
832 2004-06-18 Richard Henderson <rth@redhat.com>
835 * semantics.c (begin_cond): New.
836 (finish_cond): Rewrite to handle template DECL_STMTs specially.
837 Assume that non-template decls go land before the conditional.
838 (simplify_loop_decl_cond): Likewise.
839 (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
840 finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
841 begin_switch_stmt, finish_switch_cond): Update to match.
843 2004-06-17 Jason Merrill <jason@redhat.com>
846 * semantics.c (simplify_aggr_init_expr): Don't return the slot.
847 (finish_stmt_expr_expr): Update type after conversions.
848 (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
849 Handle void initializer.
850 * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
852 2004-06-17 Geoffrey Keating <geoffk@apple.com>
854 * class.c (build_clone): Don't call defer_fn, let mark_used do it.
855 * cp-tree.h (defer_fn): Delete.
856 * decl2.c (defer_fn): Delete.
857 (finish_file): Simplify deferred_fns loops; check that
858 only used inline functions get into deferred_fns.
859 (mark_used): Inline previous contents of defer_fn.
861 2004-06-16 Richard Henderson <rth@redhat.com>
863 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
864 (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
865 * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
866 of CTOR_INITIALIZER ...
867 (pp_cxx_statement): ... here.
868 * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
869 (finish_function): Use alloc_stmt_list to zap entire function.
870 * parser.c (cp_parser_compound_statement): Update commentary.
871 * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
872 * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
873 (finish_stmt_expr): Don't look through COMPOUND_STMT.
875 2004-06-16 Geoffrey Keating <geoffk@apple.com>
877 * pt.c (mark_decl_instantiated): Don't call defer_fn.
879 2004-06-16 Richard Henderson <rth@redhat.com>
881 * parser.c (cp_parser_labeled_statement): Update commentary.
882 * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
883 * tree.c (mark_local_for_remap_r): Likewise.
885 2004-06-16 Richard Henderson <rth@redhat.com>
887 * parser.c (cp_parser_asm_definition): Update commentary.
888 * pt.c (tsubst_expr): Use ASM_EXPR.
889 * semantics.c (finish_asm_stmt): Likewise.
891 2004-06-16 Richard Henderson <rth@redhat.com>
893 * decl.c (finish_destructor_body): Use LABEL_EXPR.
894 * parser.c (cp_parser_statement): Update commentary.
895 * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
896 * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
897 * tree.c (mark_local_for_remap_r): Likewise.
899 2004-06-16 Richard Henderson <rth@redhat.com>
902 * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
903 statement in FOR_INIT_STMT for templates.
905 2004-06-15 Richard Henderson <rth@redhat.com>
907 * call.c (initialize_reference): Don't build CLEANUP_STMT here.
908 * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
909 (genericize_try_block): Use gimplify_stmt.
910 (genericize_catch_block, genericize_eh_spec_block): Likewise.
911 (cp_gimplify_init_expr): Remove STMT_EXPR special case.
912 (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
913 * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
914 (cp_tree_chain_matters_p): Remove.
915 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
916 (COMPOUND_STMT_BODY_BLOCK): New.
917 (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
918 (EXPR_STMT_STMT_EXPR_RESULT): New.
919 (building_stmt_tree): Check cur_stmt_list.
920 (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
921 (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
922 * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
923 (cp_finish_decl): Use push_cleanup.
924 (start_function, finish_function): Use statement lists.
925 (finish_stmt): Do nothing.
926 * except.c (begin_eh_spec_block): Use statement lists.
927 (check_handlers_1, check_handlers): Likewise.
928 * init.c (construct_virtual_base): Don't add extra compound stmts.
929 (build_vec_init): Likewise.
930 * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
931 * name-lookup.h (struct cp_binding_level): Add statement_list.
932 * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
933 (cp_parser_labeled_statement, cp_parser_expression_statement,
934 cp_parser_statement_seq_opt): Likewise.
935 (cp_parser_compound_statement): Likewise. Take bool for try block.
936 (cp_parser_selection_statement): Tidy if processing.
937 (cp_parser_already_scoped_statement): Rewrite to do what it says.
938 * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
939 (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST.
940 Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
941 * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
942 (finish_cond): New, rewritten from FINISH_COND.
943 (simplify_loop_decl_cond): New.
944 (finish_expr_stmt): Avoid nested EXPR_STMTs.
945 (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
946 begin_else_clause, finish_else_clause, finish_if_stmt,
947 begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
948 begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
949 finish_for_cond, finish_for_stmt, begin_switch_stmt,
950 finish_switch_cond, finish_switch_stmt, begin_try_block,
951 finish_try_block, finish_cleanup_try_block, finish_function_try_block,
952 finish_handler_sequence, finish_function_handler_sequence,
953 begin_handler, finish_handler_parms, finish_handler,
954 begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
955 using statement lists.
956 (begin_compound_stmt): Replace has_no_scope argument with flags.
957 Update all callers. Use statement lists.
958 (finish_compound_stmt): Likewise.
959 (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
960 (current_scope_stmt_stack): Remove.
961 (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
962 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
963 Rewrite with statement lists.
965 2004-06-15 Alexandre Oliva <aoliva@redhat.com>
967 * parser.c: Change all assignments of c_lex_string_translate
968 to true and false to 1 and 0.
969 (cp_lexer_read_token): Convert type of the translated string.
970 (cp_parser_skip_to_closing_parentheses): Preserve original
971 value of c_lex_string_translate, and set it to -1 while
973 (cp_parser_cache_group): Likewise.
974 (cp_parser_cache_group_1): Renamed.
975 (cp_parser_asm_operand_list): Remove redundant setting of
976 c_lex_string_translate.
977 (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
978 Handle chained strings.
980 2004-06-12 Andrew Pinski <apinski@apple.com>
984 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
986 * cp-tree.h: Fix typo.
988 * cp-tree.h: Include cgraph.h
989 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
990 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
992 2004-06-12 Jason Merrill <jason@redhat.com>
994 PR tree-optimization/14107
995 * decl.c (finish_function): Warn about no return in all functions.
997 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
999 * cp-tree.h (struct language_function): Remove cannot_inline.
1000 * decl.c (save_function_data): cannot_inline is no more.
1001 (cxx_push_function_context): Likewise.
1002 * decl2.c (start_objects, start_static_storage_duration_function):
1003 Reset DECL_INLINE, set DECL_UNINLINABLE.
1005 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1008 * search.c (lookup_field): Propagate the ambiguity list.
1009 (lookup_fnfields): Likewise.
1011 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1014 * parser.c (cp_parser_template_name): Ctors/dtors never need a
1015 template keyword to disambiguate.
1017 2004-06-14 Mark Mitchell <mark@codesourcery.com>
1020 * decl.c (grokdeclarator): Ignore pointer-to-members when
1021 computing template depth.
1024 * name-lookup.c (pushtag): Do not try to put class declarations in
1025 explicit specialization scopes.
1027 2004-06-11 Andrew Pinski <pinskia@physics.uc.edu>
1029 * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
1031 2004-06-11 Mark Mitchell <mark@codesourcery.com>
1034 * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
1035 bindings for undeclared built-ins.
1037 2004-06-11 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1039 * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
1040 appear at the correct location.
1042 2004-06-10 Jason Merrill <jason@redhat.com>
1046 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1047 * init.c (build_offset_ref): Build SCOPE_REF with non-null
1048 TREE_TYPE for non-dependent names.
1049 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
1050 unknown_type_node as its TREE_TYPE.
1051 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
1052 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
1053 (dump_expr) <SCOPE_REF case>: Likewise.
1055 2004-06-10 Mark Mitchell <mark@codesourcery.com>
1058 * parser.c (cp_parser_direct_declarator): Robustify.
1061 * pt.c (tsubst_copy): Use decl_constant_value on enumeration
1062 constants in non-dependent contexts.
1066 * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
1069 2004-06-10 Jakub Jelinek <jakub@redhat.com>
1072 * decl.c (duplicate_decls): Handle fileptr_type_node arguments
1075 2004-06-09 Mark Mitchell <mark@codesourcery.com>
1079 2004-06-07 Mark Mitchell <mark@codesourcery.com>
1080 * lex.c (handle_pragma_interface): Deprecate.
1081 (handle_pragma_implementation): Likewise.
1083 2004-06-09 Andrew Pinski <pinskia@physics.uc.edu>
1085 * g++spec.c (lang_specific_driver): Remove check for -lm
1086 and -lmath when check it see if it was the math library.
1088 2004-06-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1091 * parser.c (cp_parser_direct_declarator): Reject constructor named
1092 as qualified template-id.
1094 2004-06-07 Mark Mitchell <mark@codesourcery.com>
1097 * lex.c (handle_pragma_interface): Deprecate.
1098 (handle_pragma_implementation): Likewise.
1100 2004-06-07 Mark Mitchell <mark@codesourcery.com>
1103 * parser.c (cp_parser_iteration_statement): Fix typo in error
1107 * pt.c (tsubst_default_argument): Do not defer access checks
1108 while substituting into the default argument.
1111 * pt.c (tsubst_copy): Do not try to substitute for an enumeration
1112 constant in a non-dependent context.
1115 * except.c (build_throw): Ensure that temp_expr has been
1118 2004-06-06 Roger Sayle <roger@eyesopen.com>
1120 * cp/cp-tree.h (lvalue_or_else): Add function prototype.
1122 2004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1125 * parser.c (cp_parser_mem_initializer_id): Gracefully reject
1126 'typename', and accept 'template'.
1128 2004-06-03 Andrew Pinski <pinskia@physics.uc.edu>
1129 Jan Hubicka <jh@suse.cz>
1132 * method.c (use_think): Do not mark thunk as referenced.
1134 2004-06-03 Matt Austern <austern@apple.com>
1137 * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
1138 is nonzero, and if we see a noninline definition of a key method,
1139 make the vtables nonweak.
1141 2004-06-02 Matt Austern <austern@apple.com>
1143 * cp-tree.h (instantiate_decl): new boolean parameter,
1144 undefined_ok. Current behavior is equivalent to its being 0.
1145 * decl2.c (mark_used): Add new argument when calling instantiate_decl
1146 * pt.c (mark_decl_instantiated): Unconditionally make
1147 instantiations explicit unconditionally
1148 (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
1149 since mark_decl_instantiated now does it.
1150 (instantiate_class_member): New. Instantiate a member of an
1151 explicitly instantiated class template.
1152 (do_type_instantiation): Explicitly instantiate members of an
1153 explicitly instantiated class template.
1154 (instantiate_decl): if undefined_ok is nonzero, and if we're
1155 trying to explicitly instantiated a template with no definition,
1156 change it to an implicit instantiation.
1157 (instantiate_pending_templates): Add new argument to instantiate_decl.
1158 * tree.c (cp_cannot_inline_tree_fn): Likewise.
1160 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
1162 * cp-tree.h: Fix typo.
1164 * cp-tree.h: Include cgraph.h
1165 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
1166 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
1168 2004-06-01 Jason Merrill <jason@redhat.com>
1171 * call.c (call_builtin_trap): Remove type parm.
1172 (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
1173 (build_x_va_arg): Dereference a null pointer for a non-POD argument.
1175 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1178 * init.c (build_offset_ref): Build SCOPE_REF with non-null
1179 TREE_TYPE for non-dependent names.
1180 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
1181 unknown_type_node as its TREE_TYPE.
1182 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
1183 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
1184 (dump_expr) <SCOPE_REF case>: Likewise.
1186 2004-06-01 Richard Henderson <rth@redhat.com>
1187 Andrew Pinski <pinskia@physics.uc.edu>
1189 * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
1190 * parser.c (struct cp_parser): Remove in_offsetof.
1191 (cp_parser_new): Don't set it.
1192 (cp_parser_unary_expression): Don't check it.
1193 (cp_parser_postfix_open_square_expression): Split out from ...
1194 (cp_parser_postfix_expression): ... here.
1195 (cp_parser_postfix_dot_deref_expression): Likewise.
1196 (cp_parser_builtin_offsetof): New.
1197 (cp_parser_primary_expression): Use it.
1199 2004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1202 * parser.c (cp_parser_postfix_expression): Allow subscript
1203 operator in offsetof.
1205 2004-05-31 Mark Mitchell <mark@codesourcery.com>
1208 * friend.c (add_friend): Do not try to perform access checks for
1209 functions from dependent classes.
1211 2004-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
1213 * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
1214 (pp_cxx_begin_template_argument_list): Turn into a function.
1215 (pp_cxx_end_template_argument_list): Likewise.
1216 (pp_cxx_separate_with): Define.
1217 (pp_cxx_unqualified_id): Tidy.
1218 (pp_cxx_primary_expression): Likewise.
1219 (pp_cxx_postfix_expression): Likewise.
1220 (pp_cxx_expression): Likewise.
1221 (pp_cxx_simple_type_specifier): Likewise.
1222 (pp_cxx_type_specifier_seq): Likewise.
1223 (pp_cxx_parameter_declaration_clause): Likewise.
1224 (pp_cxx_exception_specification): Likewise.
1225 (pp_cxx_direct_declarator): Likewise.
1226 (pp_cxx_type_id): Likewise.
1227 * cxx-pretty-print.h (pp_cxx_whitespace): Export from
1229 (pp_cxx_left_paren): Likewise.
1230 (pp_cxx_right_paren): Likewise.
1231 (pp_cxx_left_brace): Likewise.
1232 (pp_cxx_right_brace): Likewise.
1233 (pp_cxx_left_bracket): Likewise.
1234 (pp_cxx_right_bracket): Likewise.
1235 (pp_cxx_dot): Likewise.
1236 (pp_cxx_identifier): Likewise.
1237 (pp_cxx_tree_identifier): Likewise.
1238 (pp_cxx_ampersand): New macro.
1239 (pp_cxx_star): Likewise.
1240 (pp_cxx_arrow): Likewise.
1241 (pp_cxx_semicolon): Likewise.
1242 (pp_cxx_complement): Likewise.
1243 (pp_cxx_begin_template_argument_list): Declaree.
1244 (pp_cxx_end_template_argument_list): Likewise.
1245 (pp_cxx_colon_colon): likewise.
1247 2004-05-31 Eric Botcazou <ebotcazou@libertysurf.fr>
1249 * parser.c (cp_parser_simple_type_specifier): Explicitly test
1252 2004-05-31 Kazu Hirata <kazu@cs.umass.edu>
1254 * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
1255 typeck.c: Fix comment formatting.
1257 2004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
1259 * cp-lang.c (cp_expand_decl): Remove.
1260 (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
1262 2004-05-30 Andreas Jaeger <aj@suse.de>
1264 * lang-specs.h: Add missing initializers for .ii.
1266 2004-05-28 Aldy Hernandez <aldyh@redhat.com>
1268 * decl.c (cp_make_fname_decl): Free return value from
1271 2004-05-28 Mark Mitchell <mark@codesourcery.com>
1274 * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
1276 * init.c (build_new): Likewise.
1279 * name-lookup.c (arg_assoc): Robustify.
1282 * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
1283 when determining the scope to use for a pointer to member.
1284 (lookup_anon_field): Give it external linkage.
1285 * cp-tree.h (lookup_anon_field): Declare it.
1286 * expr.c (cplus_expand_constant): Use it.
1288 2004-05-28 Mark Mitchell <mark@codesourcery.com>
1291 * parser.c (cp_parser_simple_type_specifier): Call
1292 maybe_note_name_used_in_class.
1294 2004-05-28 Tom Marshall <tmarshall@real.com>
1297 * class.c (finish_struct_1): Warn only if the dtor is non-private or
1298 the class has friends.
1300 2004-05-27 Adam Nemet <anemet@lnxw.com>
1303 * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
1304 TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
1306 2004-05-24 Geoffrey Keating <geoffk@apple.com>
1308 * method.c (implicitly_declare_fn): Don't call defer_fn; abort
1309 if it might be needed.
1310 * pt.c (mark_decl_instantiated): Only call defer_fn if
1311 the function actually needs processing in finish_file.
1312 * decl2.c (finish_file): Add check that elements in
1313 deferred_fns_used are really needed there. Remove unnecessary
1314 test of DECL_SAVED_TREE.
1316 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
1318 * Make-lang.in: No need to specify $(LIBCPP).
1320 2004-05-23 Mark Mitchell <mark@codesourcery.com>
1323 * parser.c (cp_parser_class_head): Robustify.
1326 * parser.c (cp_parser_decl_specifier_seq): Correct error in
1328 (cp_parser_constructor_declarator_p): Treat attributes
1332 * typeck.c (build_unary_op): Do not attempt to resolve casts to
1333 base classes in templates.
1335 2004-05-23 Mark Mitchell <mark@codesourcery.com>
1338 * pt.c (instantiate_template): Robustify.
1340 2004-05-23 Mark Mitchell <mark@codesourcery.com>
1343 * decl.c (xref_tag): Issue errors about redeclaring template
1344 classes as non-template classes.
1346 2004-05-23 Mark Mitchell <mark@codesourcery.com>
1349 * name-lookup.c (supplement_binding): Allow redefinitions of
1353 * parser.c (cp_parser_template_argument): Robustify.
1355 2004-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
1357 * class.c (alter_access): Use %E format specifier to print an
1358 identifier node. Avoid looking at the IDENTIFIER_POINTER.
1359 (push_lang_context): Likewise.
1360 * decl.c (lookup_label): Likewise.
1361 (grokdeclarator): Likewise.
1362 * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
1363 * pt.c (do_type_instantiation): Likewise.
1364 * tree.c (handle_java_interface_attribute): Likewise.
1365 (handle_com_interface_attribute): Likewise.
1366 (handle_init_priority_attribute): Likewise.
1368 2004-05-22 Mark Mitchell <mark@codesourcery.com>
1372 * pt.c (build_non_dependent_expr): Expand the set of tree nodes
1373 recognized as overloaded functions.
1375 2004-05-22 Mark Mitchell <mark@codesourcery.com>
1378 * class.c (layout_nonempty_base_or_field): Do not try to avoid
1379 layout conflicts for unions.
1382 * typeck.c (build_x_unary_op): Instantiate template class
1383 specializations before looking for "operator &".
1386 * typeck.c (complete_type): Layout non-dependent array types, even
1390 * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
1393 2004-05-22 Roger Sayle <roger@eyesopen.com>
1395 * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
1396 returning when TREE_TYPE is error_mark_node.
1397 * typeck.c (require_complete_type): Return error_mark_node if
1398 value's type is an error_mark_node.
1400 2004-05-20 Andrew Pinski <pinskia@physics.uc.edu>
1402 * optimize.c (calls_setjmp_r): Remove.
1403 (calls_setjmp_p): Remove.
1404 * cp-tree.c (calls_setjmp_p): Remove.
1405 * decl.c (finish_function): Do not call calls_setjmp_p.
1407 2004-05-18 Zack Weinberg <zack@codesourcery.com>
1409 * decl.c (cp_finish_decl): Use mark_decl_referenced.
1410 * decl2.c (maybe_make_one_only): Likewise.
1411 * method.c (use_thunk): Likewise.
1413 2004-05-18 Jason Merrill <jason@redhat.com>
1415 * class.c (build_base_path): Tidy a bit.
1417 2004-05-14 Geoffrey Keating <geoffk@apple.com>
1419 * name-lookup.c (struct scope_binding): New.
1420 (EMPTY_SCOPE_BINDING): New.
1421 (lookup_using_namespace): Take a scope_binding instead of a
1423 (qualified_lookup_using_namespace): Likewise.
1424 (cxx_binding_clear): Delete.
1425 (do_nonmember_using_decl): Use a scope_binding instead of a
1427 (lookup_tag): Don't call select_decl.
1428 (ambiguous_decl): Don't return anything (and change callers to match).
1429 Take a scope_binding as the second parameter.
1430 (lookup_namespace_name): Use a scope_binding instead of a
1432 (unqualified_namespace_lookup): Likewise.
1433 (lookup_qualified_name): Likewise.
1434 (select_decl): Take a scope_binding instead of a cxx_binding.
1435 Use macros rather than hand-coding tests for type-ness.
1437 2004-05-13 Diego Novillo <dnovillo@redhat.com>
1439 * cp-gimplify.c: Rename from cp-simplify.c.
1440 * Make-lang.in, optimize.c: Update.
1442 2004-05-13 Diego Novillo <dnovillo@redhat.com>
1444 Merge from tree-ssa-20020619-branch. See
1445 ChangeLog.tree-ssa for details.
1447 * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
1448 cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
1449 expr.c, init.c, name-lookup.h, optimize.c, parser.c,
1450 pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
1452 * cp-mudflap.c: New file.
1453 * cp-simplify.c:: New file.
1455 2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1458 * decl2.c (check_classfn): For member templates, compare also the
1459 template parameters to match the declaration.
1460 * cp-tree.h: Adjust declaration of check_classfn.
1461 * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
1462 * friend.c (do_friend): Likewise.
1463 * pt.c (tsubst_friend_function): Likewise.
1465 2004-05-01 Zack Weinberg <zack@codesourcery.com>
1467 * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
1468 Instead, dig into the representation type to find the array bound.
1470 2004-04-30 Jason Merrill <jason@redhat.com>
1472 Refer to base members using COMPONENT_REFs where possible.
1473 * class.c (build_simple_base_path): New fn.
1474 (build_base_path): Use it for non-virtual base references.
1475 (layout_class_type): Change base fields to their real type
1476 after layout is done.
1477 * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
1478 * cp-lang.c (cxx_get_alias_set): Use it.
1480 2004-04-30 Kazu Hirata <kazu@cs.umass.edu>
1482 * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
1485 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1488 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
1489 used in integral constant expressions.
1491 2004-04-22 Mark Mitchell <mark@codesourcery.com>
1493 * init.c (build_aggr_init): Fix accidental use of C99 construct in
1496 * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
1498 * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
1499 * decl.c (reshape_init): Use it.
1500 * init.c (perform_member_init): Remove redundant condition.
1501 (build_aggr_init): Adjust to handle brace-enclosed initializers
1503 (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
1505 * parser.c (cp_parser_initializer_clause): Do not set
1506 TREE_HAS_CONSTRUCTOR on the initializer.
1507 * rtti.c (tinfo_base_init): Likewise.
1508 (generic_initializer): Likewise.
1509 (ptr_initializer): Likewise.
1510 (ptm_initializer): Likewise.
1511 (class_initializer): Likewise.
1512 (get_pseudo_ti_init): Likewise.
1513 * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
1515 2004-04-22 Alan Modra <amodra@bigpond.net.au>
1517 * name-lookup.c (anonymous_namespace_name): Make static.
1519 2004-04-19 Roger Sayle <roger@eyesopen.com>
1522 * class.c (build_base_path): Call fold whilst building the NULL
1523 pointer check expression trees.
1525 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
1527 * init.c (build_new_1): Don't use type size argument for Java
1528 _Jv_AllocObject call.
1530 2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
1532 * method.c (make_alias_for_thunk): Remove preprocessor guard on
1533 declaration and definition.
1535 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
1538 * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
1539 than ASM_OUTPUT_DEF.
1541 2004-04-08 Jakub Jelinek <jakub@redhat.com>
1543 * decl2.c (mark_used): Don't segfault if cfun != NULL but
1544 current_function_decl == NULL.
1546 2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
1549 * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
1552 2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1554 * init.c (decl_constant_value): Don't look at DECL_INITIAL
1556 * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
1557 or TREE_SIDE_EFFECTS of a type.
1559 2004-04-02 Nathan Sidwell <nathan@codesourcery.com>
1562 * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
1563 cv-qualifier unification.
1564 * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
1566 2004-04-02 Jan Hubicka <jh@suse.cz>
1568 * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
1569 * cp-tree.h (cp_update_decl_after_saving): Declare.
1570 * tree.c (cp_update_decl_after_saving): Define.
1572 2004-04-01 Mark Mitchell <mark@codesourcery.com>
1575 * typeck.c (get_delta_difference): Call fold before returning the
1578 2004-04-01 Richard Henderson <rth@redhat.com>
1581 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
1582 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
1584 2004-04-01 Mark Mitchell <mark@codesourcery.com>
1587 * name-lookup.c (maybe_push_cleanup_level): Robustify.
1589 2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1591 * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
1593 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1595 * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
1596 * class.c (check_bitfield_decl): Likewise.
1597 * cvt.c (type_promotes_to): Likewise.
1598 * decl.c (finish_enum): Likewise.
1599 * mangle.c (write_builtin_type): Likewise.
1600 * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
1601 * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
1602 (build_binary_op): Likewise.
1604 2004-03-31 Jan Hubicka <jh@suse.cz>
1606 * tree.h (optimize_function): Kill prototype.
1607 * optimize.c (dump_function, optimize_function, dump_finction): Kill.
1608 * semantics.c (expand_body): Kill.
1610 2004-03-30 Mark Mitchell <mark@codesourcery.com>
1613 * decl.c (start_decl_1): Do not decide whether or not to create a
1614 new cleanup level until after the type has been completed.
1617 * pt.c (tsubst_default_argument): Clear current_function_decl.
1619 2004-03-30 Zack Weinberg <zack@codesourcery.com>
1621 * name-lookup.c, parser.c: Use new shorter form of GTY markers.
1623 2004-03-29 Zack Weinberg <zack@codesourcery.com>
1625 * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
1626 is null, just print the literal name and return.
1628 2004-03-25 Kazu Hirata <kazu@cs.umass.edu>
1630 * cxx-pretty-print.c: Fix comment typos.
1632 2004-03-24 Kazu Hirata <kazu@cs.umass.edu>
1634 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
1637 2004-03-23 Ziemowit Laski <zlaski@apple.com>
1639 * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
1640 * mangle.c (write_type): Add call to 'mangle_fundamental_type'
1643 2004-03-23 Zack Weinberg <zack@codesourcery.com>
1645 PR 12267, 12391, 12560, 13129, 14114, 14133
1646 * cp-lang.c (c_reset_state): Delete.
1647 (push_file_scope, pop_file_scope): New stubs.
1648 * parser.c (c_parse_file): Call sorry() here if called more than once.
1650 2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1652 * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
1655 2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
1657 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
1659 2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
1661 * error.c (enum pad): Remove.
1662 (dump_qualifiers): Likewise.
1663 (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
1664 (dump_aggr_type): Likewise.
1665 (dump_type_suffix): Likewise.
1666 (dump_simple_decl): Likewise.
1667 (dump_function_decl): Likewise.
1668 (cv_to_string): Likewise.
1669 (dump_type_prefix): Likewise. Adjust return void.
1670 * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
1672 (pp_cxx_template_keyword_if_needed): Document.
1673 (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
1674 (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
1675 MUST_NOT_THROW_EXPR.
1677 2004-03-21 Mark Mitchell <mark@codesourcery.com>
1680 * decl.c (cp_finish_decl): Compute the size of arrays declared in
1681 templates, if their type is non-dependent.
1683 2004-03-19 Mark Mitchell <mark@codesourcery.com>
1685 * call.c (build_op_delete_call): Do not forget the placement
1686 arguments when iterating through mutiple delete operators.
1688 * cp-tree.h (svaed_scope): Remove last_parms.
1689 (NEW_DELETE_OPNAME_P): New macro.
1690 (last_function_parms): Remove.
1691 (do_friend): Adjust prototype.
1692 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
1693 using last_function_parms.
1694 (grokfndecl): Take the PARM_DECLs as an argument, rather than
1695 using last_function_parms.
1696 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
1697 for class-specific operator new and operator delete.
1698 (grok_op_properties): Do not look for allocation functions with
1700 (start_function): Use DECL_ARGUMENTS instead of
1701 last_function_parms.
1702 * decl.h (last_function_parms): Do not declare.
1703 * decl2.c (grokclassfn): Do not use last_function_parms.
1704 * friend.c (do_friend): Remove parmdecls parameter.
1705 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
1706 (pop_from_top_level): Do not restore it.
1707 * pt.c (check_explicit_specialization): Do not adjust
1708 last_function_parms.
1710 * name-lookup.c (do_local_using_decl): Create a local binding for
1711 types brought in via using declarations.
1713 * name-lookup.c (lookup_arg_dependent): Handle block-scope
1714 function declarations correctly.
1716 * semantics.c (finish_id_expression): Correct handling of
1717 conversion operators to dependent types.
1719 * typeck.c (lookup_destructor): Allow the use of destructors from
1722 2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1724 * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
1725 TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
1726 * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
1727 the field is named TEMPLATE_TYPE_PARM_INDEX.
1729 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1732 * parser.c (cp_parser_functional_cast): A cast to anything
1733 but integral or enumaration type is not an integral constant
1735 * pt.c (value_dependent_expression_p): Handle cast expressions
1736 without operands (such as "int()").
1738 2004-03-18 Mark Mitchell <mark@codesourcery.com>
1740 * semantics.c (finish_pseudo_destructor_expr): Allow differing
1741 cv-qualification between the type named by the
1742 pseudo-destructor-name and the object-type.
1744 * search.c (accessible_base_p): Handle non-proper bases.
1746 * name-lookup.c (do_nonmember_using_decl): If a using declaration
1747 refers to a single overloaded function, set the type of the
1749 * tree.c (lvalue_type): Simplify.
1750 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
1752 (build_unary_op): Handle OVERLOADs with known types.
1754 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
1757 * parser.c (cp_parser_postfix_expression): Handle the use of
1758 "typename" in non-dependent contexts. Convert appropriately when
1759 when using a qualified name after "->" or ".".
1761 * call.c (conditional_conversion): Honor the requirement that some
1762 conversions refer to the original object.
1764 2004-03-18 Mark Mitchell <mark@codesourcery.com>
1766 * call.c (build_conditional_expr): Do not call force_rvalue for
1767 operands of void_type when the conditional expression itself has
1769 * name-lookup.c (pushdecl): Don't consider a declaration of a
1770 function named "main" to be an overload of a type named "main".
1771 * parser.c (cp_parser_template_name): Perform name lookup when the
1772 template name is proceeded by "template" if the qualifying scope
1774 * typeck.c (composite_pointer_type_r): Correctly handle
1775 pointer-to-member types.
1776 (build_const_cast): Likewise.
1778 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1780 * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
1781 * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
1782 (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
1783 (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
1784 (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
1785 (TYPEOF_TYPE_EXPR): New macro.
1786 * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
1787 * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
1788 * pt.c (tsubst): Likewise.
1789 * semantics.c (finish_typeof): Likewise.
1790 * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
1791 and TEMPLATE_TYPE_PARM.
1792 * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
1793 (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
1795 2004-03-16 Mark Mitchell <mark@codesourcery.com>
1798 * cp-tree.h (build_new_op): Change prototype.
1799 (build_x_binary_op): Likewise.
1800 * call.c (build_new_op): Add overloaded_p parameter.
1801 * decl2.c (grok_array_decl): Adjust call to build_new_op.
1802 * parser.c (cp_parser_binary_expression): Note that uses of
1803 overloaded operators prevents an expression from being considered
1804 an integral constant.
1805 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
1807 * semantics.c (finish_call_expr): Likewise.
1808 * typeck.c (rationalize_conditional_expr): Likewise.
1809 (build_x_indirect_ref): Likewise.
1810 (build_x_binary_op): Likewise.
1811 (build_x_unary_op): Likewise.
1812 (build_x_compound_expr): Likewise.
1813 (build_modify_expr): Likewise.
1814 * typeck2.c (build_x_arrow): Likewise.
1816 2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
1818 * cp-lang.c, ptree.c: Update copyright.
1820 2004-03-13 Mark Mitchell <mark@codesourcery.com>
1823 * parser.c (cp_parser_non_integral_constant_expression): Encode
1824 more of the idiom that surrounded calls to this function within
1826 (cp_parser_primary_expression): Adjust accordingly.
1827 (cp_parser_postfix_expression): Likewise.
1828 (cp_parser_unary_expression): Likewise.
1829 (cp_parser_cast_expression): Likewise.
1830 (cp_parser_assignment_expression): Likewise.
1831 (cp_parser_expression): Likewise.
1832 (cp_parser_new_expression): Note that new-expressions are not
1833 allowed in integral constant expressions.
1834 (cp_parser_delete_expression): Likewise.
1836 2004-03-12 Matt Austern <austern@apple.com>
1838 * decl2.c (maybe_make_one_only): Look at
1839 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
1840 to make an explicit instantiation weak.
1841 * method.c (use_thunk): Make sure we call comdat_linkage
1843 * pt.c (do_type_instantiation): On systems where weak symbols
1844 don't go in a static archive's TOC, explicit instantiation of a
1845 class must imply *explicit* instantiation of its memeber.
1847 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
1849 * call.c, cp-tree.h, pt.c: Fix comment typos.
1851 2004-03-10 Mark Mitchell <mark@codesourcery.com>
1854 * decl.c (xref_tag): Disregard non-type declarations when
1855 looking up a tagged type.
1857 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
1860 * call.c (convert_like_real): Build a const qualified temporary,
1861 when testing ctor access.
1863 2004-03-09 Mark Mitchell <mark@codesourcery.com>
1865 * call.c (initialize_reference): Fix typo.
1867 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1870 * pt.c (determine_specialization): For member templates, match also
1874 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
1876 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
1878 2004-03-09 Mark Mitchell <mark@codesourcery.com>
1881 * call.c (initialize_reference): Handle initializers that are
1882 class-member access expressions applies to rvalues.
1884 2004-03-09 Mark Mitchell <mark@codesourcery.com>
1887 * name-lookup.c (supplement_binding): Ignore functions that are
1888 marked DECL_ANTICIPATED.
1890 2004-03-08 Mark Mitchell <mark@codesourcery.com>
1893 * class.c (check_field_decls): Complain about non-static data
1894 members of reference type in unions. Propagate
1895 CLASSTYPE_REF_FIELDS_NEED_INIT and
1896 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
1898 * init.c (perform_member_init): Complain about mbmers with const
1899 type that are not explicitly initialized.
1901 2004-03-08 Mark Mitchell <mark@codesourcery.com>
1903 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
1904 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
1905 (lang_identifier): Remove implicit_decl and error_locus.
1906 (IDENTIFIER_IMPLICIT_DECL): Remove.
1907 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
1908 (IDENTIFIER_ERROR_LOCUS): Likewise.
1909 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
1910 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
1911 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
1912 (implicitly_declare): Remove.
1913 * decl.c (warn_extern_redeclared_static): Remove check of
1914 IDENTIFIER_IMPLICIT_DECL.
1915 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
1916 (implicitly_declare): Remove.
1917 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
1918 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
1919 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
1920 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
1921 in the innermost scope, rather than at namespace scope.
1922 * name-lookup.c (push_local_binding): Give it external linkage.
1923 (pushdecl): Remove dead code.
1924 * name-lookup.h (push_local_binding): Declare it.
1925 * ptree.c (cxx_print_identifier): Don't print
1926 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
1927 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
1928 not IDENTIFIER_ERROR_LOCUS.
1929 * typeck.c (build_function_call): Remove dead code.
1931 2004-03-08 Jason Merrill <jason@redhat.com>
1934 * decl.c (xref_tag): Remove attribute handling.
1935 * cp-tree.h: Adjust prototype.
1936 * decl.c, parser.c, rtti.c: Adjust callers.
1937 * parser.c (cp_parser_class_head): Pass back attributes in the
1939 (cp_parser_class_specifier): Adjust.
1941 2004-03-08 Matt Austern <austern@apple.com>
1944 * name-lookup.c (add_decl_to_level): Add extern variables, as well
1945 as static, to static_decls array.
1947 2004-03-05 Jason Merrill <jason@redhat.com>
1949 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
1951 2004-03-04 Geoffrey Keating <geoffk@apple.com>
1953 * decl.c (grokfndecl): Update old incorrect comment.
1954 (grokvardecl): Diagnose C++ variables of type with no linkage.
1956 2004-03-01 Mark Mitchell <mark@codesourcery.com>
1959 * pt.c (build_non_dependent_expr): Do not create a
1960 NON_DEPENDENT_EXPR for a THROW_EXPR.
1962 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
1965 * error.c (dump_expr): Handle THROW_EXPR.
1967 2004-03-01 Mark Mitchell <mark@codesourcery.com>
1970 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
1971 lookup if ordinary name-lookup finds a non-function.
1972 * pt.c (tsubst_copy_and_build): Likewise.
1975 * parser.c (cp_parser_late_parsing_default_args): Check that there
1976 are no extra tokens after the end of the default-argument
1979 2004-03-01 Mark Mitchell <mark@codesourcery.com>
1982 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
1983 having C++ linkage for name-mangling purposes.
1986 * parser.c (cp_parser_direct_declarator): Recognize constructor
1987 declarators that use a template-id to name the class being
1991 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
1992 (tsubst_expr): Do not call tsubst_copy, even when
1993 processing_template_decl.
1995 2004-03-01 Jeff Law <law@redhat.com>
1997 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
2000 2004-02-29 Mark Mitchell <mark@codesourcery.com>
2003 * name-lookup.h (push_scope): Change prototype.
2004 * name-lookup.c (push_scope): Do not reenter the current class
2006 * decl.c (grokfndecl): Check return code from push_scope before
2008 * decl2.c (check_classfn): Likewise.
2009 * parser.c (cp_parser_conversion_function_id): Likewise.
2010 (cp_parser_init_declarator): Likewise.
2011 (cp_parser_direct_declarator): Likewise.
2012 (cp_parser_class_specifier): Likewise.
2013 (cp_parser_class_head): Likewise.
2014 (cp_parser_lookup_name): Likewise.
2015 (cp_parser_constructor_declarator_p): Likewise.
2016 * pt.c (instantiate_class_template): Likewise.
2017 (resolve_typename_type): Likewise.
2019 2004-02-29 Mark Mitchell <mark@codesourcery.com>
2022 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
2026 * class.c (update_vtable_entry_for_fn): Do not go through
2027 covariance machinery if the type returned by an overrider is the
2028 same as the original.
2030 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
2032 * call.c: Fix a comment typo.
2034 2004-02-27 Ziemowit Laski <zlaski@apple.com>
2036 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
2038 2004-02-26 Mark Mitchell <mark@codesourcery.com>
2041 * parser.c (cp_parser_parameter_declaration_list): Commit
2042 to fewer tentative parses.
2044 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2047 * pt.c (dependent_type_p_r): A template template parameter is a
2050 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2053 * mangle.c (write_template_arg_literal): Don't rely on identity for
2056 2004-02-24 Jason Merrill <jason@redhat.com>
2058 * tree.c (build_exception_variant): Use check_qualified_type.
2060 2004-02-23 Zack Weinberg <zack@codesourcery.com>
2061 Kazu Hirata <kazu@cs.umass.edu>
2063 * decl.c (cxx_init_decl_processing): Don't check
2064 flag_writable_strings.
2066 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
2069 * typeck.c (maybe_warn_about_returning_address_of_location):
2070 Change check for VAR_DECL to use DECL_P instead.
2072 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2075 * cvt.c (build_expr_type_conversion): Type must be complete before
2076 looking up for conversions.
2078 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2081 * name-lookup.c (arg_assoc_class): Don't look into template
2082 arguments if it is not a primary template.
2084 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
2087 * method.c (use_thunk): Always clone function argument tree.
2089 2004-02-20 Mark Mitchell <mark@codesourcery.com>
2092 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
2095 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
2096 for all type variants.
2098 2004-02-19 Mark Mitchell <mark@codesourcery.com>
2101 * decl.c (duplicate_decls): Return error_mark_node for invalid
2103 * name-lookup.c (push_namespace): Ignore the return value from
2105 * pt.c (push_template_decl_real): Robustify.
2108 * name-lookup.c (push_class_level_binding): Do not complain about
2109 adding a binding for a member whose name is the same as the
2110 enclosing class if the member is located in a base class of the
2113 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2116 * parser.c (cp_parser_new_expression): Parse an ill-formed
2117 direct-new-declarator after a parenthesized type-id to emit good
2120 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
2122 * cp-tree.def, cvt.c: Update copyright.
2124 2004-02-17 Mark Mitchell <mark@codesourcery.com>
2127 * cp-tree.h (abi_version_at_least): Remove.
2128 * mangle.c: Include flags.h.
2130 2004-02-15 Mark Mitchell <mark@codesourcery.com>
2133 * call.c (build_conditional_expr): Handle conversions between
2134 class types which result in differently cv-qualified type
2138 * class.c (delete_duplicate_fields_1): Remove.
2139 (delete_duplicate_fields): Likewise.
2140 (finish_struct_anon): Remove check for members with the same name
2141 as their enclosing class.
2142 (check_field_decls): Do not call duplicate_fields.
2143 * decl.c (grokdeclarator): Remove check for static data members
2144 with the same name as their enclosing class.
2145 * name-lookup.c (push_class_level_binding): Check for members with
2146 the same name as their enclosing class.
2148 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
2151 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
2153 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2156 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
2157 has full set of arguments.
2159 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2162 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
2164 2004-02-13 Mark Mitchell <mark@codesourcery.com>
2167 * cp-tree.h (delete_sanity): Change prototype.
2168 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
2169 Remove dead code. Adjust code to warn about deleting an array.
2170 * typekc.c (decay_conversion): Use build_address and build_nop.
2173 * search.c (accessible_p): Do not check access in thunks.
2176 * call.c (build_conditional_expr): Call force_rvalue on the
2177 non-void operand in the case that one result is a throw-expression
2178 and the other is not.
2180 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
2183 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
2184 the type name and look ahead for ::~, and bail out early with a
2185 better error message if the parse is going to fail.
2187 2004-02-12 Mark Mitchell <mark@codesourcery.com>
2189 * call.c (conversion_kind): New type.
2190 (conversion_rank): Likewise.
2191 (conversion): Likewise.
2192 (CONVERSION_RANK): New macro.
2193 (conversion_obstack): New variable.
2194 (obstack_initialized): Likewise.
2195 (z_candidate): Change type of convs and second_conv.
2196 (candidate_warning): New type.
2197 (IDENTITY_RANK): Remove.
2198 (EXACT_RANK): Likewise.
2199 (PROMO_RANK): Likewise.
2200 (STD_RANK): Likewise.
2201 (PBOOL_RANK): Likewise.
2202 (USER_RANK): Likewise.
2203 (ELLIPSIS_RANK): Likewise.
2204 (BAD_RANK): Likewise.
2205 (ICS_RANK): Likewise.
2206 (ICS_STD_RANK): Likewise.
2207 (ICS_USER_FLAG): Likewise.
2208 (ICS_ELLIPSIS_FLAG): Likewise.
2209 (ICS_THIS_FLAG): Likewise.
2210 (ICS_BAD_FLAG): Likewise.
2211 (NEED_TEMPORARY_P): Likewise.
2212 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
2213 (USER_CONV_CAND): Likewise.
2214 (USER_CONV_FN): Likewise.
2215 (conversion_obstack_alloc): New function.
2216 (alloc_conversion): Likewise.
2217 (validate_conversion_obstack): Likewise.
2218 (alloc_conversions): Likewise.
2219 (build_conv): Adjust to deal with new conversion data structures.
2220 (build_identity_conv): New function.
2221 (build_ambiguous_conv): Likewise.
2222 (standard_conversion): Adjust to deal with new conversion data
2224 (convert_class_to_reference): Likewise.
2225 (direct_reference_binding): Likewise.
2226 (reference_binding): Likewise.
2227 (implicit_conversion): Likewise.
2228 (add_candidate): Likewise.
2229 (add_function_candidate): Likewise.
2230 (add_conv_candidate): Likewise.
2231 (build_builtin_candidate): Likewise.
2232 (print_z_candidate): Likewise.
2233 (merge_conversion_sequences): Likewise.
2234 (build_user_type_conversion_1): Likewise.
2235 (build_user_type_conversion): Likewise.
2236 (build_new_function_call): Likewise.
2237 (build_object_call): Likewise.
2238 (conditional_conversion): Likewise.
2239 (build_conditional_expr): Likewise.
2240 (build_new_op): Likewise.
2241 (build_op_delete_call): Likewise.
2242 (convert_like_real): Likewise.
2243 (build_over_call): Likewise.
2244 (build_new_method_call): Likewise.
2245 (is_subseq): Likewise.
2246 (maybe_handle_implicit_object): Likewise.
2247 (maybe_handle_ref_bind): Likewise.
2248 (compare_ics): Likewise.
2249 (source_type): Likewise.
2250 (add_warning): Likewise.
2252 (can_convert_arg): Likewise.
2253 (can_convert_arg_bad): Likewise.
2254 (perform_implicit_conversion): Likewise.
2255 (perform_direct_initialization_if_possible): Likewise.
2256 (initialize_reference): Likewise.
2257 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
2258 * cp-tree.def (WRAPPER): Likewise.
2259 (IDENTITY_CONV): Remove.
2260 (LVALUE_CONV): Likewise.
2261 (QUAL_CONV): Likewise.
2262 (STD_CONV): Likewise.
2263 (PTR_CONV): Likewise.
2264 (PMEM_CONV): Likewise.
2265 (BASE_CONV): Likewise.
2266 (REF_BIND): Likewise.
2267 (USER_CONV): Likewise.
2268 (AMBIG_CONV): Likewise.
2269 (RVALUE_CONV): Likewise.
2270 * cp-tree.h (tree_wrapper): Remove.
2271 (WRAPPER_ZC): Remove.
2272 (lang_tree_node): Remove wrapper.
2273 (LOOKUP_SPECULATIVELY): Remove.
2274 (build_op_delete_call): Adjust prototype.
2275 (validate_conversion_obstack): Declare.
2276 (build_zc_wrapper): Remove.
2277 * cvt.c (convert_to_reference): Remove dead code.
2278 (ocp_convert): Likewise.
2279 * decl.c (redeclaration_error_message): Correct handling of
2281 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
2282 (cp_tree_node_structure): Remove WRAPPER case.
2283 * decl2.c (finish_file): Call validate_conversion_obstack.
2284 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
2285 (build_op_delete_call): Likewise.
2286 (build_x_delete): Likewise.
2287 (build_delete): Adjust call to build_op_delete_call.
2288 * pt.c (tsubst_friend_declaration): Adjust code to determine
2289 whether or not a friend template is a definition.
2290 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
2291 * tree.c (build_zc_wrapper): Remove.
2293 2004-02-12 Zack Weinberg <zack@codesourcery.com>
2295 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
2296 * cp-tree.h: Don't declare cxx_builtin_type_decls.
2297 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
2298 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
2300 2004-02-10 Mark Mitchell <mark@codesourcery.com>
2302 * typeck.c (lookup_destructor): Fix typo in error message.
2304 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
2306 * call.c, parser.c, tree.c: Fix comment typos.
2308 2004-02-07 Zack Weinberg <zack@codesourcery.com>
2311 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
2312 * decl.c (duplicate_decls, start_function): Likewise.
2314 2004-02-07 Zack Weinberg <zack@codesourcery.com>
2316 * name-lookup.c (pushdecl): Issue shadow warnings directly.
2317 * parser.c (free_parser_stacks): Delete.
2319 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
2321 * rtti.c: Update copyright.
2323 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2326 * decl.c (require_complete_types_for_parms): Do not insert
2327 error_mark_node in the parameter list.
2329 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2332 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
2333 error when terminator can not be found.
2335 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
2337 Make-lang.in (po-generated): Delete.
2339 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
2341 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
2342 targetm.calls.promote_prototypes.
2344 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
2348 2004-01-15 Geoffrey Keating <geoffk@apple.com>
2350 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
2351 (handle_pragma_implementation): Likewise.
2353 2004-02-05 Mark Mitchell <mark@codesourcery.com>
2356 * typeck.c (lookup_destructor): Tweak error message.
2358 2004-02-05 Jan Hubicka <jh@suse.cz>
2360 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
2363 2004-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2366 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
2367 code, only emits the diagnostic now. Added lookup of the identifier
2368 and support for qualified ids.
2369 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
2370 Parse an (invalid) type name as id-expression within a declarator.
2371 (cp_parser_simple_declaration): Use it.
2372 (cp_parser_member_declaration): Likewise.
2373 (cp_parser_make_typename_type): New function. Handle errors through
2374 cp_parser_diagnose_invalid_typename.
2375 (cp_parser_elaborated_type_specifier): Use it.
2377 2004-02-04 Mark Mitchell <mark@codesourcery.com>
2380 * call.c (convert_like_real): Use "converting" rather than
2381 "argument" as the descriptive keyword to
2382 dubious_conversion_warnings.
2383 * typeck.c (convert_for_assignment): Do not call
2384 dubious_conversion_warnings.
2386 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2389 * init.c (build_delete): Emit a more informative error message in
2390 case of an incomplete type, and on the correct source line.
2392 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
2394 * error.c, search.c: Update copyright.
2396 2004-02-04 Mark Mitchell <mark@codesourcery.com>
2399 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
2400 linkage for the typeinfo name string.
2402 2004-02-04 Mark Mitchell <mark@codesourcery.com>
2405 * cp-tree.h (fold_non_dependent_expr): New function.
2406 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
2407 (cp_parser_template_argument): Use fold_non_dependent_expr.
2408 (cp_parser_direct_declarator): Likewise.
2409 * pt.c (fold_non_dependent_expr): New function.
2410 (convert_nontype_argument): Use it.
2411 (tsubst_qualified_id): Simplify.
2412 (tsubst_copy_and_build): Likewise.
2414 2004-02-04 Mark Mitchell <mark@codesourcery.com>
2416 * decl.c (cxx_push_function_context): Do not set
2417 current_function_is_thunk.
2418 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
2421 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2424 * pt.c (more_specialized_class): Increase processing_template_decl
2425 while partial ordering.
2427 2004-02-03 Mark Mitchell <mark@codesourcery.com>
2430 * decl.c (start_function): Do not call pushdecl for any
2431 instantiation or specialization of a primary template.
2433 2004-02-03 Mark Mitchell <mark@codesourcery.com>
2436 * parser.c (cp_parser_class_name): Robustify.
2439 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
2442 * semantics.c (finish_id_expression): Do not return an
2443 IDENTIFIER_NODE when lookup finds a PARM_DECL.
2445 2004-02-03 Mark Mitchell <mark@codesourcery.com>
2448 * pt.c (build_non_dependent_expr): Do not build
2449 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
2452 * semantics.c (finish_id_expression): Do not return an
2453 IDENTIFIER_NODE when lookup finds a VAR_DECL.
2456 * parser.c (cp_parser_simple_declaration): When skipping to the
2457 end of the statement swallow the terminating semicolon.
2459 2004-02-02 Mark Mitchell <mark@codesourcery.com>
2462 * init.c (build_offset_ref): Improve error recovery for invalid
2463 uses of non-static member functions.
2466 * cp-tree.h (cp_build_type_attribute_variant): New function.
2467 * class.c (build_clone): Use cp_build_type_attribute_variant.
2468 * decl.c (duplicate_decls): Likewise.
2469 * pt.c (copy_default_args_to_explicit_spec): Likewise.
2470 (tsubst_function_type): Likewise.
2471 * tree.c (build_exception_variant): Check attributes before
2472 concluding that two types are the same.
2473 (cp_build_type-attribute_variant): New method.
2474 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
2477 * call.c (convert_class_to_reference): Keep better track of
2478 pedantically invalid user-defined conversions.
2480 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2483 * pt.c (tsubst_qualified_id): Improved error message when a type
2484 is expected but not found.
2486 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
2488 * class.c: Fix comment typos.
2490 * error.c: Likewise.
2491 * parser.c: Likewise.
2493 * search.c: Likewise.
2494 * typeck.c: Likewise.
2496 2004-01-30 Richard Henderson <rth@redhat.com>
2499 * method.c (use_thunk): Don't force_target_expr for void thunks.
2500 * tree.c (build_target_expr_with_type): Assert non-void type.
2501 (force_target_expr): Likewise.
2503 2004-01-30 Michael Matz <matz@suse.de>
2505 * parser.c (cp_parser_labeled_statement): Accept case ranges.
2507 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2511 * decl.c (grokdeclarator): Check immediatly type completeness for
2512 non-dependent types.
2514 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2517 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
2518 a sizeof expression.block
2520 2004-01-29 Mark Mitchell <mark@codesourcery.com>
2523 * mangle.c (write_encoding): Correct encoding of member template
2526 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2528 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
2529 template name as it was `<::' (digraph typo).
2530 (cp_parser_nth_token_starts_template_argument_list_p): New function.
2531 (cp_parser_id_expression): Use it.
2532 (cp_parser_nested_name_specifier_opt): Likewise.
2533 (cp_parser_template_name): Likewise.
2534 (cp_parser_class_name): Likewise.
2535 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
2537 2004-01-28 Mark Mitchell <mark@codesourcery.com>
2540 * typeck.c (merge_types): Do not merge attributes into
2544 * parser.c (cp_parser_direct_declarator): Do not prevent
2545 backtracking inside a parenthesized declarator.
2546 (cp_parser_parameter_declaration): Fix typo in comment.
2548 2004-01-28 Jan Hubicka <jh@suse.cz>
2550 * semantics.c (expand_body) Do emit_associated_thunks before
2553 2004-01-27 Devang Patel <dpatel@apple.com>
2555 * name-lookup.c: Include "debug.h"
2556 (do_namespace_alias): Invoke debug_hooks to emit debug info
2557 for namespace alias.
2558 (do_local_using_decl): Invoke debug_hooks to emit debug info
2560 (do_class_using_decl): Same.
2561 (do_toplevel_using_decl): Same.
2562 (do_using_directive): Same.
2563 (cp_emit_debug_info_for_using): New function.
2564 * Make-lang.in (cp/parser.o): Depend on debug.h
2565 (cp/name-lookup.o): Same.
2567 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2569 * cp-tree.h (language_function, lang_type_header): Use
2571 * name-lookup.h (cp_binding_level): Likewise.
2573 2004-01-26 Mark Mitchell <mark@codesourcery.com>
2576 * semantics.c (finish_for_expr): Check for unresolved overloaded
2579 * class.c (add_method): Just check processing_template_decl to
2580 determine whether or not we are within a template.
2581 * decl2.c (maybe_retrofit_in_chrg): Likewise.
2582 * init.c (decl_constant_value): Check the type of the declaration,
2584 * name-lookup.c (maybe_push_to_top_level): Rename to ...
2585 (push_to_top_level): ... this.
2586 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
2587 * pt.c (push_template_decl_real): Reorder condition for speed.
2588 (convert_template_argument): Use dependency-checking functions in
2589 place of uses_template_parms.
2590 (lookup_template_class): Avoid calling uses_template_parms more
2592 (uses_template_parms): Reimplement, using dependency-checking
2594 (instantiate_class_template): Use push_to_top_level, not
2595 maybe_push_to_top_level.
2596 (type_unification_real): Simplify.
2597 (type_dependent_expression_p): Handle OFFSET_REFs and
2599 (any_dependent_template_arguments_p): Handle multiple levels of
2601 * semantics.c (expand_or_defer_fn): Do not check
2602 uses_template_parms for template instantiations.
2603 * typeck.c (comptypes): Avoid calling cp_type_quals.
2605 2004-01-25 Mark Mitchell <mark@codesourcery.com>
2608 * call.c (build_over_call): Do not convert arguments when
2609 processing a template.
2610 * pt.c (build_non_dependent_expr): Do not build a
2611 NON_DEPENDENT_EXPR for arithmetic constants.
2613 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2616 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
2617 returns a TYPE_DECL. no further lookup is required.
2618 * semantics.c (check_template_template_default_arg): A TYPE_DECL
2619 is invalid. Rework to give better diagnostics.
2621 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2624 * pt.c (instantiate_class_template): Add an error_mark_node
2626 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
2628 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
2631 * decl.c (finish_function): Move the call to
2632 finish_fname_decls below the call to
2633 finish_eh_spec_block.
2635 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
2637 * optimize.c, typeck2.c: Update copyright.
2639 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
2641 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
2642 init.c, mangle.c, typeck.c: Update copyright.
2644 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
2646 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
2648 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
2650 * Make-lang.in: Replace $(docdir) with doc.
2651 (c++.info, c++.srcinfo): Dummy entry.
2652 (c++.man, c++.srcman): New rules.
2653 (c++.install-man): Revamp rule.
2655 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
2657 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
2658 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
2659 immediate $(shell) instead of deferred backquote.
2661 2004-01-19 Mark Mitchell <mark@codesourcery.com>
2664 * parser.c (cp_parser_postfix_expression): When encountering
2665 incomplete type on left-hand side of "->" or ".", treat the entire
2666 expression as erroneous.
2669 * call.c (build_field_call): Remove.
2670 (n_build_method_call): Likewise.
2671 (build_method_call): Likewise.
2672 (build_new_method_call): Do not call build_field_call.
2673 * class.c (n_build_method_call): Remove.
2674 (print_class_statistics): Do not print it.
2675 * cp-tree.h (build_method_call): Remove declaration.
2676 (finish_object_call_expr): Likewise.
2677 (build_new_1): Do not use build_method_call.
2678 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
2679 when the function appearing on the right-hand-side of "." or "->"
2680 is not actually a function.
2681 * pt.c (tsubst_copy_and_build): Likewise.
2682 * semantics.c (finish_object_call_expr): Remove.
2684 2004-01-18 Mark Mitchell <mark@codesourcery.com>
2687 * pt.c (tsubst): Use finish_typeof.
2689 2004-01-18 Jason Merrill <jason@redhat.com>
2692 * except.c (build_throw): In a template, set
2693 current_function_returns_abnormally.
2695 2004-01-17 Fred Fish <fnf@intrinsity.com>
2698 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
2699 except don't call array_type_nelts() with a VECTOR_TYPE.
2701 2004-01-16 Jan Hubicka <jh@suse.cz>
2703 * mangle.c (write_mangled_name): Remove inline modifier.
2705 2004-01-16 Mark Mitchell <mark@codesourcery.com>
2708 * decl.c (compute_array_index_type): Fix grammar in comment.
2709 * init.c (build_zero_init): Handle zero-sized arrays correctly.
2712 * call.c (name_as_c_string): Print conversion operator names
2716 * call.c (initialize_reference): Pass -1 for inner parameter to
2719 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2722 * parser.c (cp_parser_base_specifier): Check for an invalid
2723 keyword `typename' and emit an user-friendly error message.
2725 2004-01-15 Geoffrey Keating <geoffk@apple.com>
2728 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
2729 (handle_pragma_implementation): Likewise.
2731 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2734 * typeck.c (build_class_member_access_expr): Allow to access members
2735 of the currently open class.
2736 (finish_class_member_access_expr): Likewise.
2738 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
2741 * name-lookup.c (validate_nonmember_using_decl): Take scope and
2742 name by value, instead of computing them.
2743 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
2744 arguments. Pass them to validate_nonmember_using_decl.
2745 * name-lookup.h (do_local_using_decl): Adjust.
2746 (do_toplevel_using_decl): Likewise.
2747 * parser.c (cp_parser_using_declaration): Likewise.
2748 * pt.c (tsubst_expr): Likewise.
2750 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
2754 * name-lookup.c (qualified_lookup_using_namespace): Search
2755 strongly-associated namespaces first, and only then try other
2758 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
2760 * Make-lang.in (c++.srcextra): Dummy entry.
2762 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2765 * parser.c (cp_parser_template_name): Don't try to parse a
2766 conversion-function-id, as it cannot be a template-name.
2767 (cp_parser_simple_type_specifier): Check for invalid template-ids
2768 even after a built-in type.
2770 2004-01-14 Jan Hubicka <jh@suse.cz>
2773 * pt.c (instantiate_decl): Do not increase function_depth.
2775 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
2779 * parser.c (cp_parser_elaborated_type_specifier): Warn about
2780 attributes and discard.
2781 * decl.c (xref_tag): Don't overwite existing attributes with
2784 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2787 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
2788 is no destructor while looking up a BIT_NOT_EXPR.
2790 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
2792 * cxxfilt.c: Remove unused file.
2794 2004-01-14 Jan Hubicka <jh@suse.cz>
2796 Partial fix to PR c++/12850
2797 * decl2.c (mark_used): Do not proactively instantiate templates
2798 when compiling in unit-at-a-time or not optimizing.
2799 * optimize.c (maybe_clone_body): Do not increase function depth.
2801 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2804 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
2806 2004-01-12 Steven Bosscher <stevenb@suse.de>
2809 * parser.c (cp_parser_member_declaration): Any non-type is also
2810 not a class or a function.
2812 2004-01-12 Jason Merrill <jason@redhat.com>
2815 * class.c (build_base_path): Do not mark vtable references as
2817 (build_vtbl_ref_1): Likewise.
2819 2004-01-12 Richard Henderson <rth@redhat.com>
2822 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
2823 (store_init_value): Use it.
2824 * decl.c (check_initializer): Expect full initialization code
2825 from store_init_value.
2826 * init.c (expand_aggr_init_1): Likewise.
2827 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
2829 2004-01-12 Mark Mitchell <mark@codesourcery.com>
2831 * class.c (layout_class_type): For non-POD class types, also copy
2832 the DECL_SIZE and DECL_MODE of fields to the base class type.
2834 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2837 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
2838 calling regenerate_decl_from_template.
2840 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
2843 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
2844 decl-specifier occurring along with a class definition.
2846 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
2848 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
2849 clauses to comments describing declares_class_or_enum.
2850 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
2853 2004-01-12 Jan Hubicka <jh@suse.cz>
2855 * pt.c (for_each_template_parm): Do not check for duplicates.
2856 (for_each_template_parm): Use walk_tree duplicate checking code.
2858 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
2861 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
2862 is error_mark_node, don't add any more decl_specs.
2863 (cp_parser_init_declarator): After committing to a declaration, if
2864 the decl_specifiers start with error_mark_node, issue an error and
2865 change the type to "int".
2867 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
2870 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
2872 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2876 * pt.c (tsubst): Substitution must fail if we are attempting to
2877 create an array with element type that is an abstract class type.
2878 * decl.c (cp_finish_decl): Strip pointers and array types recursively
2879 before calling abstract_virtuals_error.
2881 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
2883 * name-lookup.c (qualified_lookup_using_namespace): Consider
2884 strong using directives even if we've already found a binding.
2886 2004-01-09 Mark Mitchell <mark@codesourcery.com>
2888 * cp-tree.h (cxx_expand_expr): Change prototype.
2889 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
2891 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2894 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
2895 looking into them recursively. They can be there because of the
2896 new __offsetof__ extension.
2898 2004-01-07 Zack Weinberg <zack@codesourcery.com>
2900 * parser.c (cp_parser_save_member_function_body): Mark the
2903 2004-01-05 Mark Mitchell <mark@codesourcery.com>
2906 * class.c (build_clone): Copy type attributes from the original
2907 function to the clone.
2910 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
2911 references as constant.
2914 * parser.c (cp_parser_explicit_instantiation): Improve error
2916 (cp_parser_require): Improve indication of the error location.
2919 * parser.c (cp_parser_class_head): Reorder logic to check for
2920 invalid qualification.
2922 2004-01-04 Mark Mitchell <mark@codesourcery.com>
2925 * name-lookup.c (lookup_using_namespace): Remove spacesp
2927 (unqualified_namespace_lookup): Likewise.
2928 (lookup_qualified_name): Adjust accordingly.
2929 (lookup_name_real): Likewise.
2930 (lookup_arg_dependent): Do not eliminate the namespace of the
2931 functions found by unqualified name lookup unless that is the
2934 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
2936 * semantics.c (push_deferring_access_checks): Fix format.
2937 (resume_deferring_access_checks): Likewise.
2938 (stop_deferring_access_checks): Likewise.
2939 (pop_deferring_access_checks): Likewise.
2940 (get_deferred_access_checks): Likewise.
2941 (pop_to_parent_deferring_access_checks): Likewise.
2942 (perform_deferred_access_checks): Likewise.
2943 (perform_or_defer_access_check): Likewise.
2945 2004-01-04 Richard Henderson <rth@redhat.com>
2947 * call.c (build_over_call): Don't create a save_expr of an
2948 aggregate, but rather its address.
2950 2004-01-04 Mark Mitchell <mark@codesourcery.com>
2953 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
2954 an offsetof expression.
2956 * parser.c (cp_parser_parameter_declaration): Fix comment.
2959 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
2960 (reference_binding): Set it when appropriate.
2961 (build_temp): New function, split out from ...
2962 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
2963 (initialize_reference): Likewise.
2966 * parser.c (cp_parser): Add in_type_id_in_expr_p.
2967 (cp_parser_new): Initialize it.
2968 (cp_parser_postfix_expression): Set it.
2969 (cp_parser_sizeof_operand): Likewise.
2970 (cp_parser_parameteR_declaration): Do not commit early to tenative
2971 parsers when in_type_id_in_expr_p is set.
2973 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2976 * parser.c (cp_parser_template_argument): Don't call
2977 make_unbound_class_template directly.
2978 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
2979 UNBOUND_CLASS_TEMPLATE tree node.
2981 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
2984 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
2986 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2989 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
2990 (DECL_FUNCTION_TEMPLATE_P): Use it.
2991 (DECL_CLASS_TEMPLATE_P): Likewise.
2992 * parser.c (cp_parser_lookup_name): Add is_template parameter.
2993 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
2994 (cp_parser_template_name): Likewise.
2995 (cp_parser_elaborated_type_specifier): Likewise.
2996 (cp_parser_namespace_name): Likewise.
2997 (cp_parser_class_name): Likewise.
2998 (cp_parser_lookup_name_simple): Likewise.
3000 See ChangeLog.3 for earlier changes.