1 2005-06-02 Nathan Sidwell <nathan@codesourcery.com>
4 * decl.c (duplicate_decls): Copy all of DECL_USE_TEMPLATE.
7 * name-lookup.c (pushtag): Push local class even in a template.
9 2005-05-31 Nathan Sidwell <nathan@codesourcery.com>
12 * init.c (integral_constant_value): Check the type of the
13 initializer, not the decl.
15 2005-05-30 Mark Mitchell <mark@codesourcery.com>
18 * name-lookup.c (do_nonmember_using_decl): Ignore builtin
19 functions, even when the used name is not a function.
21 2005-05-30 Kazu Hirata <kazu@cs.umass.edu>
23 * operators.def, optimize.c: Update copyright.
25 2005-05-28 Mark Mitchell <mark@codesourcery.com>
28 * call.c (standard_conversion): Permit conversions to complex
29 types if conversion to the corresponding scalar type would be
33 * method.c (implicitly_declare_fn): Clear processing_template_decl
34 when generating implicit declaration.
36 2005-05-27 Mark Mitchell <mark@codesourcery.com>
39 * typeck.c (get_member_function_from_ptrfunc): Do not attempt
40 conversions to base classes of incomplete types.
42 2005-05-27 Ian Lance Taylor <ian@airs.com>
44 * semantics.c (add_stmt): Add C++ frontend specific version.
45 * cp-tree.h (STMT_IS_FULL_EXPR_P): Define.
46 (stmts_are_full_exprs_p): Declare.
48 2005-05-27 Roger Sayle <roger@eyesopen.com>
49 Giovanni Bajo <giovannibajo@gcc.gnu.org>
51 * cp-tree.def (UNARY_PLUS_EXPR): New C++ unary tree code.
52 * parser.c (cp_parser_unary_expression): Use UNARY_PLUS_EXPR instead
54 (cp_parser_unary_expression): Likewise.
55 * typeck.c (build_unary_op): Likewise.
56 * call.c (add_builtin_candidate, build_new_op): Likewise.
57 * error.c (dump_expr): Likewise.
58 * pt.c (tsubst_copy, tsubst_copy_and_build): Likewise.
59 * decl.c (ambi_op_p, grok_op_properties): Likewise.
60 * dump.c (dump_op): Likewise.
61 * lex.c (init_operators): Likewise.
62 * operators.def ("+"): Likewise.
63 * cp-gimplify.c (cp_gimplify_expr): Handle UNARY_PLUS_EXPR like a
64 conversion, if the result and argument types differ.
65 * tree.c (fold_if_not_in_template): Fold UNARY_PLUS_EXPR much
66 like a NOP_EXPR when !processing_template_decl.
68 * cxx-pretty-print.c (pp_cxx_cast_expression): Prototype.
69 (pp_cxx_unary_expression): Handle new UNARY_PLUS_EXPR tree code.
71 2005-05-27 Nathan Sidwell <nathan@codesourcery.com>
74 * typeck.c (get_delta_difference): Cope with incomplete but equal
78 * parser.c (cp_parser_late_parsing_for_member): Disable access
79 checking for template functions.
81 2005-05-26 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
84 * pt.c (redeclare_class_template): Change error message according
85 to coding conventions.
87 2005-05-26 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
89 * call.c (build_op_delete_call): Fix quoting in error message.
91 2005-05-25 Richard Henderson <rth@redhat.com>
94 * cp-tree.h (make_alias_for): Declare.
95 * decl2.c (build_java_method_aliases): New.
96 (cp_finish_file): Call it.
97 * method.c (make_alias_for): Split out from ...
98 (make_alias_for_thunk): ... here.
100 2005-05-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
103 * semantics.c (finish_id_expression): Fix quoting in error message.
105 2005-05-25 DJ Delorie <dj@redhat.com>
107 * decl.c (duplicate_decls): Move warning control from if() to
109 * name-lookup.c (parse_using_directive): Likewise.
110 * parser.c (cp_parser_elaborated_type_specifier): Likewise.
111 (cp_parser_init_declarator): Likewise.
112 * tree.c (handle_com_interface_attribute): Likewise.
114 2005-05-24 Ziemowit Laski <zlaski@apple.com>
116 * class.c (layout_class_type): Do not issue C++ ABI warnings
118 * decl.c (objc_mark_locals_volatile): Streamline by calling
119 objc_volatilize_decl().
120 * parser.c (cp_parser_objc_message_expression): Allow simple
121 type specifiers (instead of merely type names) as message
123 * pt.c (template_args_equal): Do not call objc_comptypes().
124 * typeck.c (composite_pointer_type): If both pointers are
125 ObjC-esque, arbitrarily choose the first; do not call
127 (comptypes): Do not call objc_comptypes().
128 (convert_for_assignment): Call objc_compare_types().
129 (comp_ptr_ttypes_real): Call objc_type_quals_match() before
130 concluding that types do not match.
132 2005-05-24 Andrew Pinski <pinskia@physics.uc.edu>
135 * optimize.c (update_cloned_parm): Copy the TYPE also from the
138 2005-05-19 Jakub Jelinek <jakub@redhat.com>
141 * decl.c (grokdeclarator): Fix "storage class specified for"
144 2005-05-19 Kazu Hirata <kazu@cs.umass.edu>
146 * parser.c: Fix comment typos.
148 2005-05-18 Geoffrey Keating <geoffk@apple.com>
150 * Make-lang.in (cc1plus-dummy): New.
151 (cc1plus-checksum.c): New.
152 (cc1plus-checksum.o): New.
153 (cc1plus): Add cc1plus-checksum.o.
155 2005-05-17 H.J. Lu <hongjiu.lu@intel.com>
158 * decl2.c (determine_visibility): Don't set visibility to
159 hidden if it has been set explicitly by user.
161 2005-05-17 Ziemowit Laski <zlaski@apple.com>
162 Mike Stump <mrs@apple.com>
164 Yet more Objective-C++...
166 * cp-objcp-common.h (cxx_get_alias_set): Move from
168 (cxx_warn_unused_global_decl): Likewise.
169 (cp_expr_size): Likewise.
170 (cp_tree_size): Likewise.
171 (cp_var_mod_type_p): Likewise.
172 (cxx_initialize_diagnostics): Likewise.
173 (cxx_types_compatible_p): Likewise.
174 * cp-tree.h: to here.
176 * lex.c (D_OBJC): Add.
177 (init_reswords): Add.
178 * Make-lang.in (cp/pt.o): Add cp/cp-objcp-common.h.
179 * parser.c: Add c-common.h include.
180 * pt.c: Add c-common.h and cp-objcp-common.h includes.
181 (template_args_equal): Use objc_comptypes as well.
182 (tsubst_copy_and_build): Use objcp_tsubst_copy_and_build as well.
183 * semantics.c (do_poplevel): Remove static.
185 * decl.c (objc_mark_locals_volatile): Don't change decls that are
187 * decl2.c (generate_ctor_or_dtor_function): Add code to initialize
188 Objective C++ early enough.
189 * lex.c (struct resword reswords): Add Objective-C++ support.
190 * parser.c (cp_lexer_get_preprocessor_token): Add Objective-C++.
191 (cp_parser_objc_message_receiver): Add.
192 (cp_parser_objc_message_args): Likewise.
193 (cp_parser_objc_message_expression): Likewise.
194 (cp_parser_objc_encode_expression): Likewise.
195 (cp_parser_objc_defs_expression): Likewise.
196 (cp_parser_objc_protocol_expression): Likewise.
197 (cp_parser_objc_selector_expression): Likewise.
198 (cp_parser_objc_expression): Likewise.
199 (cp_parser_objc_visibility_spec): Likewise.
200 (cp_parser_objc_method_type): Likewise.
201 (cp_parser_objc_protocol_qualifiers): Likewise.
202 (cp_parser_objc_typename): Likewise.
203 (cp_parser_objc_selector_p): Likewise.
204 (cp_parser_objc_selector): Likewise.
205 (cp_parser_objc_method_keyword_params): Likewise.
206 (cp_parser_objc_method_tail_params_opt): Likewise.
207 (cp_parser_objc_interstitial_code): Likewise.
208 (cp_parser_objc_method_signature): Likewise.
209 (cp_parser_objc_method_prototype_list): Likewise.
210 (cp_parser_objc_method_definition_list): Likewise.
211 (cp_parser_objc_class_ivars): Likewise.
212 (cp_parser_objc_identifier_list): Likewise.
213 (cp_parser_objc_alias_declaration): Likewise.
214 (cp_parser_objc_class_declaration): Likewise.
215 (cp_parser_objc_protocol_declaration): Likewise.
216 (cp_parser_objc_protocol_refs_opt): Likewise.
217 (cp_parser_objc_superclass_or_category): Likewise.
218 (cp_parser_objc_class_interface): Likewise.
219 (cp_parser_objc_class_implementation): Likewise.
220 (cp_parser_objc_end_implementation): Likewise.
221 (cp_parser_objc_declaration): Likewise.
222 (cp_parser_objc_try_catch_finally_statement): Likewise.
223 (cp_parser_objc_synchronized_statement): Likewise.
224 (cp_parser_objc_throw_statement): Likewise.
225 (cp_parser_objc_statement): Likewise.
226 (cp_parser_primary_expression): Add Objective-C++.
227 (cp_parser_statement): Likewise.
228 (cp_parser_declaration): Likewise.
229 (cp_parser_simple_type_specifier): Likewise.
230 (cp_parser_type_name): Likewise.
231 (cp_parser_parameter_declaration_list): Likewise.
232 (cp_parser_member_declaration) Likewise.
233 * tree.c: Include debug.h.
234 * typeck.c (composite_pointer_type): Add Objective-C++ support.
235 (finish_class_member_access_expr): Likewise.
236 (build_function_call): Allow objc to rewrite FUNCTION_DECLs.
237 (build_modify_expr): Allow objc to generate write barriers.
239 * Make-lang.in (cp/tree.o): Add debug.h.
240 * tree.c (lvalue_p_1, case CONST_DECL): Add.
242 2005-05-18 Jan Hubicka <jh@suse.cz>
244 * method.c: Include tree-pass.h
245 (use_thunk): Lower body before expanding.
247 2005-05-17 Jakub Jelinek <jakub@redhat.com>
250 * decl.c (maybe_deduce_size_from_array_init): Call
251 cp_apply_type_quals_to_decl after completing array type.
253 2005-05-16 Richard Henderson <rth@redhat.com>
255 * decl.c (build_library_fn_1): Move setting TREE_NOTHROW ...
256 (build_library_fn): ... here.
258 2005-05-12 Ian Lance Taylor <ian@airs.com>
260 * cp-tree.h (cp_stmt_codes): Don't define.
261 (statement_code_p): Declare.
262 (STATEMENT_CODE_P): Define.
263 * lex.c (statement_code_p): Define.
264 (cxx_init): Use actual codes in stmt_codes initializer, not
265 cp_stmt_codes macro. Initialize statement_code_p directly, rather
266 than using INIT_STATEMENT_CODES.
268 2005-05-09 Mark Mitchell <mark@codesourcery.com>
270 * typeck.c (build_unary_op): Do not resort to address arithmetic
271 when taking the address of a COMPONENT_REF.
273 2005-05-08 Kazu Hirata <kazu@cs.umass.edu>
275 * class.c (vtbl_init_data_s): Change the type of fns to
277 (build_vtbl_initializer, add_vcall_offset, add_vcall_offset):
278 Use VEC instead of VARRAY.
280 2005-05-07 Richard Sandiford <rsandifo@redhat.com>
282 * mangle.c: Remove a reference to the MIPS -mint64 option.
284 2005-05-07 Kazu Hirata <kazu@cs.umass.edu>
286 * decl.c (wrapup_globals_for_namespace): Use VEC instead of
288 * name-lookup.c (add_decl_to_level, begin_scope): Likewise.
289 * name-lookup.h (cp_binding_level): Change the type of
290 static_decls to VEC(tree,gc)*.
292 * mangle.c (globals): Change the type of substitutions to
294 (dump_substitution_candidates, add_substitution,
295 find_substitution, finish_mangling, init_mangle): Use VEC
298 2005-05-06 Kazu Hirata <kazu@cs.umass.edu>
300 * decl2.c (spew_debug): Remove.
302 * decl2.c (ssdf_decls, start_static_storage_duration_function,
303 generate_ctor_or_dtor_function): Use VEC instead of VARRAY.
305 * decl2.c (pending_statics, note_vague_linkage_var,
306 cp_finish_file): Use VEC instead of VARRAY.
307 (pending_statics_used): Remove.
309 2005-05-05 Kazu Hirata <kazu@cs.umass.edu>
311 * decl2.c (deferred_fns, note_vague_linkage_fn,
312 cp_finish_file): Use VEC instead of VARRAY.
314 2005-05-05 Mark Mitchell <mark@codesourcery.com>
317 * pt.c (build_non_dependent_expr): Use is_overloaded_fn.
319 2005-05-05 Kazu Hirata <kazu@cs.umass.edu>
321 * pt.c: Fix a comment typo.
323 2005-05-04 Kazu Hirata <kazu@cs.umass.edu>
325 * cp-tree.h (language_function): Change the type of
326 x_local_names to VEC.
327 * decl.c (push_local_name): Adjust uses of local_names.
329 2005-05-03 Kazu Hirata <kazu@cs.umass.edu>
331 * friend.c, lex.c, mangle.c, repo.c: Update copyright.
333 2005-05-02 Kazu Hirata <kazu@cs.umass.edu>
335 * class.c (local_classes, init_class_processing): Use VEC
337 * cp-tree.h (local_classes): Likewise.
338 * mangle.c (discriminator_for_local_entity): Likewise.
339 * name-lookup.c (pushtag): Likewise.
341 * class.c (current_lang_depth, push_lang_context,
342 pop_lang_context): Use VEC instead of VARRAY.
343 * cp-tree.h (saved_scope): Use VEC for lang_base instead of
345 * name-lookup.c (push_to_top_level): Use VEC instead of
348 2005-05-02 Paolo Bonzini <bonzini@gnu.org>
350 * semantics.c (finish_call_expr): Call resolve_overloaded_builtin
351 for BUILT_IN_MD built-ins.
353 2005-05-02 Michael Matz <matz@suse.de>
356 * cp-tree.h (cp_tree_index): Remove CPTI_NULL, to be defined in C
359 * lex.c (cxx_init): Move null_node initialisation to C common frontend.
361 2005-04-25 Ian Lance Taylor <ian@airs.com>
363 * cp-tree.def: Add EXPR_STMT.
364 * cp-tree.h (cp_stmt_codes): Add EXPR_STMT.
365 (EXPR_STMT_EXPR): Define.
366 * cp-gimplify.c: Include "flags.h".
367 (gimplify_expr_stmt): New static function.
368 (cp_gimplify_expr): Handle EXPR_STMT.
369 * cxx-pretty-print.c (pp_cxx_statement): Use pp_cxx_expression
370 rather than pp_expression.
371 (pp_cxx_statement): Handle EXPR_STMT.
372 * dump.c (cp_dump_tree): Handle EXPR_STMT.
373 * lex.c (cxx_init): Don't use c_common_stmt_codes in stmt_codes
376 2005-04-25 Andrew Pinski <pinskia@physics.uc.edu>
379 * rtti.c (ifnonnull): Cast the zero comparison operand
382 2005-04-24 Jakub Jelinek <jakub@redhat.com>
385 * class.c: Include cgraph.h.
386 (cp_fold_obj_type_ref): Set node->local.vtable_method.
387 * Make-lang.in (cgraph.o): Depend on $(CGRAPH_H).
389 2005-04-12 Markus F.X.J. Oberhumer <markus@oberhumer.com>
391 * mangle.c (write_builtin_type): Handle integer types which are
392 not one of the shared integer type nodes and emit a "vendor
393 extended builtin type" with an encoding in the form of "u5int96".
395 2005-04-24 Ian Lance Taylor <ian@airs.com>
397 * cp-tree.def (USING_STMT): Change class to tcc_statement.
398 (TRY_BLOCK, EH_SPEC_BLOCK, HANDLER, CLEANUP_STMT): Likewise.
399 (IF_STMT, FOR_STMT, WHILE_STMT, DO_STMT): Likewise.
400 (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
402 2005-04-23 DJ Delorie <dj@redhat.com>
404 * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, friend.c,
405 init.c, lex.c, mangle.c, method.c, name-lookup.c, parser.c,
406 repo.c, rtti.c, tree.c, typeck.c, typeck2.c: Adjust warning()
409 2005-04-22 Per Bothner <per@bothner.com>
411 * decl.c (make_rtl_for_nonlocal_decl): Don't try get_fileinfo if
412 input_filename is NULL, as it is for (say) __PRETTY_FUNCTION__.
414 2005-04-22 Alexandre Oliva <aoliva@redhat.com>
417 * name-lookup.c (push_overloaded_decl): Do not overload with
418 non-duplicate anticipated built-in.
420 2005-04-21 Kazu Hirata <kazu@cs.umass.edu>
422 * cp-tree.h (THROW_NAME, AUTO_VTABLE_NAME, AUTO_TEMP_FORMAT,
423 VTABLE_BASE, VTABLE_NAME_PREFIX, STATIC_NAME_FORMAT): Remove.
425 2005-04-21 Nathan Sidwell <nathan@codesourcery.com>
427 * cp-tree.h: Adjust for new VEC API.
428 Define VEC(tree_pair_s,gc).
429 (struct save_scope): Adjust.
430 (struct lang_type_class): Adjust.
431 (unemitted_tinfo_decls): Adjust.
432 * class.c (add_method, resort_type_method_vec,
433 finish_struct_methods, struct find_final_overrider_data,
434 dfs_find_final_overrider_pre, find_final_overrider,
435 get_vcall_index, warn_hidden, walk_subobject_offsets,
436 check_methods, fixup_inline_methods, end_of_class,
437 warn_about_ambiguous_bases, finish_struct, build_vtbl_initializer,
438 add_vcall_offset): Adjust.
439 * decl.c (xref_basetypes, finish_method): Adjust.
440 * decl2.c (check_classfn): Adjust.
441 * init.c (sort_mem_initializers, push_base_cleanups): Adjust.
442 * method.c (do_build_copy_constructor): Adjust.
443 * name-lookup.c (new_class_binding, store_binding,
444 store_bindings, store_class_bindings): Adjust.
445 * name-lookup.h: Define VEC(cxx_saved_binding,gc),
446 VEC(cp_class_binding,gc).
447 (struct cp_binding_level): Adjust.
448 * parser.c: Define VEC(cp_token_position,heap).
449 (struct cp_lexer): Adjust.
450 (cp_lexer_new_main, cp_lexer_new_from_tokens, cp_lexer_destroy,
451 cp_lexer_save_tokens): Adjust.
452 * pt.c (retrieve_specialization,
453 check_explicit_specialization): Adjust.
454 * rtti.c (unemitted_tinfo_decls): Adjust.
455 (init_rtti_processing, get_tinfo_decl, get_pseudo_ti_init,
456 get_pseudo_ti_desc): Adjust.
457 * search.c (dfs_access_in_type, lookup_conversion_operator,
458 lookup_fnfields_1, dfs_walk_once, dfs_walk_once_accessible,
459 dfs_get_pure_virtuals, lookup_conversions_r, binfo_for_vbase): Adjust.
460 * semantics.c: Define VEC(deferred_access,gc).
461 (push_deferring_access_checks): Adjust.
462 * typeck2.c (abstract_virtuals_error): Adjust.
464 2005-04-20 Ian Lance Taylor <ian@airs.com>
466 * cp-tree.def: Add STMT_EXPR.
467 * cp-tree.h (STMT_EXPR_NO_SCOPE): Define.
468 (STMT_EXPR_STMT): Define.
469 * cxx-pretty-print.c (pp_cxx_primary_expression): Handle
471 (pp_cxx_expression): Likewise.
472 (pp_cxx_statement): Call pp_cxx_statement, not pp_statement.
473 * dump.c (cp_dump_tree): Handle STMT_EXPR.
475 2005-04-18 Kazu Hirata <kazu@cs.umass.edu>
477 * decl.c (expand_static_init): Call build2 and build3 instead
480 * cp-tree.h (VPTR_NAME, VPTR_NAME_P): Remove.
482 2005-04-17 Ian Lance Taylor <ian@airs.com>
484 * cp-tree.def: Add SIZEOF_EXPR, ARROW_EXPR and ALIGNOF_EXPR.
485 * cxx-pretty-print.c (pp_cxx_postfix_expression): Handle
487 (pp_cxx_unary_expression): Handle SIZEOF_EXPR and ALIGNOF_EXPR.
488 (pp_cxx_expression): Handle ARROW_EXPR, SIZEOF_EXPR, and
490 * typeck.c (cxx_sizeof_or_alignof_type): Update call to
491 c_sizeof_or_alignof_type for change in parameter type.
493 2005-04-16 Mark Mitchell <mark@codesourcery.com>
496 * typeck.c (cxx_sizeof_or_alignof_type): Check whether the type to
497 which sizeof/alignof is dependent, rather than just whether we are
498 processing_template_decl.
500 2005-04-17 Kazu Hirata <kazu@cs.umass.edu>
502 * cp-tree.h (LOOKUP_GLOBAL): Remove.
503 (LOOKUP_ONLYCONVERTING, DIRECT_BIND, LOOKUP_NO_CONVERSION,
504 LOOKUP_DESTRUCTOR, LOOKUP_NO_TEMP_BIND, LOOKUP_PREFER_TYPES,
505 LOOKUP_PREFER_NAMESPACES, LOOKUP_CONSTRUCTOR_CALLABLE): Adjust
508 2005-04-15 Richard Henderson <rth@redhat.com>
511 * semantics.c (finish_call_expr): Call resolve_overloaded_builtin.
513 2005-04-15 Kazu Hirata <kazu@cs.umass.edu>
515 * cp-tree.h (lang_type_class): Remove redefined. Move
516 java_interface into where redefined was. Increment the width
518 (TYPE_REDEFINED): Remove.
520 2005-04-14 Kazu Hirata <kazu@cs.umass.edu>
522 * cp-tree.h (SET_TMPL_ARG, ENUM_TI_TEMPLATE, ENUM_TI_ARGS,
523 CLASSTYPE_TEMPLATE_LEVEL): Remove.
525 2005-04-11 Mark Mitchell <mark@codesourcery.com>
527 * decl2.c (determine_visibility): Don't use export_class_data.
528 (import_export_decl): Honor TARGET_CXX_CLASS_DATA_ALWAYS_WEAK and
529 TARGET_CXX_DETERMINE_CLASS_DATA_VISIBILITY.
531 2005-04-09 Kazu Hirata <kazu@cs.umass.edu>
533 * cp-tree.h (cxx_alignof): Remove.
535 * cp-tree.h (DECL_ARRAY_DELETE_OPERATOR_P): Remove.
537 * cp-tree.h (EXCEPTION_CLEANUP_NAME, B_SET, B_CLR, B_TST,
538 CONV_STATIC_CAST): Remove.
540 * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Remove.
542 * cp-tree.h (VF_BINFO_VALUE, VF_BASETYPE_VALUE): Remove.
544 * cp-tree.h (cp_deprecated): Remove.
546 2005-04-08 Ian Lance Taylor <ian@airs.com>
548 * cp-tree.def: Define FOR_STMT, WHILE_STMT, DO_STMT, BREAK_STMT,
549 CONTINUE_STMT, SWITCH_STMT.
550 * cp-tree.h (cp_stmt_codes): Add FOR_STMT, WHILE_STMT, DO_STMT,
551 BREAK_STMT, CONTINUE_STMT, SWITCH_STMT.
552 (WHILE_COND, WHILE_BODY): Define.
553 (DO_COND, DO_BODY): Define.
554 (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY): Define.
555 (SWITCH_STMT_COND, SWITCH_STMT_BODY, SWITCH_STMT_TYPE): Define.
556 * cp-gimplify.c (enum bc_t): Define.
557 (struct cp_gimplify_ctx, ctxp): Define.
558 (push_context, pop_context): New static functions.
559 (begin_bc_block, finish_bc_block): New static functions.
560 (build_bc_goto): New static function.
561 (gimplify_cp_loop, gimplify_for_stmt): New static functions.
562 (gimplify_while_stmt, gimplify_do_stmt): Likewise.
563 (gimplify_switch_stmt): Likewise.
564 (cp_gimplify_expr): Handle FOR_STMT, WHILE_STMT, DO_STMT,
565 SWITCH_STMT, CONTINUE_STMT, BREAK_STMT.
566 (cp_genericize): Call push_context and pop_context.
567 * semantics.c (finish_break_stmt): Just call build_stmt
568 (BREAK_STMT) rather than build_break_stmt.
569 (finish_continue_stmt): Corresponding change.
570 * decl.c (pop_switch): Update call to c_do_switch_warnings for new
572 * cxx-pretty-print.c (pp_cxx_statement): Handle SWITCH_STMT,
573 WHILE_STMT, DO_STMT, FOR_STMT, BREAK_STMT, CONTINUE_STMT.
574 * dump.c (cp_dump_tree): Likewise.
576 2005-04-08 Mark Mitchell <mark@codesourcery.com>
579 * parser.c (cp_parser_type_specifier_seq): Add is_condition
581 (cp_parser_new_type_id): Pass it.
582 (cp_parser_condition): Likewise.
583 (cp_parser_conversion_type_id): Likewise.
584 (cp_parser_type_id): Likewise.
585 (cp_parser_type_specifier_seq): In a condition, do not allow
586 invalid type-specifier combinations.
587 (cp_parser_exception_declaration): Adjust call to
588 cp_parser_type_specifier_seq.
590 * cp-tree.def (TINST_LEVEL): Document TINST_IN_SYSTEM_HEADER_P.
591 * cp-tree.h (struct tinst_level): Add in_system_header_p.
592 (TINST_IN_SYSTEM_HEADER_P): New macro.
593 (make_tinst_level): Remove.
594 * pt.c (lookup_template_class): Preserve DECL_IN_SYSTEM_HEADER on
595 the instantiated class.
596 (push_tinst_level): Do not use make_tinst_level. Set
597 TINST_IN_SYSTEM_HEADER_P.
598 (pop_tinst_level): Likewise.
599 (instantiate_class_template): Set in_system_header.
600 (instantiate_pending_templates): Likewise.
601 * tree.c (make_tinst_level): Remove.
603 2005-04-06 Joseph S. Myers <joseph@codesourcery.com>
605 * decl.c (start_decl): Apply pending #pragma weak regardless of
608 2005-04-06 Mark Mitchell <mark@codesourcery.com>
611 * pt.c (regenerate_decl_from_template): Copy attributes for
612 parameters from the pattern to the instantiation.
614 2005-04-05 Mark Mitchell <mark@codesourcery.com>
617 * cp-tree.def (OFFSET_REF): Correct comments.
618 * init.c (build_offset_ref): Remove misleading comment.
619 * typeck.c (build_unary_op): Handle pointer-to-member creation
620 here, rather than ...
621 (unary_complex_lvalue): ... here.
623 2005-04-06 Jason Merrill <jason@redhat.com>
626 * tree.c (stabilize_init): Don't bother trying to stabilize
627 something with no side-effects.
629 2005-04-05 Mark Mitchell <mark@codesourcery.com>
632 * decl.c (grokdeclarator): Correct attribute handling.
634 2005-04-05 Mark Mitchell <mark@codesourcery.com>
637 * decl2.c (import_export_decl): Use non-COMDAT external linkage
638 for virtual tables, typeinfo, etc. that will be emitted in only
639 one translation unit on systems without weak symbols.
641 2005-04-04 Mark Mitchell <mark@codesourcery.com>
644 * parser.c (cp_parser_template_name): Fix thinko.
646 2005-04-04 Nathan Sidwell <nathan@codesourcery.com>
649 * method.c (use_thunk): Protect covariant pointer return
650 adjustments from NULL pointers.
652 2005-04-04 Jan Hubicka <jh@suse.cz>
654 * decl2.c (finish_objects): Revert my previous patch.
655 (cp_finish_file): Likewise.
657 2005-04-03 Kazu Hirata <kazu@cs.umass.edu>
659 * pt.c: Fix comment typos.
661 2005-04-03 Nathan Sidwell <nathan@codesourcery.com>
664 * pt.c (more_specialized_fn): Member functions are unordered wrt
665 non-members. Conversion operators are unordered wrt other
668 2005-04-01 Nathan Sidwell <nathan@codesourcery.com>
670 * call.c (add_template_candidates_real): Remove length parameter
671 from fn_type_unification call.
672 * class.c (resolve_address_of_overloaded_function): Likewise
673 * cp-tree.h (fn_type_unification): Remove length parameter.
674 * pt.c (get_bindings_overload): Remove.
675 (get_bindings_real): Rename to ...
676 (get_bindings): ... here. Remove length and strict
677 parameters. Change return type flag to boolean. Remove original
679 (determine_specialization): Adjust get_bindings call.
680 (fn_type_unification): Remove length parameter. Adjust.
681 (type_unification_real): Remove length parameter. Adjust.
682 (resolve_overloaded_unification): Adjust get_bindings call.
683 (try_one_overload): Simplify confusing cascaded if control flow.
684 (unify): Remove length paramter from type_unification_real call.
685 (most_specialized_instantiation): Adjust get_bindings calls.
686 (most_specialized): Likewise.
688 2005-03-31 Nathan Sidwell <nathan@codesourcery.com>
690 PR c++/19203, implement DR 214
691 * call.c (joust): Use more_specialized_fn.
692 * cp-tree.h (DEDUCE_ORDER): Remove.
693 (more_specialized): Replace with ...
694 (more_specialized_fn): ... this.
695 * pt.c (maybe_adjust_types_for_deduction): Remove DEDUCE_ORDER
697 (type_unification_real): Remove DEDUCE_ORDER case.
698 (more_specialized): Replace with ...
699 (more_specialized_fn): ... this. Implement DR 214.
700 (most_specialized_instantiation): Use get_bindings_real directly.
702 2005-03-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
705 * call.c (build_new_op): Remove check for -Wsynth.
707 2005-03-31 Jan Hubicka <jh@suse.cz>
709 * decl2.c (finish_objects): Mark ctor as needed.
710 (cp_finish_file): Output variables only in nonunit-at-a-time.
712 2005-03-29 Richard Henderson <rth@redhat.com>
715 * decl.c (cp_complete_array_type): Rename from complete_array_type.
716 Use the new complete_array_type in c-common.c. Update all callers.
717 * cp-tree.h (cp_complete_array_type): Update to match.
719 2005-03-24 Geoffrey Keating <geoffk@apple.com>
721 * typeck.c (build_static_cast_1): Allow scalar_cast between
722 any integral, floating, or enumeration type.
724 2005-03-24 Steven Bosscher <stevenb@suse.de>
726 * typeck.c (comptypes): First determine if the types are compatible
727 from a target-independent point of view. Check target attributes
730 * class.c (build_base_path):
731 (build_vbase_offset_vtbl_entries):
732 (add_vcall_offset): Replace fold (buildN (...)) with fold_buildN.
733 * error.c (dump_expr): Likewise.
734 * init.c (build_zero_init, expand_cleanup_for_base,
735 build_vec_delete_1): Likewise.
736 * mangle.c (write_integer_cst): Likewise.
737 * method.c (thunk_adjust): Likewise.
738 * pt.c (convert_nontype_argument, tsubst, unify): Likewise.
739 * tree.c (cxx_print_statistics, array_type_nelts_total): Likewise.
740 * typeck.c (build_ptrmemfunc_access_expr,
741 (get_member_function_from_ptrfunc): Likewise.
743 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
745 * cp-objcp-common.h (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
747 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
749 * cp-tree.h (perform_integral_promotions): Remove.
750 (default_conversion): Add.
752 2005-03-22 Mark Mitchell <mark@codesourcery.com>
754 * parser.c (cp_parser_warn_min_max): New function.
755 (cp_parser_binary_expression): Use it.
756 (cp_parser_assignment_operator_opt): Likewise.
757 (cp_parser_operator): Likewise.
759 2005-03-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
762 * decl.c (start_preparsed_function): Robustify.
764 2005-03-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
767 * parser.c (cp_parser_class_head): Return NULL_TREE when
768 encountering a redefinition.
770 2005-03-22 Nathan Sidwell <nathan@codesourcery.com>
774 * typeck.c (build_ptrmemfunc): Allow OFFSET_REF when processing a
777 2005-03-21 Paolo Carlini <pcarlini@suse.de>
781 * init.c (emit_mem_initializers): Don't crash on undefined
784 2005-03-21 Paolo Carlini <pcarlini@suse.de>
787 * semantics.c (finish_stmt_expr_expr): Return immediately
788 if error_operand_p (expr).
790 2005-03-21 Joseph S. Myers <joseph@codesourcery.com>
792 * cp-tree.h (lvalue_or_else, lvalue_p): New.
793 * typeck.c (lvalue_or_else): New. Call lvalue_error.
795 2005-03-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
798 * decl.c (decls_match): Compare context of VAR_DECL.
800 2005-03-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
803 * parser.c (cp_parser_postfix_expression) <case RID_TYPENAME>:
804 Check the return value of cp_parser_nested_name_specifier.
806 2005-03-18 Dale Johannesen <dalej@apple.com>
808 * cp/tree.c (cp_tree_equal): Handle SSA_NAME.
810 2005-03-18 Paolo Carlini <pcarlini@suse.de>
813 * parser.c (cp_parser_diagnose_invalid_type_name):
814 Check TYPE_BINFO (current_class_type) before attempting
815 to emit inform messages.
817 2005-03-17 Paolo Carlini <pcarlini@suse.de>
820 * cp-tree.h (grok_op_properties): Change return type to void.
821 * decl.c (grok_op_properties): Return early - don't check the
822 arity - in case of a static member or an operator that cannot
823 be non-member; tidy a bit.
825 2005-03-17 Nathan Sidwell <nathan@codesourcery.com>
828 * pt.c (contains_dependent_cast_p): Remove.
829 (fold_non_dependent_expr): Don't use it.
830 (value_dependent_expression_p): Use a switch statement.
831 reference_exprs can be dependent.
833 2005-03-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
837 * name-lookup.c (pushtag): Skip template parameter scope when
838 scope is ts_global. Don't push tag into template parameter
840 * pt.c (instantiate_class_template): Reorder friend class
841 template substitution to handle non-dependent friend class
842 that hasn't been previously declared.
844 2005-03-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
846 Friend class name lookup 5/n
848 * cp-tree.h (pushtag): Adjust declaration.
849 * decl.c (lookup_and_check_tag): Call lookup_type_scope if
851 (xref_tag): Adjust call to pushtag. Make hidden class visible.
852 (start_enum): Adjust call to pushtag.
853 * name-lookup.c (ambiguous_decl): Ignore hidden names.
854 (qualify_lookup): Change return type to bool.
855 (hidden_name_p): New function.
856 (lookup_namespace_name, unqualified_namespace_lookup,
857 lookup_name_real): Use it.
858 (lookup_type_scope): Update comments.
859 (maybe_process_template_type_declaration): Change parameter name
860 from globalize to is_friend.
861 (pushtag): Change globalize parameter of type int to tag_scope.
862 Hide name if introduced by friend declaration.
863 * name-lookup.h (hidden_name_p): Add declaration.
864 * parser.c (cp_parser_lookup_name): Don't deal with hidden name
866 * pt.c (push_template_decl_real): Make hidden class template
868 (lookup_template_class, instantiate_class_template): Adjust call
870 * semantics.c (begin_class_definition): Likewise.
871 * rtti.c (init_rtti_processing, build_dynamic_cast_1,
872 tinfo_base_init, emit_support_tinfos): Use ts_current instead of
875 2005-03-13 Mark Mitchell <mark@codesourcery.com>
878 * pt.c (determine_specialization): Reject non-specializations.
880 2005-03-11 Per Bothner <per@bothner.com>
882 * cp-tree.h (struct cp_declarator): New id_loc field.
883 * cp/parser.c (cp_lexer_get_preprocessor_token): Set cp_token's
884 location using c_lex_with_flags, instead of input_location.
885 (cp_parser_direct_declarator): Set declarator's id_loc from
888 2005-03-10 Jakub Jelinek <jakub@redhat.com>
890 PR c++/18384, c++/18327
891 * decl.c (reshape_init_array): Use UHWI type for max_index_cst
892 and index. Convert max_index to size_type_node if it isn't
895 2005-03-09 Mark Mitchell <mark@codesourcery.com>
898 * pt.c (tsubst_decl): Apply array-to-pointer and
899 function-to-pointer conversions to function arguments.
900 (regenerate_decl_from_template): Likewise.
902 2005-03-09 Paolo Carlini <pcarlini@suse.de>
905 * decl.c (complete_array_type): In pedantic mode, return
906 3 for an empty initializer list as the initializer for an
907 array of unknown bound (8.5.1/4).
908 (maybe_deduce_size_from_array_init): Fix final test to use
911 2005-03-08 Nathan Sidwell <nathan@codesourcery.com>
914 * pt.c (contains_dependent_cast_p): New.
915 (fold_non_dependent_expr): Call it.
917 2005-03-08 Mark Mitchell <mark@codesourcery.com>
920 * cp-tree.h (target_type): Remove.
921 * decl.c (layout_var_decl): Remove #if 0'd code.
922 (cp_finish_decl): Remove dead code.
923 * init.c (build_vec_init): When determining whether or not the
924 element type has an asignment operator, look through all array
926 * typeck.c (target_type): Remove.
928 2005-03-07 Mark Mitchell <mark@codesourcery.com>
930 * class.c (finish_struct_1): Do not warn about non-virtual
931 destructors in Java classes.
933 2005-03-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
936 * init.c (build_offset_ref): Don't build non-dependent SCOPE_REF.
937 * pt.c (build_non_dependent_expr): Don't build NON_DEPENDENT_EXPR
939 * typeck.c (build_x_unary_op): Don't build non-dependent SCOPE_REF.
940 Also set PTRMEM_OK_P for NON_DEPENDENT_EXPR.
941 (build_unary_op): Handle building ADDR_EXPR of OFFSET_REF inside
944 2005-03-02 Alexandre Oliva <aoliva@redhat.com>
946 * name-lookup.c (push_overloaded_decl): Don't error if the new
947 decl matches the old one.
948 * decl.c (redeclaration_error_message): Likewise.
950 2005-03-01 Per Bothner <per@bothner.com>
952 * decl.c (finish_function): Use SET_EXPR_LOCATION instead of
953 unavailable annotate_with_file_line, if USE_MAPPED_LOCATION.
955 2005-03-01 Nathan Sidwell <nathan@codesourcery.com>
958 * class.c (update_vtable_entry_for_fn): Don't crash on invalid
961 * cp-tree.g (THUNK_TARGET): Expand comment.
962 * method.c (use_thunk): Make sure we also use the target, if that
965 2005-02-27 Jakub Jelinek <jakub@redhat.com>
968 * decl.c (cxx_comdat_group): Put thunks for
969 TARGET_USE_LOCAL_THUNK_ALIAS_P (function) functions into the same
970 comdat group as the thunk target.
972 2005-02-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
974 * call.c, class.c, cp-tree.h, decl2.c, error.c, init.c, mangle.c,
975 parser.c: Fix comment typo(s).
977 2005-02-24 Jakub Jelinek <jakub@redhat.com>
980 * decl.c (reshape_init): Don't warn about missing braces if STRING_CST
981 initializes a char/wchar_t array.
983 2005-02-23 Mark Mitchell <mark@codesourcery.com>
986 * decl.c (grokvardecl): Set DECL_INTERFACE_KNOWN for declarations
987 with internal linkage.
989 2005-02-23 Alexandre Oliva <aoliva@redhat.com>
991 * decl.c (grokvardecl): Don't exempt anonymous types from having
992 linkage for variables that have linkage other than "C".
994 2005-02-23 Kazu Hirata <kazu@cs.umass.edu>
996 * cp-objcp-common.h, error.c: Update copyright.
998 2005-02-22 Mark Mitchell <mark@codesourcery.com>
1001 * decl.c (start_decl_1): Don't clear TREE_READONLY.
1002 (cp_finish_decl): Likewise.
1003 (complete_vars): Call cp_apply_type_quals_to_decl.
1004 * typeck.c (cp_apply_type_quals): Avoid setting TREE_READONLY in
1005 cases where that's not valid.
1008 * init.c (integral_constant_value): Iterate if the value of a decl
1009 is itself a constant.
1012 * parser.c (cp_parser_class_head): Check for redefintions here.
1013 * semantics.c (begin_class_definition): Not here.
1016 * decl2.c (build_anon_union_vars): Add type parameter.
1017 (finish_anon_union): Pass it.
1020 * error.c (dump_expr): Do not print the body of a BIND_EXPR.
1021 Handle STATEMENT_LIST.
1024 * parser.c (cp_parser_direct_declarator): Always complain about
1025 non-constant array bounds when in a function scope.
1026 * semantics.c (finish_id_expression): Do not mark dependent names
1029 2005-02-21 Douglas Gregor <dgregor@cs.indiana.edu>
1033 * cp-tree.h (cp_apply_type_quals_to_decl): Declared.
1034 * decl.c (grokdeclarator): Pedwarn about qualifying a function
1036 Add qualifiers when declaring a typedef of a function type.
1037 Member function pointers pick up the qualifiers of the typedef
1038 used to declare them.
1039 Don't complain about creating cv-qualified function types.
1040 Complain about qualified function typedefs that are used to
1041 declare non-static member functions or free functions.
1042 Use cp_apply_type_quals_to_decl.
1043 (start_preparsed_function): Use cp_apply_type_quals_to_decl.
1044 (grokclassfn): Use cp_apply_type_quals_to_decl.
1045 * error.c (dump_type_suffix): Print qualifiers for function
1047 * pt.c (tsubst_decl): Use cp_apply_type_quals_to_decl.
1048 (tsubst): When substituting a function type into a member
1049 pointer type, pass along the qualifiers.
1050 (unify): Unify member pointers to member function pointers.
1051 * tree.c (cp_build_qualified_type_real): Function types may be
1052 qualified. This includes restrict qualifiers.
1053 * typeck.c (cp_apply_type_quals_to_decl): New function to replace
1054 use of c_apply_type_quals_to_decl. Drops qualifiers that are being
1055 added to function types.
1057 2005-02-20 Zack Weinberg <zack@codesourcery.com>
1060 * cp-objcp-common.h (LANG_HOOKS_TO_TARGET_CHARSET): Set to
1061 c_common_to_target_charset. Delete bogus comment.
1063 2005-02-18 Richard Henderson <rth@redhat.com>
1066 * except.c (do_get_exception_ptr): New.
1067 (expand_start_catch_block): Use it.
1069 2005-02-19 Jakub Jelinek <jakub@redhat.com>
1071 * decl.c (start_decl_1): Only check TYPE_NEEDS_CONSTRUCTING
1072 if type is not error_mark_node.
1074 2005-01-20 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1077 * decl2.c (grokfield): Do not apply attributes to template parameters
1078 as they are ignored by tsubst anyway.
1080 2005-02-18 Jakub Jelinek <jakub@redhat.com>
1083 * decl.c (start_decl_1): Clear TREE_READONLY flag if
1084 its type has TYPE_NEEDS_CONSTRUCTING.
1085 (complete_vars): Likewise.
1087 2005-02-17 Alexandre Oliva <aoliva@redhat.com>
1090 * class.c (finish_struct): Initialize TYPE_SIZE_UNIT of a
1091 template along with TYPE_SIZE.
1094 * semantics.c (perform_deferred_access_checks): Use
1095 get_deferred_access_checks to get the top of the stack.
1097 2005-02-15 Alexandre Oliva <aoliva@redhat.com>
1100 * class.c (add_implicitly_declared_members, check_field_decl)
1101 (check_field_decls, check_bases): Remove arguments, tests and
1102 assignments of cant_have_default_ctor-related variables.
1104 2005-02-15 Alexandre Oliva <aoliva@redhat.com>
1106 * decl2.c (mark_used): Set the source location of the used decl to
1107 the current input location here...
1108 * method.c (synthesize_method): ... not here. Set input_location
1109 from the decl instead.
1111 2005-02-14 Nathan Sidwell <nathan@codesourcery.com>
1114 * parser.c (cp_parser_late_parsing_for_member): Use
1115 current_function_decl as scope to push to and from.
1118 * pt.c (check_explicit_specialization): Make sure namespace
1119 binding lookup found an overloaded function.
1120 (lookup_template_function): Just assert FNS is an overloaded
1124 * decl.c (grokdeclarator): Check for error mark node in ptrmem
1127 2005-02-14 Alexandre Oliva <aoliva@redhat.com>
1130 * decl.c (redeclaration_error_message): Report redefinition of
1131 pure virtual function.
1133 2005-02-14 Nathan Sidwell <nathan@codesourcery.com>
1136 * class.c (build_simple_base_path): Build the component_ref
1138 (update_vtable_entry_for_fn): Walk the covariant's binfo chain
1139 rather than using lookup_base.
1140 * search.c (dfs_walk_once): Add non-recursive assert check.
1141 * typeck.c (build_class_member_access_expr): It is possible for
1142 the member type to be both const and volatile.
1144 2005-02-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1148 * pt.c (maybe_check_template_type): Remove.
1149 * cp-tree.h (maybe_check_template_type): Remove prototype.
1150 * name-lookup.c (maybe_process_template_type_declaration): Don't
1151 use maybe_check_template_type.
1153 2005-02-11 Richard Henderson <rth@redhat.com>
1156 * pt.c (get_mostly_instantiated_function_type): Save and restore
1157 flag_access_control instead of push/pop_access_scope.
1159 2005-02-10 Mark Mitchell <mark@codesourcery.com>
1162 * decl.c (reshape_init): Issue warnings about missing braces.
1164 2005-02-11 Kazu Hirata <kazu@cs.umass.edu>
1166 * cp-tree.def, except.c, ptree.c: Update copyright.
1168 2005-02-09 Mark Mitchell <mark@codesourcery.com>
1171 * call.c (build_op_delete_call): Check COMPLETE_TYPE_P before
1172 attempting name lookup.
1174 * parser.c (cp_parser_unqualified_id): Initialize type_decl.
1177 * call.c (initialize_reference): Robustify.
1180 * decl.c (grokdeclarator): Check for invalid use of destructor
1184 * parser.c (cp_parser_unqualified_id): Avoid creating destructor
1185 names with invalid types.
1188 * parser.c (cp_parser_direct_declarator): Allow type-dependent
1189 expressions as array bounds.
1192 * parser.c (cp_parser_attributes_list): Allow empty lists.
1194 2005-02-08 Mark Mitchell <mark@codesourcery.com>
1197 * class.c (add_method): Don't set TYPE_HAS_DESTRUCTOR.
1198 (check_bases): Give warnings about a base class with a
1199 non-virtual destructor, even if it is implicit.
1200 (finish_struct_bits): Don't copy TYPE_HAS_DESTRUCTOR.
1201 (maybe_warn_about_overly_private_class): Don't use
1202 TYPE_HAS_DESTRUCTOR.
1203 (finish_struct_methods): Don't set TYPE_HAS_DESTRUCTOR.
1204 (check_for_override): Give it external linkage.
1205 (add_implicitly_declared_members): Generate destructors lazily.
1206 (check_field_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not
1207 TYPE_HAS_DESTRUCTOR.
1208 (check_bases_and_members): Call check_methods before
1210 (check_bases_and_members): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not
1211 TYPE_HAS_DESTRUCTOR.
1212 (finish_struct_1): Do not use TYPE_HAS_DESTRUCTOR.
1213 * cp-tree.def (PSEUDO_DTOR_EXPR): Document.
1214 * cp-tree.h (TYPE_HAS_DESTRUCTOR): Remove.
1215 (lang_type_class): Add lazy_destructor.
1216 (CLASSTYPE_LAZY_DESTRUCTOR): New macro.
1217 (CLASSTYPE_DESTRUCTORS): Robustify.
1218 (TYPE_HAS_DESTRUCTOR): Remove.
1219 (check_for_override): Declare.
1220 (build_vbase_delete): Remove.
1221 * cvt.c (convert_to_void): Issue errors about pseudo-destructor
1223 * decl.c (cxx_maybe_build_cleanup): Remove dead code.
1224 * except.c (dtor_nothrow): Lazily create destructors if necessary.
1225 (build_throw): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
1226 * init.c (build_delete): Lazily create destructors, if necessary.
1227 (build_vbase_delete): Remove.
1228 * method.c (locate_dtor): Simplify.
1229 (implicitly_declare_fn): Add support for destructors.
1230 * parser.c (cp_parser_lookup_name): Lazily create destructors, if
1232 * pt.c (check_explicit_specialization): Don't use
1233 TYPE_HAS_DESTRUCTOR.
1234 (instantiate_class_template): Likewise.
1235 * ptree.c (cxx_print_type): Don't print TYPE_HAS_DESTRUCTOR.
1236 * rtti.c (emit_support_tinfos): Robustify.
1237 * search.c (lookup_fnfields_1): Lazily create destructors.
1238 * typeck.c (build_class_member_access_expr): Remove
1239 PSEUDO_DTOR_EXPR handling.
1240 (lookup_destructor): Likewise.
1242 2005-02-08 Kazu Hirata <kazu@cs.umass.edu>
1244 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h: Update
1247 2005-02-07 Mark Mitchell <mark@codesourcery.com>
1249 * parser.c (cp_lexer_start_debugging): Avoid arithmetic operations
1250 on boolean variables.
1251 (cp_lexer_stop_debugging): Likewise.
1253 2005-02-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1256 * parser.c (cp_parser_pure_specifier): Emit a specific error
1257 message with an invalid pure specifier.
1258 * decl2.c (grok_function_init): Remove.
1259 (grokfield): An initializer for a method is a always a pure
1262 2005-02-02 Matt Austern <austern@apple.com>
1265 * cp-tree.h (builtin_valid_in_constant_expr_p): Declare.
1266 * parser.c (cp_parser_postfix_expression): Accept function call in
1267 constant expression if builtin_valid_in_constant_expr_p is true
1269 * pt.c (value_dependent_expression_p): Handle CALL_EXPRs properly.
1270 * semantics.c (finish_id_expression): Accept function call in constant
1271 expression if builtin_valid_in_constant_expr_p is true for that
1273 * tree.c (builtin_valid_in_constant_expr_p): New.
1275 2005-02-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1278 * pt.c (check_instantiated_args): Improve error message.
1279 Fix logic when to print its second part.
1281 2005-02-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1283 * cp-tree.h (complete_type_or_else): Remove macro.
1284 (complete_type_or_diagnostic): Rename to complete_type_or_else
1285 and remove last argument.
1286 * typeck.c (complete_type_or_diagnostic): Rename to
1287 complete_type_or_else and remove last argument.
1289 2005-02-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1291 * cp-tree.h (commonparms): Remove prototype.
1292 (convert_arguments): Likewise.
1293 (PFN_FROM_PTRMEMFUNC): Remove.
1294 * typeck.c (commonparms): Make static.
1295 (convert_arguments): Add prototype. Make static.
1296 (PFN_FROM_PTRMEMFUNC): Replace by pfn_from_ptrmemfunc.
1298 2005-01-31 Mark Mitchell <mark@codesourcery.com>
1300 * parser.c (cp_parser_primary_expression): Don't complain about
1301 floating-point literals in integral constant expressions when
1304 2005-02-01 Alexandre Oliva <aoliva@redhat.com>
1306 * parser.c (cp_parser_template_id): Revert comment patch too.
1311 * parser.c (cp_parser_template_id): Revert 2004-12-09's patch.
1312 Issue an error when creating the template id.
1313 * pt.c (fn_type_unification): Return early if the explicit
1314 template arg list is an error_mark_node.
1316 2005-01-31 Mark Mitchell <mark@codesourcery.com>
1318 * decl.c (build_enumerator): Do not issue duplicate error messages
1319 about invalid enumeration constants.
1320 * parser.c (cp_parser_non_integral_constant_expression): Always
1321 set parser->non_integral_constant_expression_p.
1322 (cp_parser_primary_expression): Add cast_p parameter. Issue
1323 errors about invalid uses of floating-point literals in
1325 (cp_parser_postfix_expression): Add cast_p parameter.
1326 (cp_parser_open_square_expression): Pass it.
1327 (cp_parser_parenthesized_expression_list): Add cast_p parameter.
1328 (cp_parser_unary_expression): Likewise.
1329 (cp_parser_new_placement): Pass it.
1330 (cp_parser_direct_new_declarator): Likewise.
1331 (cp_parser_new_initializer): Likewise.
1332 (cp_parser_cast_expression): Add cast_p parameter.
1333 (cp_parser_binary_expression): Likewise.
1334 (cp_parser_question_colon_clause): Likewise.
1335 (cp_parser_assignment_expression): Likewise.
1336 (cp_parser_expression): Likewise.
1337 (cp_parser_constant_expression): If an integral constant
1338 expression is invalid, return error_mark_node.
1339 (cp_parser_expression_statement): Pass cast_p.
1340 (cp_parser_condition): Likewise.
1341 (cp_parser_iteration_statement): Likewise.
1342 (cp_parser_jump_statement): Likewise.
1343 (cp_parser_mem_initializer): Likewise.
1344 (cp_parser_template_argument): Likewise.
1345 (cp_parser_parameter_declaration): Likewise.
1346 (cp_parser_initializer): Likewise.
1347 (cp_parser_throw_expression): Likewise.
1348 (cp_parser_attribute_list): Likewise.
1349 (cp_parser_simple_cast_expression): Likewise.
1350 (cp_parser_functional_cast): Likewise.
1351 (cp_parser_late_parsing_default_args): Likewise.
1352 (cp_parser_sizeof_operand): Save/restore
1353 non_integral_constant_expression_p.
1355 2005-01-31 Mike Stump <mrs@apple.com>
1357 * parser.c (cp_lexer_new_main): Get the first token, first, before
1360 2005-01-31 Mark Mitchell <mark@codesourcery.com>
1362 * decl.c (start_decl): Add missing parentheses.
1364 2005-01-30 Mark Mitchell <mark@codesourcery.com>
1367 * cp-tree.h (DECL_USE_TEMPLATE): Expand documentation.
1368 * decl.c (duplicate_decls): Do not discard
1369 DECL_IMPLICIT_INSTANTIATION when merging declarations.
1370 (start_decl): Do not SET_DECL_TEMPLATE_SPECIALIZATION for
1371 variables that do not have DECL_USE_TEMPLATE.
1374 * decl.c (grokdeclarator): Refactor code so that qualified names
1375 are never allowed as the declarator in a typedef.
1378 * name-lookup.c (do_nonmember_using_decl): Avoid overloading
1379 builtin declarations.
1382 * call.c (convert_like_real): Inline call to
1383 dubious_conversion_warnings here.
1384 * cp-tree.h (dubious_conversion_warnings): Remove.
1385 * semantics.c (finish_unary_op_expr): Copy INTEGER_CSTs before
1386 setting TREE_NEGATED_INT.
1387 * typeck.c (dubious_conversion_warnings): Remove.
1390 * name-lookup.c (pushdecl_namespace_level): Avoid accessing free'd
1393 2005-01-28 Mark Mitchell <mark@codesourcery.com>
1396 * parser.c (cp_parser_diagnose_invalid_type_name): Commit to
1400 * pt.c (redeclare_class_template): Robustify.
1402 2005-01-27 Steven Bosscher <stevenb@suse.de>
1404 * decl.c (finish_case_label): Use SWITCH_STMT accessor macros
1405 instead of SWITCH_EXPR ones.
1406 * pt.c (tsubst_expr): Likewise.
1407 * semantics.c (begin_switch_stmt, finish_switch_cond,
1408 finish_switch_stmt): Likewise.
1410 2005-01-26 J"orn Rennecke <joern.rennecke@st.com>
1413 * parser.c (cp_parser_initializer_clause): Initialize *non_constant_p.
1415 2005-01-25 Andrew Pinski <pinskia@physics.uc.edu>
1417 * class.c (abort_fndecl_addr): New variable.
1418 (build_vtbl_initializer): If we have a pure virtual function
1419 share the abort function's address.
1420 Include gt-cp-class.h at the end.
1421 * config-lang.in (gtfiles): Add cp/class.c.
1423 2005-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1425 * cxx-pretty-print.c (pp_cxx_statement): Add prototype. Make static.
1426 (pp_cxx_function_definition): Make static.
1427 * cxx-pretty-print.h (pp_cxx_statement): Remove prototype.
1428 (pp_cxx_function_definition): Likewise.
1430 2005-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1432 * name-lookup.c (print_binding_level): Make static.
1433 (constructor_name_full): Make static inline.
1434 (current_decl_namespace): Make static.
1435 * name-lookup.h (constructor_name_full): Remove prototype.
1436 (print_binding_level): Likewise.
1437 (current_decl_namespace): Likewise.
1439 2005-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1441 * decl.h (debug_bindings_indentation): Remove.
1443 2005-01-23 Kazu Hirata <kazu@cs.umass.edu>
1445 * typeck.c: Fix a comment typo.
1447 2005-01-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1450 * pt.c (fold_decl_constant_value): Always call fold_non_dependent_expr
1452 (tsubst): Use fold_decl_constant_value in place of a bare call to
1453 integral_constant_value.
1455 2005-01-20 Kazu Hirata <kazu@cs.umass.edu>
1457 * typeck.c (more_qualified_p): Remove.
1458 * cp-tree.h: Remove the corresponding prototype.
1460 2005-01-19 Matt Austern <austern@apple.com>
1462 * typeck.c (comptypes): Handle return code from objc_comptypes
1465 2005-01-19 Kazu Hirata <kazu@cs.umass.edu>
1467 * cp-tree.h, name-lookup.h: Remove unused prototypes.
1469 2005-01-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1472 * semantics.c (finish_id_expression): Disable access checking for
1473 already lookuped FIELD_DECL.
1475 2005-01-18 Kazu Hirata <kazu@cs.umass.edu>
1477 * decl.c (delete_block): Remove.
1478 * cp-tree.h: Remove the corresponding prototype.
1480 * decl.c (vtable_decl_p, vtype_decl_p, walk_globals_data,
1481 walk_vtables_r, walk_vtables, walk_globals_r, walk_globals):
1483 * cp-tree.h: Remove the corresponding prototypes.
1485 * tree.c (count_functions, bound_pmf_p, cp_is_overload_p,
1486 cp_update_decl_after_saving, name_p): Remove.
1487 * cp-tree.h: Remove the corresponding prototypes.
1489 2005-01-18 Andrew Pinski <pinskia@physics.uc.edu>
1492 * semantics.c (finish_asm_stmt): Strip nops off
1493 input memory operands.
1495 2005-01-18 Kazu Hirata <kazu@cs.umass.edu>
1497 * Make-lang.in, call.c, cvt.c, init.c, rtti.c, tree.c,
1498 typeck2.c: Update copyright.
1500 2005-01-16 Kazu Hirata <kazu@cs.umass.edu>
1502 * class.c (get_enclosing_class): Remove.
1503 * cp-tree.h: Remove the corresponding prototypes.
1505 * cvt.c (convert_lvalue): Remove.
1506 * cp-tree.h: Remove the corresponding prototype.
1508 * pt.c (tinst_for_decl): Remove.
1509 * cp-tree.h: Remove the corresponding prototypes.
1511 * tree.c (hash_chainon): Remove.
1512 * cp-tree.h: Remove the corresponding prototypes.
1514 2005-01-15 Jakub Jelinek <jakub@redhat.com>
1517 * typeck2.c (split_nonconstant_init_1) <case VECTOR_TYPE>: Put a copy
1518 of CONSTRUCTOR's node into MODIFY_EXPR, as the original is modified.
1520 2005-01-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1522 * Make-lang.in (cp-warn): Don't append $(WERROR).
1524 2005-01-10 Kazu Hirata <kazu@cs.umass.edu>
1526 * cp-tree.h: Fix a comment typo.
1528 2005-01-07 Nathan Sidwell <nathan@codesourcery.com>
1531 * pt.c (tsubst_qualified_id): Call convert_from_reference.
1533 2005-01-06 Mark Mitchell <mark@codesourcery.com>
1536 * class.c (add_implicitly_declared_members): Remove dead code.
1537 * decl.c (grokfndecl): Add sfk parameter. Use it do set
1539 (grokdeclarator): Adjust calls to grokfndecl.
1540 * method.c (implicitly_declare_fn): Improve documentation.
1541 * parser.c (cp_parser_direct_declarator): Do not consider a
1542 function to be a constructor if the containing class was
1543 originally anonymous.
1545 2005-01-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1548 * search.c (lookup_field_1): Handle using declaration in
1549 class template partial specialization.
1551 2005-01-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1554 * pt.c (push_access_scope): Handle friend defined in class.
1555 (pop_access_scope): Likewise.
1557 2005-01-06 Nathan Sidwell <nathan@codesourcery.com>
1560 * pt.c (tsubst_copy) <ARRAY_REF case>: Handle separately.
1561 (tsubst_copy_and_build) <ARRAY_REF case>: Remove obsolete
1562 array-new handling code. Use build_x_binary_op.
1564 2005-01-05 Nathan Sidwell <nathan@codesourcery.com>
1567 * cp-tree.h (start_decl): Take pointer to pushed scope, not bool.
1568 * name-lookup.h (push_scope): Return pushed scope, not flag.
1569 * name-lookup.c (push_scope): Return scope that should be popped,
1571 * decl.c (start_decl): Adjust.
1572 (grokfndecl): Adjust scope push and pop.
1573 * decl2.c (check_classfn): Likewise.
1574 * parser.c (cp_parser_condition, cp_parser_conversion_function_id,
1575 cp_parser_init_declarator, cp_parser_direct_declarator,
1576 cp_parser_class_specifier, cp_parser_class_head,
1577 cp_parser_lookup_name,
1578 cp_parser_constructor_declarator_p): Likewise.
1579 * pt.c (instantiate_class_template,
1580 resolve_typename_type): Likewise.
1582 2005-01-03 Volker Reichelt <reichelt@igpm.rwth-aaachen.de>
1585 * parser.c (cp_parser_unqualified_id): Do not issue error message
1586 for typedef-name as destructor declarator when performing an
1587 uncommitted tentative parse.
1589 2005-01-01 Steven Bosscher <stevenb@suse.de>
1592 * decl.c (finish_function): Fix comment. Annotate the compiler
1593 generated return with the current file name and line 0.
1595 2004-12-31 Richard Henderson <rth@redhat.com>
1598 * call.c (make_temporary_var_for_ref_to_temp): Set DECL_IGNORED_P.
1599 * class.c (build_vtable): Don't conditionallize setting it
1600 based on DWARF2_DEBUG.
1601 (layout_class_type): Set DECL_IGNORED_P.
1602 * decl2.c (get_guard): Likewise.
1603 * rtti.c (get_tinfo_decl, build_lang_decl): Likewise.
1604 * tree.c (build_local_temp): Likewise.
1606 2004-12-30 Mark Mitchell <mark@codesourcery.com>
1608 * cp-tree.h (cp_declarator): Split "name" field into
1609 qualifying_scope and unqualified_name.
1610 * decl.c (get_scope_of_declarator): Adjust accordingly.
1611 (grokdeclarator): Likewise.
1612 * decl2.c (grokfield): Likewise, and adjust call to
1613 do_class_using_decl.
1614 * name-lookup.c (do_class_using_decl): Split "decl" into
1615 "scope" and "name". Remove unnecessary code.
1616 * name-lookup.h (do_class_using_decl): Adjust declaration.
1617 * parser.c (make_id_declarator): Split "id" into qualifying_scope
1618 and unqualified_name.
1619 (cp_parser_using_declaration): Adjust call to do_class_using_decl.
1620 (cp_parser_direct_declarator): Adjust to handle the fact that
1621 cp_parser_declarator_id no longer returns a SCOPE_REF.
1622 (cp_parser_direct_declarator): Likewise.
1623 (cp_parser_declarator_id): Do not create a SCOPE_REF for qualified
1625 (cp_parser_member_declaration): Adjust call to make_id_declarator.
1626 (cp_parser_check_declarator_template_parameters): Do not expect a
1629 * decl.c (duplicate_decls): Call ggc_free on declarations we will
1630 not be needing any longer.
1633 * cvt.c (convert_to_void): Do not use STRIP_NOPs.
1635 2004-12-28 Richard Henderson <rth@redhat.com>
1638 * semantics.c (finish_asm_stmt): Resolve asm names. Validate input
1639 constraints. Mark memory inputs addressable.
1641 2004-12-27 Jason Merrill <jason@redhat.com>
1643 * decl.c (expand_static_init): Don't use shortcut if
1644 targetm.relaxed_ordering.
1646 2004-12-27 Mark Mitchell <mark@codesourcery.com>
1649 * decl.c (check_tag_decl): Robustify.
1651 2004-12-23 Mark Mitchell <mark@codesourcery.com>
1654 * parser.c (cp_parser_error): Issue better messages about
1655 #pragma in locations where it is not permitted.
1658 * pt.c (check_instantiated_args): Remove bogus SFINAE code.
1660 * cvt.c (convert_to_void): Fix typo in comment.
1662 2004-12-23 Alexandre Oliva <aoliva@redhat.com>
1665 * pt.c (check_explicit_specialization): Use the argument list from
1666 the definition in a template function specialization definition.
1668 2004-12-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1671 * pt.c (check_explicit_specialization): Use special logic to validate
1672 befriended specializations.
1674 2004-12-22 Mark Mitchell <mark@codesourcery.com>
1676 * rtti.c (emit_support_tinfos): Avoid using C99 semantics.
1679 * call.c (build_this): In templates, do not bother with
1681 * typeck.c (unary_complex_lvalue): In a template, always refuse
1685 * cp-gimplify.c (cp_genericize): Relax assertion.
1688 * cvt.c (convert_to_void): Warn about unused values.
1691 * rtti.c (emit_support_tinfos): On systems without weak symbols,
1692 emit the runtime library type-info objects as non-COMDAT.
1694 2004-12-21 Mark Mitchell <mark@codesourcery.com>
1697 * call.c (convert_like_real): Do not permit the use of a copy
1698 constructor to copy a packed field.
1701 * decl.c (grokdeclarator): Return error_mark_node, not
1702 void_type_node, to indicate errors.
1703 * parser.c (cp_parser_template_parameter_list): Robustify.
1704 (cp_parser_template_parameter): Likewise.
1707 * tree.c (cp_tree_equal): Handle OVERLOAD.
1709 2004-12-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1711 * decl.c (define_label): Use POP_TIMEVAR_AND_RETURN.
1712 * name-lookup.c (pushdecl_class_level): Likewise.
1714 2004-12-21 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1716 * name-lookup.c (pushtag): Add missing POP_TIMEVAR_AND_RETURN.
1718 2004-12-21 Andrew Pinski <pinskia@physics.uc.edu>
1721 * cp-gimplify.c (cp_genericize_r): Don't insert first but instead
1722 check to see if contains the pointer. Insert the statement before
1725 2004-12-21 Nathan Sidwell <nathan@codesourcery.com>
1728 * decl.c (check_initializer): Check string initializer of array is
1730 * cp-tree.h (PAREN_STRING_LITERAL_P): New.
1731 * semantics.c (finish_parenthesized_expr): Mark a STRING_CST.
1732 * error.c (dump_expr): <STRING_CST case> Add parens, if needed.
1734 * cp-tree.def (TEMPLATE_TYPE_PARM,
1735 BOUND_TEMPLATE_TEMPLATE_PARM, TYPE_OF_TYPE, TYPENAME_TYPE): Reorder
1736 for better code efficiency.
1737 * cp-tree.h (CLASS_TYPE_P): Short circuit IS_AGGR_TYPE check.
1738 (CAN_HAVE_FULL_LANG_DECL_P): Reorder for better optimization.
1739 (INTEGRAL_CODE_P, CP_INTEGRAL_TYPE_P,
1740 INTEGRAL_OR_ENUMERATION_TYPE_P, SCALAR_TYPE_P,
1741 CP_AGGREGATE_TYPE_P, TYPE_PTROB_P, TYPE_REF_OBJ_P,
1742 TYPE_PTROBV_P): Likewise.
1745 * method.c (do_build_copy_constructor): Refactor. Don't const
1746 qualify a mutable field.
1747 (do_build_assign_ref): Likewise.
1749 2004-12-20 Matt Austern <austern@apple.com>
1752 * decl.c (make_rtl_for_nonlocal_decl): Use
1753 set_builtin_user_assembler_name.
1755 2004-12-19 Mark Mitchell <mark@codesourcery.com>
1757 * cp-tree.h (note_decl_for_pch): New function.
1758 * class.c (build_clone): Call note_decl_for_pch.
1759 * semantics.c (finish_member_declaration): Likewise.
1760 (note_decl_for_pch): New function.
1762 2004-12-17 Steven Bosscher <stevenb@suse.de>
1764 * init.c (build_zero_init): max_index is the number of
1767 2004-12-17 Nathan Sidwell <nathan@codesourcery.com>
1770 * class.c (add_method): Do not push conversion operators into a
1773 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE_TYPE): Reformat.
1774 * error.c (dump_decl): <TYPE_DECL case> Remove extraneous braces.
1776 2004-12-16 Nathan Sidwell <nathan@codesourcery.com>
1779 * cp-tree.h (integral_constant_value): Declare.
1780 * call.c (null_ptr_cst_p): Use integral_constant_value, not
1781 decl_constant_value.
1782 (convert_like_real): Likewise.
1783 * class.c (check_bitfield_decl): Likewise.
1784 * cvt.c (ocp_convert): Likewise.
1785 (convert): Remove unnecessary decl_constant_value call.
1786 * decl.c (compute_array_index_type): Use integral_constant_value,
1787 not decl_constant_value.
1788 (build_enumerator): Likewise.
1789 * decl2.c (grokfield): Likewise.
1790 * init.c (decl_constant_value): Simplify.
1791 (integral_constant_value): New.
1792 * pt.c (fold_decl_constant_value): Use integral_constant_value,
1793 remove subsequent check.
1794 (tsubst): Use integral_constant_value, not decl_constant_value.
1795 (tsubst_copy, unify): Likewise.
1796 * typeck.c (decay_conversion): Likewise.
1797 (build_compound_expr): Remove unnecessary decl_constant_value
1799 (build_static_cast_1, build_reinterpret_cast_1):
1800 (convert_for_assignment): Remove comment about not calling
1801 decl_constant_value.
1803 2004-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1806 * pt.c (instantiate_class_template): Set input_location for
1808 (tsubst_friend_function): Don't set input_location here.
1809 Make sure the context is complete if necessary.
1811 2004-12-15 Nathan Sidwell <nathan@codesourcery.com>
1814 * parser.c (cp_parser_lookup_name): Remove unneeded TYPENAME_TYPE
1817 2004-12-14 Mark Mitchell <mark@codesourcery.com>
1820 * decl.c (make_typename_type): Do not handle namespace-scoped
1822 (tag_name): Handle typename_type.
1823 (check_elaborated_type_specifier): Handle typenames.
1824 * parser.c (cp_parser_diagnose_invalid_type_name): Improve
1826 (cp_parser_elaborated_type_specifier): Use
1827 cp_parser_diagnose_invalid_type_name.
1829 2004-12-14 Andrew Pinski <pinskia@physics.uc.edu>
1832 * init.c (build_zero_init): If the max_index is 0, there is no
1833 need to create a RANGE_EXPR.
1835 2004-12-14 Mark Mitchell <mark@codesourcery.com>
1838 * cp-objcp-common.c (cp_expr_size): Loosen assertion.
1840 2004-12-14 Nathan Sidwell <nathan@codesourcery.com>
1843 * pt.c (tsubst_copy_and_build): <INDIRECT_REF case> Check that a
1844 REFERENCE_REF_P is dereferencing a reference type.
1845 * typeck.c (build_static_cast): Convert from reference even in a
1847 (build_reinterpret_cast, build_const_cast, build_c_cast): Likewise.
1849 2004-12-14 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1851 * parser.c (cp_parser_uncommitted_to_tentative_parse_p): New function.
1852 (cp_parser_name_lookup_error): Use it.
1853 (cp_parser_check_for_invalid_template_id): Likewise.
1854 (cp_parser_skip_to_closing_parenthesis): Likewise.
1855 (cp_parser_nested_name_specifier_opt): Likewise.
1856 (cp_parser_simple_declaration, cp_parser_template_id): Likewise.
1857 (cp_parser_parameter_declaration_list): Likewise.
1858 (cp_parser_parameter_declaration): Likewise.
1859 (cp_parser_template_name): Let cp_parser_simulate_error perform
1861 (cp_parser_committed_to_tentative_parse): Remove.
1863 2004-12-13 Andrew Pinski <pinskia@physics.uc.edu>
1866 * class.c (build_base_path): Convert the zero constant to the correct
1867 type when comparing.
1869 2004-12-13 Mark Mitchell <mark@codesourcery.com>
1872 * class.c (layout_class_type): Determine the visibility of static
1875 2004-12-12 Roger Sayle <roger@eyesopen.com>
1878 * cp-gimplify.c (gimplify_if_stmt): Optimize the case where the
1879 condition is a constant and the unexecuted clause is empty.
1881 2004-12-10 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1884 * parser.c (cp_parser_class_head): Reject typedef-name in class head.
1886 2004-12-09 Matt Austern <austern@apple.com>
1889 * name-lookup.c (do_nonmember_using_decl): A real function
1890 declaration takes precedence over an anticipated declaration.
1892 2004-12-09 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1894 * parser.c (cp_parser_member_declaration): Fix comment typo.
1896 2004-12-09 Alexandre Oliva <aoliva@redhat.com>
1899 * parser.c (cp_parser_template_id): Don't create a CPP_TEMPLATE_ID
1902 2004-12-09 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1905 * typeck.c (build_reinterpret_cast_1): Allow cast from vector type.
1907 2004-12-09 Nathan Sidwell <nathan@codesourcery.com>
1910 * init.c (build_zero_init): Build a RANGE_EXPR for an array
1913 2004-12-08 Kelley Cook <kcook@gcc.gnu.org>
1915 * typeck.c: Remove DOS line endings.
1917 2004-12-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1920 * decl.c (lookup_and_check_tag): Diagnose nested class with
1921 the same name as enclosing class.
1923 2004-12-08 Nathan Sidwell <nathan@codesourcery.com>
1926 * cp-tree.h (REFERENCE_REF_P): New.
1927 (CPTI_TYPE_INFO_TYPE): Rename to ...
1928 (CPTI_CONST_TYPE_INFO_TYPE): ... here.
1929 (CPTI_TYPE_INFO_REF_TYPE): Remove.
1930 (type_info_type_node): Rename to ...
1931 (const_type_info_type_node): ... here.
1932 (type_info_ref_type): Remove.
1933 * call.c (build_user_type_conversion): Reformat.
1934 (resolve_args): Do not convert_from_reference.
1935 (build_object_call): Call convert_from_reference.
1936 (prep_operand): Do not convert_from_reference.
1937 (build_new_method_call): Likewise.
1938 * class.c (build_vfield_ref): Likewise.
1939 * cvt.c (convert_to_reference): Likewise.
1940 (convert_from_reference): Build INDIRECT_REF here, not with
1942 (convert_force): Do not convert_from_reference.
1943 (build_expr_type_conversion): Likewise.
1944 * decl.c (grok_reference_init): Likewise.
1945 * decl2.c (delete_sanity): Likewise.
1946 * except.c (initialize_handler_parm): Use POINTER_TYPE_P.
1947 * init.c (build_dtor_call): Do not convert_from_reference.
1948 * parser.c (cp_parser_template_argument): Unwrap indirected
1949 reference. Allow TEMPLATE_PARM_INDEX as an object parm.
1950 * pt.c (tsubst_copy_and_build) <case INDIRECT_REF>: Use
1951 convert_from_reference, if indicated.
1952 <case CALL_EXPR>: Do not convert_from_reference.
1953 <case PARM_DECL, VAR_DECL>: Convert_from_reference if needed.
1954 (tsubst_initializer_list): Do not convert_from_reference.
1955 * rtti.c (init_rtti_processing): Adjust node creation.
1956 (throw_bad_typeid): Use const_type_info_type_node.
1957 Do not convert_from_reference.
1958 (typeid_ok_p): Use const_type_info_type_node.
1959 (build_typeid, get_typeid): Always return type_info typed node.
1960 (build_dynamic_cast_1): Dont convert_from_reference. Refactor.
1961 * semantics.c (finish_stmt_expr_expr): Do not
1962 convert_from_reference.
1963 (finish_id_expression): Convert_from_reference as appropriate.
1964 * typeck.c (decay_conversion): Do not convert_from_reference.
1965 (finish_class_member_access_expr): Likewise.
1966 (build_indirect_ref): Use POINTER_TYPE_P.
1967 (convert_arguments): Do not convert_from_reference.
1968 (build_modify_expr): Likewise.
1969 (convert_for_initialization): Likewise.
1970 * typeck2.c (build_x_arrow): Likewise.
1972 2004-12-07 Ziemowit Laski <zlaski@apple.com>
1974 * cp-tree.h (struct lang_type_class): Rename 'objc_protocols'
1975 field to 'objc_info'.
1977 2004-12-07 Kazu Hirata <kazu@cs.umass.edu>
1979 * pt.c: Replace a use of first_rtl_op with TREE_CODE_LENGTH.
1981 2004-12-07 Roger Sayle <roger@eyesopen.com>
1983 * name-lookup.c (leave_scope): We only need to update
1984 class_binding_level when leaving a class scope.
1986 2004-12-06 Ziemowit Laski <zlaski@apple.com>
1988 * cp-tree.h (struct lang_type_class): Add 'objc_protocols' field.
1990 2004-12-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1992 PR c++/17011, c++/17971
1993 * pt.c (tsubst_copy) <FIELD_DECL case>: Check and diagnose
1995 (tsubst_copy_and_build) <COMPONENT_REF case>: Check
1996 error_mark_node after member substitution.
1997 * semantics.c (finish_id_expression): Call
1998 finish_non_static_data_member for non-dependent FIELD_DECL.
2000 2004-12-03 Nathan Sidwell <nathan@codesourcery.com>
2003 * decl.c (grokdeclarator): Make sure class in pointer to member is
2006 2004-12-02 Nathan Sidwell <nathan@codesourcery.com>
2009 * parser.c (cp_parser_new_type_id): Move array size expression
2010 checks from here ...
2011 * init.c (build_new): ... to here.
2013 2004-12-02 Nathan Sidwell <nathan@codesourcery.com>
2016 * parser.c (cp_parser_class_head): Return NULL_TREE when
2017 push_template_decl fails. Update comment.
2019 2004-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2021 PR c++/15664, c++/18276
2022 * pt.c (tsubst_decl) <TEMPLATE_DECL case>: Reorganize. Correctly
2023 tsubst TEMPLATE_DECL that is a TEMPLATE_TEMPLATE_PARM.
2025 2004-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2028 * parser.c (cp_parser_type_specifier): Catch template declaration
2031 2004-12-01 Matt Austern <austern@apple.com>
2033 * name-lookup.c (namespace_binding): Omit alias check for global
2036 2004-12-01 Nathan Sidwell <nathan@codesourcery.com>
2039 * parser.c (cp_parser_class_name): Check decl's type is not
2043 * call.c (standard_conversion): Add FLAGS parameter. Do not allow
2044 derived to base conversion when checking constructor
2046 (implicit_conversion): Pass FLAGS to standard_conversion.
2047 (check_constructir_callable): Disallow conversion functions.
2049 2004-11-30 Kazu Hirata <kazu@cs.umass.edu>
2051 * parser.c: Fix comment typos.
2053 2004-11-27 Mark Mitchell <mark@codesourcery.com>
2056 * parser.c (cp_parser_check_for_definition_in_return_type): Take
2057 the defined type as a parameter, and inform the user about the
2058 possibility of a missing semicolon.
2059 (cp_parser_explicit_instantiation): Adjust call to
2060 cp_parser_check_for_definition_in_return_type.
2061 (cp_parser_init_declarator): Likewise.
2062 (cp_parser_member_declaration): Likewise.
2065 * cp-tree.def (TYPENAME_TYPE): Remove discussion of implicit
2066 typename from comments.
2067 * cp-tree.h (TYPENAME_IS_ENUM_P): New macro.
2068 (TYPENAME_IS_CLASS_P): Likewise.
2069 (make_typename_type): Change prototype.
2070 * decl.c (struct_typename_info): New type.
2071 (typename_compare): Expect the second argument to be a
2072 typename_info, not a tree.
2073 (build_typename_type): Add tag_type parameter. Do not create a
2074 new type until necessary.
2075 (make_typename_type): Add tag_type parameter.
2076 * error.c (TYPENAME_TYPE): Print tags other than "typename" if
2078 * friend.c (make_friend_class): Adjust call to make_typename_type.
2079 * parser.c (cp_parser_make_typename_type): Likewise.
2080 (cp_parser_primary_expression): Adjust call to
2081 cp_parser_lookup_name.
2082 (cp_parser_unqualified_id): Adjust calls to cp_parser_class_name.
2083 (cp_parser_class_or_namespace_name): Likewise.
2084 (cp_parser_postfix_expression): Adjust calls to
2086 (cp_parser_mem_initializer_id): Adjust calls to
2087 cp_parser_class_name.
2088 (cp_parser_type_parameter): Adjust calls to cp_parser_lookup_name.
2089 (cp_parser_template_name): Likewise.
2090 (cp_parser_template_argument): Likewise.
2091 (cp_parser_type_name): Adjust call to cp_parser_class_name.
2092 (cp_parser_elaborated_type_specifier): Adjust calls to
2093 make_typename_type and cp_parser_lookup_name.
2094 (cp_parser_namespace_name): Likewise.
2095 (cp_parser_class_name): Replace type_p parameter with tag_type.
2096 Adjust calls to make_typename_type and cp_parser_lookup_name.
2097 (cp_parser_class_head): Adjust calls to cp_parser_class_name.
2098 (cp_parser_base_specifier): Likewise.
2099 (cp_parser_lookup_name): Replace is_type parameter with tag_type.
2100 Adjust calls to make_typename_type and lookup_qualified_name.
2101 (cp_parser_lookup_name_simple): Adjust call to
2102 cp_parser_lookup_name.
2103 (cp_parser_constructor_declarator_p): Adjust call to
2104 cp_parser_class_name.
2105 * pt.c (convert_template_argument): Adjust all to
2107 (tsubst_decl): Do not pre-substitute the type of the declaration.
2108 (tsubst): Hand off declarations more quickly. Adjust call to
2112 * parser.c (cp_parser_postfix_dot_deref_expression): Robustify.
2114 2004-11-29 Daniel Jacobowitz <dan@codesourcery.com>
2117 * Make-lang.in (cp/decl2.o): Update dependencies.
2118 * decl2.c (finish_file): Call maybe_apply_pending_pragma_weaks.
2120 2004-11-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2123 * name-lookup.c (pushtag): Change return type to tree.
2124 * cp-tree.h (pushtag): Adjust declaration.
2125 * decl.c (xref_tag, start_enum): Use return value of pushtag.
2126 * pt.c (push_template_decl_real): Return immediately if
2127 pushdecl_namespace_level returns error_mark_node.
2129 2004-11-27 Kazu Hirata <kazu@cs.umass.edu>
2131 * pt.c: Fix a comment typo.
2133 2004-11-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2135 Friend class name lookup 4/n
2136 * class.c (pushclass): Don't call cxx_remember_type_decls.
2137 * cp-tree.h (clear_anon_tags): Remove declaration.
2138 * decl.c (grokdeclarator): Don't call lookup_tag_reverse.
2139 * name-lookup.c (binding_entry_free, binding_table_free): Comment
2141 (binding_table_find_anon_type, binding_table_reverse_maybe_remap,
2142 binding_table_remove_anonymous_types, cxx_remember_type_decls,
2143 bt_print_entry, clear_anon_tags, follow_tag_typedef, lookup_tag,
2144 lookup_tag_reverse): Remove
2145 (begin_scope, leave_scope, kept_level_p, print_binding_level):
2146 Don't use type_decls field in cp_binding_level.
2147 (maybe_process_template_type_declaration, pushtag): Set
2148 CLASSTYPE_NESTED_UTDS directly.
2149 * name-lookup.h (binding_table_remove_anonymous_types,
2150 cxx_remember_type_decls, lookup_tag, lookup_tag_reverse): Remove
2152 (cp_binding_level): Remove type_decls field.
2154 2004-11-26 Kazu Hirata <kazu@cs.umass.edu>
2156 * typeck.c: Fix a comment typo.
2158 2004-11-25 Mark Mitchell <mark@codesourcery.com>
2161 * class.c (instantiate_type): Treat NON_DEPENDENT_EXPRs with
2162 unknown_type as non matching. Tidy up.
2163 * pt.c (build_non_dependent_expr): Do not build a
2164 NON_DEPENDENT_EXPR for a VAR_DECL.
2167 * cp-tree.h (lvalue_or_else): Remove declaration.
2168 * tree.c (lvalue_or_else): Remove.
2169 * typeck.c (build_unary_op): Adjust call to lvalue_or_else.
2170 (build_modify_expr): Likewise.
2173 * decl.c (duplicate_decls): Return error_mark_node on error, as
2177 * decl.c (grokvardecl): Keep track of whether or not a there was
2178 explicit qualification.
2179 * name-lookup.c (set_decl_namespace): Complain about explicit
2180 qualification of a name within its own namespace.
2183 * typeck.c (check_return_expr): Robustify.
2185 2004-11-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2187 Friend class name lookup 3/n, PR c++/3332
2188 * name-lookup.c (push_inner_scope, pop_inner_scope): New functions.
2189 (lookup_type_scope): Don't deal with name from user declaration
2191 * name-lookup.h (push_inner_scope, pop_inner_scope): Add declarations.
2192 * parser.c (cp_parser_class_specifier): Use push_inner_scope and
2195 2004-11-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2197 Friend class name lookup 2/n, PR c++/14513, c++/15410
2198 * name-lookup.c (lookup_name_real): Simplify.
2199 (lookup_type_scope): Add SCOPE parameter. Handle friend class
2201 * name-lookup.h (tag_scope): New enum type.
2202 (lookup_type_scope): Adjust declaration.
2203 * decl.c (lookup_and_check_tag, xref_tag, xref_tag_from_type):
2204 Change bool parameter GLOBALIZED to TAG_SCOPE parameter SCOPE.
2205 (start_enum): Likewise. Add assertion test that NAME is
2206 IDENTIFIER_NODE. Use anonymous name for dummy ENUMERAL_TYPE in
2208 * cp-tree.h (xref_tag, xref_tag_from_type): Adjust declarations.
2209 * parser.c (cp_parser_elaborated_type_specifier,
2210 cp_parser_class_head): Adjust call to xref_tag.
2211 * pt.c (lookup_template_class, instantiate_class_template):
2213 * rtti.c (init_rtti_processing, build_dynamic_cast_1,
2214 tinfo_base_init, emit_support_tinfos): Likewise.
2216 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
2218 * g++spec.c, lex.c: Avoid ` as left quote in diagnostics.
2220 2004-11-24 Mark Mitchell <mark@codesourcery.com>
2223 * name-lookup.c (supplement_binding): Do not allow typedefs to be
2224 redefined in class scope.
2227 * parser.c (cp_parser_set_decl_type_spec): Do not try to allow
2228 redefinitions of builtin types other that "bool" or "wchar_t".
2230 2004-11-24 Steven Bosscher <stevenb@suse.de>
2232 * decl.c (cxx_init_decl_processing): Don't clear
2233 flag_inline_functions.
2235 2004-11-24 Mark Mitchell <mark@codesourcery.com>
2237 * pt.c (tsubst_function_type): Do not permit function types which
2238 return arrays or functions.
2241 * parser.c (cp_parser_init_declarator): Do not pop scope twice.
2244 * cp-tree.h (CTOR_NAME): Remove.
2245 (DTOR_NAME): Remove.
2246 * decl.c (initialize_predefined_identifiers): Add spaces to the
2247 end of constructor and destructor names.
2249 2004-11-24 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2252 * decl.c (start_decl): Check for invalid specialization headers.
2254 2004-11-24 Paolo Bonzini <bonzini@gnu.org>
2258 * call.c (standard_conversion): Move check for conversions between
2260 * typeck.c (ptr_reasonably_similar): ... here.
2262 2004-11-23 Ben Elliston <bje@au.ibm.com>
2264 * cp-tree.h (context_as_string): Remove extern.
2265 * error.c (context_as_string): Remove.
2267 * cp-tree.h (cp_type_qual_from_rid): Remove extern.
2268 * lex.c (cp_type_qual_from_rid): Remove.
2270 * cp-tree.h (do_poplevel): Remove extern.
2271 (check_multiple_declarators): Likewise.
2272 * semantics.c (do_poplevel): Make static.
2273 (check_multiple_declarators): Remove.
2275 * cp-tree.h (check_final_overrider): Remove extern.
2276 * search.c (check_final_overrider): Make static.
2278 * cp-tree.h (build_artificial_parm): Remove extern.
2279 * decl2.c (build_artificial_parm): Make static.
2281 2004-11-22 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2284 * typeck.c (build_unary_op) <CONVERT_EXPR, NEGATE_EXPR>: Unify code.
2285 Make sure the result is always a rvalue.
2287 2004-11-16 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2289 * decl.c (start_preparsed_function): Call check_function_type even
2291 (require_complete_types_for_parms): Skip dependent types.
2292 (check_function_type): Likewise.
2294 2004-11-16 Steven Bosscher <stevenb@suse.de>
2296 * Make-lang.in (cp/decl.o, cp/search.o): Don't depend on stack.h.
2297 * search.c: Don't include it.
2299 2004-11-15 Andrew Pinski <pinskia@physics.uc.edu>
2301 * cp-gimplify.c: Include pointer-set.h
2302 (cp_genericize_r): Use pointer_sets instead of a hashtable.
2303 Also instert the new statement for CLEANUP_STMT.
2304 (cp_genericize): Use pointer_sets instead of a hashtable.
2305 * Make-lang.in (cp-gimplify.o): Depend on pointer-set.h.
2307 2004-11-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2309 Friend class name lookup 1/n, PR c++/18471
2310 * decl.c (lookup_and_check_tag): New function.
2311 (xref_tag, start_enum): Use it.
2312 (check_elaborated_type_specifier): Move TEMPLATE_TYPE_PARM check
2313 before !DECL_IMPLICIT_TYPEDEF_P. Also display previously declared
2315 * name-lookup.c (lookup_name_current_level): Rename to ...
2316 (lookup_name_innermost_nonclass_level): ... this.
2317 (lookup_type_scope): New function.
2318 * name-lookup.h (lookup_name_current_level): Rename to ...
2319 (lookup_name_innermost_nonclass_level): ... this.
2320 (lookup_type_scope): Add declaration.
2322 2004-11-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2325 * pt.c (coerce_template_parms): Only emit error message about
2326 invalid template argument when TF_ERROR.
2328 2004-11-12 Mark Mitchell <mark@codesourcery.com>
2331 * decl.c (start_decl): Make sure to set *pop_scope_p. Return
2332 error_mark_node to indicate errors.
2335 * parser.c (cp_parser_direct_declarator): Disallow non-constant
2336 array bounds when not inside a function.
2339 * pt.c (tsubst_copy_and_build): Do not do Koenig lookup when an
2340 unqualified name resolves to a member function.
2343 * pt.c (tsubst_copy_and_build): Handle qualified names used from a
2344 derived class correctly.
2346 * decl2.c (import_export_decl): Fix typo in comment.
2347 * tree.c (pod_type_p): Likewise.
2349 2004-11-10 Andrew Pinski <pinskia@physics.uc.edu>
2351 * typeck.c (cxx_mark_addressable): Add braces around the first if.
2353 2004-11-10 Adam Nemet <anemet@lnxw.com>
2356 * typeck.c (cxx_mark_addressable): Issue an error if address of an
2357 explicit register variable is requested.
2359 2004-11-10 Nathan Sidwell <nathan@codesourcery.com>
2362 * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK): New.
2363 (struct lang_decl_flags): Add thunk_p flag.
2364 (struct lang_decl): Remove separate fixed_offset. Place
2365 cloned_function and fixed_offset into union.
2366 (DECL_CLONED_FUNCTION_P, DECL_CLONED_FUNCTION): Adjust.
2367 (DECL_THUNK_P, SET_DECL_THUNK_P): Adjust.
2368 (THUNK_FIXED_OFFSET): Adjust.
2369 * method.c (make_thunk): Adjust.
2371 2004-11-09 Mark Mitchell <mark@codesourcery.com>
2374 * init.c (build_new_1): Handle parenthesized type-ids that name an
2377 2004-11-09 Joseph S. Myers <joseph@codesourcery.com>
2379 * call.c, class.c, decl.c, decl2.c, error.c, mangle.c, parser.c,
2380 pt.c, search.c, semantics.c, typeck.c: Use %q, %< and %> for
2381 quoting in diagnostics.
2382 * parser.c (cp_parser_sizeof_operand): Use '' instead of `' for
2383 quoting in printf format.
2384 * decl.c (duplicate_decls, start_decl): Use %qD instead of
2387 2004-11-08 Kazu Hirata <kazu@cs.umass.edu>
2389 * class.c, decl.c, lex.c, name-lookup.c, parser.c, pt.c,
2390 search.c, typeck2.c: Fix comment formatting.
2392 2004-11-04 Ulrich Weigand <uweigand@de.ibm.com>
2394 PR tree-optimization/18184
2395 * cp-objcp-common.c (cxx_types_compatible_p): Do not treat pointers
2396 of different modes or alias-all flags as equivalent.
2397 * typeck.c (comptypes): Likewise.
2399 2004-11-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2402 * cp-tree.h (TYPE_REF_OBJ_P): New macro.
2403 (TYPE_PTR_P, TYPE_PTROB_P, TYPE_PTROBV_P, TYPE_PTRFN_P,
2404 TYPE_REFFN_P): Document.
2405 (fold_decl_constant_value): New prototype.
2406 * pt.c (convert_nontype_argument_function): Rewrite and extract
2408 (fold_decl_constant_value, convert_nontype_argument_function): New.
2409 (lookup_template_class): Add comment about useless double call.
2410 * mangle.c (write_expression): Strip conversions before lowering
2412 * cvt.c (ocp_convert): Check LOOKUP_COMPLAIN for a pedwarn. Disallow
2413 enum to enum conversion.
2415 2004-11-02 Mark Mitchell <mark@codesourcery.com>
2418 * parser.c (cp_parser_type_parameter): Robustify.
2421 * parser.c (cp_parser_single_declaration): Disallow template
2425 * typeck.c (build_const_cast): Use error_operand_p.
2427 2004-11-02 Ziemowit Laski <zlaski@apple.com>
2429 * cp-lang.c (cxx_types_compatible_p): Remove prototype and definition.
2430 (LANG_HOOKS_TYPES_COMPATIBLE_P): Move to cp-objcp-common.h.
2431 * cp-objcp-common.c (cxx_types_compatible_p): Moved definition here
2433 * cp-objcp-common.h (cxx_types_compatible_p): Moved prototype here
2435 (LANG_HOOKS_TYPES_COMPATIBLE_P): Moved here from cp-lang.c.
2437 2004-11-01 Nathan Sidwell <nathan@codesourcery.com>
2440 * search.c (check_final_overrider): Deprecate gnu covariant extension.
2442 2004-10-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
2444 Convert diagnostics to use quoting flag q 9/n
2445 * typeck.c (build_x_unary_op, convert_member_func_to_ptr,
2446 get_delta_difference): Use new quotation style.
2447 * repo.c (reopen_repo_file_for_write): Likewise.
2448 * pt.c (do_type_instantiation): Likewise.
2449 * parser.c (cp_parser_diagnose_invalid_type_name):
2450 * name-lookup.c (push_overloaded_decl, set_decl_namespace):
2451 * error.c (cp_print_error_function,
2452 print_instantiation_full_context): Likewise.
2453 * decl.c (define_label, grok_reference_init,
2454 maybe_deduce_size_from_array_init, revert_static_member_fn):
2455 * decl2.c (check_classfn): Likewise.
2456 * class.c (add_method, check_field_decls, layout_class_type,
2457 resolve_address_of_overloaded_function): Likewise.
2458 * call.c (build_x_va_arg, build_over_call): Likewise.
2460 2004-10-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
2462 Convert diagnostics to use quoting flag q 8/n
2463 * cvt.c (cp_convert_to_pointer, warn_ref_binding,
2464 convert_to_reference, ocp_convert, convert_to_void
2465 cp_convert_to_pointer): Use new quotation style.
2467 2004-10-31 Mark Mitchell <mark@codesourcery.com>
2470 * typeck2.c (store_init_value): Use split_nonconstant_init even
2471 for types that require construction.
2473 1004-10-28 Matt Austern <austern@apple.com>
2476 * cp-tree.h (class_key_or_enum_as_string): Declare.
2477 * error.c (class_key_or_enum): Rename to class_key_or_enum_as_string
2478 and remove static qualifier.
2479 * decl.c (shadow_tag): Warn about ignored attributes in class/struct/
2480 union/enum declaration.
2482 2004-10-29 Kazu Hirata <kazu@cs.umass.edu>
2484 * pt.c: Fix a comment typo.
2486 2004-10-28 Nathan Sidwell <nathan@codesourcery.com>
2488 * typeck.c (composite_pointer_type): Remove comment about DR 195.
2489 (build_reinterpret_cast_1): Revert DR195 patch. Only emit a
2490 warning when being pedantic.
2491 (build_reinterpet_cast, build_c_cast): Adjust.
2493 2004-10-29 Mark Mitchell <mark@codesourcery.com>
2496 * decl.c (grokdeclarator): Mark TYPE_DECLs as abstract when they
2497 appear in a constructor/destructor that will be cloned.
2499 1004-10-28 Matt Austern <austern@apple.com>
2502 * decl.c (finish_enum): Handle packed attribute.
2503 * parser.c (cp_parser_enum_specifier): Process trailing attributes.
2505 2004-10-28 Mark Mitchell <mark@codesourcery.com>
2508 * pt.c (instantiate_class_template): Increment
2509 processing_template_decl when substituting into a member class
2512 2004-10-27 Mark Mitchell <mark@codesourcery.com>
2515 * call.c (convert_like_real): Fix formatting.
2516 (initialize_reference): When binding a temporary to a base class,
2517 ensure that the nominal copy made is to the derived class, not the
2521 * parser.c (cp_parser_next_token_ends_template_argument_p): Do not
2524 2004-10-27 Andrew Pinski <pinskia@physics.uc.edu>
2526 * decl.c (bad_specifiers): Move the q after the %.
2528 2004-10-27 Andrew Pinski <pinskia@physics.uc.edu>
2530 * parser.c (cp_parser_diagnose_invalid_type_name): Move the q after
2533 2004-10-26 Mark Mitchell <mark@codesourcery.com>
2535 * name-lookup.c (do_namespace_alias): Use FROB_CONTEXT.
2536 * search.c (current_scope): Fix prototype.
2539 * search.c (current_scope): Return the innermost non-block scope,
2540 not the innermost non-block, non-namespace scope.
2541 (at_namespace_scope_p): Adjust accordingly.
2542 (dfs_accessible_post): Do not pass namespaces to is_friend.
2543 (dfs_walk_once_accessible_r): Likewise.
2544 * decl.c (grokvardecl): Adjust call to current_scope.
2545 (build_enumerator): Likewise.
2546 * parser.c (cp_parser_using_declaration): Likewise.
2547 (cp_parser_direct_declarator): Use at_namespace_scope_p instead of
2549 (cp_parser_class_head): Adjust call to current_scope.
2550 * name-lookup.c (do_namespace_alias): Set the DECL_CONTEXT for the
2554 * pt.c (tusbst_copy_and_build): Resolve enumeration constants to
2555 their underlying values.
2558 * typeck.c (build_binary_op): Honor build_type, even when in a
2561 2004-10-26 Nathan Sidwell <nathan@codesourcery.com>
2563 * parser.c (cp_lexer_get_preprocessor_token): Remove unneeded
2564 padding token checking.
2566 2004-10-25 Andrew Pinski <pinskia@physics.uc.edu>
2569 * decl.c (grokdeclarator) <case cdk_array>: Remove the call
2570 layout_type as it is already done by create_array_type_for_decl.
2572 2004-10-22 Nathan Sidwell <nathan@codesourcery.com>
2575 * parser.c (eof_token): Make const, correctly initialize rid and
2577 (struct cp_lexer): Replace buffer_end pointer with buffer_length
2579 (cp_lexer_new_main): Directly grow lexer's buffer here. Don't
2581 (cp_lexer_new_from_tokens): Adjust.
2582 (cp_lexer_grow_buffer): Remove.
2583 (cp_lexer_peek_nth_token, cp_lexer_consume_token,
2584 cp_lexer_purge_token): Add const casts.
2586 2004-10-21 Mark Mitchell <mark@codesourcery.com>
2590 * cp-tree.h (convert_to_base): Change prototype.
2591 (build_ptrmemfunc): Likewise.
2592 (convert_ptrmem): New function.
2593 * call.c (struct conversion): Adjust documentation for base_p.
2594 (standard_conversion): Set base_p for ck_pmem conversions as
2596 (convert_like_real): Use convert_to_base for ck_pmem and ck_ptr
2598 * class.c (convert_to_base): Handle both pointers and objects.
2599 Add nonnull parameter.
2600 (build_vfield_ref): Adjust call to convert_to_base.
2601 * cvt.c (cp_convert_to_pointer): Adjust call to build_ptrmemfunc.
2602 (convert_force): Likewise.
2603 * typeck.c (build_unary_op): Likewise.
2604 (convert_ptrmem): New function.
2605 (build_static_cast_1): Use it.
2606 (build_reinterpret_cast): Allow conversions to vector types.
2607 (get_delta_difference): Add c_cast_p parameter.
2608 (build_ptrmemfunc): Likewise. Adjust calls to
2609 get_delta_difference.
2611 2004-10-21 Andrew Pinski <pinskia@physics.uc.edu>
2614 * error.c (cp_error_at): Output the context as it might be
2615 different file as the other location.
2617 2004-10-21 Kazu Hirata <kazu@cs.umass.edu>
2619 * typeck.c: Fix a comment typo.
2621 2004-10-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2624 * decl.c (make_unbound_class_template): Add PARM_LIST parameter.
2625 * cp-tree.h (make_unbound_class_template): Adjust prototype.
2626 * parser.c (cp_parser_lookup_name): Adjust call to
2627 make_unbound_class_template.
2628 (cp_parser_single_declaration): Handle member class of class
2629 template as template friend parsing correctly.
2630 * friend.c (is_friend): Call is_specialization_of_friend for
2631 template friend class.
2632 (make_friend_class): Handle member class of class template as
2634 * pt.c (is_specialization_of_friend): Likewise.
2635 (instantiate_class_template): Likewise.
2636 (tsubst): Adjust call to make_unbound_class_template.
2638 2004-10-20 Nathan Sidwell <nathan@codesourcery.com>
2640 * typeck.c (composite_pointer_type): Add comment about DR 195
2641 (build_reinterpret_cast_1): Add for_reinterpret_cast_p parameter.
2642 Allow function pointer conversions that DR195 suggests.
2643 (build_reinterpret_cast, build_c_cast): Update
2644 build_reinterpret_cast_1 calls.
2646 2004-10-20 Kazu Hirata <kazu@cs.umass.edu>
2648 * call.c, typeck.c: Fix comment typos.
2650 2004-10-20 Nathan Sidwell <nathan@codesourcery.com>
2652 * parser.c (cp_token_position): New typedef. Define VEC thereof.
2653 (struct cp_lexer): Allow buffer and buffer_end to be NULL. Make
2654 next_token and last_token cp_token_position. Make saved_tokens a
2655 VEC(cp_token_position).
2656 (eof_token): New static variable.
2657 (CP_SAVED_TOKENS_SIZE): Rename to ...
2658 (CP_SAVED_TOKEN_STACK): ... here.
2659 (cp_lexer_new_main): Adjust main lexer creation and buffer
2661 (cp_lexer_new_from_tokens): Do not copy the tokens, merely point
2662 to the parent buffer. Do not append eof token.
2663 (cp_lexer_destroy): Only free buffer if non-NULL. Free token
2665 (cp_lexer_next_token, cp_lexer_prev_token): Remove.
2666 (cp_lexer_token_position, cp_lexer_token_at): New.
2667 (cp_lexer_saving_tokens): Adjust. Make inline.
2668 (cp_lexer_advance_token, cp_lexer_token_difference): Remove.
2669 (cp_lexer_peek_token_emit_debug_info): Fold into ...
2670 (cp_lexer_peek_token): ... here.
2671 (cp_lexer_peek_nth_token): Don't peek past EOF.
2672 (cp_lexer_consume_token): Set next_token to eof_token, if reaching
2674 (cp_lexer_purge_token): Adjust eof setting.
2675 (cp_lexer_purge_tokens_after): Likewise.
2676 (cp_lexer_save_tokens): Push next_token directly.
2677 (cp_lexer_commit_tokens): Adjust.
2678 (cp_lexer_rollback_tokens): Pop next_token directly.
2679 (cp_parser_check_for_invalid_template_id): Adjust token purging.
2680 (cp_parser_translation_unit): Do not consume the EOF.
2681 (cp_parser_nested_name_specifier_opt): Adjust token purging.
2682 (cp_parser_template_id, cp_parser_template_name): Likewise.
2684 2004-10-19 Mark Mitchell <mark@codesourcery.com>
2687 * call.c (struct conversion): Add base_p.
2688 (convert_like): Add c_cast_p argument.
2689 (convert_like_with_conversion): Likewise.
2690 (build_conv): Clear base_p.
2691 (standard_conversion): Set it, for derived-to-base conversions.
2692 (convert_like_real): Add c_cast_p parameter. Handle pointer
2693 conversions directly rather than relying on ocp_convert.
2694 (perform_direct_initialization_if_possible): Add c_cast_p
2696 * cp-tree.h (perform_direct_initialization_if_possible): Change
2698 (convert_member_func_to_ptr): New function.
2699 * typeck.c (check_for_casting_away_constness): Add diag_fn
2701 (build_static_cast_1): New function, split out from ...
2702 (build_static_cast): ... here. Use build_static_cast_1.
2703 (build_reinterpret_cast_1): New function, split out from ...
2704 (build_reinterpret_cast): ... here. Use build_reinterpret_cast_1.
2705 (build_const_cast_1): New function, split out from ...
2706 (build_const_cast): ... here. Use build_const_cast_1.
2707 (build_c_cast): Rewrite to use build_const_cast_1,
2708 build_static_cast_1, and build_reinterpret_cast_1.
2709 (convert_member_func_to_ptr): New function.
2711 2004-10-19 Paolo Bonzini <bonzini@gnu.org>
2714 * parser.c (enum cp_parser_prec): Give relational expressions
2715 a higher precedence than equality expressions.
2717 2004-10-15 Nathan Sidwell <nathan@codesourcery.com>
2719 * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Adjust lookup_base call.
2720 (ACCESSIBLY_UNIQUELY_DERIVED_P): Remove.
2721 (PUBLICLY_UNIQUELY_DERIVED_P): Adjust lookup_base call.
2722 (enum base_access): Reorganize.
2723 (accessible_base_p, accessible_p): Add consider_local_p parameter.
2724 * call.c (standard_conversion): Update comment about
2726 (enforce_access): Adjust accessible_p call.
2727 (build_over_call): Adjust accessible_base_p call.
2728 * class.c (convert_to_base): Adjust lookup_base call.
2729 (build_vtbl_ref_1): Likewise.
2730 (warn_about_ambiguous_bases): Likewise. Add early exit.
2731 * cvt.c (convert_to_pointer_force) Adjust lookup_base call.
2732 * search.c (accessible_base_p): Add consider_local_p parameter.
2733 (lookup_base): Pass consider_local_p to accessible_base_p call.
2734 (friend_accessible_p): Check whether scope is a class member.
2735 Remove unnecessary class template check.
2736 (accessible_p): Add consider_local_p parameter. Use it.
2737 (adjust_result_of_qualified_name_lookup): Adjust lookup_base call.
2738 * tree.c (maybe_dummy_object): Likewise.
2739 * typeck.c (comp_except_type): Use PUBLICLY_UNIQUELY_DERIVED_P.
2740 (build_class_member_access_expr): Adjust lookup_base call.
2741 * typeck2.c (binfo_or_else): Likewise.
2742 * rtti.c (build_dynamic_cast_1): Access can consider friendship
2745 2004-10-17 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2748 * decl2.c (grokfield): Apply attributes also to TYPE_DECLs.
2750 2004-10-16 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2753 * parser.c (cp_parser_parenthesized_expression_list): Fold
2754 non-dependent expressions in attribute lists.
2756 2004-10-15 Mark Mitchell <mark@codesourcery.com>
2759 * decl.c (declare_global_var): Use the return value from pushdecl.
2762 * parser.c (cp_parser_simple_declaration): Do not diagnose invalid
2763 type names if we have already found a valid type.
2764 (cp_parser_member_declaration): Likewise.
2767 * parser.c (cp_parser_member_specification_opt): Handle
2770 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
2772 * dump.c, g++spec.c, repo.c: Update copyright.
2774 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
2776 * decl.c: Fix a comment typo.
2778 2004-10-13 Andrew Pinski <pinskia@physics.uc.edu>
2781 * name-lookup.c (parse_using_directive): If we have a
2782 error_mark_node, do not set the decl namespace associations
2785 2004-10-14 Mark Mitchell <mark@codesourcery.com>
2788 * decl.c (cp_finish_decl): Do not call expand_static_init more
2789 than once for a single variable.
2791 2004-10-14 Matt Austern <austern@apple.com>
2793 * Make-lang.in (pt.o): depends on pointer-set.h
2794 * cp-tree.h (cp_walk_subtrees): Last argument is pointer_set_t* now.
2795 * pt.c (struct pair_fn_data): Use pointer_set_t, not htab_t
2796 (for_each_template_parm): Convert from htab_t to pointer_set_t.
2797 * tree.c (cp_walk_subtrees): Last argument is pointer_set_t* now.
2799 2004-10-13 Andrew Pinski <pinskia@physics.uc.edu>
2802 * semantics.c (finish_for_expr): Convert expression to void
2803 so that we don't create temporaries for a?b:c.
2805 2004-10-13 Kazu Hirata <kazu@cs.umass.edu>
2807 * search.c: Fix a comment typo.
2809 2004-10-12 Nathan Sidwell <nathan@codesourcery.com>
2811 * class.c (dfs_modify_vtables): Simplify condition. Return
2812 dfs_skip_bases as appropriate.
2813 (modify_all_vtables): Walk in pre-order.
2814 * search.c (dfs_walk_all, dfs_walk_once_r,
2815 dfs_walk_once_accessible_r): Assert post order function never
2816 returns dfs_skip_bases.
2818 * search.c (struct lookup_base_data_s): New.
2819 (lookup_base_r): Replace with ...
2820 (dfs_lookup_base): ... this.
2821 (lookup_base): Use dfs_walk_all.
2823 2004-10-12 Kazu Hirata <kazu@cs.umass.edu>
2825 * search.c: Fix comment typos.
2827 2004-10-11 Mark Mitchell <mark@codesourcery.com>
2830 * parser.c (cp_parser_declarator): Add member_p parameter.
2831 (cp_parser_condition): Adjust calls to cp_parser_declarator.
2832 (cp_parser_explicit_instantiation): Likewise.
2833 (cp_parser_init_declarator): Likewise.
2834 (cp_parser_direct_declarator): Add member_p parameter. Do not
2835 parse tentatively when parsing the parameters to a member.
2836 (cp_parser_type_id): Adjust calls to cp_parser_declarator.
2837 (cp_parser_parameter_declaration): Likewise.
2838 (cp_parser_member_declaration): Likewise.
2839 (cp_parser_exception_declaration): Likewise.
2842 * cp-tree.h (CLASSTYPE_TEMPLATE_SPECIALIZATION): Add a comment.
2843 * pt.c (optimize_specialization_lookup_p): Do not optimize lookups
2844 for members of partial or explicit specializations.
2847 * decl2.c (finish_anon_union): Robustify.
2849 2004-10-11 Nathan Sidwell <nathan@codesourcery.com>
2851 * cp-tree.h (get_dynamic_cast_base_type): Rename to ...
2852 (dcast_base_hint): ... here.
2853 * rtti.c (build_dynamic_cast_1): Use dcast_base_hint.
2854 * search.c (struct dcast_data_s): New.
2855 (dynamic_cast_base_recurse): Remove. Replace with ...
2856 (dfs_dcast_hint_pre, dfs_dcast_base_post): ... these. New.
2857 (get_dynamic_cast_base_type): Rename to ...
2858 (dcast_base_hint): ... here. Use dfs_walk_once_accessible.
2859 (accessible_r): Remove.
2860 (dfs_accessible_post): New, broken out of accessible_r.
2861 (accessible_p): Use dfs_walk_once_accessible.
2862 (dfs_walk_once_accessible_r): New. From accessible_r.
2863 (dfs_walk_once_accessible): New. From acessible_p.
2865 * cp-tree.h (SAME_BINFO_TYPE_P): New.
2866 * class.c (build_base_path): Use SAME_BINFO_TYPE_P to compare
2868 (convert_to_base_statically, determine_primary_bases,
2869 update_vtable_entry_for_fn, dfs_modify_vtables, build_vtt_inits,
2870 dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
2871 accumulate_vtbl_inits, dfs_accumulate_vtbl_inits,
2872 build_vtbl_initializer, add_vcall_offset_vtbl_entries_1): Likewise.
2873 * init.c (expand_member_init): Likewise.
2874 * search.c (lookup_base_r, dynamic_cast_base_recurse,
2875 binfo_via_virtual, copied_binfo, binfo_for_vbase,
2876 original_binfo): Likewise.
2877 * tree.c (copy_binfo): Likewise.
2879 2004-10-11 Kazu Hirata <kazu@cs.umass.edu>
2881 * semantics.c: Fix comment typos.
2883 2004-10-10 Andrew Pinski <pinskia@physics.uc.edu>
2888 * semantics.c (maybe_cleanup_point_expr): Call
2889 fold_build_cleanup_point_expr.
2890 (maybe_cleanup_point_expr_void): New function.
2891 (add_decl_expr): Call maybe_cleanup_point_expr_void.
2892 (finish_expr_stmt): Likewise.
2893 (finish_return_stmt): Likewise.
2894 (finish_for_expr): Likewise.
2895 (finish_asm_stmt): Likewise.
2896 * typeck.c (condition_conversion): Call
2897 fold_build_cleanup_point_expr.
2899 2004-10-10 Andrew Pinski <pinskia@physics.uc.edu>
2902 * semantics.c (add_decl_expr): If the decl has a size which
2903 has side effects then the decl expression needs a cleanup point.
2905 2004-10-10 Mark Mitchell <mark@codesourcery.com>
2908 * decl.c (grokdeclarator): Robustify error-recovery on invalid
2911 2004-10-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
2913 Convert diagnostics to use quoting flag q 7/n
2914 * typeck.c (composite_pointer_type_r, composite_pointer_type,
2915 cxx_sizeof_or_alignof_type, cxx_sizeof_or_alignof_expr,
2916 string_conv_p, build_class_member_access_expr,
2917 build_class_member_access_expr, lookup_destructor,
2918 finish_class_member_access_expr, build_indirect_ref,
2919 get_member_function_from_ptrfunc, build_function_call,
2920 convert_arguments, build_binary_op, pointer_diff, build_unary_op,
2921 check_for_casting_away_constness, build_static_cast,
2922 build_reinterpret_cast, build_const_cast, build_c_cast,
2923 build_modify_expr, get_delta_difference, build_ptrmemfunc,
2924 dubious_conversion_warnings, convert_for_assignment,
2925 convert_for_initialization,
2926 maybe_warn_about_returning_address_of_local, check_return_expr):
2929 * typeck2.c (error_not_base_type, readonly_error,
2930 abstract_virtuals_error, cxx_incomplete_type_diagnostic,
2931 store_init_value, digest_init, build_x_arrow,
2932 build_m_component_ref, require_complete_eh_spec_types): Likewise.
2934 * tree.c (cp_build_qualified_type_real,
2935 handle_java_interface_attribute, handle_init_priority_attribute):
2938 * semantics.c (finish_asm_stmt, finish_non_static_data_member,
2939 finish_pseudo_destructor_expr,
2940 check_template_template_default_arg, begin_class_definition,
2941 finish_base_specifier, qualified_name_lookup_error,
2942 finish_id_expression, finish_typeof): Likewise.
2944 * search.c (lookup_base, check_final_overrider,
2945 look_for_overrides_r): Likewise.
2947 * rtti.c (get_tinfo_decl, build_dynamic_cast_1): Likewise.
2949 2004-10-09 Mark Mitchell <mark@codesourcery.com>
2952 * error.c (dump_expr): Correct handling of AGGR_INIT_EXPRs using a
2956 * init.c (build_new): Correct comments.
2957 * parser.c (cp_parser_new_expression): Use NULL_TREE for nelts in
2961 * parser.c (cp_parser_postfix_dot_deref_expression): If the
2962 pseduo-destructor-name production does not work, fall back to the
2963 ordinary production.
2966 * tree.c (cp_tree_equal): Handle a BASELINK.
2969 * cp-tree.h (check_var_type): New function.
2970 * decl.c (check_var_type): New function, split out from ...
2971 (grokdeclarator): ... here.
2972 * pt.c (tsubst_decl): Use check_var_type.
2975 * decl.c (grokdeclarator): Disallow declarations of operators as
2978 2004-10-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2981 * error.c (dump_expr): Add missing case for RDIV_EXPR.
2983 2004-10-08 Kazu Hirata <kazu@cs.umass.edu>
2985 * pt.c, search.c: Fix comment typos.
2987 2004-10-08 Nathan Sidwell <nathan@codesourcery.com>
2989 * cp-tree.h (dfs_walk, dfs_walk_real, dfs_unmark, markedp,
2991 (dfs_skip_bases, dfs_walk_all, dfs_walk_once): New.
2992 * class.c (struct find_final_overrider_data): Remove most_derived,
2993 vpath_list and vpath fields. Add path field.
2994 (dfs_find_final_ocerrider_1): Add DEPTH parameter. Adjust.
2995 (dfs_find_final_overrider): Rename to ...
2996 (dfs_find_final_overrider_pre): ... here. Adjust.
2997 (dfs_find_final_overrider_post): Adjust.
2998 (dfs_find_final_overrider_q): Fold into
2999 dfs_find_final_overrider_pre.
3000 (find_final_overrider): Adjust dfs searching.
3001 (dfs_modify_vtables): Don't mark binfo here.
3002 (modify_all_vtables): Use dfs_walk_once.
3003 (build_vtt_inits): Likwise. Use dfs_walk_all.
3004 (dfs_build_secondary_vptr_vtt_inits): Don't mark binfo here.
3005 Return dfs_skip_bases as appropriate.
3006 (dfs_fixup_binfo_vtbls): Return dfs_skip_bases as appropriate.
3007 * init.c (dfs_initialized_vtbl_ptrs): Return dfs_skip_bases as
3008 appropriate. Don't mark binfo here.
3009 (initialize_vtbl_ptrs): Use dfs_walk_once.
3010 * search.c (struct vbase_info): Remove unused struct.
3011 (access_in_type): Use dfs_walk_once.
3012 (dfs_access_in_type): Don't mark binfo here.
3013 (dfs_accessible_queue_p, dfs_accessible_p) Remove.
3015 (accessible_r): ... here. New. Specialize dfs_walk_once.
3016 (accessible_p): Use accessible_r.
3017 (lookup_field_queue_p): Remove. Fold into ...
3018 (lookup_field_r): ... here. Adjust.
3019 (lookup_member): Use dfs_walk_all.
3020 (dfs_walk_real, dfs_walk): Replace with ...
3021 (dfs_walk_all, dfs_walk_once): ... these.
3022 (dfs_walk_once_r, dfs_unmark_r): Workers for dfs_walk_once.
3023 (dfs_unmark, unmarkedp, markedp): Remove.
3024 (dfs_get_pure_virtuals): Don't mark binfo here.
3025 (get_pure_virtuals): Use dfs_walk_once.
3026 (dfs_debug_unmarked_p): Remove. Fold into ...
3027 (dfs_debug_mark): ... here.
3028 (note_debug_info_needed): Use dfs_walk_all.
3030 2004-10-07 Andrew Pinski <pinskia@physics.uc.edu>
3032 * pt.c (tsubst_expr) <case ASM_EXPR>: Look passed the
3033 CLEANUP_POINT_EXPR to get the asm expression.
3035 2004-10-07 Mark Mitchell <mark@codesourcery.com>
3037 * cp-tree.h (ICS_USER_FLAG): Remove comment about obsolete flag.
3038 (DECL_MEMBER_TEMPLATE_P): New macro.
3039 (is_member_template): Remove.
3040 (class_method_index_for_fn): New function.
3041 * pt.c (build_over_call): Use DECL_MEMBER_TEMPLATE_P.
3042 * class.c (finish_struct_methods): Remove out-of-date comment.
3043 * decl.c (copy_fn_p): Use DECL_MBMER_TEMPLATE_P.
3044 * decl2.c (check_classfn): Use DECL_MEMBER_TEMPLATE_P and
3045 class_method_index_for_fn.
3046 * pt.c (is_member_template): Remove.
3047 (is_member_template_class): Likewise.
3048 (optimize_specialization_lookup_p): New function.
3049 (retrieve_specialization): Optimize lookups for members that are
3050 not member templates.
3051 (register_specialization): Adjust accordingly.
3052 (build_template_decl): Add member_template_p parameter. Set
3053 DECL_MEMBER_TEMPLATE_P.
3054 (process_partial_specialization): Adjust call to
3055 retrieve_specialization.
3056 (push_template_decl_real): Determine whether the template is a
3058 (lookup_template_class): Use retrieve_specialization.
3059 (tsubst_decl): Adjust call to retrieve_specialization.
3060 (tsubst_exception_specification): New function.
3062 (tsubst_copy): Use DECL_MEMBER_TEMPLATE_P.
3063 (instantiate_template): Adjust call to retrieve_specialization.
3064 (regenerate_decl_from_template): Do not actually generate a new
3066 (instantiate_decl): Adjust call to retrieve_specialization.
3067 (class_method_index_for_fn): New method.
3069 2004-10-07 Andrew Pinski <pinskia@physics.uc.edu>
3071 * parser.c (cp_parser_asm_definition): Look passed the
3072 CLEANUP_POINT_EXPR to get the asm expression.
3074 2004-10-06 Andrew Pinski <pinskia@physics.uc.edu>
3077 * semantics.c (finish_asm_stmt): Asm expressions need cleanup
3080 2004-10-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
3082 Convert diagnostics to use quoting flag q 6/n
3083 * pt.c (finish_member_template_decl, check_specialization_scope,
3084 maybe_process_partial_specialization, determine_specialization,
3085 check_explicit_specialization, maybe_check_template_type,
3086 process_partial_specialization, check_default_tmpl_args,
3087 push_template_decl_real, redeclare_class_template,
3088 convert_nontype_argument, coerce_template_parms,
3089 lookup_template_class, push_tinst_level,
3090 instantiate_class_template, tsubst_arg_types,
3091 tsubst_function_type, tsubst, tsubst_qualified_id,
3092 tsubst_copy_and_build, check_instantiated_args,
3093 do_decl_instantiation, do_type_instantiation,
3094 invalid_nontype_parm_type_p, check_specialization_namespace,
3095 convert_template_argument, determine_specialization,
3096 check_template_shadow, tsubst_decl
3097 instantiate_pending_templates): Use quoting marks.
3099 2004-10-05 Nathan Sidwell <nathan@codesourcery.com>
3102 * parser.c (cp_parser_postfix_expression): Inhibit Koenig when
3103 unqualified lookup finds a member function.
3105 2004-10-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
3107 Convert diagnostics to use quoting flag q 5/n
3108 * parser.c (cp_parser_name_lookup_error,
3109 cp_parser_diagnose_invalid_type_name,
3110 cp_parser_primary_expression, cp_parser_unqualified_id,
3111 cp_parser_nested_name_specifier_opt, cp_parser_labeled_statement,
3112 cp_parser_jump_statement, cp_parser_simple_declaration,
3113 cp_parser_decl_specifier_seq, cp_parser_mem_initializer_id,
3114 cp_parser_type_parameter, cp_parser_template_id,
3115 cp_parser_template_name, cp_parser_direct_declarator,
3116 cp_parser_parameter_declaration_list, cp_parser_class_head,
3117 cp_parser_base_specifier, cp_parser_lookup_name,
3118 cp_parser_late_parsing_default_args,
3119 cp_parser_optional_template_keyword
3120 cp_parser_elaborated_type_specifier, cp_parser_check_class_key,
3121 cp_parser_check_access_in_redeclaration): Use quoting marks.
3123 * name-lookup.c (supplement_binding, pushdecl,
3124 check_for_out_of_scope_variable, validate_nonmember_using_decl,
3125 do_nonmember_using_decl, lookup_tag, set_decl_namespace,
3126 push_namespace, do_namespace_alias, do_using_directive,
3127 ambiguous_decl, lookup_namespace_name, add_function): Likewise.
3129 * method.c (use_thunk): Likewise.
3131 * lex.c (unqualified_name_lookup_error,
3132 unqualified_fn_lookup_error): Likewise.
3134 2004-10-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
3136 Convert diagnostics to use quoting flag q 4/n
3137 * except.c (decl_is_java_type, build_throw,
3138 is_admissible_throw_operand, check_handlers_1, check_handlers):
3139 Use quoting formats.
3140 * friend.c (add_friend, make_friend_class, do_friend): Likewise.
3141 * init.c (sort_mem_initializers, emit_mem_initializers,
3142 member_init_ok_or_else, expand_member_init, is_aggr_type,
3143 build_offset_ref, build_java_class_ref): Likewise.
3145 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
3147 Convert diagnostics to use quoting flag q 3/n
3148 * decl.c (pop_label, duplicate_decls, redeclaration_error_message,
3149 redeclaration_error_message, lookup_label, check_goto,
3150 make_typename_type, make_unbound_class_template,
3151 fixup_anonymous_aggr, check_tag_decl, start_decl, start_decl_1,
3152 grok_reference_init, layout_var_decl, maybe_commonize_var,
3153 check_for_uninitialized_const_var, reshape_init_array,
3154 reshape_init, check_initializer, cp_finish_decl,
3155 member_function_or_else, bad_specifiers, grokfndecl, grokvardecl,
3156 check_static_variable_definition, compute_array_index_type,
3157 create_array_type_for_decl, check_special_function_return_type,
3158 grokdeclarator, check_default_argument, grokparms,
3159 grok_ctor_properties, grok_op_properties,
3160 check_elaborated_type_specifier, xref_tag, finish_enum,
3161 build_enumerator, check_function_type, start_preparsed_function,
3162 store_parm_decls): Use quoting formats.
3163 * decl2.c (grok_array_decl, delete_sanity, check_member_template,
3164 check_java_method, check_classfn, finish_static_data_member_decl,
3165 grokfield, grokbitfield, grok_function_init,
3166 build_anon_union_vars, coerce_new_type, coerce_delete_type,
3167 check_default_args): Likewise.
3168 * parser.c (cp_parser_decl_specifier_seq): Likewise.
3170 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
3172 Convert diagnostics to use quoting flag q 2/n
3173 * class.c (build_base_path, add_method, alter_access,
3174 handle_using_decl, check_bases,
3175 maybe_warn_about_overly_private_class, find_final_overrider,
3176 warn_hidden, finish_struct_anon, add_implicitly_declared_members,
3177 check_bitfield_decl, check_field_decls, layout_empty_base,
3178 build_base_field, check_methods, layout_virtual_bases,
3179 warn_about_ambiguous_bases, layout_class_type, finish_struct_1,
3180 resolve_address_of_overloaded_function, instantiate_type,
3181 note_name_declared_in_class): Use format flag "q" for quoting.
3183 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
3185 Convert diagnostics to use quoting flag q 1/n
3186 * error.c (locate_error): Ignore quoting flag q.
3187 * call.c (build_user_type_conversion_1, build_operator_new_call,
3188 build_object_call, op_error, build_conditional_expr,
3189 build_new_op, build_op_delete_call, enforce_access,
3190 convert_like_real, convert_arg_to_ellipsis, build_x_va_arg,
3191 convert_default_arg, build_over_call, build_new_method_call,
3192 joust, perform_implicit_conversion, initialize_reference): Use the
3195 2004-10-03 Andrew Pinski <pinskia@physics.uc.edu>
3198 * typeck.c (build_reinterpret_cast): Return if the inner type
3201 2004-10-01 Jan Hubicka <jh@suse.cz>
3203 * semantics.c (expand_body): Update call of tree_rest_of_compilation.
3205 2004-09-30 Nathan Sidwell <nathan@codesourcery.com>
3207 * cp-tree.h (struct lang_decl): Shrink by reordering fields and
3208 turning operator_code and fixed_offset into bitfields.
3210 2004-09-29 Joseph S. Myers <jsm@polyomino.org.uk>
3212 * decl.c (duplicate_decls): Merge TREE_DEPRECATED.
3214 2004-09-29 Jason Merrill <jason@redhat.com>
3216 PR tree-optimization/17697
3217 * decl.c (duplicate_decls): Copy TREE_NOTHROW from newdecl to olddecl.
3219 2004-09-28 Jason Merrill <jason@redhat.com>
3222 * class.c (build_base_field): Set TYPE_MODE.
3224 2004-09-28 Roger Sayle <roger@eyesopen.com>
3227 * g++spec.c (lang_specific_driver): Unrecognized libraries, other
3228 than -lc and -lm, may require linking against libstc++.
3230 2004-09-28 Kazu Hirata <kazu@cs.umass.edu>
3232 * tree.c: Fix a comment typo.
3234 2004-09-28 Nathan Sidwell <nathan@codesourcery.com>
3236 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): Remove.
3237 (struct secondary_vptr_vtt_init_data_s): New.
3238 (build_vtt_inits): Adjust dfs_walkers.
3239 (dfs_build_secondary_vptr_vtt_inits): Caller data is a
3240 secondary_vptr_vtt_init_data_s structure. Adjust.
3241 (dfs_ctor_vtable_bases_queue_p): Remove.
3242 (dfs_fixup_binfo_vtbls): No need to clear BINFO_MARKED. Simplify.
3244 * pt.c (struct get_template_base_data_s): Remove.
3245 (get_template_base_r): Fold into get_template_base.
3246 (get_template_base): Walk base binfos directly in inheritance
3249 2004-09-27 Mark Mitchell <mark@codesourcery.com>
3252 * cp-tree.h (fold_if_not_in_template): New function.
3253 * call.c (build_conditional_expr): Use fold_if_not_in_template.
3254 (build_cxx_call): Likewise.
3255 * cvt.c (convert_to_complex): Likewise.
3256 (ocp_convert): Likewise.
3257 (convert): Likewise.
3258 (convert_force): Likewise.
3259 * decl.c (compute_array_index_type): Clear
3260 processing_template_decl while folding array bounds.
3261 * pt.c (convert_nontype_argument): Clear
3262 processing_template_decl while processing non-type argument
3264 * tree.c (fold_if_not_in_template): New function.
3265 * typeck.c (build_class_member_access_expr): Use
3266 fold_if_not_in_template.
3267 (build_array_ref): Likewise.
3268 (build_binary_op): Likewise. Do not try to optimize computations
3269 when processing templates.
3270 (cp_pointer_int_sum): Use fold_if_not_in_template.
3271 (pointer_diff): Likewise.
3272 (build_unary_op): Likewise.
3273 (build_reinterpret_cast): Likewise.
3274 (get_delta_difference): Likewise.
3275 (expand_ptrmemfunc_cst): Likewise.
3276 (dubious_conversion_warnings): Likewise.
3278 2004-09-27 Matt Austern <austern@apple.com>
3280 * cp/parser.c (struct cp_token): New one-bit field , implicit_extern_c
3281 (cp_lexer_get_preprocessor_token): Set implicit_extern_c for
3282 tokens that come from headers that are implicitly extern "C".
3283 (struct cp_parser): new one-bit field, implicit_extern_c.
3284 (cp_parser_new): Set parser's implicit_extern_c to false.
3285 (cp_parser_translation_unit): Pop lang context if we were in a
3286 header that was implicitly extern "C".
3287 (cp_parser_declaration_seq_opt): Push/pop lang context as
3288 required by the token's and parser's implicit_extern_c.
3290 2004-09-27 Mark Mitchell <mark@codesourcery.com>
3293 * cp-tree.h (shared_member_p): Declare.
3294 * search.c (shared_member_p): Give it external linkage.
3295 * semantics.c (finish_qualified_id_expr): Use it.
3296 (finish_id_expression): Likewise.
3299 * semantics.c (finish_id_expression): Do not add "this->" to
3300 static member functions.
3302 2004-09-27 Nathan Sidwell <nathan@codesourcery.com>
3305 * error.c (dump_type): Change TREE_VEC case into TREE_BINFO.
3307 * class.c (struct count_depth_data): Remove.
3308 (dfs_depth_post, dfs_depth_q): Remove.
3309 (find_final_overrider): Use number of vbase classes as depth
3312 * cp-tree.h (types_overlap_p): Remove.
3313 * search.c (struct overlap_info): Remove.
3314 (dfs_check_overlap, dfs_no_overlap_yet, types_overlap_p): Remove.
3316 * pt.c (GTB_VIA_VIRTUAL, GTB_IGNORE_TYPE): Remove.
3317 (get_template_base_recursive): Remove. Replace with ...
3318 (get_template_base_r): ... this.
3319 (struct get_template_base_data_s): New.
3320 (get_template_base): Use get_template_base_r via dfs_walk. Always
3321 return NULL on failure.
3322 (unify): Remove error_mark_node check from get_template_base result.
3324 2004-09-24 Paolo Bonzini <bonzini@gnu.org>
3326 * parser.c (cp_parser_expression_stack): Clarify why it is
3327 an array of NUM_PREC_VALUES elements.
3328 (cp_parser_binary_expression): Clarify why we do not need to
3329 handle stack overflow.
3331 2004-09-24 Nathan Sidwell <nathan@codesourcery.com>
3334 * search.c (lookup_field_queue_p): Correct check for hidden base.
3336 * search.c (bfs_walk): Remove.
3337 (lookup_member): Use dfs_walk_real.
3338 (dfs_walk_real): Move and adjust documentation from bfs_walk.
3340 2004-09-23 Zack Weinberg <zack@codesourcery.com>
3342 * decl.c (grokfndecl): If ::main is found not to return int,
3343 correct it after issuing a diagnostic.
3344 (grokdeclarator): If the incoming type was error_mark_node, do
3345 not complain about declaring something with no type.
3346 (start_function): Change check for ::main not returning int to
3347 an assertion, as grokfndecl now catches this when the user did it.
3348 * init.c (perform_member_init, sort_mem_initializers)
3349 (emit_mem_initializers): Make most diagnostics be issued on
3350 the line of current_function_decl, not whatever the current
3352 * parser.c (cp_lexer_peek_token_emit_debug_info): Surround
3353 definition and declaration with #ifdef ENABLE_CHECKING.
3354 Avoid unnecessary use of fprintf.
3355 (cp_lexer_print_token, cp_lexer_debug_stream): Adjust stub
3356 definitions to avoid warnings.
3357 (cp_lexer_new_main): Add assertion that first token is not a
3359 (cp_lexer_new_from_token_array): Fold into ...
3360 (cp_lexer_new_from_tokens): ... here. Add assertion that
3361 first token is not a padding token.
3362 (cp_lexer_set_source_position_from_token): Move nearer to callers.
3363 Remove unused lexer argument.
3364 (cp_lexer_peek_token): Just print debugging report (if enabled)
3365 and return lexer->next_token.
3366 (cp_lexer_skip_purged_tokens): Delete.
3367 (cp_lexer_next_token_is, cp_lexer_next_token_is_not): Make
3368 inline, simplify bodies.
3369 (cp_lexer_peek_nth_token): Add debugging report a la
3370 cp_lexer_peek_token.
3371 (cp_lexer_consume_token): Correct commentary. Advance over
3372 purged tokens here. Set current source position here, from
3373 token to be returned. Avoid unnecessary use of fprintf.
3374 (cp_lexer_purge_token): Advance next_token pointer over this and
3375 subsequent purged tokens.
3376 (cp_parser_error): Adjust source position to that of the
3378 (cp_parser_push_lexer_for_tokens, cp_parser_pop_lexer): New functions.
3379 (cp_parser_string_literal): Remove some excessive cleverness.
3380 (cp_parser_enum_specifier): Call start_enum before consuming
3382 (cp_parser_member_declaration): Make the "extra semicolon"
3383 diagnostic consistently-worded with the other place this is
3384 diagnosed. Explicitly set the diagnostic location to the
3385 location of the offending semicolon.
3386 (cp_parser_enclosed_template_argument_list): Use %</%> quoting
3387 in diagnostics. Do not use cp_parser_require. Set location
3388 of diagnostics about improper use of '>>' to location of
3390 (cp_parser_late_parsing_for_member):
3391 Use cp_parser_push_lexer_for_tokens and cp_parser_pop_lexer.
3392 (cp_parser_late_parsing_default_args): Likewise. Manually
3393 move some logic outside the loop.
3395 2004-09-23 Andrew Pinski <pinskia@physics.uc.edu>
3398 * cvt.c (cp_convert_to_pointer): Return early when the type is
3401 2004-09-21 Fariborz Jahanian <fjahanian@apple.com>
3405 * decl.c (grokfndecl): Add new argument "attrlist", use it
3406 to call cplus_decl_attributes.
3407 (start_function): Remove call to cplus_decl_attributes.
3408 * cvt.c (ocp_convert): Add support to use type conversion
3409 function to vector type.
3410 * parser.c (cp_parser_conversion_type_id): Add attributes, if any,
3413 2004-09-23 Paolo Bonzini <bonzini@gnu.org>
3417 * parser.c (cp_parser_token_tree_map_node,
3418 cp_parser_pm_expression, cp_parser_additive_expression,
3419 cp_parser_multiplicative_expression, cp_parser_shift_expression,
3420 cp_parser_relational_expression, cp_parser_equality_expression,
3421 cp_parser_and_expression, cp_parser_exclusive_or_expression,
3422 cp_parser_inclusive_or_expression,
3423 cp_parser_logical_and_expression,
3424 cp_parser_logical_or_expression): Removed.
3425 (enum cp_parser_prec, struct cp_parser_token_tree_map_node,
3426 binops, binops_by_token): New.
3427 (cp_parser_assignment_expression): Use cp_parser_binary_expression.
3428 (cp_parser_new): Initialize binops_by_token.
3429 (cp_parser_binary_expression): Rewritten.
3432 2004-09-23 Kazu Hirata <kazu@cs.umass.edu>
3434 * parser.c: Fix a comment typo.
3436 2004-09-23 Nathan Sidwell <nathan@codesourcery.com>
3439 * decl.c (xref_basetypes): Look through typedefs before checking
3442 2004-09-22 Nathan Sidwell <nathan@codesourcery.com>
3444 * cp-tree.h (unemitted_tinfo_decls): Make a VEC(tree).
3445 * decl2.c (cp_finish_file): Adjust tinfo decl emission loop.
3446 * rtti.c (unemitted_tinfo_decls): Make a VEC(tree).
3447 (init_rtti_processing): Initialize it to something realistic.
3448 (get_tinfo_decl): Adjust pushing the new decl.
3450 * cp-tree.h (struct lang_type_class): Remove marked flags, add
3451 diamond_shaped and repeated_base flags. Reorder to keep 8-bit blocks.
3452 (TYPE_MARKED_P): New.
3453 (CLASSTYPE_DIAMOND_SHAPED_P, CLASSTYPE_REPEATED_BASE_P): New.
3454 (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
3455 CLEAR_CLASSTYPE_MARKED_N): Remove.
3456 (CLASSTYPE_MARKED_*, SET_CLASSTYPE_MARKED_*,
3457 CLEAR_CLASSTYPE_MARKED_*): Remove.
3458 * decl.c (xref_basetypes): Use TYPE_MARKED_P. Determine diamond
3459 shaped and repeated base properties.
3460 * lex.c (cxx_make_type): Don't clear TYPE_ALIAS_SET.
3461 * rtti.c (dfs_class_hint_mark, dfs_class_hint_unmark,
3462 class_hint_flags): Remove.
3463 (get_pseudo_ti_init): Use CLASSTYPE_REPEATED_BASE_P and
3464 CLASSTYPE_DIAMOND_SHAPED_P.
3466 2004-09-21 Ziemowit Laski <zlaski@apple.com>
3468 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved here from
3470 (objcp_tsubst_copy_and_build): Reformat function signature.
3471 * cp-objcp-common.h (objcp_tsubst_copy_and_build): Likewise.
3472 (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved to cp-lang.c.
3474 2004-09-21 Zack Weinberg <zack@codesourcery.com>
3476 * parser.c (cp_lexer_peek_token, cp_lexer_consume_token):
3477 Don't handle CPP_PRAGMA tokens specially.
3478 (cp_lexer_handle_pragma): Use cp_lexer_consume_token. Don't
3479 purge the token; do clear token->value after processing. Add
3480 assertion at beginning that token->value is nonzero.
3481 (cp_parser_statement, cp_parser_declaration_seq_opt): Handle
3482 CPP_PRAGMA as a full statement or declaration in its own right.
3484 2004-09-21 Matt Austern <austern@apple.com>
3487 * decl.c (grokvardecl): Accept declarations of global variables
3488 using anonymous types.
3490 2004-09-21 Roger Sayle <roger@eyesopen.com>
3493 * tree.c (lvalue_p_1): Disallow MIN_EXPR and MAX_EXPR as lvalues
3494 if either operand has side-effects.
3495 * typeck.c (rationalize_conditional_expr): Assert that neither
3496 operand of MIN_EXPR or MAX_EXPR has side-effects.
3497 (build_modify_expr): Add support for MIN_EXPR and MAX_EXPR.
3498 Check that the "lhs" is a valid lvalue, i.e. that neither operand
3499 of a MIN_EXPR or MAX_EXPR has a side-effect.
3501 2004-09-21 Nathan Sidwell <nathan@codesourcery.com>
3503 * cp-tree.h (struct lang_type_header): Remove
3504 uses_multiple_inheritance field.
3505 (TYPE_USES_MULTIPLE_INHERITANCE): Remove.
3506 (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): Remove.
3507 (TYPE_USES_VIRTUAL_BASECLASSES): Remove.
3508 (DECL_NEEDS_VTT_PARM_P): Use CLASSTYPE_VBASECLASSES.
3509 (TYPE_CONTAINS_VPTR_P): Likewise.
3510 * call.c (add_template_candidate_real): Use
3511 CLASSTYPE_VBASECLASSES.
3512 (build_special_member_call): Likewise.
3513 * class.c (finish_struct_bits): Remove
3514 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P & TYPE_USES_VIRTUAL_BASECLASSES
3516 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
3517 (create_vtable_ptr): Remove TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P
3519 (build_vtt_inits): Use CLASSTYPE_VBASECLASSES.
3520 (accumulate_vtbl_inits, build_vbase_offset_vtbl_entries):
3522 * decl.c (xref_basetypes): Remove TYPE_USES_MULTIPLE_INHERITANCE,
3523 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
3525 (cxx_maybe_build_cleanup): Use CLASSTYPE_VBASECLASSES.
3526 * decl2.c (maybe_retrofit_in_chrg): Likewise.
3527 * init.c (expand_member, push_base_cleanups): Likewise.
3528 * pt.c (instantiate_class_template): Remove
3529 TYPE_USES_MULTIPLE_INHERITANCE,
3530 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
3532 * ptree.c (cxx_print_type): Remove TYPE_USES_MULTIPLE_INHERITANCE
3534 * typeck2.c (process_init_constructor): Replace some sorrys with
3537 2004-09-21 Andreas Tobler <a.tobler@schweiz.ch>
3539 * decl.c (reshape_init_array): Initialize max_index_cst to fix
3542 2004-09-20 Mark Mitchell <mark@codesourcery.com>
3545 * pt.c (tsubst): Fix parentheses to accomodate emacs.
3546 (tsubst_baselink): If we get a single function, mark it as used.
3548 2004-09-20 Matt Austern <austern@apple.com>
3549 Zack Weinberg <zack@codesourcery.com>
3551 * decl.c (make_rtl_for_nonlocal_decl, start_preparsed_function):
3552 Apply lbasename to input_filename before passing to get_fileinfo.
3553 * semantics.c (begin_class_definition): Likewise.
3554 * lex.c (handle_pragma_interface): Apply get_fileinfo to the
3555 correct filename. Rename variables to be less confusing.
3556 (handle_pragma_implementation): Likewise. Disable "appears
3557 after file is included" diagnostic.
3559 * parser.c (struct cp_token): Add in_system_header fiag.
3560 (CP_TOKEN_BLOCK_NUM_TOKENS, struct cp_token_block)
3561 (CP_TOKEN_BUFFER_SIZE, cp_token_cache_push_token)
3562 (CPP_NONE, cp_lexer_read_token): Delete.
3563 (struct cp_lexer): Remove first_token, string_tokens,
3564 main_lexer_p fields. Clarify comments.
3565 (struct cp_token_cache): Now just a pair of pointers.
3566 (CP_LEXER_BUFFER_SIZE): New #define.
3567 (CPP_PURGED): New fake token type.
3568 (cp_lexer_new_from_token_array, cp_lexer_destroy)
3569 (cp_lexer_peek_token_emit_debug_info, cp_lexer_skip_purged_tokens)
3570 (cp_lexer_handle_pragma, cp_token_cache_new, cp_parser_string_literal):
3572 (cp_lexer_new_from_tokens): Now a simple wrapper around
3573 cp_lexer_new_from_token_array.
3574 (cp_lexer_set_source_position_from_token): Also update
3576 (cp_lexer_next_token, cp_lexer_prev_token, cp_lexer_advance_token):
3578 (cp_lexer_token_difference): Dont handle wrapping round.
3579 (cp_lexer_new_main): Enable pragma deferral and raw strings,
3580 read the entire translation unit through c_lex_with_flags into
3581 this lexer's buffer, then turn raw strings back off again.
3582 (cp_lexer_grow_buffer): Adjust for buffer no longer being circular.
3583 (cp_lexer_get_preprocessor_token): No need to handle not being
3584 the main lexer. Set token->in_system_header too.
3585 (cp_lexer_peek_token): Skip purged tokens. Feed pragma tokens
3586 to cp_lexer_handle_pragma. No need to call cp_lexer_read_token.
3587 (cp_lexer_peek_nth_token): Likewise.
3588 (cp_lexer_purge_token): Mark the token PURGED, don't shift all
3589 the other tokens down.
3590 (cp_lexer_purge_tokens_after): Likewise.
3591 (cp_lexer_save_tokens, cp_lexer_rollback_tokens): Don't worry
3592 about there being no tokens.
3593 (cp_lexer_print_token): Revise to give useful information on
3595 (struct cp_parser): Add field translate_strings_p.
3596 (cp_parser_new): Initialize it.
3597 (cp_parser_translation_unit): Destroy the lexer when done.
3598 (cp_parser_parameter_declaration): Restructure saving of
3600 (cp_parser_save_member_function_body): Likewise.
3601 (cp_parser_check_for_invalid_template_id)
3602 (cp_parser_nested_name_specifier_opt, cp_parser_template_id):
3603 Adjust calls to cp_lexer_advance_token.
3604 (cp_parser_skip_to_closing_parenthesis, cp_parser_declaration):
3605 No need to fiddle c_lex_string_translate.
3606 (cp_parser_primary_expression, cp_parser_linkage_specification)
3607 (cp_parser_asm_definition, cp_parser_asm_specification_opt)
3608 (cp_parser_asm_operand_list, cp_parser_asm_clobber_list)
3609 Use cp_parser_string_literal.
3610 (cp_parser_attribute_list): Save and restore
3611 parser->translate_strings_p, not c_lex_string_translate.
3612 (cp_parser_cache_group): Delete.
3613 (cp_parser_cache_group_1): Rename cp_parser_cache_group. Do
3614 not take a cache argument.
3616 2004-09-20 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3619 * decl.c (reshape_init): Extract array handling into...
3620 (reshape_init_array): New function. Use integers instead of trees
3621 for indices. Handle out-of-range designated initializers.
3623 2004-09-20 Steven Bosscher <stevenb@suse.de>
3625 * lex.c (cxx_init): Don't set the ridpointer for RID_NULL
3628 2004-09-19 Mark Mitchell <mark@codesourcery.com>
3630 * decl2.c (determine_visibility): Allow class visibility
3631 directives to override targetm.cxx.export_class_data.
3633 2004-09-18 Kazu Hirata <kazu@cs.umass.edu>
3635 * call.c, semantics.c: Follow spelling conventions.
3636 * class.c: Fix a comment typo.
3638 2004-09-16 Geoffrey Keating <geoffk@apple.com>
3641 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
3642 (handle_pragma_implementation): Likewise.
3644 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
3645 Zack Weinberg <zack@codesourcery.com>
3647 * cp-tree.def: Use tree_code_class enumeration constants
3648 instead of code letters.
3649 * call.c, class.c, cp-gimplify.c, cp-lang.c, cxx-pretty-print.c
3650 * mangle.c, pt.c, semantics.c, tree.c, typeck.c:
3651 Update for new tree-class enumeration constants.
3653 2004-09-16 Mark Mitchell <mark@codesourcery.com>
3656 * parser.c (cp_parser_simple_declaration): Commit to tentative
3657 parses after seeing a decl-specifier.
3658 (cp_parser_simple_declaration): Eliminate spurious message.
3659 (cp_parser_init_declarator): Adjust error message.
3662 * lex.c (unqualified_name_lookup_error): Mark the dummy
3663 declaration as used.
3666 * parser.c (cp_parser_nested_name_specifier): Do not resolve
3667 typename types if the user explicitly said "typename".
3669 2004-09-16 Andrew MacLeod <amacleod@redhat.com>
3671 * error.c (dump_decl): Make sure there is lang_specific info before
3672 checking for DTOR and CTOR decls.
3674 2004-09-16 Nathan Sidwell <nathan@codesourcery.com>
3676 * class.c (copy_virtuals): Remove.
3677 (build_primary_vtable): Use copy_list directly.
3678 (build_secondary_vtable): Likewise.
3679 (update_vtable_entry_for_fn): Clear BV_CALL_INDEX here.
3680 (create_vtable_ptr): Likewise.
3682 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
3684 * search.c: Follow spelling conventions.
3686 2004-09-16 Nathan Sidwell <nathan@codesourcery.com>
3688 * cp-tree.h (struct lang_type_class): Make pure_virtuals a
3690 (CLASSTYPE_INLINE_FRIENDS, CLASSTYPE_PURE_VIRTUALS): Update
3692 * call.c (build_new_method_call): Don't confirm a pure virtual is
3693 in CLASSTYPE_PURE_VIRTUALS. Reorder checks. Make it a warning.
3694 * class.c (check_methods): CLASSTYPE_INLINE_FRIENDS is a VEC(tree).
3695 (fixup_inline_methods, finish_struct): Likewise.
3696 * decl.c (finish_method): Likewise.
3697 * search.c (dfs_get_pure_virtuals, get_pure_virtuals):
3698 CLASSTYPE_PURE_VIRTUALS is a VEC(tree).
3699 * typeck2.c (abstract_virtuals_error): Likewise. Truncate the
3700 vector to avoid repeating the list in error messages.
3702 2004-09-15 Mark Mitchell <mark@codesourcery.com>
3704 * cp-objcp-common.h (LANG_HOOKS_COMDAT_GROUP): Define.
3705 * cp-tree.h (cxx_comdat_group): Declare.
3706 * decl.c (cxx_comdat_group): New function.
3708 2004-09-15 Nathan Sidwell <nathan@codesourcery.com>
3710 * search.c (get_pure_virtuals): Remove unused variables.
3712 * cp-tree.h (struct lang_decl_flags): Remove
3713 needs_final_overrider.
3714 (DECL_NEEDS_FINAL_OVERRIDER_P): Remove.
3715 * decl.c (duplicate_decls): Do not copy DECL_NEEDS_FINAL_OVERRIDER_P.
3716 * class.c (finish_struct_bits): Correct comment about
3717 CLASSTYPE_PURE_VIRTUALS.
3718 * search.c (get_pure_virtuals): Remove useless loop.
3720 2004-09-14 Mark Mitchell <mark@codesourcery.com>
3723 * mangle.c (partially_mangled_name): New variable.
3724 (partially_mangled_name_len): Likewise.
3725 (save_partially_mangled_name): New function.
3726 (restore_partially_mangled_name): Likewise.
3727 (write_encoding): Save and restore partially mangled names around
3728 calls to get_mostly_instantiated_function_type.
3729 (write_unqualified_name): Likewise.
3731 2004-09-14 Nathan Sidwell <nathan@codesourcery.com>
3733 * pt.c (unify): Replace gcc_unreachable with gcc_assert.
3735 2004-09-13 Mark Mitchell <mark@codesourcery.com>
3738 * parser.c (cp_parser_id_expression): Correct value for
3740 (cp_parser_nested_name_specifier_opt): Look through typenames as
3742 (cp_parser_template_name): Honor check_dependency_p.
3745 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name):
3749 * pt.c (unify): Add ENUMERAL_TYPE case. Replace sorry with
3752 2004-09-12 Richard Henderson <rth@redhat.com>
3755 * semantics.c (maybe_cleanup_point_expr): Don't call fold.
3756 * typeck.c (condition_conversion): Likewise.
3758 2004-09-11 Richard Henderson <rth@redhat.com>
3761 * pt.c (cur_stmt_expr): Move from tsubst_expr.
3762 (tsubst_expr) <case STMT_EXPR>: Move ...
3763 (tsubst_copy_and_build): ... here.
3765 2004-09-10 Zack Weinberg <zack@codesourcery.com>
3767 * cp-tree.h (interface_only, interface_unknown): Delete declarations;
3768 comment explaining them moved to c-common.h.
3769 * lex.c (interface_only, interface_unknown, extract_interface_info):
3771 (cxx_finish): Don't reset interface_unknown.
3772 (handle_pragma_interface): Don't set interface_only and
3773 interface_unknown; just the like-named fields in finfo.
3774 (handle_pragma_implementation): Adjust comment.
3775 * decl2.c (cp_finish_file): Don't reset interface_only and
3777 * method.c (synthesize_method): Don't reset interface_unknown or
3778 call extract_interface_info.
3779 * pt.c (pop_tinst_level): Don't call extract_interface_info.
3780 * decl.c (start_cleanup_fn): Don't save or restore interface_only
3781 and interface_unknown.
3782 (make_rtl_for_nonlocal_decl): Call get_fileinfo on input_filename
3783 and use the result instead of the interface_only/interface_unknown
3785 (start_preparsed_function): Likewise.
3786 * lex.c (cxx_make_type): Likewise.
3787 * semantics.c (begin_class_definition): Likewise.
3788 (expand_body): Don't call extract_interface_info.
3790 2004-09-10 Ziemowit Laski <zlaski@apple.com>
3792 * decl.c (objc_mark_locals_volatile): Make description of
3793 routine more descriptive; only mark VAR_DECLs at each
3796 2004-09-10 Richard Henderson <rth@redhat.com>
3799 * call.c (build_vfield_ref): Move...
3800 * class.c (build_vfield_ref): ... here. Convert datum to the
3801 primary base containing the vptr.
3802 (make_new_vtable): Simplify build_primary_vtable arguments.
3803 (finish_struct_1): Do not duplicate TYPE_VFIELD.
3804 * typeck.c (build_class_member_access_expr): Don't warn for
3805 null object access to base fields.
3807 2004-09-10 Ziemowit Laski <zlaski@apple.com>
3809 * decl.c (objc_get_current_scope, objc_mark_locals_volatile):
3810 New functions, to be called from ObjC++.
3812 2004-09-10 Kazu Hirata <kazu@cs.umass.edu>
3814 * class.c, cp-tree.h, decl.c, decl2.c, mangle.c,
3815 name-lookup.h, parser.c, search.c, semantics.c, typeck2.c: Fix
3818 2004-09-09 Ziemowit Laski <zlaski@apple.com>
3820 * typeck.c (build_c_cast): Preserve the cast if casting
3821 to and from an Objective-C type.
3823 2004-09-09 Ziemowit Laski <zlaski@apple.com>
3825 * Make-lang.in (cp/typeck.o): Depend on c-common.h.
3826 * typeck.c: Include c-common.h.
3827 (comptypes): For RECORD_TYPEs, call objc_comptypes() and
3828 return the result if nonnegative.
3830 2004-09-09 Zack Weinberg <zack@codesourcery.com>
3832 * decl2.c (import_export_class)
3833 * lex.c (handle_pragma_interface):
3834 Test MULTIPLE_SYMBOL_SPACES with if, not #ifdef.
3836 2004-09-08 Ziemowit Laski <zlaski@apple.com>
3838 * Make-lang.in (cp/semantics.o): Depend on c-common.h.
3839 * semantics.c: Include c-common.h.
3840 (finish_compound_stmt): Call objc_clear_super_receiver().
3842 2004-09-08 Ziemowit Laski <zlaski@apple.com>
3844 * cp-tree.h (do_poplevel): New prototype.
3845 * semantics.c (do_poplevel): Make externally visible.
3847 2004-09-08 Nathan Sidwell <nathan@codesourcery.com>
3849 * cp-tree.h (tree_pair_s): Define a GC'd vector.
3850 * name-lookup.h (cxx_saved_binding, cp_class_binding): Likewise.
3851 * semantics.c (deferred_access): Likewise.
3853 2004-09-06 Daniel Jacobowitz <dan@debian.org>
3855 * semantics.c (expand_body): Assert that we are not nested.
3857 2004-09-06 Zack Weinberg <zack@codesourcery.com>
3859 * decl.c (build_enumerator): Use add_double and int_fits_type_p
3860 instead of cp_build_binary_op, to avoid creating short-lived trees.
3861 * parser.c (cp_parse_type_specifier <RID_ENUM>): Use two-token
3862 lookahead instead of backtracking. Move some code to avoid a
3864 (cp_parser_enum_specifier): Avoid duplication of effort with caller.
3865 Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
3866 (cp_parser_enumerator_list, cp_parser_enumerator_definition):
3867 Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
3869 2004-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3871 * decl.c (grok_declarator): Remove a redundant semicolon.
3873 * parser.c (cp_parser_decl_specifier_seq, cp_parser_type_specifier):
3874 Correct comments describing function parameters.
3876 2004-09-03 Matt Austern <austern@apple.com>
3877 Compile speed improvement.
3878 * parser.c (cp_lexer_print_token): Only define if ENABLE_CHECKING set.
3879 Otherwise define a stub macro that expands to nothing.
3880 (cp_lexer_debugging_p): Only define if ENABLE_CHECKING set. Otherwise
3881 define a stub macro that expands to 0.
3882 (cp_lexer_start_debugging): Only define if ENABLE_CHECKING set.
3883 (cp_lexer_stop_debugging): Likewise.
3884 (cp_lexer_debug_stream): Only define if ENABLE_CHECKING set. Otherwise
3885 define a stub macro that expands to NULL.
3886 (cp_lexer_new_main): Only set debugging_p if ENABLE_CHECKING set.
3887 (cp_lexer_new_from_tokens): Likewise.
3889 2004-09-03 Jan Hubicka <jh@suse.cz>
3891 * decl.c (finish_function): Clean out pointers we no longer need.
3893 2004-09-03 Jan Beulich <jbeulich@novell.com>
3895 * g++spec.c (MATH_LIBRARY_PROFILE): Default to MATH_LIBRARY rather
3898 2004-09-02 Paul Brook <paul@codesourcery.com>
3900 * decl2.c (determine_visibility): Only check data visibility
3903 2004-08-31 Mark Mitchell <mark@codesourcery.com>
3905 * cp-tree.h (DECL_CONSTRUCTION_VTABLE_P): New macro.
3906 * class.c (build_ctor_vtbl_group): Set DECL_CONSTRUCTION_VTABLE_P.
3907 * decl2.c (determine_visibility): Honor
3908 TARGET_CXX_EXPORT_CLASS_DATA.
3910 * class.c (key_method): Rename to ...
3911 (determine_key_method): ... this.
3912 (finish_struct_1): Adjust accordingly.
3913 * cp-tree.h (key_method): Declare.
3914 * decl2.c (maybe_emit_vtables): Determine the key method here if
3915 it has not already been done.
3917 2004-08-31 Ziemowit Laski <zlaski@apple.com>
3919 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-objcp-common.o.
3920 (cp/cp-lang.o): Depend on debug.h, gtype-cp.h and cp/cp-objcp-common.h.
3921 (cp/cp-decl.c): Do not depend on gtype-cp.h.
3922 (cp/cp-objcp-common.o): New target.
3923 * cp-lang.c: Include debug.h, cp-objcp-common.h and gtype-cp.h.
3924 (cxx_get_alias_set, cxx_warn_unused_global_decl, cp_expr_size,
3925 cp_tree_size, cp_var_mod_type_p, cxx_initialize_diagnostics): Move
3926 prototypes and definitions to cp-objcp-common.h and cp-objcp-common.c,
3928 (LANG_HOOKS_TREE_SIZE, LANG_HOOKS_FINISH,
3929 LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_INIT_OPTIONS,
3930 LANG_HOOKS_INITIALIZE_DIAGNOSTICS, LANG_HOOKS_HANDLE_OPTION,
3931 LANG_HOOKS_HANDLE_FILENAME, LANG_HOOKS_MISSING_ARGUMENT,
3932 LANG_HOOKS_POST_OPTIONS, LANG_HOOKS_GET_ALIAS_SET,
3933 LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_EXPAND_EXPR,
3934 LANG_HOOKS_EXPAND_DECL, LANG_HOOKS_PARSE_FILE,
3935 LANG_HOOKS_DUP_LANG_SPECIFIC_DECL, LANG_HOOKS_TRUTHVALUE_CONVERSION,
3936 LANG_HOOKS_SET_DECL_ASSEMBLER_NAME, LANG_HOOKS_MARK_ADDRESSABLE,
3937 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
3938 LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
3939 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_PRINT_ERROR_FUNCTION,
3940 LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL, LANG_HOOKS_WRITE_GLOBALS,
3941 LANG_HOOKS_FUNCTION_INIT, LANG_HOOKS_FUNCTION_FINAL,
3942 LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P,
3943 LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE,
3944 LANG_HOOKS_ATTRIBUTE_TABLE, LANG_HOOKS_TREE_INLINING_WALK_SUBTREES,
3945 LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN,
3946 LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS,
3947 LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P,
3948 LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P,
3949 LANG_HOOKS_TREE_INLINING_VAR_MOD_TYPE_P,
3950 LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN,
3951 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN, LANG_HOOKS_EXPR_SIZE,
3952 LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR,
3953 LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, LANG_HOOKS_MAKE_TYPE,
3954 LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE,
3955 LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
3956 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE, LANG_HOOKS_INCOMPLETE_TYPE_ERROR,
3957 LANG_HOOKS_TYPE_PROMOTES_TO, LANG_HOOKS_REGISTER_BUILTIN_TYPE,
3958 LANG_HOOKS_GIMPLIFY_EXPR, LANG_HOOKS_FOLD_OBJ_TYPE_REF): Move
3959 hooks to cp-objcp-common.h.
3960 (finish_file): New function.
3961 * cp-objcp-common.c: New file.
3962 * cp-objcp-common.h: New file.
3963 * cp-tree.h (cp_finish_file): New prototype.
3964 * decl.c: Do not include gtype-cp.h.
3965 * decl2.c (finish_file): Rename to cp_finish_file.
3967 2004-08-31 Richard Henderson <rth@redhat.com>
3970 * pt.c (tsubst_expr): Move OFFSETOF_EXPR handling ...
3971 (tsubst_copy_and_build): ... here.
3973 2004-08-30 Mark Mitchell <mark@codesourcery.com>
3975 * cp-tree.h (initialize_artificial_var): Declare.
3976 * decl.c (initialize_artifical_var): New function.
3977 * class.c (initialize_array): Remove.
3978 (initialize_vtable): Use initialize_artificial_var.
3979 (build_vtt): Likewise.
3980 (build_ctor_vtbl_group): Likewise.
3982 2004-08-30 Richard Henderson <rth@redhat.com>
3984 * class.c (build_base_path): Use build_address directly.
3985 * typeck.c (build_unary_op): Don't lower &a.b to pointer
3986 arithmetic directly.
3987 * typeck2.c (store_init_value): Don't assume !TREE_CONSTANT
3988 means !initializer_constant_valid_p.
3990 2004-08-30 Richard Henderson <rth@redhat.com>
3992 * class.c (fixed_type_or_null): Use get_base_address before
3993 assuming an ADDR_EXPR is non-null.
3995 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
3997 * name-lookup.c (pop_binding, pushdecl,
3998 set_identifier_type_value_with_scope, push_overloaded_decl,
3999 arg_assoc_type): Replace abort with gcc_assert or gcc_unreachable.
4000 * parser.c (cp_parser_diagnose_invalid_type_name,
4001 cp_parser_postfix_expression, cp_parser_unary_expression,
4002 cp_parser_check_declarator_template_para): Likewise.
4003 * pt.c (push_inline_template_parms_recursive,
4004 check_explicit_specialization, convert_nontype_argument,
4005 coerce_template_template_parms, uses_template_parms,
4006 instantiate_class_template, tsubst_decl, tsubst, tsubst_copy,
4007 tsubst_expr, instantiate_template,
4008 maybe_adjust_types_for_deduction, type_unification_real,
4009 resolve_overloaded_unification, template_decl_level,
4010 type_dependent_expression_p): Likewise.
4011 * search.c (lookup_base_r): Likewise.
4012 * semantics.c (finish_stmt_expr, simplify_aggr_init_expr): Likewise.
4013 * tree.c (lvalue_p_1, count_functions, cxx_printable_name,
4014 verify_stmt_tree_r, get_type_decl, stabilize_call): Likewise.
4015 * typeck.c (common_type, get_member_function_from_ptrfunc,
4016 build_binary_op, build_unary_op, expand_ptrmemfunc_cst): Likewise.
4017 * typeck2.c (cxx_incomplete_type_diagnostic,
4018 split_nonconstant_init_1, store_init_value,
4019 process_init_constructor): Likewise.
4021 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
4023 * call.c (check_dtor_name): Replace abort with gcc_assert or
4025 (build_call, add_builtin_candidate, build_new_op,
4026 convert_like_real, build_over_call, in_charge_arg_for_name,
4027 source_type, joust): Likewise.
4028 * class.c (build_simple_base_path, get_vcall_index,
4029 finish_struct_1, instantiate_type, get_enclosing_class,
4030 add_vcall_offset_vtbl_entries_1, cp_fold_obj_type_ref): Likewise.
4031 * cp-gimplify.c (cp_genericize): Likewise.
4032 * cp-lang.c (cp_expr_size, cp_tree_size): Likewise.
4033 * cvt.c (cp_convert_to_pointer, ocp_convert): Likewise.
4034 * decl.c (poplevel, make_unbound_class_template, reshape_init,
4035 check_special_function_return_type, grokdeclarator,
4036 grok_op_properties, tag_name, xref_tag, start_preparsed_function,
4037 finish_function): Likewise.
4038 * decl2.c (grokfield, maybe_emit_vtables):Likewise.
4039 * error.c (dump_global_iord, dump_decl, dump_template_decl,
4040 language_to_string): Likewise.
4041 * except.c (choose_personality_routine): Likewise.
4042 * friend.c (do_friend): Likewise.
4043 * g++spec.c (lang_specific_driver): Likewise.
4044 * init.c (build_zero_init, expand_default_init, build_new_1,
4045 build_vec_delete_1, build_vec_init, build_dtor_call): Likewise.
4046 * lex.c (retrofit_lang_decl, cp_type_qual_from_rid): Likewise.
4047 * mangle.c (add_substitution, write_unscoped_name,
4048 write_template_prefix, write_identifier,
4049 write_special_name_destructor, write_type, write_builtin_type,
4050 write_expression, write_template_param,
4051 write_java_integer_type_codes): Likewise.
4052 * method.c (implicitly_declare_fn): Likewise.
4054 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
4056 * cp-tree.h (BINFO_PRIMARY_P): Use a binfo flag.
4057 (BINFO_INDIRECT_PRIMARY_P): Remove.
4058 * class.c (determine_primary_base): Rename to ...
4059 (determine_primary_bases): ... here. Set all primary bases.
4060 (set_primary_base): Remove.
4061 (mark_primary_bases): Remove.
4062 (build_simple_base_path, walk_subobject_offsets,
4063 propagate_binfo_offsets, end_of_class): Adjust.
4064 (layout_class_type): Rename determine_primary_base call.
4065 (dump_class_hierarchy_r, dump_vtable): Adjust. Don't pass a binfo
4067 (dfs_build_secondary_vptr_vtt_inits, dfs_accumulate_vtbl_inits,
4068 build_rtti_vtbl_entries): Adjust.
4069 * init.c (build_vtbl_address): Adjust.
4071 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Use gcc_assert.
4073 2004-08-28 Ziemowit Laski <zlaski@apple.com>
4075 * Make-lang.in (CXX_OBJS): Split up into CXX_OBJS and
4076 CXX_AND_OBJCXX_OBJS.
4077 (CXX_C_OBJS): Include in CXX_AND_OBJCXX_OBJS instead of listing
4078 separately on the link line.
4080 2004-08-28 Jason Merrill <jason@redhat.com>
4082 * decl.c (expand_static_init): Avoid bogus warnings.
4084 2004-08-27 Jason Merrill <jason@redhat.com>
4087 * tree.c (stabilize_init): See through a COMPOUND_EXPR.
4090 * decl.c (expand_static_init): Use thread-safety API.
4091 (register_dtor_fn): Return the call, don't expand it.
4092 * tree.c (add_stmt_to_compound): New fn.
4093 (stabilize_call): Use it.
4095 2004-08-27 Richard Henderson <rth@redhat.com>
4097 * cp-tree.def (OFFSETOF_EXPR): New.
4098 * parser.c (cp_parser_builtin_offsetof): Either built an
4099 OFFSETOF_EXPR, or call fold_offsetof immediately.
4100 * pt.c (tsubst_expr): Handle OFFSETOF_EXPR.
4102 2004-08-27 Nathan Sidwell <nathan@codesourcery.com>
4104 * call.c (validate_conversion_obstack): Replace
4105 my_friendly_assert with gcc_assert or gcc_unreachable.
4106 (direct_reference_binding, merge_conversion_sequences,
4107 build_user_type_conversion_1, perform_overload_resolution,
4108 build_op_delete_call, enforce_access, call_builtin_trap,
4109 build_over_call, build_special_member_call, build_new_method_call,
4110 initialize_reference): Likewise.
4111 * class.c (build_base_path, build_primary_vtable, alter_access,
4112 check_bases, update_vtable_entry_for_fn, layout_empty_base,
4113 clone_function_decl, adjust_clone_args,
4114 type_requires_array_cookie, include_empty_classes,
4115 finish_struct_1, resolve_address_of_overloaded_function,
4116 instantiate_type, get_vtbl_decl_for_binfo, build_vtt_inits,
4117 dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
4118 accumulate_vtbl_inits, build_vtbl_initializer,
4119 build_vbase_offset_vtbl_entries, build_rtti_vtbl_entries): Likewise.
4120 * cvt.c (build_up_reference, convert_to_reference): Likewise.
4121 * decl.c (poplevel, duplicate_decls, make_typename_type,
4122 cxx_init_decl_processing, reshape_init, check_initializer,
4123 make_rtl_for_nonlocal_decl, initialize_local_var, cp_finish_decl,
4124 expand_static_init, grokfndecl, grokvardecl, build_ptrmem_type,
4125 grokdeclarator, copy_fn_p, grok_op_properties, xref_tag,
4126 xref_basetypes, start_preparsed_function, save_function_data,
4127 finish_function, finish_method, maybe_register_incomplete_var,
4128 complete_vars): Likewise.
4129 * decl2.c (grok_array_decl, check_member_template,
4130 check_classfn, finish_static_data_member_decl, coerce_new_type,
4131 coerce_delete_type, import_export_class, decl_needed_p,
4132 determine_visibility, import_export_decl, build_cleanup,
4133 start_static_initialization_or_destructi, do_static_destruction,
4134 prune_vars_needing_no_initialization,
4135 build_offset_ref_call_from_tree): Likewise.
4136 * error.c (dump_decl, dump_expr): Likewise.
4137 * init.c (finish_init_stmts, build_zero_init,
4138 expand_virtual_init, expand_default_init, expand_aggr_init_1,
4139 build_offset_ref, build_new_1, build_delete, build_vbase_delete):
4141 * mangle.c (write_method_parms, write_template_args,
4142 write_expression, write_template_arg): Likewise.
4143 * method.c (make_thunk, finish_thunk, use_thunk): Likewise.
4144 * name-lookup.c (pop_binding, begin_scope, leave_scope,
4145 resume_scope, push_using_decl, validate_nonmember_using_decl,
4146 is_ancestor, poplevel_class, set_inherited_value_binding_p,
4147 push_class_level_binding, do_class_using_decl, push_namespace,
4148 pop_namespace, add_using_namespace, ambiguous_decl,
4149 lookup_namespace_name, lookup_type_current_level,
4150 maybe_process_template_type_declaration): Likewise.
4151 * parser.c (cp_lexer_peek_nth_token,
4152 cp_parser_parse_and_diagnose_invalid_typ,
4153 cp_parser_translation_unit, cp_parser_template_id,
4154 cp_parser_lookup_name, cp_parser_late_parsing_for_member): Likewise.
4155 * pt.c (push_access_scope, finish_member_template_decl,
4156 push_inline_template_parms_recursive, add_outermost_template_args,
4157 get_innermost_template_args, begin_explicit_instantiation,
4158 end_explicit_instantiation, retrieve_specialization,
4159 is_specialization_of, is_specialization_of_friend,
4160 register_specialization, check_explicit_specialization,
4161 comp_template_parms, process_template_parm,
4162 process_partial_specialization, convert_nontype_argument,
4163 coerce_template_template_parms, coerce_template_parms,
4164 mangle_class_name_for_template, lookup_template_function,
4165 lookup_template_class, instantiate_class_template, tsubst_decl,
4166 tsubst_function_type, tsubst, tsubst_qualified_id, tsubst_copy,
4167 instantiate_template, fn_type_unification, type_unification_real,
4168 get_template_base, regenerate_decl_from_template,
4169 template_for_substitution, instantiate_decl,
4170 get_mostly_instantiated_function_type, dependent_scope_ref_p,
4171 value_dependent_expression_p, resolve_typename_type): Likewise.
4172 * repo.c (repo_emit_p): Likewise.
4173 * rtti.c (build_headof, get_tinfo_decl, get_pseudo_ti_init,
4174 create_tinfo_types, emit_tinfo_decl): Likewise.
4175 * search.c (lookup_base_r, lookup_base, lookup_field_1,
4176 dfs_access_in_type, build_baselink, lookup_member,
4177 adjust_result_of_qualified_name_lookup, copied_binfo): Likewise.
4178 * semantics.c (perform_or_defer_access_check,
4179 finish_non_static_data_member, finish_stmt_expr_expr,
4180 finish_stmt_expr, finish_call_expr, finish_pseudo_destructor_expr,
4181 finish_template_template_parm, finish_member_declaration,
4182 emit_associated_thunks): Likewise.
4183 * tree.c (build_target_expr_with_type, force_target_expr,
4184 copy_binfo, get_first_fn, cp_tree_equal): Likewise.
4185 * typeck.c (type_after_usual_arithmetic_conversions, comptypes,
4186 cxx_sizeof_or_alignof_type, perform_integral_promotions,
4187 build_class_member_access_expr, finish_class_member_access_expr,
4188 build_ptrmemfunc_access_expr, build_unary_op,
4189 unary_complex_lvalue, cxx_mark_addressable, build_modify_expr,
4190 build_ptrmemfunc, expand_ptrmemfunc_cst, check_return_expr
4191 * typeck2.c (complete_type_check_abstract,
4192 abstract_virtuals_error, process_init_constructor,
4193 add_exception_specifier): Likewise.
4195 2004-08-27 Nathan Sidwell <nathan@codesourcery.com>
4197 * class.c (build_vtbl_initializer): Use ssize_int.
4198 * decl.c (complete_array_type): Likewise.
4199 * method.c (finish_thunk): Likewise.
4200 * search.c (get_dynamic_base_type): Likewise.
4202 2004-08-26 Richard Henderson <rth@redhat.com>
4204 * cp-tree.h (DECL_FIELD_IS_BASE): New.
4205 * class.c (build_base_field): Set it.
4206 (build_simple_base_path): Use it.
4207 (fixed_type_or_null): Don't consider base fields definitive.
4209 2004-08-25 Roger Sayle <roger@eyesopen.com>
4212 PR tree-optimization/16372
4213 * decl.c (finish_enum): Make the precision of the enumerated type
4214 the same width as the underlying integer type.
4216 2004-08-25 Mark Mitchell <mark@codesourcery.com>
4219 * lex.c (build_lang_decl): Set DECL_NO_STATIC_CHAIN for all C++
4222 * mangle.c (get_identifier_nocopy): Add cast.
4224 * cp-tree.h (mangle_type): Remove.
4225 * mangle.c (globals): GTY it.
4226 (mangle_obstack): New variable.
4227 (name_obstack): Likewise.
4228 (name_base): Likewise.
4229 (write_char): Adjust accordingly.
4230 (write_chars): Likewise.
4231 (write_string): Likewise.
4232 (start_mangling): Initialize G.substitutions only one. Add
4234 (finish_mangling): Use VARRAY_CLEAR to reclaim
4235 storage in G.substitutions. Use obstack_finish.
4236 (init_mangle): Adjust for changes to variable names above.
4237 Initialize G.substitutions.
4238 (mangle_decl_string): Adjust call to start_mangling.
4239 (get_identifier_nocopy): New function.
4240 (mangle_decl): Use it.
4241 (mangle_type_string): Adjust call to start_mangling.
4242 (mangle_special_for_type): Likewise.
4243 (mangle_vtt_for_type): Likewise.
4244 (mangle_ctor_vtbl_for_type): Likewise.
4245 (mangle_thunk): Likewise.
4246 (mangle_guard_variable): Likewise.
4247 (mangle_ref_init_variable): Likewise.
4249 2004-08-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4252 * pt.c (redeclare_class_template): Check the type of non-type and
4253 template template parameter.
4255 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
4257 * call.c (convert_class_to_reference): Adjust build_int_cst calls.
4258 (build_user_type_conversion_1, convert_like_real,
4259 build_java_interface_fn_ref, build_special_member_call): Likewise.
4260 * class.c (finish_struct_1, build_vtbl_initializer): Likewise.
4261 * cp-gimplify.c (cp_gimplify_expr): Likewise.
4262 * cvt.c (cp_convert_to_pointer): Likewise.
4263 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
4264 * decl2.c (start_static_initialization_or_destruction,
4265 generate_ctor_or_dtor_function): Likewise.
4266 * except.c (build_throw): Likewise.
4267 * mangle.c (write_integer_cst): Likewise.
4268 * method.c (finish_thunk): Likewise.
4269 * rtti.c (build_headof, get_tinfo_decl_dynamic,
4270 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
4271 get_pseudo_ti_init): Likewise.
4272 * search.c (get_dynamic_cast_base_type): Likewise.
4274 2004-08-25 Zack Weinberg <zack@codesourcery.com>
4276 * class.c, search.c: Remove references to DWARF_DEBUG.
4278 2004-08-25 Adam Nemet <anemet@lnxw.com>
4280 * repo.c (extract_string): Reset backquote after one character.
4281 (get_base_filename): Fix indentation.
4283 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
4285 * decl.c (cxx_init_decl_processing): Adjust
4286 build_common_tree_nodes call.
4288 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
4291 * (is_subobject_of_p): Resurrect & optimize.
4292 (lookup_field_r): Use it.
4294 2004-08-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4297 * search.c (friend_accessible_p): Increment processing_template_decl
4298 when deal with TEMPLATE_DECL of SCOPE.
4300 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
4303 * semantics.c (check_accessibility_of_qualified_id): Defer check
4304 if qualifying_type is a template parameter.
4306 2004-08-23 Mark Mitchell <mark@codesourcery.com>
4309 * pt.c (instantiate_decl): Do not try to apply
4310 DECL_DECLARED_INLINED_P to a VAR_DECL.
4312 * search.c (build_baselink): Fix typo in comment.
4314 2004-08-22 Andrew Pinski <apinski@apple.com>
4317 2004-08-22 Andrew Pinski <apinski@apple.com>
4319 * typeck.c (build_unary_op): Use &a.b if the folded lowered
4320 expression is not constant.
4322 2004-08-23 Nathan Sidwell <nathan@codesourcery.com>
4324 * name-lookup.c (pushdecl): Rename build_type_copy call.
4325 * tree.c (cp_build_qualified_type_real,
4326 build_exception_variant, handle_java_interface_attribute): Likewise.
4328 2004-08-22 Andrew Pinski <apinski@apple.com>
4331 * typeck.c (build_unary_op): Use &a.b if the folded lowered
4332 expression is not constant.
4334 2004-08-20 Mark Mitchell <mark@codesourcery.com>
4337 * decl.c (expand_static_init): Use DECL_FUNCTION_SCOPE_P.
4339 2004-08-21 Joseph S. Myers <jsm@polyomino.org.uk>
4342 * pt.c (tsubst_copy_and_build): Avoid clearing TREE_NO_WARNING for
4345 2004-08-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4347 * pt.c (register_specialization): Check DECL_TEMPLATE_SPECIALIZATION
4348 before calling comp_template_args.
4350 2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
4352 * class.c (build_vtbl_initializer): Use build_int_cst for
4353 negative size types.
4354 * decl.c (complete_array_type): Likewise.
4355 * method.c (finish_thunk): Likewise.
4357 2004-08-20 Andreas Tobler <a.tobler@schweiz.ch>
4359 * tree.c: Remove unused mark_local_for_remap_r.
4361 2004-08-19 Eric Christopher <echristo@redhat.com>
4363 * cp-tree.h (cxx_unsave_expr_now): Delete prototype.
4364 * tree.c (cxx_unsave_expr_now): Delete.
4365 (cp_unsave_r): Ditto.
4367 2004-08-19 Mark Mitchell <mark@codesourcery.com>
4370 * pt.c (push_template_decl_real): Disallow template allocation
4371 functions with fewer than two parameters.
4373 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
4375 * cp-tree.h (build_shared_int_cst): Remove.
4376 * tree.c (shared_int_cache): Remove.
4377 (build_shared_int_cst): Remove.
4378 * class.c (finish_struct_1): Use build_int_cst.
4380 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
4382 * decl.c (finish_enum): Do not copy value node early, copy
4384 * lex.c (cxx_init): Force null_node to be unique.
4386 2004-08-19 Joseph S. Myers <jsm@polyomino.org.uk>
4389 * pt.c (tsubst_copy, tsubst_copy_and_build): Copy TREE_NO_WARNING
4390 from input for MODOP_EXPR.
4392 2004-08-18 Mark Mitchell <mark@codesourcery.com>
4394 * pt.c (dependent_template_p): Fix typo in commment.
4397 * pt.c (dependent_template_p): Treat IDENTIFIER_NODEs as
4400 2004-08-17 Mark Mitchell <mark@codesourcery.com>
4403 * pt.c (unify): Tidy ARRAY_TYPE handling. Make sure that non-type
4404 arguments have the same type as the corresponding parameter.
4407 * parser.c (cp_parser_name_lookup_error): If parser->object_scope
4408 is set use it for diagnostic purposes.
4409 (cp_parser_pseudo_destructor_name): Remove special-case error
4413 * semantics.c (expand_or_defer_fn): Honor -fkeep-inline-functions.
4416 * cp-tree.h (qualified_name_lookup_error): Add parameter.
4417 * name-lookup.c (do_class_using_decl): Restrict set of entities
4418 passed to cp_emit_debug_info_for_using more carefully.
4419 (lookup_qualified_name): Allow lookup_member to return sets of
4421 * parser.c (cp_parser_lookup_name): Add ambiguous_p parameter.
4422 (cp_parser_primary_expression): Handle ambiguous lookups.
4423 (cp_parser_template_name): Adjust use of cp_parser_lookup_name.
4424 (cp_parser_template_argument): Likewise.
4425 (cp_parser_elaborate_type_specifier): Likewise.
4426 (cp_parser_namespace_name): Likewise.
4427 (cp_parser_class_name): Likewise.
4428 (cp_parser_lookup_name_simple): Likewise.
4429 * pt.c (tsubst_qualified_id): Handle ambiguous results.
4430 (tsubst_expr): Likewise.
4431 * semantics.c (qualified_name_lookup_error): Add decl paramter.
4432 For ambiguous lookups, print candidates.
4434 2004-08-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4437 * pt.c (instantiate_pending_templates): Add int parameter. Don't
4439 * cp-tree.h (instantiate_pending_templates): Adjust prototype.
4440 * decl2.c (finish_file): Adjust call to
4441 instantiate_pending_templates.
4443 2004-08-15 Roger Sayle <roger@eyesopen.com>
4445 * call.c (build_vfield_ref, build_call, build_conditional_expr,
4446 convert_arg_to_ellipsis, build_x_va_arg, build_over_call,
4447 build_java_interface_fn_ref, build_special_member_call,
4448 build_new_method_call, initialize_reference): Replace calls to
4449 build with calls to buildN.
4450 * class.c (build_base_path, convert_to_base_statically,
4451 build_vfn_ref, instantiate_type, dfs_accumulate_vtbl_inits,
4452 build_vtbl_initializer): Likewise.
4453 * cp-gimplify.c (genericize_try_block, genericize_catch_block,
4454 gimplify_if_stmt, cp_genericize_r): Likewise.
4455 * cvt.c (convert_to_void): Likewise.
4456 * decl.c (check_initializer, finish_constructor_body,
4457 finish_destructor_body): Likewise.
4458 * error.c (dump_expr): Likewise.
4459 * except.c (build_exc_ptr, expand_start_catch_block, build_throw):
4461 * init.c (perform_member_init, expand_virtual_init,
4462 expand_cleanup_for_base, build_init, expand_default_init,
4463 build_offset_ref, decl_constant_value, build_new, build_new_1,
4464 build_vec_delete_1, build_vec_init, build_delete,
4465 push_base_cleanups, build_vec_delete): Likewise.
4466 * mangle.c (write_integer_cst): Likewise.
4467 * method.c (thunk_adjust, do_build_copy_constructor,
4468 do_build_assign_ref): Likewise.
4469 * pt.c (lookup_template_function, tsubst, tsubst_copy_and_build,
4470 unify, build_non_dependent_expr): Likewise.
4471 * rtti.c (build_headof, build_typeid, ifnonnull,
4472 build_dyanmic_cast_1, tinfo_base_init): Likewise.
4473 * semantics.c (begin_compound_stmt, finish_call_expr,
4474 finish_pseudo_destructor_expr, finish_id_expression,
4475 simplify_aggr_init_expr, finalize_nrv_r): Likewise.
4476 * tree.c (build_target_expr, build_cplus_new, array_type_nelts_top,
4477 array_type_nelts_total, stabilize_call): Likewise.
4478 * typeck.c (decay_conversion, build_class_member_access_expr,
4479 lookup_destructor, build_ptrmemfunc_access_expr, build_array_ref,
4480 get_member_function_from_ptrfunc, build_binary_op, pointer_diff,
4481 build_x_unary_op, build_unary_op, unary_complex_lvalue,
4482 build_compound_expr, build_modify_expr, expand_ptrmemfunc_cst,
4483 check_return_expr): Likewise.
4484 * typeck2.c (split_nonconstant_1, split_nonconstant_init_1,
4485 split_nonconstant_init, store_init_value, build_m_component_ref):
4488 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
4490 * call.c (convert_class_to_reference,
4491 build_user_type_conversion_1, convert_like_real,
4492 build_java_interface_fn_ref, build_special_member_call): Use
4494 * class.c (build_vtbl_initializer): Likewise.
4495 * cp-gimplify.c (cp_gimplify_expr): Likewise.
4496 * cvt.c (cp_convert_to_pointer): Likewise.
4497 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
4498 * decl2.c (start_static_initialization_or_destruction,
4499 generate_ctor_or_dtor_function): Likewise.
4500 * except.c (build_throw): Likewise.
4501 * lex.c (cxx_init): Likewise.
4502 * mangle.c (write_integer_cst): Likewise.
4503 * rtti.c (build_headof, get_tinfo_decl_dynamic,
4504 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
4505 get_pseudo_ti_init): Likewise.
4506 * search.c (get_dynamic_cast_base_type): Likewise.
4507 * tree.c (build_shared_int_cst): Likewise.
4509 2004-08-12 Mark Mitchell <mark@codesourcery.com>
4512 * class.c (count_depth_data): New type.
4513 (dfs_depth_post): New function.
4514 (dfs_depth_q): Likewise.
4515 (find_final_overrider_data_s): Change type of vpath.
4517 (dfs_find_final_overrider_1): New function.
4518 (dfs_find_final_overrider): Use it.
4519 (dfs_find_final_overrider_q): Adjust use of vpath.
4520 (dfs_find_final_overrider_post): Likewise.
4521 (find_final_overrider): Use dfs_depth. Allocate and deallocate
4524 2004-08-12 Jan Beulich <jbeulich@novell.com>
4526 * parser.c (cp_parser_asm_definition): Properly consume scope operator
4527 tokens preceding the clobbers. Don't check for scope operator
4528 following inputs. Simplify inputs handling to match that now used for
4531 2004-08-11 Mark Mitchell <mark@codesourcery.com>
4534 * except.c (build_throw): Allocate cleanup_type and the function
4535 for __cxa_throw separately.
4538 * call.c (standard_conversion): Do not accept conversions between
4539 pointers to members if the class types are unrelated.
4542 * parser.c (cp_parser_builtin_offsetof): Cast to "const volatile
4543 char &" instead of just "char &".
4546 * pt.c (tsubst): Just return the unknown_type_node.
4548 2004-08-11 Mark Mitchell <mark@codesourcery.com>
4551 * parser.c (cp_parser_class_specifier): Robustify.
4554 * pt.c (tsubst_copy_and_build): Complain about invalid
4558 * pt.c (tsubst_default_argument): Clear out current_class_ptr and
4559 current_class_ref while tsubsting.
4561 2004-08-10 Mark Mitchell <mark@codesourcery.com>
4564 * parser.c (cp_parser_init_declarator): Robustify.
4566 2004-08-06 Richard Sandiford <rsandifo@redhat.com>
4568 * typeck2.c (process_init_constructor): Guard the missing field warning
4569 with warn_missing_field_initializers rather than extra_warnings.
4571 2004-08-06 Paolo Bonzini <bonzini@gnu.org>
4573 * class.c (instantiate_type) <ENTRY_VALUE_EXPR>: Do not handle.
4575 2004-08-05 Mark Mitchell <mark@codesourcery.com>
4577 * decl.c (start_preparsed_function): Move determine_visibility
4579 * decl2.c (determine_visibility): Incorporate dllexport testing.
4581 2004-08-05 Geoffrey Keating <geoffk@apple.com>
4583 * g++spec.c (lang_specific_driver): An -Xlinker or -Wl, option
4584 means that libstdc++ is needed.
4586 2004-08-05 Nathan Sidwell <nathan@codesourcery.com>
4588 * cvt.c (cp_convert_to_pointer): Adjust force_fit_type call.
4590 2004-08-04 Geoffrey Keating <geoffk@apple.com>
4592 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_ASSEMBLER_NAME rather
4593 than passing it as a parameter to rest_of_decl_compilation.
4594 * decl2.c (grokfield): Use set_user_assembler_name.
4596 2004-08-04 Nathan Sidwell <nathan@codesourcery.com>
4598 * decl.c (complete_array_type): Don't gratuitously copy
4599 maxindex. Its type is always set.
4601 2004-08-04 Paul Brook <paul@codesourcery.com>
4603 * Make-lang.in (cp/semantics.o, cp/optimize.o): Depend on TARGET_H.
4604 * cp-tree.h (struct language_function): Rename x_dtor_label to
4606 (dtor_label): Rename ...
4607 (cdtor_label): ... to this.
4608 * decl.c (begin_constructor_body): Remove.
4609 (check_special_function_return_type): Maybe change the return type.
4610 (grokdeclarator): Pass the class type.
4611 (start_preparsed_function): Constructors may need a return label.
4612 (finish_constructor_body, finish_destructor_body): Set the return
4614 (begin_function_body): Don't call begin_constructor_body.
4615 (finish_function): Don't warn for constructors or destructors.
4616 (implicitly_declare_fn): Maybe change the return type.
4617 * optimize.c: Include target.h.
4618 (maybe_clone_body): Remap the function result.
4619 * semantics.c: Include target.h.
4620 (finish_return_stmt): Maybe jump to return label for constructors.
4622 2004-08-03 Mark Mitchell <mark@codesourcery.com>
4624 * class.c (build_vtable): Do not set DECL_VISIBILITY here.
4625 (check_field_decls): Or here.
4626 (check_methods): Or here.
4627 (initialize_array): Don't mess with DECL_CONTEXT.
4628 * cp-tree.h (start_decl): Adjust prototype.
4629 (determine_visibility): New function.
4630 * decl.c (duplicate_decls): Remove checks for hidden "operator
4632 (build_library_fn_1): Give all library functions default
4634 (start_decl): Add pop_scope_p parameter. Tidy.
4635 (cp_finish_decl): Do not pop scopes here. Call
4636 determine_visibility for variable definitions.
4637 (start_preparsed_function): Call determine_visibility.
4638 * decl2.c (determine_visibility): New function.
4639 * method.c (use_thunk): Fix formatting.
4640 * parser.c (cp_parser_condition): Adjust calls to start_decl.
4641 (cp_parser_init_declarator): Likewise.
4642 * pt.c (instantiate_decl): Always call pop_nested_class.
4643 * rtti.c (get_tinfo_decl): Do not set DECL_VISIBILITY.
4644 (tinfo_base_init): Likewise.
4646 2004-08-02 Mark Mitchell <mark@codesourcery.com>
4649 * name-lookup.c (validate_nonmember_using_decl): Robustify.
4651 2004-08-01 Mark Mitchell <mark@codesourcery.com>
4654 * name-lookup.c (decl_namespace): Remove.
4655 (current_decl_namespace): Use decl_namespace_context instead of
4657 (push_decl_namespace): Likewise.
4658 (arg_assoc_class): Likewise.
4659 (arg_assoc_type): Likewise.
4660 * pt.c (check_specialization_namespace): New function.
4661 (maybe_process_partial_specialization): Use it.
4662 (register_specialization): Likewise.
4665 * cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): New macro.
4666 * call.c (null_ptr_cst_p): Handle variables with constant
4668 * pt.c (convert_nontype_argument): Use
4669 DECL_INTEGRAL_CONSTANT_VAR_P.
4670 * semantics.c (finish_id_expression): Likewise.
4673 * decl.c (duplicate_decls): Reject duplicate namespace
4677 * typeck.c (build_ptrmemfunc): Loosen assertion.
4679 2004-08-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
4681 * call.c (z_candidate::template_decl): Rename from template.
4682 (add_template_candidate_real): Adjust member reference.
4685 2004-07-29 Mark Mitchell <mark@codesourcery.com>
4687 * cp-tree.h (IDENTIFIER_REPO_CHOSEN): Define.
4688 (lang_decl_flags): Narrow the width of "languages". Add
4690 (DECL_NEEDED_P): Remove.
4691 (FOR_EACH_CLONE): New macro.
4692 (DECL_REPO_AVAILABLE_P): Likewise.
4693 (DECL_TINFO_P): Likewise.
4694 (set_linkage_according_to_type): Declare.
4695 (import_export_vtable): Remove.
4696 (import_export_tinfo): Likewise.
4697 (mark_needed): New function.
4698 (decl_needed_p): Likewise.
4699 (note_vauge_linkage_fn): Likewise.
4700 (init_repo): Change prototype.
4701 (repo_template_used): Remove.
4702 (repo_template_instantiated): Likewise.
4703 (repo_emit_p): New function.
4704 (repo_export_class_p): Likewise.
4705 (no_linkage_check): Change prototype.
4706 * class.c (set_linkage_according_to_type): New function.
4707 (build_vtable): Use it. Do not call import_export_vtable. Set
4708 DECL_IGNORED_P if appropriate.
4709 * decl.c (duplicate_decls): Preserve DECL_REPO_AVAILABLE_P.
4710 (make_rtL_for_nonlocal_decls): Check for template instantiations
4712 (grokfndecl): Adjust call to no_linkage_check.
4713 (set_linkage_for_static_data_member): New function.
4714 (grokvardecl): Use it. Adjust call to no_linkage_check.
4715 (grokdeclarator): Use set_linkage_for_static_data_member.
4716 * decl2.c (note_vague_linkage_fn): New function.
4717 (note_vague_linkage_var): Likewise.
4718 (finish_static_data_member_decl): Use it.
4719 (import_export_vtable): Remove.
4720 (import_export_class): Use repo_export_class_p.
4721 (var_finalized_p): Simplify.
4722 (maybe_emit_vtables): Simplify.
4723 (mark_needed): New function.
4724 (decl_needed_p): Likewise.
4725 (import_export_decl): Add documentation and consistency checks.
4726 Use repo_emit_p. Handle virtual tables and RTTI information
4728 (import_export_tinfo): Remove.
4729 (write_out_vars): Call import_export_decl.
4730 (cxx_callgraph_analyze_expr): Ensure that all vtables are emitted
4732 (finish_file): Use decl_needed_p. Do not call import_export_decl
4733 for undefined static data members. Do not warn about undefined
4734 inlines when using a repository.
4735 (mark_used): Use note_vague_linkage_fn. Always defer template
4737 * lex.c (cxx_init): Adjust call to init_repo. Always set
4738 flag_unit_at_a-time.
4739 * method.c (synthesize_method): Remove unncessary
4740 import_export_decl call.
4741 (implicitly_declare_fn): Use set_linkage_according_to_type.
4742 * optimize.c (maybe_clone_body): Use FOR_EACH_CLONE.
4743 * pt.c (instantiate_class_template): Don't redundantly add classes
4744 to keyed_classes. Don't call repo_template_used.
4745 (tsubst_decl): Set DECL_INTERFACE_KNOWN for instantiations of
4746 templates with internal linkage.
4747 (check_instantiated_args): Adjust call to no_linkage_check.
4748 (instantiate_template): Use FOR_EACH_CLONE.
4749 (mark_definable): New function.
4750 (mark_decl_instantiated): Use it.
4751 (do_decl_instantiation): Adjust tests for explicit instantiation
4752 after "extern template".
4753 (instantiate_class_member): Do not use repo_template_instantiated.
4754 (do_type_instantiation): Simplify.
4755 (instantiate_decl): Use mark_definable. Check repo_emit_p.
4757 * repo.c (repo_get_id): Remove.
4758 (original_repo): Remove.
4759 (IDENTIFIER_REPO_USED): Remove.
4760 (IDENTIFIER_REPO_CHOSEN): Remove.
4761 Remove all #if 0'd code.
4762 (repo_template_used): Remove.
4763 (repo_template_instantiated): Remove.
4764 (temporary_obstack_initialized_p): New variable.
4765 (init_repo): Register with lang_post_pch_load. Avoid creating
4766 identifiers unnecessarily. Don't use original_repo. Close the
4768 (reopen_repo_file_for_write): Not here.
4769 (finish_repo): Always write out a new repository file.
4770 (repo_emit_p): New function.
4771 (repo_export_class_p): Likewise.
4772 * rtti.c (get_tinfo_decl): Use set_linkage_according_to_type.
4773 (involves_incomplete_p): New function.
4774 (tinfo_base_init): Use it.
4775 (ptr_initializer): Remove non_public_ptr parameter.
4776 (ptm_initializer): Likewise.
4777 (get_pseudo_ti_init): Likewise.
4778 (unemitted_tinfo_decl_p): Remove.
4779 (emit_tinfo_decl): Use import_export_decl.
4780 * semantics.c (expand_body): Move updates of static_ctors and
4782 (expand_or_defer_fn): ... here.
4783 * tree.c (no_linkage_check): Add relaxed_p parameter.
4785 2004-07-28 Eric Christopher <echristo@redhat.com>
4787 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
4789 2004-07-28 Nathan Sidwell <nathan@codesourcery.com>
4791 * cp-tree.h (struct tree_pair_s): New.
4792 (typedef tree_pair_p): New.
4793 (DEF_VEC_O(tree_pair_s)): New.
4794 (struct lang_type_class): Make vcall_indices a VEC(tree_pair_s).
4795 (CLASSTYPE_VCALL_INDICES): Update documentation.
4796 * class.c (get_vcall_index): Adjust.
4797 (add_vcall_offset): Adjust.
4799 2004-07-27 Kelley Cook <kcook@gcc.gnu.org>
4801 * pt.c, typeck.c: Remove spurious carriage returns.
4803 2004-07-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4806 * pt.c (coerce_template_template_parms) <PARM_DECL case>: Only check
4807 when the type of ARG is not dependent.
4809 2004-07-26 Geoffrey Keating <geoffk@apple.com>
4811 * g++spec.c (LIBSTDCXX_PROFILE): Default to LIBSTDCXX.
4812 (lang_specific_driver): If the C++ or math library options don't
4813 start with '-l', don't count them as added libraries.
4815 2004-07-26 Nathan Sidwell <nathan@codesourcery.com>
4817 * decl.c (xref_basetypes): Adjust base access vector creation.
4818 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Adjust base
4820 * search.c (dynamic_cast_base_recurse, dfs_access_in_type): Likewise.
4822 2004-07-26 Niall Douglas <s_fsfeurope2@nedprod.com>
4823 Brian Ryner <bryner@brianryner.com>
4827 * class.c (check_field_decls): Apply hidden visibility if
4828 -fvisibility-inlines-hidden and inlined unless otherwise specified
4829 (build_vtable): Set vtable visibility to class visibility.
4830 (check_field_decls): Default static member visibility to class
4832 (check_methods): Default method visibility to class visibility.
4833 * cp-tree.h: Added CLASSTYPE_VISIBILITY and
4834 CLASSTYPE_VISIBILITY_SPECIFIED macro.
4835 * decl.c (duplicate_decls): New logic for merging definition decls
4836 with declaration decls. Added ignore & warning when non default
4837 applied to global operator new or delete.
4838 * method.c, optimize.c, rtti.c: Added setting of VISIBILITY_SPECIFIED
4839 wherever VISIBILITY was changed
4840 * rtti.c (get_tinfo_decl): Set typeinfo visibility to class
4842 (tinfo_base_init): Set typeinfo name visibility to class visibility.
4844 2004-07-25 Bernardo Innocenti <bernie@develer.com>
4846 * decl.c: Rename all identifiers named `class' to `cl'.
4847 * cp-tree.h: Likewise.
4849 2004-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
4851 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Use GGC_CNEW.
4852 * typeck2.c (abstract_virtuals_error): Use GGC_NEW.
4853 * name-lookup.c (binding_entry_make): Use GGC_NEW.
4854 (binding_table_construct): Use GGC_CNEWVEC.
4855 (binding_table_new): Use GGC_NEW.
4856 (cxx_binding_make): Likewise.
4857 (begin_scope): Likewise.
4858 (push_to_top_level): Use GCC_CNEW.
4859 * parser.c (cp_token_cache_new): Likewise.
4860 (cp_token_cache_push_token): Likewise.
4861 (cp_lexer_new_main): Likewise.
4862 (cp_lexer_new_from_tokens): Likewise.
4863 (cp_parser_context_new): Likewise.
4864 (cp_parser_new): Likewise.
4865 (cp_lexer_new_from_tokens): Use GGC_NEWVEC.
4866 * lex.c (cxx_make_type): Use GGC_CNEW.
4867 (retrofit_lang_decl): Use GGC_NEWVAR.
4868 (cxx_dup_lang_specific_decl): Likewise.
4869 (copy_lang_type): Likewise.
4870 * decl.c (use_label): Use GGC_NEW instead of ggc_alloc.
4871 (save_function_data): Likewise.
4872 (lookup_label): Use GGC_CNEW instead of ggc_alloc_cleared.
4873 (cxx_push_function_context): Likewise.
4875 2004-07-25 Richard Henderson <rth@redhat.com>
4877 * decl.c (start_preparsed_function): Set DECL_ARTIFICIAL and
4878 DECL_IGNORED_P on RESULT_DECL.
4879 * semantics.c (finalize_nrv): Copy them too.
4881 2004-07-23 Nathan Sidwell <nathan@codesourcery.com>
4883 * search.c (lookup_conversion_operator): Avoid two loops.
4884 (add_conversions): Remove.
4885 (check_hidden_convs, split_conversions,
4886 lookup_conversions_r): New.
4887 (lookup_conversions): Use lookup_conversions_r.
4889 2004-07-22 Nathan Sidwell <nathan@codesourcery.com>
4891 * pt.c (get_template_base): Check type is completable.
4893 2004-07-21 Eric Christopher <echristo@redhat.com>
4895 * decl.c (poplevel): Inline unused variable checking.
4898 2004-07-21 Paolo Bonzini <bonzini@gnu.org>
4900 * typeck.c (build_binary_op): Do not use RDIV_EXPR for
4903 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4906 * pt.c (check_explicit_specialization): Remove extension to accept
4907 specializations without template headers. Fall-through to normal
4910 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4913 * pt.c (determine_specialization): New parameter template_count.
4914 Disambiguate between member templates and member functions counting
4915 the template headers.
4916 (check_explicit_specialization): Update caller.
4917 (tsubst_friend_function): Likewise.
4919 2004-07-20 Steven Bosscher <stevenb@suse.de>
4921 * cp-tree.def (TINST_LEVEL): Make it an 'x' node.
4922 * cp-tree.h (tinst_level_t): New tree type.
4923 (union lang_tree_node): Handle it.
4924 (TINST_LOCATION): New accessor macro.
4925 (make_tinst_level): New prototype.
4926 * cp-lang.c (cp_tree_size): Handle TINST_LEVEL.
4927 * decl.c (cp_tree_node_structure): Likewise.
4928 * error.c (print_instantiation_full_context): Use TINST_LOCATION.
4929 (print_instantiation_partial_context): Likewise.
4930 * pt.c (pop_tinst_level): Likewise.
4931 (push_tinst_level): Use make_tinst_level.
4932 * tree.c (make_tinst_level): New function.
4933 (cp_walk_subtrees): Walk TINST_DECL for a TINST_LEVEL node.
4935 2004-07-20 Mark Mitchell <mark@codesourcery.com>
4937 * parser.c (cp_parser_simple_type_specifier): Fix typo.
4940 * parser.c (cp_parser_simple_type_specifier): Do not record usage
4941 of globally-qualified names.
4943 2004-07-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4946 * error.c (dump_type) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Output
4949 2004-07-19 Mark Mitchell <mark@codesourcery.com>
4952 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
4953 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
4954 * class.c (add_implicitly_declared_members): Use
4955 CLASSTYPE_LAZY_ASSIGNMENT_OP.
4956 * method.c (lazily_declare_fn): Clear
4957 CLASSTYPE_LAZY_ASSIGNMENT_OP.
4958 * search.c (lookup_fnfields_1): Check it.
4960 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
4962 * cp-tree.h (vec_binfo_member): Remove.
4963 * tree.c (vec_binfo_member): Remove.
4965 * cp-tree.h (struct lang_type_class): Remove vfields field.
4966 (CLASSTYPE_VFIELDS): Remove.
4967 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
4968 * class.c (determine_primary_base): Remove CLASSTYPE_VFIELDS
4970 (dfs_modify_vtables): Use TYPE_CONTAINS_VPTR_P.
4971 (finish_struct_1): Remove CLASSTYPE_VFIELDS handling.
4972 * init.c (dfs_initialize_vtbl_ptrs): Use TYPE_CONTAINS_VPTR_P.
4974 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
4976 * cp-tree.h (DEF_VEC_P(tree)): Remove here.
4977 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
4979 (BINFO_LANG_SLOTS): Remove.
4980 * tree.c (copy_binfo): Adjust BINFO creation and accessors.
4981 * decl.c (xref_basetypes): Adjust BINFO creation and accessors.
4982 * class.c (check_bases): Adjust BINFO accessors.
4983 (determine_primary_base, finish_struct_bits,
4984 maybe_warn_about_overly_private_class, warn_hidden,
4985 walk_subobject_offsets, propagate_binfo_offsets, end_of_class,
4986 warn_about_ambiguous_bases, get_vfield_name,
4987 dump_class_hierarchy_r, build_vtt_inits, accumulate_vtbl_inits,
4988 add_vcall_offset_vtbl_entries_r): Likewise.
4989 * dump.c (cp_dump_tree): Likewise.
4990 * init.c (sort_mem_initializers, expand_member_init, build_delete,
4991 push_base_cleanups): Likewise.
4992 * method.c (do_build_copy_constructor, do_build_assign_ref,
4993 synthesize_exception_spec): Likewise.
4994 name-lookup.c (arg_assoc_class): Likewise.
4995 * pt.c (instantiate_class_template,
4996 get_template_base_recursive): Likewise.
4997 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Likewise.
4998 * typeck2.c (process_init_constructor): Likewise.
4999 * search.c (lookup_base_r, dynamic_cast_base_recurse,
5000 dfs_access_in_type, dfs_walk_real, look_for_overrides,
5001 types_overlap_p, copied_binfo, original_binfo): Likewise.
5002 (binfo_for_vtable): Remove
5004 2004-07-20 Steven Bosscher <stevenb@suse.de>
5006 * cp-tree.h (struct lang_decl_flags): Unify the template_info and
5007 thunk_alias, and the access and virtual_offset fields.
5008 (THUNK_VIRTUAL_OFFSET, THUNK_ALIAS): Adjust.
5009 * decl.c (finish_case_label): Update c_add_case_node call.
5011 2004-07-19 Mark Mitchell <mark@codesourcery.com>
5013 Revert patch for PR c++/16623.
5015 2004-07-19 Kelley Cook <kcook@gcc.gnu.org>
5017 * except.c: Remove two spurious carriage returns.
5019 2004-07-19 Mark Mitchell <mark@codesourcery.com>
5022 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
5023 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
5024 * class.c (add_implicitly_declared_members): Use
5025 CLASSTYPE_LAZY_ASSIGNMENT_OP.
5026 * method.c (lazily_declare_fn): Clear
5027 CLASSTYPE_LAZY_ASSIGNMENT_OP.
5028 * search.c (lookup_fnfields_1): Check it.
5030 2004-07-19 Nathan Sidwell <nathan@codesourcery.com>
5032 * class.c (add_method): Delay adding the slot until the end.
5033 (determine_primary_base): Adjust VEC_iterate invokation.
5034 (resort_type_method_vec, finish_struct_methods, warn_hidden,
5035 walk_subobject_offsets, end_of_class, warn_about_ambiguous_bases,
5036 build_vtbl_initializer): Likewise.
5037 * init.c (sort_mem_initializers, build_delete, push_base_cleanups,
5038 build_vbase_delete): Likewise.
5039 * method.c (do_build_copy_constructor): Likewise.
5040 * name-lookup.c (new_class_binding, print_binding_level,
5041 poplevel_class, store_class_bindings, push_to_top_level,
5042 pop_from_top_level): Likewise.
5043 * pt.c (check_explicit_specialization): Likewise.
5044 * search.c (lookup_conversion_operator, lookup_fnfields_1,
5045 get_pure_virtuals, add_conversions, dfs_check_overlap,
5046 binfo_for_vbase): Likewise.
5048 2004-07-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5051 * pt.c (unify) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Use only
5052 innermost set of template arguments during deduction. Simplify.
5054 2004-07-19 Joseph S. Myers <jsm@polyomino.org.uk>
5056 * typeck.c (build_modify_expr, build_x_modify_expr): Set
5057 TREE_NO_WARNING on assignments with an operator other than '='.
5059 2004-07-10 Steven Bosscher <stevenb@suse.de>
5060 Joseph S. Myers <jsm@polyomino.org.uk>
5062 * cp-tree.h (C_SET_EXP_ORIGINAL_CODE): Remove.
5063 * decl2.c (grokfield): Don't check current_class_depth via
5064 unused TREE_COMPLEXITY.
5065 * semantics.c (finish_parenthesized_expr): Set TREE_NO_WARNING
5066 to avoid the missing parentheses warning.
5067 Don't set C_SET_EXP_ORIGINAL_CODE.
5069 2004-07-18 Mark Mitchell <mark@codesourcery.com>
5071 * tree.c (no_linkage_helper): Remove.
5072 (no_linkage_check): Don't use walk_tree_without_duplicates.
5074 * mangle.c (write_expression): Issue a sorry for zero-operand
5077 2004-07-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5080 * init.c (build_offset_ref): Build SCOPE_REF with non-null
5081 TREE_TYPE for non-dependent names.
5082 * typeck.c (build_x_unary_op): Handle non-dependent SCOPE_REF.
5083 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
5084 unknown_type_node as its TREE_TYPE.
5085 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
5086 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
5087 (dump_expr) <SCOPE_REF case>: Likewise.
5089 2004-07-17 Jason Merrill <jason@redhat.com>
5092 * call.c (type_passed_as): Make the invisible reference type
5094 * cp-gimplify.c (gimplify_cleanup_stmt): Rename to
5095 cp_genericize_r. Handle invisible reference lowering.
5096 (is_invisiref_parm): New fn.
5097 (cp_genericize): Adjust the types of invisible reference parms.
5098 Don't repeat the walk for clones.
5099 * decl.c (store_parm_decls): Don't generate any code for clones.
5101 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
5103 * cp-tree.h (builtin_function): Declare.
5105 2004-07-16 Mark Mitchell <mark@codesourcery.com>
5107 * class.c (finish_struct_methods): Remove unncessary code.
5108 (add_implicitly_declared_members): Create declarations for default
5109 constructors and copy constructors lazily.
5110 * cp-tree.h (lang_type_class): Remove lazy_default_ctor and
5112 (CLASSTYPE_LAZY_DEFAULT_CTOR): New macro.
5113 (CLASSTYPE_LAZY_COPY_CTOR): Likewise.
5114 * decl2.c (check_classfn): Robustify.
5115 (locate_dtor): Handle empty CLASSTYPE_METHOD_VEC.
5116 (locate_ctor): Handle lazy default constructors.
5117 (locate_copy): Handle lazy copy constructors.
5118 (implicitly_declare_fn): Make sure we're looking at the
5119 TYPE_MAIN_VARIANT for a class before creating functions. Don't
5120 set TYPE_HAS_CONSTRUCTOR.
5121 (lazily_declare_fn): New function.
5122 * name-lookup.c (constructor_name_full): Simplify.
5123 * search.c (lookup_fnfields_1): Lazily create methods, as
5125 (lookup_for_overrides): Handle empty CLASSTYPE_METHOD_VEC.
5127 2004-07-16 Steven Bosscher <stevenb@suse.de>
5129 * cp-tree.h (struct lang_type): Don't have three GTY options on a
5130 single bit GTY desc.
5132 2004-07-16 Richard Henderson <rth@redhat.com>
5134 * cp-lang.c (LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING): Die.
5135 * cp-tree.h (cp_copy_res_decl_for_inlining): Remove.
5136 * tree.c (cp_copy_res_decl_for_inlining): Remove.
5138 2004-07-16 Nathan Sidwell <nathan@codesourcery.com>
5140 * class.c (finish_struct_bits): Use for loop.
5141 (propagate_binfo_offsets): Do primary binfo outside of loop.
5144 * dump.c (cp_dump_tree): Don't dump the bases if there's no
5147 * pt.c (tsubst) <TREE_BINFO case>: We should never get here.
5149 2004-07-15 Mark Mitchell <mark@codesourcery.com>
5151 * cp-tree.h (lang_type_class): Remove has_real_assign_ref and
5152 has_abstract_assign_ref. Make methods a VEC(tree) *.
5153 (TYPE_HAS_CONST_ASSIGN_REF): Add documentation.
5154 (CLASSTYPE_CONSTRUCTORS): Adjust for changes to CLASSTYPE_METHOD_VEC.
5155 (CLASSTYPE_DESTRUCTORS): Likewise.
5156 (TYPE_HAS_REAL_ASSIGN_REF): Remove.
5157 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
5158 (add_method): Change prototoype.
5159 * class.c (add_method): Remove error_p parameter. Adjust for
5160 changes to CLASSTYPE_METHOD_VEC.
5161 (handle_using_decl): Adjust call to add_method.
5162 (maybe_warn_about_overly_private_class): Adjust for
5163 changes to CLASSTYPE_METHOD_VEC.
5164 (resort_type_method_vec): Likewise.
5165 (finish_struct_methods): Likewise.
5166 (check_for_override): Likewise.
5167 (warn_hidden): Likewise.
5168 (add_implicitly_declared_members): Defer creation of assignment
5169 operators. Adjust call to add_method.
5170 (clone_function_decl): Adjust call to add_method.
5171 (check_bases_and_members): Don't set TYPE_HAS_REAL_ASSIGN_REF.
5172 (finish_struct_1): Use CLASSTYPE_DESTRUCTORS.
5173 * decl.c (grok_special_member_properties): Don't set
5174 TYPE_HAS_ABSTRACT_ASSIGN_REF.
5175 * decl2.c (check_classfn): Adjust for
5176 changes to CLASSTYPE_METHOD_VEC.
5177 * method.c (locate_dtor): Use CLASSTYPE_DESTRUCTORS.
5178 (locate_ctor): Use CLASSTYPE_CONSTRUCTORS.
5179 (locate_copy): Adjust for changes to CLASSTYPE_METHOD_VEC.
5180 (implicitly_declare_fn): Set DECL_SOURCE_LOCATION. Do not call
5182 * pt.c (check_explicit_specialization): Adjust for
5183 changes to CLASSTYPE_METHOD_VEC.
5184 (instantiate_class_template): Do not set
5185 TYPE_HAS_ABSTRACT_ASSIGN_REF.
5186 * ptree.c (cxx_print_type): Don't try to print
5187 CLASSTYPE_METHOD_VEC.
5188 * rtti.c (emit_support_tinfos): Use CLASSTYPE_DESTRUCTORS.
5189 * search.c (lookup_field_r): Adjust for
5190 changes to CLASSTYPE_METHOD_VEC.
5191 (lookup_fnfields): Likewise.
5192 (lookup_conversion_operator): Likewise.
5193 (lookup_fnfields_1): Likewise. Create assignment operators
5195 (look_for_overrides_here): Adjust for
5196 changes to CLASSTYPE_METHOD_VEC.
5197 (add_conversions): Likewise.
5198 * semantics.c (finish_member_declaration): Adjust call to add_method.
5200 2004-07-15 Jason Merrill <jason@redhat.com>
5202 * cp-lang.c (cxx_types_compatible_p): To the middle-end,
5203 references and pointers are compatible.
5205 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
5207 * decl.c (xref_basetypes): Refactor.
5208 * tree.c (copy_base_binfos): Replace with ...
5209 (copy_binfo): ... this. Deep copy the given binfo, (not the just
5210 bases of the given base).
5211 * cp-tree.h (copy_base_binfo): Remove.
5212 (copy_binfo): Declare.
5214 2004-07-15 Mark Mitchell <mark@codesourcery.com>
5216 * name-lookup.c (set_inherited_value_binding_p): Add class_type
5218 (get_class_binding): Adjust.
5219 (push_class_level_binding): Don't use set_inherited_value_binding_p.
5221 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
5223 * class.c (finish_struct_bits): Don't set TYPE_HAS_CONVERSION here.
5224 * decl.c (xref_basetypes): Set it here.
5226 * class.c (check_bases): Don't set CLASSTYPE_NON_AGGREGATE here.
5227 Don't check for incomplete base.
5228 (get_vfield_name): Simplify while loop.
5229 * decl.c (xref_basetypes): Set CLASSTYPE_NON_AGGREGATE here.
5231 2004-07-14 Mark Mitchell <mark@codesourcery.com>
5233 * lex.c (cxx_make_type): Remove call to get_pointer_type.
5235 * cp-tree.h (IDENTIFIER_VALUE): Remove.
5236 (BINFO_PUSHDECLS_MARKED): Likewise.
5237 (maybe_inject_for_scope_var): Likewise.
5238 (push_class_decls): Likewise.
5239 * name-lookup.h (push_class_binding): Remove.
5240 (innermost_non_namespace_value): New function.
5241 (outer_binding): Likewise.
5242 * class.c (add_method): Push bindings before adding to
5244 (restore_class_cache): Do not restore class_shadowed.
5245 (pushclass): Do not add USING_DECLs. Do not call
5247 * config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c.
5248 * decl.c (pushdecl): Use outer_binding.
5249 (poplevel): Set the scope for an out-of-scope for-loop declaration
5251 (cp_finish_decl): Don't call maybe_inject_for_scope_var.
5252 * name-lookup.c (new_class_binding): New function.
5253 (push_binding): Use it.
5254 (pushdecl): Use innermost_non_namespace_value.
5255 (maybe_inject_for_scope_var): Remove.
5256 (push_class_binding): Remove.
5257 (set_inherited_value_binding_p): New function.
5258 (get_class_binding): New function.
5259 (push_class_level_binding): Assert that the current_class_type is
5261 (outer_binding): New function.
5262 (innermost_non_namespace_value): Likewise.
5263 (lookup_name_real): Use outer_binding.
5264 (lookup_name_current_level): Ignore out-of-scope variables.
5265 * pt.c (check_template_shadow): Use innermost_non_namespace_value.
5266 (lookup_template_class): Likewise.
5267 * search.c (dfs_push_type_decls): Remove.
5268 (dfs_push_decls): Likewise.
5269 (setup_class_bindings): Likewise.
5270 (lookup_field_1): Handle USING_DECLs from dependent scopes.
5271 (marked_pushdecls_p): Remove.
5272 (unmarked_pushdecls_p): Remove.
5273 (marked_identifiers): Remove.
5274 (setup_class_bindings): Remove.
5275 (dfs_push_type_decls): Remove.
5276 (dfs_push_decls): Remove.
5277 (push_class_decls): Remove.
5279 2004-07-13 Mark Mitchell <mark@codesourcery.com>
5283 * decl.c (grokvardecl): Make declspecs parameter const.
5284 (grokdeclarator): Likewise. Adjust accordingly.
5285 * decl.h (grokdeclarator): Adjust declaration.
5286 * parser.c (cp_parser_init_declarator): Do not clear
5287 decl_specifiers->attributes.
5289 * cp-tree.h (lang_identifier): Remove class_value.
5290 (IDENTIFIER_CLASS_VALUE): Remove.
5291 (pop_class_decls): Likewise.
5292 (init_search_processing): Likewise.
5293 * class.c (handle_using_decl): Use lookup_member, not
5294 IDENTIFIER_CLASS_VALUE.
5295 (restore_class_cache): New function, split out from ...
5296 (pushclass): ... here. Do not call clear_identifier_class_values.
5297 (invalidate_class_lookup_cache): Do not clear
5298 IDENTIFIER_CLASS_VALUE.
5299 (popclass): Do not call pop_class_decls.
5300 (maybe_note_name_used_in_class): Do not save names looked up after
5301 the class is complete. Use lookup_member, not
5302 IDENTIFIER_CLASS_VALUE.
5303 * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
5304 * decl.c (cxx_init_decl_processing): Do not call
5305 init_search_processing.
5306 * method.c (do_build_copy_constructor): Remove unnecessary code.
5307 (do_build_assign_ref): Likewise.
5308 * name-lookup.c (pushdecl): Use lookup_member, not
5309 IDENTIFIER_CLASS_VALUE.
5310 (set_identifier_type_value_with_scope): Set TREE_TYPE on the
5312 (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
5313 (push_class_binding): Do not set it.
5314 (clear_identifier_class_values): Remove.
5315 (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
5316 (store_binding): Do not save it.
5317 (pop_from_top_level): Do not restore it.
5318 * name-lookup.h (cxx_saved_binding): Remove class_value.
5319 (clear_identifier_class_values): Remove.
5320 * ptree.c (cxx_print_identifier): Do not print
5321 IDENTIFIER_CLASS_VALUE.
5322 * search.c (search_obstack): Remove.
5323 (push_stack_level): Remove.
5324 (pop_stack_level): Remove.
5325 (search_level): Remove.
5326 (search_stack): Remove.
5327 (lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
5328 (setup_class_bindings): Use IDENTIFIER_MARKED, not
5329 IDENTIFIER_CLASS_VALUE.
5330 (marked_identifiers): New variable.
5331 (push_class_decls): Clear IDENTIFIER_MARKED.
5332 (pop_class_decls): Don't call pop_search_level.
5333 (init_search_processing): Remove.
5335 2004-07-12 Mark Mitchell <mark@codesourcery.com>
5337 * cp-tree.h (get_aggr_typedef): Remove.
5338 * init.c (get_aggr_typedef): Likewise.
5340 * name-lookup.c (push_class_level_binding): Simplify.
5342 2004-07-12 Andrew Pinski <apinski@apple.com>
5346 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
5348 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
5351 2004-07-12 Eric Christopher <echristo@redhat.com>
5353 * parser.c (cp_parser_class_head): Remove unused variable.
5355 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5357 * decl.c (grok_op_properties): Reject [de-]allocation functions
5358 declared in a namespace, or declared as static.
5360 2004-07-12 Nathan Sidwell <nathan@codesourcery.com>
5362 * cp-tree.h (make_binfo): Remove.
5363 * decl.c (xref_basetypes): Use make_tree_binfo directly.
5364 * tree.h (copy_base_binfos): Likewise.
5365 (make_binfo): Remove.
5367 * call.c (build_user_type_conversion_1, build_new_op,
5368 check_constructor_callable, build_temp,
5369 perform_direct_initialization_of_possible): Pass type directly to
5370 lookup_fnfields & build_special_member_call.
5371 (build_special_member_call): Accept a type, and complete it.
5372 * class.c (finish_stuct_bits): Copy the BINFOs here.
5373 * cvt.c (ocp_convert): Pass type directly to
5374 build_special_member_call.
5375 * decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
5376 (xref_basetypes): Allocate the binfo here. Adjust.
5377 * init.c (build_init, build_new_1): Pass type directly to
5378 build_special_member_call.
5379 * lex.c (cxx_make_type): Do not allocate binfo here.
5380 * name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
5381 * parser.c (cp_parser_class_head): Always call xref_basetypes.
5382 * pt.c (instantiate_class_template): Likewise. Inhibit access
5383 checking for template friends.
5384 * ptree.c (cxx_print_type): Adjust record printing.
5385 * search.c (lookup_base): When taking a type, complete it before
5386 looking for a binfo.
5387 (lookup_member): Delay completing a type.
5388 (push_class_decls): Don't walk an incomplete type.
5389 (lookup_conversions): Likewise.
5390 * semantics.c (finish_stmt_expr_expr): Pass type directly to
5391 build_special_member_call.
5392 * tree.c (copy_base_binfos): Adjust.
5393 (make_binfo): Likewise.
5394 * typeck.c (build_modify_expr): Pass type directly to
5395 build_special_member_call.
5396 * typeck2.c (process_init_constructor): Check a binfo exists.
5397 (build_m_component_ref): Allow accessing an incomplete type.
5398 (build_functional_cast): Pass type directly to
5399 build_special_member_call.
5401 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5404 * config-lang.in (gtfiles): Add typeck2.c.
5405 * Make-lang.in: Tweak typeck2.c dependencies, and add rule for
5407 * cp-tree.h: Declare complete_type_check_abstract.
5408 * typeck2.c (pat_calc_hash, pat_compare,
5409 complete_type_check_abstract): New functions.
5410 (abstract_virtuals_error): If the type is abstract, register the
5411 declaration within abstract_pending_vars for further checks.
5412 Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
5413 * decl.c (cp_finish_decl): Do not strip array types.
5414 (create_array_type_for_decl): Check for abstractness of the element
5416 (complete_vars): Call complete_type_check_abstract.
5417 * class.c (finish_struct): Prepare a list of virtual functions for
5418 template types, and call complete_vars on it to check for abstractness.
5420 2004-07-12 Paolo Bonzini <bonzini@gnu.org>
5422 PR tree-optimization/14107
5423 * decl.c (finish_function): Remove temporary band-aid.
5425 2004-07-11 Mark Mitchell <mark@codesourcery.com>
5427 * call.c (build_operator_new_call): Avoid using push_to_top_level.
5428 (build_new_op): Adjust call to lookup_function_nonclass.
5429 * name-lookup.c (identifier_type_value): Adjust call to
5431 (lookup_name_real): Add block_p parameter.
5432 (lookup_name_nonclass): Adjust call to lookup_name_real.
5433 (lookup_function_nonclass): Likewise.
5434 (lookup_name): Likewise.
5435 * name-lookup.h (lookup_name_real): Change prototype.
5436 (lookup_name_nonclass): Likewise.
5437 * parser.c (cp_parser_lookup_name): Likewise.
5439 * cp-tree.h (saved_scope): Make old_bindings a vector.
5440 (unuse_fields): Remove.
5441 * name-lookup.h (cxx_saved_binding): Define it.
5442 * class.c (pushclass): Don't use unuse_fields.
5443 * name-lookup.c (cxx_saved_binding_make): Remove.
5444 (store_binding): Add new bindings to a vector, using an
5445 accumulator style, rather than adding them to a list.
5446 (store_bindings): Adjust accordingly.
5447 (store_class_bindings): Likewise.
5448 (push_to_top_level): Likewise.
5449 (pop_from_top_level): Likewise.
5450 * optimize.c (maybe_clone_body): Must push_to_top_level and
5451 pop_from_top_level calls outside of loop.
5452 * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope
5453 calls here from cp_parser_late_parsing_default_args.
5454 (cp_parser_save_default_args): Record the class type in which the
5455 function is declared.
5456 (cp_parser_late_parsing_default_args): Do not call
5457 push_nested_class/pop_nested_class.
5458 * search.c (dfs_unuse_fields): Remove.
5459 (unuse_fields): Remove.
5461 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
5463 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
5464 LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
5465 * cp-tree.h (poplevel): Declare.
5466 (set_block): Remove.
5467 * decl.c (set_block): Remove.
5469 2004-07-10 Mike Stump <mrs@apple.com>
5471 * decl2.c (import_export_class): Never export/import vtables
5472 with inline key functions.
5474 2004-07-09 Steven Bosscher <stevenb@suse.de>
5476 * typeck.c (c_expand_asm_operands): Remove.
5478 2004-07-09 Mike Stump <mrs@apple.com>
5480 * typeck.c (build_class_member_access_expr): Skip null deref
5481 warning when we don't dereference it.
5483 2004-07-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5487 * class.c (check_field_decls): Improve -Weffc++ warning: do not
5488 warn for pointers to functions/members, or for classes without
5491 2004-07-08 Mark Mitchell <mark@codesourcery.com>
5493 * name-lookup.h (struct cp_binding_level): Update documentation
5496 2004-07-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5499 * typeck.c (check_return_expr): Improve -Weffc++ warning: handle
5500 returning CALL_EXPR, and non-reference return type.
5502 2004-07-08 Nathan Sidwell <nathan@codesourcery.com>
5504 * name-lookup.c (push_binding): Use VEC_reserve.
5506 2004-07-08 Richard Henderson <rth@redhat.com>
5508 * cp-tree.h (expand_eh_spec_block): Remove.
5510 2004-07-07 Mark Mitchell <mark@codesourcery.com>
5512 * cp-tree.h (saved_scope): Remove x_previous_class_type and
5513 x_previous_class_values; add x_previous_class_level.
5514 (previous_class_type): Remove.
5515 (previous_class_values): Remove.
5516 (previous_class_level): New macro.
5517 * class.c (pushclass): Restore the identifier cache more
5519 (invalidate_class_lookup_cache): Use vector for class_shadowed and
5520 previous_class_values.
5521 * decl.c (poplevel): Likewise.
5522 * name-lookup.c (cxx_binding_init): New function.
5523 (cxx_binding_make): Use it.
5524 (push_binding): For a binding in a class level, use a vector of
5525 cp_class_binding nodes.
5526 (push_binding_level): New function.
5527 (begin_scope): Use it.
5528 (leave_scope): Do not put class binding levels on the free list.
5529 (print_binding_level): Adjust for the fact that class_shadowed is
5531 (poplevel_class): Likewise.
5532 (clear_identifier_class_values): Likewise.
5533 (push_class_level_binding): Likewise.
5534 (set_class_shadows): Remove.
5535 (store_binding): New function.
5536 (store_class_bindings): New function.
5537 (push_to_top_level): Use store_class_bindings as appropriate.
5538 (pop_from_top_level): Use previous_class_level, not
5539 previous_class_type.
5540 * name-lookup.h (cp_class_binding): New type.
5541 (cp_binding_level): Use a vector object for class_shadowed.
5542 (push_binding_level): Declare.
5543 (set_class_shadows): Remove.
5545 2004-07-07 Andrew Pinski <apinski@apple.com>
5547 * class.c (instantiate_type): BUFFER_REF is dead.
5548 * lex.c (init_operators): IN_EXPR is dead.
5550 2004-07-07 Jason Merrill <jason@redhat.com>
5553 * call.c (build_new_op): Give overload warnings for built-in
5556 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
5559 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
5562 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
5564 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
5565 * class.c (build_primary_vtable, check_bases,
5566 determine_primary_base, finish_struct_bits,
5567 maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
5568 get_basefndecls, warn_hidden, walk_subobject_offsets,
5569 build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
5570 layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
5571 finish_struct_1, get_vfield_name, contains_empty_class_p,
5572 dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
5573 dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
5574 add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
5576 * decl.c (xref_basetypes): Likewise.
5577 * dump.c (cp_dump_tree): Likewise.
5578 * error.c (dump_expr): Likewise.
5579 * init.c (sort_mem_initializers, expand_member_init,
5580 push_base_cleanups): Likewise.
5581 * method.c (do_build_copy_constructor, do_build_assign_reg,
5582 synthesize_exception_spec): Likewise.
5583 * name-lookup.c (arg_assoc_class): Likewise.
5584 * pt.c (instantiate_class_template, tsubst,
5585 get_template_base_recursive): Likewise.
5586 * ptree.c (cxx_print_type): Likewise.
5587 * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
5588 * search.c (lookup_base_r, dynamic_cast_base_recurse,
5589 dfs_access_in_type, access_in_type, lookup_field_queue_p,
5590 bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
5591 marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
5592 dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
5593 binfo_for_vtable, copied_binfo, original_binfo): Likewise
5594 * tree.c (copy_base_binfos, make_binfo): Likewise.
5595 * typeck.c (commmon_base_type): Likewise
5596 * typeck2.c (process_init_constructor): Likewise
5598 2004-07-06 Joseph S. Myers <jsm@polyomino.org.uk>
5600 * decl.c (check_tag_decl): Name redeclared type in diagnostic.
5602 2004-07-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5605 * pt.c (convert_nontype_argument): Disallow conversions between
5606 different enumeration types.
5608 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
5610 * cp-tree.h (BINFO_MARKED): Remove.
5611 (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
5612 BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
5613 BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
5614 (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
5615 * class.c (build_base_path): Use BINFO_VIRTUAL_P.
5616 (mark_primary_bases, determine_primary_base, base_derived_from,
5617 dfs_find_final_overrider, dfs_find_final_overrider_q,
5618 dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
5619 dfs_modify_vtables, walk_subobject_offsets,
5620 layout_nonempty_base_or_field, build_base_field,
5621 build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
5622 end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
5623 finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
5624 build_ctor_vtbl_group, accumulate_vtble_inits,
5625 dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
5626 build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
5627 add_vcall_offset_vtbl_entries_1): Likewise.
5628 * decl.c (xref_basetypes): Incomming virtual base indicated by
5630 * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
5631 * init.c (finish_init_stmts, sort_mem_initializers,
5632 emit_mem_initializers, build_vtble_address, expand_member_init,
5633 push_base_cleanups): Likewise.
5634 * method.c (do_build_copy_constructor): Likewise.
5635 * pt.c (instantiate_class_template,
5636 get_template_base_recursive): Likewise.
5637 * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
5638 get_pseudo_ti_desc): Likewise.
5639 * search.c (lookup_base_r, dynamic_cast_base_recurse,
5640 binfo_from_vbase, binfo_via_virtual, copied_binfo,
5641 original_binfo): Likewise.
5642 * semantics.c (finish_base_specifier): Virtualness is indicated
5644 * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
5646 2004-07-06 Mark Mitchell <mark@codesourcery.com>
5649 2004-06-24 Jason Merrill <jason@redhat.com>
5651 * decl.c (grokparms): Give the PARM_DECL reference type if the
5652 parameter is passed by invisible reference.
5654 2004-07-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5656 * cp-lang.c (cp_var_mod_type_p): Add extra arg.
5657 * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
5658 * pt.c (check_instantiated_args, unify): Likewise.
5660 2004-07-05 Phil Edwards <phil@codesourcery.com>
5662 * Make-lang.in (check-c++, lang_checks): Add some comments.
5664 2004-07-05 Zack Weinberg <zack@codesourcery.com>
5666 * cp-mudflap.c: Delete file.
5667 * Makefile.in: Remove all references to cp-mudflap.o.
5669 2004-07-05 Zack Weinberg <zack@codesourcery.com>
5671 * decl.c (cxx_init_decl_processing): Call
5672 build_common_tree_nodes before creating the global NAMESPACE_DECL.
5674 2004-07-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5677 * call.c (build_operator_new_call): Look only at global scope.
5679 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
5681 * call.c (enforce_access): Expect TREE_BINFO.
5682 * class.c (binfo_ctor_vtable): Check TREE_BINFO.
5683 * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
5684 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
5686 (BINFO_LANG_ELTS): Remove.
5687 (BINFO_LANG_SLOTS): New.
5688 (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
5689 (CLASSTYPE_TEMPLATE_INFO): Adjust.
5690 * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
5691 * search.c (lookup_member): Check TREE_BINFO.
5692 * semantics.c (perform_or_defer_access_check): Likewise.
5693 (check_accessibility_of_qualified_id): Check
5694 deferred_access_no_check.
5695 * tree.c (make_binfo): Use make_tree_binfo.
5697 2004-07-04 Mark Mitchell <mark@codesourcery.com>
5699 * method.c (implicitly_declare_fn): Set linkage of generated
5702 2004-07-04 Richard Henderson <rth@redhat.com>
5704 * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
5706 2004-07-03 Scott Brumbaugh <scottb.lists@verizon.net>
5709 * name-lookup.c (push_class_level_binding): Don't pass a
5710 TREE_LIST of ambiguous names to check_template_shadow as it
5711 only handles declarations. Instead, pull the declaration
5714 2004-07-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5717 * pt.c (check_explicit_specialization): Clarify error message.
5719 2004-07-02 Richard Henderson <rth@redhat.com>
5721 * tree.c (cp_unsave_r): Update remap_save_expr call.
5723 2004-07-02 Mark Mitchell <mark@codesourcery.com>
5726 * mangle.c (write_template_arg): Correct mangling.
5729 * decl.c (grokdeclarator): Robustify.
5731 2004-07-01 Richard Henderson <rth@redhat.com>
5733 * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
5734 * method.c (synthesize_method): Don't clear_last_expr.
5735 * name-lookup.c (maybe_push_cleanup_level): Likewise.
5737 2004-07-01 Nick Clifton <nickc@redhat.com>
5739 * decl2.c (import_export_class): Invoke the
5740 import_export_class field in the gcc_target structure if it is not
5743 2004-06-30 Richard Henderson (rth@redhat.com>
5745 * decl.c (start_preparsed_function): Don't set immediate_size_expand.
5746 * method.c (use_thunk): Likewise.
5748 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
5750 * call.c (build_over_call), typeck.c (build_function_call): Call
5751 check_function_arguments instead of check_function_format.
5753 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
5755 * call.c (build_over_call), typeck.c (build_function_call): Update
5756 calls to check_function_format.
5758 2004-06-30 Richard Henderson <rth@redhat.com>
5760 * call.c (build_over_call): Use __builtin_memcpy for copying
5761 CLASS_AS_BASE rather than funny casting.
5763 2004-06-30 Richard Henderson <rth@redhat.com>
5765 * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
5766 TYPE_SIZE_UNIT of full_type.
5768 2004-06-30 Per Bothner <per@bothner.com>
5770 Conditionally compile support for --enable-mapped_location.
5771 * decl.c (pop_label): Handle (imperfectly) USE_MAPPED_LOCATION case.
5772 * decl2.c: If USE_MAPPED_LOCATION, don't do some line number
5773 adjustments - which I don't understand.
5774 * error.c (dump_decl): Rename "<interrnal>" to "<built-in>".
5775 * error.c: Use LOCATION_FILE and EXPR_LOCATION macros.
5776 (print_instantiation_partial_context): Use expand_location.
5777 * decl.c (duplicate_decl): Use new DECL_IS_BUILTIN macro.
5778 * name-lookup.c: Likewise.
5779 * lex.c (cxx_init): Likewise. Also use BUILTINS_LOCATION.
5780 * name-lookup.c: Use input_line macro.
5781 * parser.c (cp_lexer_get_preprocessor_token): Use UNKNOWN_LOCATION.
5782 (cp_parser_statement): Rename locaal variable statement_locus to
5783 statement_location and use SET_EXPR_LOCATION macro.
5784 * pt.c: Handle USE_MAPPED_LOCATION case. Use new macros.
5785 * tree.c (cp_walk_subtrees): Likewise.
5787 2004-06-29 Per Bothner <per@bothner.com>
5789 * tree.c (build_min_nt, build_min, build_min_non_dep):
5790 Don't set TREE_COMPLEXITY from input_line.
5792 2004-06-29 Paul Brook <paul@codesourcery.com>
5794 * init.c: Include target.h.
5795 (get_cookie_size): Remove and replace with target hook.
5797 (build_new_1): Store the element size in the cookie.
5799 2004-06-29 Nathan Sidwell <nathan@codesourcery.com>
5802 * parser.c (cp_parser_template_declaration_after_export): Disable
5803 access checks here ...
5804 (cp_parser_class_specifier): ... not here.
5806 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
5808 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
5809 VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
5810 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
5813 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
5815 * cp-tree.h (struct deferred_access): Move to ...
5816 * semantics.c (struct deferred_access): ... here. Adjust.
5817 (deferred_access_stack): Make a VEC(deferred_access),
5818 (deferred_access_free_list): Remove.
5819 (deferred_access_no_check): New.
5820 (push_deferring_access_checks, resume_deferring_access_checks,
5821 stop_deferring_access_checks, pop_deferring_access_checks,
5822 get_deferred_access_checks, pop_to_parent_deferring_access_checks,
5823 perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
5825 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
5828 * call.c (build_temp): Declare.
5829 (check_constructor_callable): New.
5830 (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
5831 CONSTRUCTOR_CALLABLE.
5832 (convert_like_real, initialize_reference): Use
5833 check_constructor_callable.
5834 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
5835 (LOOKUP_*): Renumber.
5837 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
5839 * friend.c (add_friend): Only perform access checks when context
5841 * lex.c (cxx_make_type): Only create a binfo for aggregate types.
5842 * parser.c (cp_parser_class_specifier): Disable access checks here
5843 when parsing the body of a templated class.
5844 * semantics.c (perform_or_defer_access_checks): Reorder to allow
5845 NULL binfos when not checking access.
5847 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
5849 Use vector API for vbase list.
5850 * cp-tree.h: Include vec.h
5851 (DEF_VEC_P (tree)): New type.
5852 (struct lang_type_class): Change vbase's member type.
5853 (binfo_for_vbase): Declare.
5854 * class.c (determine_primary_base, base_derived_from,
5855 update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
5856 warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
5857 build_vtbl_initializer): Adjust.
5858 * decl.c (xref_basetypes): Adjust, accumulate upper bound of
5860 * init.c (sort_mem_initializers, expand_member_init,
5861 push_base_cleanups): Adjust.
5862 * method.c (do_build_copy_constructor): Adjust.
5863 * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
5864 (binfo_for_vbase): New.
5865 * tree.c (copy_base_binfos): Adjust.
5867 2004-06-28 Mark Mitchell <mark@codesourcery.com>
5869 * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
5871 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
5874 * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
5875 paranthesis in case of pointers to array members.
5876 * error.c (dump_type_prefix): Likewise.
5877 (dump_type_suffix): Maybe issue a whitespace when printing
5880 2004-06-27 Mark Mitchell <mark@codesourcery.com>
5883 * parser.c (cp_parser_set_decl_spec_type): Refine test for
5884 redefinition of built-in types.
5886 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
5888 * error.c (pp_template_argument_list_start): Remove.
5889 (pp_template_argument_list_end): Likewise.
5890 (pp_separate_with_comma): Use pp_cxx_separate_with.
5891 (reinit_global_formatting_buffer): Remove.
5892 (pp_non_consecutive_character): Likewise.
5893 (dump_scope): Use pp_cxx_colon_colon.
5894 (dump_template_parameter): Use pp_cxx_identifier,
5895 pp_cxx_tree_identifier and pp_cxx_whitespace.
5896 (dump_templat_bindings): Replace use of pp_string with sequence
5897 of pp_cxx_whitespace and pp_equal.
5898 (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
5899 pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set
5901 (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
5902 (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace,
5903 pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
5904 (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
5905 pp_cxx_right_bracket, pp_cxx_identifier throughout,
5906 (dump_decl): Likewise.
5907 (dump_template_decl): Likewise.
5908 (dump_function_decl): Likewise. Set padding as appropriate.
5909 (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
5911 (dump_exception_spec): Likewise.
5912 (dump_function_name): Use pp_cxx_tree_identifier and
5914 (dump_template_parms): Use pp_cxx_begin_template_argument_list and
5915 pp_cxx_end_template_argument_list.
5916 (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
5917 pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
5918 pp_cxx_whitespace throughout.
5919 (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
5921 (dump_unary_op): Likewise.
5922 (reinit_cxx_pp): New function.
5923 (type_as_string); Use it.
5924 (expr_as_string): Likewise.
5925 (decl_as_string); Likewise.
5926 (context_as_string): Likewise.
5927 (lang_decl_name): Likewise.
5928 (decl_to_string): Likewise.
5929 (expr_to_string): Likewise.
5930 (parm_to_string): Likewise.
5931 (type_to_string): Likewise.
5932 (args_to_string): Likewise.
5933 (cv_to_string): Likewise.
5935 2004-06-26 Mark Mitchell <mark@codesourcery.com>
5937 * cp-tree.h (cp_cv_quals): New type.
5938 (cp_declarator): Use it instead of "tree" as appropriate.
5939 (grok_method_quals): Adjust prototype.
5940 (grokclassfn): Likewise.
5941 (do_friend): Likewise.
5942 * decl.c (grokfndecl): Use cp_cv_quals, not tree.
5943 (grokdeclarator): Likewise.
5944 * decl2.c (grok_method_quals): Likewise.
5945 (grokclassfn): Likewise.
5946 * friend.c (do_friend): Likewise.
5947 * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
5948 * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
5949 (make_pointer_declarator): Likewise.
5950 (make_reference_declarator): Likewise.
5951 (make_ptrmem_declarator): Likewise.
5952 (cp_parser_ptr_operator): Likewise.
5953 (cp_parser_cv_qualifier_seq_opt): Likewise.
5954 (cp_parser_cv_qualifier_opt): Remove.
5955 (cp_parser_new_declarator_opt): Adjust call to
5956 cp_parser_ptr_operator.
5957 (cp_parser_conversion_declaration_opt): Likewise.
5958 (cp_parser_declarator): Use cp_cv_quals, not tree.
5959 (cp_parser_direct_declarator): Likewise.
5961 2004-06-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5963 * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
5964 Rename DECL_STMT to DECL_EXPR.
5965 * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
5966 * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
5967 * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
5969 2004-06-26 Jan Hubicka <jh@suse.cz>
5972 * decl2.c (maybe_emit_vtables): Always import_export_vtable for the
5973 reachability analysis.
5975 2004-06-25 Mark Mitchell <mark@codesourcery.com>
5977 * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
5980 2004-06-25 Paul Brook <paul@codesourcery.com>
5982 * decl2.c (get_guard): Call targetm.cxx.guard_type.
5983 (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
5985 2004-06-24 Mark Mitchell <mark@codesourcery.com>
5987 * decl.c (grokdeclarator): Restore error messages about __thread.
5988 * parser.c (cp_parser_decl_specifier_seq): Likewise.
5990 2004-06-24 Jason Merrill <jason@redhat.com>
5993 * decl.c (grokparms): Give the PARM_DECL reference type if the
5994 parameter is passed by invisible reference.
5996 2004-06-24 Andreas Schwab <schwab@suse.de>
5998 * cp-tree.h (enum cp_storage_class): Remove trailing comma.
6000 2004-06-23 Mark Mitchell <mark@codesourcery.com>
6002 * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
6003 (cp/decl.o): Likewise.
6004 (cp/decl2.o): Likewise.
6005 (cp/pt.o): Likewise.
6006 (cp/semantics.o): Likewise.
6007 * config-lang.in (gtfiles): Do not reference cp/lex.h.
6008 * class.c: Do not include lex.h.
6009 (add_implicitly_declared_members): Do not use
6010 adding_implicit_members.
6011 (check_bases_and_members): Do not talk about grok_x_components.
6012 * cp/cp-tree.h (adding_implicit_members): Remove.
6013 (cp_storage_class): New type.
6014 (cp_decl_spec): Likewise.
6015 (cp_decl_specifier_seq): Likewise.
6016 (cp_parameter_declarator): Use it for the decl_specifiers field.
6017 (check_tag_decl): Adjust prototype.
6018 (shadow_tag): Likewise.
6019 (groktypename): Likewise.
6020 (start_decl): Likewise.
6021 (start_function): Likewise.
6022 (start_method): Likewise.
6023 (grok_x_components): Remove.
6024 (grokfield): Adjust prototype.
6025 (grokbitfield): Likewise.
6026 (finish_member_class_template): Remove.
6027 * decl.c: Do not include lex.h.
6028 (adding_implicit_members): Do not define.
6029 (check_tag_decl): Do not use trees to represent decl-specifiers.
6030 (shadow_tag): Likewise.
6031 (groktypename): Likewise.
6032 (start_decl): Likewise.
6033 (grokvardecl): Likewise.
6034 (grokdeclarator): Likewise.
6035 (grokparms): Likewise.
6036 (start_function): Likewise.
6037 (start_method): Likewise.
6038 * decl.h (grokdeclarator): Adjust prototype.
6039 * decl2.c: Do not include lex.h.
6040 (grok_x_components): Remove.
6041 (grokfield): Do not use trees to represent decl-specifiers.
6042 (grokbitfield): Likewise.
6043 * lex.c: Do not include lex.h.
6045 * parser.c: Include target.h.
6046 (clear_decl_specs): New function.
6047 (cp_parser_translation_unit): Do not use trees to represent
6049 (cp_parser_postfix_expression): Likewise.
6050 (cp_parser_new_type_id): Likewise.
6051 (cp_parser_condition): Likewise.
6052 (cp_parser_simple_declaration): Likewise.
6053 (cp_parser_decl_specifier_seq): Likewise.
6054 (cp_parser_function_specifier_opt): Likewise.
6055 (cp_parser_conversion_type_id): Likewise.
6056 (cp_parser_template_parameter): Likewise.
6057 (cp_parser_explicit_instantiation): Likewise.
6058 (cp_parser_type_specifier): Likewise.
6059 (cp_parser_simple_type_specifier): Likewise.
6060 (cp_parser_init_declarator): Likewise.
6061 (cp_parser_type_id): Likewise.
6062 (cp_parser_type_specifier_seq): Likewise.
6063 (cp_parser_parameter_declaration): Likewise.
6064 (cp_parser_member_declaration): Likewise.
6065 (cp_parser_exception_declaration): Likewise.
6066 (cp_parser_function_definition_from_specifiers_and_declarator):
6068 (cp_parser_single_declaration): Likewise.
6069 (cp_parser_save_member_function_body): Likewise.
6070 (cp_parser_friend_p): Likewise.
6071 (cp_parser_set_storage_class): New function.
6072 (cp_parser_set_decl_spec_type): Likewise.
6073 * pt.c: Do not include lex.h.
6074 * semantics.c: Likewise.
6075 (finish_member_class_template): Remove.
6077 2004-06-23 Roger Sayle <roger@eyesopen.com>
6079 * call.c (build_cxx_call): Don't call expand_tree_builtin. No
6080 longer take both "args" and "convert_args" as arguments.
6081 (build_op_delete_call): Update call to build_cxx_call.
6082 (build_over_call): Likewise, update call to build_cxx_call.
6083 * cp-tree.h (build_cxx_call): Update funtion prototype.
6084 * typeck.c (build_function_call): Don't call expand_tree_builtin.
6085 * rtti.c (throw_bad_cast): Update call to build_cxx_call.
6086 (throw_bad_typeid): Likewise.
6087 (build_dynamic_cast_1): Likewise.
6089 2004-06-22 Richard Henderson <rth@redhat.com>
6091 * class.c (build_vfn_ref): Take a pointer not object. Build
6093 (cp_fold_obj_type_ref): New.
6094 * call.c (build_over_call): Update build_vfn_ref call.
6095 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
6096 * cp-tree.h (cp_fold_obj_type_ref): Declare.
6098 2004-06-21 Jason Merrill <jason@redhat.com>
6101 * cp-gimplify.c (cp_gimplify_init_expr): Look through
6104 2004-06-21 Mark Mitchell <mark@codesourcery.com>
6106 * cp-tree.def (NEW_EXPR): Add a fourth slot.
6107 * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
6108 (TREE_PARMLIST): Likewise.
6109 (CALL_DECLARATOR_PARMS): Likewise.
6110 (CALL_DECLARATOR_QUALS): Likewise.
6111 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
6112 (cp_declarator_kind): New type.
6113 (cp_parameter_declarator): Likewise.
6114 (cp_declarator): Likewise.
6115 (cp_error_declarator): Likewise.
6116 (no_parameters): Likewise.
6117 (groktypename): Change prototype.
6118 (start_decl): Likewise.
6119 (start_handler_parms): Likewise.
6120 (get_scope_of_declarator): Likewise.
6121 (start_function): Likewise.
6122 (start_preparsed_function): New function.
6123 (start_function): Change prototype.
6124 (start_method): Likewise.
6125 (grokfield): Likewise.
6126 (grokbitfield): Likewise.
6127 (build_new): Likewise.
6128 (make_pointer_declarator): Remove.
6129 (make_reference_declarator): Likewise.
6130 (make_call_declarator): Likewise.
6131 (set_quals_and_spec): Likewise.
6132 (process_template_parm): Change prototype.
6133 (begin_function_definition): Remove.
6134 (finish_parmlist): Remove.
6135 * decl.c (groktypename): Do not use trees to represent
6137 (start_decl): Likewise.
6138 (start_handler_parms): Remove.
6139 (get_scope_of_declarator): Reimplement.
6140 (grokdeclarator): Do not use trees to represent declarators.
6141 (grokparms): Likewise.
6142 (start_function): Likewise.
6143 (start_method): Likewise.
6144 (build_void_list_mode): Do not use TREE_PARMLIST.
6145 * decl.h (grokdeclarator): Change prototype.
6146 * decl2.c (grok_method_quals): Robustify.
6147 (grok_x_components): Do not use trees to represent declarators.
6148 (grokfield): Likewise.
6149 (grokbitfield): Likewise.
6150 (start_objects): Build FUNCTION_DECLs, not declarators.
6151 (start_static_storage_duration_function): Likewise.
6152 * init.c (build_new): Simplify.
6153 * lex.c (make_pointer_declarator): Remove.
6154 (make_reference_declarator): Likewise.
6155 (make_call_declarator): Likewise.
6156 (set_quals_and_spec): Likewise.
6157 * method.c (use_thunk): Use start_preparsed_function.
6158 (synthesize_method): Likewise.
6159 (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
6160 * optimize.c (maybe_clone_body): Use start_preparsed_function.
6161 * parser.c (cp_error_declarator): New variable.
6162 (declarator_obstack): Likewise.
6163 (alloc_declarator): New function.
6164 (make_declarator): Likewise.
6165 (make_id_declarator): Likewise.
6166 (make_pointer_declarator): Likewise.
6167 (make_reference_declarator): Likewise.
6168 (make_ptrmem_declarator): Likewise.
6169 (make_call_declarator): Likewise.
6170 (make_array_declarator): Likewise.
6171 (no_parameters): New variable.
6172 (make_parameter_declarator): Likewise.
6173 (cp_parser_check_for_definition_in_return_type): Do not use trees
6174 to represent declarators.
6175 (cp_parser_translation_unit): Likewise.
6176 (cp_parser_new_expression): Likewise.
6177 (cp_parser_new_type_id): Likewise.
6178 (cp_parser_new_declarator_opt): Likewise.
6179 (cp_parser_direct_new_declarator): Likewise.
6180 (cp_parser_condition): Likewise.
6181 (cp_parser_declaration_statement): Likewise.
6182 (cp_parser_declaration): Likewise.
6183 (cp_parser_conversion_type_id): Likewise.
6184 (cp_parser_conversion_declarator_opt): Likewise.
6185 (cp_parser_template_parameter_list): Likewise.
6186 (cp_parser_template_parameter): Likewise.
6187 (cp_parser_explicit_instantiation): Likewise.
6188 (cp_parser_init_declarator): Likewise.
6189 (cp_parser_declarator): Likewise.
6190 (cp_parser_direct_declarator): Likewise.
6191 (cp_parser_type_id): Likewise.
6192 (cp_parser_parameter_declaration_clause): Likewise.
6193 (cp_parser_parameter_declaration_list): Likewise.
6194 (cp_parser_parameter_declaration): Likewise.
6195 (cp_parser_member_declaration): Likewise.
6196 (cp_parser_exception_declaration): Likewise.
6197 (cp_parser_check_declarator_template_parameters): Likewise.
6198 (cp_parser_function_definition_from_specifiers_and_declarator):
6200 (cp_parser_save_member_function_body): Likewise.
6201 * pt.c (process_template_parm): Add is_non_type parameter.
6202 (convert_template_argument): Adjust call to groktypename.
6203 (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
6204 (tsubst): Do not expect declarators.
6205 (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
6207 (instantiate_decl): Use start_preparsed_function.
6208 * semantics.c (begin_function_definition): Remove.
6209 (finish_parmlist): Remove.
6210 * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
6213 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6215 * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
6216 (build_new_method_call): Likewise.
6217 * decl.c (local_variable_p_walkfn): Don't walk into types.
6218 * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
6219 (build_anon_union_vars): Add new operand for COMPONENT_REF.
6220 * init.c (buld_new): Add new operand for ARRAY_REF.
6221 * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
6222 (do_build_assign_ref): Likewise.
6223 * parser.c (cp_parser_direct_new_declarator): Add new operands
6225 (cp_parser_direct_declarator): Likewise.
6226 * pt.c (tsubst): Likewise.
6227 (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
6229 * semantics.c (finish_non_static_data_member): Add new operand
6231 * typeck.c (build_class_member_access_expr): Likewise.
6232 (build_class_member_access_expr, finish_class_member_access_expr):
6234 (build_ptrmemfunc_access_expr): Likewise.
6235 (build_array_ref): Add new operands for ARRAY_REF.
6236 * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
6237 * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
6239 2004-06-21 Richard Henderson <rth@redhat.com>
6241 * dump.c (cp_dump_tree): Don't use dump_next_stmt.
6242 * parser.c (cp_parser_jump_statement): Update commentary.
6243 * pt.c (tsubst_expr): Use RETURN_EXPR.
6244 * semantics.c (finish_return_stmt): Likewise.
6245 (finalize_nrv_r): Likewise.
6246 * typeck.c, typeck2.c: Update file start commentary.
6248 2004-06-21 Richard Henderson <rth@redhat.com>
6250 * semantics.c (finish_expr_stmt): Call verify_sequence_points.
6252 2004-06-20 Richard Henderson <rth@redhat.com>
6254 * cp-tree.h (add_decl_stmt): Declare.
6255 * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
6256 * semantics.c (maybe_cleanup_point_expr): New.
6257 (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
6258 finish_for_expr, finish_switch_cond): Use it.
6259 (finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN.
6261 2004-06-20 Richard Henderson <rth@redhat.com>
6263 * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
6264 * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
6265 (cp_gimplify_expr): Call it.
6266 (gimplify_cleanup_stmt): Move from c-gimplify.c.
6267 (cp_genericize): New.
6268 * decl.c (finish_function): Call it.
6269 * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
6270 (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
6271 (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
6272 (cp_genericize): Declare.
6273 * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
6274 * dump.c (cp_dump_tree): Likewise.
6275 * semantics.c (push_cleanup): Move from c-semantics.c.
6277 2004-06-20 Zack Weinberg <zack@codesourcery.com>
6279 * cp-lang.c (has_c_linkage): Implement.
6281 * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
6282 * decl.c (duplicate_decls): Use COPY_DECL_RTL.
6283 (builtin_function_1): Don't call make_decl_rtl.
6284 (build_cp_library_fn): Don't call set_mangled_name_for_decl.
6285 (grokvardecl): Don't call mangle_decl.
6286 * except.c (nothrow_libfn_p): Look at DECL_NAME, not
6287 DECL_ASSEMBLER_NAME.
6288 * method.c (set_mangled_name_for_decl): Delete.
6289 * name-lookup.c (pushdecl): When a local extern shadows a
6290 file-scope declaration of the same object, give both DECLs the
6292 * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
6293 on DECL_ASSEMBLER_NAME.
6295 2004-06-19 Richard Henderson <rth@redhat.com>
6297 * cp-gimplify.c: Remove unnecessary prototypes.
6298 (cp_gimplify_stmt): Merge into ...
6299 (cp_gimplify_expr): ... here. Move to end of file. Handle
6300 stmts_are_full_exprs_p frobbing.
6301 * cp-tree.h (cp_gimplify_stmt): Remove.
6302 * pt.c (tsubst_expr): Merge prep_stmt and unify.
6303 * tree.c (init_tree): Don't set lang_gimplify_stmt.
6305 2004-06-18 Richard Henderson <rth@redhat.com>
6308 * semantics.c (begin_cond): New.
6309 (finish_cond): Rewrite to handle template DECL_STMTs specially.
6310 Assume that non-template decls go land before the conditional.
6311 (simplify_loop_decl_cond): Likewise.
6312 (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
6313 finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
6314 begin_switch_stmt, finish_switch_cond): Update to match.
6316 2004-06-17 Jason Merrill <jason@redhat.com>
6319 * semantics.c (simplify_aggr_init_expr): Don't return the slot.
6320 (finish_stmt_expr_expr): Update type after conversions.
6321 (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
6322 Handle void initializer.
6323 * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
6325 2004-06-17 Geoffrey Keating <geoffk@apple.com>
6327 * class.c (build_clone): Don't call defer_fn, let mark_used do it.
6328 * cp-tree.h (defer_fn): Delete.
6329 * decl2.c (defer_fn): Delete.
6330 (finish_file): Simplify deferred_fns loops; check that
6331 only used inline functions get into deferred_fns.
6332 (mark_used): Inline previous contents of defer_fn.
6334 2004-06-16 Richard Henderson <rth@redhat.com>
6336 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
6337 (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
6338 * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
6339 of CTOR_INITIALIZER ...
6340 (pp_cxx_statement): ... here.
6341 * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
6342 (finish_function): Use alloc_stmt_list to zap entire function.
6343 * parser.c (cp_parser_compound_statement): Update commentary.
6344 * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
6345 * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
6346 (finish_stmt_expr): Don't look through COMPOUND_STMT.
6348 2004-06-16 Geoffrey Keating <geoffk@apple.com>
6350 * pt.c (mark_decl_instantiated): Don't call defer_fn.
6352 2004-06-16 Richard Henderson <rth@redhat.com>
6354 * parser.c (cp_parser_labeled_statement): Update commentary.
6355 * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
6356 * tree.c (mark_local_for_remap_r): Likewise.
6358 2004-06-16 Richard Henderson <rth@redhat.com>
6360 * parser.c (cp_parser_asm_definition): Update commentary.
6361 * pt.c (tsubst_expr): Use ASM_EXPR.
6362 * semantics.c (finish_asm_stmt): Likewise.
6364 2004-06-16 Richard Henderson <rth@redhat.com>
6366 * decl.c (finish_destructor_body): Use LABEL_EXPR.
6367 * parser.c (cp_parser_statement): Update commentary.
6368 * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
6369 * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
6370 * tree.c (mark_local_for_remap_r): Likewise.
6372 2004-06-16 Richard Henderson <rth@redhat.com>
6375 * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
6376 statement in FOR_INIT_STMT for templates.
6378 2004-06-15 Richard Henderson <rth@redhat.com>
6380 * call.c (initialize_reference): Don't build CLEANUP_STMT here.
6381 * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
6382 (genericize_try_block): Use gimplify_stmt.
6383 (genericize_catch_block, genericize_eh_spec_block): Likewise.
6384 (cp_gimplify_init_expr): Remove STMT_EXPR special case.
6385 (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
6386 * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
6387 (cp_tree_chain_matters_p): Remove.
6388 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
6389 (COMPOUND_STMT_BODY_BLOCK): New.
6390 (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
6391 (EXPR_STMT_STMT_EXPR_RESULT): New.
6392 (building_stmt_tree): Check cur_stmt_list.
6393 (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
6394 (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
6395 * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
6396 (cp_finish_decl): Use push_cleanup.
6397 (start_function, finish_function): Use statement lists.
6398 (finish_stmt): Do nothing.
6399 * except.c (begin_eh_spec_block): Use statement lists.
6400 (check_handlers_1, check_handlers): Likewise.
6401 * init.c (construct_virtual_base): Don't add extra compound stmts.
6402 (build_vec_init): Likewise.
6403 * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
6404 * name-lookup.h (struct cp_binding_level): Add statement_list.
6405 * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
6406 (cp_parser_labeled_statement, cp_parser_expression_statement,
6407 cp_parser_statement_seq_opt): Likewise.
6408 (cp_parser_compound_statement): Likewise. Take bool for try block.
6409 (cp_parser_selection_statement): Tidy if processing.
6410 (cp_parser_already_scoped_statement): Rewrite to do what it says.
6411 * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
6412 (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST.
6413 Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
6414 * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
6415 (finish_cond): New, rewritten from FINISH_COND.
6416 (simplify_loop_decl_cond): New.
6417 (finish_expr_stmt): Avoid nested EXPR_STMTs.
6418 (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
6419 begin_else_clause, finish_else_clause, finish_if_stmt,
6420 begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
6421 begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
6422 finish_for_cond, finish_for_stmt, begin_switch_stmt,
6423 finish_switch_cond, finish_switch_stmt, begin_try_block,
6424 finish_try_block, finish_cleanup_try_block, finish_function_try_block,
6425 finish_handler_sequence, finish_function_handler_sequence,
6426 begin_handler, finish_handler_parms, finish_handler,
6427 begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
6428 using statement lists.
6429 (begin_compound_stmt): Replace has_no_scope argument with flags.
6430 Update all callers. Use statement lists.
6431 (finish_compound_stmt): Likewise.
6432 (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
6433 (current_scope_stmt_stack): Remove.
6434 (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
6435 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
6436 Rewrite with statement lists.
6438 2004-06-15 Alexandre Oliva <aoliva@redhat.com>
6440 * parser.c: Change all assignments of c_lex_string_translate
6441 to true and false to 1 and 0.
6442 (cp_lexer_read_token): Convert type of the translated string.
6443 (cp_parser_skip_to_closing_parentheses): Preserve original
6444 value of c_lex_string_translate, and set it to -1 while
6446 (cp_parser_cache_group): Likewise.
6447 (cp_parser_cache_group_1): Renamed.
6448 (cp_parser_asm_operand_list): Remove redundant setting of
6449 c_lex_string_translate.
6450 (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
6451 Handle chained strings.
6453 2004-06-12 Andrew Pinski <apinski@apple.com>
6457 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
6459 * cp-tree.h: Fix typo.
6461 * cp-tree.h: Include cgraph.h
6462 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
6463 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
6465 2004-06-12 Jason Merrill <jason@redhat.com>
6467 PR tree-optimization/14107
6468 * decl.c (finish_function): Warn about no return in all functions.
6470 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
6472 * cp-tree.h (struct language_function): Remove cannot_inline.
6473 * decl.c (save_function_data): cannot_inline is no more.
6474 (cxx_push_function_context): Likewise.
6475 * decl2.c (start_objects, start_static_storage_duration_function):
6476 Reset DECL_INLINE, set DECL_UNINLINABLE.
6478 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6481 * search.c (lookup_field): Propagate the ambiguity list.
6482 (lookup_fnfields): Likewise.
6484 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6487 * parser.c (cp_parser_template_name): Ctors/dtors never need a
6488 template keyword to disambiguate.
6490 2004-06-14 Mark Mitchell <mark@codesourcery.com>
6493 * decl.c (grokdeclarator): Ignore pointer-to-members when
6494 computing template depth.
6497 * name-lookup.c (pushtag): Do not try to put class declarations in
6498 explicit specialization scopes.
6500 2004-06-11 Andrew Pinski <pinskia@physics.uc.edu>
6502 * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
6504 2004-06-11 Mark Mitchell <mark@codesourcery.com>
6507 * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
6508 bindings for undeclared built-ins.
6510 2004-06-11 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6512 * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
6513 appear at the correct location.
6515 2004-06-10 Jason Merrill <jason@redhat.com>
6519 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6520 * init.c (build_offset_ref): Build SCOPE_REF with non-null
6521 TREE_TYPE for non-dependent names.
6522 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
6523 unknown_type_node as its TREE_TYPE.
6524 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
6525 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
6526 (dump_expr) <SCOPE_REF case>: Likewise.
6528 2004-06-10 Mark Mitchell <mark@codesourcery.com>
6531 * parser.c (cp_parser_direct_declarator): Robustify.
6534 * pt.c (tsubst_copy): Use decl_constant_value on enumeration
6535 constants in non-dependent contexts.
6539 * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
6542 2004-06-10 Jakub Jelinek <jakub@redhat.com>
6545 * decl.c (duplicate_decls): Handle fileptr_type_node arguments
6548 2004-06-09 Mark Mitchell <mark@codesourcery.com>
6552 2004-06-07 Mark Mitchell <mark@codesourcery.com>
6553 * lex.c (handle_pragma_interface): Deprecate.
6554 (handle_pragma_implementation): Likewise.
6556 2004-06-09 Andrew Pinski <pinskia@physics.uc.edu>
6558 * g++spec.c (lang_specific_driver): Remove check for -lm
6559 and -lmath when check it see if it was the math library.
6561 2004-06-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6564 * parser.c (cp_parser_direct_declarator): Reject constructor named
6565 as qualified template-id.
6567 2004-06-07 Mark Mitchell <mark@codesourcery.com>
6570 * lex.c (handle_pragma_interface): Deprecate.
6571 (handle_pragma_implementation): Likewise.
6573 2004-06-07 Mark Mitchell <mark@codesourcery.com>
6576 * parser.c (cp_parser_iteration_statement): Fix typo in error
6580 * pt.c (tsubst_default_argument): Do not defer access checks
6581 while substituting into the default argument.
6584 * pt.c (tsubst_copy): Do not try to substitute for an enumeration
6585 constant in a non-dependent context.
6588 * except.c (build_throw): Ensure that temp_expr has been
6591 2004-06-06 Roger Sayle <roger@eyesopen.com>
6593 * cp/cp-tree.h (lvalue_or_else): Add function prototype.
6595 2004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6598 * parser.c (cp_parser_mem_initializer_id): Gracefully reject
6599 'typename', and accept 'template'.
6601 2004-06-03 Andrew Pinski <pinskia@physics.uc.edu>
6602 Jan Hubicka <jh@suse.cz>
6605 * method.c (use_think): Do not mark thunk as referenced.
6607 2004-06-03 Matt Austern <austern@apple.com>
6610 * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
6611 is nonzero, and if we see a noninline definition of a key method,
6612 make the vtables nonweak.
6614 2004-06-02 Matt Austern <austern@apple.com>
6616 * cp-tree.h (instantiate_decl): new boolean parameter,
6617 undefined_ok. Current behavior is equivalent to its being 0.
6618 * decl2.c (mark_used): Add new argument when calling instantiate_decl
6619 * pt.c (mark_decl_instantiated): Unconditionally make
6620 instantiations explicit unconditionally
6621 (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
6622 since mark_decl_instantiated now does it.
6623 (instantiate_class_member): New. Instantiate a member of an
6624 explicitly instantiated class template.
6625 (do_type_instantiation): Explicitly instantiate members of an
6626 explicitly instantiated class template.
6627 (instantiate_decl): if undefined_ok is nonzero, and if we're
6628 trying to explicitly instantiated a template with no definition,
6629 change it to an implicit instantiation.
6630 (instantiate_pending_templates): Add new argument to instantiate_decl.
6631 * tree.c (cp_cannot_inline_tree_fn): Likewise.
6633 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
6635 * cp-tree.h: Fix typo.
6637 * cp-tree.h: Include cgraph.h
6638 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
6639 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
6641 2004-06-01 Jason Merrill <jason@redhat.com>
6644 * call.c (call_builtin_trap): Remove type parm.
6645 (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
6646 (build_x_va_arg): Dereference a null pointer for a non-POD argument.
6648 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6651 * init.c (build_offset_ref): Build SCOPE_REF with non-null
6652 TREE_TYPE for non-dependent names.
6653 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
6654 unknown_type_node as its TREE_TYPE.
6655 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
6656 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
6657 (dump_expr) <SCOPE_REF case>: Likewise.
6659 2004-06-01 Richard Henderson <rth@redhat.com>
6660 Andrew Pinski <pinskia@physics.uc.edu>
6662 * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
6663 * parser.c (struct cp_parser): Remove in_offsetof.
6664 (cp_parser_new): Don't set it.
6665 (cp_parser_unary_expression): Don't check it.
6666 (cp_parser_postfix_open_square_expression): Split out from ...
6667 (cp_parser_postfix_expression): ... here.
6668 (cp_parser_postfix_dot_deref_expression): Likewise.
6669 (cp_parser_builtin_offsetof): New.
6670 (cp_parser_primary_expression): Use it.
6672 2004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6675 * parser.c (cp_parser_postfix_expression): Allow subscript
6676 operator in offsetof.
6678 2004-05-31 Mark Mitchell <mark@codesourcery.com>
6681 * friend.c (add_friend): Do not try to perform access checks for
6682 functions from dependent classes.
6684 2004-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
6686 * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
6687 (pp_cxx_begin_template_argument_list): Turn into a function.
6688 (pp_cxx_end_template_argument_list): Likewise.
6689 (pp_cxx_separate_with): Define.
6690 (pp_cxx_unqualified_id): Tidy.
6691 (pp_cxx_primary_expression): Likewise.
6692 (pp_cxx_postfix_expression): Likewise.
6693 (pp_cxx_expression): Likewise.
6694 (pp_cxx_simple_type_specifier): Likewise.
6695 (pp_cxx_type_specifier_seq): Likewise.
6696 (pp_cxx_parameter_declaration_clause): Likewise.
6697 (pp_cxx_exception_specification): Likewise.
6698 (pp_cxx_direct_declarator): Likewise.
6699 (pp_cxx_type_id): Likewise.
6700 * cxx-pretty-print.h (pp_cxx_whitespace): Export from
6702 (pp_cxx_left_paren): Likewise.
6703 (pp_cxx_right_paren): Likewise.
6704 (pp_cxx_left_brace): Likewise.
6705 (pp_cxx_right_brace): Likewise.
6706 (pp_cxx_left_bracket): Likewise.
6707 (pp_cxx_right_bracket): Likewise.
6708 (pp_cxx_dot): Likewise.
6709 (pp_cxx_identifier): Likewise.
6710 (pp_cxx_tree_identifier): Likewise.
6711 (pp_cxx_ampersand): New macro.
6712 (pp_cxx_star): Likewise.
6713 (pp_cxx_arrow): Likewise.
6714 (pp_cxx_semicolon): Likewise.
6715 (pp_cxx_complement): Likewise.
6716 (pp_cxx_begin_template_argument_list): Declaree.
6717 (pp_cxx_end_template_argument_list): Likewise.
6718 (pp_cxx_colon_colon): likewise.
6720 2004-05-31 Eric Botcazou <ebotcazou@libertysurf.fr>
6722 * parser.c (cp_parser_simple_type_specifier): Explicitly test
6725 2004-05-31 Kazu Hirata <kazu@cs.umass.edu>
6727 * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
6728 typeck.c: Fix comment formatting.
6730 2004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
6732 * cp-lang.c (cp_expand_decl): Remove.
6733 (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
6735 2004-05-30 Andreas Jaeger <aj@suse.de>
6737 * lang-specs.h: Add missing initializers for .ii.
6739 2004-05-28 Aldy Hernandez <aldyh@redhat.com>
6741 * decl.c (cp_make_fname_decl): Free return value from
6744 2004-05-28 Mark Mitchell <mark@codesourcery.com>
6747 * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
6749 * init.c (build_new): Likewise.
6752 * name-lookup.c (arg_assoc): Robustify.
6755 * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
6756 when determining the scope to use for a pointer to member.
6757 (lookup_anon_field): Give it external linkage.
6758 * cp-tree.h (lookup_anon_field): Declare it.
6759 * expr.c (cplus_expand_constant): Use it.
6761 2004-05-28 Mark Mitchell <mark@codesourcery.com>
6764 * parser.c (cp_parser_simple_type_specifier): Call
6765 maybe_note_name_used_in_class.
6767 2004-05-28 Tom Marshall <tmarshall@real.com>
6770 * class.c (finish_struct_1): Warn only if the dtor is non-private or
6771 the class has friends.
6773 2004-05-27 Adam Nemet <anemet@lnxw.com>
6776 * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
6777 TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
6779 2004-05-24 Geoffrey Keating <geoffk@apple.com>
6781 * method.c (implicitly_declare_fn): Don't call defer_fn; abort
6782 if it might be needed.
6783 * pt.c (mark_decl_instantiated): Only call defer_fn if
6784 the function actually needs processing in finish_file.
6785 * decl2.c (finish_file): Add check that elements in
6786 deferred_fns_used are really needed there. Remove unnecessary
6787 test of DECL_SAVED_TREE.
6789 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
6791 * Make-lang.in: No need to specify $(LIBCPP).
6793 2004-05-23 Mark Mitchell <mark@codesourcery.com>
6796 * parser.c (cp_parser_class_head): Robustify.
6799 * parser.c (cp_parser_decl_specifier_seq): Correct error in
6801 (cp_parser_constructor_declarator_p): Treat attributes
6805 * typeck.c (build_unary_op): Do not attempt to resolve casts to
6806 base classes in templates.
6808 2004-05-23 Mark Mitchell <mark@codesourcery.com>
6811 * pt.c (instantiate_template): Robustify.
6813 2004-05-23 Mark Mitchell <mark@codesourcery.com>
6816 * decl.c (xref_tag): Issue errors about redeclaring template
6817 classes as non-template classes.
6819 2004-05-23 Mark Mitchell <mark@codesourcery.com>
6822 * name-lookup.c (supplement_binding): Allow redefinitions of
6826 * parser.c (cp_parser_template_argument): Robustify.
6828 2004-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
6830 * class.c (alter_access): Use %E format specifier to print an
6831 identifier node. Avoid looking at the IDENTIFIER_POINTER.
6832 (push_lang_context): Likewise.
6833 * decl.c (lookup_label): Likewise.
6834 (grokdeclarator): Likewise.
6835 * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
6836 * pt.c (do_type_instantiation): Likewise.
6837 * tree.c (handle_java_interface_attribute): Likewise.
6838 (handle_com_interface_attribute): Likewise.
6839 (handle_init_priority_attribute): Likewise.
6841 2004-05-22 Mark Mitchell <mark@codesourcery.com>
6845 * pt.c (build_non_dependent_expr): Expand the set of tree nodes
6846 recognized as overloaded functions.
6848 2004-05-22 Mark Mitchell <mark@codesourcery.com>
6851 * class.c (layout_nonempty_base_or_field): Do not try to avoid
6852 layout conflicts for unions.
6855 * typeck.c (build_x_unary_op): Instantiate template class
6856 specializations before looking for "operator &".
6859 * typeck.c (complete_type): Layout non-dependent array types, even
6863 * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
6866 2004-05-22 Roger Sayle <roger@eyesopen.com>
6868 * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
6869 returning when TREE_TYPE is error_mark_node.
6870 * typeck.c (require_complete_type): Return error_mark_node if
6871 value's type is an error_mark_node.
6873 2004-05-20 Andrew Pinski <pinskia@physics.uc.edu>
6875 * optimize.c (calls_setjmp_r): Remove.
6876 (calls_setjmp_p): Remove.
6877 * cp-tree.c (calls_setjmp_p): Remove.
6878 * decl.c (finish_function): Do not call calls_setjmp_p.
6880 2004-05-18 Zack Weinberg <zack@codesourcery.com>
6882 * decl.c (cp_finish_decl): Use mark_decl_referenced.
6883 * decl2.c (maybe_make_one_only): Likewise.
6884 * method.c (use_thunk): Likewise.
6886 2004-05-18 Jason Merrill <jason@redhat.com>
6888 * class.c (build_base_path): Tidy a bit.
6890 2004-05-14 Geoffrey Keating <geoffk@apple.com>
6892 * name-lookup.c (struct scope_binding): New.
6893 (EMPTY_SCOPE_BINDING): New.
6894 (lookup_using_namespace): Take a scope_binding instead of a
6896 (qualified_lookup_using_namespace): Likewise.
6897 (cxx_binding_clear): Delete.
6898 (do_nonmember_using_decl): Use a scope_binding instead of a
6900 (lookup_tag): Don't call select_decl.
6901 (ambiguous_decl): Don't return anything (and change callers to match).
6902 Take a scope_binding as the second parameter.
6903 (lookup_namespace_name): Use a scope_binding instead of a
6905 (unqualified_namespace_lookup): Likewise.
6906 (lookup_qualified_name): Likewise.
6907 (select_decl): Take a scope_binding instead of a cxx_binding.
6908 Use macros rather than hand-coding tests for type-ness.
6910 2004-05-13 Diego Novillo <dnovillo@redhat.com>
6912 * cp-gimplify.c: Rename from cp-simplify.c.
6913 * Make-lang.in, optimize.c: Update.
6915 2004-05-13 Diego Novillo <dnovillo@redhat.com>
6917 Merge from tree-ssa-20020619-branch. See
6918 ChangeLog.tree-ssa for details.
6920 * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
6921 cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
6922 expr.c, init.c, name-lookup.h, optimize.c, parser.c,
6923 pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
6925 * cp-mudflap.c: New file.
6926 * cp-simplify.c:: New file.
6928 2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6931 * decl2.c (check_classfn): For member templates, compare also the
6932 template parameters to match the declaration.
6933 * cp-tree.h: Adjust declaration of check_classfn.
6934 * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
6935 * friend.c (do_friend): Likewise.
6936 * pt.c (tsubst_friend_function): Likewise.
6938 2004-05-01 Zack Weinberg <zack@codesourcery.com>
6940 * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
6941 Instead, dig into the representation type to find the array bound.
6943 2004-04-30 Jason Merrill <jason@redhat.com>
6945 Refer to base members using COMPONENT_REFs where possible.
6946 * class.c (build_simple_base_path): New fn.
6947 (build_base_path): Use it for non-virtual base references.
6948 (layout_class_type): Change base fields to their real type
6949 after layout is done.
6950 * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
6951 * cp-lang.c (cxx_get_alias_set): Use it.
6953 2004-04-30 Kazu Hirata <kazu@cs.umass.edu>
6955 * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
6958 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6961 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
6962 used in integral constant expressions.
6964 2004-04-22 Mark Mitchell <mark@codesourcery.com>
6966 * init.c (build_aggr_init): Fix accidental use of C99 construct in
6969 * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
6971 * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
6972 * decl.c (reshape_init): Use it.
6973 * init.c (perform_member_init): Remove redundant condition.
6974 (build_aggr_init): Adjust to handle brace-enclosed initializers
6976 (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
6978 * parser.c (cp_parser_initializer_clause): Do not set
6979 TREE_HAS_CONSTRUCTOR on the initializer.
6980 * rtti.c (tinfo_base_init): Likewise.
6981 (generic_initializer): Likewise.
6982 (ptr_initializer): Likewise.
6983 (ptm_initializer): Likewise.
6984 (class_initializer): Likewise.
6985 (get_pseudo_ti_init): Likewise.
6986 * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
6988 2004-04-22 Alan Modra <amodra@bigpond.net.au>
6990 * name-lookup.c (anonymous_namespace_name): Make static.
6992 2004-04-19 Roger Sayle <roger@eyesopen.com>
6995 * class.c (build_base_path): Call fold whilst building the NULL
6996 pointer check expression trees.
6998 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
7000 * init.c (build_new_1): Don't use type size argument for Java
7001 _Jv_AllocObject call.
7003 2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
7005 * method.c (make_alias_for_thunk): Remove preprocessor guard on
7006 declaration and definition.
7008 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
7011 * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
7012 than ASM_OUTPUT_DEF.
7014 2004-04-08 Jakub Jelinek <jakub@redhat.com>
7016 * decl2.c (mark_used): Don't segfault if cfun != NULL but
7017 current_function_decl == NULL.
7019 2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
7022 * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
7025 2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7027 * init.c (decl_constant_value): Don't look at DECL_INITIAL
7029 * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
7030 or TREE_SIDE_EFFECTS of a type.
7032 2004-04-02 Nathan Sidwell <nathan@codesourcery.com>
7035 * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
7036 cv-qualifier unification.
7037 * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
7039 2004-04-02 Jan Hubicka <jh@suse.cz>
7041 * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
7042 * cp-tree.h (cp_update_decl_after_saving): Declare.
7043 * tree.c (cp_update_decl_after_saving): Define.
7045 2004-04-01 Mark Mitchell <mark@codesourcery.com>
7048 * typeck.c (get_delta_difference): Call fold before returning the
7051 2004-04-01 Richard Henderson <rth@redhat.com>
7054 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
7055 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
7057 2004-04-01 Mark Mitchell <mark@codesourcery.com>
7060 * name-lookup.c (maybe_push_cleanup_level): Robustify.
7062 2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7064 * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
7066 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7068 * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
7069 * class.c (check_bitfield_decl): Likewise.
7070 * cvt.c (type_promotes_to): Likewise.
7071 * decl.c (finish_enum): Likewise.
7072 * mangle.c (write_builtin_type): Likewise.
7073 * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
7074 * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
7075 (build_binary_op): Likewise.
7077 2004-03-31 Jan Hubicka <jh@suse.cz>
7079 * tree.h (optimize_function): Kill prototype.
7080 * optimize.c (dump_function, optimize_function, dump_finction): Kill.
7081 * semantics.c (expand_body): Kill.
7083 2004-03-30 Mark Mitchell <mark@codesourcery.com>
7086 * decl.c (start_decl_1): Do not decide whether or not to create a
7087 new cleanup level until after the type has been completed.
7090 * pt.c (tsubst_default_argument): Clear current_function_decl.
7092 2004-03-30 Zack Weinberg <zack@codesourcery.com>
7094 * name-lookup.c, parser.c: Use new shorter form of GTY markers.
7096 2004-03-29 Zack Weinberg <zack@codesourcery.com>
7098 * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
7099 is null, just print the literal name and return.
7101 2004-03-25 Kazu Hirata <kazu@cs.umass.edu>
7103 * cxx-pretty-print.c: Fix comment typos.
7105 2004-03-24 Kazu Hirata <kazu@cs.umass.edu>
7107 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
7110 2004-03-23 Ziemowit Laski <zlaski@apple.com>
7112 * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
7113 * mangle.c (write_type): Add call to 'mangle_fundamental_type'
7116 2004-03-23 Zack Weinberg <zack@codesourcery.com>
7118 PR 12267, 12391, 12560, 13129, 14114, 14133
7119 * cp-lang.c (c_reset_state): Delete.
7120 (push_file_scope, pop_file_scope): New stubs.
7121 * parser.c (c_parse_file): Call sorry() here if called more than once.
7123 2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7125 * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
7128 2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
7130 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
7132 2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
7134 * error.c (enum pad): Remove.
7135 (dump_qualifiers): Likewise.
7136 (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
7137 (dump_aggr_type): Likewise.
7138 (dump_type_suffix): Likewise.
7139 (dump_simple_decl): Likewise.
7140 (dump_function_decl): Likewise.
7141 (cv_to_string): Likewise.
7142 (dump_type_prefix): Likewise. Adjust return void.
7143 * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
7145 (pp_cxx_template_keyword_if_needed): Document.
7146 (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
7147 (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
7148 MUST_NOT_THROW_EXPR.
7150 2004-03-21 Mark Mitchell <mark@codesourcery.com>
7153 * decl.c (cp_finish_decl): Compute the size of arrays declared in
7154 templates, if their type is non-dependent.
7156 2004-03-19 Mark Mitchell <mark@codesourcery.com>
7158 * call.c (build_op_delete_call): Do not forget the placement
7159 arguments when iterating through mutiple delete operators.
7161 * cp-tree.h (svaed_scope): Remove last_parms.
7162 (NEW_DELETE_OPNAME_P): New macro.
7163 (last_function_parms): Remove.
7164 (do_friend): Adjust prototype.
7165 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
7166 using last_function_parms.
7167 (grokfndecl): Take the PARM_DECLs as an argument, rather than
7168 using last_function_parms.
7169 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
7170 for class-specific operator new and operator delete.
7171 (grok_op_properties): Do not look for allocation functions with
7173 (start_function): Use DECL_ARGUMENTS instead of
7174 last_function_parms.
7175 * decl.h (last_function_parms): Do not declare.
7176 * decl2.c (grokclassfn): Do not use last_function_parms.
7177 * friend.c (do_friend): Remove parmdecls parameter.
7178 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
7179 (pop_from_top_level): Do not restore it.
7180 * pt.c (check_explicit_specialization): Do not adjust
7181 last_function_parms.
7183 * name-lookup.c (do_local_using_decl): Create a local binding for
7184 types brought in via using declarations.
7186 * name-lookup.c (lookup_arg_dependent): Handle block-scope
7187 function declarations correctly.
7189 * semantics.c (finish_id_expression): Correct handling of
7190 conversion operators to dependent types.
7192 * typeck.c (lookup_destructor): Allow the use of destructors from
7195 2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7197 * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
7198 TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
7199 * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
7200 the field is named TEMPLATE_TYPE_PARM_INDEX.
7202 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7205 * parser.c (cp_parser_functional_cast): A cast to anything
7206 but integral or enumaration type is not an integral constant
7208 * pt.c (value_dependent_expression_p): Handle cast expressions
7209 without operands (such as "int()").
7211 2004-03-18 Mark Mitchell <mark@codesourcery.com>
7213 * semantics.c (finish_pseudo_destructor_expr): Allow differing
7214 cv-qualification between the type named by the
7215 pseudo-destructor-name and the object-type.
7217 * search.c (accessible_base_p): Handle non-proper bases.
7219 * name-lookup.c (do_nonmember_using_decl): If a using declaration
7220 refers to a single overloaded function, set the type of the
7222 * tree.c (lvalue_type): Simplify.
7223 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
7225 (build_unary_op): Handle OVERLOADs with known types.
7227 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
7230 * parser.c (cp_parser_postfix_expression): Handle the use of
7231 "typename" in non-dependent contexts. Convert appropriately when
7232 when using a qualified name after "->" or ".".
7234 * call.c (conditional_conversion): Honor the requirement that some
7235 conversions refer to the original object.
7237 2004-03-18 Mark Mitchell <mark@codesourcery.com>
7239 * call.c (build_conditional_expr): Do not call force_rvalue for
7240 operands of void_type when the conditional expression itself has
7242 * name-lookup.c (pushdecl): Don't consider a declaration of a
7243 function named "main" to be an overload of a type named "main".
7244 * parser.c (cp_parser_template_name): Perform name lookup when the
7245 template name is proceeded by "template" if the qualifying scope
7247 * typeck.c (composite_pointer_type_r): Correctly handle
7248 pointer-to-member types.
7249 (build_const_cast): Likewise.
7251 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7253 * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
7254 * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
7255 (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
7256 (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
7257 (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
7258 (TYPEOF_TYPE_EXPR): New macro.
7259 * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
7260 * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
7261 * pt.c (tsubst): Likewise.
7262 * semantics.c (finish_typeof): Likewise.
7263 * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
7264 and TEMPLATE_TYPE_PARM.
7265 * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
7266 (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
7268 2004-03-16 Mark Mitchell <mark@codesourcery.com>
7271 * cp-tree.h (build_new_op): Change prototype.
7272 (build_x_binary_op): Likewise.
7273 * call.c (build_new_op): Add overloaded_p parameter.
7274 * decl2.c (grok_array_decl): Adjust call to build_new_op.
7275 * parser.c (cp_parser_binary_expression): Note that uses of
7276 overloaded operators prevents an expression from being considered
7277 an integral constant.
7278 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
7280 * semantics.c (finish_call_expr): Likewise.
7281 * typeck.c (rationalize_conditional_expr): Likewise.
7282 (build_x_indirect_ref): Likewise.
7283 (build_x_binary_op): Likewise.
7284 (build_x_unary_op): Likewise.
7285 (build_x_compound_expr): Likewise.
7286 (build_modify_expr): Likewise.
7287 * typeck2.c (build_x_arrow): Likewise.
7289 2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
7291 * cp-lang.c, ptree.c: Update copyright.
7293 2004-03-13 Mark Mitchell <mark@codesourcery.com>
7296 * parser.c (cp_parser_non_integral_constant_expression): Encode
7297 more of the idiom that surrounded calls to this function within
7299 (cp_parser_primary_expression): Adjust accordingly.
7300 (cp_parser_postfix_expression): Likewise.
7301 (cp_parser_unary_expression): Likewise.
7302 (cp_parser_cast_expression): Likewise.
7303 (cp_parser_assignment_expression): Likewise.
7304 (cp_parser_expression): Likewise.
7305 (cp_parser_new_expression): Note that new-expressions are not
7306 allowed in integral constant expressions.
7307 (cp_parser_delete_expression): Likewise.
7309 2004-03-12 Matt Austern <austern@apple.com>
7311 * decl2.c (maybe_make_one_only): Look at
7312 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
7313 to make an explicit instantiation weak.
7314 * method.c (use_thunk): Make sure we call comdat_linkage
7316 * pt.c (do_type_instantiation): On systems where weak symbols
7317 don't go in a static archive's TOC, explicit instantiation of a
7318 class must imply *explicit* instantiation of its memeber.
7320 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
7322 * call.c, cp-tree.h, pt.c: Fix comment typos.
7324 2004-03-10 Mark Mitchell <mark@codesourcery.com>
7327 * decl.c (xref_tag): Disregard non-type declarations when
7328 looking up a tagged type.
7330 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
7333 * call.c (convert_like_real): Build a const qualified temporary,
7334 when testing ctor access.
7336 2004-03-09 Mark Mitchell <mark@codesourcery.com>
7338 * call.c (initialize_reference): Fix typo.
7340 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7343 * pt.c (determine_specialization): For member templates, match also
7347 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
7349 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
7351 2004-03-09 Mark Mitchell <mark@codesourcery.com>
7354 * call.c (initialize_reference): Handle initializers that are
7355 class-member access expressions applies to rvalues.
7357 2004-03-09 Mark Mitchell <mark@codesourcery.com>
7360 * name-lookup.c (supplement_binding): Ignore functions that are
7361 marked DECL_ANTICIPATED.
7363 2004-03-08 Mark Mitchell <mark@codesourcery.com>
7366 * class.c (check_field_decls): Complain about non-static data
7367 members of reference type in unions. Propagate
7368 CLASSTYPE_REF_FIELDS_NEED_INIT and
7369 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
7371 * init.c (perform_member_init): Complain about mbmers with const
7372 type that are not explicitly initialized.
7374 2004-03-08 Mark Mitchell <mark@codesourcery.com>
7376 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
7377 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
7378 (lang_identifier): Remove implicit_decl and error_locus.
7379 (IDENTIFIER_IMPLICIT_DECL): Remove.
7380 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
7381 (IDENTIFIER_ERROR_LOCUS): Likewise.
7382 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
7383 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
7384 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
7385 (implicitly_declare): Remove.
7386 * decl.c (warn_extern_redeclared_static): Remove check of
7387 IDENTIFIER_IMPLICIT_DECL.
7388 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
7389 (implicitly_declare): Remove.
7390 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
7391 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
7392 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
7393 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
7394 in the innermost scope, rather than at namespace scope.
7395 * name-lookup.c (push_local_binding): Give it external linkage.
7396 (pushdecl): Remove dead code.
7397 * name-lookup.h (push_local_binding): Declare it.
7398 * ptree.c (cxx_print_identifier): Don't print
7399 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
7400 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
7401 not IDENTIFIER_ERROR_LOCUS.
7402 * typeck.c (build_function_call): Remove dead code.
7404 2004-03-08 Jason Merrill <jason@redhat.com>
7407 * decl.c (xref_tag): Remove attribute handling.
7408 * cp-tree.h: Adjust prototype.
7409 * decl.c, parser.c, rtti.c: Adjust callers.
7410 * parser.c (cp_parser_class_head): Pass back attributes in the
7412 (cp_parser_class_specifier): Adjust.
7414 2004-03-08 Matt Austern <austern@apple.com>
7417 * name-lookup.c (add_decl_to_level): Add extern variables, as well
7418 as static, to static_decls array.
7420 2004-03-05 Jason Merrill <jason@redhat.com>
7422 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
7424 2004-03-04 Geoffrey Keating <geoffk@apple.com>
7426 * decl.c (grokfndecl): Update old incorrect comment.
7427 (grokvardecl): Diagnose C++ variables of type with no linkage.
7429 2004-03-01 Mark Mitchell <mark@codesourcery.com>
7432 * pt.c (build_non_dependent_expr): Do not create a
7433 NON_DEPENDENT_EXPR for a THROW_EXPR.
7435 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
7438 * error.c (dump_expr): Handle THROW_EXPR.
7440 2004-03-01 Mark Mitchell <mark@codesourcery.com>
7443 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
7444 lookup if ordinary name-lookup finds a non-function.
7445 * pt.c (tsubst_copy_and_build): Likewise.
7448 * parser.c (cp_parser_late_parsing_default_args): Check that there
7449 are no extra tokens after the end of the default-argument
7452 2004-03-01 Mark Mitchell <mark@codesourcery.com>
7455 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
7456 having C++ linkage for name-mangling purposes.
7459 * parser.c (cp_parser_direct_declarator): Recognize constructor
7460 declarators that use a template-id to name the class being
7464 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
7465 (tsubst_expr): Do not call tsubst_copy, even when
7466 processing_template_decl.
7468 2004-03-01 Jeff Law <law@redhat.com>
7470 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
7473 2004-02-29 Mark Mitchell <mark@codesourcery.com>
7476 * name-lookup.h (push_scope): Change prototype.
7477 * name-lookup.c (push_scope): Do not reenter the current class
7479 * decl.c (grokfndecl): Check return code from push_scope before
7481 * decl2.c (check_classfn): Likewise.
7482 * parser.c (cp_parser_conversion_function_id): Likewise.
7483 (cp_parser_init_declarator): Likewise.
7484 (cp_parser_direct_declarator): Likewise.
7485 (cp_parser_class_specifier): Likewise.
7486 (cp_parser_class_head): Likewise.
7487 (cp_parser_lookup_name): Likewise.
7488 (cp_parser_constructor_declarator_p): Likewise.
7489 * pt.c (instantiate_class_template): Likewise.
7490 (resolve_typename_type): Likewise.
7492 2004-02-29 Mark Mitchell <mark@codesourcery.com>
7495 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
7499 * class.c (update_vtable_entry_for_fn): Do not go through
7500 covariance machinery if the type returned by an overrider is the
7501 same as the original.
7503 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
7505 * call.c: Fix a comment typo.
7507 2004-02-27 Ziemowit Laski <zlaski@apple.com>
7509 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
7511 2004-02-26 Mark Mitchell <mark@codesourcery.com>
7514 * parser.c (cp_parser_parameter_declaration_list): Commit
7515 to fewer tentative parses.
7517 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7520 * pt.c (dependent_type_p_r): A template template parameter is a
7523 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7526 * mangle.c (write_template_arg_literal): Don't rely on identity for
7529 2004-02-24 Jason Merrill <jason@redhat.com>
7531 * tree.c (build_exception_variant): Use check_qualified_type.
7533 2004-02-23 Zack Weinberg <zack@codesourcery.com>
7534 Kazu Hirata <kazu@cs.umass.edu>
7536 * decl.c (cxx_init_decl_processing): Don't check
7537 flag_writable_strings.
7539 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
7542 * typeck.c (maybe_warn_about_returning_address_of_location):
7543 Change check for VAR_DECL to use DECL_P instead.
7545 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7548 * cvt.c (build_expr_type_conversion): Type must be complete before
7549 looking up for conversions.
7551 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7554 * name-lookup.c (arg_assoc_class): Don't look into template
7555 arguments if it is not a primary template.
7557 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
7560 * method.c (use_thunk): Always clone function argument tree.
7562 2004-02-20 Mark Mitchell <mark@codesourcery.com>
7565 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
7568 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
7569 for all type variants.
7571 2004-02-19 Mark Mitchell <mark@codesourcery.com>
7574 * decl.c (duplicate_decls): Return error_mark_node for invalid
7576 * name-lookup.c (push_namespace): Ignore the return value from
7578 * pt.c (push_template_decl_real): Robustify.
7581 * name-lookup.c (push_class_level_binding): Do not complain about
7582 adding a binding for a member whose name is the same as the
7583 enclosing class if the member is located in a base class of the
7586 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7589 * parser.c (cp_parser_new_expression): Parse an ill-formed
7590 direct-new-declarator after a parenthesized type-id to emit good
7593 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
7595 * cp-tree.def, cvt.c: Update copyright.
7597 2004-02-17 Mark Mitchell <mark@codesourcery.com>
7600 * cp-tree.h (abi_version_at_least): Remove.
7601 * mangle.c: Include flags.h.
7603 2004-02-15 Mark Mitchell <mark@codesourcery.com>
7606 * call.c (build_conditional_expr): Handle conversions between
7607 class types which result in differently cv-qualified type
7611 * class.c (delete_duplicate_fields_1): Remove.
7612 (delete_duplicate_fields): Likewise.
7613 (finish_struct_anon): Remove check for members with the same name
7614 as their enclosing class.
7615 (check_field_decls): Do not call duplicate_fields.
7616 * decl.c (grokdeclarator): Remove check for static data members
7617 with the same name as their enclosing class.
7618 * name-lookup.c (push_class_level_binding): Check for members with
7619 the same name as their enclosing class.
7621 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
7624 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
7626 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7629 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
7630 has full set of arguments.
7632 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7635 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
7637 2004-02-13 Mark Mitchell <mark@codesourcery.com>
7640 * cp-tree.h (delete_sanity): Change prototype.
7641 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
7642 Remove dead code. Adjust code to warn about deleting an array.
7643 * typekc.c (decay_conversion): Use build_address and build_nop.
7646 * search.c (accessible_p): Do not check access in thunks.
7649 * call.c (build_conditional_expr): Call force_rvalue on the
7650 non-void operand in the case that one result is a throw-expression
7651 and the other is not.
7653 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
7656 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
7657 the type name and look ahead for ::~, and bail out early with a
7658 better error message if the parse is going to fail.
7660 2004-02-12 Mark Mitchell <mark@codesourcery.com>
7662 * call.c (conversion_kind): New type.
7663 (conversion_rank): Likewise.
7664 (conversion): Likewise.
7665 (CONVERSION_RANK): New macro.
7666 (conversion_obstack): New variable.
7667 (obstack_initialized): Likewise.
7668 (z_candidate): Change type of convs and second_conv.
7669 (candidate_warning): New type.
7670 (IDENTITY_RANK): Remove.
7671 (EXACT_RANK): Likewise.
7672 (PROMO_RANK): Likewise.
7673 (STD_RANK): Likewise.
7674 (PBOOL_RANK): Likewise.
7675 (USER_RANK): Likewise.
7676 (ELLIPSIS_RANK): Likewise.
7677 (BAD_RANK): Likewise.
7678 (ICS_RANK): Likewise.
7679 (ICS_STD_RANK): Likewise.
7680 (ICS_USER_FLAG): Likewise.
7681 (ICS_ELLIPSIS_FLAG): Likewise.
7682 (ICS_THIS_FLAG): Likewise.
7683 (ICS_BAD_FLAG): Likewise.
7684 (NEED_TEMPORARY_P): Likewise.
7685 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
7686 (USER_CONV_CAND): Likewise.
7687 (USER_CONV_FN): Likewise.
7688 (conversion_obstack_alloc): New function.
7689 (alloc_conversion): Likewise.
7690 (validate_conversion_obstack): Likewise.
7691 (alloc_conversions): Likewise.
7692 (build_conv): Adjust to deal with new conversion data structures.
7693 (build_identity_conv): New function.
7694 (build_ambiguous_conv): Likewise.
7695 (standard_conversion): Adjust to deal with new conversion data
7697 (convert_class_to_reference): Likewise.
7698 (direct_reference_binding): Likewise.
7699 (reference_binding): Likewise.
7700 (implicit_conversion): Likewise.
7701 (add_candidate): Likewise.
7702 (add_function_candidate): Likewise.
7703 (add_conv_candidate): Likewise.
7704 (build_builtin_candidate): Likewise.
7705 (print_z_candidate): Likewise.
7706 (merge_conversion_sequences): Likewise.
7707 (build_user_type_conversion_1): Likewise.
7708 (build_user_type_conversion): Likewise.
7709 (build_new_function_call): Likewise.
7710 (build_object_call): Likewise.
7711 (conditional_conversion): Likewise.
7712 (build_conditional_expr): Likewise.
7713 (build_new_op): Likewise.
7714 (build_op_delete_call): Likewise.
7715 (convert_like_real): Likewise.
7716 (build_over_call): Likewise.
7717 (build_new_method_call): Likewise.
7718 (is_subseq): Likewise.
7719 (maybe_handle_implicit_object): Likewise.
7720 (maybe_handle_ref_bind): Likewise.
7721 (compare_ics): Likewise.
7722 (source_type): Likewise.
7723 (add_warning): Likewise.
7725 (can_convert_arg): Likewise.
7726 (can_convert_arg_bad): Likewise.
7727 (perform_implicit_conversion): Likewise.
7728 (perform_direct_initialization_if_possible): Likewise.
7729 (initialize_reference): Likewise.
7730 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
7731 * cp-tree.def (WRAPPER): Likewise.
7732 (IDENTITY_CONV): Remove.
7733 (LVALUE_CONV): Likewise.
7734 (QUAL_CONV): Likewise.
7735 (STD_CONV): Likewise.
7736 (PTR_CONV): Likewise.
7737 (PMEM_CONV): Likewise.
7738 (BASE_CONV): Likewise.
7739 (REF_BIND): Likewise.
7740 (USER_CONV): Likewise.
7741 (AMBIG_CONV): Likewise.
7742 (RVALUE_CONV): Likewise.
7743 * cp-tree.h (tree_wrapper): Remove.
7744 (WRAPPER_ZC): Remove.
7745 (lang_tree_node): Remove wrapper.
7746 (LOOKUP_SPECULATIVELY): Remove.
7747 (build_op_delete_call): Adjust prototype.
7748 (validate_conversion_obstack): Declare.
7749 (build_zc_wrapper): Remove.
7750 * cvt.c (convert_to_reference): Remove dead code.
7751 (ocp_convert): Likewise.
7752 * decl.c (redeclaration_error_message): Correct handling of
7754 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
7755 (cp_tree_node_structure): Remove WRAPPER case.
7756 * decl2.c (finish_file): Call validate_conversion_obstack.
7757 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
7758 (build_op_delete_call): Likewise.
7759 (build_x_delete): Likewise.
7760 (build_delete): Adjust call to build_op_delete_call.
7761 * pt.c (tsubst_friend_declaration): Adjust code to determine
7762 whether or not a friend template is a definition.
7763 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
7764 * tree.c (build_zc_wrapper): Remove.
7766 2004-02-12 Zack Weinberg <zack@codesourcery.com>
7768 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
7769 * cp-tree.h: Don't declare cxx_builtin_type_decls.
7770 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
7771 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
7773 2004-02-10 Mark Mitchell <mark@codesourcery.com>
7775 * typeck.c (lookup_destructor): Fix typo in error message.
7777 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
7779 * call.c, parser.c, tree.c: Fix comment typos.
7781 2004-02-07 Zack Weinberg <zack@codesourcery.com>
7784 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
7785 * decl.c (duplicate_decls, start_function): Likewise.
7787 2004-02-07 Zack Weinberg <zack@codesourcery.com>
7789 * name-lookup.c (pushdecl): Issue shadow warnings directly.
7790 * parser.c (free_parser_stacks): Delete.
7792 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
7794 * rtti.c: Update copyright.
7796 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7799 * decl.c (require_complete_types_for_parms): Do not insert
7800 error_mark_node in the parameter list.
7802 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7805 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
7806 error when terminator can not be found.
7808 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
7810 Make-lang.in (po-generated): Delete.
7812 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
7814 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
7815 targetm.calls.promote_prototypes.
7817 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
7821 2004-01-15 Geoffrey Keating <geoffk@apple.com>
7823 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
7824 (handle_pragma_implementation): Likewise.
7826 2004-02-05 Mark Mitchell <mark@codesourcery.com>
7829 * typeck.c (lookup_destructor): Tweak error message.
7831 2004-02-05 Jan Hubicka <jh@suse.cz>
7833 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
7836 2004-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7839 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
7840 code, only emits the diagnostic now. Added lookup of the identifier
7841 and support for qualified ids.
7842 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
7843 Parse an (invalid) type name as id-expression within a declarator.
7844 (cp_parser_simple_declaration): Use it.
7845 (cp_parser_member_declaration): Likewise.
7846 (cp_parser_make_typename_type): New function. Handle errors through
7847 cp_parser_diagnose_invalid_typename.
7848 (cp_parser_elaborated_type_specifier): Use it.
7850 2004-02-04 Mark Mitchell <mark@codesourcery.com>
7853 * call.c (convert_like_real): Use "converting" rather than
7854 "argument" as the descriptive keyword to
7855 dubious_conversion_warnings.
7856 * typeck.c (convert_for_assignment): Do not call
7857 dubious_conversion_warnings.
7859 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7862 * init.c (build_delete): Emit a more informative error message in
7863 case of an incomplete type, and on the correct source line.
7865 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
7867 * error.c, search.c: Update copyright.
7869 2004-02-04 Mark Mitchell <mark@codesourcery.com>
7872 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
7873 linkage for the typeinfo name string.
7875 2004-02-04 Mark Mitchell <mark@codesourcery.com>
7878 * cp-tree.h (fold_non_dependent_expr): New function.
7879 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
7880 (cp_parser_template_argument): Use fold_non_dependent_expr.
7881 (cp_parser_direct_declarator): Likewise.
7882 * pt.c (fold_non_dependent_expr): New function.
7883 (convert_nontype_argument): Use it.
7884 (tsubst_qualified_id): Simplify.
7885 (tsubst_copy_and_build): Likewise.
7887 2004-02-04 Mark Mitchell <mark@codesourcery.com>
7889 * decl.c (cxx_push_function_context): Do not set
7890 current_function_is_thunk.
7891 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
7894 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7897 * pt.c (more_specialized_class): Increase processing_template_decl
7898 while partial ordering.
7900 2004-02-03 Mark Mitchell <mark@codesourcery.com>
7903 * decl.c (start_function): Do not call pushdecl for any
7904 instantiation or specialization of a primary template.
7906 2004-02-03 Mark Mitchell <mark@codesourcery.com>
7909 * parser.c (cp_parser_class_name): Robustify.
7912 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
7915 * semantics.c (finish_id_expression): Do not return an
7916 IDENTIFIER_NODE when lookup finds a PARM_DECL.
7918 2004-02-03 Mark Mitchell <mark@codesourcery.com>
7921 * pt.c (build_non_dependent_expr): Do not build
7922 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
7925 * semantics.c (finish_id_expression): Do not return an
7926 IDENTIFIER_NODE when lookup finds a VAR_DECL.
7929 * parser.c (cp_parser_simple_declaration): When skipping to the
7930 end of the statement swallow the terminating semicolon.
7932 2004-02-02 Mark Mitchell <mark@codesourcery.com>
7935 * init.c (build_offset_ref): Improve error recovery for invalid
7936 uses of non-static member functions.
7939 * cp-tree.h (cp_build_type_attribute_variant): New function.
7940 * class.c (build_clone): Use cp_build_type_attribute_variant.
7941 * decl.c (duplicate_decls): Likewise.
7942 * pt.c (copy_default_args_to_explicit_spec): Likewise.
7943 (tsubst_function_type): Likewise.
7944 * tree.c (build_exception_variant): Check attributes before
7945 concluding that two types are the same.
7946 (cp_build_type-attribute_variant): New method.
7947 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
7950 * call.c (convert_class_to_reference): Keep better track of
7951 pedantically invalid user-defined conversions.
7953 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7956 * pt.c (tsubst_qualified_id): Improved error message when a type
7957 is expected but not found.
7959 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
7961 * class.c: Fix comment typos.
7963 * error.c: Likewise.
7964 * parser.c: Likewise.
7966 * search.c: Likewise.
7967 * typeck.c: Likewise.
7969 2004-01-30 Richard Henderson <rth@redhat.com>
7972 * method.c (use_thunk): Don't force_target_expr for void thunks.
7973 * tree.c (build_target_expr_with_type): Assert non-void type.
7974 (force_target_expr): Likewise.
7976 2004-01-30 Michael Matz <matz@suse.de>
7978 * parser.c (cp_parser_labeled_statement): Accept case ranges.
7980 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7984 * decl.c (grokdeclarator): Check immediatly type completeness for
7985 non-dependent types.
7987 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7990 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
7991 a sizeof expression.block
7993 2004-01-29 Mark Mitchell <mark@codesourcery.com>
7996 * mangle.c (write_encoding): Correct encoding of member template
7999 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
8001 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
8002 template name as it was `<::' (digraph typo).
8003 (cp_parser_nth_token_starts_template_argument_list_p): New function.
8004 (cp_parser_id_expression): Use it.
8005 (cp_parser_nested_name_specifier_opt): Likewise.
8006 (cp_parser_template_name): Likewise.
8007 (cp_parser_class_name): Likewise.
8008 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
8010 2004-01-28 Mark Mitchell <mark@codesourcery.com>
8013 * typeck.c (merge_types): Do not merge attributes into
8017 * parser.c (cp_parser_direct_declarator): Do not prevent
8018 backtracking inside a parenthesized declarator.
8019 (cp_parser_parameter_declaration): Fix typo in comment.
8021 2004-01-28 Jan Hubicka <jh@suse.cz>
8023 * semantics.c (expand_body) Do emit_associated_thunks before
8026 2004-01-27 Devang Patel <dpatel@apple.com>
8028 * name-lookup.c: Include "debug.h"
8029 (do_namespace_alias): Invoke debug_hooks to emit debug info
8030 for namespace alias.
8031 (do_local_using_decl): Invoke debug_hooks to emit debug info
8033 (do_class_using_decl): Same.
8034 (do_toplevel_using_decl): Same.
8035 (do_using_directive): Same.
8036 (cp_emit_debug_info_for_using): New function.
8037 * Make-lang.in (cp/parser.o): Depend on debug.h
8038 (cp/name-lookup.o): Same.
8040 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8042 * cp-tree.h (language_function, lang_type_header): Use
8044 * name-lookup.h (cp_binding_level): Likewise.
8046 2004-01-26 Mark Mitchell <mark@codesourcery.com>
8049 * semantics.c (finish_for_expr): Check for unresolved overloaded
8052 * class.c (add_method): Just check processing_template_decl to
8053 determine whether or not we are within a template.
8054 * decl2.c (maybe_retrofit_in_chrg): Likewise.
8055 * init.c (decl_constant_value): Check the type of the declaration,
8057 * name-lookup.c (maybe_push_to_top_level): Rename to ...
8058 (push_to_top_level): ... this.
8059 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
8060 * pt.c (push_template_decl_real): Reorder condition for speed.
8061 (convert_template_argument): Use dependency-checking functions in
8062 place of uses_template_parms.
8063 (lookup_template_class): Avoid calling uses_template_parms more
8065 (uses_template_parms): Reimplement, using dependency-checking
8067 (instantiate_class_template): Use push_to_top_level, not
8068 maybe_push_to_top_level.
8069 (type_unification_real): Simplify.
8070 (type_dependent_expression_p): Handle OFFSET_REFs and
8072 (any_dependent_template_arguments_p): Handle multiple levels of
8074 * semantics.c (expand_or_defer_fn): Do not check
8075 uses_template_parms for template instantiations.
8076 * typeck.c (comptypes): Avoid calling cp_type_quals.
8078 2004-01-25 Mark Mitchell <mark@codesourcery.com>
8081 * call.c (build_over_call): Do not convert arguments when
8082 processing a template.
8083 * pt.c (build_non_dependent_expr): Do not build a
8084 NON_DEPENDENT_EXPR for arithmetic constants.
8086 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
8089 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
8090 returns a TYPE_DECL. no further lookup is required.
8091 * semantics.c (check_template_template_default_arg): A TYPE_DECL
8092 is invalid. Rework to give better diagnostics.
8094 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8097 * pt.c (instantiate_class_template): Add an error_mark_node
8099 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
8101 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
8104 * decl.c (finish_function): Move the call to
8105 finish_fname_decls below the call to
8106 finish_eh_spec_block.
8108 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
8110 * optimize.c, typeck2.c: Update copyright.
8112 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
8114 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
8115 init.c, mangle.c, typeck.c: Update copyright.
8117 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
8119 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
8121 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
8123 * Make-lang.in: Replace $(docdir) with doc.
8124 (c++.info, c++.srcinfo): Dummy entry.
8125 (c++.man, c++.srcman): New rules.
8126 (c++.install-man): Revamp rule.
8128 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
8130 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
8131 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
8132 immediate $(shell) instead of deferred backquote.
8134 2004-01-19 Mark Mitchell <mark@codesourcery.com>
8137 * parser.c (cp_parser_postfix_expression): When encountering
8138 incomplete type on left-hand side of "->" or ".", treat the entire
8139 expression as erroneous.
8142 * call.c (build_field_call): Remove.
8143 (n_build_method_call): Likewise.
8144 (build_method_call): Likewise.
8145 (build_new_method_call): Do not call build_field_call.
8146 * class.c (n_build_method_call): Remove.
8147 (print_class_statistics): Do not print it.
8148 * cp-tree.h (build_method_call): Remove declaration.
8149 (finish_object_call_expr): Likewise.
8150 (build_new_1): Do not use build_method_call.
8151 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
8152 when the function appearing on the right-hand-side of "." or "->"
8153 is not actually a function.
8154 * pt.c (tsubst_copy_and_build): Likewise.
8155 * semantics.c (finish_object_call_expr): Remove.
8157 2004-01-18 Mark Mitchell <mark@codesourcery.com>
8160 * pt.c (tsubst): Use finish_typeof.
8162 2004-01-18 Jason Merrill <jason@redhat.com>
8165 * except.c (build_throw): In a template, set
8166 current_function_returns_abnormally.
8168 2004-01-17 Fred Fish <fnf@intrinsity.com>
8171 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
8172 except don't call array_type_nelts() with a VECTOR_TYPE.
8174 2004-01-16 Jan Hubicka <jh@suse.cz>
8176 * mangle.c (write_mangled_name): Remove inline modifier.
8178 2004-01-16 Mark Mitchell <mark@codesourcery.com>
8181 * decl.c (compute_array_index_type): Fix grammar in comment.
8182 * init.c (build_zero_init): Handle zero-sized arrays correctly.
8185 * call.c (name_as_c_string): Print conversion operator names
8189 * call.c (initialize_reference): Pass -1 for inner parameter to
8192 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
8195 * parser.c (cp_parser_base_specifier): Check for an invalid
8196 keyword `typename' and emit an user-friendly error message.
8198 2004-01-15 Geoffrey Keating <geoffk@apple.com>
8201 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
8202 (handle_pragma_implementation): Likewise.
8204 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
8207 * typeck.c (build_class_member_access_expr): Allow to access members
8208 of the currently open class.
8209 (finish_class_member_access_expr): Likewise.
8211 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
8214 * name-lookup.c (validate_nonmember_using_decl): Take scope and
8215 name by value, instead of computing them.
8216 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
8217 arguments. Pass them to validate_nonmember_using_decl.
8218 * name-lookup.h (do_local_using_decl): Adjust.
8219 (do_toplevel_using_decl): Likewise.
8220 * parser.c (cp_parser_using_declaration): Likewise.
8221 * pt.c (tsubst_expr): Likewise.
8223 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
8227 * name-lookup.c (qualified_lookup_using_namespace): Search
8228 strongly-associated namespaces first, and only then try other
8231 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
8233 * Make-lang.in (c++.srcextra): Dummy entry.
8235 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
8238 * parser.c (cp_parser_template_name): Don't try to parse a
8239 conversion-function-id, as it cannot be a template-name.
8240 (cp_parser_simple_type_specifier): Check for invalid template-ids
8241 even after a built-in type.
8243 2004-01-14 Jan Hubicka <jh@suse.cz>
8246 * pt.c (instantiate_decl): Do not increase function_depth.
8248 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
8252 * parser.c (cp_parser_elaborated_type_specifier): Warn about
8253 attributes and discard.
8254 * decl.c (xref_tag): Don't overwite existing attributes with
8257 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
8260 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
8261 is no destructor while looking up a BIT_NOT_EXPR.
8263 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
8265 * cxxfilt.c: Remove unused file.
8267 2004-01-14 Jan Hubicka <jh@suse.cz>
8269 Partial fix to PR c++/12850
8270 * decl2.c (mark_used): Do not proactively instantiate templates
8271 when compiling in unit-at-a-time or not optimizing.
8272 * optimize.c (maybe_clone_body): Do not increase function depth.
8274 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
8277 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
8279 2004-01-12 Steven Bosscher <stevenb@suse.de>
8282 * parser.c (cp_parser_member_declaration): Any non-type is also
8283 not a class or a function.
8285 2004-01-12 Jason Merrill <jason@redhat.com>
8288 * class.c (build_base_path): Do not mark vtable references as
8290 (build_vtbl_ref_1): Likewise.
8292 2004-01-12 Richard Henderson <rth@redhat.com>
8295 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
8296 (store_init_value): Use it.
8297 * decl.c (check_initializer): Expect full initialization code
8298 from store_init_value.
8299 * init.c (expand_aggr_init_1): Likewise.
8300 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
8302 2004-01-12 Mark Mitchell <mark@codesourcery.com>
8304 * class.c (layout_class_type): For non-POD class types, also copy
8305 the DECL_SIZE and DECL_MODE of fields to the base class type.
8307 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8310 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
8311 calling regenerate_decl_from_template.
8313 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
8316 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
8317 decl-specifier occurring along with a class definition.
8319 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
8321 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
8322 clauses to comments describing declares_class_or_enum.
8323 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
8326 2004-01-12 Jan Hubicka <jh@suse.cz>
8328 * pt.c (for_each_template_parm): Do not check for duplicates.
8329 (for_each_template_parm): Use walk_tree duplicate checking code.
8331 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
8334 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
8335 is error_mark_node, don't add any more decl_specs.
8336 (cp_parser_init_declarator): After committing to a declaration, if
8337 the decl_specifiers start with error_mark_node, issue an error and
8338 change the type to "int".
8340 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
8343 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
8345 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
8349 * pt.c (tsubst): Substitution must fail if we are attempting to
8350 create an array with element type that is an abstract class type.
8351 * decl.c (cp_finish_decl): Strip pointers and array types recursively
8352 before calling abstract_virtuals_error.
8354 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
8356 * name-lookup.c (qualified_lookup_using_namespace): Consider
8357 strong using directives even if we've already found a binding.
8359 2004-01-09 Mark Mitchell <mark@codesourcery.com>
8361 * cp-tree.h (cxx_expand_expr): Change prototype.
8362 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
8364 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
8367 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
8368 looking into them recursively. They can be there because of the
8369 new __offsetof__ extension.
8371 2004-01-07 Zack Weinberg <zack@codesourcery.com>
8373 * parser.c (cp_parser_save_member_function_body): Mark the
8376 2004-01-05 Mark Mitchell <mark@codesourcery.com>
8379 * class.c (build_clone): Copy type attributes from the original
8380 function to the clone.
8383 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
8384 references as constant.
8387 * parser.c (cp_parser_explicit_instantiation): Improve error
8389 (cp_parser_require): Improve indication of the error location.
8392 * parser.c (cp_parser_class_head): Reorder logic to check for
8393 invalid qualification.
8395 2004-01-04 Mark Mitchell <mark@codesourcery.com>
8398 * name-lookup.c (lookup_using_namespace): Remove spacesp
8400 (unqualified_namespace_lookup): Likewise.
8401 (lookup_qualified_name): Adjust accordingly.
8402 (lookup_name_real): Likewise.
8403 (lookup_arg_dependent): Do not eliminate the namespace of the
8404 functions found by unqualified name lookup unless that is the
8407 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
8409 * semantics.c (push_deferring_access_checks): Fix format.
8410 (resume_deferring_access_checks): Likewise.
8411 (stop_deferring_access_checks): Likewise.
8412 (pop_deferring_access_checks): Likewise.
8413 (get_deferred_access_checks): Likewise.
8414 (pop_to_parent_deferring_access_checks): Likewise.
8415 (perform_deferred_access_checks): Likewise.
8416 (perform_or_defer_access_check): Likewise.
8418 2004-01-04 Richard Henderson <rth@redhat.com>
8420 * call.c (build_over_call): Don't create a save_expr of an
8421 aggregate, but rather its address.
8423 2004-01-04 Mark Mitchell <mark@codesourcery.com>
8426 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
8427 an offsetof expression.
8429 * parser.c (cp_parser_parameter_declaration): Fix comment.
8432 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
8433 (reference_binding): Set it when appropriate.
8434 (build_temp): New function, split out from ...
8435 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
8436 (initialize_reference): Likewise.
8439 * parser.c (cp_parser): Add in_type_id_in_expr_p.
8440 (cp_parser_new): Initialize it.
8441 (cp_parser_postfix_expression): Set it.
8442 (cp_parser_sizeof_operand): Likewise.
8443 (cp_parser_parameteR_declaration): Do not commit early to tenative
8444 parsers when in_type_id_in_expr_p is set.
8446 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8449 * parser.c (cp_parser_template_argument): Don't call
8450 make_unbound_class_template directly.
8451 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
8452 UNBOUND_CLASS_TEMPLATE tree node.
8454 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
8457 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
8459 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8462 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
8463 (DECL_FUNCTION_TEMPLATE_P): Use it.
8464 (DECL_CLASS_TEMPLATE_P): Likewise.
8465 * parser.c (cp_parser_lookup_name): Add is_template parameter.
8466 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
8467 (cp_parser_template_name): Likewise.
8468 (cp_parser_elaborated_type_specifier): Likewise.
8469 (cp_parser_namespace_name): Likewise.
8470 (cp_parser_class_name): Likewise.
8471 (cp_parser_lookup_name_simple): Likewise.
8473 See ChangeLog.3 for earlier changes.