1 2004-07-26 Niall Douglas <s_fsfeurope2@nedprod.com>
2 Brian Ryner <bryner@brianryner.com>
6 * class.c (check_field_decls): Apply hidden visibility if
7 -fvisibility-inlines-hidden and inlined unless otherwise specified
8 (build_vtable): Set vtable visibility to class visibility.
9 (check_field_decls): Default static member visibility to class
11 (check_methods): Default method visibility to class visibility.
12 * cp-tree.h: Added CLASSTYPE_VISIBILITY and
13 CLASSTYPE_VISIBILITY_SPECIFIED macro.
14 * decl.c (duplicate_decls): New logic for merging definition decls
15 with declaration decls. Added ignore & warning when non default
16 applied to global operator new or delete.
17 * method.c, optimize.c, rtti.c: Added setting of VISIBILITY_SPECIFIED
18 wherever VISIBILITY was changed
19 * rtti.c (get_tinfo_decl): Set typeinfo visibility to class
21 (tinfo_base_init): Set typeinfo name visibility to class visibility.
23 2004-07-25 Bernardo Innocenti <bernie@develer.com>
25 * decl.c: Rename all identifiers named `class' to `cl'.
26 * cp-tree.h: Likewise.
28 2004-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
30 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Use GGC_CNEW.
31 * typeck2.c (abstract_virtuals_error): Use GGC_NEW.
32 * name-lookup.c (binding_entry_make): Use GGC_NEW.
33 (binding_table_construct): Use GGC_CNEWVEC.
34 (binding_table_new): Use GGC_NEW.
35 (cxx_binding_make): Likewise.
36 (begin_scope): Likewise.
37 (push_to_top_level): Use GCC_CNEW.
38 * parser.c (cp_token_cache_new): Likewise.
39 (cp_token_cache_push_token): Likewise.
40 (cp_lexer_new_main): Likewise.
41 (cp_lexer_new_from_tokens): Likewise.
42 (cp_parser_context_new): Likewise.
43 (cp_parser_new): Likewise.
44 (cp_lexer_new_from_tokens): Use GGC_NEWVEC.
45 * lex.c (cxx_make_type): Use GGC_CNEW.
46 (retrofit_lang_decl): Use GGC_NEWVAR.
47 (cxx_dup_lang_specific_decl): Likewise.
48 (copy_lang_type): Likewise.
49 * decl.c (use_label): Use GGC_NEW instead of ggc_alloc.
50 (save_function_data): Likewise.
51 (lookup_label): Use GGC_CNEW instead of ggc_alloc_cleared.
52 (cxx_push_function_context): Likewise.
54 2004-07-25 Richard Henderson <rth@redhat.com>
56 * decl.c (start_preparsed_function): Set DECL_ARTIFICIAL and
57 DECL_IGNORED_P on RESULT_DECL.
58 * semantics.c (finalize_nrv): Copy them too.
60 2004-07-23 Nathan Sidwell <nathan@codesourcery.com>
62 * search.c (lookup_conversion_operator): Avoid two loops.
63 (add_conversions): Remove.
64 (check_hidden_convs, split_conversions,
65 lookup_conversions_r): New.
66 (lookup_conversions): Use lookup_conversions_r.
68 2004-07-22 Nathan Sidwell <nathan@codesourcery.com>
70 * pt.c (get_template_base): Check type is completable.
72 2004-07-21 Eric Christopher <echristo@redhat.com>
74 * decl.c (poplevel): Inline unused variable checking.
77 2004-07-21 Paolo Bonzini <bonzini@gnu.org>
79 * typeck.c (build_binary_op): Do not use RDIV_EXPR for
82 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
85 * pt.c (check_explicit_specialization): Remove extension to accept
86 specializations without template headers. Fall-through to normal
89 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
92 * pt.c (determine_specialization): New parameter template_count.
93 Disambiguate between member templates and member functions counting
95 (check_explicit_specialization): Update caller.
96 (tsubst_friend_function): Likewise.
98 2004-07-20 Steven Bosscher <stevenb@suse.de>
100 * cp-tree.def (TINST_LEVEL): Make it an 'x' node.
101 * cp-tree.h (tinst_level_t): New tree type.
102 (union lang_tree_node): Handle it.
103 (TINST_LOCATION): New accessor macro.
104 (make_tinst_level): New prototype.
105 * cp-lang.c (cp_tree_size): Handle TINST_LEVEL.
106 * decl.c (cp_tree_node_structure): Likewise.
107 * error.c (print_instantiation_full_context): Use TINST_LOCATION.
108 (print_instantiation_partial_context): Likewise.
109 * pt.c (pop_tinst_level): Likewise.
110 (push_tinst_level): Use make_tinst_level.
111 * tree.c (make_tinst_level): New function.
112 (cp_walk_subtrees): Walk TINST_DECL for a TINST_LEVEL node.
114 2004-07-20 Mark Mitchell <mark@codesourcery.com>
116 * parser.c (cp_parser_simple_type_specifier): Fix typo.
119 * parser.c (cp_parser_simple_type_specifier): Do not record usage
120 of globally-qualified names.
122 2004-07-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
125 * error.c (dump_type) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Output
128 2004-07-19 Mark Mitchell <mark@codesourcery.com>
131 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
132 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
133 * class.c (add_implicitly_declared_members): Use
134 CLASSTYPE_LAZY_ASSIGNMENT_OP.
135 * method.c (lazily_declare_fn): Clear
136 CLASSTYPE_LAZY_ASSIGNMENT_OP.
137 * search.c (lookup_fnfields_1): Check it.
139 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
141 * cp-tree.h (vec_binfo_member): Remove.
142 * tree.c (vec_binfo_member): Remove.
144 * cp-tree.h (struct lang_type_class): Remove vfields field.
145 (CLASSTYPE_VFIELDS): Remove.
146 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
147 * class.c (determine_primary_base): Remove CLASSTYPE_VFIELDS
149 (dfs_modify_vtables): Use TYPE_CONTAINS_VPTR_P.
150 (finish_struct_1): Remove CLASSTYPE_VFIELDS handling.
151 * init.c (dfs_initialize_vtbl_ptrs): Use TYPE_CONTAINS_VPTR_P.
153 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
155 * cp-tree.h (DEF_VEC_P(tree)): Remove here.
156 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
158 (BINFO_LANG_SLOTS): Remove.
159 * tree.c (copy_binfo): Adjust BINFO creation and accessors.
160 * decl.c (xref_basetypes): Adjust BINFO creation and accessors.
161 * class.c (check_bases): Adjust BINFO accessors.
162 (determine_primary_base, finish_struct_bits,
163 maybe_warn_about_overly_private_class, warn_hidden,
164 walk_subobject_offsets, propagate_binfo_offsets, end_of_class,
165 warn_about_ambiguous_bases, get_vfield_name,
166 dump_class_hierarchy_r, build_vtt_inits, accumulate_vtbl_inits,
167 add_vcall_offset_vtbl_entries_r): Likewise.
168 * dump.c (cp_dump_tree): Likewise.
169 * init.c (sort_mem_initializers, expand_member_init, build_delete,
170 push_base_cleanups): Likewise.
171 * method.c (do_build_copy_constructor, do_build_assign_ref,
172 synthesize_exception_spec): Likewise.
173 name-lookup.c (arg_assoc_class): Likewise.
174 * pt.c (instantiate_class_template,
175 get_template_base_recursive): Likewise.
176 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Likewise.
177 * typeck2.c (process_init_constructor): Likewise.
178 * search.c (lookup_base_r, dynamic_cast_base_recurse,
179 dfs_access_in_type, dfs_walk_real, look_for_overrides,
180 types_overlap_p, copied_binfo, original_binfo): Likewise.
181 (binfo_for_vtable): Remove
183 2004-07-20 Steven Bosscher <stevenb@suse.de>
185 * cp-tree.h (struct lang_decl_flags): Unify the template_info and
186 thunk_alias, and the access and virtual_offset fields.
187 (THUNK_VIRTUAL_OFFSET, THUNK_ALIAS): Adjust.
188 * decl.c (finish_case_label): Update c_add_case_node call.
190 2004-07-19 Mark Mitchell <mark@codesourcery.com>
192 Revert patch for PR c++/16623.
194 2004-07-19 Kelley Cook <kcook@gcc.gnu.org>
196 * except.c: Remove two spurious carriage returns.
198 2004-07-19 Mark Mitchell <mark@codesourcery.com>
201 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
202 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
203 * class.c (add_implicitly_declared_members): Use
204 CLASSTYPE_LAZY_ASSIGNMENT_OP.
205 * method.c (lazily_declare_fn): Clear
206 CLASSTYPE_LAZY_ASSIGNMENT_OP.
207 * search.c (lookup_fnfields_1): Check it.
209 2004-07-19 Nathan Sidwell <nathan@codesourcery.com>
211 * class.c (add_method): Delay adding the slot until the end.
212 (determine_primary_base): Adjust VEC_iterate invokation.
213 (resort_type_method_vec, finish_struct_methods, warn_hidden,
214 walk_subobject_offsets, end_of_class, warn_about_ambiguous_bases,
215 build_vtbl_initializer): Likewise.
216 * init.c (sort_mem_initializers, build_delete, push_base_cleanups,
217 build_vbase_delete): Likewise.
218 * method.c (do_build_copy_constructor): Likewise.
219 * name-lookup.c (new_class_binding, print_binding_level,
220 poplevel_class, store_class_bindings, push_to_top_level,
221 pop_from_top_level): Likewise.
222 * pt.c (check_explicit_specialization): Likewise.
223 * search.c (lookup_conversion_operator, lookup_fnfields_1,
224 get_pure_virtuals, add_conversions, dfs_check_overlap,
225 binfo_for_vbase): Likewise.
227 2004-07-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
230 * pt.c (unify) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Use only
231 innermost set of template arguments during deduction. Simplify.
233 2004-07-19 Joseph S. Myers <jsm@polyomino.org.uk>
235 * typeck.c (build_modify_expr, build_x_modify_expr): Set
236 TREE_NO_WARNING on assignments with an operator other than '='.
238 2004-07-10 Steven Bosscher <stevenb@suse.de>
239 Joseph S. Myers <jsm@polyomino.org.uk>
241 * cp-tree.h (C_SET_EXP_ORIGINAL_CODE): Remove.
242 * decl2.c (grokfield): Don't check current_class_depth via
243 unused TREE_COMPLEXITY.
244 * semantics.c (finish_parenthesized_expr): Set TREE_NO_WARNING
245 to avoid the missing parentheses warning.
246 Don't set C_SET_EXP_ORIGINAL_CODE.
248 2004-07-18 Mark Mitchell <mark@codesourcery.com>
250 * tree.c (no_linkage_helper): Remove.
251 (no_linkage_check): Don't use walk_tree_without_duplicates.
253 * mangle.c (write_expression): Issue a sorry for zero-operand
256 2004-07-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
259 * init.c (build_offset_ref): Build SCOPE_REF with non-null
260 TREE_TYPE for non-dependent names.
261 * typeck.c (build_x_unary_op): Handle non-dependent SCOPE_REF.
262 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
263 unknown_type_node as its TREE_TYPE.
264 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
265 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
266 (dump_expr) <SCOPE_REF case>: Likewise.
268 2004-07-17 Jason Merrill <jason@redhat.com>
271 * call.c (type_passed_as): Make the invisible reference type
273 * cp-gimplify.c (gimplify_cleanup_stmt): Rename to
274 cp_genericize_r. Handle invisible reference lowering.
275 (is_invisiref_parm): New fn.
276 (cp_genericize): Adjust the types of invisible reference parms.
277 Don't repeat the walk for clones.
278 * decl.c (store_parm_decls): Don't generate any code for clones.
280 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
282 * cp-tree.h (builtin_function): Declare.
284 2004-07-16 Mark Mitchell <mark@codesourcery.com>
286 * class.c (finish_struct_methods): Remove unncessary code.
287 (add_implicitly_declared_members): Create declarations for default
288 constructors and copy constructors lazily.
289 * cp-tree.h (lang_type_class): Remove lazy_default_ctor and
291 (CLASSTYPE_LAZY_DEFAULT_CTOR): New macro.
292 (CLASSTYPE_LAZY_COPY_CTOR): Likewise.
293 * decl2.c (check_classfn): Robustify.
294 (locate_dtor): Handle empty CLASSTYPE_METHOD_VEC.
295 (locate_ctor): Handle lazy default constructors.
296 (locate_copy): Handle lazy copy constructors.
297 (implicitly_declare_fn): Make sure we're looking at the
298 TYPE_MAIN_VARIANT for a class before creating functions. Don't
299 set TYPE_HAS_CONSTRUCTOR.
300 (lazily_declare_fn): New function.
301 * name-lookup.c (constructor_name_full): Simplify.
302 * search.c (lookup_fnfields_1): Lazily create methods, as
304 (lookup_for_overrides): Handle empty CLASSTYPE_METHOD_VEC.
306 2004-07-16 Steven Bosscher <stevenb@suse.de>
308 * cp-tree.h (struct lang_type): Don't have three GTY options on a
311 2004-07-16 Richard Henderson <rth@redhat.com>
313 * cp-lang.c (LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING): Die.
314 * cp-tree.h (cp_copy_res_decl_for_inlining): Remove.
315 * tree.c (cp_copy_res_decl_for_inlining): Remove.
317 2004-07-16 Nathan Sidwell <nathan@codesourcery.com>
319 * class.c (finish_struct_bits): Use for loop.
320 (propagate_binfo_offsets): Do primary binfo outside of loop.
323 * dump.c (cp_dump_tree): Don't dump the bases if there's no
326 * pt.c (tsubst) <TREE_BINFO case>: We should never get here.
328 2004-07-15 Mark Mitchell <mark@codesourcery.com>
330 * cp-tree.h (lang_type_class): Remove has_real_assign_ref and
331 has_abstract_assign_ref. Make methods a VEC(tree) *.
332 (TYPE_HAS_CONST_ASSIGN_REF): Add documentation.
333 (CLASSTYPE_CONSTRUCTORS): Adjust for changes to CLASSTYPE_METHOD_VEC.
334 (CLASSTYPE_DESTRUCTORS): Likewise.
335 (TYPE_HAS_REAL_ASSIGN_REF): Remove.
336 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
337 (add_method): Change prototoype.
338 * class.c (add_method): Remove error_p parameter. Adjust for
339 changes to CLASSTYPE_METHOD_VEC.
340 (handle_using_decl): Adjust call to add_method.
341 (maybe_warn_about_overly_private_class): Adjust for
342 changes to CLASSTYPE_METHOD_VEC.
343 (resort_type_method_vec): Likewise.
344 (finish_struct_methods): Likewise.
345 (check_for_override): Likewise.
346 (warn_hidden): Likewise.
347 (add_implicitly_declared_members): Defer creation of assignment
348 operators. Adjust call to add_method.
349 (clone_function_decl): Adjust call to add_method.
350 (check_bases_and_members): Don't set TYPE_HAS_REAL_ASSIGN_REF.
351 (finish_struct_1): Use CLASSTYPE_DESTRUCTORS.
352 * decl.c (grok_special_member_properties): Don't set
353 TYPE_HAS_ABSTRACT_ASSIGN_REF.
354 * decl2.c (check_classfn): Adjust for
355 changes to CLASSTYPE_METHOD_VEC.
356 * method.c (locate_dtor): Use CLASSTYPE_DESTRUCTORS.
357 (locate_ctor): Use CLASSTYPE_CONSTRUCTORS.
358 (locate_copy): Adjust for changes to CLASSTYPE_METHOD_VEC.
359 (implicitly_declare_fn): Set DECL_SOURCE_LOCATION. Do not call
361 * pt.c (check_explicit_specialization): Adjust for
362 changes to CLASSTYPE_METHOD_VEC.
363 (instantiate_class_template): Do not set
364 TYPE_HAS_ABSTRACT_ASSIGN_REF.
365 * ptree.c (cxx_print_type): Don't try to print
366 CLASSTYPE_METHOD_VEC.
367 * rtti.c (emit_support_tinfos): Use CLASSTYPE_DESTRUCTORS.
368 * search.c (lookup_field_r): Adjust for
369 changes to CLASSTYPE_METHOD_VEC.
370 (lookup_fnfields): Likewise.
371 (lookup_conversion_operator): Likewise.
372 (lookup_fnfields_1): Likewise. Create assignment operators
374 (look_for_overrides_here): Adjust for
375 changes to CLASSTYPE_METHOD_VEC.
376 (add_conversions): Likewise.
377 * semantics.c (finish_member_declaration): Adjust call to add_method.
379 2004-07-15 Jason Merrill <jason@redhat.com>
381 * cp-lang.c (cxx_types_compatible_p): To the middle-end,
382 references and pointers are compatible.
384 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
386 * decl.c (xref_basetypes): Refactor.
387 * tree.c (copy_base_binfos): Replace with ...
388 (copy_binfo): ... this. Deep copy the given binfo, (not the just
389 bases of the given base).
390 * cp-tree.h (copy_base_binfo): Remove.
391 (copy_binfo): Declare.
393 2004-07-15 Mark Mitchell <mark@codesourcery.com>
395 * name-lookup.c (set_inherited_value_binding_p): Add class_type
397 (get_class_binding): Adjust.
398 (push_class_level_binding): Don't use set_inherited_value_binding_p.
400 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
402 * class.c (finish_struct_bits): Don't set TYPE_HAS_CONVERSION here.
403 * decl.c (xref_basetypes): Set it here.
405 * class.c (check_bases): Don't set CLASSTYPE_NON_AGGREGATE here.
406 Don't check for incomplete base.
407 (get_vfield_name): Simplify while loop.
408 * decl.c (xref_basetypes): Set CLASSTYPE_NON_AGGREGATE here.
410 2004-07-14 Mark Mitchell <mark@codesourcery.com>
412 * lex.c (cxx_make_type): Remove call to get_pointer_type.
414 * cp-tree.h (IDENTIFIER_VALUE): Remove.
415 (BINFO_PUSHDECLS_MARKED): Likewise.
416 (maybe_inject_for_scope_var): Likewise.
417 (push_class_decls): Likewise.
418 * name-lookup.h (push_class_binding): Remove.
419 (innermost_non_namespace_value): New function.
420 (outer_binding): Likewise.
421 * class.c (add_method): Push bindings before adding to
423 (restore_class_cache): Do not restore class_shadowed.
424 (pushclass): Do not add USING_DECLs. Do not call
426 * config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c.
427 * decl.c (pushdecl): Use outer_binding.
428 (poplevel): Set the scope for an out-of-scope for-loop declaration
430 (cp_finish_decl): Don't call maybe_inject_for_scope_var.
431 * name-lookup.c (new_class_binding): New function.
432 (push_binding): Use it.
433 (pushdecl): Use innermost_non_namespace_value.
434 (maybe_inject_for_scope_var): Remove.
435 (push_class_binding): Remove.
436 (set_inherited_value_binding_p): New function.
437 (get_class_binding): New function.
438 (push_class_level_binding): Assert that the current_class_type is
440 (outer_binding): New function.
441 (innermost_non_namespace_value): Likewise.
442 (lookup_name_real): Use outer_binding.
443 (lookup_name_current_level): Ignore out-of-scope variables.
444 * pt.c (check_template_shadow): Use innermost_non_namespace_value.
445 (lookup_template_class): Likewise.
446 * search.c (dfs_push_type_decls): Remove.
447 (dfs_push_decls): Likewise.
448 (setup_class_bindings): Likewise.
449 (lookup_field_1): Handle USING_DECLs from dependent scopes.
450 (marked_pushdecls_p): Remove.
451 (unmarked_pushdecls_p): Remove.
452 (marked_identifiers): Remove.
453 (setup_class_bindings): Remove.
454 (dfs_push_type_decls): Remove.
455 (dfs_push_decls): Remove.
456 (push_class_decls): Remove.
458 2004-07-13 Mark Mitchell <mark@codesourcery.com>
462 * decl.c (grokvardecl): Make declspecs parameter const.
463 (grokdeclarator): Likewise. Adjust accordingly.
464 * decl.h (grokdeclarator): Adjust declaration.
465 * parser.c (cp_parser_init_declarator): Do not clear
466 decl_specifiers->attributes.
468 * cp-tree.h (lang_identifier): Remove class_value.
469 (IDENTIFIER_CLASS_VALUE): Remove.
470 (pop_class_decls): Likewise.
471 (init_search_processing): Likewise.
472 * class.c (handle_using_decl): Use lookup_member, not
473 IDENTIFIER_CLASS_VALUE.
474 (restore_class_cache): New function, split out from ...
475 (pushclass): ... here. Do not call clear_identifier_class_values.
476 (invalidate_class_lookup_cache): Do not clear
477 IDENTIFIER_CLASS_VALUE.
478 (popclass): Do not call pop_class_decls.
479 (maybe_note_name_used_in_class): Do not save names looked up after
480 the class is complete. Use lookup_member, not
481 IDENTIFIER_CLASS_VALUE.
482 * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
483 * decl.c (cxx_init_decl_processing): Do not call
484 init_search_processing.
485 * method.c (do_build_copy_constructor): Remove unnecessary code.
486 (do_build_assign_ref): Likewise.
487 * name-lookup.c (pushdecl): Use lookup_member, not
488 IDENTIFIER_CLASS_VALUE.
489 (set_identifier_type_value_with_scope): Set TREE_TYPE on the
491 (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
492 (push_class_binding): Do not set it.
493 (clear_identifier_class_values): Remove.
494 (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
495 (store_binding): Do not save it.
496 (pop_from_top_level): Do not restore it.
497 * name-lookup.h (cxx_saved_binding): Remove class_value.
498 (clear_identifier_class_values): Remove.
499 * ptree.c (cxx_print_identifier): Do not print
500 IDENTIFIER_CLASS_VALUE.
501 * search.c (search_obstack): Remove.
502 (push_stack_level): Remove.
503 (pop_stack_level): Remove.
504 (search_level): Remove.
505 (search_stack): Remove.
506 (lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
507 (setup_class_bindings): Use IDENTIFIER_MARKED, not
508 IDENTIFIER_CLASS_VALUE.
509 (marked_identifiers): New variable.
510 (push_class_decls): Clear IDENTIFIER_MARKED.
511 (pop_class_decls): Don't call pop_search_level.
512 (init_search_processing): Remove.
514 2004-07-12 Mark Mitchell <mark@codesourcery.com>
516 * cp-tree.h (get_aggr_typedef): Remove.
517 * init.c (get_aggr_typedef): Likewise.
519 * name-lookup.c (push_class_level_binding): Simplify.
521 2004-07-12 Andrew Pinski <apinski@apple.com>
525 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
527 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
530 2004-07-12 Eric Christopher <echristo@redhat.com>
532 * parser.c (cp_parser_class_head): Remove unused variable.
534 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
536 * decl.c (grok_op_properties): Reject [de-]allocation functions
537 declared in a namespace, or declared as static.
539 2004-07-12 Nathan Sidwell <nathan@codesourcery.com>
541 * cp-tree.h (make_binfo): Remove.
542 * decl.c (xref_basetypes): Use make_tree_binfo directly.
543 * tree.h (copy_base_binfos): Likewise.
544 (make_binfo): Remove.
546 * call.c (build_user_type_conversion_1, build_new_op,
547 check_constructor_callable, build_temp,
548 perform_direct_initialization_of_possible): Pass type directly to
549 lookup_fnfields & build_special_member_call.
550 (build_special_member_call): Accept a type, and complete it.
551 * class.c (finish_stuct_bits): Copy the BINFOs here.
552 * cvt.c (ocp_convert): Pass type directly to
553 build_special_member_call.
554 * decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
555 (xref_basetypes): Allocate the binfo here. Adjust.
556 * init.c (build_init, build_new_1): Pass type directly to
557 build_special_member_call.
558 * lex.c (cxx_make_type): Do not allocate binfo here.
559 * name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
560 * parser.c (cp_parser_class_head): Always call xref_basetypes.
561 * pt.c (instantiate_class_template): Likewise. Inhibit access
562 checking for template friends.
563 * ptree.c (cxx_print_type): Adjust record printing.
564 * search.c (lookup_base): When taking a type, complete it before
566 (lookup_member): Delay completing a type.
567 (push_class_decls): Don't walk an incomplete type.
568 (lookup_conversions): Likewise.
569 * semantics.c (finish_stmt_expr_expr): Pass type directly to
570 build_special_member_call.
571 * tree.c (copy_base_binfos): Adjust.
572 (make_binfo): Likewise.
573 * typeck.c (build_modify_expr): Pass type directly to
574 build_special_member_call.
575 * typeck2.c (process_init_constructor): Check a binfo exists.
576 (build_m_component_ref): Allow accessing an incomplete type.
577 (build_functional_cast): Pass type directly to
578 build_special_member_call.
580 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
583 * config-lang.in (gtfiles): Add typeck2.c.
584 * Make-lang.in: Tweak typeck2.c dependencies, and add rule for
586 * cp-tree.h: Declare complete_type_check_abstract.
587 * typeck2.c (pat_calc_hash, pat_compare,
588 complete_type_check_abstract): New functions.
589 (abstract_virtuals_error): If the type is abstract, register the
590 declaration within abstract_pending_vars for further checks.
591 Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
592 * decl.c (cp_finish_decl): Do not strip array types.
593 (create_array_type_for_decl): Check for abstractness of the element
595 (complete_vars): Call complete_type_check_abstract.
596 * class.c (finish_struct): Prepare a list of virtual functions for
597 template types, and call complete_vars on it to check for abstractness.
599 2004-07-12 Paolo Bonzini <bonzini@gnu.org>
601 PR tree-optimization/14107
602 * decl.c (finish_function): Remove temporary band-aid.
604 2004-07-11 Mark Mitchell <mark@codesourcery.com>
606 * call.c (build_operator_new_call): Avoid using push_to_top_level.
607 (build_new_op): Adjust call to lookup_function_nonclass.
608 * name-lookup.c (identifier_type_value): Adjust call to
610 (lookup_name_real): Add block_p parameter.
611 (lookup_name_nonclass): Adjust call to lookup_name_real.
612 (lookup_function_nonclass): Likewise.
613 (lookup_name): Likewise.
614 * name-lookup.h (lookup_name_real): Change prototype.
615 (lookup_name_nonclass): Likewise.
616 * parser.c (cp_parser_lookup_name): Likewise.
618 * cp-tree.h (saved_scope): Make old_bindings a vector.
619 (unuse_fields): Remove.
620 * name-lookup.h (cxx_saved_binding): Define it.
621 * class.c (pushclass): Don't use unuse_fields.
622 * name-lookup.c (cxx_saved_binding_make): Remove.
623 (store_binding): Add new bindings to a vector, using an
624 accumulator style, rather than adding them to a list.
625 (store_bindings): Adjust accordingly.
626 (store_class_bindings): Likewise.
627 (push_to_top_level): Likewise.
628 (pop_from_top_level): Likewise.
629 * optimize.c (maybe_clone_body): Must push_to_top_level and
630 pop_from_top_level calls outside of loop.
631 * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope
632 calls here from cp_parser_late_parsing_default_args.
633 (cp_parser_save_default_args): Record the class type in which the
634 function is declared.
635 (cp_parser_late_parsing_default_args): Do not call
636 push_nested_class/pop_nested_class.
637 * search.c (dfs_unuse_fields): Remove.
638 (unuse_fields): Remove.
640 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
642 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
643 LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
644 * cp-tree.h (poplevel): Declare.
646 * decl.c (set_block): Remove.
648 2004-07-10 Mike Stump <mrs@apple.com>
650 * decl2.c (import_export_class): Never export/import vtables
651 with inline key functions.
653 2004-07-09 Steven Bosscher <stevenb@suse.de>
655 * typeck.c (c_expand_asm_operands): Remove.
657 2004-07-09 Mike Stump <mrs@apple.com>
659 * typeck.c (build_class_member_access_expr): Skip null deref
660 warning when we don't dereference it.
662 2004-07-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
666 * class.c (check_field_decls): Improve -Weffc++ warning: do not
667 warn for pointers to functions/members, or for classes without
670 2004-07-08 Mark Mitchell <mark@codesourcery.com>
672 * name-lookup.h (struct cp_binding_level): Update documentation
675 2004-07-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
678 * typeck.c (check_return_expr): Improve -Weffc++ warning: handle
679 returning CALL_EXPR, and non-reference return type.
681 2004-07-08 Nathan Sidwell <nathan@codesourcery.com>
683 * name-lookup.c (push_binding): Use VEC_reserve.
685 2004-07-08 Richard Henderson <rth@redhat.com>
687 * cp-tree.h (expand_eh_spec_block): Remove.
689 2004-07-07 Mark Mitchell <mark@codesourcery.com>
691 * cp-tree.h (saved_scope): Remove x_previous_class_type and
692 x_previous_class_values; add x_previous_class_level.
693 (previous_class_type): Remove.
694 (previous_class_values): Remove.
695 (previous_class_level): New macro.
696 * class.c (pushclass): Restore the identifier cache more
698 (invalidate_class_lookup_cache): Use vector for class_shadowed and
699 previous_class_values.
700 * decl.c (poplevel): Likewise.
701 * name-lookup.c (cxx_binding_init): New function.
702 (cxx_binding_make): Use it.
703 (push_binding): For a binding in a class level, use a vector of
704 cp_class_binding nodes.
705 (push_binding_level): New function.
706 (begin_scope): Use it.
707 (leave_scope): Do not put class binding levels on the free list.
708 (print_binding_level): Adjust for the fact that class_shadowed is
710 (poplevel_class): Likewise.
711 (clear_identifier_class_values): Likewise.
712 (push_class_level_binding): Likewise.
713 (set_class_shadows): Remove.
714 (store_binding): New function.
715 (store_class_bindings): New function.
716 (push_to_top_level): Use store_class_bindings as appropriate.
717 (pop_from_top_level): Use previous_class_level, not
719 * name-lookup.h (cp_class_binding): New type.
720 (cp_binding_level): Use a vector object for class_shadowed.
721 (push_binding_level): Declare.
722 (set_class_shadows): Remove.
724 2004-07-07 Andrew Pinski <apinski@apple.com>
726 * class.c (instantiate_type): BUFFER_REF is dead.
727 * lex.c (init_operators): IN_EXPR is dead.
729 2004-07-07 Jason Merrill <jason@redhat.com>
732 * call.c (build_new_op): Give overload warnings for built-in
735 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
738 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
741 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
743 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
744 * class.c (build_primary_vtable, check_bases,
745 determine_primary_base, finish_struct_bits,
746 maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
747 get_basefndecls, warn_hidden, walk_subobject_offsets,
748 build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
749 layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
750 finish_struct_1, get_vfield_name, contains_empty_class_p,
751 dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
752 dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
753 add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
755 * decl.c (xref_basetypes): Likewise.
756 * dump.c (cp_dump_tree): Likewise.
757 * error.c (dump_expr): Likewise.
758 * init.c (sort_mem_initializers, expand_member_init,
759 push_base_cleanups): Likewise.
760 * method.c (do_build_copy_constructor, do_build_assign_reg,
761 synthesize_exception_spec): Likewise.
762 * name-lookup.c (arg_assoc_class): Likewise.
763 * pt.c (instantiate_class_template, tsubst,
764 get_template_base_recursive): Likewise.
765 * ptree.c (cxx_print_type): Likewise.
766 * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
767 * search.c (lookup_base_r, dynamic_cast_base_recurse,
768 dfs_access_in_type, access_in_type, lookup_field_queue_p,
769 bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
770 marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
771 dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
772 binfo_for_vtable, copied_binfo, original_binfo): Likewise
773 * tree.c (copy_base_binfos, make_binfo): Likewise.
774 * typeck.c (commmon_base_type): Likewise
775 * typeck2.c (process_init_constructor): Likewise
777 2004-07-06 Joseph S. Myers <jsm@polyomino.org.uk>
779 * decl.c (check_tag_decl): Name redeclared type in diagnostic.
781 2004-07-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
784 * pt.c (convert_nontype_argument): Disallow conversions between
785 different enumeration types.
787 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
789 * cp-tree.h (BINFO_MARKED): Remove.
790 (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
791 BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
792 BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
793 (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
794 * class.c (build_base_path): Use BINFO_VIRTUAL_P.
795 (mark_primary_bases, determine_primary_base, base_derived_from,
796 dfs_find_final_overrider, dfs_find_final_overrider_q,
797 dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
798 dfs_modify_vtables, walk_subobject_offsets,
799 layout_nonempty_base_or_field, build_base_field,
800 build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
801 end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
802 finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
803 build_ctor_vtbl_group, accumulate_vtble_inits,
804 dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
805 build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
806 add_vcall_offset_vtbl_entries_1): Likewise.
807 * decl.c (xref_basetypes): Incomming virtual base indicated by
809 * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
810 * init.c (finish_init_stmts, sort_mem_initializers,
811 emit_mem_initializers, build_vtble_address, expand_member_init,
812 push_base_cleanups): Likewise.
813 * method.c (do_build_copy_constructor): Likewise.
814 * pt.c (instantiate_class_template,
815 get_template_base_recursive): Likewise.
816 * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
817 get_pseudo_ti_desc): Likewise.
818 * search.c (lookup_base_r, dynamic_cast_base_recurse,
819 binfo_from_vbase, binfo_via_virtual, copied_binfo,
820 original_binfo): Likewise.
821 * semantics.c (finish_base_specifier): Virtualness is indicated
823 * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
825 2004-07-06 Mark Mitchell <mark@codesourcery.com>
828 2004-06-24 Jason Merrill <jason@redhat.com>
830 * decl.c (grokparms): Give the PARM_DECL reference type if the
831 parameter is passed by invisible reference.
833 2004-07-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
835 * cp-lang.c (cp_var_mod_type_p): Add extra arg.
836 * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
837 * pt.c (check_instantiated_args, unify): Likewise.
839 2004-07-05 Phil Edwards <phil@codesourcery.com>
841 * Make-lang.in (check-c++, lang_checks): Add some comments.
843 2004-07-05 Zack Weinberg <zack@codesourcery.com>
845 * cp-mudflap.c: Delete file.
846 * Makefile.in: Remove all references to cp-mudflap.o.
848 2004-07-05 Zack Weinberg <zack@codesourcery.com>
850 * decl.c (cxx_init_decl_processing): Call
851 build_common_tree_nodes before creating the global NAMESPACE_DECL.
853 2004-07-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
856 * call.c (build_operator_new_call): Look only at global scope.
858 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
860 * call.c (enforce_access): Expect TREE_BINFO.
861 * class.c (binfo_ctor_vtable): Check TREE_BINFO.
862 * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
863 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
865 (BINFO_LANG_ELTS): Remove.
866 (BINFO_LANG_SLOTS): New.
867 (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
868 (CLASSTYPE_TEMPLATE_INFO): Adjust.
869 * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
870 * search.c (lookup_member): Check TREE_BINFO.
871 * semantics.c (perform_or_defer_access_check): Likewise.
872 (check_accessibility_of_qualified_id): Check
873 deferred_access_no_check.
874 * tree.c (make_binfo): Use make_tree_binfo.
876 2004-07-04 Mark Mitchell <mark@codesourcery.com>
878 * method.c (implicitly_declare_fn): Set linkage of generated
881 2004-07-04 Richard Henderson <rth@redhat.com>
883 * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
885 2004-07-03 Scott Brumbaugh <scottb.lists@verizon.net>
888 * name-lookup.c (push_class_level_binding): Don't pass a
889 TREE_LIST of ambiguous names to check_template_shadow as it
890 only handles declarations. Instead, pull the declaration
893 2004-07-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
896 * pt.c (check_explicit_specialization): Clarify error message.
898 2004-07-02 Richard Henderson <rth@redhat.com>
900 * tree.c (cp_unsave_r): Update remap_save_expr call.
902 2004-07-02 Mark Mitchell <mark@codesourcery.com>
905 * mangle.c (write_template_arg): Correct mangling.
908 * decl.c (grokdeclarator): Robustify.
910 2004-07-01 Richard Henderson <rth@redhat.com>
912 * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
913 * method.c (synthesize_method): Don't clear_last_expr.
914 * name-lookup.c (maybe_push_cleanup_level): Likewise.
916 2004-07-01 Nick Clifton <nickc@redhat.com>
918 * decl2.c (import_export_class): Invoke the
919 import_export_class field in the gcc_target structure if it is not
922 2004-06-30 Richard Henderson (rth@redhat.com>
924 * decl.c (start_preparsed_function): Don't set immediate_size_expand.
925 * method.c (use_thunk): Likewise.
927 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
929 * call.c (build_over_call), typeck.c (build_function_call): Call
930 check_function_arguments instead of check_function_format.
932 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
934 * call.c (build_over_call), typeck.c (build_function_call): Update
935 calls to check_function_format.
937 2004-06-30 Richard Henderson <rth@redhat.com>
939 * call.c (build_over_call): Use __builtin_memcpy for copying
940 CLASS_AS_BASE rather than funny casting.
942 2004-06-30 Richard Henderson <rth@redhat.com>
944 * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
945 TYPE_SIZE_UNIT of full_type.
947 2004-06-30 Per Bothner <per@bothner.com>
949 Conditionally compile support for --enable-mapped_location.
950 * decl.c (pop_label): Handle (imperfectly) USE_MAPPED_LOCATION case.
951 * decl2.c: If USE_MAPPED_LOCATION, don't do some line number
952 adjustments - which I don't understand.
953 * error.c (dump_decl): Rename "<interrnal>" to "<built-in>".
954 * error.c: Use LOCATION_FILE and EXPR_LOCATION macros.
955 (print_instantiation_partial_context): Use expand_location.
956 * decl.c (duplicate_decl): Use new DECL_IS_BUILTIN macro.
957 * name-lookup.c: Likewise.
958 * lex.c (cxx_init): Likewise. Also use BUILTINS_LOCATION.
959 * name-lookup.c: Use input_line macro.
960 * parser.c (cp_lexer_get_preprocessor_token): Use UNKNOWN_LOCATION.
961 (cp_parser_statement): Rename locaal variable statement_locus to
962 statement_location and use SET_EXPR_LOCATION macro.
963 * pt.c: Handle USE_MAPPED_LOCATION case. Use new macros.
964 * tree.c (cp_walk_subtrees): Likewise.
966 2004-06-29 Per Bothner <per@bothner.com>
968 * tree.c (build_min_nt, build_min, build_min_non_dep):
969 Don't set TREE_COMPLEXITY from input_line.
971 2004-06-29 Paul Brook <paul@codesourcery.com>
973 * init.c: Include target.h.
974 (get_cookie_size): Remove and replace with target hook.
976 (build_new_1): Store the element size in the cookie.
978 2004-06-29 Nathan Sidwell <nathan@codesourcery.com>
981 * parser.c (cp_parser_template_declaration_after_export): Disable
982 access checks here ...
983 (cp_parser_class_specifier): ... not here.
985 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
987 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
988 VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
989 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
992 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
994 * cp-tree.h (struct deferred_access): Move to ...
995 * semantics.c (struct deferred_access): ... here. Adjust.
996 (deferred_access_stack): Make a VEC(deferred_access),
997 (deferred_access_free_list): Remove.
998 (deferred_access_no_check): New.
999 (push_deferring_access_checks, resume_deferring_access_checks,
1000 stop_deferring_access_checks, pop_deferring_access_checks,
1001 get_deferred_access_checks, pop_to_parent_deferring_access_checks,
1002 perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
1004 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1007 * call.c (build_temp): Declare.
1008 (check_constructor_callable): New.
1009 (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
1010 CONSTRUCTOR_CALLABLE.
1011 (convert_like_real, initialize_reference): Use
1012 check_constructor_callable.
1013 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
1014 (LOOKUP_*): Renumber.
1016 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1018 * friend.c (add_friend): Only perform access checks when context
1020 * lex.c (cxx_make_type): Only create a binfo for aggregate types.
1021 * parser.c (cp_parser_class_specifier): Disable access checks here
1022 when parsing the body of a templated class.
1023 * semantics.c (perform_or_defer_access_checks): Reorder to allow
1024 NULL binfos when not checking access.
1026 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1028 Use vector API for vbase list.
1029 * cp-tree.h: Include vec.h
1030 (DEF_VEC_P (tree)): New type.
1031 (struct lang_type_class): Change vbase's member type.
1032 (binfo_for_vbase): Declare.
1033 * class.c (determine_primary_base, base_derived_from,
1034 update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
1035 warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
1036 build_vtbl_initializer): Adjust.
1037 * decl.c (xref_basetypes): Adjust, accumulate upper bound of
1039 * init.c (sort_mem_initializers, expand_member_init,
1040 push_base_cleanups): Adjust.
1041 * method.c (do_build_copy_constructor): Adjust.
1042 * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
1043 (binfo_for_vbase): New.
1044 * tree.c (copy_base_binfos): Adjust.
1046 2004-06-28 Mark Mitchell <mark@codesourcery.com>
1048 * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
1050 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
1053 * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
1054 paranthesis in case of pointers to array members.
1055 * error.c (dump_type_prefix): Likewise.
1056 (dump_type_suffix): Maybe issue a whitespace when printing
1059 2004-06-27 Mark Mitchell <mark@codesourcery.com>
1062 * parser.c (cp_parser_set_decl_spec_type): Refine test for
1063 redefinition of built-in types.
1065 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
1067 * error.c (pp_template_argument_list_start): Remove.
1068 (pp_template_argument_list_end): Likewise.
1069 (pp_separate_with_comma): Use pp_cxx_separate_with.
1070 (reinit_global_formatting_buffer): Remove.
1071 (pp_non_consecutive_character): Likewise.
1072 (dump_scope): Use pp_cxx_colon_colon.
1073 (dump_template_parameter): Use pp_cxx_identifier,
1074 pp_cxx_tree_identifier and pp_cxx_whitespace.
1075 (dump_templat_bindings): Replace use of pp_string with sequence
1076 of pp_cxx_whitespace and pp_equal.
1077 (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
1078 pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set
1080 (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
1081 (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace,
1082 pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
1083 (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
1084 pp_cxx_right_bracket, pp_cxx_identifier throughout,
1085 (dump_decl): Likewise.
1086 (dump_template_decl): Likewise.
1087 (dump_function_decl): Likewise. Set padding as appropriate.
1088 (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
1090 (dump_exception_spec): Likewise.
1091 (dump_function_name): Use pp_cxx_tree_identifier and
1093 (dump_template_parms): Use pp_cxx_begin_template_argument_list and
1094 pp_cxx_end_template_argument_list.
1095 (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
1096 pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
1097 pp_cxx_whitespace throughout.
1098 (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
1100 (dump_unary_op): Likewise.
1101 (reinit_cxx_pp): New function.
1102 (type_as_string); Use it.
1103 (expr_as_string): Likewise.
1104 (decl_as_string); Likewise.
1105 (context_as_string): Likewise.
1106 (lang_decl_name): Likewise.
1107 (decl_to_string): Likewise.
1108 (expr_to_string): Likewise.
1109 (parm_to_string): Likewise.
1110 (type_to_string): Likewise.
1111 (args_to_string): Likewise.
1112 (cv_to_string): Likewise.
1114 2004-06-26 Mark Mitchell <mark@codesourcery.com>
1116 * cp-tree.h (cp_cv_quals): New type.
1117 (cp_declarator): Use it instead of "tree" as appropriate.
1118 (grok_method_quals): Adjust prototype.
1119 (grokclassfn): Likewise.
1120 (do_friend): Likewise.
1121 * decl.c (grokfndecl): Use cp_cv_quals, not tree.
1122 (grokdeclarator): Likewise.
1123 * decl2.c (grok_method_quals): Likewise.
1124 (grokclassfn): Likewise.
1125 * friend.c (do_friend): Likewise.
1126 * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
1127 * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
1128 (make_pointer_declarator): Likewise.
1129 (make_reference_declarator): Likewise.
1130 (make_ptrmem_declarator): Likewise.
1131 (cp_parser_ptr_operator): Likewise.
1132 (cp_parser_cv_qualifier_seq_opt): Likewise.
1133 (cp_parser_cv_qualifier_opt): Remove.
1134 (cp_parser_new_declarator_opt): Adjust call to
1135 cp_parser_ptr_operator.
1136 (cp_parser_conversion_declaration_opt): Likewise.
1137 (cp_parser_declarator): Use cp_cv_quals, not tree.
1138 (cp_parser_direct_declarator): Likewise.
1140 2004-06-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1142 * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
1143 Rename DECL_STMT to DECL_EXPR.
1144 * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
1145 * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
1146 * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
1148 2004-06-26 Jan Hubicka <jh@suse.cz>
1151 * decl2.c (maybe_emit_vtables): Always import_export_vtable for the
1152 reachability analysis.
1154 2004-06-25 Mark Mitchell <mark@codesourcery.com>
1156 * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
1159 2004-06-25 Paul Brook <paul@codesourcery.com>
1161 * decl2.c (get_guard): Call targetm.cxx.guard_type.
1162 (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
1164 2004-06-24 Mark Mitchell <mark@codesourcery.com>
1166 * decl.c (grokdeclarator): Restore error messages about __thread.
1167 * parser.c (cp_parser_decl_specifier_seq): Likewise.
1169 2004-06-24 Jason Merrill <jason@redhat.com>
1172 * decl.c (grokparms): Give the PARM_DECL reference type if the
1173 parameter is passed by invisible reference.
1175 2004-06-24 Andreas Schwab <schwab@suse.de>
1177 * cp-tree.h (enum cp_storage_class): Remove trailing comma.
1179 2004-06-23 Mark Mitchell <mark@codesourcery.com>
1181 * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
1182 (cp/decl.o): Likewise.
1183 (cp/decl2.o): Likewise.
1184 (cp/pt.o): Likewise.
1185 (cp/semantics.o): Likewise.
1186 * config-lang.in (gtfiles): Do not reference cp/lex.h.
1187 * class.c: Do not include lex.h.
1188 (add_implicitly_declared_members): Do not use
1189 adding_implicit_members.
1190 (check_bases_and_members): Do not talk about grok_x_components.
1191 * cp/cp-tree.h (adding_implicit_members): Remove.
1192 (cp_storage_class): New type.
1193 (cp_decl_spec): Likewise.
1194 (cp_decl_specifier_seq): Likewise.
1195 (cp_parameter_declarator): Use it for the decl_specifiers field.
1196 (check_tag_decl): Adjust prototype.
1197 (shadow_tag): Likewise.
1198 (groktypename): Likewise.
1199 (start_decl): Likewise.
1200 (start_function): Likewise.
1201 (start_method): Likewise.
1202 (grok_x_components): Remove.
1203 (grokfield): Adjust prototype.
1204 (grokbitfield): Likewise.
1205 (finish_member_class_template): Remove.
1206 * decl.c: Do not include lex.h.
1207 (adding_implicit_members): Do not define.
1208 (check_tag_decl): Do not use trees to represent decl-specifiers.
1209 (shadow_tag): Likewise.
1210 (groktypename): Likewise.
1211 (start_decl): Likewise.
1212 (grokvardecl): Likewise.
1213 (grokdeclarator): Likewise.
1214 (grokparms): Likewise.
1215 (start_function): Likewise.
1216 (start_method): Likewise.
1217 * decl.h (grokdeclarator): Adjust prototype.
1218 * decl2.c: Do not include lex.h.
1219 (grok_x_components): Remove.
1220 (grokfield): Do not use trees to represent decl-specifiers.
1221 (grokbitfield): Likewise.
1222 * lex.c: Do not include lex.h.
1224 * parser.c: Include target.h.
1225 (clear_decl_specs): New function.
1226 (cp_parser_translation_unit): Do not use trees to represent
1228 (cp_parser_postfix_expression): Likewise.
1229 (cp_parser_new_type_id): Likewise.
1230 (cp_parser_condition): Likewise.
1231 (cp_parser_simple_declaration): Likewise.
1232 (cp_parser_decl_specifier_seq): Likewise.
1233 (cp_parser_function_specifier_opt): Likewise.
1234 (cp_parser_conversion_type_id): Likewise.
1235 (cp_parser_template_parameter): Likewise.
1236 (cp_parser_explicit_instantiation): Likewise.
1237 (cp_parser_type_specifier): Likewise.
1238 (cp_parser_simple_type_specifier): Likewise.
1239 (cp_parser_init_declarator): Likewise.
1240 (cp_parser_type_id): Likewise.
1241 (cp_parser_type_specifier_seq): Likewise.
1242 (cp_parser_parameter_declaration): Likewise.
1243 (cp_parser_member_declaration): Likewise.
1244 (cp_parser_exception_declaration): Likewise.
1245 (cp_parser_function_definition_from_specifiers_and_declarator):
1247 (cp_parser_single_declaration): Likewise.
1248 (cp_parser_save_member_function_body): Likewise.
1249 (cp_parser_friend_p): Likewise.
1250 (cp_parser_set_storage_class): New function.
1251 (cp_parser_set_decl_spec_type): Likewise.
1252 * pt.c: Do not include lex.h.
1253 * semantics.c: Likewise.
1254 (finish_member_class_template): Remove.
1256 2004-06-23 Roger Sayle <roger@eyesopen.com>
1258 * call.c (build_cxx_call): Don't call expand_tree_builtin. No
1259 longer take both "args" and "convert_args" as arguments.
1260 (build_op_delete_call): Update call to build_cxx_call.
1261 (build_over_call): Likewise, update call to build_cxx_call.
1262 * cp-tree.h (build_cxx_call): Update funtion prototype.
1263 * typeck.c (build_function_call): Don't call expand_tree_builtin.
1264 * rtti.c (throw_bad_cast): Update call to build_cxx_call.
1265 (throw_bad_typeid): Likewise.
1266 (build_dynamic_cast_1): Likewise.
1268 2004-06-22 Richard Henderson <rth@redhat.com>
1270 * class.c (build_vfn_ref): Take a pointer not object. Build
1272 (cp_fold_obj_type_ref): New.
1273 * call.c (build_over_call): Update build_vfn_ref call.
1274 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
1275 * cp-tree.h (cp_fold_obj_type_ref): Declare.
1277 2004-06-21 Jason Merrill <jason@redhat.com>
1280 * cp-gimplify.c (cp_gimplify_init_expr): Look through
1283 2004-06-21 Mark Mitchell <mark@codesourcery.com>
1285 * cp-tree.def (NEW_EXPR): Add a fourth slot.
1286 * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
1287 (TREE_PARMLIST): Likewise.
1288 (CALL_DECLARATOR_PARMS): Likewise.
1289 (CALL_DECLARATOR_QUALS): Likewise.
1290 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
1291 (cp_declarator_kind): New type.
1292 (cp_parameter_declarator): Likewise.
1293 (cp_declarator): Likewise.
1294 (cp_error_declarator): Likewise.
1295 (no_parameters): Likewise.
1296 (groktypename): Change prototype.
1297 (start_decl): Likewise.
1298 (start_handler_parms): Likewise.
1299 (get_scope_of_declarator): Likewise.
1300 (start_function): Likewise.
1301 (start_preparsed_function): New function.
1302 (start_function): Change prototype.
1303 (start_method): Likewise.
1304 (grokfield): Likewise.
1305 (grokbitfield): Likewise.
1306 (build_new): Likewise.
1307 (make_pointer_declarator): Remove.
1308 (make_reference_declarator): Likewise.
1309 (make_call_declarator): Likewise.
1310 (set_quals_and_spec): Likewise.
1311 (process_template_parm): Change prototype.
1312 (begin_function_definition): Remove.
1313 (finish_parmlist): Remove.
1314 * decl.c (groktypename): Do not use trees to represent
1316 (start_decl): Likewise.
1317 (start_handler_parms): Remove.
1318 (get_scope_of_declarator): Reimplement.
1319 (grokdeclarator): Do not use trees to represent declarators.
1320 (grokparms): Likewise.
1321 (start_function): Likewise.
1322 (start_method): Likewise.
1323 (build_void_list_mode): Do not use TREE_PARMLIST.
1324 * decl.h (grokdeclarator): Change prototype.
1325 * decl2.c (grok_method_quals): Robustify.
1326 (grok_x_components): Do not use trees to represent declarators.
1327 (grokfield): Likewise.
1328 (grokbitfield): Likewise.
1329 (start_objects): Build FUNCTION_DECLs, not declarators.
1330 (start_static_storage_duration_function): Likewise.
1331 * init.c (build_new): Simplify.
1332 * lex.c (make_pointer_declarator): Remove.
1333 (make_reference_declarator): Likewise.
1334 (make_call_declarator): Likewise.
1335 (set_quals_and_spec): Likewise.
1336 * method.c (use_thunk): Use start_preparsed_function.
1337 (synthesize_method): Likewise.
1338 (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
1339 * optimize.c (maybe_clone_body): Use start_preparsed_function.
1340 * parser.c (cp_error_declarator): New variable.
1341 (declarator_obstack): Likewise.
1342 (alloc_declarator): New function.
1343 (make_declarator): Likewise.
1344 (make_id_declarator): Likewise.
1345 (make_pointer_declarator): Likewise.
1346 (make_reference_declarator): Likewise.
1347 (make_ptrmem_declarator): Likewise.
1348 (make_call_declarator): Likewise.
1349 (make_array_declarator): Likewise.
1350 (no_parameters): New variable.
1351 (make_parameter_declarator): Likewise.
1352 (cp_parser_check_for_definition_in_return_type): Do not use trees
1353 to represent declarators.
1354 (cp_parser_translation_unit): Likewise.
1355 (cp_parser_new_expression): Likewise.
1356 (cp_parser_new_type_id): Likewise.
1357 (cp_parser_new_declarator_opt): Likewise.
1358 (cp_parser_direct_new_declarator): Likewise.
1359 (cp_parser_condition): Likewise.
1360 (cp_parser_declaration_statement): Likewise.
1361 (cp_parser_declaration): Likewise.
1362 (cp_parser_conversion_type_id): Likewise.
1363 (cp_parser_conversion_declarator_opt): Likewise.
1364 (cp_parser_template_parameter_list): Likewise.
1365 (cp_parser_template_parameter): Likewise.
1366 (cp_parser_explicit_instantiation): Likewise.
1367 (cp_parser_init_declarator): Likewise.
1368 (cp_parser_declarator): Likewise.
1369 (cp_parser_direct_declarator): Likewise.
1370 (cp_parser_type_id): Likewise.
1371 (cp_parser_parameter_declaration_clause): Likewise.
1372 (cp_parser_parameter_declaration_list): Likewise.
1373 (cp_parser_parameter_declaration): Likewise.
1374 (cp_parser_member_declaration): Likewise.
1375 (cp_parser_exception_declaration): Likewise.
1376 (cp_parser_check_declarator_template_parameters): Likewise.
1377 (cp_parser_function_definition_from_specifiers_and_declarator):
1379 (cp_parser_save_member_function_body): Likewise.
1380 * pt.c (process_template_parm): Add is_non_type parameter.
1381 (convert_template_argument): Adjust call to groktypename.
1382 (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
1383 (tsubst): Do not expect declarators.
1384 (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
1386 (instantiate_decl): Use start_preparsed_function.
1387 * semantics.c (begin_function_definition): Remove.
1388 (finish_parmlist): Remove.
1389 * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
1392 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1394 * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
1395 (build_new_method_call): Likewise.
1396 * decl.c (local_variable_p_walkfn): Don't walk into types.
1397 * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
1398 (build_anon_union_vars): Add new operand for COMPONENT_REF.
1399 * init.c (buld_new): Add new operand for ARRAY_REF.
1400 * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
1401 (do_build_assign_ref): Likewise.
1402 * parser.c (cp_parser_direct_new_declarator): Add new operands
1404 (cp_parser_direct_declarator): Likewise.
1405 * pt.c (tsubst): Likewise.
1406 (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
1408 * semantics.c (finish_non_static_data_member): Add new operand
1410 * typeck.c (build_class_member_access_expr): Likewise.
1411 (build_class_member_access_expr, finish_class_member_access_expr):
1413 (build_ptrmemfunc_access_expr): Likewise.
1414 (build_array_ref): Add new operands for ARRAY_REF.
1415 * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
1416 * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
1418 2004-06-21 Richard Henderson <rth@redhat.com>
1420 * dump.c (cp_dump_tree): Don't use dump_next_stmt.
1421 * parser.c (cp_parser_jump_statement): Update commentary.
1422 * pt.c (tsubst_expr): Use RETURN_EXPR.
1423 * semantics.c (finish_return_stmt): Likewise.
1424 (finalize_nrv_r): Likewise.
1425 * typeck.c, typeck2.c: Update file start commentary.
1427 2004-06-21 Richard Henderson <rth@redhat.com>
1429 * semantics.c (finish_expr_stmt): Call verify_sequence_points.
1431 2004-06-20 Richard Henderson <rth@redhat.com>
1433 * cp-tree.h (add_decl_stmt): Declare.
1434 * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
1435 * semantics.c (maybe_cleanup_point_expr): New.
1436 (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
1437 finish_for_expr, finish_switch_cond): Use it.
1438 (finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN.
1440 2004-06-20 Richard Henderson <rth@redhat.com>
1442 * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
1443 * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
1444 (cp_gimplify_expr): Call it.
1445 (gimplify_cleanup_stmt): Move from c-gimplify.c.
1446 (cp_genericize): New.
1447 * decl.c (finish_function): Call it.
1448 * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
1449 (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
1450 (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
1451 (cp_genericize): Declare.
1452 * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
1453 * dump.c (cp_dump_tree): Likewise.
1454 * semantics.c (push_cleanup): Move from c-semantics.c.
1456 2004-06-20 Zack Weinberg <zack@codesourcery.com>
1458 * cp-lang.c (has_c_linkage): Implement.
1460 * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
1461 * decl.c (duplicate_decls): Use COPY_DECL_RTL.
1462 (builtin_function_1): Don't call make_decl_rtl.
1463 (build_cp_library_fn): Don't call set_mangled_name_for_decl.
1464 (grokvardecl): Don't call mangle_decl.
1465 * except.c (nothrow_libfn_p): Look at DECL_NAME, not
1466 DECL_ASSEMBLER_NAME.
1467 * method.c (set_mangled_name_for_decl): Delete.
1468 * name-lookup.c (pushdecl): When a local extern shadows a
1469 file-scope declaration of the same object, give both DECLs the
1471 * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
1472 on DECL_ASSEMBLER_NAME.
1474 2004-06-19 Richard Henderson <rth@redhat.com>
1476 * cp-gimplify.c: Remove unnecessary prototypes.
1477 (cp_gimplify_stmt): Merge into ...
1478 (cp_gimplify_expr): ... here. Move to end of file. Handle
1479 stmts_are_full_exprs_p frobbing.
1480 * cp-tree.h (cp_gimplify_stmt): Remove.
1481 * pt.c (tsubst_expr): Merge prep_stmt and unify.
1482 * tree.c (init_tree): Don't set lang_gimplify_stmt.
1484 2004-06-18 Richard Henderson <rth@redhat.com>
1487 * semantics.c (begin_cond): New.
1488 (finish_cond): Rewrite to handle template DECL_STMTs specially.
1489 Assume that non-template decls go land before the conditional.
1490 (simplify_loop_decl_cond): Likewise.
1491 (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
1492 finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
1493 begin_switch_stmt, finish_switch_cond): Update to match.
1495 2004-06-17 Jason Merrill <jason@redhat.com>
1498 * semantics.c (simplify_aggr_init_expr): Don't return the slot.
1499 (finish_stmt_expr_expr): Update type after conversions.
1500 (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
1501 Handle void initializer.
1502 * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
1504 2004-06-17 Geoffrey Keating <geoffk@apple.com>
1506 * class.c (build_clone): Don't call defer_fn, let mark_used do it.
1507 * cp-tree.h (defer_fn): Delete.
1508 * decl2.c (defer_fn): Delete.
1509 (finish_file): Simplify deferred_fns loops; check that
1510 only used inline functions get into deferred_fns.
1511 (mark_used): Inline previous contents of defer_fn.
1513 2004-06-16 Richard Henderson <rth@redhat.com>
1515 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
1516 (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
1517 * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
1518 of CTOR_INITIALIZER ...
1519 (pp_cxx_statement): ... here.
1520 * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
1521 (finish_function): Use alloc_stmt_list to zap entire function.
1522 * parser.c (cp_parser_compound_statement): Update commentary.
1523 * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
1524 * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
1525 (finish_stmt_expr): Don't look through COMPOUND_STMT.
1527 2004-06-16 Geoffrey Keating <geoffk@apple.com>
1529 * pt.c (mark_decl_instantiated): Don't call defer_fn.
1531 2004-06-16 Richard Henderson <rth@redhat.com>
1533 * parser.c (cp_parser_labeled_statement): Update commentary.
1534 * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
1535 * tree.c (mark_local_for_remap_r): Likewise.
1537 2004-06-16 Richard Henderson <rth@redhat.com>
1539 * parser.c (cp_parser_asm_definition): Update commentary.
1540 * pt.c (tsubst_expr): Use ASM_EXPR.
1541 * semantics.c (finish_asm_stmt): Likewise.
1543 2004-06-16 Richard Henderson <rth@redhat.com>
1545 * decl.c (finish_destructor_body): Use LABEL_EXPR.
1546 * parser.c (cp_parser_statement): Update commentary.
1547 * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
1548 * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
1549 * tree.c (mark_local_for_remap_r): Likewise.
1551 2004-06-16 Richard Henderson <rth@redhat.com>
1554 * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
1555 statement in FOR_INIT_STMT for templates.
1557 2004-06-15 Richard Henderson <rth@redhat.com>
1559 * call.c (initialize_reference): Don't build CLEANUP_STMT here.
1560 * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
1561 (genericize_try_block): Use gimplify_stmt.
1562 (genericize_catch_block, genericize_eh_spec_block): Likewise.
1563 (cp_gimplify_init_expr): Remove STMT_EXPR special case.
1564 (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
1565 * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
1566 (cp_tree_chain_matters_p): Remove.
1567 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
1568 (COMPOUND_STMT_BODY_BLOCK): New.
1569 (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
1570 (EXPR_STMT_STMT_EXPR_RESULT): New.
1571 (building_stmt_tree): Check cur_stmt_list.
1572 (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
1573 (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
1574 * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
1575 (cp_finish_decl): Use push_cleanup.
1576 (start_function, finish_function): Use statement lists.
1577 (finish_stmt): Do nothing.
1578 * except.c (begin_eh_spec_block): Use statement lists.
1579 (check_handlers_1, check_handlers): Likewise.
1580 * init.c (construct_virtual_base): Don't add extra compound stmts.
1581 (build_vec_init): Likewise.
1582 * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
1583 * name-lookup.h (struct cp_binding_level): Add statement_list.
1584 * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
1585 (cp_parser_labeled_statement, cp_parser_expression_statement,
1586 cp_parser_statement_seq_opt): Likewise.
1587 (cp_parser_compound_statement): Likewise. Take bool for try block.
1588 (cp_parser_selection_statement): Tidy if processing.
1589 (cp_parser_already_scoped_statement): Rewrite to do what it says.
1590 * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
1591 (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST.
1592 Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
1593 * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
1594 (finish_cond): New, rewritten from FINISH_COND.
1595 (simplify_loop_decl_cond): New.
1596 (finish_expr_stmt): Avoid nested EXPR_STMTs.
1597 (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
1598 begin_else_clause, finish_else_clause, finish_if_stmt,
1599 begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
1600 begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
1601 finish_for_cond, finish_for_stmt, begin_switch_stmt,
1602 finish_switch_cond, finish_switch_stmt, begin_try_block,
1603 finish_try_block, finish_cleanup_try_block, finish_function_try_block,
1604 finish_handler_sequence, finish_function_handler_sequence,
1605 begin_handler, finish_handler_parms, finish_handler,
1606 begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
1607 using statement lists.
1608 (begin_compound_stmt): Replace has_no_scope argument with flags.
1609 Update all callers. Use statement lists.
1610 (finish_compound_stmt): Likewise.
1611 (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
1612 (current_scope_stmt_stack): Remove.
1613 (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
1614 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
1615 Rewrite with statement lists.
1617 2004-06-15 Alexandre Oliva <aoliva@redhat.com>
1619 * parser.c: Change all assignments of c_lex_string_translate
1620 to true and false to 1 and 0.
1621 (cp_lexer_read_token): Convert type of the translated string.
1622 (cp_parser_skip_to_closing_parentheses): Preserve original
1623 value of c_lex_string_translate, and set it to -1 while
1625 (cp_parser_cache_group): Likewise.
1626 (cp_parser_cache_group_1): Renamed.
1627 (cp_parser_asm_operand_list): Remove redundant setting of
1628 c_lex_string_translate.
1629 (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
1630 Handle chained strings.
1632 2004-06-12 Andrew Pinski <apinski@apple.com>
1636 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
1638 * cp-tree.h: Fix typo.
1640 * cp-tree.h: Include cgraph.h
1641 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
1642 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
1644 2004-06-12 Jason Merrill <jason@redhat.com>
1646 PR tree-optimization/14107
1647 * decl.c (finish_function): Warn about no return in all functions.
1649 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
1651 * cp-tree.h (struct language_function): Remove cannot_inline.
1652 * decl.c (save_function_data): cannot_inline is no more.
1653 (cxx_push_function_context): Likewise.
1654 * decl2.c (start_objects, start_static_storage_duration_function):
1655 Reset DECL_INLINE, set DECL_UNINLINABLE.
1657 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1660 * search.c (lookup_field): Propagate the ambiguity list.
1661 (lookup_fnfields): Likewise.
1663 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1666 * parser.c (cp_parser_template_name): Ctors/dtors never need a
1667 template keyword to disambiguate.
1669 2004-06-14 Mark Mitchell <mark@codesourcery.com>
1672 * decl.c (grokdeclarator): Ignore pointer-to-members when
1673 computing template depth.
1676 * name-lookup.c (pushtag): Do not try to put class declarations in
1677 explicit specialization scopes.
1679 2004-06-11 Andrew Pinski <pinskia@physics.uc.edu>
1681 * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
1683 2004-06-11 Mark Mitchell <mark@codesourcery.com>
1686 * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
1687 bindings for undeclared built-ins.
1689 2004-06-11 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1691 * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
1692 appear at the correct location.
1694 2004-06-10 Jason Merrill <jason@redhat.com>
1698 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1699 * init.c (build_offset_ref): Build SCOPE_REF with non-null
1700 TREE_TYPE for non-dependent names.
1701 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
1702 unknown_type_node as its TREE_TYPE.
1703 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
1704 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
1705 (dump_expr) <SCOPE_REF case>: Likewise.
1707 2004-06-10 Mark Mitchell <mark@codesourcery.com>
1710 * parser.c (cp_parser_direct_declarator): Robustify.
1713 * pt.c (tsubst_copy): Use decl_constant_value on enumeration
1714 constants in non-dependent contexts.
1718 * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
1721 2004-06-10 Jakub Jelinek <jakub@redhat.com>
1724 * decl.c (duplicate_decls): Handle fileptr_type_node arguments
1727 2004-06-09 Mark Mitchell <mark@codesourcery.com>
1731 2004-06-07 Mark Mitchell <mark@codesourcery.com>
1732 * lex.c (handle_pragma_interface): Deprecate.
1733 (handle_pragma_implementation): Likewise.
1735 2004-06-09 Andrew Pinski <pinskia@physics.uc.edu>
1737 * g++spec.c (lang_specific_driver): Remove check for -lm
1738 and -lmath when check it see if it was the math library.
1740 2004-06-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1743 * parser.c (cp_parser_direct_declarator): Reject constructor named
1744 as qualified template-id.
1746 2004-06-07 Mark Mitchell <mark@codesourcery.com>
1749 * lex.c (handle_pragma_interface): Deprecate.
1750 (handle_pragma_implementation): Likewise.
1752 2004-06-07 Mark Mitchell <mark@codesourcery.com>
1755 * parser.c (cp_parser_iteration_statement): Fix typo in error
1759 * pt.c (tsubst_default_argument): Do not defer access checks
1760 while substituting into the default argument.
1763 * pt.c (tsubst_copy): Do not try to substitute for an enumeration
1764 constant in a non-dependent context.
1767 * except.c (build_throw): Ensure that temp_expr has been
1770 2004-06-06 Roger Sayle <roger@eyesopen.com>
1772 * cp/cp-tree.h (lvalue_or_else): Add function prototype.
1774 2004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1777 * parser.c (cp_parser_mem_initializer_id): Gracefully reject
1778 'typename', and accept 'template'.
1780 2004-06-03 Andrew Pinski <pinskia@physics.uc.edu>
1781 Jan Hubicka <jh@suse.cz>
1784 * method.c (use_think): Do not mark thunk as referenced.
1786 2004-06-03 Matt Austern <austern@apple.com>
1789 * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
1790 is nonzero, and if we see a noninline definition of a key method,
1791 make the vtables nonweak.
1793 2004-06-02 Matt Austern <austern@apple.com>
1795 * cp-tree.h (instantiate_decl): new boolean parameter,
1796 undefined_ok. Current behavior is equivalent to its being 0.
1797 * decl2.c (mark_used): Add new argument when calling instantiate_decl
1798 * pt.c (mark_decl_instantiated): Unconditionally make
1799 instantiations explicit unconditionally
1800 (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
1801 since mark_decl_instantiated now does it.
1802 (instantiate_class_member): New. Instantiate a member of an
1803 explicitly instantiated class template.
1804 (do_type_instantiation): Explicitly instantiate members of an
1805 explicitly instantiated class template.
1806 (instantiate_decl): if undefined_ok is nonzero, and if we're
1807 trying to explicitly instantiated a template with no definition,
1808 change it to an implicit instantiation.
1809 (instantiate_pending_templates): Add new argument to instantiate_decl.
1810 * tree.c (cp_cannot_inline_tree_fn): Likewise.
1812 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
1814 * cp-tree.h: Fix typo.
1816 * cp-tree.h: Include cgraph.h
1817 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
1818 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
1820 2004-06-01 Jason Merrill <jason@redhat.com>
1823 * call.c (call_builtin_trap): Remove type parm.
1824 (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
1825 (build_x_va_arg): Dereference a null pointer for a non-POD argument.
1827 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1830 * init.c (build_offset_ref): Build SCOPE_REF with non-null
1831 TREE_TYPE for non-dependent names.
1832 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
1833 unknown_type_node as its TREE_TYPE.
1834 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
1835 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
1836 (dump_expr) <SCOPE_REF case>: Likewise.
1838 2004-06-01 Richard Henderson <rth@redhat.com>
1839 Andrew Pinski <pinskia@physics.uc.edu>
1841 * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
1842 * parser.c (struct cp_parser): Remove in_offsetof.
1843 (cp_parser_new): Don't set it.
1844 (cp_parser_unary_expression): Don't check it.
1845 (cp_parser_postfix_open_square_expression): Split out from ...
1846 (cp_parser_postfix_expression): ... here.
1847 (cp_parser_postfix_dot_deref_expression): Likewise.
1848 (cp_parser_builtin_offsetof): New.
1849 (cp_parser_primary_expression): Use it.
1851 2004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1854 * parser.c (cp_parser_postfix_expression): Allow subscript
1855 operator in offsetof.
1857 2004-05-31 Mark Mitchell <mark@codesourcery.com>
1860 * friend.c (add_friend): Do not try to perform access checks for
1861 functions from dependent classes.
1863 2004-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
1865 * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
1866 (pp_cxx_begin_template_argument_list): Turn into a function.
1867 (pp_cxx_end_template_argument_list): Likewise.
1868 (pp_cxx_separate_with): Define.
1869 (pp_cxx_unqualified_id): Tidy.
1870 (pp_cxx_primary_expression): Likewise.
1871 (pp_cxx_postfix_expression): Likewise.
1872 (pp_cxx_expression): Likewise.
1873 (pp_cxx_simple_type_specifier): Likewise.
1874 (pp_cxx_type_specifier_seq): Likewise.
1875 (pp_cxx_parameter_declaration_clause): Likewise.
1876 (pp_cxx_exception_specification): Likewise.
1877 (pp_cxx_direct_declarator): Likewise.
1878 (pp_cxx_type_id): Likewise.
1879 * cxx-pretty-print.h (pp_cxx_whitespace): Export from
1881 (pp_cxx_left_paren): Likewise.
1882 (pp_cxx_right_paren): Likewise.
1883 (pp_cxx_left_brace): Likewise.
1884 (pp_cxx_right_brace): Likewise.
1885 (pp_cxx_left_bracket): Likewise.
1886 (pp_cxx_right_bracket): Likewise.
1887 (pp_cxx_dot): Likewise.
1888 (pp_cxx_identifier): Likewise.
1889 (pp_cxx_tree_identifier): Likewise.
1890 (pp_cxx_ampersand): New macro.
1891 (pp_cxx_star): Likewise.
1892 (pp_cxx_arrow): Likewise.
1893 (pp_cxx_semicolon): Likewise.
1894 (pp_cxx_complement): Likewise.
1895 (pp_cxx_begin_template_argument_list): Declaree.
1896 (pp_cxx_end_template_argument_list): Likewise.
1897 (pp_cxx_colon_colon): likewise.
1899 2004-05-31 Eric Botcazou <ebotcazou@libertysurf.fr>
1901 * parser.c (cp_parser_simple_type_specifier): Explicitly test
1904 2004-05-31 Kazu Hirata <kazu@cs.umass.edu>
1906 * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
1907 typeck.c: Fix comment formatting.
1909 2004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
1911 * cp-lang.c (cp_expand_decl): Remove.
1912 (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
1914 2004-05-30 Andreas Jaeger <aj@suse.de>
1916 * lang-specs.h: Add missing initializers for .ii.
1918 2004-05-28 Aldy Hernandez <aldyh@redhat.com>
1920 * decl.c (cp_make_fname_decl): Free return value from
1923 2004-05-28 Mark Mitchell <mark@codesourcery.com>
1926 * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
1928 * init.c (build_new): Likewise.
1931 * name-lookup.c (arg_assoc): Robustify.
1934 * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
1935 when determining the scope to use for a pointer to member.
1936 (lookup_anon_field): Give it external linkage.
1937 * cp-tree.h (lookup_anon_field): Declare it.
1938 * expr.c (cplus_expand_constant): Use it.
1940 2004-05-28 Mark Mitchell <mark@codesourcery.com>
1943 * parser.c (cp_parser_simple_type_specifier): Call
1944 maybe_note_name_used_in_class.
1946 2004-05-28 Tom Marshall <tmarshall@real.com>
1949 * class.c (finish_struct_1): Warn only if the dtor is non-private or
1950 the class has friends.
1952 2004-05-27 Adam Nemet <anemet@lnxw.com>
1955 * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
1956 TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
1958 2004-05-24 Geoffrey Keating <geoffk@apple.com>
1960 * method.c (implicitly_declare_fn): Don't call defer_fn; abort
1961 if it might be needed.
1962 * pt.c (mark_decl_instantiated): Only call defer_fn if
1963 the function actually needs processing in finish_file.
1964 * decl2.c (finish_file): Add check that elements in
1965 deferred_fns_used are really needed there. Remove unnecessary
1966 test of DECL_SAVED_TREE.
1968 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
1970 * Make-lang.in: No need to specify $(LIBCPP).
1972 2004-05-23 Mark Mitchell <mark@codesourcery.com>
1975 * parser.c (cp_parser_class_head): Robustify.
1978 * parser.c (cp_parser_decl_specifier_seq): Correct error in
1980 (cp_parser_constructor_declarator_p): Treat attributes
1984 * typeck.c (build_unary_op): Do not attempt to resolve casts to
1985 base classes in templates.
1987 2004-05-23 Mark Mitchell <mark@codesourcery.com>
1990 * pt.c (instantiate_template): Robustify.
1992 2004-05-23 Mark Mitchell <mark@codesourcery.com>
1995 * decl.c (xref_tag): Issue errors about redeclaring template
1996 classes as non-template classes.
1998 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2001 * name-lookup.c (supplement_binding): Allow redefinitions of
2005 * parser.c (cp_parser_template_argument): Robustify.
2007 2004-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
2009 * class.c (alter_access): Use %E format specifier to print an
2010 identifier node. Avoid looking at the IDENTIFIER_POINTER.
2011 (push_lang_context): Likewise.
2012 * decl.c (lookup_label): Likewise.
2013 (grokdeclarator): Likewise.
2014 * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
2015 * pt.c (do_type_instantiation): Likewise.
2016 * tree.c (handle_java_interface_attribute): Likewise.
2017 (handle_com_interface_attribute): Likewise.
2018 (handle_init_priority_attribute): Likewise.
2020 2004-05-22 Mark Mitchell <mark@codesourcery.com>
2024 * pt.c (build_non_dependent_expr): Expand the set of tree nodes
2025 recognized as overloaded functions.
2027 2004-05-22 Mark Mitchell <mark@codesourcery.com>
2030 * class.c (layout_nonempty_base_or_field): Do not try to avoid
2031 layout conflicts for unions.
2034 * typeck.c (build_x_unary_op): Instantiate template class
2035 specializations before looking for "operator &".
2038 * typeck.c (complete_type): Layout non-dependent array types, even
2042 * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
2045 2004-05-22 Roger Sayle <roger@eyesopen.com>
2047 * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
2048 returning when TREE_TYPE is error_mark_node.
2049 * typeck.c (require_complete_type): Return error_mark_node if
2050 value's type is an error_mark_node.
2052 2004-05-20 Andrew Pinski <pinskia@physics.uc.edu>
2054 * optimize.c (calls_setjmp_r): Remove.
2055 (calls_setjmp_p): Remove.
2056 * cp-tree.c (calls_setjmp_p): Remove.
2057 * decl.c (finish_function): Do not call calls_setjmp_p.
2059 2004-05-18 Zack Weinberg <zack@codesourcery.com>
2061 * decl.c (cp_finish_decl): Use mark_decl_referenced.
2062 * decl2.c (maybe_make_one_only): Likewise.
2063 * method.c (use_thunk): Likewise.
2065 2004-05-18 Jason Merrill <jason@redhat.com>
2067 * class.c (build_base_path): Tidy a bit.
2069 2004-05-14 Geoffrey Keating <geoffk@apple.com>
2071 * name-lookup.c (struct scope_binding): New.
2072 (EMPTY_SCOPE_BINDING): New.
2073 (lookup_using_namespace): Take a scope_binding instead of a
2075 (qualified_lookup_using_namespace): Likewise.
2076 (cxx_binding_clear): Delete.
2077 (do_nonmember_using_decl): Use a scope_binding instead of a
2079 (lookup_tag): Don't call select_decl.
2080 (ambiguous_decl): Don't return anything (and change callers to match).
2081 Take a scope_binding as the second parameter.
2082 (lookup_namespace_name): Use a scope_binding instead of a
2084 (unqualified_namespace_lookup): Likewise.
2085 (lookup_qualified_name): Likewise.
2086 (select_decl): Take a scope_binding instead of a cxx_binding.
2087 Use macros rather than hand-coding tests for type-ness.
2089 2004-05-13 Diego Novillo <dnovillo@redhat.com>
2091 * cp-gimplify.c: Rename from cp-simplify.c.
2092 * Make-lang.in, optimize.c: Update.
2094 2004-05-13 Diego Novillo <dnovillo@redhat.com>
2096 Merge from tree-ssa-20020619-branch. See
2097 ChangeLog.tree-ssa for details.
2099 * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
2100 cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
2101 expr.c, init.c, name-lookup.h, optimize.c, parser.c,
2102 pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
2104 * cp-mudflap.c: New file.
2105 * cp-simplify.c:: New file.
2107 2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2110 * decl2.c (check_classfn): For member templates, compare also the
2111 template parameters to match the declaration.
2112 * cp-tree.h: Adjust declaration of check_classfn.
2113 * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
2114 * friend.c (do_friend): Likewise.
2115 * pt.c (tsubst_friend_function): Likewise.
2117 2004-05-01 Zack Weinberg <zack@codesourcery.com>
2119 * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
2120 Instead, dig into the representation type to find the array bound.
2122 2004-04-30 Jason Merrill <jason@redhat.com>
2124 Refer to base members using COMPONENT_REFs where possible.
2125 * class.c (build_simple_base_path): New fn.
2126 (build_base_path): Use it for non-virtual base references.
2127 (layout_class_type): Change base fields to their real type
2128 after layout is done.
2129 * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
2130 * cp-lang.c (cxx_get_alias_set): Use it.
2132 2004-04-30 Kazu Hirata <kazu@cs.umass.edu>
2134 * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
2137 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2140 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
2141 used in integral constant expressions.
2143 2004-04-22 Mark Mitchell <mark@codesourcery.com>
2145 * init.c (build_aggr_init): Fix accidental use of C99 construct in
2148 * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
2150 * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
2151 * decl.c (reshape_init): Use it.
2152 * init.c (perform_member_init): Remove redundant condition.
2153 (build_aggr_init): Adjust to handle brace-enclosed initializers
2155 (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
2157 * parser.c (cp_parser_initializer_clause): Do not set
2158 TREE_HAS_CONSTRUCTOR on the initializer.
2159 * rtti.c (tinfo_base_init): Likewise.
2160 (generic_initializer): Likewise.
2161 (ptr_initializer): Likewise.
2162 (ptm_initializer): Likewise.
2163 (class_initializer): Likewise.
2164 (get_pseudo_ti_init): Likewise.
2165 * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
2167 2004-04-22 Alan Modra <amodra@bigpond.net.au>
2169 * name-lookup.c (anonymous_namespace_name): Make static.
2171 2004-04-19 Roger Sayle <roger@eyesopen.com>
2174 * class.c (build_base_path): Call fold whilst building the NULL
2175 pointer check expression trees.
2177 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
2179 * init.c (build_new_1): Don't use type size argument for Java
2180 _Jv_AllocObject call.
2182 2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
2184 * method.c (make_alias_for_thunk): Remove preprocessor guard on
2185 declaration and definition.
2187 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
2190 * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
2191 than ASM_OUTPUT_DEF.
2193 2004-04-08 Jakub Jelinek <jakub@redhat.com>
2195 * decl2.c (mark_used): Don't segfault if cfun != NULL but
2196 current_function_decl == NULL.
2198 2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
2201 * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
2204 2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2206 * init.c (decl_constant_value): Don't look at DECL_INITIAL
2208 * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
2209 or TREE_SIDE_EFFECTS of a type.
2211 2004-04-02 Nathan Sidwell <nathan@codesourcery.com>
2214 * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
2215 cv-qualifier unification.
2216 * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
2218 2004-04-02 Jan Hubicka <jh@suse.cz>
2220 * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
2221 * cp-tree.h (cp_update_decl_after_saving): Declare.
2222 * tree.c (cp_update_decl_after_saving): Define.
2224 2004-04-01 Mark Mitchell <mark@codesourcery.com>
2227 * typeck.c (get_delta_difference): Call fold before returning the
2230 2004-04-01 Richard Henderson <rth@redhat.com>
2233 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
2234 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
2236 2004-04-01 Mark Mitchell <mark@codesourcery.com>
2239 * name-lookup.c (maybe_push_cleanup_level): Robustify.
2241 2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2243 * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
2245 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2247 * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
2248 * class.c (check_bitfield_decl): Likewise.
2249 * cvt.c (type_promotes_to): Likewise.
2250 * decl.c (finish_enum): Likewise.
2251 * mangle.c (write_builtin_type): Likewise.
2252 * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
2253 * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
2254 (build_binary_op): Likewise.
2256 2004-03-31 Jan Hubicka <jh@suse.cz>
2258 * tree.h (optimize_function): Kill prototype.
2259 * optimize.c (dump_function, optimize_function, dump_finction): Kill.
2260 * semantics.c (expand_body): Kill.
2262 2004-03-30 Mark Mitchell <mark@codesourcery.com>
2265 * decl.c (start_decl_1): Do not decide whether or not to create a
2266 new cleanup level until after the type has been completed.
2269 * pt.c (tsubst_default_argument): Clear current_function_decl.
2271 2004-03-30 Zack Weinberg <zack@codesourcery.com>
2273 * name-lookup.c, parser.c: Use new shorter form of GTY markers.
2275 2004-03-29 Zack Weinberg <zack@codesourcery.com>
2277 * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
2278 is null, just print the literal name and return.
2280 2004-03-25 Kazu Hirata <kazu@cs.umass.edu>
2282 * cxx-pretty-print.c: Fix comment typos.
2284 2004-03-24 Kazu Hirata <kazu@cs.umass.edu>
2286 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
2289 2004-03-23 Ziemowit Laski <zlaski@apple.com>
2291 * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
2292 * mangle.c (write_type): Add call to 'mangle_fundamental_type'
2295 2004-03-23 Zack Weinberg <zack@codesourcery.com>
2297 PR 12267, 12391, 12560, 13129, 14114, 14133
2298 * cp-lang.c (c_reset_state): Delete.
2299 (push_file_scope, pop_file_scope): New stubs.
2300 * parser.c (c_parse_file): Call sorry() here if called more than once.
2302 2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2304 * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
2307 2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
2309 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
2311 2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
2313 * error.c (enum pad): Remove.
2314 (dump_qualifiers): Likewise.
2315 (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
2316 (dump_aggr_type): Likewise.
2317 (dump_type_suffix): Likewise.
2318 (dump_simple_decl): Likewise.
2319 (dump_function_decl): Likewise.
2320 (cv_to_string): Likewise.
2321 (dump_type_prefix): Likewise. Adjust return void.
2322 * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
2324 (pp_cxx_template_keyword_if_needed): Document.
2325 (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
2326 (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
2327 MUST_NOT_THROW_EXPR.
2329 2004-03-21 Mark Mitchell <mark@codesourcery.com>
2332 * decl.c (cp_finish_decl): Compute the size of arrays declared in
2333 templates, if their type is non-dependent.
2335 2004-03-19 Mark Mitchell <mark@codesourcery.com>
2337 * call.c (build_op_delete_call): Do not forget the placement
2338 arguments when iterating through mutiple delete operators.
2340 * cp-tree.h (svaed_scope): Remove last_parms.
2341 (NEW_DELETE_OPNAME_P): New macro.
2342 (last_function_parms): Remove.
2343 (do_friend): Adjust prototype.
2344 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
2345 using last_function_parms.
2346 (grokfndecl): Take the PARM_DECLs as an argument, rather than
2347 using last_function_parms.
2348 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
2349 for class-specific operator new and operator delete.
2350 (grok_op_properties): Do not look for allocation functions with
2352 (start_function): Use DECL_ARGUMENTS instead of
2353 last_function_parms.
2354 * decl.h (last_function_parms): Do not declare.
2355 * decl2.c (grokclassfn): Do not use last_function_parms.
2356 * friend.c (do_friend): Remove parmdecls parameter.
2357 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
2358 (pop_from_top_level): Do not restore it.
2359 * pt.c (check_explicit_specialization): Do not adjust
2360 last_function_parms.
2362 * name-lookup.c (do_local_using_decl): Create a local binding for
2363 types brought in via using declarations.
2365 * name-lookup.c (lookup_arg_dependent): Handle block-scope
2366 function declarations correctly.
2368 * semantics.c (finish_id_expression): Correct handling of
2369 conversion operators to dependent types.
2371 * typeck.c (lookup_destructor): Allow the use of destructors from
2374 2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2376 * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
2377 TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
2378 * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
2379 the field is named TEMPLATE_TYPE_PARM_INDEX.
2381 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2384 * parser.c (cp_parser_functional_cast): A cast to anything
2385 but integral or enumaration type is not an integral constant
2387 * pt.c (value_dependent_expression_p): Handle cast expressions
2388 without operands (such as "int()").
2390 2004-03-18 Mark Mitchell <mark@codesourcery.com>
2392 * semantics.c (finish_pseudo_destructor_expr): Allow differing
2393 cv-qualification between the type named by the
2394 pseudo-destructor-name and the object-type.
2396 * search.c (accessible_base_p): Handle non-proper bases.
2398 * name-lookup.c (do_nonmember_using_decl): If a using declaration
2399 refers to a single overloaded function, set the type of the
2401 * tree.c (lvalue_type): Simplify.
2402 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
2404 (build_unary_op): Handle OVERLOADs with known types.
2406 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
2409 * parser.c (cp_parser_postfix_expression): Handle the use of
2410 "typename" in non-dependent contexts. Convert appropriately when
2411 when using a qualified name after "->" or ".".
2413 * call.c (conditional_conversion): Honor the requirement that some
2414 conversions refer to the original object.
2416 2004-03-18 Mark Mitchell <mark@codesourcery.com>
2418 * call.c (build_conditional_expr): Do not call force_rvalue for
2419 operands of void_type when the conditional expression itself has
2421 * name-lookup.c (pushdecl): Don't consider a declaration of a
2422 function named "main" to be an overload of a type named "main".
2423 * parser.c (cp_parser_template_name): Perform name lookup when the
2424 template name is proceeded by "template" if the qualifying scope
2426 * typeck.c (composite_pointer_type_r): Correctly handle
2427 pointer-to-member types.
2428 (build_const_cast): Likewise.
2430 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2432 * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
2433 * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
2434 (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
2435 (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
2436 (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
2437 (TYPEOF_TYPE_EXPR): New macro.
2438 * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
2439 * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
2440 * pt.c (tsubst): Likewise.
2441 * semantics.c (finish_typeof): Likewise.
2442 * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
2443 and TEMPLATE_TYPE_PARM.
2444 * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
2445 (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
2447 2004-03-16 Mark Mitchell <mark@codesourcery.com>
2450 * cp-tree.h (build_new_op): Change prototype.
2451 (build_x_binary_op): Likewise.
2452 * call.c (build_new_op): Add overloaded_p parameter.
2453 * decl2.c (grok_array_decl): Adjust call to build_new_op.
2454 * parser.c (cp_parser_binary_expression): Note that uses of
2455 overloaded operators prevents an expression from being considered
2456 an integral constant.
2457 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
2459 * semantics.c (finish_call_expr): Likewise.
2460 * typeck.c (rationalize_conditional_expr): Likewise.
2461 (build_x_indirect_ref): Likewise.
2462 (build_x_binary_op): Likewise.
2463 (build_x_unary_op): Likewise.
2464 (build_x_compound_expr): Likewise.
2465 (build_modify_expr): Likewise.
2466 * typeck2.c (build_x_arrow): Likewise.
2468 2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
2470 * cp-lang.c, ptree.c: Update copyright.
2472 2004-03-13 Mark Mitchell <mark@codesourcery.com>
2475 * parser.c (cp_parser_non_integral_constant_expression): Encode
2476 more of the idiom that surrounded calls to this function within
2478 (cp_parser_primary_expression): Adjust accordingly.
2479 (cp_parser_postfix_expression): Likewise.
2480 (cp_parser_unary_expression): Likewise.
2481 (cp_parser_cast_expression): Likewise.
2482 (cp_parser_assignment_expression): Likewise.
2483 (cp_parser_expression): Likewise.
2484 (cp_parser_new_expression): Note that new-expressions are not
2485 allowed in integral constant expressions.
2486 (cp_parser_delete_expression): Likewise.
2488 2004-03-12 Matt Austern <austern@apple.com>
2490 * decl2.c (maybe_make_one_only): Look at
2491 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
2492 to make an explicit instantiation weak.
2493 * method.c (use_thunk): Make sure we call comdat_linkage
2495 * pt.c (do_type_instantiation): On systems where weak symbols
2496 don't go in a static archive's TOC, explicit instantiation of a
2497 class must imply *explicit* instantiation of its memeber.
2499 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
2501 * call.c, cp-tree.h, pt.c: Fix comment typos.
2503 2004-03-10 Mark Mitchell <mark@codesourcery.com>
2506 * decl.c (xref_tag): Disregard non-type declarations when
2507 looking up a tagged type.
2509 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
2512 * call.c (convert_like_real): Build a const qualified temporary,
2513 when testing ctor access.
2515 2004-03-09 Mark Mitchell <mark@codesourcery.com>
2517 * call.c (initialize_reference): Fix typo.
2519 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2522 * pt.c (determine_specialization): For member templates, match also
2526 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
2528 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
2530 2004-03-09 Mark Mitchell <mark@codesourcery.com>
2533 * call.c (initialize_reference): Handle initializers that are
2534 class-member access expressions applies to rvalues.
2536 2004-03-09 Mark Mitchell <mark@codesourcery.com>
2539 * name-lookup.c (supplement_binding): Ignore functions that are
2540 marked DECL_ANTICIPATED.
2542 2004-03-08 Mark Mitchell <mark@codesourcery.com>
2545 * class.c (check_field_decls): Complain about non-static data
2546 members of reference type in unions. Propagate
2547 CLASSTYPE_REF_FIELDS_NEED_INIT and
2548 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
2550 * init.c (perform_member_init): Complain about mbmers with const
2551 type that are not explicitly initialized.
2553 2004-03-08 Mark Mitchell <mark@codesourcery.com>
2555 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
2556 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
2557 (lang_identifier): Remove implicit_decl and error_locus.
2558 (IDENTIFIER_IMPLICIT_DECL): Remove.
2559 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
2560 (IDENTIFIER_ERROR_LOCUS): Likewise.
2561 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
2562 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
2563 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
2564 (implicitly_declare): Remove.
2565 * decl.c (warn_extern_redeclared_static): Remove check of
2566 IDENTIFIER_IMPLICIT_DECL.
2567 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
2568 (implicitly_declare): Remove.
2569 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
2570 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
2571 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
2572 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
2573 in the innermost scope, rather than at namespace scope.
2574 * name-lookup.c (push_local_binding): Give it external linkage.
2575 (pushdecl): Remove dead code.
2576 * name-lookup.h (push_local_binding): Declare it.
2577 * ptree.c (cxx_print_identifier): Don't print
2578 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
2579 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
2580 not IDENTIFIER_ERROR_LOCUS.
2581 * typeck.c (build_function_call): Remove dead code.
2583 2004-03-08 Jason Merrill <jason@redhat.com>
2586 * decl.c (xref_tag): Remove attribute handling.
2587 * cp-tree.h: Adjust prototype.
2588 * decl.c, parser.c, rtti.c: Adjust callers.
2589 * parser.c (cp_parser_class_head): Pass back attributes in the
2591 (cp_parser_class_specifier): Adjust.
2593 2004-03-08 Matt Austern <austern@apple.com>
2596 * name-lookup.c (add_decl_to_level): Add extern variables, as well
2597 as static, to static_decls array.
2599 2004-03-05 Jason Merrill <jason@redhat.com>
2601 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
2603 2004-03-04 Geoffrey Keating <geoffk@apple.com>
2605 * decl.c (grokfndecl): Update old incorrect comment.
2606 (grokvardecl): Diagnose C++ variables of type with no linkage.
2608 2004-03-01 Mark Mitchell <mark@codesourcery.com>
2611 * pt.c (build_non_dependent_expr): Do not create a
2612 NON_DEPENDENT_EXPR for a THROW_EXPR.
2614 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
2617 * error.c (dump_expr): Handle THROW_EXPR.
2619 2004-03-01 Mark Mitchell <mark@codesourcery.com>
2622 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
2623 lookup if ordinary name-lookup finds a non-function.
2624 * pt.c (tsubst_copy_and_build): Likewise.
2627 * parser.c (cp_parser_late_parsing_default_args): Check that there
2628 are no extra tokens after the end of the default-argument
2631 2004-03-01 Mark Mitchell <mark@codesourcery.com>
2634 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
2635 having C++ linkage for name-mangling purposes.
2638 * parser.c (cp_parser_direct_declarator): Recognize constructor
2639 declarators that use a template-id to name the class being
2643 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
2644 (tsubst_expr): Do not call tsubst_copy, even when
2645 processing_template_decl.
2647 2004-03-01 Jeff Law <law@redhat.com>
2649 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
2652 2004-02-29 Mark Mitchell <mark@codesourcery.com>
2655 * name-lookup.h (push_scope): Change prototype.
2656 * name-lookup.c (push_scope): Do not reenter the current class
2658 * decl.c (grokfndecl): Check return code from push_scope before
2660 * decl2.c (check_classfn): Likewise.
2661 * parser.c (cp_parser_conversion_function_id): Likewise.
2662 (cp_parser_init_declarator): Likewise.
2663 (cp_parser_direct_declarator): Likewise.
2664 (cp_parser_class_specifier): Likewise.
2665 (cp_parser_class_head): Likewise.
2666 (cp_parser_lookup_name): Likewise.
2667 (cp_parser_constructor_declarator_p): Likewise.
2668 * pt.c (instantiate_class_template): Likewise.
2669 (resolve_typename_type): Likewise.
2671 2004-02-29 Mark Mitchell <mark@codesourcery.com>
2674 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
2678 * class.c (update_vtable_entry_for_fn): Do not go through
2679 covariance machinery if the type returned by an overrider is the
2680 same as the original.
2682 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
2684 * call.c: Fix a comment typo.
2686 2004-02-27 Ziemowit Laski <zlaski@apple.com>
2688 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
2690 2004-02-26 Mark Mitchell <mark@codesourcery.com>
2693 * parser.c (cp_parser_parameter_declaration_list): Commit
2694 to fewer tentative parses.
2696 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2699 * pt.c (dependent_type_p_r): A template template parameter is a
2702 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2705 * mangle.c (write_template_arg_literal): Don't rely on identity for
2708 2004-02-24 Jason Merrill <jason@redhat.com>
2710 * tree.c (build_exception_variant): Use check_qualified_type.
2712 2004-02-23 Zack Weinberg <zack@codesourcery.com>
2713 Kazu Hirata <kazu@cs.umass.edu>
2715 * decl.c (cxx_init_decl_processing): Don't check
2716 flag_writable_strings.
2718 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
2721 * typeck.c (maybe_warn_about_returning_address_of_location):
2722 Change check for VAR_DECL to use DECL_P instead.
2724 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2727 * cvt.c (build_expr_type_conversion): Type must be complete before
2728 looking up for conversions.
2730 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2733 * name-lookup.c (arg_assoc_class): Don't look into template
2734 arguments if it is not a primary template.
2736 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
2739 * method.c (use_thunk): Always clone function argument tree.
2741 2004-02-20 Mark Mitchell <mark@codesourcery.com>
2744 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
2747 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
2748 for all type variants.
2750 2004-02-19 Mark Mitchell <mark@codesourcery.com>
2753 * decl.c (duplicate_decls): Return error_mark_node for invalid
2755 * name-lookup.c (push_namespace): Ignore the return value from
2757 * pt.c (push_template_decl_real): Robustify.
2760 * name-lookup.c (push_class_level_binding): Do not complain about
2761 adding a binding for a member whose name is the same as the
2762 enclosing class if the member is located in a base class of the
2765 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2768 * parser.c (cp_parser_new_expression): Parse an ill-formed
2769 direct-new-declarator after a parenthesized type-id to emit good
2772 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
2774 * cp-tree.def, cvt.c: Update copyright.
2776 2004-02-17 Mark Mitchell <mark@codesourcery.com>
2779 * cp-tree.h (abi_version_at_least): Remove.
2780 * mangle.c: Include flags.h.
2782 2004-02-15 Mark Mitchell <mark@codesourcery.com>
2785 * call.c (build_conditional_expr): Handle conversions between
2786 class types which result in differently cv-qualified type
2790 * class.c (delete_duplicate_fields_1): Remove.
2791 (delete_duplicate_fields): Likewise.
2792 (finish_struct_anon): Remove check for members with the same name
2793 as their enclosing class.
2794 (check_field_decls): Do not call duplicate_fields.
2795 * decl.c (grokdeclarator): Remove check for static data members
2796 with the same name as their enclosing class.
2797 * name-lookup.c (push_class_level_binding): Check for members with
2798 the same name as their enclosing class.
2800 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
2803 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
2805 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2808 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
2809 has full set of arguments.
2811 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2814 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
2816 2004-02-13 Mark Mitchell <mark@codesourcery.com>
2819 * cp-tree.h (delete_sanity): Change prototype.
2820 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
2821 Remove dead code. Adjust code to warn about deleting an array.
2822 * typekc.c (decay_conversion): Use build_address and build_nop.
2825 * search.c (accessible_p): Do not check access in thunks.
2828 * call.c (build_conditional_expr): Call force_rvalue on the
2829 non-void operand in the case that one result is a throw-expression
2830 and the other is not.
2832 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
2835 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
2836 the type name and look ahead for ::~, and bail out early with a
2837 better error message if the parse is going to fail.
2839 2004-02-12 Mark Mitchell <mark@codesourcery.com>
2841 * call.c (conversion_kind): New type.
2842 (conversion_rank): Likewise.
2843 (conversion): Likewise.
2844 (CONVERSION_RANK): New macro.
2845 (conversion_obstack): New variable.
2846 (obstack_initialized): Likewise.
2847 (z_candidate): Change type of convs and second_conv.
2848 (candidate_warning): New type.
2849 (IDENTITY_RANK): Remove.
2850 (EXACT_RANK): Likewise.
2851 (PROMO_RANK): Likewise.
2852 (STD_RANK): Likewise.
2853 (PBOOL_RANK): Likewise.
2854 (USER_RANK): Likewise.
2855 (ELLIPSIS_RANK): Likewise.
2856 (BAD_RANK): Likewise.
2857 (ICS_RANK): Likewise.
2858 (ICS_STD_RANK): Likewise.
2859 (ICS_USER_FLAG): Likewise.
2860 (ICS_ELLIPSIS_FLAG): Likewise.
2861 (ICS_THIS_FLAG): Likewise.
2862 (ICS_BAD_FLAG): Likewise.
2863 (NEED_TEMPORARY_P): Likewise.
2864 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
2865 (USER_CONV_CAND): Likewise.
2866 (USER_CONV_FN): Likewise.
2867 (conversion_obstack_alloc): New function.
2868 (alloc_conversion): Likewise.
2869 (validate_conversion_obstack): Likewise.
2870 (alloc_conversions): Likewise.
2871 (build_conv): Adjust to deal with new conversion data structures.
2872 (build_identity_conv): New function.
2873 (build_ambiguous_conv): Likewise.
2874 (standard_conversion): Adjust to deal with new conversion data
2876 (convert_class_to_reference): Likewise.
2877 (direct_reference_binding): Likewise.
2878 (reference_binding): Likewise.
2879 (implicit_conversion): Likewise.
2880 (add_candidate): Likewise.
2881 (add_function_candidate): Likewise.
2882 (add_conv_candidate): Likewise.
2883 (build_builtin_candidate): Likewise.
2884 (print_z_candidate): Likewise.
2885 (merge_conversion_sequences): Likewise.
2886 (build_user_type_conversion_1): Likewise.
2887 (build_user_type_conversion): Likewise.
2888 (build_new_function_call): Likewise.
2889 (build_object_call): Likewise.
2890 (conditional_conversion): Likewise.
2891 (build_conditional_expr): Likewise.
2892 (build_new_op): Likewise.
2893 (build_op_delete_call): Likewise.
2894 (convert_like_real): Likewise.
2895 (build_over_call): Likewise.
2896 (build_new_method_call): Likewise.
2897 (is_subseq): Likewise.
2898 (maybe_handle_implicit_object): Likewise.
2899 (maybe_handle_ref_bind): Likewise.
2900 (compare_ics): Likewise.
2901 (source_type): Likewise.
2902 (add_warning): Likewise.
2904 (can_convert_arg): Likewise.
2905 (can_convert_arg_bad): Likewise.
2906 (perform_implicit_conversion): Likewise.
2907 (perform_direct_initialization_if_possible): Likewise.
2908 (initialize_reference): Likewise.
2909 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
2910 * cp-tree.def (WRAPPER): Likewise.
2911 (IDENTITY_CONV): Remove.
2912 (LVALUE_CONV): Likewise.
2913 (QUAL_CONV): Likewise.
2914 (STD_CONV): Likewise.
2915 (PTR_CONV): Likewise.
2916 (PMEM_CONV): Likewise.
2917 (BASE_CONV): Likewise.
2918 (REF_BIND): Likewise.
2919 (USER_CONV): Likewise.
2920 (AMBIG_CONV): Likewise.
2921 (RVALUE_CONV): Likewise.
2922 * cp-tree.h (tree_wrapper): Remove.
2923 (WRAPPER_ZC): Remove.
2924 (lang_tree_node): Remove wrapper.
2925 (LOOKUP_SPECULATIVELY): Remove.
2926 (build_op_delete_call): Adjust prototype.
2927 (validate_conversion_obstack): Declare.
2928 (build_zc_wrapper): Remove.
2929 * cvt.c (convert_to_reference): Remove dead code.
2930 (ocp_convert): Likewise.
2931 * decl.c (redeclaration_error_message): Correct handling of
2933 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
2934 (cp_tree_node_structure): Remove WRAPPER case.
2935 * decl2.c (finish_file): Call validate_conversion_obstack.
2936 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
2937 (build_op_delete_call): Likewise.
2938 (build_x_delete): Likewise.
2939 (build_delete): Adjust call to build_op_delete_call.
2940 * pt.c (tsubst_friend_declaration): Adjust code to determine
2941 whether or not a friend template is a definition.
2942 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
2943 * tree.c (build_zc_wrapper): Remove.
2945 2004-02-12 Zack Weinberg <zack@codesourcery.com>
2947 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
2948 * cp-tree.h: Don't declare cxx_builtin_type_decls.
2949 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
2950 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
2952 2004-02-10 Mark Mitchell <mark@codesourcery.com>
2954 * typeck.c (lookup_destructor): Fix typo in error message.
2956 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
2958 * call.c, parser.c, tree.c: Fix comment typos.
2960 2004-02-07 Zack Weinberg <zack@codesourcery.com>
2963 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
2964 * decl.c (duplicate_decls, start_function): Likewise.
2966 2004-02-07 Zack Weinberg <zack@codesourcery.com>
2968 * name-lookup.c (pushdecl): Issue shadow warnings directly.
2969 * parser.c (free_parser_stacks): Delete.
2971 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
2973 * rtti.c: Update copyright.
2975 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2978 * decl.c (require_complete_types_for_parms): Do not insert
2979 error_mark_node in the parameter list.
2981 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2984 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
2985 error when terminator can not be found.
2987 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
2989 Make-lang.in (po-generated): Delete.
2991 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
2993 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
2994 targetm.calls.promote_prototypes.
2996 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3000 2004-01-15 Geoffrey Keating <geoffk@apple.com>
3002 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
3003 (handle_pragma_implementation): Likewise.
3005 2004-02-05 Mark Mitchell <mark@codesourcery.com>
3008 * typeck.c (lookup_destructor): Tweak error message.
3010 2004-02-05 Jan Hubicka <jh@suse.cz>
3012 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
3015 2004-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3018 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
3019 code, only emits the diagnostic now. Added lookup of the identifier
3020 and support for qualified ids.
3021 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
3022 Parse an (invalid) type name as id-expression within a declarator.
3023 (cp_parser_simple_declaration): Use it.
3024 (cp_parser_member_declaration): Likewise.
3025 (cp_parser_make_typename_type): New function. Handle errors through
3026 cp_parser_diagnose_invalid_typename.
3027 (cp_parser_elaborated_type_specifier): Use it.
3029 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3032 * call.c (convert_like_real): Use "converting" rather than
3033 "argument" as the descriptive keyword to
3034 dubious_conversion_warnings.
3035 * typeck.c (convert_for_assignment): Do not call
3036 dubious_conversion_warnings.
3038 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3041 * init.c (build_delete): Emit a more informative error message in
3042 case of an incomplete type, and on the correct source line.
3044 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
3046 * error.c, search.c: Update copyright.
3048 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3051 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
3052 linkage for the typeinfo name string.
3054 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3057 * cp-tree.h (fold_non_dependent_expr): New function.
3058 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
3059 (cp_parser_template_argument): Use fold_non_dependent_expr.
3060 (cp_parser_direct_declarator): Likewise.
3061 * pt.c (fold_non_dependent_expr): New function.
3062 (convert_nontype_argument): Use it.
3063 (tsubst_qualified_id): Simplify.
3064 (tsubst_copy_and_build): Likewise.
3066 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3068 * decl.c (cxx_push_function_context): Do not set
3069 current_function_is_thunk.
3070 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
3073 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3076 * pt.c (more_specialized_class): Increase processing_template_decl
3077 while partial ordering.
3079 2004-02-03 Mark Mitchell <mark@codesourcery.com>
3082 * decl.c (start_function): Do not call pushdecl for any
3083 instantiation or specialization of a primary template.
3085 2004-02-03 Mark Mitchell <mark@codesourcery.com>
3088 * parser.c (cp_parser_class_name): Robustify.
3091 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
3094 * semantics.c (finish_id_expression): Do not return an
3095 IDENTIFIER_NODE when lookup finds a PARM_DECL.
3097 2004-02-03 Mark Mitchell <mark@codesourcery.com>
3100 * pt.c (build_non_dependent_expr): Do not build
3101 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
3104 * semantics.c (finish_id_expression): Do not return an
3105 IDENTIFIER_NODE when lookup finds a VAR_DECL.
3108 * parser.c (cp_parser_simple_declaration): When skipping to the
3109 end of the statement swallow the terminating semicolon.
3111 2004-02-02 Mark Mitchell <mark@codesourcery.com>
3114 * init.c (build_offset_ref): Improve error recovery for invalid
3115 uses of non-static member functions.
3118 * cp-tree.h (cp_build_type_attribute_variant): New function.
3119 * class.c (build_clone): Use cp_build_type_attribute_variant.
3120 * decl.c (duplicate_decls): Likewise.
3121 * pt.c (copy_default_args_to_explicit_spec): Likewise.
3122 (tsubst_function_type): Likewise.
3123 * tree.c (build_exception_variant): Check attributes before
3124 concluding that two types are the same.
3125 (cp_build_type-attribute_variant): New method.
3126 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
3129 * call.c (convert_class_to_reference): Keep better track of
3130 pedantically invalid user-defined conversions.
3132 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3135 * pt.c (tsubst_qualified_id): Improved error message when a type
3136 is expected but not found.
3138 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
3140 * class.c: Fix comment typos.
3142 * error.c: Likewise.
3143 * parser.c: Likewise.
3145 * search.c: Likewise.
3146 * typeck.c: Likewise.
3148 2004-01-30 Richard Henderson <rth@redhat.com>
3151 * method.c (use_thunk): Don't force_target_expr for void thunks.
3152 * tree.c (build_target_expr_with_type): Assert non-void type.
3153 (force_target_expr): Likewise.
3155 2004-01-30 Michael Matz <matz@suse.de>
3157 * parser.c (cp_parser_labeled_statement): Accept case ranges.
3159 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3163 * decl.c (grokdeclarator): Check immediatly type completeness for
3164 non-dependent types.
3166 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3169 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
3170 a sizeof expression.block
3172 2004-01-29 Mark Mitchell <mark@codesourcery.com>
3175 * mangle.c (write_encoding): Correct encoding of member template
3178 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3180 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
3181 template name as it was `<::' (digraph typo).
3182 (cp_parser_nth_token_starts_template_argument_list_p): New function.
3183 (cp_parser_id_expression): Use it.
3184 (cp_parser_nested_name_specifier_opt): Likewise.
3185 (cp_parser_template_name): Likewise.
3186 (cp_parser_class_name): Likewise.
3187 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
3189 2004-01-28 Mark Mitchell <mark@codesourcery.com>
3192 * typeck.c (merge_types): Do not merge attributes into
3196 * parser.c (cp_parser_direct_declarator): Do not prevent
3197 backtracking inside a parenthesized declarator.
3198 (cp_parser_parameter_declaration): Fix typo in comment.
3200 2004-01-28 Jan Hubicka <jh@suse.cz>
3202 * semantics.c (expand_body) Do emit_associated_thunks before
3205 2004-01-27 Devang Patel <dpatel@apple.com>
3207 * name-lookup.c: Include "debug.h"
3208 (do_namespace_alias): Invoke debug_hooks to emit debug info
3209 for namespace alias.
3210 (do_local_using_decl): Invoke debug_hooks to emit debug info
3212 (do_class_using_decl): Same.
3213 (do_toplevel_using_decl): Same.
3214 (do_using_directive): Same.
3215 (cp_emit_debug_info_for_using): New function.
3216 * Make-lang.in (cp/parser.o): Depend on debug.h
3217 (cp/name-lookup.o): Same.
3219 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3221 * cp-tree.h (language_function, lang_type_header): Use
3223 * name-lookup.h (cp_binding_level): Likewise.
3225 2004-01-26 Mark Mitchell <mark@codesourcery.com>
3228 * semantics.c (finish_for_expr): Check for unresolved overloaded
3231 * class.c (add_method): Just check processing_template_decl to
3232 determine whether or not we are within a template.
3233 * decl2.c (maybe_retrofit_in_chrg): Likewise.
3234 * init.c (decl_constant_value): Check the type of the declaration,
3236 * name-lookup.c (maybe_push_to_top_level): Rename to ...
3237 (push_to_top_level): ... this.
3238 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
3239 * pt.c (push_template_decl_real): Reorder condition for speed.
3240 (convert_template_argument): Use dependency-checking functions in
3241 place of uses_template_parms.
3242 (lookup_template_class): Avoid calling uses_template_parms more
3244 (uses_template_parms): Reimplement, using dependency-checking
3246 (instantiate_class_template): Use push_to_top_level, not
3247 maybe_push_to_top_level.
3248 (type_unification_real): Simplify.
3249 (type_dependent_expression_p): Handle OFFSET_REFs and
3251 (any_dependent_template_arguments_p): Handle multiple levels of
3253 * semantics.c (expand_or_defer_fn): Do not check
3254 uses_template_parms for template instantiations.
3255 * typeck.c (comptypes): Avoid calling cp_type_quals.
3257 2004-01-25 Mark Mitchell <mark@codesourcery.com>
3260 * call.c (build_over_call): Do not convert arguments when
3261 processing a template.
3262 * pt.c (build_non_dependent_expr): Do not build a
3263 NON_DEPENDENT_EXPR for arithmetic constants.
3265 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3268 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
3269 returns a TYPE_DECL. no further lookup is required.
3270 * semantics.c (check_template_template_default_arg): A TYPE_DECL
3271 is invalid. Rework to give better diagnostics.
3273 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3276 * pt.c (instantiate_class_template): Add an error_mark_node
3278 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
3280 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
3283 * decl.c (finish_function): Move the call to
3284 finish_fname_decls below the call to
3285 finish_eh_spec_block.
3287 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
3289 * optimize.c, typeck2.c: Update copyright.
3291 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
3293 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
3294 init.c, mangle.c, typeck.c: Update copyright.
3296 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
3298 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
3300 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
3302 * Make-lang.in: Replace $(docdir) with doc.
3303 (c++.info, c++.srcinfo): Dummy entry.
3304 (c++.man, c++.srcman): New rules.
3305 (c++.install-man): Revamp rule.
3307 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
3309 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
3310 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
3311 immediate $(shell) instead of deferred backquote.
3313 2004-01-19 Mark Mitchell <mark@codesourcery.com>
3316 * parser.c (cp_parser_postfix_expression): When encountering
3317 incomplete type on left-hand side of "->" or ".", treat the entire
3318 expression as erroneous.
3321 * call.c (build_field_call): Remove.
3322 (n_build_method_call): Likewise.
3323 (build_method_call): Likewise.
3324 (build_new_method_call): Do not call build_field_call.
3325 * class.c (n_build_method_call): Remove.
3326 (print_class_statistics): Do not print it.
3327 * cp-tree.h (build_method_call): Remove declaration.
3328 (finish_object_call_expr): Likewise.
3329 (build_new_1): Do not use build_method_call.
3330 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
3331 when the function appearing on the right-hand-side of "." or "->"
3332 is not actually a function.
3333 * pt.c (tsubst_copy_and_build): Likewise.
3334 * semantics.c (finish_object_call_expr): Remove.
3336 2004-01-18 Mark Mitchell <mark@codesourcery.com>
3339 * pt.c (tsubst): Use finish_typeof.
3341 2004-01-18 Jason Merrill <jason@redhat.com>
3344 * except.c (build_throw): In a template, set
3345 current_function_returns_abnormally.
3347 2004-01-17 Fred Fish <fnf@intrinsity.com>
3350 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
3351 except don't call array_type_nelts() with a VECTOR_TYPE.
3353 2004-01-16 Jan Hubicka <jh@suse.cz>
3355 * mangle.c (write_mangled_name): Remove inline modifier.
3357 2004-01-16 Mark Mitchell <mark@codesourcery.com>
3360 * decl.c (compute_array_index_type): Fix grammar in comment.
3361 * init.c (build_zero_init): Handle zero-sized arrays correctly.
3364 * call.c (name_as_c_string): Print conversion operator names
3368 * call.c (initialize_reference): Pass -1 for inner parameter to
3371 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3374 * parser.c (cp_parser_base_specifier): Check for an invalid
3375 keyword `typename' and emit an user-friendly error message.
3377 2004-01-15 Geoffrey Keating <geoffk@apple.com>
3380 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
3381 (handle_pragma_implementation): Likewise.
3383 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3386 * typeck.c (build_class_member_access_expr): Allow to access members
3387 of the currently open class.
3388 (finish_class_member_access_expr): Likewise.
3390 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
3393 * name-lookup.c (validate_nonmember_using_decl): Take scope and
3394 name by value, instead of computing them.
3395 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
3396 arguments. Pass them to validate_nonmember_using_decl.
3397 * name-lookup.h (do_local_using_decl): Adjust.
3398 (do_toplevel_using_decl): Likewise.
3399 * parser.c (cp_parser_using_declaration): Likewise.
3400 * pt.c (tsubst_expr): Likewise.
3402 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
3406 * name-lookup.c (qualified_lookup_using_namespace): Search
3407 strongly-associated namespaces first, and only then try other
3410 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
3412 * Make-lang.in (c++.srcextra): Dummy entry.
3414 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3417 * parser.c (cp_parser_template_name): Don't try to parse a
3418 conversion-function-id, as it cannot be a template-name.
3419 (cp_parser_simple_type_specifier): Check for invalid template-ids
3420 even after a built-in type.
3422 2004-01-14 Jan Hubicka <jh@suse.cz>
3425 * pt.c (instantiate_decl): Do not increase function_depth.
3427 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
3431 * parser.c (cp_parser_elaborated_type_specifier): Warn about
3432 attributes and discard.
3433 * decl.c (xref_tag): Don't overwite existing attributes with
3436 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3439 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
3440 is no destructor while looking up a BIT_NOT_EXPR.
3442 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
3444 * cxxfilt.c: Remove unused file.
3446 2004-01-14 Jan Hubicka <jh@suse.cz>
3448 Partial fix to PR c++/12850
3449 * decl2.c (mark_used): Do not proactively instantiate templates
3450 when compiling in unit-at-a-time or not optimizing.
3451 * optimize.c (maybe_clone_body): Do not increase function depth.
3453 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3456 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
3458 2004-01-12 Steven Bosscher <stevenb@suse.de>
3461 * parser.c (cp_parser_member_declaration): Any non-type is also
3462 not a class or a function.
3464 2004-01-12 Jason Merrill <jason@redhat.com>
3467 * class.c (build_base_path): Do not mark vtable references as
3469 (build_vtbl_ref_1): Likewise.
3471 2004-01-12 Richard Henderson <rth@redhat.com>
3474 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
3475 (store_init_value): Use it.
3476 * decl.c (check_initializer): Expect full initialization code
3477 from store_init_value.
3478 * init.c (expand_aggr_init_1): Likewise.
3479 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
3481 2004-01-12 Mark Mitchell <mark@codesourcery.com>
3483 * class.c (layout_class_type): For non-POD class types, also copy
3484 the DECL_SIZE and DECL_MODE of fields to the base class type.
3486 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3489 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
3490 calling regenerate_decl_from_template.
3492 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
3495 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
3496 decl-specifier occurring along with a class definition.
3498 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
3500 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
3501 clauses to comments describing declares_class_or_enum.
3502 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
3505 2004-01-12 Jan Hubicka <jh@suse.cz>
3507 * pt.c (for_each_template_parm): Do not check for duplicates.
3508 (for_each_template_parm): Use walk_tree duplicate checking code.
3510 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
3513 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
3514 is error_mark_node, don't add any more decl_specs.
3515 (cp_parser_init_declarator): After committing to a declaration, if
3516 the decl_specifiers start with error_mark_node, issue an error and
3517 change the type to "int".
3519 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
3522 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
3524 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3528 * pt.c (tsubst): Substitution must fail if we are attempting to
3529 create an array with element type that is an abstract class type.
3530 * decl.c (cp_finish_decl): Strip pointers and array types recursively
3531 before calling abstract_virtuals_error.
3533 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
3535 * name-lookup.c (qualified_lookup_using_namespace): Consider
3536 strong using directives even if we've already found a binding.
3538 2004-01-09 Mark Mitchell <mark@codesourcery.com>
3540 * cp-tree.h (cxx_expand_expr): Change prototype.
3541 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
3543 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3546 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
3547 looking into them recursively. They can be there because of the
3548 new __offsetof__ extension.
3550 2004-01-07 Zack Weinberg <zack@codesourcery.com>
3552 * parser.c (cp_parser_save_member_function_body): Mark the
3555 2004-01-05 Mark Mitchell <mark@codesourcery.com>
3558 * class.c (build_clone): Copy type attributes from the original
3559 function to the clone.
3562 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
3563 references as constant.
3566 * parser.c (cp_parser_explicit_instantiation): Improve error
3568 (cp_parser_require): Improve indication of the error location.
3571 * parser.c (cp_parser_class_head): Reorder logic to check for
3572 invalid qualification.
3574 2004-01-04 Mark Mitchell <mark@codesourcery.com>
3577 * name-lookup.c (lookup_using_namespace): Remove spacesp
3579 (unqualified_namespace_lookup): Likewise.
3580 (lookup_qualified_name): Adjust accordingly.
3581 (lookup_name_real): Likewise.
3582 (lookup_arg_dependent): Do not eliminate the namespace of the
3583 functions found by unqualified name lookup unless that is the
3586 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
3588 * semantics.c (push_deferring_access_checks): Fix format.
3589 (resume_deferring_access_checks): Likewise.
3590 (stop_deferring_access_checks): Likewise.
3591 (pop_deferring_access_checks): Likewise.
3592 (get_deferred_access_checks): Likewise.
3593 (pop_to_parent_deferring_access_checks): Likewise.
3594 (perform_deferred_access_checks): Likewise.
3595 (perform_or_defer_access_check): Likewise.
3597 2004-01-04 Richard Henderson <rth@redhat.com>
3599 * call.c (build_over_call): Don't create a save_expr of an
3600 aggregate, but rather its address.
3602 2004-01-04 Mark Mitchell <mark@codesourcery.com>
3605 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
3606 an offsetof expression.
3608 * parser.c (cp_parser_parameter_declaration): Fix comment.
3611 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
3612 (reference_binding): Set it when appropriate.
3613 (build_temp): New function, split out from ...
3614 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
3615 (initialize_reference): Likewise.
3618 * parser.c (cp_parser): Add in_type_id_in_expr_p.
3619 (cp_parser_new): Initialize it.
3620 (cp_parser_postfix_expression): Set it.
3621 (cp_parser_sizeof_operand): Likewise.
3622 (cp_parser_parameteR_declaration): Do not commit early to tenative
3623 parsers when in_type_id_in_expr_p is set.
3625 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3628 * parser.c (cp_parser_template_argument): Don't call
3629 make_unbound_class_template directly.
3630 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
3631 UNBOUND_CLASS_TEMPLATE tree node.
3633 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
3636 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
3638 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3641 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
3642 (DECL_FUNCTION_TEMPLATE_P): Use it.
3643 (DECL_CLASS_TEMPLATE_P): Likewise.
3644 * parser.c (cp_parser_lookup_name): Add is_template parameter.
3645 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
3646 (cp_parser_template_name): Likewise.
3647 (cp_parser_elaborated_type_specifier): Likewise.
3648 (cp_parser_namespace_name): Likewise.
3649 (cp_parser_class_name): Likewise.
3650 (cp_parser_lookup_name_simple): Likewise.
3652 See ChangeLog.3 for earlier changes.