1 2004-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3 * decl.c (grok_declarator): Remove a redundant semicolon.
5 * parser.c (cp_parser_decl_specifier_seq, cp_parser_type_specifier):
6 Correct comments describing function parameters.
8 2004-09-03 Matt Austern <austern@apple.com>
9 Compile speed improvement.
10 * parser.c (cp_lexer_print_token): Only define if ENABLE_CHECKING set.
11 Otherwise define a stub macro that expands to nothing.
12 (cp_lexer_debugging_p): Only define if ENABLE_CHECKING set. Otherwise
13 define a stub macro that expands to 0.
14 (cp_lexer_start_debugging): Only define if ENABLE_CHECKING set.
15 (cp_lexer_stop_debugging): Likewise.
16 (cp_lexer_debug_stream): Only define if ENABLE_CHECKING set. Otherwise
17 define a stub macro that expands to NULL.
18 (cp_lexer_new_main): Only set debugging_p if ENABLE_CHECKING set.
19 (cp_lexer_new_from_tokens): Likewise.
21 2004-09-03 Jan Hubicka <jh@suse.cz>
23 * decl.c (finish_function): Clean out pointers we no longer need.
25 2004-09-03 Jan Beulich <jbeulich@novell.com>
27 * g++spec.c (MATH_LIBRARY_PROFILE): Default to MATH_LIBRARY rather
30 2004-09-02 Paul Brook <paul@codesourcery.com>
32 * decl2.c (determine_visibility): Only check data visibility
35 2004-08-31 Mark Mitchell <mark@codesourcery.com>
37 * cp-tree.h (DECL_CONSTRUCTION_VTABLE_P): New macro.
38 * class.c (build_ctor_vtbl_group): Set DECL_CONSTRUCTION_VTABLE_P.
39 * decl2.c (determine_visibility): Honor
40 TARGET_CXX_EXPORT_CLASS_DATA.
42 * class.c (key_method): Rename to ...
43 (determine_key_method): ... this.
44 (finish_struct_1): Adjust accordingly.
45 * cp-tree.h (key_method): Declare.
46 * decl2.c (maybe_emit_vtables): Determine the key method here if
47 it has not already been done.
49 2004-08-31 Ziemowit Laski <zlaski@apple.com>
51 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-objcp-common.o.
52 (cp/cp-lang.o): Depend on debug.h, gtype-cp.h and cp/cp-objcp-common.h.
53 (cp/cp-decl.c): Do not depend on gtype-cp.h.
54 (cp/cp-objcp-common.o): New target.
55 * cp-lang.c: Include debug.h, cp-objcp-common.h and gtype-cp.h.
56 (cxx_get_alias_set, cxx_warn_unused_global_decl, cp_expr_size,
57 cp_tree_size, cp_var_mod_type_p, cxx_initialize_diagnostics): Move
58 prototypes and definitions to cp-objcp-common.h and cp-objcp-common.c,
60 (LANG_HOOKS_TREE_SIZE, LANG_HOOKS_FINISH,
61 LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_INIT_OPTIONS,
62 LANG_HOOKS_INITIALIZE_DIAGNOSTICS, LANG_HOOKS_HANDLE_OPTION,
63 LANG_HOOKS_HANDLE_FILENAME, LANG_HOOKS_MISSING_ARGUMENT,
64 LANG_HOOKS_POST_OPTIONS, LANG_HOOKS_GET_ALIAS_SET,
65 LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_EXPAND_EXPR,
66 LANG_HOOKS_EXPAND_DECL, LANG_HOOKS_PARSE_FILE,
67 LANG_HOOKS_DUP_LANG_SPECIFIC_DECL, LANG_HOOKS_TRUTHVALUE_CONVERSION,
68 LANG_HOOKS_SET_DECL_ASSEMBLER_NAME, LANG_HOOKS_MARK_ADDRESSABLE,
69 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
70 LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
71 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_PRINT_ERROR_FUNCTION,
72 LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL, LANG_HOOKS_WRITE_GLOBALS,
73 LANG_HOOKS_FUNCTION_INIT, LANG_HOOKS_FUNCTION_FINAL,
74 LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P,
75 LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE,
76 LANG_HOOKS_ATTRIBUTE_TABLE, LANG_HOOKS_TREE_INLINING_WALK_SUBTREES,
77 LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN,
78 LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS,
79 LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P,
80 LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P,
81 LANG_HOOKS_TREE_INLINING_VAR_MOD_TYPE_P,
82 LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN,
83 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN, LANG_HOOKS_EXPR_SIZE,
84 LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR,
85 LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, LANG_HOOKS_MAKE_TYPE,
86 LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE,
87 LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
88 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE, LANG_HOOKS_INCOMPLETE_TYPE_ERROR,
89 LANG_HOOKS_TYPE_PROMOTES_TO, LANG_HOOKS_REGISTER_BUILTIN_TYPE,
90 LANG_HOOKS_GIMPLIFY_EXPR, LANG_HOOKS_FOLD_OBJ_TYPE_REF): Move
91 hooks to cp-objcp-common.h.
92 (finish_file): New function.
93 * cp-objcp-common.c: New file.
94 * cp-objcp-common.h: New file.
95 * cp-tree.h (cp_finish_file): New prototype.
96 * decl.c: Do not include gtype-cp.h.
97 * decl2.c (finish_file): Rename to cp_finish_file.
99 2004-08-31 Richard Henderson <rth@redhat.com>
102 * pt.c (tsubst_expr): Move OFFSETOF_EXPR handling ...
103 (tsubst_copy_and_build): ... here.
105 2004-08-30 Mark Mitchell <mark@codesourcery.com>
107 * cp-tree.h (initialize_artificial_var): Declare.
108 * decl.c (initialize_artifical_var): New function.
109 * class.c (initialize_array): Remove.
110 (initialize_vtable): Use initialize_artificial_var.
111 (build_vtt): Likewise.
112 (build_ctor_vtbl_group): Likewise.
114 2004-08-30 Richard Henderson <rth@redhat.com>
116 * class.c (build_base_path): Use build_address directly.
117 * typeck.c (build_unary_op): Don't lower &a.b to pointer
119 * typeck2.c (store_init_value): Don't assume !TREE_CONSTANT
120 means !initializer_constant_valid_p.
122 2004-08-30 Richard Henderson <rth@redhat.com>
124 * class.c (fixed_type_or_null): Use get_base_address before
125 assuming an ADDR_EXPR is non-null.
127 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
129 * name-lookup.c (pop_binding, pushdecl,
130 set_identifier_type_value_with_scope, push_overloaded_decl,
131 arg_assoc_type): Replace abort with gcc_assert or gcc_unreachable.
132 * parser.c (cp_parser_diagnose_invalid_type_name,
133 cp_parser_postfix_expression, cp_parser_unary_expression,
134 cp_parser_check_declarator_template_para): Likewise.
135 * pt.c (push_inline_template_parms_recursive,
136 check_explicit_specialization, convert_nontype_argument,
137 coerce_template_template_parms, uses_template_parms,
138 instantiate_class_template, tsubst_decl, tsubst, tsubst_copy,
139 tsubst_expr, instantiate_template,
140 maybe_adjust_types_for_deduction, type_unification_real,
141 resolve_overloaded_unification, template_decl_level,
142 type_dependent_expression_p): Likewise.
143 * search.c (lookup_base_r): Likewise.
144 * semantics.c (finish_stmt_expr, simplify_aggr_init_expr): Likewise.
145 * tree.c (lvalue_p_1, count_functions, cxx_printable_name,
146 verify_stmt_tree_r, get_type_decl, stabilize_call): Likewise.
147 * typeck.c (common_type, get_member_function_from_ptrfunc,
148 build_binary_op, build_unary_op, expand_ptrmemfunc_cst): Likewise.
149 * typeck2.c (cxx_incomplete_type_diagnostic,
150 split_nonconstant_init_1, store_init_value,
151 process_init_constructor): Likewise.
153 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
155 * call.c (check_dtor_name): Replace abort with gcc_assert or
157 (build_call, add_builtin_candidate, build_new_op,
158 convert_like_real, build_over_call, in_charge_arg_for_name,
159 source_type, joust): Likewise.
160 * class.c (build_simple_base_path, get_vcall_index,
161 finish_struct_1, instantiate_type, get_enclosing_class,
162 add_vcall_offset_vtbl_entries_1, cp_fold_obj_type_ref): Likewise.
163 * cp-gimplify.c (cp_genericize): Likewise.
164 * cp-lang.c (cp_expr_size, cp_tree_size): Likewise.
165 * cvt.c (cp_convert_to_pointer, ocp_convert): Likewise.
166 * decl.c (poplevel, make_unbound_class_template, reshape_init,
167 check_special_function_return_type, grokdeclarator,
168 grok_op_properties, tag_name, xref_tag, start_preparsed_function,
169 finish_function): Likewise.
170 * decl2.c (grokfield, maybe_emit_vtables):Likewise.
171 * error.c (dump_global_iord, dump_decl, dump_template_decl,
172 language_to_string): Likewise.
173 * except.c (choose_personality_routine): Likewise.
174 * friend.c (do_friend): Likewise.
175 * g++spec.c (lang_specific_driver): Likewise.
176 * init.c (build_zero_init, expand_default_init, build_new_1,
177 build_vec_delete_1, build_vec_init, build_dtor_call): Likewise.
178 * lex.c (retrofit_lang_decl, cp_type_qual_from_rid): Likewise.
179 * mangle.c (add_substitution, write_unscoped_name,
180 write_template_prefix, write_identifier,
181 write_special_name_destructor, write_type, write_builtin_type,
182 write_expression, write_template_param,
183 write_java_integer_type_codes): Likewise.
184 * method.c (implicitly_declare_fn): Likewise.
186 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
188 * cp-tree.h (BINFO_PRIMARY_P): Use a binfo flag.
189 (BINFO_INDIRECT_PRIMARY_P): Remove.
190 * class.c (determine_primary_base): Rename to ...
191 (determine_primary_bases): ... here. Set all primary bases.
192 (set_primary_base): Remove.
193 (mark_primary_bases): Remove.
194 (build_simple_base_path, walk_subobject_offsets,
195 propagate_binfo_offsets, end_of_class): Adjust.
196 (layout_class_type): Rename determine_primary_base call.
197 (dump_class_hierarchy_r, dump_vtable): Adjust. Don't pass a binfo
199 (dfs_build_secondary_vptr_vtt_inits, dfs_accumulate_vtbl_inits,
200 build_rtti_vtbl_entries): Adjust.
201 * init.c (build_vtbl_address): Adjust.
203 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Use gcc_assert.
205 2004-08-28 Ziemowit Laski <zlaski@apple.com>
207 * Make-lang.in (CXX_OBJS): Split up into CXX_OBJS and
209 (CXX_C_OBJS): Include in CXX_AND_OBJCXX_OBJS instead of listing
210 separately on the link line.
212 2004-08-28 Jason Merrill <jason@redhat.com>
214 * decl.c (expand_static_init): Avoid bogus warnings.
216 2004-08-27 Jason Merrill <jason@redhat.com>
219 * tree.c (stabilize_init): See through a COMPOUND_EXPR.
222 * decl.c (expand_static_init): Use thread-safety API.
223 (register_dtor_fn): Return the call, don't expand it.
224 * tree.c (add_stmt_to_compound): New fn.
225 (stabilize_call): Use it.
227 2004-08-27 Richard Henderson <rth@redhat.com>
229 * cp-tree.def (OFFSETOF_EXPR): New.
230 * parser.c (cp_parser_builtin_offsetof): Either built an
231 OFFSETOF_EXPR, or call fold_offsetof immediately.
232 * pt.c (tsubst_expr): Handle OFFSETOF_EXPR.
234 2004-08-27 Nathan Sidwell <nathan@codesourcery.com>
236 * call.c (validate_conversion_obstack): Replace
237 my_friendly_assert with gcc_assert or gcc_unreachable.
238 (direct_reference_binding, merge_conversion_sequences,
239 build_user_type_conversion_1, perform_overload_resolution,
240 build_op_delete_call, enforce_access, call_builtin_trap,
241 build_over_call, build_special_member_call, build_new_method_call,
242 initialize_reference): Likewise.
243 * class.c (build_base_path, build_primary_vtable, alter_access,
244 check_bases, update_vtable_entry_for_fn, layout_empty_base,
245 clone_function_decl, adjust_clone_args,
246 type_requires_array_cookie, include_empty_classes,
247 finish_struct_1, resolve_address_of_overloaded_function,
248 instantiate_type, get_vtbl_decl_for_binfo, build_vtt_inits,
249 dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
250 accumulate_vtbl_inits, build_vtbl_initializer,
251 build_vbase_offset_vtbl_entries, build_rtti_vtbl_entries): Likewise.
252 * cvt.c (build_up_reference, convert_to_reference): Likewise.
253 * decl.c (poplevel, duplicate_decls, make_typename_type,
254 cxx_init_decl_processing, reshape_init, check_initializer,
255 make_rtl_for_nonlocal_decl, initialize_local_var, cp_finish_decl,
256 expand_static_init, grokfndecl, grokvardecl, build_ptrmem_type,
257 grokdeclarator, copy_fn_p, grok_op_properties, xref_tag,
258 xref_basetypes, start_preparsed_function, save_function_data,
259 finish_function, finish_method, maybe_register_incomplete_var,
260 complete_vars): Likewise.
261 * decl2.c (grok_array_decl, check_member_template,
262 check_classfn, finish_static_data_member_decl, coerce_new_type,
263 coerce_delete_type, import_export_class, decl_needed_p,
264 determine_visibility, import_export_decl, build_cleanup,
265 start_static_initialization_or_destructi, do_static_destruction,
266 prune_vars_needing_no_initialization,
267 build_offset_ref_call_from_tree): Likewise.
268 * error.c (dump_decl, dump_expr): Likewise.
269 * init.c (finish_init_stmts, build_zero_init,
270 expand_virtual_init, expand_default_init, expand_aggr_init_1,
271 build_offset_ref, build_new_1, build_delete, build_vbase_delete):
273 * mangle.c (write_method_parms, write_template_args,
274 write_expression, write_template_arg): Likewise.
275 * method.c (make_thunk, finish_thunk, use_thunk): Likewise.
276 * name-lookup.c (pop_binding, begin_scope, leave_scope,
277 resume_scope, push_using_decl, validate_nonmember_using_decl,
278 is_ancestor, poplevel_class, set_inherited_value_binding_p,
279 push_class_level_binding, do_class_using_decl, push_namespace,
280 pop_namespace, add_using_namespace, ambiguous_decl,
281 lookup_namespace_name, lookup_type_current_level,
282 maybe_process_template_type_declaration): Likewise.
283 * parser.c (cp_lexer_peek_nth_token,
284 cp_parser_parse_and_diagnose_invalid_typ,
285 cp_parser_translation_unit, cp_parser_template_id,
286 cp_parser_lookup_name, cp_parser_late_parsing_for_member): Likewise.
287 * pt.c (push_access_scope, finish_member_template_decl,
288 push_inline_template_parms_recursive, add_outermost_template_args,
289 get_innermost_template_args, begin_explicit_instantiation,
290 end_explicit_instantiation, retrieve_specialization,
291 is_specialization_of, is_specialization_of_friend,
292 register_specialization, check_explicit_specialization,
293 comp_template_parms, process_template_parm,
294 process_partial_specialization, convert_nontype_argument,
295 coerce_template_template_parms, coerce_template_parms,
296 mangle_class_name_for_template, lookup_template_function,
297 lookup_template_class, instantiate_class_template, tsubst_decl,
298 tsubst_function_type, tsubst, tsubst_qualified_id, tsubst_copy,
299 instantiate_template, fn_type_unification, type_unification_real,
300 get_template_base, regenerate_decl_from_template,
301 template_for_substitution, instantiate_decl,
302 get_mostly_instantiated_function_type, dependent_scope_ref_p,
303 value_dependent_expression_p, resolve_typename_type): Likewise.
304 * repo.c (repo_emit_p): Likewise.
305 * rtti.c (build_headof, get_tinfo_decl, get_pseudo_ti_init,
306 create_tinfo_types, emit_tinfo_decl): Likewise.
307 * search.c (lookup_base_r, lookup_base, lookup_field_1,
308 dfs_access_in_type, build_baselink, lookup_member,
309 adjust_result_of_qualified_name_lookup, copied_binfo): Likewise.
310 * semantics.c (perform_or_defer_access_check,
311 finish_non_static_data_member, finish_stmt_expr_expr,
312 finish_stmt_expr, finish_call_expr, finish_pseudo_destructor_expr,
313 finish_template_template_parm, finish_member_declaration,
314 emit_associated_thunks): Likewise.
315 * tree.c (build_target_expr_with_type, force_target_expr,
316 copy_binfo, get_first_fn, cp_tree_equal): Likewise.
317 * typeck.c (type_after_usual_arithmetic_conversions, comptypes,
318 cxx_sizeof_or_alignof_type, perform_integral_promotions,
319 build_class_member_access_expr, finish_class_member_access_expr,
320 build_ptrmemfunc_access_expr, build_unary_op,
321 unary_complex_lvalue, cxx_mark_addressable, build_modify_expr,
322 build_ptrmemfunc, expand_ptrmemfunc_cst, check_return_expr
323 * typeck2.c (complete_type_check_abstract,
324 abstract_virtuals_error, process_init_constructor,
325 add_exception_specifier): Likewise.
327 2004-08-27 Nathan Sidwell <nathan@codesourcery.com>
329 * class.c (build_vtbl_initializer): Use ssize_int.
330 * decl.c (complete_array_type): Likewise.
331 * method.c (finish_thunk): Likewise.
332 * search.c (get_dynamic_base_type): Likewise.
334 2004-08-26 Richard Henderson <rth@redhat.com>
336 * cp-tree.h (DECL_FIELD_IS_BASE): New.
337 * class.c (build_base_field): Set it.
338 (build_simple_base_path): Use it.
339 (fixed_type_or_null): Don't consider base fields definitive.
341 2004-08-25 Roger Sayle <roger@eyesopen.com>
344 PR tree-optimization/16372
345 * decl.c (finish_enum): Make the precision of the enumerated type
346 the same width as the underlying integer type.
348 2004-08-25 Mark Mitchell <mark@codesourcery.com>
351 * lex.c (build_lang_decl): Set DECL_NO_STATIC_CHAIN for all C++
354 * mangle.c (get_identifier_nocopy): Add cast.
356 * cp-tree.h (mangle_type): Remove.
357 * mangle.c (globals): GTY it.
358 (mangle_obstack): New variable.
359 (name_obstack): Likewise.
360 (name_base): Likewise.
361 (write_char): Adjust accordingly.
362 (write_chars): Likewise.
363 (write_string): Likewise.
364 (start_mangling): Initialize G.substitutions only one. Add
366 (finish_mangling): Use VARRAY_CLEAR to reclaim
367 storage in G.substitutions. Use obstack_finish.
368 (init_mangle): Adjust for changes to variable names above.
369 Initialize G.substitutions.
370 (mangle_decl_string): Adjust call to start_mangling.
371 (get_identifier_nocopy): New function.
372 (mangle_decl): Use it.
373 (mangle_type_string): Adjust call to start_mangling.
374 (mangle_special_for_type): Likewise.
375 (mangle_vtt_for_type): Likewise.
376 (mangle_ctor_vtbl_for_type): Likewise.
377 (mangle_thunk): Likewise.
378 (mangle_guard_variable): Likewise.
379 (mangle_ref_init_variable): Likewise.
381 2004-08-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
384 * pt.c (redeclare_class_template): Check the type of non-type and
385 template template parameter.
387 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
390 * call.c (convert_class_to_reference): Adjust build_int_cst calls.
391 (build_user_type_conversion_1, convert_like_real,
392 build_java_interface_fn_ref, build_special_member_call): Likewise.
393 * class.c (finish_struct_1, build_vtbl_initializer): Likewise.
394 * cp-gimplify.c (cp_gimplify_expr): Likewise.
395 * cvt.c (cp_convert_to_pointer): Likewise.
396 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
397 * decl2.c (start_static_initialization_or_destruction,
398 generate_ctor_or_dtor_function): Likewise.
399 * except.c (build_throw): Likewise.
400 * mangle.c (write_integer_cst): Likewise.
401 * method.c (finish_thunk): Likewise.
402 * rtti.c (build_headof, get_tinfo_decl_dynamic,
403 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
404 get_pseudo_ti_init): Likewise.
405 * search.c (get_dynamic_cast_base_type): Likewise.
407 2004-08-25 Zack Weinberg <zack@codesourcery.com>
409 * class.c, search.c: Remove references to DWARF_DEBUG.
411 2004-08-25 Adam Nemet <anemet@lnxw.com>
413 * repo.c (extract_string): Reset backquote after one character.
414 (get_base_filename): Fix indentation.
415 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
417 * decl.c (cxx_init_decl_processing): Adjust
418 build_common_tree_nodes call.
420 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
423 * (is_subobject_of_p): Resurrect & optimize.
424 (lookup_field_r): Use it.
426 2004-08-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
429 * search.c (friend_accessible_p): Increment processing_template_decl
430 when deal with TEMPLATE_DECL of SCOPE.
432 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
435 * semantics.c (check_accessibility_of_qualified_id): Defer check
436 if qualifying_type is a template parameter.
438 2004-08-23 Mark Mitchell <mark@codesourcery.com>
441 * pt.c (instantiate_decl): Do not try to apply
442 DECL_DECLARED_INLINED_P to a VAR_DECL.
444 * search.c (build_baselink): Fix typo in comment.
446 2004-08-22 Andrew Pinski <apinski@apple.com>
449 2004-08-22 Andrew Pinski <apinski@apple.com>
451 * typeck.c (build_unary_op): Use &a.b if the folded lowered
452 expression is not constant.
454 2004-08-23 Nathan Sidwell <nathan@codesourcery.com>
456 * name-lookup.c (pushdecl): Rename build_type_copy call.
457 * tree.c (cp_build_qualified_type_real,
458 build_exception_variant, handle_java_interface_attribute): Likewise.
460 2004-08-22 Andrew Pinski <apinski@apple.com>
463 * typeck.c (build_unary_op): Use &a.b if the folded lowered
464 expression is not constant.
466 2004-08-20 Mark Mitchell <mark@codesourcery.com>
469 * decl.c (expand_static_init): Use DECL_FUNCTION_SCOPE_P.
471 2004-08-21 Joseph S. Myers <jsm@polyomino.org.uk>
474 * pt.c (tsubst_copy_and_build): Avoid clearing TREE_NO_WARNING for
477 2004-08-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
479 * pt.c (register_specialization): Check DECL_TEMPLATE_SPECIALIZATION
480 before calling comp_template_args.
482 2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
484 * class.c (build_vtbl_initializer): Use build_int_cst for
486 * decl.c (complete_array_type): Likewise.
487 * method.c (finish_thunk): Likewise.
489 2004-08-20 Andreas Tobler <a.tobler@schweiz.ch>
491 * tree.c: Remove unused mark_local_for_remap_r.
493 2004-08-19 Eric Christopher <echristo@redhat.com>
495 * cp-tree.h (cxx_unsave_expr_now): Delete prototype.
496 * tree.c (cxx_unsave_expr_now): Delete.
497 (cp_unsave_r): Ditto.
499 2004-08-19 Mark Mitchell <mark@codesourcery.com>
502 * pt.c (push_template_decl_real): Disallow template allocation
503 functions with fewer than two parameters.
505 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
507 * cp-tree.h (build_shared_int_cst): Remove.
508 * tree.c (shared_int_cache): Remove.
509 (build_shared_int_cst): Remove.
510 * class.c (finish_struct_1): Use build_int_cst.
512 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
514 * decl.c (finish_enum): Do not copy value node early, copy
516 * lex.c (cxx_init): Force null_node to be unique.
518 2004-08-19 Joseph S. Myers <jsm@polyomino.org.uk>
521 * pt.c (tsubst_copy, tsubst_copy_and_build): Copy TREE_NO_WARNING
522 from input for MODOP_EXPR.
524 2004-08-18 Mark Mitchell <mark@codesourcery.com>
526 * pt.c (dependent_template_p): Fix typo in commment.
529 * pt.c (dependent_template_p): Treat IDENTIFIER_NODEs as
532 2004-08-17 Mark Mitchell <mark@codesourcery.com>
535 * pt.c (unify): Tidy ARRAY_TYPE handling. Make sure that non-type
536 arguments have the same type as the corresponding parameter.
539 * parser.c (cp_parser_name_lookup_error): If parser->object_scope
540 is set use it for diagnostic purposes.
541 (cp_parser_pseudo_destructor_name): Remove special-case error
545 * semantics.c (expand_or_defer_fn): Honor -fkeep-inline-functions.
548 * cp-tree.h (qualified_name_lookup_error): Add parameter.
549 * name-lookup.c (do_class_using_decl): Restrict set of entities
550 passed to cp_emit_debug_info_for_using more carefully.
551 (lookup_qualified_name): Allow lookup_member to return sets of
553 * parser.c (cp_parser_lookup_name): Add ambiguous_p parameter.
554 (cp_parser_primary_expression): Handle ambiguous lookups.
555 (cp_parser_template_name): Adjust use of cp_parser_lookup_name.
556 (cp_parser_template_argument): Likewise.
557 (cp_parser_elaborate_type_specifier): Likewise.
558 (cp_parser_namespace_name): Likewise.
559 (cp_parser_class_name): Likewise.
560 (cp_parser_lookup_name_simple): Likewise.
561 * pt.c (tsubst_qualified_id): Handle ambiguous results.
562 (tsubst_expr): Likewise.
563 * semantics.c (qualified_name_lookup_error): Add decl paramter.
564 For ambiguous lookups, print candidates.
566 2004-08-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
569 * pt.c (instantiate_pending_templates): Add int parameter. Don't
571 * cp-tree.h (instantiate_pending_templates): Adjust prototype.
572 * decl2.c (finish_file): Adjust call to
573 instantiate_pending_templates.
575 2004-08-15 Roger Sayle <roger@eyesopen.com>
577 * call.c (build_vfield_ref, build_call, build_conditional_expr,
578 convert_arg_to_ellipsis, build_x_va_arg, build_over_call,
579 build_java_interface_fn_ref, build_special_member_call,
580 build_new_method_call, initialize_reference): Replace calls to
581 build with calls to buildN.
582 * class.c (build_base_path, convert_to_base_statically,
583 build_vfn_ref, instantiate_type, dfs_accumulate_vtbl_inits,
584 build_vtbl_initializer): Likewise.
585 * cp-gimplify.c (genericize_try_block, genericize_catch_block,
586 gimplify_if_stmt, cp_genericize_r): Likewise.
587 * cvt.c (convert_to_void): Likewise.
588 * decl.c (check_initializer, finish_constructor_body,
589 finish_destructor_body): Likewise.
590 * error.c (dump_expr): Likewise.
591 * except.c (build_exc_ptr, expand_start_catch_block, build_throw):
593 * init.c (perform_member_init, expand_virtual_init,
594 expand_cleanup_for_base, build_init, expand_default_init,
595 build_offset_ref, decl_constant_value, build_new, build_new_1,
596 build_vec_delete_1, build_vec_init, build_delete,
597 push_base_cleanups, build_vec_delete): Likewise.
598 * mangle.c (write_integer_cst): Likewise.
599 * method.c (thunk_adjust, do_build_copy_constructor,
600 do_build_assign_ref): Likewise.
601 * pt.c (lookup_template_function, tsubst, tsubst_copy_and_build,
602 unify, build_non_dependent_expr): Likewise.
603 * rtti.c (build_headof, build_typeid, ifnonnull,
604 build_dyanmic_cast_1, tinfo_base_init): Likewise.
605 * semantics.c (begin_compound_stmt, finish_call_expr,
606 finish_pseudo_destructor_expr, finish_id_expression,
607 simplify_aggr_init_expr, finalize_nrv_r): Likewise.
608 * tree.c (build_target_expr, build_cplus_new, array_type_nelts_top,
609 array_type_nelts_total, stabilize_call): Likewise.
610 * typeck.c (decay_conversion, build_class_member_access_expr,
611 lookup_destructor, build_ptrmemfunc_access_expr, build_array_ref,
612 get_member_function_from_ptrfunc, build_binary_op, pointer_diff,
613 build_x_unary_op, build_unary_op, unary_complex_lvalue,
614 build_compound_expr, build_modify_expr, expand_ptrmemfunc_cst,
615 check_return_expr): Likewise.
616 * typeck2.c (split_nonconstant_1, split_nonconstant_init_1,
617 split_nonconstant_init, store_init_value, build_m_component_ref):
620 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
622 * call.c (convert_class_to_reference,
623 build_user_type_conversion_1, convert_like_real,
624 build_java_interface_fn_ref, build_special_member_call): Use
626 * class.c (build_vtbl_initializer): Likewise.
627 * cp-gimplify.c (cp_gimplify_expr): Likewise.
628 * cvt.c (cp_convert_to_pointer): Likewise.
629 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
630 * decl2.c (start_static_initialization_or_destruction,
631 generate_ctor_or_dtor_function): Likewise.
632 * except.c (build_throw): Likewise.
633 * lex.c (cxx_init): Likewise.
634 * mangle.c (write_integer_cst): Likewise.
635 * rtti.c (build_headof, get_tinfo_decl_dynamic,
636 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
637 get_pseudo_ti_init): Likewise.
638 * search.c (get_dynamic_cast_base_type): Likewise.
639 * tree.c (build_shared_int_cst): Likewise.
641 2004-08-12 Mark Mitchell <mark@codesourcery.com>
644 * class.c (count_depth_data): New type.
645 (dfs_depth_post): New function.
646 (dfs_depth_q): Likewise.
647 (find_final_overrider_data_s): Change type of vpath.
649 (dfs_find_final_overrider_1): New function.
650 (dfs_find_final_overrider): Use it.
651 (dfs_find_final_overrider_q): Adjust use of vpath.
652 (dfs_find_final_overrider_post): Likewise.
653 (find_final_overrider): Use dfs_depth. Allocate and deallocate
656 2004-08-12 Jan Beulich <jbeulich@novell.com>
658 * parser.c (cp_parser_asm_definition): Properly consume scope operator
659 tokens preceding the clobbers. Don't check for scope operator
660 following inputs. Simplify inputs handling to match that now used for
663 2004-08-11 Mark Mitchell <mark@codesourcery.com>
666 * except.c (build_throw): Allocate cleanup_type and the function
667 for __cxa_throw separately.
670 * call.c (standard_conversion): Do not accept conversions between
671 pointers to members if the class types are unrelated.
674 * parser.c (cp_parser_builtin_offsetof): Cast to "const volatile
675 char &" instead of just "char &".
678 * pt.c (tsubst): Just return the unknown_type_node.
680 2004-08-11 Mark Mitchell <mark@codesourcery.com>
683 * parser.c (cp_parser_class_specifier): Robustify.
686 * pt.c (tsubst_copy_and_build): Complain about invalid
690 * pt.c (tsubst_default_argument): Clear out current_class_ptr and
691 current_class_ref while tsubsting.
693 2004-08-10 Mark Mitchell <mark@codesourcery.com>
696 * parser.c (cp_parser_init_declarator): Robustify.
698 2004-08-06 Richard Sandiford <rsandifo@redhat.com>
700 * typeck2.c (process_init_constructor): Guard the missing field warning
701 with warn_missing_field_initializers rather than extra_warnings.
703 2004-08-06 Paolo Bonzini <bonzini@gnu.org>
705 * class.c (instantiate_type) <ENTRY_VALUE_EXPR>: Do not handle.
707 2004-08-05 Mark Mitchell <mark@codesourcery.com>
709 * decl.c (start_preparsed_function): Move determine_visibility
711 * decl2.c (determine_visibility): Incorporate dllexport testing.
713 2004-08-05 Geoffrey Keating <geoffk@apple.com>
715 * g++spec.c (lang_specific_driver): An -Xlinker or -Wl, option
716 means that libstdc++ is needed.
718 2004-08-05 Nathan Sidwell <nathan@codesourcery.com>
720 * cvt.c (cp_convert_to_pointer): Adjust force_fit_type call.
722 2004-08-04 Geoffrey Keating <geoffk@apple.com>
724 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_ASSEMBLER_NAME rather
725 than passing it as a parameter to rest_of_decl_compilation.
726 * decl2.c (grokfield): Use set_user_assembler_name.
728 2004-08-04 Nathan Sidwell <nathan@codesourcery.com>
730 * decl.c (complete_array_type): Don't gratuitously copy
731 maxindex. Its type is always set.
733 2004-08-04 Paul Brook <paul@codesourcery.com>
735 * Make-lang.in (cp/semantics.o, cp/optimize.o): Depend on TARGET_H.
736 * cp-tree.h (struct language_function): Rename x_dtor_label to
738 (dtor_label): Rename ...
739 (cdtor_label): ... to this.
740 * decl.c (begin_constructor_body): Remove.
741 (check_special_function_return_type): Maybe change the return type.
742 (grokdeclarator): Pass the class type.
743 (start_preparsed_function): Constructors may need a return label.
744 (finish_constructor_body, finish_destructor_body): Set the return
746 (begin_function_body): Don't call begin_constructor_body.
747 (finish_function): Don't warn for constructors or destructors.
748 (implicitly_declare_fn): Maybe change the return type.
749 * optimize.c: Include target.h.
750 (maybe_clone_body): Remap the function result.
751 * semantics.c: Include target.h.
752 (finish_return_stmt): Maybe jump to return label for constructors.
754 2004-08-03 Mark Mitchell <mark@codesourcery.com>
756 * class.c (build_vtable): Do not set DECL_VISIBILITY here.
757 (check_field_decls): Or here.
758 (check_methods): Or here.
759 (initialize_array): Don't mess with DECL_CONTEXT.
760 * cp-tree.h (start_decl): Adjust prototype.
761 (determine_visibility): New function.
762 * decl.c (duplicate_decls): Remove checks for hidden "operator
764 (build_library_fn_1): Give all library functions default
766 (start_decl): Add pop_scope_p parameter. Tidy.
767 (cp_finish_decl): Do not pop scopes here. Call
768 determine_visibility for variable definitions.
769 (start_preparsed_function): Call determine_visibility.
770 * decl2.c (determine_visibility): New function.
771 * method.c (use_thunk): Fix formatting.
772 * parser.c (cp_parser_condition): Adjust calls to start_decl.
773 (cp_parser_init_declarator): Likewise.
774 * pt.c (instantiate_decl): Always call pop_nested_class.
775 * rtti.c (get_tinfo_decl): Do not set DECL_VISIBILITY.
776 (tinfo_base_init): Likewise.
778 2004-08-02 Mark Mitchell <mark@codesourcery.com>
781 * name-lookup.c (validate_nonmember_using_decl): Robustify.
783 2004-08-01 Mark Mitchell <mark@codesourcery.com>
786 * name-lookup.c (decl_namespace): Remove.
787 (current_decl_namespace): Use decl_namespace_context instead of
789 (push_decl_namespace): Likewise.
790 (arg_assoc_class): Likewise.
791 (arg_assoc_type): Likewise.
792 * pt.c (check_specialization_namespace): New function.
793 (maybe_process_partial_specialization): Use it.
794 (register_specialization): Likewise.
797 * cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): New macro.
798 * call.c (null_ptr_cst_p): Handle variables with constant
800 * pt.c (convert_nontype_argument): Use
801 DECL_INTEGRAL_CONSTANT_VAR_P.
802 * semantics.c (finish_id_expression): Likewise.
805 * decl.c (duplicate_decls): Reject duplicate namespace
809 * typeck.c (build_ptrmemfunc): Loosen assertion.
811 2004-08-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
813 * call.c (z_candidate::template_decl): Rename from template.
814 (add_template_candidate_real): Adjust member reference.
817 2004-07-29 Mark Mitchell <mark@codesourcery.com>
819 * cp-tree.h (IDENTIFIER_REPO_CHOSEN): Define.
820 (lang_decl_flags): Narrow the width of "languages". Add
822 (DECL_NEEDED_P): Remove.
823 (FOR_EACH_CLONE): New macro.
824 (DECL_REPO_AVAILABLE_P): Likewise.
825 (DECL_TINFO_P): Likewise.
826 (set_linkage_according_to_type): Declare.
827 (import_export_vtable): Remove.
828 (import_export_tinfo): Likewise.
829 (mark_needed): New function.
830 (decl_needed_p): Likewise.
831 (note_vauge_linkage_fn): Likewise.
832 (init_repo): Change prototype.
833 (repo_template_used): Remove.
834 (repo_template_instantiated): Likewise.
835 (repo_emit_p): New function.
836 (repo_export_class_p): Likewise.
837 (no_linkage_check): Change prototype.
838 * class.c (set_linkage_according_to_type): New function.
839 (build_vtable): Use it. Do not call import_export_vtable. Set
840 DECL_IGNORED_P if appropriate.
841 * decl.c (duplicate_decls): Preserve DECL_REPO_AVAILABLE_P.
842 (make_rtL_for_nonlocal_decls): Check for template instantiations
844 (grokfndecl): Adjust call to no_linkage_check.
845 (set_linkage_for_static_data_member): New function.
846 (grokvardecl): Use it. Adjust call to no_linkage_check.
847 (grokdeclarator): Use set_linkage_for_static_data_member.
848 * decl2.c (note_vague_linkage_fn): New function.
849 (note_vague_linkage_var): Likewise.
850 (finish_static_data_member_decl): Use it.
851 (import_export_vtable): Remove.
852 (import_export_class): Use repo_export_class_p.
853 (var_finalized_p): Simplify.
854 (maybe_emit_vtables): Simplify.
855 (mark_needed): New function.
856 (decl_needed_p): Likewise.
857 (import_export_decl): Add documentation and consistency checks.
858 Use repo_emit_p. Handle virtual tables and RTTI information
860 (import_export_tinfo): Remove.
861 (write_out_vars): Call import_export_decl.
862 (cxx_callgraph_analyze_expr): Ensure that all vtables are emitted
864 (finish_file): Use decl_needed_p. Do not call import_export_decl
865 for undefined static data members. Do not warn about undefined
866 inlines when using a repository.
867 (mark_used): Use note_vague_linkage_fn. Always defer template
869 * lex.c (cxx_init): Adjust call to init_repo. Always set
871 * method.c (synthesize_method): Remove unncessary
872 import_export_decl call.
873 (implicitly_declare_fn): Use set_linkage_according_to_type.
874 * optimize.c (maybe_clone_body): Use FOR_EACH_CLONE.
875 * pt.c (instantiate_class_template): Don't redundantly add classes
876 to keyed_classes. Don't call repo_template_used.
877 (tsubst_decl): Set DECL_INTERFACE_KNOWN for instantiations of
878 templates with internal linkage.
879 (check_instantiated_args): Adjust call to no_linkage_check.
880 (instantiate_template): Use FOR_EACH_CLONE.
881 (mark_definable): New function.
882 (mark_decl_instantiated): Use it.
883 (do_decl_instantiation): Adjust tests for explicit instantiation
884 after "extern template".
885 (instantiate_class_member): Do not use repo_template_instantiated.
886 (do_type_instantiation): Simplify.
887 (instantiate_decl): Use mark_definable. Check repo_emit_p.
889 * repo.c (repo_get_id): Remove.
890 (original_repo): Remove.
891 (IDENTIFIER_REPO_USED): Remove.
892 (IDENTIFIER_REPO_CHOSEN): Remove.
893 Remove all #if 0'd code.
894 (repo_template_used): Remove.
895 (repo_template_instantiated): Remove.
896 (temporary_obstack_initialized_p): New variable.
897 (init_repo): Register with lang_post_pch_load. Avoid creating
898 identifiers unnecessarily. Don't use original_repo. Close the
900 (reopen_repo_file_for_write): Not here.
901 (finish_repo): Always write out a new repository file.
902 (repo_emit_p): New function.
903 (repo_export_class_p): Likewise.
904 * rtti.c (get_tinfo_decl): Use set_linkage_according_to_type.
905 (involves_incomplete_p): New function.
906 (tinfo_base_init): Use it.
907 (ptr_initializer): Remove non_public_ptr parameter.
908 (ptm_initializer): Likewise.
909 (get_pseudo_ti_init): Likewise.
910 (unemitted_tinfo_decl_p): Remove.
911 (emit_tinfo_decl): Use import_export_decl.
912 * semantics.c (expand_body): Move updates of static_ctors and
914 (expand_or_defer_fn): ... here.
915 * tree.c (no_linkage_check): Add relaxed_p parameter.
917 2004-07-28 Eric Christopher <echristo@redhat.com>
919 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
921 2004-07-28 Nathan Sidwell <nathan@codesourcery.com>
923 * cp-tree.h (struct tree_pair_s): New.
924 (typedef tree_pair_p): New.
925 (DEF_VEC_O(tree_pair_s)): New.
926 (struct lang_type_class): Make vcall_indices a VEC(tree_pair_s).
927 (CLASSTYPE_VCALL_INDICES): Update documentation.
928 * class.c (get_vcall_index): Adjust.
929 (add_vcall_offset): Adjust.
931 2004-07-27 Kelley Cook <kcook@gcc.gnu.org>
933 * pt.c, typeck.c: Remove spurious carriage returns.
935 2004-07-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
938 * pt.c (coerce_template_template_parms) <PARM_DECL case>: Only check
939 when the type of ARG is not dependent.
941 2004-07-26 Geoffrey Keating <geoffk@apple.com>
943 * g++spec.c (LIBSTDCXX_PROFILE): Default to LIBSTDCXX.
944 (lang_specific_driver): If the C++ or math library options don't
945 start with '-l', don't count them as added libraries.
947 2004-07-26 Nathan Sidwell <nathan@codesourcery.com>
949 * decl.c (xref_basetypes): Adjust base access vector creation.
950 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Adjust base
952 * search.c (dynamic_cast_base_recurse, dfs_access_in_type): Likewise.
954 2004-07-26 Niall Douglas <s_fsfeurope2@nedprod.com>
955 Brian Ryner <bryner@brianryner.com>
959 * class.c (check_field_decls): Apply hidden visibility if
960 -fvisibility-inlines-hidden and inlined unless otherwise specified
961 (build_vtable): Set vtable visibility to class visibility.
962 (check_field_decls): Default static member visibility to class
964 (check_methods): Default method visibility to class visibility.
965 * cp-tree.h: Added CLASSTYPE_VISIBILITY and
966 CLASSTYPE_VISIBILITY_SPECIFIED macro.
967 * decl.c (duplicate_decls): New logic for merging definition decls
968 with declaration decls. Added ignore & warning when non default
969 applied to global operator new or delete.
970 * method.c, optimize.c, rtti.c: Added setting of VISIBILITY_SPECIFIED
971 wherever VISIBILITY was changed
972 * rtti.c (get_tinfo_decl): Set typeinfo visibility to class
974 (tinfo_base_init): Set typeinfo name visibility to class visibility.
976 2004-07-25 Bernardo Innocenti <bernie@develer.com>
978 * decl.c: Rename all identifiers named `class' to `cl'.
979 * cp-tree.h: Likewise.
981 2004-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
983 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Use GGC_CNEW.
984 * typeck2.c (abstract_virtuals_error): Use GGC_NEW.
985 * name-lookup.c (binding_entry_make): Use GGC_NEW.
986 (binding_table_construct): Use GGC_CNEWVEC.
987 (binding_table_new): Use GGC_NEW.
988 (cxx_binding_make): Likewise.
989 (begin_scope): Likewise.
990 (push_to_top_level): Use GCC_CNEW.
991 * parser.c (cp_token_cache_new): Likewise.
992 (cp_token_cache_push_token): Likewise.
993 (cp_lexer_new_main): Likewise.
994 (cp_lexer_new_from_tokens): Likewise.
995 (cp_parser_context_new): Likewise.
996 (cp_parser_new): Likewise.
997 (cp_lexer_new_from_tokens): Use GGC_NEWVEC.
998 * lex.c (cxx_make_type): Use GGC_CNEW.
999 (retrofit_lang_decl): Use GGC_NEWVAR.
1000 (cxx_dup_lang_specific_decl): Likewise.
1001 (copy_lang_type): Likewise.
1002 * decl.c (use_label): Use GGC_NEW instead of ggc_alloc.
1003 (save_function_data): Likewise.
1004 (lookup_label): Use GGC_CNEW instead of ggc_alloc_cleared.
1005 (cxx_push_function_context): Likewise.
1007 2004-07-25 Richard Henderson <rth@redhat.com>
1009 * decl.c (start_preparsed_function): Set DECL_ARTIFICIAL and
1010 DECL_IGNORED_P on RESULT_DECL.
1011 * semantics.c (finalize_nrv): Copy them too.
1013 2004-07-23 Nathan Sidwell <nathan@codesourcery.com>
1015 * search.c (lookup_conversion_operator): Avoid two loops.
1016 (add_conversions): Remove.
1017 (check_hidden_convs, split_conversions,
1018 lookup_conversions_r): New.
1019 (lookup_conversions): Use lookup_conversions_r.
1021 2004-07-22 Nathan Sidwell <nathan@codesourcery.com>
1023 * pt.c (get_template_base): Check type is completable.
1025 2004-07-21 Eric Christopher <echristo@redhat.com>
1027 * decl.c (poplevel): Inline unused variable checking.
1030 2004-07-21 Paolo Bonzini <bonzini@gnu.org>
1032 * typeck.c (build_binary_op): Do not use RDIV_EXPR for
1035 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1038 * pt.c (check_explicit_specialization): Remove extension to accept
1039 specializations without template headers. Fall-through to normal
1042 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1045 * pt.c (determine_specialization): New parameter template_count.
1046 Disambiguate between member templates and member functions counting
1047 the template headers.
1048 (check_explicit_specialization): Update caller.
1049 (tsubst_friend_function): Likewise.
1051 2004-07-20 Steven Bosscher <stevenb@suse.de>
1053 * cp-tree.def (TINST_LEVEL): Make it an 'x' node.
1054 * cp-tree.h (tinst_level_t): New tree type.
1055 (union lang_tree_node): Handle it.
1056 (TINST_LOCATION): New accessor macro.
1057 (make_tinst_level): New prototype.
1058 * cp-lang.c (cp_tree_size): Handle TINST_LEVEL.
1059 * decl.c (cp_tree_node_structure): Likewise.
1060 * error.c (print_instantiation_full_context): Use TINST_LOCATION.
1061 (print_instantiation_partial_context): Likewise.
1062 * pt.c (pop_tinst_level): Likewise.
1063 (push_tinst_level): Use make_tinst_level.
1064 * tree.c (make_tinst_level): New function.
1065 (cp_walk_subtrees): Walk TINST_DECL for a TINST_LEVEL node.
1067 2004-07-20 Mark Mitchell <mark@codesourcery.com>
1069 * parser.c (cp_parser_simple_type_specifier): Fix typo.
1072 * parser.c (cp_parser_simple_type_specifier): Do not record usage
1073 of globally-qualified names.
1075 2004-07-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1078 * error.c (dump_type) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Output
1081 2004-07-19 Mark Mitchell <mark@codesourcery.com>
1084 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
1085 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
1086 * class.c (add_implicitly_declared_members): Use
1087 CLASSTYPE_LAZY_ASSIGNMENT_OP.
1088 * method.c (lazily_declare_fn): Clear
1089 CLASSTYPE_LAZY_ASSIGNMENT_OP.
1090 * search.c (lookup_fnfields_1): Check it.
1092 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
1094 * cp-tree.h (vec_binfo_member): Remove.
1095 * tree.c (vec_binfo_member): Remove.
1097 * cp-tree.h (struct lang_type_class): Remove vfields field.
1098 (CLASSTYPE_VFIELDS): Remove.
1099 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
1100 * class.c (determine_primary_base): Remove CLASSTYPE_VFIELDS
1102 (dfs_modify_vtables): Use TYPE_CONTAINS_VPTR_P.
1103 (finish_struct_1): Remove CLASSTYPE_VFIELDS handling.
1104 * init.c (dfs_initialize_vtbl_ptrs): Use TYPE_CONTAINS_VPTR_P.
1106 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
1108 * cp-tree.h (DEF_VEC_P(tree)): Remove here.
1109 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
1111 (BINFO_LANG_SLOTS): Remove.
1112 * tree.c (copy_binfo): Adjust BINFO creation and accessors.
1113 * decl.c (xref_basetypes): Adjust BINFO creation and accessors.
1114 * class.c (check_bases): Adjust BINFO accessors.
1115 (determine_primary_base, finish_struct_bits,
1116 maybe_warn_about_overly_private_class, warn_hidden,
1117 walk_subobject_offsets, propagate_binfo_offsets, end_of_class,
1118 warn_about_ambiguous_bases, get_vfield_name,
1119 dump_class_hierarchy_r, build_vtt_inits, accumulate_vtbl_inits,
1120 add_vcall_offset_vtbl_entries_r): Likewise.
1121 * dump.c (cp_dump_tree): Likewise.
1122 * init.c (sort_mem_initializers, expand_member_init, build_delete,
1123 push_base_cleanups): Likewise.
1124 * method.c (do_build_copy_constructor, do_build_assign_ref,
1125 synthesize_exception_spec): Likewise.
1126 name-lookup.c (arg_assoc_class): Likewise.
1127 * pt.c (instantiate_class_template,
1128 get_template_base_recursive): Likewise.
1129 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Likewise.
1130 * typeck2.c (process_init_constructor): Likewise.
1131 * search.c (lookup_base_r, dynamic_cast_base_recurse,
1132 dfs_access_in_type, dfs_walk_real, look_for_overrides,
1133 types_overlap_p, copied_binfo, original_binfo): Likewise.
1134 (binfo_for_vtable): Remove
1136 2004-07-20 Steven Bosscher <stevenb@suse.de>
1138 * cp-tree.h (struct lang_decl_flags): Unify the template_info and
1139 thunk_alias, and the access and virtual_offset fields.
1140 (THUNK_VIRTUAL_OFFSET, THUNK_ALIAS): Adjust.
1141 * decl.c (finish_case_label): Update c_add_case_node call.
1143 2004-07-19 Mark Mitchell <mark@codesourcery.com>
1145 Revert patch for PR c++/16623.
1147 2004-07-19 Kelley Cook <kcook@gcc.gnu.org>
1149 * except.c: Remove two spurious carriage returns.
1151 2004-07-19 Mark Mitchell <mark@codesourcery.com>
1154 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
1155 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
1156 * class.c (add_implicitly_declared_members): Use
1157 CLASSTYPE_LAZY_ASSIGNMENT_OP.
1158 * method.c (lazily_declare_fn): Clear
1159 CLASSTYPE_LAZY_ASSIGNMENT_OP.
1160 * search.c (lookup_fnfields_1): Check it.
1162 2004-07-19 Nathan Sidwell <nathan@codesourcery.com>
1164 * class.c (add_method): Delay adding the slot until the end.
1165 (determine_primary_base): Adjust VEC_iterate invokation.
1166 (resort_type_method_vec, finish_struct_methods, warn_hidden,
1167 walk_subobject_offsets, end_of_class, warn_about_ambiguous_bases,
1168 build_vtbl_initializer): Likewise.
1169 * init.c (sort_mem_initializers, build_delete, push_base_cleanups,
1170 build_vbase_delete): Likewise.
1171 * method.c (do_build_copy_constructor): Likewise.
1172 * name-lookup.c (new_class_binding, print_binding_level,
1173 poplevel_class, store_class_bindings, push_to_top_level,
1174 pop_from_top_level): Likewise.
1175 * pt.c (check_explicit_specialization): Likewise.
1176 * search.c (lookup_conversion_operator, lookup_fnfields_1,
1177 get_pure_virtuals, add_conversions, dfs_check_overlap,
1178 binfo_for_vbase): Likewise.
1180 2004-07-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1183 * pt.c (unify) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Use only
1184 innermost set of template arguments during deduction. Simplify.
1186 2004-07-19 Joseph S. Myers <jsm@polyomino.org.uk>
1188 * typeck.c (build_modify_expr, build_x_modify_expr): Set
1189 TREE_NO_WARNING on assignments with an operator other than '='.
1191 2004-07-10 Steven Bosscher <stevenb@suse.de>
1192 Joseph S. Myers <jsm@polyomino.org.uk>
1194 * cp-tree.h (C_SET_EXP_ORIGINAL_CODE): Remove.
1195 * decl2.c (grokfield): Don't check current_class_depth via
1196 unused TREE_COMPLEXITY.
1197 * semantics.c (finish_parenthesized_expr): Set TREE_NO_WARNING
1198 to avoid the missing parentheses warning.
1199 Don't set C_SET_EXP_ORIGINAL_CODE.
1201 2004-07-18 Mark Mitchell <mark@codesourcery.com>
1203 * tree.c (no_linkage_helper): Remove.
1204 (no_linkage_check): Don't use walk_tree_without_duplicates.
1206 * mangle.c (write_expression): Issue a sorry for zero-operand
1209 2004-07-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1212 * init.c (build_offset_ref): Build SCOPE_REF with non-null
1213 TREE_TYPE for non-dependent names.
1214 * typeck.c (build_x_unary_op): Handle non-dependent SCOPE_REF.
1215 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
1216 unknown_type_node as its TREE_TYPE.
1217 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
1218 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
1219 (dump_expr) <SCOPE_REF case>: Likewise.
1221 2004-07-17 Jason Merrill <jason@redhat.com>
1224 * call.c (type_passed_as): Make the invisible reference type
1226 * cp-gimplify.c (gimplify_cleanup_stmt): Rename to
1227 cp_genericize_r. Handle invisible reference lowering.
1228 (is_invisiref_parm): New fn.
1229 (cp_genericize): Adjust the types of invisible reference parms.
1230 Don't repeat the walk for clones.
1231 * decl.c (store_parm_decls): Don't generate any code for clones.
1233 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
1235 * cp-tree.h (builtin_function): Declare.
1237 2004-07-16 Mark Mitchell <mark@codesourcery.com>
1239 * class.c (finish_struct_methods): Remove unncessary code.
1240 (add_implicitly_declared_members): Create declarations for default
1241 constructors and copy constructors lazily.
1242 * cp-tree.h (lang_type_class): Remove lazy_default_ctor and
1244 (CLASSTYPE_LAZY_DEFAULT_CTOR): New macro.
1245 (CLASSTYPE_LAZY_COPY_CTOR): Likewise.
1246 * decl2.c (check_classfn): Robustify.
1247 (locate_dtor): Handle empty CLASSTYPE_METHOD_VEC.
1248 (locate_ctor): Handle lazy default constructors.
1249 (locate_copy): Handle lazy copy constructors.
1250 (implicitly_declare_fn): Make sure we're looking at the
1251 TYPE_MAIN_VARIANT for a class before creating functions. Don't
1252 set TYPE_HAS_CONSTRUCTOR.
1253 (lazily_declare_fn): New function.
1254 * name-lookup.c (constructor_name_full): Simplify.
1255 * search.c (lookup_fnfields_1): Lazily create methods, as
1257 (lookup_for_overrides): Handle empty CLASSTYPE_METHOD_VEC.
1259 2004-07-16 Steven Bosscher <stevenb@suse.de>
1261 * cp-tree.h (struct lang_type): Don't have three GTY options on a
1262 single bit GTY desc.
1264 2004-07-16 Richard Henderson <rth@redhat.com>
1266 * cp-lang.c (LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING): Die.
1267 * cp-tree.h (cp_copy_res_decl_for_inlining): Remove.
1268 * tree.c (cp_copy_res_decl_for_inlining): Remove.
1270 2004-07-16 Nathan Sidwell <nathan@codesourcery.com>
1272 * class.c (finish_struct_bits): Use for loop.
1273 (propagate_binfo_offsets): Do primary binfo outside of loop.
1276 * dump.c (cp_dump_tree): Don't dump the bases if there's no
1279 * pt.c (tsubst) <TREE_BINFO case>: We should never get here.
1281 2004-07-15 Mark Mitchell <mark@codesourcery.com>
1283 * cp-tree.h (lang_type_class): Remove has_real_assign_ref and
1284 has_abstract_assign_ref. Make methods a VEC(tree) *.
1285 (TYPE_HAS_CONST_ASSIGN_REF): Add documentation.
1286 (CLASSTYPE_CONSTRUCTORS): Adjust for changes to CLASSTYPE_METHOD_VEC.
1287 (CLASSTYPE_DESTRUCTORS): Likewise.
1288 (TYPE_HAS_REAL_ASSIGN_REF): Remove.
1289 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
1290 (add_method): Change prototoype.
1291 * class.c (add_method): Remove error_p parameter. Adjust for
1292 changes to CLASSTYPE_METHOD_VEC.
1293 (handle_using_decl): Adjust call to add_method.
1294 (maybe_warn_about_overly_private_class): Adjust for
1295 changes to CLASSTYPE_METHOD_VEC.
1296 (resort_type_method_vec): Likewise.
1297 (finish_struct_methods): Likewise.
1298 (check_for_override): Likewise.
1299 (warn_hidden): Likewise.
1300 (add_implicitly_declared_members): Defer creation of assignment
1301 operators. Adjust call to add_method.
1302 (clone_function_decl): Adjust call to add_method.
1303 (check_bases_and_members): Don't set TYPE_HAS_REAL_ASSIGN_REF.
1304 (finish_struct_1): Use CLASSTYPE_DESTRUCTORS.
1305 * decl.c (grok_special_member_properties): Don't set
1306 TYPE_HAS_ABSTRACT_ASSIGN_REF.
1307 * decl2.c (check_classfn): Adjust for
1308 changes to CLASSTYPE_METHOD_VEC.
1309 * method.c (locate_dtor): Use CLASSTYPE_DESTRUCTORS.
1310 (locate_ctor): Use CLASSTYPE_CONSTRUCTORS.
1311 (locate_copy): Adjust for changes to CLASSTYPE_METHOD_VEC.
1312 (implicitly_declare_fn): Set DECL_SOURCE_LOCATION. Do not call
1314 * pt.c (check_explicit_specialization): Adjust for
1315 changes to CLASSTYPE_METHOD_VEC.
1316 (instantiate_class_template): Do not set
1317 TYPE_HAS_ABSTRACT_ASSIGN_REF.
1318 * ptree.c (cxx_print_type): Don't try to print
1319 CLASSTYPE_METHOD_VEC.
1320 * rtti.c (emit_support_tinfos): Use CLASSTYPE_DESTRUCTORS.
1321 * search.c (lookup_field_r): Adjust for
1322 changes to CLASSTYPE_METHOD_VEC.
1323 (lookup_fnfields): Likewise.
1324 (lookup_conversion_operator): Likewise.
1325 (lookup_fnfields_1): Likewise. Create assignment operators
1327 (look_for_overrides_here): Adjust for
1328 changes to CLASSTYPE_METHOD_VEC.
1329 (add_conversions): Likewise.
1330 * semantics.c (finish_member_declaration): Adjust call to add_method.
1332 2004-07-15 Jason Merrill <jason@redhat.com>
1334 * cp-lang.c (cxx_types_compatible_p): To the middle-end,
1335 references and pointers are compatible.
1337 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
1339 * decl.c (xref_basetypes): Refactor.
1340 * tree.c (copy_base_binfos): Replace with ...
1341 (copy_binfo): ... this. Deep copy the given binfo, (not the just
1342 bases of the given base).
1343 * cp-tree.h (copy_base_binfo): Remove.
1344 (copy_binfo): Declare.
1346 2004-07-15 Mark Mitchell <mark@codesourcery.com>
1348 * name-lookup.c (set_inherited_value_binding_p): Add class_type
1350 (get_class_binding): Adjust.
1351 (push_class_level_binding): Don't use set_inherited_value_binding_p.
1353 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
1355 * class.c (finish_struct_bits): Don't set TYPE_HAS_CONVERSION here.
1356 * decl.c (xref_basetypes): Set it here.
1358 * class.c (check_bases): Don't set CLASSTYPE_NON_AGGREGATE here.
1359 Don't check for incomplete base.
1360 (get_vfield_name): Simplify while loop.
1361 * decl.c (xref_basetypes): Set CLASSTYPE_NON_AGGREGATE here.
1363 2004-07-14 Mark Mitchell <mark@codesourcery.com>
1365 * lex.c (cxx_make_type): Remove call to get_pointer_type.
1367 * cp-tree.h (IDENTIFIER_VALUE): Remove.
1368 (BINFO_PUSHDECLS_MARKED): Likewise.
1369 (maybe_inject_for_scope_var): Likewise.
1370 (push_class_decls): Likewise.
1371 * name-lookup.h (push_class_binding): Remove.
1372 (innermost_non_namespace_value): New function.
1373 (outer_binding): Likewise.
1374 * class.c (add_method): Push bindings before adding to
1376 (restore_class_cache): Do not restore class_shadowed.
1377 (pushclass): Do not add USING_DECLs. Do not call
1379 * config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c.
1380 * decl.c (pushdecl): Use outer_binding.
1381 (poplevel): Set the scope for an out-of-scope for-loop declaration
1383 (cp_finish_decl): Don't call maybe_inject_for_scope_var.
1384 * name-lookup.c (new_class_binding): New function.
1385 (push_binding): Use it.
1386 (pushdecl): Use innermost_non_namespace_value.
1387 (maybe_inject_for_scope_var): Remove.
1388 (push_class_binding): Remove.
1389 (set_inherited_value_binding_p): New function.
1390 (get_class_binding): New function.
1391 (push_class_level_binding): Assert that the current_class_type is
1393 (outer_binding): New function.
1394 (innermost_non_namespace_value): Likewise.
1395 (lookup_name_real): Use outer_binding.
1396 (lookup_name_current_level): Ignore out-of-scope variables.
1397 * pt.c (check_template_shadow): Use innermost_non_namespace_value.
1398 (lookup_template_class): Likewise.
1399 * search.c (dfs_push_type_decls): Remove.
1400 (dfs_push_decls): Likewise.
1401 (setup_class_bindings): Likewise.
1402 (lookup_field_1): Handle USING_DECLs from dependent scopes.
1403 (marked_pushdecls_p): Remove.
1404 (unmarked_pushdecls_p): Remove.
1405 (marked_identifiers): Remove.
1406 (setup_class_bindings): Remove.
1407 (dfs_push_type_decls): Remove.
1408 (dfs_push_decls): Remove.
1409 (push_class_decls): Remove.
1411 2004-07-13 Mark Mitchell <mark@codesourcery.com>
1415 * decl.c (grokvardecl): Make declspecs parameter const.
1416 (grokdeclarator): Likewise. Adjust accordingly.
1417 * decl.h (grokdeclarator): Adjust declaration.
1418 * parser.c (cp_parser_init_declarator): Do not clear
1419 decl_specifiers->attributes.
1421 * cp-tree.h (lang_identifier): Remove class_value.
1422 (IDENTIFIER_CLASS_VALUE): Remove.
1423 (pop_class_decls): Likewise.
1424 (init_search_processing): Likewise.
1425 * class.c (handle_using_decl): Use lookup_member, not
1426 IDENTIFIER_CLASS_VALUE.
1427 (restore_class_cache): New function, split out from ...
1428 (pushclass): ... here. Do not call clear_identifier_class_values.
1429 (invalidate_class_lookup_cache): Do not clear
1430 IDENTIFIER_CLASS_VALUE.
1431 (popclass): Do not call pop_class_decls.
1432 (maybe_note_name_used_in_class): Do not save names looked up after
1433 the class is complete. Use lookup_member, not
1434 IDENTIFIER_CLASS_VALUE.
1435 * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
1436 * decl.c (cxx_init_decl_processing): Do not call
1437 init_search_processing.
1438 * method.c (do_build_copy_constructor): Remove unnecessary code.
1439 (do_build_assign_ref): Likewise.
1440 * name-lookup.c (pushdecl): Use lookup_member, not
1441 IDENTIFIER_CLASS_VALUE.
1442 (set_identifier_type_value_with_scope): Set TREE_TYPE on the
1444 (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
1445 (push_class_binding): Do not set it.
1446 (clear_identifier_class_values): Remove.
1447 (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
1448 (store_binding): Do not save it.
1449 (pop_from_top_level): Do not restore it.
1450 * name-lookup.h (cxx_saved_binding): Remove class_value.
1451 (clear_identifier_class_values): Remove.
1452 * ptree.c (cxx_print_identifier): Do not print
1453 IDENTIFIER_CLASS_VALUE.
1454 * search.c (search_obstack): Remove.
1455 (push_stack_level): Remove.
1456 (pop_stack_level): Remove.
1457 (search_level): Remove.
1458 (search_stack): Remove.
1459 (lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
1460 (setup_class_bindings): Use IDENTIFIER_MARKED, not
1461 IDENTIFIER_CLASS_VALUE.
1462 (marked_identifiers): New variable.
1463 (push_class_decls): Clear IDENTIFIER_MARKED.
1464 (pop_class_decls): Don't call pop_search_level.
1465 (init_search_processing): Remove.
1467 2004-07-12 Mark Mitchell <mark@codesourcery.com>
1469 * cp-tree.h (get_aggr_typedef): Remove.
1470 * init.c (get_aggr_typedef): Likewise.
1472 * name-lookup.c (push_class_level_binding): Simplify.
1474 2004-07-12 Andrew Pinski <apinski@apple.com>
1478 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
1480 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
1483 2004-07-12 Eric Christopher <echristo@redhat.com>
1485 * parser.c (cp_parser_class_head): Remove unused variable.
1487 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1489 * decl.c (grok_op_properties): Reject [de-]allocation functions
1490 declared in a namespace, or declared as static.
1492 2004-07-12 Nathan Sidwell <nathan@codesourcery.com>
1494 * cp-tree.h (make_binfo): Remove.
1495 * decl.c (xref_basetypes): Use make_tree_binfo directly.
1496 * tree.h (copy_base_binfos): Likewise.
1497 (make_binfo): Remove.
1499 * call.c (build_user_type_conversion_1, build_new_op,
1500 check_constructor_callable, build_temp,
1501 perform_direct_initialization_of_possible): Pass type directly to
1502 lookup_fnfields & build_special_member_call.
1503 (build_special_member_call): Accept a type, and complete it.
1504 * class.c (finish_stuct_bits): Copy the BINFOs here.
1505 * cvt.c (ocp_convert): Pass type directly to
1506 build_special_member_call.
1507 * decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
1508 (xref_basetypes): Allocate the binfo here. Adjust.
1509 * init.c (build_init, build_new_1): Pass type directly to
1510 build_special_member_call.
1511 * lex.c (cxx_make_type): Do not allocate binfo here.
1512 * name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
1513 * parser.c (cp_parser_class_head): Always call xref_basetypes.
1514 * pt.c (instantiate_class_template): Likewise. Inhibit access
1515 checking for template friends.
1516 * ptree.c (cxx_print_type): Adjust record printing.
1517 * search.c (lookup_base): When taking a type, complete it before
1518 looking for a binfo.
1519 (lookup_member): Delay completing a type.
1520 (push_class_decls): Don't walk an incomplete type.
1521 (lookup_conversions): Likewise.
1522 * semantics.c (finish_stmt_expr_expr): Pass type directly to
1523 build_special_member_call.
1524 * tree.c (copy_base_binfos): Adjust.
1525 (make_binfo): Likewise.
1526 * typeck.c (build_modify_expr): Pass type directly to
1527 build_special_member_call.
1528 * typeck2.c (process_init_constructor): Check a binfo exists.
1529 (build_m_component_ref): Allow accessing an incomplete type.
1530 (build_functional_cast): Pass type directly to
1531 build_special_member_call.
1533 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1536 * config-lang.in (gtfiles): Add typeck2.c.
1537 * Make-lang.in: Tweak typeck2.c dependencies, and add rule for
1539 * cp-tree.h: Declare complete_type_check_abstract.
1540 * typeck2.c (pat_calc_hash, pat_compare,
1541 complete_type_check_abstract): New functions.
1542 (abstract_virtuals_error): If the type is abstract, register the
1543 declaration within abstract_pending_vars for further checks.
1544 Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
1545 * decl.c (cp_finish_decl): Do not strip array types.
1546 (create_array_type_for_decl): Check for abstractness of the element
1548 (complete_vars): Call complete_type_check_abstract.
1549 * class.c (finish_struct): Prepare a list of virtual functions for
1550 template types, and call complete_vars on it to check for abstractness.
1552 2004-07-12 Paolo Bonzini <bonzini@gnu.org>
1554 PR tree-optimization/14107
1555 * decl.c (finish_function): Remove temporary band-aid.
1557 2004-07-11 Mark Mitchell <mark@codesourcery.com>
1559 * call.c (build_operator_new_call): Avoid using push_to_top_level.
1560 (build_new_op): Adjust call to lookup_function_nonclass.
1561 * name-lookup.c (identifier_type_value): Adjust call to
1563 (lookup_name_real): Add block_p parameter.
1564 (lookup_name_nonclass): Adjust call to lookup_name_real.
1565 (lookup_function_nonclass): Likewise.
1566 (lookup_name): Likewise.
1567 * name-lookup.h (lookup_name_real): Change prototype.
1568 (lookup_name_nonclass): Likewise.
1569 * parser.c (cp_parser_lookup_name): Likewise.
1571 * cp-tree.h (saved_scope): Make old_bindings a vector.
1572 (unuse_fields): Remove.
1573 * name-lookup.h (cxx_saved_binding): Define it.
1574 * class.c (pushclass): Don't use unuse_fields.
1575 * name-lookup.c (cxx_saved_binding_make): Remove.
1576 (store_binding): Add new bindings to a vector, using an
1577 accumulator style, rather than adding them to a list.
1578 (store_bindings): Adjust accordingly.
1579 (store_class_bindings): Likewise.
1580 (push_to_top_level): Likewise.
1581 (pop_from_top_level): Likewise.
1582 * optimize.c (maybe_clone_body): Must push_to_top_level and
1583 pop_from_top_level calls outside of loop.
1584 * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope
1585 calls here from cp_parser_late_parsing_default_args.
1586 (cp_parser_save_default_args): Record the class type in which the
1587 function is declared.
1588 (cp_parser_late_parsing_default_args): Do not call
1589 push_nested_class/pop_nested_class.
1590 * search.c (dfs_unuse_fields): Remove.
1591 (unuse_fields): Remove.
1593 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
1595 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
1596 LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
1597 * cp-tree.h (poplevel): Declare.
1598 (set_block): Remove.
1599 * decl.c (set_block): Remove.
1601 2004-07-10 Mike Stump <mrs@apple.com>
1603 * decl2.c (import_export_class): Never export/import vtables
1604 with inline key functions.
1606 2004-07-09 Steven Bosscher <stevenb@suse.de>
1608 * typeck.c (c_expand_asm_operands): Remove.
1610 2004-07-09 Mike Stump <mrs@apple.com>
1612 * typeck.c (build_class_member_access_expr): Skip null deref
1613 warning when we don't dereference it.
1615 2004-07-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1619 * class.c (check_field_decls): Improve -Weffc++ warning: do not
1620 warn for pointers to functions/members, or for classes without
1623 2004-07-08 Mark Mitchell <mark@codesourcery.com>
1625 * name-lookup.h (struct cp_binding_level): Update documentation
1628 2004-07-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1631 * typeck.c (check_return_expr): Improve -Weffc++ warning: handle
1632 returning CALL_EXPR, and non-reference return type.
1634 2004-07-08 Nathan Sidwell <nathan@codesourcery.com>
1636 * name-lookup.c (push_binding): Use VEC_reserve.
1638 2004-07-08 Richard Henderson <rth@redhat.com>
1640 * cp-tree.h (expand_eh_spec_block): Remove.
1642 2004-07-07 Mark Mitchell <mark@codesourcery.com>
1644 * cp-tree.h (saved_scope): Remove x_previous_class_type and
1645 x_previous_class_values; add x_previous_class_level.
1646 (previous_class_type): Remove.
1647 (previous_class_values): Remove.
1648 (previous_class_level): New macro.
1649 * class.c (pushclass): Restore the identifier cache more
1651 (invalidate_class_lookup_cache): Use vector for class_shadowed and
1652 previous_class_values.
1653 * decl.c (poplevel): Likewise.
1654 * name-lookup.c (cxx_binding_init): New function.
1655 (cxx_binding_make): Use it.
1656 (push_binding): For a binding in a class level, use a vector of
1657 cp_class_binding nodes.
1658 (push_binding_level): New function.
1659 (begin_scope): Use it.
1660 (leave_scope): Do not put class binding levels on the free list.
1661 (print_binding_level): Adjust for the fact that class_shadowed is
1663 (poplevel_class): Likewise.
1664 (clear_identifier_class_values): Likewise.
1665 (push_class_level_binding): Likewise.
1666 (set_class_shadows): Remove.
1667 (store_binding): New function.
1668 (store_class_bindings): New function.
1669 (push_to_top_level): Use store_class_bindings as appropriate.
1670 (pop_from_top_level): Use previous_class_level, not
1671 previous_class_type.
1672 * name-lookup.h (cp_class_binding): New type.
1673 (cp_binding_level): Use a vector object for class_shadowed.
1674 (push_binding_level): Declare.
1675 (set_class_shadows): Remove.
1677 2004-07-07 Andrew Pinski <apinski@apple.com>
1679 * class.c (instantiate_type): BUFFER_REF is dead.
1680 * lex.c (init_operators): IN_EXPR is dead.
1682 2004-07-07 Jason Merrill <jason@redhat.com>
1685 * call.c (build_new_op): Give overload warnings for built-in
1688 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
1691 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
1694 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
1696 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
1697 * class.c (build_primary_vtable, check_bases,
1698 determine_primary_base, finish_struct_bits,
1699 maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
1700 get_basefndecls, warn_hidden, walk_subobject_offsets,
1701 build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
1702 layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
1703 finish_struct_1, get_vfield_name, contains_empty_class_p,
1704 dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
1705 dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
1706 add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
1708 * decl.c (xref_basetypes): Likewise.
1709 * dump.c (cp_dump_tree): Likewise.
1710 * error.c (dump_expr): Likewise.
1711 * init.c (sort_mem_initializers, expand_member_init,
1712 push_base_cleanups): Likewise.
1713 * method.c (do_build_copy_constructor, do_build_assign_reg,
1714 synthesize_exception_spec): Likewise.
1715 * name-lookup.c (arg_assoc_class): Likewise.
1716 * pt.c (instantiate_class_template, tsubst,
1717 get_template_base_recursive): Likewise.
1718 * ptree.c (cxx_print_type): Likewise.
1719 * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
1720 * search.c (lookup_base_r, dynamic_cast_base_recurse,
1721 dfs_access_in_type, access_in_type, lookup_field_queue_p,
1722 bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
1723 marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
1724 dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
1725 binfo_for_vtable, copied_binfo, original_binfo): Likewise
1726 * tree.c (copy_base_binfos, make_binfo): Likewise.
1727 * typeck.c (commmon_base_type): Likewise
1728 * typeck2.c (process_init_constructor): Likewise
1730 2004-07-06 Joseph S. Myers <jsm@polyomino.org.uk>
1732 * decl.c (check_tag_decl): Name redeclared type in diagnostic.
1734 2004-07-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1737 * pt.c (convert_nontype_argument): Disallow conversions between
1738 different enumeration types.
1740 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
1742 * cp-tree.h (BINFO_MARKED): Remove.
1743 (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
1744 BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
1745 BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
1746 (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
1747 * class.c (build_base_path): Use BINFO_VIRTUAL_P.
1748 (mark_primary_bases, determine_primary_base, base_derived_from,
1749 dfs_find_final_overrider, dfs_find_final_overrider_q,
1750 dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
1751 dfs_modify_vtables, walk_subobject_offsets,
1752 layout_nonempty_base_or_field, build_base_field,
1753 build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
1754 end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
1755 finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
1756 build_ctor_vtbl_group, accumulate_vtble_inits,
1757 dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
1758 build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
1759 add_vcall_offset_vtbl_entries_1): Likewise.
1760 * decl.c (xref_basetypes): Incomming virtual base indicated by
1762 * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
1763 * init.c (finish_init_stmts, sort_mem_initializers,
1764 emit_mem_initializers, build_vtble_address, expand_member_init,
1765 push_base_cleanups): Likewise.
1766 * method.c (do_build_copy_constructor): Likewise.
1767 * pt.c (instantiate_class_template,
1768 get_template_base_recursive): Likewise.
1769 * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
1770 get_pseudo_ti_desc): Likewise.
1771 * search.c (lookup_base_r, dynamic_cast_base_recurse,
1772 binfo_from_vbase, binfo_via_virtual, copied_binfo,
1773 original_binfo): Likewise.
1774 * semantics.c (finish_base_specifier): Virtualness is indicated
1776 * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
1778 2004-07-06 Mark Mitchell <mark@codesourcery.com>
1781 2004-06-24 Jason Merrill <jason@redhat.com>
1783 * decl.c (grokparms): Give the PARM_DECL reference type if the
1784 parameter is passed by invisible reference.
1786 2004-07-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1788 * cp-lang.c (cp_var_mod_type_p): Add extra arg.
1789 * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
1790 * pt.c (check_instantiated_args, unify): Likewise.
1792 2004-07-05 Phil Edwards <phil@codesourcery.com>
1794 * Make-lang.in (check-c++, lang_checks): Add some comments.
1796 2004-07-05 Zack Weinberg <zack@codesourcery.com>
1798 * cp-mudflap.c: Delete file.
1799 * Makefile.in: Remove all references to cp-mudflap.o.
1801 2004-07-05 Zack Weinberg <zack@codesourcery.com>
1803 * decl.c (cxx_init_decl_processing): Call
1804 build_common_tree_nodes before creating the global NAMESPACE_DECL.
1806 2004-07-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1809 * call.c (build_operator_new_call): Look only at global scope.
1811 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
1813 * call.c (enforce_access): Expect TREE_BINFO.
1814 * class.c (binfo_ctor_vtable): Check TREE_BINFO.
1815 * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
1816 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
1818 (BINFO_LANG_ELTS): Remove.
1819 (BINFO_LANG_SLOTS): New.
1820 (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
1821 (CLASSTYPE_TEMPLATE_INFO): Adjust.
1822 * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
1823 * search.c (lookup_member): Check TREE_BINFO.
1824 * semantics.c (perform_or_defer_access_check): Likewise.
1825 (check_accessibility_of_qualified_id): Check
1826 deferred_access_no_check.
1827 * tree.c (make_binfo): Use make_tree_binfo.
1829 2004-07-04 Mark Mitchell <mark@codesourcery.com>
1831 * method.c (implicitly_declare_fn): Set linkage of generated
1834 2004-07-04 Richard Henderson <rth@redhat.com>
1836 * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
1838 2004-07-03 Scott Brumbaugh <scottb.lists@verizon.net>
1841 * name-lookup.c (push_class_level_binding): Don't pass a
1842 TREE_LIST of ambiguous names to check_template_shadow as it
1843 only handles declarations. Instead, pull the declaration
1846 2004-07-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1849 * pt.c (check_explicit_specialization): Clarify error message.
1851 2004-07-02 Richard Henderson <rth@redhat.com>
1853 * tree.c (cp_unsave_r): Update remap_save_expr call.
1855 2004-07-02 Mark Mitchell <mark@codesourcery.com>
1858 * mangle.c (write_template_arg): Correct mangling.
1861 * decl.c (grokdeclarator): Robustify.
1863 2004-07-01 Richard Henderson <rth@redhat.com>
1865 * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
1866 * method.c (synthesize_method): Don't clear_last_expr.
1867 * name-lookup.c (maybe_push_cleanup_level): Likewise.
1869 2004-07-01 Nick Clifton <nickc@redhat.com>
1871 * decl2.c (import_export_class): Invoke the
1872 import_export_class field in the gcc_target structure if it is not
1875 2004-06-30 Richard Henderson (rth@redhat.com>
1877 * decl.c (start_preparsed_function): Don't set immediate_size_expand.
1878 * method.c (use_thunk): Likewise.
1880 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
1882 * call.c (build_over_call), typeck.c (build_function_call): Call
1883 check_function_arguments instead of check_function_format.
1885 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
1887 * call.c (build_over_call), typeck.c (build_function_call): Update
1888 calls to check_function_format.
1890 2004-06-30 Richard Henderson <rth@redhat.com>
1892 * call.c (build_over_call): Use __builtin_memcpy for copying
1893 CLASS_AS_BASE rather than funny casting.
1895 2004-06-30 Richard Henderson <rth@redhat.com>
1897 * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
1898 TYPE_SIZE_UNIT of full_type.
1900 2004-06-30 Per Bothner <per@bothner.com>
1902 Conditionally compile support for --enable-mapped_location.
1903 * decl.c (pop_label): Handle (imperfectly) USE_MAPPED_LOCATION case.
1904 * decl2.c: If USE_MAPPED_LOCATION, don't do some line number
1905 adjustments - which I don't understand.
1906 * error.c (dump_decl): Rename "<interrnal>" to "<built-in>".
1907 * error.c: Use LOCATION_FILE and EXPR_LOCATION macros.
1908 (print_instantiation_partial_context): Use expand_location.
1909 * decl.c (duplicate_decl): Use new DECL_IS_BUILTIN macro.
1910 * name-lookup.c: Likewise.
1911 * lex.c (cxx_init): Likewise. Also use BUILTINS_LOCATION.
1912 * name-lookup.c: Use input_line macro.
1913 * parser.c (cp_lexer_get_preprocessor_token): Use UNKNOWN_LOCATION.
1914 (cp_parser_statement): Rename locaal variable statement_locus to
1915 statement_location and use SET_EXPR_LOCATION macro.
1916 * pt.c: Handle USE_MAPPED_LOCATION case. Use new macros.
1917 * tree.c (cp_walk_subtrees): Likewise.
1919 2004-06-29 Per Bothner <per@bothner.com>
1921 * tree.c (build_min_nt, build_min, build_min_non_dep):
1922 Don't set TREE_COMPLEXITY from input_line.
1924 2004-06-29 Paul Brook <paul@codesourcery.com>
1926 * init.c: Include target.h.
1927 (get_cookie_size): Remove and replace with target hook.
1929 (build_new_1): Store the element size in the cookie.
1931 2004-06-29 Nathan Sidwell <nathan@codesourcery.com>
1934 * parser.c (cp_parser_template_declaration_after_export): Disable
1935 access checks here ...
1936 (cp_parser_class_specifier): ... not here.
1938 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1940 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
1941 VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
1942 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
1945 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1947 * cp-tree.h (struct deferred_access): Move to ...
1948 * semantics.c (struct deferred_access): ... here. Adjust.
1949 (deferred_access_stack): Make a VEC(deferred_access),
1950 (deferred_access_free_list): Remove.
1951 (deferred_access_no_check): New.
1952 (push_deferring_access_checks, resume_deferring_access_checks,
1953 stop_deferring_access_checks, pop_deferring_access_checks,
1954 get_deferred_access_checks, pop_to_parent_deferring_access_checks,
1955 perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
1957 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1960 * call.c (build_temp): Declare.
1961 (check_constructor_callable): New.
1962 (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
1963 CONSTRUCTOR_CALLABLE.
1964 (convert_like_real, initialize_reference): Use
1965 check_constructor_callable.
1966 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
1967 (LOOKUP_*): Renumber.
1969 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1971 * friend.c (add_friend): Only perform access checks when context
1973 * lex.c (cxx_make_type): Only create a binfo for aggregate types.
1974 * parser.c (cp_parser_class_specifier): Disable access checks here
1975 when parsing the body of a templated class.
1976 * semantics.c (perform_or_defer_access_checks): Reorder to allow
1977 NULL binfos when not checking access.
1979 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1981 Use vector API for vbase list.
1982 * cp-tree.h: Include vec.h
1983 (DEF_VEC_P (tree)): New type.
1984 (struct lang_type_class): Change vbase's member type.
1985 (binfo_for_vbase): Declare.
1986 * class.c (determine_primary_base, base_derived_from,
1987 update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
1988 warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
1989 build_vtbl_initializer): Adjust.
1990 * decl.c (xref_basetypes): Adjust, accumulate upper bound of
1992 * init.c (sort_mem_initializers, expand_member_init,
1993 push_base_cleanups): Adjust.
1994 * method.c (do_build_copy_constructor): Adjust.
1995 * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
1996 (binfo_for_vbase): New.
1997 * tree.c (copy_base_binfos): Adjust.
1999 2004-06-28 Mark Mitchell <mark@codesourcery.com>
2001 * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
2003 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
2006 * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
2007 paranthesis in case of pointers to array members.
2008 * error.c (dump_type_prefix): Likewise.
2009 (dump_type_suffix): Maybe issue a whitespace when printing
2012 2004-06-27 Mark Mitchell <mark@codesourcery.com>
2015 * parser.c (cp_parser_set_decl_spec_type): Refine test for
2016 redefinition of built-in types.
2018 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
2020 * error.c (pp_template_argument_list_start): Remove.
2021 (pp_template_argument_list_end): Likewise.
2022 (pp_separate_with_comma): Use pp_cxx_separate_with.
2023 (reinit_global_formatting_buffer): Remove.
2024 (pp_non_consecutive_character): Likewise.
2025 (dump_scope): Use pp_cxx_colon_colon.
2026 (dump_template_parameter): Use pp_cxx_identifier,
2027 pp_cxx_tree_identifier and pp_cxx_whitespace.
2028 (dump_templat_bindings): Replace use of pp_string with sequence
2029 of pp_cxx_whitespace and pp_equal.
2030 (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
2031 pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set
2033 (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
2034 (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace,
2035 pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
2036 (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
2037 pp_cxx_right_bracket, pp_cxx_identifier throughout,
2038 (dump_decl): Likewise.
2039 (dump_template_decl): Likewise.
2040 (dump_function_decl): Likewise. Set padding as appropriate.
2041 (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
2043 (dump_exception_spec): Likewise.
2044 (dump_function_name): Use pp_cxx_tree_identifier and
2046 (dump_template_parms): Use pp_cxx_begin_template_argument_list and
2047 pp_cxx_end_template_argument_list.
2048 (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
2049 pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
2050 pp_cxx_whitespace throughout.
2051 (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
2053 (dump_unary_op): Likewise.
2054 (reinit_cxx_pp): New function.
2055 (type_as_string); Use it.
2056 (expr_as_string): Likewise.
2057 (decl_as_string); Likewise.
2058 (context_as_string): Likewise.
2059 (lang_decl_name): Likewise.
2060 (decl_to_string): Likewise.
2061 (expr_to_string): Likewise.
2062 (parm_to_string): Likewise.
2063 (type_to_string): Likewise.
2064 (args_to_string): Likewise.
2065 (cv_to_string): Likewise.
2067 2004-06-26 Mark Mitchell <mark@codesourcery.com>
2069 * cp-tree.h (cp_cv_quals): New type.
2070 (cp_declarator): Use it instead of "tree" as appropriate.
2071 (grok_method_quals): Adjust prototype.
2072 (grokclassfn): Likewise.
2073 (do_friend): Likewise.
2074 * decl.c (grokfndecl): Use cp_cv_quals, not tree.
2075 (grokdeclarator): Likewise.
2076 * decl2.c (grok_method_quals): Likewise.
2077 (grokclassfn): Likewise.
2078 * friend.c (do_friend): Likewise.
2079 * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
2080 * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
2081 (make_pointer_declarator): Likewise.
2082 (make_reference_declarator): Likewise.
2083 (make_ptrmem_declarator): Likewise.
2084 (cp_parser_ptr_operator): Likewise.
2085 (cp_parser_cv_qualifier_seq_opt): Likewise.
2086 (cp_parser_cv_qualifier_opt): Remove.
2087 (cp_parser_new_declarator_opt): Adjust call to
2088 cp_parser_ptr_operator.
2089 (cp_parser_conversion_declaration_opt): Likewise.
2090 (cp_parser_declarator): Use cp_cv_quals, not tree.
2091 (cp_parser_direct_declarator): Likewise.
2093 2004-06-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2095 * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
2096 Rename DECL_STMT to DECL_EXPR.
2097 * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
2098 * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
2099 * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
2101 2004-06-26 Jan Hubicka <jh@suse.cz>
2104 * decl2.c (maybe_emit_vtables): Always import_export_vtable for the
2105 reachability analysis.
2107 2004-06-25 Mark Mitchell <mark@codesourcery.com>
2109 * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
2112 2004-06-25 Paul Brook <paul@codesourcery.com>
2114 * decl2.c (get_guard): Call targetm.cxx.guard_type.
2115 (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
2117 2004-06-24 Mark Mitchell <mark@codesourcery.com>
2119 * decl.c (grokdeclarator): Restore error messages about __thread.
2120 * parser.c (cp_parser_decl_specifier_seq): Likewise.
2122 2004-06-24 Jason Merrill <jason@redhat.com>
2125 * decl.c (grokparms): Give the PARM_DECL reference type if the
2126 parameter is passed by invisible reference.
2128 2004-06-24 Andreas Schwab <schwab@suse.de>
2130 * cp-tree.h (enum cp_storage_class): Remove trailing comma.
2132 2004-06-23 Mark Mitchell <mark@codesourcery.com>
2134 * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
2135 (cp/decl.o): Likewise.
2136 (cp/decl2.o): Likewise.
2137 (cp/pt.o): Likewise.
2138 (cp/semantics.o): Likewise.
2139 * config-lang.in (gtfiles): Do not reference cp/lex.h.
2140 * class.c: Do not include lex.h.
2141 (add_implicitly_declared_members): Do not use
2142 adding_implicit_members.
2143 (check_bases_and_members): Do not talk about grok_x_components.
2144 * cp/cp-tree.h (adding_implicit_members): Remove.
2145 (cp_storage_class): New type.
2146 (cp_decl_spec): Likewise.
2147 (cp_decl_specifier_seq): Likewise.
2148 (cp_parameter_declarator): Use it for the decl_specifiers field.
2149 (check_tag_decl): Adjust prototype.
2150 (shadow_tag): Likewise.
2151 (groktypename): Likewise.
2152 (start_decl): Likewise.
2153 (start_function): Likewise.
2154 (start_method): Likewise.
2155 (grok_x_components): Remove.
2156 (grokfield): Adjust prototype.
2157 (grokbitfield): Likewise.
2158 (finish_member_class_template): Remove.
2159 * decl.c: Do not include lex.h.
2160 (adding_implicit_members): Do not define.
2161 (check_tag_decl): Do not use trees to represent decl-specifiers.
2162 (shadow_tag): Likewise.
2163 (groktypename): Likewise.
2164 (start_decl): Likewise.
2165 (grokvardecl): Likewise.
2166 (grokdeclarator): Likewise.
2167 (grokparms): Likewise.
2168 (start_function): Likewise.
2169 (start_method): Likewise.
2170 * decl.h (grokdeclarator): Adjust prototype.
2171 * decl2.c: Do not include lex.h.
2172 (grok_x_components): Remove.
2173 (grokfield): Do not use trees to represent decl-specifiers.
2174 (grokbitfield): Likewise.
2175 * lex.c: Do not include lex.h.
2177 * parser.c: Include target.h.
2178 (clear_decl_specs): New function.
2179 (cp_parser_translation_unit): Do not use trees to represent
2181 (cp_parser_postfix_expression): Likewise.
2182 (cp_parser_new_type_id): Likewise.
2183 (cp_parser_condition): Likewise.
2184 (cp_parser_simple_declaration): Likewise.
2185 (cp_parser_decl_specifier_seq): Likewise.
2186 (cp_parser_function_specifier_opt): Likewise.
2187 (cp_parser_conversion_type_id): Likewise.
2188 (cp_parser_template_parameter): Likewise.
2189 (cp_parser_explicit_instantiation): Likewise.
2190 (cp_parser_type_specifier): Likewise.
2191 (cp_parser_simple_type_specifier): Likewise.
2192 (cp_parser_init_declarator): Likewise.
2193 (cp_parser_type_id): Likewise.
2194 (cp_parser_type_specifier_seq): Likewise.
2195 (cp_parser_parameter_declaration): Likewise.
2196 (cp_parser_member_declaration): Likewise.
2197 (cp_parser_exception_declaration): Likewise.
2198 (cp_parser_function_definition_from_specifiers_and_declarator):
2200 (cp_parser_single_declaration): Likewise.
2201 (cp_parser_save_member_function_body): Likewise.
2202 (cp_parser_friend_p): Likewise.
2203 (cp_parser_set_storage_class): New function.
2204 (cp_parser_set_decl_spec_type): Likewise.
2205 * pt.c: Do not include lex.h.
2206 * semantics.c: Likewise.
2207 (finish_member_class_template): Remove.
2209 2004-06-23 Roger Sayle <roger@eyesopen.com>
2211 * call.c (build_cxx_call): Don't call expand_tree_builtin. No
2212 longer take both "args" and "convert_args" as arguments.
2213 (build_op_delete_call): Update call to build_cxx_call.
2214 (build_over_call): Likewise, update call to build_cxx_call.
2215 * cp-tree.h (build_cxx_call): Update funtion prototype.
2216 * typeck.c (build_function_call): Don't call expand_tree_builtin.
2217 * rtti.c (throw_bad_cast): Update call to build_cxx_call.
2218 (throw_bad_typeid): Likewise.
2219 (build_dynamic_cast_1): Likewise.
2221 2004-06-22 Richard Henderson <rth@redhat.com>
2223 * class.c (build_vfn_ref): Take a pointer not object. Build
2225 (cp_fold_obj_type_ref): New.
2226 * call.c (build_over_call): Update build_vfn_ref call.
2227 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
2228 * cp-tree.h (cp_fold_obj_type_ref): Declare.
2230 2004-06-21 Jason Merrill <jason@redhat.com>
2233 * cp-gimplify.c (cp_gimplify_init_expr): Look through
2236 2004-06-21 Mark Mitchell <mark@codesourcery.com>
2238 * cp-tree.def (NEW_EXPR): Add a fourth slot.
2239 * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
2240 (TREE_PARMLIST): Likewise.
2241 (CALL_DECLARATOR_PARMS): Likewise.
2242 (CALL_DECLARATOR_QUALS): Likewise.
2243 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
2244 (cp_declarator_kind): New type.
2245 (cp_parameter_declarator): Likewise.
2246 (cp_declarator): Likewise.
2247 (cp_error_declarator): Likewise.
2248 (no_parameters): Likewise.
2249 (groktypename): Change prototype.
2250 (start_decl): Likewise.
2251 (start_handler_parms): Likewise.
2252 (get_scope_of_declarator): Likewise.
2253 (start_function): Likewise.
2254 (start_preparsed_function): New function.
2255 (start_function): Change prototype.
2256 (start_method): Likewise.
2257 (grokfield): Likewise.
2258 (grokbitfield): Likewise.
2259 (build_new): Likewise.
2260 (make_pointer_declarator): Remove.
2261 (make_reference_declarator): Likewise.
2262 (make_call_declarator): Likewise.
2263 (set_quals_and_spec): Likewise.
2264 (process_template_parm): Change prototype.
2265 (begin_function_definition): Remove.
2266 (finish_parmlist): Remove.
2267 * decl.c (groktypename): Do not use trees to represent
2269 (start_decl): Likewise.
2270 (start_handler_parms): Remove.
2271 (get_scope_of_declarator): Reimplement.
2272 (grokdeclarator): Do not use trees to represent declarators.
2273 (grokparms): Likewise.
2274 (start_function): Likewise.
2275 (start_method): Likewise.
2276 (build_void_list_mode): Do not use TREE_PARMLIST.
2277 * decl.h (grokdeclarator): Change prototype.
2278 * decl2.c (grok_method_quals): Robustify.
2279 (grok_x_components): Do not use trees to represent declarators.
2280 (grokfield): Likewise.
2281 (grokbitfield): Likewise.
2282 (start_objects): Build FUNCTION_DECLs, not declarators.
2283 (start_static_storage_duration_function): Likewise.
2284 * init.c (build_new): Simplify.
2285 * lex.c (make_pointer_declarator): Remove.
2286 (make_reference_declarator): Likewise.
2287 (make_call_declarator): Likewise.
2288 (set_quals_and_spec): Likewise.
2289 * method.c (use_thunk): Use start_preparsed_function.
2290 (synthesize_method): Likewise.
2291 (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
2292 * optimize.c (maybe_clone_body): Use start_preparsed_function.
2293 * parser.c (cp_error_declarator): New variable.
2294 (declarator_obstack): Likewise.
2295 (alloc_declarator): New function.
2296 (make_declarator): Likewise.
2297 (make_id_declarator): Likewise.
2298 (make_pointer_declarator): Likewise.
2299 (make_reference_declarator): Likewise.
2300 (make_ptrmem_declarator): Likewise.
2301 (make_call_declarator): Likewise.
2302 (make_array_declarator): Likewise.
2303 (no_parameters): New variable.
2304 (make_parameter_declarator): Likewise.
2305 (cp_parser_check_for_definition_in_return_type): Do not use trees
2306 to represent declarators.
2307 (cp_parser_translation_unit): Likewise.
2308 (cp_parser_new_expression): Likewise.
2309 (cp_parser_new_type_id): Likewise.
2310 (cp_parser_new_declarator_opt): Likewise.
2311 (cp_parser_direct_new_declarator): Likewise.
2312 (cp_parser_condition): Likewise.
2313 (cp_parser_declaration_statement): Likewise.
2314 (cp_parser_declaration): Likewise.
2315 (cp_parser_conversion_type_id): Likewise.
2316 (cp_parser_conversion_declarator_opt): Likewise.
2317 (cp_parser_template_parameter_list): Likewise.
2318 (cp_parser_template_parameter): Likewise.
2319 (cp_parser_explicit_instantiation): Likewise.
2320 (cp_parser_init_declarator): Likewise.
2321 (cp_parser_declarator): Likewise.
2322 (cp_parser_direct_declarator): Likewise.
2323 (cp_parser_type_id): Likewise.
2324 (cp_parser_parameter_declaration_clause): Likewise.
2325 (cp_parser_parameter_declaration_list): Likewise.
2326 (cp_parser_parameter_declaration): Likewise.
2327 (cp_parser_member_declaration): Likewise.
2328 (cp_parser_exception_declaration): Likewise.
2329 (cp_parser_check_declarator_template_parameters): Likewise.
2330 (cp_parser_function_definition_from_specifiers_and_declarator):
2332 (cp_parser_save_member_function_body): Likewise.
2333 * pt.c (process_template_parm): Add is_non_type parameter.
2334 (convert_template_argument): Adjust call to groktypename.
2335 (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
2336 (tsubst): Do not expect declarators.
2337 (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
2339 (instantiate_decl): Use start_preparsed_function.
2340 * semantics.c (begin_function_definition): Remove.
2341 (finish_parmlist): Remove.
2342 * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
2345 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2347 * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
2348 (build_new_method_call): Likewise.
2349 * decl.c (local_variable_p_walkfn): Don't walk into types.
2350 * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
2351 (build_anon_union_vars): Add new operand for COMPONENT_REF.
2352 * init.c (buld_new): Add new operand for ARRAY_REF.
2353 * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
2354 (do_build_assign_ref): Likewise.
2355 * parser.c (cp_parser_direct_new_declarator): Add new operands
2357 (cp_parser_direct_declarator): Likewise.
2358 * pt.c (tsubst): Likewise.
2359 (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
2361 * semantics.c (finish_non_static_data_member): Add new operand
2363 * typeck.c (build_class_member_access_expr): Likewise.
2364 (build_class_member_access_expr, finish_class_member_access_expr):
2366 (build_ptrmemfunc_access_expr): Likewise.
2367 (build_array_ref): Add new operands for ARRAY_REF.
2368 * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
2369 * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
2371 2004-06-21 Richard Henderson <rth@redhat.com>
2373 * dump.c (cp_dump_tree): Don't use dump_next_stmt.
2374 * parser.c (cp_parser_jump_statement): Update commentary.
2375 * pt.c (tsubst_expr): Use RETURN_EXPR.
2376 * semantics.c (finish_return_stmt): Likewise.
2377 (finalize_nrv_r): Likewise.
2378 * typeck.c, typeck2.c: Update file start commentary.
2380 2004-06-21 Richard Henderson <rth@redhat.com>
2382 * semantics.c (finish_expr_stmt): Call verify_sequence_points.
2384 2004-06-20 Richard Henderson <rth@redhat.com>
2386 * cp-tree.h (add_decl_stmt): Declare.
2387 * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
2388 * semantics.c (maybe_cleanup_point_expr): New.
2389 (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
2390 finish_for_expr, finish_switch_cond): Use it.
2391 (finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN.
2393 2004-06-20 Richard Henderson <rth@redhat.com>
2395 * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
2396 * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
2397 (cp_gimplify_expr): Call it.
2398 (gimplify_cleanup_stmt): Move from c-gimplify.c.
2399 (cp_genericize): New.
2400 * decl.c (finish_function): Call it.
2401 * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
2402 (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
2403 (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
2404 (cp_genericize): Declare.
2405 * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
2406 * dump.c (cp_dump_tree): Likewise.
2407 * semantics.c (push_cleanup): Move from c-semantics.c.
2409 2004-06-20 Zack Weinberg <zack@codesourcery.com>
2411 * cp-lang.c (has_c_linkage): Implement.
2413 * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
2414 * decl.c (duplicate_decls): Use COPY_DECL_RTL.
2415 (builtin_function_1): Don't call make_decl_rtl.
2416 (build_cp_library_fn): Don't call set_mangled_name_for_decl.
2417 (grokvardecl): Don't call mangle_decl.
2418 * except.c (nothrow_libfn_p): Look at DECL_NAME, not
2419 DECL_ASSEMBLER_NAME.
2420 * method.c (set_mangled_name_for_decl): Delete.
2421 * name-lookup.c (pushdecl): When a local extern shadows a
2422 file-scope declaration of the same object, give both DECLs the
2424 * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
2425 on DECL_ASSEMBLER_NAME.
2427 2004-06-19 Richard Henderson <rth@redhat.com>
2429 * cp-gimplify.c: Remove unnecessary prototypes.
2430 (cp_gimplify_stmt): Merge into ...
2431 (cp_gimplify_expr): ... here. Move to end of file. Handle
2432 stmts_are_full_exprs_p frobbing.
2433 * cp-tree.h (cp_gimplify_stmt): Remove.
2434 * pt.c (tsubst_expr): Merge prep_stmt and unify.
2435 * tree.c (init_tree): Don't set lang_gimplify_stmt.
2437 2004-06-18 Richard Henderson <rth@redhat.com>
2440 * semantics.c (begin_cond): New.
2441 (finish_cond): Rewrite to handle template DECL_STMTs specially.
2442 Assume that non-template decls go land before the conditional.
2443 (simplify_loop_decl_cond): Likewise.
2444 (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
2445 finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
2446 begin_switch_stmt, finish_switch_cond): Update to match.
2448 2004-06-17 Jason Merrill <jason@redhat.com>
2451 * semantics.c (simplify_aggr_init_expr): Don't return the slot.
2452 (finish_stmt_expr_expr): Update type after conversions.
2453 (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
2454 Handle void initializer.
2455 * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
2457 2004-06-17 Geoffrey Keating <geoffk@apple.com>
2459 * class.c (build_clone): Don't call defer_fn, let mark_used do it.
2460 * cp-tree.h (defer_fn): Delete.
2461 * decl2.c (defer_fn): Delete.
2462 (finish_file): Simplify deferred_fns loops; check that
2463 only used inline functions get into deferred_fns.
2464 (mark_used): Inline previous contents of defer_fn.
2466 2004-06-16 Richard Henderson <rth@redhat.com>
2468 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
2469 (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
2470 * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
2471 of CTOR_INITIALIZER ...
2472 (pp_cxx_statement): ... here.
2473 * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
2474 (finish_function): Use alloc_stmt_list to zap entire function.
2475 * parser.c (cp_parser_compound_statement): Update commentary.
2476 * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
2477 * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
2478 (finish_stmt_expr): Don't look through COMPOUND_STMT.
2480 2004-06-16 Geoffrey Keating <geoffk@apple.com>
2482 * pt.c (mark_decl_instantiated): Don't call defer_fn.
2484 2004-06-16 Richard Henderson <rth@redhat.com>
2486 * parser.c (cp_parser_labeled_statement): Update commentary.
2487 * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
2488 * tree.c (mark_local_for_remap_r): Likewise.
2490 2004-06-16 Richard Henderson <rth@redhat.com>
2492 * parser.c (cp_parser_asm_definition): Update commentary.
2493 * pt.c (tsubst_expr): Use ASM_EXPR.
2494 * semantics.c (finish_asm_stmt): Likewise.
2496 2004-06-16 Richard Henderson <rth@redhat.com>
2498 * decl.c (finish_destructor_body): Use LABEL_EXPR.
2499 * parser.c (cp_parser_statement): Update commentary.
2500 * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
2501 * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
2502 * tree.c (mark_local_for_remap_r): Likewise.
2504 2004-06-16 Richard Henderson <rth@redhat.com>
2507 * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
2508 statement in FOR_INIT_STMT for templates.
2510 2004-06-15 Richard Henderson <rth@redhat.com>
2512 * call.c (initialize_reference): Don't build CLEANUP_STMT here.
2513 * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
2514 (genericize_try_block): Use gimplify_stmt.
2515 (genericize_catch_block, genericize_eh_spec_block): Likewise.
2516 (cp_gimplify_init_expr): Remove STMT_EXPR special case.
2517 (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
2518 * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
2519 (cp_tree_chain_matters_p): Remove.
2520 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
2521 (COMPOUND_STMT_BODY_BLOCK): New.
2522 (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
2523 (EXPR_STMT_STMT_EXPR_RESULT): New.
2524 (building_stmt_tree): Check cur_stmt_list.
2525 (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
2526 (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
2527 * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
2528 (cp_finish_decl): Use push_cleanup.
2529 (start_function, finish_function): Use statement lists.
2530 (finish_stmt): Do nothing.
2531 * except.c (begin_eh_spec_block): Use statement lists.
2532 (check_handlers_1, check_handlers): Likewise.
2533 * init.c (construct_virtual_base): Don't add extra compound stmts.
2534 (build_vec_init): Likewise.
2535 * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
2536 * name-lookup.h (struct cp_binding_level): Add statement_list.
2537 * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
2538 (cp_parser_labeled_statement, cp_parser_expression_statement,
2539 cp_parser_statement_seq_opt): Likewise.
2540 (cp_parser_compound_statement): Likewise. Take bool for try block.
2541 (cp_parser_selection_statement): Tidy if processing.
2542 (cp_parser_already_scoped_statement): Rewrite to do what it says.
2543 * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
2544 (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST.
2545 Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
2546 * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
2547 (finish_cond): New, rewritten from FINISH_COND.
2548 (simplify_loop_decl_cond): New.
2549 (finish_expr_stmt): Avoid nested EXPR_STMTs.
2550 (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
2551 begin_else_clause, finish_else_clause, finish_if_stmt,
2552 begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
2553 begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
2554 finish_for_cond, finish_for_stmt, begin_switch_stmt,
2555 finish_switch_cond, finish_switch_stmt, begin_try_block,
2556 finish_try_block, finish_cleanup_try_block, finish_function_try_block,
2557 finish_handler_sequence, finish_function_handler_sequence,
2558 begin_handler, finish_handler_parms, finish_handler,
2559 begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
2560 using statement lists.
2561 (begin_compound_stmt): Replace has_no_scope argument with flags.
2562 Update all callers. Use statement lists.
2563 (finish_compound_stmt): Likewise.
2564 (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
2565 (current_scope_stmt_stack): Remove.
2566 (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
2567 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
2568 Rewrite with statement lists.
2570 2004-06-15 Alexandre Oliva <aoliva@redhat.com>
2572 * parser.c: Change all assignments of c_lex_string_translate
2573 to true and false to 1 and 0.
2574 (cp_lexer_read_token): Convert type of the translated string.
2575 (cp_parser_skip_to_closing_parentheses): Preserve original
2576 value of c_lex_string_translate, and set it to -1 while
2578 (cp_parser_cache_group): Likewise.
2579 (cp_parser_cache_group_1): Renamed.
2580 (cp_parser_asm_operand_list): Remove redundant setting of
2581 c_lex_string_translate.
2582 (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
2583 Handle chained strings.
2585 2004-06-12 Andrew Pinski <apinski@apple.com>
2589 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
2591 * cp-tree.h: Fix typo.
2593 * cp-tree.h: Include cgraph.h
2594 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
2595 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
2597 2004-06-12 Jason Merrill <jason@redhat.com>
2599 PR tree-optimization/14107
2600 * decl.c (finish_function): Warn about no return in all functions.
2602 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
2604 * cp-tree.h (struct language_function): Remove cannot_inline.
2605 * decl.c (save_function_data): cannot_inline is no more.
2606 (cxx_push_function_context): Likewise.
2607 * decl2.c (start_objects, start_static_storage_duration_function):
2608 Reset DECL_INLINE, set DECL_UNINLINABLE.
2610 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2613 * search.c (lookup_field): Propagate the ambiguity list.
2614 (lookup_fnfields): Likewise.
2616 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2619 * parser.c (cp_parser_template_name): Ctors/dtors never need a
2620 template keyword to disambiguate.
2622 2004-06-14 Mark Mitchell <mark@codesourcery.com>
2625 * decl.c (grokdeclarator): Ignore pointer-to-members when
2626 computing template depth.
2629 * name-lookup.c (pushtag): Do not try to put class declarations in
2630 explicit specialization scopes.
2632 2004-06-11 Andrew Pinski <pinskia@physics.uc.edu>
2634 * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
2636 2004-06-11 Mark Mitchell <mark@codesourcery.com>
2639 * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
2640 bindings for undeclared built-ins.
2642 2004-06-11 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2644 * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
2645 appear at the correct location.
2647 2004-06-10 Jason Merrill <jason@redhat.com>
2651 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2652 * init.c (build_offset_ref): Build SCOPE_REF with non-null
2653 TREE_TYPE for non-dependent names.
2654 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
2655 unknown_type_node as its TREE_TYPE.
2656 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
2657 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
2658 (dump_expr) <SCOPE_REF case>: Likewise.
2660 2004-06-10 Mark Mitchell <mark@codesourcery.com>
2663 * parser.c (cp_parser_direct_declarator): Robustify.
2666 * pt.c (tsubst_copy): Use decl_constant_value on enumeration
2667 constants in non-dependent contexts.
2671 * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
2674 2004-06-10 Jakub Jelinek <jakub@redhat.com>
2677 * decl.c (duplicate_decls): Handle fileptr_type_node arguments
2680 2004-06-09 Mark Mitchell <mark@codesourcery.com>
2684 2004-06-07 Mark Mitchell <mark@codesourcery.com>
2685 * lex.c (handle_pragma_interface): Deprecate.
2686 (handle_pragma_implementation): Likewise.
2688 2004-06-09 Andrew Pinski <pinskia@physics.uc.edu>
2690 * g++spec.c (lang_specific_driver): Remove check for -lm
2691 and -lmath when check it see if it was the math library.
2693 2004-06-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2696 * parser.c (cp_parser_direct_declarator): Reject constructor named
2697 as qualified template-id.
2699 2004-06-07 Mark Mitchell <mark@codesourcery.com>
2702 * lex.c (handle_pragma_interface): Deprecate.
2703 (handle_pragma_implementation): Likewise.
2705 2004-06-07 Mark Mitchell <mark@codesourcery.com>
2708 * parser.c (cp_parser_iteration_statement): Fix typo in error
2712 * pt.c (tsubst_default_argument): Do not defer access checks
2713 while substituting into the default argument.
2716 * pt.c (tsubst_copy): Do not try to substitute for an enumeration
2717 constant in a non-dependent context.
2720 * except.c (build_throw): Ensure that temp_expr has been
2723 2004-06-06 Roger Sayle <roger@eyesopen.com>
2725 * cp/cp-tree.h (lvalue_or_else): Add function prototype.
2727 2004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2730 * parser.c (cp_parser_mem_initializer_id): Gracefully reject
2731 'typename', and accept 'template'.
2733 2004-06-03 Andrew Pinski <pinskia@physics.uc.edu>
2734 Jan Hubicka <jh@suse.cz>
2737 * method.c (use_think): Do not mark thunk as referenced.
2739 2004-06-03 Matt Austern <austern@apple.com>
2742 * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
2743 is nonzero, and if we see a noninline definition of a key method,
2744 make the vtables nonweak.
2746 2004-06-02 Matt Austern <austern@apple.com>
2748 * cp-tree.h (instantiate_decl): new boolean parameter,
2749 undefined_ok. Current behavior is equivalent to its being 0.
2750 * decl2.c (mark_used): Add new argument when calling instantiate_decl
2751 * pt.c (mark_decl_instantiated): Unconditionally make
2752 instantiations explicit unconditionally
2753 (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
2754 since mark_decl_instantiated now does it.
2755 (instantiate_class_member): New. Instantiate a member of an
2756 explicitly instantiated class template.
2757 (do_type_instantiation): Explicitly instantiate members of an
2758 explicitly instantiated class template.
2759 (instantiate_decl): if undefined_ok is nonzero, and if we're
2760 trying to explicitly instantiated a template with no definition,
2761 change it to an implicit instantiation.
2762 (instantiate_pending_templates): Add new argument to instantiate_decl.
2763 * tree.c (cp_cannot_inline_tree_fn): Likewise.
2765 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
2767 * cp-tree.h: Fix typo.
2769 * cp-tree.h: Include cgraph.h
2770 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
2771 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
2773 2004-06-01 Jason Merrill <jason@redhat.com>
2776 * call.c (call_builtin_trap): Remove type parm.
2777 (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
2778 (build_x_va_arg): Dereference a null pointer for a non-POD argument.
2780 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2783 * init.c (build_offset_ref): Build SCOPE_REF with non-null
2784 TREE_TYPE for non-dependent names.
2785 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
2786 unknown_type_node as its TREE_TYPE.
2787 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
2788 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
2789 (dump_expr) <SCOPE_REF case>: Likewise.
2791 2004-06-01 Richard Henderson <rth@redhat.com>
2792 Andrew Pinski <pinskia@physics.uc.edu>
2794 * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
2795 * parser.c (struct cp_parser): Remove in_offsetof.
2796 (cp_parser_new): Don't set it.
2797 (cp_parser_unary_expression): Don't check it.
2798 (cp_parser_postfix_open_square_expression): Split out from ...
2799 (cp_parser_postfix_expression): ... here.
2800 (cp_parser_postfix_dot_deref_expression): Likewise.
2801 (cp_parser_builtin_offsetof): New.
2802 (cp_parser_primary_expression): Use it.
2804 2004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2807 * parser.c (cp_parser_postfix_expression): Allow subscript
2808 operator in offsetof.
2810 2004-05-31 Mark Mitchell <mark@codesourcery.com>
2813 * friend.c (add_friend): Do not try to perform access checks for
2814 functions from dependent classes.
2816 2004-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
2818 * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
2819 (pp_cxx_begin_template_argument_list): Turn into a function.
2820 (pp_cxx_end_template_argument_list): Likewise.
2821 (pp_cxx_separate_with): Define.
2822 (pp_cxx_unqualified_id): Tidy.
2823 (pp_cxx_primary_expression): Likewise.
2824 (pp_cxx_postfix_expression): Likewise.
2825 (pp_cxx_expression): Likewise.
2826 (pp_cxx_simple_type_specifier): Likewise.
2827 (pp_cxx_type_specifier_seq): Likewise.
2828 (pp_cxx_parameter_declaration_clause): Likewise.
2829 (pp_cxx_exception_specification): Likewise.
2830 (pp_cxx_direct_declarator): Likewise.
2831 (pp_cxx_type_id): Likewise.
2832 * cxx-pretty-print.h (pp_cxx_whitespace): Export from
2834 (pp_cxx_left_paren): Likewise.
2835 (pp_cxx_right_paren): Likewise.
2836 (pp_cxx_left_brace): Likewise.
2837 (pp_cxx_right_brace): Likewise.
2838 (pp_cxx_left_bracket): Likewise.
2839 (pp_cxx_right_bracket): Likewise.
2840 (pp_cxx_dot): Likewise.
2841 (pp_cxx_identifier): Likewise.
2842 (pp_cxx_tree_identifier): Likewise.
2843 (pp_cxx_ampersand): New macro.
2844 (pp_cxx_star): Likewise.
2845 (pp_cxx_arrow): Likewise.
2846 (pp_cxx_semicolon): Likewise.
2847 (pp_cxx_complement): Likewise.
2848 (pp_cxx_begin_template_argument_list): Declaree.
2849 (pp_cxx_end_template_argument_list): Likewise.
2850 (pp_cxx_colon_colon): likewise.
2852 2004-05-31 Eric Botcazou <ebotcazou@libertysurf.fr>
2854 * parser.c (cp_parser_simple_type_specifier): Explicitly test
2857 2004-05-31 Kazu Hirata <kazu@cs.umass.edu>
2859 * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
2860 typeck.c: Fix comment formatting.
2862 2004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
2864 * cp-lang.c (cp_expand_decl): Remove.
2865 (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
2867 2004-05-30 Andreas Jaeger <aj@suse.de>
2869 * lang-specs.h: Add missing initializers for .ii.
2871 2004-05-28 Aldy Hernandez <aldyh@redhat.com>
2873 * decl.c (cp_make_fname_decl): Free return value from
2876 2004-05-28 Mark Mitchell <mark@codesourcery.com>
2879 * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
2881 * init.c (build_new): Likewise.
2884 * name-lookup.c (arg_assoc): Robustify.
2887 * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
2888 when determining the scope to use for a pointer to member.
2889 (lookup_anon_field): Give it external linkage.
2890 * cp-tree.h (lookup_anon_field): Declare it.
2891 * expr.c (cplus_expand_constant): Use it.
2893 2004-05-28 Mark Mitchell <mark@codesourcery.com>
2896 * parser.c (cp_parser_simple_type_specifier): Call
2897 maybe_note_name_used_in_class.
2899 2004-05-28 Tom Marshall <tmarshall@real.com>
2902 * class.c (finish_struct_1): Warn only if the dtor is non-private or
2903 the class has friends.
2905 2004-05-27 Adam Nemet <anemet@lnxw.com>
2908 * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
2909 TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
2911 2004-05-24 Geoffrey Keating <geoffk@apple.com>
2913 * method.c (implicitly_declare_fn): Don't call defer_fn; abort
2914 if it might be needed.
2915 * pt.c (mark_decl_instantiated): Only call defer_fn if
2916 the function actually needs processing in finish_file.
2917 * decl2.c (finish_file): Add check that elements in
2918 deferred_fns_used are really needed there. Remove unnecessary
2919 test of DECL_SAVED_TREE.
2921 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
2923 * Make-lang.in: No need to specify $(LIBCPP).
2925 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2928 * parser.c (cp_parser_class_head): Robustify.
2931 * parser.c (cp_parser_decl_specifier_seq): Correct error in
2933 (cp_parser_constructor_declarator_p): Treat attributes
2937 * typeck.c (build_unary_op): Do not attempt to resolve casts to
2938 base classes in templates.
2940 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2943 * pt.c (instantiate_template): Robustify.
2945 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2948 * decl.c (xref_tag): Issue errors about redeclaring template
2949 classes as non-template classes.
2951 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2954 * name-lookup.c (supplement_binding): Allow redefinitions of
2958 * parser.c (cp_parser_template_argument): Robustify.
2960 2004-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
2962 * class.c (alter_access): Use %E format specifier to print an
2963 identifier node. Avoid looking at the IDENTIFIER_POINTER.
2964 (push_lang_context): Likewise.
2965 * decl.c (lookup_label): Likewise.
2966 (grokdeclarator): Likewise.
2967 * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
2968 * pt.c (do_type_instantiation): Likewise.
2969 * tree.c (handle_java_interface_attribute): Likewise.
2970 (handle_com_interface_attribute): Likewise.
2971 (handle_init_priority_attribute): Likewise.
2973 2004-05-22 Mark Mitchell <mark@codesourcery.com>
2977 * pt.c (build_non_dependent_expr): Expand the set of tree nodes
2978 recognized as overloaded functions.
2980 2004-05-22 Mark Mitchell <mark@codesourcery.com>
2983 * class.c (layout_nonempty_base_or_field): Do not try to avoid
2984 layout conflicts for unions.
2987 * typeck.c (build_x_unary_op): Instantiate template class
2988 specializations before looking for "operator &".
2991 * typeck.c (complete_type): Layout non-dependent array types, even
2995 * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
2998 2004-05-22 Roger Sayle <roger@eyesopen.com>
3000 * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
3001 returning when TREE_TYPE is error_mark_node.
3002 * typeck.c (require_complete_type): Return error_mark_node if
3003 value's type is an error_mark_node.
3005 2004-05-20 Andrew Pinski <pinskia@physics.uc.edu>
3007 * optimize.c (calls_setjmp_r): Remove.
3008 (calls_setjmp_p): Remove.
3009 * cp-tree.c (calls_setjmp_p): Remove.
3010 * decl.c (finish_function): Do not call calls_setjmp_p.
3012 2004-05-18 Zack Weinberg <zack@codesourcery.com>
3014 * decl.c (cp_finish_decl): Use mark_decl_referenced.
3015 * decl2.c (maybe_make_one_only): Likewise.
3016 * method.c (use_thunk): Likewise.
3018 2004-05-18 Jason Merrill <jason@redhat.com>
3020 * class.c (build_base_path): Tidy a bit.
3022 2004-05-14 Geoffrey Keating <geoffk@apple.com>
3024 * name-lookup.c (struct scope_binding): New.
3025 (EMPTY_SCOPE_BINDING): New.
3026 (lookup_using_namespace): Take a scope_binding instead of a
3028 (qualified_lookup_using_namespace): Likewise.
3029 (cxx_binding_clear): Delete.
3030 (do_nonmember_using_decl): Use a scope_binding instead of a
3032 (lookup_tag): Don't call select_decl.
3033 (ambiguous_decl): Don't return anything (and change callers to match).
3034 Take a scope_binding as the second parameter.
3035 (lookup_namespace_name): Use a scope_binding instead of a
3037 (unqualified_namespace_lookup): Likewise.
3038 (lookup_qualified_name): Likewise.
3039 (select_decl): Take a scope_binding instead of a cxx_binding.
3040 Use macros rather than hand-coding tests for type-ness.
3042 2004-05-13 Diego Novillo <dnovillo@redhat.com>
3044 * cp-gimplify.c: Rename from cp-simplify.c.
3045 * Make-lang.in, optimize.c: Update.
3047 2004-05-13 Diego Novillo <dnovillo@redhat.com>
3049 Merge from tree-ssa-20020619-branch. See
3050 ChangeLog.tree-ssa for details.
3052 * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
3053 cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
3054 expr.c, init.c, name-lookup.h, optimize.c, parser.c,
3055 pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
3057 * cp-mudflap.c: New file.
3058 * cp-simplify.c:: New file.
3060 2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3063 * decl2.c (check_classfn): For member templates, compare also the
3064 template parameters to match the declaration.
3065 * cp-tree.h: Adjust declaration of check_classfn.
3066 * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
3067 * friend.c (do_friend): Likewise.
3068 * pt.c (tsubst_friend_function): Likewise.
3070 2004-05-01 Zack Weinberg <zack@codesourcery.com>
3072 * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
3073 Instead, dig into the representation type to find the array bound.
3075 2004-04-30 Jason Merrill <jason@redhat.com>
3077 Refer to base members using COMPONENT_REFs where possible.
3078 * class.c (build_simple_base_path): New fn.
3079 (build_base_path): Use it for non-virtual base references.
3080 (layout_class_type): Change base fields to their real type
3081 after layout is done.
3082 * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
3083 * cp-lang.c (cxx_get_alias_set): Use it.
3085 2004-04-30 Kazu Hirata <kazu@cs.umass.edu>
3087 * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
3090 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3093 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
3094 used in integral constant expressions.
3096 2004-04-22 Mark Mitchell <mark@codesourcery.com>
3098 * init.c (build_aggr_init): Fix accidental use of C99 construct in
3101 * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
3103 * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
3104 * decl.c (reshape_init): Use it.
3105 * init.c (perform_member_init): Remove redundant condition.
3106 (build_aggr_init): Adjust to handle brace-enclosed initializers
3108 (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
3110 * parser.c (cp_parser_initializer_clause): Do not set
3111 TREE_HAS_CONSTRUCTOR on the initializer.
3112 * rtti.c (tinfo_base_init): Likewise.
3113 (generic_initializer): Likewise.
3114 (ptr_initializer): Likewise.
3115 (ptm_initializer): Likewise.
3116 (class_initializer): Likewise.
3117 (get_pseudo_ti_init): Likewise.
3118 * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
3120 2004-04-22 Alan Modra <amodra@bigpond.net.au>
3122 * name-lookup.c (anonymous_namespace_name): Make static.
3124 2004-04-19 Roger Sayle <roger@eyesopen.com>
3127 * class.c (build_base_path): Call fold whilst building the NULL
3128 pointer check expression trees.
3130 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
3132 * init.c (build_new_1): Don't use type size argument for Java
3133 _Jv_AllocObject call.
3135 2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
3137 * method.c (make_alias_for_thunk): Remove preprocessor guard on
3138 declaration and definition.
3140 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
3143 * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
3144 than ASM_OUTPUT_DEF.
3146 2004-04-08 Jakub Jelinek <jakub@redhat.com>
3148 * decl2.c (mark_used): Don't segfault if cfun != NULL but
3149 current_function_decl == NULL.
3151 2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
3154 * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
3157 2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3159 * init.c (decl_constant_value): Don't look at DECL_INITIAL
3161 * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
3162 or TREE_SIDE_EFFECTS of a type.
3164 2004-04-02 Nathan Sidwell <nathan@codesourcery.com>
3167 * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
3168 cv-qualifier unification.
3169 * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
3171 2004-04-02 Jan Hubicka <jh@suse.cz>
3173 * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
3174 * cp-tree.h (cp_update_decl_after_saving): Declare.
3175 * tree.c (cp_update_decl_after_saving): Define.
3177 2004-04-01 Mark Mitchell <mark@codesourcery.com>
3180 * typeck.c (get_delta_difference): Call fold before returning the
3183 2004-04-01 Richard Henderson <rth@redhat.com>
3186 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
3187 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
3189 2004-04-01 Mark Mitchell <mark@codesourcery.com>
3192 * name-lookup.c (maybe_push_cleanup_level): Robustify.
3194 2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3196 * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
3198 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3200 * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
3201 * class.c (check_bitfield_decl): Likewise.
3202 * cvt.c (type_promotes_to): Likewise.
3203 * decl.c (finish_enum): Likewise.
3204 * mangle.c (write_builtin_type): Likewise.
3205 * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
3206 * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
3207 (build_binary_op): Likewise.
3209 2004-03-31 Jan Hubicka <jh@suse.cz>
3211 * tree.h (optimize_function): Kill prototype.
3212 * optimize.c (dump_function, optimize_function, dump_finction): Kill.
3213 * semantics.c (expand_body): Kill.
3215 2004-03-30 Mark Mitchell <mark@codesourcery.com>
3218 * decl.c (start_decl_1): Do not decide whether or not to create a
3219 new cleanup level until after the type has been completed.
3222 * pt.c (tsubst_default_argument): Clear current_function_decl.
3224 2004-03-30 Zack Weinberg <zack@codesourcery.com>
3226 * name-lookup.c, parser.c: Use new shorter form of GTY markers.
3228 2004-03-29 Zack Weinberg <zack@codesourcery.com>
3230 * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
3231 is null, just print the literal name and return.
3233 2004-03-25 Kazu Hirata <kazu@cs.umass.edu>
3235 * cxx-pretty-print.c: Fix comment typos.
3237 2004-03-24 Kazu Hirata <kazu@cs.umass.edu>
3239 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
3242 2004-03-23 Ziemowit Laski <zlaski@apple.com>
3244 * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
3245 * mangle.c (write_type): Add call to 'mangle_fundamental_type'
3248 2004-03-23 Zack Weinberg <zack@codesourcery.com>
3250 PR 12267, 12391, 12560, 13129, 14114, 14133
3251 * cp-lang.c (c_reset_state): Delete.
3252 (push_file_scope, pop_file_scope): New stubs.
3253 * parser.c (c_parse_file): Call sorry() here if called more than once.
3255 2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3257 * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
3260 2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
3262 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
3264 2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
3266 * error.c (enum pad): Remove.
3267 (dump_qualifiers): Likewise.
3268 (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
3269 (dump_aggr_type): Likewise.
3270 (dump_type_suffix): Likewise.
3271 (dump_simple_decl): Likewise.
3272 (dump_function_decl): Likewise.
3273 (cv_to_string): Likewise.
3274 (dump_type_prefix): Likewise. Adjust return void.
3275 * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
3277 (pp_cxx_template_keyword_if_needed): Document.
3278 (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
3279 (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
3280 MUST_NOT_THROW_EXPR.
3282 2004-03-21 Mark Mitchell <mark@codesourcery.com>
3285 * decl.c (cp_finish_decl): Compute the size of arrays declared in
3286 templates, if their type is non-dependent.
3288 2004-03-19 Mark Mitchell <mark@codesourcery.com>
3290 * call.c (build_op_delete_call): Do not forget the placement
3291 arguments when iterating through mutiple delete operators.
3293 * cp-tree.h (svaed_scope): Remove last_parms.
3294 (NEW_DELETE_OPNAME_P): New macro.
3295 (last_function_parms): Remove.
3296 (do_friend): Adjust prototype.
3297 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
3298 using last_function_parms.
3299 (grokfndecl): Take the PARM_DECLs as an argument, rather than
3300 using last_function_parms.
3301 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
3302 for class-specific operator new and operator delete.
3303 (grok_op_properties): Do not look for allocation functions with
3305 (start_function): Use DECL_ARGUMENTS instead of
3306 last_function_parms.
3307 * decl.h (last_function_parms): Do not declare.
3308 * decl2.c (grokclassfn): Do not use last_function_parms.
3309 * friend.c (do_friend): Remove parmdecls parameter.
3310 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
3311 (pop_from_top_level): Do not restore it.
3312 * pt.c (check_explicit_specialization): Do not adjust
3313 last_function_parms.
3315 * name-lookup.c (do_local_using_decl): Create a local binding for
3316 types brought in via using declarations.
3318 * name-lookup.c (lookup_arg_dependent): Handle block-scope
3319 function declarations correctly.
3321 * semantics.c (finish_id_expression): Correct handling of
3322 conversion operators to dependent types.
3324 * typeck.c (lookup_destructor): Allow the use of destructors from
3327 2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3329 * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
3330 TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
3331 * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
3332 the field is named TEMPLATE_TYPE_PARM_INDEX.
3334 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3337 * parser.c (cp_parser_functional_cast): A cast to anything
3338 but integral or enumaration type is not an integral constant
3340 * pt.c (value_dependent_expression_p): Handle cast expressions
3341 without operands (such as "int()").
3343 2004-03-18 Mark Mitchell <mark@codesourcery.com>
3345 * semantics.c (finish_pseudo_destructor_expr): Allow differing
3346 cv-qualification between the type named by the
3347 pseudo-destructor-name and the object-type.
3349 * search.c (accessible_base_p): Handle non-proper bases.
3351 * name-lookup.c (do_nonmember_using_decl): If a using declaration
3352 refers to a single overloaded function, set the type of the
3354 * tree.c (lvalue_type): Simplify.
3355 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
3357 (build_unary_op): Handle OVERLOADs with known types.
3359 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
3362 * parser.c (cp_parser_postfix_expression): Handle the use of
3363 "typename" in non-dependent contexts. Convert appropriately when
3364 when using a qualified name after "->" or ".".
3366 * call.c (conditional_conversion): Honor the requirement that some
3367 conversions refer to the original object.
3369 2004-03-18 Mark Mitchell <mark@codesourcery.com>
3371 * call.c (build_conditional_expr): Do not call force_rvalue for
3372 operands of void_type when the conditional expression itself has
3374 * name-lookup.c (pushdecl): Don't consider a declaration of a
3375 function named "main" to be an overload of a type named "main".
3376 * parser.c (cp_parser_template_name): Perform name lookup when the
3377 template name is proceeded by "template" if the qualifying scope
3379 * typeck.c (composite_pointer_type_r): Correctly handle
3380 pointer-to-member types.
3381 (build_const_cast): Likewise.
3383 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3385 * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
3386 * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
3387 (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
3388 (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
3389 (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
3390 (TYPEOF_TYPE_EXPR): New macro.
3391 * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
3392 * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
3393 * pt.c (tsubst): Likewise.
3394 * semantics.c (finish_typeof): Likewise.
3395 * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
3396 and TEMPLATE_TYPE_PARM.
3397 * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
3398 (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
3400 2004-03-16 Mark Mitchell <mark@codesourcery.com>
3403 * cp-tree.h (build_new_op): Change prototype.
3404 (build_x_binary_op): Likewise.
3405 * call.c (build_new_op): Add overloaded_p parameter.
3406 * decl2.c (grok_array_decl): Adjust call to build_new_op.
3407 * parser.c (cp_parser_binary_expression): Note that uses of
3408 overloaded operators prevents an expression from being considered
3409 an integral constant.
3410 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
3412 * semantics.c (finish_call_expr): Likewise.
3413 * typeck.c (rationalize_conditional_expr): Likewise.
3414 (build_x_indirect_ref): Likewise.
3415 (build_x_binary_op): Likewise.
3416 (build_x_unary_op): Likewise.
3417 (build_x_compound_expr): Likewise.
3418 (build_modify_expr): Likewise.
3419 * typeck2.c (build_x_arrow): Likewise.
3421 2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
3423 * cp-lang.c, ptree.c: Update copyright.
3425 2004-03-13 Mark Mitchell <mark@codesourcery.com>
3428 * parser.c (cp_parser_non_integral_constant_expression): Encode
3429 more of the idiom that surrounded calls to this function within
3431 (cp_parser_primary_expression): Adjust accordingly.
3432 (cp_parser_postfix_expression): Likewise.
3433 (cp_parser_unary_expression): Likewise.
3434 (cp_parser_cast_expression): Likewise.
3435 (cp_parser_assignment_expression): Likewise.
3436 (cp_parser_expression): Likewise.
3437 (cp_parser_new_expression): Note that new-expressions are not
3438 allowed in integral constant expressions.
3439 (cp_parser_delete_expression): Likewise.
3441 2004-03-12 Matt Austern <austern@apple.com>
3443 * decl2.c (maybe_make_one_only): Look at
3444 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
3445 to make an explicit instantiation weak.
3446 * method.c (use_thunk): Make sure we call comdat_linkage
3448 * pt.c (do_type_instantiation): On systems where weak symbols
3449 don't go in a static archive's TOC, explicit instantiation of a
3450 class must imply *explicit* instantiation of its memeber.
3452 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
3454 * call.c, cp-tree.h, pt.c: Fix comment typos.
3456 2004-03-10 Mark Mitchell <mark@codesourcery.com>
3459 * decl.c (xref_tag): Disregard non-type declarations when
3460 looking up a tagged type.
3462 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
3465 * call.c (convert_like_real): Build a const qualified temporary,
3466 when testing ctor access.
3468 2004-03-09 Mark Mitchell <mark@codesourcery.com>
3470 * call.c (initialize_reference): Fix typo.
3472 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3475 * pt.c (determine_specialization): For member templates, match also
3479 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
3481 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
3483 2004-03-09 Mark Mitchell <mark@codesourcery.com>
3486 * call.c (initialize_reference): Handle initializers that are
3487 class-member access expressions applies to rvalues.
3489 2004-03-09 Mark Mitchell <mark@codesourcery.com>
3492 * name-lookup.c (supplement_binding): Ignore functions that are
3493 marked DECL_ANTICIPATED.
3495 2004-03-08 Mark Mitchell <mark@codesourcery.com>
3498 * class.c (check_field_decls): Complain about non-static data
3499 members of reference type in unions. Propagate
3500 CLASSTYPE_REF_FIELDS_NEED_INIT and
3501 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
3503 * init.c (perform_member_init): Complain about mbmers with const
3504 type that are not explicitly initialized.
3506 2004-03-08 Mark Mitchell <mark@codesourcery.com>
3508 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
3509 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
3510 (lang_identifier): Remove implicit_decl and error_locus.
3511 (IDENTIFIER_IMPLICIT_DECL): Remove.
3512 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
3513 (IDENTIFIER_ERROR_LOCUS): Likewise.
3514 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
3515 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
3516 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
3517 (implicitly_declare): Remove.
3518 * decl.c (warn_extern_redeclared_static): Remove check of
3519 IDENTIFIER_IMPLICIT_DECL.
3520 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
3521 (implicitly_declare): Remove.
3522 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
3523 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
3524 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
3525 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
3526 in the innermost scope, rather than at namespace scope.
3527 * name-lookup.c (push_local_binding): Give it external linkage.
3528 (pushdecl): Remove dead code.
3529 * name-lookup.h (push_local_binding): Declare it.
3530 * ptree.c (cxx_print_identifier): Don't print
3531 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
3532 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
3533 not IDENTIFIER_ERROR_LOCUS.
3534 * typeck.c (build_function_call): Remove dead code.
3536 2004-03-08 Jason Merrill <jason@redhat.com>
3539 * decl.c (xref_tag): Remove attribute handling.
3540 * cp-tree.h: Adjust prototype.
3541 * decl.c, parser.c, rtti.c: Adjust callers.
3542 * parser.c (cp_parser_class_head): Pass back attributes in the
3544 (cp_parser_class_specifier): Adjust.
3546 2004-03-08 Matt Austern <austern@apple.com>
3549 * name-lookup.c (add_decl_to_level): Add extern variables, as well
3550 as static, to static_decls array.
3552 2004-03-05 Jason Merrill <jason@redhat.com>
3554 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
3556 2004-03-04 Geoffrey Keating <geoffk@apple.com>
3558 * decl.c (grokfndecl): Update old incorrect comment.
3559 (grokvardecl): Diagnose C++ variables of type with no linkage.
3561 2004-03-01 Mark Mitchell <mark@codesourcery.com>
3564 * pt.c (build_non_dependent_expr): Do not create a
3565 NON_DEPENDENT_EXPR for a THROW_EXPR.
3567 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
3570 * error.c (dump_expr): Handle THROW_EXPR.
3572 2004-03-01 Mark Mitchell <mark@codesourcery.com>
3575 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
3576 lookup if ordinary name-lookup finds a non-function.
3577 * pt.c (tsubst_copy_and_build): Likewise.
3580 * parser.c (cp_parser_late_parsing_default_args): Check that there
3581 are no extra tokens after the end of the default-argument
3584 2004-03-01 Mark Mitchell <mark@codesourcery.com>
3587 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
3588 having C++ linkage for name-mangling purposes.
3591 * parser.c (cp_parser_direct_declarator): Recognize constructor
3592 declarators that use a template-id to name the class being
3596 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
3597 (tsubst_expr): Do not call tsubst_copy, even when
3598 processing_template_decl.
3600 2004-03-01 Jeff Law <law@redhat.com>
3602 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
3605 2004-02-29 Mark Mitchell <mark@codesourcery.com>
3608 * name-lookup.h (push_scope): Change prototype.
3609 * name-lookup.c (push_scope): Do not reenter the current class
3611 * decl.c (grokfndecl): Check return code from push_scope before
3613 * decl2.c (check_classfn): Likewise.
3614 * parser.c (cp_parser_conversion_function_id): Likewise.
3615 (cp_parser_init_declarator): Likewise.
3616 (cp_parser_direct_declarator): Likewise.
3617 (cp_parser_class_specifier): Likewise.
3618 (cp_parser_class_head): Likewise.
3619 (cp_parser_lookup_name): Likewise.
3620 (cp_parser_constructor_declarator_p): Likewise.
3621 * pt.c (instantiate_class_template): Likewise.
3622 (resolve_typename_type): Likewise.
3624 2004-02-29 Mark Mitchell <mark@codesourcery.com>
3627 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
3631 * class.c (update_vtable_entry_for_fn): Do not go through
3632 covariance machinery if the type returned by an overrider is the
3633 same as the original.
3635 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
3637 * call.c: Fix a comment typo.
3639 2004-02-27 Ziemowit Laski <zlaski@apple.com>
3641 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
3643 2004-02-26 Mark Mitchell <mark@codesourcery.com>
3646 * parser.c (cp_parser_parameter_declaration_list): Commit
3647 to fewer tentative parses.
3649 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3652 * pt.c (dependent_type_p_r): A template template parameter is a
3655 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3658 * mangle.c (write_template_arg_literal): Don't rely on identity for
3661 2004-02-24 Jason Merrill <jason@redhat.com>
3663 * tree.c (build_exception_variant): Use check_qualified_type.
3665 2004-02-23 Zack Weinberg <zack@codesourcery.com>
3666 Kazu Hirata <kazu@cs.umass.edu>
3668 * decl.c (cxx_init_decl_processing): Don't check
3669 flag_writable_strings.
3671 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
3674 * typeck.c (maybe_warn_about_returning_address_of_location):
3675 Change check for VAR_DECL to use DECL_P instead.
3677 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3680 * cvt.c (build_expr_type_conversion): Type must be complete before
3681 looking up for conversions.
3683 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3686 * name-lookup.c (arg_assoc_class): Don't look into template
3687 arguments if it is not a primary template.
3689 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3692 * method.c (use_thunk): Always clone function argument tree.
3694 2004-02-20 Mark Mitchell <mark@codesourcery.com>
3697 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
3700 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
3701 for all type variants.
3703 2004-02-19 Mark Mitchell <mark@codesourcery.com>
3706 * decl.c (duplicate_decls): Return error_mark_node for invalid
3708 * name-lookup.c (push_namespace): Ignore the return value from
3710 * pt.c (push_template_decl_real): Robustify.
3713 * name-lookup.c (push_class_level_binding): Do not complain about
3714 adding a binding for a member whose name is the same as the
3715 enclosing class if the member is located in a base class of the
3718 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3721 * parser.c (cp_parser_new_expression): Parse an ill-formed
3722 direct-new-declarator after a parenthesized type-id to emit good
3725 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
3727 * cp-tree.def, cvt.c: Update copyright.
3729 2004-02-17 Mark Mitchell <mark@codesourcery.com>
3732 * cp-tree.h (abi_version_at_least): Remove.
3733 * mangle.c: Include flags.h.
3735 2004-02-15 Mark Mitchell <mark@codesourcery.com>
3738 * call.c (build_conditional_expr): Handle conversions between
3739 class types which result in differently cv-qualified type
3743 * class.c (delete_duplicate_fields_1): Remove.
3744 (delete_duplicate_fields): Likewise.
3745 (finish_struct_anon): Remove check for members with the same name
3746 as their enclosing class.
3747 (check_field_decls): Do not call duplicate_fields.
3748 * decl.c (grokdeclarator): Remove check for static data members
3749 with the same name as their enclosing class.
3750 * name-lookup.c (push_class_level_binding): Check for members with
3751 the same name as their enclosing class.
3753 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
3756 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
3758 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3761 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
3762 has full set of arguments.
3764 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3767 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
3769 2004-02-13 Mark Mitchell <mark@codesourcery.com>
3772 * cp-tree.h (delete_sanity): Change prototype.
3773 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
3774 Remove dead code. Adjust code to warn about deleting an array.
3775 * typekc.c (decay_conversion): Use build_address and build_nop.
3778 * search.c (accessible_p): Do not check access in thunks.
3781 * call.c (build_conditional_expr): Call force_rvalue on the
3782 non-void operand in the case that one result is a throw-expression
3783 and the other is not.
3785 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
3788 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
3789 the type name and look ahead for ::~, and bail out early with a
3790 better error message if the parse is going to fail.
3792 2004-02-12 Mark Mitchell <mark@codesourcery.com>
3794 * call.c (conversion_kind): New type.
3795 (conversion_rank): Likewise.
3796 (conversion): Likewise.
3797 (CONVERSION_RANK): New macro.
3798 (conversion_obstack): New variable.
3799 (obstack_initialized): Likewise.
3800 (z_candidate): Change type of convs and second_conv.
3801 (candidate_warning): New type.
3802 (IDENTITY_RANK): Remove.
3803 (EXACT_RANK): Likewise.
3804 (PROMO_RANK): Likewise.
3805 (STD_RANK): Likewise.
3806 (PBOOL_RANK): Likewise.
3807 (USER_RANK): Likewise.
3808 (ELLIPSIS_RANK): Likewise.
3809 (BAD_RANK): Likewise.
3810 (ICS_RANK): Likewise.
3811 (ICS_STD_RANK): Likewise.
3812 (ICS_USER_FLAG): Likewise.
3813 (ICS_ELLIPSIS_FLAG): Likewise.
3814 (ICS_THIS_FLAG): Likewise.
3815 (ICS_BAD_FLAG): Likewise.
3816 (NEED_TEMPORARY_P): Likewise.
3817 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
3818 (USER_CONV_CAND): Likewise.
3819 (USER_CONV_FN): Likewise.
3820 (conversion_obstack_alloc): New function.
3821 (alloc_conversion): Likewise.
3822 (validate_conversion_obstack): Likewise.
3823 (alloc_conversions): Likewise.
3824 (build_conv): Adjust to deal with new conversion data structures.
3825 (build_identity_conv): New function.
3826 (build_ambiguous_conv): Likewise.
3827 (standard_conversion): Adjust to deal with new conversion data
3829 (convert_class_to_reference): Likewise.
3830 (direct_reference_binding): Likewise.
3831 (reference_binding): Likewise.
3832 (implicit_conversion): Likewise.
3833 (add_candidate): Likewise.
3834 (add_function_candidate): Likewise.
3835 (add_conv_candidate): Likewise.
3836 (build_builtin_candidate): Likewise.
3837 (print_z_candidate): Likewise.
3838 (merge_conversion_sequences): Likewise.
3839 (build_user_type_conversion_1): Likewise.
3840 (build_user_type_conversion): Likewise.
3841 (build_new_function_call): Likewise.
3842 (build_object_call): Likewise.
3843 (conditional_conversion): Likewise.
3844 (build_conditional_expr): Likewise.
3845 (build_new_op): Likewise.
3846 (build_op_delete_call): Likewise.
3847 (convert_like_real): Likewise.
3848 (build_over_call): Likewise.
3849 (build_new_method_call): Likewise.
3850 (is_subseq): Likewise.
3851 (maybe_handle_implicit_object): Likewise.
3852 (maybe_handle_ref_bind): Likewise.
3853 (compare_ics): Likewise.
3854 (source_type): Likewise.
3855 (add_warning): Likewise.
3857 (can_convert_arg): Likewise.
3858 (can_convert_arg_bad): Likewise.
3859 (perform_implicit_conversion): Likewise.
3860 (perform_direct_initialization_if_possible): Likewise.
3861 (initialize_reference): Likewise.
3862 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
3863 * cp-tree.def (WRAPPER): Likewise.
3864 (IDENTITY_CONV): Remove.
3865 (LVALUE_CONV): Likewise.
3866 (QUAL_CONV): Likewise.
3867 (STD_CONV): Likewise.
3868 (PTR_CONV): Likewise.
3869 (PMEM_CONV): Likewise.
3870 (BASE_CONV): Likewise.
3871 (REF_BIND): Likewise.
3872 (USER_CONV): Likewise.
3873 (AMBIG_CONV): Likewise.
3874 (RVALUE_CONV): Likewise.
3875 * cp-tree.h (tree_wrapper): Remove.
3876 (WRAPPER_ZC): Remove.
3877 (lang_tree_node): Remove wrapper.
3878 (LOOKUP_SPECULATIVELY): Remove.
3879 (build_op_delete_call): Adjust prototype.
3880 (validate_conversion_obstack): Declare.
3881 (build_zc_wrapper): Remove.
3882 * cvt.c (convert_to_reference): Remove dead code.
3883 (ocp_convert): Likewise.
3884 * decl.c (redeclaration_error_message): Correct handling of
3886 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
3887 (cp_tree_node_structure): Remove WRAPPER case.
3888 * decl2.c (finish_file): Call validate_conversion_obstack.
3889 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
3890 (build_op_delete_call): Likewise.
3891 (build_x_delete): Likewise.
3892 (build_delete): Adjust call to build_op_delete_call.
3893 * pt.c (tsubst_friend_declaration): Adjust code to determine
3894 whether or not a friend template is a definition.
3895 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
3896 * tree.c (build_zc_wrapper): Remove.
3898 2004-02-12 Zack Weinberg <zack@codesourcery.com>
3900 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
3901 * cp-tree.h: Don't declare cxx_builtin_type_decls.
3902 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
3903 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
3905 2004-02-10 Mark Mitchell <mark@codesourcery.com>
3907 * typeck.c (lookup_destructor): Fix typo in error message.
3909 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
3911 * call.c, parser.c, tree.c: Fix comment typos.
3913 2004-02-07 Zack Weinberg <zack@codesourcery.com>
3916 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
3917 * decl.c (duplicate_decls, start_function): Likewise.
3919 2004-02-07 Zack Weinberg <zack@codesourcery.com>
3921 * name-lookup.c (pushdecl): Issue shadow warnings directly.
3922 * parser.c (free_parser_stacks): Delete.
3924 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
3926 * rtti.c: Update copyright.
3928 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3931 * decl.c (require_complete_types_for_parms): Do not insert
3932 error_mark_node in the parameter list.
3934 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3937 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
3938 error when terminator can not be found.
3940 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
3942 Make-lang.in (po-generated): Delete.
3944 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
3946 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
3947 targetm.calls.promote_prototypes.
3949 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3953 2004-01-15 Geoffrey Keating <geoffk@apple.com>
3955 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
3956 (handle_pragma_implementation): Likewise.
3958 2004-02-05 Mark Mitchell <mark@codesourcery.com>
3961 * typeck.c (lookup_destructor): Tweak error message.
3963 2004-02-05 Jan Hubicka <jh@suse.cz>
3965 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
3968 2004-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3971 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
3972 code, only emits the diagnostic now. Added lookup of the identifier
3973 and support for qualified ids.
3974 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
3975 Parse an (invalid) type name as id-expression within a declarator.
3976 (cp_parser_simple_declaration): Use it.
3977 (cp_parser_member_declaration): Likewise.
3978 (cp_parser_make_typename_type): New function. Handle errors through
3979 cp_parser_diagnose_invalid_typename.
3980 (cp_parser_elaborated_type_specifier): Use it.
3982 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3985 * call.c (convert_like_real): Use "converting" rather than
3986 "argument" as the descriptive keyword to
3987 dubious_conversion_warnings.
3988 * typeck.c (convert_for_assignment): Do not call
3989 dubious_conversion_warnings.
3991 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3994 * init.c (build_delete): Emit a more informative error message in
3995 case of an incomplete type, and on the correct source line.
3997 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
3999 * error.c, search.c: Update copyright.
4001 2004-02-04 Mark Mitchell <mark@codesourcery.com>
4004 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
4005 linkage for the typeinfo name string.
4007 2004-02-04 Mark Mitchell <mark@codesourcery.com>
4010 * cp-tree.h (fold_non_dependent_expr): New function.
4011 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
4012 (cp_parser_template_argument): Use fold_non_dependent_expr.
4013 (cp_parser_direct_declarator): Likewise.
4014 * pt.c (fold_non_dependent_expr): New function.
4015 (convert_nontype_argument): Use it.
4016 (tsubst_qualified_id): Simplify.
4017 (tsubst_copy_and_build): Likewise.
4019 2004-02-04 Mark Mitchell <mark@codesourcery.com>
4021 * decl.c (cxx_push_function_context): Do not set
4022 current_function_is_thunk.
4023 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
4026 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4029 * pt.c (more_specialized_class): Increase processing_template_decl
4030 while partial ordering.
4032 2004-02-03 Mark Mitchell <mark@codesourcery.com>
4035 * decl.c (start_function): Do not call pushdecl for any
4036 instantiation or specialization of a primary template.
4038 2004-02-03 Mark Mitchell <mark@codesourcery.com>
4041 * parser.c (cp_parser_class_name): Robustify.
4044 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
4047 * semantics.c (finish_id_expression): Do not return an
4048 IDENTIFIER_NODE when lookup finds a PARM_DECL.
4050 2004-02-03 Mark Mitchell <mark@codesourcery.com>
4053 * pt.c (build_non_dependent_expr): Do not build
4054 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
4057 * semantics.c (finish_id_expression): Do not return an
4058 IDENTIFIER_NODE when lookup finds a VAR_DECL.
4061 * parser.c (cp_parser_simple_declaration): When skipping to the
4062 end of the statement swallow the terminating semicolon.
4064 2004-02-02 Mark Mitchell <mark@codesourcery.com>
4067 * init.c (build_offset_ref): Improve error recovery for invalid
4068 uses of non-static member functions.
4071 * cp-tree.h (cp_build_type_attribute_variant): New function.
4072 * class.c (build_clone): Use cp_build_type_attribute_variant.
4073 * decl.c (duplicate_decls): Likewise.
4074 * pt.c (copy_default_args_to_explicit_spec): Likewise.
4075 (tsubst_function_type): Likewise.
4076 * tree.c (build_exception_variant): Check attributes before
4077 concluding that two types are the same.
4078 (cp_build_type-attribute_variant): New method.
4079 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
4082 * call.c (convert_class_to_reference): Keep better track of
4083 pedantically invalid user-defined conversions.
4085 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4088 * pt.c (tsubst_qualified_id): Improved error message when a type
4089 is expected but not found.
4091 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
4093 * class.c: Fix comment typos.
4095 * error.c: Likewise.
4096 * parser.c: Likewise.
4098 * search.c: Likewise.
4099 * typeck.c: Likewise.
4101 2004-01-30 Richard Henderson <rth@redhat.com>
4104 * method.c (use_thunk): Don't force_target_expr for void thunks.
4105 * tree.c (build_target_expr_with_type): Assert non-void type.
4106 (force_target_expr): Likewise.
4108 2004-01-30 Michael Matz <matz@suse.de>
4110 * parser.c (cp_parser_labeled_statement): Accept case ranges.
4112 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4116 * decl.c (grokdeclarator): Check immediatly type completeness for
4117 non-dependent types.
4119 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4122 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
4123 a sizeof expression.block
4125 2004-01-29 Mark Mitchell <mark@codesourcery.com>
4128 * mangle.c (write_encoding): Correct encoding of member template
4131 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4133 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
4134 template name as it was `<::' (digraph typo).
4135 (cp_parser_nth_token_starts_template_argument_list_p): New function.
4136 (cp_parser_id_expression): Use it.
4137 (cp_parser_nested_name_specifier_opt): Likewise.
4138 (cp_parser_template_name): Likewise.
4139 (cp_parser_class_name): Likewise.
4140 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
4142 2004-01-28 Mark Mitchell <mark@codesourcery.com>
4145 * typeck.c (merge_types): Do not merge attributes into
4149 * parser.c (cp_parser_direct_declarator): Do not prevent
4150 backtracking inside a parenthesized declarator.
4151 (cp_parser_parameter_declaration): Fix typo in comment.
4153 2004-01-28 Jan Hubicka <jh@suse.cz>
4155 * semantics.c (expand_body) Do emit_associated_thunks before
4158 2004-01-27 Devang Patel <dpatel@apple.com>
4160 * name-lookup.c: Include "debug.h"
4161 (do_namespace_alias): Invoke debug_hooks to emit debug info
4162 for namespace alias.
4163 (do_local_using_decl): Invoke debug_hooks to emit debug info
4165 (do_class_using_decl): Same.
4166 (do_toplevel_using_decl): Same.
4167 (do_using_directive): Same.
4168 (cp_emit_debug_info_for_using): New function.
4169 * Make-lang.in (cp/parser.o): Depend on debug.h
4170 (cp/name-lookup.o): Same.
4172 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4174 * cp-tree.h (language_function, lang_type_header): Use
4176 * name-lookup.h (cp_binding_level): Likewise.
4178 2004-01-26 Mark Mitchell <mark@codesourcery.com>
4181 * semantics.c (finish_for_expr): Check for unresolved overloaded
4184 * class.c (add_method): Just check processing_template_decl to
4185 determine whether or not we are within a template.
4186 * decl2.c (maybe_retrofit_in_chrg): Likewise.
4187 * init.c (decl_constant_value): Check the type of the declaration,
4189 * name-lookup.c (maybe_push_to_top_level): Rename to ...
4190 (push_to_top_level): ... this.
4191 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
4192 * pt.c (push_template_decl_real): Reorder condition for speed.
4193 (convert_template_argument): Use dependency-checking functions in
4194 place of uses_template_parms.
4195 (lookup_template_class): Avoid calling uses_template_parms more
4197 (uses_template_parms): Reimplement, using dependency-checking
4199 (instantiate_class_template): Use push_to_top_level, not
4200 maybe_push_to_top_level.
4201 (type_unification_real): Simplify.
4202 (type_dependent_expression_p): Handle OFFSET_REFs and
4204 (any_dependent_template_arguments_p): Handle multiple levels of
4206 * semantics.c (expand_or_defer_fn): Do not check
4207 uses_template_parms for template instantiations.
4208 * typeck.c (comptypes): Avoid calling cp_type_quals.
4210 2004-01-25 Mark Mitchell <mark@codesourcery.com>
4213 * call.c (build_over_call): Do not convert arguments when
4214 processing a template.
4215 * pt.c (build_non_dependent_expr): Do not build a
4216 NON_DEPENDENT_EXPR for arithmetic constants.
4218 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4221 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
4222 returns a TYPE_DECL. no further lookup is required.
4223 * semantics.c (check_template_template_default_arg): A TYPE_DECL
4224 is invalid. Rework to give better diagnostics.
4226 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4229 * pt.c (instantiate_class_template): Add an error_mark_node
4231 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
4233 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
4236 * decl.c (finish_function): Move the call to
4237 finish_fname_decls below the call to
4238 finish_eh_spec_block.
4240 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
4242 * optimize.c, typeck2.c: Update copyright.
4244 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
4246 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
4247 init.c, mangle.c, typeck.c: Update copyright.
4249 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
4251 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
4253 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
4255 * Make-lang.in: Replace $(docdir) with doc.
4256 (c++.info, c++.srcinfo): Dummy entry.
4257 (c++.man, c++.srcman): New rules.
4258 (c++.install-man): Revamp rule.
4260 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
4262 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
4263 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
4264 immediate $(shell) instead of deferred backquote.
4266 2004-01-19 Mark Mitchell <mark@codesourcery.com>
4269 * parser.c (cp_parser_postfix_expression): When encountering
4270 incomplete type on left-hand side of "->" or ".", treat the entire
4271 expression as erroneous.
4274 * call.c (build_field_call): Remove.
4275 (n_build_method_call): Likewise.
4276 (build_method_call): Likewise.
4277 (build_new_method_call): Do not call build_field_call.
4278 * class.c (n_build_method_call): Remove.
4279 (print_class_statistics): Do not print it.
4280 * cp-tree.h (build_method_call): Remove declaration.
4281 (finish_object_call_expr): Likewise.
4282 (build_new_1): Do not use build_method_call.
4283 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
4284 when the function appearing on the right-hand-side of "." or "->"
4285 is not actually a function.
4286 * pt.c (tsubst_copy_and_build): Likewise.
4287 * semantics.c (finish_object_call_expr): Remove.
4289 2004-01-18 Mark Mitchell <mark@codesourcery.com>
4292 * pt.c (tsubst): Use finish_typeof.
4294 2004-01-18 Jason Merrill <jason@redhat.com>
4297 * except.c (build_throw): In a template, set
4298 current_function_returns_abnormally.
4300 2004-01-17 Fred Fish <fnf@intrinsity.com>
4303 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
4304 except don't call array_type_nelts() with a VECTOR_TYPE.
4306 2004-01-16 Jan Hubicka <jh@suse.cz>
4308 * mangle.c (write_mangled_name): Remove inline modifier.
4310 2004-01-16 Mark Mitchell <mark@codesourcery.com>
4313 * decl.c (compute_array_index_type): Fix grammar in comment.
4314 * init.c (build_zero_init): Handle zero-sized arrays correctly.
4317 * call.c (name_as_c_string): Print conversion operator names
4321 * call.c (initialize_reference): Pass -1 for inner parameter to
4324 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4327 * parser.c (cp_parser_base_specifier): Check for an invalid
4328 keyword `typename' and emit an user-friendly error message.
4330 2004-01-15 Geoffrey Keating <geoffk@apple.com>
4333 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
4334 (handle_pragma_implementation): Likewise.
4336 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4339 * typeck.c (build_class_member_access_expr): Allow to access members
4340 of the currently open class.
4341 (finish_class_member_access_expr): Likewise.
4343 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
4346 * name-lookup.c (validate_nonmember_using_decl): Take scope and
4347 name by value, instead of computing them.
4348 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
4349 arguments. Pass them to validate_nonmember_using_decl.
4350 * name-lookup.h (do_local_using_decl): Adjust.
4351 (do_toplevel_using_decl): Likewise.
4352 * parser.c (cp_parser_using_declaration): Likewise.
4353 * pt.c (tsubst_expr): Likewise.
4355 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
4359 * name-lookup.c (qualified_lookup_using_namespace): Search
4360 strongly-associated namespaces first, and only then try other
4363 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
4365 * Make-lang.in (c++.srcextra): Dummy entry.
4367 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4370 * parser.c (cp_parser_template_name): Don't try to parse a
4371 conversion-function-id, as it cannot be a template-name.
4372 (cp_parser_simple_type_specifier): Check for invalid template-ids
4373 even after a built-in type.
4375 2004-01-14 Jan Hubicka <jh@suse.cz>
4378 * pt.c (instantiate_decl): Do not increase function_depth.
4380 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
4384 * parser.c (cp_parser_elaborated_type_specifier): Warn about
4385 attributes and discard.
4386 * decl.c (xref_tag): Don't overwite existing attributes with
4389 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4392 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
4393 is no destructor while looking up a BIT_NOT_EXPR.
4395 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
4397 * cxxfilt.c: Remove unused file.
4399 2004-01-14 Jan Hubicka <jh@suse.cz>
4401 Partial fix to PR c++/12850
4402 * decl2.c (mark_used): Do not proactively instantiate templates
4403 when compiling in unit-at-a-time or not optimizing.
4404 * optimize.c (maybe_clone_body): Do not increase function depth.
4406 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4409 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
4411 2004-01-12 Steven Bosscher <stevenb@suse.de>
4414 * parser.c (cp_parser_member_declaration): Any non-type is also
4415 not a class or a function.
4417 2004-01-12 Jason Merrill <jason@redhat.com>
4420 * class.c (build_base_path): Do not mark vtable references as
4422 (build_vtbl_ref_1): Likewise.
4424 2004-01-12 Richard Henderson <rth@redhat.com>
4427 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
4428 (store_init_value): Use it.
4429 * decl.c (check_initializer): Expect full initialization code
4430 from store_init_value.
4431 * init.c (expand_aggr_init_1): Likewise.
4432 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
4434 2004-01-12 Mark Mitchell <mark@codesourcery.com>
4436 * class.c (layout_class_type): For non-POD class types, also copy
4437 the DECL_SIZE and DECL_MODE of fields to the base class type.
4439 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4442 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
4443 calling regenerate_decl_from_template.
4445 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
4448 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
4449 decl-specifier occurring along with a class definition.
4451 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
4453 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
4454 clauses to comments describing declares_class_or_enum.
4455 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
4458 2004-01-12 Jan Hubicka <jh@suse.cz>
4460 * pt.c (for_each_template_parm): Do not check for duplicates.
4461 (for_each_template_parm): Use walk_tree duplicate checking code.
4463 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
4466 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
4467 is error_mark_node, don't add any more decl_specs.
4468 (cp_parser_init_declarator): After committing to a declaration, if
4469 the decl_specifiers start with error_mark_node, issue an error and
4470 change the type to "int".
4472 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
4475 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
4477 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4481 * pt.c (tsubst): Substitution must fail if we are attempting to
4482 create an array with element type that is an abstract class type.
4483 * decl.c (cp_finish_decl): Strip pointers and array types recursively
4484 before calling abstract_virtuals_error.
4486 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
4488 * name-lookup.c (qualified_lookup_using_namespace): Consider
4489 strong using directives even if we've already found a binding.
4491 2004-01-09 Mark Mitchell <mark@codesourcery.com>
4493 * cp-tree.h (cxx_expand_expr): Change prototype.
4494 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
4496 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4499 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
4500 looking into them recursively. They can be there because of the
4501 new __offsetof__ extension.
4503 2004-01-07 Zack Weinberg <zack@codesourcery.com>
4505 * parser.c (cp_parser_save_member_function_body): Mark the
4508 2004-01-05 Mark Mitchell <mark@codesourcery.com>
4511 * class.c (build_clone): Copy type attributes from the original
4512 function to the clone.
4515 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
4516 references as constant.
4519 * parser.c (cp_parser_explicit_instantiation): Improve error
4521 (cp_parser_require): Improve indication of the error location.
4524 * parser.c (cp_parser_class_head): Reorder logic to check for
4525 invalid qualification.
4527 2004-01-04 Mark Mitchell <mark@codesourcery.com>
4530 * name-lookup.c (lookup_using_namespace): Remove spacesp
4532 (unqualified_namespace_lookup): Likewise.
4533 (lookup_qualified_name): Adjust accordingly.
4534 (lookup_name_real): Likewise.
4535 (lookup_arg_dependent): Do not eliminate the namespace of the
4536 functions found by unqualified name lookup unless that is the
4539 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
4541 * semantics.c (push_deferring_access_checks): Fix format.
4542 (resume_deferring_access_checks): Likewise.
4543 (stop_deferring_access_checks): Likewise.
4544 (pop_deferring_access_checks): Likewise.
4545 (get_deferred_access_checks): Likewise.
4546 (pop_to_parent_deferring_access_checks): Likewise.
4547 (perform_deferred_access_checks): Likewise.
4548 (perform_or_defer_access_check): Likewise.
4550 2004-01-04 Richard Henderson <rth@redhat.com>
4552 * call.c (build_over_call): Don't create a save_expr of an
4553 aggregate, but rather its address.
4555 2004-01-04 Mark Mitchell <mark@codesourcery.com>
4558 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
4559 an offsetof expression.
4561 * parser.c (cp_parser_parameter_declaration): Fix comment.
4564 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
4565 (reference_binding): Set it when appropriate.
4566 (build_temp): New function, split out from ...
4567 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
4568 (initialize_reference): Likewise.
4571 * parser.c (cp_parser): Add in_type_id_in_expr_p.
4572 (cp_parser_new): Initialize it.
4573 (cp_parser_postfix_expression): Set it.
4574 (cp_parser_sizeof_operand): Likewise.
4575 (cp_parser_parameteR_declaration): Do not commit early to tenative
4576 parsers when in_type_id_in_expr_p is set.
4578 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4581 * parser.c (cp_parser_template_argument): Don't call
4582 make_unbound_class_template directly.
4583 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
4584 UNBOUND_CLASS_TEMPLATE tree node.
4586 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
4589 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
4591 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4594 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
4595 (DECL_FUNCTION_TEMPLATE_P): Use it.
4596 (DECL_CLASS_TEMPLATE_P): Likewise.
4597 * parser.c (cp_parser_lookup_name): Add is_template parameter.
4598 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
4599 (cp_parser_template_name): Likewise.
4600 (cp_parser_elaborated_type_specifier): Likewise.
4601 (cp_parser_namespace_name): Likewise.
4602 (cp_parser_class_name): Likewise.
4603 (cp_parser_lookup_name_simple): Likewise.
4605 See ChangeLog.3 for earlier changes.