1 2004-07-27 Kelley Cook <kcook@gcc.gnu.org>
3 * pt.c, typeck.c: Remove spurious carriage returns.
5 2004-07-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8 * pt.c (coerce_template_template_parms) <PARM_DECL case>: Only check
9 when the type of ARG is not dependent.
11 2004-07-26 Geoffrey Keating <geoffk@apple.com>
13 * g++spec.c (LIBSTDCXX_PROFILE): Default to LIBSTDCXX.
14 (lang_specific_driver): If the C++ or math library options don't
15 start with '-l', don't count them as added libraries.
17 2004-07-26 Nathan Sidwell <nathan@codesourcery.com>
19 * decl.c (xref_basetypes): Adjust base access vector creation.
20 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Adjust base
22 * search.c (dynamic_cast_base_recurse, dfs_access_in_type): Likewise.
24 2004-07-26 Niall Douglas <s_fsfeurope2@nedprod.com>
25 Brian Ryner <bryner@brianryner.com>
29 * class.c (check_field_decls): Apply hidden visibility if
30 -fvisibility-inlines-hidden and inlined unless otherwise specified
31 (build_vtable): Set vtable visibility to class visibility.
32 (check_field_decls): Default static member visibility to class
34 (check_methods): Default method visibility to class visibility.
35 * cp-tree.h: Added CLASSTYPE_VISIBILITY and
36 CLASSTYPE_VISIBILITY_SPECIFIED macro.
37 * decl.c (duplicate_decls): New logic for merging definition decls
38 with declaration decls. Added ignore & warning when non default
39 applied to global operator new or delete.
40 * method.c, optimize.c, rtti.c: Added setting of VISIBILITY_SPECIFIED
41 wherever VISIBILITY was changed
42 * rtti.c (get_tinfo_decl): Set typeinfo visibility to class
44 (tinfo_base_init): Set typeinfo name visibility to class visibility.
46 2004-07-25 Bernardo Innocenti <bernie@develer.com>
48 * decl.c: Rename all identifiers named `class' to `cl'.
49 * cp-tree.h: Likewise.
51 2004-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
53 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Use GGC_CNEW.
54 * typeck2.c (abstract_virtuals_error): Use GGC_NEW.
55 * name-lookup.c (binding_entry_make): Use GGC_NEW.
56 (binding_table_construct): Use GGC_CNEWVEC.
57 (binding_table_new): Use GGC_NEW.
58 (cxx_binding_make): Likewise.
59 (begin_scope): Likewise.
60 (push_to_top_level): Use GCC_CNEW.
61 * parser.c (cp_token_cache_new): Likewise.
62 (cp_token_cache_push_token): Likewise.
63 (cp_lexer_new_main): Likewise.
64 (cp_lexer_new_from_tokens): Likewise.
65 (cp_parser_context_new): Likewise.
66 (cp_parser_new): Likewise.
67 (cp_lexer_new_from_tokens): Use GGC_NEWVEC.
68 * lex.c (cxx_make_type): Use GGC_CNEW.
69 (retrofit_lang_decl): Use GGC_NEWVAR.
70 (cxx_dup_lang_specific_decl): Likewise.
71 (copy_lang_type): Likewise.
72 * decl.c (use_label): Use GGC_NEW instead of ggc_alloc.
73 (save_function_data): Likewise.
74 (lookup_label): Use GGC_CNEW instead of ggc_alloc_cleared.
75 (cxx_push_function_context): Likewise.
77 2004-07-25 Richard Henderson <rth@redhat.com>
79 * decl.c (start_preparsed_function): Set DECL_ARTIFICIAL and
80 DECL_IGNORED_P on RESULT_DECL.
81 * semantics.c (finalize_nrv): Copy them too.
83 2004-07-23 Nathan Sidwell <nathan@codesourcery.com>
85 * search.c (lookup_conversion_operator): Avoid two loops.
86 (add_conversions): Remove.
87 (check_hidden_convs, split_conversions,
88 lookup_conversions_r): New.
89 (lookup_conversions): Use lookup_conversions_r.
91 2004-07-22 Nathan Sidwell <nathan@codesourcery.com>
93 * pt.c (get_template_base): Check type is completable.
95 2004-07-21 Eric Christopher <echristo@redhat.com>
97 * decl.c (poplevel): Inline unused variable checking.
100 2004-07-21 Paolo Bonzini <bonzini@gnu.org>
102 * typeck.c (build_binary_op): Do not use RDIV_EXPR for
105 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
108 * pt.c (check_explicit_specialization): Remove extension to accept
109 specializations without template headers. Fall-through to normal
112 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
115 * pt.c (determine_specialization): New parameter template_count.
116 Disambiguate between member templates and member functions counting
117 the template headers.
118 (check_explicit_specialization): Update caller.
119 (tsubst_friend_function): Likewise.
121 2004-07-20 Steven Bosscher <stevenb@suse.de>
123 * cp-tree.def (TINST_LEVEL): Make it an 'x' node.
124 * cp-tree.h (tinst_level_t): New tree type.
125 (union lang_tree_node): Handle it.
126 (TINST_LOCATION): New accessor macro.
127 (make_tinst_level): New prototype.
128 * cp-lang.c (cp_tree_size): Handle TINST_LEVEL.
129 * decl.c (cp_tree_node_structure): Likewise.
130 * error.c (print_instantiation_full_context): Use TINST_LOCATION.
131 (print_instantiation_partial_context): Likewise.
132 * pt.c (pop_tinst_level): Likewise.
133 (push_tinst_level): Use make_tinst_level.
134 * tree.c (make_tinst_level): New function.
135 (cp_walk_subtrees): Walk TINST_DECL for a TINST_LEVEL node.
137 2004-07-20 Mark Mitchell <mark@codesourcery.com>
139 * parser.c (cp_parser_simple_type_specifier): Fix typo.
142 * parser.c (cp_parser_simple_type_specifier): Do not record usage
143 of globally-qualified names.
145 2004-07-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
148 * error.c (dump_type) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Output
151 2004-07-19 Mark Mitchell <mark@codesourcery.com>
154 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
155 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
156 * class.c (add_implicitly_declared_members): Use
157 CLASSTYPE_LAZY_ASSIGNMENT_OP.
158 * method.c (lazily_declare_fn): Clear
159 CLASSTYPE_LAZY_ASSIGNMENT_OP.
160 * search.c (lookup_fnfields_1): Check it.
162 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
164 * cp-tree.h (vec_binfo_member): Remove.
165 * tree.c (vec_binfo_member): Remove.
167 * cp-tree.h (struct lang_type_class): Remove vfields field.
168 (CLASSTYPE_VFIELDS): Remove.
169 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
170 * class.c (determine_primary_base): Remove CLASSTYPE_VFIELDS
172 (dfs_modify_vtables): Use TYPE_CONTAINS_VPTR_P.
173 (finish_struct_1): Remove CLASSTYPE_VFIELDS handling.
174 * init.c (dfs_initialize_vtbl_ptrs): Use TYPE_CONTAINS_VPTR_P.
176 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
178 * cp-tree.h (DEF_VEC_P(tree)): Remove here.
179 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
181 (BINFO_LANG_SLOTS): Remove.
182 * tree.c (copy_binfo): Adjust BINFO creation and accessors.
183 * decl.c (xref_basetypes): Adjust BINFO creation and accessors.
184 * class.c (check_bases): Adjust BINFO accessors.
185 (determine_primary_base, finish_struct_bits,
186 maybe_warn_about_overly_private_class, warn_hidden,
187 walk_subobject_offsets, propagate_binfo_offsets, end_of_class,
188 warn_about_ambiguous_bases, get_vfield_name,
189 dump_class_hierarchy_r, build_vtt_inits, accumulate_vtbl_inits,
190 add_vcall_offset_vtbl_entries_r): Likewise.
191 * dump.c (cp_dump_tree): Likewise.
192 * init.c (sort_mem_initializers, expand_member_init, build_delete,
193 push_base_cleanups): Likewise.
194 * method.c (do_build_copy_constructor, do_build_assign_ref,
195 synthesize_exception_spec): Likewise.
196 name-lookup.c (arg_assoc_class): Likewise.
197 * pt.c (instantiate_class_template,
198 get_template_base_recursive): Likewise.
199 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Likewise.
200 * typeck2.c (process_init_constructor): Likewise.
201 * search.c (lookup_base_r, dynamic_cast_base_recurse,
202 dfs_access_in_type, dfs_walk_real, look_for_overrides,
203 types_overlap_p, copied_binfo, original_binfo): Likewise.
204 (binfo_for_vtable): Remove
206 2004-07-20 Steven Bosscher <stevenb@suse.de>
208 * cp-tree.h (struct lang_decl_flags): Unify the template_info and
209 thunk_alias, and the access and virtual_offset fields.
210 (THUNK_VIRTUAL_OFFSET, THUNK_ALIAS): Adjust.
211 * decl.c (finish_case_label): Update c_add_case_node call.
213 2004-07-19 Mark Mitchell <mark@codesourcery.com>
215 Revert patch for PR c++/16623.
217 2004-07-19 Kelley Cook <kcook@gcc.gnu.org>
219 * except.c: Remove two spurious carriage returns.
221 2004-07-19 Mark Mitchell <mark@codesourcery.com>
224 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
225 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
226 * class.c (add_implicitly_declared_members): Use
227 CLASSTYPE_LAZY_ASSIGNMENT_OP.
228 * method.c (lazily_declare_fn): Clear
229 CLASSTYPE_LAZY_ASSIGNMENT_OP.
230 * search.c (lookup_fnfields_1): Check it.
232 2004-07-19 Nathan Sidwell <nathan@codesourcery.com>
234 * class.c (add_method): Delay adding the slot until the end.
235 (determine_primary_base): Adjust VEC_iterate invokation.
236 (resort_type_method_vec, finish_struct_methods, warn_hidden,
237 walk_subobject_offsets, end_of_class, warn_about_ambiguous_bases,
238 build_vtbl_initializer): Likewise.
239 * init.c (sort_mem_initializers, build_delete, push_base_cleanups,
240 build_vbase_delete): Likewise.
241 * method.c (do_build_copy_constructor): Likewise.
242 * name-lookup.c (new_class_binding, print_binding_level,
243 poplevel_class, store_class_bindings, push_to_top_level,
244 pop_from_top_level): Likewise.
245 * pt.c (check_explicit_specialization): Likewise.
246 * search.c (lookup_conversion_operator, lookup_fnfields_1,
247 get_pure_virtuals, add_conversions, dfs_check_overlap,
248 binfo_for_vbase): Likewise.
250 2004-07-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
253 * pt.c (unify) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Use only
254 innermost set of template arguments during deduction. Simplify.
256 2004-07-19 Joseph S. Myers <jsm@polyomino.org.uk>
258 * typeck.c (build_modify_expr, build_x_modify_expr): Set
259 TREE_NO_WARNING on assignments with an operator other than '='.
261 2004-07-10 Steven Bosscher <stevenb@suse.de>
262 Joseph S. Myers <jsm@polyomino.org.uk>
264 * cp-tree.h (C_SET_EXP_ORIGINAL_CODE): Remove.
265 * decl2.c (grokfield): Don't check current_class_depth via
266 unused TREE_COMPLEXITY.
267 * semantics.c (finish_parenthesized_expr): Set TREE_NO_WARNING
268 to avoid the missing parentheses warning.
269 Don't set C_SET_EXP_ORIGINAL_CODE.
271 2004-07-18 Mark Mitchell <mark@codesourcery.com>
273 * tree.c (no_linkage_helper): Remove.
274 (no_linkage_check): Don't use walk_tree_without_duplicates.
276 * mangle.c (write_expression): Issue a sorry for zero-operand
279 2004-07-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
282 * init.c (build_offset_ref): Build SCOPE_REF with non-null
283 TREE_TYPE for non-dependent names.
284 * typeck.c (build_x_unary_op): Handle non-dependent SCOPE_REF.
285 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
286 unknown_type_node as its TREE_TYPE.
287 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
288 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
289 (dump_expr) <SCOPE_REF case>: Likewise.
291 2004-07-17 Jason Merrill <jason@redhat.com>
294 * call.c (type_passed_as): Make the invisible reference type
296 * cp-gimplify.c (gimplify_cleanup_stmt): Rename to
297 cp_genericize_r. Handle invisible reference lowering.
298 (is_invisiref_parm): New fn.
299 (cp_genericize): Adjust the types of invisible reference parms.
300 Don't repeat the walk for clones.
301 * decl.c (store_parm_decls): Don't generate any code for clones.
303 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
305 * cp-tree.h (builtin_function): Declare.
307 2004-07-16 Mark Mitchell <mark@codesourcery.com>
309 * class.c (finish_struct_methods): Remove unncessary code.
310 (add_implicitly_declared_members): Create declarations for default
311 constructors and copy constructors lazily.
312 * cp-tree.h (lang_type_class): Remove lazy_default_ctor and
314 (CLASSTYPE_LAZY_DEFAULT_CTOR): New macro.
315 (CLASSTYPE_LAZY_COPY_CTOR): Likewise.
316 * decl2.c (check_classfn): Robustify.
317 (locate_dtor): Handle empty CLASSTYPE_METHOD_VEC.
318 (locate_ctor): Handle lazy default constructors.
319 (locate_copy): Handle lazy copy constructors.
320 (implicitly_declare_fn): Make sure we're looking at the
321 TYPE_MAIN_VARIANT for a class before creating functions. Don't
322 set TYPE_HAS_CONSTRUCTOR.
323 (lazily_declare_fn): New function.
324 * name-lookup.c (constructor_name_full): Simplify.
325 * search.c (lookup_fnfields_1): Lazily create methods, as
327 (lookup_for_overrides): Handle empty CLASSTYPE_METHOD_VEC.
329 2004-07-16 Steven Bosscher <stevenb@suse.de>
331 * cp-tree.h (struct lang_type): Don't have three GTY options on a
334 2004-07-16 Richard Henderson <rth@redhat.com>
336 * cp-lang.c (LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING): Die.
337 * cp-tree.h (cp_copy_res_decl_for_inlining): Remove.
338 * tree.c (cp_copy_res_decl_for_inlining): Remove.
340 2004-07-16 Nathan Sidwell <nathan@codesourcery.com>
342 * class.c (finish_struct_bits): Use for loop.
343 (propagate_binfo_offsets): Do primary binfo outside of loop.
346 * dump.c (cp_dump_tree): Don't dump the bases if there's no
349 * pt.c (tsubst) <TREE_BINFO case>: We should never get here.
351 2004-07-15 Mark Mitchell <mark@codesourcery.com>
353 * cp-tree.h (lang_type_class): Remove has_real_assign_ref and
354 has_abstract_assign_ref. Make methods a VEC(tree) *.
355 (TYPE_HAS_CONST_ASSIGN_REF): Add documentation.
356 (CLASSTYPE_CONSTRUCTORS): Adjust for changes to CLASSTYPE_METHOD_VEC.
357 (CLASSTYPE_DESTRUCTORS): Likewise.
358 (TYPE_HAS_REAL_ASSIGN_REF): Remove.
359 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
360 (add_method): Change prototoype.
361 * class.c (add_method): Remove error_p parameter. Adjust for
362 changes to CLASSTYPE_METHOD_VEC.
363 (handle_using_decl): Adjust call to add_method.
364 (maybe_warn_about_overly_private_class): Adjust for
365 changes to CLASSTYPE_METHOD_VEC.
366 (resort_type_method_vec): Likewise.
367 (finish_struct_methods): Likewise.
368 (check_for_override): Likewise.
369 (warn_hidden): Likewise.
370 (add_implicitly_declared_members): Defer creation of assignment
371 operators. Adjust call to add_method.
372 (clone_function_decl): Adjust call to add_method.
373 (check_bases_and_members): Don't set TYPE_HAS_REAL_ASSIGN_REF.
374 (finish_struct_1): Use CLASSTYPE_DESTRUCTORS.
375 * decl.c (grok_special_member_properties): Don't set
376 TYPE_HAS_ABSTRACT_ASSIGN_REF.
377 * decl2.c (check_classfn): Adjust for
378 changes to CLASSTYPE_METHOD_VEC.
379 * method.c (locate_dtor): Use CLASSTYPE_DESTRUCTORS.
380 (locate_ctor): Use CLASSTYPE_CONSTRUCTORS.
381 (locate_copy): Adjust for changes to CLASSTYPE_METHOD_VEC.
382 (implicitly_declare_fn): Set DECL_SOURCE_LOCATION. Do not call
384 * pt.c (check_explicit_specialization): Adjust for
385 changes to CLASSTYPE_METHOD_VEC.
386 (instantiate_class_template): Do not set
387 TYPE_HAS_ABSTRACT_ASSIGN_REF.
388 * ptree.c (cxx_print_type): Don't try to print
389 CLASSTYPE_METHOD_VEC.
390 * rtti.c (emit_support_tinfos): Use CLASSTYPE_DESTRUCTORS.
391 * search.c (lookup_field_r): Adjust for
392 changes to CLASSTYPE_METHOD_VEC.
393 (lookup_fnfields): Likewise.
394 (lookup_conversion_operator): Likewise.
395 (lookup_fnfields_1): Likewise. Create assignment operators
397 (look_for_overrides_here): Adjust for
398 changes to CLASSTYPE_METHOD_VEC.
399 (add_conversions): Likewise.
400 * semantics.c (finish_member_declaration): Adjust call to add_method.
402 2004-07-15 Jason Merrill <jason@redhat.com>
404 * cp-lang.c (cxx_types_compatible_p): To the middle-end,
405 references and pointers are compatible.
407 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
409 * decl.c (xref_basetypes): Refactor.
410 * tree.c (copy_base_binfos): Replace with ...
411 (copy_binfo): ... this. Deep copy the given binfo, (not the just
412 bases of the given base).
413 * cp-tree.h (copy_base_binfo): Remove.
414 (copy_binfo): Declare.
416 2004-07-15 Mark Mitchell <mark@codesourcery.com>
418 * name-lookup.c (set_inherited_value_binding_p): Add class_type
420 (get_class_binding): Adjust.
421 (push_class_level_binding): Don't use set_inherited_value_binding_p.
423 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
425 * class.c (finish_struct_bits): Don't set TYPE_HAS_CONVERSION here.
426 * decl.c (xref_basetypes): Set it here.
428 * class.c (check_bases): Don't set CLASSTYPE_NON_AGGREGATE here.
429 Don't check for incomplete base.
430 (get_vfield_name): Simplify while loop.
431 * decl.c (xref_basetypes): Set CLASSTYPE_NON_AGGREGATE here.
433 2004-07-14 Mark Mitchell <mark@codesourcery.com>
435 * lex.c (cxx_make_type): Remove call to get_pointer_type.
437 * cp-tree.h (IDENTIFIER_VALUE): Remove.
438 (BINFO_PUSHDECLS_MARKED): Likewise.
439 (maybe_inject_for_scope_var): Likewise.
440 (push_class_decls): Likewise.
441 * name-lookup.h (push_class_binding): Remove.
442 (innermost_non_namespace_value): New function.
443 (outer_binding): Likewise.
444 * class.c (add_method): Push bindings before adding to
446 (restore_class_cache): Do not restore class_shadowed.
447 (pushclass): Do not add USING_DECLs. Do not call
449 * config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c.
450 * decl.c (pushdecl): Use outer_binding.
451 (poplevel): Set the scope for an out-of-scope for-loop declaration
453 (cp_finish_decl): Don't call maybe_inject_for_scope_var.
454 * name-lookup.c (new_class_binding): New function.
455 (push_binding): Use it.
456 (pushdecl): Use innermost_non_namespace_value.
457 (maybe_inject_for_scope_var): Remove.
458 (push_class_binding): Remove.
459 (set_inherited_value_binding_p): New function.
460 (get_class_binding): New function.
461 (push_class_level_binding): Assert that the current_class_type is
463 (outer_binding): New function.
464 (innermost_non_namespace_value): Likewise.
465 (lookup_name_real): Use outer_binding.
466 (lookup_name_current_level): Ignore out-of-scope variables.
467 * pt.c (check_template_shadow): Use innermost_non_namespace_value.
468 (lookup_template_class): Likewise.
469 * search.c (dfs_push_type_decls): Remove.
470 (dfs_push_decls): Likewise.
471 (setup_class_bindings): Likewise.
472 (lookup_field_1): Handle USING_DECLs from dependent scopes.
473 (marked_pushdecls_p): Remove.
474 (unmarked_pushdecls_p): Remove.
475 (marked_identifiers): Remove.
476 (setup_class_bindings): Remove.
477 (dfs_push_type_decls): Remove.
478 (dfs_push_decls): Remove.
479 (push_class_decls): Remove.
481 2004-07-13 Mark Mitchell <mark@codesourcery.com>
485 * decl.c (grokvardecl): Make declspecs parameter const.
486 (grokdeclarator): Likewise. Adjust accordingly.
487 * decl.h (grokdeclarator): Adjust declaration.
488 * parser.c (cp_parser_init_declarator): Do not clear
489 decl_specifiers->attributes.
491 * cp-tree.h (lang_identifier): Remove class_value.
492 (IDENTIFIER_CLASS_VALUE): Remove.
493 (pop_class_decls): Likewise.
494 (init_search_processing): Likewise.
495 * class.c (handle_using_decl): Use lookup_member, not
496 IDENTIFIER_CLASS_VALUE.
497 (restore_class_cache): New function, split out from ...
498 (pushclass): ... here. Do not call clear_identifier_class_values.
499 (invalidate_class_lookup_cache): Do not clear
500 IDENTIFIER_CLASS_VALUE.
501 (popclass): Do not call pop_class_decls.
502 (maybe_note_name_used_in_class): Do not save names looked up after
503 the class is complete. Use lookup_member, not
504 IDENTIFIER_CLASS_VALUE.
505 * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
506 * decl.c (cxx_init_decl_processing): Do not call
507 init_search_processing.
508 * method.c (do_build_copy_constructor): Remove unnecessary code.
509 (do_build_assign_ref): Likewise.
510 * name-lookup.c (pushdecl): Use lookup_member, not
511 IDENTIFIER_CLASS_VALUE.
512 (set_identifier_type_value_with_scope): Set TREE_TYPE on the
514 (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
515 (push_class_binding): Do not set it.
516 (clear_identifier_class_values): Remove.
517 (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
518 (store_binding): Do not save it.
519 (pop_from_top_level): Do not restore it.
520 * name-lookup.h (cxx_saved_binding): Remove class_value.
521 (clear_identifier_class_values): Remove.
522 * ptree.c (cxx_print_identifier): Do not print
523 IDENTIFIER_CLASS_VALUE.
524 * search.c (search_obstack): Remove.
525 (push_stack_level): Remove.
526 (pop_stack_level): Remove.
527 (search_level): Remove.
528 (search_stack): Remove.
529 (lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
530 (setup_class_bindings): Use IDENTIFIER_MARKED, not
531 IDENTIFIER_CLASS_VALUE.
532 (marked_identifiers): New variable.
533 (push_class_decls): Clear IDENTIFIER_MARKED.
534 (pop_class_decls): Don't call pop_search_level.
535 (init_search_processing): Remove.
537 2004-07-12 Mark Mitchell <mark@codesourcery.com>
539 * cp-tree.h (get_aggr_typedef): Remove.
540 * init.c (get_aggr_typedef): Likewise.
542 * name-lookup.c (push_class_level_binding): Simplify.
544 2004-07-12 Andrew Pinski <apinski@apple.com>
548 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
550 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
553 2004-07-12 Eric Christopher <echristo@redhat.com>
555 * parser.c (cp_parser_class_head): Remove unused variable.
557 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
559 * decl.c (grok_op_properties): Reject [de-]allocation functions
560 declared in a namespace, or declared as static.
562 2004-07-12 Nathan Sidwell <nathan@codesourcery.com>
564 * cp-tree.h (make_binfo): Remove.
565 * decl.c (xref_basetypes): Use make_tree_binfo directly.
566 * tree.h (copy_base_binfos): Likewise.
567 (make_binfo): Remove.
569 * call.c (build_user_type_conversion_1, build_new_op,
570 check_constructor_callable, build_temp,
571 perform_direct_initialization_of_possible): Pass type directly to
572 lookup_fnfields & build_special_member_call.
573 (build_special_member_call): Accept a type, and complete it.
574 * class.c (finish_stuct_bits): Copy the BINFOs here.
575 * cvt.c (ocp_convert): Pass type directly to
576 build_special_member_call.
577 * decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
578 (xref_basetypes): Allocate the binfo here. Adjust.
579 * init.c (build_init, build_new_1): Pass type directly to
580 build_special_member_call.
581 * lex.c (cxx_make_type): Do not allocate binfo here.
582 * name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
583 * parser.c (cp_parser_class_head): Always call xref_basetypes.
584 * pt.c (instantiate_class_template): Likewise. Inhibit access
585 checking for template friends.
586 * ptree.c (cxx_print_type): Adjust record printing.
587 * search.c (lookup_base): When taking a type, complete it before
589 (lookup_member): Delay completing a type.
590 (push_class_decls): Don't walk an incomplete type.
591 (lookup_conversions): Likewise.
592 * semantics.c (finish_stmt_expr_expr): Pass type directly to
593 build_special_member_call.
594 * tree.c (copy_base_binfos): Adjust.
595 (make_binfo): Likewise.
596 * typeck.c (build_modify_expr): Pass type directly to
597 build_special_member_call.
598 * typeck2.c (process_init_constructor): Check a binfo exists.
599 (build_m_component_ref): Allow accessing an incomplete type.
600 (build_functional_cast): Pass type directly to
601 build_special_member_call.
603 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
606 * config-lang.in (gtfiles): Add typeck2.c.
607 * Make-lang.in: Tweak typeck2.c dependencies, and add rule for
609 * cp-tree.h: Declare complete_type_check_abstract.
610 * typeck2.c (pat_calc_hash, pat_compare,
611 complete_type_check_abstract): New functions.
612 (abstract_virtuals_error): If the type is abstract, register the
613 declaration within abstract_pending_vars for further checks.
614 Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
615 * decl.c (cp_finish_decl): Do not strip array types.
616 (create_array_type_for_decl): Check for abstractness of the element
618 (complete_vars): Call complete_type_check_abstract.
619 * class.c (finish_struct): Prepare a list of virtual functions for
620 template types, and call complete_vars on it to check for abstractness.
622 2004-07-12 Paolo Bonzini <bonzini@gnu.org>
624 PR tree-optimization/14107
625 * decl.c (finish_function): Remove temporary band-aid.
627 2004-07-11 Mark Mitchell <mark@codesourcery.com>
629 * call.c (build_operator_new_call): Avoid using push_to_top_level.
630 (build_new_op): Adjust call to lookup_function_nonclass.
631 * name-lookup.c (identifier_type_value): Adjust call to
633 (lookup_name_real): Add block_p parameter.
634 (lookup_name_nonclass): Adjust call to lookup_name_real.
635 (lookup_function_nonclass): Likewise.
636 (lookup_name): Likewise.
637 * name-lookup.h (lookup_name_real): Change prototype.
638 (lookup_name_nonclass): Likewise.
639 * parser.c (cp_parser_lookup_name): Likewise.
641 * cp-tree.h (saved_scope): Make old_bindings a vector.
642 (unuse_fields): Remove.
643 * name-lookup.h (cxx_saved_binding): Define it.
644 * class.c (pushclass): Don't use unuse_fields.
645 * name-lookup.c (cxx_saved_binding_make): Remove.
646 (store_binding): Add new bindings to a vector, using an
647 accumulator style, rather than adding them to a list.
648 (store_bindings): Adjust accordingly.
649 (store_class_bindings): Likewise.
650 (push_to_top_level): Likewise.
651 (pop_from_top_level): Likewise.
652 * optimize.c (maybe_clone_body): Must push_to_top_level and
653 pop_from_top_level calls outside of loop.
654 * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope
655 calls here from cp_parser_late_parsing_default_args.
656 (cp_parser_save_default_args): Record the class type in which the
657 function is declared.
658 (cp_parser_late_parsing_default_args): Do not call
659 push_nested_class/pop_nested_class.
660 * search.c (dfs_unuse_fields): Remove.
661 (unuse_fields): Remove.
663 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
665 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
666 LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
667 * cp-tree.h (poplevel): Declare.
669 * decl.c (set_block): Remove.
671 2004-07-10 Mike Stump <mrs@apple.com>
673 * decl2.c (import_export_class): Never export/import vtables
674 with inline key functions.
676 2004-07-09 Steven Bosscher <stevenb@suse.de>
678 * typeck.c (c_expand_asm_operands): Remove.
680 2004-07-09 Mike Stump <mrs@apple.com>
682 * typeck.c (build_class_member_access_expr): Skip null deref
683 warning when we don't dereference it.
685 2004-07-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
689 * class.c (check_field_decls): Improve -Weffc++ warning: do not
690 warn for pointers to functions/members, or for classes without
693 2004-07-08 Mark Mitchell <mark@codesourcery.com>
695 * name-lookup.h (struct cp_binding_level): Update documentation
698 2004-07-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
701 * typeck.c (check_return_expr): Improve -Weffc++ warning: handle
702 returning CALL_EXPR, and non-reference return type.
704 2004-07-08 Nathan Sidwell <nathan@codesourcery.com>
706 * name-lookup.c (push_binding): Use VEC_reserve.
708 2004-07-08 Richard Henderson <rth@redhat.com>
710 * cp-tree.h (expand_eh_spec_block): Remove.
712 2004-07-07 Mark Mitchell <mark@codesourcery.com>
714 * cp-tree.h (saved_scope): Remove x_previous_class_type and
715 x_previous_class_values; add x_previous_class_level.
716 (previous_class_type): Remove.
717 (previous_class_values): Remove.
718 (previous_class_level): New macro.
719 * class.c (pushclass): Restore the identifier cache more
721 (invalidate_class_lookup_cache): Use vector for class_shadowed and
722 previous_class_values.
723 * decl.c (poplevel): Likewise.
724 * name-lookup.c (cxx_binding_init): New function.
725 (cxx_binding_make): Use it.
726 (push_binding): For a binding in a class level, use a vector of
727 cp_class_binding nodes.
728 (push_binding_level): New function.
729 (begin_scope): Use it.
730 (leave_scope): Do not put class binding levels on the free list.
731 (print_binding_level): Adjust for the fact that class_shadowed is
733 (poplevel_class): Likewise.
734 (clear_identifier_class_values): Likewise.
735 (push_class_level_binding): Likewise.
736 (set_class_shadows): Remove.
737 (store_binding): New function.
738 (store_class_bindings): New function.
739 (push_to_top_level): Use store_class_bindings as appropriate.
740 (pop_from_top_level): Use previous_class_level, not
742 * name-lookup.h (cp_class_binding): New type.
743 (cp_binding_level): Use a vector object for class_shadowed.
744 (push_binding_level): Declare.
745 (set_class_shadows): Remove.
747 2004-07-07 Andrew Pinski <apinski@apple.com>
749 * class.c (instantiate_type): BUFFER_REF is dead.
750 * lex.c (init_operators): IN_EXPR is dead.
752 2004-07-07 Jason Merrill <jason@redhat.com>
755 * call.c (build_new_op): Give overload warnings for built-in
758 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
761 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
764 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
766 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
767 * class.c (build_primary_vtable, check_bases,
768 determine_primary_base, finish_struct_bits,
769 maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
770 get_basefndecls, warn_hidden, walk_subobject_offsets,
771 build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
772 layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
773 finish_struct_1, get_vfield_name, contains_empty_class_p,
774 dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
775 dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
776 add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
778 * decl.c (xref_basetypes): Likewise.
779 * dump.c (cp_dump_tree): Likewise.
780 * error.c (dump_expr): Likewise.
781 * init.c (sort_mem_initializers, expand_member_init,
782 push_base_cleanups): Likewise.
783 * method.c (do_build_copy_constructor, do_build_assign_reg,
784 synthesize_exception_spec): Likewise.
785 * name-lookup.c (arg_assoc_class): Likewise.
786 * pt.c (instantiate_class_template, tsubst,
787 get_template_base_recursive): Likewise.
788 * ptree.c (cxx_print_type): Likewise.
789 * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
790 * search.c (lookup_base_r, dynamic_cast_base_recurse,
791 dfs_access_in_type, access_in_type, lookup_field_queue_p,
792 bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
793 marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
794 dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
795 binfo_for_vtable, copied_binfo, original_binfo): Likewise
796 * tree.c (copy_base_binfos, make_binfo): Likewise.
797 * typeck.c (commmon_base_type): Likewise
798 * typeck2.c (process_init_constructor): Likewise
800 2004-07-06 Joseph S. Myers <jsm@polyomino.org.uk>
802 * decl.c (check_tag_decl): Name redeclared type in diagnostic.
804 2004-07-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
807 * pt.c (convert_nontype_argument): Disallow conversions between
808 different enumeration types.
810 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
812 * cp-tree.h (BINFO_MARKED): Remove.
813 (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
814 BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
815 BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
816 (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
817 * class.c (build_base_path): Use BINFO_VIRTUAL_P.
818 (mark_primary_bases, determine_primary_base, base_derived_from,
819 dfs_find_final_overrider, dfs_find_final_overrider_q,
820 dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
821 dfs_modify_vtables, walk_subobject_offsets,
822 layout_nonempty_base_or_field, build_base_field,
823 build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
824 end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
825 finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
826 build_ctor_vtbl_group, accumulate_vtble_inits,
827 dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
828 build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
829 add_vcall_offset_vtbl_entries_1): Likewise.
830 * decl.c (xref_basetypes): Incomming virtual base indicated by
832 * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
833 * init.c (finish_init_stmts, sort_mem_initializers,
834 emit_mem_initializers, build_vtble_address, expand_member_init,
835 push_base_cleanups): Likewise.
836 * method.c (do_build_copy_constructor): Likewise.
837 * pt.c (instantiate_class_template,
838 get_template_base_recursive): Likewise.
839 * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
840 get_pseudo_ti_desc): Likewise.
841 * search.c (lookup_base_r, dynamic_cast_base_recurse,
842 binfo_from_vbase, binfo_via_virtual, copied_binfo,
843 original_binfo): Likewise.
844 * semantics.c (finish_base_specifier): Virtualness is indicated
846 * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
848 2004-07-06 Mark Mitchell <mark@codesourcery.com>
851 2004-06-24 Jason Merrill <jason@redhat.com>
853 * decl.c (grokparms): Give the PARM_DECL reference type if the
854 parameter is passed by invisible reference.
856 2004-07-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
858 * cp-lang.c (cp_var_mod_type_p): Add extra arg.
859 * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
860 * pt.c (check_instantiated_args, unify): Likewise.
862 2004-07-05 Phil Edwards <phil@codesourcery.com>
864 * Make-lang.in (check-c++, lang_checks): Add some comments.
866 2004-07-05 Zack Weinberg <zack@codesourcery.com>
868 * cp-mudflap.c: Delete file.
869 * Makefile.in: Remove all references to cp-mudflap.o.
871 2004-07-05 Zack Weinberg <zack@codesourcery.com>
873 * decl.c (cxx_init_decl_processing): Call
874 build_common_tree_nodes before creating the global NAMESPACE_DECL.
876 2004-07-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
879 * call.c (build_operator_new_call): Look only at global scope.
881 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
883 * call.c (enforce_access): Expect TREE_BINFO.
884 * class.c (binfo_ctor_vtable): Check TREE_BINFO.
885 * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
886 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
888 (BINFO_LANG_ELTS): Remove.
889 (BINFO_LANG_SLOTS): New.
890 (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
891 (CLASSTYPE_TEMPLATE_INFO): Adjust.
892 * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
893 * search.c (lookup_member): Check TREE_BINFO.
894 * semantics.c (perform_or_defer_access_check): Likewise.
895 (check_accessibility_of_qualified_id): Check
896 deferred_access_no_check.
897 * tree.c (make_binfo): Use make_tree_binfo.
899 2004-07-04 Mark Mitchell <mark@codesourcery.com>
901 * method.c (implicitly_declare_fn): Set linkage of generated
904 2004-07-04 Richard Henderson <rth@redhat.com>
906 * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
908 2004-07-03 Scott Brumbaugh <scottb.lists@verizon.net>
911 * name-lookup.c (push_class_level_binding): Don't pass a
912 TREE_LIST of ambiguous names to check_template_shadow as it
913 only handles declarations. Instead, pull the declaration
916 2004-07-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
919 * pt.c (check_explicit_specialization): Clarify error message.
921 2004-07-02 Richard Henderson <rth@redhat.com>
923 * tree.c (cp_unsave_r): Update remap_save_expr call.
925 2004-07-02 Mark Mitchell <mark@codesourcery.com>
928 * mangle.c (write_template_arg): Correct mangling.
931 * decl.c (grokdeclarator): Robustify.
933 2004-07-01 Richard Henderson <rth@redhat.com>
935 * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
936 * method.c (synthesize_method): Don't clear_last_expr.
937 * name-lookup.c (maybe_push_cleanup_level): Likewise.
939 2004-07-01 Nick Clifton <nickc@redhat.com>
941 * decl2.c (import_export_class): Invoke the
942 import_export_class field in the gcc_target structure if it is not
945 2004-06-30 Richard Henderson (rth@redhat.com>
947 * decl.c (start_preparsed_function): Don't set immediate_size_expand.
948 * method.c (use_thunk): Likewise.
950 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
952 * call.c (build_over_call), typeck.c (build_function_call): Call
953 check_function_arguments instead of check_function_format.
955 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
957 * call.c (build_over_call), typeck.c (build_function_call): Update
958 calls to check_function_format.
960 2004-06-30 Richard Henderson <rth@redhat.com>
962 * call.c (build_over_call): Use __builtin_memcpy for copying
963 CLASS_AS_BASE rather than funny casting.
965 2004-06-30 Richard Henderson <rth@redhat.com>
967 * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
968 TYPE_SIZE_UNIT of full_type.
970 2004-06-30 Per Bothner <per@bothner.com>
972 Conditionally compile support for --enable-mapped_location.
973 * decl.c (pop_label): Handle (imperfectly) USE_MAPPED_LOCATION case.
974 * decl2.c: If USE_MAPPED_LOCATION, don't do some line number
975 adjustments - which I don't understand.
976 * error.c (dump_decl): Rename "<interrnal>" to "<built-in>".
977 * error.c: Use LOCATION_FILE and EXPR_LOCATION macros.
978 (print_instantiation_partial_context): Use expand_location.
979 * decl.c (duplicate_decl): Use new DECL_IS_BUILTIN macro.
980 * name-lookup.c: Likewise.
981 * lex.c (cxx_init): Likewise. Also use BUILTINS_LOCATION.
982 * name-lookup.c: Use input_line macro.
983 * parser.c (cp_lexer_get_preprocessor_token): Use UNKNOWN_LOCATION.
984 (cp_parser_statement): Rename locaal variable statement_locus to
985 statement_location and use SET_EXPR_LOCATION macro.
986 * pt.c: Handle USE_MAPPED_LOCATION case. Use new macros.
987 * tree.c (cp_walk_subtrees): Likewise.
989 2004-06-29 Per Bothner <per@bothner.com>
991 * tree.c (build_min_nt, build_min, build_min_non_dep):
992 Don't set TREE_COMPLEXITY from input_line.
994 2004-06-29 Paul Brook <paul@codesourcery.com>
996 * init.c: Include target.h.
997 (get_cookie_size): Remove and replace with target hook.
999 (build_new_1): Store the element size in the cookie.
1001 2004-06-29 Nathan Sidwell <nathan@codesourcery.com>
1004 * parser.c (cp_parser_template_declaration_after_export): Disable
1005 access checks here ...
1006 (cp_parser_class_specifier): ... not here.
1008 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1010 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
1011 VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
1012 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
1015 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1017 * cp-tree.h (struct deferred_access): Move to ...
1018 * semantics.c (struct deferred_access): ... here. Adjust.
1019 (deferred_access_stack): Make a VEC(deferred_access),
1020 (deferred_access_free_list): Remove.
1021 (deferred_access_no_check): New.
1022 (push_deferring_access_checks, resume_deferring_access_checks,
1023 stop_deferring_access_checks, pop_deferring_access_checks,
1024 get_deferred_access_checks, pop_to_parent_deferring_access_checks,
1025 perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
1027 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1030 * call.c (build_temp): Declare.
1031 (check_constructor_callable): New.
1032 (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
1033 CONSTRUCTOR_CALLABLE.
1034 (convert_like_real, initialize_reference): Use
1035 check_constructor_callable.
1036 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
1037 (LOOKUP_*): Renumber.
1039 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1041 * friend.c (add_friend): Only perform access checks when context
1043 * lex.c (cxx_make_type): Only create a binfo for aggregate types.
1044 * parser.c (cp_parser_class_specifier): Disable access checks here
1045 when parsing the body of a templated class.
1046 * semantics.c (perform_or_defer_access_checks): Reorder to allow
1047 NULL binfos when not checking access.
1049 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1051 Use vector API for vbase list.
1052 * cp-tree.h: Include vec.h
1053 (DEF_VEC_P (tree)): New type.
1054 (struct lang_type_class): Change vbase's member type.
1055 (binfo_for_vbase): Declare.
1056 * class.c (determine_primary_base, base_derived_from,
1057 update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
1058 warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
1059 build_vtbl_initializer): Adjust.
1060 * decl.c (xref_basetypes): Adjust, accumulate upper bound of
1062 * init.c (sort_mem_initializers, expand_member_init,
1063 push_base_cleanups): Adjust.
1064 * method.c (do_build_copy_constructor): Adjust.
1065 * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
1066 (binfo_for_vbase): New.
1067 * tree.c (copy_base_binfos): Adjust.
1069 2004-06-28 Mark Mitchell <mark@codesourcery.com>
1071 * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
1073 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
1076 * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
1077 paranthesis in case of pointers to array members.
1078 * error.c (dump_type_prefix): Likewise.
1079 (dump_type_suffix): Maybe issue a whitespace when printing
1082 2004-06-27 Mark Mitchell <mark@codesourcery.com>
1085 * parser.c (cp_parser_set_decl_spec_type): Refine test for
1086 redefinition of built-in types.
1088 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
1090 * error.c (pp_template_argument_list_start): Remove.
1091 (pp_template_argument_list_end): Likewise.
1092 (pp_separate_with_comma): Use pp_cxx_separate_with.
1093 (reinit_global_formatting_buffer): Remove.
1094 (pp_non_consecutive_character): Likewise.
1095 (dump_scope): Use pp_cxx_colon_colon.
1096 (dump_template_parameter): Use pp_cxx_identifier,
1097 pp_cxx_tree_identifier and pp_cxx_whitespace.
1098 (dump_templat_bindings): Replace use of pp_string with sequence
1099 of pp_cxx_whitespace and pp_equal.
1100 (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
1101 pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set
1103 (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
1104 (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace,
1105 pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
1106 (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
1107 pp_cxx_right_bracket, pp_cxx_identifier throughout,
1108 (dump_decl): Likewise.
1109 (dump_template_decl): Likewise.
1110 (dump_function_decl): Likewise. Set padding as appropriate.
1111 (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
1113 (dump_exception_spec): Likewise.
1114 (dump_function_name): Use pp_cxx_tree_identifier and
1116 (dump_template_parms): Use pp_cxx_begin_template_argument_list and
1117 pp_cxx_end_template_argument_list.
1118 (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
1119 pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
1120 pp_cxx_whitespace throughout.
1121 (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
1123 (dump_unary_op): Likewise.
1124 (reinit_cxx_pp): New function.
1125 (type_as_string); Use it.
1126 (expr_as_string): Likewise.
1127 (decl_as_string); Likewise.
1128 (context_as_string): Likewise.
1129 (lang_decl_name): Likewise.
1130 (decl_to_string): Likewise.
1131 (expr_to_string): Likewise.
1132 (parm_to_string): Likewise.
1133 (type_to_string): Likewise.
1134 (args_to_string): Likewise.
1135 (cv_to_string): Likewise.
1137 2004-06-26 Mark Mitchell <mark@codesourcery.com>
1139 * cp-tree.h (cp_cv_quals): New type.
1140 (cp_declarator): Use it instead of "tree" as appropriate.
1141 (grok_method_quals): Adjust prototype.
1142 (grokclassfn): Likewise.
1143 (do_friend): Likewise.
1144 * decl.c (grokfndecl): Use cp_cv_quals, not tree.
1145 (grokdeclarator): Likewise.
1146 * decl2.c (grok_method_quals): Likewise.
1147 (grokclassfn): Likewise.
1148 * friend.c (do_friend): Likewise.
1149 * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
1150 * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
1151 (make_pointer_declarator): Likewise.
1152 (make_reference_declarator): Likewise.
1153 (make_ptrmem_declarator): Likewise.
1154 (cp_parser_ptr_operator): Likewise.
1155 (cp_parser_cv_qualifier_seq_opt): Likewise.
1156 (cp_parser_cv_qualifier_opt): Remove.
1157 (cp_parser_new_declarator_opt): Adjust call to
1158 cp_parser_ptr_operator.
1159 (cp_parser_conversion_declaration_opt): Likewise.
1160 (cp_parser_declarator): Use cp_cv_quals, not tree.
1161 (cp_parser_direct_declarator): Likewise.
1163 2004-06-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1165 * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
1166 Rename DECL_STMT to DECL_EXPR.
1167 * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
1168 * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
1169 * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
1171 2004-06-26 Jan Hubicka <jh@suse.cz>
1174 * decl2.c (maybe_emit_vtables): Always import_export_vtable for the
1175 reachability analysis.
1177 2004-06-25 Mark Mitchell <mark@codesourcery.com>
1179 * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
1182 2004-06-25 Paul Brook <paul@codesourcery.com>
1184 * decl2.c (get_guard): Call targetm.cxx.guard_type.
1185 (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
1187 2004-06-24 Mark Mitchell <mark@codesourcery.com>
1189 * decl.c (grokdeclarator): Restore error messages about __thread.
1190 * parser.c (cp_parser_decl_specifier_seq): Likewise.
1192 2004-06-24 Jason Merrill <jason@redhat.com>
1195 * decl.c (grokparms): Give the PARM_DECL reference type if the
1196 parameter is passed by invisible reference.
1198 2004-06-24 Andreas Schwab <schwab@suse.de>
1200 * cp-tree.h (enum cp_storage_class): Remove trailing comma.
1202 2004-06-23 Mark Mitchell <mark@codesourcery.com>
1204 * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
1205 (cp/decl.o): Likewise.
1206 (cp/decl2.o): Likewise.
1207 (cp/pt.o): Likewise.
1208 (cp/semantics.o): Likewise.
1209 * config-lang.in (gtfiles): Do not reference cp/lex.h.
1210 * class.c: Do not include lex.h.
1211 (add_implicitly_declared_members): Do not use
1212 adding_implicit_members.
1213 (check_bases_and_members): Do not talk about grok_x_components.
1214 * cp/cp-tree.h (adding_implicit_members): Remove.
1215 (cp_storage_class): New type.
1216 (cp_decl_spec): Likewise.
1217 (cp_decl_specifier_seq): Likewise.
1218 (cp_parameter_declarator): Use it for the decl_specifiers field.
1219 (check_tag_decl): Adjust prototype.
1220 (shadow_tag): Likewise.
1221 (groktypename): Likewise.
1222 (start_decl): Likewise.
1223 (start_function): Likewise.
1224 (start_method): Likewise.
1225 (grok_x_components): Remove.
1226 (grokfield): Adjust prototype.
1227 (grokbitfield): Likewise.
1228 (finish_member_class_template): Remove.
1229 * decl.c: Do not include lex.h.
1230 (adding_implicit_members): Do not define.
1231 (check_tag_decl): Do not use trees to represent decl-specifiers.
1232 (shadow_tag): Likewise.
1233 (groktypename): Likewise.
1234 (start_decl): Likewise.
1235 (grokvardecl): Likewise.
1236 (grokdeclarator): Likewise.
1237 (grokparms): Likewise.
1238 (start_function): Likewise.
1239 (start_method): Likewise.
1240 * decl.h (grokdeclarator): Adjust prototype.
1241 * decl2.c: Do not include lex.h.
1242 (grok_x_components): Remove.
1243 (grokfield): Do not use trees to represent decl-specifiers.
1244 (grokbitfield): Likewise.
1245 * lex.c: Do not include lex.h.
1247 * parser.c: Include target.h.
1248 (clear_decl_specs): New function.
1249 (cp_parser_translation_unit): Do not use trees to represent
1251 (cp_parser_postfix_expression): Likewise.
1252 (cp_parser_new_type_id): Likewise.
1253 (cp_parser_condition): Likewise.
1254 (cp_parser_simple_declaration): Likewise.
1255 (cp_parser_decl_specifier_seq): Likewise.
1256 (cp_parser_function_specifier_opt): Likewise.
1257 (cp_parser_conversion_type_id): Likewise.
1258 (cp_parser_template_parameter): Likewise.
1259 (cp_parser_explicit_instantiation): Likewise.
1260 (cp_parser_type_specifier): Likewise.
1261 (cp_parser_simple_type_specifier): Likewise.
1262 (cp_parser_init_declarator): Likewise.
1263 (cp_parser_type_id): Likewise.
1264 (cp_parser_type_specifier_seq): Likewise.
1265 (cp_parser_parameter_declaration): Likewise.
1266 (cp_parser_member_declaration): Likewise.
1267 (cp_parser_exception_declaration): Likewise.
1268 (cp_parser_function_definition_from_specifiers_and_declarator):
1270 (cp_parser_single_declaration): Likewise.
1271 (cp_parser_save_member_function_body): Likewise.
1272 (cp_parser_friend_p): Likewise.
1273 (cp_parser_set_storage_class): New function.
1274 (cp_parser_set_decl_spec_type): Likewise.
1275 * pt.c: Do not include lex.h.
1276 * semantics.c: Likewise.
1277 (finish_member_class_template): Remove.
1279 2004-06-23 Roger Sayle <roger@eyesopen.com>
1281 * call.c (build_cxx_call): Don't call expand_tree_builtin. No
1282 longer take both "args" and "convert_args" as arguments.
1283 (build_op_delete_call): Update call to build_cxx_call.
1284 (build_over_call): Likewise, update call to build_cxx_call.
1285 * cp-tree.h (build_cxx_call): Update funtion prototype.
1286 * typeck.c (build_function_call): Don't call expand_tree_builtin.
1287 * rtti.c (throw_bad_cast): Update call to build_cxx_call.
1288 (throw_bad_typeid): Likewise.
1289 (build_dynamic_cast_1): Likewise.
1291 2004-06-22 Richard Henderson <rth@redhat.com>
1293 * class.c (build_vfn_ref): Take a pointer not object. Build
1295 (cp_fold_obj_type_ref): New.
1296 * call.c (build_over_call): Update build_vfn_ref call.
1297 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
1298 * cp-tree.h (cp_fold_obj_type_ref): Declare.
1300 2004-06-21 Jason Merrill <jason@redhat.com>
1303 * cp-gimplify.c (cp_gimplify_init_expr): Look through
1306 2004-06-21 Mark Mitchell <mark@codesourcery.com>
1308 * cp-tree.def (NEW_EXPR): Add a fourth slot.
1309 * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
1310 (TREE_PARMLIST): Likewise.
1311 (CALL_DECLARATOR_PARMS): Likewise.
1312 (CALL_DECLARATOR_QUALS): Likewise.
1313 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
1314 (cp_declarator_kind): New type.
1315 (cp_parameter_declarator): Likewise.
1316 (cp_declarator): Likewise.
1317 (cp_error_declarator): Likewise.
1318 (no_parameters): Likewise.
1319 (groktypename): Change prototype.
1320 (start_decl): Likewise.
1321 (start_handler_parms): Likewise.
1322 (get_scope_of_declarator): Likewise.
1323 (start_function): Likewise.
1324 (start_preparsed_function): New function.
1325 (start_function): Change prototype.
1326 (start_method): Likewise.
1327 (grokfield): Likewise.
1328 (grokbitfield): Likewise.
1329 (build_new): Likewise.
1330 (make_pointer_declarator): Remove.
1331 (make_reference_declarator): Likewise.
1332 (make_call_declarator): Likewise.
1333 (set_quals_and_spec): Likewise.
1334 (process_template_parm): Change prototype.
1335 (begin_function_definition): Remove.
1336 (finish_parmlist): Remove.
1337 * decl.c (groktypename): Do not use trees to represent
1339 (start_decl): Likewise.
1340 (start_handler_parms): Remove.
1341 (get_scope_of_declarator): Reimplement.
1342 (grokdeclarator): Do not use trees to represent declarators.
1343 (grokparms): Likewise.
1344 (start_function): Likewise.
1345 (start_method): Likewise.
1346 (build_void_list_mode): Do not use TREE_PARMLIST.
1347 * decl.h (grokdeclarator): Change prototype.
1348 * decl2.c (grok_method_quals): Robustify.
1349 (grok_x_components): Do not use trees to represent declarators.
1350 (grokfield): Likewise.
1351 (grokbitfield): Likewise.
1352 (start_objects): Build FUNCTION_DECLs, not declarators.
1353 (start_static_storage_duration_function): Likewise.
1354 * init.c (build_new): Simplify.
1355 * lex.c (make_pointer_declarator): Remove.
1356 (make_reference_declarator): Likewise.
1357 (make_call_declarator): Likewise.
1358 (set_quals_and_spec): Likewise.
1359 * method.c (use_thunk): Use start_preparsed_function.
1360 (synthesize_method): Likewise.
1361 (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
1362 * optimize.c (maybe_clone_body): Use start_preparsed_function.
1363 * parser.c (cp_error_declarator): New variable.
1364 (declarator_obstack): Likewise.
1365 (alloc_declarator): New function.
1366 (make_declarator): Likewise.
1367 (make_id_declarator): Likewise.
1368 (make_pointer_declarator): Likewise.
1369 (make_reference_declarator): Likewise.
1370 (make_ptrmem_declarator): Likewise.
1371 (make_call_declarator): Likewise.
1372 (make_array_declarator): Likewise.
1373 (no_parameters): New variable.
1374 (make_parameter_declarator): Likewise.
1375 (cp_parser_check_for_definition_in_return_type): Do not use trees
1376 to represent declarators.
1377 (cp_parser_translation_unit): Likewise.
1378 (cp_parser_new_expression): Likewise.
1379 (cp_parser_new_type_id): Likewise.
1380 (cp_parser_new_declarator_opt): Likewise.
1381 (cp_parser_direct_new_declarator): Likewise.
1382 (cp_parser_condition): Likewise.
1383 (cp_parser_declaration_statement): Likewise.
1384 (cp_parser_declaration): Likewise.
1385 (cp_parser_conversion_type_id): Likewise.
1386 (cp_parser_conversion_declarator_opt): Likewise.
1387 (cp_parser_template_parameter_list): Likewise.
1388 (cp_parser_template_parameter): Likewise.
1389 (cp_parser_explicit_instantiation): Likewise.
1390 (cp_parser_init_declarator): Likewise.
1391 (cp_parser_declarator): Likewise.
1392 (cp_parser_direct_declarator): Likewise.
1393 (cp_parser_type_id): Likewise.
1394 (cp_parser_parameter_declaration_clause): Likewise.
1395 (cp_parser_parameter_declaration_list): Likewise.
1396 (cp_parser_parameter_declaration): Likewise.
1397 (cp_parser_member_declaration): Likewise.
1398 (cp_parser_exception_declaration): Likewise.
1399 (cp_parser_check_declarator_template_parameters): Likewise.
1400 (cp_parser_function_definition_from_specifiers_and_declarator):
1402 (cp_parser_save_member_function_body): Likewise.
1403 * pt.c (process_template_parm): Add is_non_type parameter.
1404 (convert_template_argument): Adjust call to groktypename.
1405 (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
1406 (tsubst): Do not expect declarators.
1407 (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
1409 (instantiate_decl): Use start_preparsed_function.
1410 * semantics.c (begin_function_definition): Remove.
1411 (finish_parmlist): Remove.
1412 * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
1415 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1417 * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
1418 (build_new_method_call): Likewise.
1419 * decl.c (local_variable_p_walkfn): Don't walk into types.
1420 * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
1421 (build_anon_union_vars): Add new operand for COMPONENT_REF.
1422 * init.c (buld_new): Add new operand for ARRAY_REF.
1423 * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
1424 (do_build_assign_ref): Likewise.
1425 * parser.c (cp_parser_direct_new_declarator): Add new operands
1427 (cp_parser_direct_declarator): Likewise.
1428 * pt.c (tsubst): Likewise.
1429 (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
1431 * semantics.c (finish_non_static_data_member): Add new operand
1433 * typeck.c (build_class_member_access_expr): Likewise.
1434 (build_class_member_access_expr, finish_class_member_access_expr):
1436 (build_ptrmemfunc_access_expr): Likewise.
1437 (build_array_ref): Add new operands for ARRAY_REF.
1438 * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
1439 * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
1441 2004-06-21 Richard Henderson <rth@redhat.com>
1443 * dump.c (cp_dump_tree): Don't use dump_next_stmt.
1444 * parser.c (cp_parser_jump_statement): Update commentary.
1445 * pt.c (tsubst_expr): Use RETURN_EXPR.
1446 * semantics.c (finish_return_stmt): Likewise.
1447 (finalize_nrv_r): Likewise.
1448 * typeck.c, typeck2.c: Update file start commentary.
1450 2004-06-21 Richard Henderson <rth@redhat.com>
1452 * semantics.c (finish_expr_stmt): Call verify_sequence_points.
1454 2004-06-20 Richard Henderson <rth@redhat.com>
1456 * cp-tree.h (add_decl_stmt): Declare.
1457 * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
1458 * semantics.c (maybe_cleanup_point_expr): New.
1459 (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
1460 finish_for_expr, finish_switch_cond): Use it.
1461 (finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN.
1463 2004-06-20 Richard Henderson <rth@redhat.com>
1465 * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
1466 * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
1467 (cp_gimplify_expr): Call it.
1468 (gimplify_cleanup_stmt): Move from c-gimplify.c.
1469 (cp_genericize): New.
1470 * decl.c (finish_function): Call it.
1471 * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
1472 (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
1473 (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
1474 (cp_genericize): Declare.
1475 * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
1476 * dump.c (cp_dump_tree): Likewise.
1477 * semantics.c (push_cleanup): Move from c-semantics.c.
1479 2004-06-20 Zack Weinberg <zack@codesourcery.com>
1481 * cp-lang.c (has_c_linkage): Implement.
1483 * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
1484 * decl.c (duplicate_decls): Use COPY_DECL_RTL.
1485 (builtin_function_1): Don't call make_decl_rtl.
1486 (build_cp_library_fn): Don't call set_mangled_name_for_decl.
1487 (grokvardecl): Don't call mangle_decl.
1488 * except.c (nothrow_libfn_p): Look at DECL_NAME, not
1489 DECL_ASSEMBLER_NAME.
1490 * method.c (set_mangled_name_for_decl): Delete.
1491 * name-lookup.c (pushdecl): When a local extern shadows a
1492 file-scope declaration of the same object, give both DECLs the
1494 * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
1495 on DECL_ASSEMBLER_NAME.
1497 2004-06-19 Richard Henderson <rth@redhat.com>
1499 * cp-gimplify.c: Remove unnecessary prototypes.
1500 (cp_gimplify_stmt): Merge into ...
1501 (cp_gimplify_expr): ... here. Move to end of file. Handle
1502 stmts_are_full_exprs_p frobbing.
1503 * cp-tree.h (cp_gimplify_stmt): Remove.
1504 * pt.c (tsubst_expr): Merge prep_stmt and unify.
1505 * tree.c (init_tree): Don't set lang_gimplify_stmt.
1507 2004-06-18 Richard Henderson <rth@redhat.com>
1510 * semantics.c (begin_cond): New.
1511 (finish_cond): Rewrite to handle template DECL_STMTs specially.
1512 Assume that non-template decls go land before the conditional.
1513 (simplify_loop_decl_cond): Likewise.
1514 (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
1515 finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
1516 begin_switch_stmt, finish_switch_cond): Update to match.
1518 2004-06-17 Jason Merrill <jason@redhat.com>
1521 * semantics.c (simplify_aggr_init_expr): Don't return the slot.
1522 (finish_stmt_expr_expr): Update type after conversions.
1523 (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
1524 Handle void initializer.
1525 * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
1527 2004-06-17 Geoffrey Keating <geoffk@apple.com>
1529 * class.c (build_clone): Don't call defer_fn, let mark_used do it.
1530 * cp-tree.h (defer_fn): Delete.
1531 * decl2.c (defer_fn): Delete.
1532 (finish_file): Simplify deferred_fns loops; check that
1533 only used inline functions get into deferred_fns.
1534 (mark_used): Inline previous contents of defer_fn.
1536 2004-06-16 Richard Henderson <rth@redhat.com>
1538 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
1539 (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
1540 * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
1541 of CTOR_INITIALIZER ...
1542 (pp_cxx_statement): ... here.
1543 * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
1544 (finish_function): Use alloc_stmt_list to zap entire function.
1545 * parser.c (cp_parser_compound_statement): Update commentary.
1546 * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
1547 * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
1548 (finish_stmt_expr): Don't look through COMPOUND_STMT.
1550 2004-06-16 Geoffrey Keating <geoffk@apple.com>
1552 * pt.c (mark_decl_instantiated): Don't call defer_fn.
1554 2004-06-16 Richard Henderson <rth@redhat.com>
1556 * parser.c (cp_parser_labeled_statement): Update commentary.
1557 * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
1558 * tree.c (mark_local_for_remap_r): Likewise.
1560 2004-06-16 Richard Henderson <rth@redhat.com>
1562 * parser.c (cp_parser_asm_definition): Update commentary.
1563 * pt.c (tsubst_expr): Use ASM_EXPR.
1564 * semantics.c (finish_asm_stmt): Likewise.
1566 2004-06-16 Richard Henderson <rth@redhat.com>
1568 * decl.c (finish_destructor_body): Use LABEL_EXPR.
1569 * parser.c (cp_parser_statement): Update commentary.
1570 * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
1571 * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
1572 * tree.c (mark_local_for_remap_r): Likewise.
1574 2004-06-16 Richard Henderson <rth@redhat.com>
1577 * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
1578 statement in FOR_INIT_STMT for templates.
1580 2004-06-15 Richard Henderson <rth@redhat.com>
1582 * call.c (initialize_reference): Don't build CLEANUP_STMT here.
1583 * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
1584 (genericize_try_block): Use gimplify_stmt.
1585 (genericize_catch_block, genericize_eh_spec_block): Likewise.
1586 (cp_gimplify_init_expr): Remove STMT_EXPR special case.
1587 (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
1588 * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
1589 (cp_tree_chain_matters_p): Remove.
1590 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
1591 (COMPOUND_STMT_BODY_BLOCK): New.
1592 (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
1593 (EXPR_STMT_STMT_EXPR_RESULT): New.
1594 (building_stmt_tree): Check cur_stmt_list.
1595 (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
1596 (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
1597 * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
1598 (cp_finish_decl): Use push_cleanup.
1599 (start_function, finish_function): Use statement lists.
1600 (finish_stmt): Do nothing.
1601 * except.c (begin_eh_spec_block): Use statement lists.
1602 (check_handlers_1, check_handlers): Likewise.
1603 * init.c (construct_virtual_base): Don't add extra compound stmts.
1604 (build_vec_init): Likewise.
1605 * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
1606 * name-lookup.h (struct cp_binding_level): Add statement_list.
1607 * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
1608 (cp_parser_labeled_statement, cp_parser_expression_statement,
1609 cp_parser_statement_seq_opt): Likewise.
1610 (cp_parser_compound_statement): Likewise. Take bool for try block.
1611 (cp_parser_selection_statement): Tidy if processing.
1612 (cp_parser_already_scoped_statement): Rewrite to do what it says.
1613 * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
1614 (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST.
1615 Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
1616 * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
1617 (finish_cond): New, rewritten from FINISH_COND.
1618 (simplify_loop_decl_cond): New.
1619 (finish_expr_stmt): Avoid nested EXPR_STMTs.
1620 (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
1621 begin_else_clause, finish_else_clause, finish_if_stmt,
1622 begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
1623 begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
1624 finish_for_cond, finish_for_stmt, begin_switch_stmt,
1625 finish_switch_cond, finish_switch_stmt, begin_try_block,
1626 finish_try_block, finish_cleanup_try_block, finish_function_try_block,
1627 finish_handler_sequence, finish_function_handler_sequence,
1628 begin_handler, finish_handler_parms, finish_handler,
1629 begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
1630 using statement lists.
1631 (begin_compound_stmt): Replace has_no_scope argument with flags.
1632 Update all callers. Use statement lists.
1633 (finish_compound_stmt): Likewise.
1634 (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
1635 (current_scope_stmt_stack): Remove.
1636 (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
1637 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
1638 Rewrite with statement lists.
1640 2004-06-15 Alexandre Oliva <aoliva@redhat.com>
1642 * parser.c: Change all assignments of c_lex_string_translate
1643 to true and false to 1 and 0.
1644 (cp_lexer_read_token): Convert type of the translated string.
1645 (cp_parser_skip_to_closing_parentheses): Preserve original
1646 value of c_lex_string_translate, and set it to -1 while
1648 (cp_parser_cache_group): Likewise.
1649 (cp_parser_cache_group_1): Renamed.
1650 (cp_parser_asm_operand_list): Remove redundant setting of
1651 c_lex_string_translate.
1652 (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
1653 Handle chained strings.
1655 2004-06-12 Andrew Pinski <apinski@apple.com>
1659 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
1661 * cp-tree.h: Fix typo.
1663 * cp-tree.h: Include cgraph.h
1664 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
1665 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
1667 2004-06-12 Jason Merrill <jason@redhat.com>
1669 PR tree-optimization/14107
1670 * decl.c (finish_function): Warn about no return in all functions.
1672 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
1674 * cp-tree.h (struct language_function): Remove cannot_inline.
1675 * decl.c (save_function_data): cannot_inline is no more.
1676 (cxx_push_function_context): Likewise.
1677 * decl2.c (start_objects, start_static_storage_duration_function):
1678 Reset DECL_INLINE, set DECL_UNINLINABLE.
1680 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1683 * search.c (lookup_field): Propagate the ambiguity list.
1684 (lookup_fnfields): Likewise.
1686 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1689 * parser.c (cp_parser_template_name): Ctors/dtors never need a
1690 template keyword to disambiguate.
1692 2004-06-14 Mark Mitchell <mark@codesourcery.com>
1695 * decl.c (grokdeclarator): Ignore pointer-to-members when
1696 computing template depth.
1699 * name-lookup.c (pushtag): Do not try to put class declarations in
1700 explicit specialization scopes.
1702 2004-06-11 Andrew Pinski <pinskia@physics.uc.edu>
1704 * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
1706 2004-06-11 Mark Mitchell <mark@codesourcery.com>
1709 * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
1710 bindings for undeclared built-ins.
1712 2004-06-11 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1714 * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
1715 appear at the correct location.
1717 2004-06-10 Jason Merrill <jason@redhat.com>
1721 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1722 * init.c (build_offset_ref): Build SCOPE_REF with non-null
1723 TREE_TYPE for non-dependent names.
1724 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
1725 unknown_type_node as its TREE_TYPE.
1726 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
1727 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
1728 (dump_expr) <SCOPE_REF case>: Likewise.
1730 2004-06-10 Mark Mitchell <mark@codesourcery.com>
1733 * parser.c (cp_parser_direct_declarator): Robustify.
1736 * pt.c (tsubst_copy): Use decl_constant_value on enumeration
1737 constants in non-dependent contexts.
1741 * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
1744 2004-06-10 Jakub Jelinek <jakub@redhat.com>
1747 * decl.c (duplicate_decls): Handle fileptr_type_node arguments
1750 2004-06-09 Mark Mitchell <mark@codesourcery.com>
1754 2004-06-07 Mark Mitchell <mark@codesourcery.com>
1755 * lex.c (handle_pragma_interface): Deprecate.
1756 (handle_pragma_implementation): Likewise.
1758 2004-06-09 Andrew Pinski <pinskia@physics.uc.edu>
1760 * g++spec.c (lang_specific_driver): Remove check for -lm
1761 and -lmath when check it see if it was the math library.
1763 2004-06-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1766 * parser.c (cp_parser_direct_declarator): Reject constructor named
1767 as qualified template-id.
1769 2004-06-07 Mark Mitchell <mark@codesourcery.com>
1772 * lex.c (handle_pragma_interface): Deprecate.
1773 (handle_pragma_implementation): Likewise.
1775 2004-06-07 Mark Mitchell <mark@codesourcery.com>
1778 * parser.c (cp_parser_iteration_statement): Fix typo in error
1782 * pt.c (tsubst_default_argument): Do not defer access checks
1783 while substituting into the default argument.
1786 * pt.c (tsubst_copy): Do not try to substitute for an enumeration
1787 constant in a non-dependent context.
1790 * except.c (build_throw): Ensure that temp_expr has been
1793 2004-06-06 Roger Sayle <roger@eyesopen.com>
1795 * cp/cp-tree.h (lvalue_or_else): Add function prototype.
1797 2004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1800 * parser.c (cp_parser_mem_initializer_id): Gracefully reject
1801 'typename', and accept 'template'.
1803 2004-06-03 Andrew Pinski <pinskia@physics.uc.edu>
1804 Jan Hubicka <jh@suse.cz>
1807 * method.c (use_think): Do not mark thunk as referenced.
1809 2004-06-03 Matt Austern <austern@apple.com>
1812 * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
1813 is nonzero, and if we see a noninline definition of a key method,
1814 make the vtables nonweak.
1816 2004-06-02 Matt Austern <austern@apple.com>
1818 * cp-tree.h (instantiate_decl): new boolean parameter,
1819 undefined_ok. Current behavior is equivalent to its being 0.
1820 * decl2.c (mark_used): Add new argument when calling instantiate_decl
1821 * pt.c (mark_decl_instantiated): Unconditionally make
1822 instantiations explicit unconditionally
1823 (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
1824 since mark_decl_instantiated now does it.
1825 (instantiate_class_member): New. Instantiate a member of an
1826 explicitly instantiated class template.
1827 (do_type_instantiation): Explicitly instantiate members of an
1828 explicitly instantiated class template.
1829 (instantiate_decl): if undefined_ok is nonzero, and if we're
1830 trying to explicitly instantiated a template with no definition,
1831 change it to an implicit instantiation.
1832 (instantiate_pending_templates): Add new argument to instantiate_decl.
1833 * tree.c (cp_cannot_inline_tree_fn): Likewise.
1835 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
1837 * cp-tree.h: Fix typo.
1839 * cp-tree.h: Include cgraph.h
1840 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
1841 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
1843 2004-06-01 Jason Merrill <jason@redhat.com>
1846 * call.c (call_builtin_trap): Remove type parm.
1847 (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
1848 (build_x_va_arg): Dereference a null pointer for a non-POD argument.
1850 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1853 * init.c (build_offset_ref): Build SCOPE_REF with non-null
1854 TREE_TYPE for non-dependent names.
1855 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
1856 unknown_type_node as its TREE_TYPE.
1857 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
1858 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
1859 (dump_expr) <SCOPE_REF case>: Likewise.
1861 2004-06-01 Richard Henderson <rth@redhat.com>
1862 Andrew Pinski <pinskia@physics.uc.edu>
1864 * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
1865 * parser.c (struct cp_parser): Remove in_offsetof.
1866 (cp_parser_new): Don't set it.
1867 (cp_parser_unary_expression): Don't check it.
1868 (cp_parser_postfix_open_square_expression): Split out from ...
1869 (cp_parser_postfix_expression): ... here.
1870 (cp_parser_postfix_dot_deref_expression): Likewise.
1871 (cp_parser_builtin_offsetof): New.
1872 (cp_parser_primary_expression): Use it.
1874 2004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1877 * parser.c (cp_parser_postfix_expression): Allow subscript
1878 operator in offsetof.
1880 2004-05-31 Mark Mitchell <mark@codesourcery.com>
1883 * friend.c (add_friend): Do not try to perform access checks for
1884 functions from dependent classes.
1886 2004-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
1888 * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
1889 (pp_cxx_begin_template_argument_list): Turn into a function.
1890 (pp_cxx_end_template_argument_list): Likewise.
1891 (pp_cxx_separate_with): Define.
1892 (pp_cxx_unqualified_id): Tidy.
1893 (pp_cxx_primary_expression): Likewise.
1894 (pp_cxx_postfix_expression): Likewise.
1895 (pp_cxx_expression): Likewise.
1896 (pp_cxx_simple_type_specifier): Likewise.
1897 (pp_cxx_type_specifier_seq): Likewise.
1898 (pp_cxx_parameter_declaration_clause): Likewise.
1899 (pp_cxx_exception_specification): Likewise.
1900 (pp_cxx_direct_declarator): Likewise.
1901 (pp_cxx_type_id): Likewise.
1902 * cxx-pretty-print.h (pp_cxx_whitespace): Export from
1904 (pp_cxx_left_paren): Likewise.
1905 (pp_cxx_right_paren): Likewise.
1906 (pp_cxx_left_brace): Likewise.
1907 (pp_cxx_right_brace): Likewise.
1908 (pp_cxx_left_bracket): Likewise.
1909 (pp_cxx_right_bracket): Likewise.
1910 (pp_cxx_dot): Likewise.
1911 (pp_cxx_identifier): Likewise.
1912 (pp_cxx_tree_identifier): Likewise.
1913 (pp_cxx_ampersand): New macro.
1914 (pp_cxx_star): Likewise.
1915 (pp_cxx_arrow): Likewise.
1916 (pp_cxx_semicolon): Likewise.
1917 (pp_cxx_complement): Likewise.
1918 (pp_cxx_begin_template_argument_list): Declaree.
1919 (pp_cxx_end_template_argument_list): Likewise.
1920 (pp_cxx_colon_colon): likewise.
1922 2004-05-31 Eric Botcazou <ebotcazou@libertysurf.fr>
1924 * parser.c (cp_parser_simple_type_specifier): Explicitly test
1927 2004-05-31 Kazu Hirata <kazu@cs.umass.edu>
1929 * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
1930 typeck.c: Fix comment formatting.
1932 2004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
1934 * cp-lang.c (cp_expand_decl): Remove.
1935 (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
1937 2004-05-30 Andreas Jaeger <aj@suse.de>
1939 * lang-specs.h: Add missing initializers for .ii.
1941 2004-05-28 Aldy Hernandez <aldyh@redhat.com>
1943 * decl.c (cp_make_fname_decl): Free return value from
1946 2004-05-28 Mark Mitchell <mark@codesourcery.com>
1949 * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
1951 * init.c (build_new): Likewise.
1954 * name-lookup.c (arg_assoc): Robustify.
1957 * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
1958 when determining the scope to use for a pointer to member.
1959 (lookup_anon_field): Give it external linkage.
1960 * cp-tree.h (lookup_anon_field): Declare it.
1961 * expr.c (cplus_expand_constant): Use it.
1963 2004-05-28 Mark Mitchell <mark@codesourcery.com>
1966 * parser.c (cp_parser_simple_type_specifier): Call
1967 maybe_note_name_used_in_class.
1969 2004-05-28 Tom Marshall <tmarshall@real.com>
1972 * class.c (finish_struct_1): Warn only if the dtor is non-private or
1973 the class has friends.
1975 2004-05-27 Adam Nemet <anemet@lnxw.com>
1978 * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
1979 TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
1981 2004-05-24 Geoffrey Keating <geoffk@apple.com>
1983 * method.c (implicitly_declare_fn): Don't call defer_fn; abort
1984 if it might be needed.
1985 * pt.c (mark_decl_instantiated): Only call defer_fn if
1986 the function actually needs processing in finish_file.
1987 * decl2.c (finish_file): Add check that elements in
1988 deferred_fns_used are really needed there. Remove unnecessary
1989 test of DECL_SAVED_TREE.
1991 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
1993 * Make-lang.in: No need to specify $(LIBCPP).
1995 2004-05-23 Mark Mitchell <mark@codesourcery.com>
1998 * parser.c (cp_parser_class_head): Robustify.
2001 * parser.c (cp_parser_decl_specifier_seq): Correct error in
2003 (cp_parser_constructor_declarator_p): Treat attributes
2007 * typeck.c (build_unary_op): Do not attempt to resolve casts to
2008 base classes in templates.
2010 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2013 * pt.c (instantiate_template): Robustify.
2015 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2018 * decl.c (xref_tag): Issue errors about redeclaring template
2019 classes as non-template classes.
2021 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2024 * name-lookup.c (supplement_binding): Allow redefinitions of
2028 * parser.c (cp_parser_template_argument): Robustify.
2030 2004-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
2032 * class.c (alter_access): Use %E format specifier to print an
2033 identifier node. Avoid looking at the IDENTIFIER_POINTER.
2034 (push_lang_context): Likewise.
2035 * decl.c (lookup_label): Likewise.
2036 (grokdeclarator): Likewise.
2037 * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
2038 * pt.c (do_type_instantiation): Likewise.
2039 * tree.c (handle_java_interface_attribute): Likewise.
2040 (handle_com_interface_attribute): Likewise.
2041 (handle_init_priority_attribute): Likewise.
2043 2004-05-22 Mark Mitchell <mark@codesourcery.com>
2047 * pt.c (build_non_dependent_expr): Expand the set of tree nodes
2048 recognized as overloaded functions.
2050 2004-05-22 Mark Mitchell <mark@codesourcery.com>
2053 * class.c (layout_nonempty_base_or_field): Do not try to avoid
2054 layout conflicts for unions.
2057 * typeck.c (build_x_unary_op): Instantiate template class
2058 specializations before looking for "operator &".
2061 * typeck.c (complete_type): Layout non-dependent array types, even
2065 * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
2068 2004-05-22 Roger Sayle <roger@eyesopen.com>
2070 * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
2071 returning when TREE_TYPE is error_mark_node.
2072 * typeck.c (require_complete_type): Return error_mark_node if
2073 value's type is an error_mark_node.
2075 2004-05-20 Andrew Pinski <pinskia@physics.uc.edu>
2077 * optimize.c (calls_setjmp_r): Remove.
2078 (calls_setjmp_p): Remove.
2079 * cp-tree.c (calls_setjmp_p): Remove.
2080 * decl.c (finish_function): Do not call calls_setjmp_p.
2082 2004-05-18 Zack Weinberg <zack@codesourcery.com>
2084 * decl.c (cp_finish_decl): Use mark_decl_referenced.
2085 * decl2.c (maybe_make_one_only): Likewise.
2086 * method.c (use_thunk): Likewise.
2088 2004-05-18 Jason Merrill <jason@redhat.com>
2090 * class.c (build_base_path): Tidy a bit.
2092 2004-05-14 Geoffrey Keating <geoffk@apple.com>
2094 * name-lookup.c (struct scope_binding): New.
2095 (EMPTY_SCOPE_BINDING): New.
2096 (lookup_using_namespace): Take a scope_binding instead of a
2098 (qualified_lookup_using_namespace): Likewise.
2099 (cxx_binding_clear): Delete.
2100 (do_nonmember_using_decl): Use a scope_binding instead of a
2102 (lookup_tag): Don't call select_decl.
2103 (ambiguous_decl): Don't return anything (and change callers to match).
2104 Take a scope_binding as the second parameter.
2105 (lookup_namespace_name): Use a scope_binding instead of a
2107 (unqualified_namespace_lookup): Likewise.
2108 (lookup_qualified_name): Likewise.
2109 (select_decl): Take a scope_binding instead of a cxx_binding.
2110 Use macros rather than hand-coding tests for type-ness.
2112 2004-05-13 Diego Novillo <dnovillo@redhat.com>
2114 * cp-gimplify.c: Rename from cp-simplify.c.
2115 * Make-lang.in, optimize.c: Update.
2117 2004-05-13 Diego Novillo <dnovillo@redhat.com>
2119 Merge from tree-ssa-20020619-branch. See
2120 ChangeLog.tree-ssa for details.
2122 * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
2123 cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
2124 expr.c, init.c, name-lookup.h, optimize.c, parser.c,
2125 pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
2127 * cp-mudflap.c: New file.
2128 * cp-simplify.c:: New file.
2130 2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2133 * decl2.c (check_classfn): For member templates, compare also the
2134 template parameters to match the declaration.
2135 * cp-tree.h: Adjust declaration of check_classfn.
2136 * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
2137 * friend.c (do_friend): Likewise.
2138 * pt.c (tsubst_friend_function): Likewise.
2140 2004-05-01 Zack Weinberg <zack@codesourcery.com>
2142 * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
2143 Instead, dig into the representation type to find the array bound.
2145 2004-04-30 Jason Merrill <jason@redhat.com>
2147 Refer to base members using COMPONENT_REFs where possible.
2148 * class.c (build_simple_base_path): New fn.
2149 (build_base_path): Use it for non-virtual base references.
2150 (layout_class_type): Change base fields to their real type
2151 after layout is done.
2152 * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
2153 * cp-lang.c (cxx_get_alias_set): Use it.
2155 2004-04-30 Kazu Hirata <kazu@cs.umass.edu>
2157 * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
2160 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2163 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
2164 used in integral constant expressions.
2166 2004-04-22 Mark Mitchell <mark@codesourcery.com>
2168 * init.c (build_aggr_init): Fix accidental use of C99 construct in
2171 * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
2173 * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
2174 * decl.c (reshape_init): Use it.
2175 * init.c (perform_member_init): Remove redundant condition.
2176 (build_aggr_init): Adjust to handle brace-enclosed initializers
2178 (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
2180 * parser.c (cp_parser_initializer_clause): Do not set
2181 TREE_HAS_CONSTRUCTOR on the initializer.
2182 * rtti.c (tinfo_base_init): Likewise.
2183 (generic_initializer): Likewise.
2184 (ptr_initializer): Likewise.
2185 (ptm_initializer): Likewise.
2186 (class_initializer): Likewise.
2187 (get_pseudo_ti_init): Likewise.
2188 * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
2190 2004-04-22 Alan Modra <amodra@bigpond.net.au>
2192 * name-lookup.c (anonymous_namespace_name): Make static.
2194 2004-04-19 Roger Sayle <roger@eyesopen.com>
2197 * class.c (build_base_path): Call fold whilst building the NULL
2198 pointer check expression trees.
2200 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
2202 * init.c (build_new_1): Don't use type size argument for Java
2203 _Jv_AllocObject call.
2205 2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
2207 * method.c (make_alias_for_thunk): Remove preprocessor guard on
2208 declaration and definition.
2210 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
2213 * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
2214 than ASM_OUTPUT_DEF.
2216 2004-04-08 Jakub Jelinek <jakub@redhat.com>
2218 * decl2.c (mark_used): Don't segfault if cfun != NULL but
2219 current_function_decl == NULL.
2221 2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
2224 * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
2227 2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2229 * init.c (decl_constant_value): Don't look at DECL_INITIAL
2231 * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
2232 or TREE_SIDE_EFFECTS of a type.
2234 2004-04-02 Nathan Sidwell <nathan@codesourcery.com>
2237 * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
2238 cv-qualifier unification.
2239 * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
2241 2004-04-02 Jan Hubicka <jh@suse.cz>
2243 * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
2244 * cp-tree.h (cp_update_decl_after_saving): Declare.
2245 * tree.c (cp_update_decl_after_saving): Define.
2247 2004-04-01 Mark Mitchell <mark@codesourcery.com>
2250 * typeck.c (get_delta_difference): Call fold before returning the
2253 2004-04-01 Richard Henderson <rth@redhat.com>
2256 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
2257 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
2259 2004-04-01 Mark Mitchell <mark@codesourcery.com>
2262 * name-lookup.c (maybe_push_cleanup_level): Robustify.
2264 2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2266 * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
2268 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2270 * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
2271 * class.c (check_bitfield_decl): Likewise.
2272 * cvt.c (type_promotes_to): Likewise.
2273 * decl.c (finish_enum): Likewise.
2274 * mangle.c (write_builtin_type): Likewise.
2275 * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
2276 * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
2277 (build_binary_op): Likewise.
2279 2004-03-31 Jan Hubicka <jh@suse.cz>
2281 * tree.h (optimize_function): Kill prototype.
2282 * optimize.c (dump_function, optimize_function, dump_finction): Kill.
2283 * semantics.c (expand_body): Kill.
2285 2004-03-30 Mark Mitchell <mark@codesourcery.com>
2288 * decl.c (start_decl_1): Do not decide whether or not to create a
2289 new cleanup level until after the type has been completed.
2292 * pt.c (tsubst_default_argument): Clear current_function_decl.
2294 2004-03-30 Zack Weinberg <zack@codesourcery.com>
2296 * name-lookup.c, parser.c: Use new shorter form of GTY markers.
2298 2004-03-29 Zack Weinberg <zack@codesourcery.com>
2300 * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
2301 is null, just print the literal name and return.
2303 2004-03-25 Kazu Hirata <kazu@cs.umass.edu>
2305 * cxx-pretty-print.c: Fix comment typos.
2307 2004-03-24 Kazu Hirata <kazu@cs.umass.edu>
2309 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
2312 2004-03-23 Ziemowit Laski <zlaski@apple.com>
2314 * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
2315 * mangle.c (write_type): Add call to 'mangle_fundamental_type'
2318 2004-03-23 Zack Weinberg <zack@codesourcery.com>
2320 PR 12267, 12391, 12560, 13129, 14114, 14133
2321 * cp-lang.c (c_reset_state): Delete.
2322 (push_file_scope, pop_file_scope): New stubs.
2323 * parser.c (c_parse_file): Call sorry() here if called more than once.
2325 2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2327 * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
2330 2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
2332 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
2334 2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
2336 * error.c (enum pad): Remove.
2337 (dump_qualifiers): Likewise.
2338 (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
2339 (dump_aggr_type): Likewise.
2340 (dump_type_suffix): Likewise.
2341 (dump_simple_decl): Likewise.
2342 (dump_function_decl): Likewise.
2343 (cv_to_string): Likewise.
2344 (dump_type_prefix): Likewise. Adjust return void.
2345 * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
2347 (pp_cxx_template_keyword_if_needed): Document.
2348 (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
2349 (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
2350 MUST_NOT_THROW_EXPR.
2352 2004-03-21 Mark Mitchell <mark@codesourcery.com>
2355 * decl.c (cp_finish_decl): Compute the size of arrays declared in
2356 templates, if their type is non-dependent.
2358 2004-03-19 Mark Mitchell <mark@codesourcery.com>
2360 * call.c (build_op_delete_call): Do not forget the placement
2361 arguments when iterating through mutiple delete operators.
2363 * cp-tree.h (svaed_scope): Remove last_parms.
2364 (NEW_DELETE_OPNAME_P): New macro.
2365 (last_function_parms): Remove.
2366 (do_friend): Adjust prototype.
2367 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
2368 using last_function_parms.
2369 (grokfndecl): Take the PARM_DECLs as an argument, rather than
2370 using last_function_parms.
2371 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
2372 for class-specific operator new and operator delete.
2373 (grok_op_properties): Do not look for allocation functions with
2375 (start_function): Use DECL_ARGUMENTS instead of
2376 last_function_parms.
2377 * decl.h (last_function_parms): Do not declare.
2378 * decl2.c (grokclassfn): Do not use last_function_parms.
2379 * friend.c (do_friend): Remove parmdecls parameter.
2380 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
2381 (pop_from_top_level): Do not restore it.
2382 * pt.c (check_explicit_specialization): Do not adjust
2383 last_function_parms.
2385 * name-lookup.c (do_local_using_decl): Create a local binding for
2386 types brought in via using declarations.
2388 * name-lookup.c (lookup_arg_dependent): Handle block-scope
2389 function declarations correctly.
2391 * semantics.c (finish_id_expression): Correct handling of
2392 conversion operators to dependent types.
2394 * typeck.c (lookup_destructor): Allow the use of destructors from
2397 2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2399 * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
2400 TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
2401 * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
2402 the field is named TEMPLATE_TYPE_PARM_INDEX.
2404 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2407 * parser.c (cp_parser_functional_cast): A cast to anything
2408 but integral or enumaration type is not an integral constant
2410 * pt.c (value_dependent_expression_p): Handle cast expressions
2411 without operands (such as "int()").
2413 2004-03-18 Mark Mitchell <mark@codesourcery.com>
2415 * semantics.c (finish_pseudo_destructor_expr): Allow differing
2416 cv-qualification between the type named by the
2417 pseudo-destructor-name and the object-type.
2419 * search.c (accessible_base_p): Handle non-proper bases.
2421 * name-lookup.c (do_nonmember_using_decl): If a using declaration
2422 refers to a single overloaded function, set the type of the
2424 * tree.c (lvalue_type): Simplify.
2425 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
2427 (build_unary_op): Handle OVERLOADs with known types.
2429 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
2432 * parser.c (cp_parser_postfix_expression): Handle the use of
2433 "typename" in non-dependent contexts. Convert appropriately when
2434 when using a qualified name after "->" or ".".
2436 * call.c (conditional_conversion): Honor the requirement that some
2437 conversions refer to the original object.
2439 2004-03-18 Mark Mitchell <mark@codesourcery.com>
2441 * call.c (build_conditional_expr): Do not call force_rvalue for
2442 operands of void_type when the conditional expression itself has
2444 * name-lookup.c (pushdecl): Don't consider a declaration of a
2445 function named "main" to be an overload of a type named "main".
2446 * parser.c (cp_parser_template_name): Perform name lookup when the
2447 template name is proceeded by "template" if the qualifying scope
2449 * typeck.c (composite_pointer_type_r): Correctly handle
2450 pointer-to-member types.
2451 (build_const_cast): Likewise.
2453 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2455 * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
2456 * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
2457 (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
2458 (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
2459 (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
2460 (TYPEOF_TYPE_EXPR): New macro.
2461 * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
2462 * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
2463 * pt.c (tsubst): Likewise.
2464 * semantics.c (finish_typeof): Likewise.
2465 * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
2466 and TEMPLATE_TYPE_PARM.
2467 * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
2468 (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
2470 2004-03-16 Mark Mitchell <mark@codesourcery.com>
2473 * cp-tree.h (build_new_op): Change prototype.
2474 (build_x_binary_op): Likewise.
2475 * call.c (build_new_op): Add overloaded_p parameter.
2476 * decl2.c (grok_array_decl): Adjust call to build_new_op.
2477 * parser.c (cp_parser_binary_expression): Note that uses of
2478 overloaded operators prevents an expression from being considered
2479 an integral constant.
2480 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
2482 * semantics.c (finish_call_expr): Likewise.
2483 * typeck.c (rationalize_conditional_expr): Likewise.
2484 (build_x_indirect_ref): Likewise.
2485 (build_x_binary_op): Likewise.
2486 (build_x_unary_op): Likewise.
2487 (build_x_compound_expr): Likewise.
2488 (build_modify_expr): Likewise.
2489 * typeck2.c (build_x_arrow): Likewise.
2491 2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
2493 * cp-lang.c, ptree.c: Update copyright.
2495 2004-03-13 Mark Mitchell <mark@codesourcery.com>
2498 * parser.c (cp_parser_non_integral_constant_expression): Encode
2499 more of the idiom that surrounded calls to this function within
2501 (cp_parser_primary_expression): Adjust accordingly.
2502 (cp_parser_postfix_expression): Likewise.
2503 (cp_parser_unary_expression): Likewise.
2504 (cp_parser_cast_expression): Likewise.
2505 (cp_parser_assignment_expression): Likewise.
2506 (cp_parser_expression): Likewise.
2507 (cp_parser_new_expression): Note that new-expressions are not
2508 allowed in integral constant expressions.
2509 (cp_parser_delete_expression): Likewise.
2511 2004-03-12 Matt Austern <austern@apple.com>
2513 * decl2.c (maybe_make_one_only): Look at
2514 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
2515 to make an explicit instantiation weak.
2516 * method.c (use_thunk): Make sure we call comdat_linkage
2518 * pt.c (do_type_instantiation): On systems where weak symbols
2519 don't go in a static archive's TOC, explicit instantiation of a
2520 class must imply *explicit* instantiation of its memeber.
2522 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
2524 * call.c, cp-tree.h, pt.c: Fix comment typos.
2526 2004-03-10 Mark Mitchell <mark@codesourcery.com>
2529 * decl.c (xref_tag): Disregard non-type declarations when
2530 looking up a tagged type.
2532 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
2535 * call.c (convert_like_real): Build a const qualified temporary,
2536 when testing ctor access.
2538 2004-03-09 Mark Mitchell <mark@codesourcery.com>
2540 * call.c (initialize_reference): Fix typo.
2542 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2545 * pt.c (determine_specialization): For member templates, match also
2549 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
2551 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
2553 2004-03-09 Mark Mitchell <mark@codesourcery.com>
2556 * call.c (initialize_reference): Handle initializers that are
2557 class-member access expressions applies to rvalues.
2559 2004-03-09 Mark Mitchell <mark@codesourcery.com>
2562 * name-lookup.c (supplement_binding): Ignore functions that are
2563 marked DECL_ANTICIPATED.
2565 2004-03-08 Mark Mitchell <mark@codesourcery.com>
2568 * class.c (check_field_decls): Complain about non-static data
2569 members of reference type in unions. Propagate
2570 CLASSTYPE_REF_FIELDS_NEED_INIT and
2571 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
2573 * init.c (perform_member_init): Complain about mbmers with const
2574 type that are not explicitly initialized.
2576 2004-03-08 Mark Mitchell <mark@codesourcery.com>
2578 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
2579 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
2580 (lang_identifier): Remove implicit_decl and error_locus.
2581 (IDENTIFIER_IMPLICIT_DECL): Remove.
2582 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
2583 (IDENTIFIER_ERROR_LOCUS): Likewise.
2584 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
2585 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
2586 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
2587 (implicitly_declare): Remove.
2588 * decl.c (warn_extern_redeclared_static): Remove check of
2589 IDENTIFIER_IMPLICIT_DECL.
2590 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
2591 (implicitly_declare): Remove.
2592 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
2593 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
2594 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
2595 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
2596 in the innermost scope, rather than at namespace scope.
2597 * name-lookup.c (push_local_binding): Give it external linkage.
2598 (pushdecl): Remove dead code.
2599 * name-lookup.h (push_local_binding): Declare it.
2600 * ptree.c (cxx_print_identifier): Don't print
2601 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
2602 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
2603 not IDENTIFIER_ERROR_LOCUS.
2604 * typeck.c (build_function_call): Remove dead code.
2606 2004-03-08 Jason Merrill <jason@redhat.com>
2609 * decl.c (xref_tag): Remove attribute handling.
2610 * cp-tree.h: Adjust prototype.
2611 * decl.c, parser.c, rtti.c: Adjust callers.
2612 * parser.c (cp_parser_class_head): Pass back attributes in the
2614 (cp_parser_class_specifier): Adjust.
2616 2004-03-08 Matt Austern <austern@apple.com>
2619 * name-lookup.c (add_decl_to_level): Add extern variables, as well
2620 as static, to static_decls array.
2622 2004-03-05 Jason Merrill <jason@redhat.com>
2624 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
2626 2004-03-04 Geoffrey Keating <geoffk@apple.com>
2628 * decl.c (grokfndecl): Update old incorrect comment.
2629 (grokvardecl): Diagnose C++ variables of type with no linkage.
2631 2004-03-01 Mark Mitchell <mark@codesourcery.com>
2634 * pt.c (build_non_dependent_expr): Do not create a
2635 NON_DEPENDENT_EXPR for a THROW_EXPR.
2637 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
2640 * error.c (dump_expr): Handle THROW_EXPR.
2642 2004-03-01 Mark Mitchell <mark@codesourcery.com>
2645 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
2646 lookup if ordinary name-lookup finds a non-function.
2647 * pt.c (tsubst_copy_and_build): Likewise.
2650 * parser.c (cp_parser_late_parsing_default_args): Check that there
2651 are no extra tokens after the end of the default-argument
2654 2004-03-01 Mark Mitchell <mark@codesourcery.com>
2657 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
2658 having C++ linkage for name-mangling purposes.
2661 * parser.c (cp_parser_direct_declarator): Recognize constructor
2662 declarators that use a template-id to name the class being
2666 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
2667 (tsubst_expr): Do not call tsubst_copy, even when
2668 processing_template_decl.
2670 2004-03-01 Jeff Law <law@redhat.com>
2672 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
2675 2004-02-29 Mark Mitchell <mark@codesourcery.com>
2678 * name-lookup.h (push_scope): Change prototype.
2679 * name-lookup.c (push_scope): Do not reenter the current class
2681 * decl.c (grokfndecl): Check return code from push_scope before
2683 * decl2.c (check_classfn): Likewise.
2684 * parser.c (cp_parser_conversion_function_id): Likewise.
2685 (cp_parser_init_declarator): Likewise.
2686 (cp_parser_direct_declarator): Likewise.
2687 (cp_parser_class_specifier): Likewise.
2688 (cp_parser_class_head): Likewise.
2689 (cp_parser_lookup_name): Likewise.
2690 (cp_parser_constructor_declarator_p): Likewise.
2691 * pt.c (instantiate_class_template): Likewise.
2692 (resolve_typename_type): Likewise.
2694 2004-02-29 Mark Mitchell <mark@codesourcery.com>
2697 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
2701 * class.c (update_vtable_entry_for_fn): Do not go through
2702 covariance machinery if the type returned by an overrider is the
2703 same as the original.
2705 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
2707 * call.c: Fix a comment typo.
2709 2004-02-27 Ziemowit Laski <zlaski@apple.com>
2711 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
2713 2004-02-26 Mark Mitchell <mark@codesourcery.com>
2716 * parser.c (cp_parser_parameter_declaration_list): Commit
2717 to fewer tentative parses.
2719 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2722 * pt.c (dependent_type_p_r): A template template parameter is a
2725 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2728 * mangle.c (write_template_arg_literal): Don't rely on identity for
2731 2004-02-24 Jason Merrill <jason@redhat.com>
2733 * tree.c (build_exception_variant): Use check_qualified_type.
2735 2004-02-23 Zack Weinberg <zack@codesourcery.com>
2736 Kazu Hirata <kazu@cs.umass.edu>
2738 * decl.c (cxx_init_decl_processing): Don't check
2739 flag_writable_strings.
2741 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
2744 * typeck.c (maybe_warn_about_returning_address_of_location):
2745 Change check for VAR_DECL to use DECL_P instead.
2747 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2750 * cvt.c (build_expr_type_conversion): Type must be complete before
2751 looking up for conversions.
2753 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2756 * name-lookup.c (arg_assoc_class): Don't look into template
2757 arguments if it is not a primary template.
2759 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
2762 * method.c (use_thunk): Always clone function argument tree.
2764 2004-02-20 Mark Mitchell <mark@codesourcery.com>
2767 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
2770 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
2771 for all type variants.
2773 2004-02-19 Mark Mitchell <mark@codesourcery.com>
2776 * decl.c (duplicate_decls): Return error_mark_node for invalid
2778 * name-lookup.c (push_namespace): Ignore the return value from
2780 * pt.c (push_template_decl_real): Robustify.
2783 * name-lookup.c (push_class_level_binding): Do not complain about
2784 adding a binding for a member whose name is the same as the
2785 enclosing class if the member is located in a base class of the
2788 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2791 * parser.c (cp_parser_new_expression): Parse an ill-formed
2792 direct-new-declarator after a parenthesized type-id to emit good
2795 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
2797 * cp-tree.def, cvt.c: Update copyright.
2799 2004-02-17 Mark Mitchell <mark@codesourcery.com>
2802 * cp-tree.h (abi_version_at_least): Remove.
2803 * mangle.c: Include flags.h.
2805 2004-02-15 Mark Mitchell <mark@codesourcery.com>
2808 * call.c (build_conditional_expr): Handle conversions between
2809 class types which result in differently cv-qualified type
2813 * class.c (delete_duplicate_fields_1): Remove.
2814 (delete_duplicate_fields): Likewise.
2815 (finish_struct_anon): Remove check for members with the same name
2816 as their enclosing class.
2817 (check_field_decls): Do not call duplicate_fields.
2818 * decl.c (grokdeclarator): Remove check for static data members
2819 with the same name as their enclosing class.
2820 * name-lookup.c (push_class_level_binding): Check for members with
2821 the same name as their enclosing class.
2823 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
2826 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
2828 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2831 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
2832 has full set of arguments.
2834 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2837 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
2839 2004-02-13 Mark Mitchell <mark@codesourcery.com>
2842 * cp-tree.h (delete_sanity): Change prototype.
2843 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
2844 Remove dead code. Adjust code to warn about deleting an array.
2845 * typekc.c (decay_conversion): Use build_address and build_nop.
2848 * search.c (accessible_p): Do not check access in thunks.
2851 * call.c (build_conditional_expr): Call force_rvalue on the
2852 non-void operand in the case that one result is a throw-expression
2853 and the other is not.
2855 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
2858 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
2859 the type name and look ahead for ::~, and bail out early with a
2860 better error message if the parse is going to fail.
2862 2004-02-12 Mark Mitchell <mark@codesourcery.com>
2864 * call.c (conversion_kind): New type.
2865 (conversion_rank): Likewise.
2866 (conversion): Likewise.
2867 (CONVERSION_RANK): New macro.
2868 (conversion_obstack): New variable.
2869 (obstack_initialized): Likewise.
2870 (z_candidate): Change type of convs and second_conv.
2871 (candidate_warning): New type.
2872 (IDENTITY_RANK): Remove.
2873 (EXACT_RANK): Likewise.
2874 (PROMO_RANK): Likewise.
2875 (STD_RANK): Likewise.
2876 (PBOOL_RANK): Likewise.
2877 (USER_RANK): Likewise.
2878 (ELLIPSIS_RANK): Likewise.
2879 (BAD_RANK): Likewise.
2880 (ICS_RANK): Likewise.
2881 (ICS_STD_RANK): Likewise.
2882 (ICS_USER_FLAG): Likewise.
2883 (ICS_ELLIPSIS_FLAG): Likewise.
2884 (ICS_THIS_FLAG): Likewise.
2885 (ICS_BAD_FLAG): Likewise.
2886 (NEED_TEMPORARY_P): Likewise.
2887 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
2888 (USER_CONV_CAND): Likewise.
2889 (USER_CONV_FN): Likewise.
2890 (conversion_obstack_alloc): New function.
2891 (alloc_conversion): Likewise.
2892 (validate_conversion_obstack): Likewise.
2893 (alloc_conversions): Likewise.
2894 (build_conv): Adjust to deal with new conversion data structures.
2895 (build_identity_conv): New function.
2896 (build_ambiguous_conv): Likewise.
2897 (standard_conversion): Adjust to deal with new conversion data
2899 (convert_class_to_reference): Likewise.
2900 (direct_reference_binding): Likewise.
2901 (reference_binding): Likewise.
2902 (implicit_conversion): Likewise.
2903 (add_candidate): Likewise.
2904 (add_function_candidate): Likewise.
2905 (add_conv_candidate): Likewise.
2906 (build_builtin_candidate): Likewise.
2907 (print_z_candidate): Likewise.
2908 (merge_conversion_sequences): Likewise.
2909 (build_user_type_conversion_1): Likewise.
2910 (build_user_type_conversion): Likewise.
2911 (build_new_function_call): Likewise.
2912 (build_object_call): Likewise.
2913 (conditional_conversion): Likewise.
2914 (build_conditional_expr): Likewise.
2915 (build_new_op): Likewise.
2916 (build_op_delete_call): Likewise.
2917 (convert_like_real): Likewise.
2918 (build_over_call): Likewise.
2919 (build_new_method_call): Likewise.
2920 (is_subseq): Likewise.
2921 (maybe_handle_implicit_object): Likewise.
2922 (maybe_handle_ref_bind): Likewise.
2923 (compare_ics): Likewise.
2924 (source_type): Likewise.
2925 (add_warning): Likewise.
2927 (can_convert_arg): Likewise.
2928 (can_convert_arg_bad): Likewise.
2929 (perform_implicit_conversion): Likewise.
2930 (perform_direct_initialization_if_possible): Likewise.
2931 (initialize_reference): Likewise.
2932 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
2933 * cp-tree.def (WRAPPER): Likewise.
2934 (IDENTITY_CONV): Remove.
2935 (LVALUE_CONV): Likewise.
2936 (QUAL_CONV): Likewise.
2937 (STD_CONV): Likewise.
2938 (PTR_CONV): Likewise.
2939 (PMEM_CONV): Likewise.
2940 (BASE_CONV): Likewise.
2941 (REF_BIND): Likewise.
2942 (USER_CONV): Likewise.
2943 (AMBIG_CONV): Likewise.
2944 (RVALUE_CONV): Likewise.
2945 * cp-tree.h (tree_wrapper): Remove.
2946 (WRAPPER_ZC): Remove.
2947 (lang_tree_node): Remove wrapper.
2948 (LOOKUP_SPECULATIVELY): Remove.
2949 (build_op_delete_call): Adjust prototype.
2950 (validate_conversion_obstack): Declare.
2951 (build_zc_wrapper): Remove.
2952 * cvt.c (convert_to_reference): Remove dead code.
2953 (ocp_convert): Likewise.
2954 * decl.c (redeclaration_error_message): Correct handling of
2956 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
2957 (cp_tree_node_structure): Remove WRAPPER case.
2958 * decl2.c (finish_file): Call validate_conversion_obstack.
2959 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
2960 (build_op_delete_call): Likewise.
2961 (build_x_delete): Likewise.
2962 (build_delete): Adjust call to build_op_delete_call.
2963 * pt.c (tsubst_friend_declaration): Adjust code to determine
2964 whether or not a friend template is a definition.
2965 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
2966 * tree.c (build_zc_wrapper): Remove.
2968 2004-02-12 Zack Weinberg <zack@codesourcery.com>
2970 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
2971 * cp-tree.h: Don't declare cxx_builtin_type_decls.
2972 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
2973 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
2975 2004-02-10 Mark Mitchell <mark@codesourcery.com>
2977 * typeck.c (lookup_destructor): Fix typo in error message.
2979 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
2981 * call.c, parser.c, tree.c: Fix comment typos.
2983 2004-02-07 Zack Weinberg <zack@codesourcery.com>
2986 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
2987 * decl.c (duplicate_decls, start_function): Likewise.
2989 2004-02-07 Zack Weinberg <zack@codesourcery.com>
2991 * name-lookup.c (pushdecl): Issue shadow warnings directly.
2992 * parser.c (free_parser_stacks): Delete.
2994 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
2996 * rtti.c: Update copyright.
2998 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3001 * decl.c (require_complete_types_for_parms): Do not insert
3002 error_mark_node in the parameter list.
3004 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3007 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
3008 error when terminator can not be found.
3010 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
3012 Make-lang.in (po-generated): Delete.
3014 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
3016 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
3017 targetm.calls.promote_prototypes.
3019 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3023 2004-01-15 Geoffrey Keating <geoffk@apple.com>
3025 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
3026 (handle_pragma_implementation): Likewise.
3028 2004-02-05 Mark Mitchell <mark@codesourcery.com>
3031 * typeck.c (lookup_destructor): Tweak error message.
3033 2004-02-05 Jan Hubicka <jh@suse.cz>
3035 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
3038 2004-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3041 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
3042 code, only emits the diagnostic now. Added lookup of the identifier
3043 and support for qualified ids.
3044 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
3045 Parse an (invalid) type name as id-expression within a declarator.
3046 (cp_parser_simple_declaration): Use it.
3047 (cp_parser_member_declaration): Likewise.
3048 (cp_parser_make_typename_type): New function. Handle errors through
3049 cp_parser_diagnose_invalid_typename.
3050 (cp_parser_elaborated_type_specifier): Use it.
3052 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3055 * call.c (convert_like_real): Use "converting" rather than
3056 "argument" as the descriptive keyword to
3057 dubious_conversion_warnings.
3058 * typeck.c (convert_for_assignment): Do not call
3059 dubious_conversion_warnings.
3061 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3064 * init.c (build_delete): Emit a more informative error message in
3065 case of an incomplete type, and on the correct source line.
3067 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
3069 * error.c, search.c: Update copyright.
3071 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3074 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
3075 linkage for the typeinfo name string.
3077 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3080 * cp-tree.h (fold_non_dependent_expr): New function.
3081 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
3082 (cp_parser_template_argument): Use fold_non_dependent_expr.
3083 (cp_parser_direct_declarator): Likewise.
3084 * pt.c (fold_non_dependent_expr): New function.
3085 (convert_nontype_argument): Use it.
3086 (tsubst_qualified_id): Simplify.
3087 (tsubst_copy_and_build): Likewise.
3089 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3091 * decl.c (cxx_push_function_context): Do not set
3092 current_function_is_thunk.
3093 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
3096 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3099 * pt.c (more_specialized_class): Increase processing_template_decl
3100 while partial ordering.
3102 2004-02-03 Mark Mitchell <mark@codesourcery.com>
3105 * decl.c (start_function): Do not call pushdecl for any
3106 instantiation or specialization of a primary template.
3108 2004-02-03 Mark Mitchell <mark@codesourcery.com>
3111 * parser.c (cp_parser_class_name): Robustify.
3114 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
3117 * semantics.c (finish_id_expression): Do not return an
3118 IDENTIFIER_NODE when lookup finds a PARM_DECL.
3120 2004-02-03 Mark Mitchell <mark@codesourcery.com>
3123 * pt.c (build_non_dependent_expr): Do not build
3124 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
3127 * semantics.c (finish_id_expression): Do not return an
3128 IDENTIFIER_NODE when lookup finds a VAR_DECL.
3131 * parser.c (cp_parser_simple_declaration): When skipping to the
3132 end of the statement swallow the terminating semicolon.
3134 2004-02-02 Mark Mitchell <mark@codesourcery.com>
3137 * init.c (build_offset_ref): Improve error recovery for invalid
3138 uses of non-static member functions.
3141 * cp-tree.h (cp_build_type_attribute_variant): New function.
3142 * class.c (build_clone): Use cp_build_type_attribute_variant.
3143 * decl.c (duplicate_decls): Likewise.
3144 * pt.c (copy_default_args_to_explicit_spec): Likewise.
3145 (tsubst_function_type): Likewise.
3146 * tree.c (build_exception_variant): Check attributes before
3147 concluding that two types are the same.
3148 (cp_build_type-attribute_variant): New method.
3149 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
3152 * call.c (convert_class_to_reference): Keep better track of
3153 pedantically invalid user-defined conversions.
3155 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3158 * pt.c (tsubst_qualified_id): Improved error message when a type
3159 is expected but not found.
3161 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
3163 * class.c: Fix comment typos.
3165 * error.c: Likewise.
3166 * parser.c: Likewise.
3168 * search.c: Likewise.
3169 * typeck.c: Likewise.
3171 2004-01-30 Richard Henderson <rth@redhat.com>
3174 * method.c (use_thunk): Don't force_target_expr for void thunks.
3175 * tree.c (build_target_expr_with_type): Assert non-void type.
3176 (force_target_expr): Likewise.
3178 2004-01-30 Michael Matz <matz@suse.de>
3180 * parser.c (cp_parser_labeled_statement): Accept case ranges.
3182 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3186 * decl.c (grokdeclarator): Check immediatly type completeness for
3187 non-dependent types.
3189 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3192 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
3193 a sizeof expression.block
3195 2004-01-29 Mark Mitchell <mark@codesourcery.com>
3198 * mangle.c (write_encoding): Correct encoding of member template
3201 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3203 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
3204 template name as it was `<::' (digraph typo).
3205 (cp_parser_nth_token_starts_template_argument_list_p): New function.
3206 (cp_parser_id_expression): Use it.
3207 (cp_parser_nested_name_specifier_opt): Likewise.
3208 (cp_parser_template_name): Likewise.
3209 (cp_parser_class_name): Likewise.
3210 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
3212 2004-01-28 Mark Mitchell <mark@codesourcery.com>
3215 * typeck.c (merge_types): Do not merge attributes into
3219 * parser.c (cp_parser_direct_declarator): Do not prevent
3220 backtracking inside a parenthesized declarator.
3221 (cp_parser_parameter_declaration): Fix typo in comment.
3223 2004-01-28 Jan Hubicka <jh@suse.cz>
3225 * semantics.c (expand_body) Do emit_associated_thunks before
3228 2004-01-27 Devang Patel <dpatel@apple.com>
3230 * name-lookup.c: Include "debug.h"
3231 (do_namespace_alias): Invoke debug_hooks to emit debug info
3232 for namespace alias.
3233 (do_local_using_decl): Invoke debug_hooks to emit debug info
3235 (do_class_using_decl): Same.
3236 (do_toplevel_using_decl): Same.
3237 (do_using_directive): Same.
3238 (cp_emit_debug_info_for_using): New function.
3239 * Make-lang.in (cp/parser.o): Depend on debug.h
3240 (cp/name-lookup.o): Same.
3242 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3244 * cp-tree.h (language_function, lang_type_header): Use
3246 * name-lookup.h (cp_binding_level): Likewise.
3248 2004-01-26 Mark Mitchell <mark@codesourcery.com>
3251 * semantics.c (finish_for_expr): Check for unresolved overloaded
3254 * class.c (add_method): Just check processing_template_decl to
3255 determine whether or not we are within a template.
3256 * decl2.c (maybe_retrofit_in_chrg): Likewise.
3257 * init.c (decl_constant_value): Check the type of the declaration,
3259 * name-lookup.c (maybe_push_to_top_level): Rename to ...
3260 (push_to_top_level): ... this.
3261 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
3262 * pt.c (push_template_decl_real): Reorder condition for speed.
3263 (convert_template_argument): Use dependency-checking functions in
3264 place of uses_template_parms.
3265 (lookup_template_class): Avoid calling uses_template_parms more
3267 (uses_template_parms): Reimplement, using dependency-checking
3269 (instantiate_class_template): Use push_to_top_level, not
3270 maybe_push_to_top_level.
3271 (type_unification_real): Simplify.
3272 (type_dependent_expression_p): Handle OFFSET_REFs and
3274 (any_dependent_template_arguments_p): Handle multiple levels of
3276 * semantics.c (expand_or_defer_fn): Do not check
3277 uses_template_parms for template instantiations.
3278 * typeck.c (comptypes): Avoid calling cp_type_quals.
3280 2004-01-25 Mark Mitchell <mark@codesourcery.com>
3283 * call.c (build_over_call): Do not convert arguments when
3284 processing a template.
3285 * pt.c (build_non_dependent_expr): Do not build a
3286 NON_DEPENDENT_EXPR for arithmetic constants.
3288 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3291 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
3292 returns a TYPE_DECL. no further lookup is required.
3293 * semantics.c (check_template_template_default_arg): A TYPE_DECL
3294 is invalid. Rework to give better diagnostics.
3296 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3299 * pt.c (instantiate_class_template): Add an error_mark_node
3301 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
3303 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
3306 * decl.c (finish_function): Move the call to
3307 finish_fname_decls below the call to
3308 finish_eh_spec_block.
3310 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
3312 * optimize.c, typeck2.c: Update copyright.
3314 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
3316 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
3317 init.c, mangle.c, typeck.c: Update copyright.
3319 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
3321 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
3323 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
3325 * Make-lang.in: Replace $(docdir) with doc.
3326 (c++.info, c++.srcinfo): Dummy entry.
3327 (c++.man, c++.srcman): New rules.
3328 (c++.install-man): Revamp rule.
3330 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
3332 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
3333 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
3334 immediate $(shell) instead of deferred backquote.
3336 2004-01-19 Mark Mitchell <mark@codesourcery.com>
3339 * parser.c (cp_parser_postfix_expression): When encountering
3340 incomplete type on left-hand side of "->" or ".", treat the entire
3341 expression as erroneous.
3344 * call.c (build_field_call): Remove.
3345 (n_build_method_call): Likewise.
3346 (build_method_call): Likewise.
3347 (build_new_method_call): Do not call build_field_call.
3348 * class.c (n_build_method_call): Remove.
3349 (print_class_statistics): Do not print it.
3350 * cp-tree.h (build_method_call): Remove declaration.
3351 (finish_object_call_expr): Likewise.
3352 (build_new_1): Do not use build_method_call.
3353 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
3354 when the function appearing on the right-hand-side of "." or "->"
3355 is not actually a function.
3356 * pt.c (tsubst_copy_and_build): Likewise.
3357 * semantics.c (finish_object_call_expr): Remove.
3359 2004-01-18 Mark Mitchell <mark@codesourcery.com>
3362 * pt.c (tsubst): Use finish_typeof.
3364 2004-01-18 Jason Merrill <jason@redhat.com>
3367 * except.c (build_throw): In a template, set
3368 current_function_returns_abnormally.
3370 2004-01-17 Fred Fish <fnf@intrinsity.com>
3373 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
3374 except don't call array_type_nelts() with a VECTOR_TYPE.
3376 2004-01-16 Jan Hubicka <jh@suse.cz>
3378 * mangle.c (write_mangled_name): Remove inline modifier.
3380 2004-01-16 Mark Mitchell <mark@codesourcery.com>
3383 * decl.c (compute_array_index_type): Fix grammar in comment.
3384 * init.c (build_zero_init): Handle zero-sized arrays correctly.
3387 * call.c (name_as_c_string): Print conversion operator names
3391 * call.c (initialize_reference): Pass -1 for inner parameter to
3394 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3397 * parser.c (cp_parser_base_specifier): Check for an invalid
3398 keyword `typename' and emit an user-friendly error message.
3400 2004-01-15 Geoffrey Keating <geoffk@apple.com>
3403 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
3404 (handle_pragma_implementation): Likewise.
3406 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3409 * typeck.c (build_class_member_access_expr): Allow to access members
3410 of the currently open class.
3411 (finish_class_member_access_expr): Likewise.
3413 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
3416 * name-lookup.c (validate_nonmember_using_decl): Take scope and
3417 name by value, instead of computing them.
3418 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
3419 arguments. Pass them to validate_nonmember_using_decl.
3420 * name-lookup.h (do_local_using_decl): Adjust.
3421 (do_toplevel_using_decl): Likewise.
3422 * parser.c (cp_parser_using_declaration): Likewise.
3423 * pt.c (tsubst_expr): Likewise.
3425 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
3429 * name-lookup.c (qualified_lookup_using_namespace): Search
3430 strongly-associated namespaces first, and only then try other
3433 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
3435 * Make-lang.in (c++.srcextra): Dummy entry.
3437 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3440 * parser.c (cp_parser_template_name): Don't try to parse a
3441 conversion-function-id, as it cannot be a template-name.
3442 (cp_parser_simple_type_specifier): Check for invalid template-ids
3443 even after a built-in type.
3445 2004-01-14 Jan Hubicka <jh@suse.cz>
3448 * pt.c (instantiate_decl): Do not increase function_depth.
3450 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
3454 * parser.c (cp_parser_elaborated_type_specifier): Warn about
3455 attributes and discard.
3456 * decl.c (xref_tag): Don't overwite existing attributes with
3459 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3462 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
3463 is no destructor while looking up a BIT_NOT_EXPR.
3465 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
3467 * cxxfilt.c: Remove unused file.
3469 2004-01-14 Jan Hubicka <jh@suse.cz>
3471 Partial fix to PR c++/12850
3472 * decl2.c (mark_used): Do not proactively instantiate templates
3473 when compiling in unit-at-a-time or not optimizing.
3474 * optimize.c (maybe_clone_body): Do not increase function depth.
3476 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3479 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
3481 2004-01-12 Steven Bosscher <stevenb@suse.de>
3484 * parser.c (cp_parser_member_declaration): Any non-type is also
3485 not a class or a function.
3487 2004-01-12 Jason Merrill <jason@redhat.com>
3490 * class.c (build_base_path): Do not mark vtable references as
3492 (build_vtbl_ref_1): Likewise.
3494 2004-01-12 Richard Henderson <rth@redhat.com>
3497 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
3498 (store_init_value): Use it.
3499 * decl.c (check_initializer): Expect full initialization code
3500 from store_init_value.
3501 * init.c (expand_aggr_init_1): Likewise.
3502 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
3504 2004-01-12 Mark Mitchell <mark@codesourcery.com>
3506 * class.c (layout_class_type): For non-POD class types, also copy
3507 the DECL_SIZE and DECL_MODE of fields to the base class type.
3509 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3512 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
3513 calling regenerate_decl_from_template.
3515 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
3518 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
3519 decl-specifier occurring along with a class definition.
3521 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
3523 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
3524 clauses to comments describing declares_class_or_enum.
3525 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
3528 2004-01-12 Jan Hubicka <jh@suse.cz>
3530 * pt.c (for_each_template_parm): Do not check for duplicates.
3531 (for_each_template_parm): Use walk_tree duplicate checking code.
3533 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
3536 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
3537 is error_mark_node, don't add any more decl_specs.
3538 (cp_parser_init_declarator): After committing to a declaration, if
3539 the decl_specifiers start with error_mark_node, issue an error and
3540 change the type to "int".
3542 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
3545 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
3547 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3551 * pt.c (tsubst): Substitution must fail if we are attempting to
3552 create an array with element type that is an abstract class type.
3553 * decl.c (cp_finish_decl): Strip pointers and array types recursively
3554 before calling abstract_virtuals_error.
3556 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
3558 * name-lookup.c (qualified_lookup_using_namespace): Consider
3559 strong using directives even if we've already found a binding.
3561 2004-01-09 Mark Mitchell <mark@codesourcery.com>
3563 * cp-tree.h (cxx_expand_expr): Change prototype.
3564 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
3566 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3569 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
3570 looking into them recursively. They can be there because of the
3571 new __offsetof__ extension.
3573 2004-01-07 Zack Weinberg <zack@codesourcery.com>
3575 * parser.c (cp_parser_save_member_function_body): Mark the
3578 2004-01-05 Mark Mitchell <mark@codesourcery.com>
3581 * class.c (build_clone): Copy type attributes from the original
3582 function to the clone.
3585 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
3586 references as constant.
3589 * parser.c (cp_parser_explicit_instantiation): Improve error
3591 (cp_parser_require): Improve indication of the error location.
3594 * parser.c (cp_parser_class_head): Reorder logic to check for
3595 invalid qualification.
3597 2004-01-04 Mark Mitchell <mark@codesourcery.com>
3600 * name-lookup.c (lookup_using_namespace): Remove spacesp
3602 (unqualified_namespace_lookup): Likewise.
3603 (lookup_qualified_name): Adjust accordingly.
3604 (lookup_name_real): Likewise.
3605 (lookup_arg_dependent): Do not eliminate the namespace of the
3606 functions found by unqualified name lookup unless that is the
3609 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
3611 * semantics.c (push_deferring_access_checks): Fix format.
3612 (resume_deferring_access_checks): Likewise.
3613 (stop_deferring_access_checks): Likewise.
3614 (pop_deferring_access_checks): Likewise.
3615 (get_deferred_access_checks): Likewise.
3616 (pop_to_parent_deferring_access_checks): Likewise.
3617 (perform_deferred_access_checks): Likewise.
3618 (perform_or_defer_access_check): Likewise.
3620 2004-01-04 Richard Henderson <rth@redhat.com>
3622 * call.c (build_over_call): Don't create a save_expr of an
3623 aggregate, but rather its address.
3625 2004-01-04 Mark Mitchell <mark@codesourcery.com>
3628 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
3629 an offsetof expression.
3631 * parser.c (cp_parser_parameter_declaration): Fix comment.
3634 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
3635 (reference_binding): Set it when appropriate.
3636 (build_temp): New function, split out from ...
3637 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
3638 (initialize_reference): Likewise.
3641 * parser.c (cp_parser): Add in_type_id_in_expr_p.
3642 (cp_parser_new): Initialize it.
3643 (cp_parser_postfix_expression): Set it.
3644 (cp_parser_sizeof_operand): Likewise.
3645 (cp_parser_parameteR_declaration): Do not commit early to tenative
3646 parsers when in_type_id_in_expr_p is set.
3648 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3651 * parser.c (cp_parser_template_argument): Don't call
3652 make_unbound_class_template directly.
3653 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
3654 UNBOUND_CLASS_TEMPLATE tree node.
3656 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
3659 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
3661 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3664 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
3665 (DECL_FUNCTION_TEMPLATE_P): Use it.
3666 (DECL_CLASS_TEMPLATE_P): Likewise.
3667 * parser.c (cp_parser_lookup_name): Add is_template parameter.
3668 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
3669 (cp_parser_template_name): Likewise.
3670 (cp_parser_elaborated_type_specifier): Likewise.
3671 (cp_parser_namespace_name): Likewise.
3672 (cp_parser_class_name): Likewise.
3673 (cp_parser_lookup_name_simple): Likewise.
3675 See ChangeLog.3 for earlier changes.