1 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
3 * cp-tree.h (vec_binfo_member): Remove.
4 * tree.c (vec_binfo_member): Remove.
6 * cp-tree.h (struct lang_type_class): Remove vfields field.
7 (CLASSTYPE_VFIELDS): Remove.
8 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
9 * class.c (determine_primary_base): Remove CLASSTYPE_VFIELDS
11 (dfs_modify_vtables): Use TYPE_CONTAINS_VPTR_P.
12 (finish_struct_1): Remove CLASSTYPE_VFIELDS handling.
13 * init.c (dfs_initialize_vtbl_ptrs): Use TYPE_CONTAINS_VPTR_P.
15 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
17 * cp-tree.h (DEF_VEC_P(tree)): Remove here.
18 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
20 (BINFO_LANG_SLOTS): Remove.
21 * tree.c (copy_binfo): Adjust BINFO creation and accessors.
22 * decl.c (xref_basetypes): Adjust BINFO creation and accessors.
23 * class.c (check_bases): Adjust BINFO accessors.
24 (determine_primary_base, finish_struct_bits,
25 maybe_warn_about_overly_private_class, warn_hidden,
26 walk_subobject_offsets, propagate_binfo_offsets, end_of_class,
27 warn_about_ambiguous_bases, get_vfield_name,
28 dump_class_hierarchy_r, build_vtt_inits, accumulate_vtbl_inits,
29 add_vcall_offset_vtbl_entries_r): Likewise.
30 * dump.c (cp_dump_tree): Likewise.
31 * init.c (sort_mem_initializers, expand_member_init, build_delete,
32 push_base_cleanups): Likewise.
33 * method.c (do_build_copy_constructor, do_build_assign_ref,
34 synthesize_exception_spec): Likewise.
35 name-lookup.c (arg_assoc_class): Likewise.
36 * pt.c (instantiate_class_template,
37 get_template_base_recursive): Likewise.
38 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Likewise.
39 * typeck2.c (process_init_constructor): Likewise.
40 * search.c (lookup_base_r, dynamic_cast_base_recurse,
41 dfs_access_in_type, dfs_walk_real, look_for_overrides,
42 types_overlap_p, copied_binfo, original_binfo): Likewise.
43 (binfo_for_vtable): Remove
45 2004-07-20 Steven Bosscher <stevenb@suse.de>
47 * cp-tree.h (struct lang_decl_flags): Unify the template_info and
48 thunk_alias, and the access and virtual_offset fields.
49 (THUNK_VIRTUAL_OFFSET, THUNK_ALIAS): Adjust.
50 * decl.c (finish_case_label): Update c_add_case_node call.
52 2004-07-19 Mark Mitchell <mark@codesourcery.com>
54 Revert patch for PR c++/16623.
56 2004-07-19 Kelley Cook <kcook@gcc.gnu.org>
58 * except.c: Remove two spurious carriage returns.
60 2004-07-19 Mark Mitchell <mark@codesourcery.com>
63 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
64 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
65 * class.c (add_implicitly_declared_members): Use
66 CLASSTYPE_LAZY_ASSIGNMENT_OP.
67 * method.c (lazily_declare_fn): Clear
68 CLASSTYPE_LAZY_ASSIGNMENT_OP.
69 * search.c (lookup_fnfields_1): Check it.
71 2004-07-19 Nathan Sidwell <nathan@codesourcery.com>
73 * class.c (add_method): Delay adding the slot until the end.
74 (determine_primary_base): Adjust VEC_iterate invokation.
75 (resort_type_method_vec, finish_struct_methods, warn_hidden,
76 walk_subobject_offsets, end_of_class, warn_about_ambiguous_bases,
77 build_vtbl_initializer): Likewise.
78 * init.c (sort_mem_initializers, build_delete, push_base_cleanups,
79 build_vbase_delete): Likewise.
80 * method.c (do_build_copy_constructor): Likewise.
81 * name-lookup.c (new_class_binding, print_binding_level,
82 poplevel_class, store_class_bindings, push_to_top_level,
83 pop_from_top_level): Likewise.
84 * pt.c (check_explicit_specialization): Likewise.
85 * search.c (lookup_conversion_operator, lookup_fnfields_1,
86 get_pure_virtuals, add_conversions, dfs_check_overlap,
87 binfo_for_vbase): Likewise.
89 2004-07-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
92 * pt.c (unify) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Use only
93 innermost set of template arguments during deduction. Simplify.
95 2004-07-19 Joseph S. Myers <jsm@polyomino.org.uk>
97 * typeck.c (build_modify_expr, build_x_modify_expr): Set
98 TREE_NO_WARNING on assignments with an operator other than '='.
100 2004-07-10 Steven Bosscher <stevenb@suse.de>
101 Joseph S. Myers <jsm@polyomino.org.uk>
103 * cp-tree.h (C_SET_EXP_ORIGINAL_CODE): Remove.
104 * decl2.c (grokfield): Don't check current_class_depth via
105 unused TREE_COMPLEXITY.
106 * semantics.c (finish_parenthesized_expr): Set TREE_NO_WARNING
107 to avoid the missing parentheses warning.
108 Don't set C_SET_EXP_ORIGINAL_CODE.
110 2004-07-18 Mark Mitchell <mark@codesourcery.com>
112 * tree.c (no_linkage_helper): Remove.
113 (no_linkage_check): Don't use walk_tree_without_duplicates.
115 * mangle.c (write_expression): Issue a sorry for zero-operand
118 2004-07-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
121 * init.c (build_offset_ref): Build SCOPE_REF with non-null
122 TREE_TYPE for non-dependent names.
123 * typeck.c (build_x_unary_op): Handle non-dependent SCOPE_REF.
124 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
125 unknown_type_node as its TREE_TYPE.
126 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
127 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
128 (dump_expr) <SCOPE_REF case>: Likewise.
130 2004-07-17 Jason Merrill <jason@redhat.com>
133 * call.c (type_passed_as): Make the invisible reference type
135 * cp-gimplify.c (gimplify_cleanup_stmt): Rename to
136 cp_genericize_r. Handle invisible reference lowering.
137 (is_invisiref_parm): New fn.
138 (cp_genericize): Adjust the types of invisible reference parms.
139 Don't repeat the walk for clones.
140 * decl.c (store_parm_decls): Don't generate any code for clones.
142 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
144 * cp-tree.h (builtin_function): Declare.
146 2004-07-16 Mark Mitchell <mark@codesourcery.com>
148 * class.c (finish_struct_methods): Remove unncessary code.
149 (add_implicitly_declared_members): Create declarations for default
150 constructors and copy constructors lazily.
151 * cp-tree.h (lang_type_class): Remove lazy_default_ctor and
153 (CLASSTYPE_LAZY_DEFAULT_CTOR): New macro.
154 (CLASSTYPE_LAZY_COPY_CTOR): Likewise.
155 * decl2.c (check_classfn): Robustify.
156 (locate_dtor): Handle empty CLASSTYPE_METHOD_VEC.
157 (locate_ctor): Handle lazy default constructors.
158 (locate_copy): Handle lazy copy constructors.
159 (implicitly_declare_fn): Make sure we're looking at the
160 TYPE_MAIN_VARIANT for a class before creating functions. Don't
161 set TYPE_HAS_CONSTRUCTOR.
162 (lazily_declare_fn): New function.
163 * name-lookup.c (constructor_name_full): Simplify.
164 * search.c (lookup_fnfields_1): Lazily create methods, as
166 (lookup_for_overrides): Handle empty CLASSTYPE_METHOD_VEC.
168 2004-07-16 Steven Bosscher <stevenb@suse.de>
170 * cp-tree.h (struct lang_type): Don't have three GTY options on a
173 2004-07-16 Richard Henderson <rth@redhat.com>
175 * cp-lang.c (LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING): Die.
176 * cp-tree.h (cp_copy_res_decl_for_inlining): Remove.
177 * tree.c (cp_copy_res_decl_for_inlining): Remove.
179 2004-07-16 Nathan Sidwell <nathan@codesourcery.com>
181 * class.c (finish_struct_bits): Use for loop.
182 (propagate_binfo_offsets): Do primary binfo outside of loop.
185 * dump.c (cp_dump_tree): Don't dump the bases if there's no
188 * pt.c (tsubst) <TREE_BINFO case>: We should never get here.
190 2004-07-15 Mark Mitchell <mark@codesourcery.com>
192 * cp-tree.h (lang_type_class): Remove has_real_assign_ref and
193 has_abstract_assign_ref. Make methods a VEC(tree) *.
194 (TYPE_HAS_CONST_ASSIGN_REF): Add documentation.
195 (CLASSTYPE_CONSTRUCTORS): Adjust for changes to CLASSTYPE_METHOD_VEC.
196 (CLASSTYPE_DESTRUCTORS): Likewise.
197 (TYPE_HAS_REAL_ASSIGN_REF): Remove.
198 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
199 (add_method): Change prototoype.
200 * class.c (add_method): Remove error_p parameter. Adjust for
201 changes to CLASSTYPE_METHOD_VEC.
202 (handle_using_decl): Adjust call to add_method.
203 (maybe_warn_about_overly_private_class): Adjust for
204 changes to CLASSTYPE_METHOD_VEC.
205 (resort_type_method_vec): Likewise.
206 (finish_struct_methods): Likewise.
207 (check_for_override): Likewise.
208 (warn_hidden): Likewise.
209 (add_implicitly_declared_members): Defer creation of assignment
210 operators. Adjust call to add_method.
211 (clone_function_decl): Adjust call to add_method.
212 (check_bases_and_members): Don't set TYPE_HAS_REAL_ASSIGN_REF.
213 (finish_struct_1): Use CLASSTYPE_DESTRUCTORS.
214 * decl.c (grok_special_member_properties): Don't set
215 TYPE_HAS_ABSTRACT_ASSIGN_REF.
216 * decl2.c (check_classfn): Adjust for
217 changes to CLASSTYPE_METHOD_VEC.
218 * method.c (locate_dtor): Use CLASSTYPE_DESTRUCTORS.
219 (locate_ctor): Use CLASSTYPE_CONSTRUCTORS.
220 (locate_copy): Adjust for changes to CLASSTYPE_METHOD_VEC.
221 (implicitly_declare_fn): Set DECL_SOURCE_LOCATION. Do not call
223 * pt.c (check_explicit_specialization): Adjust for
224 changes to CLASSTYPE_METHOD_VEC.
225 (instantiate_class_template): Do not set
226 TYPE_HAS_ABSTRACT_ASSIGN_REF.
227 * ptree.c (cxx_print_type): Don't try to print
228 CLASSTYPE_METHOD_VEC.
229 * rtti.c (emit_support_tinfos): Use CLASSTYPE_DESTRUCTORS.
230 * search.c (lookup_field_r): Adjust for
231 changes to CLASSTYPE_METHOD_VEC.
232 (lookup_fnfields): Likewise.
233 (lookup_conversion_operator): Likewise.
234 (lookup_fnfields_1): Likewise. Create assignment operators
236 (look_for_overrides_here): Adjust for
237 changes to CLASSTYPE_METHOD_VEC.
238 (add_conversions): Likewise.
239 * semantics.c (finish_member_declaration): Adjust call to add_method.
241 2004-07-15 Jason Merrill <jason@redhat.com>
243 * cp-lang.c (cxx_types_compatible_p): To the middle-end,
244 references and pointers are compatible.
246 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
248 * decl.c (xref_basetypes): Refactor.
249 * tree.c (copy_base_binfos): Replace with ...
250 (copy_binfo): ... this. Deep copy the given binfo, (not the just
251 bases of the given base).
252 * cp-tree.h (copy_base_binfo): Remove.
253 (copy_binfo): Declare.
255 2004-07-15 Mark Mitchell <mark@codesourcery.com>
257 * name-lookup.c (set_inherited_value_binding_p): Add class_type
259 (get_class_binding): Adjust.
260 (push_class_level_binding): Don't use set_inherited_value_binding_p.
262 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
264 * class.c (finish_struct_bits): Don't set TYPE_HAS_CONVERSION here.
265 * decl.c (xref_basetypes): Set it here.
267 * class.c (check_bases): Don't set CLASSTYPE_NON_AGGREGATE here.
268 Don't check for incomplete base.
269 (get_vfield_name): Simplify while loop.
270 * decl.c (xref_basetypes): Set CLASSTYPE_NON_AGGREGATE here.
272 2004-07-14 Mark Mitchell <mark@codesourcery.com>
274 * lex.c (cxx_make_type): Remove call to get_pointer_type.
276 * cp-tree.h (IDENTIFIER_VALUE): Remove.
277 (BINFO_PUSHDECLS_MARKED): Likewise.
278 (maybe_inject_for_scope_var): Likewise.
279 (push_class_decls): Likewise.
280 * name-lookup.h (push_class_binding): Remove.
281 (innermost_non_namespace_value): New function.
282 (outer_binding): Likewise.
283 * class.c (add_method): Push bindings before adding to
285 (restore_class_cache): Do not restore class_shadowed.
286 (pushclass): Do not add USING_DECLs. Do not call
288 * config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c.
289 * decl.c (pushdecl): Use outer_binding.
290 (poplevel): Set the scope for an out-of-scope for-loop declaration
292 (cp_finish_decl): Don't call maybe_inject_for_scope_var.
293 * name-lookup.c (new_class_binding): New function.
294 (push_binding): Use it.
295 (pushdecl): Use innermost_non_namespace_value.
296 (maybe_inject_for_scope_var): Remove.
297 (push_class_binding): Remove.
298 (set_inherited_value_binding_p): New function.
299 (get_class_binding): New function.
300 (push_class_level_binding): Assert that the current_class_type is
302 (outer_binding): New function.
303 (innermost_non_namespace_value): Likewise.
304 (lookup_name_real): Use outer_binding.
305 (lookup_name_current_level): Ignore out-of-scope variables.
306 * pt.c (check_template_shadow): Use innermost_non_namespace_value.
307 (lookup_template_class): Likewise.
308 * search.c (dfs_push_type_decls): Remove.
309 (dfs_push_decls): Likewise.
310 (setup_class_bindings): Likewise.
311 (lookup_field_1): Handle USING_DECLs from dependent scopes.
312 (marked_pushdecls_p): Remove.
313 (unmarked_pushdecls_p): Remove.
314 (marked_identifiers): Remove.
315 (setup_class_bindings): Remove.
316 (dfs_push_type_decls): Remove.
317 (dfs_push_decls): Remove.
318 (push_class_decls): Remove.
320 2004-07-13 Mark Mitchell <mark@codesourcery.com>
324 * decl.c (grokvardecl): Make declspecs parameter const.
325 (grokdeclarator): Likewise. Adjust accordingly.
326 * decl.h (grokdeclarator): Adjust declaration.
327 * parser.c (cp_parser_init_declarator): Do not clear
328 decl_specifiers->attributes.
330 * cp-tree.h (lang_identifier): Remove class_value.
331 (IDENTIFIER_CLASS_VALUE): Remove.
332 (pop_class_decls): Likewise.
333 (init_search_processing): Likewise.
334 * class.c (handle_using_decl): Use lookup_member, not
335 IDENTIFIER_CLASS_VALUE.
336 (restore_class_cache): New function, split out from ...
337 (pushclass): ... here. Do not call clear_identifier_class_values.
338 (invalidate_class_lookup_cache): Do not clear
339 IDENTIFIER_CLASS_VALUE.
340 (popclass): Do not call pop_class_decls.
341 (maybe_note_name_used_in_class): Do not save names looked up after
342 the class is complete. Use lookup_member, not
343 IDENTIFIER_CLASS_VALUE.
344 * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
345 * decl.c (cxx_init_decl_processing): Do not call
346 init_search_processing.
347 * method.c (do_build_copy_constructor): Remove unnecessary code.
348 (do_build_assign_ref): Likewise.
349 * name-lookup.c (pushdecl): Use lookup_member, not
350 IDENTIFIER_CLASS_VALUE.
351 (set_identifier_type_value_with_scope): Set TREE_TYPE on the
353 (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
354 (push_class_binding): Do not set it.
355 (clear_identifier_class_values): Remove.
356 (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
357 (store_binding): Do not save it.
358 (pop_from_top_level): Do not restore it.
359 * name-lookup.h (cxx_saved_binding): Remove class_value.
360 (clear_identifier_class_values): Remove.
361 * ptree.c (cxx_print_identifier): Do not print
362 IDENTIFIER_CLASS_VALUE.
363 * search.c (search_obstack): Remove.
364 (push_stack_level): Remove.
365 (pop_stack_level): Remove.
366 (search_level): Remove.
367 (search_stack): Remove.
368 (lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
369 (setup_class_bindings): Use IDENTIFIER_MARKED, not
370 IDENTIFIER_CLASS_VALUE.
371 (marked_identifiers): New variable.
372 (push_class_decls): Clear IDENTIFIER_MARKED.
373 (pop_class_decls): Don't call pop_search_level.
374 (init_search_processing): Remove.
376 2004-07-12 Mark Mitchell <mark@codesourcery.com>
378 * cp-tree.h (get_aggr_typedef): Remove.
379 * init.c (get_aggr_typedef): Likewise.
381 * name-lookup.c (push_class_level_binding): Simplify.
383 2004-07-12 Andrew Pinski <apinski@apple.com>
387 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
389 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
392 2004-07-12 Eric Christopher <echristo@redhat.com>
394 * parser.c (cp_parser_class_head): Remove unused variable.
396 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
398 * decl.c (grok_op_properties): Reject [de-]allocation functions
399 declared in a namespace, or declared as static.
401 2004-07-12 Nathan Sidwell <nathan@codesourcery.com>
403 * cp-tree.h (make_binfo): Remove.
404 * decl.c (xref_basetypes): Use make_tree_binfo directly.
405 * tree.h (copy_base_binfos): Likewise.
406 (make_binfo): Remove.
408 * call.c (build_user_type_conversion_1, build_new_op,
409 check_constructor_callable, build_temp,
410 perform_direct_initialization_of_possible): Pass type directly to
411 lookup_fnfields & build_special_member_call.
412 (build_special_member_call): Accept a type, and complete it.
413 * class.c (finish_stuct_bits): Copy the BINFOs here.
414 * cvt.c (ocp_convert): Pass type directly to
415 build_special_member_call.
416 * decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
417 (xref_basetypes): Allocate the binfo here. Adjust.
418 * init.c (build_init, build_new_1): Pass type directly to
419 build_special_member_call.
420 * lex.c (cxx_make_type): Do not allocate binfo here.
421 * name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
422 * parser.c (cp_parser_class_head): Always call xref_basetypes.
423 * pt.c (instantiate_class_template): Likewise. Inhibit access
424 checking for template friends.
425 * ptree.c (cxx_print_type): Adjust record printing.
426 * search.c (lookup_base): When taking a type, complete it before
428 (lookup_member): Delay completing a type.
429 (push_class_decls): Don't walk an incomplete type.
430 (lookup_conversions): Likewise.
431 * semantics.c (finish_stmt_expr_expr): Pass type directly to
432 build_special_member_call.
433 * tree.c (copy_base_binfos): Adjust.
434 (make_binfo): Likewise.
435 * typeck.c (build_modify_expr): Pass type directly to
436 build_special_member_call.
437 * typeck2.c (process_init_constructor): Check a binfo exists.
438 (build_m_component_ref): Allow accessing an incomplete type.
439 (build_functional_cast): Pass type directly to
440 build_special_member_call.
442 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
445 * config-lang.in (gtfiles): Add typeck2.c.
446 * Make-lang.in: Tweak typeck2.c dependencies, and add rule for
448 * cp-tree.h: Declare complete_type_check_abstract.
449 * typeck2.c (pat_calc_hash, pat_compare,
450 complete_type_check_abstract): New functions.
451 (abstract_virtuals_error): If the type is abstract, register the
452 declaration within abstract_pending_vars for further checks.
453 Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
454 * decl.c (cp_finish_decl): Do not strip array types.
455 (create_array_type_for_decl): Check for abstractness of the element
457 (complete_vars): Call complete_type_check_abstract.
458 * class.c (finish_struct): Prepare a list of virtual functions for
459 template types, and call complete_vars on it to check for abstractness.
461 2004-07-12 Paolo Bonzini <bonzini@gnu.org>
463 PR tree-optimization/14107
464 * decl.c (finish_function): Remove temporary band-aid.
466 2004-07-11 Mark Mitchell <mark@codesourcery.com>
468 * call.c (build_operator_new_call): Avoid using push_to_top_level.
469 (build_new_op): Adjust call to lookup_function_nonclass.
470 * name-lookup.c (identifier_type_value): Adjust call to
472 (lookup_name_real): Add block_p parameter.
473 (lookup_name_nonclass): Adjust call to lookup_name_real.
474 (lookup_function_nonclass): Likewise.
475 (lookup_name): Likewise.
476 * name-lookup.h (lookup_name_real): Change prototype.
477 (lookup_name_nonclass): Likewise.
478 * parser.c (cp_parser_lookup_name): Likewise.
480 * cp-tree.h (saved_scope): Make old_bindings a vector.
481 (unuse_fields): Remove.
482 * name-lookup.h (cxx_saved_binding): Define it.
483 * class.c (pushclass): Don't use unuse_fields.
484 * name-lookup.c (cxx_saved_binding_make): Remove.
485 (store_binding): Add new bindings to a vector, using an
486 accumulator style, rather than adding them to a list.
487 (store_bindings): Adjust accordingly.
488 (store_class_bindings): Likewise.
489 (push_to_top_level): Likewise.
490 (pop_from_top_level): Likewise.
491 * optimize.c (maybe_clone_body): Must push_to_top_level and
492 pop_from_top_level calls outside of loop.
493 * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope
494 calls here from cp_parser_late_parsing_default_args.
495 (cp_parser_save_default_args): Record the class type in which the
496 function is declared.
497 (cp_parser_late_parsing_default_args): Do not call
498 push_nested_class/pop_nested_class.
499 * search.c (dfs_unuse_fields): Remove.
500 (unuse_fields): Remove.
502 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
504 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
505 LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
506 * cp-tree.h (poplevel): Declare.
508 * decl.c (set_block): Remove.
510 2004-07-10 Mike Stump <mrs@apple.com>
512 * decl2.c (import_export_class): Never export/import vtables
513 with inline key functions.
515 2004-07-09 Steven Bosscher <stevenb@suse.de>
517 * typeck.c (c_expand_asm_operands): Remove.
519 2004-07-09 Mike Stump <mrs@apple.com>
521 * typeck.c (build_class_member_access_expr): Skip null deref
522 warning when we don't dereference it.
524 2004-07-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
528 * class.c (check_field_decls): Improve -Weffc++ warning: do not
529 warn for pointers to functions/members, or for classes without
532 2004-07-08 Mark Mitchell <mark@codesourcery.com>
534 * name-lookup.h (struct cp_binding_level): Update documentation
537 2004-07-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
540 * typeck.c (check_return_expr): Improve -Weffc++ warning: handle
541 returning CALL_EXPR, and non-reference return type.
543 2004-07-08 Nathan Sidwell <nathan@codesourcery.com>
545 * name-lookup.c (push_binding): Use VEC_reserve.
547 2004-07-08 Richard Henderson <rth@redhat.com>
549 * cp-tree.h (expand_eh_spec_block): Remove.
551 2004-07-07 Mark Mitchell <mark@codesourcery.com>
553 * cp-tree.h (saved_scope): Remove x_previous_class_type and
554 x_previous_class_values; add x_previous_class_level.
555 (previous_class_type): Remove.
556 (previous_class_values): Remove.
557 (previous_class_level): New macro.
558 * class.c (pushclass): Restore the identifier cache more
560 (invalidate_class_lookup_cache): Use vector for class_shadowed and
561 previous_class_values.
562 * decl.c (poplevel): Likewise.
563 * name-lookup.c (cxx_binding_init): New function.
564 (cxx_binding_make): Use it.
565 (push_binding): For a binding in a class level, use a vector of
566 cp_class_binding nodes.
567 (push_binding_level): New function.
568 (begin_scope): Use it.
569 (leave_scope): Do not put class binding levels on the free list.
570 (print_binding_level): Adjust for the fact that class_shadowed is
572 (poplevel_class): Likewise.
573 (clear_identifier_class_values): Likewise.
574 (push_class_level_binding): Likewise.
575 (set_class_shadows): Remove.
576 (store_binding): New function.
577 (store_class_bindings): New function.
578 (push_to_top_level): Use store_class_bindings as appropriate.
579 (pop_from_top_level): Use previous_class_level, not
581 * name-lookup.h (cp_class_binding): New type.
582 (cp_binding_level): Use a vector object for class_shadowed.
583 (push_binding_level): Declare.
584 (set_class_shadows): Remove.
586 2004-07-07 Andrew Pinski <apinski@apple.com>
588 * class.c (instantiate_type): BUFFER_REF is dead.
589 * lex.c (init_operators): IN_EXPR is dead.
591 2004-07-07 Jason Merrill <jason@redhat.com>
594 * call.c (build_new_op): Give overload warnings for built-in
597 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
600 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
603 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
605 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
606 * class.c (build_primary_vtable, check_bases,
607 determine_primary_base, finish_struct_bits,
608 maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
609 get_basefndecls, warn_hidden, walk_subobject_offsets,
610 build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
611 layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
612 finish_struct_1, get_vfield_name, contains_empty_class_p,
613 dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
614 dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
615 add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
617 * decl.c (xref_basetypes): Likewise.
618 * dump.c (cp_dump_tree): Likewise.
619 * error.c (dump_expr): Likewise.
620 * init.c (sort_mem_initializers, expand_member_init,
621 push_base_cleanups): Likewise.
622 * method.c (do_build_copy_constructor, do_build_assign_reg,
623 synthesize_exception_spec): Likewise.
624 * name-lookup.c (arg_assoc_class): Likewise.
625 * pt.c (instantiate_class_template, tsubst,
626 get_template_base_recursive): Likewise.
627 * ptree.c (cxx_print_type): Likewise.
628 * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
629 * search.c (lookup_base_r, dynamic_cast_base_recurse,
630 dfs_access_in_type, access_in_type, lookup_field_queue_p,
631 bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
632 marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
633 dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
634 binfo_for_vtable, copied_binfo, original_binfo): Likewise
635 * tree.c (copy_base_binfos, make_binfo): Likewise.
636 * typeck.c (commmon_base_type): Likewise
637 * typeck2.c (process_init_constructor): Likewise
639 2004-07-06 Joseph S. Myers <jsm@polyomino.org.uk>
641 * decl.c (check_tag_decl): Name redeclared type in diagnostic.
643 2004-07-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
646 * pt.c (convert_nontype_argument): Disallow conversions between
647 different enumeration types.
649 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
651 * cp-tree.h (BINFO_MARKED): Remove.
652 (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
653 BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
654 BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
655 (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
656 * class.c (build_base_path): Use BINFO_VIRTUAL_P.
657 (mark_primary_bases, determine_primary_base, base_derived_from,
658 dfs_find_final_overrider, dfs_find_final_overrider_q,
659 dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
660 dfs_modify_vtables, walk_subobject_offsets,
661 layout_nonempty_base_or_field, build_base_field,
662 build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
663 end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
664 finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
665 build_ctor_vtbl_group, accumulate_vtble_inits,
666 dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
667 build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
668 add_vcall_offset_vtbl_entries_1): Likewise.
669 * decl.c (xref_basetypes): Incomming virtual base indicated by
671 * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
672 * init.c (finish_init_stmts, sort_mem_initializers,
673 emit_mem_initializers, build_vtble_address, expand_member_init,
674 push_base_cleanups): Likewise.
675 * method.c (do_build_copy_constructor): Likewise.
676 * pt.c (instantiate_class_template,
677 get_template_base_recursive): Likewise.
678 * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
679 get_pseudo_ti_desc): Likewise.
680 * search.c (lookup_base_r, dynamic_cast_base_recurse,
681 binfo_from_vbase, binfo_via_virtual, copied_binfo,
682 original_binfo): Likewise.
683 * semantics.c (finish_base_specifier): Virtualness is indicated
685 * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
687 2004-07-06 Mark Mitchell <mark@codesourcery.com>
690 2004-06-24 Jason Merrill <jason@redhat.com>
692 * decl.c (grokparms): Give the PARM_DECL reference type if the
693 parameter is passed by invisible reference.
695 2004-07-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
697 * cp-lang.c (cp_var_mod_type_p): Add extra arg.
698 * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
699 * pt.c (check_instantiated_args, unify): Likewise.
701 2004-07-05 Phil Edwards <phil@codesourcery.com>
703 * Make-lang.in (check-c++, lang_checks): Add some comments.
705 2004-07-05 Zack Weinberg <zack@codesourcery.com>
707 * cp-mudflap.c: Delete file.
708 * Makefile.in: Remove all references to cp-mudflap.o.
710 2004-07-05 Zack Weinberg <zack@codesourcery.com>
712 * decl.c (cxx_init_decl_processing): Call
713 build_common_tree_nodes before creating the global NAMESPACE_DECL.
715 2004-07-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
718 * call.c (build_operator_new_call): Look only at global scope.
720 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
722 * call.c (enforce_access): Expect TREE_BINFO.
723 * class.c (binfo_ctor_vtable): Check TREE_BINFO.
724 * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
725 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
727 (BINFO_LANG_ELTS): Remove.
728 (BINFO_LANG_SLOTS): New.
729 (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
730 (CLASSTYPE_TEMPLATE_INFO): Adjust.
731 * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
732 * search.c (lookup_member): Check TREE_BINFO.
733 * semantics.c (perform_or_defer_access_check): Likewise.
734 (check_accessibility_of_qualified_id): Check
735 deferred_access_no_check.
736 * tree.c (make_binfo): Use make_tree_binfo.
738 2004-07-04 Mark Mitchell <mark@codesourcery.com>
740 * method.c (implicitly_declare_fn): Set linkage of generated
743 2004-07-04 Richard Henderson <rth@redhat.com>
745 * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
747 2004-07-03 Scott Brumbaugh <scottb.lists@verizon.net>
750 * name-lookup.c (push_class_level_binding): Don't pass a
751 TREE_LIST of ambiguous names to check_template_shadow as it
752 only handles declarations. Instead, pull the declaration
755 2004-07-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
758 * pt.c (check_explicit_specialization): Clarify error message.
760 2004-07-02 Richard Henderson <rth@redhat.com>
762 * tree.c (cp_unsave_r): Update remap_save_expr call.
764 2004-07-02 Mark Mitchell <mark@codesourcery.com>
767 * mangle.c (write_template_arg): Correct mangling.
770 * decl.c (grokdeclarator): Robustify.
772 2004-07-01 Richard Henderson <rth@redhat.com>
774 * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
775 * method.c (synthesize_method): Don't clear_last_expr.
776 * name-lookup.c (maybe_push_cleanup_level): Likewise.
778 2004-07-01 Nick Clifton <nickc@redhat.com>
780 * decl2.c (import_export_class): Invoke the
781 import_export_class field in the gcc_target structure if it is not
784 2004-06-30 Richard Henderson (rth@redhat.com>
786 * decl.c (start_preparsed_function): Don't set immediate_size_expand.
787 * method.c (use_thunk): Likewise.
789 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
791 * call.c (build_over_call), typeck.c (build_function_call): Call
792 check_function_arguments instead of check_function_format.
794 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
796 * call.c (build_over_call), typeck.c (build_function_call): Update
797 calls to check_function_format.
799 2004-06-30 Richard Henderson <rth@redhat.com>
801 * call.c (build_over_call): Use __builtin_memcpy for copying
802 CLASS_AS_BASE rather than funny casting.
804 2004-06-30 Richard Henderson <rth@redhat.com>
806 * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
807 TYPE_SIZE_UNIT of full_type.
809 2004-06-30 Per Bothner <per@bothner.com>
811 Conditionally compile support for --enable-mapped_location.
812 * decl.c (pop_label): Handle (imperfectly) USE_MAPPED_LOCATION case.
813 * decl2.c: If USE_MAPPED_LOCATION, don't do some line number
814 adjustments - which I don't understand.
815 * error.c (dump_decl): Rename "<interrnal>" to "<built-in>".
816 * error.c: Use LOCATION_FILE and EXPR_LOCATION macros.
817 (print_instantiation_partial_context): Use expand_location.
818 * decl.c (duplicate_decl): Use new DECL_IS_BUILTIN macro.
819 * name-lookup.c: Likewise.
820 * lex.c (cxx_init): Likewise. Also use BUILTINS_LOCATION.
821 * name-lookup.c: Use input_line macro.
822 * parser.c (cp_lexer_get_preprocessor_token): Use UNKNOWN_LOCATION.
823 (cp_parser_statement): Rename locaal variable statement_locus to
824 statement_location and use SET_EXPR_LOCATION macro.
825 * pt.c: Handle USE_MAPPED_LOCATION case. Use new macros.
826 * tree.c (cp_walk_subtrees): Likewise.
828 2004-06-29 Per Bothner <per@bothner.com>
830 * tree.c (build_min_nt, build_min, build_min_non_dep):
831 Don't set TREE_COMPLEXITY from input_line.
833 2004-06-29 Paul Brook <paul@codesourcery.com>
835 * init.c: Include target.h.
836 (get_cookie_size): Remove and replace with target hook.
838 (build_new_1): Store the element size in the cookie.
840 2004-06-29 Nathan Sidwell <nathan@codesourcery.com>
843 * parser.c (cp_parser_template_declaration_after_export): Disable
844 access checks here ...
845 (cp_parser_class_specifier): ... not here.
847 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
849 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
850 VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
851 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
854 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
856 * cp-tree.h (struct deferred_access): Move to ...
857 * semantics.c (struct deferred_access): ... here. Adjust.
858 (deferred_access_stack): Make a VEC(deferred_access),
859 (deferred_access_free_list): Remove.
860 (deferred_access_no_check): New.
861 (push_deferring_access_checks, resume_deferring_access_checks,
862 stop_deferring_access_checks, pop_deferring_access_checks,
863 get_deferred_access_checks, pop_to_parent_deferring_access_checks,
864 perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
866 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
869 * call.c (build_temp): Declare.
870 (check_constructor_callable): New.
871 (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
872 CONSTRUCTOR_CALLABLE.
873 (convert_like_real, initialize_reference): Use
874 check_constructor_callable.
875 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
876 (LOOKUP_*): Renumber.
878 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
880 * friend.c (add_friend): Only perform access checks when context
882 * lex.c (cxx_make_type): Only create a binfo for aggregate types.
883 * parser.c (cp_parser_class_specifier): Disable access checks here
884 when parsing the body of a templated class.
885 * semantics.c (perform_or_defer_access_checks): Reorder to allow
886 NULL binfos when not checking access.
888 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
890 Use vector API for vbase list.
891 * cp-tree.h: Include vec.h
892 (DEF_VEC_P (tree)): New type.
893 (struct lang_type_class): Change vbase's member type.
894 (binfo_for_vbase): Declare.
895 * class.c (determine_primary_base, base_derived_from,
896 update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
897 warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
898 build_vtbl_initializer): Adjust.
899 * decl.c (xref_basetypes): Adjust, accumulate upper bound of
901 * init.c (sort_mem_initializers, expand_member_init,
902 push_base_cleanups): Adjust.
903 * method.c (do_build_copy_constructor): Adjust.
904 * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
905 (binfo_for_vbase): New.
906 * tree.c (copy_base_binfos): Adjust.
908 2004-06-28 Mark Mitchell <mark@codesourcery.com>
910 * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
912 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
915 * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
916 paranthesis in case of pointers to array members.
917 * error.c (dump_type_prefix): Likewise.
918 (dump_type_suffix): Maybe issue a whitespace when printing
921 2004-06-27 Mark Mitchell <mark@codesourcery.com>
924 * parser.c (cp_parser_set_decl_spec_type): Refine test for
925 redefinition of built-in types.
927 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
929 * error.c (pp_template_argument_list_start): Remove.
930 (pp_template_argument_list_end): Likewise.
931 (pp_separate_with_comma): Use pp_cxx_separate_with.
932 (reinit_global_formatting_buffer): Remove.
933 (pp_non_consecutive_character): Likewise.
934 (dump_scope): Use pp_cxx_colon_colon.
935 (dump_template_parameter): Use pp_cxx_identifier,
936 pp_cxx_tree_identifier and pp_cxx_whitespace.
937 (dump_templat_bindings): Replace use of pp_string with sequence
938 of pp_cxx_whitespace and pp_equal.
939 (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
940 pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set
942 (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
943 (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace,
944 pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
945 (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
946 pp_cxx_right_bracket, pp_cxx_identifier throughout,
947 (dump_decl): Likewise.
948 (dump_template_decl): Likewise.
949 (dump_function_decl): Likewise. Set padding as appropriate.
950 (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
952 (dump_exception_spec): Likewise.
953 (dump_function_name): Use pp_cxx_tree_identifier and
955 (dump_template_parms): Use pp_cxx_begin_template_argument_list and
956 pp_cxx_end_template_argument_list.
957 (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
958 pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
959 pp_cxx_whitespace throughout.
960 (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
962 (dump_unary_op): Likewise.
963 (reinit_cxx_pp): New function.
964 (type_as_string); Use it.
965 (expr_as_string): Likewise.
966 (decl_as_string); Likewise.
967 (context_as_string): Likewise.
968 (lang_decl_name): Likewise.
969 (decl_to_string): Likewise.
970 (expr_to_string): Likewise.
971 (parm_to_string): Likewise.
972 (type_to_string): Likewise.
973 (args_to_string): Likewise.
974 (cv_to_string): Likewise.
976 2004-06-26 Mark Mitchell <mark@codesourcery.com>
978 * cp-tree.h (cp_cv_quals): New type.
979 (cp_declarator): Use it instead of "tree" as appropriate.
980 (grok_method_quals): Adjust prototype.
981 (grokclassfn): Likewise.
982 (do_friend): Likewise.
983 * decl.c (grokfndecl): Use cp_cv_quals, not tree.
984 (grokdeclarator): Likewise.
985 * decl2.c (grok_method_quals): Likewise.
986 (grokclassfn): Likewise.
987 * friend.c (do_friend): Likewise.
988 * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
989 * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
990 (make_pointer_declarator): Likewise.
991 (make_reference_declarator): Likewise.
992 (make_ptrmem_declarator): Likewise.
993 (cp_parser_ptr_operator): Likewise.
994 (cp_parser_cv_qualifier_seq_opt): Likewise.
995 (cp_parser_cv_qualifier_opt): Remove.
996 (cp_parser_new_declarator_opt): Adjust call to
997 cp_parser_ptr_operator.
998 (cp_parser_conversion_declaration_opt): Likewise.
999 (cp_parser_declarator): Use cp_cv_quals, not tree.
1000 (cp_parser_direct_declarator): Likewise.
1002 2004-06-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1004 * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
1005 Rename DECL_STMT to DECL_EXPR.
1006 * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
1007 * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
1008 * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
1010 2004-06-26 Jan Hubicka <jh@suse.cz>
1013 * decl2.c (maybe_emit_vtables): Always import_export_vtable for the
1014 reachability analysis.
1016 2004-06-25 Mark Mitchell <mark@codesourcery.com>
1018 * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
1021 2004-06-25 Paul Brook <paul@codesourcery.com>
1023 * decl2.c (get_guard): Call targetm.cxx.guard_type.
1024 (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
1026 2004-06-24 Mark Mitchell <mark@codesourcery.com>
1028 * decl.c (grokdeclarator): Restore error messages about __thread.
1029 * parser.c (cp_parser_decl_specifier_seq): Likewise.
1031 2004-06-24 Jason Merrill <jason@redhat.com>
1034 * decl.c (grokparms): Give the PARM_DECL reference type if the
1035 parameter is passed by invisible reference.
1037 2004-06-24 Andreas Schwab <schwab@suse.de>
1039 * cp-tree.h (enum cp_storage_class): Remove trailing comma.
1041 2004-06-23 Mark Mitchell <mark@codesourcery.com>
1043 * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
1044 (cp/decl.o): Likewise.
1045 (cp/decl2.o): Likewise.
1046 (cp/pt.o): Likewise.
1047 (cp/semantics.o): Likewise.
1048 * config-lang.in (gtfiles): Do not reference cp/lex.h.
1049 * class.c: Do not include lex.h.
1050 (add_implicitly_declared_members): Do not use
1051 adding_implicit_members.
1052 (check_bases_and_members): Do not talk about grok_x_components.
1053 * cp/cp-tree.h (adding_implicit_members): Remove.
1054 (cp_storage_class): New type.
1055 (cp_decl_spec): Likewise.
1056 (cp_decl_specifier_seq): Likewise.
1057 (cp_parameter_declarator): Use it for the decl_specifiers field.
1058 (check_tag_decl): Adjust prototype.
1059 (shadow_tag): Likewise.
1060 (groktypename): Likewise.
1061 (start_decl): Likewise.
1062 (start_function): Likewise.
1063 (start_method): Likewise.
1064 (grok_x_components): Remove.
1065 (grokfield): Adjust prototype.
1066 (grokbitfield): Likewise.
1067 (finish_member_class_template): Remove.
1068 * decl.c: Do not include lex.h.
1069 (adding_implicit_members): Do not define.
1070 (check_tag_decl): Do not use trees to represent decl-specifiers.
1071 (shadow_tag): Likewise.
1072 (groktypename): Likewise.
1073 (start_decl): Likewise.
1074 (grokvardecl): Likewise.
1075 (grokdeclarator): Likewise.
1076 (grokparms): Likewise.
1077 (start_function): Likewise.
1078 (start_method): Likewise.
1079 * decl.h (grokdeclarator): Adjust prototype.
1080 * decl2.c: Do not include lex.h.
1081 (grok_x_components): Remove.
1082 (grokfield): Do not use trees to represent decl-specifiers.
1083 (grokbitfield): Likewise.
1084 * lex.c: Do not include lex.h.
1086 * parser.c: Include target.h.
1087 (clear_decl_specs): New function.
1088 (cp_parser_translation_unit): Do not use trees to represent
1090 (cp_parser_postfix_expression): Likewise.
1091 (cp_parser_new_type_id): Likewise.
1092 (cp_parser_condition): Likewise.
1093 (cp_parser_simple_declaration): Likewise.
1094 (cp_parser_decl_specifier_seq): Likewise.
1095 (cp_parser_function_specifier_opt): Likewise.
1096 (cp_parser_conversion_type_id): Likewise.
1097 (cp_parser_template_parameter): Likewise.
1098 (cp_parser_explicit_instantiation): Likewise.
1099 (cp_parser_type_specifier): Likewise.
1100 (cp_parser_simple_type_specifier): Likewise.
1101 (cp_parser_init_declarator): Likewise.
1102 (cp_parser_type_id): Likewise.
1103 (cp_parser_type_specifier_seq): Likewise.
1104 (cp_parser_parameter_declaration): Likewise.
1105 (cp_parser_member_declaration): Likewise.
1106 (cp_parser_exception_declaration): Likewise.
1107 (cp_parser_function_definition_from_specifiers_and_declarator):
1109 (cp_parser_single_declaration): Likewise.
1110 (cp_parser_save_member_function_body): Likewise.
1111 (cp_parser_friend_p): Likewise.
1112 (cp_parser_set_storage_class): New function.
1113 (cp_parser_set_decl_spec_type): Likewise.
1114 * pt.c: Do not include lex.h.
1115 * semantics.c: Likewise.
1116 (finish_member_class_template): Remove.
1118 2004-06-23 Roger Sayle <roger@eyesopen.com>
1120 * call.c (build_cxx_call): Don't call expand_tree_builtin. No
1121 longer take both "args" and "convert_args" as arguments.
1122 (build_op_delete_call): Update call to build_cxx_call.
1123 (build_over_call): Likewise, update call to build_cxx_call.
1124 * cp-tree.h (build_cxx_call): Update funtion prototype.
1125 * typeck.c (build_function_call): Don't call expand_tree_builtin.
1126 * rtti.c (throw_bad_cast): Update call to build_cxx_call.
1127 (throw_bad_typeid): Likewise.
1128 (build_dynamic_cast_1): Likewise.
1130 2004-06-22 Richard Henderson <rth@redhat.com>
1132 * class.c (build_vfn_ref): Take a pointer not object. Build
1134 (cp_fold_obj_type_ref): New.
1135 * call.c (build_over_call): Update build_vfn_ref call.
1136 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
1137 * cp-tree.h (cp_fold_obj_type_ref): Declare.
1139 2004-06-21 Jason Merrill <jason@redhat.com>
1142 * cp-gimplify.c (cp_gimplify_init_expr): Look through
1145 2004-06-21 Mark Mitchell <mark@codesourcery.com>
1147 * cp-tree.def (NEW_EXPR): Add a fourth slot.
1148 * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
1149 (TREE_PARMLIST): Likewise.
1150 (CALL_DECLARATOR_PARMS): Likewise.
1151 (CALL_DECLARATOR_QUALS): Likewise.
1152 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
1153 (cp_declarator_kind): New type.
1154 (cp_parameter_declarator): Likewise.
1155 (cp_declarator): Likewise.
1156 (cp_error_declarator): Likewise.
1157 (no_parameters): Likewise.
1158 (groktypename): Change prototype.
1159 (start_decl): Likewise.
1160 (start_handler_parms): Likewise.
1161 (get_scope_of_declarator): Likewise.
1162 (start_function): Likewise.
1163 (start_preparsed_function): New function.
1164 (start_function): Change prototype.
1165 (start_method): Likewise.
1166 (grokfield): Likewise.
1167 (grokbitfield): Likewise.
1168 (build_new): Likewise.
1169 (make_pointer_declarator): Remove.
1170 (make_reference_declarator): Likewise.
1171 (make_call_declarator): Likewise.
1172 (set_quals_and_spec): Likewise.
1173 (process_template_parm): Change prototype.
1174 (begin_function_definition): Remove.
1175 (finish_parmlist): Remove.
1176 * decl.c (groktypename): Do not use trees to represent
1178 (start_decl): Likewise.
1179 (start_handler_parms): Remove.
1180 (get_scope_of_declarator): Reimplement.
1181 (grokdeclarator): Do not use trees to represent declarators.
1182 (grokparms): Likewise.
1183 (start_function): Likewise.
1184 (start_method): Likewise.
1185 (build_void_list_mode): Do not use TREE_PARMLIST.
1186 * decl.h (grokdeclarator): Change prototype.
1187 * decl2.c (grok_method_quals): Robustify.
1188 (grok_x_components): Do not use trees to represent declarators.
1189 (grokfield): Likewise.
1190 (grokbitfield): Likewise.
1191 (start_objects): Build FUNCTION_DECLs, not declarators.
1192 (start_static_storage_duration_function): Likewise.
1193 * init.c (build_new): Simplify.
1194 * lex.c (make_pointer_declarator): Remove.
1195 (make_reference_declarator): Likewise.
1196 (make_call_declarator): Likewise.
1197 (set_quals_and_spec): Likewise.
1198 * method.c (use_thunk): Use start_preparsed_function.
1199 (synthesize_method): Likewise.
1200 (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
1201 * optimize.c (maybe_clone_body): Use start_preparsed_function.
1202 * parser.c (cp_error_declarator): New variable.
1203 (declarator_obstack): Likewise.
1204 (alloc_declarator): New function.
1205 (make_declarator): Likewise.
1206 (make_id_declarator): Likewise.
1207 (make_pointer_declarator): Likewise.
1208 (make_reference_declarator): Likewise.
1209 (make_ptrmem_declarator): Likewise.
1210 (make_call_declarator): Likewise.
1211 (make_array_declarator): Likewise.
1212 (no_parameters): New variable.
1213 (make_parameter_declarator): Likewise.
1214 (cp_parser_check_for_definition_in_return_type): Do not use trees
1215 to represent declarators.
1216 (cp_parser_translation_unit): Likewise.
1217 (cp_parser_new_expression): Likewise.
1218 (cp_parser_new_type_id): Likewise.
1219 (cp_parser_new_declarator_opt): Likewise.
1220 (cp_parser_direct_new_declarator): Likewise.
1221 (cp_parser_condition): Likewise.
1222 (cp_parser_declaration_statement): Likewise.
1223 (cp_parser_declaration): Likewise.
1224 (cp_parser_conversion_type_id): Likewise.
1225 (cp_parser_conversion_declarator_opt): Likewise.
1226 (cp_parser_template_parameter_list): Likewise.
1227 (cp_parser_template_parameter): Likewise.
1228 (cp_parser_explicit_instantiation): Likewise.
1229 (cp_parser_init_declarator): Likewise.
1230 (cp_parser_declarator): Likewise.
1231 (cp_parser_direct_declarator): Likewise.
1232 (cp_parser_type_id): Likewise.
1233 (cp_parser_parameter_declaration_clause): Likewise.
1234 (cp_parser_parameter_declaration_list): Likewise.
1235 (cp_parser_parameter_declaration): Likewise.
1236 (cp_parser_member_declaration): Likewise.
1237 (cp_parser_exception_declaration): Likewise.
1238 (cp_parser_check_declarator_template_parameters): Likewise.
1239 (cp_parser_function_definition_from_specifiers_and_declarator):
1241 (cp_parser_save_member_function_body): Likewise.
1242 * pt.c (process_template_parm): Add is_non_type parameter.
1243 (convert_template_argument): Adjust call to groktypename.
1244 (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
1245 (tsubst): Do not expect declarators.
1246 (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
1248 (instantiate_decl): Use start_preparsed_function.
1249 * semantics.c (begin_function_definition): Remove.
1250 (finish_parmlist): Remove.
1251 * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
1254 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1256 * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
1257 (build_new_method_call): Likewise.
1258 * decl.c (local_variable_p_walkfn): Don't walk into types.
1259 * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
1260 (build_anon_union_vars): Add new operand for COMPONENT_REF.
1261 * init.c (buld_new): Add new operand for ARRAY_REF.
1262 * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
1263 (do_build_assign_ref): Likewise.
1264 * parser.c (cp_parser_direct_new_declarator): Add new operands
1266 (cp_parser_direct_declarator): Likewise.
1267 * pt.c (tsubst): Likewise.
1268 (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
1270 * semantics.c (finish_non_static_data_member): Add new operand
1272 * typeck.c (build_class_member_access_expr): Likewise.
1273 (build_class_member_access_expr, finish_class_member_access_expr):
1275 (build_ptrmemfunc_access_expr): Likewise.
1276 (build_array_ref): Add new operands for ARRAY_REF.
1277 * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
1278 * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
1280 2004-06-21 Richard Henderson <rth@redhat.com>
1282 * dump.c (cp_dump_tree): Don't use dump_next_stmt.
1283 * parser.c (cp_parser_jump_statement): Update commentary.
1284 * pt.c (tsubst_expr): Use RETURN_EXPR.
1285 * semantics.c (finish_return_stmt): Likewise.
1286 (finalize_nrv_r): Likewise.
1287 * typeck.c, typeck2.c: Update file start commentary.
1289 2004-06-21 Richard Henderson <rth@redhat.com>
1291 * semantics.c (finish_expr_stmt): Call verify_sequence_points.
1293 2004-06-20 Richard Henderson <rth@redhat.com>
1295 * cp-tree.h (add_decl_stmt): Declare.
1296 * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
1297 * semantics.c (maybe_cleanup_point_expr): New.
1298 (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
1299 finish_for_expr, finish_switch_cond): Use it.
1300 (finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN.
1302 2004-06-20 Richard Henderson <rth@redhat.com>
1304 * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
1305 * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
1306 (cp_gimplify_expr): Call it.
1307 (gimplify_cleanup_stmt): Move from c-gimplify.c.
1308 (cp_genericize): New.
1309 * decl.c (finish_function): Call it.
1310 * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
1311 (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
1312 (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
1313 (cp_genericize): Declare.
1314 * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
1315 * dump.c (cp_dump_tree): Likewise.
1316 * semantics.c (push_cleanup): Move from c-semantics.c.
1318 2004-06-20 Zack Weinberg <zack@codesourcery.com>
1320 * cp-lang.c (has_c_linkage): Implement.
1322 * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
1323 * decl.c (duplicate_decls): Use COPY_DECL_RTL.
1324 (builtin_function_1): Don't call make_decl_rtl.
1325 (build_cp_library_fn): Don't call set_mangled_name_for_decl.
1326 (grokvardecl): Don't call mangle_decl.
1327 * except.c (nothrow_libfn_p): Look at DECL_NAME, not
1328 DECL_ASSEMBLER_NAME.
1329 * method.c (set_mangled_name_for_decl): Delete.
1330 * name-lookup.c (pushdecl): When a local extern shadows a
1331 file-scope declaration of the same object, give both DECLs the
1333 * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
1334 on DECL_ASSEMBLER_NAME.
1336 2004-06-19 Richard Henderson <rth@redhat.com>
1338 * cp-gimplify.c: Remove unnecessary prototypes.
1339 (cp_gimplify_stmt): Merge into ...
1340 (cp_gimplify_expr): ... here. Move to end of file. Handle
1341 stmts_are_full_exprs_p frobbing.
1342 * cp-tree.h (cp_gimplify_stmt): Remove.
1343 * pt.c (tsubst_expr): Merge prep_stmt and unify.
1344 * tree.c (init_tree): Don't set lang_gimplify_stmt.
1346 2004-06-18 Richard Henderson <rth@redhat.com>
1349 * semantics.c (begin_cond): New.
1350 (finish_cond): Rewrite to handle template DECL_STMTs specially.
1351 Assume that non-template decls go land before the conditional.
1352 (simplify_loop_decl_cond): Likewise.
1353 (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
1354 finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
1355 begin_switch_stmt, finish_switch_cond): Update to match.
1357 2004-06-17 Jason Merrill <jason@redhat.com>
1360 * semantics.c (simplify_aggr_init_expr): Don't return the slot.
1361 (finish_stmt_expr_expr): Update type after conversions.
1362 (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
1363 Handle void initializer.
1364 * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
1366 2004-06-17 Geoffrey Keating <geoffk@apple.com>
1368 * class.c (build_clone): Don't call defer_fn, let mark_used do it.
1369 * cp-tree.h (defer_fn): Delete.
1370 * decl2.c (defer_fn): Delete.
1371 (finish_file): Simplify deferred_fns loops; check that
1372 only used inline functions get into deferred_fns.
1373 (mark_used): Inline previous contents of defer_fn.
1375 2004-06-16 Richard Henderson <rth@redhat.com>
1377 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
1378 (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
1379 * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
1380 of CTOR_INITIALIZER ...
1381 (pp_cxx_statement): ... here.
1382 * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
1383 (finish_function): Use alloc_stmt_list to zap entire function.
1384 * parser.c (cp_parser_compound_statement): Update commentary.
1385 * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
1386 * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
1387 (finish_stmt_expr): Don't look through COMPOUND_STMT.
1389 2004-06-16 Geoffrey Keating <geoffk@apple.com>
1391 * pt.c (mark_decl_instantiated): Don't call defer_fn.
1393 2004-06-16 Richard Henderson <rth@redhat.com>
1395 * parser.c (cp_parser_labeled_statement): Update commentary.
1396 * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
1397 * tree.c (mark_local_for_remap_r): Likewise.
1399 2004-06-16 Richard Henderson <rth@redhat.com>
1401 * parser.c (cp_parser_asm_definition): Update commentary.
1402 * pt.c (tsubst_expr): Use ASM_EXPR.
1403 * semantics.c (finish_asm_stmt): Likewise.
1405 2004-06-16 Richard Henderson <rth@redhat.com>
1407 * decl.c (finish_destructor_body): Use LABEL_EXPR.
1408 * parser.c (cp_parser_statement): Update commentary.
1409 * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
1410 * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
1411 * tree.c (mark_local_for_remap_r): Likewise.
1413 2004-06-16 Richard Henderson <rth@redhat.com>
1416 * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
1417 statement in FOR_INIT_STMT for templates.
1419 2004-06-15 Richard Henderson <rth@redhat.com>
1421 * call.c (initialize_reference): Don't build CLEANUP_STMT here.
1422 * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
1423 (genericize_try_block): Use gimplify_stmt.
1424 (genericize_catch_block, genericize_eh_spec_block): Likewise.
1425 (cp_gimplify_init_expr): Remove STMT_EXPR special case.
1426 (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
1427 * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
1428 (cp_tree_chain_matters_p): Remove.
1429 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
1430 (COMPOUND_STMT_BODY_BLOCK): New.
1431 (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
1432 (EXPR_STMT_STMT_EXPR_RESULT): New.
1433 (building_stmt_tree): Check cur_stmt_list.
1434 (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
1435 (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
1436 * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
1437 (cp_finish_decl): Use push_cleanup.
1438 (start_function, finish_function): Use statement lists.
1439 (finish_stmt): Do nothing.
1440 * except.c (begin_eh_spec_block): Use statement lists.
1441 (check_handlers_1, check_handlers): Likewise.
1442 * init.c (construct_virtual_base): Don't add extra compound stmts.
1443 (build_vec_init): Likewise.
1444 * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
1445 * name-lookup.h (struct cp_binding_level): Add statement_list.
1446 * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
1447 (cp_parser_labeled_statement, cp_parser_expression_statement,
1448 cp_parser_statement_seq_opt): Likewise.
1449 (cp_parser_compound_statement): Likewise. Take bool for try block.
1450 (cp_parser_selection_statement): Tidy if processing.
1451 (cp_parser_already_scoped_statement): Rewrite to do what it says.
1452 * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
1453 (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST.
1454 Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
1455 * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
1456 (finish_cond): New, rewritten from FINISH_COND.
1457 (simplify_loop_decl_cond): New.
1458 (finish_expr_stmt): Avoid nested EXPR_STMTs.
1459 (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
1460 begin_else_clause, finish_else_clause, finish_if_stmt,
1461 begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
1462 begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
1463 finish_for_cond, finish_for_stmt, begin_switch_stmt,
1464 finish_switch_cond, finish_switch_stmt, begin_try_block,
1465 finish_try_block, finish_cleanup_try_block, finish_function_try_block,
1466 finish_handler_sequence, finish_function_handler_sequence,
1467 begin_handler, finish_handler_parms, finish_handler,
1468 begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
1469 using statement lists.
1470 (begin_compound_stmt): Replace has_no_scope argument with flags.
1471 Update all callers. Use statement lists.
1472 (finish_compound_stmt): Likewise.
1473 (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
1474 (current_scope_stmt_stack): Remove.
1475 (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
1476 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
1477 Rewrite with statement lists.
1479 2004-06-15 Alexandre Oliva <aoliva@redhat.com>
1481 * parser.c: Change all assignments of c_lex_string_translate
1482 to true and false to 1 and 0.
1483 (cp_lexer_read_token): Convert type of the translated string.
1484 (cp_parser_skip_to_closing_parentheses): Preserve original
1485 value of c_lex_string_translate, and set it to -1 while
1487 (cp_parser_cache_group): Likewise.
1488 (cp_parser_cache_group_1): Renamed.
1489 (cp_parser_asm_operand_list): Remove redundant setting of
1490 c_lex_string_translate.
1491 (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
1492 Handle chained strings.
1494 2004-06-12 Andrew Pinski <apinski@apple.com>
1498 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
1500 * cp-tree.h: Fix typo.
1502 * cp-tree.h: Include cgraph.h
1503 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
1504 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
1506 2004-06-12 Jason Merrill <jason@redhat.com>
1508 PR tree-optimization/14107
1509 * decl.c (finish_function): Warn about no return in all functions.
1511 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
1513 * cp-tree.h (struct language_function): Remove cannot_inline.
1514 * decl.c (save_function_data): cannot_inline is no more.
1515 (cxx_push_function_context): Likewise.
1516 * decl2.c (start_objects, start_static_storage_duration_function):
1517 Reset DECL_INLINE, set DECL_UNINLINABLE.
1519 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1522 * search.c (lookup_field): Propagate the ambiguity list.
1523 (lookup_fnfields): Likewise.
1525 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1528 * parser.c (cp_parser_template_name): Ctors/dtors never need a
1529 template keyword to disambiguate.
1531 2004-06-14 Mark Mitchell <mark@codesourcery.com>
1534 * decl.c (grokdeclarator): Ignore pointer-to-members when
1535 computing template depth.
1538 * name-lookup.c (pushtag): Do not try to put class declarations in
1539 explicit specialization scopes.
1541 2004-06-11 Andrew Pinski <pinskia@physics.uc.edu>
1543 * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
1545 2004-06-11 Mark Mitchell <mark@codesourcery.com>
1548 * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
1549 bindings for undeclared built-ins.
1551 2004-06-11 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1553 * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
1554 appear at the correct location.
1556 2004-06-10 Jason Merrill <jason@redhat.com>
1560 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1561 * init.c (build_offset_ref): Build SCOPE_REF with non-null
1562 TREE_TYPE for non-dependent names.
1563 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
1564 unknown_type_node as its TREE_TYPE.
1565 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
1566 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
1567 (dump_expr) <SCOPE_REF case>: Likewise.
1569 2004-06-10 Mark Mitchell <mark@codesourcery.com>
1572 * parser.c (cp_parser_direct_declarator): Robustify.
1575 * pt.c (tsubst_copy): Use decl_constant_value on enumeration
1576 constants in non-dependent contexts.
1580 * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
1583 2004-06-10 Jakub Jelinek <jakub@redhat.com>
1586 * decl.c (duplicate_decls): Handle fileptr_type_node arguments
1589 2004-06-09 Mark Mitchell <mark@codesourcery.com>
1593 2004-06-07 Mark Mitchell <mark@codesourcery.com>
1594 * lex.c (handle_pragma_interface): Deprecate.
1595 (handle_pragma_implementation): Likewise.
1597 2004-06-09 Andrew Pinski <pinskia@physics.uc.edu>
1599 * g++spec.c (lang_specific_driver): Remove check for -lm
1600 and -lmath when check it see if it was the math library.
1602 2004-06-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1605 * parser.c (cp_parser_direct_declarator): Reject constructor named
1606 as qualified template-id.
1608 2004-06-07 Mark Mitchell <mark@codesourcery.com>
1611 * lex.c (handle_pragma_interface): Deprecate.
1612 (handle_pragma_implementation): Likewise.
1614 2004-06-07 Mark Mitchell <mark@codesourcery.com>
1617 * parser.c (cp_parser_iteration_statement): Fix typo in error
1621 * pt.c (tsubst_default_argument): Do not defer access checks
1622 while substituting into the default argument.
1625 * pt.c (tsubst_copy): Do not try to substitute for an enumeration
1626 constant in a non-dependent context.
1629 * except.c (build_throw): Ensure that temp_expr has been
1632 2004-06-06 Roger Sayle <roger@eyesopen.com>
1634 * cp/cp-tree.h (lvalue_or_else): Add function prototype.
1636 2004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1639 * parser.c (cp_parser_mem_initializer_id): Gracefully reject
1640 'typename', and accept 'template'.
1642 2004-06-03 Andrew Pinski <pinskia@physics.uc.edu>
1643 Jan Hubicka <jh@suse.cz>
1646 * method.c (use_think): Do not mark thunk as referenced.
1648 2004-06-03 Matt Austern <austern@apple.com>
1651 * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
1652 is nonzero, and if we see a noninline definition of a key method,
1653 make the vtables nonweak.
1655 2004-06-02 Matt Austern <austern@apple.com>
1657 * cp-tree.h (instantiate_decl): new boolean parameter,
1658 undefined_ok. Current behavior is equivalent to its being 0.
1659 * decl2.c (mark_used): Add new argument when calling instantiate_decl
1660 * pt.c (mark_decl_instantiated): Unconditionally make
1661 instantiations explicit unconditionally
1662 (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
1663 since mark_decl_instantiated now does it.
1664 (instantiate_class_member): New. Instantiate a member of an
1665 explicitly instantiated class template.
1666 (do_type_instantiation): Explicitly instantiate members of an
1667 explicitly instantiated class template.
1668 (instantiate_decl): if undefined_ok is nonzero, and if we're
1669 trying to explicitly instantiated a template with no definition,
1670 change it to an implicit instantiation.
1671 (instantiate_pending_templates): Add new argument to instantiate_decl.
1672 * tree.c (cp_cannot_inline_tree_fn): Likewise.
1674 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
1676 * cp-tree.h: Fix typo.
1678 * cp-tree.h: Include cgraph.h
1679 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
1680 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
1682 2004-06-01 Jason Merrill <jason@redhat.com>
1685 * call.c (call_builtin_trap): Remove type parm.
1686 (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
1687 (build_x_va_arg): Dereference a null pointer for a non-POD argument.
1689 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1692 * init.c (build_offset_ref): Build SCOPE_REF with non-null
1693 TREE_TYPE for non-dependent names.
1694 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
1695 unknown_type_node as its TREE_TYPE.
1696 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
1697 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
1698 (dump_expr) <SCOPE_REF case>: Likewise.
1700 2004-06-01 Richard Henderson <rth@redhat.com>
1701 Andrew Pinski <pinskia@physics.uc.edu>
1703 * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
1704 * parser.c (struct cp_parser): Remove in_offsetof.
1705 (cp_parser_new): Don't set it.
1706 (cp_parser_unary_expression): Don't check it.
1707 (cp_parser_postfix_open_square_expression): Split out from ...
1708 (cp_parser_postfix_expression): ... here.
1709 (cp_parser_postfix_dot_deref_expression): Likewise.
1710 (cp_parser_builtin_offsetof): New.
1711 (cp_parser_primary_expression): Use it.
1713 2004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1716 * parser.c (cp_parser_postfix_expression): Allow subscript
1717 operator in offsetof.
1719 2004-05-31 Mark Mitchell <mark@codesourcery.com>
1722 * friend.c (add_friend): Do not try to perform access checks for
1723 functions from dependent classes.
1725 2004-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
1727 * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
1728 (pp_cxx_begin_template_argument_list): Turn into a function.
1729 (pp_cxx_end_template_argument_list): Likewise.
1730 (pp_cxx_separate_with): Define.
1731 (pp_cxx_unqualified_id): Tidy.
1732 (pp_cxx_primary_expression): Likewise.
1733 (pp_cxx_postfix_expression): Likewise.
1734 (pp_cxx_expression): Likewise.
1735 (pp_cxx_simple_type_specifier): Likewise.
1736 (pp_cxx_type_specifier_seq): Likewise.
1737 (pp_cxx_parameter_declaration_clause): Likewise.
1738 (pp_cxx_exception_specification): Likewise.
1739 (pp_cxx_direct_declarator): Likewise.
1740 (pp_cxx_type_id): Likewise.
1741 * cxx-pretty-print.h (pp_cxx_whitespace): Export from
1743 (pp_cxx_left_paren): Likewise.
1744 (pp_cxx_right_paren): Likewise.
1745 (pp_cxx_left_brace): Likewise.
1746 (pp_cxx_right_brace): Likewise.
1747 (pp_cxx_left_bracket): Likewise.
1748 (pp_cxx_right_bracket): Likewise.
1749 (pp_cxx_dot): Likewise.
1750 (pp_cxx_identifier): Likewise.
1751 (pp_cxx_tree_identifier): Likewise.
1752 (pp_cxx_ampersand): New macro.
1753 (pp_cxx_star): Likewise.
1754 (pp_cxx_arrow): Likewise.
1755 (pp_cxx_semicolon): Likewise.
1756 (pp_cxx_complement): Likewise.
1757 (pp_cxx_begin_template_argument_list): Declaree.
1758 (pp_cxx_end_template_argument_list): Likewise.
1759 (pp_cxx_colon_colon): likewise.
1761 2004-05-31 Eric Botcazou <ebotcazou@libertysurf.fr>
1763 * parser.c (cp_parser_simple_type_specifier): Explicitly test
1766 2004-05-31 Kazu Hirata <kazu@cs.umass.edu>
1768 * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
1769 typeck.c: Fix comment formatting.
1771 2004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
1773 * cp-lang.c (cp_expand_decl): Remove.
1774 (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
1776 2004-05-30 Andreas Jaeger <aj@suse.de>
1778 * lang-specs.h: Add missing initializers for .ii.
1780 2004-05-28 Aldy Hernandez <aldyh@redhat.com>
1782 * decl.c (cp_make_fname_decl): Free return value from
1785 2004-05-28 Mark Mitchell <mark@codesourcery.com>
1788 * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
1790 * init.c (build_new): Likewise.
1793 * name-lookup.c (arg_assoc): Robustify.
1796 * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
1797 when determining the scope to use for a pointer to member.
1798 (lookup_anon_field): Give it external linkage.
1799 * cp-tree.h (lookup_anon_field): Declare it.
1800 * expr.c (cplus_expand_constant): Use it.
1802 2004-05-28 Mark Mitchell <mark@codesourcery.com>
1805 * parser.c (cp_parser_simple_type_specifier): Call
1806 maybe_note_name_used_in_class.
1808 2004-05-28 Tom Marshall <tmarshall@real.com>
1811 * class.c (finish_struct_1): Warn only if the dtor is non-private or
1812 the class has friends.
1814 2004-05-27 Adam Nemet <anemet@lnxw.com>
1817 * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
1818 TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
1820 2004-05-24 Geoffrey Keating <geoffk@apple.com>
1822 * method.c (implicitly_declare_fn): Don't call defer_fn; abort
1823 if it might be needed.
1824 * pt.c (mark_decl_instantiated): Only call defer_fn if
1825 the function actually needs processing in finish_file.
1826 * decl2.c (finish_file): Add check that elements in
1827 deferred_fns_used are really needed there. Remove unnecessary
1828 test of DECL_SAVED_TREE.
1830 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
1832 * Make-lang.in: No need to specify $(LIBCPP).
1834 2004-05-23 Mark Mitchell <mark@codesourcery.com>
1837 * parser.c (cp_parser_class_head): Robustify.
1840 * parser.c (cp_parser_decl_specifier_seq): Correct error in
1842 (cp_parser_constructor_declarator_p): Treat attributes
1846 * typeck.c (build_unary_op): Do not attempt to resolve casts to
1847 base classes in templates.
1849 2004-05-23 Mark Mitchell <mark@codesourcery.com>
1852 * pt.c (instantiate_template): Robustify.
1854 2004-05-23 Mark Mitchell <mark@codesourcery.com>
1857 * decl.c (xref_tag): Issue errors about redeclaring template
1858 classes as non-template classes.
1860 2004-05-23 Mark Mitchell <mark@codesourcery.com>
1863 * name-lookup.c (supplement_binding): Allow redefinitions of
1867 * parser.c (cp_parser_template_argument): Robustify.
1869 2004-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
1871 * class.c (alter_access): Use %E format specifier to print an
1872 identifier node. Avoid looking at the IDENTIFIER_POINTER.
1873 (push_lang_context): Likewise.
1874 * decl.c (lookup_label): Likewise.
1875 (grokdeclarator): Likewise.
1876 * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
1877 * pt.c (do_type_instantiation): Likewise.
1878 * tree.c (handle_java_interface_attribute): Likewise.
1879 (handle_com_interface_attribute): Likewise.
1880 (handle_init_priority_attribute): Likewise.
1882 2004-05-22 Mark Mitchell <mark@codesourcery.com>
1886 * pt.c (build_non_dependent_expr): Expand the set of tree nodes
1887 recognized as overloaded functions.
1889 2004-05-22 Mark Mitchell <mark@codesourcery.com>
1892 * class.c (layout_nonempty_base_or_field): Do not try to avoid
1893 layout conflicts for unions.
1896 * typeck.c (build_x_unary_op): Instantiate template class
1897 specializations before looking for "operator &".
1900 * typeck.c (complete_type): Layout non-dependent array types, even
1904 * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
1907 2004-05-22 Roger Sayle <roger@eyesopen.com>
1909 * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
1910 returning when TREE_TYPE is error_mark_node.
1911 * typeck.c (require_complete_type): Return error_mark_node if
1912 value's type is an error_mark_node.
1914 2004-05-20 Andrew Pinski <pinskia@physics.uc.edu>
1916 * optimize.c (calls_setjmp_r): Remove.
1917 (calls_setjmp_p): Remove.
1918 * cp-tree.c (calls_setjmp_p): Remove.
1919 * decl.c (finish_function): Do not call calls_setjmp_p.
1921 2004-05-18 Zack Weinberg <zack@codesourcery.com>
1923 * decl.c (cp_finish_decl): Use mark_decl_referenced.
1924 * decl2.c (maybe_make_one_only): Likewise.
1925 * method.c (use_thunk): Likewise.
1927 2004-05-18 Jason Merrill <jason@redhat.com>
1929 * class.c (build_base_path): Tidy a bit.
1931 2004-05-14 Geoffrey Keating <geoffk@apple.com>
1933 * name-lookup.c (struct scope_binding): New.
1934 (EMPTY_SCOPE_BINDING): New.
1935 (lookup_using_namespace): Take a scope_binding instead of a
1937 (qualified_lookup_using_namespace): Likewise.
1938 (cxx_binding_clear): Delete.
1939 (do_nonmember_using_decl): Use a scope_binding instead of a
1941 (lookup_tag): Don't call select_decl.
1942 (ambiguous_decl): Don't return anything (and change callers to match).
1943 Take a scope_binding as the second parameter.
1944 (lookup_namespace_name): Use a scope_binding instead of a
1946 (unqualified_namespace_lookup): Likewise.
1947 (lookup_qualified_name): Likewise.
1948 (select_decl): Take a scope_binding instead of a cxx_binding.
1949 Use macros rather than hand-coding tests for type-ness.
1951 2004-05-13 Diego Novillo <dnovillo@redhat.com>
1953 * cp-gimplify.c: Rename from cp-simplify.c.
1954 * Make-lang.in, optimize.c: Update.
1956 2004-05-13 Diego Novillo <dnovillo@redhat.com>
1958 Merge from tree-ssa-20020619-branch. See
1959 ChangeLog.tree-ssa for details.
1961 * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
1962 cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
1963 expr.c, init.c, name-lookup.h, optimize.c, parser.c,
1964 pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
1966 * cp-mudflap.c: New file.
1967 * cp-simplify.c:: New file.
1969 2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1972 * decl2.c (check_classfn): For member templates, compare also the
1973 template parameters to match the declaration.
1974 * cp-tree.h: Adjust declaration of check_classfn.
1975 * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
1976 * friend.c (do_friend): Likewise.
1977 * pt.c (tsubst_friend_function): Likewise.
1979 2004-05-01 Zack Weinberg <zack@codesourcery.com>
1981 * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
1982 Instead, dig into the representation type to find the array bound.
1984 2004-04-30 Jason Merrill <jason@redhat.com>
1986 Refer to base members using COMPONENT_REFs where possible.
1987 * class.c (build_simple_base_path): New fn.
1988 (build_base_path): Use it for non-virtual base references.
1989 (layout_class_type): Change base fields to their real type
1990 after layout is done.
1991 * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
1992 * cp-lang.c (cxx_get_alias_set): Use it.
1994 2004-04-30 Kazu Hirata <kazu@cs.umass.edu>
1996 * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
1999 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2002 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
2003 used in integral constant expressions.
2005 2004-04-22 Mark Mitchell <mark@codesourcery.com>
2007 * init.c (build_aggr_init): Fix accidental use of C99 construct in
2010 * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
2012 * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
2013 * decl.c (reshape_init): Use it.
2014 * init.c (perform_member_init): Remove redundant condition.
2015 (build_aggr_init): Adjust to handle brace-enclosed initializers
2017 (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
2019 * parser.c (cp_parser_initializer_clause): Do not set
2020 TREE_HAS_CONSTRUCTOR on the initializer.
2021 * rtti.c (tinfo_base_init): Likewise.
2022 (generic_initializer): Likewise.
2023 (ptr_initializer): Likewise.
2024 (ptm_initializer): Likewise.
2025 (class_initializer): Likewise.
2026 (get_pseudo_ti_init): Likewise.
2027 * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
2029 2004-04-22 Alan Modra <amodra@bigpond.net.au>
2031 * name-lookup.c (anonymous_namespace_name): Make static.
2033 2004-04-19 Roger Sayle <roger@eyesopen.com>
2036 * class.c (build_base_path): Call fold whilst building the NULL
2037 pointer check expression trees.
2039 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
2041 * init.c (build_new_1): Don't use type size argument for Java
2042 _Jv_AllocObject call.
2044 2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
2046 * method.c (make_alias_for_thunk): Remove preprocessor guard on
2047 declaration and definition.
2049 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
2052 * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
2053 than ASM_OUTPUT_DEF.
2055 2004-04-08 Jakub Jelinek <jakub@redhat.com>
2057 * decl2.c (mark_used): Don't segfault if cfun != NULL but
2058 current_function_decl == NULL.
2060 2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
2063 * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
2066 2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2068 * init.c (decl_constant_value): Don't look at DECL_INITIAL
2070 * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
2071 or TREE_SIDE_EFFECTS of a type.
2073 2004-04-02 Nathan Sidwell <nathan@codesourcery.com>
2076 * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
2077 cv-qualifier unification.
2078 * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
2080 2004-04-02 Jan Hubicka <jh@suse.cz>
2082 * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
2083 * cp-tree.h (cp_update_decl_after_saving): Declare.
2084 * tree.c (cp_update_decl_after_saving): Define.
2086 2004-04-01 Mark Mitchell <mark@codesourcery.com>
2089 * typeck.c (get_delta_difference): Call fold before returning the
2092 2004-04-01 Richard Henderson <rth@redhat.com>
2095 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
2096 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
2098 2004-04-01 Mark Mitchell <mark@codesourcery.com>
2101 * name-lookup.c (maybe_push_cleanup_level): Robustify.
2103 2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2105 * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
2107 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2109 * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
2110 * class.c (check_bitfield_decl): Likewise.
2111 * cvt.c (type_promotes_to): Likewise.
2112 * decl.c (finish_enum): Likewise.
2113 * mangle.c (write_builtin_type): Likewise.
2114 * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
2115 * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
2116 (build_binary_op): Likewise.
2118 2004-03-31 Jan Hubicka <jh@suse.cz>
2120 * tree.h (optimize_function): Kill prototype.
2121 * optimize.c (dump_function, optimize_function, dump_finction): Kill.
2122 * semantics.c (expand_body): Kill.
2124 2004-03-30 Mark Mitchell <mark@codesourcery.com>
2127 * decl.c (start_decl_1): Do not decide whether or not to create a
2128 new cleanup level until after the type has been completed.
2131 * pt.c (tsubst_default_argument): Clear current_function_decl.
2133 2004-03-30 Zack Weinberg <zack@codesourcery.com>
2135 * name-lookup.c, parser.c: Use new shorter form of GTY markers.
2137 2004-03-29 Zack Weinberg <zack@codesourcery.com>
2139 * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
2140 is null, just print the literal name and return.
2142 2004-03-25 Kazu Hirata <kazu@cs.umass.edu>
2144 * cxx-pretty-print.c: Fix comment typos.
2146 2004-03-24 Kazu Hirata <kazu@cs.umass.edu>
2148 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
2151 2004-03-23 Ziemowit Laski <zlaski@apple.com>
2153 * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
2154 * mangle.c (write_type): Add call to 'mangle_fundamental_type'
2157 2004-03-23 Zack Weinberg <zack@codesourcery.com>
2159 PR 12267, 12391, 12560, 13129, 14114, 14133
2160 * cp-lang.c (c_reset_state): Delete.
2161 (push_file_scope, pop_file_scope): New stubs.
2162 * parser.c (c_parse_file): Call sorry() here if called more than once.
2164 2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2166 * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
2169 2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
2171 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
2173 2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
2175 * error.c (enum pad): Remove.
2176 (dump_qualifiers): Likewise.
2177 (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
2178 (dump_aggr_type): Likewise.
2179 (dump_type_suffix): Likewise.
2180 (dump_simple_decl): Likewise.
2181 (dump_function_decl): Likewise.
2182 (cv_to_string): Likewise.
2183 (dump_type_prefix): Likewise. Adjust return void.
2184 * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
2186 (pp_cxx_template_keyword_if_needed): Document.
2187 (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
2188 (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
2189 MUST_NOT_THROW_EXPR.
2191 2004-03-21 Mark Mitchell <mark@codesourcery.com>
2194 * decl.c (cp_finish_decl): Compute the size of arrays declared in
2195 templates, if their type is non-dependent.
2197 2004-03-19 Mark Mitchell <mark@codesourcery.com>
2199 * call.c (build_op_delete_call): Do not forget the placement
2200 arguments when iterating through mutiple delete operators.
2202 * cp-tree.h (svaed_scope): Remove last_parms.
2203 (NEW_DELETE_OPNAME_P): New macro.
2204 (last_function_parms): Remove.
2205 (do_friend): Adjust prototype.
2206 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
2207 using last_function_parms.
2208 (grokfndecl): Take the PARM_DECLs as an argument, rather than
2209 using last_function_parms.
2210 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
2211 for class-specific operator new and operator delete.
2212 (grok_op_properties): Do not look for allocation functions with
2214 (start_function): Use DECL_ARGUMENTS instead of
2215 last_function_parms.
2216 * decl.h (last_function_parms): Do not declare.
2217 * decl2.c (grokclassfn): Do not use last_function_parms.
2218 * friend.c (do_friend): Remove parmdecls parameter.
2219 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
2220 (pop_from_top_level): Do not restore it.
2221 * pt.c (check_explicit_specialization): Do not adjust
2222 last_function_parms.
2224 * name-lookup.c (do_local_using_decl): Create a local binding for
2225 types brought in via using declarations.
2227 * name-lookup.c (lookup_arg_dependent): Handle block-scope
2228 function declarations correctly.
2230 * semantics.c (finish_id_expression): Correct handling of
2231 conversion operators to dependent types.
2233 * typeck.c (lookup_destructor): Allow the use of destructors from
2236 2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2238 * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
2239 TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
2240 * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
2241 the field is named TEMPLATE_TYPE_PARM_INDEX.
2243 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2246 * parser.c (cp_parser_functional_cast): A cast to anything
2247 but integral or enumaration type is not an integral constant
2249 * pt.c (value_dependent_expression_p): Handle cast expressions
2250 without operands (such as "int()").
2252 2004-03-18 Mark Mitchell <mark@codesourcery.com>
2254 * semantics.c (finish_pseudo_destructor_expr): Allow differing
2255 cv-qualification between the type named by the
2256 pseudo-destructor-name and the object-type.
2258 * search.c (accessible_base_p): Handle non-proper bases.
2260 * name-lookup.c (do_nonmember_using_decl): If a using declaration
2261 refers to a single overloaded function, set the type of the
2263 * tree.c (lvalue_type): Simplify.
2264 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
2266 (build_unary_op): Handle OVERLOADs with known types.
2268 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
2271 * parser.c (cp_parser_postfix_expression): Handle the use of
2272 "typename" in non-dependent contexts. Convert appropriately when
2273 when using a qualified name after "->" or ".".
2275 * call.c (conditional_conversion): Honor the requirement that some
2276 conversions refer to the original object.
2278 2004-03-18 Mark Mitchell <mark@codesourcery.com>
2280 * call.c (build_conditional_expr): Do not call force_rvalue for
2281 operands of void_type when the conditional expression itself has
2283 * name-lookup.c (pushdecl): Don't consider a declaration of a
2284 function named "main" to be an overload of a type named "main".
2285 * parser.c (cp_parser_template_name): Perform name lookup when the
2286 template name is proceeded by "template" if the qualifying scope
2288 * typeck.c (composite_pointer_type_r): Correctly handle
2289 pointer-to-member types.
2290 (build_const_cast): Likewise.
2292 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2294 * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
2295 * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
2296 (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
2297 (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
2298 (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
2299 (TYPEOF_TYPE_EXPR): New macro.
2300 * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
2301 * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
2302 * pt.c (tsubst): Likewise.
2303 * semantics.c (finish_typeof): Likewise.
2304 * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
2305 and TEMPLATE_TYPE_PARM.
2306 * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
2307 (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
2309 2004-03-16 Mark Mitchell <mark@codesourcery.com>
2312 * cp-tree.h (build_new_op): Change prototype.
2313 (build_x_binary_op): Likewise.
2314 * call.c (build_new_op): Add overloaded_p parameter.
2315 * decl2.c (grok_array_decl): Adjust call to build_new_op.
2316 * parser.c (cp_parser_binary_expression): Note that uses of
2317 overloaded operators prevents an expression from being considered
2318 an integral constant.
2319 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
2321 * semantics.c (finish_call_expr): Likewise.
2322 * typeck.c (rationalize_conditional_expr): Likewise.
2323 (build_x_indirect_ref): Likewise.
2324 (build_x_binary_op): Likewise.
2325 (build_x_unary_op): Likewise.
2326 (build_x_compound_expr): Likewise.
2327 (build_modify_expr): Likewise.
2328 * typeck2.c (build_x_arrow): Likewise.
2330 2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
2332 * cp-lang.c, ptree.c: Update copyright.
2334 2004-03-13 Mark Mitchell <mark@codesourcery.com>
2337 * parser.c (cp_parser_non_integral_constant_expression): Encode
2338 more of the idiom that surrounded calls to this function within
2340 (cp_parser_primary_expression): Adjust accordingly.
2341 (cp_parser_postfix_expression): Likewise.
2342 (cp_parser_unary_expression): Likewise.
2343 (cp_parser_cast_expression): Likewise.
2344 (cp_parser_assignment_expression): Likewise.
2345 (cp_parser_expression): Likewise.
2346 (cp_parser_new_expression): Note that new-expressions are not
2347 allowed in integral constant expressions.
2348 (cp_parser_delete_expression): Likewise.
2350 2004-03-12 Matt Austern <austern@apple.com>
2352 * decl2.c (maybe_make_one_only): Look at
2353 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
2354 to make an explicit instantiation weak.
2355 * method.c (use_thunk): Make sure we call comdat_linkage
2357 * pt.c (do_type_instantiation): On systems where weak symbols
2358 don't go in a static archive's TOC, explicit instantiation of a
2359 class must imply *explicit* instantiation of its memeber.
2361 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
2363 * call.c, cp-tree.h, pt.c: Fix comment typos.
2365 2004-03-10 Mark Mitchell <mark@codesourcery.com>
2368 * decl.c (xref_tag): Disregard non-type declarations when
2369 looking up a tagged type.
2371 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
2374 * call.c (convert_like_real): Build a const qualified temporary,
2375 when testing ctor access.
2377 2004-03-09 Mark Mitchell <mark@codesourcery.com>
2379 * call.c (initialize_reference): Fix typo.
2381 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2384 * pt.c (determine_specialization): For member templates, match also
2388 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
2390 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
2392 2004-03-09 Mark Mitchell <mark@codesourcery.com>
2395 * call.c (initialize_reference): Handle initializers that are
2396 class-member access expressions applies to rvalues.
2398 2004-03-09 Mark Mitchell <mark@codesourcery.com>
2401 * name-lookup.c (supplement_binding): Ignore functions that are
2402 marked DECL_ANTICIPATED.
2404 2004-03-08 Mark Mitchell <mark@codesourcery.com>
2407 * class.c (check_field_decls): Complain about non-static data
2408 members of reference type in unions. Propagate
2409 CLASSTYPE_REF_FIELDS_NEED_INIT and
2410 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
2412 * init.c (perform_member_init): Complain about mbmers with const
2413 type that are not explicitly initialized.
2415 2004-03-08 Mark Mitchell <mark@codesourcery.com>
2417 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
2418 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
2419 (lang_identifier): Remove implicit_decl and error_locus.
2420 (IDENTIFIER_IMPLICIT_DECL): Remove.
2421 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
2422 (IDENTIFIER_ERROR_LOCUS): Likewise.
2423 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
2424 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
2425 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
2426 (implicitly_declare): Remove.
2427 * decl.c (warn_extern_redeclared_static): Remove check of
2428 IDENTIFIER_IMPLICIT_DECL.
2429 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
2430 (implicitly_declare): Remove.
2431 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
2432 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
2433 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
2434 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
2435 in the innermost scope, rather than at namespace scope.
2436 * name-lookup.c (push_local_binding): Give it external linkage.
2437 (pushdecl): Remove dead code.
2438 * name-lookup.h (push_local_binding): Declare it.
2439 * ptree.c (cxx_print_identifier): Don't print
2440 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
2441 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
2442 not IDENTIFIER_ERROR_LOCUS.
2443 * typeck.c (build_function_call): Remove dead code.
2445 2004-03-08 Jason Merrill <jason@redhat.com>
2448 * decl.c (xref_tag): Remove attribute handling.
2449 * cp-tree.h: Adjust prototype.
2450 * decl.c, parser.c, rtti.c: Adjust callers.
2451 * parser.c (cp_parser_class_head): Pass back attributes in the
2453 (cp_parser_class_specifier): Adjust.
2455 2004-03-08 Matt Austern <austern@apple.com>
2458 * name-lookup.c (add_decl_to_level): Add extern variables, as well
2459 as static, to static_decls array.
2461 2004-03-05 Jason Merrill <jason@redhat.com>
2463 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
2465 2004-03-04 Geoffrey Keating <geoffk@apple.com>
2467 * decl.c (grokfndecl): Update old incorrect comment.
2468 (grokvardecl): Diagnose C++ variables of type with no linkage.
2470 2004-03-01 Mark Mitchell <mark@codesourcery.com>
2473 * pt.c (build_non_dependent_expr): Do not create a
2474 NON_DEPENDENT_EXPR for a THROW_EXPR.
2476 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
2479 * error.c (dump_expr): Handle THROW_EXPR.
2481 2004-03-01 Mark Mitchell <mark@codesourcery.com>
2484 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
2485 lookup if ordinary name-lookup finds a non-function.
2486 * pt.c (tsubst_copy_and_build): Likewise.
2489 * parser.c (cp_parser_late_parsing_default_args): Check that there
2490 are no extra tokens after the end of the default-argument
2493 2004-03-01 Mark Mitchell <mark@codesourcery.com>
2496 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
2497 having C++ linkage for name-mangling purposes.
2500 * parser.c (cp_parser_direct_declarator): Recognize constructor
2501 declarators that use a template-id to name the class being
2505 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
2506 (tsubst_expr): Do not call tsubst_copy, even when
2507 processing_template_decl.
2509 2004-03-01 Jeff Law <law@redhat.com>
2511 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
2514 2004-02-29 Mark Mitchell <mark@codesourcery.com>
2517 * name-lookup.h (push_scope): Change prototype.
2518 * name-lookup.c (push_scope): Do not reenter the current class
2520 * decl.c (grokfndecl): Check return code from push_scope before
2522 * decl2.c (check_classfn): Likewise.
2523 * parser.c (cp_parser_conversion_function_id): Likewise.
2524 (cp_parser_init_declarator): Likewise.
2525 (cp_parser_direct_declarator): Likewise.
2526 (cp_parser_class_specifier): Likewise.
2527 (cp_parser_class_head): Likewise.
2528 (cp_parser_lookup_name): Likewise.
2529 (cp_parser_constructor_declarator_p): Likewise.
2530 * pt.c (instantiate_class_template): Likewise.
2531 (resolve_typename_type): Likewise.
2533 2004-02-29 Mark Mitchell <mark@codesourcery.com>
2536 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
2540 * class.c (update_vtable_entry_for_fn): Do not go through
2541 covariance machinery if the type returned by an overrider is the
2542 same as the original.
2544 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
2546 * call.c: Fix a comment typo.
2548 2004-02-27 Ziemowit Laski <zlaski@apple.com>
2550 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
2552 2004-02-26 Mark Mitchell <mark@codesourcery.com>
2555 * parser.c (cp_parser_parameter_declaration_list): Commit
2556 to fewer tentative parses.
2558 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2561 * pt.c (dependent_type_p_r): A template template parameter is a
2564 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2567 * mangle.c (write_template_arg_literal): Don't rely on identity for
2570 2004-02-24 Jason Merrill <jason@redhat.com>
2572 * tree.c (build_exception_variant): Use check_qualified_type.
2574 2004-02-23 Zack Weinberg <zack@codesourcery.com>
2575 Kazu Hirata <kazu@cs.umass.edu>
2577 * decl.c (cxx_init_decl_processing): Don't check
2578 flag_writable_strings.
2580 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
2583 * typeck.c (maybe_warn_about_returning_address_of_location):
2584 Change check for VAR_DECL to use DECL_P instead.
2586 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2589 * cvt.c (build_expr_type_conversion): Type must be complete before
2590 looking up for conversions.
2592 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2595 * name-lookup.c (arg_assoc_class): Don't look into template
2596 arguments if it is not a primary template.
2598 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
2601 * method.c (use_thunk): Always clone function argument tree.
2603 2004-02-20 Mark Mitchell <mark@codesourcery.com>
2606 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
2609 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
2610 for all type variants.
2612 2004-02-19 Mark Mitchell <mark@codesourcery.com>
2615 * decl.c (duplicate_decls): Return error_mark_node for invalid
2617 * name-lookup.c (push_namespace): Ignore the return value from
2619 * pt.c (push_template_decl_real): Robustify.
2622 * name-lookup.c (push_class_level_binding): Do not complain about
2623 adding a binding for a member whose name is the same as the
2624 enclosing class if the member is located in a base class of the
2627 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2630 * parser.c (cp_parser_new_expression): Parse an ill-formed
2631 direct-new-declarator after a parenthesized type-id to emit good
2634 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
2636 * cp-tree.def, cvt.c: Update copyright.
2638 2004-02-17 Mark Mitchell <mark@codesourcery.com>
2641 * cp-tree.h (abi_version_at_least): Remove.
2642 * mangle.c: Include flags.h.
2644 2004-02-15 Mark Mitchell <mark@codesourcery.com>
2647 * call.c (build_conditional_expr): Handle conversions between
2648 class types which result in differently cv-qualified type
2652 * class.c (delete_duplicate_fields_1): Remove.
2653 (delete_duplicate_fields): Likewise.
2654 (finish_struct_anon): Remove check for members with the same name
2655 as their enclosing class.
2656 (check_field_decls): Do not call duplicate_fields.
2657 * decl.c (grokdeclarator): Remove check for static data members
2658 with the same name as their enclosing class.
2659 * name-lookup.c (push_class_level_binding): Check for members with
2660 the same name as their enclosing class.
2662 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
2665 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
2667 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2670 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
2671 has full set of arguments.
2673 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2676 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
2678 2004-02-13 Mark Mitchell <mark@codesourcery.com>
2681 * cp-tree.h (delete_sanity): Change prototype.
2682 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
2683 Remove dead code. Adjust code to warn about deleting an array.
2684 * typekc.c (decay_conversion): Use build_address and build_nop.
2687 * search.c (accessible_p): Do not check access in thunks.
2690 * call.c (build_conditional_expr): Call force_rvalue on the
2691 non-void operand in the case that one result is a throw-expression
2692 and the other is not.
2694 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
2697 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
2698 the type name and look ahead for ::~, and bail out early with a
2699 better error message if the parse is going to fail.
2701 2004-02-12 Mark Mitchell <mark@codesourcery.com>
2703 * call.c (conversion_kind): New type.
2704 (conversion_rank): Likewise.
2705 (conversion): Likewise.
2706 (CONVERSION_RANK): New macro.
2707 (conversion_obstack): New variable.
2708 (obstack_initialized): Likewise.
2709 (z_candidate): Change type of convs and second_conv.
2710 (candidate_warning): New type.
2711 (IDENTITY_RANK): Remove.
2712 (EXACT_RANK): Likewise.
2713 (PROMO_RANK): Likewise.
2714 (STD_RANK): Likewise.
2715 (PBOOL_RANK): Likewise.
2716 (USER_RANK): Likewise.
2717 (ELLIPSIS_RANK): Likewise.
2718 (BAD_RANK): Likewise.
2719 (ICS_RANK): Likewise.
2720 (ICS_STD_RANK): Likewise.
2721 (ICS_USER_FLAG): Likewise.
2722 (ICS_ELLIPSIS_FLAG): Likewise.
2723 (ICS_THIS_FLAG): Likewise.
2724 (ICS_BAD_FLAG): Likewise.
2725 (NEED_TEMPORARY_P): Likewise.
2726 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
2727 (USER_CONV_CAND): Likewise.
2728 (USER_CONV_FN): Likewise.
2729 (conversion_obstack_alloc): New function.
2730 (alloc_conversion): Likewise.
2731 (validate_conversion_obstack): Likewise.
2732 (alloc_conversions): Likewise.
2733 (build_conv): Adjust to deal with new conversion data structures.
2734 (build_identity_conv): New function.
2735 (build_ambiguous_conv): Likewise.
2736 (standard_conversion): Adjust to deal with new conversion data
2738 (convert_class_to_reference): Likewise.
2739 (direct_reference_binding): Likewise.
2740 (reference_binding): Likewise.
2741 (implicit_conversion): Likewise.
2742 (add_candidate): Likewise.
2743 (add_function_candidate): Likewise.
2744 (add_conv_candidate): Likewise.
2745 (build_builtin_candidate): Likewise.
2746 (print_z_candidate): Likewise.
2747 (merge_conversion_sequences): Likewise.
2748 (build_user_type_conversion_1): Likewise.
2749 (build_user_type_conversion): Likewise.
2750 (build_new_function_call): Likewise.
2751 (build_object_call): Likewise.
2752 (conditional_conversion): Likewise.
2753 (build_conditional_expr): Likewise.
2754 (build_new_op): Likewise.
2755 (build_op_delete_call): Likewise.
2756 (convert_like_real): Likewise.
2757 (build_over_call): Likewise.
2758 (build_new_method_call): Likewise.
2759 (is_subseq): Likewise.
2760 (maybe_handle_implicit_object): Likewise.
2761 (maybe_handle_ref_bind): Likewise.
2762 (compare_ics): Likewise.
2763 (source_type): Likewise.
2764 (add_warning): Likewise.
2766 (can_convert_arg): Likewise.
2767 (can_convert_arg_bad): Likewise.
2768 (perform_implicit_conversion): Likewise.
2769 (perform_direct_initialization_if_possible): Likewise.
2770 (initialize_reference): Likewise.
2771 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
2772 * cp-tree.def (WRAPPER): Likewise.
2773 (IDENTITY_CONV): Remove.
2774 (LVALUE_CONV): Likewise.
2775 (QUAL_CONV): Likewise.
2776 (STD_CONV): Likewise.
2777 (PTR_CONV): Likewise.
2778 (PMEM_CONV): Likewise.
2779 (BASE_CONV): Likewise.
2780 (REF_BIND): Likewise.
2781 (USER_CONV): Likewise.
2782 (AMBIG_CONV): Likewise.
2783 (RVALUE_CONV): Likewise.
2784 * cp-tree.h (tree_wrapper): Remove.
2785 (WRAPPER_ZC): Remove.
2786 (lang_tree_node): Remove wrapper.
2787 (LOOKUP_SPECULATIVELY): Remove.
2788 (build_op_delete_call): Adjust prototype.
2789 (validate_conversion_obstack): Declare.
2790 (build_zc_wrapper): Remove.
2791 * cvt.c (convert_to_reference): Remove dead code.
2792 (ocp_convert): Likewise.
2793 * decl.c (redeclaration_error_message): Correct handling of
2795 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
2796 (cp_tree_node_structure): Remove WRAPPER case.
2797 * decl2.c (finish_file): Call validate_conversion_obstack.
2798 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
2799 (build_op_delete_call): Likewise.
2800 (build_x_delete): Likewise.
2801 (build_delete): Adjust call to build_op_delete_call.
2802 * pt.c (tsubst_friend_declaration): Adjust code to determine
2803 whether or not a friend template is a definition.
2804 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
2805 * tree.c (build_zc_wrapper): Remove.
2807 2004-02-12 Zack Weinberg <zack@codesourcery.com>
2809 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
2810 * cp-tree.h: Don't declare cxx_builtin_type_decls.
2811 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
2812 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
2814 2004-02-10 Mark Mitchell <mark@codesourcery.com>
2816 * typeck.c (lookup_destructor): Fix typo in error message.
2818 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
2820 * call.c, parser.c, tree.c: Fix comment typos.
2822 2004-02-07 Zack Weinberg <zack@codesourcery.com>
2825 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
2826 * decl.c (duplicate_decls, start_function): Likewise.
2828 2004-02-07 Zack Weinberg <zack@codesourcery.com>
2830 * name-lookup.c (pushdecl): Issue shadow warnings directly.
2831 * parser.c (free_parser_stacks): Delete.
2833 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
2835 * rtti.c: Update copyright.
2837 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2840 * decl.c (require_complete_types_for_parms): Do not insert
2841 error_mark_node in the parameter list.
2843 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2846 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
2847 error when terminator can not be found.
2849 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
2851 Make-lang.in (po-generated): Delete.
2853 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
2855 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
2856 targetm.calls.promote_prototypes.
2858 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
2862 2004-01-15 Geoffrey Keating <geoffk@apple.com>
2864 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
2865 (handle_pragma_implementation): Likewise.
2867 2004-02-05 Mark Mitchell <mark@codesourcery.com>
2870 * typeck.c (lookup_destructor): Tweak error message.
2872 2004-02-05 Jan Hubicka <jh@suse.cz>
2874 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
2877 2004-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2880 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
2881 code, only emits the diagnostic now. Added lookup of the identifier
2882 and support for qualified ids.
2883 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
2884 Parse an (invalid) type name as id-expression within a declarator.
2885 (cp_parser_simple_declaration): Use it.
2886 (cp_parser_member_declaration): Likewise.
2887 (cp_parser_make_typename_type): New function. Handle errors through
2888 cp_parser_diagnose_invalid_typename.
2889 (cp_parser_elaborated_type_specifier): Use it.
2891 2004-02-04 Mark Mitchell <mark@codesourcery.com>
2894 * call.c (convert_like_real): Use "converting" rather than
2895 "argument" as the descriptive keyword to
2896 dubious_conversion_warnings.
2897 * typeck.c (convert_for_assignment): Do not call
2898 dubious_conversion_warnings.
2900 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2903 * init.c (build_delete): Emit a more informative error message in
2904 case of an incomplete type, and on the correct source line.
2906 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
2908 * error.c, search.c: Update copyright.
2910 2004-02-04 Mark Mitchell <mark@codesourcery.com>
2913 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
2914 linkage for the typeinfo name string.
2916 2004-02-04 Mark Mitchell <mark@codesourcery.com>
2919 * cp-tree.h (fold_non_dependent_expr): New function.
2920 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
2921 (cp_parser_template_argument): Use fold_non_dependent_expr.
2922 (cp_parser_direct_declarator): Likewise.
2923 * pt.c (fold_non_dependent_expr): New function.
2924 (convert_nontype_argument): Use it.
2925 (tsubst_qualified_id): Simplify.
2926 (tsubst_copy_and_build): Likewise.
2928 2004-02-04 Mark Mitchell <mark@codesourcery.com>
2930 * decl.c (cxx_push_function_context): Do not set
2931 current_function_is_thunk.
2932 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
2935 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2938 * pt.c (more_specialized_class): Increase processing_template_decl
2939 while partial ordering.
2941 2004-02-03 Mark Mitchell <mark@codesourcery.com>
2944 * decl.c (start_function): Do not call pushdecl for any
2945 instantiation or specialization of a primary template.
2947 2004-02-03 Mark Mitchell <mark@codesourcery.com>
2950 * parser.c (cp_parser_class_name): Robustify.
2953 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
2956 * semantics.c (finish_id_expression): Do not return an
2957 IDENTIFIER_NODE when lookup finds a PARM_DECL.
2959 2004-02-03 Mark Mitchell <mark@codesourcery.com>
2962 * pt.c (build_non_dependent_expr): Do not build
2963 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
2966 * semantics.c (finish_id_expression): Do not return an
2967 IDENTIFIER_NODE when lookup finds a VAR_DECL.
2970 * parser.c (cp_parser_simple_declaration): When skipping to the
2971 end of the statement swallow the terminating semicolon.
2973 2004-02-02 Mark Mitchell <mark@codesourcery.com>
2976 * init.c (build_offset_ref): Improve error recovery for invalid
2977 uses of non-static member functions.
2980 * cp-tree.h (cp_build_type_attribute_variant): New function.
2981 * class.c (build_clone): Use cp_build_type_attribute_variant.
2982 * decl.c (duplicate_decls): Likewise.
2983 * pt.c (copy_default_args_to_explicit_spec): Likewise.
2984 (tsubst_function_type): Likewise.
2985 * tree.c (build_exception_variant): Check attributes before
2986 concluding that two types are the same.
2987 (cp_build_type-attribute_variant): New method.
2988 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
2991 * call.c (convert_class_to_reference): Keep better track of
2992 pedantically invalid user-defined conversions.
2994 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2997 * pt.c (tsubst_qualified_id): Improved error message when a type
2998 is expected but not found.
3000 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
3002 * class.c: Fix comment typos.
3004 * error.c: Likewise.
3005 * parser.c: Likewise.
3007 * search.c: Likewise.
3008 * typeck.c: Likewise.
3010 2004-01-30 Richard Henderson <rth@redhat.com>
3013 * method.c (use_thunk): Don't force_target_expr for void thunks.
3014 * tree.c (build_target_expr_with_type): Assert non-void type.
3015 (force_target_expr): Likewise.
3017 2004-01-30 Michael Matz <matz@suse.de>
3019 * parser.c (cp_parser_labeled_statement): Accept case ranges.
3021 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3025 * decl.c (grokdeclarator): Check immediatly type completeness for
3026 non-dependent types.
3028 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3031 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
3032 a sizeof expression.block
3034 2004-01-29 Mark Mitchell <mark@codesourcery.com>
3037 * mangle.c (write_encoding): Correct encoding of member template
3040 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3042 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
3043 template name as it was `<::' (digraph typo).
3044 (cp_parser_nth_token_starts_template_argument_list_p): New function.
3045 (cp_parser_id_expression): Use it.
3046 (cp_parser_nested_name_specifier_opt): Likewise.
3047 (cp_parser_template_name): Likewise.
3048 (cp_parser_class_name): Likewise.
3049 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
3051 2004-01-28 Mark Mitchell <mark@codesourcery.com>
3054 * typeck.c (merge_types): Do not merge attributes into
3058 * parser.c (cp_parser_direct_declarator): Do not prevent
3059 backtracking inside a parenthesized declarator.
3060 (cp_parser_parameter_declaration): Fix typo in comment.
3062 2004-01-28 Jan Hubicka <jh@suse.cz>
3064 * semantics.c (expand_body) Do emit_associated_thunks before
3067 2004-01-27 Devang Patel <dpatel@apple.com>
3069 * name-lookup.c: Include "debug.h"
3070 (do_namespace_alias): Invoke debug_hooks to emit debug info
3071 for namespace alias.
3072 (do_local_using_decl): Invoke debug_hooks to emit debug info
3074 (do_class_using_decl): Same.
3075 (do_toplevel_using_decl): Same.
3076 (do_using_directive): Same.
3077 (cp_emit_debug_info_for_using): New function.
3078 * Make-lang.in (cp/parser.o): Depend on debug.h
3079 (cp/name-lookup.o): Same.
3081 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3083 * cp-tree.h (language_function, lang_type_header): Use
3085 * name-lookup.h (cp_binding_level): Likewise.
3087 2004-01-26 Mark Mitchell <mark@codesourcery.com>
3090 * semantics.c (finish_for_expr): Check for unresolved overloaded
3093 * class.c (add_method): Just check processing_template_decl to
3094 determine whether or not we are within a template.
3095 * decl2.c (maybe_retrofit_in_chrg): Likewise.
3096 * init.c (decl_constant_value): Check the type of the declaration,
3098 * name-lookup.c (maybe_push_to_top_level): Rename to ...
3099 (push_to_top_level): ... this.
3100 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
3101 * pt.c (push_template_decl_real): Reorder condition for speed.
3102 (convert_template_argument): Use dependency-checking functions in
3103 place of uses_template_parms.
3104 (lookup_template_class): Avoid calling uses_template_parms more
3106 (uses_template_parms): Reimplement, using dependency-checking
3108 (instantiate_class_template): Use push_to_top_level, not
3109 maybe_push_to_top_level.
3110 (type_unification_real): Simplify.
3111 (type_dependent_expression_p): Handle OFFSET_REFs and
3113 (any_dependent_template_arguments_p): Handle multiple levels of
3115 * semantics.c (expand_or_defer_fn): Do not check
3116 uses_template_parms for template instantiations.
3117 * typeck.c (comptypes): Avoid calling cp_type_quals.
3119 2004-01-25 Mark Mitchell <mark@codesourcery.com>
3122 * call.c (build_over_call): Do not convert arguments when
3123 processing a template.
3124 * pt.c (build_non_dependent_expr): Do not build a
3125 NON_DEPENDENT_EXPR for arithmetic constants.
3127 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3130 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
3131 returns a TYPE_DECL. no further lookup is required.
3132 * semantics.c (check_template_template_default_arg): A TYPE_DECL
3133 is invalid. Rework to give better diagnostics.
3135 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3138 * pt.c (instantiate_class_template): Add an error_mark_node
3140 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
3142 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
3145 * decl.c (finish_function): Move the call to
3146 finish_fname_decls below the call to
3147 finish_eh_spec_block.
3149 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
3151 * optimize.c, typeck2.c: Update copyright.
3153 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
3155 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
3156 init.c, mangle.c, typeck.c: Update copyright.
3158 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
3160 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
3162 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
3164 * Make-lang.in: Replace $(docdir) with doc.
3165 (c++.info, c++.srcinfo): Dummy entry.
3166 (c++.man, c++.srcman): New rules.
3167 (c++.install-man): Revamp rule.
3169 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
3171 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
3172 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
3173 immediate $(shell) instead of deferred backquote.
3175 2004-01-19 Mark Mitchell <mark@codesourcery.com>
3178 * parser.c (cp_parser_postfix_expression): When encountering
3179 incomplete type on left-hand side of "->" or ".", treat the entire
3180 expression as erroneous.
3183 * call.c (build_field_call): Remove.
3184 (n_build_method_call): Likewise.
3185 (build_method_call): Likewise.
3186 (build_new_method_call): Do not call build_field_call.
3187 * class.c (n_build_method_call): Remove.
3188 (print_class_statistics): Do not print it.
3189 * cp-tree.h (build_method_call): Remove declaration.
3190 (finish_object_call_expr): Likewise.
3191 (build_new_1): Do not use build_method_call.
3192 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
3193 when the function appearing on the right-hand-side of "." or "->"
3194 is not actually a function.
3195 * pt.c (tsubst_copy_and_build): Likewise.
3196 * semantics.c (finish_object_call_expr): Remove.
3198 2004-01-18 Mark Mitchell <mark@codesourcery.com>
3201 * pt.c (tsubst): Use finish_typeof.
3203 2004-01-18 Jason Merrill <jason@redhat.com>
3206 * except.c (build_throw): In a template, set
3207 current_function_returns_abnormally.
3209 2004-01-17 Fred Fish <fnf@intrinsity.com>
3212 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
3213 except don't call array_type_nelts() with a VECTOR_TYPE.
3215 2004-01-16 Jan Hubicka <jh@suse.cz>
3217 * mangle.c (write_mangled_name): Remove inline modifier.
3219 2004-01-16 Mark Mitchell <mark@codesourcery.com>
3222 * decl.c (compute_array_index_type): Fix grammar in comment.
3223 * init.c (build_zero_init): Handle zero-sized arrays correctly.
3226 * call.c (name_as_c_string): Print conversion operator names
3230 * call.c (initialize_reference): Pass -1 for inner parameter to
3233 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3236 * parser.c (cp_parser_base_specifier): Check for an invalid
3237 keyword `typename' and emit an user-friendly error message.
3239 2004-01-15 Geoffrey Keating <geoffk@apple.com>
3242 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
3243 (handle_pragma_implementation): Likewise.
3245 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3248 * typeck.c (build_class_member_access_expr): Allow to access members
3249 of the currently open class.
3250 (finish_class_member_access_expr): Likewise.
3252 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
3255 * name-lookup.c (validate_nonmember_using_decl): Take scope and
3256 name by value, instead of computing them.
3257 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
3258 arguments. Pass them to validate_nonmember_using_decl.
3259 * name-lookup.h (do_local_using_decl): Adjust.
3260 (do_toplevel_using_decl): Likewise.
3261 * parser.c (cp_parser_using_declaration): Likewise.
3262 * pt.c (tsubst_expr): Likewise.
3264 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
3268 * name-lookup.c (qualified_lookup_using_namespace): Search
3269 strongly-associated namespaces first, and only then try other
3272 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
3274 * Make-lang.in (c++.srcextra): Dummy entry.
3276 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3279 * parser.c (cp_parser_template_name): Don't try to parse a
3280 conversion-function-id, as it cannot be a template-name.
3281 (cp_parser_simple_type_specifier): Check for invalid template-ids
3282 even after a built-in type.
3284 2004-01-14 Jan Hubicka <jh@suse.cz>
3287 * pt.c (instantiate_decl): Do not increase function_depth.
3289 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
3293 * parser.c (cp_parser_elaborated_type_specifier): Warn about
3294 attributes and discard.
3295 * decl.c (xref_tag): Don't overwite existing attributes with
3298 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3301 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
3302 is no destructor while looking up a BIT_NOT_EXPR.
3304 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
3306 * cxxfilt.c: Remove unused file.
3308 2004-01-14 Jan Hubicka <jh@suse.cz>
3310 Partial fix to PR c++/12850
3311 * decl2.c (mark_used): Do not proactively instantiate templates
3312 when compiling in unit-at-a-time or not optimizing.
3313 * optimize.c (maybe_clone_body): Do not increase function depth.
3315 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3318 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
3320 2004-01-12 Steven Bosscher <stevenb@suse.de>
3323 * parser.c (cp_parser_member_declaration): Any non-type is also
3324 not a class or a function.
3326 2004-01-12 Jason Merrill <jason@redhat.com>
3329 * class.c (build_base_path): Do not mark vtable references as
3331 (build_vtbl_ref_1): Likewise.
3333 2004-01-12 Richard Henderson <rth@redhat.com>
3336 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
3337 (store_init_value): Use it.
3338 * decl.c (check_initializer): Expect full initialization code
3339 from store_init_value.
3340 * init.c (expand_aggr_init_1): Likewise.
3341 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
3343 2004-01-12 Mark Mitchell <mark@codesourcery.com>
3345 * class.c (layout_class_type): For non-POD class types, also copy
3346 the DECL_SIZE and DECL_MODE of fields to the base class type.
3348 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3351 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
3352 calling regenerate_decl_from_template.
3354 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
3357 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
3358 decl-specifier occurring along with a class definition.
3360 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
3362 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
3363 clauses to comments describing declares_class_or_enum.
3364 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
3367 2004-01-12 Jan Hubicka <jh@suse.cz>
3369 * pt.c (for_each_template_parm): Do not check for duplicates.
3370 (for_each_template_parm): Use walk_tree duplicate checking code.
3372 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
3375 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
3376 is error_mark_node, don't add any more decl_specs.
3377 (cp_parser_init_declarator): After committing to a declaration, if
3378 the decl_specifiers start with error_mark_node, issue an error and
3379 change the type to "int".
3381 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
3384 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
3386 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3390 * pt.c (tsubst): Substitution must fail if we are attempting to
3391 create an array with element type that is an abstract class type.
3392 * decl.c (cp_finish_decl): Strip pointers and array types recursively
3393 before calling abstract_virtuals_error.
3395 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
3397 * name-lookup.c (qualified_lookup_using_namespace): Consider
3398 strong using directives even if we've already found a binding.
3400 2004-01-09 Mark Mitchell <mark@codesourcery.com>
3402 * cp-tree.h (cxx_expand_expr): Change prototype.
3403 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
3405 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3408 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
3409 looking into them recursively. They can be there because of the
3410 new __offsetof__ extension.
3412 2004-01-07 Zack Weinberg <zack@codesourcery.com>
3414 * parser.c (cp_parser_save_member_function_body): Mark the
3417 2004-01-05 Mark Mitchell <mark@codesourcery.com>
3420 * class.c (build_clone): Copy type attributes from the original
3421 function to the clone.
3424 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
3425 references as constant.
3428 * parser.c (cp_parser_explicit_instantiation): Improve error
3430 (cp_parser_require): Improve indication of the error location.
3433 * parser.c (cp_parser_class_head): Reorder logic to check for
3434 invalid qualification.
3436 2004-01-04 Mark Mitchell <mark@codesourcery.com>
3439 * name-lookup.c (lookup_using_namespace): Remove spacesp
3441 (unqualified_namespace_lookup): Likewise.
3442 (lookup_qualified_name): Adjust accordingly.
3443 (lookup_name_real): Likewise.
3444 (lookup_arg_dependent): Do not eliminate the namespace of the
3445 functions found by unqualified name lookup unless that is the
3448 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
3450 * semantics.c (push_deferring_access_checks): Fix format.
3451 (resume_deferring_access_checks): Likewise.
3452 (stop_deferring_access_checks): Likewise.
3453 (pop_deferring_access_checks): Likewise.
3454 (get_deferred_access_checks): Likewise.
3455 (pop_to_parent_deferring_access_checks): Likewise.
3456 (perform_deferred_access_checks): Likewise.
3457 (perform_or_defer_access_check): Likewise.
3459 2004-01-04 Richard Henderson <rth@redhat.com>
3461 * call.c (build_over_call): Don't create a save_expr of an
3462 aggregate, but rather its address.
3464 2004-01-04 Mark Mitchell <mark@codesourcery.com>
3467 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
3468 an offsetof expression.
3470 * parser.c (cp_parser_parameter_declaration): Fix comment.
3473 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
3474 (reference_binding): Set it when appropriate.
3475 (build_temp): New function, split out from ...
3476 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
3477 (initialize_reference): Likewise.
3480 * parser.c (cp_parser): Add in_type_id_in_expr_p.
3481 (cp_parser_new): Initialize it.
3482 (cp_parser_postfix_expression): Set it.
3483 (cp_parser_sizeof_operand): Likewise.
3484 (cp_parser_parameteR_declaration): Do not commit early to tenative
3485 parsers when in_type_id_in_expr_p is set.
3487 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3490 * parser.c (cp_parser_template_argument): Don't call
3491 make_unbound_class_template directly.
3492 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
3493 UNBOUND_CLASS_TEMPLATE tree node.
3495 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
3498 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
3500 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3503 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
3504 (DECL_FUNCTION_TEMPLATE_P): Use it.
3505 (DECL_CLASS_TEMPLATE_P): Likewise.
3506 * parser.c (cp_parser_lookup_name): Add is_template parameter.
3507 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
3508 (cp_parser_template_name): Likewise.
3509 (cp_parser_elaborated_type_specifier): Likewise.
3510 (cp_parser_namespace_name): Likewise.
3511 (cp_parser_class_name): Likewise.
3512 (cp_parser_lookup_name_simple): Likewise.
3514 See ChangeLog.3 for earlier changes.