1 2004-07-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5 * class.c (check_field_decls): Improve -Weffc++ warning: do not
6 warn for pointers to functions/members, or for classes without
9 2004-07-08 Mark Mitchell <mark@codesourcery.com>
11 * name-lookup.h (struct cp_binding_level): Update documentation
14 2004-07-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
17 * typeck.c (check_return_expr): Improve -Weffc++ warning: handle
18 returning CALL_EXPR, and non-reference return type.
20 2004-07-08 Nathan Sidwell <nathan@codesourcery.com>
22 * name-lookup.c (push_binding): Use VEC_reserve.
24 2004-07-08 Richard Henderson <rth@redhat.com>
26 * cp-tree.h (expand_eh_spec_block): Remove.
28 2004-07-07 Mark Mitchell <mark@codesourcery.com>
30 * cp-tree.h (saved_scope): Remove x_previous_class_type and
31 x_previous_class_values; add x_previous_class_level.
32 (previous_class_type): Remove.
33 (previous_class_values): Remove.
34 (previous_class_level): New macro.
35 * class.c (pushclass): Restore the identifier cache more
37 (invalidate_class_lookup_cache): Use vector for class_shadowed and
38 previous_class_values.
39 * decl.c (poplevel): Likewise.
40 * name-lookup.c (cxx_binding_init): New function.
41 (cxx_binding_make): Use it.
42 (push_binding): For a binding in a class level, use a vector of
43 cp_class_binding nodes.
44 (push_binding_level): New function.
45 (begin_scope): Use it.
46 (leave_scope): Do not put class binding levels on the free list.
47 (print_binding_level): Adjust for the fact that class_shadowed is
49 (poplevel_class): Likewise.
50 (clear_identifier_class_values): Likewise.
51 (push_class_level_binding): Likewise.
52 (set_class_shadows): Remove.
53 (store_binding): New function.
54 (store_class_bindings): New function.
55 (push_to_top_level): Use store_class_bindings as appropriate.
56 (pop_from_top_level): Use previous_class_level, not
58 * name-lookup.h (cp_class_binding): New type.
59 (cp_binding_level): Use a vector object for class_shadowed.
60 (push_binding_level): Declare.
61 (set_class_shadows): Remove.
63 2004-07-07 Andrew Pinski <apinski@apple.com>
65 * class.c (instantiate_type): BUFFER_REF is dead.
66 * lex.c (init_operators): IN_EXPR is dead.
68 2004-07-07 Jason Merrill <jason@redhat.com>
71 * call.c (build_new_op): Give overload warnings for built-in
74 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
77 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
80 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
82 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
83 * class.c (build_primary_vtable, check_bases,
84 determine_primary_base, finish_struct_bits,
85 maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
86 get_basefndecls, warn_hidden, walk_subobject_offsets,
87 build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
88 layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
89 finish_struct_1, get_vfield_name, contains_empty_class_p,
90 dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
91 dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
92 add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
94 * decl.c (xref_basetypes): Likewise.
95 * dump.c (cp_dump_tree): Likewise.
96 * error.c (dump_expr): Likewise.
97 * init.c (sort_mem_initializers, expand_member_init,
98 push_base_cleanups): Likewise.
99 * method.c (do_build_copy_constructor, do_build_assign_reg,
100 synthesize_exception_spec): Likewise.
101 * name-lookup.c (arg_assoc_class):
102 * pt.c (instantiate_class_template, tsubst,
103 get_template_base_recursive):
104 * ptree.c (cxx_print_type):
105 * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
106 * search.c (lookup_base_r, dynamic_cast_base_recurse,
107 dfs_access_in_type, access_in_type, lookup_field_queue_p,
108 bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
109 marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
110 dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
111 binfo_for_vtable, copied_binfo, original_binfo): Likewise
112 * tree.c (copy_base_binfos, make_binfo): Likewise.
113 * typeck.c (commmon_base_type): Likewise
114 * typeck2.c (process_init_constructor): Likewise
116 2004-07-06 Joseph S. Myers <jsm@polyomino.org.uk>
118 * decl.c (check_tag_decl): Name redeclared type in diagnostic.
120 2004-07-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
123 * pt.c (convert_nontype_argument): Disallow conversions between
124 different enumeration types.
126 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
128 * cp-tree.h (BINFO_MARKED): Remove.
129 (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
130 BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
131 BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
132 (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
133 * class.c (build_base_path): Use BINFO_VIRTUAL_P.
134 (mark_primary_bases, determine_primary_base, base_derived_from,
135 dfs_find_final_overrider, dfs_find_final_overrider_q,
136 dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
137 dfs_modify_vtables, walk_subobject_offsets,
138 layout_nonempty_base_or_field, build_base_field,
139 build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
140 end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
141 finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
142 build_ctor_vtbl_group, accumulate_vtble_inits,
143 dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
144 build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
145 add_vcall_offset_vtbl_entries_1): Likewise.
146 * decl.c (xref_basetypes): Incomming virtual base indicated by
148 * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
149 * init.c (finish_init_stmts, sort_mem_initializers,
150 emit_mem_initializers, build_vtble_address, expand_member_init,
151 push_base_cleanups): Likewise.
152 * method.c (do_build_copy_constructor): Likewise.
153 * pt.c (instantiate_class_template,
154 get_template_base_recursive): Likewise.
155 * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
156 get_pseudo_ti_desc): Likewise.
157 * search.c (lookup_base_r, dynamic_cast_base_recurse,
158 binfo_from_vbase, binfo_via_virtual, copied_binfo,
159 original_binfo): Likewise.
160 * semantics.c (finish_base_specifier): Virtualness is indicated
162 * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
164 2004-07-06 Mark Mitchell <mark@codesourcery.com>
167 2004-06-24 Jason Merrill <jason@redhat.com>
169 * decl.c (grokparms): Give the PARM_DECL reference type if the
170 parameter is passed by invisible reference.
172 2004-07-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
174 * cp-lang.c (cp_var_mod_type_p): Add extra arg.
175 * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
176 * pt.c (check_instantiated_args, unify): Likewise.
178 2004-07-05 Phil Edwards <phil@codesourcery.com>
180 * Make-lang.in (check-c++, lang_checks): Add some comments.
182 2004-07-05 Zack Weinberg <zack@codesourcery.com>
184 * cp-mudflap.c: Delete file.
185 * Makefile.in: Remove all references to cp-mudflap.o.
187 2004-07-05 Zack Weinberg <zack@codesourcery.com>
189 * decl.c (cxx_init_decl_processing): Call
190 build_common_tree_nodes before creating the global NAMESPACE_DECL.
192 2004-07-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
195 * call.c (build_operator_new_call): Look only at global scope.
197 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
199 * call.c (enforce_access): Expect TREE_BINFO.
200 * class.c (binfo_ctor_vtable): Check TREE_BINFO.
201 * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
202 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
204 (BINFO_LANG_ELTS): Remove.
205 (BINFO_LANG_SLOTS): New.
206 (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
207 (CLASSTYPE_TEMPLATE_INFO): Adjust.
208 * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
209 * search.c (lookup_member): Check TREE_BINFO.
210 * semantics.c (perform_or_defer_access_check): Likewise.
211 (check_accessibility_of_qualified_id): Check
212 deferred_access_no_check.
213 * tree.c (make_binfo): Use make_tree_binfo.
215 2004-07-04 Mark Mitchell <mark@codesourcery.com>
217 * method.c (implicitly_declare_fn): Set linkage of generated
220 2004-07-04 Richard Henderson <rth@redhat.com>
222 * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
224 2004-07-03 Scott Brumbaugh <scottb.lists@verizon.net>
227 * name-lookup.c (push_class_level_binding): Don't pass a
228 TREE_LIST of ambiguous names to check_template_shadow as it
229 only handles declarations. Instead, pull the declaration
232 2004-07-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
235 * pt.c (check_explicit_specialization): Clarify error message.
237 2004-07-02 Richard Henderson <rth@redhat.com>
239 * tree.c (cp_unsave_r): Update remap_save_expr call.
241 2004-07-02 Mark Mitchell <mark@codesourcery.com>
244 * mangle.c (write_template_arg): Correct mangling.
247 * decl.c (grokdeclarator): Robustify.
249 2004-07-01 Richard Henderson <rth@redhat.com>
251 * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
252 * method.c (synthesize_method): Don't clear_last_expr.
253 * name-lookup.c (maybe_push_cleanup_level): Likewise.
255 2004-07-01 Nick Clifton <nickc@redhat.com>
257 * decl2.c (import_export_class): Invoke the
258 import_export_class field in the gcc_target structure if it is not
261 2004-06-30 Richard Henderson (rth@redhat.com>
263 * decl.c (start_preparsed_function): Don't set immediate_size_expand.
264 * method.c (use_thunk): Likewise.
266 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
268 * call.c (build_over_call), typeck.c (build_function_call): Call
269 check_function_arguments instead of check_function_format.
271 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
273 * call.c (build_over_call), typeck.c (build_function_call): Update
274 calls to check_function_format.
276 2004-06-30 Richard Henderson <rth@redhat.com>
278 * call.c (build_over_call): Use __builtin_memcpy for copying
279 CLASS_AS_BASE rather than funny casting.
281 2004-06-30 Richard Henderson <rth@redhat.com>
283 * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
284 TYPE_SIZE_UNIT of full_type.
286 2004-06-30 Per Bothner <per@bothner.com>
288 Conditionally compile support for --enable-mapped_location.
289 * decl.c (pop_label): Handle (imperfectly) USE_MAPPED_LOCATION case.
290 * decl2.c: If USE_MAPPED_LOCATION, don't do some line number
291 adjustments - which I don't understand.
292 * error.c (dump_decl): Rename "<interrnal>" to "<built-in>".
293 * error.c: Use LOCATION_FILE and EXPR_LOCATION macros.
294 (print_instantiation_partial_context): Use expand_location.
295 * decl.c (duplicate_decl): Use new DECL_IS_BUILTIN macro.
296 * name-lookup.c: Likewise.
297 * lex.c (cxx_init): Likewise. Also use BUILTINS_LOCATION.
298 * name-lookup.c: Use input_line macro.
299 * parser.c (cp_lexer_get_preprocessor_token): Use UNKNOWN_LOCATION.
300 (cp_parser_statement): Rename locaal variable statement_locus to
301 statement_location and use SET_EXPR_LOCATION macro.
302 * pt.c: Handle USE_MAPPED_LOCATION case. Use new macros.
303 * tree.c (cp_walk_subtrees): Likewise.
305 2004-06-29 Per Bothner <per@bothner.com>
307 * tree.c (build_min_nt, build_min, build_min_non_dep):
308 Don't set TREE_COMPLEXITY from input_line.
310 2004-06-29 Paul Brook <paul@codesourcery.com>
312 * init.c: Include target.h.
313 (get_cookie_size): Remove and replace with target hook.
315 (build_new_1): Store the element size in the cookie.
317 2004-06-29 Nathan Sidwell <nathan@codesourcery.com>
320 * parser.c (cp_parser_template_declaration_after_export): Disable
321 access checks here ...
322 (cp_parser_class_specifier): ... not here.
324 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
326 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
327 VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
328 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
331 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
333 * cp-tree.h (struct deferred_access): Move to ...
334 * semantics.c (struct deferred_access): ... here. Adjust.
335 (deferred_access_stack): Make a VEC(deferred_access),
336 (deferred_access_free_list): Remove.
337 (deferred_access_no_check): New.
338 (push_deferring_access_checks, resume_deferring_access_checks,
339 stop_deferring_access_checks, pop_deferring_access_checks,
340 get_deferred_access_checks, pop_to_parent_deferring_access_checks,
341 perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
343 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
346 * call.c (build_temp): Declare.
347 (check_constructor_callable): New.
348 (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
349 CONSTRUCTOR_CALLABLE.
350 (convert_like_real, initialize_reference): Use
351 check_constructor_callable.
352 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
353 (LOOKUP_*): Renumber.
355 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
357 * friend.c (add_friend): Only perform access checks when context
359 * lex.c (cxx_make_type): Only create a binfo for aggregate types.
360 * parser.c (cp_parser_class_specifier): Disable access checks here
361 when parsing the body of a templated class.
362 * semantics.c (perform_or_defer_access_checks): Reorder to allow
363 NULL binfos when not checking access.
365 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
367 Use vector API for vbase list.
368 * cp-tree.h: Include vec.h
369 (DEF_VEC_P (tree)): New type.
370 (struct lang_type_class): Change vbase's member type.
371 (binfo_for_vbase): Declare.
372 * class.c (determine_primary_base, base_derived_from,
373 update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
374 warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
375 build_vtbl_initializer): Adjust.
376 * decl.c (xref_basetypes): Adjust, accumulate upper bound of
378 * init.c (sort_mem_initializers, expand_member_init,
379 push_base_cleanups): Adjust.
380 * method.c (do_build_copy_constructor): Adjust.
381 * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
382 (binfo_for_vbase): New.
383 * tree.c (copy_base_binfos): Adjust.
385 2004-06-28 Mark Mitchell <mark@codesourcery.com>
387 * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
389 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
392 * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
393 paranthesis in case of pointers to array members.
394 * error.c (dump_type_prefix): Likewise.
395 (dump_type_suffix): Maybe issue a whitespace when printing
398 2004-06-27 Mark Mitchell <mark@codesourcery.com>
401 * parser.c (cp_parser_set_decl_spec_type): Refine test for
402 redefinition of built-in types.
404 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
406 * error.c (pp_template_argument_list_start): Remove.
407 (pp_template_argument_list_end): Likewise.
408 (pp_separate_with_comma): Use pp_cxx_separate_with.
409 (reinit_global_formatting_buffer): Remove.
410 (pp_non_consecutive_character): Likewise.
411 (dump_scope): Use pp_cxx_colon_colon.
412 (dump_template_parameter): Use pp_cxx_identifier,
413 pp_cxx_tree_identifier and pp_cxx_whitespace.
414 (dump_templat_bindings): Replace use of pp_string with sequence
415 of pp_cxx_whitespace and pp_equal.
416 (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
417 pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set
419 (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
420 (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace,
421 pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
422 (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
423 pp_cxx_right_bracket, pp_cxx_identifier throughout,
424 (dump_decl): Likewise.
425 (dump_template_decl): Likewise.
426 (dump_function_decl): Likewise. Set padding as appropriate.
427 (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
429 (dump_exception_spec): Likewise.
430 (dump_function_name): Use pp_cxx_tree_identifier and
432 (dump_template_parms): Use pp_cxx_begin_template_argument_list and
433 pp_cxx_end_template_argument_list.
434 (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
435 pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
436 pp_cxx_whitespace throughout.
437 (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
439 (dump_unary_op): Likewise.
440 (reinit_cxx_pp): New function.
441 (type_as_string); Use it.
442 (expr_as_string): Likewise.
443 (decl_as_string); Likewise.
444 (context_as_string): Likewise.
445 (lang_decl_name): Likewise.
446 (decl_to_string): Likewise.
447 (expr_to_string): Likewise.
448 (parm_to_string): Likewise.
449 (type_to_string): Likewise.
450 (args_to_string): Likewise.
451 (cv_to_string): Likewise.
453 2004-06-26 Mark Mitchell <mark@codesourcery.com>
455 * cp-tree.h (cp_cv_quals): New type.
456 (cp_declarator): Use it instead of "tree" as appropriate.
457 (grok_method_quals): Adjust prototype.
458 (grokclassfn): Likewise.
459 (do_friend): Likewise.
460 * decl.c (grokfndecl): Use cp_cv_quals, not tree.
461 (grokdeclarator): Likewise.
462 * decl2.c (grok_method_quals): Likewise.
463 (grokclassfn): Likewise.
464 * friend.c (do_friend): Likewise.
465 * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
466 * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
467 (make_pointer_declarator): Likewise.
468 (make_reference_declarator): Likewise.
469 (make_ptrmem_declarator): Likewise.
470 (cp_parser_ptr_operator): Likewise.
471 (cp_parser_cv_qualifier_seq_opt): Likewise.
472 (cp_parser_cv_qualifier_opt): Remove.
473 (cp_parser_new_declarator_opt): Adjust call to
474 cp_parser_ptr_operator.
475 (cp_parser_conversion_declaration_opt): Likewise.
476 (cp_parser_declarator): Use cp_cv_quals, not tree.
477 (cp_parser_direct_declarator): Likewise.
479 2004-06-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
481 * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
482 Rename DECL_STMT to DECL_EXPR.
483 * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
484 * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
485 * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
487 2004-06-26 Jan Hubicka <jh@suse.cz>
490 * decl2.c (maybe_emit_vtables): Always import_export_vtable for the
491 reachability analysis.
493 2004-06-25 Mark Mitchell <mark@codesourcery.com>
495 * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
498 2004-06-25 Paul Brook <paul@codesourcery.com>
500 * decl2.c (get_guard): Call targetm.cxx.guard_type.
501 (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
503 2004-06-24 Mark Mitchell <mark@codesourcery.com>
505 * decl.c (grokdeclarator): Restore error messages about __thread.
506 * parser.c (cp_parser_decl_specifier_seq): Likewise.
508 2004-06-24 Jason Merrill <jason@redhat.com>
511 * decl.c (grokparms): Give the PARM_DECL reference type if the
512 parameter is passed by invisible reference.
514 2004-06-24 Andreas Schwab <schwab@suse.de>
516 * cp-tree.h (enum cp_storage_class): Remove trailing comma.
518 2004-06-23 Mark Mitchell <mark@codesourcery.com>
520 * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
521 (cp/decl.o): Likewise.
522 (cp/decl2.o): Likewise.
524 (cp/semantics.o): Likewise.
525 * config-lang.in (gtfiles): Do not reference cp/lex.h.
526 * class.c: Do not include lex.h.
527 (add_implicitly_declared_members): Do not use
528 adding_implicit_members.
529 (check_bases_and_members): Do not talk about grok_x_components.
530 * cp/cp-tree.h (adding_implicit_members): Remove.
531 (cp_storage_class): New type.
532 (cp_decl_spec): Likewise.
533 (cp_decl_specifier_seq): Likewise.
534 (cp_parameter_declarator): Use it for the decl_specifiers field.
535 (check_tag_decl): Adjust prototype.
536 (shadow_tag): Likewise.
537 (groktypename): Likewise.
538 (start_decl): Likewise.
539 (start_function): Likewise.
540 (start_method): Likewise.
541 (grok_x_components): Remove.
542 (grokfield): Adjust prototype.
543 (grokbitfield): Likewise.
544 (finish_member_class_template): Remove.
545 * decl.c: Do not include lex.h.
546 (adding_implicit_members): Do not define.
547 (check_tag_decl): Do not use trees to represent decl-specifiers.
548 (shadow_tag): Likewise.
549 (groktypename): Likewise.
550 (start_decl): Likewise.
551 (grokvardecl): Likewise.
552 (grokdeclarator): Likewise.
553 (grokparms): Likewise.
554 (start_function): Likewise.
555 (start_method): Likewise.
556 * decl.h (grokdeclarator): Adjust prototype.
557 * decl2.c: Do not include lex.h.
558 (grok_x_components): Remove.
559 (grokfield): Do not use trees to represent decl-specifiers.
560 (grokbitfield): Likewise.
561 * lex.c: Do not include lex.h.
563 * parser.c: Include target.h.
564 (clear_decl_specs): New function.
565 (cp_parser_translation_unit): Do not use trees to represent
567 (cp_parser_postfix_expression): Likewise.
568 (cp_parser_new_type_id): Likewise.
569 (cp_parser_condition): Likewise.
570 (cp_parser_simple_declaration): Likewise.
571 (cp_parser_decl_specifier_seq): Likewise.
572 (cp_parser_function_specifier_opt): Likewise.
573 (cp_parser_conversion_type_id): Likewise.
574 (cp_parser_template_parameter): Likewise.
575 (cp_parser_explicit_instantiation): Likewise.
576 (cp_parser_type_specifier): Likewise.
577 (cp_parser_simple_type_specifier): Likewise.
578 (cp_parser_init_declarator): Likewise.
579 (cp_parser_type_id): Likewise.
580 (cp_parser_type_specifier_seq): Likewise.
581 (cp_parser_parameter_declaration): Likewise.
582 (cp_parser_member_declaration): Likewise.
583 (cp_parser_exception_declaration): Likewise.
584 (cp_parser_function_definition_from_specifiers_and_declarator):
586 (cp_parser_single_declaration): Likewise.
587 (cp_parser_save_member_function_body): Likewise.
588 (cp_parser_friend_p): Likewise.
589 (cp_parser_set_storage_class): New function.
590 (cp_parser_set_decl_spec_type): Likewise.
591 * pt.c: Do not include lex.h.
592 * semantics.c: Likewise.
593 (finish_member_class_template): Remove.
595 2004-06-23 Roger Sayle <roger@eyesopen.com>
597 * call.c (build_cxx_call): Don't call expand_tree_builtin. No
598 longer take both "args" and "convert_args" as arguments.
599 (build_op_delete_call): Update call to build_cxx_call.
600 (build_over_call): Likewise, update call to build_cxx_call.
601 * cp-tree.h (build_cxx_call): Update funtion prototype.
602 * typeck.c (build_function_call): Don't call expand_tree_builtin.
603 * rtti.c (throw_bad_cast): Update call to build_cxx_call.
604 (throw_bad_typeid): Likewise.
605 (build_dynamic_cast_1): Likewise.
607 2004-06-22 Richard Henderson <rth@redhat.com>
609 * class.c (build_vfn_ref): Take a pointer not object. Build
611 (cp_fold_obj_type_ref): New.
612 * call.c (build_over_call): Update build_vfn_ref call.
613 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
614 * cp-tree.h (cp_fold_obj_type_ref): Declare.
616 2004-06-21 Jason Merrill <jason@redhat.com>
619 * cp-gimplify.c (cp_gimplify_init_expr): Look through
622 2004-06-21 Mark Mitchell <mark@codesourcery.com>
624 * cp-tree.def (NEW_EXPR): Add a fourth slot.
625 * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
626 (TREE_PARMLIST): Likewise.
627 (CALL_DECLARATOR_PARMS): Likewise.
628 (CALL_DECLARATOR_QUALS): Likewise.
629 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
630 (cp_declarator_kind): New type.
631 (cp_parameter_declarator): Likewise.
632 (cp_declarator): Likewise.
633 (cp_error_declarator): Likewise.
634 (no_parameters): Likewise.
635 (groktypename): Change prototype.
636 (start_decl): Likewise.
637 (start_handler_parms): Likewise.
638 (get_scope_of_declarator): Likewise.
639 (start_function): Likewise.
640 (start_preparsed_function): New function.
641 (start_function): Change prototype.
642 (start_method): Likewise.
643 (grokfield): Likewise.
644 (grokbitfield): Likewise.
645 (build_new): Likewise.
646 (make_pointer_declarator): Remove.
647 (make_reference_declarator): Likewise.
648 (make_call_declarator): Likewise.
649 (set_quals_and_spec): Likewise.
650 (process_template_parm): Change prototype.
651 (begin_function_definition): Remove.
652 (finish_parmlist): Remove.
653 * decl.c (groktypename): Do not use trees to represent
655 (start_decl): Likewise.
656 (start_handler_parms): Remove.
657 (get_scope_of_declarator): Reimplement.
658 (grokdeclarator): Do not use trees to represent declarators.
659 (grokparms): Likewise.
660 (start_function): Likewise.
661 (start_method): Likewise.
662 (build_void_list_mode): Do not use TREE_PARMLIST.
663 * decl.h (grokdeclarator): Change prototype.
664 * decl2.c (grok_method_quals): Robustify.
665 (grok_x_components): Do not use trees to represent declarators.
666 (grokfield): Likewise.
667 (grokbitfield): Likewise.
668 (start_objects): Build FUNCTION_DECLs, not declarators.
669 (start_static_storage_duration_function): Likewise.
670 * init.c (build_new): Simplify.
671 * lex.c (make_pointer_declarator): Remove.
672 (make_reference_declarator): Likewise.
673 (make_call_declarator): Likewise.
674 (set_quals_and_spec): Likewise.
675 * method.c (use_thunk): Use start_preparsed_function.
676 (synthesize_method): Likewise.
677 (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
678 * optimize.c (maybe_clone_body): Use start_preparsed_function.
679 * parser.c (cp_error_declarator): New variable.
680 (declarator_obstack): Likewise.
681 (alloc_declarator): New function.
682 (make_declarator): Likewise.
683 (make_id_declarator): Likewise.
684 (make_pointer_declarator): Likewise.
685 (make_reference_declarator): Likewise.
686 (make_ptrmem_declarator): Likewise.
687 (make_call_declarator): Likewise.
688 (make_array_declarator): Likewise.
689 (no_parameters): New variable.
690 (make_parameter_declarator): Likewise.
691 (cp_parser_check_for_definition_in_return_type): Do not use trees
692 to represent declarators.
693 (cp_parser_translation_unit): Likewise.
694 (cp_parser_new_expression): Likewise.
695 (cp_parser_new_type_id): Likewise.
696 (cp_parser_new_declarator_opt): Likewise.
697 (cp_parser_direct_new_declarator): Likewise.
698 (cp_parser_condition): Likewise.
699 (cp_parser_declaration_statement): Likewise.
700 (cp_parser_declaration): Likewise.
701 (cp_parser_conversion_type_id): Likewise.
702 (cp_parser_conversion_declarator_opt): Likewise.
703 (cp_parser_template_parameter_list): Likewise.
704 (cp_parser_template_parameter): Likewise.
705 (cp_parser_explicit_instantiation): Likewise.
706 (cp_parser_init_declarator): Likewise.
707 (cp_parser_declarator): Likewise.
708 (cp_parser_direct_declarator): Likewise.
709 (cp_parser_type_id): Likewise.
710 (cp_parser_parameter_declaration_clause): Likewise.
711 (cp_parser_parameter_declaration_list): Likewise.
712 (cp_parser_parameter_declaration): Likewise.
713 (cp_parser_member_declaration): Likewise.
714 (cp_parser_exception_declaration): Likewise.
715 (cp_parser_check_declarator_template_parameters): Likewise.
716 (cp_parser_function_definition_from_specifiers_and_declarator):
718 (cp_parser_save_member_function_body): Likewise.
719 * pt.c (process_template_parm): Add is_non_type parameter.
720 (convert_template_argument): Adjust call to groktypename.
721 (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
722 (tsubst): Do not expect declarators.
723 (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
725 (instantiate_decl): Use start_preparsed_function.
726 * semantics.c (begin_function_definition): Remove.
727 (finish_parmlist): Remove.
728 * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
731 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
733 * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
734 (build_new_method_call): Likewise.
735 * decl.c (local_variable_p_walkfn): Don't walk into types.
736 * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
737 (build_anon_union_vars): Add new operand for COMPONENT_REF.
738 * init.c (buld_new): Add new operand for ARRAY_REF.
739 * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
740 (do_build_assign_ref): Likewise.
741 * parser.c (cp_parser_direct_new_declarator): Add new operands
743 (cp_parser_direct_declarator): Likewise.
744 * pt.c (tsubst): Likewise.
745 (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
747 * semantics.c (finish_non_static_data_member): Add new operand
749 * typeck.c (build_class_member_access_expr): Likewise.
750 (build_class_member_access_expr, finish_class_member_access_expr):
752 (build_ptrmemfunc_access_expr): Likewise.
753 (build_array_ref): Add new operands for ARRAY_REF.
754 * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
755 * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
757 2004-06-21 Richard Henderson <rth@redhat.com>
759 * dump.c (cp_dump_tree): Don't use dump_next_stmt.
760 * parser.c (cp_parser_jump_statement): Update commentary.
761 * pt.c (tsubst_expr): Use RETURN_EXPR.
762 * semantics.c (finish_return_stmt): Likewise.
763 (finalize_nrv_r): Likewise.
764 * typeck.c, typeck2.c: Update file start commentary.
766 2004-06-21 Richard Henderson <rth@redhat.com>
768 * semantics.c (finish_expr_stmt): Call verify_sequence_points.
770 2004-06-20 Richard Henderson <rth@redhat.com>
772 * cp-tree.h (add_decl_stmt): Declare.
773 * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
774 * semantics.c (maybe_cleanup_point_expr): New.
775 (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
776 finish_for_expr, finish_switch_cond): Use it.
777 (finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN.
779 2004-06-20 Richard Henderson <rth@redhat.com>
781 * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
782 * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
783 (cp_gimplify_expr): Call it.
784 (gimplify_cleanup_stmt): Move from c-gimplify.c.
785 (cp_genericize): New.
786 * decl.c (finish_function): Call it.
787 * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
788 (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
789 (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
790 (cp_genericize): Declare.
791 * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
792 * dump.c (cp_dump_tree): Likewise.
793 * semantics.c (push_cleanup): Move from c-semantics.c.
795 2004-06-20 Zack Weinberg <zack@codesourcery.com>
797 * cp-lang.c (has_c_linkage): Implement.
799 * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
800 * decl.c (duplicate_decls): Use COPY_DECL_RTL.
801 (builtin_function_1): Don't call make_decl_rtl.
802 (build_cp_library_fn): Don't call set_mangled_name_for_decl.
803 (grokvardecl): Don't call mangle_decl.
804 * except.c (nothrow_libfn_p): Look at DECL_NAME, not
806 * method.c (set_mangled_name_for_decl): Delete.
807 * name-lookup.c (pushdecl): When a local extern shadows a
808 file-scope declaration of the same object, give both DECLs the
810 * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
811 on DECL_ASSEMBLER_NAME.
813 2004-06-19 Richard Henderson <rth@redhat.com>
815 * cp-gimplify.c: Remove unnecessary prototypes.
816 (cp_gimplify_stmt): Merge into ...
817 (cp_gimplify_expr): ... here. Move to end of file. Handle
818 stmts_are_full_exprs_p frobbing.
819 * cp-tree.h (cp_gimplify_stmt): Remove.
820 * pt.c (tsubst_expr): Merge prep_stmt and unify.
821 * tree.c (init_tree): Don't set lang_gimplify_stmt.
823 2004-06-18 Richard Henderson <rth@redhat.com>
826 * semantics.c (begin_cond): New.
827 (finish_cond): Rewrite to handle template DECL_STMTs specially.
828 Assume that non-template decls go land before the conditional.
829 (simplify_loop_decl_cond): Likewise.
830 (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
831 finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
832 begin_switch_stmt, finish_switch_cond): Update to match.
834 2004-06-17 Jason Merrill <jason@redhat.com>
837 * semantics.c (simplify_aggr_init_expr): Don't return the slot.
838 (finish_stmt_expr_expr): Update type after conversions.
839 (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
840 Handle void initializer.
841 * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
843 2004-06-17 Geoffrey Keating <geoffk@apple.com>
845 * class.c (build_clone): Don't call defer_fn, let mark_used do it.
846 * cp-tree.h (defer_fn): Delete.
847 * decl2.c (defer_fn): Delete.
848 (finish_file): Simplify deferred_fns loops; check that
849 only used inline functions get into deferred_fns.
850 (mark_used): Inline previous contents of defer_fn.
852 2004-06-16 Richard Henderson <rth@redhat.com>
854 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
855 (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
856 * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
857 of CTOR_INITIALIZER ...
858 (pp_cxx_statement): ... here.
859 * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
860 (finish_function): Use alloc_stmt_list to zap entire function.
861 * parser.c (cp_parser_compound_statement): Update commentary.
862 * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
863 * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
864 (finish_stmt_expr): Don't look through COMPOUND_STMT.
866 2004-06-16 Geoffrey Keating <geoffk@apple.com>
868 * pt.c (mark_decl_instantiated): Don't call defer_fn.
870 2004-06-16 Richard Henderson <rth@redhat.com>
872 * parser.c (cp_parser_labeled_statement): Update commentary.
873 * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
874 * tree.c (mark_local_for_remap_r): Likewise.
876 2004-06-16 Richard Henderson <rth@redhat.com>
878 * parser.c (cp_parser_asm_definition): Update commentary.
879 * pt.c (tsubst_expr): Use ASM_EXPR.
880 * semantics.c (finish_asm_stmt): Likewise.
882 2004-06-16 Richard Henderson <rth@redhat.com>
884 * decl.c (finish_destructor_body): Use LABEL_EXPR.
885 * parser.c (cp_parser_statement): Update commentary.
886 * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
887 * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
888 * tree.c (mark_local_for_remap_r): Likewise.
890 2004-06-16 Richard Henderson <rth@redhat.com>
893 * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
894 statement in FOR_INIT_STMT for templates.
896 2004-06-15 Richard Henderson <rth@redhat.com>
898 * call.c (initialize_reference): Don't build CLEANUP_STMT here.
899 * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
900 (genericize_try_block): Use gimplify_stmt.
901 (genericize_catch_block, genericize_eh_spec_block): Likewise.
902 (cp_gimplify_init_expr): Remove STMT_EXPR special case.
903 (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
904 * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
905 (cp_tree_chain_matters_p): Remove.
906 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
907 (COMPOUND_STMT_BODY_BLOCK): New.
908 (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
909 (EXPR_STMT_STMT_EXPR_RESULT): New.
910 (building_stmt_tree): Check cur_stmt_list.
911 (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
912 (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
913 * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
914 (cp_finish_decl): Use push_cleanup.
915 (start_function, finish_function): Use statement lists.
916 (finish_stmt): Do nothing.
917 * except.c (begin_eh_spec_block): Use statement lists.
918 (check_handlers_1, check_handlers): Likewise.
919 * init.c (construct_virtual_base): Don't add extra compound stmts.
920 (build_vec_init): Likewise.
921 * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
922 * name-lookup.h (struct cp_binding_level): Add statement_list.
923 * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
924 (cp_parser_labeled_statement, cp_parser_expression_statement,
925 cp_parser_statement_seq_opt): Likewise.
926 (cp_parser_compound_statement): Likewise. Take bool for try block.
927 (cp_parser_selection_statement): Tidy if processing.
928 (cp_parser_already_scoped_statement): Rewrite to do what it says.
929 * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
930 (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST.
931 Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
932 * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
933 (finish_cond): New, rewritten from FINISH_COND.
934 (simplify_loop_decl_cond): New.
935 (finish_expr_stmt): Avoid nested EXPR_STMTs.
936 (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
937 begin_else_clause, finish_else_clause, finish_if_stmt,
938 begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
939 begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
940 finish_for_cond, finish_for_stmt, begin_switch_stmt,
941 finish_switch_cond, finish_switch_stmt, begin_try_block,
942 finish_try_block, finish_cleanup_try_block, finish_function_try_block,
943 finish_handler_sequence, finish_function_handler_sequence,
944 begin_handler, finish_handler_parms, finish_handler,
945 begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
946 using statement lists.
947 (begin_compound_stmt): Replace has_no_scope argument with flags.
948 Update all callers. Use statement lists.
949 (finish_compound_stmt): Likewise.
950 (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
951 (current_scope_stmt_stack): Remove.
952 (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
953 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
954 Rewrite with statement lists.
956 2004-06-15 Alexandre Oliva <aoliva@redhat.com>
958 * parser.c: Change all assignments of c_lex_string_translate
959 to true and false to 1 and 0.
960 (cp_lexer_read_token): Convert type of the translated string.
961 (cp_parser_skip_to_closing_parentheses): Preserve original
962 value of c_lex_string_translate, and set it to -1 while
964 (cp_parser_cache_group): Likewise.
965 (cp_parser_cache_group_1): Renamed.
966 (cp_parser_asm_operand_list): Remove redundant setting of
967 c_lex_string_translate.
968 (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
969 Handle chained strings.
971 2004-06-12 Andrew Pinski <apinski@apple.com>
975 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
977 * cp-tree.h: Fix typo.
979 * cp-tree.h: Include cgraph.h
980 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
981 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
983 2004-06-12 Jason Merrill <jason@redhat.com>
985 PR tree-optimization/14107
986 * decl.c (finish_function): Warn about no return in all functions.
988 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
990 * cp-tree.h (struct language_function): Remove cannot_inline.
991 * decl.c (save_function_data): cannot_inline is no more.
992 (cxx_push_function_context): Likewise.
993 * decl2.c (start_objects, start_static_storage_duration_function):
994 Reset DECL_INLINE, set DECL_UNINLINABLE.
996 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
999 * search.c (lookup_field): Propagate the ambiguity list.
1000 (lookup_fnfields): Likewise.
1002 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1005 * parser.c (cp_parser_template_name): Ctors/dtors never need a
1006 template keyword to disambiguate.
1008 2004-06-14 Mark Mitchell <mark@codesourcery.com>
1011 * decl.c (grokdeclarator): Ignore pointer-to-members when
1012 computing template depth.
1015 * name-lookup.c (pushtag): Do not try to put class declarations in
1016 explicit specialization scopes.
1018 2004-06-11 Andrew Pinski <pinskia@physics.uc.edu>
1020 * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
1022 2004-06-11 Mark Mitchell <mark@codesourcery.com>
1025 * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
1026 bindings for undeclared built-ins.
1028 2004-06-11 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1030 * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
1031 appear at the correct location.
1033 2004-06-10 Jason Merrill <jason@redhat.com>
1037 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1038 * init.c (build_offset_ref): Build SCOPE_REF with non-null
1039 TREE_TYPE for non-dependent names.
1040 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
1041 unknown_type_node as its TREE_TYPE.
1042 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
1043 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
1044 (dump_expr) <SCOPE_REF case>: Likewise.
1046 2004-06-10 Mark Mitchell <mark@codesourcery.com>
1049 * parser.c (cp_parser_direct_declarator): Robustify.
1052 * pt.c (tsubst_copy): Use decl_constant_value on enumeration
1053 constants in non-dependent contexts.
1057 * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
1060 2004-06-10 Jakub Jelinek <jakub@redhat.com>
1063 * decl.c (duplicate_decls): Handle fileptr_type_node arguments
1066 2004-06-09 Mark Mitchell <mark@codesourcery.com>
1070 2004-06-07 Mark Mitchell <mark@codesourcery.com>
1071 * lex.c (handle_pragma_interface): Deprecate.
1072 (handle_pragma_implementation): Likewise.
1074 2004-06-09 Andrew Pinski <pinskia@physics.uc.edu>
1076 * g++spec.c (lang_specific_driver): Remove check for -lm
1077 and -lmath when check it see if it was the math library.
1079 2004-06-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1082 * parser.c (cp_parser_direct_declarator): Reject constructor named
1083 as qualified template-id.
1085 2004-06-07 Mark Mitchell <mark@codesourcery.com>
1088 * lex.c (handle_pragma_interface): Deprecate.
1089 (handle_pragma_implementation): Likewise.
1091 2004-06-07 Mark Mitchell <mark@codesourcery.com>
1094 * parser.c (cp_parser_iteration_statement): Fix typo in error
1098 * pt.c (tsubst_default_argument): Do not defer access checks
1099 while substituting into the default argument.
1102 * pt.c (tsubst_copy): Do not try to substitute for an enumeration
1103 constant in a non-dependent context.
1106 * except.c (build_throw): Ensure that temp_expr has been
1109 2004-06-06 Roger Sayle <roger@eyesopen.com>
1111 * cp/cp-tree.h (lvalue_or_else): Add function prototype.
1113 2004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1116 * parser.c (cp_parser_mem_initializer_id): Gracefully reject
1117 'typename', and accept 'template'.
1119 2004-06-03 Andrew Pinski <pinskia@physics.uc.edu>
1120 Jan Hubicka <jh@suse.cz>
1123 * method.c (use_think): Do not mark thunk as referenced.
1125 2004-06-03 Matt Austern <austern@apple.com>
1128 * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
1129 is nonzero, and if we see a noninline definition of a key method,
1130 make the vtables nonweak.
1132 2004-06-02 Matt Austern <austern@apple.com>
1134 * cp-tree.h (instantiate_decl): new boolean parameter,
1135 undefined_ok. Current behavior is equivalent to its being 0.
1136 * decl2.c (mark_used): Add new argument when calling instantiate_decl
1137 * pt.c (mark_decl_instantiated): Unconditionally make
1138 instantiations explicit unconditionally
1139 (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
1140 since mark_decl_instantiated now does it.
1141 (instantiate_class_member): New. Instantiate a member of an
1142 explicitly instantiated class template.
1143 (do_type_instantiation): Explicitly instantiate members of an
1144 explicitly instantiated class template.
1145 (instantiate_decl): if undefined_ok is nonzero, and if we're
1146 trying to explicitly instantiated a template with no definition,
1147 change it to an implicit instantiation.
1148 (instantiate_pending_templates): Add new argument to instantiate_decl.
1149 * tree.c (cp_cannot_inline_tree_fn): Likewise.
1151 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
1153 * cp-tree.h: Fix typo.
1155 * cp-tree.h: Include cgraph.h
1156 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
1157 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
1159 2004-06-01 Jason Merrill <jason@redhat.com>
1162 * call.c (call_builtin_trap): Remove type parm.
1163 (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
1164 (build_x_va_arg): Dereference a null pointer for a non-POD argument.
1166 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1169 * init.c (build_offset_ref): Build SCOPE_REF with non-null
1170 TREE_TYPE for non-dependent names.
1171 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
1172 unknown_type_node as its TREE_TYPE.
1173 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
1174 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
1175 (dump_expr) <SCOPE_REF case>: Likewise.
1177 2004-06-01 Richard Henderson <rth@redhat.com>
1178 Andrew Pinski <pinskia@physics.uc.edu>
1180 * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
1181 * parser.c (struct cp_parser): Remove in_offsetof.
1182 (cp_parser_new): Don't set it.
1183 (cp_parser_unary_expression): Don't check it.
1184 (cp_parser_postfix_open_square_expression): Split out from ...
1185 (cp_parser_postfix_expression): ... here.
1186 (cp_parser_postfix_dot_deref_expression): Likewise.
1187 (cp_parser_builtin_offsetof): New.
1188 (cp_parser_primary_expression): Use it.
1190 2004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1193 * parser.c (cp_parser_postfix_expression): Allow subscript
1194 operator in offsetof.
1196 2004-05-31 Mark Mitchell <mark@codesourcery.com>
1199 * friend.c (add_friend): Do not try to perform access checks for
1200 functions from dependent classes.
1202 2004-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
1204 * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
1205 (pp_cxx_begin_template_argument_list): Turn into a function.
1206 (pp_cxx_end_template_argument_list): Likewise.
1207 (pp_cxx_separate_with): Define.
1208 (pp_cxx_unqualified_id): Tidy.
1209 (pp_cxx_primary_expression): Likewise.
1210 (pp_cxx_postfix_expression): Likewise.
1211 (pp_cxx_expression): Likewise.
1212 (pp_cxx_simple_type_specifier): Likewise.
1213 (pp_cxx_type_specifier_seq): Likewise.
1214 (pp_cxx_parameter_declaration_clause): Likewise.
1215 (pp_cxx_exception_specification): Likewise.
1216 (pp_cxx_direct_declarator): Likewise.
1217 (pp_cxx_type_id): Likewise.
1218 * cxx-pretty-print.h (pp_cxx_whitespace): Export from
1220 (pp_cxx_left_paren): Likewise.
1221 (pp_cxx_right_paren): Likewise.
1222 (pp_cxx_left_brace): Likewise.
1223 (pp_cxx_right_brace): Likewise.
1224 (pp_cxx_left_bracket): Likewise.
1225 (pp_cxx_right_bracket): Likewise.
1226 (pp_cxx_dot): Likewise.
1227 (pp_cxx_identifier): Likewise.
1228 (pp_cxx_tree_identifier): Likewise.
1229 (pp_cxx_ampersand): New macro.
1230 (pp_cxx_star): Likewise.
1231 (pp_cxx_arrow): Likewise.
1232 (pp_cxx_semicolon): Likewise.
1233 (pp_cxx_complement): Likewise.
1234 (pp_cxx_begin_template_argument_list): Declaree.
1235 (pp_cxx_end_template_argument_list): Likewise.
1236 (pp_cxx_colon_colon): likewise.
1238 2004-05-31 Eric Botcazou <ebotcazou@libertysurf.fr>
1240 * parser.c (cp_parser_simple_type_specifier): Explicitly test
1243 2004-05-31 Kazu Hirata <kazu@cs.umass.edu>
1245 * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
1246 typeck.c: Fix comment formatting.
1248 2004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
1250 * cp-lang.c (cp_expand_decl): Remove.
1251 (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
1253 2004-05-30 Andreas Jaeger <aj@suse.de>
1255 * lang-specs.h: Add missing initializers for .ii.
1257 2004-05-28 Aldy Hernandez <aldyh@redhat.com>
1259 * decl.c (cp_make_fname_decl): Free return value from
1262 2004-05-28 Mark Mitchell <mark@codesourcery.com>
1265 * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
1267 * init.c (build_new): Likewise.
1270 * name-lookup.c (arg_assoc): Robustify.
1273 * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
1274 when determining the scope to use for a pointer to member.
1275 (lookup_anon_field): Give it external linkage.
1276 * cp-tree.h (lookup_anon_field): Declare it.
1277 * expr.c (cplus_expand_constant): Use it.
1279 2004-05-28 Mark Mitchell <mark@codesourcery.com>
1282 * parser.c (cp_parser_simple_type_specifier): Call
1283 maybe_note_name_used_in_class.
1285 2004-05-28 Tom Marshall <tmarshall@real.com>
1288 * class.c (finish_struct_1): Warn only if the dtor is non-private or
1289 the class has friends.
1291 2004-05-27 Adam Nemet <anemet@lnxw.com>
1294 * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
1295 TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
1297 2004-05-24 Geoffrey Keating <geoffk@apple.com>
1299 * method.c (implicitly_declare_fn): Don't call defer_fn; abort
1300 if it might be needed.
1301 * pt.c (mark_decl_instantiated): Only call defer_fn if
1302 the function actually needs processing in finish_file.
1303 * decl2.c (finish_file): Add check that elements in
1304 deferred_fns_used are really needed there. Remove unnecessary
1305 test of DECL_SAVED_TREE.
1307 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
1309 * Make-lang.in: No need to specify $(LIBCPP).
1311 2004-05-23 Mark Mitchell <mark@codesourcery.com>
1314 * parser.c (cp_parser_class_head): Robustify.
1317 * parser.c (cp_parser_decl_specifier_seq): Correct error in
1319 (cp_parser_constructor_declarator_p): Treat attributes
1323 * typeck.c (build_unary_op): Do not attempt to resolve casts to
1324 base classes in templates.
1326 2004-05-23 Mark Mitchell <mark@codesourcery.com>
1329 * pt.c (instantiate_template): Robustify.
1331 2004-05-23 Mark Mitchell <mark@codesourcery.com>
1334 * decl.c (xref_tag): Issue errors about redeclaring template
1335 classes as non-template classes.
1337 2004-05-23 Mark Mitchell <mark@codesourcery.com>
1340 * name-lookup.c (supplement_binding): Allow redefinitions of
1344 * parser.c (cp_parser_template_argument): Robustify.
1346 2004-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
1348 * class.c (alter_access): Use %E format specifier to print an
1349 identifier node. Avoid looking at the IDENTIFIER_POINTER.
1350 (push_lang_context): Likewise.
1351 * decl.c (lookup_label): Likewise.
1352 (grokdeclarator): Likewise.
1353 * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
1354 * pt.c (do_type_instantiation): Likewise.
1355 * tree.c (handle_java_interface_attribute): Likewise.
1356 (handle_com_interface_attribute): Likewise.
1357 (handle_init_priority_attribute): Likewise.
1359 2004-05-22 Mark Mitchell <mark@codesourcery.com>
1363 * pt.c (build_non_dependent_expr): Expand the set of tree nodes
1364 recognized as overloaded functions.
1366 2004-05-22 Mark Mitchell <mark@codesourcery.com>
1369 * class.c (layout_nonempty_base_or_field): Do not try to avoid
1370 layout conflicts for unions.
1373 * typeck.c (build_x_unary_op): Instantiate template class
1374 specializations before looking for "operator &".
1377 * typeck.c (complete_type): Layout non-dependent array types, even
1381 * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
1384 2004-05-22 Roger Sayle <roger@eyesopen.com>
1386 * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
1387 returning when TREE_TYPE is error_mark_node.
1388 * typeck.c (require_complete_type): Return error_mark_node if
1389 value's type is an error_mark_node.
1391 2004-05-20 Andrew Pinski <pinskia@physics.uc.edu>
1393 * optimize.c (calls_setjmp_r): Remove.
1394 (calls_setjmp_p): Remove.
1395 * cp-tree.c (calls_setjmp_p): Remove.
1396 * decl.c (finish_function): Do not call calls_setjmp_p.
1398 2004-05-18 Zack Weinberg <zack@codesourcery.com>
1400 * decl.c (cp_finish_decl): Use mark_decl_referenced.
1401 * decl2.c (maybe_make_one_only): Likewise.
1402 * method.c (use_thunk): Likewise.
1404 2004-05-18 Jason Merrill <jason@redhat.com>
1406 * class.c (build_base_path): Tidy a bit.
1408 2004-05-14 Geoffrey Keating <geoffk@apple.com>
1410 * name-lookup.c (struct scope_binding): New.
1411 (EMPTY_SCOPE_BINDING): New.
1412 (lookup_using_namespace): Take a scope_binding instead of a
1414 (qualified_lookup_using_namespace): Likewise.
1415 (cxx_binding_clear): Delete.
1416 (do_nonmember_using_decl): Use a scope_binding instead of a
1418 (lookup_tag): Don't call select_decl.
1419 (ambiguous_decl): Don't return anything (and change callers to match).
1420 Take a scope_binding as the second parameter.
1421 (lookup_namespace_name): Use a scope_binding instead of a
1423 (unqualified_namespace_lookup): Likewise.
1424 (lookup_qualified_name): Likewise.
1425 (select_decl): Take a scope_binding instead of a cxx_binding.
1426 Use macros rather than hand-coding tests for type-ness.
1428 2004-05-13 Diego Novillo <dnovillo@redhat.com>
1430 * cp-gimplify.c: Rename from cp-simplify.c.
1431 * Make-lang.in, optimize.c: Update.
1433 2004-05-13 Diego Novillo <dnovillo@redhat.com>
1435 Merge from tree-ssa-20020619-branch. See
1436 ChangeLog.tree-ssa for details.
1438 * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
1439 cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
1440 expr.c, init.c, name-lookup.h, optimize.c, parser.c,
1441 pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
1443 * cp-mudflap.c: New file.
1444 * cp-simplify.c:: New file.
1446 2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1449 * decl2.c (check_classfn): For member templates, compare also the
1450 template parameters to match the declaration.
1451 * cp-tree.h: Adjust declaration of check_classfn.
1452 * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
1453 * friend.c (do_friend): Likewise.
1454 * pt.c (tsubst_friend_function): Likewise.
1456 2004-05-01 Zack Weinberg <zack@codesourcery.com>
1458 * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
1459 Instead, dig into the representation type to find the array bound.
1461 2004-04-30 Jason Merrill <jason@redhat.com>
1463 Refer to base members using COMPONENT_REFs where possible.
1464 * class.c (build_simple_base_path): New fn.
1465 (build_base_path): Use it for non-virtual base references.
1466 (layout_class_type): Change base fields to their real type
1467 after layout is done.
1468 * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
1469 * cp-lang.c (cxx_get_alias_set): Use it.
1471 2004-04-30 Kazu Hirata <kazu@cs.umass.edu>
1473 * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
1476 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1479 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
1480 used in integral constant expressions.
1482 2004-04-22 Mark Mitchell <mark@codesourcery.com>
1484 * init.c (build_aggr_init): Fix accidental use of C99 construct in
1487 * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
1489 * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
1490 * decl.c (reshape_init): Use it.
1491 * init.c (perform_member_init): Remove redundant condition.
1492 (build_aggr_init): Adjust to handle brace-enclosed initializers
1494 (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
1496 * parser.c (cp_parser_initializer_clause): Do not set
1497 TREE_HAS_CONSTRUCTOR on the initializer.
1498 * rtti.c (tinfo_base_init): Likewise.
1499 (generic_initializer): Likewise.
1500 (ptr_initializer): Likewise.
1501 (ptm_initializer): Likewise.
1502 (class_initializer): Likewise.
1503 (get_pseudo_ti_init): Likewise.
1504 * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
1506 2004-04-22 Alan Modra <amodra@bigpond.net.au>
1508 * name-lookup.c (anonymous_namespace_name): Make static.
1510 2004-04-19 Roger Sayle <roger@eyesopen.com>
1513 * class.c (build_base_path): Call fold whilst building the NULL
1514 pointer check expression trees.
1516 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
1518 * init.c (build_new_1): Don't use type size argument for Java
1519 _Jv_AllocObject call.
1521 2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
1523 * method.c (make_alias_for_thunk): Remove preprocessor guard on
1524 declaration and definition.
1526 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
1529 * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
1530 than ASM_OUTPUT_DEF.
1532 2004-04-08 Jakub Jelinek <jakub@redhat.com>
1534 * decl2.c (mark_used): Don't segfault if cfun != NULL but
1535 current_function_decl == NULL.
1537 2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
1540 * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
1543 2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1545 * init.c (decl_constant_value): Don't look at DECL_INITIAL
1547 * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
1548 or TREE_SIDE_EFFECTS of a type.
1550 2004-04-02 Nathan Sidwell <nathan@codesourcery.com>
1553 * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
1554 cv-qualifier unification.
1555 * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
1557 2004-04-02 Jan Hubicka <jh@suse.cz>
1559 * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
1560 * cp-tree.h (cp_update_decl_after_saving): Declare.
1561 * tree.c (cp_update_decl_after_saving): Define.
1563 2004-04-01 Mark Mitchell <mark@codesourcery.com>
1566 * typeck.c (get_delta_difference): Call fold before returning the
1569 2004-04-01 Richard Henderson <rth@redhat.com>
1572 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
1573 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
1575 2004-04-01 Mark Mitchell <mark@codesourcery.com>
1578 * name-lookup.c (maybe_push_cleanup_level): Robustify.
1580 2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1582 * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
1584 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1586 * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
1587 * class.c (check_bitfield_decl): Likewise.
1588 * cvt.c (type_promotes_to): Likewise.
1589 * decl.c (finish_enum): Likewise.
1590 * mangle.c (write_builtin_type): Likewise.
1591 * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
1592 * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
1593 (build_binary_op): Likewise.
1595 2004-03-31 Jan Hubicka <jh@suse.cz>
1597 * tree.h (optimize_function): Kill prototype.
1598 * optimize.c (dump_function, optimize_function, dump_finction): Kill.
1599 * semantics.c (expand_body): Kill.
1601 2004-03-30 Mark Mitchell <mark@codesourcery.com>
1604 * decl.c (start_decl_1): Do not decide whether or not to create a
1605 new cleanup level until after the type has been completed.
1608 * pt.c (tsubst_default_argument): Clear current_function_decl.
1610 2004-03-30 Zack Weinberg <zack@codesourcery.com>
1612 * name-lookup.c, parser.c: Use new shorter form of GTY markers.
1614 2004-03-29 Zack Weinberg <zack@codesourcery.com>
1616 * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
1617 is null, just print the literal name and return.
1619 2004-03-25 Kazu Hirata <kazu@cs.umass.edu>
1621 * cxx-pretty-print.c: Fix comment typos.
1623 2004-03-24 Kazu Hirata <kazu@cs.umass.edu>
1625 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
1628 2004-03-23 Ziemowit Laski <zlaski@apple.com>
1630 * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
1631 * mangle.c (write_type): Add call to 'mangle_fundamental_type'
1634 2004-03-23 Zack Weinberg <zack@codesourcery.com>
1636 PR 12267, 12391, 12560, 13129, 14114, 14133
1637 * cp-lang.c (c_reset_state): Delete.
1638 (push_file_scope, pop_file_scope): New stubs.
1639 * parser.c (c_parse_file): Call sorry() here if called more than once.
1641 2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1643 * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
1646 2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
1648 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
1650 2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
1652 * error.c (enum pad): Remove.
1653 (dump_qualifiers): Likewise.
1654 (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
1655 (dump_aggr_type): Likewise.
1656 (dump_type_suffix): Likewise.
1657 (dump_simple_decl): Likewise.
1658 (dump_function_decl): Likewise.
1659 (cv_to_string): Likewise.
1660 (dump_type_prefix): Likewise. Adjust return void.
1661 * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
1663 (pp_cxx_template_keyword_if_needed): Document.
1664 (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
1665 (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
1666 MUST_NOT_THROW_EXPR.
1668 2004-03-21 Mark Mitchell <mark@codesourcery.com>
1671 * decl.c (cp_finish_decl): Compute the size of arrays declared in
1672 templates, if their type is non-dependent.
1674 2004-03-19 Mark Mitchell <mark@codesourcery.com>
1676 * call.c (build_op_delete_call): Do not forget the placement
1677 arguments when iterating through mutiple delete operators.
1679 * cp-tree.h (svaed_scope): Remove last_parms.
1680 (NEW_DELETE_OPNAME_P): New macro.
1681 (last_function_parms): Remove.
1682 (do_friend): Adjust prototype.
1683 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
1684 using last_function_parms.
1685 (grokfndecl): Take the PARM_DECLs as an argument, rather than
1686 using last_function_parms.
1687 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
1688 for class-specific operator new and operator delete.
1689 (grok_op_properties): Do not look for allocation functions with
1691 (start_function): Use DECL_ARGUMENTS instead of
1692 last_function_parms.
1693 * decl.h (last_function_parms): Do not declare.
1694 * decl2.c (grokclassfn): Do not use last_function_parms.
1695 * friend.c (do_friend): Remove parmdecls parameter.
1696 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
1697 (pop_from_top_level): Do not restore it.
1698 * pt.c (check_explicit_specialization): Do not adjust
1699 last_function_parms.
1701 * name-lookup.c (do_local_using_decl): Create a local binding for
1702 types brought in via using declarations.
1704 * name-lookup.c (lookup_arg_dependent): Handle block-scope
1705 function declarations correctly.
1707 * semantics.c (finish_id_expression): Correct handling of
1708 conversion operators to dependent types.
1710 * typeck.c (lookup_destructor): Allow the use of destructors from
1713 2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1715 * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
1716 TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
1717 * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
1718 the field is named TEMPLATE_TYPE_PARM_INDEX.
1720 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1723 * parser.c (cp_parser_functional_cast): A cast to anything
1724 but integral or enumaration type is not an integral constant
1726 * pt.c (value_dependent_expression_p): Handle cast expressions
1727 without operands (such as "int()").
1729 2004-03-18 Mark Mitchell <mark@codesourcery.com>
1731 * semantics.c (finish_pseudo_destructor_expr): Allow differing
1732 cv-qualification between the type named by the
1733 pseudo-destructor-name and the object-type.
1735 * search.c (accessible_base_p): Handle non-proper bases.
1737 * name-lookup.c (do_nonmember_using_decl): If a using declaration
1738 refers to a single overloaded function, set the type of the
1740 * tree.c (lvalue_type): Simplify.
1741 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
1743 (build_unary_op): Handle OVERLOADs with known types.
1745 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
1748 * parser.c (cp_parser_postfix_expression): Handle the use of
1749 "typename" in non-dependent contexts. Convert appropriately when
1750 when using a qualified name after "->" or ".".
1752 * call.c (conditional_conversion): Honor the requirement that some
1753 conversions refer to the original object.
1755 2004-03-18 Mark Mitchell <mark@codesourcery.com>
1757 * call.c (build_conditional_expr): Do not call force_rvalue for
1758 operands of void_type when the conditional expression itself has
1760 * name-lookup.c (pushdecl): Don't consider a declaration of a
1761 function named "main" to be an overload of a type named "main".
1762 * parser.c (cp_parser_template_name): Perform name lookup when the
1763 template name is proceeded by "template" if the qualifying scope
1765 * typeck.c (composite_pointer_type_r): Correctly handle
1766 pointer-to-member types.
1767 (build_const_cast): Likewise.
1769 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1771 * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
1772 * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
1773 (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
1774 (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
1775 (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
1776 (TYPEOF_TYPE_EXPR): New macro.
1777 * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
1778 * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
1779 * pt.c (tsubst): Likewise.
1780 * semantics.c (finish_typeof): Likewise.
1781 * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
1782 and TEMPLATE_TYPE_PARM.
1783 * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
1784 (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
1786 2004-03-16 Mark Mitchell <mark@codesourcery.com>
1789 * cp-tree.h (build_new_op): Change prototype.
1790 (build_x_binary_op): Likewise.
1791 * call.c (build_new_op): Add overloaded_p parameter.
1792 * decl2.c (grok_array_decl): Adjust call to build_new_op.
1793 * parser.c (cp_parser_binary_expression): Note that uses of
1794 overloaded operators prevents an expression from being considered
1795 an integral constant.
1796 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
1798 * semantics.c (finish_call_expr): Likewise.
1799 * typeck.c (rationalize_conditional_expr): Likewise.
1800 (build_x_indirect_ref): Likewise.
1801 (build_x_binary_op): Likewise.
1802 (build_x_unary_op): Likewise.
1803 (build_x_compound_expr): Likewise.
1804 (build_modify_expr): Likewise.
1805 * typeck2.c (build_x_arrow): Likewise.
1807 2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
1809 * cp-lang.c, ptree.c: Update copyright.
1811 2004-03-13 Mark Mitchell <mark@codesourcery.com>
1814 * parser.c (cp_parser_non_integral_constant_expression): Encode
1815 more of the idiom that surrounded calls to this function within
1817 (cp_parser_primary_expression): Adjust accordingly.
1818 (cp_parser_postfix_expression): Likewise.
1819 (cp_parser_unary_expression): Likewise.
1820 (cp_parser_cast_expression): Likewise.
1821 (cp_parser_assignment_expression): Likewise.
1822 (cp_parser_expression): Likewise.
1823 (cp_parser_new_expression): Note that new-expressions are not
1824 allowed in integral constant expressions.
1825 (cp_parser_delete_expression): Likewise.
1827 2004-03-12 Matt Austern <austern@apple.com>
1829 * decl2.c (maybe_make_one_only): Look at
1830 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
1831 to make an explicit instantiation weak.
1832 * method.c (use_thunk): Make sure we call comdat_linkage
1834 * pt.c (do_type_instantiation): On systems where weak symbols
1835 don't go in a static archive's TOC, explicit instantiation of a
1836 class must imply *explicit* instantiation of its memeber.
1838 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
1840 * call.c, cp-tree.h, pt.c: Fix comment typos.
1842 2004-03-10 Mark Mitchell <mark@codesourcery.com>
1845 * decl.c (xref_tag): Disregard non-type declarations when
1846 looking up a tagged type.
1848 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
1851 * call.c (convert_like_real): Build a const qualified temporary,
1852 when testing ctor access.
1854 2004-03-09 Mark Mitchell <mark@codesourcery.com>
1856 * call.c (initialize_reference): Fix typo.
1858 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1861 * pt.c (determine_specialization): For member templates, match also
1865 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
1867 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
1869 2004-03-09 Mark Mitchell <mark@codesourcery.com>
1872 * call.c (initialize_reference): Handle initializers that are
1873 class-member access expressions applies to rvalues.
1875 2004-03-09 Mark Mitchell <mark@codesourcery.com>
1878 * name-lookup.c (supplement_binding): Ignore functions that are
1879 marked DECL_ANTICIPATED.
1881 2004-03-08 Mark Mitchell <mark@codesourcery.com>
1884 * class.c (check_field_decls): Complain about non-static data
1885 members of reference type in unions. Propagate
1886 CLASSTYPE_REF_FIELDS_NEED_INIT and
1887 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
1889 * init.c (perform_member_init): Complain about mbmers with const
1890 type that are not explicitly initialized.
1892 2004-03-08 Mark Mitchell <mark@codesourcery.com>
1894 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
1895 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
1896 (lang_identifier): Remove implicit_decl and error_locus.
1897 (IDENTIFIER_IMPLICIT_DECL): Remove.
1898 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
1899 (IDENTIFIER_ERROR_LOCUS): Likewise.
1900 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
1901 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
1902 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
1903 (implicitly_declare): Remove.
1904 * decl.c (warn_extern_redeclared_static): Remove check of
1905 IDENTIFIER_IMPLICIT_DECL.
1906 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
1907 (implicitly_declare): Remove.
1908 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
1909 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
1910 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
1911 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
1912 in the innermost scope, rather than at namespace scope.
1913 * name-lookup.c (push_local_binding): Give it external linkage.
1914 (pushdecl): Remove dead code.
1915 * name-lookup.h (push_local_binding): Declare it.
1916 * ptree.c (cxx_print_identifier): Don't print
1917 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
1918 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
1919 not IDENTIFIER_ERROR_LOCUS.
1920 * typeck.c (build_function_call): Remove dead code.
1922 2004-03-08 Jason Merrill <jason@redhat.com>
1925 * decl.c (xref_tag): Remove attribute handling.
1926 * cp-tree.h: Adjust prototype.
1927 * decl.c, parser.c, rtti.c: Adjust callers.
1928 * parser.c (cp_parser_class_head): Pass back attributes in the
1930 (cp_parser_class_specifier): Adjust.
1932 2004-03-08 Matt Austern <austern@apple.com>
1935 * name-lookup.c (add_decl_to_level): Add extern variables, as well
1936 as static, to static_decls array.
1938 2004-03-05 Jason Merrill <jason@redhat.com>
1940 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
1942 2004-03-04 Geoffrey Keating <geoffk@apple.com>
1944 * decl.c (grokfndecl): Update old incorrect comment.
1945 (grokvardecl): Diagnose C++ variables of type with no linkage.
1947 2004-03-01 Mark Mitchell <mark@codesourcery.com>
1950 * pt.c (build_non_dependent_expr): Do not create a
1951 NON_DEPENDENT_EXPR for a THROW_EXPR.
1953 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
1956 * error.c (dump_expr): Handle THROW_EXPR.
1958 2004-03-01 Mark Mitchell <mark@codesourcery.com>
1961 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
1962 lookup if ordinary name-lookup finds a non-function.
1963 * pt.c (tsubst_copy_and_build): Likewise.
1966 * parser.c (cp_parser_late_parsing_default_args): Check that there
1967 are no extra tokens after the end of the default-argument
1970 2004-03-01 Mark Mitchell <mark@codesourcery.com>
1973 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
1974 having C++ linkage for name-mangling purposes.
1977 * parser.c (cp_parser_direct_declarator): Recognize constructor
1978 declarators that use a template-id to name the class being
1982 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
1983 (tsubst_expr): Do not call tsubst_copy, even when
1984 processing_template_decl.
1986 2004-03-01 Jeff Law <law@redhat.com>
1988 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
1991 2004-02-29 Mark Mitchell <mark@codesourcery.com>
1994 * name-lookup.h (push_scope): Change prototype.
1995 * name-lookup.c (push_scope): Do not reenter the current class
1997 * decl.c (grokfndecl): Check return code from push_scope before
1999 * decl2.c (check_classfn): Likewise.
2000 * parser.c (cp_parser_conversion_function_id): Likewise.
2001 (cp_parser_init_declarator): Likewise.
2002 (cp_parser_direct_declarator): Likewise.
2003 (cp_parser_class_specifier): Likewise.
2004 (cp_parser_class_head): Likewise.
2005 (cp_parser_lookup_name): Likewise.
2006 (cp_parser_constructor_declarator_p): Likewise.
2007 * pt.c (instantiate_class_template): Likewise.
2008 (resolve_typename_type): Likewise.
2010 2004-02-29 Mark Mitchell <mark@codesourcery.com>
2013 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
2017 * class.c (update_vtable_entry_for_fn): Do not go through
2018 covariance machinery if the type returned by an overrider is the
2019 same as the original.
2021 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
2023 * call.c: Fix a comment typo.
2025 2004-02-27 Ziemowit Laski <zlaski@apple.com>
2027 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
2029 2004-02-26 Mark Mitchell <mark@codesourcery.com>
2032 * parser.c (cp_parser_parameter_declaration_list): Commit
2033 to fewer tentative parses.
2035 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2038 * pt.c (dependent_type_p_r): A template template parameter is a
2041 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2044 * mangle.c (write_template_arg_literal): Don't rely on identity for
2047 2004-02-24 Jason Merrill <jason@redhat.com>
2049 * tree.c (build_exception_variant): Use check_qualified_type.
2051 2004-02-23 Zack Weinberg <zack@codesourcery.com>
2052 Kazu Hirata <kazu@cs.umass.edu>
2054 * decl.c (cxx_init_decl_processing): Don't check
2055 flag_writable_strings.
2057 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
2060 * typeck.c (maybe_warn_about_returning_address_of_location):
2061 Change check for VAR_DECL to use DECL_P instead.
2063 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2066 * cvt.c (build_expr_type_conversion): Type must be complete before
2067 looking up for conversions.
2069 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2072 * name-lookup.c (arg_assoc_class): Don't look into template
2073 arguments if it is not a primary template.
2075 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
2078 * method.c (use_thunk): Always clone function argument tree.
2080 2004-02-20 Mark Mitchell <mark@codesourcery.com>
2083 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
2086 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
2087 for all type variants.
2089 2004-02-19 Mark Mitchell <mark@codesourcery.com>
2092 * decl.c (duplicate_decls): Return error_mark_node for invalid
2094 * name-lookup.c (push_namespace): Ignore the return value from
2096 * pt.c (push_template_decl_real): Robustify.
2099 * name-lookup.c (push_class_level_binding): Do not complain about
2100 adding a binding for a member whose name is the same as the
2101 enclosing class if the member is located in a base class of the
2104 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2107 * parser.c (cp_parser_new_expression): Parse an ill-formed
2108 direct-new-declarator after a parenthesized type-id to emit good
2111 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
2113 * cp-tree.def, cvt.c: Update copyright.
2115 2004-02-17 Mark Mitchell <mark@codesourcery.com>
2118 * cp-tree.h (abi_version_at_least): Remove.
2119 * mangle.c: Include flags.h.
2121 2004-02-15 Mark Mitchell <mark@codesourcery.com>
2124 * call.c (build_conditional_expr): Handle conversions between
2125 class types which result in differently cv-qualified type
2129 * class.c (delete_duplicate_fields_1): Remove.
2130 (delete_duplicate_fields): Likewise.
2131 (finish_struct_anon): Remove check for members with the same name
2132 as their enclosing class.
2133 (check_field_decls): Do not call duplicate_fields.
2134 * decl.c (grokdeclarator): Remove check for static data members
2135 with the same name as their enclosing class.
2136 * name-lookup.c (push_class_level_binding): Check for members with
2137 the same name as their enclosing class.
2139 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
2142 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
2144 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2147 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
2148 has full set of arguments.
2150 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2153 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
2155 2004-02-13 Mark Mitchell <mark@codesourcery.com>
2158 * cp-tree.h (delete_sanity): Change prototype.
2159 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
2160 Remove dead code. Adjust code to warn about deleting an array.
2161 * typekc.c (decay_conversion): Use build_address and build_nop.
2164 * search.c (accessible_p): Do not check access in thunks.
2167 * call.c (build_conditional_expr): Call force_rvalue on the
2168 non-void operand in the case that one result is a throw-expression
2169 and the other is not.
2171 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
2174 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
2175 the type name and look ahead for ::~, and bail out early with a
2176 better error message if the parse is going to fail.
2178 2004-02-12 Mark Mitchell <mark@codesourcery.com>
2180 * call.c (conversion_kind): New type.
2181 (conversion_rank): Likewise.
2182 (conversion): Likewise.
2183 (CONVERSION_RANK): New macro.
2184 (conversion_obstack): New variable.
2185 (obstack_initialized): Likewise.
2186 (z_candidate): Change type of convs and second_conv.
2187 (candidate_warning): New type.
2188 (IDENTITY_RANK): Remove.
2189 (EXACT_RANK): Likewise.
2190 (PROMO_RANK): Likewise.
2191 (STD_RANK): Likewise.
2192 (PBOOL_RANK): Likewise.
2193 (USER_RANK): Likewise.
2194 (ELLIPSIS_RANK): Likewise.
2195 (BAD_RANK): Likewise.
2196 (ICS_RANK): Likewise.
2197 (ICS_STD_RANK): Likewise.
2198 (ICS_USER_FLAG): Likewise.
2199 (ICS_ELLIPSIS_FLAG): Likewise.
2200 (ICS_THIS_FLAG): Likewise.
2201 (ICS_BAD_FLAG): Likewise.
2202 (NEED_TEMPORARY_P): Likewise.
2203 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
2204 (USER_CONV_CAND): Likewise.
2205 (USER_CONV_FN): Likewise.
2206 (conversion_obstack_alloc): New function.
2207 (alloc_conversion): Likewise.
2208 (validate_conversion_obstack): Likewise.
2209 (alloc_conversions): Likewise.
2210 (build_conv): Adjust to deal with new conversion data structures.
2211 (build_identity_conv): New function.
2212 (build_ambiguous_conv): Likewise.
2213 (standard_conversion): Adjust to deal with new conversion data
2215 (convert_class_to_reference): Likewise.
2216 (direct_reference_binding): Likewise.
2217 (reference_binding): Likewise.
2218 (implicit_conversion): Likewise.
2219 (add_candidate): Likewise.
2220 (add_function_candidate): Likewise.
2221 (add_conv_candidate): Likewise.
2222 (build_builtin_candidate): Likewise.
2223 (print_z_candidate): Likewise.
2224 (merge_conversion_sequences): Likewise.
2225 (build_user_type_conversion_1): Likewise.
2226 (build_user_type_conversion): Likewise.
2227 (build_new_function_call): Likewise.
2228 (build_object_call): Likewise.
2229 (conditional_conversion): Likewise.
2230 (build_conditional_expr): Likewise.
2231 (build_new_op): Likewise.
2232 (build_op_delete_call): Likewise.
2233 (convert_like_real): Likewise.
2234 (build_over_call): Likewise.
2235 (build_new_method_call): Likewise.
2236 (is_subseq): Likewise.
2237 (maybe_handle_implicit_object): Likewise.
2238 (maybe_handle_ref_bind): Likewise.
2239 (compare_ics): Likewise.
2240 (source_type): Likewise.
2241 (add_warning): Likewise.
2243 (can_convert_arg): Likewise.
2244 (can_convert_arg_bad): Likewise.
2245 (perform_implicit_conversion): Likewise.
2246 (perform_direct_initialization_if_possible): Likewise.
2247 (initialize_reference): Likewise.
2248 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
2249 * cp-tree.def (WRAPPER): Likewise.
2250 (IDENTITY_CONV): Remove.
2251 (LVALUE_CONV): Likewise.
2252 (QUAL_CONV): Likewise.
2253 (STD_CONV): Likewise.
2254 (PTR_CONV): Likewise.
2255 (PMEM_CONV): Likewise.
2256 (BASE_CONV): Likewise.
2257 (REF_BIND): Likewise.
2258 (USER_CONV): Likewise.
2259 (AMBIG_CONV): Likewise.
2260 (RVALUE_CONV): Likewise.
2261 * cp-tree.h (tree_wrapper): Remove.
2262 (WRAPPER_ZC): Remove.
2263 (lang_tree_node): Remove wrapper.
2264 (LOOKUP_SPECULATIVELY): Remove.
2265 (build_op_delete_call): Adjust prototype.
2266 (validate_conversion_obstack): Declare.
2267 (build_zc_wrapper): Remove.
2268 * cvt.c (convert_to_reference): Remove dead code.
2269 (ocp_convert): Likewise.
2270 * decl.c (redeclaration_error_message): Correct handling of
2272 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
2273 (cp_tree_node_structure): Remove WRAPPER case.
2274 * decl2.c (finish_file): Call validate_conversion_obstack.
2275 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
2276 (build_op_delete_call): Likewise.
2277 (build_x_delete): Likewise.
2278 (build_delete): Adjust call to build_op_delete_call.
2279 * pt.c (tsubst_friend_declaration): Adjust code to determine
2280 whether or not a friend template is a definition.
2281 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
2282 * tree.c (build_zc_wrapper): Remove.
2284 2004-02-12 Zack Weinberg <zack@codesourcery.com>
2286 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
2287 * cp-tree.h: Don't declare cxx_builtin_type_decls.
2288 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
2289 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
2291 2004-02-10 Mark Mitchell <mark@codesourcery.com>
2293 * typeck.c (lookup_destructor): Fix typo in error message.
2295 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
2297 * call.c, parser.c, tree.c: Fix comment typos.
2299 2004-02-07 Zack Weinberg <zack@codesourcery.com>
2302 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
2303 * decl.c (duplicate_decls, start_function): Likewise.
2305 2004-02-07 Zack Weinberg <zack@codesourcery.com>
2307 * name-lookup.c (pushdecl): Issue shadow warnings directly.
2308 * parser.c (free_parser_stacks): Delete.
2310 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
2312 * rtti.c: Update copyright.
2314 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2317 * decl.c (require_complete_types_for_parms): Do not insert
2318 error_mark_node in the parameter list.
2320 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2323 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
2324 error when terminator can not be found.
2326 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
2328 Make-lang.in (po-generated): Delete.
2330 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
2332 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
2333 targetm.calls.promote_prototypes.
2335 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
2339 2004-01-15 Geoffrey Keating <geoffk@apple.com>
2341 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
2342 (handle_pragma_implementation): Likewise.
2344 2004-02-05 Mark Mitchell <mark@codesourcery.com>
2347 * typeck.c (lookup_destructor): Tweak error message.
2349 2004-02-05 Jan Hubicka <jh@suse.cz>
2351 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
2354 2004-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2357 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
2358 code, only emits the diagnostic now. Added lookup of the identifier
2359 and support for qualified ids.
2360 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
2361 Parse an (invalid) type name as id-expression within a declarator.
2362 (cp_parser_simple_declaration): Use it.
2363 (cp_parser_member_declaration): Likewise.
2364 (cp_parser_make_typename_type): New function. Handle errors through
2365 cp_parser_diagnose_invalid_typename.
2366 (cp_parser_elaborated_type_specifier): Use it.
2368 2004-02-04 Mark Mitchell <mark@codesourcery.com>
2371 * call.c (convert_like_real): Use "converting" rather than
2372 "argument" as the descriptive keyword to
2373 dubious_conversion_warnings.
2374 * typeck.c (convert_for_assignment): Do not call
2375 dubious_conversion_warnings.
2377 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2380 * init.c (build_delete): Emit a more informative error message in
2381 case of an incomplete type, and on the correct source line.
2383 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
2385 * error.c, search.c: Update copyright.
2387 2004-02-04 Mark Mitchell <mark@codesourcery.com>
2390 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
2391 linkage for the typeinfo name string.
2393 2004-02-04 Mark Mitchell <mark@codesourcery.com>
2396 * cp-tree.h (fold_non_dependent_expr): New function.
2397 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
2398 (cp_parser_template_argument): Use fold_non_dependent_expr.
2399 (cp_parser_direct_declarator): Likewise.
2400 * pt.c (fold_non_dependent_expr): New function.
2401 (convert_nontype_argument): Use it.
2402 (tsubst_qualified_id): Simplify.
2403 (tsubst_copy_and_build): Likewise.
2405 2004-02-04 Mark Mitchell <mark@codesourcery.com>
2407 * decl.c (cxx_push_function_context): Do not set
2408 current_function_is_thunk.
2409 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
2412 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2415 * pt.c (more_specialized_class): Increase processing_template_decl
2416 while partial ordering.
2418 2004-02-03 Mark Mitchell <mark@codesourcery.com>
2421 * decl.c (start_function): Do not call pushdecl for any
2422 instantiation or specialization of a primary template.
2424 2004-02-03 Mark Mitchell <mark@codesourcery.com>
2427 * parser.c (cp_parser_class_name): Robustify.
2430 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
2433 * semantics.c (finish_id_expression): Do not return an
2434 IDENTIFIER_NODE when lookup finds a PARM_DECL.
2436 2004-02-03 Mark Mitchell <mark@codesourcery.com>
2439 * pt.c (build_non_dependent_expr): Do not build
2440 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
2443 * semantics.c (finish_id_expression): Do not return an
2444 IDENTIFIER_NODE when lookup finds a VAR_DECL.
2447 * parser.c (cp_parser_simple_declaration): When skipping to the
2448 end of the statement swallow the terminating semicolon.
2450 2004-02-02 Mark Mitchell <mark@codesourcery.com>
2453 * init.c (build_offset_ref): Improve error recovery for invalid
2454 uses of non-static member functions.
2457 * cp-tree.h (cp_build_type_attribute_variant): New function.
2458 * class.c (build_clone): Use cp_build_type_attribute_variant.
2459 * decl.c (duplicate_decls): Likewise.
2460 * pt.c (copy_default_args_to_explicit_spec): Likewise.
2461 (tsubst_function_type): Likewise.
2462 * tree.c (build_exception_variant): Check attributes before
2463 concluding that two types are the same.
2464 (cp_build_type-attribute_variant): New method.
2465 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
2468 * call.c (convert_class_to_reference): Keep better track of
2469 pedantically invalid user-defined conversions.
2471 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2474 * pt.c (tsubst_qualified_id): Improved error message when a type
2475 is expected but not found.
2477 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
2479 * class.c: Fix comment typos.
2481 * error.c: Likewise.
2482 * parser.c: Likewise.
2484 * search.c: Likewise.
2485 * typeck.c: Likewise.
2487 2004-01-30 Richard Henderson <rth@redhat.com>
2490 * method.c (use_thunk): Don't force_target_expr for void thunks.
2491 * tree.c (build_target_expr_with_type): Assert non-void type.
2492 (force_target_expr): Likewise.
2494 2004-01-30 Michael Matz <matz@suse.de>
2496 * parser.c (cp_parser_labeled_statement): Accept case ranges.
2498 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2502 * decl.c (grokdeclarator): Check immediatly type completeness for
2503 non-dependent types.
2505 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2508 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
2509 a sizeof expression.block
2511 2004-01-29 Mark Mitchell <mark@codesourcery.com>
2514 * mangle.c (write_encoding): Correct encoding of member template
2517 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2519 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
2520 template name as it was `<::' (digraph typo).
2521 (cp_parser_nth_token_starts_template_argument_list_p): New function.
2522 (cp_parser_id_expression): Use it.
2523 (cp_parser_nested_name_specifier_opt): Likewise.
2524 (cp_parser_template_name): Likewise.
2525 (cp_parser_class_name): Likewise.
2526 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
2528 2004-01-28 Mark Mitchell <mark@codesourcery.com>
2531 * typeck.c (merge_types): Do not merge attributes into
2535 * parser.c (cp_parser_direct_declarator): Do not prevent
2536 backtracking inside a parenthesized declarator.
2537 (cp_parser_parameter_declaration): Fix typo in comment.
2539 2004-01-28 Jan Hubicka <jh@suse.cz>
2541 * semantics.c (expand_body) Do emit_associated_thunks before
2544 2004-01-27 Devang Patel <dpatel@apple.com>
2546 * name-lookup.c: Include "debug.h"
2547 (do_namespace_alias): Invoke debug_hooks to emit debug info
2548 for namespace alias.
2549 (do_local_using_decl): Invoke debug_hooks to emit debug info
2551 (do_class_using_decl): Same.
2552 (do_toplevel_using_decl): Same.
2553 (do_using_directive): Same.
2554 (cp_emit_debug_info_for_using): New function.
2555 * Make-lang.in (cp/parser.o): Depend on debug.h
2556 (cp/name-lookup.o): Same.
2558 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2560 * cp-tree.h (language_function, lang_type_header): Use
2562 * name-lookup.h (cp_binding_level): Likewise.
2564 2004-01-26 Mark Mitchell <mark@codesourcery.com>
2567 * semantics.c (finish_for_expr): Check for unresolved overloaded
2570 * class.c (add_method): Just check processing_template_decl to
2571 determine whether or not we are within a template.
2572 * decl2.c (maybe_retrofit_in_chrg): Likewise.
2573 * init.c (decl_constant_value): Check the type of the declaration,
2575 * name-lookup.c (maybe_push_to_top_level): Rename to ...
2576 (push_to_top_level): ... this.
2577 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
2578 * pt.c (push_template_decl_real): Reorder condition for speed.
2579 (convert_template_argument): Use dependency-checking functions in
2580 place of uses_template_parms.
2581 (lookup_template_class): Avoid calling uses_template_parms more
2583 (uses_template_parms): Reimplement, using dependency-checking
2585 (instantiate_class_template): Use push_to_top_level, not
2586 maybe_push_to_top_level.
2587 (type_unification_real): Simplify.
2588 (type_dependent_expression_p): Handle OFFSET_REFs and
2590 (any_dependent_template_arguments_p): Handle multiple levels of
2592 * semantics.c (expand_or_defer_fn): Do not check
2593 uses_template_parms for template instantiations.
2594 * typeck.c (comptypes): Avoid calling cp_type_quals.
2596 2004-01-25 Mark Mitchell <mark@codesourcery.com>
2599 * call.c (build_over_call): Do not convert arguments when
2600 processing a template.
2601 * pt.c (build_non_dependent_expr): Do not build a
2602 NON_DEPENDENT_EXPR for arithmetic constants.
2604 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2607 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
2608 returns a TYPE_DECL. no further lookup is required.
2609 * semantics.c (check_template_template_default_arg): A TYPE_DECL
2610 is invalid. Rework to give better diagnostics.
2612 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2615 * pt.c (instantiate_class_template): Add an error_mark_node
2617 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
2619 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
2622 * decl.c (finish_function): Move the call to
2623 finish_fname_decls below the call to
2624 finish_eh_spec_block.
2626 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
2628 * optimize.c, typeck2.c: Update copyright.
2630 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
2632 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
2633 init.c, mangle.c, typeck.c: Update copyright.
2635 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
2637 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
2639 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
2641 * Make-lang.in: Replace $(docdir) with doc.
2642 (c++.info, c++.srcinfo): Dummy entry.
2643 (c++.man, c++.srcman): New rules.
2644 (c++.install-man): Revamp rule.
2646 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
2648 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
2649 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
2650 immediate $(shell) instead of deferred backquote.
2652 2004-01-19 Mark Mitchell <mark@codesourcery.com>
2655 * parser.c (cp_parser_postfix_expression): When encountering
2656 incomplete type on left-hand side of "->" or ".", treat the entire
2657 expression as erroneous.
2660 * call.c (build_field_call): Remove.
2661 (n_build_method_call): Likewise.
2662 (build_method_call): Likewise.
2663 (build_new_method_call): Do not call build_field_call.
2664 * class.c (n_build_method_call): Remove.
2665 (print_class_statistics): Do not print it.
2666 * cp-tree.h (build_method_call): Remove declaration.
2667 (finish_object_call_expr): Likewise.
2668 (build_new_1): Do not use build_method_call.
2669 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
2670 when the function appearing on the right-hand-side of "." or "->"
2671 is not actually a function.
2672 * pt.c (tsubst_copy_and_build): Likewise.
2673 * semantics.c (finish_object_call_expr): Remove.
2675 2004-01-18 Mark Mitchell <mark@codesourcery.com>
2678 * pt.c (tsubst): Use finish_typeof.
2680 2004-01-18 Jason Merrill <jason@redhat.com>
2683 * except.c (build_throw): In a template, set
2684 current_function_returns_abnormally.
2686 2004-01-17 Fred Fish <fnf@intrinsity.com>
2689 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
2690 except don't call array_type_nelts() with a VECTOR_TYPE.
2692 2004-01-16 Jan Hubicka <jh@suse.cz>
2694 * mangle.c (write_mangled_name): Remove inline modifier.
2696 2004-01-16 Mark Mitchell <mark@codesourcery.com>
2699 * decl.c (compute_array_index_type): Fix grammar in comment.
2700 * init.c (build_zero_init): Handle zero-sized arrays correctly.
2703 * call.c (name_as_c_string): Print conversion operator names
2707 * call.c (initialize_reference): Pass -1 for inner parameter to
2710 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2713 * parser.c (cp_parser_base_specifier): Check for an invalid
2714 keyword `typename' and emit an user-friendly error message.
2716 2004-01-15 Geoffrey Keating <geoffk@apple.com>
2719 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
2720 (handle_pragma_implementation): Likewise.
2722 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2725 * typeck.c (build_class_member_access_expr): Allow to access members
2726 of the currently open class.
2727 (finish_class_member_access_expr): Likewise.
2729 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
2732 * name-lookup.c (validate_nonmember_using_decl): Take scope and
2733 name by value, instead of computing them.
2734 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
2735 arguments. Pass them to validate_nonmember_using_decl.
2736 * name-lookup.h (do_local_using_decl): Adjust.
2737 (do_toplevel_using_decl): Likewise.
2738 * parser.c (cp_parser_using_declaration): Likewise.
2739 * pt.c (tsubst_expr): Likewise.
2741 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
2745 * name-lookup.c (qualified_lookup_using_namespace): Search
2746 strongly-associated namespaces first, and only then try other
2749 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
2751 * Make-lang.in (c++.srcextra): Dummy entry.
2753 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2756 * parser.c (cp_parser_template_name): Don't try to parse a
2757 conversion-function-id, as it cannot be a template-name.
2758 (cp_parser_simple_type_specifier): Check for invalid template-ids
2759 even after a built-in type.
2761 2004-01-14 Jan Hubicka <jh@suse.cz>
2764 * pt.c (instantiate_decl): Do not increase function_depth.
2766 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
2770 * parser.c (cp_parser_elaborated_type_specifier): Warn about
2771 attributes and discard.
2772 * decl.c (xref_tag): Don't overwite existing attributes with
2775 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2778 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
2779 is no destructor while looking up a BIT_NOT_EXPR.
2781 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
2783 * cxxfilt.c: Remove unused file.
2785 2004-01-14 Jan Hubicka <jh@suse.cz>
2787 Partial fix to PR c++/12850
2788 * decl2.c (mark_used): Do not proactively instantiate templates
2789 when compiling in unit-at-a-time or not optimizing.
2790 * optimize.c (maybe_clone_body): Do not increase function depth.
2792 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2795 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
2797 2004-01-12 Steven Bosscher <stevenb@suse.de>
2800 * parser.c (cp_parser_member_declaration): Any non-type is also
2801 not a class or a function.
2803 2004-01-12 Jason Merrill <jason@redhat.com>
2806 * class.c (build_base_path): Do not mark vtable references as
2808 (build_vtbl_ref_1): Likewise.
2810 2004-01-12 Richard Henderson <rth@redhat.com>
2813 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
2814 (store_init_value): Use it.
2815 * decl.c (check_initializer): Expect full initialization code
2816 from store_init_value.
2817 * init.c (expand_aggr_init_1): Likewise.
2818 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
2820 2004-01-12 Mark Mitchell <mark@codesourcery.com>
2822 * class.c (layout_class_type): For non-POD class types, also copy
2823 the DECL_SIZE and DECL_MODE of fields to the base class type.
2825 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2828 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
2829 calling regenerate_decl_from_template.
2831 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
2834 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
2835 decl-specifier occurring along with a class definition.
2837 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
2839 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
2840 clauses to comments describing declares_class_or_enum.
2841 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
2844 2004-01-12 Jan Hubicka <jh@suse.cz>
2846 * pt.c (for_each_template_parm): Do not check for duplicates.
2847 (for_each_template_parm): Use walk_tree duplicate checking code.
2849 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
2852 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
2853 is error_mark_node, don't add any more decl_specs.
2854 (cp_parser_init_declarator): After committing to a declaration, if
2855 the decl_specifiers start with error_mark_node, issue an error and
2856 change the type to "int".
2858 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
2861 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
2863 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2867 * pt.c (tsubst): Substitution must fail if we are attempting to
2868 create an array with element type that is an abstract class type.
2869 * decl.c (cp_finish_decl): Strip pointers and array types recursively
2870 before calling abstract_virtuals_error.
2872 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
2874 * name-lookup.c (qualified_lookup_using_namespace): Consider
2875 strong using directives even if we've already found a binding.
2877 2004-01-09 Mark Mitchell <mark@codesourcery.com>
2879 * cp-tree.h (cxx_expand_expr): Change prototype.
2880 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
2882 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2885 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
2886 looking into them recursively. They can be there because of the
2887 new __offsetof__ extension.
2889 2004-01-07 Zack Weinberg <zack@codesourcery.com>
2891 * parser.c (cp_parser_save_member_function_body): Mark the
2894 2004-01-05 Mark Mitchell <mark@codesourcery.com>
2897 * class.c (build_clone): Copy type attributes from the original
2898 function to the clone.
2901 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
2902 references as constant.
2905 * parser.c (cp_parser_explicit_instantiation): Improve error
2907 (cp_parser_require): Improve indication of the error location.
2910 * parser.c (cp_parser_class_head): Reorder logic to check for
2911 invalid qualification.
2913 2004-01-04 Mark Mitchell <mark@codesourcery.com>
2916 * name-lookup.c (lookup_using_namespace): Remove spacesp
2918 (unqualified_namespace_lookup): Likewise.
2919 (lookup_qualified_name): Adjust accordingly.
2920 (lookup_name_real): Likewise.
2921 (lookup_arg_dependent): Do not eliminate the namespace of the
2922 functions found by unqualified name lookup unless that is the
2925 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
2927 * semantics.c (push_deferring_access_checks): Fix format.
2928 (resume_deferring_access_checks): Likewise.
2929 (stop_deferring_access_checks): Likewise.
2930 (pop_deferring_access_checks): Likewise.
2931 (get_deferred_access_checks): Likewise.
2932 (pop_to_parent_deferring_access_checks): Likewise.
2933 (perform_deferred_access_checks): Likewise.
2934 (perform_or_defer_access_check): Likewise.
2936 2004-01-04 Richard Henderson <rth@redhat.com>
2938 * call.c (build_over_call): Don't create a save_expr of an
2939 aggregate, but rather its address.
2941 2004-01-04 Mark Mitchell <mark@codesourcery.com>
2944 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
2945 an offsetof expression.
2947 * parser.c (cp_parser_parameter_declaration): Fix comment.
2950 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
2951 (reference_binding): Set it when appropriate.
2952 (build_temp): New function, split out from ...
2953 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
2954 (initialize_reference): Likewise.
2957 * parser.c (cp_parser): Add in_type_id_in_expr_p.
2958 (cp_parser_new): Initialize it.
2959 (cp_parser_postfix_expression): Set it.
2960 (cp_parser_sizeof_operand): Likewise.
2961 (cp_parser_parameteR_declaration): Do not commit early to tenative
2962 parsers when in_type_id_in_expr_p is set.
2964 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2967 * parser.c (cp_parser_template_argument): Don't call
2968 make_unbound_class_template directly.
2969 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
2970 UNBOUND_CLASS_TEMPLATE tree node.
2972 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
2975 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
2977 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2980 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
2981 (DECL_FUNCTION_TEMPLATE_P): Use it.
2982 (DECL_CLASS_TEMPLATE_P): Likewise.
2983 * parser.c (cp_parser_lookup_name): Add is_template parameter.
2984 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
2985 (cp_parser_template_name): Likewise.
2986 (cp_parser_elaborated_type_specifier): Likewise.
2987 (cp_parser_namespace_name): Likewise.
2988 (cp_parser_class_name): Likewise.
2989 (cp_parser_lookup_name_simple): Likewise.
2991 See ChangeLog.3 for earlier changes.