1 2005-05-17 Jakub Jelinek <jakub@redhat.com>
4 * decl.c (maybe_deduce_size_from_array_init): Call
5 cp_apply_type_quals_to_decl after completing array type.
7 2005-05-16 Richard Henderson <rth@redhat.com>
9 * decl.c (build_library_fn_1): Move setting TREE_NOTHROW ...
10 (build_library_fn): ... here.
12 2005-05-12 Ian Lance Taylor <ian@airs.com>
14 * cp-tree.h (cp_stmt_codes): Don't define.
15 (statement_code_p): Declare.
16 (STATEMENT_CODE_P): Define.
17 * lex.c (statement_code_p): Define.
18 (cxx_init): Use actual codes in stmt_codes initializer, not
19 cp_stmt_codes macro. Initialize statement_code_p directly, rather
20 than using INIT_STATEMENT_CODES.
22 2005-05-09 Mark Mitchell <mark@codesourcery.com>
24 * typeck.c (build_unary_op): Do not resort to address arithmetic
25 when taking the address of a COMPONENT_REF.
27 2005-05-08 Kazu Hirata <kazu@cs.umass.edu>
29 * class.c (vtbl_init_data_s): Change the type of fns to
31 (build_vtbl_initializer, add_vcall_offset, add_vcall_offset):
32 Use VEC instead of VARRAY.
34 2005-05-07 Richard Sandiford <rsandifo@redhat.com>
36 * mangle.c: Remove a reference to the MIPS -mint64 option.
38 2005-05-07 Kazu Hirata <kazu@cs.umass.edu>
40 * decl.c (wrapup_globals_for_namespace): Use VEC instead of
42 * name-lookup.c (add_decl_to_level, begin_scope): Likewise.
43 * name-lookup.h (cp_binding_level): Change the type of
44 static_decls to VEC(tree,gc)*.
46 * mangle.c (globals): Change the type of substitutions to
48 (dump_substitution_candidates, add_substitution,
49 find_substitution, finish_mangling, init_mangle): Use VEC
52 2005-05-06 Kazu Hirata <kazu@cs.umass.edu>
54 * decl2.c (spew_debug): Remove.
56 * decl2.c (ssdf_decls, start_static_storage_duration_function,
57 generate_ctor_or_dtor_function): Use VEC instead of VARRAY.
59 * decl2.c (pending_statics, note_vague_linkage_var,
60 cp_finish_file): Use VEC instead of VARRAY.
61 (pending_statics_used): Remove.
63 2005-05-05 Kazu Hirata <kazu@cs.umass.edu>
65 * decl2.c (deferred_fns, note_vague_linkage_fn,
66 cp_finish_file): Use VEC instead of VARRAY.
68 2005-05-05 Mark Mitchell <mark@codesourcery.com>
71 * pt.c (build_non_dependent_expr): Use is_overloaded_fn.
73 2005-05-05 Kazu Hirata <kazu@cs.umass.edu>
75 * pt.c: Fix a comment typo.
77 2005-05-04 Kazu Hirata <kazu@cs.umass.edu>
79 * cp-tree.h (language_function): Change the type of
81 * decl.c (push_local_name): Adjust uses of local_names.
83 2005-05-03 Kazu Hirata <kazu@cs.umass.edu>
85 * friend.c, lex.c, mangle.c, repo.c: Update copyright.
87 2005-05-02 Kazu Hirata <kazu@cs.umass.edu>
89 * class.c (local_classes, init_class_processing): Use VEC
91 * cp-tree.h (local_classes): Likewise.
92 * mangle.c (discriminator_for_local_entity): Likewise.
93 * name-lookup.c (pushtag): Likewise.
95 * class.c (current_lang_depth, push_lang_context,
96 pop_lang_context): Use VEC instead of VARRAY.
97 * cp-tree.h (saved_scope): Use VEC for lang_base instead of
99 * name-lookup.c (push_to_top_level): Use VEC instead of
102 2005-05-02 Paolo Bonzini <bonzini@gnu.org>
104 * semantics.c (finish_call_expr): Call resolve_overloaded_builtin
105 for BUILT_IN_MD built-ins.
107 2005-05-02 Michael Matz <matz@suse.de>
110 * cp-tree.h (cp_tree_index): Remove CPTI_NULL, to be defined in C
113 * lex.c (cxx_init): Move null_node initialisation to C common frontend.
115 2005-04-25 Ian Lance Taylor <ian@airs.com>
117 * cp-tree.def: Add EXPR_STMT.
118 * cp-tree.h (cp_stmt_codes): Add EXPR_STMT.
119 (EXPR_STMT_EXPR): Define.
120 * cp-gimplify.c: Include "flags.h".
121 (gimplify_expr_stmt): New static function.
122 (cp_gimplify_expr): Handle EXPR_STMT.
123 * cxx-pretty-print.c (pp_cxx_statement): Use pp_cxx_expression
124 rather than pp_expression.
125 (pp_cxx_statement): Handle EXPR_STMT.
126 * dump.c (cp_dump_tree): Handle EXPR_STMT.
127 * lex.c (cxx_init): Don't use c_common_stmt_codes in stmt_codes
130 2005-04-25 Andrew Pinski <pinskia@physics.uc.edu>
133 * rtti.c (ifnonnull): Cast the zero comparison operand
136 2005-04-24 Jakub Jelinek <jakub@redhat.com>
139 * class.c: Include cgraph.h.
140 (cp_fold_obj_type_ref): Set node->local.vtable_method.
141 * Make-lang.in (cgraph.o): Depend on $(CGRAPH_H).
143 2005-04-12 Markus F.X.J. Oberhumer <markus@oberhumer.com>
145 * mangle.c (write_builtin_type): Handle integer types which are
146 not one of the shared integer type nodes and emit a "vendor
147 extended builtin type" with an encoding in the form of "u5int96".
149 2005-04-24 Ian Lance Taylor <ian@airs.com>
151 * cp-tree.def (USING_STMT): Change class to tcc_statement.
152 (TRY_BLOCK, EH_SPEC_BLOCK, HANDLER, CLEANUP_STMT): Likewise.
153 (IF_STMT, FOR_STMT, WHILE_STMT, DO_STMT): Likewise.
154 (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
156 2005-04-23 DJ Delorie <dj@redhat.com>
158 * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, friend.c,
159 init.c, lex.c, mangle.c, method.c, name-lookup.c, parser.c,
160 repo.c, rtti.c, tree.c, typeck.c, typeck2.c: Adjust warning()
163 2005-04-22 Per Bothner <per@bothner.com>
165 * decl.c (make_rtl_for_nonlocal_decl): Don't try get_fileinfo if
166 input_filename is NULL, as it is for (say) __PRETTY_FUNCTION__.
168 2005-04-22 Alexandre Oliva <aoliva@redhat.com>
171 * name-lookup.c (push_overloaded_decl): Do not overload with
172 non-duplicate anticipated built-in.
174 2005-04-21 Kazu Hirata <kazu@cs.umass.edu>
176 * cp-tree.h (THROW_NAME, AUTO_VTABLE_NAME, AUTO_TEMP_FORMAT,
177 VTABLE_BASE, VTABLE_NAME_PREFIX, STATIC_NAME_FORMAT): Remove.
179 2005-04-21 Nathan Sidwell <nathan@codesourcery.com>
181 * cp-tree.h: Adjust for new VEC API.
182 Define VEC(tree_pair_s,gc).
183 (struct save_scope): Adjust.
184 (struct lang_type_class): Adjust.
185 (unemitted_tinfo_decls): Adjust.
186 * class.c (add_method, resort_type_method_vec,
187 finish_struct_methods, struct find_final_overrider_data,
188 dfs_find_final_overrider_pre, find_final_overrider,
189 get_vcall_index, warn_hidden, walk_subobject_offsets,
190 check_methods, fixup_inline_methods, end_of_class,
191 warn_about_ambiguous_bases, finish_struct, build_vtbl_initializer,
192 add_vcall_offset): Adjust.
193 * decl.c (xref_basetypes, finish_method): Adjust.
194 * decl2.c (check_classfn): Adjust.
195 * init.c (sort_mem_initializers, push_base_cleanups): Adjust.
196 * method.c (do_build_copy_constructor): Adjust.
197 * name-lookup.c (new_class_binding, store_binding,
198 store_bindings, store_class_bindings): Adjust.
199 * name-lookup.h: Define VEC(cxx_saved_binding,gc),
200 VEC(cp_class_binding,gc).
201 (struct cp_binding_level): Adjust.
202 * parser.c: Define VEC(cp_token_position,heap).
203 (struct cp_lexer): Adjust.
204 (cp_lexer_new_main, cp_lexer_new_from_tokens, cp_lexer_destroy,
205 cp_lexer_save_tokens): Adjust.
206 * pt.c (retrieve_specialization,
207 check_explicit_specialization): Adjust.
208 * rtti.c (unemitted_tinfo_decls): Adjust.
209 (init_rtti_processing, get_tinfo_decl, get_pseudo_ti_init,
210 get_pseudo_ti_desc): Adjust.
211 * search.c (dfs_access_in_type, lookup_conversion_operator,
212 lookup_fnfields_1, dfs_walk_once, dfs_walk_once_accessible,
213 dfs_get_pure_virtuals, lookup_conversions_r, binfo_for_vbase): Adjust.
214 * semantics.c: Define VEC(deferred_access,gc).
215 (push_deferring_access_checks): Adjust.
216 * typeck2.c (abstract_virtuals_error): Adjust.
218 2005-04-20 Ian Lance Taylor <ian@airs.com>
220 * cp-tree.def: Add STMT_EXPR.
221 * cp-tree.h (STMT_EXPR_NO_SCOPE): Define.
222 (STMT_EXPR_STMT): Define.
223 * cxx-pretty-print.c (pp_cxx_primary_expression): Handle
225 (pp_cxx_expression): Likewise.
226 (pp_cxx_statement): Call pp_cxx_statement, not pp_statement.
227 * dump.c (cp_dump_tree): Handle STMT_EXPR.
229 2005-04-18 Kazu Hirata <kazu@cs.umass.edu>
231 * decl.c (expand_static_init): Call build2 and build3 instead
234 * cp-tree.h (VPTR_NAME, VPTR_NAME_P): Remove.
236 2005-04-17 Ian Lance Taylor <ian@airs.com>
238 * cp-tree.def: Add SIZEOF_EXPR, ARROW_EXPR and ALIGNOF_EXPR.
239 * cxx-pretty-print.c (pp_cxx_postfix_expression): Handle
241 (pp_cxx_unary_expression): Handle SIZEOF_EXPR and ALIGNOF_EXPR.
242 (pp_cxx_expression): Handle ARROW_EXPR, SIZEOF_EXPR, and
244 * typeck.c (cxx_sizeof_or_alignof_type): Update call to
245 c_sizeof_or_alignof_type for change in parameter type.
247 2005-04-16 Mark Mitchell <mark@codesourcery.com>
250 * typeck.c (cxx_sizeof_or_alignof_type): Check whether the type to
251 which sizeof/alignof is dependent, rather than just whether we are
252 processing_template_decl.
254 2005-04-17 Kazu Hirata <kazu@cs.umass.edu>
256 * cp-tree.h (LOOKUP_GLOBAL): Remove.
257 (LOOKUP_ONLYCONVERTING, DIRECT_BIND, LOOKUP_NO_CONVERSION,
258 LOOKUP_DESTRUCTOR, LOOKUP_NO_TEMP_BIND, LOOKUP_PREFER_TYPES,
259 LOOKUP_PREFER_NAMESPACES, LOOKUP_CONSTRUCTOR_CALLABLE): Adjust
262 2005-04-15 Richard Henderson <rth@redhat.com>
265 * semantics.c (finish_call_expr): Call resolve_overloaded_builtin.
267 2005-04-15 Kazu Hirata <kazu@cs.umass.edu>
269 * cp-tree.h (lang_type_class): Remove redefined. Move
270 java_interface into where redefined was. Increment the width
272 (TYPE_REDEFINED): Remove.
274 2005-04-14 Kazu Hirata <kazu@cs.umass.edu>
276 * cp-tree.h (SET_TMPL_ARG, ENUM_TI_TEMPLATE, ENUM_TI_ARGS,
277 CLASSTYPE_TEMPLATE_LEVEL): Remove.
279 2005-04-11 Mark Mitchell <mark@codesourcery.com>
281 * decl2.c (determine_visibility): Don't use export_class_data.
282 (import_export_decl): Honor TARGET_CXX_CLASS_DATA_ALWAYS_WEAK and
283 TARGET_CXX_DETERMINE_CLASS_DATA_VISIBILITY.
285 2005-04-09 Kazu Hirata <kazu@cs.umass.edu>
287 * cp-tree.h (cxx_alignof): Remove.
289 * cp-tree.h (DECL_ARRAY_DELETE_OPERATOR_P): Remove.
291 * cp-tree.h (EXCEPTION_CLEANUP_NAME, B_SET, B_CLR, B_TST,
292 CONV_STATIC_CAST): Remove.
294 * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Remove.
296 * cp-tree.h (VF_BINFO_VALUE, VF_BASETYPE_VALUE): Remove.
298 * cp-tree.h (cp_deprecated): Remove.
300 2005-04-08 Ian Lance Taylor <ian@airs.com>
302 * cp-tree.def: Define FOR_STMT, WHILE_STMT, DO_STMT, BREAK_STMT,
303 CONTINUE_STMT, SWITCH_STMT.
304 * cp-tree.h (cp_stmt_codes): Add FOR_STMT, WHILE_STMT, DO_STMT,
305 BREAK_STMT, CONTINUE_STMT, SWITCH_STMT.
306 (WHILE_COND, WHILE_BODY): Define.
307 (DO_COND, DO_BODY): Define.
308 (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY): Define.
309 (SWITCH_STMT_COND, SWITCH_STMT_BODY, SWITCH_STMT_TYPE): Define.
310 * cp-gimplify.c (enum bc_t): Define.
311 (struct cp_gimplify_ctx, ctxp): Define.
312 (push_context, pop_context): New static functions.
313 (begin_bc_block, finish_bc_block): New static functions.
314 (build_bc_goto): New static function.
315 (gimplify_cp_loop, gimplify_for_stmt): New static functions.
316 (gimplify_while_stmt, gimplify_do_stmt): Likewise.
317 (gimplify_switch_stmt): Likewise.
318 (cp_gimplify_expr): Handle FOR_STMT, WHILE_STMT, DO_STMT,
319 SWITCH_STMT, CONTINUE_STMT, BREAK_STMT.
320 (cp_genericize): Call push_context and pop_context.
321 * semantics.c (finish_break_stmt): Just call build_stmt
322 (BREAK_STMT) rather than build_break_stmt.
323 (finish_continue_stmt): Corresponding change.
324 * decl.c (pop_switch): Update call to c_do_switch_warnings for new
326 * cxx-pretty-print.c (pp_cxx_statement): Handle SWITCH_STMT,
327 WHILE_STMT, DO_STMT, FOR_STMT, BREAK_STMT, CONTINUE_STMT.
328 * dump.c (cp_dump_tree): Likewise.
330 2005-04-08 Mark Mitchell <mark@codesourcery.com>
333 * parser.c (cp_parser_type_specifier_seq): Add is_condition
335 (cp_parser_new_type_id): Pass it.
336 (cp_parser_condition): Likewise.
337 (cp_parser_conversion_type_id): Likewise.
338 (cp_parser_type_id): Likewise.
339 (cp_parser_type_specifier_seq): In a condition, do not allow
340 invalid type-specifier combinations.
341 (cp_parser_exception_declaration): Adjust call to
342 cp_parser_type_specifier_seq.
344 * cp-tree.def (TINST_LEVEL): Document TINST_IN_SYSTEM_HEADER_P.
345 * cp-tree.h (struct tinst_level): Add in_system_header_p.
346 (TINST_IN_SYSTEM_HEADER_P): New macro.
347 (make_tinst_level): Remove.
348 * pt.c (lookup_template_class): Preserve DECL_IN_SYSTEM_HEADER on
349 the instantiated class.
350 (push_tinst_level): Do not use make_tinst_level. Set
351 TINST_IN_SYSTEM_HEADER_P.
352 (pop_tinst_level): Likewise.
353 (instantiate_class_template): Set in_system_header.
354 (instantiate_pending_templates): Likewise.
355 * tree.c (make_tinst_level): Remove.
357 2005-04-06 Joseph S. Myers <joseph@codesourcery.com>
359 * decl.c (start_decl): Apply pending #pragma weak regardless of
362 2005-04-06 Mark Mitchell <mark@codesourcery.com>
365 * pt.c (regenerate_decl_from_template): Copy attributes for
366 parameters from the pattern to the instantiation.
368 2005-04-05 Mark Mitchell <mark@codesourcery.com>
371 * cp-tree.def (OFFSET_REF): Correct comments.
372 * init.c (build_offset_ref): Remove misleading comment.
373 * typeck.c (build_unary_op): Handle pointer-to-member creation
374 here, rather than ...
375 (unary_complex_lvalue): ... here.
377 2005-04-06 Jason Merrill <jason@redhat.com>
380 * tree.c (stabilize_init): Don't bother trying to stabilize
381 something with no side-effects.
383 2005-04-05 Mark Mitchell <mark@codesourcery.com>
386 * decl.c (grokdeclarator): Correct attribute handling.
388 2005-04-05 Mark Mitchell <mark@codesourcery.com>
391 * decl2.c (import_export_decl): Use non-COMDAT external linkage
392 for virtual tables, typeinfo, etc. that will be emitted in only
393 one translation unit on systems without weak symbols.
395 2005-04-04 Mark Mitchell <mark@codesourcery.com>
398 * parser.c (cp_parser_template_name): Fix thinko.
400 2005-04-04 Nathan Sidwell <nathan@codesourcery.com>
403 * method.c (use_thunk): Protect covariant pointer return
404 adjustments from NULL pointers.
406 2005-04-04 Jan Hubicka <jh@suse.cz>
408 * decl2.c (finish_objects): Revert my previous patch.
409 (cp_finish_file): Likewise.
411 2005-04-03 Kazu Hirata <kazu@cs.umass.edu>
413 * pt.c: Fix comment typos.
415 2005-04-03 Nathan Sidwell <nathan@codesourcery.com>
418 * pt.c (more_specialized_fn): Member functions are unordered wrt
419 non-members. Conversion operators are unordered wrt other
422 2005-04-01 Nathan Sidwell <nathan@codesourcery.com>
424 * call.c (add_template_candidates_real): Remove length parameter
425 from fn_type_unification call.
426 * class.c (resolve_address_of_overloaded_function): Likewise
427 * cp-tree.h (fn_type_unification): Remove length parameter.
428 * pt.c (get_bindings_overload): Remove.
429 (get_bindings_real): Rename to ...
430 (get_bindings): ... here. Remove length and strict
431 parameters. Change return type flag to boolean. Remove original
433 (determine_specialization): Adjust get_bindings call.
434 (fn_type_unification): Remove length parameter. Adjust.
435 (type_unification_real): Remove length parameter. Adjust.
436 (resolve_overloaded_unification): Adjust get_bindings call.
437 (try_one_overload): Simplify confusing cascaded if control flow.
438 (unify): Remove length paramter from type_unification_real call.
439 (most_specialized_instantiation): Adjust get_bindings calls.
440 (most_specialized): Likewise.
442 2005-03-31 Nathan Sidwell <nathan@codesourcery.com>
444 PR c++/19203, implement DR 214
445 * call.c (joust): Use more_specialized_fn.
446 * cp-tree.h (DEDUCE_ORDER): Remove.
447 (more_specialized): Replace with ...
448 (more_specialized_fn): ... this.
449 * pt.c (maybe_adjust_types_for_deduction): Remove DEDUCE_ORDER
451 (type_unification_real): Remove DEDUCE_ORDER case.
452 (more_specialized): Replace with ...
453 (more_specialized_fn): ... this. Implement DR 214.
454 (most_specialized_instantiation): Use get_bindings_real directly.
456 2005-03-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
459 * call.c (build_new_op): Remove check for -Wsynth.
461 2005-03-31 Jan Hubicka <jh@suse.cz>
463 * decl2.c (finish_objects): Mark ctor as needed.
464 (cp_finish_file): Output variables only in nonunit-at-a-time.
466 2005-03-29 Richard Henderson <rth@redhat.com>
469 * decl.c (cp_complete_array_type): Rename from complete_array_type.
470 Use the new complete_array_type in c-common.c. Update all callers.
471 * cp-tree.h (cp_complete_array_type): Update to match.
473 2005-03-24 Geoffrey Keating <geoffk@apple.com>
475 * typeck.c (build_static_cast_1): Allow scalar_cast between
476 any integral, floating, or enumeration type.
478 2005-03-24 Steven Bosscher <stevenb@suse.de>
480 * typeck.c (comptypes): First determine if the types are compatible
481 from a target-independent point of view. Check target attributes
484 * class.c (build_base_path):
485 (build_vbase_offset_vtbl_entries):
486 (add_vcall_offset): Replace fold (buildN (...)) with fold_buildN.
487 * error.c (dump_expr): Likewise.
488 * init.c (build_zero_init, expand_cleanup_for_base,
489 build_vec_delete_1): Likewise.
490 * mangle.c (write_integer_cst): Likewise.
491 * method.c (thunk_adjust): Likewise.
492 * pt.c (convert_nontype_argument, tsubst, unify): Likewise.
493 * tree.c (cxx_print_statistics, array_type_nelts_total): Likewise.
494 * typeck.c (build_ptrmemfunc_access_expr,
495 (get_member_function_from_ptrfunc): Likewise.
497 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
499 * cp-objcp-common.h (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
501 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
503 * cp-tree.h (perform_integral_promotions): Remove.
504 (default_conversion): Add.
506 2005-03-22 Mark Mitchell <mark@codesourcery.com>
508 * parser.c (cp_parser_warn_min_max): New function.
509 (cp_parser_binary_expression): Use it.
510 (cp_parser_assignment_operator_opt): Likewise.
511 (cp_parser_operator): Likewise.
513 2005-03-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
516 * decl.c (start_preparsed_function): Robustify.
518 2005-03-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
521 * parser.c (cp_parser_class_head): Return NULL_TREE when
522 encountering a redefinition.
524 2005-03-22 Nathan Sidwell <nathan@codesourcery.com>
528 * typeck.c (build_ptrmemfunc): Allow OFFSET_REF when processing a
531 2005-03-21 Paolo Carlini <pcarlini@suse.de>
535 * init.c (emit_mem_initializers): Don't crash on undefined
538 2005-03-21 Paolo Carlini <pcarlini@suse.de>
541 * semantics.c (finish_stmt_expr_expr): Return immediately
542 if error_operand_p (expr).
544 2005-03-21 Joseph S. Myers <joseph@codesourcery.com>
546 * cp-tree.h (lvalue_or_else, lvalue_p): New.
547 * typeck.c (lvalue_or_else): New. Call lvalue_error.
549 2005-03-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
552 * decl.c (decls_match): Compare context of VAR_DECL.
554 2005-03-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
557 * parser.c (cp_parser_postfix_expression) <case RID_TYPENAME>:
558 Check the return value of cp_parser_nested_name_specifier.
560 2005-03-18 Dale Johannesen <dalej@apple.com>
562 * cp/tree.c (cp_tree_equal): Handle SSA_NAME.
564 2005-03-18 Paolo Carlini <pcarlini@suse.de>
567 * parser.c (cp_parser_diagnose_invalid_type_name):
568 Check TYPE_BINFO (current_class_type) before attempting
569 to emit inform messages.
571 2005-03-17 Paolo Carlini <pcarlini@suse.de>
574 * cp-tree.h (grok_op_properties): Change return type to void.
575 * decl.c (grok_op_properties): Return early - don't check the
576 arity - in case of a static member or an operator that cannot
577 be non-member; tidy a bit.
579 2005-03-17 Nathan Sidwell <nathan@codesourcery.com>
582 * pt.c (contains_dependent_cast_p): Remove.
583 (fold_non_dependent_expr): Don't use it.
584 (value_dependent_expression_p): Use a switch statement.
585 reference_exprs can be dependent.
587 2005-03-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
591 * name-lookup.c (pushtag): Skip template parameter scope when
592 scope is ts_global. Don't push tag into template parameter
594 * pt.c (instantiate_class_template): Reorder friend class
595 template substitution to handle non-dependent friend class
596 that hasn't been previously declared.
598 2005-03-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
600 Friend class name lookup 5/n
602 * cp-tree.h (pushtag): Adjust declaration.
603 * decl.c (lookup_and_check_tag): Call lookup_type_scope if
605 (xref_tag): Adjust call to pushtag. Make hidden class visible.
606 (start_enum): Adjust call to pushtag.
607 * name-lookup.c (ambiguous_decl): Ignore hidden names.
608 (qualify_lookup): Change return type to bool.
609 (hidden_name_p): New function.
610 (lookup_namespace_name, unqualified_namespace_lookup,
611 lookup_name_real): Use it.
612 (lookup_type_scope): Update comments.
613 (maybe_process_template_type_declaration): Change parameter name
614 from globalize to is_friend.
615 (pushtag): Change globalize parameter of type int to tag_scope.
616 Hide name if introduced by friend declaration.
617 * name-lookup.h (hidden_name_p): Add declaration.
618 * parser.c (cp_parser_lookup_name): Don't deal with hidden name
620 * pt.c (push_template_decl_real): Make hidden class template
622 (lookup_template_class, instantiate_class_template): Adjust call
624 * semantics.c (begin_class_definition): Likewise.
625 * rtti.c (init_rtti_processing, build_dynamic_cast_1,
626 tinfo_base_init, emit_support_tinfos): Use ts_current instead of
629 2005-03-13 Mark Mitchell <mark@codesourcery.com>
632 * pt.c (determine_specialization): Reject non-specializations.
634 2005-03-11 Per Bothner <per@bothner.com>
636 * cp-tree.h (struct cp_declarator): New id_loc field.
637 * cp/parser.c (cp_lexer_get_preprocessor_token): Set cp_token's
638 location using c_lex_with_flags, instead of input_location.
639 (cp_parser_direct_declarator): Set declarator's id_loc from
642 2005-03-10 Jakub Jelinek <jakub@redhat.com>
644 PR c++/18384, c++/18327
645 * decl.c (reshape_init_array): Use UHWI type for max_index_cst
646 and index. Convert max_index to size_type_node if it isn't
649 2005-03-09 Mark Mitchell <mark@codesourcery.com>
652 * pt.c (tsubst_decl): Apply array-to-pointer and
653 function-to-pointer conversions to function arguments.
654 (regenerate_decl_from_template): Likewise.
656 2005-03-09 Paolo Carlini <pcarlini@suse.de>
659 * decl.c (complete_array_type): In pedantic mode, return
660 3 for an empty initializer list as the initializer for an
661 array of unknown bound (8.5.1/4).
662 (maybe_deduce_size_from_array_init): Fix final test to use
665 2005-03-08 Nathan Sidwell <nathan@codesourcery.com>
668 * pt.c (contains_dependent_cast_p): New.
669 (fold_non_dependent_expr): Call it.
671 2005-03-08 Mark Mitchell <mark@codesourcery.com>
674 * cp-tree.h (target_type): Remove.
675 * decl.c (layout_var_decl): Remove #if 0'd code.
676 (cp_finish_decl): Remove dead code.
677 * init.c (build_vec_init): When determining whether or not the
678 element type has an asignment operator, look through all array
680 * typeck.c (target_type): Remove.
682 2005-03-07 Mark Mitchell <mark@codesourcery.com>
684 * class.c (finish_struct_1): Do not warn about non-virtual
685 destructors in Java classes.
687 2005-03-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
690 * init.c (build_offset_ref): Don't build non-dependent SCOPE_REF.
691 * pt.c (build_non_dependent_expr): Don't build NON_DEPENDENT_EXPR
693 * typeck.c (build_x_unary_op): Don't build non-dependent SCOPE_REF.
694 Also set PTRMEM_OK_P for NON_DEPENDENT_EXPR.
695 (build_unary_op): Handle building ADDR_EXPR of OFFSET_REF inside
698 2005-03-02 Alexandre Oliva <aoliva@redhat.com>
700 * name-lookup.c (push_overloaded_decl): Don't error if the new
701 decl matches the old one.
702 * decl.c (redeclaration_error_message): Likewise.
704 2005-03-01 Per Bothner <per@bothner.com>
706 * decl.c (finish_function): Use SET_EXPR_LOCATION instead of
707 unavailable annotate_with_file_line, if USE_MAPPED_LOCATION.
709 2005-03-01 Nathan Sidwell <nathan@codesourcery.com>
712 * class.c (update_vtable_entry_for_fn): Don't crash on invalid
715 * cp-tree.g (THUNK_TARGET): Expand comment.
716 * method.c (use_thunk): Make sure we also use the target, if that
719 2005-02-27 Jakub Jelinek <jakub@redhat.com>
722 * decl.c (cxx_comdat_group): Put thunks for
723 TARGET_USE_LOCAL_THUNK_ALIAS_P (function) functions into the same
724 comdat group as the thunk target.
726 2005-02-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
728 * call.c, class.c, cp-tree.h, decl2.c, error.c, init.c, mangle.c,
729 parser.c: Fix comment typo(s).
731 2005-02-24 Jakub Jelinek <jakub@redhat.com>
734 * decl.c (reshape_init): Don't warn about missing braces if STRING_CST
735 initializes a char/wchar_t array.
737 2005-02-23 Mark Mitchell <mark@codesourcery.com>
740 * decl.c (grokvardecl): Set DECL_INTERFACE_KNOWN for declarations
741 with internal linkage.
743 2005-02-23 Alexandre Oliva <aoliva@redhat.com>
745 * decl.c (grokvardecl): Don't exempt anonymous types from having
746 linkage for variables that have linkage other than "C".
748 2005-02-23 Kazu Hirata <kazu@cs.umass.edu>
750 * cp-objcp-common.h, error.c: Update copyright.
752 2005-02-22 Mark Mitchell <mark@codesourcery.com>
755 * decl.c (start_decl_1): Don't clear TREE_READONLY.
756 (cp_finish_decl): Likewise.
757 (complete_vars): Call cp_apply_type_quals_to_decl.
758 * typeck.c (cp_apply_type_quals): Avoid setting TREE_READONLY in
759 cases where that's not valid.
762 * init.c (integral_constant_value): Iterate if the value of a decl
763 is itself a constant.
766 * parser.c (cp_parser_class_head): Check for redefintions here.
767 * semantics.c (begin_class_definition): Not here.
770 * decl2.c (build_anon_union_vars): Add type parameter.
771 (finish_anon_union): Pass it.
774 * error.c (dump_expr): Do not print the body of a BIND_EXPR.
775 Handle STATEMENT_LIST.
778 * parser.c (cp_parser_direct_declarator): Always complain about
779 non-constant array bounds when in a function scope.
780 * semantics.c (finish_id_expression): Do not mark dependent names
783 2005-02-21 Douglas Gregor <dgregor@cs.indiana.edu>
787 * cp-tree.h (cp_apply_type_quals_to_decl): Declared.
788 * decl.c (grokdeclarator): Pedwarn about qualifying a function
790 Add qualifiers when declaring a typedef of a function type.
791 Member function pointers pick up the qualifiers of the typedef
792 used to declare them.
793 Don't complain about creating cv-qualified function types.
794 Complain about qualified function typedefs that are used to
795 declare non-static member functions or free functions.
796 Use cp_apply_type_quals_to_decl.
797 (start_preparsed_function): Use cp_apply_type_quals_to_decl.
798 (grokclassfn): Use cp_apply_type_quals_to_decl.
799 * error.c (dump_type_suffix): Print qualifiers for function
801 * pt.c (tsubst_decl): Use cp_apply_type_quals_to_decl.
802 (tsubst): When substituting a function type into a member
803 pointer type, pass along the qualifiers.
804 (unify): Unify member pointers to member function pointers.
805 * tree.c (cp_build_qualified_type_real): Function types may be
806 qualified. This includes restrict qualifiers.
807 * typeck.c (cp_apply_type_quals_to_decl): New function to replace
808 use of c_apply_type_quals_to_decl. Drops qualifiers that are being
809 added to function types.
811 2005-02-20 Zack Weinberg <zack@codesourcery.com>
814 * cp-objcp-common.h (LANG_HOOKS_TO_TARGET_CHARSET): Set to
815 c_common_to_target_charset. Delete bogus comment.
817 2005-02-18 Richard Henderson <rth@redhat.com>
820 * except.c (do_get_exception_ptr): New.
821 (expand_start_catch_block): Use it.
823 2005-02-19 Jakub Jelinek <jakub@redhat.com>
825 * decl.c (start_decl_1): Only check TYPE_NEEDS_CONSTRUCTING
826 if type is not error_mark_node.
828 2005-01-20 Giovanni Bajo <giovannibajo@gcc.gnu.org>
831 * decl2.c (grokfield): Do not apply attributes to template parameters
832 as they are ignored by tsubst anyway.
834 2005-02-18 Jakub Jelinek <jakub@redhat.com>
837 * decl.c (start_decl_1): Clear TREE_READONLY flag if
838 its type has TYPE_NEEDS_CONSTRUCTING.
839 (complete_vars): Likewise.
841 2005-02-17 Alexandre Oliva <aoliva@redhat.com>
844 * class.c (finish_struct): Initialize TYPE_SIZE_UNIT of a
845 template along with TYPE_SIZE.
848 * semantics.c (perform_deferred_access_checks): Use
849 get_deferred_access_checks to get the top of the stack.
851 2005-02-15 Alexandre Oliva <aoliva@redhat.com>
854 * class.c (add_implicitly_declared_members, check_field_decl)
855 (check_field_decls, check_bases): Remove arguments, tests and
856 assignments of cant_have_default_ctor-related variables.
858 2005-02-15 Alexandre Oliva <aoliva@redhat.com>
860 * decl2.c (mark_used): Set the source location of the used decl to
861 the current input location here...
862 * method.c (synthesize_method): ... not here. Set input_location
863 from the decl instead.
865 2005-02-14 Nathan Sidwell <nathan@codesourcery.com>
868 * parser.c (cp_parser_late_parsing_for_member): Use
869 current_function_decl as scope to push to and from.
872 * pt.c (check_explicit_specialization): Make sure namespace
873 binding lookup found an overloaded function.
874 (lookup_template_function): Just assert FNS is an overloaded
878 * decl.c (grokdeclarator): Check for error mark node in ptrmem
881 2005-02-14 Alexandre Oliva <aoliva@redhat.com>
884 * decl.c (redeclaration_error_message): Report redefinition of
885 pure virtual function.
887 2005-02-14 Nathan Sidwell <nathan@codesourcery.com>
890 * class.c (build_simple_base_path): Build the component_ref
892 (update_vtable_entry_for_fn): Walk the covariant's binfo chain
893 rather than using lookup_base.
894 * search.c (dfs_walk_once): Add non-recursive assert check.
895 * typeck.c (build_class_member_access_expr): It is possible for
896 the member type to be both const and volatile.
898 2005-02-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
902 * pt.c (maybe_check_template_type): Remove.
903 * cp-tree.h (maybe_check_template_type): Remove prototype.
904 * name-lookup.c (maybe_process_template_type_declaration): Don't
905 use maybe_check_template_type.
907 2005-02-11 Richard Henderson <rth@redhat.com>
910 * pt.c (get_mostly_instantiated_function_type): Save and restore
911 flag_access_control instead of push/pop_access_scope.
913 2005-02-10 Mark Mitchell <mark@codesourcery.com>
916 * decl.c (reshape_init): Issue warnings about missing braces.
918 2005-02-11 Kazu Hirata <kazu@cs.umass.edu>
920 * cp-tree.def, except.c, ptree.c: Update copyright.
922 2005-02-09 Mark Mitchell <mark@codesourcery.com>
925 * call.c (build_op_delete_call): Check COMPLETE_TYPE_P before
926 attempting name lookup.
928 * parser.c (cp_parser_unqualified_id): Initialize type_decl.
931 * call.c (initialize_reference): Robustify.
934 * decl.c (grokdeclarator): Check for invalid use of destructor
938 * parser.c (cp_parser_unqualified_id): Avoid creating destructor
939 names with invalid types.
942 * parser.c (cp_parser_direct_declarator): Allow type-dependent
943 expressions as array bounds.
946 * parser.c (cp_parser_attributes_list): Allow empty lists.
948 2005-02-08 Mark Mitchell <mark@codesourcery.com>
951 * class.c (add_method): Don't set TYPE_HAS_DESTRUCTOR.
952 (check_bases): Give warnings about a base class with a
953 non-virtual destructor, even if it is implicit.
954 (finish_struct_bits): Don't copy TYPE_HAS_DESTRUCTOR.
955 (maybe_warn_about_overly_private_class): Don't use
957 (finish_struct_methods): Don't set TYPE_HAS_DESTRUCTOR.
958 (check_for_override): Give it external linkage.
959 (add_implicitly_declared_members): Generate destructors lazily.
960 (check_field_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not
962 (check_bases_and_members): Call check_methods before
964 (check_bases_and_members): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not
966 (finish_struct_1): Do not use TYPE_HAS_DESTRUCTOR.
967 * cp-tree.def (PSEUDO_DTOR_EXPR): Document.
968 * cp-tree.h (TYPE_HAS_DESTRUCTOR): Remove.
969 (lang_type_class): Add lazy_destructor.
970 (CLASSTYPE_LAZY_DESTRUCTOR): New macro.
971 (CLASSTYPE_DESTRUCTORS): Robustify.
972 (TYPE_HAS_DESTRUCTOR): Remove.
973 (check_for_override): Declare.
974 (build_vbase_delete): Remove.
975 * cvt.c (convert_to_void): Issue errors about pseudo-destructor
977 * decl.c (cxx_maybe_build_cleanup): Remove dead code.
978 * except.c (dtor_nothrow): Lazily create destructors if necessary.
979 (build_throw): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
980 * init.c (build_delete): Lazily create destructors, if necessary.
981 (build_vbase_delete): Remove.
982 * method.c (locate_dtor): Simplify.
983 (implicitly_declare_fn): Add support for destructors.
984 * parser.c (cp_parser_lookup_name): Lazily create destructors, if
986 * pt.c (check_explicit_specialization): Don't use
988 (instantiate_class_template): Likewise.
989 * ptree.c (cxx_print_type): Don't print TYPE_HAS_DESTRUCTOR.
990 * rtti.c (emit_support_tinfos): Robustify.
991 * search.c (lookup_fnfields_1): Lazily create destructors.
992 * typeck.c (build_class_member_access_expr): Remove
993 PSEUDO_DTOR_EXPR handling.
994 (lookup_destructor): Likewise.
996 2005-02-08 Kazu Hirata <kazu@cs.umass.edu>
998 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h: Update
1001 2005-02-07 Mark Mitchell <mark@codesourcery.com>
1003 * parser.c (cp_lexer_start_debugging): Avoid arithmetic operations
1004 on boolean variables.
1005 (cp_lexer_stop_debugging): Likewise.
1007 2005-02-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1010 * parser.c (cp_parser_pure_specifier): Emit a specific error
1011 message with an invalid pure specifier.
1012 * decl2.c (grok_function_init): Remove.
1013 (grokfield): An initializer for a method is a always a pure
1016 2005-02-02 Matt Austern <austern@apple.com>
1019 * cp-tree.h (builtin_valid_in_constant_expr_p): Declare.
1020 * parser.c (cp_parser_postfix_expression): Accept function call in
1021 constant expression if builtin_valid_in_constant_expr_p is true
1023 * pt.c (value_dependent_expression_p): Handle CALL_EXPRs properly.
1024 * semantics.c (finish_id_expression): Accept function call in constant
1025 expression if builtin_valid_in_constant_expr_p is true for that
1027 * tree.c (builtin_valid_in_constant_expr_p): New.
1029 2005-02-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1032 * pt.c (check_instantiated_args): Improve error message.
1033 Fix logic when to print its second part.
1035 2005-02-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1037 * cp-tree.h (complete_type_or_else): Remove macro.
1038 (complete_type_or_diagnostic): Rename to complete_type_or_else
1039 and remove last argument.
1040 * typeck.c (complete_type_or_diagnostic): Rename to
1041 complete_type_or_else and remove last argument.
1043 2005-02-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1045 * cp-tree.h (commonparms): Remove prototype.
1046 (convert_arguments): Likewise.
1047 (PFN_FROM_PTRMEMFUNC): Remove.
1048 * typeck.c (commonparms): Make static.
1049 (convert_arguments): Add prototype. Make static.
1050 (PFN_FROM_PTRMEMFUNC): Replace by pfn_from_ptrmemfunc.
1052 2005-01-31 Mark Mitchell <mark@codesourcery.com>
1054 * parser.c (cp_parser_primary_expression): Don't complain about
1055 floating-point literals in integral constant expressions when
1058 2005-02-01 Alexandre Oliva <aoliva@redhat.com>
1060 * parser.c (cp_parser_template_id): Revert comment patch too.
1065 * parser.c (cp_parser_template_id): Revert 2004-12-09's patch.
1066 Issue an error when creating the template id.
1067 * pt.c (fn_type_unification): Return early if the explicit
1068 template arg list is an error_mark_node.
1070 2005-01-31 Mark Mitchell <mark@codesourcery.com>
1072 * decl.c (build_enumerator): Do not issue duplicate error messages
1073 about invalid enumeration constants.
1074 * parser.c (cp_parser_non_integral_constant_expression): Always
1075 set parser->non_integral_constant_expression_p.
1076 (cp_parser_primary_expression): Add cast_p parameter. Issue
1077 errors about invalid uses of floating-point literals in
1079 (cp_parser_postfix_expression): Add cast_p parameter.
1080 (cp_parser_open_square_expression): Pass it.
1081 (cp_parser_parenthesized_expression_list): Add cast_p parameter.
1082 (cp_parser_unary_expression): Likewise.
1083 (cp_parser_new_placement): Pass it.
1084 (cp_parser_direct_new_declarator): Likewise.
1085 (cp_parser_new_initializer): Likewise.
1086 (cp_parser_cast_expression): Add cast_p parameter.
1087 (cp_parser_binary_expression): Likewise.
1088 (cp_parser_question_colon_clause): Likewise.
1089 (cp_parser_assignment_expression): Likewise.
1090 (cp_parser_expression): Likewise.
1091 (cp_parser_constant_expression): If an integral constant
1092 expression is invalid, return error_mark_node.
1093 (cp_parser_expression_statement): Pass cast_p.
1094 (cp_parser_condition): Likewise.
1095 (cp_parser_iteration_statement): Likewise.
1096 (cp_parser_jump_statement): Likewise.
1097 (cp_parser_mem_initializer): Likewise.
1098 (cp_parser_template_argument): Likewise.
1099 (cp_parser_parameter_declaration): Likewise.
1100 (cp_parser_initializer): Likewise.
1101 (cp_parser_throw_expression): Likewise.
1102 (cp_parser_attribute_list): Likewise.
1103 (cp_parser_simple_cast_expression): Likewise.
1104 (cp_parser_functional_cast): Likewise.
1105 (cp_parser_late_parsing_default_args): Likewise.
1106 (cp_parser_sizeof_operand): Save/restore
1107 non_integral_constant_expression_p.
1109 2005-01-31 Mike Stump <mrs@apple.com>
1111 * parser.c (cp_lexer_new_main): Get the first token, first, before
1114 2005-01-31 Mark Mitchell <mark@codesourcery.com>
1116 * decl.c (start_decl): Add missing parentheses.
1118 2005-01-30 Mark Mitchell <mark@codesourcery.com>
1121 * cp-tree.h (DECL_USE_TEMPLATE): Expand documentation.
1122 * decl.c (duplicate_decls): Do not discard
1123 DECL_IMPLICIT_INSTANTIATION when merging declarations.
1124 (start_decl): Do not SET_DECL_TEMPLATE_SPECIALIZATION for
1125 variables that do not have DECL_USE_TEMPLATE.
1128 * decl.c (grokdeclarator): Refactor code so that qualified names
1129 are never allowed as the declarator in a typedef.
1132 * name-lookup.c (do_nonmember_using_decl): Avoid overloading
1133 builtin declarations.
1136 * call.c (convert_like_real): Inline call to
1137 dubious_conversion_warnings here.
1138 * cp-tree.h (dubious_conversion_warnings): Remove.
1139 * semantics.c (finish_unary_op_expr): Copy INTEGER_CSTs before
1140 setting TREE_NEGATED_INT.
1141 * typeck.c (dubious_conversion_warnings): Remove.
1144 * name-lookup.c (pushdecl_namespace_level): Avoid accessing free'd
1147 2005-01-28 Mark Mitchell <mark@codesourcery.com>
1150 * parser.c (cp_parser_diagnose_invalid_type_name): Commit to
1154 * pt.c (redeclare_class_template): Robustify.
1156 2005-01-27 Steven Bosscher <stevenb@suse.de>
1158 * decl.c (finish_case_label): Use SWITCH_STMT accessor macros
1159 instead of SWITCH_EXPR ones.
1160 * pt.c (tsubst_expr): Likewise.
1161 * semantics.c (begin_switch_stmt, finish_switch_cond,
1162 finish_switch_stmt): Likewise.
1164 2005-01-26 J"orn Rennecke <joern.rennecke@st.com>
1167 * parser.c (cp_parser_initializer_clause): Initialize *non_constant_p.
1169 2005-01-25 Andrew Pinski <pinskia@physics.uc.edu>
1171 * class.c (abort_fndecl_addr): New variable.
1172 (build_vtbl_initializer): If we have a pure virtual function
1173 share the abort function's address.
1174 Include gt-cp-class.h at the end.
1175 * config-lang.in (gtfiles): Add cp/class.c.
1177 2005-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1179 * cxx-pretty-print.c (pp_cxx_statement): Add prototype. Make static.
1180 (pp_cxx_function_definition): Make static.
1181 * cxx-pretty-print.h (pp_cxx_statement): Remove prototype.
1182 (pp_cxx_function_definition): Likewise.
1184 2005-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1186 * name-lookup.c (print_binding_level): Make static.
1187 (constructor_name_full): Make static inline.
1188 (current_decl_namespace): Make static.
1189 * name-lookup.h (constructor_name_full): Remove prototype.
1190 (print_binding_level): Likewise.
1191 (current_decl_namespace): Likewise.
1193 2005-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1195 * decl.h (debug_bindings_indentation): Remove.
1197 2005-01-23 Kazu Hirata <kazu@cs.umass.edu>
1199 * typeck.c: Fix a comment typo.
1201 2005-01-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1204 * pt.c (fold_decl_constant_value): Always call fold_non_dependent_expr
1206 (tsubst): Use fold_decl_constant_value in place of a bare call to
1207 integral_constant_value.
1209 2005-01-20 Kazu Hirata <kazu@cs.umass.edu>
1211 * typeck.c (more_qualified_p): Remove.
1212 * cp-tree.h: Remove the corresponding prototype.
1214 2005-01-19 Matt Austern <austern@apple.com>
1216 * typeck.c (comptypes): Handle return code from objc_comptypes
1219 2005-01-19 Kazu Hirata <kazu@cs.umass.edu>
1221 * cp-tree.h, name-lookup.h: Remove unused prototypes.
1223 2005-01-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1226 * semantics.c (finish_id_expression): Disable access checking for
1227 already lookuped FIELD_DECL.
1229 2005-01-18 Kazu Hirata <kazu@cs.umass.edu>
1231 * decl.c (delete_block): Remove.
1232 * cp-tree.h: Remove the corresponding prototype.
1234 * decl.c (vtable_decl_p, vtype_decl_p, walk_globals_data,
1235 walk_vtables_r, walk_vtables, walk_globals_r, walk_globals):
1237 * cp-tree.h: Remove the corresponding prototypes.
1239 * tree.c (count_functions, bound_pmf_p, cp_is_overload_p,
1240 cp_update_decl_after_saving, name_p): Remove.
1241 * cp-tree.h: Remove the corresponding prototypes.
1243 2005-01-18 Andrew Pinski <pinskia@physics.uc.edu>
1246 * semantics.c (finish_asm_stmt): Strip nops off
1247 input memory operands.
1249 2005-01-18 Kazu Hirata <kazu@cs.umass.edu>
1251 * Make-lang.in, call.c, cvt.c, init.c, rtti.c, tree.c,
1252 typeck2.c: Update copyright.
1254 2005-01-16 Kazu Hirata <kazu@cs.umass.edu>
1256 * class.c (get_enclosing_class): Remove.
1257 * cp-tree.h: Remove the corresponding prototypes.
1259 * cvt.c (convert_lvalue): Remove.
1260 * cp-tree.h: Remove the corresponding prototype.
1262 * pt.c (tinst_for_decl): Remove.
1263 * cp-tree.h: Remove the corresponding prototypes.
1265 * tree.c (hash_chainon): Remove.
1266 * cp-tree.h: Remove the corresponding prototypes.
1268 2005-01-15 Jakub Jelinek <jakub@redhat.com>
1271 * typeck2.c (split_nonconstant_init_1) <case VECTOR_TYPE>: Put a copy
1272 of CONSTRUCTOR's node into MODIFY_EXPR, as the original is modified.
1274 2005-01-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1276 * Make-lang.in (cp-warn): Don't append $(WERROR).
1278 2005-01-10 Kazu Hirata <kazu@cs.umass.edu>
1280 * cp-tree.h: Fix a comment typo.
1282 2005-01-07 Nathan Sidwell <nathan@codesourcery.com>
1285 * pt.c (tsubst_qualified_id): Call convert_from_reference.
1287 2005-01-06 Mark Mitchell <mark@codesourcery.com>
1290 * class.c (add_implicitly_declared_members): Remove dead code.
1291 * decl.c (grokfndecl): Add sfk parameter. Use it do set
1293 (grokdeclarator): Adjust calls to grokfndecl.
1294 * method.c (implicitly_declare_fn): Improve documentation.
1295 * parser.c (cp_parser_direct_declarator): Do not consider a
1296 function to be a constructor if the containing class was
1297 originally anonymous.
1299 2005-01-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1302 * search.c (lookup_field_1): Handle using declaration in
1303 class template partial specialization.
1305 2005-01-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1308 * pt.c (push_access_scope): Handle friend defined in class.
1309 (pop_access_scope): Likewise.
1311 2005-01-06 Nathan Sidwell <nathan@codesourcery.com>
1314 * pt.c (tsubst_copy) <ARRAY_REF case>: Handle separately.
1315 (tsubst_copy_and_build) <ARRAY_REF case>: Remove obsolete
1316 array-new handling code. Use build_x_binary_op.
1318 2005-01-05 Nathan Sidwell <nathan@codesourcery.com>
1321 * cp-tree.h (start_decl): Take pointer to pushed scope, not bool.
1322 * name-lookup.h (push_scope): Return pushed scope, not flag.
1323 * name-lookup.c (push_scope): Return scope that should be popped,
1325 * decl.c (start_decl): Adjust.
1326 (grokfndecl): Adjust scope push and pop.
1327 * decl2.c (check_classfn): Likewise.
1328 * parser.c (cp_parser_condition, cp_parser_conversion_function_id,
1329 cp_parser_init_declarator, cp_parser_direct_declarator,
1330 cp_parser_class_specifier, cp_parser_class_head,
1331 cp_parser_lookup_name,
1332 cp_parser_constructor_declarator_p): Likewise.
1333 * pt.c (instantiate_class_template,
1334 resolve_typename_type): Likewise.
1336 2005-01-03 Volker Reichelt <reichelt@igpm.rwth-aaachen.de>
1339 * parser.c (cp_parser_unqualified_id): Do not issue error message
1340 for typedef-name as destructor declarator when performing an
1341 uncommitted tentative parse.
1343 2005-01-01 Steven Bosscher <stevenb@suse.de>
1346 * decl.c (finish_function): Fix comment. Annotate the compiler
1347 generated return with the current file name and line 0.
1349 2004-12-31 Richard Henderson <rth@redhat.com>
1352 * call.c (make_temporary_var_for_ref_to_temp): Set DECL_IGNORED_P.
1353 * class.c (build_vtable): Don't conditionallize setting it
1354 based on DWARF2_DEBUG.
1355 (layout_class_type): Set DECL_IGNORED_P.
1356 * decl2.c (get_guard): Likewise.
1357 * rtti.c (get_tinfo_decl, build_lang_decl): Likewise.
1358 * tree.c (build_local_temp): Likewise.
1360 2004-12-30 Mark Mitchell <mark@codesourcery.com>
1362 * cp-tree.h (cp_declarator): Split "name" field into
1363 qualifying_scope and unqualified_name.
1364 * decl.c (get_scope_of_declarator): Adjust accordingly.
1365 (grokdeclarator): Likewise.
1366 * decl2.c (grokfield): Likewise, and adjust call to
1367 do_class_using_decl.
1368 * name-lookup.c (do_class_using_decl): Split "decl" into
1369 "scope" and "name". Remove unnecessary code.
1370 * name-lookup.h (do_class_using_decl): Adjust declaration.
1371 * parser.c (make_id_declarator): Split "id" into qualifying_scope
1372 and unqualified_name.
1373 (cp_parser_using_declaration): Adjust call to do_class_using_decl.
1374 (cp_parser_direct_declarator): Adjust to handle the fact that
1375 cp_parser_declarator_id no longer returns a SCOPE_REF.
1376 (cp_parser_direct_declarator): Likewise.
1377 (cp_parser_declarator_id): Do not create a SCOPE_REF for qualified
1379 (cp_parser_member_declaration): Adjust call to make_id_declarator.
1380 (cp_parser_check_declarator_template_parameters): Do not expect a
1383 * decl.c (duplicate_decls): Call ggc_free on declarations we will
1384 not be needing any longer.
1387 * cvt.c (convert_to_void): Do not use STRIP_NOPs.
1389 2004-12-28 Richard Henderson <rth@redhat.com>
1392 * semantics.c (finish_asm_stmt): Resolve asm names. Validate input
1393 constraints. Mark memory inputs addressable.
1395 2004-12-27 Jason Merrill <jason@redhat.com>
1397 * decl.c (expand_static_init): Don't use shortcut if
1398 targetm.relaxed_ordering.
1400 2004-12-27 Mark Mitchell <mark@codesourcery.com>
1403 * decl.c (check_tag_decl): Robustify.
1405 2004-12-23 Mark Mitchell <mark@codesourcery.com>
1408 * parser.c (cp_parser_error): Issue better messages about
1409 #pragma in locations where it is not permitted.
1412 * pt.c (check_instantiated_args): Remove bogus SFINAE code.
1414 * cvt.c (convert_to_void): Fix typo in comment.
1416 2004-12-23 Alexandre Oliva <aoliva@redhat.com>
1419 * pt.c (check_explicit_specialization): Use the argument list from
1420 the definition in a template function specialization definition.
1422 2004-12-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1425 * pt.c (check_explicit_specialization): Use special logic to validate
1426 befriended specializations.
1428 2004-12-22 Mark Mitchell <mark@codesourcery.com>
1430 * rtti.c (emit_support_tinfos): Avoid using C99 semantics.
1433 * call.c (build_this): In templates, do not bother with
1435 * typeck.c (unary_complex_lvalue): In a template, always refuse
1439 * cp-gimplify.c (cp_genericize): Relax assertion.
1442 * cvt.c (convert_to_void): Warn about unused values.
1445 * rtti.c (emit_support_tinfos): On systems without weak symbols,
1446 emit the runtime library type-info objects as non-COMDAT.
1448 2004-12-21 Mark Mitchell <mark@codesourcery.com>
1451 * call.c (convert_like_real): Do not permit the use of a copy
1452 constructor to copy a packed field.
1455 * decl.c (grokdeclarator): Return error_mark_node, not
1456 void_type_node, to indicate errors.
1457 * parser.c (cp_parser_template_parameter_list): Robustify.
1458 (cp_parser_template_parameter): Likewise.
1461 * tree.c (cp_tree_equal): Handle OVERLOAD.
1463 2004-12-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1465 * decl.c (define_label): Use POP_TIMEVAR_AND_RETURN.
1466 * name-lookup.c (pushdecl_class_level): Likewise.
1468 2004-12-21 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1470 * name-lookup.c (pushtag): Add missing POP_TIMEVAR_AND_RETURN.
1472 2004-12-21 Andrew Pinski <pinskia@physics.uc.edu>
1475 * cp-gimplify.c (cp_genericize_r): Don't insert first but instead
1476 check to see if contains the pointer. Insert the statement before
1479 2004-12-21 Nathan Sidwell <nathan@codesourcery.com>
1482 * decl.c (check_initializer): Check string initializer of array is
1484 * cp-tree.h (PAREN_STRING_LITERAL_P): New.
1485 * semantics.c (finish_parenthesized_expr): Mark a STRING_CST.
1486 * error.c (dump_expr): <STRING_CST case> Add parens, if needed.
1488 * cp-tree.def (TEMPLATE_TYPE_PARM,
1489 BOUND_TEMPLATE_TEMPLATE_PARM, TYPE_OF_TYPE, TYPENAME_TYPE): Reorder
1490 for better code efficiency.
1491 * cp-tree.h (CLASS_TYPE_P): Short circuit IS_AGGR_TYPE check.
1492 (CAN_HAVE_FULL_LANG_DECL_P): Reorder for better optimization.
1493 (INTEGRAL_CODE_P, CP_INTEGRAL_TYPE_P,
1494 INTEGRAL_OR_ENUMERATION_TYPE_P, SCALAR_TYPE_P,
1495 CP_AGGREGATE_TYPE_P, TYPE_PTROB_P, TYPE_REF_OBJ_P,
1496 TYPE_PTROBV_P): Likewise.
1499 * method.c (do_build_copy_constructor): Refactor. Don't const
1500 qualify a mutable field.
1501 (do_build_assign_ref): Likewise.
1503 2004-12-20 Matt Austern <austern@apple.com>
1506 * decl.c (make_rtl_for_nonlocal_decl): Use
1507 set_builtin_user_assembler_name.
1509 2004-12-19 Mark Mitchell <mark@codesourcery.com>
1511 * cp-tree.h (note_decl_for_pch): New function.
1512 * class.c (build_clone): Call note_decl_for_pch.
1513 * semantics.c (finish_member_declaration): Likewise.
1514 (note_decl_for_pch): New function.
1516 2004-12-17 Steven Bosscher <stevenb@suse.de>
1518 * init.c (build_zero_init): max_index is the number of
1521 2004-12-17 Nathan Sidwell <nathan@codesourcery.com>
1524 * class.c (add_method): Do not push conversion operators into a
1527 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE_TYPE): Reformat.
1528 * error.c (dump_decl): <TYPE_DECL case> Remove extraneous braces.
1530 2004-12-16 Nathan Sidwell <nathan@codesourcery.com>
1533 * cp-tree.h (integral_constant_value): Declare.
1534 * call.c (null_ptr_cst_p): Use integral_constant_value, not
1535 decl_constant_value.
1536 (convert_like_real): Likewise.
1537 * class.c (check_bitfield_decl): Likewise.
1538 * cvt.c (ocp_convert): Likewise.
1539 (convert): Remove unnecessary decl_constant_value call.
1540 * decl.c (compute_array_index_type): Use integral_constant_value,
1541 not decl_constant_value.
1542 (build_enumerator): Likewise.
1543 * decl2.c (grokfield): Likewise.
1544 * init.c (decl_constant_value): Simplify.
1545 (integral_constant_value): New.
1546 * pt.c (fold_decl_constant_value): Use integral_constant_value,
1547 remove subsequent check.
1548 (tsubst): Use integral_constant_value, not decl_constant_value.
1549 (tsubst_copy, unify): Likewise.
1550 * typeck.c (decay_conversion): Likewise.
1551 (build_compound_expr): Remove unnecessary decl_constant_value
1553 (build_static_cast_1, build_reinterpret_cast_1):
1554 (convert_for_assignment): Remove comment about not calling
1555 decl_constant_value.
1557 2004-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1560 * pt.c (instantiate_class_template): Set input_location for
1562 (tsubst_friend_function): Don't set input_location here.
1563 Make sure the context is complete if necessary.
1565 2004-12-15 Nathan Sidwell <nathan@codesourcery.com>
1568 * parser.c (cp_parser_lookup_name): Remove unneeded TYPENAME_TYPE
1571 2004-12-14 Mark Mitchell <mark@codesourcery.com>
1574 * decl.c (make_typename_type): Do not handle namespace-scoped
1576 (tag_name): Handle typename_type.
1577 (check_elaborated_type_specifier): Handle typenames.
1578 * parser.c (cp_parser_diagnose_invalid_type_name): Improve
1580 (cp_parser_elaborated_type_specifier): Use
1581 cp_parser_diagnose_invalid_type_name.
1583 2004-12-14 Andrew Pinski <pinskia@physics.uc.edu>
1586 * init.c (build_zero_init): If the max_index is 0, there is no
1587 need to create a RANGE_EXPR.
1589 2004-12-14 Mark Mitchell <mark@codesourcery.com>
1592 * cp-objcp-common.c (cp_expr_size): Loosen assertion.
1594 2004-12-14 Nathan Sidwell <nathan@codesourcery.com>
1597 * pt.c (tsubst_copy_and_build): <INDIRECT_REF case> Check that a
1598 REFERENCE_REF_P is dereferencing a reference type.
1599 * typeck.c (build_static_cast): Convert from reference even in a
1601 (build_reinterpret_cast, build_const_cast, build_c_cast): Likewise.
1603 2004-12-14 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1605 * parser.c (cp_parser_uncommitted_to_tentative_parse_p): New function.
1606 (cp_parser_name_lookup_error): Use it.
1607 (cp_parser_check_for_invalid_template_id): Likewise.
1608 (cp_parser_skip_to_closing_parenthesis): Likewise.
1609 (cp_parser_nested_name_specifier_opt): Likewise.
1610 (cp_parser_simple_declaration, cp_parser_template_id): Likewise.
1611 (cp_parser_parameter_declaration_list): Likewise.
1612 (cp_parser_parameter_declaration): Likewise.
1613 (cp_parser_template_name): Let cp_parser_simulate_error perform
1615 (cp_parser_committed_to_tentative_parse): Remove.
1617 2004-12-13 Andrew Pinski <pinskia@physics.uc.edu>
1620 * class.c (build_base_path): Convert the zero constant to the correct
1621 type when comparing.
1623 2004-12-13 Mark Mitchell <mark@codesourcery.com>
1626 * class.c (layout_class_type): Determine the visibility of static
1629 2004-12-12 Roger Sayle <roger@eyesopen.com>
1632 * cp-gimplify.c (gimplify_if_stmt): Optimize the case where the
1633 condition is a constant and the unexecuted clause is empty.
1635 2004-12-10 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1638 * parser.c (cp_parser_class_head): Reject typedef-name in class head.
1640 2004-12-09 Matt Austern <austern@apple.com>
1643 * name-lookup.c (do_nonmember_using_decl): A real function
1644 declaration takes precedence over an anticipated declaration.
1646 2004-12-09 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1648 * parser.c (cp_parser_member_declaration): Fix comment typo.
1650 2004-12-09 Alexandre Oliva <aoliva@redhat.com>
1653 * parser.c (cp_parser_template_id): Don't create a CPP_TEMPLATE_ID
1656 2004-12-09 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1659 * typeck.c (build_reinterpret_cast_1): Allow cast from vector type.
1661 2004-12-09 Nathan Sidwell <nathan@codesourcery.com>
1664 * init.c (build_zero_init): Build a RANGE_EXPR for an array
1667 2004-12-08 Kelley Cook <kcook@gcc.gnu.org>
1669 * typeck.c: Remove DOS line endings.
1671 2004-12-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1674 * decl.c (lookup_and_check_tag): Diagnose nested class with
1675 the same name as enclosing class.
1677 2004-12-08 Nathan Sidwell <nathan@codesourcery.com>
1680 * cp-tree.h (REFERENCE_REF_P): New.
1681 (CPTI_TYPE_INFO_TYPE): Rename to ...
1682 (CPTI_CONST_TYPE_INFO_TYPE): ... here.
1683 (CPTI_TYPE_INFO_REF_TYPE): Remove.
1684 (type_info_type_node): Rename to ...
1685 (const_type_info_type_node): ... here.
1686 (type_info_ref_type): Remove.
1687 * call.c (build_user_type_conversion): Reformat.
1688 (resolve_args): Do not convert_from_reference.
1689 (build_object_call): Call convert_from_reference.
1690 (prep_operand): Do not convert_from_reference.
1691 (build_new_method_call): Likewise.
1692 * class.c (build_vfield_ref): Likewise.
1693 * cvt.c (convert_to_reference): Likewise.
1694 (convert_from_reference): Build INDIRECT_REF here, not with
1696 (convert_force): Do not convert_from_reference.
1697 (build_expr_type_conversion): Likewise.
1698 * decl.c (grok_reference_init): Likewise.
1699 * decl2.c (delete_sanity): Likewise.
1700 * except.c (initialize_handler_parm): Use POINTER_TYPE_P.
1701 * init.c (build_dtor_call): Do not convert_from_reference.
1702 * parser.c (cp_parser_template_argument): Unwrap indirected
1703 reference. Allow TEMPLATE_PARM_INDEX as an object parm.
1704 * pt.c (tsubst_copy_and_build) <case INDIRECT_REF>: Use
1705 convert_from_reference, if indicated.
1706 <case CALL_EXPR>: Do not convert_from_reference.
1707 <case PARM_DECL, VAR_DECL>: Convert_from_reference if needed.
1708 (tsubst_initializer_list): Do not convert_from_reference.
1709 * rtti.c (init_rtti_processing): Adjust node creation.
1710 (throw_bad_typeid): Use const_type_info_type_node.
1711 Do not convert_from_reference.
1712 (typeid_ok_p): Use const_type_info_type_node.
1713 (build_typeid, get_typeid): Always return type_info typed node.
1714 (build_dynamic_cast_1): Dont convert_from_reference. Refactor.
1715 * semantics.c (finish_stmt_expr_expr): Do not
1716 convert_from_reference.
1717 (finish_id_expression): Convert_from_reference as appropriate.
1718 * typeck.c (decay_conversion): Do not convert_from_reference.
1719 (finish_class_member_access_expr): Likewise.
1720 (build_indirect_ref): Use POINTER_TYPE_P.
1721 (convert_arguments): Do not convert_from_reference.
1722 (build_modify_expr): Likewise.
1723 (convert_for_initialization): Likewise.
1724 * typeck2.c (build_x_arrow): Likewise.
1726 2004-12-07 Ziemowit Laski <zlaski@apple.com>
1728 * cp-tree.h (struct lang_type_class): Rename 'objc_protocols'
1729 field to 'objc_info'.
1731 2004-12-07 Kazu Hirata <kazu@cs.umass.edu>
1733 * pt.c: Replace a use of first_rtl_op with TREE_CODE_LENGTH.
1735 2004-12-07 Roger Sayle <roger@eyesopen.com>
1737 * name-lookup.c (leave_scope): We only need to update
1738 class_binding_level when leaving a class scope.
1740 2004-12-06 Ziemowit Laski <zlaski@apple.com>
1742 * cp-tree.h (struct lang_type_class): Add 'objc_protocols' field.
1744 2004-12-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1746 PR c++/17011, c++/17971
1747 * pt.c (tsubst_copy) <FIELD_DECL case>: Check and diagnose
1749 (tsubst_copy_and_build) <COMPONENT_REF case>: Check
1750 error_mark_node after member substitution.
1751 * semantics.c (finish_id_expression): Call
1752 finish_non_static_data_member for non-dependent FIELD_DECL.
1754 2004-12-03 Nathan Sidwell <nathan@codesourcery.com>
1757 * decl.c (grokdeclarator): Make sure class in pointer to member is
1760 2004-12-02 Nathan Sidwell <nathan@codesourcery.com>
1763 * parser.c (cp_parser_new_type_id): Move array size expression
1764 checks from here ...
1765 * init.c (build_new): ... to here.
1767 2004-12-02 Nathan Sidwell <nathan@codesourcery.com>
1770 * parser.c (cp_parser_class_head): Return NULL_TREE when
1771 push_template_decl fails. Update comment.
1773 2004-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1775 PR c++/15664, c++/18276
1776 * pt.c (tsubst_decl) <TEMPLATE_DECL case>: Reorganize. Correctly
1777 tsubst TEMPLATE_DECL that is a TEMPLATE_TEMPLATE_PARM.
1779 2004-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1782 * parser.c (cp_parser_type_specifier): Catch template declaration
1785 2004-12-01 Matt Austern <austern@apple.com>
1787 * name-lookup.c (namespace_binding): Omit alias check for global
1790 2004-12-01 Nathan Sidwell <nathan@codesourcery.com>
1793 * parser.c (cp_parser_class_name): Check decl's type is not
1797 * call.c (standard_conversion): Add FLAGS parameter. Do not allow
1798 derived to base conversion when checking constructor
1800 (implicit_conversion): Pass FLAGS to standard_conversion.
1801 (check_constructir_callable): Disallow conversion functions.
1803 2004-11-30 Kazu Hirata <kazu@cs.umass.edu>
1805 * parser.c: Fix comment typos.
1807 2004-11-27 Mark Mitchell <mark@codesourcery.com>
1810 * parser.c (cp_parser_check_for_definition_in_return_type): Take
1811 the defined type as a parameter, and inform the user about the
1812 possibility of a missing semicolon.
1813 (cp_parser_explicit_instantiation): Adjust call to
1814 cp_parser_check_for_definition_in_return_type.
1815 (cp_parser_init_declarator): Likewise.
1816 (cp_parser_member_declaration): Likewise.
1819 * cp-tree.def (TYPENAME_TYPE): Remove discussion of implicit
1820 typename from comments.
1821 * cp-tree.h (TYPENAME_IS_ENUM_P): New macro.
1822 (TYPENAME_IS_CLASS_P): Likewise.
1823 (make_typename_type): Change prototype.
1824 * decl.c (struct_typename_info): New type.
1825 (typename_compare): Expect the second argument to be a
1826 typename_info, not a tree.
1827 (build_typename_type): Add tag_type parameter. Do not create a
1828 new type until necessary.
1829 (make_typename_type): Add tag_type parameter.
1830 * error.c (TYPENAME_TYPE): Print tags other than "typename" if
1832 * friend.c (make_friend_class): Adjust call to make_typename_type.
1833 * parser.c (cp_parser_make_typename_type): Likewise.
1834 (cp_parser_primary_expression): Adjust call to
1835 cp_parser_lookup_name.
1836 (cp_parser_unqualified_id): Adjust calls to cp_parser_class_name.
1837 (cp_parser_class_or_namespace_name): Likewise.
1838 (cp_parser_postfix_expression): Adjust calls to
1840 (cp_parser_mem_initializer_id): Adjust calls to
1841 cp_parser_class_name.
1842 (cp_parser_type_parameter): Adjust calls to cp_parser_lookup_name.
1843 (cp_parser_template_name): Likewise.
1844 (cp_parser_template_argument): Likewise.
1845 (cp_parser_type_name): Adjust call to cp_parser_class_name.
1846 (cp_parser_elaborated_type_specifier): Adjust calls to
1847 make_typename_type and cp_parser_lookup_name.
1848 (cp_parser_namespace_name): Likewise.
1849 (cp_parser_class_name): Replace type_p parameter with tag_type.
1850 Adjust calls to make_typename_type and cp_parser_lookup_name.
1851 (cp_parser_class_head): Adjust calls to cp_parser_class_name.
1852 (cp_parser_base_specifier): Likewise.
1853 (cp_parser_lookup_name): Replace is_type parameter with tag_type.
1854 Adjust calls to make_typename_type and lookup_qualified_name.
1855 (cp_parser_lookup_name_simple): Adjust call to
1856 cp_parser_lookup_name.
1857 (cp_parser_constructor_declarator_p): Adjust call to
1858 cp_parser_class_name.
1859 * pt.c (convert_template_argument): Adjust all to
1861 (tsubst_decl): Do not pre-substitute the type of the declaration.
1862 (tsubst): Hand off declarations more quickly. Adjust call to
1866 * parser.c (cp_parser_postfix_dot_deref_expression): Robustify.
1868 2004-11-29 Daniel Jacobowitz <dan@codesourcery.com>
1871 * Make-lang.in (cp/decl2.o): Update dependencies.
1872 * decl2.c (finish_file): Call maybe_apply_pending_pragma_weaks.
1874 2004-11-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1877 * name-lookup.c (pushtag): Change return type to tree.
1878 * cp-tree.h (pushtag): Adjust declaration.
1879 * decl.c (xref_tag, start_enum): Use return value of pushtag.
1880 * pt.c (push_template_decl_real): Return immediately if
1881 pushdecl_namespace_level returns error_mark_node.
1883 2004-11-27 Kazu Hirata <kazu@cs.umass.edu>
1885 * pt.c: Fix a comment typo.
1887 2004-11-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1889 Friend class name lookup 4/n
1890 * class.c (pushclass): Don't call cxx_remember_type_decls.
1891 * cp-tree.h (clear_anon_tags): Remove declaration.
1892 * decl.c (grokdeclarator): Don't call lookup_tag_reverse.
1893 * name-lookup.c (binding_entry_free, binding_table_free): Comment
1895 (binding_table_find_anon_type, binding_table_reverse_maybe_remap,
1896 binding_table_remove_anonymous_types, cxx_remember_type_decls,
1897 bt_print_entry, clear_anon_tags, follow_tag_typedef, lookup_tag,
1898 lookup_tag_reverse): Remove
1899 (begin_scope, leave_scope, kept_level_p, print_binding_level):
1900 Don't use type_decls field in cp_binding_level.
1901 (maybe_process_template_type_declaration, pushtag): Set
1902 CLASSTYPE_NESTED_UTDS directly.
1903 * name-lookup.h (binding_table_remove_anonymous_types,
1904 cxx_remember_type_decls, lookup_tag, lookup_tag_reverse): Remove
1906 (cp_binding_level): Remove type_decls field.
1908 2004-11-26 Kazu Hirata <kazu@cs.umass.edu>
1910 * typeck.c: Fix a comment typo.
1912 2004-11-25 Mark Mitchell <mark@codesourcery.com>
1915 * class.c (instantiate_type): Treat NON_DEPENDENT_EXPRs with
1916 unknown_type as non matching. Tidy up.
1917 * pt.c (build_non_dependent_expr): Do not build a
1918 NON_DEPENDENT_EXPR for a VAR_DECL.
1921 * cp-tree.h (lvalue_or_else): Remove declaration.
1922 * tree.c (lvalue_or_else): Remove.
1923 * typeck.c (build_unary_op): Adjust call to lvalue_or_else.
1924 (build_modify_expr): Likewise.
1927 * decl.c (duplicate_decls): Return error_mark_node on error, as
1931 * decl.c (grokvardecl): Keep track of whether or not a there was
1932 explicit qualification.
1933 * name-lookup.c (set_decl_namespace): Complain about explicit
1934 qualification of a name within its own namespace.
1937 * typeck.c (check_return_expr): Robustify.
1939 2004-11-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1941 Friend class name lookup 3/n, PR c++/3332
1942 * name-lookup.c (push_inner_scope, pop_inner_scope): New functions.
1943 (lookup_type_scope): Don't deal with name from user declaration
1945 * name-lookup.h (push_inner_scope, pop_inner_scope): Add declarations.
1946 * parser.c (cp_parser_class_specifier): Use push_inner_scope and
1949 2004-11-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1951 Friend class name lookup 2/n, PR c++/14513, c++/15410
1952 * name-lookup.c (lookup_name_real): Simplify.
1953 (lookup_type_scope): Add SCOPE parameter. Handle friend class
1955 * name-lookup.h (tag_scope): New enum type.
1956 (lookup_type_scope): Adjust declaration.
1957 * decl.c (lookup_and_check_tag, xref_tag, xref_tag_from_type):
1958 Change bool parameter GLOBALIZED to TAG_SCOPE parameter SCOPE.
1959 (start_enum): Likewise. Add assertion test that NAME is
1960 IDENTIFIER_NODE. Use anonymous name for dummy ENUMERAL_TYPE in
1962 * cp-tree.h (xref_tag, xref_tag_from_type): Adjust declarations.
1963 * parser.c (cp_parser_elaborated_type_specifier,
1964 cp_parser_class_head): Adjust call to xref_tag.
1965 * pt.c (lookup_template_class, instantiate_class_template):
1967 * rtti.c (init_rtti_processing, build_dynamic_cast_1,
1968 tinfo_base_init, emit_support_tinfos): Likewise.
1970 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
1972 * g++spec.c, lex.c: Avoid ` as left quote in diagnostics.
1974 2004-11-24 Mark Mitchell <mark@codesourcery.com>
1977 * name-lookup.c (supplement_binding): Do not allow typedefs to be
1978 redefined in class scope.
1981 * parser.c (cp_parser_set_decl_type_spec): Do not try to allow
1982 redefinitions of builtin types other that "bool" or "wchar_t".
1984 2004-11-24 Steven Bosscher <stevenb@suse.de>
1986 * decl.c (cxx_init_decl_processing): Don't clear
1987 flag_inline_functions.
1989 2004-11-24 Mark Mitchell <mark@codesourcery.com>
1991 * pt.c (tsubst_function_type): Do not permit function types which
1992 return arrays or functions.
1995 * parser.c (cp_parser_init_declarator): Do not pop scope twice.
1998 * cp-tree.h (CTOR_NAME): Remove.
1999 (DTOR_NAME): Remove.
2000 * decl.c (initialize_predefined_identifiers): Add spaces to the
2001 end of constructor and destructor names.
2003 2004-11-24 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2006 * decl.c (start_decl): Check for invalid specialization headers.
2008 2004-11-24 Paolo Bonzini <bonzini@gnu.org>
2012 * call.c (standard_conversion): Move check for conversions between
2014 * typeck.c (ptr_reasonably_similar): ... here.
2016 2004-11-23 Ben Elliston <bje@au.ibm.com>
2018 * cp-tree.h (context_as_string): Remove extern.
2019 * error.c (context_as_string): Remove.
2021 * cp-tree.h (cp_type_qual_from_rid): Remove extern.
2022 * lex.c (cp_type_qual_from_rid): Remove.
2024 * cp-tree.h (do_poplevel): Remove extern.
2025 (check_multiple_declarators): Likewise.
2026 * semantics.c (do_poplevel): Make static.
2027 (check_multiple_declarators): Remove.
2029 * cp-tree.h (check_final_overrider): Remove extern.
2030 * search.c (check_final_overrider): Make static.
2032 * cp-tree.h (build_artificial_parm): Remove extern.
2033 * decl2.c (build_artificial_parm): Make static.
2035 2004-11-22 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2038 * typeck.c (build_unary_op) <CONVERT_EXPR, NEGATE_EXPR>: Unify code.
2039 Make sure the result is always a rvalue.
2041 2004-11-16 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2043 * decl.c (start_preparsed_function): Call check_function_type even
2045 (require_complete_types_for_parms): Skip dependent types.
2046 (check_function_type): Likewise.
2048 2004-11-16 Steven Bosscher <stevenb@suse.de>
2050 * Make-lang.in (cp/decl.o, cp/search.o): Don't depend on stack.h.
2051 * search.c: Don't include it.
2053 2004-11-15 Andrew Pinski <pinskia@physics.uc.edu>
2055 * cp-gimplify.c: Include pointer-set.h
2056 (cp_genericize_r): Use pointer_sets instead of a hashtable.
2057 Also instert the new statement for CLEANUP_STMT.
2058 (cp_genericize): Use pointer_sets instead of a hashtable.
2059 * Make-lang.in (cp-gimplify.o): Depend on pointer-set.h.
2061 2004-11-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2063 Friend class name lookup 1/n, PR c++/18471
2064 * decl.c (lookup_and_check_tag): New function.
2065 (xref_tag, start_enum): Use it.
2066 (check_elaborated_type_specifier): Move TEMPLATE_TYPE_PARM check
2067 before !DECL_IMPLICIT_TYPEDEF_P. Also display previously declared
2069 * name-lookup.c (lookup_name_current_level): Rename to ...
2070 (lookup_name_innermost_nonclass_level): ... this.
2071 (lookup_type_scope): New function.
2072 * name-lookup.h (lookup_name_current_level): Rename to ...
2073 (lookup_name_innermost_nonclass_level): ... this.
2074 (lookup_type_scope): Add declaration.
2076 2004-11-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2079 * pt.c (coerce_template_parms): Only emit error message about
2080 invalid template argument when TF_ERROR.
2082 2004-11-12 Mark Mitchell <mark@codesourcery.com>
2085 * decl.c (start_decl): Make sure to set *pop_scope_p. Return
2086 error_mark_node to indicate errors.
2089 * parser.c (cp_parser_direct_declarator): Disallow non-constant
2090 array bounds when not inside a function.
2093 * pt.c (tsubst_copy_and_build): Do not do Koenig lookup when an
2094 unqualified name resolves to a member function.
2097 * pt.c (tsubst_copy_and_build): Handle qualified names used from a
2098 derived class correctly.
2100 * decl2.c (import_export_decl): Fix typo in comment.
2101 * tree.c (pod_type_p): Likewise.
2103 2004-11-10 Andrew Pinski <pinskia@physics.uc.edu>
2105 * typeck.c (cxx_mark_addressable): Add braces around the first if.
2107 2004-11-10 Adam Nemet <anemet@lnxw.com>
2110 * typeck.c (cxx_mark_addressable): Issue an error if address of an
2111 explicit register variable is requested.
2113 2004-11-10 Nathan Sidwell <nathan@codesourcery.com>
2116 * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK): New.
2117 (struct lang_decl_flags): Add thunk_p flag.
2118 (struct lang_decl): Remove separate fixed_offset. Place
2119 cloned_function and fixed_offset into union.
2120 (DECL_CLONED_FUNCTION_P, DECL_CLONED_FUNCTION): Adjust.
2121 (DECL_THUNK_P, SET_DECL_THUNK_P): Adjust.
2122 (THUNK_FIXED_OFFSET): Adjust.
2123 * method.c (make_thunk): Adjust.
2125 2004-11-09 Mark Mitchell <mark@codesourcery.com>
2128 * init.c (build_new_1): Handle parenthesized type-ids that name an
2131 2004-11-09 Joseph S. Myers <joseph@codesourcery.com>
2133 * call.c, class.c, decl.c, decl2.c, error.c, mangle.c, parser.c,
2134 pt.c, search.c, semantics.c, typeck.c: Use %q, %< and %> for
2135 quoting in diagnostics.
2136 * parser.c (cp_parser_sizeof_operand): Use '' instead of `' for
2137 quoting in printf format.
2138 * decl.c (duplicate_decls, start_decl): Use %qD instead of
2141 2004-11-08 Kazu Hirata <kazu@cs.umass.edu>
2143 * class.c, decl.c, lex.c, name-lookup.c, parser.c, pt.c,
2144 search.c, typeck2.c: Fix comment formatting.
2146 2004-11-04 Ulrich Weigand <uweigand@de.ibm.com>
2148 PR tree-optimization/18184
2149 * cp-objcp-common.c (cxx_types_compatible_p): Do not treat pointers
2150 of different modes or alias-all flags as equivalent.
2151 * typeck.c (comptypes): Likewise.
2153 2004-11-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2156 * cp-tree.h (TYPE_REF_OBJ_P): New macro.
2157 (TYPE_PTR_P, TYPE_PTROB_P, TYPE_PTROBV_P, TYPE_PTRFN_P,
2158 TYPE_REFFN_P): Document.
2159 (fold_decl_constant_value): New prototype.
2160 * pt.c (convert_nontype_argument_function): Rewrite and extract
2162 (fold_decl_constant_value, convert_nontype_argument_function): New.
2163 (lookup_template_class): Add comment about useless double call.
2164 * mangle.c (write_expression): Strip conversions before lowering
2166 * cvt.c (ocp_convert): Check LOOKUP_COMPLAIN for a pedwarn. Disallow
2167 enum to enum conversion.
2169 2004-11-02 Mark Mitchell <mark@codesourcery.com>
2172 * parser.c (cp_parser_type_parameter): Robustify.
2175 * parser.c (cp_parser_single_declaration): Disallow template
2179 * typeck.c (build_const_cast): Use error_operand_p.
2181 2004-11-02 Ziemowit Laski <zlaski@apple.com>
2183 * cp-lang.c (cxx_types_compatible_p): Remove prototype and definition.
2184 (LANG_HOOKS_TYPES_COMPATIBLE_P): Move to cp-objcp-common.h.
2185 * cp-objcp-common.c (cxx_types_compatible_p): Moved definition here
2187 * cp-objcp-common.h (cxx_types_compatible_p): Moved prototype here
2189 (LANG_HOOKS_TYPES_COMPATIBLE_P): Moved here from cp-lang.c.
2191 2004-11-01 Nathan Sidwell <nathan@codesourcery.com>
2194 * search.c (check_final_overrider): Deprecate gnu covariant extension.
2196 2004-10-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
2198 Convert diagnostics to use quoting flag q 9/n
2199 * typeck.c (build_x_unary_op, convert_member_func_to_ptr,
2200 get_delta_difference): Use new quotation style.
2201 * repo.c (reopen_repo_file_for_write): Likewise.
2202 * pt.c (do_type_instantiation): Likewise.
2203 * parser.c (cp_parser_diagnose_invalid_type_name):
2204 * name-lookup.c (push_overloaded_decl, set_decl_namespace):
2205 * error.c (cp_print_error_function,
2206 print_instantiation_full_context): Likewise.
2207 * decl.c (define_label, grok_reference_init,
2208 maybe_deduce_size_from_array_init, revert_static_member_fn):
2209 * decl2.c (check_classfn): Likewise.
2210 * class.c (add_method, check_field_decls, layout_class_type,
2211 resolve_address_of_overloaded_function): Likewise.
2212 * call.c (build_x_va_arg, build_over_call): Likewise.
2214 2004-10-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
2216 Convert diagnostics to use quoting flag q 8/n
2217 * cvt.c (cp_convert_to_pointer, warn_ref_binding,
2218 convert_to_reference, ocp_convert, convert_to_void
2219 cp_convert_to_pointer): Use new quotation style.
2221 2004-10-31 Mark Mitchell <mark@codesourcery.com>
2224 * typeck2.c (store_init_value): Use split_nonconstant_init even
2225 for types that require construction.
2227 1004-10-28 Matt Austern <austern@apple.com>
2230 * cp-tree.h (class_key_or_enum_as_string): Declare.
2231 * error.c (class_key_or_enum): Rename to class_key_or_enum_as_string
2232 and remove static qualifier.
2233 * decl.c (shadow_tag): Warn about ignored attributes in class/struct/
2234 union/enum declaration.
2236 2004-10-29 Kazu Hirata <kazu@cs.umass.edu>
2238 * pt.c: Fix a comment typo.
2240 2004-10-28 Nathan Sidwell <nathan@codesourcery.com>
2242 * typeck.c (composite_pointer_type): Remove comment about DR 195.
2243 (build_reinterpret_cast_1): Revert DR195 patch. Only emit a
2244 warning when being pedantic.
2245 (build_reinterpet_cast, build_c_cast): Adjust.
2247 2004-10-29 Mark Mitchell <mark@codesourcery.com>
2250 * decl.c (grokdeclarator): Mark TYPE_DECLs as abstract when they
2251 appear in a constructor/destructor that will be cloned.
2253 1004-10-28 Matt Austern <austern@apple.com>
2256 * decl.c (finish_enum): Handle packed attribute.
2257 * parser.c (cp_parser_enum_specifier): Process trailing attributes.
2259 2004-10-28 Mark Mitchell <mark@codesourcery.com>
2262 * pt.c (instantiate_class_template): Increment
2263 processing_template_decl when substituting into a member class
2266 2004-10-27 Mark Mitchell <mark@codesourcery.com>
2269 * call.c (convert_like_real): Fix formatting.
2270 (initialize_reference): When binding a temporary to a base class,
2271 ensure that the nominal copy made is to the derived class, not the
2275 * parser.c (cp_parser_next_token_ends_template_argument_p): Do not
2278 2004-10-27 Andrew Pinski <pinskia@physics.uc.edu>
2280 * decl.c (bad_specifiers): Move the q after the %.
2282 2004-10-27 Andrew Pinski <pinskia@physics.uc.edu>
2284 * parser.c (cp_parser_diagnose_invalid_type_name): Move the q after
2287 2004-10-26 Mark Mitchell <mark@codesourcery.com>
2289 * name-lookup.c (do_namespace_alias): Use FROB_CONTEXT.
2290 * search.c (current_scope): Fix prototype.
2293 * search.c (current_scope): Return the innermost non-block scope,
2294 not the innermost non-block, non-namespace scope.
2295 (at_namespace_scope_p): Adjust accordingly.
2296 (dfs_accessible_post): Do not pass namespaces to is_friend.
2297 (dfs_walk_once_accessible_r): Likewise.
2298 * decl.c (grokvardecl): Adjust call to current_scope.
2299 (build_enumerator): Likewise.
2300 * parser.c (cp_parser_using_declaration): Likewise.
2301 (cp_parser_direct_declarator): Use at_namespace_scope_p instead of
2303 (cp_parser_class_head): Adjust call to current_scope.
2304 * name-lookup.c (do_namespace_alias): Set the DECL_CONTEXT for the
2308 * pt.c (tusbst_copy_and_build): Resolve enumeration constants to
2309 their underlying values.
2312 * typeck.c (build_binary_op): Honor build_type, even when in a
2315 2004-10-26 Nathan Sidwell <nathan@codesourcery.com>
2317 * parser.c (cp_lexer_get_preprocessor_token): Remove unneeded
2318 padding token checking.
2320 2004-10-25 Andrew Pinski <pinskia@physics.uc.edu>
2323 * decl.c (grokdeclarator) <case cdk_array>: Remove the call
2324 layout_type as it is already done by create_array_type_for_decl.
2326 2004-10-22 Nathan Sidwell <nathan@codesourcery.com>
2329 * parser.c (eof_token): Make const, correctly initialize rid and
2331 (struct cp_lexer): Replace buffer_end pointer with buffer_length
2333 (cp_lexer_new_main): Directly grow lexer's buffer here. Don't
2335 (cp_lexer_new_from_tokens): Adjust.
2336 (cp_lexer_grow_buffer): Remove.
2337 (cp_lexer_peek_nth_token, cp_lexer_consume_token,
2338 cp_lexer_purge_token): Add const casts.
2340 2004-10-21 Mark Mitchell <mark@codesourcery.com>
2344 * cp-tree.h (convert_to_base): Change prototype.
2345 (build_ptrmemfunc): Likewise.
2346 (convert_ptrmem): New function.
2347 * call.c (struct conversion): Adjust documentation for base_p.
2348 (standard_conversion): Set base_p for ck_pmem conversions as
2350 (convert_like_real): Use convert_to_base for ck_pmem and ck_ptr
2352 * class.c (convert_to_base): Handle both pointers and objects.
2353 Add nonnull parameter.
2354 (build_vfield_ref): Adjust call to convert_to_base.
2355 * cvt.c (cp_convert_to_pointer): Adjust call to build_ptrmemfunc.
2356 (convert_force): Likewise.
2357 * typeck.c (build_unary_op): Likewise.
2358 (convert_ptrmem): New function.
2359 (build_static_cast_1): Use it.
2360 (build_reinterpret_cast): Allow conversions to vector types.
2361 (get_delta_difference): Add c_cast_p parameter.
2362 (build_ptrmemfunc): Likewise. Adjust calls to
2363 get_delta_difference.
2365 2004-10-21 Andrew Pinski <pinskia@physics.uc.edu>
2368 * error.c (cp_error_at): Output the context as it might be
2369 different file as the other location.
2371 2004-10-21 Kazu Hirata <kazu@cs.umass.edu>
2373 * typeck.c: Fix a comment typo.
2375 2004-10-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2378 * decl.c (make_unbound_class_template): Add PARM_LIST parameter.
2379 * cp-tree.h (make_unbound_class_template): Adjust prototype.
2380 * parser.c (cp_parser_lookup_name): Adjust call to
2381 make_unbound_class_template.
2382 (cp_parser_single_declaration): Handle member class of class
2383 template as template friend parsing correctly.
2384 * friend.c (is_friend): Call is_specialization_of_friend for
2385 template friend class.
2386 (make_friend_class): Handle member class of class template as
2388 * pt.c (is_specialization_of_friend): Likewise.
2389 (instantiate_class_template): Likewise.
2390 (tsubst): Adjust call to make_unbound_class_template.
2392 2004-10-20 Nathan Sidwell <nathan@codesourcery.com>
2394 * typeck.c (composite_pointer_type): Add comment about DR 195
2395 (build_reinterpret_cast_1): Add for_reinterpret_cast_p parameter.
2396 Allow function pointer conversions that DR195 suggests.
2397 (build_reinterpret_cast, build_c_cast): Update
2398 build_reinterpret_cast_1 calls.
2400 2004-10-20 Kazu Hirata <kazu@cs.umass.edu>
2402 * call.c, typeck.c: Fix comment typos.
2404 2004-10-20 Nathan Sidwell <nathan@codesourcery.com>
2406 * parser.c (cp_token_position): New typedef. Define VEC thereof.
2407 (struct cp_lexer): Allow buffer and buffer_end to be NULL. Make
2408 next_token and last_token cp_token_position. Make saved_tokens a
2409 VEC(cp_token_position).
2410 (eof_token): New static variable.
2411 (CP_SAVED_TOKENS_SIZE): Rename to ...
2412 (CP_SAVED_TOKEN_STACK): ... here.
2413 (cp_lexer_new_main): Adjust main lexer creation and buffer
2415 (cp_lexer_new_from_tokens): Do not copy the tokens, merely point
2416 to the parent buffer. Do not append eof token.
2417 (cp_lexer_destroy): Only free buffer if non-NULL. Free token
2419 (cp_lexer_next_token, cp_lexer_prev_token): Remove.
2420 (cp_lexer_token_position, cp_lexer_token_at): New.
2421 (cp_lexer_saving_tokens): Adjust. Make inline.
2422 (cp_lexer_advance_token, cp_lexer_token_difference): Remove.
2423 (cp_lexer_peek_token_emit_debug_info): Fold into ...
2424 (cp_lexer_peek_token): ... here.
2425 (cp_lexer_peek_nth_token): Don't peek past EOF.
2426 (cp_lexer_consume_token): Set next_token to eof_token, if reaching
2428 (cp_lexer_purge_token): Adjust eof setting.
2429 (cp_lexer_purge_tokens_after): Likewise.
2430 (cp_lexer_save_tokens): Push next_token directly.
2431 (cp_lexer_commit_tokens): Adjust.
2432 (cp_lexer_rollback_tokens): Pop next_token directly.
2433 (cp_parser_check_for_invalid_template_id): Adjust token purging.
2434 (cp_parser_translation_unit): Do not consume the EOF.
2435 (cp_parser_nested_name_specifier_opt): Adjust token purging.
2436 (cp_parser_template_id, cp_parser_template_name): Likewise.
2438 2004-10-19 Mark Mitchell <mark@codesourcery.com>
2441 * call.c (struct conversion): Add base_p.
2442 (convert_like): Add c_cast_p argument.
2443 (convert_like_with_conversion): Likewise.
2444 (build_conv): Clear base_p.
2445 (standard_conversion): Set it, for derived-to-base conversions.
2446 (convert_like_real): Add c_cast_p parameter. Handle pointer
2447 conversions directly rather than relying on ocp_convert.
2448 (perform_direct_initialization_if_possible): Add c_cast_p
2450 * cp-tree.h (perform_direct_initialization_if_possible): Change
2452 (convert_member_func_to_ptr): New function.
2453 * typeck.c (check_for_casting_away_constness): Add diag_fn
2455 (build_static_cast_1): New function, split out from ...
2456 (build_static_cast): ... here. Use build_static_cast_1.
2457 (build_reinterpret_cast_1): New function, split out from ...
2458 (build_reinterpret_cast): ... here. Use build_reinterpret_cast_1.
2459 (build_const_cast_1): New function, split out from ...
2460 (build_const_cast): ... here. Use build_const_cast_1.
2461 (build_c_cast): Rewrite to use build_const_cast_1,
2462 build_static_cast_1, and build_reinterpret_cast_1.
2463 (convert_member_func_to_ptr): New function.
2465 2004-10-19 Paolo Bonzini <bonzini@gnu.org>
2468 * parser.c (enum cp_parser_prec): Give relational expressions
2469 a higher precedence than equality expressions.
2471 2004-10-15 Nathan Sidwell <nathan@codesourcery.com>
2473 * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Adjust lookup_base call.
2474 (ACCESSIBLY_UNIQUELY_DERIVED_P): Remove.
2475 (PUBLICLY_UNIQUELY_DERIVED_P): Adjust lookup_base call.
2476 (enum base_access): Reorganize.
2477 (accessible_base_p, accessible_p): Add consider_local_p parameter.
2478 * call.c (standard_conversion): Update comment about
2480 (enforce_access): Adjust accessible_p call.
2481 (build_over_call): Adjust accessible_base_p call.
2482 * class.c (convert_to_base): Adjust lookup_base call.
2483 (build_vtbl_ref_1): Likewise.
2484 (warn_about_ambiguous_bases): Likewise. Add early exit.
2485 * cvt.c (convert_to_pointer_force) Adjust lookup_base call.
2486 * search.c (accessible_base_p): Add consider_local_p parameter.
2487 (lookup_base): Pass consider_local_p to accessible_base_p call.
2488 (friend_accessible_p): Check whether scope is a class member.
2489 Remove unnecessary class template check.
2490 (accessible_p): Add consider_local_p parameter. Use it.
2491 (adjust_result_of_qualified_name_lookup): Adjust lookup_base call.
2492 * tree.c (maybe_dummy_object): Likewise.
2493 * typeck.c (comp_except_type): Use PUBLICLY_UNIQUELY_DERIVED_P.
2494 (build_class_member_access_expr): Adjust lookup_base call.
2495 * typeck2.c (binfo_or_else): Likewise.
2496 * rtti.c (build_dynamic_cast_1): Access can consider friendship
2499 2004-10-17 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2502 * decl2.c (grokfield): Apply attributes also to TYPE_DECLs.
2504 2004-10-16 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2507 * parser.c (cp_parser_parenthesized_expression_list): Fold
2508 non-dependent expressions in attribute lists.
2510 2004-10-15 Mark Mitchell <mark@codesourcery.com>
2513 * decl.c (declare_global_var): Use the return value from pushdecl.
2516 * parser.c (cp_parser_simple_declaration): Do not diagnose invalid
2517 type names if we have already found a valid type.
2518 (cp_parser_member_declaration): Likewise.
2521 * parser.c (cp_parser_member_specification_opt): Handle
2524 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
2526 * dump.c, g++spec.c, repo.c: Update copyright.
2528 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
2530 * decl.c: Fix a comment typo.
2532 2004-10-13 Andrew Pinski <pinskia@physics.uc.edu>
2535 * name-lookup.c (parse_using_directive): If we have a
2536 error_mark_node, do not set the decl namespace associations
2539 2004-10-14 Mark Mitchell <mark@codesourcery.com>
2542 * decl.c (cp_finish_decl): Do not call expand_static_init more
2543 than once for a single variable.
2545 2004-10-14 Matt Austern <austern@apple.com>
2547 * Make-lang.in (pt.o): depends on pointer-set.h
2548 * cp-tree.h (cp_walk_subtrees): Last argument is pointer_set_t* now.
2549 * pt.c (struct pair_fn_data): Use pointer_set_t, not htab_t
2550 (for_each_template_parm): Convert from htab_t to pointer_set_t.
2551 * tree.c (cp_walk_subtrees): Last argument is pointer_set_t* now.
2553 2004-10-13 Andrew Pinski <pinskia@physics.uc.edu>
2556 * semantics.c (finish_for_expr): Convert expression to void
2557 so that we don't create temporaries for a?b:c.
2559 2004-10-13 Kazu Hirata <kazu@cs.umass.edu>
2561 * search.c: Fix a comment typo.
2563 2004-10-12 Nathan Sidwell <nathan@codesourcery.com>
2565 * class.c (dfs_modify_vtables): Simplify condition. Return
2566 dfs_skip_bases as appropriate.
2567 (modify_all_vtables): Walk in pre-order.
2568 * search.c (dfs_walk_all, dfs_walk_once_r,
2569 dfs_walk_once_accessible_r): Assert post order function never
2570 returns dfs_skip_bases.
2572 * search.c (struct lookup_base_data_s): New.
2573 (lookup_base_r): Replace with ...
2574 (dfs_lookup_base): ... this.
2575 (lookup_base): Use dfs_walk_all.
2577 2004-10-12 Kazu Hirata <kazu@cs.umass.edu>
2579 * search.c: Fix comment typos.
2581 2004-10-11 Mark Mitchell <mark@codesourcery.com>
2584 * parser.c (cp_parser_declarator): Add member_p parameter.
2585 (cp_parser_condition): Adjust calls to cp_parser_declarator.
2586 (cp_parser_explicit_instantiation): Likewise.
2587 (cp_parser_init_declarator): Likewise.
2588 (cp_parser_direct_declarator): Add member_p parameter. Do not
2589 parse tentatively when parsing the parameters to a member.
2590 (cp_parser_type_id): Adjust calls to cp_parser_declarator.
2591 (cp_parser_parameter_declaration): Likewise.
2592 (cp_parser_member_declaration): Likewise.
2593 (cp_parser_exception_declaration): Likewise.
2596 * cp-tree.h (CLASSTYPE_TEMPLATE_SPECIALIZATION): Add a comment.
2597 * pt.c (optimize_specialization_lookup_p): Do not optimize lookups
2598 for members of partial or explicit specializations.
2601 * decl2.c (finish_anon_union): Robustify.
2603 2004-10-11 Nathan Sidwell <nathan@codesourcery.com>
2605 * cp-tree.h (get_dynamic_cast_base_type): Rename to ...
2606 (dcast_base_hint): ... here.
2607 * rtti.c (build_dynamic_cast_1): Use dcast_base_hint.
2608 * search.c (struct dcast_data_s): New.
2609 (dynamic_cast_base_recurse): Remove. Replace with ...
2610 (dfs_dcast_hint_pre, dfs_dcast_base_post): ... these. New.
2611 (get_dynamic_cast_base_type): Rename to ...
2612 (dcast_base_hint): ... here. Use dfs_walk_once_accessible.
2613 (accessible_r): Remove.
2614 (dfs_accessible_post): New, broken out of accessible_r.
2615 (accessible_p): Use dfs_walk_once_accessible.
2616 (dfs_walk_once_accessible_r): New. From accessible_r.
2617 (dfs_walk_once_accessible): New. From acessible_p.
2619 * cp-tree.h (SAME_BINFO_TYPE_P): New.
2620 * class.c (build_base_path): Use SAME_BINFO_TYPE_P to compare
2622 (convert_to_base_statically, determine_primary_bases,
2623 update_vtable_entry_for_fn, dfs_modify_vtables, build_vtt_inits,
2624 dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
2625 accumulate_vtbl_inits, dfs_accumulate_vtbl_inits,
2626 build_vtbl_initializer, add_vcall_offset_vtbl_entries_1): Likewise.
2627 * init.c (expand_member_init): Likewise.
2628 * search.c (lookup_base_r, dynamic_cast_base_recurse,
2629 binfo_via_virtual, copied_binfo, binfo_for_vbase,
2630 original_binfo): Likewise.
2631 * tree.c (copy_binfo): Likewise.
2633 2004-10-11 Kazu Hirata <kazu@cs.umass.edu>
2635 * semantics.c: Fix comment typos.
2637 2004-10-10 Andrew Pinski <pinskia@physics.uc.edu>
2642 * semantics.c (maybe_cleanup_point_expr): Call
2643 fold_build_cleanup_point_expr.
2644 (maybe_cleanup_point_expr_void): New function.
2645 (add_decl_expr): Call maybe_cleanup_point_expr_void.
2646 (finish_expr_stmt): Likewise.
2647 (finish_return_stmt): Likewise.
2648 (finish_for_expr): Likewise.
2649 (finish_asm_stmt): Likewise.
2650 * typeck.c (condition_conversion): Call
2651 fold_build_cleanup_point_expr.
2653 2004-10-10 Andrew Pinski <pinskia@physics.uc.edu>
2656 * semantics.c (add_decl_expr): If the decl has a size which
2657 has side effects then the decl expression needs a cleanup point.
2659 2004-10-10 Mark Mitchell <mark@codesourcery.com>
2662 * decl.c (grokdeclarator): Robustify error-recovery on invalid
2665 2004-10-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
2667 Convert diagnostics to use quoting flag q 7/n
2668 * typeck.c (composite_pointer_type_r, composite_pointer_type,
2669 cxx_sizeof_or_alignof_type, cxx_sizeof_or_alignof_expr,
2670 string_conv_p, build_class_member_access_expr,
2671 build_class_member_access_expr, lookup_destructor,
2672 finish_class_member_access_expr, build_indirect_ref,
2673 get_member_function_from_ptrfunc, build_function_call,
2674 convert_arguments, build_binary_op, pointer_diff, build_unary_op,
2675 check_for_casting_away_constness, build_static_cast,
2676 build_reinterpret_cast, build_const_cast, build_c_cast,
2677 build_modify_expr, get_delta_difference, build_ptrmemfunc,
2678 dubious_conversion_warnings, convert_for_assignment,
2679 convert_for_initialization,
2680 maybe_warn_about_returning_address_of_local, check_return_expr):
2683 * typeck2.c (error_not_base_type, readonly_error,
2684 abstract_virtuals_error, cxx_incomplete_type_diagnostic,
2685 store_init_value, digest_init, build_x_arrow,
2686 build_m_component_ref, require_complete_eh_spec_types): Likewise.
2688 * tree.c (cp_build_qualified_type_real,
2689 handle_java_interface_attribute, handle_init_priority_attribute):
2692 * semantics.c (finish_asm_stmt, finish_non_static_data_member,
2693 finish_pseudo_destructor_expr,
2694 check_template_template_default_arg, begin_class_definition,
2695 finish_base_specifier, qualified_name_lookup_error,
2696 finish_id_expression, finish_typeof): Likewise.
2698 * search.c (lookup_base, check_final_overrider,
2699 look_for_overrides_r): Likewise.
2701 * rtti.c (get_tinfo_decl, build_dynamic_cast_1): Likewise.
2703 2004-10-09 Mark Mitchell <mark@codesourcery.com>
2706 * error.c (dump_expr): Correct handling of AGGR_INIT_EXPRs using a
2710 * init.c (build_new): Correct comments.
2711 * parser.c (cp_parser_new_expression): Use NULL_TREE for nelts in
2715 * parser.c (cp_parser_postfix_dot_deref_expression): If the
2716 pseduo-destructor-name production does not work, fall back to the
2717 ordinary production.
2720 * tree.c (cp_tree_equal): Handle a BASELINK.
2723 * cp-tree.h (check_var_type): New function.
2724 * decl.c (check_var_type): New function, split out from ...
2725 (grokdeclarator): ... here.
2726 * pt.c (tsubst_decl): Use check_var_type.
2729 * decl.c (grokdeclarator): Disallow declarations of operators as
2732 2004-10-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2735 * error.c (dump_expr): Add missing case for RDIV_EXPR.
2737 2004-10-08 Kazu Hirata <kazu@cs.umass.edu>
2739 * pt.c, search.c: Fix comment typos.
2741 2004-10-08 Nathan Sidwell <nathan@codesourcery.com>
2743 * cp-tree.h (dfs_walk, dfs_walk_real, dfs_unmark, markedp,
2745 (dfs_skip_bases, dfs_walk_all, dfs_walk_once): New.
2746 * class.c (struct find_final_overrider_data): Remove most_derived,
2747 vpath_list and vpath fields. Add path field.
2748 (dfs_find_final_ocerrider_1): Add DEPTH parameter. Adjust.
2749 (dfs_find_final_overrider): Rename to ...
2750 (dfs_find_final_overrider_pre): ... here. Adjust.
2751 (dfs_find_final_overrider_post): Adjust.
2752 (dfs_find_final_overrider_q): Fold into
2753 dfs_find_final_overrider_pre.
2754 (find_final_overrider): Adjust dfs searching.
2755 (dfs_modify_vtables): Don't mark binfo here.
2756 (modify_all_vtables): Use dfs_walk_once.
2757 (build_vtt_inits): Likwise. Use dfs_walk_all.
2758 (dfs_build_secondary_vptr_vtt_inits): Don't mark binfo here.
2759 Return dfs_skip_bases as appropriate.
2760 (dfs_fixup_binfo_vtbls): Return dfs_skip_bases as appropriate.
2761 * init.c (dfs_initialized_vtbl_ptrs): Return dfs_skip_bases as
2762 appropriate. Don't mark binfo here.
2763 (initialize_vtbl_ptrs): Use dfs_walk_once.
2764 * search.c (struct vbase_info): Remove unused struct.
2765 (access_in_type): Use dfs_walk_once.
2766 (dfs_access_in_type): Don't mark binfo here.
2767 (dfs_accessible_queue_p, dfs_accessible_p) Remove.
2769 (accessible_r): ... here. New. Specialize dfs_walk_once.
2770 (accessible_p): Use accessible_r.
2771 (lookup_field_queue_p): Remove. Fold into ...
2772 (lookup_field_r): ... here. Adjust.
2773 (lookup_member): Use dfs_walk_all.
2774 (dfs_walk_real, dfs_walk): Replace with ...
2775 (dfs_walk_all, dfs_walk_once): ... these.
2776 (dfs_walk_once_r, dfs_unmark_r): Workers for dfs_walk_once.
2777 (dfs_unmark, unmarkedp, markedp): Remove.
2778 (dfs_get_pure_virtuals): Don't mark binfo here.
2779 (get_pure_virtuals): Use dfs_walk_once.
2780 (dfs_debug_unmarked_p): Remove. Fold into ...
2781 (dfs_debug_mark): ... here.
2782 (note_debug_info_needed): Use dfs_walk_all.
2784 2004-10-07 Andrew Pinski <pinskia@physics.uc.edu>
2786 * pt.c (tsubst_expr) <case ASM_EXPR>: Look passed the
2787 CLEANUP_POINT_EXPR to get the asm expression.
2789 2004-10-07 Mark Mitchell <mark@codesourcery.com>
2791 * cp-tree.h (ICS_USER_FLAG): Remove comment about obsolete flag.
2792 (DECL_MEMBER_TEMPLATE_P): New macro.
2793 (is_member_template): Remove.
2794 (class_method_index_for_fn): New function.
2795 * pt.c (build_over_call): Use DECL_MEMBER_TEMPLATE_P.
2796 * class.c (finish_struct_methods): Remove out-of-date comment.
2797 * decl.c (copy_fn_p): Use DECL_MBMER_TEMPLATE_P.
2798 * decl2.c (check_classfn): Use DECL_MEMBER_TEMPLATE_P and
2799 class_method_index_for_fn.
2800 * pt.c (is_member_template): Remove.
2801 (is_member_template_class): Likewise.
2802 (optimize_specialization_lookup_p): New function.
2803 (retrieve_specialization): Optimize lookups for members that are
2804 not member templates.
2805 (register_specialization): Adjust accordingly.
2806 (build_template_decl): Add member_template_p parameter. Set
2807 DECL_MEMBER_TEMPLATE_P.
2808 (process_partial_specialization): Adjust call to
2809 retrieve_specialization.
2810 (push_template_decl_real): Determine whether the template is a
2812 (lookup_template_class): Use retrieve_specialization.
2813 (tsubst_decl): Adjust call to retrieve_specialization.
2814 (tsubst_exception_specification): New function.
2816 (tsubst_copy): Use DECL_MEMBER_TEMPLATE_P.
2817 (instantiate_template): Adjust call to retrieve_specialization.
2818 (regenerate_decl_from_template): Do not actually generate a new
2820 (instantiate_decl): Adjust call to retrieve_specialization.
2821 (class_method_index_for_fn): New method.
2823 2004-10-07 Andrew Pinski <pinskia@physics.uc.edu>
2825 * parser.c (cp_parser_asm_definition): Look passed the
2826 CLEANUP_POINT_EXPR to get the asm expression.
2828 2004-10-06 Andrew Pinski <pinskia@physics.uc.edu>
2831 * semantics.c (finish_asm_stmt): Asm expressions need cleanup
2834 2004-10-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
2836 Convert diagnostics to use quoting flag q 6/n
2837 * pt.c (finish_member_template_decl, check_specialization_scope,
2838 maybe_process_partial_specialization, determine_specialization,
2839 check_explicit_specialization, maybe_check_template_type,
2840 process_partial_specialization, check_default_tmpl_args,
2841 push_template_decl_real, redeclare_class_template,
2842 convert_nontype_argument, coerce_template_parms,
2843 lookup_template_class, push_tinst_level,
2844 instantiate_class_template, tsubst_arg_types,
2845 tsubst_function_type, tsubst, tsubst_qualified_id,
2846 tsubst_copy_and_build, check_instantiated_args,
2847 do_decl_instantiation, do_type_instantiation,
2848 invalid_nontype_parm_type_p, check_specialization_namespace,
2849 convert_template_argument, determine_specialization,
2850 check_template_shadow, tsubst_decl
2851 instantiate_pending_templates): Use quoting marks.
2853 2004-10-05 Nathan Sidwell <nathan@codesourcery.com>
2856 * parser.c (cp_parser_postfix_expression): Inhibit Koenig when
2857 unqualified lookup finds a member function.
2859 2004-10-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
2861 Convert diagnostics to use quoting flag q 5/n
2862 * parser.c (cp_parser_name_lookup_error,
2863 cp_parser_diagnose_invalid_type_name,
2864 cp_parser_primary_expression, cp_parser_unqualified_id,
2865 cp_parser_nested_name_specifier_opt, cp_parser_labeled_statement,
2866 cp_parser_jump_statement, cp_parser_simple_declaration,
2867 cp_parser_decl_specifier_seq, cp_parser_mem_initializer_id,
2868 cp_parser_type_parameter, cp_parser_template_id,
2869 cp_parser_template_name, cp_parser_direct_declarator,
2870 cp_parser_parameter_declaration_list, cp_parser_class_head,
2871 cp_parser_base_specifier, cp_parser_lookup_name,
2872 cp_parser_late_parsing_default_args,
2873 cp_parser_optional_template_keyword
2874 cp_parser_elaborated_type_specifier, cp_parser_check_class_key,
2875 cp_parser_check_access_in_redeclaration): Use quoting marks.
2877 * name-lookup.c (supplement_binding, pushdecl,
2878 check_for_out_of_scope_variable, validate_nonmember_using_decl,
2879 do_nonmember_using_decl, lookup_tag, set_decl_namespace,
2880 push_namespace, do_namespace_alias, do_using_directive,
2881 ambiguous_decl, lookup_namespace_name, add_function): Likewise.
2883 * method.c (use_thunk): Likewise.
2885 * lex.c (unqualified_name_lookup_error,
2886 unqualified_fn_lookup_error): Likewise.
2888 2004-10-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
2890 Convert diagnostics to use quoting flag q 4/n
2891 * except.c (decl_is_java_type, build_throw,
2892 is_admissible_throw_operand, check_handlers_1, check_handlers):
2893 Use quoting formats.
2894 * friend.c (add_friend, make_friend_class, do_friend): Likewise.
2895 * init.c (sort_mem_initializers, emit_mem_initializers,
2896 member_init_ok_or_else, expand_member_init, is_aggr_type,
2897 build_offset_ref, build_java_class_ref): Likewise.
2899 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
2901 Convert diagnostics to use quoting flag q 3/n
2902 * decl.c (pop_label, duplicate_decls, redeclaration_error_message,
2903 redeclaration_error_message, lookup_label, check_goto,
2904 make_typename_type, make_unbound_class_template,
2905 fixup_anonymous_aggr, check_tag_decl, start_decl, start_decl_1,
2906 grok_reference_init, layout_var_decl, maybe_commonize_var,
2907 check_for_uninitialized_const_var, reshape_init_array,
2908 reshape_init, check_initializer, cp_finish_decl,
2909 member_function_or_else, bad_specifiers, grokfndecl, grokvardecl,
2910 check_static_variable_definition, compute_array_index_type,
2911 create_array_type_for_decl, check_special_function_return_type,
2912 grokdeclarator, check_default_argument, grokparms,
2913 grok_ctor_properties, grok_op_properties,
2914 check_elaborated_type_specifier, xref_tag, finish_enum,
2915 build_enumerator, check_function_type, start_preparsed_function,
2916 store_parm_decls): Use quoting formats.
2917 * decl2.c (grok_array_decl, delete_sanity, check_member_template,
2918 check_java_method, check_classfn, finish_static_data_member_decl,
2919 grokfield, grokbitfield, grok_function_init,
2920 build_anon_union_vars, coerce_new_type, coerce_delete_type,
2921 check_default_args): Likewise.
2922 * parser.c (cp_parser_decl_specifier_seq): Likewise.
2924 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
2926 Convert diagnostics to use quoting flag q 2/n
2927 * class.c (build_base_path, add_method, alter_access,
2928 handle_using_decl, check_bases,
2929 maybe_warn_about_overly_private_class, find_final_overrider,
2930 warn_hidden, finish_struct_anon, add_implicitly_declared_members,
2931 check_bitfield_decl, check_field_decls, layout_empty_base,
2932 build_base_field, check_methods, layout_virtual_bases,
2933 warn_about_ambiguous_bases, layout_class_type, finish_struct_1,
2934 resolve_address_of_overloaded_function, instantiate_type,
2935 note_name_declared_in_class): Use format flag "q" for quoting.
2937 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
2939 Convert diagnostics to use quoting flag q 1/n
2940 * error.c (locate_error): Ignore quoting flag q.
2941 * call.c (build_user_type_conversion_1, build_operator_new_call,
2942 build_object_call, op_error, build_conditional_expr,
2943 build_new_op, build_op_delete_call, enforce_access,
2944 convert_like_real, convert_arg_to_ellipsis, build_x_va_arg,
2945 convert_default_arg, build_over_call, build_new_method_call,
2946 joust, perform_implicit_conversion, initialize_reference): Use the
2949 2004-10-03 Andrew Pinski <pinskia@physics.uc.edu>
2952 * typeck.c (build_reinterpret_cast): Return if the inner type
2955 2004-10-01 Jan Hubicka <jh@suse.cz>
2957 * semantics.c (expand_body): Update call of tree_rest_of_compilation.
2959 2004-09-30 Nathan Sidwell <nathan@codesourcery.com>
2961 * cp-tree.h (struct lang_decl): Shrink by reordering fields and
2962 turning operator_code and fixed_offset into bitfields.
2964 2004-09-29 Joseph S. Myers <jsm@polyomino.org.uk>
2966 * decl.c (duplicate_decls): Merge TREE_DEPRECATED.
2968 2004-09-29 Jason Merrill <jason@redhat.com>
2970 PR tree-optimization/17697
2971 * decl.c (duplicate_decls): Copy TREE_NOTHROW from newdecl to olddecl.
2973 2004-09-28 Jason Merrill <jason@redhat.com>
2976 * class.c (build_base_field): Set TYPE_MODE.
2978 2004-09-28 Roger Sayle <roger@eyesopen.com>
2981 * g++spec.c (lang_specific_driver): Unrecognized libraries, other
2982 than -lc and -lm, may require linking against libstc++.
2984 2004-09-28 Kazu Hirata <kazu@cs.umass.edu>
2986 * tree.c: Fix a comment typo.
2988 2004-09-28 Nathan Sidwell <nathan@codesourcery.com>
2990 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): Remove.
2991 (struct secondary_vptr_vtt_init_data_s): New.
2992 (build_vtt_inits): Adjust dfs_walkers.
2993 (dfs_build_secondary_vptr_vtt_inits): Caller data is a
2994 secondary_vptr_vtt_init_data_s structure. Adjust.
2995 (dfs_ctor_vtable_bases_queue_p): Remove.
2996 (dfs_fixup_binfo_vtbls): No need to clear BINFO_MARKED. Simplify.
2998 * pt.c (struct get_template_base_data_s): Remove.
2999 (get_template_base_r): Fold into get_template_base.
3000 (get_template_base): Walk base binfos directly in inheritance
3003 2004-09-27 Mark Mitchell <mark@codesourcery.com>
3006 * cp-tree.h (fold_if_not_in_template): New function.
3007 * call.c (build_conditional_expr): Use fold_if_not_in_template.
3008 (build_cxx_call): Likewise.
3009 * cvt.c (convert_to_complex): Likewise.
3010 (ocp_convert): Likewise.
3011 (convert): Likewise.
3012 (convert_force): Likewise.
3013 * decl.c (compute_array_index_type): Clear
3014 processing_template_decl while folding array bounds.
3015 * pt.c (convert_nontype_argument): Clear
3016 processing_template_decl while processing non-type argument
3018 * tree.c (fold_if_not_in_template): New function.
3019 * typeck.c (build_class_member_access_expr): Use
3020 fold_if_not_in_template.
3021 (build_array_ref): Likewise.
3022 (build_binary_op): Likewise. Do not try to optimize computations
3023 when processing templates.
3024 (cp_pointer_int_sum): Use fold_if_not_in_template.
3025 (pointer_diff): Likewise.
3026 (build_unary_op): Likewise.
3027 (build_reinterpret_cast): Likewise.
3028 (get_delta_difference): Likewise.
3029 (expand_ptrmemfunc_cst): Likewise.
3030 (dubious_conversion_warnings): Likewise.
3032 2004-09-27 Matt Austern <austern@apple.com>
3034 * cp/parser.c (struct cp_token): New one-bit field , implicit_extern_c
3035 (cp_lexer_get_preprocessor_token): Set implicit_extern_c for
3036 tokens that come from headers that are implicitly extern "C".
3037 (struct cp_parser): new one-bit field, implicit_extern_c.
3038 (cp_parser_new): Set parser's implicit_extern_c to false.
3039 (cp_parser_translation_unit): Pop lang context if we were in a
3040 header that was implicitly extern "C".
3041 (cp_parser_declaration_seq_opt): Push/pop lang context as
3042 required by the token's and parser's implicit_extern_c.
3044 2004-09-27 Mark Mitchell <mark@codesourcery.com>
3047 * cp-tree.h (shared_member_p): Declare.
3048 * search.c (shared_member_p): Give it external linkage.
3049 * semantics.c (finish_qualified_id_expr): Use it.
3050 (finish_id_expression): Likewise.
3053 * semantics.c (finish_id_expression): Do not add "this->" to
3054 static member functions.
3056 2004-09-27 Nathan Sidwell <nathan@codesourcery.com>
3059 * error.c (dump_type): Change TREE_VEC case into TREE_BINFO.
3061 * class.c (struct count_depth_data): Remove.
3062 (dfs_depth_post, dfs_depth_q): Remove.
3063 (find_final_overrider): Use number of vbase classes as depth
3066 * cp-tree.h (types_overlap_p): Remove.
3067 * search.c (struct overlap_info): Remove.
3068 (dfs_check_overlap, dfs_no_overlap_yet, types_overlap_p): Remove.
3070 * pt.c (GTB_VIA_VIRTUAL, GTB_IGNORE_TYPE): Remove.
3071 (get_template_base_recursive): Remove. Replace with ...
3072 (get_template_base_r): ... this.
3073 (struct get_template_base_data_s): New.
3074 (get_template_base): Use get_template_base_r via dfs_walk. Always
3075 return NULL on failure.
3076 (unify): Remove error_mark_node check from get_template_base result.
3078 2004-09-24 Paolo Bonzini <bonzini@gnu.org>
3080 * parser.c (cp_parser_expression_stack): Clarify why it is
3081 an array of NUM_PREC_VALUES elements.
3082 (cp_parser_binary_expression): Clarify why we do not need to
3083 handle stack overflow.
3085 2004-09-24 Nathan Sidwell <nathan@codesourcery.com>
3088 * search.c (lookup_field_queue_p): Correct check for hidden base.
3090 * search.c (bfs_walk): Remove.
3091 (lookup_member): Use dfs_walk_real.
3092 (dfs_walk_real): Move and adjust documentation from bfs_walk.
3094 2004-09-23 Zack Weinberg <zack@codesourcery.com>
3096 * decl.c (grokfndecl): If ::main is found not to return int,
3097 correct it after issuing a diagnostic.
3098 (grokdeclarator): If the incoming type was error_mark_node, do
3099 not complain about declaring something with no type.
3100 (start_function): Change check for ::main not returning int to
3101 an assertion, as grokfndecl now catches this when the user did it.
3102 * init.c (perform_member_init, sort_mem_initializers)
3103 (emit_mem_initializers): Make most diagnostics be issued on
3104 the line of current_function_decl, not whatever the current
3106 * parser.c (cp_lexer_peek_token_emit_debug_info): Surround
3107 definition and declaration with #ifdef ENABLE_CHECKING.
3108 Avoid unnecessary use of fprintf.
3109 (cp_lexer_print_token, cp_lexer_debug_stream): Adjust stub
3110 definitions to avoid warnings.
3111 (cp_lexer_new_main): Add assertion that first token is not a
3113 (cp_lexer_new_from_token_array): Fold into ...
3114 (cp_lexer_new_from_tokens): ... here. Add assertion that
3115 first token is not a padding token.
3116 (cp_lexer_set_source_position_from_token): Move nearer to callers.
3117 Remove unused lexer argument.
3118 (cp_lexer_peek_token): Just print debugging report (if enabled)
3119 and return lexer->next_token.
3120 (cp_lexer_skip_purged_tokens): Delete.
3121 (cp_lexer_next_token_is, cp_lexer_next_token_is_not): Make
3122 inline, simplify bodies.
3123 (cp_lexer_peek_nth_token): Add debugging report a la
3124 cp_lexer_peek_token.
3125 (cp_lexer_consume_token): Correct commentary. Advance over
3126 purged tokens here. Set current source position here, from
3127 token to be returned. Avoid unnecessary use of fprintf.
3128 (cp_lexer_purge_token): Advance next_token pointer over this and
3129 subsequent purged tokens.
3130 (cp_parser_error): Adjust source position to that of the
3132 (cp_parser_push_lexer_for_tokens, cp_parser_pop_lexer): New functions.
3133 (cp_parser_string_literal): Remove some excessive cleverness.
3134 (cp_parser_enum_specifier): Call start_enum before consuming
3136 (cp_parser_member_declaration): Make the "extra semicolon"
3137 diagnostic consistently-worded with the other place this is
3138 diagnosed. Explicitly set the diagnostic location to the
3139 location of the offending semicolon.
3140 (cp_parser_enclosed_template_argument_list): Use %</%> quoting
3141 in diagnostics. Do not use cp_parser_require. Set location
3142 of diagnostics about improper use of '>>' to location of
3144 (cp_parser_late_parsing_for_member):
3145 Use cp_parser_push_lexer_for_tokens and cp_parser_pop_lexer.
3146 (cp_parser_late_parsing_default_args): Likewise. Manually
3147 move some logic outside the loop.
3149 2004-09-23 Andrew Pinski <pinskia@physics.uc.edu>
3152 * cvt.c (cp_convert_to_pointer): Return early when the type is
3155 2004-09-21 Fariborz Jahanian <fjahanian@apple.com>
3159 * decl.c (grokfndecl): Add new argument "attrlist", use it
3160 to call cplus_decl_attributes.
3161 (start_function): Remove call to cplus_decl_attributes.
3162 * cvt.c (ocp_convert): Add support to use type conversion
3163 function to vector type.
3164 * parser.c (cp_parser_conversion_type_id): Add attributes, if any,
3167 2004-09-23 Paolo Bonzini <bonzini@gnu.org>
3171 * parser.c (cp_parser_token_tree_map_node,
3172 cp_parser_pm_expression, cp_parser_additive_expression,
3173 cp_parser_multiplicative_expression, cp_parser_shift_expression,
3174 cp_parser_relational_expression, cp_parser_equality_expression,
3175 cp_parser_and_expression, cp_parser_exclusive_or_expression,
3176 cp_parser_inclusive_or_expression,
3177 cp_parser_logical_and_expression,
3178 cp_parser_logical_or_expression): Removed.
3179 (enum cp_parser_prec, struct cp_parser_token_tree_map_node,
3180 binops, binops_by_token): New.
3181 (cp_parser_assignment_expression): Use cp_parser_binary_expression.
3182 (cp_parser_new): Initialize binops_by_token.
3183 (cp_parser_binary_expression): Rewritten.
3186 2004-09-23 Kazu Hirata <kazu@cs.umass.edu>
3188 * parser.c: Fix a comment typo.
3190 2004-09-23 Nathan Sidwell <nathan@codesourcery.com>
3193 * decl.c (xref_basetypes): Look through typedefs before checking
3196 2004-09-22 Nathan Sidwell <nathan@codesourcery.com>
3198 * cp-tree.h (unemitted_tinfo_decls): Make a VEC(tree).
3199 * decl2.c (cp_finish_file): Adjust tinfo decl emission loop.
3200 * rtti.c (unemitted_tinfo_decls): Make a VEC(tree).
3201 (init_rtti_processing): Initialize it to something realistic.
3202 (get_tinfo_decl): Adjust pushing the new decl.
3204 * cp-tree.h (struct lang_type_class): Remove marked flags, add
3205 diamond_shaped and repeated_base flags. Reorder to keep 8-bit blocks.
3206 (TYPE_MARKED_P): New.
3207 (CLASSTYPE_DIAMOND_SHAPED_P, CLASSTYPE_REPEATED_BASE_P): New.
3208 (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
3209 CLEAR_CLASSTYPE_MARKED_N): Remove.
3210 (CLASSTYPE_MARKED_*, SET_CLASSTYPE_MARKED_*,
3211 CLEAR_CLASSTYPE_MARKED_*): Remove.
3212 * decl.c (xref_basetypes): Use TYPE_MARKED_P. Determine diamond
3213 shaped and repeated base properties.
3214 * lex.c (cxx_make_type): Don't clear TYPE_ALIAS_SET.
3215 * rtti.c (dfs_class_hint_mark, dfs_class_hint_unmark,
3216 class_hint_flags): Remove.
3217 (get_pseudo_ti_init): Use CLASSTYPE_REPEATED_BASE_P and
3218 CLASSTYPE_DIAMOND_SHAPED_P.
3220 2004-09-21 Ziemowit Laski <zlaski@apple.com>
3222 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved here from
3224 (objcp_tsubst_copy_and_build): Reformat function signature.
3225 * cp-objcp-common.h (objcp_tsubst_copy_and_build): Likewise.
3226 (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved to cp-lang.c.
3228 2004-09-21 Zack Weinberg <zack@codesourcery.com>
3230 * parser.c (cp_lexer_peek_token, cp_lexer_consume_token):
3231 Don't handle CPP_PRAGMA tokens specially.
3232 (cp_lexer_handle_pragma): Use cp_lexer_consume_token. Don't
3233 purge the token; do clear token->value after processing. Add
3234 assertion at beginning that token->value is nonzero.
3235 (cp_parser_statement, cp_parser_declaration_seq_opt): Handle
3236 CPP_PRAGMA as a full statement or declaration in its own right.
3238 2004-09-21 Matt Austern <austern@apple.com>
3241 * decl.c (grokvardecl): Accept declarations of global variables
3242 using anonymous types.
3244 2004-09-21 Roger Sayle <roger@eyesopen.com>
3247 * tree.c (lvalue_p_1): Disallow MIN_EXPR and MAX_EXPR as lvalues
3248 if either operand has side-effects.
3249 * typeck.c (rationalize_conditional_expr): Assert that neither
3250 operand of MIN_EXPR or MAX_EXPR has side-effects.
3251 (build_modify_expr): Add support for MIN_EXPR and MAX_EXPR.
3252 Check that the "lhs" is a valid lvalue, i.e. that neither operand
3253 of a MIN_EXPR or MAX_EXPR has a side-effect.
3255 2004-09-21 Nathan Sidwell <nathan@codesourcery.com>
3257 * cp-tree.h (struct lang_type_header): Remove
3258 uses_multiple_inheritance field.
3259 (TYPE_USES_MULTIPLE_INHERITANCE): Remove.
3260 (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): Remove.
3261 (TYPE_USES_VIRTUAL_BASECLASSES): Remove.
3262 (DECL_NEEDS_VTT_PARM_P): Use CLASSTYPE_VBASECLASSES.
3263 (TYPE_CONTAINS_VPTR_P): Likewise.
3264 * call.c (add_template_candidate_real): Use
3265 CLASSTYPE_VBASECLASSES.
3266 (build_special_member_call): Likewise.
3267 * class.c (finish_struct_bits): Remove
3268 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P & TYPE_USES_VIRTUAL_BASECLASSES
3270 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
3271 (create_vtable_ptr): Remove TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P
3273 (build_vtt_inits): Use CLASSTYPE_VBASECLASSES.
3274 (accumulate_vtbl_inits, build_vbase_offset_vtbl_entries):
3276 * decl.c (xref_basetypes): Remove TYPE_USES_MULTIPLE_INHERITANCE,
3277 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
3279 (cxx_maybe_build_cleanup): Use CLASSTYPE_VBASECLASSES.
3280 * decl2.c (maybe_retrofit_in_chrg): Likewise.
3281 * init.c (expand_member, push_base_cleanups): Likewise.
3282 * pt.c (instantiate_class_template): Remove
3283 TYPE_USES_MULTIPLE_INHERITANCE,
3284 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
3286 * ptree.c (cxx_print_type): Remove TYPE_USES_MULTIPLE_INHERITANCE
3288 * typeck2.c (process_init_constructor): Replace some sorrys with
3291 2004-09-21 Andreas Tobler <a.tobler@schweiz.ch>
3293 * decl.c (reshape_init_array): Initialize max_index_cst to fix
3296 2004-09-20 Mark Mitchell <mark@codesourcery.com>
3299 * pt.c (tsubst): Fix parentheses to accomodate emacs.
3300 (tsubst_baselink): If we get a single function, mark it as used.
3302 2004-09-20 Matt Austern <austern@apple.com>
3303 Zack Weinberg <zack@codesourcery.com>
3305 * decl.c (make_rtl_for_nonlocal_decl, start_preparsed_function):
3306 Apply lbasename to input_filename before passing to get_fileinfo.
3307 * semantics.c (begin_class_definition): Likewise.
3308 * lex.c (handle_pragma_interface): Apply get_fileinfo to the
3309 correct filename. Rename variables to be less confusing.
3310 (handle_pragma_implementation): Likewise. Disable "appears
3311 after file is included" diagnostic.
3313 * parser.c (struct cp_token): Add in_system_header fiag.
3314 (CP_TOKEN_BLOCK_NUM_TOKENS, struct cp_token_block)
3315 (CP_TOKEN_BUFFER_SIZE, cp_token_cache_push_token)
3316 (CPP_NONE, cp_lexer_read_token): Delete.
3317 (struct cp_lexer): Remove first_token, string_tokens,
3318 main_lexer_p fields. Clarify comments.
3319 (struct cp_token_cache): Now just a pair of pointers.
3320 (CP_LEXER_BUFFER_SIZE): New #define.
3321 (CPP_PURGED): New fake token type.
3322 (cp_lexer_new_from_token_array, cp_lexer_destroy)
3323 (cp_lexer_peek_token_emit_debug_info, cp_lexer_skip_purged_tokens)
3324 (cp_lexer_handle_pragma, cp_token_cache_new, cp_parser_string_literal):
3326 (cp_lexer_new_from_tokens): Now a simple wrapper around
3327 cp_lexer_new_from_token_array.
3328 (cp_lexer_set_source_position_from_token): Also update
3330 (cp_lexer_next_token, cp_lexer_prev_token, cp_lexer_advance_token):
3332 (cp_lexer_token_difference): Dont handle wrapping round.
3333 (cp_lexer_new_main): Enable pragma deferral and raw strings,
3334 read the entire translation unit through c_lex_with_flags into
3335 this lexer's buffer, then turn raw strings back off again.
3336 (cp_lexer_grow_buffer): Adjust for buffer no longer being circular.
3337 (cp_lexer_get_preprocessor_token): No need to handle not being
3338 the main lexer. Set token->in_system_header too.
3339 (cp_lexer_peek_token): Skip purged tokens. Feed pragma tokens
3340 to cp_lexer_handle_pragma. No need to call cp_lexer_read_token.
3341 (cp_lexer_peek_nth_token): Likewise.
3342 (cp_lexer_purge_token): Mark the token PURGED, don't shift all
3343 the other tokens down.
3344 (cp_lexer_purge_tokens_after): Likewise.
3345 (cp_lexer_save_tokens, cp_lexer_rollback_tokens): Don't worry
3346 about there being no tokens.
3347 (cp_lexer_print_token): Revise to give useful information on
3349 (struct cp_parser): Add field translate_strings_p.
3350 (cp_parser_new): Initialize it.
3351 (cp_parser_translation_unit): Destroy the lexer when done.
3352 (cp_parser_parameter_declaration): Restructure saving of
3354 (cp_parser_save_member_function_body): Likewise.
3355 (cp_parser_check_for_invalid_template_id)
3356 (cp_parser_nested_name_specifier_opt, cp_parser_template_id):
3357 Adjust calls to cp_lexer_advance_token.
3358 (cp_parser_skip_to_closing_parenthesis, cp_parser_declaration):
3359 No need to fiddle c_lex_string_translate.
3360 (cp_parser_primary_expression, cp_parser_linkage_specification)
3361 (cp_parser_asm_definition, cp_parser_asm_specification_opt)
3362 (cp_parser_asm_operand_list, cp_parser_asm_clobber_list)
3363 Use cp_parser_string_literal.
3364 (cp_parser_attribute_list): Save and restore
3365 parser->translate_strings_p, not c_lex_string_translate.
3366 (cp_parser_cache_group): Delete.
3367 (cp_parser_cache_group_1): Rename cp_parser_cache_group. Do
3368 not take a cache argument.
3370 2004-09-20 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3373 * decl.c (reshape_init): Extract array handling into...
3374 (reshape_init_array): New function. Use integers instead of trees
3375 for indices. Handle out-of-range designated initializers.
3377 2004-09-20 Steven Bosscher <stevenb@suse.de>
3379 * lex.c (cxx_init): Don't set the ridpointer for RID_NULL
3382 2004-09-19 Mark Mitchell <mark@codesourcery.com>
3384 * decl2.c (determine_visibility): Allow class visibility
3385 directives to override targetm.cxx.export_class_data.
3387 2004-09-18 Kazu Hirata <kazu@cs.umass.edu>
3389 * call.c, semantics.c: Follow spelling conventions.
3390 * class.c: Fix a comment typo.
3392 2004-09-16 Geoffrey Keating <geoffk@apple.com>
3395 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
3396 (handle_pragma_implementation): Likewise.
3398 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
3399 Zack Weinberg <zack@codesourcery.com>
3401 * cp-tree.def: Use tree_code_class enumeration constants
3402 instead of code letters.
3403 * call.c, class.c, cp-gimplify.c, cp-lang.c, cxx-pretty-print.c
3404 * mangle.c, pt.c, semantics.c, tree.c, typeck.c:
3405 Update for new tree-class enumeration constants.
3407 2004-09-16 Mark Mitchell <mark@codesourcery.com>
3410 * parser.c (cp_parser_simple_declaration): Commit to tentative
3411 parses after seeing a decl-specifier.
3412 (cp_parser_simple_declaration): Eliminate spurious message.
3413 (cp_parser_init_declarator): Adjust error message.
3416 * lex.c (unqualified_name_lookup_error): Mark the dummy
3417 declaration as used.
3420 * parser.c (cp_parser_nested_name_specifier): Do not resolve
3421 typename types if the user explicitly said "typename".
3423 2004-09-16 Andrew MacLeod <amacleod@redhat.com>
3425 * error.c (dump_decl): Make sure there is lang_specific info before
3426 checking for DTOR and CTOR decls.
3428 2004-09-16 Nathan Sidwell <nathan@codesourcery.com>
3430 * class.c (copy_virtuals): Remove.
3431 (build_primary_vtable): Use copy_list directly.
3432 (build_secondary_vtable): Likewise.
3433 (update_vtable_entry_for_fn): Clear BV_CALL_INDEX here.
3434 (create_vtable_ptr): Likewise.
3436 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
3438 * search.c: Follow spelling conventions.
3440 2004-09-16 Nathan Sidwell <nathan@codesourcery.com>
3442 * cp-tree.h (struct lang_type_class): Make pure_virtuals a
3444 (CLASSTYPE_INLINE_FRIENDS, CLASSTYPE_PURE_VIRTUALS): Update
3446 * call.c (build_new_method_call): Don't confirm a pure virtual is
3447 in CLASSTYPE_PURE_VIRTUALS. Reorder checks. Make it a warning.
3448 * class.c (check_methods): CLASSTYPE_INLINE_FRIENDS is a VEC(tree).
3449 (fixup_inline_methods, finish_struct): Likewise.
3450 * decl.c (finish_method): Likewise.
3451 * search.c (dfs_get_pure_virtuals, get_pure_virtuals):
3452 CLASSTYPE_PURE_VIRTUALS is a VEC(tree).
3453 * typeck2.c (abstract_virtuals_error): Likewise. Truncate the
3454 vector to avoid repeating the list in error messages.
3456 2004-09-15 Mark Mitchell <mark@codesourcery.com>
3458 * cp-objcp-common.h (LANG_HOOKS_COMDAT_GROUP): Define.
3459 * cp-tree.h (cxx_comdat_group): Declare.
3460 * decl.c (cxx_comdat_group): New function.
3462 2004-09-15 Nathan Sidwell <nathan@codesourcery.com>
3464 * search.c (get_pure_virtuals): Remove unused variables.
3466 * cp-tree.h (struct lang_decl_flags): Remove
3467 needs_final_overrider.
3468 (DECL_NEEDS_FINAL_OVERRIDER_P): Remove.
3469 * decl.c (duplicate_decls): Do not copy DECL_NEEDS_FINAL_OVERRIDER_P.
3470 * class.c (finish_struct_bits): Correct comment about
3471 CLASSTYPE_PURE_VIRTUALS.
3472 * search.c (get_pure_virtuals): Remove useless loop.
3474 2004-09-14 Mark Mitchell <mark@codesourcery.com>
3477 * mangle.c (partially_mangled_name): New variable.
3478 (partially_mangled_name_len): Likewise.
3479 (save_partially_mangled_name): New function.
3480 (restore_partially_mangled_name): Likewise.
3481 (write_encoding): Save and restore partially mangled names around
3482 calls to get_mostly_instantiated_function_type.
3483 (write_unqualified_name): Likewise.
3485 2004-09-14 Nathan Sidwell <nathan@codesourcery.com>
3487 * pt.c (unify): Replace gcc_unreachable with gcc_assert.
3489 2004-09-13 Mark Mitchell <mark@codesourcery.com>
3492 * parser.c (cp_parser_id_expression): Correct value for
3494 (cp_parser_nested_name_specifier_opt): Look through typenames as
3496 (cp_parser_template_name): Honor check_dependency_p.
3499 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name):
3503 * pt.c (unify): Add ENUMERAL_TYPE case. Replace sorry with
3506 2004-09-12 Richard Henderson <rth@redhat.com>
3509 * semantics.c (maybe_cleanup_point_expr): Don't call fold.
3510 * typeck.c (condition_conversion): Likewise.
3512 2004-09-11 Richard Henderson <rth@redhat.com>
3515 * pt.c (cur_stmt_expr): Move from tsubst_expr.
3516 (tsubst_expr) <case STMT_EXPR>: Move ...
3517 (tsubst_copy_and_build): ... here.
3519 2004-09-10 Zack Weinberg <zack@codesourcery.com>
3521 * cp-tree.h (interface_only, interface_unknown): Delete declarations;
3522 comment explaining them moved to c-common.h.
3523 * lex.c (interface_only, interface_unknown, extract_interface_info):
3525 (cxx_finish): Don't reset interface_unknown.
3526 (handle_pragma_interface): Don't set interface_only and
3527 interface_unknown; just the like-named fields in finfo.
3528 (handle_pragma_implementation): Adjust comment.
3529 * decl2.c (cp_finish_file): Don't reset interface_only and
3531 * method.c (synthesize_method): Don't reset interface_unknown or
3532 call extract_interface_info.
3533 * pt.c (pop_tinst_level): Don't call extract_interface_info.
3534 * decl.c (start_cleanup_fn): Don't save or restore interface_only
3535 and interface_unknown.
3536 (make_rtl_for_nonlocal_decl): Call get_fileinfo on input_filename
3537 and use the result instead of the interface_only/interface_unknown
3539 (start_preparsed_function): Likewise.
3540 * lex.c (cxx_make_type): Likewise.
3541 * semantics.c (begin_class_definition): Likewise.
3542 (expand_body): Don't call extract_interface_info.
3544 2004-09-10 Ziemowit Laski <zlaski@apple.com>
3546 * decl.c (objc_mark_locals_volatile): Make description of
3547 routine more descriptive; only mark VAR_DECLs at each
3550 2004-09-10 Richard Henderson <rth@redhat.com>
3553 * call.c (build_vfield_ref): Move...
3554 * class.c (build_vfield_ref): ... here. Convert datum to the
3555 primary base containing the vptr.
3556 (make_new_vtable): Simplify build_primary_vtable arguments.
3557 (finish_struct_1): Do not duplicate TYPE_VFIELD.
3558 * typeck.c (build_class_member_access_expr): Don't warn for
3559 null object access to base fields.
3561 2004-09-10 Ziemowit Laski <zlaski@apple.com>
3563 * decl.c (objc_get_current_scope, objc_mark_locals_volatile):
3564 New functions, to be called from ObjC++.
3566 2004-09-10 Kazu Hirata <kazu@cs.umass.edu>
3568 * class.c, cp-tree.h, decl.c, decl2.c, mangle.c,
3569 name-lookup.h, parser.c, search.c, semantics.c, typeck2.c: Fix
3572 2004-09-09 Ziemowit Laski <zlaski@apple.com>
3574 * typeck.c (build_c_cast): Preserve the cast if casting
3575 to and from an Objective-C type.
3577 2004-09-09 Ziemowit Laski <zlaski@apple.com>
3579 * Make-lang.in (cp/typeck.o): Depend on c-common.h.
3580 * typeck.c: Include c-common.h.
3581 (comptypes): For RECORD_TYPEs, call objc_comptypes() and
3582 return the result if nonnegative.
3584 2004-09-09 Zack Weinberg <zack@codesourcery.com>
3586 * decl2.c (import_export_class)
3587 * lex.c (handle_pragma_interface):
3588 Test MULTIPLE_SYMBOL_SPACES with if, not #ifdef.
3590 2004-09-08 Ziemowit Laski <zlaski@apple.com>
3592 * Make-lang.in (cp/semantics.o): Depend on c-common.h.
3593 * semantics.c: Include c-common.h.
3594 (finish_compound_stmt): Call objc_clear_super_receiver().
3596 2004-09-08 Ziemowit Laski <zlaski@apple.com>
3598 * cp-tree.h (do_poplevel): New prototype.
3599 * semantics.c (do_poplevel): Make externally visible.
3601 2004-09-08 Nathan Sidwell <nathan@codesourcery.com>
3603 * cp-tree.h (tree_pair_s): Define a GC'd vector.
3604 * name-lookup.h (cxx_saved_binding, cp_class_binding): Likewise.
3605 * semantics.c (deferred_access): Likewise.
3607 2004-09-06 Daniel Jacobowitz <dan@debian.org>
3609 * semantics.c (expand_body): Assert that we are not nested.
3611 2004-09-06 Zack Weinberg <zack@codesourcery.com>
3613 * decl.c (build_enumerator): Use add_double and int_fits_type_p
3614 instead of cp_build_binary_op, to avoid creating short-lived trees.
3615 * parser.c (cp_parse_type_specifier <RID_ENUM>): Use two-token
3616 lookahead instead of backtracking. Move some code to avoid a
3618 (cp_parser_enum_specifier): Avoid duplication of effort with caller.
3619 Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
3620 (cp_parser_enumerator_list, cp_parser_enumerator_definition):
3621 Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
3623 2004-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3625 * decl.c (grok_declarator): Remove a redundant semicolon.
3627 * parser.c (cp_parser_decl_specifier_seq, cp_parser_type_specifier):
3628 Correct comments describing function parameters.
3630 2004-09-03 Matt Austern <austern@apple.com>
3631 Compile speed improvement.
3632 * parser.c (cp_lexer_print_token): Only define if ENABLE_CHECKING set.
3633 Otherwise define a stub macro that expands to nothing.
3634 (cp_lexer_debugging_p): Only define if ENABLE_CHECKING set. Otherwise
3635 define a stub macro that expands to 0.
3636 (cp_lexer_start_debugging): Only define if ENABLE_CHECKING set.
3637 (cp_lexer_stop_debugging): Likewise.
3638 (cp_lexer_debug_stream): Only define if ENABLE_CHECKING set. Otherwise
3639 define a stub macro that expands to NULL.
3640 (cp_lexer_new_main): Only set debugging_p if ENABLE_CHECKING set.
3641 (cp_lexer_new_from_tokens): Likewise.
3643 2004-09-03 Jan Hubicka <jh@suse.cz>
3645 * decl.c (finish_function): Clean out pointers we no longer need.
3647 2004-09-03 Jan Beulich <jbeulich@novell.com>
3649 * g++spec.c (MATH_LIBRARY_PROFILE): Default to MATH_LIBRARY rather
3652 2004-09-02 Paul Brook <paul@codesourcery.com>
3654 * decl2.c (determine_visibility): Only check data visibility
3657 2004-08-31 Mark Mitchell <mark@codesourcery.com>
3659 * cp-tree.h (DECL_CONSTRUCTION_VTABLE_P): New macro.
3660 * class.c (build_ctor_vtbl_group): Set DECL_CONSTRUCTION_VTABLE_P.
3661 * decl2.c (determine_visibility): Honor
3662 TARGET_CXX_EXPORT_CLASS_DATA.
3664 * class.c (key_method): Rename to ...
3665 (determine_key_method): ... this.
3666 (finish_struct_1): Adjust accordingly.
3667 * cp-tree.h (key_method): Declare.
3668 * decl2.c (maybe_emit_vtables): Determine the key method here if
3669 it has not already been done.
3671 2004-08-31 Ziemowit Laski <zlaski@apple.com>
3673 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-objcp-common.o.
3674 (cp/cp-lang.o): Depend on debug.h, gtype-cp.h and cp/cp-objcp-common.h.
3675 (cp/cp-decl.c): Do not depend on gtype-cp.h.
3676 (cp/cp-objcp-common.o): New target.
3677 * cp-lang.c: Include debug.h, cp-objcp-common.h and gtype-cp.h.
3678 (cxx_get_alias_set, cxx_warn_unused_global_decl, cp_expr_size,
3679 cp_tree_size, cp_var_mod_type_p, cxx_initialize_diagnostics): Move
3680 prototypes and definitions to cp-objcp-common.h and cp-objcp-common.c,
3682 (LANG_HOOKS_TREE_SIZE, LANG_HOOKS_FINISH,
3683 LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_INIT_OPTIONS,
3684 LANG_HOOKS_INITIALIZE_DIAGNOSTICS, LANG_HOOKS_HANDLE_OPTION,
3685 LANG_HOOKS_HANDLE_FILENAME, LANG_HOOKS_MISSING_ARGUMENT,
3686 LANG_HOOKS_POST_OPTIONS, LANG_HOOKS_GET_ALIAS_SET,
3687 LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_EXPAND_EXPR,
3688 LANG_HOOKS_EXPAND_DECL, LANG_HOOKS_PARSE_FILE,
3689 LANG_HOOKS_DUP_LANG_SPECIFIC_DECL, LANG_HOOKS_TRUTHVALUE_CONVERSION,
3690 LANG_HOOKS_SET_DECL_ASSEMBLER_NAME, LANG_HOOKS_MARK_ADDRESSABLE,
3691 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
3692 LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
3693 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_PRINT_ERROR_FUNCTION,
3694 LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL, LANG_HOOKS_WRITE_GLOBALS,
3695 LANG_HOOKS_FUNCTION_INIT, LANG_HOOKS_FUNCTION_FINAL,
3696 LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P,
3697 LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE,
3698 LANG_HOOKS_ATTRIBUTE_TABLE, LANG_HOOKS_TREE_INLINING_WALK_SUBTREES,
3699 LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN,
3700 LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS,
3701 LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P,
3702 LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P,
3703 LANG_HOOKS_TREE_INLINING_VAR_MOD_TYPE_P,
3704 LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN,
3705 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN, LANG_HOOKS_EXPR_SIZE,
3706 LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR,
3707 LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, LANG_HOOKS_MAKE_TYPE,
3708 LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE,
3709 LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
3710 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE, LANG_HOOKS_INCOMPLETE_TYPE_ERROR,
3711 LANG_HOOKS_TYPE_PROMOTES_TO, LANG_HOOKS_REGISTER_BUILTIN_TYPE,
3712 LANG_HOOKS_GIMPLIFY_EXPR, LANG_HOOKS_FOLD_OBJ_TYPE_REF): Move
3713 hooks to cp-objcp-common.h.
3714 (finish_file): New function.
3715 * cp-objcp-common.c: New file.
3716 * cp-objcp-common.h: New file.
3717 * cp-tree.h (cp_finish_file): New prototype.
3718 * decl.c: Do not include gtype-cp.h.
3719 * decl2.c (finish_file): Rename to cp_finish_file.
3721 2004-08-31 Richard Henderson <rth@redhat.com>
3724 * pt.c (tsubst_expr): Move OFFSETOF_EXPR handling ...
3725 (tsubst_copy_and_build): ... here.
3727 2004-08-30 Mark Mitchell <mark@codesourcery.com>
3729 * cp-tree.h (initialize_artificial_var): Declare.
3730 * decl.c (initialize_artifical_var): New function.
3731 * class.c (initialize_array): Remove.
3732 (initialize_vtable): Use initialize_artificial_var.
3733 (build_vtt): Likewise.
3734 (build_ctor_vtbl_group): Likewise.
3736 2004-08-30 Richard Henderson <rth@redhat.com>
3738 * class.c (build_base_path): Use build_address directly.
3739 * typeck.c (build_unary_op): Don't lower &a.b to pointer
3740 arithmetic directly.
3741 * typeck2.c (store_init_value): Don't assume !TREE_CONSTANT
3742 means !initializer_constant_valid_p.
3744 2004-08-30 Richard Henderson <rth@redhat.com>
3746 * class.c (fixed_type_or_null): Use get_base_address before
3747 assuming an ADDR_EXPR is non-null.
3749 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
3751 * name-lookup.c (pop_binding, pushdecl,
3752 set_identifier_type_value_with_scope, push_overloaded_decl,
3753 arg_assoc_type): Replace abort with gcc_assert or gcc_unreachable.
3754 * parser.c (cp_parser_diagnose_invalid_type_name,
3755 cp_parser_postfix_expression, cp_parser_unary_expression,
3756 cp_parser_check_declarator_template_para): Likewise.
3757 * pt.c (push_inline_template_parms_recursive,
3758 check_explicit_specialization, convert_nontype_argument,
3759 coerce_template_template_parms, uses_template_parms,
3760 instantiate_class_template, tsubst_decl, tsubst, tsubst_copy,
3761 tsubst_expr, instantiate_template,
3762 maybe_adjust_types_for_deduction, type_unification_real,
3763 resolve_overloaded_unification, template_decl_level,
3764 type_dependent_expression_p): Likewise.
3765 * search.c (lookup_base_r): Likewise.
3766 * semantics.c (finish_stmt_expr, simplify_aggr_init_expr): Likewise.
3767 * tree.c (lvalue_p_1, count_functions, cxx_printable_name,
3768 verify_stmt_tree_r, get_type_decl, stabilize_call): Likewise.
3769 * typeck.c (common_type, get_member_function_from_ptrfunc,
3770 build_binary_op, build_unary_op, expand_ptrmemfunc_cst): Likewise.
3771 * typeck2.c (cxx_incomplete_type_diagnostic,
3772 split_nonconstant_init_1, store_init_value,
3773 process_init_constructor): Likewise.
3775 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
3777 * call.c (check_dtor_name): Replace abort with gcc_assert or
3779 (build_call, add_builtin_candidate, build_new_op,
3780 convert_like_real, build_over_call, in_charge_arg_for_name,
3781 source_type, joust): Likewise.
3782 * class.c (build_simple_base_path, get_vcall_index,
3783 finish_struct_1, instantiate_type, get_enclosing_class,
3784 add_vcall_offset_vtbl_entries_1, cp_fold_obj_type_ref): Likewise.
3785 * cp-gimplify.c (cp_genericize): Likewise.
3786 * cp-lang.c (cp_expr_size, cp_tree_size): Likewise.
3787 * cvt.c (cp_convert_to_pointer, ocp_convert): Likewise.
3788 * decl.c (poplevel, make_unbound_class_template, reshape_init,
3789 check_special_function_return_type, grokdeclarator,
3790 grok_op_properties, tag_name, xref_tag, start_preparsed_function,
3791 finish_function): Likewise.
3792 * decl2.c (grokfield, maybe_emit_vtables):Likewise.
3793 * error.c (dump_global_iord, dump_decl, dump_template_decl,
3794 language_to_string): Likewise.
3795 * except.c (choose_personality_routine): Likewise.
3796 * friend.c (do_friend): Likewise.
3797 * g++spec.c (lang_specific_driver): Likewise.
3798 * init.c (build_zero_init, expand_default_init, build_new_1,
3799 build_vec_delete_1, build_vec_init, build_dtor_call): Likewise.
3800 * lex.c (retrofit_lang_decl, cp_type_qual_from_rid): Likewise.
3801 * mangle.c (add_substitution, write_unscoped_name,
3802 write_template_prefix, write_identifier,
3803 write_special_name_destructor, write_type, write_builtin_type,
3804 write_expression, write_template_param,
3805 write_java_integer_type_codes): Likewise.
3806 * method.c (implicitly_declare_fn): Likewise.
3808 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
3810 * cp-tree.h (BINFO_PRIMARY_P): Use a binfo flag.
3811 (BINFO_INDIRECT_PRIMARY_P): Remove.
3812 * class.c (determine_primary_base): Rename to ...
3813 (determine_primary_bases): ... here. Set all primary bases.
3814 (set_primary_base): Remove.
3815 (mark_primary_bases): Remove.
3816 (build_simple_base_path, walk_subobject_offsets,
3817 propagate_binfo_offsets, end_of_class): Adjust.
3818 (layout_class_type): Rename determine_primary_base call.
3819 (dump_class_hierarchy_r, dump_vtable): Adjust. Don't pass a binfo
3821 (dfs_build_secondary_vptr_vtt_inits, dfs_accumulate_vtbl_inits,
3822 build_rtti_vtbl_entries): Adjust.
3823 * init.c (build_vtbl_address): Adjust.
3825 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Use gcc_assert.
3827 2004-08-28 Ziemowit Laski <zlaski@apple.com>
3829 * Make-lang.in (CXX_OBJS): Split up into CXX_OBJS and
3830 CXX_AND_OBJCXX_OBJS.
3831 (CXX_C_OBJS): Include in CXX_AND_OBJCXX_OBJS instead of listing
3832 separately on the link line.
3834 2004-08-28 Jason Merrill <jason@redhat.com>
3836 * decl.c (expand_static_init): Avoid bogus warnings.
3838 2004-08-27 Jason Merrill <jason@redhat.com>
3841 * tree.c (stabilize_init): See through a COMPOUND_EXPR.
3844 * decl.c (expand_static_init): Use thread-safety API.
3845 (register_dtor_fn): Return the call, don't expand it.
3846 * tree.c (add_stmt_to_compound): New fn.
3847 (stabilize_call): Use it.
3849 2004-08-27 Richard Henderson <rth@redhat.com>
3851 * cp-tree.def (OFFSETOF_EXPR): New.
3852 * parser.c (cp_parser_builtin_offsetof): Either built an
3853 OFFSETOF_EXPR, or call fold_offsetof immediately.
3854 * pt.c (tsubst_expr): Handle OFFSETOF_EXPR.
3856 2004-08-27 Nathan Sidwell <nathan@codesourcery.com>
3858 * call.c (validate_conversion_obstack): Replace
3859 my_friendly_assert with gcc_assert or gcc_unreachable.
3860 (direct_reference_binding, merge_conversion_sequences,
3861 build_user_type_conversion_1, perform_overload_resolution,
3862 build_op_delete_call, enforce_access, call_builtin_trap,
3863 build_over_call, build_special_member_call, build_new_method_call,
3864 initialize_reference): Likewise.
3865 * class.c (build_base_path, build_primary_vtable, alter_access,
3866 check_bases, update_vtable_entry_for_fn, layout_empty_base,
3867 clone_function_decl, adjust_clone_args,
3868 type_requires_array_cookie, include_empty_classes,
3869 finish_struct_1, resolve_address_of_overloaded_function,
3870 instantiate_type, get_vtbl_decl_for_binfo, build_vtt_inits,
3871 dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
3872 accumulate_vtbl_inits, build_vtbl_initializer,
3873 build_vbase_offset_vtbl_entries, build_rtti_vtbl_entries): Likewise.
3874 * cvt.c (build_up_reference, convert_to_reference): Likewise.
3875 * decl.c (poplevel, duplicate_decls, make_typename_type,
3876 cxx_init_decl_processing, reshape_init, check_initializer,
3877 make_rtl_for_nonlocal_decl, initialize_local_var, cp_finish_decl,
3878 expand_static_init, grokfndecl, grokvardecl, build_ptrmem_type,
3879 grokdeclarator, copy_fn_p, grok_op_properties, xref_tag,
3880 xref_basetypes, start_preparsed_function, save_function_data,
3881 finish_function, finish_method, maybe_register_incomplete_var,
3882 complete_vars): Likewise.
3883 * decl2.c (grok_array_decl, check_member_template,
3884 check_classfn, finish_static_data_member_decl, coerce_new_type,
3885 coerce_delete_type, import_export_class, decl_needed_p,
3886 determine_visibility, import_export_decl, build_cleanup,
3887 start_static_initialization_or_destructi, do_static_destruction,
3888 prune_vars_needing_no_initialization,
3889 build_offset_ref_call_from_tree): Likewise.
3890 * error.c (dump_decl, dump_expr): Likewise.
3891 * init.c (finish_init_stmts, build_zero_init,
3892 expand_virtual_init, expand_default_init, expand_aggr_init_1,
3893 build_offset_ref, build_new_1, build_delete, build_vbase_delete):
3895 * mangle.c (write_method_parms, write_template_args,
3896 write_expression, write_template_arg): Likewise.
3897 * method.c (make_thunk, finish_thunk, use_thunk): Likewise.
3898 * name-lookup.c (pop_binding, begin_scope, leave_scope,
3899 resume_scope, push_using_decl, validate_nonmember_using_decl,
3900 is_ancestor, poplevel_class, set_inherited_value_binding_p,
3901 push_class_level_binding, do_class_using_decl, push_namespace,
3902 pop_namespace, add_using_namespace, ambiguous_decl,
3903 lookup_namespace_name, lookup_type_current_level,
3904 maybe_process_template_type_declaration): Likewise.
3905 * parser.c (cp_lexer_peek_nth_token,
3906 cp_parser_parse_and_diagnose_invalid_typ,
3907 cp_parser_translation_unit, cp_parser_template_id,
3908 cp_parser_lookup_name, cp_parser_late_parsing_for_member): Likewise.
3909 * pt.c (push_access_scope, finish_member_template_decl,
3910 push_inline_template_parms_recursive, add_outermost_template_args,
3911 get_innermost_template_args, begin_explicit_instantiation,
3912 end_explicit_instantiation, retrieve_specialization,
3913 is_specialization_of, is_specialization_of_friend,
3914 register_specialization, check_explicit_specialization,
3915 comp_template_parms, process_template_parm,
3916 process_partial_specialization, convert_nontype_argument,
3917 coerce_template_template_parms, coerce_template_parms,
3918 mangle_class_name_for_template, lookup_template_function,
3919 lookup_template_class, instantiate_class_template, tsubst_decl,
3920 tsubst_function_type, tsubst, tsubst_qualified_id, tsubst_copy,
3921 instantiate_template, fn_type_unification, type_unification_real,
3922 get_template_base, regenerate_decl_from_template,
3923 template_for_substitution, instantiate_decl,
3924 get_mostly_instantiated_function_type, dependent_scope_ref_p,
3925 value_dependent_expression_p, resolve_typename_type): Likewise.
3926 * repo.c (repo_emit_p): Likewise.
3927 * rtti.c (build_headof, get_tinfo_decl, get_pseudo_ti_init,
3928 create_tinfo_types, emit_tinfo_decl): Likewise.
3929 * search.c (lookup_base_r, lookup_base, lookup_field_1,
3930 dfs_access_in_type, build_baselink, lookup_member,
3931 adjust_result_of_qualified_name_lookup, copied_binfo): Likewise.
3932 * semantics.c (perform_or_defer_access_check,
3933 finish_non_static_data_member, finish_stmt_expr_expr,
3934 finish_stmt_expr, finish_call_expr, finish_pseudo_destructor_expr,
3935 finish_template_template_parm, finish_member_declaration,
3936 emit_associated_thunks): Likewise.
3937 * tree.c (build_target_expr_with_type, force_target_expr,
3938 copy_binfo, get_first_fn, cp_tree_equal): Likewise.
3939 * typeck.c (type_after_usual_arithmetic_conversions, comptypes,
3940 cxx_sizeof_or_alignof_type, perform_integral_promotions,
3941 build_class_member_access_expr, finish_class_member_access_expr,
3942 build_ptrmemfunc_access_expr, build_unary_op,
3943 unary_complex_lvalue, cxx_mark_addressable, build_modify_expr,
3944 build_ptrmemfunc, expand_ptrmemfunc_cst, check_return_expr
3945 * typeck2.c (complete_type_check_abstract,
3946 abstract_virtuals_error, process_init_constructor,
3947 add_exception_specifier): Likewise.
3949 2004-08-27 Nathan Sidwell <nathan@codesourcery.com>
3951 * class.c (build_vtbl_initializer): Use ssize_int.
3952 * decl.c (complete_array_type): Likewise.
3953 * method.c (finish_thunk): Likewise.
3954 * search.c (get_dynamic_base_type): Likewise.
3956 2004-08-26 Richard Henderson <rth@redhat.com>
3958 * cp-tree.h (DECL_FIELD_IS_BASE): New.
3959 * class.c (build_base_field): Set it.
3960 (build_simple_base_path): Use it.
3961 (fixed_type_or_null): Don't consider base fields definitive.
3963 2004-08-25 Roger Sayle <roger@eyesopen.com>
3966 PR tree-optimization/16372
3967 * decl.c (finish_enum): Make the precision of the enumerated type
3968 the same width as the underlying integer type.
3970 2004-08-25 Mark Mitchell <mark@codesourcery.com>
3973 * lex.c (build_lang_decl): Set DECL_NO_STATIC_CHAIN for all C++
3976 * mangle.c (get_identifier_nocopy): Add cast.
3978 * cp-tree.h (mangle_type): Remove.
3979 * mangle.c (globals): GTY it.
3980 (mangle_obstack): New variable.
3981 (name_obstack): Likewise.
3982 (name_base): Likewise.
3983 (write_char): Adjust accordingly.
3984 (write_chars): Likewise.
3985 (write_string): Likewise.
3986 (start_mangling): Initialize G.substitutions only one. Add
3988 (finish_mangling): Use VARRAY_CLEAR to reclaim
3989 storage in G.substitutions. Use obstack_finish.
3990 (init_mangle): Adjust for changes to variable names above.
3991 Initialize G.substitutions.
3992 (mangle_decl_string): Adjust call to start_mangling.
3993 (get_identifier_nocopy): New function.
3994 (mangle_decl): Use it.
3995 (mangle_type_string): Adjust call to start_mangling.
3996 (mangle_special_for_type): Likewise.
3997 (mangle_vtt_for_type): Likewise.
3998 (mangle_ctor_vtbl_for_type): Likewise.
3999 (mangle_thunk): Likewise.
4000 (mangle_guard_variable): Likewise.
4001 (mangle_ref_init_variable): Likewise.
4003 2004-08-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4006 * pt.c (redeclare_class_template): Check the type of non-type and
4007 template template parameter.
4009 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
4011 * call.c (convert_class_to_reference): Adjust build_int_cst calls.
4012 (build_user_type_conversion_1, convert_like_real,
4013 build_java_interface_fn_ref, build_special_member_call): Likewise.
4014 * class.c (finish_struct_1, build_vtbl_initializer): Likewise.
4015 * cp-gimplify.c (cp_gimplify_expr): Likewise.
4016 * cvt.c (cp_convert_to_pointer): Likewise.
4017 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
4018 * decl2.c (start_static_initialization_or_destruction,
4019 generate_ctor_or_dtor_function): Likewise.
4020 * except.c (build_throw): Likewise.
4021 * mangle.c (write_integer_cst): Likewise.
4022 * method.c (finish_thunk): Likewise.
4023 * rtti.c (build_headof, get_tinfo_decl_dynamic,
4024 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
4025 get_pseudo_ti_init): Likewise.
4026 * search.c (get_dynamic_cast_base_type): Likewise.
4028 2004-08-25 Zack Weinberg <zack@codesourcery.com>
4030 * class.c, search.c: Remove references to DWARF_DEBUG.
4032 2004-08-25 Adam Nemet <anemet@lnxw.com>
4034 * repo.c (extract_string): Reset backquote after one character.
4035 (get_base_filename): Fix indentation.
4037 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
4039 * decl.c (cxx_init_decl_processing): Adjust
4040 build_common_tree_nodes call.
4042 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
4045 * (is_subobject_of_p): Resurrect & optimize.
4046 (lookup_field_r): Use it.
4048 2004-08-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4051 * search.c (friend_accessible_p): Increment processing_template_decl
4052 when deal with TEMPLATE_DECL of SCOPE.
4054 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
4057 * semantics.c (check_accessibility_of_qualified_id): Defer check
4058 if qualifying_type is a template parameter.
4060 2004-08-23 Mark Mitchell <mark@codesourcery.com>
4063 * pt.c (instantiate_decl): Do not try to apply
4064 DECL_DECLARED_INLINED_P to a VAR_DECL.
4066 * search.c (build_baselink): Fix typo in comment.
4068 2004-08-22 Andrew Pinski <apinski@apple.com>
4071 2004-08-22 Andrew Pinski <apinski@apple.com>
4073 * typeck.c (build_unary_op): Use &a.b if the folded lowered
4074 expression is not constant.
4076 2004-08-23 Nathan Sidwell <nathan@codesourcery.com>
4078 * name-lookup.c (pushdecl): Rename build_type_copy call.
4079 * tree.c (cp_build_qualified_type_real,
4080 build_exception_variant, handle_java_interface_attribute): Likewise.
4082 2004-08-22 Andrew Pinski <apinski@apple.com>
4085 * typeck.c (build_unary_op): Use &a.b if the folded lowered
4086 expression is not constant.
4088 2004-08-20 Mark Mitchell <mark@codesourcery.com>
4091 * decl.c (expand_static_init): Use DECL_FUNCTION_SCOPE_P.
4093 2004-08-21 Joseph S. Myers <jsm@polyomino.org.uk>
4096 * pt.c (tsubst_copy_and_build): Avoid clearing TREE_NO_WARNING for
4099 2004-08-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4101 * pt.c (register_specialization): Check DECL_TEMPLATE_SPECIALIZATION
4102 before calling comp_template_args.
4104 2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
4106 * class.c (build_vtbl_initializer): Use build_int_cst for
4107 negative size types.
4108 * decl.c (complete_array_type): Likewise.
4109 * method.c (finish_thunk): Likewise.
4111 2004-08-20 Andreas Tobler <a.tobler@schweiz.ch>
4113 * tree.c: Remove unused mark_local_for_remap_r.
4115 2004-08-19 Eric Christopher <echristo@redhat.com>
4117 * cp-tree.h (cxx_unsave_expr_now): Delete prototype.
4118 * tree.c (cxx_unsave_expr_now): Delete.
4119 (cp_unsave_r): Ditto.
4121 2004-08-19 Mark Mitchell <mark@codesourcery.com>
4124 * pt.c (push_template_decl_real): Disallow template allocation
4125 functions with fewer than two parameters.
4127 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
4129 * cp-tree.h (build_shared_int_cst): Remove.
4130 * tree.c (shared_int_cache): Remove.
4131 (build_shared_int_cst): Remove.
4132 * class.c (finish_struct_1): Use build_int_cst.
4134 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
4136 * decl.c (finish_enum): Do not copy value node early, copy
4138 * lex.c (cxx_init): Force null_node to be unique.
4140 2004-08-19 Joseph S. Myers <jsm@polyomino.org.uk>
4143 * pt.c (tsubst_copy, tsubst_copy_and_build): Copy TREE_NO_WARNING
4144 from input for MODOP_EXPR.
4146 2004-08-18 Mark Mitchell <mark@codesourcery.com>
4148 * pt.c (dependent_template_p): Fix typo in commment.
4151 * pt.c (dependent_template_p): Treat IDENTIFIER_NODEs as
4154 2004-08-17 Mark Mitchell <mark@codesourcery.com>
4157 * pt.c (unify): Tidy ARRAY_TYPE handling. Make sure that non-type
4158 arguments have the same type as the corresponding parameter.
4161 * parser.c (cp_parser_name_lookup_error): If parser->object_scope
4162 is set use it for diagnostic purposes.
4163 (cp_parser_pseudo_destructor_name): Remove special-case error
4167 * semantics.c (expand_or_defer_fn): Honor -fkeep-inline-functions.
4170 * cp-tree.h (qualified_name_lookup_error): Add parameter.
4171 * name-lookup.c (do_class_using_decl): Restrict set of entities
4172 passed to cp_emit_debug_info_for_using more carefully.
4173 (lookup_qualified_name): Allow lookup_member to return sets of
4175 * parser.c (cp_parser_lookup_name): Add ambiguous_p parameter.
4176 (cp_parser_primary_expression): Handle ambiguous lookups.
4177 (cp_parser_template_name): Adjust use of cp_parser_lookup_name.
4178 (cp_parser_template_argument): Likewise.
4179 (cp_parser_elaborate_type_specifier): Likewise.
4180 (cp_parser_namespace_name): Likewise.
4181 (cp_parser_class_name): Likewise.
4182 (cp_parser_lookup_name_simple): Likewise.
4183 * pt.c (tsubst_qualified_id): Handle ambiguous results.
4184 (tsubst_expr): Likewise.
4185 * semantics.c (qualified_name_lookup_error): Add decl paramter.
4186 For ambiguous lookups, print candidates.
4188 2004-08-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4191 * pt.c (instantiate_pending_templates): Add int parameter. Don't
4193 * cp-tree.h (instantiate_pending_templates): Adjust prototype.
4194 * decl2.c (finish_file): Adjust call to
4195 instantiate_pending_templates.
4197 2004-08-15 Roger Sayle <roger@eyesopen.com>
4199 * call.c (build_vfield_ref, build_call, build_conditional_expr,
4200 convert_arg_to_ellipsis, build_x_va_arg, build_over_call,
4201 build_java_interface_fn_ref, build_special_member_call,
4202 build_new_method_call, initialize_reference): Replace calls to
4203 build with calls to buildN.
4204 * class.c (build_base_path, convert_to_base_statically,
4205 build_vfn_ref, instantiate_type, dfs_accumulate_vtbl_inits,
4206 build_vtbl_initializer): Likewise.
4207 * cp-gimplify.c (genericize_try_block, genericize_catch_block,
4208 gimplify_if_stmt, cp_genericize_r): Likewise.
4209 * cvt.c (convert_to_void): Likewise.
4210 * decl.c (check_initializer, finish_constructor_body,
4211 finish_destructor_body): Likewise.
4212 * error.c (dump_expr): Likewise.
4213 * except.c (build_exc_ptr, expand_start_catch_block, build_throw):
4215 * init.c (perform_member_init, expand_virtual_init,
4216 expand_cleanup_for_base, build_init, expand_default_init,
4217 build_offset_ref, decl_constant_value, build_new, build_new_1,
4218 build_vec_delete_1, build_vec_init, build_delete,
4219 push_base_cleanups, build_vec_delete): Likewise.
4220 * mangle.c (write_integer_cst): Likewise.
4221 * method.c (thunk_adjust, do_build_copy_constructor,
4222 do_build_assign_ref): Likewise.
4223 * pt.c (lookup_template_function, tsubst, tsubst_copy_and_build,
4224 unify, build_non_dependent_expr): Likewise.
4225 * rtti.c (build_headof, build_typeid, ifnonnull,
4226 build_dyanmic_cast_1, tinfo_base_init): Likewise.
4227 * semantics.c (begin_compound_stmt, finish_call_expr,
4228 finish_pseudo_destructor_expr, finish_id_expression,
4229 simplify_aggr_init_expr, finalize_nrv_r): Likewise.
4230 * tree.c (build_target_expr, build_cplus_new, array_type_nelts_top,
4231 array_type_nelts_total, stabilize_call): Likewise.
4232 * typeck.c (decay_conversion, build_class_member_access_expr,
4233 lookup_destructor, build_ptrmemfunc_access_expr, build_array_ref,
4234 get_member_function_from_ptrfunc, build_binary_op, pointer_diff,
4235 build_x_unary_op, build_unary_op, unary_complex_lvalue,
4236 build_compound_expr, build_modify_expr, expand_ptrmemfunc_cst,
4237 check_return_expr): Likewise.
4238 * typeck2.c (split_nonconstant_1, split_nonconstant_init_1,
4239 split_nonconstant_init, store_init_value, build_m_component_ref):
4242 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
4244 * call.c (convert_class_to_reference,
4245 build_user_type_conversion_1, convert_like_real,
4246 build_java_interface_fn_ref, build_special_member_call): Use
4248 * class.c (build_vtbl_initializer): Likewise.
4249 * cp-gimplify.c (cp_gimplify_expr): Likewise.
4250 * cvt.c (cp_convert_to_pointer): Likewise.
4251 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
4252 * decl2.c (start_static_initialization_or_destruction,
4253 generate_ctor_or_dtor_function): Likewise.
4254 * except.c (build_throw): Likewise.
4255 * lex.c (cxx_init): Likewise.
4256 * mangle.c (write_integer_cst): Likewise.
4257 * rtti.c (build_headof, get_tinfo_decl_dynamic,
4258 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
4259 get_pseudo_ti_init): Likewise.
4260 * search.c (get_dynamic_cast_base_type): Likewise.
4261 * tree.c (build_shared_int_cst): Likewise.
4263 2004-08-12 Mark Mitchell <mark@codesourcery.com>
4266 * class.c (count_depth_data): New type.
4267 (dfs_depth_post): New function.
4268 (dfs_depth_q): Likewise.
4269 (find_final_overrider_data_s): Change type of vpath.
4271 (dfs_find_final_overrider_1): New function.
4272 (dfs_find_final_overrider): Use it.
4273 (dfs_find_final_overrider_q): Adjust use of vpath.
4274 (dfs_find_final_overrider_post): Likewise.
4275 (find_final_overrider): Use dfs_depth. Allocate and deallocate
4278 2004-08-12 Jan Beulich <jbeulich@novell.com>
4280 * parser.c (cp_parser_asm_definition): Properly consume scope operator
4281 tokens preceding the clobbers. Don't check for scope operator
4282 following inputs. Simplify inputs handling to match that now used for
4285 2004-08-11 Mark Mitchell <mark@codesourcery.com>
4288 * except.c (build_throw): Allocate cleanup_type and the function
4289 for __cxa_throw separately.
4292 * call.c (standard_conversion): Do not accept conversions between
4293 pointers to members if the class types are unrelated.
4296 * parser.c (cp_parser_builtin_offsetof): Cast to "const volatile
4297 char &" instead of just "char &".
4300 * pt.c (tsubst): Just return the unknown_type_node.
4302 2004-08-11 Mark Mitchell <mark@codesourcery.com>
4305 * parser.c (cp_parser_class_specifier): Robustify.
4308 * pt.c (tsubst_copy_and_build): Complain about invalid
4312 * pt.c (tsubst_default_argument): Clear out current_class_ptr and
4313 current_class_ref while tsubsting.
4315 2004-08-10 Mark Mitchell <mark@codesourcery.com>
4318 * parser.c (cp_parser_init_declarator): Robustify.
4320 2004-08-06 Richard Sandiford <rsandifo@redhat.com>
4322 * typeck2.c (process_init_constructor): Guard the missing field warning
4323 with warn_missing_field_initializers rather than extra_warnings.
4325 2004-08-06 Paolo Bonzini <bonzini@gnu.org>
4327 * class.c (instantiate_type) <ENTRY_VALUE_EXPR>: Do not handle.
4329 2004-08-05 Mark Mitchell <mark@codesourcery.com>
4331 * decl.c (start_preparsed_function): Move determine_visibility
4333 * decl2.c (determine_visibility): Incorporate dllexport testing.
4335 2004-08-05 Geoffrey Keating <geoffk@apple.com>
4337 * g++spec.c (lang_specific_driver): An -Xlinker or -Wl, option
4338 means that libstdc++ is needed.
4340 2004-08-05 Nathan Sidwell <nathan@codesourcery.com>
4342 * cvt.c (cp_convert_to_pointer): Adjust force_fit_type call.
4344 2004-08-04 Geoffrey Keating <geoffk@apple.com>
4346 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_ASSEMBLER_NAME rather
4347 than passing it as a parameter to rest_of_decl_compilation.
4348 * decl2.c (grokfield): Use set_user_assembler_name.
4350 2004-08-04 Nathan Sidwell <nathan@codesourcery.com>
4352 * decl.c (complete_array_type): Don't gratuitously copy
4353 maxindex. Its type is always set.
4355 2004-08-04 Paul Brook <paul@codesourcery.com>
4357 * Make-lang.in (cp/semantics.o, cp/optimize.o): Depend on TARGET_H.
4358 * cp-tree.h (struct language_function): Rename x_dtor_label to
4360 (dtor_label): Rename ...
4361 (cdtor_label): ... to this.
4362 * decl.c (begin_constructor_body): Remove.
4363 (check_special_function_return_type): Maybe change the return type.
4364 (grokdeclarator): Pass the class type.
4365 (start_preparsed_function): Constructors may need a return label.
4366 (finish_constructor_body, finish_destructor_body): Set the return
4368 (begin_function_body): Don't call begin_constructor_body.
4369 (finish_function): Don't warn for constructors or destructors.
4370 (implicitly_declare_fn): Maybe change the return type.
4371 * optimize.c: Include target.h.
4372 (maybe_clone_body): Remap the function result.
4373 * semantics.c: Include target.h.
4374 (finish_return_stmt): Maybe jump to return label for constructors.
4376 2004-08-03 Mark Mitchell <mark@codesourcery.com>
4378 * class.c (build_vtable): Do not set DECL_VISIBILITY here.
4379 (check_field_decls): Or here.
4380 (check_methods): Or here.
4381 (initialize_array): Don't mess with DECL_CONTEXT.
4382 * cp-tree.h (start_decl): Adjust prototype.
4383 (determine_visibility): New function.
4384 * decl.c (duplicate_decls): Remove checks for hidden "operator
4386 (build_library_fn_1): Give all library functions default
4388 (start_decl): Add pop_scope_p parameter. Tidy.
4389 (cp_finish_decl): Do not pop scopes here. Call
4390 determine_visibility for variable definitions.
4391 (start_preparsed_function): Call determine_visibility.
4392 * decl2.c (determine_visibility): New function.
4393 * method.c (use_thunk): Fix formatting.
4394 * parser.c (cp_parser_condition): Adjust calls to start_decl.
4395 (cp_parser_init_declarator): Likewise.
4396 * pt.c (instantiate_decl): Always call pop_nested_class.
4397 * rtti.c (get_tinfo_decl): Do not set DECL_VISIBILITY.
4398 (tinfo_base_init): Likewise.
4400 2004-08-02 Mark Mitchell <mark@codesourcery.com>
4403 * name-lookup.c (validate_nonmember_using_decl): Robustify.
4405 2004-08-01 Mark Mitchell <mark@codesourcery.com>
4408 * name-lookup.c (decl_namespace): Remove.
4409 (current_decl_namespace): Use decl_namespace_context instead of
4411 (push_decl_namespace): Likewise.
4412 (arg_assoc_class): Likewise.
4413 (arg_assoc_type): Likewise.
4414 * pt.c (check_specialization_namespace): New function.
4415 (maybe_process_partial_specialization): Use it.
4416 (register_specialization): Likewise.
4419 * cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): New macro.
4420 * call.c (null_ptr_cst_p): Handle variables with constant
4422 * pt.c (convert_nontype_argument): Use
4423 DECL_INTEGRAL_CONSTANT_VAR_P.
4424 * semantics.c (finish_id_expression): Likewise.
4427 * decl.c (duplicate_decls): Reject duplicate namespace
4431 * typeck.c (build_ptrmemfunc): Loosen assertion.
4433 2004-08-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
4435 * call.c (z_candidate::template_decl): Rename from template.
4436 (add_template_candidate_real): Adjust member reference.
4439 2004-07-29 Mark Mitchell <mark@codesourcery.com>
4441 * cp-tree.h (IDENTIFIER_REPO_CHOSEN): Define.
4442 (lang_decl_flags): Narrow the width of "languages". Add
4444 (DECL_NEEDED_P): Remove.
4445 (FOR_EACH_CLONE): New macro.
4446 (DECL_REPO_AVAILABLE_P): Likewise.
4447 (DECL_TINFO_P): Likewise.
4448 (set_linkage_according_to_type): Declare.
4449 (import_export_vtable): Remove.
4450 (import_export_tinfo): Likewise.
4451 (mark_needed): New function.
4452 (decl_needed_p): Likewise.
4453 (note_vauge_linkage_fn): Likewise.
4454 (init_repo): Change prototype.
4455 (repo_template_used): Remove.
4456 (repo_template_instantiated): Likewise.
4457 (repo_emit_p): New function.
4458 (repo_export_class_p): Likewise.
4459 (no_linkage_check): Change prototype.
4460 * class.c (set_linkage_according_to_type): New function.
4461 (build_vtable): Use it. Do not call import_export_vtable. Set
4462 DECL_IGNORED_P if appropriate.
4463 * decl.c (duplicate_decls): Preserve DECL_REPO_AVAILABLE_P.
4464 (make_rtL_for_nonlocal_decls): Check for template instantiations
4466 (grokfndecl): Adjust call to no_linkage_check.
4467 (set_linkage_for_static_data_member): New function.
4468 (grokvardecl): Use it. Adjust call to no_linkage_check.
4469 (grokdeclarator): Use set_linkage_for_static_data_member.
4470 * decl2.c (note_vague_linkage_fn): New function.
4471 (note_vague_linkage_var): Likewise.
4472 (finish_static_data_member_decl): Use it.
4473 (import_export_vtable): Remove.
4474 (import_export_class): Use repo_export_class_p.
4475 (var_finalized_p): Simplify.
4476 (maybe_emit_vtables): Simplify.
4477 (mark_needed): New function.
4478 (decl_needed_p): Likewise.
4479 (import_export_decl): Add documentation and consistency checks.
4480 Use repo_emit_p. Handle virtual tables and RTTI information
4482 (import_export_tinfo): Remove.
4483 (write_out_vars): Call import_export_decl.
4484 (cxx_callgraph_analyze_expr): Ensure that all vtables are emitted
4486 (finish_file): Use decl_needed_p. Do not call import_export_decl
4487 for undefined static data members. Do not warn about undefined
4488 inlines when using a repository.
4489 (mark_used): Use note_vague_linkage_fn. Always defer template
4491 * lex.c (cxx_init): Adjust call to init_repo. Always set
4492 flag_unit_at_a-time.
4493 * method.c (synthesize_method): Remove unncessary
4494 import_export_decl call.
4495 (implicitly_declare_fn): Use set_linkage_according_to_type.
4496 * optimize.c (maybe_clone_body): Use FOR_EACH_CLONE.
4497 * pt.c (instantiate_class_template): Don't redundantly add classes
4498 to keyed_classes. Don't call repo_template_used.
4499 (tsubst_decl): Set DECL_INTERFACE_KNOWN for instantiations of
4500 templates with internal linkage.
4501 (check_instantiated_args): Adjust call to no_linkage_check.
4502 (instantiate_template): Use FOR_EACH_CLONE.
4503 (mark_definable): New function.
4504 (mark_decl_instantiated): Use it.
4505 (do_decl_instantiation): Adjust tests for explicit instantiation
4506 after "extern template".
4507 (instantiate_class_member): Do not use repo_template_instantiated.
4508 (do_type_instantiation): Simplify.
4509 (instantiate_decl): Use mark_definable. Check repo_emit_p.
4511 * repo.c (repo_get_id): Remove.
4512 (original_repo): Remove.
4513 (IDENTIFIER_REPO_USED): Remove.
4514 (IDENTIFIER_REPO_CHOSEN): Remove.
4515 Remove all #if 0'd code.
4516 (repo_template_used): Remove.
4517 (repo_template_instantiated): Remove.
4518 (temporary_obstack_initialized_p): New variable.
4519 (init_repo): Register with lang_post_pch_load. Avoid creating
4520 identifiers unnecessarily. Don't use original_repo. Close the
4522 (reopen_repo_file_for_write): Not here.
4523 (finish_repo): Always write out a new repository file.
4524 (repo_emit_p): New function.
4525 (repo_export_class_p): Likewise.
4526 * rtti.c (get_tinfo_decl): Use set_linkage_according_to_type.
4527 (involves_incomplete_p): New function.
4528 (tinfo_base_init): Use it.
4529 (ptr_initializer): Remove non_public_ptr parameter.
4530 (ptm_initializer): Likewise.
4531 (get_pseudo_ti_init): Likewise.
4532 (unemitted_tinfo_decl_p): Remove.
4533 (emit_tinfo_decl): Use import_export_decl.
4534 * semantics.c (expand_body): Move updates of static_ctors and
4536 (expand_or_defer_fn): ... here.
4537 * tree.c (no_linkage_check): Add relaxed_p parameter.
4539 2004-07-28 Eric Christopher <echristo@redhat.com>
4541 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
4543 2004-07-28 Nathan Sidwell <nathan@codesourcery.com>
4545 * cp-tree.h (struct tree_pair_s): New.
4546 (typedef tree_pair_p): New.
4547 (DEF_VEC_O(tree_pair_s)): New.
4548 (struct lang_type_class): Make vcall_indices a VEC(tree_pair_s).
4549 (CLASSTYPE_VCALL_INDICES): Update documentation.
4550 * class.c (get_vcall_index): Adjust.
4551 (add_vcall_offset): Adjust.
4553 2004-07-27 Kelley Cook <kcook@gcc.gnu.org>
4555 * pt.c, typeck.c: Remove spurious carriage returns.
4557 2004-07-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4560 * pt.c (coerce_template_template_parms) <PARM_DECL case>: Only check
4561 when the type of ARG is not dependent.
4563 2004-07-26 Geoffrey Keating <geoffk@apple.com>
4565 * g++spec.c (LIBSTDCXX_PROFILE): Default to LIBSTDCXX.
4566 (lang_specific_driver): If the C++ or math library options don't
4567 start with '-l', don't count them as added libraries.
4569 2004-07-26 Nathan Sidwell <nathan@codesourcery.com>
4571 * decl.c (xref_basetypes): Adjust base access vector creation.
4572 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Adjust base
4574 * search.c (dynamic_cast_base_recurse, dfs_access_in_type): Likewise.
4576 2004-07-26 Niall Douglas <s_fsfeurope2@nedprod.com>
4577 Brian Ryner <bryner@brianryner.com>
4581 * class.c (check_field_decls): Apply hidden visibility if
4582 -fvisibility-inlines-hidden and inlined unless otherwise specified
4583 (build_vtable): Set vtable visibility to class visibility.
4584 (check_field_decls): Default static member visibility to class
4586 (check_methods): Default method visibility to class visibility.
4587 * cp-tree.h: Added CLASSTYPE_VISIBILITY and
4588 CLASSTYPE_VISIBILITY_SPECIFIED macro.
4589 * decl.c (duplicate_decls): New logic for merging definition decls
4590 with declaration decls. Added ignore & warning when non default
4591 applied to global operator new or delete.
4592 * method.c, optimize.c, rtti.c: Added setting of VISIBILITY_SPECIFIED
4593 wherever VISIBILITY was changed
4594 * rtti.c (get_tinfo_decl): Set typeinfo visibility to class
4596 (tinfo_base_init): Set typeinfo name visibility to class visibility.
4598 2004-07-25 Bernardo Innocenti <bernie@develer.com>
4600 * decl.c: Rename all identifiers named `class' to `cl'.
4601 * cp-tree.h: Likewise.
4603 2004-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
4605 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Use GGC_CNEW.
4606 * typeck2.c (abstract_virtuals_error): Use GGC_NEW.
4607 * name-lookup.c (binding_entry_make): Use GGC_NEW.
4608 (binding_table_construct): Use GGC_CNEWVEC.
4609 (binding_table_new): Use GGC_NEW.
4610 (cxx_binding_make): Likewise.
4611 (begin_scope): Likewise.
4612 (push_to_top_level): Use GCC_CNEW.
4613 * parser.c (cp_token_cache_new): Likewise.
4614 (cp_token_cache_push_token): Likewise.
4615 (cp_lexer_new_main): Likewise.
4616 (cp_lexer_new_from_tokens): Likewise.
4617 (cp_parser_context_new): Likewise.
4618 (cp_parser_new): Likewise.
4619 (cp_lexer_new_from_tokens): Use GGC_NEWVEC.
4620 * lex.c (cxx_make_type): Use GGC_CNEW.
4621 (retrofit_lang_decl): Use GGC_NEWVAR.
4622 (cxx_dup_lang_specific_decl): Likewise.
4623 (copy_lang_type): Likewise.
4624 * decl.c (use_label): Use GGC_NEW instead of ggc_alloc.
4625 (save_function_data): Likewise.
4626 (lookup_label): Use GGC_CNEW instead of ggc_alloc_cleared.
4627 (cxx_push_function_context): Likewise.
4629 2004-07-25 Richard Henderson <rth@redhat.com>
4631 * decl.c (start_preparsed_function): Set DECL_ARTIFICIAL and
4632 DECL_IGNORED_P on RESULT_DECL.
4633 * semantics.c (finalize_nrv): Copy them too.
4635 2004-07-23 Nathan Sidwell <nathan@codesourcery.com>
4637 * search.c (lookup_conversion_operator): Avoid two loops.
4638 (add_conversions): Remove.
4639 (check_hidden_convs, split_conversions,
4640 lookup_conversions_r): New.
4641 (lookup_conversions): Use lookup_conversions_r.
4643 2004-07-22 Nathan Sidwell <nathan@codesourcery.com>
4645 * pt.c (get_template_base): Check type is completable.
4647 2004-07-21 Eric Christopher <echristo@redhat.com>
4649 * decl.c (poplevel): Inline unused variable checking.
4652 2004-07-21 Paolo Bonzini <bonzini@gnu.org>
4654 * typeck.c (build_binary_op): Do not use RDIV_EXPR for
4657 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4660 * pt.c (check_explicit_specialization): Remove extension to accept
4661 specializations without template headers. Fall-through to normal
4664 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4667 * pt.c (determine_specialization): New parameter template_count.
4668 Disambiguate between member templates and member functions counting
4669 the template headers.
4670 (check_explicit_specialization): Update caller.
4671 (tsubst_friend_function): Likewise.
4673 2004-07-20 Steven Bosscher <stevenb@suse.de>
4675 * cp-tree.def (TINST_LEVEL): Make it an 'x' node.
4676 * cp-tree.h (tinst_level_t): New tree type.
4677 (union lang_tree_node): Handle it.
4678 (TINST_LOCATION): New accessor macro.
4679 (make_tinst_level): New prototype.
4680 * cp-lang.c (cp_tree_size): Handle TINST_LEVEL.
4681 * decl.c (cp_tree_node_structure): Likewise.
4682 * error.c (print_instantiation_full_context): Use TINST_LOCATION.
4683 (print_instantiation_partial_context): Likewise.
4684 * pt.c (pop_tinst_level): Likewise.
4685 (push_tinst_level): Use make_tinst_level.
4686 * tree.c (make_tinst_level): New function.
4687 (cp_walk_subtrees): Walk TINST_DECL for a TINST_LEVEL node.
4689 2004-07-20 Mark Mitchell <mark@codesourcery.com>
4691 * parser.c (cp_parser_simple_type_specifier): Fix typo.
4694 * parser.c (cp_parser_simple_type_specifier): Do not record usage
4695 of globally-qualified names.
4697 2004-07-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4700 * error.c (dump_type) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Output
4703 2004-07-19 Mark Mitchell <mark@codesourcery.com>
4706 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
4707 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
4708 * class.c (add_implicitly_declared_members): Use
4709 CLASSTYPE_LAZY_ASSIGNMENT_OP.
4710 * method.c (lazily_declare_fn): Clear
4711 CLASSTYPE_LAZY_ASSIGNMENT_OP.
4712 * search.c (lookup_fnfields_1): Check it.
4714 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
4716 * cp-tree.h (vec_binfo_member): Remove.
4717 * tree.c (vec_binfo_member): Remove.
4719 * cp-tree.h (struct lang_type_class): Remove vfields field.
4720 (CLASSTYPE_VFIELDS): Remove.
4721 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
4722 * class.c (determine_primary_base): Remove CLASSTYPE_VFIELDS
4724 (dfs_modify_vtables): Use TYPE_CONTAINS_VPTR_P.
4725 (finish_struct_1): Remove CLASSTYPE_VFIELDS handling.
4726 * init.c (dfs_initialize_vtbl_ptrs): Use TYPE_CONTAINS_VPTR_P.
4728 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
4730 * cp-tree.h (DEF_VEC_P(tree)): Remove here.
4731 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
4733 (BINFO_LANG_SLOTS): Remove.
4734 * tree.c (copy_binfo): Adjust BINFO creation and accessors.
4735 * decl.c (xref_basetypes): Adjust BINFO creation and accessors.
4736 * class.c (check_bases): Adjust BINFO accessors.
4737 (determine_primary_base, finish_struct_bits,
4738 maybe_warn_about_overly_private_class, warn_hidden,
4739 walk_subobject_offsets, propagate_binfo_offsets, end_of_class,
4740 warn_about_ambiguous_bases, get_vfield_name,
4741 dump_class_hierarchy_r, build_vtt_inits, accumulate_vtbl_inits,
4742 add_vcall_offset_vtbl_entries_r): Likewise.
4743 * dump.c (cp_dump_tree): Likewise.
4744 * init.c (sort_mem_initializers, expand_member_init, build_delete,
4745 push_base_cleanups): Likewise.
4746 * method.c (do_build_copy_constructor, do_build_assign_ref,
4747 synthesize_exception_spec): Likewise.
4748 name-lookup.c (arg_assoc_class): Likewise.
4749 * pt.c (instantiate_class_template,
4750 get_template_base_recursive): Likewise.
4751 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Likewise.
4752 * typeck2.c (process_init_constructor): Likewise.
4753 * search.c (lookup_base_r, dynamic_cast_base_recurse,
4754 dfs_access_in_type, dfs_walk_real, look_for_overrides,
4755 types_overlap_p, copied_binfo, original_binfo): Likewise.
4756 (binfo_for_vtable): Remove
4758 2004-07-20 Steven Bosscher <stevenb@suse.de>
4760 * cp-tree.h (struct lang_decl_flags): Unify the template_info and
4761 thunk_alias, and the access and virtual_offset fields.
4762 (THUNK_VIRTUAL_OFFSET, THUNK_ALIAS): Adjust.
4763 * decl.c (finish_case_label): Update c_add_case_node call.
4765 2004-07-19 Mark Mitchell <mark@codesourcery.com>
4767 Revert patch for PR c++/16623.
4769 2004-07-19 Kelley Cook <kcook@gcc.gnu.org>
4771 * except.c: Remove two spurious carriage returns.
4773 2004-07-19 Mark Mitchell <mark@codesourcery.com>
4776 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
4777 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
4778 * class.c (add_implicitly_declared_members): Use
4779 CLASSTYPE_LAZY_ASSIGNMENT_OP.
4780 * method.c (lazily_declare_fn): Clear
4781 CLASSTYPE_LAZY_ASSIGNMENT_OP.
4782 * search.c (lookup_fnfields_1): Check it.
4784 2004-07-19 Nathan Sidwell <nathan@codesourcery.com>
4786 * class.c (add_method): Delay adding the slot until the end.
4787 (determine_primary_base): Adjust VEC_iterate invokation.
4788 (resort_type_method_vec, finish_struct_methods, warn_hidden,
4789 walk_subobject_offsets, end_of_class, warn_about_ambiguous_bases,
4790 build_vtbl_initializer): Likewise.
4791 * init.c (sort_mem_initializers, build_delete, push_base_cleanups,
4792 build_vbase_delete): Likewise.
4793 * method.c (do_build_copy_constructor): Likewise.
4794 * name-lookup.c (new_class_binding, print_binding_level,
4795 poplevel_class, store_class_bindings, push_to_top_level,
4796 pop_from_top_level): Likewise.
4797 * pt.c (check_explicit_specialization): Likewise.
4798 * search.c (lookup_conversion_operator, lookup_fnfields_1,
4799 get_pure_virtuals, add_conversions, dfs_check_overlap,
4800 binfo_for_vbase): Likewise.
4802 2004-07-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4805 * pt.c (unify) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Use only
4806 innermost set of template arguments during deduction. Simplify.
4808 2004-07-19 Joseph S. Myers <jsm@polyomino.org.uk>
4810 * typeck.c (build_modify_expr, build_x_modify_expr): Set
4811 TREE_NO_WARNING on assignments with an operator other than '='.
4813 2004-07-10 Steven Bosscher <stevenb@suse.de>
4814 Joseph S. Myers <jsm@polyomino.org.uk>
4816 * cp-tree.h (C_SET_EXP_ORIGINAL_CODE): Remove.
4817 * decl2.c (grokfield): Don't check current_class_depth via
4818 unused TREE_COMPLEXITY.
4819 * semantics.c (finish_parenthesized_expr): Set TREE_NO_WARNING
4820 to avoid the missing parentheses warning.
4821 Don't set C_SET_EXP_ORIGINAL_CODE.
4823 2004-07-18 Mark Mitchell <mark@codesourcery.com>
4825 * tree.c (no_linkage_helper): Remove.
4826 (no_linkage_check): Don't use walk_tree_without_duplicates.
4828 * mangle.c (write_expression): Issue a sorry for zero-operand
4831 2004-07-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4834 * init.c (build_offset_ref): Build SCOPE_REF with non-null
4835 TREE_TYPE for non-dependent names.
4836 * typeck.c (build_x_unary_op): Handle non-dependent SCOPE_REF.
4837 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
4838 unknown_type_node as its TREE_TYPE.
4839 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
4840 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
4841 (dump_expr) <SCOPE_REF case>: Likewise.
4843 2004-07-17 Jason Merrill <jason@redhat.com>
4846 * call.c (type_passed_as): Make the invisible reference type
4848 * cp-gimplify.c (gimplify_cleanup_stmt): Rename to
4849 cp_genericize_r. Handle invisible reference lowering.
4850 (is_invisiref_parm): New fn.
4851 (cp_genericize): Adjust the types of invisible reference parms.
4852 Don't repeat the walk for clones.
4853 * decl.c (store_parm_decls): Don't generate any code for clones.
4855 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
4857 * cp-tree.h (builtin_function): Declare.
4859 2004-07-16 Mark Mitchell <mark@codesourcery.com>
4861 * class.c (finish_struct_methods): Remove unncessary code.
4862 (add_implicitly_declared_members): Create declarations for default
4863 constructors and copy constructors lazily.
4864 * cp-tree.h (lang_type_class): Remove lazy_default_ctor and
4866 (CLASSTYPE_LAZY_DEFAULT_CTOR): New macro.
4867 (CLASSTYPE_LAZY_COPY_CTOR): Likewise.
4868 * decl2.c (check_classfn): Robustify.
4869 (locate_dtor): Handle empty CLASSTYPE_METHOD_VEC.
4870 (locate_ctor): Handle lazy default constructors.
4871 (locate_copy): Handle lazy copy constructors.
4872 (implicitly_declare_fn): Make sure we're looking at the
4873 TYPE_MAIN_VARIANT for a class before creating functions. Don't
4874 set TYPE_HAS_CONSTRUCTOR.
4875 (lazily_declare_fn): New function.
4876 * name-lookup.c (constructor_name_full): Simplify.
4877 * search.c (lookup_fnfields_1): Lazily create methods, as
4879 (lookup_for_overrides): Handle empty CLASSTYPE_METHOD_VEC.
4881 2004-07-16 Steven Bosscher <stevenb@suse.de>
4883 * cp-tree.h (struct lang_type): Don't have three GTY options on a
4884 single bit GTY desc.
4886 2004-07-16 Richard Henderson <rth@redhat.com>
4888 * cp-lang.c (LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING): Die.
4889 * cp-tree.h (cp_copy_res_decl_for_inlining): Remove.
4890 * tree.c (cp_copy_res_decl_for_inlining): Remove.
4892 2004-07-16 Nathan Sidwell <nathan@codesourcery.com>
4894 * class.c (finish_struct_bits): Use for loop.
4895 (propagate_binfo_offsets): Do primary binfo outside of loop.
4898 * dump.c (cp_dump_tree): Don't dump the bases if there's no
4901 * pt.c (tsubst) <TREE_BINFO case>: We should never get here.
4903 2004-07-15 Mark Mitchell <mark@codesourcery.com>
4905 * cp-tree.h (lang_type_class): Remove has_real_assign_ref and
4906 has_abstract_assign_ref. Make methods a VEC(tree) *.
4907 (TYPE_HAS_CONST_ASSIGN_REF): Add documentation.
4908 (CLASSTYPE_CONSTRUCTORS): Adjust for changes to CLASSTYPE_METHOD_VEC.
4909 (CLASSTYPE_DESTRUCTORS): Likewise.
4910 (TYPE_HAS_REAL_ASSIGN_REF): Remove.
4911 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
4912 (add_method): Change prototoype.
4913 * class.c (add_method): Remove error_p parameter. Adjust for
4914 changes to CLASSTYPE_METHOD_VEC.
4915 (handle_using_decl): Adjust call to add_method.
4916 (maybe_warn_about_overly_private_class): Adjust for
4917 changes to CLASSTYPE_METHOD_VEC.
4918 (resort_type_method_vec): Likewise.
4919 (finish_struct_methods): Likewise.
4920 (check_for_override): Likewise.
4921 (warn_hidden): Likewise.
4922 (add_implicitly_declared_members): Defer creation of assignment
4923 operators. Adjust call to add_method.
4924 (clone_function_decl): Adjust call to add_method.
4925 (check_bases_and_members): Don't set TYPE_HAS_REAL_ASSIGN_REF.
4926 (finish_struct_1): Use CLASSTYPE_DESTRUCTORS.
4927 * decl.c (grok_special_member_properties): Don't set
4928 TYPE_HAS_ABSTRACT_ASSIGN_REF.
4929 * decl2.c (check_classfn): Adjust for
4930 changes to CLASSTYPE_METHOD_VEC.
4931 * method.c (locate_dtor): Use CLASSTYPE_DESTRUCTORS.
4932 (locate_ctor): Use CLASSTYPE_CONSTRUCTORS.
4933 (locate_copy): Adjust for changes to CLASSTYPE_METHOD_VEC.
4934 (implicitly_declare_fn): Set DECL_SOURCE_LOCATION. Do not call
4936 * pt.c (check_explicit_specialization): Adjust for
4937 changes to CLASSTYPE_METHOD_VEC.
4938 (instantiate_class_template): Do not set
4939 TYPE_HAS_ABSTRACT_ASSIGN_REF.
4940 * ptree.c (cxx_print_type): Don't try to print
4941 CLASSTYPE_METHOD_VEC.
4942 * rtti.c (emit_support_tinfos): Use CLASSTYPE_DESTRUCTORS.
4943 * search.c (lookup_field_r): Adjust for
4944 changes to CLASSTYPE_METHOD_VEC.
4945 (lookup_fnfields): Likewise.
4946 (lookup_conversion_operator): Likewise.
4947 (lookup_fnfields_1): Likewise. Create assignment operators
4949 (look_for_overrides_here): Adjust for
4950 changes to CLASSTYPE_METHOD_VEC.
4951 (add_conversions): Likewise.
4952 * semantics.c (finish_member_declaration): Adjust call to add_method.
4954 2004-07-15 Jason Merrill <jason@redhat.com>
4956 * cp-lang.c (cxx_types_compatible_p): To the middle-end,
4957 references and pointers are compatible.
4959 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
4961 * decl.c (xref_basetypes): Refactor.
4962 * tree.c (copy_base_binfos): Replace with ...
4963 (copy_binfo): ... this. Deep copy the given binfo, (not the just
4964 bases of the given base).
4965 * cp-tree.h (copy_base_binfo): Remove.
4966 (copy_binfo): Declare.
4968 2004-07-15 Mark Mitchell <mark@codesourcery.com>
4970 * name-lookup.c (set_inherited_value_binding_p): Add class_type
4972 (get_class_binding): Adjust.
4973 (push_class_level_binding): Don't use set_inherited_value_binding_p.
4975 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
4977 * class.c (finish_struct_bits): Don't set TYPE_HAS_CONVERSION here.
4978 * decl.c (xref_basetypes): Set it here.
4980 * class.c (check_bases): Don't set CLASSTYPE_NON_AGGREGATE here.
4981 Don't check for incomplete base.
4982 (get_vfield_name): Simplify while loop.
4983 * decl.c (xref_basetypes): Set CLASSTYPE_NON_AGGREGATE here.
4985 2004-07-14 Mark Mitchell <mark@codesourcery.com>
4987 * lex.c (cxx_make_type): Remove call to get_pointer_type.
4989 * cp-tree.h (IDENTIFIER_VALUE): Remove.
4990 (BINFO_PUSHDECLS_MARKED): Likewise.
4991 (maybe_inject_for_scope_var): Likewise.
4992 (push_class_decls): Likewise.
4993 * name-lookup.h (push_class_binding): Remove.
4994 (innermost_non_namespace_value): New function.
4995 (outer_binding): Likewise.
4996 * class.c (add_method): Push bindings before adding to
4998 (restore_class_cache): Do not restore class_shadowed.
4999 (pushclass): Do not add USING_DECLs. Do not call
5001 * config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c.
5002 * decl.c (pushdecl): Use outer_binding.
5003 (poplevel): Set the scope for an out-of-scope for-loop declaration
5005 (cp_finish_decl): Don't call maybe_inject_for_scope_var.
5006 * name-lookup.c (new_class_binding): New function.
5007 (push_binding): Use it.
5008 (pushdecl): Use innermost_non_namespace_value.
5009 (maybe_inject_for_scope_var): Remove.
5010 (push_class_binding): Remove.
5011 (set_inherited_value_binding_p): New function.
5012 (get_class_binding): New function.
5013 (push_class_level_binding): Assert that the current_class_type is
5015 (outer_binding): New function.
5016 (innermost_non_namespace_value): Likewise.
5017 (lookup_name_real): Use outer_binding.
5018 (lookup_name_current_level): Ignore out-of-scope variables.
5019 * pt.c (check_template_shadow): Use innermost_non_namespace_value.
5020 (lookup_template_class): Likewise.
5021 * search.c (dfs_push_type_decls): Remove.
5022 (dfs_push_decls): Likewise.
5023 (setup_class_bindings): Likewise.
5024 (lookup_field_1): Handle USING_DECLs from dependent scopes.
5025 (marked_pushdecls_p): Remove.
5026 (unmarked_pushdecls_p): Remove.
5027 (marked_identifiers): Remove.
5028 (setup_class_bindings): Remove.
5029 (dfs_push_type_decls): Remove.
5030 (dfs_push_decls): Remove.
5031 (push_class_decls): Remove.
5033 2004-07-13 Mark Mitchell <mark@codesourcery.com>
5037 * decl.c (grokvardecl): Make declspecs parameter const.
5038 (grokdeclarator): Likewise. Adjust accordingly.
5039 * decl.h (grokdeclarator): Adjust declaration.
5040 * parser.c (cp_parser_init_declarator): Do not clear
5041 decl_specifiers->attributes.
5043 * cp-tree.h (lang_identifier): Remove class_value.
5044 (IDENTIFIER_CLASS_VALUE): Remove.
5045 (pop_class_decls): Likewise.
5046 (init_search_processing): Likewise.
5047 * class.c (handle_using_decl): Use lookup_member, not
5048 IDENTIFIER_CLASS_VALUE.
5049 (restore_class_cache): New function, split out from ...
5050 (pushclass): ... here. Do not call clear_identifier_class_values.
5051 (invalidate_class_lookup_cache): Do not clear
5052 IDENTIFIER_CLASS_VALUE.
5053 (popclass): Do not call pop_class_decls.
5054 (maybe_note_name_used_in_class): Do not save names looked up after
5055 the class is complete. Use lookup_member, not
5056 IDENTIFIER_CLASS_VALUE.
5057 * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
5058 * decl.c (cxx_init_decl_processing): Do not call
5059 init_search_processing.
5060 * method.c (do_build_copy_constructor): Remove unnecessary code.
5061 (do_build_assign_ref): Likewise.
5062 * name-lookup.c (pushdecl): Use lookup_member, not
5063 IDENTIFIER_CLASS_VALUE.
5064 (set_identifier_type_value_with_scope): Set TREE_TYPE on the
5066 (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
5067 (push_class_binding): Do not set it.
5068 (clear_identifier_class_values): Remove.
5069 (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
5070 (store_binding): Do not save it.
5071 (pop_from_top_level): Do not restore it.
5072 * name-lookup.h (cxx_saved_binding): Remove class_value.
5073 (clear_identifier_class_values): Remove.
5074 * ptree.c (cxx_print_identifier): Do not print
5075 IDENTIFIER_CLASS_VALUE.
5076 * search.c (search_obstack): Remove.
5077 (push_stack_level): Remove.
5078 (pop_stack_level): Remove.
5079 (search_level): Remove.
5080 (search_stack): Remove.
5081 (lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
5082 (setup_class_bindings): Use IDENTIFIER_MARKED, not
5083 IDENTIFIER_CLASS_VALUE.
5084 (marked_identifiers): New variable.
5085 (push_class_decls): Clear IDENTIFIER_MARKED.
5086 (pop_class_decls): Don't call pop_search_level.
5087 (init_search_processing): Remove.
5089 2004-07-12 Mark Mitchell <mark@codesourcery.com>
5091 * cp-tree.h (get_aggr_typedef): Remove.
5092 * init.c (get_aggr_typedef): Likewise.
5094 * name-lookup.c (push_class_level_binding): Simplify.
5096 2004-07-12 Andrew Pinski <apinski@apple.com>
5100 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
5102 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
5105 2004-07-12 Eric Christopher <echristo@redhat.com>
5107 * parser.c (cp_parser_class_head): Remove unused variable.
5109 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5111 * decl.c (grok_op_properties): Reject [de-]allocation functions
5112 declared in a namespace, or declared as static.
5114 2004-07-12 Nathan Sidwell <nathan@codesourcery.com>
5116 * cp-tree.h (make_binfo): Remove.
5117 * decl.c (xref_basetypes): Use make_tree_binfo directly.
5118 * tree.h (copy_base_binfos): Likewise.
5119 (make_binfo): Remove.
5121 * call.c (build_user_type_conversion_1, build_new_op,
5122 check_constructor_callable, build_temp,
5123 perform_direct_initialization_of_possible): Pass type directly to
5124 lookup_fnfields & build_special_member_call.
5125 (build_special_member_call): Accept a type, and complete it.
5126 * class.c (finish_stuct_bits): Copy the BINFOs here.
5127 * cvt.c (ocp_convert): Pass type directly to
5128 build_special_member_call.
5129 * decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
5130 (xref_basetypes): Allocate the binfo here. Adjust.
5131 * init.c (build_init, build_new_1): Pass type directly to
5132 build_special_member_call.
5133 * lex.c (cxx_make_type): Do not allocate binfo here.
5134 * name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
5135 * parser.c (cp_parser_class_head): Always call xref_basetypes.
5136 * pt.c (instantiate_class_template): Likewise. Inhibit access
5137 checking for template friends.
5138 * ptree.c (cxx_print_type): Adjust record printing.
5139 * search.c (lookup_base): When taking a type, complete it before
5140 looking for a binfo.
5141 (lookup_member): Delay completing a type.
5142 (push_class_decls): Don't walk an incomplete type.
5143 (lookup_conversions): Likewise.
5144 * semantics.c (finish_stmt_expr_expr): Pass type directly to
5145 build_special_member_call.
5146 * tree.c (copy_base_binfos): Adjust.
5147 (make_binfo): Likewise.
5148 * typeck.c (build_modify_expr): Pass type directly to
5149 build_special_member_call.
5150 * typeck2.c (process_init_constructor): Check a binfo exists.
5151 (build_m_component_ref): Allow accessing an incomplete type.
5152 (build_functional_cast): Pass type directly to
5153 build_special_member_call.
5155 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5158 * config-lang.in (gtfiles): Add typeck2.c.
5159 * Make-lang.in: Tweak typeck2.c dependencies, and add rule for
5161 * cp-tree.h: Declare complete_type_check_abstract.
5162 * typeck2.c (pat_calc_hash, pat_compare,
5163 complete_type_check_abstract): New functions.
5164 (abstract_virtuals_error): If the type is abstract, register the
5165 declaration within abstract_pending_vars for further checks.
5166 Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
5167 * decl.c (cp_finish_decl): Do not strip array types.
5168 (create_array_type_for_decl): Check for abstractness of the element
5170 (complete_vars): Call complete_type_check_abstract.
5171 * class.c (finish_struct): Prepare a list of virtual functions for
5172 template types, and call complete_vars on it to check for abstractness.
5174 2004-07-12 Paolo Bonzini <bonzini@gnu.org>
5176 PR tree-optimization/14107
5177 * decl.c (finish_function): Remove temporary band-aid.
5179 2004-07-11 Mark Mitchell <mark@codesourcery.com>
5181 * call.c (build_operator_new_call): Avoid using push_to_top_level.
5182 (build_new_op): Adjust call to lookup_function_nonclass.
5183 * name-lookup.c (identifier_type_value): Adjust call to
5185 (lookup_name_real): Add block_p parameter.
5186 (lookup_name_nonclass): Adjust call to lookup_name_real.
5187 (lookup_function_nonclass): Likewise.
5188 (lookup_name): Likewise.
5189 * name-lookup.h (lookup_name_real): Change prototype.
5190 (lookup_name_nonclass): Likewise.
5191 * parser.c (cp_parser_lookup_name): Likewise.
5193 * cp-tree.h (saved_scope): Make old_bindings a vector.
5194 (unuse_fields): Remove.
5195 * name-lookup.h (cxx_saved_binding): Define it.
5196 * class.c (pushclass): Don't use unuse_fields.
5197 * name-lookup.c (cxx_saved_binding_make): Remove.
5198 (store_binding): Add new bindings to a vector, using an
5199 accumulator style, rather than adding them to a list.
5200 (store_bindings): Adjust accordingly.
5201 (store_class_bindings): Likewise.
5202 (push_to_top_level): Likewise.
5203 (pop_from_top_level): Likewise.
5204 * optimize.c (maybe_clone_body): Must push_to_top_level and
5205 pop_from_top_level calls outside of loop.
5206 * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope
5207 calls here from cp_parser_late_parsing_default_args.
5208 (cp_parser_save_default_args): Record the class type in which the
5209 function is declared.
5210 (cp_parser_late_parsing_default_args): Do not call
5211 push_nested_class/pop_nested_class.
5212 * search.c (dfs_unuse_fields): Remove.
5213 (unuse_fields): Remove.
5215 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
5217 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
5218 LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
5219 * cp-tree.h (poplevel): Declare.
5220 (set_block): Remove.
5221 * decl.c (set_block): Remove.
5223 2004-07-10 Mike Stump <mrs@apple.com>
5225 * decl2.c (import_export_class): Never export/import vtables
5226 with inline key functions.
5228 2004-07-09 Steven Bosscher <stevenb@suse.de>
5230 * typeck.c (c_expand_asm_operands): Remove.
5232 2004-07-09 Mike Stump <mrs@apple.com>
5234 * typeck.c (build_class_member_access_expr): Skip null deref
5235 warning when we don't dereference it.
5237 2004-07-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5241 * class.c (check_field_decls): Improve -Weffc++ warning: do not
5242 warn for pointers to functions/members, or for classes without
5245 2004-07-08 Mark Mitchell <mark@codesourcery.com>
5247 * name-lookup.h (struct cp_binding_level): Update documentation
5250 2004-07-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5253 * typeck.c (check_return_expr): Improve -Weffc++ warning: handle
5254 returning CALL_EXPR, and non-reference return type.
5256 2004-07-08 Nathan Sidwell <nathan@codesourcery.com>
5258 * name-lookup.c (push_binding): Use VEC_reserve.
5260 2004-07-08 Richard Henderson <rth@redhat.com>
5262 * cp-tree.h (expand_eh_spec_block): Remove.
5264 2004-07-07 Mark Mitchell <mark@codesourcery.com>
5266 * cp-tree.h (saved_scope): Remove x_previous_class_type and
5267 x_previous_class_values; add x_previous_class_level.
5268 (previous_class_type): Remove.
5269 (previous_class_values): Remove.
5270 (previous_class_level): New macro.
5271 * class.c (pushclass): Restore the identifier cache more
5273 (invalidate_class_lookup_cache): Use vector for class_shadowed and
5274 previous_class_values.
5275 * decl.c (poplevel): Likewise.
5276 * name-lookup.c (cxx_binding_init): New function.
5277 (cxx_binding_make): Use it.
5278 (push_binding): For a binding in a class level, use a vector of
5279 cp_class_binding nodes.
5280 (push_binding_level): New function.
5281 (begin_scope): Use it.
5282 (leave_scope): Do not put class binding levels on the free list.
5283 (print_binding_level): Adjust for the fact that class_shadowed is
5285 (poplevel_class): Likewise.
5286 (clear_identifier_class_values): Likewise.
5287 (push_class_level_binding): Likewise.
5288 (set_class_shadows): Remove.
5289 (store_binding): New function.
5290 (store_class_bindings): New function.
5291 (push_to_top_level): Use store_class_bindings as appropriate.
5292 (pop_from_top_level): Use previous_class_level, not
5293 previous_class_type.
5294 * name-lookup.h (cp_class_binding): New type.
5295 (cp_binding_level): Use a vector object for class_shadowed.
5296 (push_binding_level): Declare.
5297 (set_class_shadows): Remove.
5299 2004-07-07 Andrew Pinski <apinski@apple.com>
5301 * class.c (instantiate_type): BUFFER_REF is dead.
5302 * lex.c (init_operators): IN_EXPR is dead.
5304 2004-07-07 Jason Merrill <jason@redhat.com>
5307 * call.c (build_new_op): Give overload warnings for built-in
5310 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
5313 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
5316 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
5318 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
5319 * class.c (build_primary_vtable, check_bases,
5320 determine_primary_base, finish_struct_bits,
5321 maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
5322 get_basefndecls, warn_hidden, walk_subobject_offsets,
5323 build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
5324 layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
5325 finish_struct_1, get_vfield_name, contains_empty_class_p,
5326 dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
5327 dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
5328 add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
5330 * decl.c (xref_basetypes): Likewise.
5331 * dump.c (cp_dump_tree): Likewise.
5332 * error.c (dump_expr): Likewise.
5333 * init.c (sort_mem_initializers, expand_member_init,
5334 push_base_cleanups): Likewise.
5335 * method.c (do_build_copy_constructor, do_build_assign_reg,
5336 synthesize_exception_spec): Likewise.
5337 * name-lookup.c (arg_assoc_class): Likewise.
5338 * pt.c (instantiate_class_template, tsubst,
5339 get_template_base_recursive): Likewise.
5340 * ptree.c (cxx_print_type): Likewise.
5341 * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
5342 * search.c (lookup_base_r, dynamic_cast_base_recurse,
5343 dfs_access_in_type, access_in_type, lookup_field_queue_p,
5344 bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
5345 marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
5346 dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
5347 binfo_for_vtable, copied_binfo, original_binfo): Likewise
5348 * tree.c (copy_base_binfos, make_binfo): Likewise.
5349 * typeck.c (commmon_base_type): Likewise
5350 * typeck2.c (process_init_constructor): Likewise
5352 2004-07-06 Joseph S. Myers <jsm@polyomino.org.uk>
5354 * decl.c (check_tag_decl): Name redeclared type in diagnostic.
5356 2004-07-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5359 * pt.c (convert_nontype_argument): Disallow conversions between
5360 different enumeration types.
5362 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
5364 * cp-tree.h (BINFO_MARKED): Remove.
5365 (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
5366 BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
5367 BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
5368 (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
5369 * class.c (build_base_path): Use BINFO_VIRTUAL_P.
5370 (mark_primary_bases, determine_primary_base, base_derived_from,
5371 dfs_find_final_overrider, dfs_find_final_overrider_q,
5372 dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
5373 dfs_modify_vtables, walk_subobject_offsets,
5374 layout_nonempty_base_or_field, build_base_field,
5375 build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
5376 end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
5377 finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
5378 build_ctor_vtbl_group, accumulate_vtble_inits,
5379 dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
5380 build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
5381 add_vcall_offset_vtbl_entries_1): Likewise.
5382 * decl.c (xref_basetypes): Incomming virtual base indicated by
5384 * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
5385 * init.c (finish_init_stmts, sort_mem_initializers,
5386 emit_mem_initializers, build_vtble_address, expand_member_init,
5387 push_base_cleanups): Likewise.
5388 * method.c (do_build_copy_constructor): Likewise.
5389 * pt.c (instantiate_class_template,
5390 get_template_base_recursive): Likewise.
5391 * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
5392 get_pseudo_ti_desc): Likewise.
5393 * search.c (lookup_base_r, dynamic_cast_base_recurse,
5394 binfo_from_vbase, binfo_via_virtual, copied_binfo,
5395 original_binfo): Likewise.
5396 * semantics.c (finish_base_specifier): Virtualness is indicated
5398 * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
5400 2004-07-06 Mark Mitchell <mark@codesourcery.com>
5403 2004-06-24 Jason Merrill <jason@redhat.com>
5405 * decl.c (grokparms): Give the PARM_DECL reference type if the
5406 parameter is passed by invisible reference.
5408 2004-07-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5410 * cp-lang.c (cp_var_mod_type_p): Add extra arg.
5411 * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
5412 * pt.c (check_instantiated_args, unify): Likewise.
5414 2004-07-05 Phil Edwards <phil@codesourcery.com>
5416 * Make-lang.in (check-c++, lang_checks): Add some comments.
5418 2004-07-05 Zack Weinberg <zack@codesourcery.com>
5420 * cp-mudflap.c: Delete file.
5421 * Makefile.in: Remove all references to cp-mudflap.o.
5423 2004-07-05 Zack Weinberg <zack@codesourcery.com>
5425 * decl.c (cxx_init_decl_processing): Call
5426 build_common_tree_nodes before creating the global NAMESPACE_DECL.
5428 2004-07-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5431 * call.c (build_operator_new_call): Look only at global scope.
5433 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
5435 * call.c (enforce_access): Expect TREE_BINFO.
5436 * class.c (binfo_ctor_vtable): Check TREE_BINFO.
5437 * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
5438 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
5440 (BINFO_LANG_ELTS): Remove.
5441 (BINFO_LANG_SLOTS): New.
5442 (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
5443 (CLASSTYPE_TEMPLATE_INFO): Adjust.
5444 * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
5445 * search.c (lookup_member): Check TREE_BINFO.
5446 * semantics.c (perform_or_defer_access_check): Likewise.
5447 (check_accessibility_of_qualified_id): Check
5448 deferred_access_no_check.
5449 * tree.c (make_binfo): Use make_tree_binfo.
5451 2004-07-04 Mark Mitchell <mark@codesourcery.com>
5453 * method.c (implicitly_declare_fn): Set linkage of generated
5456 2004-07-04 Richard Henderson <rth@redhat.com>
5458 * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
5460 2004-07-03 Scott Brumbaugh <scottb.lists@verizon.net>
5463 * name-lookup.c (push_class_level_binding): Don't pass a
5464 TREE_LIST of ambiguous names to check_template_shadow as it
5465 only handles declarations. Instead, pull the declaration
5468 2004-07-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5471 * pt.c (check_explicit_specialization): Clarify error message.
5473 2004-07-02 Richard Henderson <rth@redhat.com>
5475 * tree.c (cp_unsave_r): Update remap_save_expr call.
5477 2004-07-02 Mark Mitchell <mark@codesourcery.com>
5480 * mangle.c (write_template_arg): Correct mangling.
5483 * decl.c (grokdeclarator): Robustify.
5485 2004-07-01 Richard Henderson <rth@redhat.com>
5487 * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
5488 * method.c (synthesize_method): Don't clear_last_expr.
5489 * name-lookup.c (maybe_push_cleanup_level): Likewise.
5491 2004-07-01 Nick Clifton <nickc@redhat.com>
5493 * decl2.c (import_export_class): Invoke the
5494 import_export_class field in the gcc_target structure if it is not
5497 2004-06-30 Richard Henderson (rth@redhat.com>
5499 * decl.c (start_preparsed_function): Don't set immediate_size_expand.
5500 * method.c (use_thunk): Likewise.
5502 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
5504 * call.c (build_over_call), typeck.c (build_function_call): Call
5505 check_function_arguments instead of check_function_format.
5507 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
5509 * call.c (build_over_call), typeck.c (build_function_call): Update
5510 calls to check_function_format.
5512 2004-06-30 Richard Henderson <rth@redhat.com>
5514 * call.c (build_over_call): Use __builtin_memcpy for copying
5515 CLASS_AS_BASE rather than funny casting.
5517 2004-06-30 Richard Henderson <rth@redhat.com>
5519 * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
5520 TYPE_SIZE_UNIT of full_type.
5522 2004-06-30 Per Bothner <per@bothner.com>
5524 Conditionally compile support for --enable-mapped_location.
5525 * decl.c (pop_label): Handle (imperfectly) USE_MAPPED_LOCATION case.
5526 * decl2.c: If USE_MAPPED_LOCATION, don't do some line number
5527 adjustments - which I don't understand.
5528 * error.c (dump_decl): Rename "<interrnal>" to "<built-in>".
5529 * error.c: Use LOCATION_FILE and EXPR_LOCATION macros.
5530 (print_instantiation_partial_context): Use expand_location.
5531 * decl.c (duplicate_decl): Use new DECL_IS_BUILTIN macro.
5532 * name-lookup.c: Likewise.
5533 * lex.c (cxx_init): Likewise. Also use BUILTINS_LOCATION.
5534 * name-lookup.c: Use input_line macro.
5535 * parser.c (cp_lexer_get_preprocessor_token): Use UNKNOWN_LOCATION.
5536 (cp_parser_statement): Rename locaal variable statement_locus to
5537 statement_location and use SET_EXPR_LOCATION macro.
5538 * pt.c: Handle USE_MAPPED_LOCATION case. Use new macros.
5539 * tree.c (cp_walk_subtrees): Likewise.
5541 2004-06-29 Per Bothner <per@bothner.com>
5543 * tree.c (build_min_nt, build_min, build_min_non_dep):
5544 Don't set TREE_COMPLEXITY from input_line.
5546 2004-06-29 Paul Brook <paul@codesourcery.com>
5548 * init.c: Include target.h.
5549 (get_cookie_size): Remove and replace with target hook.
5551 (build_new_1): Store the element size in the cookie.
5553 2004-06-29 Nathan Sidwell <nathan@codesourcery.com>
5556 * parser.c (cp_parser_template_declaration_after_export): Disable
5557 access checks here ...
5558 (cp_parser_class_specifier): ... not here.
5560 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
5562 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
5563 VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
5564 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
5567 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
5569 * cp-tree.h (struct deferred_access): Move to ...
5570 * semantics.c (struct deferred_access): ... here. Adjust.
5571 (deferred_access_stack): Make a VEC(deferred_access),
5572 (deferred_access_free_list): Remove.
5573 (deferred_access_no_check): New.
5574 (push_deferring_access_checks, resume_deferring_access_checks,
5575 stop_deferring_access_checks, pop_deferring_access_checks,
5576 get_deferred_access_checks, pop_to_parent_deferring_access_checks,
5577 perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
5579 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
5582 * call.c (build_temp): Declare.
5583 (check_constructor_callable): New.
5584 (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
5585 CONSTRUCTOR_CALLABLE.
5586 (convert_like_real, initialize_reference): Use
5587 check_constructor_callable.
5588 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
5589 (LOOKUP_*): Renumber.
5591 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
5593 * friend.c (add_friend): Only perform access checks when context
5595 * lex.c (cxx_make_type): Only create a binfo for aggregate types.
5596 * parser.c (cp_parser_class_specifier): Disable access checks here
5597 when parsing the body of a templated class.
5598 * semantics.c (perform_or_defer_access_checks): Reorder to allow
5599 NULL binfos when not checking access.
5601 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
5603 Use vector API for vbase list.
5604 * cp-tree.h: Include vec.h
5605 (DEF_VEC_P (tree)): New type.
5606 (struct lang_type_class): Change vbase's member type.
5607 (binfo_for_vbase): Declare.
5608 * class.c (determine_primary_base, base_derived_from,
5609 update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
5610 warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
5611 build_vtbl_initializer): Adjust.
5612 * decl.c (xref_basetypes): Adjust, accumulate upper bound of
5614 * init.c (sort_mem_initializers, expand_member_init,
5615 push_base_cleanups): Adjust.
5616 * method.c (do_build_copy_constructor): Adjust.
5617 * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
5618 (binfo_for_vbase): New.
5619 * tree.c (copy_base_binfos): Adjust.
5621 2004-06-28 Mark Mitchell <mark@codesourcery.com>
5623 * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
5625 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
5628 * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
5629 paranthesis in case of pointers to array members.
5630 * error.c (dump_type_prefix): Likewise.
5631 (dump_type_suffix): Maybe issue a whitespace when printing
5634 2004-06-27 Mark Mitchell <mark@codesourcery.com>
5637 * parser.c (cp_parser_set_decl_spec_type): Refine test for
5638 redefinition of built-in types.
5640 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
5642 * error.c (pp_template_argument_list_start): Remove.
5643 (pp_template_argument_list_end): Likewise.
5644 (pp_separate_with_comma): Use pp_cxx_separate_with.
5645 (reinit_global_formatting_buffer): Remove.
5646 (pp_non_consecutive_character): Likewise.
5647 (dump_scope): Use pp_cxx_colon_colon.
5648 (dump_template_parameter): Use pp_cxx_identifier,
5649 pp_cxx_tree_identifier and pp_cxx_whitespace.
5650 (dump_templat_bindings): Replace use of pp_string with sequence
5651 of pp_cxx_whitespace and pp_equal.
5652 (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
5653 pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set
5655 (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
5656 (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace,
5657 pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
5658 (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
5659 pp_cxx_right_bracket, pp_cxx_identifier throughout,
5660 (dump_decl): Likewise.
5661 (dump_template_decl): Likewise.
5662 (dump_function_decl): Likewise. Set padding as appropriate.
5663 (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
5665 (dump_exception_spec): Likewise.
5666 (dump_function_name): Use pp_cxx_tree_identifier and
5668 (dump_template_parms): Use pp_cxx_begin_template_argument_list and
5669 pp_cxx_end_template_argument_list.
5670 (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
5671 pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
5672 pp_cxx_whitespace throughout.
5673 (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
5675 (dump_unary_op): Likewise.
5676 (reinit_cxx_pp): New function.
5677 (type_as_string); Use it.
5678 (expr_as_string): Likewise.
5679 (decl_as_string); Likewise.
5680 (context_as_string): Likewise.
5681 (lang_decl_name): Likewise.
5682 (decl_to_string): Likewise.
5683 (expr_to_string): Likewise.
5684 (parm_to_string): Likewise.
5685 (type_to_string): Likewise.
5686 (args_to_string): Likewise.
5687 (cv_to_string): Likewise.
5689 2004-06-26 Mark Mitchell <mark@codesourcery.com>
5691 * cp-tree.h (cp_cv_quals): New type.
5692 (cp_declarator): Use it instead of "tree" as appropriate.
5693 (grok_method_quals): Adjust prototype.
5694 (grokclassfn): Likewise.
5695 (do_friend): Likewise.
5696 * decl.c (grokfndecl): Use cp_cv_quals, not tree.
5697 (grokdeclarator): Likewise.
5698 * decl2.c (grok_method_quals): Likewise.
5699 (grokclassfn): Likewise.
5700 * friend.c (do_friend): Likewise.
5701 * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
5702 * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
5703 (make_pointer_declarator): Likewise.
5704 (make_reference_declarator): Likewise.
5705 (make_ptrmem_declarator): Likewise.
5706 (cp_parser_ptr_operator): Likewise.
5707 (cp_parser_cv_qualifier_seq_opt): Likewise.
5708 (cp_parser_cv_qualifier_opt): Remove.
5709 (cp_parser_new_declarator_opt): Adjust call to
5710 cp_parser_ptr_operator.
5711 (cp_parser_conversion_declaration_opt): Likewise.
5712 (cp_parser_declarator): Use cp_cv_quals, not tree.
5713 (cp_parser_direct_declarator): Likewise.
5715 2004-06-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5717 * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
5718 Rename DECL_STMT to DECL_EXPR.
5719 * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
5720 * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
5721 * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
5723 2004-06-26 Jan Hubicka <jh@suse.cz>
5726 * decl2.c (maybe_emit_vtables): Always import_export_vtable for the
5727 reachability analysis.
5729 2004-06-25 Mark Mitchell <mark@codesourcery.com>
5731 * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
5734 2004-06-25 Paul Brook <paul@codesourcery.com>
5736 * decl2.c (get_guard): Call targetm.cxx.guard_type.
5737 (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
5739 2004-06-24 Mark Mitchell <mark@codesourcery.com>
5741 * decl.c (grokdeclarator): Restore error messages about __thread.
5742 * parser.c (cp_parser_decl_specifier_seq): Likewise.
5744 2004-06-24 Jason Merrill <jason@redhat.com>
5747 * decl.c (grokparms): Give the PARM_DECL reference type if the
5748 parameter is passed by invisible reference.
5750 2004-06-24 Andreas Schwab <schwab@suse.de>
5752 * cp-tree.h (enum cp_storage_class): Remove trailing comma.
5754 2004-06-23 Mark Mitchell <mark@codesourcery.com>
5756 * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
5757 (cp/decl.o): Likewise.
5758 (cp/decl2.o): Likewise.
5759 (cp/pt.o): Likewise.
5760 (cp/semantics.o): Likewise.
5761 * config-lang.in (gtfiles): Do not reference cp/lex.h.
5762 * class.c: Do not include lex.h.
5763 (add_implicitly_declared_members): Do not use
5764 adding_implicit_members.
5765 (check_bases_and_members): Do not talk about grok_x_components.
5766 * cp/cp-tree.h (adding_implicit_members): Remove.
5767 (cp_storage_class): New type.
5768 (cp_decl_spec): Likewise.
5769 (cp_decl_specifier_seq): Likewise.
5770 (cp_parameter_declarator): Use it for the decl_specifiers field.
5771 (check_tag_decl): Adjust prototype.
5772 (shadow_tag): Likewise.
5773 (groktypename): Likewise.
5774 (start_decl): Likewise.
5775 (start_function): Likewise.
5776 (start_method): Likewise.
5777 (grok_x_components): Remove.
5778 (grokfield): Adjust prototype.
5779 (grokbitfield): Likewise.
5780 (finish_member_class_template): Remove.
5781 * decl.c: Do not include lex.h.
5782 (adding_implicit_members): Do not define.
5783 (check_tag_decl): Do not use trees to represent decl-specifiers.
5784 (shadow_tag): Likewise.
5785 (groktypename): Likewise.
5786 (start_decl): Likewise.
5787 (grokvardecl): Likewise.
5788 (grokdeclarator): Likewise.
5789 (grokparms): Likewise.
5790 (start_function): Likewise.
5791 (start_method): Likewise.
5792 * decl.h (grokdeclarator): Adjust prototype.
5793 * decl2.c: Do not include lex.h.
5794 (grok_x_components): Remove.
5795 (grokfield): Do not use trees to represent decl-specifiers.
5796 (grokbitfield): Likewise.
5797 * lex.c: Do not include lex.h.
5799 * parser.c: Include target.h.
5800 (clear_decl_specs): New function.
5801 (cp_parser_translation_unit): Do not use trees to represent
5803 (cp_parser_postfix_expression): Likewise.
5804 (cp_parser_new_type_id): Likewise.
5805 (cp_parser_condition): Likewise.
5806 (cp_parser_simple_declaration): Likewise.
5807 (cp_parser_decl_specifier_seq): Likewise.
5808 (cp_parser_function_specifier_opt): Likewise.
5809 (cp_parser_conversion_type_id): Likewise.
5810 (cp_parser_template_parameter): Likewise.
5811 (cp_parser_explicit_instantiation): Likewise.
5812 (cp_parser_type_specifier): Likewise.
5813 (cp_parser_simple_type_specifier): Likewise.
5814 (cp_parser_init_declarator): Likewise.
5815 (cp_parser_type_id): Likewise.
5816 (cp_parser_type_specifier_seq): Likewise.
5817 (cp_parser_parameter_declaration): Likewise.
5818 (cp_parser_member_declaration): Likewise.
5819 (cp_parser_exception_declaration): Likewise.
5820 (cp_parser_function_definition_from_specifiers_and_declarator):
5822 (cp_parser_single_declaration): Likewise.
5823 (cp_parser_save_member_function_body): Likewise.
5824 (cp_parser_friend_p): Likewise.
5825 (cp_parser_set_storage_class): New function.
5826 (cp_parser_set_decl_spec_type): Likewise.
5827 * pt.c: Do not include lex.h.
5828 * semantics.c: Likewise.
5829 (finish_member_class_template): Remove.
5831 2004-06-23 Roger Sayle <roger@eyesopen.com>
5833 * call.c (build_cxx_call): Don't call expand_tree_builtin. No
5834 longer take both "args" and "convert_args" as arguments.
5835 (build_op_delete_call): Update call to build_cxx_call.
5836 (build_over_call): Likewise, update call to build_cxx_call.
5837 * cp-tree.h (build_cxx_call): Update funtion prototype.
5838 * typeck.c (build_function_call): Don't call expand_tree_builtin.
5839 * rtti.c (throw_bad_cast): Update call to build_cxx_call.
5840 (throw_bad_typeid): Likewise.
5841 (build_dynamic_cast_1): Likewise.
5843 2004-06-22 Richard Henderson <rth@redhat.com>
5845 * class.c (build_vfn_ref): Take a pointer not object. Build
5847 (cp_fold_obj_type_ref): New.
5848 * call.c (build_over_call): Update build_vfn_ref call.
5849 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
5850 * cp-tree.h (cp_fold_obj_type_ref): Declare.
5852 2004-06-21 Jason Merrill <jason@redhat.com>
5855 * cp-gimplify.c (cp_gimplify_init_expr): Look through
5858 2004-06-21 Mark Mitchell <mark@codesourcery.com>
5860 * cp-tree.def (NEW_EXPR): Add a fourth slot.
5861 * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
5862 (TREE_PARMLIST): Likewise.
5863 (CALL_DECLARATOR_PARMS): Likewise.
5864 (CALL_DECLARATOR_QUALS): Likewise.
5865 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
5866 (cp_declarator_kind): New type.
5867 (cp_parameter_declarator): Likewise.
5868 (cp_declarator): Likewise.
5869 (cp_error_declarator): Likewise.
5870 (no_parameters): Likewise.
5871 (groktypename): Change prototype.
5872 (start_decl): Likewise.
5873 (start_handler_parms): Likewise.
5874 (get_scope_of_declarator): Likewise.
5875 (start_function): Likewise.
5876 (start_preparsed_function): New function.
5877 (start_function): Change prototype.
5878 (start_method): Likewise.
5879 (grokfield): Likewise.
5880 (grokbitfield): Likewise.
5881 (build_new): Likewise.
5882 (make_pointer_declarator): Remove.
5883 (make_reference_declarator): Likewise.
5884 (make_call_declarator): Likewise.
5885 (set_quals_and_spec): Likewise.
5886 (process_template_parm): Change prototype.
5887 (begin_function_definition): Remove.
5888 (finish_parmlist): Remove.
5889 * decl.c (groktypename): Do not use trees to represent
5891 (start_decl): Likewise.
5892 (start_handler_parms): Remove.
5893 (get_scope_of_declarator): Reimplement.
5894 (grokdeclarator): Do not use trees to represent declarators.
5895 (grokparms): Likewise.
5896 (start_function): Likewise.
5897 (start_method): Likewise.
5898 (build_void_list_mode): Do not use TREE_PARMLIST.
5899 * decl.h (grokdeclarator): Change prototype.
5900 * decl2.c (grok_method_quals): Robustify.
5901 (grok_x_components): Do not use trees to represent declarators.
5902 (grokfield): Likewise.
5903 (grokbitfield): Likewise.
5904 (start_objects): Build FUNCTION_DECLs, not declarators.
5905 (start_static_storage_duration_function): Likewise.
5906 * init.c (build_new): Simplify.
5907 * lex.c (make_pointer_declarator): Remove.
5908 (make_reference_declarator): Likewise.
5909 (make_call_declarator): Likewise.
5910 (set_quals_and_spec): Likewise.
5911 * method.c (use_thunk): Use start_preparsed_function.
5912 (synthesize_method): Likewise.
5913 (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
5914 * optimize.c (maybe_clone_body): Use start_preparsed_function.
5915 * parser.c (cp_error_declarator): New variable.
5916 (declarator_obstack): Likewise.
5917 (alloc_declarator): New function.
5918 (make_declarator): Likewise.
5919 (make_id_declarator): Likewise.
5920 (make_pointer_declarator): Likewise.
5921 (make_reference_declarator): Likewise.
5922 (make_ptrmem_declarator): Likewise.
5923 (make_call_declarator): Likewise.
5924 (make_array_declarator): Likewise.
5925 (no_parameters): New variable.
5926 (make_parameter_declarator): Likewise.
5927 (cp_parser_check_for_definition_in_return_type): Do not use trees
5928 to represent declarators.
5929 (cp_parser_translation_unit): Likewise.
5930 (cp_parser_new_expression): Likewise.
5931 (cp_parser_new_type_id): Likewise.
5932 (cp_parser_new_declarator_opt): Likewise.
5933 (cp_parser_direct_new_declarator): Likewise.
5934 (cp_parser_condition): Likewise.
5935 (cp_parser_declaration_statement): Likewise.
5936 (cp_parser_declaration): Likewise.
5937 (cp_parser_conversion_type_id): Likewise.
5938 (cp_parser_conversion_declarator_opt): Likewise.
5939 (cp_parser_template_parameter_list): Likewise.
5940 (cp_parser_template_parameter): Likewise.
5941 (cp_parser_explicit_instantiation): Likewise.
5942 (cp_parser_init_declarator): Likewise.
5943 (cp_parser_declarator): Likewise.
5944 (cp_parser_direct_declarator): Likewise.
5945 (cp_parser_type_id): Likewise.
5946 (cp_parser_parameter_declaration_clause): Likewise.
5947 (cp_parser_parameter_declaration_list): Likewise.
5948 (cp_parser_parameter_declaration): Likewise.
5949 (cp_parser_member_declaration): Likewise.
5950 (cp_parser_exception_declaration): Likewise.
5951 (cp_parser_check_declarator_template_parameters): Likewise.
5952 (cp_parser_function_definition_from_specifiers_and_declarator):
5954 (cp_parser_save_member_function_body): Likewise.
5955 * pt.c (process_template_parm): Add is_non_type parameter.
5956 (convert_template_argument): Adjust call to groktypename.
5957 (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
5958 (tsubst): Do not expect declarators.
5959 (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
5961 (instantiate_decl): Use start_preparsed_function.
5962 * semantics.c (begin_function_definition): Remove.
5963 (finish_parmlist): Remove.
5964 * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
5967 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5969 * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
5970 (build_new_method_call): Likewise.
5971 * decl.c (local_variable_p_walkfn): Don't walk into types.
5972 * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
5973 (build_anon_union_vars): Add new operand for COMPONENT_REF.
5974 * init.c (buld_new): Add new operand for ARRAY_REF.
5975 * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
5976 (do_build_assign_ref): Likewise.
5977 * parser.c (cp_parser_direct_new_declarator): Add new operands
5979 (cp_parser_direct_declarator): Likewise.
5980 * pt.c (tsubst): Likewise.
5981 (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
5983 * semantics.c (finish_non_static_data_member): Add new operand
5985 * typeck.c (build_class_member_access_expr): Likewise.
5986 (build_class_member_access_expr, finish_class_member_access_expr):
5988 (build_ptrmemfunc_access_expr): Likewise.
5989 (build_array_ref): Add new operands for ARRAY_REF.
5990 * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
5991 * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
5993 2004-06-21 Richard Henderson <rth@redhat.com>
5995 * dump.c (cp_dump_tree): Don't use dump_next_stmt.
5996 * parser.c (cp_parser_jump_statement): Update commentary.
5997 * pt.c (tsubst_expr): Use RETURN_EXPR.
5998 * semantics.c (finish_return_stmt): Likewise.
5999 (finalize_nrv_r): Likewise.
6000 * typeck.c, typeck2.c: Update file start commentary.
6002 2004-06-21 Richard Henderson <rth@redhat.com>
6004 * semantics.c (finish_expr_stmt): Call verify_sequence_points.
6006 2004-06-20 Richard Henderson <rth@redhat.com>
6008 * cp-tree.h (add_decl_stmt): Declare.
6009 * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
6010 * semantics.c (maybe_cleanup_point_expr): New.
6011 (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
6012 finish_for_expr, finish_switch_cond): Use it.
6013 (finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN.
6015 2004-06-20 Richard Henderson <rth@redhat.com>
6017 * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
6018 * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
6019 (cp_gimplify_expr): Call it.
6020 (gimplify_cleanup_stmt): Move from c-gimplify.c.
6021 (cp_genericize): New.
6022 * decl.c (finish_function): Call it.
6023 * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
6024 (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
6025 (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
6026 (cp_genericize): Declare.
6027 * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
6028 * dump.c (cp_dump_tree): Likewise.
6029 * semantics.c (push_cleanup): Move from c-semantics.c.
6031 2004-06-20 Zack Weinberg <zack@codesourcery.com>
6033 * cp-lang.c (has_c_linkage): Implement.
6035 * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
6036 * decl.c (duplicate_decls): Use COPY_DECL_RTL.
6037 (builtin_function_1): Don't call make_decl_rtl.
6038 (build_cp_library_fn): Don't call set_mangled_name_for_decl.
6039 (grokvardecl): Don't call mangle_decl.
6040 * except.c (nothrow_libfn_p): Look at DECL_NAME, not
6041 DECL_ASSEMBLER_NAME.
6042 * method.c (set_mangled_name_for_decl): Delete.
6043 * name-lookup.c (pushdecl): When a local extern shadows a
6044 file-scope declaration of the same object, give both DECLs the
6046 * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
6047 on DECL_ASSEMBLER_NAME.
6049 2004-06-19 Richard Henderson <rth@redhat.com>
6051 * cp-gimplify.c: Remove unnecessary prototypes.
6052 (cp_gimplify_stmt): Merge into ...
6053 (cp_gimplify_expr): ... here. Move to end of file. Handle
6054 stmts_are_full_exprs_p frobbing.
6055 * cp-tree.h (cp_gimplify_stmt): Remove.
6056 * pt.c (tsubst_expr): Merge prep_stmt and unify.
6057 * tree.c (init_tree): Don't set lang_gimplify_stmt.
6059 2004-06-18 Richard Henderson <rth@redhat.com>
6062 * semantics.c (begin_cond): New.
6063 (finish_cond): Rewrite to handle template DECL_STMTs specially.
6064 Assume that non-template decls go land before the conditional.
6065 (simplify_loop_decl_cond): Likewise.
6066 (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
6067 finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
6068 begin_switch_stmt, finish_switch_cond): Update to match.
6070 2004-06-17 Jason Merrill <jason@redhat.com>
6073 * semantics.c (simplify_aggr_init_expr): Don't return the slot.
6074 (finish_stmt_expr_expr): Update type after conversions.
6075 (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
6076 Handle void initializer.
6077 * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
6079 2004-06-17 Geoffrey Keating <geoffk@apple.com>
6081 * class.c (build_clone): Don't call defer_fn, let mark_used do it.
6082 * cp-tree.h (defer_fn): Delete.
6083 * decl2.c (defer_fn): Delete.
6084 (finish_file): Simplify deferred_fns loops; check that
6085 only used inline functions get into deferred_fns.
6086 (mark_used): Inline previous contents of defer_fn.
6088 2004-06-16 Richard Henderson <rth@redhat.com>
6090 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
6091 (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
6092 * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
6093 of CTOR_INITIALIZER ...
6094 (pp_cxx_statement): ... here.
6095 * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
6096 (finish_function): Use alloc_stmt_list to zap entire function.
6097 * parser.c (cp_parser_compound_statement): Update commentary.
6098 * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
6099 * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
6100 (finish_stmt_expr): Don't look through COMPOUND_STMT.
6102 2004-06-16 Geoffrey Keating <geoffk@apple.com>
6104 * pt.c (mark_decl_instantiated): Don't call defer_fn.
6106 2004-06-16 Richard Henderson <rth@redhat.com>
6108 * parser.c (cp_parser_labeled_statement): Update commentary.
6109 * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
6110 * tree.c (mark_local_for_remap_r): Likewise.
6112 2004-06-16 Richard Henderson <rth@redhat.com>
6114 * parser.c (cp_parser_asm_definition): Update commentary.
6115 * pt.c (tsubst_expr): Use ASM_EXPR.
6116 * semantics.c (finish_asm_stmt): Likewise.
6118 2004-06-16 Richard Henderson <rth@redhat.com>
6120 * decl.c (finish_destructor_body): Use LABEL_EXPR.
6121 * parser.c (cp_parser_statement): Update commentary.
6122 * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
6123 * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
6124 * tree.c (mark_local_for_remap_r): Likewise.
6126 2004-06-16 Richard Henderson <rth@redhat.com>
6129 * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
6130 statement in FOR_INIT_STMT for templates.
6132 2004-06-15 Richard Henderson <rth@redhat.com>
6134 * call.c (initialize_reference): Don't build CLEANUP_STMT here.
6135 * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
6136 (genericize_try_block): Use gimplify_stmt.
6137 (genericize_catch_block, genericize_eh_spec_block): Likewise.
6138 (cp_gimplify_init_expr): Remove STMT_EXPR special case.
6139 (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
6140 * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
6141 (cp_tree_chain_matters_p): Remove.
6142 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
6143 (COMPOUND_STMT_BODY_BLOCK): New.
6144 (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
6145 (EXPR_STMT_STMT_EXPR_RESULT): New.
6146 (building_stmt_tree): Check cur_stmt_list.
6147 (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
6148 (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
6149 * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
6150 (cp_finish_decl): Use push_cleanup.
6151 (start_function, finish_function): Use statement lists.
6152 (finish_stmt): Do nothing.
6153 * except.c (begin_eh_spec_block): Use statement lists.
6154 (check_handlers_1, check_handlers): Likewise.
6155 * init.c (construct_virtual_base): Don't add extra compound stmts.
6156 (build_vec_init): Likewise.
6157 * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
6158 * name-lookup.h (struct cp_binding_level): Add statement_list.
6159 * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
6160 (cp_parser_labeled_statement, cp_parser_expression_statement,
6161 cp_parser_statement_seq_opt): Likewise.
6162 (cp_parser_compound_statement): Likewise. Take bool for try block.
6163 (cp_parser_selection_statement): Tidy if processing.
6164 (cp_parser_already_scoped_statement): Rewrite to do what it says.
6165 * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
6166 (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST.
6167 Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
6168 * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
6169 (finish_cond): New, rewritten from FINISH_COND.
6170 (simplify_loop_decl_cond): New.
6171 (finish_expr_stmt): Avoid nested EXPR_STMTs.
6172 (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
6173 begin_else_clause, finish_else_clause, finish_if_stmt,
6174 begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
6175 begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
6176 finish_for_cond, finish_for_stmt, begin_switch_stmt,
6177 finish_switch_cond, finish_switch_stmt, begin_try_block,
6178 finish_try_block, finish_cleanup_try_block, finish_function_try_block,
6179 finish_handler_sequence, finish_function_handler_sequence,
6180 begin_handler, finish_handler_parms, finish_handler,
6181 begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
6182 using statement lists.
6183 (begin_compound_stmt): Replace has_no_scope argument with flags.
6184 Update all callers. Use statement lists.
6185 (finish_compound_stmt): Likewise.
6186 (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
6187 (current_scope_stmt_stack): Remove.
6188 (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
6189 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
6190 Rewrite with statement lists.
6192 2004-06-15 Alexandre Oliva <aoliva@redhat.com>
6194 * parser.c: Change all assignments of c_lex_string_translate
6195 to true and false to 1 and 0.
6196 (cp_lexer_read_token): Convert type of the translated string.
6197 (cp_parser_skip_to_closing_parentheses): Preserve original
6198 value of c_lex_string_translate, and set it to -1 while
6200 (cp_parser_cache_group): Likewise.
6201 (cp_parser_cache_group_1): Renamed.
6202 (cp_parser_asm_operand_list): Remove redundant setting of
6203 c_lex_string_translate.
6204 (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
6205 Handle chained strings.
6207 2004-06-12 Andrew Pinski <apinski@apple.com>
6211 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
6213 * cp-tree.h: Fix typo.
6215 * cp-tree.h: Include cgraph.h
6216 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
6217 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
6219 2004-06-12 Jason Merrill <jason@redhat.com>
6221 PR tree-optimization/14107
6222 * decl.c (finish_function): Warn about no return in all functions.
6224 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
6226 * cp-tree.h (struct language_function): Remove cannot_inline.
6227 * decl.c (save_function_data): cannot_inline is no more.
6228 (cxx_push_function_context): Likewise.
6229 * decl2.c (start_objects, start_static_storage_duration_function):
6230 Reset DECL_INLINE, set DECL_UNINLINABLE.
6232 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6235 * search.c (lookup_field): Propagate the ambiguity list.
6236 (lookup_fnfields): Likewise.
6238 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6241 * parser.c (cp_parser_template_name): Ctors/dtors never need a
6242 template keyword to disambiguate.
6244 2004-06-14 Mark Mitchell <mark@codesourcery.com>
6247 * decl.c (grokdeclarator): Ignore pointer-to-members when
6248 computing template depth.
6251 * name-lookup.c (pushtag): Do not try to put class declarations in
6252 explicit specialization scopes.
6254 2004-06-11 Andrew Pinski <pinskia@physics.uc.edu>
6256 * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
6258 2004-06-11 Mark Mitchell <mark@codesourcery.com>
6261 * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
6262 bindings for undeclared built-ins.
6264 2004-06-11 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6266 * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
6267 appear at the correct location.
6269 2004-06-10 Jason Merrill <jason@redhat.com>
6273 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6274 * init.c (build_offset_ref): Build SCOPE_REF with non-null
6275 TREE_TYPE for non-dependent names.
6276 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
6277 unknown_type_node as its TREE_TYPE.
6278 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
6279 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
6280 (dump_expr) <SCOPE_REF case>: Likewise.
6282 2004-06-10 Mark Mitchell <mark@codesourcery.com>
6285 * parser.c (cp_parser_direct_declarator): Robustify.
6288 * pt.c (tsubst_copy): Use decl_constant_value on enumeration
6289 constants in non-dependent contexts.
6293 * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
6296 2004-06-10 Jakub Jelinek <jakub@redhat.com>
6299 * decl.c (duplicate_decls): Handle fileptr_type_node arguments
6302 2004-06-09 Mark Mitchell <mark@codesourcery.com>
6306 2004-06-07 Mark Mitchell <mark@codesourcery.com>
6307 * lex.c (handle_pragma_interface): Deprecate.
6308 (handle_pragma_implementation): Likewise.
6310 2004-06-09 Andrew Pinski <pinskia@physics.uc.edu>
6312 * g++spec.c (lang_specific_driver): Remove check for -lm
6313 and -lmath when check it see if it was the math library.
6315 2004-06-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6318 * parser.c (cp_parser_direct_declarator): Reject constructor named
6319 as qualified template-id.
6321 2004-06-07 Mark Mitchell <mark@codesourcery.com>
6324 * lex.c (handle_pragma_interface): Deprecate.
6325 (handle_pragma_implementation): Likewise.
6327 2004-06-07 Mark Mitchell <mark@codesourcery.com>
6330 * parser.c (cp_parser_iteration_statement): Fix typo in error
6334 * pt.c (tsubst_default_argument): Do not defer access checks
6335 while substituting into the default argument.
6338 * pt.c (tsubst_copy): Do not try to substitute for an enumeration
6339 constant in a non-dependent context.
6342 * except.c (build_throw): Ensure that temp_expr has been
6345 2004-06-06 Roger Sayle <roger@eyesopen.com>
6347 * cp/cp-tree.h (lvalue_or_else): Add function prototype.
6349 2004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6352 * parser.c (cp_parser_mem_initializer_id): Gracefully reject
6353 'typename', and accept 'template'.
6355 2004-06-03 Andrew Pinski <pinskia@physics.uc.edu>
6356 Jan Hubicka <jh@suse.cz>
6359 * method.c (use_think): Do not mark thunk as referenced.
6361 2004-06-03 Matt Austern <austern@apple.com>
6364 * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
6365 is nonzero, and if we see a noninline definition of a key method,
6366 make the vtables nonweak.
6368 2004-06-02 Matt Austern <austern@apple.com>
6370 * cp-tree.h (instantiate_decl): new boolean parameter,
6371 undefined_ok. Current behavior is equivalent to its being 0.
6372 * decl2.c (mark_used): Add new argument when calling instantiate_decl
6373 * pt.c (mark_decl_instantiated): Unconditionally make
6374 instantiations explicit unconditionally
6375 (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
6376 since mark_decl_instantiated now does it.
6377 (instantiate_class_member): New. Instantiate a member of an
6378 explicitly instantiated class template.
6379 (do_type_instantiation): Explicitly instantiate members of an
6380 explicitly instantiated class template.
6381 (instantiate_decl): if undefined_ok is nonzero, and if we're
6382 trying to explicitly instantiated a template with no definition,
6383 change it to an implicit instantiation.
6384 (instantiate_pending_templates): Add new argument to instantiate_decl.
6385 * tree.c (cp_cannot_inline_tree_fn): Likewise.
6387 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
6389 * cp-tree.h: Fix typo.
6391 * cp-tree.h: Include cgraph.h
6392 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
6393 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
6395 2004-06-01 Jason Merrill <jason@redhat.com>
6398 * call.c (call_builtin_trap): Remove type parm.
6399 (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
6400 (build_x_va_arg): Dereference a null pointer for a non-POD argument.
6402 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6405 * init.c (build_offset_ref): Build SCOPE_REF with non-null
6406 TREE_TYPE for non-dependent names.
6407 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
6408 unknown_type_node as its TREE_TYPE.
6409 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
6410 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
6411 (dump_expr) <SCOPE_REF case>: Likewise.
6413 2004-06-01 Richard Henderson <rth@redhat.com>
6414 Andrew Pinski <pinskia@physics.uc.edu>
6416 * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
6417 * parser.c (struct cp_parser): Remove in_offsetof.
6418 (cp_parser_new): Don't set it.
6419 (cp_parser_unary_expression): Don't check it.
6420 (cp_parser_postfix_open_square_expression): Split out from ...
6421 (cp_parser_postfix_expression): ... here.
6422 (cp_parser_postfix_dot_deref_expression): Likewise.
6423 (cp_parser_builtin_offsetof): New.
6424 (cp_parser_primary_expression): Use it.
6426 2004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6429 * parser.c (cp_parser_postfix_expression): Allow subscript
6430 operator in offsetof.
6432 2004-05-31 Mark Mitchell <mark@codesourcery.com>
6435 * friend.c (add_friend): Do not try to perform access checks for
6436 functions from dependent classes.
6438 2004-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
6440 * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
6441 (pp_cxx_begin_template_argument_list): Turn into a function.
6442 (pp_cxx_end_template_argument_list): Likewise.
6443 (pp_cxx_separate_with): Define.
6444 (pp_cxx_unqualified_id): Tidy.
6445 (pp_cxx_primary_expression): Likewise.
6446 (pp_cxx_postfix_expression): Likewise.
6447 (pp_cxx_expression): Likewise.
6448 (pp_cxx_simple_type_specifier): Likewise.
6449 (pp_cxx_type_specifier_seq): Likewise.
6450 (pp_cxx_parameter_declaration_clause): Likewise.
6451 (pp_cxx_exception_specification): Likewise.
6452 (pp_cxx_direct_declarator): Likewise.
6453 (pp_cxx_type_id): Likewise.
6454 * cxx-pretty-print.h (pp_cxx_whitespace): Export from
6456 (pp_cxx_left_paren): Likewise.
6457 (pp_cxx_right_paren): Likewise.
6458 (pp_cxx_left_brace): Likewise.
6459 (pp_cxx_right_brace): Likewise.
6460 (pp_cxx_left_bracket): Likewise.
6461 (pp_cxx_right_bracket): Likewise.
6462 (pp_cxx_dot): Likewise.
6463 (pp_cxx_identifier): Likewise.
6464 (pp_cxx_tree_identifier): Likewise.
6465 (pp_cxx_ampersand): New macro.
6466 (pp_cxx_star): Likewise.
6467 (pp_cxx_arrow): Likewise.
6468 (pp_cxx_semicolon): Likewise.
6469 (pp_cxx_complement): Likewise.
6470 (pp_cxx_begin_template_argument_list): Declaree.
6471 (pp_cxx_end_template_argument_list): Likewise.
6472 (pp_cxx_colon_colon): likewise.
6474 2004-05-31 Eric Botcazou <ebotcazou@libertysurf.fr>
6476 * parser.c (cp_parser_simple_type_specifier): Explicitly test
6479 2004-05-31 Kazu Hirata <kazu@cs.umass.edu>
6481 * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
6482 typeck.c: Fix comment formatting.
6484 2004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
6486 * cp-lang.c (cp_expand_decl): Remove.
6487 (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
6489 2004-05-30 Andreas Jaeger <aj@suse.de>
6491 * lang-specs.h: Add missing initializers for .ii.
6493 2004-05-28 Aldy Hernandez <aldyh@redhat.com>
6495 * decl.c (cp_make_fname_decl): Free return value from
6498 2004-05-28 Mark Mitchell <mark@codesourcery.com>
6501 * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
6503 * init.c (build_new): Likewise.
6506 * name-lookup.c (arg_assoc): Robustify.
6509 * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
6510 when determining the scope to use for a pointer to member.
6511 (lookup_anon_field): Give it external linkage.
6512 * cp-tree.h (lookup_anon_field): Declare it.
6513 * expr.c (cplus_expand_constant): Use it.
6515 2004-05-28 Mark Mitchell <mark@codesourcery.com>
6518 * parser.c (cp_parser_simple_type_specifier): Call
6519 maybe_note_name_used_in_class.
6521 2004-05-28 Tom Marshall <tmarshall@real.com>
6524 * class.c (finish_struct_1): Warn only if the dtor is non-private or
6525 the class has friends.
6527 2004-05-27 Adam Nemet <anemet@lnxw.com>
6530 * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
6531 TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
6533 2004-05-24 Geoffrey Keating <geoffk@apple.com>
6535 * method.c (implicitly_declare_fn): Don't call defer_fn; abort
6536 if it might be needed.
6537 * pt.c (mark_decl_instantiated): Only call defer_fn if
6538 the function actually needs processing in finish_file.
6539 * decl2.c (finish_file): Add check that elements in
6540 deferred_fns_used are really needed there. Remove unnecessary
6541 test of DECL_SAVED_TREE.
6543 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
6545 * Make-lang.in: No need to specify $(LIBCPP).
6547 2004-05-23 Mark Mitchell <mark@codesourcery.com>
6550 * parser.c (cp_parser_class_head): Robustify.
6553 * parser.c (cp_parser_decl_specifier_seq): Correct error in
6555 (cp_parser_constructor_declarator_p): Treat attributes
6559 * typeck.c (build_unary_op): Do not attempt to resolve casts to
6560 base classes in templates.
6562 2004-05-23 Mark Mitchell <mark@codesourcery.com>
6565 * pt.c (instantiate_template): Robustify.
6567 2004-05-23 Mark Mitchell <mark@codesourcery.com>
6570 * decl.c (xref_tag): Issue errors about redeclaring template
6571 classes as non-template classes.
6573 2004-05-23 Mark Mitchell <mark@codesourcery.com>
6576 * name-lookup.c (supplement_binding): Allow redefinitions of
6580 * parser.c (cp_parser_template_argument): Robustify.
6582 2004-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
6584 * class.c (alter_access): Use %E format specifier to print an
6585 identifier node. Avoid looking at the IDENTIFIER_POINTER.
6586 (push_lang_context): Likewise.
6587 * decl.c (lookup_label): Likewise.
6588 (grokdeclarator): Likewise.
6589 * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
6590 * pt.c (do_type_instantiation): Likewise.
6591 * tree.c (handle_java_interface_attribute): Likewise.
6592 (handle_com_interface_attribute): Likewise.
6593 (handle_init_priority_attribute): Likewise.
6595 2004-05-22 Mark Mitchell <mark@codesourcery.com>
6599 * pt.c (build_non_dependent_expr): Expand the set of tree nodes
6600 recognized as overloaded functions.
6602 2004-05-22 Mark Mitchell <mark@codesourcery.com>
6605 * class.c (layout_nonempty_base_or_field): Do not try to avoid
6606 layout conflicts for unions.
6609 * typeck.c (build_x_unary_op): Instantiate template class
6610 specializations before looking for "operator &".
6613 * typeck.c (complete_type): Layout non-dependent array types, even
6617 * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
6620 2004-05-22 Roger Sayle <roger@eyesopen.com>
6622 * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
6623 returning when TREE_TYPE is error_mark_node.
6624 * typeck.c (require_complete_type): Return error_mark_node if
6625 value's type is an error_mark_node.
6627 2004-05-20 Andrew Pinski <pinskia@physics.uc.edu>
6629 * optimize.c (calls_setjmp_r): Remove.
6630 (calls_setjmp_p): Remove.
6631 * cp-tree.c (calls_setjmp_p): Remove.
6632 * decl.c (finish_function): Do not call calls_setjmp_p.
6634 2004-05-18 Zack Weinberg <zack@codesourcery.com>
6636 * decl.c (cp_finish_decl): Use mark_decl_referenced.
6637 * decl2.c (maybe_make_one_only): Likewise.
6638 * method.c (use_thunk): Likewise.
6640 2004-05-18 Jason Merrill <jason@redhat.com>
6642 * class.c (build_base_path): Tidy a bit.
6644 2004-05-14 Geoffrey Keating <geoffk@apple.com>
6646 * name-lookup.c (struct scope_binding): New.
6647 (EMPTY_SCOPE_BINDING): New.
6648 (lookup_using_namespace): Take a scope_binding instead of a
6650 (qualified_lookup_using_namespace): Likewise.
6651 (cxx_binding_clear): Delete.
6652 (do_nonmember_using_decl): Use a scope_binding instead of a
6654 (lookup_tag): Don't call select_decl.
6655 (ambiguous_decl): Don't return anything (and change callers to match).
6656 Take a scope_binding as the second parameter.
6657 (lookup_namespace_name): Use a scope_binding instead of a
6659 (unqualified_namespace_lookup): Likewise.
6660 (lookup_qualified_name): Likewise.
6661 (select_decl): Take a scope_binding instead of a cxx_binding.
6662 Use macros rather than hand-coding tests for type-ness.
6664 2004-05-13 Diego Novillo <dnovillo@redhat.com>
6666 * cp-gimplify.c: Rename from cp-simplify.c.
6667 * Make-lang.in, optimize.c: Update.
6669 2004-05-13 Diego Novillo <dnovillo@redhat.com>
6671 Merge from tree-ssa-20020619-branch. See
6672 ChangeLog.tree-ssa for details.
6674 * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
6675 cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
6676 expr.c, init.c, name-lookup.h, optimize.c, parser.c,
6677 pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
6679 * cp-mudflap.c: New file.
6680 * cp-simplify.c:: New file.
6682 2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6685 * decl2.c (check_classfn): For member templates, compare also the
6686 template parameters to match the declaration.
6687 * cp-tree.h: Adjust declaration of check_classfn.
6688 * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
6689 * friend.c (do_friend): Likewise.
6690 * pt.c (tsubst_friend_function): Likewise.
6692 2004-05-01 Zack Weinberg <zack@codesourcery.com>
6694 * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
6695 Instead, dig into the representation type to find the array bound.
6697 2004-04-30 Jason Merrill <jason@redhat.com>
6699 Refer to base members using COMPONENT_REFs where possible.
6700 * class.c (build_simple_base_path): New fn.
6701 (build_base_path): Use it for non-virtual base references.
6702 (layout_class_type): Change base fields to their real type
6703 after layout is done.
6704 * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
6705 * cp-lang.c (cxx_get_alias_set): Use it.
6707 2004-04-30 Kazu Hirata <kazu@cs.umass.edu>
6709 * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
6712 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6715 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
6716 used in integral constant expressions.
6718 2004-04-22 Mark Mitchell <mark@codesourcery.com>
6720 * init.c (build_aggr_init): Fix accidental use of C99 construct in
6723 * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
6725 * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
6726 * decl.c (reshape_init): Use it.
6727 * init.c (perform_member_init): Remove redundant condition.
6728 (build_aggr_init): Adjust to handle brace-enclosed initializers
6730 (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
6732 * parser.c (cp_parser_initializer_clause): Do not set
6733 TREE_HAS_CONSTRUCTOR on the initializer.
6734 * rtti.c (tinfo_base_init): Likewise.
6735 (generic_initializer): Likewise.
6736 (ptr_initializer): Likewise.
6737 (ptm_initializer): Likewise.
6738 (class_initializer): Likewise.
6739 (get_pseudo_ti_init): Likewise.
6740 * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
6742 2004-04-22 Alan Modra <amodra@bigpond.net.au>
6744 * name-lookup.c (anonymous_namespace_name): Make static.
6746 2004-04-19 Roger Sayle <roger@eyesopen.com>
6749 * class.c (build_base_path): Call fold whilst building the NULL
6750 pointer check expression trees.
6752 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
6754 * init.c (build_new_1): Don't use type size argument for Java
6755 _Jv_AllocObject call.
6757 2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
6759 * method.c (make_alias_for_thunk): Remove preprocessor guard on
6760 declaration and definition.
6762 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
6765 * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
6766 than ASM_OUTPUT_DEF.
6768 2004-04-08 Jakub Jelinek <jakub@redhat.com>
6770 * decl2.c (mark_used): Don't segfault if cfun != NULL but
6771 current_function_decl == NULL.
6773 2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
6776 * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
6779 2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6781 * init.c (decl_constant_value): Don't look at DECL_INITIAL
6783 * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
6784 or TREE_SIDE_EFFECTS of a type.
6786 2004-04-02 Nathan Sidwell <nathan@codesourcery.com>
6789 * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
6790 cv-qualifier unification.
6791 * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
6793 2004-04-02 Jan Hubicka <jh@suse.cz>
6795 * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
6796 * cp-tree.h (cp_update_decl_after_saving): Declare.
6797 * tree.c (cp_update_decl_after_saving): Define.
6799 2004-04-01 Mark Mitchell <mark@codesourcery.com>
6802 * typeck.c (get_delta_difference): Call fold before returning the
6805 2004-04-01 Richard Henderson <rth@redhat.com>
6808 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
6809 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
6811 2004-04-01 Mark Mitchell <mark@codesourcery.com>
6814 * name-lookup.c (maybe_push_cleanup_level): Robustify.
6816 2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6818 * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
6820 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6822 * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
6823 * class.c (check_bitfield_decl): Likewise.
6824 * cvt.c (type_promotes_to): Likewise.
6825 * decl.c (finish_enum): Likewise.
6826 * mangle.c (write_builtin_type): Likewise.
6827 * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
6828 * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
6829 (build_binary_op): Likewise.
6831 2004-03-31 Jan Hubicka <jh@suse.cz>
6833 * tree.h (optimize_function): Kill prototype.
6834 * optimize.c (dump_function, optimize_function, dump_finction): Kill.
6835 * semantics.c (expand_body): Kill.
6837 2004-03-30 Mark Mitchell <mark@codesourcery.com>
6840 * decl.c (start_decl_1): Do not decide whether or not to create a
6841 new cleanup level until after the type has been completed.
6844 * pt.c (tsubst_default_argument): Clear current_function_decl.
6846 2004-03-30 Zack Weinberg <zack@codesourcery.com>
6848 * name-lookup.c, parser.c: Use new shorter form of GTY markers.
6850 2004-03-29 Zack Weinberg <zack@codesourcery.com>
6852 * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
6853 is null, just print the literal name and return.
6855 2004-03-25 Kazu Hirata <kazu@cs.umass.edu>
6857 * cxx-pretty-print.c: Fix comment typos.
6859 2004-03-24 Kazu Hirata <kazu@cs.umass.edu>
6861 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
6864 2004-03-23 Ziemowit Laski <zlaski@apple.com>
6866 * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
6867 * mangle.c (write_type): Add call to 'mangle_fundamental_type'
6870 2004-03-23 Zack Weinberg <zack@codesourcery.com>
6872 PR 12267, 12391, 12560, 13129, 14114, 14133
6873 * cp-lang.c (c_reset_state): Delete.
6874 (push_file_scope, pop_file_scope): New stubs.
6875 * parser.c (c_parse_file): Call sorry() here if called more than once.
6877 2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6879 * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
6882 2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
6884 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
6886 2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
6888 * error.c (enum pad): Remove.
6889 (dump_qualifiers): Likewise.
6890 (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
6891 (dump_aggr_type): Likewise.
6892 (dump_type_suffix): Likewise.
6893 (dump_simple_decl): Likewise.
6894 (dump_function_decl): Likewise.
6895 (cv_to_string): Likewise.
6896 (dump_type_prefix): Likewise. Adjust return void.
6897 * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
6899 (pp_cxx_template_keyword_if_needed): Document.
6900 (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
6901 (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
6902 MUST_NOT_THROW_EXPR.
6904 2004-03-21 Mark Mitchell <mark@codesourcery.com>
6907 * decl.c (cp_finish_decl): Compute the size of arrays declared in
6908 templates, if their type is non-dependent.
6910 2004-03-19 Mark Mitchell <mark@codesourcery.com>
6912 * call.c (build_op_delete_call): Do not forget the placement
6913 arguments when iterating through mutiple delete operators.
6915 * cp-tree.h (svaed_scope): Remove last_parms.
6916 (NEW_DELETE_OPNAME_P): New macro.
6917 (last_function_parms): Remove.
6918 (do_friend): Adjust prototype.
6919 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
6920 using last_function_parms.
6921 (grokfndecl): Take the PARM_DECLs as an argument, rather than
6922 using last_function_parms.
6923 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
6924 for class-specific operator new and operator delete.
6925 (grok_op_properties): Do not look for allocation functions with
6927 (start_function): Use DECL_ARGUMENTS instead of
6928 last_function_parms.
6929 * decl.h (last_function_parms): Do not declare.
6930 * decl2.c (grokclassfn): Do not use last_function_parms.
6931 * friend.c (do_friend): Remove parmdecls parameter.
6932 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
6933 (pop_from_top_level): Do not restore it.
6934 * pt.c (check_explicit_specialization): Do not adjust
6935 last_function_parms.
6937 * name-lookup.c (do_local_using_decl): Create a local binding for
6938 types brought in via using declarations.
6940 * name-lookup.c (lookup_arg_dependent): Handle block-scope
6941 function declarations correctly.
6943 * semantics.c (finish_id_expression): Correct handling of
6944 conversion operators to dependent types.
6946 * typeck.c (lookup_destructor): Allow the use of destructors from
6949 2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6951 * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
6952 TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
6953 * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
6954 the field is named TEMPLATE_TYPE_PARM_INDEX.
6956 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6959 * parser.c (cp_parser_functional_cast): A cast to anything
6960 but integral or enumaration type is not an integral constant
6962 * pt.c (value_dependent_expression_p): Handle cast expressions
6963 without operands (such as "int()").
6965 2004-03-18 Mark Mitchell <mark@codesourcery.com>
6967 * semantics.c (finish_pseudo_destructor_expr): Allow differing
6968 cv-qualification between the type named by the
6969 pseudo-destructor-name and the object-type.
6971 * search.c (accessible_base_p): Handle non-proper bases.
6973 * name-lookup.c (do_nonmember_using_decl): If a using declaration
6974 refers to a single overloaded function, set the type of the
6976 * tree.c (lvalue_type): Simplify.
6977 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
6979 (build_unary_op): Handle OVERLOADs with known types.
6981 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
6984 * parser.c (cp_parser_postfix_expression): Handle the use of
6985 "typename" in non-dependent contexts. Convert appropriately when
6986 when using a qualified name after "->" or ".".
6988 * call.c (conditional_conversion): Honor the requirement that some
6989 conversions refer to the original object.
6991 2004-03-18 Mark Mitchell <mark@codesourcery.com>
6993 * call.c (build_conditional_expr): Do not call force_rvalue for
6994 operands of void_type when the conditional expression itself has
6996 * name-lookup.c (pushdecl): Don't consider a declaration of a
6997 function named "main" to be an overload of a type named "main".
6998 * parser.c (cp_parser_template_name): Perform name lookup when the
6999 template name is proceeded by "template" if the qualifying scope
7001 * typeck.c (composite_pointer_type_r): Correctly handle
7002 pointer-to-member types.
7003 (build_const_cast): Likewise.
7005 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7007 * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
7008 * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
7009 (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
7010 (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
7011 (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
7012 (TYPEOF_TYPE_EXPR): New macro.
7013 * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
7014 * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
7015 * pt.c (tsubst): Likewise.
7016 * semantics.c (finish_typeof): Likewise.
7017 * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
7018 and TEMPLATE_TYPE_PARM.
7019 * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
7020 (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
7022 2004-03-16 Mark Mitchell <mark@codesourcery.com>
7025 * cp-tree.h (build_new_op): Change prototype.
7026 (build_x_binary_op): Likewise.
7027 * call.c (build_new_op): Add overloaded_p parameter.
7028 * decl2.c (grok_array_decl): Adjust call to build_new_op.
7029 * parser.c (cp_parser_binary_expression): Note that uses of
7030 overloaded operators prevents an expression from being considered
7031 an integral constant.
7032 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
7034 * semantics.c (finish_call_expr): Likewise.
7035 * typeck.c (rationalize_conditional_expr): Likewise.
7036 (build_x_indirect_ref): Likewise.
7037 (build_x_binary_op): Likewise.
7038 (build_x_unary_op): Likewise.
7039 (build_x_compound_expr): Likewise.
7040 (build_modify_expr): Likewise.
7041 * typeck2.c (build_x_arrow): Likewise.
7043 2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
7045 * cp-lang.c, ptree.c: Update copyright.
7047 2004-03-13 Mark Mitchell <mark@codesourcery.com>
7050 * parser.c (cp_parser_non_integral_constant_expression): Encode
7051 more of the idiom that surrounded calls to this function within
7053 (cp_parser_primary_expression): Adjust accordingly.
7054 (cp_parser_postfix_expression): Likewise.
7055 (cp_parser_unary_expression): Likewise.
7056 (cp_parser_cast_expression): Likewise.
7057 (cp_parser_assignment_expression): Likewise.
7058 (cp_parser_expression): Likewise.
7059 (cp_parser_new_expression): Note that new-expressions are not
7060 allowed in integral constant expressions.
7061 (cp_parser_delete_expression): Likewise.
7063 2004-03-12 Matt Austern <austern@apple.com>
7065 * decl2.c (maybe_make_one_only): Look at
7066 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
7067 to make an explicit instantiation weak.
7068 * method.c (use_thunk): Make sure we call comdat_linkage
7070 * pt.c (do_type_instantiation): On systems where weak symbols
7071 don't go in a static archive's TOC, explicit instantiation of a
7072 class must imply *explicit* instantiation of its memeber.
7074 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
7076 * call.c, cp-tree.h, pt.c: Fix comment typos.
7078 2004-03-10 Mark Mitchell <mark@codesourcery.com>
7081 * decl.c (xref_tag): Disregard non-type declarations when
7082 looking up a tagged type.
7084 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
7087 * call.c (convert_like_real): Build a const qualified temporary,
7088 when testing ctor access.
7090 2004-03-09 Mark Mitchell <mark@codesourcery.com>
7092 * call.c (initialize_reference): Fix typo.
7094 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7097 * pt.c (determine_specialization): For member templates, match also
7101 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
7103 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
7105 2004-03-09 Mark Mitchell <mark@codesourcery.com>
7108 * call.c (initialize_reference): Handle initializers that are
7109 class-member access expressions applies to rvalues.
7111 2004-03-09 Mark Mitchell <mark@codesourcery.com>
7114 * name-lookup.c (supplement_binding): Ignore functions that are
7115 marked DECL_ANTICIPATED.
7117 2004-03-08 Mark Mitchell <mark@codesourcery.com>
7120 * class.c (check_field_decls): Complain about non-static data
7121 members of reference type in unions. Propagate
7122 CLASSTYPE_REF_FIELDS_NEED_INIT and
7123 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
7125 * init.c (perform_member_init): Complain about mbmers with const
7126 type that are not explicitly initialized.
7128 2004-03-08 Mark Mitchell <mark@codesourcery.com>
7130 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
7131 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
7132 (lang_identifier): Remove implicit_decl and error_locus.
7133 (IDENTIFIER_IMPLICIT_DECL): Remove.
7134 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
7135 (IDENTIFIER_ERROR_LOCUS): Likewise.
7136 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
7137 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
7138 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
7139 (implicitly_declare): Remove.
7140 * decl.c (warn_extern_redeclared_static): Remove check of
7141 IDENTIFIER_IMPLICIT_DECL.
7142 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
7143 (implicitly_declare): Remove.
7144 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
7145 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
7146 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
7147 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
7148 in the innermost scope, rather than at namespace scope.
7149 * name-lookup.c (push_local_binding): Give it external linkage.
7150 (pushdecl): Remove dead code.
7151 * name-lookup.h (push_local_binding): Declare it.
7152 * ptree.c (cxx_print_identifier): Don't print
7153 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
7154 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
7155 not IDENTIFIER_ERROR_LOCUS.
7156 * typeck.c (build_function_call): Remove dead code.
7158 2004-03-08 Jason Merrill <jason@redhat.com>
7161 * decl.c (xref_tag): Remove attribute handling.
7162 * cp-tree.h: Adjust prototype.
7163 * decl.c, parser.c, rtti.c: Adjust callers.
7164 * parser.c (cp_parser_class_head): Pass back attributes in the
7166 (cp_parser_class_specifier): Adjust.
7168 2004-03-08 Matt Austern <austern@apple.com>
7171 * name-lookup.c (add_decl_to_level): Add extern variables, as well
7172 as static, to static_decls array.
7174 2004-03-05 Jason Merrill <jason@redhat.com>
7176 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
7178 2004-03-04 Geoffrey Keating <geoffk@apple.com>
7180 * decl.c (grokfndecl): Update old incorrect comment.
7181 (grokvardecl): Diagnose C++ variables of type with no linkage.
7183 2004-03-01 Mark Mitchell <mark@codesourcery.com>
7186 * pt.c (build_non_dependent_expr): Do not create a
7187 NON_DEPENDENT_EXPR for a THROW_EXPR.
7189 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
7192 * error.c (dump_expr): Handle THROW_EXPR.
7194 2004-03-01 Mark Mitchell <mark@codesourcery.com>
7197 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
7198 lookup if ordinary name-lookup finds a non-function.
7199 * pt.c (tsubst_copy_and_build): Likewise.
7202 * parser.c (cp_parser_late_parsing_default_args): Check that there
7203 are no extra tokens after the end of the default-argument
7206 2004-03-01 Mark Mitchell <mark@codesourcery.com>
7209 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
7210 having C++ linkage for name-mangling purposes.
7213 * parser.c (cp_parser_direct_declarator): Recognize constructor
7214 declarators that use a template-id to name the class being
7218 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
7219 (tsubst_expr): Do not call tsubst_copy, even when
7220 processing_template_decl.
7222 2004-03-01 Jeff Law <law@redhat.com>
7224 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
7227 2004-02-29 Mark Mitchell <mark@codesourcery.com>
7230 * name-lookup.h (push_scope): Change prototype.
7231 * name-lookup.c (push_scope): Do not reenter the current class
7233 * decl.c (grokfndecl): Check return code from push_scope before
7235 * decl2.c (check_classfn): Likewise.
7236 * parser.c (cp_parser_conversion_function_id): Likewise.
7237 (cp_parser_init_declarator): Likewise.
7238 (cp_parser_direct_declarator): Likewise.
7239 (cp_parser_class_specifier): Likewise.
7240 (cp_parser_class_head): Likewise.
7241 (cp_parser_lookup_name): Likewise.
7242 (cp_parser_constructor_declarator_p): Likewise.
7243 * pt.c (instantiate_class_template): Likewise.
7244 (resolve_typename_type): Likewise.
7246 2004-02-29 Mark Mitchell <mark@codesourcery.com>
7249 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
7253 * class.c (update_vtable_entry_for_fn): Do not go through
7254 covariance machinery if the type returned by an overrider is the
7255 same as the original.
7257 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
7259 * call.c: Fix a comment typo.
7261 2004-02-27 Ziemowit Laski <zlaski@apple.com>
7263 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
7265 2004-02-26 Mark Mitchell <mark@codesourcery.com>
7268 * parser.c (cp_parser_parameter_declaration_list): Commit
7269 to fewer tentative parses.
7271 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7274 * pt.c (dependent_type_p_r): A template template parameter is a
7277 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7280 * mangle.c (write_template_arg_literal): Don't rely on identity for
7283 2004-02-24 Jason Merrill <jason@redhat.com>
7285 * tree.c (build_exception_variant): Use check_qualified_type.
7287 2004-02-23 Zack Weinberg <zack@codesourcery.com>
7288 Kazu Hirata <kazu@cs.umass.edu>
7290 * decl.c (cxx_init_decl_processing): Don't check
7291 flag_writable_strings.
7293 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
7296 * typeck.c (maybe_warn_about_returning_address_of_location):
7297 Change check for VAR_DECL to use DECL_P instead.
7299 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7302 * cvt.c (build_expr_type_conversion): Type must be complete before
7303 looking up for conversions.
7305 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7308 * name-lookup.c (arg_assoc_class): Don't look into template
7309 arguments if it is not a primary template.
7311 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
7314 * method.c (use_thunk): Always clone function argument tree.
7316 2004-02-20 Mark Mitchell <mark@codesourcery.com>
7319 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
7322 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
7323 for all type variants.
7325 2004-02-19 Mark Mitchell <mark@codesourcery.com>
7328 * decl.c (duplicate_decls): Return error_mark_node for invalid
7330 * name-lookup.c (push_namespace): Ignore the return value from
7332 * pt.c (push_template_decl_real): Robustify.
7335 * name-lookup.c (push_class_level_binding): Do not complain about
7336 adding a binding for a member whose name is the same as the
7337 enclosing class if the member is located in a base class of the
7340 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7343 * parser.c (cp_parser_new_expression): Parse an ill-formed
7344 direct-new-declarator after a parenthesized type-id to emit good
7347 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
7349 * cp-tree.def, cvt.c: Update copyright.
7351 2004-02-17 Mark Mitchell <mark@codesourcery.com>
7354 * cp-tree.h (abi_version_at_least): Remove.
7355 * mangle.c: Include flags.h.
7357 2004-02-15 Mark Mitchell <mark@codesourcery.com>
7360 * call.c (build_conditional_expr): Handle conversions between
7361 class types which result in differently cv-qualified type
7365 * class.c (delete_duplicate_fields_1): Remove.
7366 (delete_duplicate_fields): Likewise.
7367 (finish_struct_anon): Remove check for members with the same name
7368 as their enclosing class.
7369 (check_field_decls): Do not call duplicate_fields.
7370 * decl.c (grokdeclarator): Remove check for static data members
7371 with the same name as their enclosing class.
7372 * name-lookup.c (push_class_level_binding): Check for members with
7373 the same name as their enclosing class.
7375 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
7378 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
7380 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7383 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
7384 has full set of arguments.
7386 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7389 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
7391 2004-02-13 Mark Mitchell <mark@codesourcery.com>
7394 * cp-tree.h (delete_sanity): Change prototype.
7395 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
7396 Remove dead code. Adjust code to warn about deleting an array.
7397 * typekc.c (decay_conversion): Use build_address and build_nop.
7400 * search.c (accessible_p): Do not check access in thunks.
7403 * call.c (build_conditional_expr): Call force_rvalue on the
7404 non-void operand in the case that one result is a throw-expression
7405 and the other is not.
7407 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
7410 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
7411 the type name and look ahead for ::~, and bail out early with a
7412 better error message if the parse is going to fail.
7414 2004-02-12 Mark Mitchell <mark@codesourcery.com>
7416 * call.c (conversion_kind): New type.
7417 (conversion_rank): Likewise.
7418 (conversion): Likewise.
7419 (CONVERSION_RANK): New macro.
7420 (conversion_obstack): New variable.
7421 (obstack_initialized): Likewise.
7422 (z_candidate): Change type of convs and second_conv.
7423 (candidate_warning): New type.
7424 (IDENTITY_RANK): Remove.
7425 (EXACT_RANK): Likewise.
7426 (PROMO_RANK): Likewise.
7427 (STD_RANK): Likewise.
7428 (PBOOL_RANK): Likewise.
7429 (USER_RANK): Likewise.
7430 (ELLIPSIS_RANK): Likewise.
7431 (BAD_RANK): Likewise.
7432 (ICS_RANK): Likewise.
7433 (ICS_STD_RANK): Likewise.
7434 (ICS_USER_FLAG): Likewise.
7435 (ICS_ELLIPSIS_FLAG): Likewise.
7436 (ICS_THIS_FLAG): Likewise.
7437 (ICS_BAD_FLAG): Likewise.
7438 (NEED_TEMPORARY_P): Likewise.
7439 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
7440 (USER_CONV_CAND): Likewise.
7441 (USER_CONV_FN): Likewise.
7442 (conversion_obstack_alloc): New function.
7443 (alloc_conversion): Likewise.
7444 (validate_conversion_obstack): Likewise.
7445 (alloc_conversions): Likewise.
7446 (build_conv): Adjust to deal with new conversion data structures.
7447 (build_identity_conv): New function.
7448 (build_ambiguous_conv): Likewise.
7449 (standard_conversion): Adjust to deal with new conversion data
7451 (convert_class_to_reference): Likewise.
7452 (direct_reference_binding): Likewise.
7453 (reference_binding): Likewise.
7454 (implicit_conversion): Likewise.
7455 (add_candidate): Likewise.
7456 (add_function_candidate): Likewise.
7457 (add_conv_candidate): Likewise.
7458 (build_builtin_candidate): Likewise.
7459 (print_z_candidate): Likewise.
7460 (merge_conversion_sequences): Likewise.
7461 (build_user_type_conversion_1): Likewise.
7462 (build_user_type_conversion): Likewise.
7463 (build_new_function_call): Likewise.
7464 (build_object_call): Likewise.
7465 (conditional_conversion): Likewise.
7466 (build_conditional_expr): Likewise.
7467 (build_new_op): Likewise.
7468 (build_op_delete_call): Likewise.
7469 (convert_like_real): Likewise.
7470 (build_over_call): Likewise.
7471 (build_new_method_call): Likewise.
7472 (is_subseq): Likewise.
7473 (maybe_handle_implicit_object): Likewise.
7474 (maybe_handle_ref_bind): Likewise.
7475 (compare_ics): Likewise.
7476 (source_type): Likewise.
7477 (add_warning): Likewise.
7479 (can_convert_arg): Likewise.
7480 (can_convert_arg_bad): Likewise.
7481 (perform_implicit_conversion): Likewise.
7482 (perform_direct_initialization_if_possible): Likewise.
7483 (initialize_reference): Likewise.
7484 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
7485 * cp-tree.def (WRAPPER): Likewise.
7486 (IDENTITY_CONV): Remove.
7487 (LVALUE_CONV): Likewise.
7488 (QUAL_CONV): Likewise.
7489 (STD_CONV): Likewise.
7490 (PTR_CONV): Likewise.
7491 (PMEM_CONV): Likewise.
7492 (BASE_CONV): Likewise.
7493 (REF_BIND): Likewise.
7494 (USER_CONV): Likewise.
7495 (AMBIG_CONV): Likewise.
7496 (RVALUE_CONV): Likewise.
7497 * cp-tree.h (tree_wrapper): Remove.
7498 (WRAPPER_ZC): Remove.
7499 (lang_tree_node): Remove wrapper.
7500 (LOOKUP_SPECULATIVELY): Remove.
7501 (build_op_delete_call): Adjust prototype.
7502 (validate_conversion_obstack): Declare.
7503 (build_zc_wrapper): Remove.
7504 * cvt.c (convert_to_reference): Remove dead code.
7505 (ocp_convert): Likewise.
7506 * decl.c (redeclaration_error_message): Correct handling of
7508 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
7509 (cp_tree_node_structure): Remove WRAPPER case.
7510 * decl2.c (finish_file): Call validate_conversion_obstack.
7511 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
7512 (build_op_delete_call): Likewise.
7513 (build_x_delete): Likewise.
7514 (build_delete): Adjust call to build_op_delete_call.
7515 * pt.c (tsubst_friend_declaration): Adjust code to determine
7516 whether or not a friend template is a definition.
7517 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
7518 * tree.c (build_zc_wrapper): Remove.
7520 2004-02-12 Zack Weinberg <zack@codesourcery.com>
7522 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
7523 * cp-tree.h: Don't declare cxx_builtin_type_decls.
7524 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
7525 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
7527 2004-02-10 Mark Mitchell <mark@codesourcery.com>
7529 * typeck.c (lookup_destructor): Fix typo in error message.
7531 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
7533 * call.c, parser.c, tree.c: Fix comment typos.
7535 2004-02-07 Zack Weinberg <zack@codesourcery.com>
7538 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
7539 * decl.c (duplicate_decls, start_function): Likewise.
7541 2004-02-07 Zack Weinberg <zack@codesourcery.com>
7543 * name-lookup.c (pushdecl): Issue shadow warnings directly.
7544 * parser.c (free_parser_stacks): Delete.
7546 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
7548 * rtti.c: Update copyright.
7550 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7553 * decl.c (require_complete_types_for_parms): Do not insert
7554 error_mark_node in the parameter list.
7556 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7559 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
7560 error when terminator can not be found.
7562 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
7564 Make-lang.in (po-generated): Delete.
7566 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
7568 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
7569 targetm.calls.promote_prototypes.
7571 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
7575 2004-01-15 Geoffrey Keating <geoffk@apple.com>
7577 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
7578 (handle_pragma_implementation): Likewise.
7580 2004-02-05 Mark Mitchell <mark@codesourcery.com>
7583 * typeck.c (lookup_destructor): Tweak error message.
7585 2004-02-05 Jan Hubicka <jh@suse.cz>
7587 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
7590 2004-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7593 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
7594 code, only emits the diagnostic now. Added lookup of the identifier
7595 and support for qualified ids.
7596 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
7597 Parse an (invalid) type name as id-expression within a declarator.
7598 (cp_parser_simple_declaration): Use it.
7599 (cp_parser_member_declaration): Likewise.
7600 (cp_parser_make_typename_type): New function. Handle errors through
7601 cp_parser_diagnose_invalid_typename.
7602 (cp_parser_elaborated_type_specifier): Use it.
7604 2004-02-04 Mark Mitchell <mark@codesourcery.com>
7607 * call.c (convert_like_real): Use "converting" rather than
7608 "argument" as the descriptive keyword to
7609 dubious_conversion_warnings.
7610 * typeck.c (convert_for_assignment): Do not call
7611 dubious_conversion_warnings.
7613 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7616 * init.c (build_delete): Emit a more informative error message in
7617 case of an incomplete type, and on the correct source line.
7619 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
7621 * error.c, search.c: Update copyright.
7623 2004-02-04 Mark Mitchell <mark@codesourcery.com>
7626 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
7627 linkage for the typeinfo name string.
7629 2004-02-04 Mark Mitchell <mark@codesourcery.com>
7632 * cp-tree.h (fold_non_dependent_expr): New function.
7633 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
7634 (cp_parser_template_argument): Use fold_non_dependent_expr.
7635 (cp_parser_direct_declarator): Likewise.
7636 * pt.c (fold_non_dependent_expr): New function.
7637 (convert_nontype_argument): Use it.
7638 (tsubst_qualified_id): Simplify.
7639 (tsubst_copy_and_build): Likewise.
7641 2004-02-04 Mark Mitchell <mark@codesourcery.com>
7643 * decl.c (cxx_push_function_context): Do not set
7644 current_function_is_thunk.
7645 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
7648 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7651 * pt.c (more_specialized_class): Increase processing_template_decl
7652 while partial ordering.
7654 2004-02-03 Mark Mitchell <mark@codesourcery.com>
7657 * decl.c (start_function): Do not call pushdecl for any
7658 instantiation or specialization of a primary template.
7660 2004-02-03 Mark Mitchell <mark@codesourcery.com>
7663 * parser.c (cp_parser_class_name): Robustify.
7666 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
7669 * semantics.c (finish_id_expression): Do not return an
7670 IDENTIFIER_NODE when lookup finds a PARM_DECL.
7672 2004-02-03 Mark Mitchell <mark@codesourcery.com>
7675 * pt.c (build_non_dependent_expr): Do not build
7676 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
7679 * semantics.c (finish_id_expression): Do not return an
7680 IDENTIFIER_NODE when lookup finds a VAR_DECL.
7683 * parser.c (cp_parser_simple_declaration): When skipping to the
7684 end of the statement swallow the terminating semicolon.
7686 2004-02-02 Mark Mitchell <mark@codesourcery.com>
7689 * init.c (build_offset_ref): Improve error recovery for invalid
7690 uses of non-static member functions.
7693 * cp-tree.h (cp_build_type_attribute_variant): New function.
7694 * class.c (build_clone): Use cp_build_type_attribute_variant.
7695 * decl.c (duplicate_decls): Likewise.
7696 * pt.c (copy_default_args_to_explicit_spec): Likewise.
7697 (tsubst_function_type): Likewise.
7698 * tree.c (build_exception_variant): Check attributes before
7699 concluding that two types are the same.
7700 (cp_build_type-attribute_variant): New method.
7701 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
7704 * call.c (convert_class_to_reference): Keep better track of
7705 pedantically invalid user-defined conversions.
7707 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7710 * pt.c (tsubst_qualified_id): Improved error message when a type
7711 is expected but not found.
7713 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
7715 * class.c: Fix comment typos.
7717 * error.c: Likewise.
7718 * parser.c: Likewise.
7720 * search.c: Likewise.
7721 * typeck.c: Likewise.
7723 2004-01-30 Richard Henderson <rth@redhat.com>
7726 * method.c (use_thunk): Don't force_target_expr for void thunks.
7727 * tree.c (build_target_expr_with_type): Assert non-void type.
7728 (force_target_expr): Likewise.
7730 2004-01-30 Michael Matz <matz@suse.de>
7732 * parser.c (cp_parser_labeled_statement): Accept case ranges.
7734 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7738 * decl.c (grokdeclarator): Check immediatly type completeness for
7739 non-dependent types.
7741 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7744 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
7745 a sizeof expression.block
7747 2004-01-29 Mark Mitchell <mark@codesourcery.com>
7750 * mangle.c (write_encoding): Correct encoding of member template
7753 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7755 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
7756 template name as it was `<::' (digraph typo).
7757 (cp_parser_nth_token_starts_template_argument_list_p): New function.
7758 (cp_parser_id_expression): Use it.
7759 (cp_parser_nested_name_specifier_opt): Likewise.
7760 (cp_parser_template_name): Likewise.
7761 (cp_parser_class_name): Likewise.
7762 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
7764 2004-01-28 Mark Mitchell <mark@codesourcery.com>
7767 * typeck.c (merge_types): Do not merge attributes into
7771 * parser.c (cp_parser_direct_declarator): Do not prevent
7772 backtracking inside a parenthesized declarator.
7773 (cp_parser_parameter_declaration): Fix typo in comment.
7775 2004-01-28 Jan Hubicka <jh@suse.cz>
7777 * semantics.c (expand_body) Do emit_associated_thunks before
7780 2004-01-27 Devang Patel <dpatel@apple.com>
7782 * name-lookup.c: Include "debug.h"
7783 (do_namespace_alias): Invoke debug_hooks to emit debug info
7784 for namespace alias.
7785 (do_local_using_decl): Invoke debug_hooks to emit debug info
7787 (do_class_using_decl): Same.
7788 (do_toplevel_using_decl): Same.
7789 (do_using_directive): Same.
7790 (cp_emit_debug_info_for_using): New function.
7791 * Make-lang.in (cp/parser.o): Depend on debug.h
7792 (cp/name-lookup.o): Same.
7794 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7796 * cp-tree.h (language_function, lang_type_header): Use
7798 * name-lookup.h (cp_binding_level): Likewise.
7800 2004-01-26 Mark Mitchell <mark@codesourcery.com>
7803 * semantics.c (finish_for_expr): Check for unresolved overloaded
7806 * class.c (add_method): Just check processing_template_decl to
7807 determine whether or not we are within a template.
7808 * decl2.c (maybe_retrofit_in_chrg): Likewise.
7809 * init.c (decl_constant_value): Check the type of the declaration,
7811 * name-lookup.c (maybe_push_to_top_level): Rename to ...
7812 (push_to_top_level): ... this.
7813 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
7814 * pt.c (push_template_decl_real): Reorder condition for speed.
7815 (convert_template_argument): Use dependency-checking functions in
7816 place of uses_template_parms.
7817 (lookup_template_class): Avoid calling uses_template_parms more
7819 (uses_template_parms): Reimplement, using dependency-checking
7821 (instantiate_class_template): Use push_to_top_level, not
7822 maybe_push_to_top_level.
7823 (type_unification_real): Simplify.
7824 (type_dependent_expression_p): Handle OFFSET_REFs and
7826 (any_dependent_template_arguments_p): Handle multiple levels of
7828 * semantics.c (expand_or_defer_fn): Do not check
7829 uses_template_parms for template instantiations.
7830 * typeck.c (comptypes): Avoid calling cp_type_quals.
7832 2004-01-25 Mark Mitchell <mark@codesourcery.com>
7835 * call.c (build_over_call): Do not convert arguments when
7836 processing a template.
7837 * pt.c (build_non_dependent_expr): Do not build a
7838 NON_DEPENDENT_EXPR for arithmetic constants.
7840 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7843 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
7844 returns a TYPE_DECL. no further lookup is required.
7845 * semantics.c (check_template_template_default_arg): A TYPE_DECL
7846 is invalid. Rework to give better diagnostics.
7848 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7851 * pt.c (instantiate_class_template): Add an error_mark_node
7853 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
7855 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
7858 * decl.c (finish_function): Move the call to
7859 finish_fname_decls below the call to
7860 finish_eh_spec_block.
7862 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
7864 * optimize.c, typeck2.c: Update copyright.
7866 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
7868 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
7869 init.c, mangle.c, typeck.c: Update copyright.
7871 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
7873 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
7875 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
7877 * Make-lang.in: Replace $(docdir) with doc.
7878 (c++.info, c++.srcinfo): Dummy entry.
7879 (c++.man, c++.srcman): New rules.
7880 (c++.install-man): Revamp rule.
7882 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
7884 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
7885 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
7886 immediate $(shell) instead of deferred backquote.
7888 2004-01-19 Mark Mitchell <mark@codesourcery.com>
7891 * parser.c (cp_parser_postfix_expression): When encountering
7892 incomplete type on left-hand side of "->" or ".", treat the entire
7893 expression as erroneous.
7896 * call.c (build_field_call): Remove.
7897 (n_build_method_call): Likewise.
7898 (build_method_call): Likewise.
7899 (build_new_method_call): Do not call build_field_call.
7900 * class.c (n_build_method_call): Remove.
7901 (print_class_statistics): Do not print it.
7902 * cp-tree.h (build_method_call): Remove declaration.
7903 (finish_object_call_expr): Likewise.
7904 (build_new_1): Do not use build_method_call.
7905 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
7906 when the function appearing on the right-hand-side of "." or "->"
7907 is not actually a function.
7908 * pt.c (tsubst_copy_and_build): Likewise.
7909 * semantics.c (finish_object_call_expr): Remove.
7911 2004-01-18 Mark Mitchell <mark@codesourcery.com>
7914 * pt.c (tsubst): Use finish_typeof.
7916 2004-01-18 Jason Merrill <jason@redhat.com>
7919 * except.c (build_throw): In a template, set
7920 current_function_returns_abnormally.
7922 2004-01-17 Fred Fish <fnf@intrinsity.com>
7925 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
7926 except don't call array_type_nelts() with a VECTOR_TYPE.
7928 2004-01-16 Jan Hubicka <jh@suse.cz>
7930 * mangle.c (write_mangled_name): Remove inline modifier.
7932 2004-01-16 Mark Mitchell <mark@codesourcery.com>
7935 * decl.c (compute_array_index_type): Fix grammar in comment.
7936 * init.c (build_zero_init): Handle zero-sized arrays correctly.
7939 * call.c (name_as_c_string): Print conversion operator names
7943 * call.c (initialize_reference): Pass -1 for inner parameter to
7946 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7949 * parser.c (cp_parser_base_specifier): Check for an invalid
7950 keyword `typename' and emit an user-friendly error message.
7952 2004-01-15 Geoffrey Keating <geoffk@apple.com>
7955 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
7956 (handle_pragma_implementation): Likewise.
7958 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7961 * typeck.c (build_class_member_access_expr): Allow to access members
7962 of the currently open class.
7963 (finish_class_member_access_expr): Likewise.
7965 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
7968 * name-lookup.c (validate_nonmember_using_decl): Take scope and
7969 name by value, instead of computing them.
7970 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
7971 arguments. Pass them to validate_nonmember_using_decl.
7972 * name-lookup.h (do_local_using_decl): Adjust.
7973 (do_toplevel_using_decl): Likewise.
7974 * parser.c (cp_parser_using_declaration): Likewise.
7975 * pt.c (tsubst_expr): Likewise.
7977 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
7981 * name-lookup.c (qualified_lookup_using_namespace): Search
7982 strongly-associated namespaces first, and only then try other
7985 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
7987 * Make-lang.in (c++.srcextra): Dummy entry.
7989 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7992 * parser.c (cp_parser_template_name): Don't try to parse a
7993 conversion-function-id, as it cannot be a template-name.
7994 (cp_parser_simple_type_specifier): Check for invalid template-ids
7995 even after a built-in type.
7997 2004-01-14 Jan Hubicka <jh@suse.cz>
8000 * pt.c (instantiate_decl): Do not increase function_depth.
8002 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
8006 * parser.c (cp_parser_elaborated_type_specifier): Warn about
8007 attributes and discard.
8008 * decl.c (xref_tag): Don't overwite existing attributes with
8011 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
8014 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
8015 is no destructor while looking up a BIT_NOT_EXPR.
8017 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
8019 * cxxfilt.c: Remove unused file.
8021 2004-01-14 Jan Hubicka <jh@suse.cz>
8023 Partial fix to PR c++/12850
8024 * decl2.c (mark_used): Do not proactively instantiate templates
8025 when compiling in unit-at-a-time or not optimizing.
8026 * optimize.c (maybe_clone_body): Do not increase function depth.
8028 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
8031 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
8033 2004-01-12 Steven Bosscher <stevenb@suse.de>
8036 * parser.c (cp_parser_member_declaration): Any non-type is also
8037 not a class or a function.
8039 2004-01-12 Jason Merrill <jason@redhat.com>
8042 * class.c (build_base_path): Do not mark vtable references as
8044 (build_vtbl_ref_1): Likewise.
8046 2004-01-12 Richard Henderson <rth@redhat.com>
8049 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
8050 (store_init_value): Use it.
8051 * decl.c (check_initializer): Expect full initialization code
8052 from store_init_value.
8053 * init.c (expand_aggr_init_1): Likewise.
8054 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
8056 2004-01-12 Mark Mitchell <mark@codesourcery.com>
8058 * class.c (layout_class_type): For non-POD class types, also copy
8059 the DECL_SIZE and DECL_MODE of fields to the base class type.
8061 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8064 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
8065 calling regenerate_decl_from_template.
8067 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
8070 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
8071 decl-specifier occurring along with a class definition.
8073 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
8075 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
8076 clauses to comments describing declares_class_or_enum.
8077 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
8080 2004-01-12 Jan Hubicka <jh@suse.cz>
8082 * pt.c (for_each_template_parm): Do not check for duplicates.
8083 (for_each_template_parm): Use walk_tree duplicate checking code.
8085 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
8088 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
8089 is error_mark_node, don't add any more decl_specs.
8090 (cp_parser_init_declarator): After committing to a declaration, if
8091 the decl_specifiers start with error_mark_node, issue an error and
8092 change the type to "int".
8094 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
8097 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
8099 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
8103 * pt.c (tsubst): Substitution must fail if we are attempting to
8104 create an array with element type that is an abstract class type.
8105 * decl.c (cp_finish_decl): Strip pointers and array types recursively
8106 before calling abstract_virtuals_error.
8108 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
8110 * name-lookup.c (qualified_lookup_using_namespace): Consider
8111 strong using directives even if we've already found a binding.
8113 2004-01-09 Mark Mitchell <mark@codesourcery.com>
8115 * cp-tree.h (cxx_expand_expr): Change prototype.
8116 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
8118 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
8121 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
8122 looking into them recursively. They can be there because of the
8123 new __offsetof__ extension.
8125 2004-01-07 Zack Weinberg <zack@codesourcery.com>
8127 * parser.c (cp_parser_save_member_function_body): Mark the
8130 2004-01-05 Mark Mitchell <mark@codesourcery.com>
8133 * class.c (build_clone): Copy type attributes from the original
8134 function to the clone.
8137 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
8138 references as constant.
8141 * parser.c (cp_parser_explicit_instantiation): Improve error
8143 (cp_parser_require): Improve indication of the error location.
8146 * parser.c (cp_parser_class_head): Reorder logic to check for
8147 invalid qualification.
8149 2004-01-04 Mark Mitchell <mark@codesourcery.com>
8152 * name-lookup.c (lookup_using_namespace): Remove spacesp
8154 (unqualified_namespace_lookup): Likewise.
8155 (lookup_qualified_name): Adjust accordingly.
8156 (lookup_name_real): Likewise.
8157 (lookup_arg_dependent): Do not eliminate the namespace of the
8158 functions found by unqualified name lookup unless that is the
8161 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
8163 * semantics.c (push_deferring_access_checks): Fix format.
8164 (resume_deferring_access_checks): Likewise.
8165 (stop_deferring_access_checks): Likewise.
8166 (pop_deferring_access_checks): Likewise.
8167 (get_deferred_access_checks): Likewise.
8168 (pop_to_parent_deferring_access_checks): Likewise.
8169 (perform_deferred_access_checks): Likewise.
8170 (perform_or_defer_access_check): Likewise.
8172 2004-01-04 Richard Henderson <rth@redhat.com>
8174 * call.c (build_over_call): Don't create a save_expr of an
8175 aggregate, but rather its address.
8177 2004-01-04 Mark Mitchell <mark@codesourcery.com>
8180 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
8181 an offsetof expression.
8183 * parser.c (cp_parser_parameter_declaration): Fix comment.
8186 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
8187 (reference_binding): Set it when appropriate.
8188 (build_temp): New function, split out from ...
8189 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
8190 (initialize_reference): Likewise.
8193 * parser.c (cp_parser): Add in_type_id_in_expr_p.
8194 (cp_parser_new): Initialize it.
8195 (cp_parser_postfix_expression): Set it.
8196 (cp_parser_sizeof_operand): Likewise.
8197 (cp_parser_parameteR_declaration): Do not commit early to tenative
8198 parsers when in_type_id_in_expr_p is set.
8200 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8203 * parser.c (cp_parser_template_argument): Don't call
8204 make_unbound_class_template directly.
8205 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
8206 UNBOUND_CLASS_TEMPLATE tree node.
8208 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
8211 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
8213 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8216 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
8217 (DECL_FUNCTION_TEMPLATE_P): Use it.
8218 (DECL_CLASS_TEMPLATE_P): Likewise.
8219 * parser.c (cp_parser_lookup_name): Add is_template parameter.
8220 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
8221 (cp_parser_template_name): Likewise.
8222 (cp_parser_elaborated_type_specifier): Likewise.
8223 (cp_parser_namespace_name): Likewise.
8224 (cp_parser_class_name): Likewise.
8225 (cp_parser_lookup_name_simple): Likewise.
8227 See ChangeLog.3 for earlier changes.