1 2004-09-16 Geoffrey Keating <geoffk@apple.com>
4 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
5 (handle_pragma_implementation): Likewise.
7 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
8 Zack Weinberg <zack@codesourcery.com>
10 * cp-tree.def: Use tree_code_class enumeration constants
11 instead of code letters.
12 * call.c, class.c, cp-gimplify.c, cp-lang.c, cxx-pretty-print.c
13 * mangle.c, pt.c, semantics.c, tree.c, typeck.c:
14 Update for new tree-class enumeration constants.
16 2004-09-16 Mark Mitchell <mark@codesourcery.com>
19 * parser.c (cp_parser_simple_declaration): Commit to tentative
20 parses after seeing a decl-specifier.
21 (cp_parser_simple_declaration): Eliminate spurious message.
22 (cp_parser_init_declarator): Adjust error message.
25 * lex.c (unqualified_name_lookup_error): Mark the dummy
29 * parser.c (cp_parser_nested_name_specifier): Do not resolve
30 typename types if the user explicitly said "typename".
32 2004-09-16 Andrew MacLeod <amacleod@redhat.com>
34 * error.c (dump_decl): Make sure there is lang_specific info before
35 checking for DTOR and CTOR decls.
37 2004-09-16 Nathan Sidwell <nathan@codesourcery.com>
39 * class.c (copy_virtuals): Remove.
40 (build_primary_vtable): Use copy_list directly.
41 (build_secondary_vtable): Likewise.
42 (update_vtable_entry_for_fn): Clear BV_CALL_INDEX here.
43 (create_vtable_ptr): Likewise.
45 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
47 * search.c: Follow spelling conventions.
49 2004-09-16 Nathan Sidwell <nathan@codesourcery.com>
51 * cp-tree.h (struct lang_type_class): Make pure_virtuals a
53 (CLASSTYPE_INLINE_FRIENDS, CLASSTYPE_PURE_VIRTUALS): Update
55 * call.c (build_new_method_call): Don't confirm a pure virtual is
56 in CLASSTYPE_PURE_VIRTUALS. Reorder checks. Make it a warning.
57 * class.c (check_methods): CLASSTYPE_INLINE_FRIENDS is a VEC(tree).
58 (fixup_inline_methods, finish_struct): Likewise.
59 * decl.c (finish_method): Likewise.
60 * search.c (dfs_get_pure_virtuals, get_pure_virtuals):
61 CLASSTYPE_PURE_VIRTUALS is a VEC(tree).
62 * typeck2.c (abstract_virtuals_error): Likewise. Truncate the
63 vector to avoid repeating the list in error messages.
65 2004-09-15 Mark Mitchell <mark@codesourcery.com>
67 * cp-objcp-common.h (LANG_HOOKS_COMDAT_GROUP): Define.
68 * cp-tree.h (cxx_comdat_group): Declare.
69 * decl.c (cxx_comdat_group): New function.
71 2004-09-15 Nathan Sidwell <nathan@codesourcery.com>
73 * search.c (get_pure_virtuals): Remove unused variables.
75 * cp-tree.h (struct lang_decl_flags): Remove
76 needs_final_overrider.
77 (DECL_NEEDS_FINAL_OVERRIDER_P): Remove.
78 * decl.c (duplicate_decls): Do not copy DECL_NEEDS_FINAL_OVERRIDER_P.
79 * class.c (finish_struct_bits): Correct comment about
80 CLASSTYPE_PURE_VIRTUALS.
81 * search.c (get_pure_virtuals): Remove useless loop.
83 2004-09-14 Mark Mitchell <mark@codesourcery.com>
86 * mangle.c (partially_mangled_name): New variable.
87 (partially_mangled_name_len): Likewise.
88 (save_partially_mangled_name): New function.
89 (restore_partially_mangled_name): Likewise.
90 (write_encoding): Save and restore partially mangled names around
91 calls to get_mostly_instantiated_function_type.
92 (write_unqualified_name): Likewise.
94 2004-09-14 Nathan Sidwell <nathan@codesourcery.com>
96 * pt.c (unify): Replace gcc_unreachable with gcc_assert.
98 2004-09-13 Mark Mitchell <mark@codesourcery.com>
101 * parser.c (cp_parser_id_expression): Correct value for
103 (cp_parser_nested_name_specifier_opt): Look through typenames as
105 (cp_parser_template_name): Honor check_dependency_p.
108 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name):
112 * pt.c (unify): Add ENUMERAL_TYPE case. Replace sorry with
115 2004-09-12 Richard Henderson <rth@redhat.com>
118 * semantics.c (maybe_cleanup_point_expr): Don't call fold.
119 * typeck.c (condition_conversion): Likewise.
121 2004-09-11 Richard Henderson <rth@redhat.com>
124 * pt.c (cur_stmt_expr): Move from tsubst_expr.
125 (tsubst_expr) <case STMT_EXPR>: Move ...
126 (tsubst_copy_and_build): ... here.
128 2004-09-10 Zack Weinberg <zack@codesourcery.com>
130 * cp-tree.h (interface_only, interface_unknown): Delete declarations;
131 comment explaining them moved to c-common.h.
132 * lex.c (interface_only, interface_unknown, extract_interface_info):
134 (cxx_finish): Don't reset interface_unknown.
135 (handle_pragma_interface): Don't set interface_only and
136 interface_unknown; just the like-named fields in finfo.
137 (handle_pragma_implementation): Adjust comment.
138 * decl2.c (cp_finish_file): Don't reset interface_only and
140 * method.c (synthesize_method): Don't reset interface_unknown or
141 call extract_interface_info.
142 * pt.c (pop_tinst_level): Don't call extract_interface_info.
143 * decl.c (start_cleanup_fn): Don't save or restore interface_only
144 and interface_unknown.
145 (make_rtl_for_nonlocal_decl): Call get_fileinfo on input_filename
146 and use the result instead of the interface_only/interface_unknown
148 (start_preparsed_function): Likewise.
149 * lex.c (cxx_make_type): Likewise.
150 * semantics.c (begin_class_definition): Likewise.
151 (expand_body): Don't call extract_interface_info.
153 2004-09-10 Ziemowit Laski <zlaski@apple.com>
155 * decl.c (objc_mark_locals_volatile): Make description of
156 routine more descriptive; only mark VAR_DECLs at each
159 2004-09-10 Richard Henderson <rth@redhat.com>
162 * call.c (build_vfield_ref): Move...
163 * class.c (build_vfield_ref): ... here. Convert datum to the
164 primary base containing the vptr.
165 (make_new_vtable): Simplify build_primary_vtable arguments.
166 (finish_struct_1): Do not duplicate TYPE_VFIELD.
167 * typeck.c (build_class_member_access_expr): Don't warn for
168 null object access to base fields.
170 2004-09-10 Ziemowit Laski <zlaski@apple.com>
172 * decl.c (objc_get_current_scope, objc_mark_locals_volatile):
173 New functions, to be called from ObjC++.
175 2004-09-10 Kazu Hirata <kazu@cs.umass.edu>
177 * class.c, cp-tree.h, decl.c, decl2.c, mangle.c,
178 name-lookup.h, parser.c, search.c, semantics.c, typeck2.c: Fix
181 2004-09-09 Ziemowit Laski <zlaski@apple.com>
183 * typeck.c (build_c_cast): Preserve the cast if casting
184 to and from an Objective-C type.
186 2004-09-09 Ziemowit Laski <zlaski@apple.com>
188 * Make-lang.in (cp/typeck.o): Depend on c-common.h.
189 * typeck.c: Include c-common.h.
190 (comptypes): For RECORD_TYPEs, call objc_comptypes() and
191 return the result if nonnegative.
193 2004-09-09 Zack Weinberg <zack@codesourcery.com>
195 * decl2.c (import_export_class)
196 * lex.c (handle_pragma_interface):
197 Test MULTIPLE_SYMBOL_SPACES with if, not #ifdef.
199 2004-09-08 Ziemowit Laski <zlaski@apple.com>
201 * Make-lang.in (cp/semantics.o): Depend on c-common.h.
202 * semantics.c: Include c-common.h.
203 (finish_compound_stmt): Call objc_clear_super_receiver().
205 2004-09-08 Ziemowit Laski <zlaski@apple.com>
207 * cp-tree.h (do_poplevel): New prototype.
208 * semantics.c (do_poplevel): Make externally visible.
210 2004-09-08 Nathan Sidwell <nathan@codesourcery.com>
212 * cp-tree.h (tree_pair_s): Define a GC'd vector.
213 * name-lookup.h (cxx_saved_binding, cp_class_binding): Likewise.
214 * semantics.c (deferred_access): Likewise.
216 2004-09-06 Daniel Jacobowitz <dan@debian.org>
218 * semantics.c (expand_body): Assert that we are not nested.
220 2004-09-06 Zack Weinberg <zack@codesourcery.com>
222 * decl.c (build_enumerator): Use add_double and int_fits_type_p
223 instead of cp_build_binary_op, to avoid creating short-lived trees.
224 * parser.c (cp_parse_type_specifier <RID_ENUM>): Use two-token
225 lookahead instead of backtracking. Move some code to avoid a
227 (cp_parser_enum_specifier): Avoid duplication of effort with caller.
228 Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
229 (cp_parser_enumerator_list, cp_parser_enumerator_definition):
230 Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
232 2004-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
234 * decl.c (grok_declarator): Remove a redundant semicolon.
236 * parser.c (cp_parser_decl_specifier_seq, cp_parser_type_specifier):
237 Correct comments describing function parameters.
239 2004-09-03 Matt Austern <austern@apple.com>
240 Compile speed improvement.
241 * parser.c (cp_lexer_print_token): Only define if ENABLE_CHECKING set.
242 Otherwise define a stub macro that expands to nothing.
243 (cp_lexer_debugging_p): Only define if ENABLE_CHECKING set. Otherwise
244 define a stub macro that expands to 0.
245 (cp_lexer_start_debugging): Only define if ENABLE_CHECKING set.
246 (cp_lexer_stop_debugging): Likewise.
247 (cp_lexer_debug_stream): Only define if ENABLE_CHECKING set. Otherwise
248 define a stub macro that expands to NULL.
249 (cp_lexer_new_main): Only set debugging_p if ENABLE_CHECKING set.
250 (cp_lexer_new_from_tokens): Likewise.
252 2004-09-03 Jan Hubicka <jh@suse.cz>
254 * decl.c (finish_function): Clean out pointers we no longer need.
256 2004-09-03 Jan Beulich <jbeulich@novell.com>
258 * g++spec.c (MATH_LIBRARY_PROFILE): Default to MATH_LIBRARY rather
261 2004-09-02 Paul Brook <paul@codesourcery.com>
263 * decl2.c (determine_visibility): Only check data visibility
266 2004-08-31 Mark Mitchell <mark@codesourcery.com>
268 * cp-tree.h (DECL_CONSTRUCTION_VTABLE_P): New macro.
269 * class.c (build_ctor_vtbl_group): Set DECL_CONSTRUCTION_VTABLE_P.
270 * decl2.c (determine_visibility): Honor
271 TARGET_CXX_EXPORT_CLASS_DATA.
273 * class.c (key_method): Rename to ...
274 (determine_key_method): ... this.
275 (finish_struct_1): Adjust accordingly.
276 * cp-tree.h (key_method): Declare.
277 * decl2.c (maybe_emit_vtables): Determine the key method here if
278 it has not already been done.
280 2004-08-31 Ziemowit Laski <zlaski@apple.com>
282 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-objcp-common.o.
283 (cp/cp-lang.o): Depend on debug.h, gtype-cp.h and cp/cp-objcp-common.h.
284 (cp/cp-decl.c): Do not depend on gtype-cp.h.
285 (cp/cp-objcp-common.o): New target.
286 * cp-lang.c: Include debug.h, cp-objcp-common.h and gtype-cp.h.
287 (cxx_get_alias_set, cxx_warn_unused_global_decl, cp_expr_size,
288 cp_tree_size, cp_var_mod_type_p, cxx_initialize_diagnostics): Move
289 prototypes and definitions to cp-objcp-common.h and cp-objcp-common.c,
291 (LANG_HOOKS_TREE_SIZE, LANG_HOOKS_FINISH,
292 LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_INIT_OPTIONS,
293 LANG_HOOKS_INITIALIZE_DIAGNOSTICS, LANG_HOOKS_HANDLE_OPTION,
294 LANG_HOOKS_HANDLE_FILENAME, LANG_HOOKS_MISSING_ARGUMENT,
295 LANG_HOOKS_POST_OPTIONS, LANG_HOOKS_GET_ALIAS_SET,
296 LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_EXPAND_EXPR,
297 LANG_HOOKS_EXPAND_DECL, LANG_HOOKS_PARSE_FILE,
298 LANG_HOOKS_DUP_LANG_SPECIFIC_DECL, LANG_HOOKS_TRUTHVALUE_CONVERSION,
299 LANG_HOOKS_SET_DECL_ASSEMBLER_NAME, LANG_HOOKS_MARK_ADDRESSABLE,
300 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
301 LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
302 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_PRINT_ERROR_FUNCTION,
303 LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL, LANG_HOOKS_WRITE_GLOBALS,
304 LANG_HOOKS_FUNCTION_INIT, LANG_HOOKS_FUNCTION_FINAL,
305 LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P,
306 LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE,
307 LANG_HOOKS_ATTRIBUTE_TABLE, LANG_HOOKS_TREE_INLINING_WALK_SUBTREES,
308 LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN,
309 LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS,
310 LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P,
311 LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P,
312 LANG_HOOKS_TREE_INLINING_VAR_MOD_TYPE_P,
313 LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN,
314 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN, LANG_HOOKS_EXPR_SIZE,
315 LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR,
316 LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, LANG_HOOKS_MAKE_TYPE,
317 LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE,
318 LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
319 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE, LANG_HOOKS_INCOMPLETE_TYPE_ERROR,
320 LANG_HOOKS_TYPE_PROMOTES_TO, LANG_HOOKS_REGISTER_BUILTIN_TYPE,
321 LANG_HOOKS_GIMPLIFY_EXPR, LANG_HOOKS_FOLD_OBJ_TYPE_REF): Move
322 hooks to cp-objcp-common.h.
323 (finish_file): New function.
324 * cp-objcp-common.c: New file.
325 * cp-objcp-common.h: New file.
326 * cp-tree.h (cp_finish_file): New prototype.
327 * decl.c: Do not include gtype-cp.h.
328 * decl2.c (finish_file): Rename to cp_finish_file.
330 2004-08-31 Richard Henderson <rth@redhat.com>
333 * pt.c (tsubst_expr): Move OFFSETOF_EXPR handling ...
334 (tsubst_copy_and_build): ... here.
336 2004-08-30 Mark Mitchell <mark@codesourcery.com>
338 * cp-tree.h (initialize_artificial_var): Declare.
339 * decl.c (initialize_artifical_var): New function.
340 * class.c (initialize_array): Remove.
341 (initialize_vtable): Use initialize_artificial_var.
342 (build_vtt): Likewise.
343 (build_ctor_vtbl_group): Likewise.
345 2004-08-30 Richard Henderson <rth@redhat.com>
347 * class.c (build_base_path): Use build_address directly.
348 * typeck.c (build_unary_op): Don't lower &a.b to pointer
350 * typeck2.c (store_init_value): Don't assume !TREE_CONSTANT
351 means !initializer_constant_valid_p.
353 2004-08-30 Richard Henderson <rth@redhat.com>
355 * class.c (fixed_type_or_null): Use get_base_address before
356 assuming an ADDR_EXPR is non-null.
358 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
360 * name-lookup.c (pop_binding, pushdecl,
361 set_identifier_type_value_with_scope, push_overloaded_decl,
362 arg_assoc_type): Replace abort with gcc_assert or gcc_unreachable.
363 * parser.c (cp_parser_diagnose_invalid_type_name,
364 cp_parser_postfix_expression, cp_parser_unary_expression,
365 cp_parser_check_declarator_template_para): Likewise.
366 * pt.c (push_inline_template_parms_recursive,
367 check_explicit_specialization, convert_nontype_argument,
368 coerce_template_template_parms, uses_template_parms,
369 instantiate_class_template, tsubst_decl, tsubst, tsubst_copy,
370 tsubst_expr, instantiate_template,
371 maybe_adjust_types_for_deduction, type_unification_real,
372 resolve_overloaded_unification, template_decl_level,
373 type_dependent_expression_p): Likewise.
374 * search.c (lookup_base_r): Likewise.
375 * semantics.c (finish_stmt_expr, simplify_aggr_init_expr): Likewise.
376 * tree.c (lvalue_p_1, count_functions, cxx_printable_name,
377 verify_stmt_tree_r, get_type_decl, stabilize_call): Likewise.
378 * typeck.c (common_type, get_member_function_from_ptrfunc,
379 build_binary_op, build_unary_op, expand_ptrmemfunc_cst): Likewise.
380 * typeck2.c (cxx_incomplete_type_diagnostic,
381 split_nonconstant_init_1, store_init_value,
382 process_init_constructor): Likewise.
384 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
386 * call.c (check_dtor_name): Replace abort with gcc_assert or
388 (build_call, add_builtin_candidate, build_new_op,
389 convert_like_real, build_over_call, in_charge_arg_for_name,
390 source_type, joust): Likewise.
391 * class.c (build_simple_base_path, get_vcall_index,
392 finish_struct_1, instantiate_type, get_enclosing_class,
393 add_vcall_offset_vtbl_entries_1, cp_fold_obj_type_ref): Likewise.
394 * cp-gimplify.c (cp_genericize): Likewise.
395 * cp-lang.c (cp_expr_size, cp_tree_size): Likewise.
396 * cvt.c (cp_convert_to_pointer, ocp_convert): Likewise.
397 * decl.c (poplevel, make_unbound_class_template, reshape_init,
398 check_special_function_return_type, grokdeclarator,
399 grok_op_properties, tag_name, xref_tag, start_preparsed_function,
400 finish_function): Likewise.
401 * decl2.c (grokfield, maybe_emit_vtables):Likewise.
402 * error.c (dump_global_iord, dump_decl, dump_template_decl,
403 language_to_string): Likewise.
404 * except.c (choose_personality_routine): Likewise.
405 * friend.c (do_friend): Likewise.
406 * g++spec.c (lang_specific_driver): Likewise.
407 * init.c (build_zero_init, expand_default_init, build_new_1,
408 build_vec_delete_1, build_vec_init, build_dtor_call): Likewise.
409 * lex.c (retrofit_lang_decl, cp_type_qual_from_rid): Likewise.
410 * mangle.c (add_substitution, write_unscoped_name,
411 write_template_prefix, write_identifier,
412 write_special_name_destructor, write_type, write_builtin_type,
413 write_expression, write_template_param,
414 write_java_integer_type_codes): Likewise.
415 * method.c (implicitly_declare_fn): Likewise.
417 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
419 * cp-tree.h (BINFO_PRIMARY_P): Use a binfo flag.
420 (BINFO_INDIRECT_PRIMARY_P): Remove.
421 * class.c (determine_primary_base): Rename to ...
422 (determine_primary_bases): ... here. Set all primary bases.
423 (set_primary_base): Remove.
424 (mark_primary_bases): Remove.
425 (build_simple_base_path, walk_subobject_offsets,
426 propagate_binfo_offsets, end_of_class): Adjust.
427 (layout_class_type): Rename determine_primary_base call.
428 (dump_class_hierarchy_r, dump_vtable): Adjust. Don't pass a binfo
430 (dfs_build_secondary_vptr_vtt_inits, dfs_accumulate_vtbl_inits,
431 build_rtti_vtbl_entries): Adjust.
432 * init.c (build_vtbl_address): Adjust.
434 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Use gcc_assert.
436 2004-08-28 Ziemowit Laski <zlaski@apple.com>
438 * Make-lang.in (CXX_OBJS): Split up into CXX_OBJS and
440 (CXX_C_OBJS): Include in CXX_AND_OBJCXX_OBJS instead of listing
441 separately on the link line.
443 2004-08-28 Jason Merrill <jason@redhat.com>
445 * decl.c (expand_static_init): Avoid bogus warnings.
447 2004-08-27 Jason Merrill <jason@redhat.com>
450 * tree.c (stabilize_init): See through a COMPOUND_EXPR.
453 * decl.c (expand_static_init): Use thread-safety API.
454 (register_dtor_fn): Return the call, don't expand it.
455 * tree.c (add_stmt_to_compound): New fn.
456 (stabilize_call): Use it.
458 2004-08-27 Richard Henderson <rth@redhat.com>
460 * cp-tree.def (OFFSETOF_EXPR): New.
461 * parser.c (cp_parser_builtin_offsetof): Either built an
462 OFFSETOF_EXPR, or call fold_offsetof immediately.
463 * pt.c (tsubst_expr): Handle OFFSETOF_EXPR.
465 2004-08-27 Nathan Sidwell <nathan@codesourcery.com>
467 * call.c (validate_conversion_obstack): Replace
468 my_friendly_assert with gcc_assert or gcc_unreachable.
469 (direct_reference_binding, merge_conversion_sequences,
470 build_user_type_conversion_1, perform_overload_resolution,
471 build_op_delete_call, enforce_access, call_builtin_trap,
472 build_over_call, build_special_member_call, build_new_method_call,
473 initialize_reference): Likewise.
474 * class.c (build_base_path, build_primary_vtable, alter_access,
475 check_bases, update_vtable_entry_for_fn, layout_empty_base,
476 clone_function_decl, adjust_clone_args,
477 type_requires_array_cookie, include_empty_classes,
478 finish_struct_1, resolve_address_of_overloaded_function,
479 instantiate_type, get_vtbl_decl_for_binfo, build_vtt_inits,
480 dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
481 accumulate_vtbl_inits, build_vtbl_initializer,
482 build_vbase_offset_vtbl_entries, build_rtti_vtbl_entries): Likewise.
483 * cvt.c (build_up_reference, convert_to_reference): Likewise.
484 * decl.c (poplevel, duplicate_decls, make_typename_type,
485 cxx_init_decl_processing, reshape_init, check_initializer,
486 make_rtl_for_nonlocal_decl, initialize_local_var, cp_finish_decl,
487 expand_static_init, grokfndecl, grokvardecl, build_ptrmem_type,
488 grokdeclarator, copy_fn_p, grok_op_properties, xref_tag,
489 xref_basetypes, start_preparsed_function, save_function_data,
490 finish_function, finish_method, maybe_register_incomplete_var,
491 complete_vars): Likewise.
492 * decl2.c (grok_array_decl, check_member_template,
493 check_classfn, finish_static_data_member_decl, coerce_new_type,
494 coerce_delete_type, import_export_class, decl_needed_p,
495 determine_visibility, import_export_decl, build_cleanup,
496 start_static_initialization_or_destructi, do_static_destruction,
497 prune_vars_needing_no_initialization,
498 build_offset_ref_call_from_tree): Likewise.
499 * error.c (dump_decl, dump_expr): Likewise.
500 * init.c (finish_init_stmts, build_zero_init,
501 expand_virtual_init, expand_default_init, expand_aggr_init_1,
502 build_offset_ref, build_new_1, build_delete, build_vbase_delete):
504 * mangle.c (write_method_parms, write_template_args,
505 write_expression, write_template_arg): Likewise.
506 * method.c (make_thunk, finish_thunk, use_thunk): Likewise.
507 * name-lookup.c (pop_binding, begin_scope, leave_scope,
508 resume_scope, push_using_decl, validate_nonmember_using_decl,
509 is_ancestor, poplevel_class, set_inherited_value_binding_p,
510 push_class_level_binding, do_class_using_decl, push_namespace,
511 pop_namespace, add_using_namespace, ambiguous_decl,
512 lookup_namespace_name, lookup_type_current_level,
513 maybe_process_template_type_declaration): Likewise.
514 * parser.c (cp_lexer_peek_nth_token,
515 cp_parser_parse_and_diagnose_invalid_typ,
516 cp_parser_translation_unit, cp_parser_template_id,
517 cp_parser_lookup_name, cp_parser_late_parsing_for_member): Likewise.
518 * pt.c (push_access_scope, finish_member_template_decl,
519 push_inline_template_parms_recursive, add_outermost_template_args,
520 get_innermost_template_args, begin_explicit_instantiation,
521 end_explicit_instantiation, retrieve_specialization,
522 is_specialization_of, is_specialization_of_friend,
523 register_specialization, check_explicit_specialization,
524 comp_template_parms, process_template_parm,
525 process_partial_specialization, convert_nontype_argument,
526 coerce_template_template_parms, coerce_template_parms,
527 mangle_class_name_for_template, lookup_template_function,
528 lookup_template_class, instantiate_class_template, tsubst_decl,
529 tsubst_function_type, tsubst, tsubst_qualified_id, tsubst_copy,
530 instantiate_template, fn_type_unification, type_unification_real,
531 get_template_base, regenerate_decl_from_template,
532 template_for_substitution, instantiate_decl,
533 get_mostly_instantiated_function_type, dependent_scope_ref_p,
534 value_dependent_expression_p, resolve_typename_type): Likewise.
535 * repo.c (repo_emit_p): Likewise.
536 * rtti.c (build_headof, get_tinfo_decl, get_pseudo_ti_init,
537 create_tinfo_types, emit_tinfo_decl): Likewise.
538 * search.c (lookup_base_r, lookup_base, lookup_field_1,
539 dfs_access_in_type, build_baselink, lookup_member,
540 adjust_result_of_qualified_name_lookup, copied_binfo): Likewise.
541 * semantics.c (perform_or_defer_access_check,
542 finish_non_static_data_member, finish_stmt_expr_expr,
543 finish_stmt_expr, finish_call_expr, finish_pseudo_destructor_expr,
544 finish_template_template_parm, finish_member_declaration,
545 emit_associated_thunks): Likewise.
546 * tree.c (build_target_expr_with_type, force_target_expr,
547 copy_binfo, get_first_fn, cp_tree_equal): Likewise.
548 * typeck.c (type_after_usual_arithmetic_conversions, comptypes,
549 cxx_sizeof_or_alignof_type, perform_integral_promotions,
550 build_class_member_access_expr, finish_class_member_access_expr,
551 build_ptrmemfunc_access_expr, build_unary_op,
552 unary_complex_lvalue, cxx_mark_addressable, build_modify_expr,
553 build_ptrmemfunc, expand_ptrmemfunc_cst, check_return_expr
554 * typeck2.c (complete_type_check_abstract,
555 abstract_virtuals_error, process_init_constructor,
556 add_exception_specifier): Likewise.
558 2004-08-27 Nathan Sidwell <nathan@codesourcery.com>
560 * class.c (build_vtbl_initializer): Use ssize_int.
561 * decl.c (complete_array_type): Likewise.
562 * method.c (finish_thunk): Likewise.
563 * search.c (get_dynamic_base_type): Likewise.
565 2004-08-26 Richard Henderson <rth@redhat.com>
567 * cp-tree.h (DECL_FIELD_IS_BASE): New.
568 * class.c (build_base_field): Set it.
569 (build_simple_base_path): Use it.
570 (fixed_type_or_null): Don't consider base fields definitive.
572 2004-08-25 Roger Sayle <roger@eyesopen.com>
575 PR tree-optimization/16372
576 * decl.c (finish_enum): Make the precision of the enumerated type
577 the same width as the underlying integer type.
579 2004-08-25 Mark Mitchell <mark@codesourcery.com>
582 * lex.c (build_lang_decl): Set DECL_NO_STATIC_CHAIN for all C++
585 * mangle.c (get_identifier_nocopy): Add cast.
587 * cp-tree.h (mangle_type): Remove.
588 * mangle.c (globals): GTY it.
589 (mangle_obstack): New variable.
590 (name_obstack): Likewise.
591 (name_base): Likewise.
592 (write_char): Adjust accordingly.
593 (write_chars): Likewise.
594 (write_string): Likewise.
595 (start_mangling): Initialize G.substitutions only one. Add
597 (finish_mangling): Use VARRAY_CLEAR to reclaim
598 storage in G.substitutions. Use obstack_finish.
599 (init_mangle): Adjust for changes to variable names above.
600 Initialize G.substitutions.
601 (mangle_decl_string): Adjust call to start_mangling.
602 (get_identifier_nocopy): New function.
603 (mangle_decl): Use it.
604 (mangle_type_string): Adjust call to start_mangling.
605 (mangle_special_for_type): Likewise.
606 (mangle_vtt_for_type): Likewise.
607 (mangle_ctor_vtbl_for_type): Likewise.
608 (mangle_thunk): Likewise.
609 (mangle_guard_variable): Likewise.
610 (mangle_ref_init_variable): Likewise.
612 2004-08-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
615 * pt.c (redeclare_class_template): Check the type of non-type and
616 template template parameter.
618 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
620 * call.c (convert_class_to_reference): Adjust build_int_cst calls.
621 (build_user_type_conversion_1, convert_like_real,
622 build_java_interface_fn_ref, build_special_member_call): Likewise.
623 * class.c (finish_struct_1, build_vtbl_initializer): Likewise.
624 * cp-gimplify.c (cp_gimplify_expr): Likewise.
625 * cvt.c (cp_convert_to_pointer): Likewise.
626 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
627 * decl2.c (start_static_initialization_or_destruction,
628 generate_ctor_or_dtor_function): Likewise.
629 * except.c (build_throw): Likewise.
630 * mangle.c (write_integer_cst): Likewise.
631 * method.c (finish_thunk): Likewise.
632 * rtti.c (build_headof, get_tinfo_decl_dynamic,
633 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
634 get_pseudo_ti_init): Likewise.
635 * search.c (get_dynamic_cast_base_type): Likewise.
637 2004-08-25 Zack Weinberg <zack@codesourcery.com>
639 * class.c, search.c: Remove references to DWARF_DEBUG.
641 2004-08-25 Adam Nemet <anemet@lnxw.com>
643 * repo.c (extract_string): Reset backquote after one character.
644 (get_base_filename): Fix indentation.
646 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
648 * decl.c (cxx_init_decl_processing): Adjust
649 build_common_tree_nodes call.
651 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
654 * (is_subobject_of_p): Resurrect & optimize.
655 (lookup_field_r): Use it.
657 2004-08-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
660 * search.c (friend_accessible_p): Increment processing_template_decl
661 when deal with TEMPLATE_DECL of SCOPE.
663 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
666 * semantics.c (check_accessibility_of_qualified_id): Defer check
667 if qualifying_type is a template parameter.
669 2004-08-23 Mark Mitchell <mark@codesourcery.com>
672 * pt.c (instantiate_decl): Do not try to apply
673 DECL_DECLARED_INLINED_P to a VAR_DECL.
675 * search.c (build_baselink): Fix typo in comment.
677 2004-08-22 Andrew Pinski <apinski@apple.com>
680 2004-08-22 Andrew Pinski <apinski@apple.com>
682 * typeck.c (build_unary_op): Use &a.b if the folded lowered
683 expression is not constant.
685 2004-08-23 Nathan Sidwell <nathan@codesourcery.com>
687 * name-lookup.c (pushdecl): Rename build_type_copy call.
688 * tree.c (cp_build_qualified_type_real,
689 build_exception_variant, handle_java_interface_attribute): Likewise.
691 2004-08-22 Andrew Pinski <apinski@apple.com>
694 * typeck.c (build_unary_op): Use &a.b if the folded lowered
695 expression is not constant.
697 2004-08-20 Mark Mitchell <mark@codesourcery.com>
700 * decl.c (expand_static_init): Use DECL_FUNCTION_SCOPE_P.
702 2004-08-21 Joseph S. Myers <jsm@polyomino.org.uk>
705 * pt.c (tsubst_copy_and_build): Avoid clearing TREE_NO_WARNING for
708 2004-08-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
710 * pt.c (register_specialization): Check DECL_TEMPLATE_SPECIALIZATION
711 before calling comp_template_args.
713 2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
715 * class.c (build_vtbl_initializer): Use build_int_cst for
717 * decl.c (complete_array_type): Likewise.
718 * method.c (finish_thunk): Likewise.
720 2004-08-20 Andreas Tobler <a.tobler@schweiz.ch>
722 * tree.c: Remove unused mark_local_for_remap_r.
724 2004-08-19 Eric Christopher <echristo@redhat.com>
726 * cp-tree.h (cxx_unsave_expr_now): Delete prototype.
727 * tree.c (cxx_unsave_expr_now): Delete.
728 (cp_unsave_r): Ditto.
730 2004-08-19 Mark Mitchell <mark@codesourcery.com>
733 * pt.c (push_template_decl_real): Disallow template allocation
734 functions with fewer than two parameters.
736 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
738 * cp-tree.h (build_shared_int_cst): Remove.
739 * tree.c (shared_int_cache): Remove.
740 (build_shared_int_cst): Remove.
741 * class.c (finish_struct_1): Use build_int_cst.
743 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
745 * decl.c (finish_enum): Do not copy value node early, copy
747 * lex.c (cxx_init): Force null_node to be unique.
749 2004-08-19 Joseph S. Myers <jsm@polyomino.org.uk>
752 * pt.c (tsubst_copy, tsubst_copy_and_build): Copy TREE_NO_WARNING
753 from input for MODOP_EXPR.
755 2004-08-18 Mark Mitchell <mark@codesourcery.com>
757 * pt.c (dependent_template_p): Fix typo in commment.
760 * pt.c (dependent_template_p): Treat IDENTIFIER_NODEs as
763 2004-08-17 Mark Mitchell <mark@codesourcery.com>
766 * pt.c (unify): Tidy ARRAY_TYPE handling. Make sure that non-type
767 arguments have the same type as the corresponding parameter.
770 * parser.c (cp_parser_name_lookup_error): If parser->object_scope
771 is set use it for diagnostic purposes.
772 (cp_parser_pseudo_destructor_name): Remove special-case error
776 * semantics.c (expand_or_defer_fn): Honor -fkeep-inline-functions.
779 * cp-tree.h (qualified_name_lookup_error): Add parameter.
780 * name-lookup.c (do_class_using_decl): Restrict set of entities
781 passed to cp_emit_debug_info_for_using more carefully.
782 (lookup_qualified_name): Allow lookup_member to return sets of
784 * parser.c (cp_parser_lookup_name): Add ambiguous_p parameter.
785 (cp_parser_primary_expression): Handle ambiguous lookups.
786 (cp_parser_template_name): Adjust use of cp_parser_lookup_name.
787 (cp_parser_template_argument): Likewise.
788 (cp_parser_elaborate_type_specifier): Likewise.
789 (cp_parser_namespace_name): Likewise.
790 (cp_parser_class_name): Likewise.
791 (cp_parser_lookup_name_simple): Likewise.
792 * pt.c (tsubst_qualified_id): Handle ambiguous results.
793 (tsubst_expr): Likewise.
794 * semantics.c (qualified_name_lookup_error): Add decl paramter.
795 For ambiguous lookups, print candidates.
797 2004-08-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
800 * pt.c (instantiate_pending_templates): Add int parameter. Don't
802 * cp-tree.h (instantiate_pending_templates): Adjust prototype.
803 * decl2.c (finish_file): Adjust call to
804 instantiate_pending_templates.
806 2004-08-15 Roger Sayle <roger@eyesopen.com>
808 * call.c (build_vfield_ref, build_call, build_conditional_expr,
809 convert_arg_to_ellipsis, build_x_va_arg, build_over_call,
810 build_java_interface_fn_ref, build_special_member_call,
811 build_new_method_call, initialize_reference): Replace calls to
812 build with calls to buildN.
813 * class.c (build_base_path, convert_to_base_statically,
814 build_vfn_ref, instantiate_type, dfs_accumulate_vtbl_inits,
815 build_vtbl_initializer): Likewise.
816 * cp-gimplify.c (genericize_try_block, genericize_catch_block,
817 gimplify_if_stmt, cp_genericize_r): Likewise.
818 * cvt.c (convert_to_void): Likewise.
819 * decl.c (check_initializer, finish_constructor_body,
820 finish_destructor_body): Likewise.
821 * error.c (dump_expr): Likewise.
822 * except.c (build_exc_ptr, expand_start_catch_block, build_throw):
824 * init.c (perform_member_init, expand_virtual_init,
825 expand_cleanup_for_base, build_init, expand_default_init,
826 build_offset_ref, decl_constant_value, build_new, build_new_1,
827 build_vec_delete_1, build_vec_init, build_delete,
828 push_base_cleanups, build_vec_delete): Likewise.
829 * mangle.c (write_integer_cst): Likewise.
830 * method.c (thunk_adjust, do_build_copy_constructor,
831 do_build_assign_ref): Likewise.
832 * pt.c (lookup_template_function, tsubst, tsubst_copy_and_build,
833 unify, build_non_dependent_expr): Likewise.
834 * rtti.c (build_headof, build_typeid, ifnonnull,
835 build_dyanmic_cast_1, tinfo_base_init): Likewise.
836 * semantics.c (begin_compound_stmt, finish_call_expr,
837 finish_pseudo_destructor_expr, finish_id_expression,
838 simplify_aggr_init_expr, finalize_nrv_r): Likewise.
839 * tree.c (build_target_expr, build_cplus_new, array_type_nelts_top,
840 array_type_nelts_total, stabilize_call): Likewise.
841 * typeck.c (decay_conversion, build_class_member_access_expr,
842 lookup_destructor, build_ptrmemfunc_access_expr, build_array_ref,
843 get_member_function_from_ptrfunc, build_binary_op, pointer_diff,
844 build_x_unary_op, build_unary_op, unary_complex_lvalue,
845 build_compound_expr, build_modify_expr, expand_ptrmemfunc_cst,
846 check_return_expr): Likewise.
847 * typeck2.c (split_nonconstant_1, split_nonconstant_init_1,
848 split_nonconstant_init, store_init_value, build_m_component_ref):
851 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
853 * call.c (convert_class_to_reference,
854 build_user_type_conversion_1, convert_like_real,
855 build_java_interface_fn_ref, build_special_member_call): Use
857 * class.c (build_vtbl_initializer): Likewise.
858 * cp-gimplify.c (cp_gimplify_expr): Likewise.
859 * cvt.c (cp_convert_to_pointer): Likewise.
860 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
861 * decl2.c (start_static_initialization_or_destruction,
862 generate_ctor_or_dtor_function): Likewise.
863 * except.c (build_throw): Likewise.
864 * lex.c (cxx_init): Likewise.
865 * mangle.c (write_integer_cst): Likewise.
866 * rtti.c (build_headof, get_tinfo_decl_dynamic,
867 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
868 get_pseudo_ti_init): Likewise.
869 * search.c (get_dynamic_cast_base_type): Likewise.
870 * tree.c (build_shared_int_cst): Likewise.
872 2004-08-12 Mark Mitchell <mark@codesourcery.com>
875 * class.c (count_depth_data): New type.
876 (dfs_depth_post): New function.
877 (dfs_depth_q): Likewise.
878 (find_final_overrider_data_s): Change type of vpath.
880 (dfs_find_final_overrider_1): New function.
881 (dfs_find_final_overrider): Use it.
882 (dfs_find_final_overrider_q): Adjust use of vpath.
883 (dfs_find_final_overrider_post): Likewise.
884 (find_final_overrider): Use dfs_depth. Allocate and deallocate
887 2004-08-12 Jan Beulich <jbeulich@novell.com>
889 * parser.c (cp_parser_asm_definition): Properly consume scope operator
890 tokens preceding the clobbers. Don't check for scope operator
891 following inputs. Simplify inputs handling to match that now used for
894 2004-08-11 Mark Mitchell <mark@codesourcery.com>
897 * except.c (build_throw): Allocate cleanup_type and the function
898 for __cxa_throw separately.
901 * call.c (standard_conversion): Do not accept conversions between
902 pointers to members if the class types are unrelated.
905 * parser.c (cp_parser_builtin_offsetof): Cast to "const volatile
906 char &" instead of just "char &".
909 * pt.c (tsubst): Just return the unknown_type_node.
911 2004-08-11 Mark Mitchell <mark@codesourcery.com>
914 * parser.c (cp_parser_class_specifier): Robustify.
917 * pt.c (tsubst_copy_and_build): Complain about invalid
921 * pt.c (tsubst_default_argument): Clear out current_class_ptr and
922 current_class_ref while tsubsting.
924 2004-08-10 Mark Mitchell <mark@codesourcery.com>
927 * parser.c (cp_parser_init_declarator): Robustify.
929 2004-08-06 Richard Sandiford <rsandifo@redhat.com>
931 * typeck2.c (process_init_constructor): Guard the missing field warning
932 with warn_missing_field_initializers rather than extra_warnings.
934 2004-08-06 Paolo Bonzini <bonzini@gnu.org>
936 * class.c (instantiate_type) <ENTRY_VALUE_EXPR>: Do not handle.
938 2004-08-05 Mark Mitchell <mark@codesourcery.com>
940 * decl.c (start_preparsed_function): Move determine_visibility
942 * decl2.c (determine_visibility): Incorporate dllexport testing.
944 2004-08-05 Geoffrey Keating <geoffk@apple.com>
946 * g++spec.c (lang_specific_driver): An -Xlinker or -Wl, option
947 means that libstdc++ is needed.
949 2004-08-05 Nathan Sidwell <nathan@codesourcery.com>
951 * cvt.c (cp_convert_to_pointer): Adjust force_fit_type call.
953 2004-08-04 Geoffrey Keating <geoffk@apple.com>
955 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_ASSEMBLER_NAME rather
956 than passing it as a parameter to rest_of_decl_compilation.
957 * decl2.c (grokfield): Use set_user_assembler_name.
959 2004-08-04 Nathan Sidwell <nathan@codesourcery.com>
961 * decl.c (complete_array_type): Don't gratuitously copy
962 maxindex. Its type is always set.
964 2004-08-04 Paul Brook <paul@codesourcery.com>
966 * Make-lang.in (cp/semantics.o, cp/optimize.o): Depend on TARGET_H.
967 * cp-tree.h (struct language_function): Rename x_dtor_label to
969 (dtor_label): Rename ...
970 (cdtor_label): ... to this.
971 * decl.c (begin_constructor_body): Remove.
972 (check_special_function_return_type): Maybe change the return type.
973 (grokdeclarator): Pass the class type.
974 (start_preparsed_function): Constructors may need a return label.
975 (finish_constructor_body, finish_destructor_body): Set the return
977 (begin_function_body): Don't call begin_constructor_body.
978 (finish_function): Don't warn for constructors or destructors.
979 (implicitly_declare_fn): Maybe change the return type.
980 * optimize.c: Include target.h.
981 (maybe_clone_body): Remap the function result.
982 * semantics.c: Include target.h.
983 (finish_return_stmt): Maybe jump to return label for constructors.
985 2004-08-03 Mark Mitchell <mark@codesourcery.com>
987 * class.c (build_vtable): Do not set DECL_VISIBILITY here.
988 (check_field_decls): Or here.
989 (check_methods): Or here.
990 (initialize_array): Don't mess with DECL_CONTEXT.
991 * cp-tree.h (start_decl): Adjust prototype.
992 (determine_visibility): New function.
993 * decl.c (duplicate_decls): Remove checks for hidden "operator
995 (build_library_fn_1): Give all library functions default
997 (start_decl): Add pop_scope_p parameter. Tidy.
998 (cp_finish_decl): Do not pop scopes here. Call
999 determine_visibility for variable definitions.
1000 (start_preparsed_function): Call determine_visibility.
1001 * decl2.c (determine_visibility): New function.
1002 * method.c (use_thunk): Fix formatting.
1003 * parser.c (cp_parser_condition): Adjust calls to start_decl.
1004 (cp_parser_init_declarator): Likewise.
1005 * pt.c (instantiate_decl): Always call pop_nested_class.
1006 * rtti.c (get_tinfo_decl): Do not set DECL_VISIBILITY.
1007 (tinfo_base_init): Likewise.
1009 2004-08-02 Mark Mitchell <mark@codesourcery.com>
1012 * name-lookup.c (validate_nonmember_using_decl): Robustify.
1014 2004-08-01 Mark Mitchell <mark@codesourcery.com>
1017 * name-lookup.c (decl_namespace): Remove.
1018 (current_decl_namespace): Use decl_namespace_context instead of
1020 (push_decl_namespace): Likewise.
1021 (arg_assoc_class): Likewise.
1022 (arg_assoc_type): Likewise.
1023 * pt.c (check_specialization_namespace): New function.
1024 (maybe_process_partial_specialization): Use it.
1025 (register_specialization): Likewise.
1028 * cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): New macro.
1029 * call.c (null_ptr_cst_p): Handle variables with constant
1031 * pt.c (convert_nontype_argument): Use
1032 DECL_INTEGRAL_CONSTANT_VAR_P.
1033 * semantics.c (finish_id_expression): Likewise.
1036 * decl.c (duplicate_decls): Reject duplicate namespace
1040 * typeck.c (build_ptrmemfunc): Loosen assertion.
1042 2004-08-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
1044 * call.c (z_candidate::template_decl): Rename from template.
1045 (add_template_candidate_real): Adjust member reference.
1048 2004-07-29 Mark Mitchell <mark@codesourcery.com>
1050 * cp-tree.h (IDENTIFIER_REPO_CHOSEN): Define.
1051 (lang_decl_flags): Narrow the width of "languages". Add
1053 (DECL_NEEDED_P): Remove.
1054 (FOR_EACH_CLONE): New macro.
1055 (DECL_REPO_AVAILABLE_P): Likewise.
1056 (DECL_TINFO_P): Likewise.
1057 (set_linkage_according_to_type): Declare.
1058 (import_export_vtable): Remove.
1059 (import_export_tinfo): Likewise.
1060 (mark_needed): New function.
1061 (decl_needed_p): Likewise.
1062 (note_vauge_linkage_fn): Likewise.
1063 (init_repo): Change prototype.
1064 (repo_template_used): Remove.
1065 (repo_template_instantiated): Likewise.
1066 (repo_emit_p): New function.
1067 (repo_export_class_p): Likewise.
1068 (no_linkage_check): Change prototype.
1069 * class.c (set_linkage_according_to_type): New function.
1070 (build_vtable): Use it. Do not call import_export_vtable. Set
1071 DECL_IGNORED_P if appropriate.
1072 * decl.c (duplicate_decls): Preserve DECL_REPO_AVAILABLE_P.
1073 (make_rtL_for_nonlocal_decls): Check for template instantiations
1075 (grokfndecl): Adjust call to no_linkage_check.
1076 (set_linkage_for_static_data_member): New function.
1077 (grokvardecl): Use it. Adjust call to no_linkage_check.
1078 (grokdeclarator): Use set_linkage_for_static_data_member.
1079 * decl2.c (note_vague_linkage_fn): New function.
1080 (note_vague_linkage_var): Likewise.
1081 (finish_static_data_member_decl): Use it.
1082 (import_export_vtable): Remove.
1083 (import_export_class): Use repo_export_class_p.
1084 (var_finalized_p): Simplify.
1085 (maybe_emit_vtables): Simplify.
1086 (mark_needed): New function.
1087 (decl_needed_p): Likewise.
1088 (import_export_decl): Add documentation and consistency checks.
1089 Use repo_emit_p. Handle virtual tables and RTTI information
1091 (import_export_tinfo): Remove.
1092 (write_out_vars): Call import_export_decl.
1093 (cxx_callgraph_analyze_expr): Ensure that all vtables are emitted
1095 (finish_file): Use decl_needed_p. Do not call import_export_decl
1096 for undefined static data members. Do not warn about undefined
1097 inlines when using a repository.
1098 (mark_used): Use note_vague_linkage_fn. Always defer template
1100 * lex.c (cxx_init): Adjust call to init_repo. Always set
1101 flag_unit_at_a-time.
1102 * method.c (synthesize_method): Remove unncessary
1103 import_export_decl call.
1104 (implicitly_declare_fn): Use set_linkage_according_to_type.
1105 * optimize.c (maybe_clone_body): Use FOR_EACH_CLONE.
1106 * pt.c (instantiate_class_template): Don't redundantly add classes
1107 to keyed_classes. Don't call repo_template_used.
1108 (tsubst_decl): Set DECL_INTERFACE_KNOWN for instantiations of
1109 templates with internal linkage.
1110 (check_instantiated_args): Adjust call to no_linkage_check.
1111 (instantiate_template): Use FOR_EACH_CLONE.
1112 (mark_definable): New function.
1113 (mark_decl_instantiated): Use it.
1114 (do_decl_instantiation): Adjust tests for explicit instantiation
1115 after "extern template".
1116 (instantiate_class_member): Do not use repo_template_instantiated.
1117 (do_type_instantiation): Simplify.
1118 (instantiate_decl): Use mark_definable. Check repo_emit_p.
1120 * repo.c (repo_get_id): Remove.
1121 (original_repo): Remove.
1122 (IDENTIFIER_REPO_USED): Remove.
1123 (IDENTIFIER_REPO_CHOSEN): Remove.
1124 Remove all #if 0'd code.
1125 (repo_template_used): Remove.
1126 (repo_template_instantiated): Remove.
1127 (temporary_obstack_initialized_p): New variable.
1128 (init_repo): Register with lang_post_pch_load. Avoid creating
1129 identifiers unnecessarily. Don't use original_repo. Close the
1131 (reopen_repo_file_for_write): Not here.
1132 (finish_repo): Always write out a new repository file.
1133 (repo_emit_p): New function.
1134 (repo_export_class_p): Likewise.
1135 * rtti.c (get_tinfo_decl): Use set_linkage_according_to_type.
1136 (involves_incomplete_p): New function.
1137 (tinfo_base_init): Use it.
1138 (ptr_initializer): Remove non_public_ptr parameter.
1139 (ptm_initializer): Likewise.
1140 (get_pseudo_ti_init): Likewise.
1141 (unemitted_tinfo_decl_p): Remove.
1142 (emit_tinfo_decl): Use import_export_decl.
1143 * semantics.c (expand_body): Move updates of static_ctors and
1145 (expand_or_defer_fn): ... here.
1146 * tree.c (no_linkage_check): Add relaxed_p parameter.
1148 2004-07-28 Eric Christopher <echristo@redhat.com>
1150 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
1152 2004-07-28 Nathan Sidwell <nathan@codesourcery.com>
1154 * cp-tree.h (struct tree_pair_s): New.
1155 (typedef tree_pair_p): New.
1156 (DEF_VEC_O(tree_pair_s)): New.
1157 (struct lang_type_class): Make vcall_indices a VEC(tree_pair_s).
1158 (CLASSTYPE_VCALL_INDICES): Update documentation.
1159 * class.c (get_vcall_index): Adjust.
1160 (add_vcall_offset): Adjust.
1162 2004-07-27 Kelley Cook <kcook@gcc.gnu.org>
1164 * pt.c, typeck.c: Remove spurious carriage returns.
1166 2004-07-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1169 * pt.c (coerce_template_template_parms) <PARM_DECL case>: Only check
1170 when the type of ARG is not dependent.
1172 2004-07-26 Geoffrey Keating <geoffk@apple.com>
1174 * g++spec.c (LIBSTDCXX_PROFILE): Default to LIBSTDCXX.
1175 (lang_specific_driver): If the C++ or math library options don't
1176 start with '-l', don't count them as added libraries.
1178 2004-07-26 Nathan Sidwell <nathan@codesourcery.com>
1180 * decl.c (xref_basetypes): Adjust base access vector creation.
1181 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Adjust base
1183 * search.c (dynamic_cast_base_recurse, dfs_access_in_type): Likewise.
1185 2004-07-26 Niall Douglas <s_fsfeurope2@nedprod.com>
1186 Brian Ryner <bryner@brianryner.com>
1190 * class.c (check_field_decls): Apply hidden visibility if
1191 -fvisibility-inlines-hidden and inlined unless otherwise specified
1192 (build_vtable): Set vtable visibility to class visibility.
1193 (check_field_decls): Default static member visibility to class
1195 (check_methods): Default method visibility to class visibility.
1196 * cp-tree.h: Added CLASSTYPE_VISIBILITY and
1197 CLASSTYPE_VISIBILITY_SPECIFIED macro.
1198 * decl.c (duplicate_decls): New logic for merging definition decls
1199 with declaration decls. Added ignore & warning when non default
1200 applied to global operator new or delete.
1201 * method.c, optimize.c, rtti.c: Added setting of VISIBILITY_SPECIFIED
1202 wherever VISIBILITY was changed
1203 * rtti.c (get_tinfo_decl): Set typeinfo visibility to class
1205 (tinfo_base_init): Set typeinfo name visibility to class visibility.
1207 2004-07-25 Bernardo Innocenti <bernie@develer.com>
1209 * decl.c: Rename all identifiers named `class' to `cl'.
1210 * cp-tree.h: Likewise.
1212 2004-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
1214 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Use GGC_CNEW.
1215 * typeck2.c (abstract_virtuals_error): Use GGC_NEW.
1216 * name-lookup.c (binding_entry_make): Use GGC_NEW.
1217 (binding_table_construct): Use GGC_CNEWVEC.
1218 (binding_table_new): Use GGC_NEW.
1219 (cxx_binding_make): Likewise.
1220 (begin_scope): Likewise.
1221 (push_to_top_level): Use GCC_CNEW.
1222 * parser.c (cp_token_cache_new): Likewise.
1223 (cp_token_cache_push_token): Likewise.
1224 (cp_lexer_new_main): Likewise.
1225 (cp_lexer_new_from_tokens): Likewise.
1226 (cp_parser_context_new): Likewise.
1227 (cp_parser_new): Likewise.
1228 (cp_lexer_new_from_tokens): Use GGC_NEWVEC.
1229 * lex.c (cxx_make_type): Use GGC_CNEW.
1230 (retrofit_lang_decl): Use GGC_NEWVAR.
1231 (cxx_dup_lang_specific_decl): Likewise.
1232 (copy_lang_type): Likewise.
1233 * decl.c (use_label): Use GGC_NEW instead of ggc_alloc.
1234 (save_function_data): Likewise.
1235 (lookup_label): Use GGC_CNEW instead of ggc_alloc_cleared.
1236 (cxx_push_function_context): Likewise.
1238 2004-07-25 Richard Henderson <rth@redhat.com>
1240 * decl.c (start_preparsed_function): Set DECL_ARTIFICIAL and
1241 DECL_IGNORED_P on RESULT_DECL.
1242 * semantics.c (finalize_nrv): Copy them too.
1244 2004-07-23 Nathan Sidwell <nathan@codesourcery.com>
1246 * search.c (lookup_conversion_operator): Avoid two loops.
1247 (add_conversions): Remove.
1248 (check_hidden_convs, split_conversions,
1249 lookup_conversions_r): New.
1250 (lookup_conversions): Use lookup_conversions_r.
1252 2004-07-22 Nathan Sidwell <nathan@codesourcery.com>
1254 * pt.c (get_template_base): Check type is completable.
1256 2004-07-21 Eric Christopher <echristo@redhat.com>
1258 * decl.c (poplevel): Inline unused variable checking.
1261 2004-07-21 Paolo Bonzini <bonzini@gnu.org>
1263 * typeck.c (build_binary_op): Do not use RDIV_EXPR for
1266 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1269 * pt.c (check_explicit_specialization): Remove extension to accept
1270 specializations without template headers. Fall-through to normal
1273 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1276 * pt.c (determine_specialization): New parameter template_count.
1277 Disambiguate between member templates and member functions counting
1278 the template headers.
1279 (check_explicit_specialization): Update caller.
1280 (tsubst_friend_function): Likewise.
1282 2004-07-20 Steven Bosscher <stevenb@suse.de>
1284 * cp-tree.def (TINST_LEVEL): Make it an 'x' node.
1285 * cp-tree.h (tinst_level_t): New tree type.
1286 (union lang_tree_node): Handle it.
1287 (TINST_LOCATION): New accessor macro.
1288 (make_tinst_level): New prototype.
1289 * cp-lang.c (cp_tree_size): Handle TINST_LEVEL.
1290 * decl.c (cp_tree_node_structure): Likewise.
1291 * error.c (print_instantiation_full_context): Use TINST_LOCATION.
1292 (print_instantiation_partial_context): Likewise.
1293 * pt.c (pop_tinst_level): Likewise.
1294 (push_tinst_level): Use make_tinst_level.
1295 * tree.c (make_tinst_level): New function.
1296 (cp_walk_subtrees): Walk TINST_DECL for a TINST_LEVEL node.
1298 2004-07-20 Mark Mitchell <mark@codesourcery.com>
1300 * parser.c (cp_parser_simple_type_specifier): Fix typo.
1303 * parser.c (cp_parser_simple_type_specifier): Do not record usage
1304 of globally-qualified names.
1306 2004-07-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1309 * error.c (dump_type) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Output
1312 2004-07-19 Mark Mitchell <mark@codesourcery.com>
1315 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
1316 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
1317 * class.c (add_implicitly_declared_members): Use
1318 CLASSTYPE_LAZY_ASSIGNMENT_OP.
1319 * method.c (lazily_declare_fn): Clear
1320 CLASSTYPE_LAZY_ASSIGNMENT_OP.
1321 * search.c (lookup_fnfields_1): Check it.
1323 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
1325 * cp-tree.h (vec_binfo_member): Remove.
1326 * tree.c (vec_binfo_member): Remove.
1328 * cp-tree.h (struct lang_type_class): Remove vfields field.
1329 (CLASSTYPE_VFIELDS): Remove.
1330 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
1331 * class.c (determine_primary_base): Remove CLASSTYPE_VFIELDS
1333 (dfs_modify_vtables): Use TYPE_CONTAINS_VPTR_P.
1334 (finish_struct_1): Remove CLASSTYPE_VFIELDS handling.
1335 * init.c (dfs_initialize_vtbl_ptrs): Use TYPE_CONTAINS_VPTR_P.
1337 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
1339 * cp-tree.h (DEF_VEC_P(tree)): Remove here.
1340 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
1342 (BINFO_LANG_SLOTS): Remove.
1343 * tree.c (copy_binfo): Adjust BINFO creation and accessors.
1344 * decl.c (xref_basetypes): Adjust BINFO creation and accessors.
1345 * class.c (check_bases): Adjust BINFO accessors.
1346 (determine_primary_base, finish_struct_bits,
1347 maybe_warn_about_overly_private_class, warn_hidden,
1348 walk_subobject_offsets, propagate_binfo_offsets, end_of_class,
1349 warn_about_ambiguous_bases, get_vfield_name,
1350 dump_class_hierarchy_r, build_vtt_inits, accumulate_vtbl_inits,
1351 add_vcall_offset_vtbl_entries_r): Likewise.
1352 * dump.c (cp_dump_tree): Likewise.
1353 * init.c (sort_mem_initializers, expand_member_init, build_delete,
1354 push_base_cleanups): Likewise.
1355 * method.c (do_build_copy_constructor, do_build_assign_ref,
1356 synthesize_exception_spec): Likewise.
1357 name-lookup.c (arg_assoc_class): Likewise.
1358 * pt.c (instantiate_class_template,
1359 get_template_base_recursive): Likewise.
1360 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Likewise.
1361 * typeck2.c (process_init_constructor): Likewise.
1362 * search.c (lookup_base_r, dynamic_cast_base_recurse,
1363 dfs_access_in_type, dfs_walk_real, look_for_overrides,
1364 types_overlap_p, copied_binfo, original_binfo): Likewise.
1365 (binfo_for_vtable): Remove
1367 2004-07-20 Steven Bosscher <stevenb@suse.de>
1369 * cp-tree.h (struct lang_decl_flags): Unify the template_info and
1370 thunk_alias, and the access and virtual_offset fields.
1371 (THUNK_VIRTUAL_OFFSET, THUNK_ALIAS): Adjust.
1372 * decl.c (finish_case_label): Update c_add_case_node call.
1374 2004-07-19 Mark Mitchell <mark@codesourcery.com>
1376 Revert patch for PR c++/16623.
1378 2004-07-19 Kelley Cook <kcook@gcc.gnu.org>
1380 * except.c: Remove two spurious carriage returns.
1382 2004-07-19 Mark Mitchell <mark@codesourcery.com>
1385 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
1386 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
1387 * class.c (add_implicitly_declared_members): Use
1388 CLASSTYPE_LAZY_ASSIGNMENT_OP.
1389 * method.c (lazily_declare_fn): Clear
1390 CLASSTYPE_LAZY_ASSIGNMENT_OP.
1391 * search.c (lookup_fnfields_1): Check it.
1393 2004-07-19 Nathan Sidwell <nathan@codesourcery.com>
1395 * class.c (add_method): Delay adding the slot until the end.
1396 (determine_primary_base): Adjust VEC_iterate invokation.
1397 (resort_type_method_vec, finish_struct_methods, warn_hidden,
1398 walk_subobject_offsets, end_of_class, warn_about_ambiguous_bases,
1399 build_vtbl_initializer): Likewise.
1400 * init.c (sort_mem_initializers, build_delete, push_base_cleanups,
1401 build_vbase_delete): Likewise.
1402 * method.c (do_build_copy_constructor): Likewise.
1403 * name-lookup.c (new_class_binding, print_binding_level,
1404 poplevel_class, store_class_bindings, push_to_top_level,
1405 pop_from_top_level): Likewise.
1406 * pt.c (check_explicit_specialization): Likewise.
1407 * search.c (lookup_conversion_operator, lookup_fnfields_1,
1408 get_pure_virtuals, add_conversions, dfs_check_overlap,
1409 binfo_for_vbase): Likewise.
1411 2004-07-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1414 * pt.c (unify) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Use only
1415 innermost set of template arguments during deduction. Simplify.
1417 2004-07-19 Joseph S. Myers <jsm@polyomino.org.uk>
1419 * typeck.c (build_modify_expr, build_x_modify_expr): Set
1420 TREE_NO_WARNING on assignments with an operator other than '='.
1422 2004-07-10 Steven Bosscher <stevenb@suse.de>
1423 Joseph S. Myers <jsm@polyomino.org.uk>
1425 * cp-tree.h (C_SET_EXP_ORIGINAL_CODE): Remove.
1426 * decl2.c (grokfield): Don't check current_class_depth via
1427 unused TREE_COMPLEXITY.
1428 * semantics.c (finish_parenthesized_expr): Set TREE_NO_WARNING
1429 to avoid the missing parentheses warning.
1430 Don't set C_SET_EXP_ORIGINAL_CODE.
1432 2004-07-18 Mark Mitchell <mark@codesourcery.com>
1434 * tree.c (no_linkage_helper): Remove.
1435 (no_linkage_check): Don't use walk_tree_without_duplicates.
1437 * mangle.c (write_expression): Issue a sorry for zero-operand
1440 2004-07-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1443 * init.c (build_offset_ref): Build SCOPE_REF with non-null
1444 TREE_TYPE for non-dependent names.
1445 * typeck.c (build_x_unary_op): Handle non-dependent SCOPE_REF.
1446 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
1447 unknown_type_node as its TREE_TYPE.
1448 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
1449 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
1450 (dump_expr) <SCOPE_REF case>: Likewise.
1452 2004-07-17 Jason Merrill <jason@redhat.com>
1455 * call.c (type_passed_as): Make the invisible reference type
1457 * cp-gimplify.c (gimplify_cleanup_stmt): Rename to
1458 cp_genericize_r. Handle invisible reference lowering.
1459 (is_invisiref_parm): New fn.
1460 (cp_genericize): Adjust the types of invisible reference parms.
1461 Don't repeat the walk for clones.
1462 * decl.c (store_parm_decls): Don't generate any code for clones.
1464 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
1466 * cp-tree.h (builtin_function): Declare.
1468 2004-07-16 Mark Mitchell <mark@codesourcery.com>
1470 * class.c (finish_struct_methods): Remove unncessary code.
1471 (add_implicitly_declared_members): Create declarations for default
1472 constructors and copy constructors lazily.
1473 * cp-tree.h (lang_type_class): Remove lazy_default_ctor and
1475 (CLASSTYPE_LAZY_DEFAULT_CTOR): New macro.
1476 (CLASSTYPE_LAZY_COPY_CTOR): Likewise.
1477 * decl2.c (check_classfn): Robustify.
1478 (locate_dtor): Handle empty CLASSTYPE_METHOD_VEC.
1479 (locate_ctor): Handle lazy default constructors.
1480 (locate_copy): Handle lazy copy constructors.
1481 (implicitly_declare_fn): Make sure we're looking at the
1482 TYPE_MAIN_VARIANT for a class before creating functions. Don't
1483 set TYPE_HAS_CONSTRUCTOR.
1484 (lazily_declare_fn): New function.
1485 * name-lookup.c (constructor_name_full): Simplify.
1486 * search.c (lookup_fnfields_1): Lazily create methods, as
1488 (lookup_for_overrides): Handle empty CLASSTYPE_METHOD_VEC.
1490 2004-07-16 Steven Bosscher <stevenb@suse.de>
1492 * cp-tree.h (struct lang_type): Don't have three GTY options on a
1493 single bit GTY desc.
1495 2004-07-16 Richard Henderson <rth@redhat.com>
1497 * cp-lang.c (LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING): Die.
1498 * cp-tree.h (cp_copy_res_decl_for_inlining): Remove.
1499 * tree.c (cp_copy_res_decl_for_inlining): Remove.
1501 2004-07-16 Nathan Sidwell <nathan@codesourcery.com>
1503 * class.c (finish_struct_bits): Use for loop.
1504 (propagate_binfo_offsets): Do primary binfo outside of loop.
1507 * dump.c (cp_dump_tree): Don't dump the bases if there's no
1510 * pt.c (tsubst) <TREE_BINFO case>: We should never get here.
1512 2004-07-15 Mark Mitchell <mark@codesourcery.com>
1514 * cp-tree.h (lang_type_class): Remove has_real_assign_ref and
1515 has_abstract_assign_ref. Make methods a VEC(tree) *.
1516 (TYPE_HAS_CONST_ASSIGN_REF): Add documentation.
1517 (CLASSTYPE_CONSTRUCTORS): Adjust for changes to CLASSTYPE_METHOD_VEC.
1518 (CLASSTYPE_DESTRUCTORS): Likewise.
1519 (TYPE_HAS_REAL_ASSIGN_REF): Remove.
1520 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
1521 (add_method): Change prototoype.
1522 * class.c (add_method): Remove error_p parameter. Adjust for
1523 changes to CLASSTYPE_METHOD_VEC.
1524 (handle_using_decl): Adjust call to add_method.
1525 (maybe_warn_about_overly_private_class): Adjust for
1526 changes to CLASSTYPE_METHOD_VEC.
1527 (resort_type_method_vec): Likewise.
1528 (finish_struct_methods): Likewise.
1529 (check_for_override): Likewise.
1530 (warn_hidden): Likewise.
1531 (add_implicitly_declared_members): Defer creation of assignment
1532 operators. Adjust call to add_method.
1533 (clone_function_decl): Adjust call to add_method.
1534 (check_bases_and_members): Don't set TYPE_HAS_REAL_ASSIGN_REF.
1535 (finish_struct_1): Use CLASSTYPE_DESTRUCTORS.
1536 * decl.c (grok_special_member_properties): Don't set
1537 TYPE_HAS_ABSTRACT_ASSIGN_REF.
1538 * decl2.c (check_classfn): Adjust for
1539 changes to CLASSTYPE_METHOD_VEC.
1540 * method.c (locate_dtor): Use CLASSTYPE_DESTRUCTORS.
1541 (locate_ctor): Use CLASSTYPE_CONSTRUCTORS.
1542 (locate_copy): Adjust for changes to CLASSTYPE_METHOD_VEC.
1543 (implicitly_declare_fn): Set DECL_SOURCE_LOCATION. Do not call
1545 * pt.c (check_explicit_specialization): Adjust for
1546 changes to CLASSTYPE_METHOD_VEC.
1547 (instantiate_class_template): Do not set
1548 TYPE_HAS_ABSTRACT_ASSIGN_REF.
1549 * ptree.c (cxx_print_type): Don't try to print
1550 CLASSTYPE_METHOD_VEC.
1551 * rtti.c (emit_support_tinfos): Use CLASSTYPE_DESTRUCTORS.
1552 * search.c (lookup_field_r): Adjust for
1553 changes to CLASSTYPE_METHOD_VEC.
1554 (lookup_fnfields): Likewise.
1555 (lookup_conversion_operator): Likewise.
1556 (lookup_fnfields_1): Likewise. Create assignment operators
1558 (look_for_overrides_here): Adjust for
1559 changes to CLASSTYPE_METHOD_VEC.
1560 (add_conversions): Likewise.
1561 * semantics.c (finish_member_declaration): Adjust call to add_method.
1563 2004-07-15 Jason Merrill <jason@redhat.com>
1565 * cp-lang.c (cxx_types_compatible_p): To the middle-end,
1566 references and pointers are compatible.
1568 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
1570 * decl.c (xref_basetypes): Refactor.
1571 * tree.c (copy_base_binfos): Replace with ...
1572 (copy_binfo): ... this. Deep copy the given binfo, (not the just
1573 bases of the given base).
1574 * cp-tree.h (copy_base_binfo): Remove.
1575 (copy_binfo): Declare.
1577 2004-07-15 Mark Mitchell <mark@codesourcery.com>
1579 * name-lookup.c (set_inherited_value_binding_p): Add class_type
1581 (get_class_binding): Adjust.
1582 (push_class_level_binding): Don't use set_inherited_value_binding_p.
1584 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
1586 * class.c (finish_struct_bits): Don't set TYPE_HAS_CONVERSION here.
1587 * decl.c (xref_basetypes): Set it here.
1589 * class.c (check_bases): Don't set CLASSTYPE_NON_AGGREGATE here.
1590 Don't check for incomplete base.
1591 (get_vfield_name): Simplify while loop.
1592 * decl.c (xref_basetypes): Set CLASSTYPE_NON_AGGREGATE here.
1594 2004-07-14 Mark Mitchell <mark@codesourcery.com>
1596 * lex.c (cxx_make_type): Remove call to get_pointer_type.
1598 * cp-tree.h (IDENTIFIER_VALUE): Remove.
1599 (BINFO_PUSHDECLS_MARKED): Likewise.
1600 (maybe_inject_for_scope_var): Likewise.
1601 (push_class_decls): Likewise.
1602 * name-lookup.h (push_class_binding): Remove.
1603 (innermost_non_namespace_value): New function.
1604 (outer_binding): Likewise.
1605 * class.c (add_method): Push bindings before adding to
1607 (restore_class_cache): Do not restore class_shadowed.
1608 (pushclass): Do not add USING_DECLs. Do not call
1610 * config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c.
1611 * decl.c (pushdecl): Use outer_binding.
1612 (poplevel): Set the scope for an out-of-scope for-loop declaration
1614 (cp_finish_decl): Don't call maybe_inject_for_scope_var.
1615 * name-lookup.c (new_class_binding): New function.
1616 (push_binding): Use it.
1617 (pushdecl): Use innermost_non_namespace_value.
1618 (maybe_inject_for_scope_var): Remove.
1619 (push_class_binding): Remove.
1620 (set_inherited_value_binding_p): New function.
1621 (get_class_binding): New function.
1622 (push_class_level_binding): Assert that the current_class_type is
1624 (outer_binding): New function.
1625 (innermost_non_namespace_value): Likewise.
1626 (lookup_name_real): Use outer_binding.
1627 (lookup_name_current_level): Ignore out-of-scope variables.
1628 * pt.c (check_template_shadow): Use innermost_non_namespace_value.
1629 (lookup_template_class): Likewise.
1630 * search.c (dfs_push_type_decls): Remove.
1631 (dfs_push_decls): Likewise.
1632 (setup_class_bindings): Likewise.
1633 (lookup_field_1): Handle USING_DECLs from dependent scopes.
1634 (marked_pushdecls_p): Remove.
1635 (unmarked_pushdecls_p): Remove.
1636 (marked_identifiers): Remove.
1637 (setup_class_bindings): Remove.
1638 (dfs_push_type_decls): Remove.
1639 (dfs_push_decls): Remove.
1640 (push_class_decls): Remove.
1642 2004-07-13 Mark Mitchell <mark@codesourcery.com>
1646 * decl.c (grokvardecl): Make declspecs parameter const.
1647 (grokdeclarator): Likewise. Adjust accordingly.
1648 * decl.h (grokdeclarator): Adjust declaration.
1649 * parser.c (cp_parser_init_declarator): Do not clear
1650 decl_specifiers->attributes.
1652 * cp-tree.h (lang_identifier): Remove class_value.
1653 (IDENTIFIER_CLASS_VALUE): Remove.
1654 (pop_class_decls): Likewise.
1655 (init_search_processing): Likewise.
1656 * class.c (handle_using_decl): Use lookup_member, not
1657 IDENTIFIER_CLASS_VALUE.
1658 (restore_class_cache): New function, split out from ...
1659 (pushclass): ... here. Do not call clear_identifier_class_values.
1660 (invalidate_class_lookup_cache): Do not clear
1661 IDENTIFIER_CLASS_VALUE.
1662 (popclass): Do not call pop_class_decls.
1663 (maybe_note_name_used_in_class): Do not save names looked up after
1664 the class is complete. Use lookup_member, not
1665 IDENTIFIER_CLASS_VALUE.
1666 * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
1667 * decl.c (cxx_init_decl_processing): Do not call
1668 init_search_processing.
1669 * method.c (do_build_copy_constructor): Remove unnecessary code.
1670 (do_build_assign_ref): Likewise.
1671 * name-lookup.c (pushdecl): Use lookup_member, not
1672 IDENTIFIER_CLASS_VALUE.
1673 (set_identifier_type_value_with_scope): Set TREE_TYPE on the
1675 (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
1676 (push_class_binding): Do not set it.
1677 (clear_identifier_class_values): Remove.
1678 (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
1679 (store_binding): Do not save it.
1680 (pop_from_top_level): Do not restore it.
1681 * name-lookup.h (cxx_saved_binding): Remove class_value.
1682 (clear_identifier_class_values): Remove.
1683 * ptree.c (cxx_print_identifier): Do not print
1684 IDENTIFIER_CLASS_VALUE.
1685 * search.c (search_obstack): Remove.
1686 (push_stack_level): Remove.
1687 (pop_stack_level): Remove.
1688 (search_level): Remove.
1689 (search_stack): Remove.
1690 (lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
1691 (setup_class_bindings): Use IDENTIFIER_MARKED, not
1692 IDENTIFIER_CLASS_VALUE.
1693 (marked_identifiers): New variable.
1694 (push_class_decls): Clear IDENTIFIER_MARKED.
1695 (pop_class_decls): Don't call pop_search_level.
1696 (init_search_processing): Remove.
1698 2004-07-12 Mark Mitchell <mark@codesourcery.com>
1700 * cp-tree.h (get_aggr_typedef): Remove.
1701 * init.c (get_aggr_typedef): Likewise.
1703 * name-lookup.c (push_class_level_binding): Simplify.
1705 2004-07-12 Andrew Pinski <apinski@apple.com>
1709 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
1711 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
1714 2004-07-12 Eric Christopher <echristo@redhat.com>
1716 * parser.c (cp_parser_class_head): Remove unused variable.
1718 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1720 * decl.c (grok_op_properties): Reject [de-]allocation functions
1721 declared in a namespace, or declared as static.
1723 2004-07-12 Nathan Sidwell <nathan@codesourcery.com>
1725 * cp-tree.h (make_binfo): Remove.
1726 * decl.c (xref_basetypes): Use make_tree_binfo directly.
1727 * tree.h (copy_base_binfos): Likewise.
1728 (make_binfo): Remove.
1730 * call.c (build_user_type_conversion_1, build_new_op,
1731 check_constructor_callable, build_temp,
1732 perform_direct_initialization_of_possible): Pass type directly to
1733 lookup_fnfields & build_special_member_call.
1734 (build_special_member_call): Accept a type, and complete it.
1735 * class.c (finish_stuct_bits): Copy the BINFOs here.
1736 * cvt.c (ocp_convert): Pass type directly to
1737 build_special_member_call.
1738 * decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
1739 (xref_basetypes): Allocate the binfo here. Adjust.
1740 * init.c (build_init, build_new_1): Pass type directly to
1741 build_special_member_call.
1742 * lex.c (cxx_make_type): Do not allocate binfo here.
1743 * name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
1744 * parser.c (cp_parser_class_head): Always call xref_basetypes.
1745 * pt.c (instantiate_class_template): Likewise. Inhibit access
1746 checking for template friends.
1747 * ptree.c (cxx_print_type): Adjust record printing.
1748 * search.c (lookup_base): When taking a type, complete it before
1749 looking for a binfo.
1750 (lookup_member): Delay completing a type.
1751 (push_class_decls): Don't walk an incomplete type.
1752 (lookup_conversions): Likewise.
1753 * semantics.c (finish_stmt_expr_expr): Pass type directly to
1754 build_special_member_call.
1755 * tree.c (copy_base_binfos): Adjust.
1756 (make_binfo): Likewise.
1757 * typeck.c (build_modify_expr): Pass type directly to
1758 build_special_member_call.
1759 * typeck2.c (process_init_constructor): Check a binfo exists.
1760 (build_m_component_ref): Allow accessing an incomplete type.
1761 (build_functional_cast): Pass type directly to
1762 build_special_member_call.
1764 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1767 * config-lang.in (gtfiles): Add typeck2.c.
1768 * Make-lang.in: Tweak typeck2.c dependencies, and add rule for
1770 * cp-tree.h: Declare complete_type_check_abstract.
1771 * typeck2.c (pat_calc_hash, pat_compare,
1772 complete_type_check_abstract): New functions.
1773 (abstract_virtuals_error): If the type is abstract, register the
1774 declaration within abstract_pending_vars for further checks.
1775 Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
1776 * decl.c (cp_finish_decl): Do not strip array types.
1777 (create_array_type_for_decl): Check for abstractness of the element
1779 (complete_vars): Call complete_type_check_abstract.
1780 * class.c (finish_struct): Prepare a list of virtual functions for
1781 template types, and call complete_vars on it to check for abstractness.
1783 2004-07-12 Paolo Bonzini <bonzini@gnu.org>
1785 PR tree-optimization/14107
1786 * decl.c (finish_function): Remove temporary band-aid.
1788 2004-07-11 Mark Mitchell <mark@codesourcery.com>
1790 * call.c (build_operator_new_call): Avoid using push_to_top_level.
1791 (build_new_op): Adjust call to lookup_function_nonclass.
1792 * name-lookup.c (identifier_type_value): Adjust call to
1794 (lookup_name_real): Add block_p parameter.
1795 (lookup_name_nonclass): Adjust call to lookup_name_real.
1796 (lookup_function_nonclass): Likewise.
1797 (lookup_name): Likewise.
1798 * name-lookup.h (lookup_name_real): Change prototype.
1799 (lookup_name_nonclass): Likewise.
1800 * parser.c (cp_parser_lookup_name): Likewise.
1802 * cp-tree.h (saved_scope): Make old_bindings a vector.
1803 (unuse_fields): Remove.
1804 * name-lookup.h (cxx_saved_binding): Define it.
1805 * class.c (pushclass): Don't use unuse_fields.
1806 * name-lookup.c (cxx_saved_binding_make): Remove.
1807 (store_binding): Add new bindings to a vector, using an
1808 accumulator style, rather than adding them to a list.
1809 (store_bindings): Adjust accordingly.
1810 (store_class_bindings): Likewise.
1811 (push_to_top_level): Likewise.
1812 (pop_from_top_level): Likewise.
1813 * optimize.c (maybe_clone_body): Must push_to_top_level and
1814 pop_from_top_level calls outside of loop.
1815 * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope
1816 calls here from cp_parser_late_parsing_default_args.
1817 (cp_parser_save_default_args): Record the class type in which the
1818 function is declared.
1819 (cp_parser_late_parsing_default_args): Do not call
1820 push_nested_class/pop_nested_class.
1821 * search.c (dfs_unuse_fields): Remove.
1822 (unuse_fields): Remove.
1824 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
1826 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
1827 LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
1828 * cp-tree.h (poplevel): Declare.
1829 (set_block): Remove.
1830 * decl.c (set_block): Remove.
1832 2004-07-10 Mike Stump <mrs@apple.com>
1834 * decl2.c (import_export_class): Never export/import vtables
1835 with inline key functions.
1837 2004-07-09 Steven Bosscher <stevenb@suse.de>
1839 * typeck.c (c_expand_asm_operands): Remove.
1841 2004-07-09 Mike Stump <mrs@apple.com>
1843 * typeck.c (build_class_member_access_expr): Skip null deref
1844 warning when we don't dereference it.
1846 2004-07-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1850 * class.c (check_field_decls): Improve -Weffc++ warning: do not
1851 warn for pointers to functions/members, or for classes without
1854 2004-07-08 Mark Mitchell <mark@codesourcery.com>
1856 * name-lookup.h (struct cp_binding_level): Update documentation
1859 2004-07-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1862 * typeck.c (check_return_expr): Improve -Weffc++ warning: handle
1863 returning CALL_EXPR, and non-reference return type.
1865 2004-07-08 Nathan Sidwell <nathan@codesourcery.com>
1867 * name-lookup.c (push_binding): Use VEC_reserve.
1869 2004-07-08 Richard Henderson <rth@redhat.com>
1871 * cp-tree.h (expand_eh_spec_block): Remove.
1873 2004-07-07 Mark Mitchell <mark@codesourcery.com>
1875 * cp-tree.h (saved_scope): Remove x_previous_class_type and
1876 x_previous_class_values; add x_previous_class_level.
1877 (previous_class_type): Remove.
1878 (previous_class_values): Remove.
1879 (previous_class_level): New macro.
1880 * class.c (pushclass): Restore the identifier cache more
1882 (invalidate_class_lookup_cache): Use vector for class_shadowed and
1883 previous_class_values.
1884 * decl.c (poplevel): Likewise.
1885 * name-lookup.c (cxx_binding_init): New function.
1886 (cxx_binding_make): Use it.
1887 (push_binding): For a binding in a class level, use a vector of
1888 cp_class_binding nodes.
1889 (push_binding_level): New function.
1890 (begin_scope): Use it.
1891 (leave_scope): Do not put class binding levels on the free list.
1892 (print_binding_level): Adjust for the fact that class_shadowed is
1894 (poplevel_class): Likewise.
1895 (clear_identifier_class_values): Likewise.
1896 (push_class_level_binding): Likewise.
1897 (set_class_shadows): Remove.
1898 (store_binding): New function.
1899 (store_class_bindings): New function.
1900 (push_to_top_level): Use store_class_bindings as appropriate.
1901 (pop_from_top_level): Use previous_class_level, not
1902 previous_class_type.
1903 * name-lookup.h (cp_class_binding): New type.
1904 (cp_binding_level): Use a vector object for class_shadowed.
1905 (push_binding_level): Declare.
1906 (set_class_shadows): Remove.
1908 2004-07-07 Andrew Pinski <apinski@apple.com>
1910 * class.c (instantiate_type): BUFFER_REF is dead.
1911 * lex.c (init_operators): IN_EXPR is dead.
1913 2004-07-07 Jason Merrill <jason@redhat.com>
1916 * call.c (build_new_op): Give overload warnings for built-in
1919 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
1922 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
1925 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
1927 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
1928 * class.c (build_primary_vtable, check_bases,
1929 determine_primary_base, finish_struct_bits,
1930 maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
1931 get_basefndecls, warn_hidden, walk_subobject_offsets,
1932 build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
1933 layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
1934 finish_struct_1, get_vfield_name, contains_empty_class_p,
1935 dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
1936 dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
1937 add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
1939 * decl.c (xref_basetypes): Likewise.
1940 * dump.c (cp_dump_tree): Likewise.
1941 * error.c (dump_expr): Likewise.
1942 * init.c (sort_mem_initializers, expand_member_init,
1943 push_base_cleanups): Likewise.
1944 * method.c (do_build_copy_constructor, do_build_assign_reg,
1945 synthesize_exception_spec): Likewise.
1946 * name-lookup.c (arg_assoc_class): Likewise.
1947 * pt.c (instantiate_class_template, tsubst,
1948 get_template_base_recursive): Likewise.
1949 * ptree.c (cxx_print_type): Likewise.
1950 * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
1951 * search.c (lookup_base_r, dynamic_cast_base_recurse,
1952 dfs_access_in_type, access_in_type, lookup_field_queue_p,
1953 bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
1954 marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
1955 dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
1956 binfo_for_vtable, copied_binfo, original_binfo): Likewise
1957 * tree.c (copy_base_binfos, make_binfo): Likewise.
1958 * typeck.c (commmon_base_type): Likewise
1959 * typeck2.c (process_init_constructor): Likewise
1961 2004-07-06 Joseph S. Myers <jsm@polyomino.org.uk>
1963 * decl.c (check_tag_decl): Name redeclared type in diagnostic.
1965 2004-07-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1968 * pt.c (convert_nontype_argument): Disallow conversions between
1969 different enumeration types.
1971 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
1973 * cp-tree.h (BINFO_MARKED): Remove.
1974 (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
1975 BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
1976 BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
1977 (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
1978 * class.c (build_base_path): Use BINFO_VIRTUAL_P.
1979 (mark_primary_bases, determine_primary_base, base_derived_from,
1980 dfs_find_final_overrider, dfs_find_final_overrider_q,
1981 dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
1982 dfs_modify_vtables, walk_subobject_offsets,
1983 layout_nonempty_base_or_field, build_base_field,
1984 build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
1985 end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
1986 finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
1987 build_ctor_vtbl_group, accumulate_vtble_inits,
1988 dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
1989 build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
1990 add_vcall_offset_vtbl_entries_1): Likewise.
1991 * decl.c (xref_basetypes): Incomming virtual base indicated by
1993 * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
1994 * init.c (finish_init_stmts, sort_mem_initializers,
1995 emit_mem_initializers, build_vtble_address, expand_member_init,
1996 push_base_cleanups): Likewise.
1997 * method.c (do_build_copy_constructor): Likewise.
1998 * pt.c (instantiate_class_template,
1999 get_template_base_recursive): Likewise.
2000 * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
2001 get_pseudo_ti_desc): Likewise.
2002 * search.c (lookup_base_r, dynamic_cast_base_recurse,
2003 binfo_from_vbase, binfo_via_virtual, copied_binfo,
2004 original_binfo): Likewise.
2005 * semantics.c (finish_base_specifier): Virtualness is indicated
2007 * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
2009 2004-07-06 Mark Mitchell <mark@codesourcery.com>
2012 2004-06-24 Jason Merrill <jason@redhat.com>
2014 * decl.c (grokparms): Give the PARM_DECL reference type if the
2015 parameter is passed by invisible reference.
2017 2004-07-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2019 * cp-lang.c (cp_var_mod_type_p): Add extra arg.
2020 * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
2021 * pt.c (check_instantiated_args, unify): Likewise.
2023 2004-07-05 Phil Edwards <phil@codesourcery.com>
2025 * Make-lang.in (check-c++, lang_checks): Add some comments.
2027 2004-07-05 Zack Weinberg <zack@codesourcery.com>
2029 * cp-mudflap.c: Delete file.
2030 * Makefile.in: Remove all references to cp-mudflap.o.
2032 2004-07-05 Zack Weinberg <zack@codesourcery.com>
2034 * decl.c (cxx_init_decl_processing): Call
2035 build_common_tree_nodes before creating the global NAMESPACE_DECL.
2037 2004-07-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2040 * call.c (build_operator_new_call): Look only at global scope.
2042 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
2044 * call.c (enforce_access): Expect TREE_BINFO.
2045 * class.c (binfo_ctor_vtable): Check TREE_BINFO.
2046 * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
2047 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
2049 (BINFO_LANG_ELTS): Remove.
2050 (BINFO_LANG_SLOTS): New.
2051 (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
2052 (CLASSTYPE_TEMPLATE_INFO): Adjust.
2053 * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
2054 * search.c (lookup_member): Check TREE_BINFO.
2055 * semantics.c (perform_or_defer_access_check): Likewise.
2056 (check_accessibility_of_qualified_id): Check
2057 deferred_access_no_check.
2058 * tree.c (make_binfo): Use make_tree_binfo.
2060 2004-07-04 Mark Mitchell <mark@codesourcery.com>
2062 * method.c (implicitly_declare_fn): Set linkage of generated
2065 2004-07-04 Richard Henderson <rth@redhat.com>
2067 * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
2069 2004-07-03 Scott Brumbaugh <scottb.lists@verizon.net>
2072 * name-lookup.c (push_class_level_binding): Don't pass a
2073 TREE_LIST of ambiguous names to check_template_shadow as it
2074 only handles declarations. Instead, pull the declaration
2077 2004-07-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2080 * pt.c (check_explicit_specialization): Clarify error message.
2082 2004-07-02 Richard Henderson <rth@redhat.com>
2084 * tree.c (cp_unsave_r): Update remap_save_expr call.
2086 2004-07-02 Mark Mitchell <mark@codesourcery.com>
2089 * mangle.c (write_template_arg): Correct mangling.
2092 * decl.c (grokdeclarator): Robustify.
2094 2004-07-01 Richard Henderson <rth@redhat.com>
2096 * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
2097 * method.c (synthesize_method): Don't clear_last_expr.
2098 * name-lookup.c (maybe_push_cleanup_level): Likewise.
2100 2004-07-01 Nick Clifton <nickc@redhat.com>
2102 * decl2.c (import_export_class): Invoke the
2103 import_export_class field in the gcc_target structure if it is not
2106 2004-06-30 Richard Henderson (rth@redhat.com>
2108 * decl.c (start_preparsed_function): Don't set immediate_size_expand.
2109 * method.c (use_thunk): Likewise.
2111 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
2113 * call.c (build_over_call), typeck.c (build_function_call): Call
2114 check_function_arguments instead of check_function_format.
2116 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
2118 * call.c (build_over_call), typeck.c (build_function_call): Update
2119 calls to check_function_format.
2121 2004-06-30 Richard Henderson <rth@redhat.com>
2123 * call.c (build_over_call): Use __builtin_memcpy for copying
2124 CLASS_AS_BASE rather than funny casting.
2126 2004-06-30 Richard Henderson <rth@redhat.com>
2128 * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
2129 TYPE_SIZE_UNIT of full_type.
2131 2004-06-30 Per Bothner <per@bothner.com>
2133 Conditionally compile support for --enable-mapped_location.
2134 * decl.c (pop_label): Handle (imperfectly) USE_MAPPED_LOCATION case.
2135 * decl2.c: If USE_MAPPED_LOCATION, don't do some line number
2136 adjustments - which I don't understand.
2137 * error.c (dump_decl): Rename "<interrnal>" to "<built-in>".
2138 * error.c: Use LOCATION_FILE and EXPR_LOCATION macros.
2139 (print_instantiation_partial_context): Use expand_location.
2140 * decl.c (duplicate_decl): Use new DECL_IS_BUILTIN macro.
2141 * name-lookup.c: Likewise.
2142 * lex.c (cxx_init): Likewise. Also use BUILTINS_LOCATION.
2143 * name-lookup.c: Use input_line macro.
2144 * parser.c (cp_lexer_get_preprocessor_token): Use UNKNOWN_LOCATION.
2145 (cp_parser_statement): Rename locaal variable statement_locus to
2146 statement_location and use SET_EXPR_LOCATION macro.
2147 * pt.c: Handle USE_MAPPED_LOCATION case. Use new macros.
2148 * tree.c (cp_walk_subtrees): Likewise.
2150 2004-06-29 Per Bothner <per@bothner.com>
2152 * tree.c (build_min_nt, build_min, build_min_non_dep):
2153 Don't set TREE_COMPLEXITY from input_line.
2155 2004-06-29 Paul Brook <paul@codesourcery.com>
2157 * init.c: Include target.h.
2158 (get_cookie_size): Remove and replace with target hook.
2160 (build_new_1): Store the element size in the cookie.
2162 2004-06-29 Nathan Sidwell <nathan@codesourcery.com>
2165 * parser.c (cp_parser_template_declaration_after_export): Disable
2166 access checks here ...
2167 (cp_parser_class_specifier): ... not here.
2169 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
2171 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
2172 VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
2173 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
2176 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
2178 * cp-tree.h (struct deferred_access): Move to ...
2179 * semantics.c (struct deferred_access): ... here. Adjust.
2180 (deferred_access_stack): Make a VEC(deferred_access),
2181 (deferred_access_free_list): Remove.
2182 (deferred_access_no_check): New.
2183 (push_deferring_access_checks, resume_deferring_access_checks,
2184 stop_deferring_access_checks, pop_deferring_access_checks,
2185 get_deferred_access_checks, pop_to_parent_deferring_access_checks,
2186 perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
2188 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
2191 * call.c (build_temp): Declare.
2192 (check_constructor_callable): New.
2193 (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
2194 CONSTRUCTOR_CALLABLE.
2195 (convert_like_real, initialize_reference): Use
2196 check_constructor_callable.
2197 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
2198 (LOOKUP_*): Renumber.
2200 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
2202 * friend.c (add_friend): Only perform access checks when context
2204 * lex.c (cxx_make_type): Only create a binfo for aggregate types.
2205 * parser.c (cp_parser_class_specifier): Disable access checks here
2206 when parsing the body of a templated class.
2207 * semantics.c (perform_or_defer_access_checks): Reorder to allow
2208 NULL binfos when not checking access.
2210 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
2212 Use vector API for vbase list.
2213 * cp-tree.h: Include vec.h
2214 (DEF_VEC_P (tree)): New type.
2215 (struct lang_type_class): Change vbase's member type.
2216 (binfo_for_vbase): Declare.
2217 * class.c (determine_primary_base, base_derived_from,
2218 update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
2219 warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
2220 build_vtbl_initializer): Adjust.
2221 * decl.c (xref_basetypes): Adjust, accumulate upper bound of
2223 * init.c (sort_mem_initializers, expand_member_init,
2224 push_base_cleanups): Adjust.
2225 * method.c (do_build_copy_constructor): Adjust.
2226 * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
2227 (binfo_for_vbase): New.
2228 * tree.c (copy_base_binfos): Adjust.
2230 2004-06-28 Mark Mitchell <mark@codesourcery.com>
2232 * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
2234 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
2237 * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
2238 paranthesis in case of pointers to array members.
2239 * error.c (dump_type_prefix): Likewise.
2240 (dump_type_suffix): Maybe issue a whitespace when printing
2243 2004-06-27 Mark Mitchell <mark@codesourcery.com>
2246 * parser.c (cp_parser_set_decl_spec_type): Refine test for
2247 redefinition of built-in types.
2249 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
2251 * error.c (pp_template_argument_list_start): Remove.
2252 (pp_template_argument_list_end): Likewise.
2253 (pp_separate_with_comma): Use pp_cxx_separate_with.
2254 (reinit_global_formatting_buffer): Remove.
2255 (pp_non_consecutive_character): Likewise.
2256 (dump_scope): Use pp_cxx_colon_colon.
2257 (dump_template_parameter): Use pp_cxx_identifier,
2258 pp_cxx_tree_identifier and pp_cxx_whitespace.
2259 (dump_templat_bindings): Replace use of pp_string with sequence
2260 of pp_cxx_whitespace and pp_equal.
2261 (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
2262 pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set
2264 (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
2265 (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace,
2266 pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
2267 (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
2268 pp_cxx_right_bracket, pp_cxx_identifier throughout,
2269 (dump_decl): Likewise.
2270 (dump_template_decl): Likewise.
2271 (dump_function_decl): Likewise. Set padding as appropriate.
2272 (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
2274 (dump_exception_spec): Likewise.
2275 (dump_function_name): Use pp_cxx_tree_identifier and
2277 (dump_template_parms): Use pp_cxx_begin_template_argument_list and
2278 pp_cxx_end_template_argument_list.
2279 (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
2280 pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
2281 pp_cxx_whitespace throughout.
2282 (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
2284 (dump_unary_op): Likewise.
2285 (reinit_cxx_pp): New function.
2286 (type_as_string); Use it.
2287 (expr_as_string): Likewise.
2288 (decl_as_string); Likewise.
2289 (context_as_string): Likewise.
2290 (lang_decl_name): Likewise.
2291 (decl_to_string): Likewise.
2292 (expr_to_string): Likewise.
2293 (parm_to_string): Likewise.
2294 (type_to_string): Likewise.
2295 (args_to_string): Likewise.
2296 (cv_to_string): Likewise.
2298 2004-06-26 Mark Mitchell <mark@codesourcery.com>
2300 * cp-tree.h (cp_cv_quals): New type.
2301 (cp_declarator): Use it instead of "tree" as appropriate.
2302 (grok_method_quals): Adjust prototype.
2303 (grokclassfn): Likewise.
2304 (do_friend): Likewise.
2305 * decl.c (grokfndecl): Use cp_cv_quals, not tree.
2306 (grokdeclarator): Likewise.
2307 * decl2.c (grok_method_quals): Likewise.
2308 (grokclassfn): Likewise.
2309 * friend.c (do_friend): Likewise.
2310 * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
2311 * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
2312 (make_pointer_declarator): Likewise.
2313 (make_reference_declarator): Likewise.
2314 (make_ptrmem_declarator): Likewise.
2315 (cp_parser_ptr_operator): Likewise.
2316 (cp_parser_cv_qualifier_seq_opt): Likewise.
2317 (cp_parser_cv_qualifier_opt): Remove.
2318 (cp_parser_new_declarator_opt): Adjust call to
2319 cp_parser_ptr_operator.
2320 (cp_parser_conversion_declaration_opt): Likewise.
2321 (cp_parser_declarator): Use cp_cv_quals, not tree.
2322 (cp_parser_direct_declarator): Likewise.
2324 2004-06-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2326 * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
2327 Rename DECL_STMT to DECL_EXPR.
2328 * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
2329 * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
2330 * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
2332 2004-06-26 Jan Hubicka <jh@suse.cz>
2335 * decl2.c (maybe_emit_vtables): Always import_export_vtable for the
2336 reachability analysis.
2338 2004-06-25 Mark Mitchell <mark@codesourcery.com>
2340 * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
2343 2004-06-25 Paul Brook <paul@codesourcery.com>
2345 * decl2.c (get_guard): Call targetm.cxx.guard_type.
2346 (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
2348 2004-06-24 Mark Mitchell <mark@codesourcery.com>
2350 * decl.c (grokdeclarator): Restore error messages about __thread.
2351 * parser.c (cp_parser_decl_specifier_seq): Likewise.
2353 2004-06-24 Jason Merrill <jason@redhat.com>
2356 * decl.c (grokparms): Give the PARM_DECL reference type if the
2357 parameter is passed by invisible reference.
2359 2004-06-24 Andreas Schwab <schwab@suse.de>
2361 * cp-tree.h (enum cp_storage_class): Remove trailing comma.
2363 2004-06-23 Mark Mitchell <mark@codesourcery.com>
2365 * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
2366 (cp/decl.o): Likewise.
2367 (cp/decl2.o): Likewise.
2368 (cp/pt.o): Likewise.
2369 (cp/semantics.o): Likewise.
2370 * config-lang.in (gtfiles): Do not reference cp/lex.h.
2371 * class.c: Do not include lex.h.
2372 (add_implicitly_declared_members): Do not use
2373 adding_implicit_members.
2374 (check_bases_and_members): Do not talk about grok_x_components.
2375 * cp/cp-tree.h (adding_implicit_members): Remove.
2376 (cp_storage_class): New type.
2377 (cp_decl_spec): Likewise.
2378 (cp_decl_specifier_seq): Likewise.
2379 (cp_parameter_declarator): Use it for the decl_specifiers field.
2380 (check_tag_decl): Adjust prototype.
2381 (shadow_tag): Likewise.
2382 (groktypename): Likewise.
2383 (start_decl): Likewise.
2384 (start_function): Likewise.
2385 (start_method): Likewise.
2386 (grok_x_components): Remove.
2387 (grokfield): Adjust prototype.
2388 (grokbitfield): Likewise.
2389 (finish_member_class_template): Remove.
2390 * decl.c: Do not include lex.h.
2391 (adding_implicit_members): Do not define.
2392 (check_tag_decl): Do not use trees to represent decl-specifiers.
2393 (shadow_tag): Likewise.
2394 (groktypename): Likewise.
2395 (start_decl): Likewise.
2396 (grokvardecl): Likewise.
2397 (grokdeclarator): Likewise.
2398 (grokparms): Likewise.
2399 (start_function): Likewise.
2400 (start_method): Likewise.
2401 * decl.h (grokdeclarator): Adjust prototype.
2402 * decl2.c: Do not include lex.h.
2403 (grok_x_components): Remove.
2404 (grokfield): Do not use trees to represent decl-specifiers.
2405 (grokbitfield): Likewise.
2406 * lex.c: Do not include lex.h.
2408 * parser.c: Include target.h.
2409 (clear_decl_specs): New function.
2410 (cp_parser_translation_unit): Do not use trees to represent
2412 (cp_parser_postfix_expression): Likewise.
2413 (cp_parser_new_type_id): Likewise.
2414 (cp_parser_condition): Likewise.
2415 (cp_parser_simple_declaration): Likewise.
2416 (cp_parser_decl_specifier_seq): Likewise.
2417 (cp_parser_function_specifier_opt): Likewise.
2418 (cp_parser_conversion_type_id): Likewise.
2419 (cp_parser_template_parameter): Likewise.
2420 (cp_parser_explicit_instantiation): Likewise.
2421 (cp_parser_type_specifier): Likewise.
2422 (cp_parser_simple_type_specifier): Likewise.
2423 (cp_parser_init_declarator): Likewise.
2424 (cp_parser_type_id): Likewise.
2425 (cp_parser_type_specifier_seq): Likewise.
2426 (cp_parser_parameter_declaration): Likewise.
2427 (cp_parser_member_declaration): Likewise.
2428 (cp_parser_exception_declaration): Likewise.
2429 (cp_parser_function_definition_from_specifiers_and_declarator):
2431 (cp_parser_single_declaration): Likewise.
2432 (cp_parser_save_member_function_body): Likewise.
2433 (cp_parser_friend_p): Likewise.
2434 (cp_parser_set_storage_class): New function.
2435 (cp_parser_set_decl_spec_type): Likewise.
2436 * pt.c: Do not include lex.h.
2437 * semantics.c: Likewise.
2438 (finish_member_class_template): Remove.
2440 2004-06-23 Roger Sayle <roger@eyesopen.com>
2442 * call.c (build_cxx_call): Don't call expand_tree_builtin. No
2443 longer take both "args" and "convert_args" as arguments.
2444 (build_op_delete_call): Update call to build_cxx_call.
2445 (build_over_call): Likewise, update call to build_cxx_call.
2446 * cp-tree.h (build_cxx_call): Update funtion prototype.
2447 * typeck.c (build_function_call): Don't call expand_tree_builtin.
2448 * rtti.c (throw_bad_cast): Update call to build_cxx_call.
2449 (throw_bad_typeid): Likewise.
2450 (build_dynamic_cast_1): Likewise.
2452 2004-06-22 Richard Henderson <rth@redhat.com>
2454 * class.c (build_vfn_ref): Take a pointer not object. Build
2456 (cp_fold_obj_type_ref): New.
2457 * call.c (build_over_call): Update build_vfn_ref call.
2458 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
2459 * cp-tree.h (cp_fold_obj_type_ref): Declare.
2461 2004-06-21 Jason Merrill <jason@redhat.com>
2464 * cp-gimplify.c (cp_gimplify_init_expr): Look through
2467 2004-06-21 Mark Mitchell <mark@codesourcery.com>
2469 * cp-tree.def (NEW_EXPR): Add a fourth slot.
2470 * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
2471 (TREE_PARMLIST): Likewise.
2472 (CALL_DECLARATOR_PARMS): Likewise.
2473 (CALL_DECLARATOR_QUALS): Likewise.
2474 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
2475 (cp_declarator_kind): New type.
2476 (cp_parameter_declarator): Likewise.
2477 (cp_declarator): Likewise.
2478 (cp_error_declarator): Likewise.
2479 (no_parameters): Likewise.
2480 (groktypename): Change prototype.
2481 (start_decl): Likewise.
2482 (start_handler_parms): Likewise.
2483 (get_scope_of_declarator): Likewise.
2484 (start_function): Likewise.
2485 (start_preparsed_function): New function.
2486 (start_function): Change prototype.
2487 (start_method): Likewise.
2488 (grokfield): Likewise.
2489 (grokbitfield): Likewise.
2490 (build_new): Likewise.
2491 (make_pointer_declarator): Remove.
2492 (make_reference_declarator): Likewise.
2493 (make_call_declarator): Likewise.
2494 (set_quals_and_spec): Likewise.
2495 (process_template_parm): Change prototype.
2496 (begin_function_definition): Remove.
2497 (finish_parmlist): Remove.
2498 * decl.c (groktypename): Do not use trees to represent
2500 (start_decl): Likewise.
2501 (start_handler_parms): Remove.
2502 (get_scope_of_declarator): Reimplement.
2503 (grokdeclarator): Do not use trees to represent declarators.
2504 (grokparms): Likewise.
2505 (start_function): Likewise.
2506 (start_method): Likewise.
2507 (build_void_list_mode): Do not use TREE_PARMLIST.
2508 * decl.h (grokdeclarator): Change prototype.
2509 * decl2.c (grok_method_quals): Robustify.
2510 (grok_x_components): Do not use trees to represent declarators.
2511 (grokfield): Likewise.
2512 (grokbitfield): Likewise.
2513 (start_objects): Build FUNCTION_DECLs, not declarators.
2514 (start_static_storage_duration_function): Likewise.
2515 * init.c (build_new): Simplify.
2516 * lex.c (make_pointer_declarator): Remove.
2517 (make_reference_declarator): Likewise.
2518 (make_call_declarator): Likewise.
2519 (set_quals_and_spec): Likewise.
2520 * method.c (use_thunk): Use start_preparsed_function.
2521 (synthesize_method): Likewise.
2522 (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
2523 * optimize.c (maybe_clone_body): Use start_preparsed_function.
2524 * parser.c (cp_error_declarator): New variable.
2525 (declarator_obstack): Likewise.
2526 (alloc_declarator): New function.
2527 (make_declarator): Likewise.
2528 (make_id_declarator): Likewise.
2529 (make_pointer_declarator): Likewise.
2530 (make_reference_declarator): Likewise.
2531 (make_ptrmem_declarator): Likewise.
2532 (make_call_declarator): Likewise.
2533 (make_array_declarator): Likewise.
2534 (no_parameters): New variable.
2535 (make_parameter_declarator): Likewise.
2536 (cp_parser_check_for_definition_in_return_type): Do not use trees
2537 to represent declarators.
2538 (cp_parser_translation_unit): Likewise.
2539 (cp_parser_new_expression): Likewise.
2540 (cp_parser_new_type_id): Likewise.
2541 (cp_parser_new_declarator_opt): Likewise.
2542 (cp_parser_direct_new_declarator): Likewise.
2543 (cp_parser_condition): Likewise.
2544 (cp_parser_declaration_statement): Likewise.
2545 (cp_parser_declaration): Likewise.
2546 (cp_parser_conversion_type_id): Likewise.
2547 (cp_parser_conversion_declarator_opt): Likewise.
2548 (cp_parser_template_parameter_list): Likewise.
2549 (cp_parser_template_parameter): Likewise.
2550 (cp_parser_explicit_instantiation): Likewise.
2551 (cp_parser_init_declarator): Likewise.
2552 (cp_parser_declarator): Likewise.
2553 (cp_parser_direct_declarator): Likewise.
2554 (cp_parser_type_id): Likewise.
2555 (cp_parser_parameter_declaration_clause): Likewise.
2556 (cp_parser_parameter_declaration_list): Likewise.
2557 (cp_parser_parameter_declaration): Likewise.
2558 (cp_parser_member_declaration): Likewise.
2559 (cp_parser_exception_declaration): Likewise.
2560 (cp_parser_check_declarator_template_parameters): Likewise.
2561 (cp_parser_function_definition_from_specifiers_and_declarator):
2563 (cp_parser_save_member_function_body): Likewise.
2564 * pt.c (process_template_parm): Add is_non_type parameter.
2565 (convert_template_argument): Adjust call to groktypename.
2566 (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
2567 (tsubst): Do not expect declarators.
2568 (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
2570 (instantiate_decl): Use start_preparsed_function.
2571 * semantics.c (begin_function_definition): Remove.
2572 (finish_parmlist): Remove.
2573 * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
2576 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2578 * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
2579 (build_new_method_call): Likewise.
2580 * decl.c (local_variable_p_walkfn): Don't walk into types.
2581 * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
2582 (build_anon_union_vars): Add new operand for COMPONENT_REF.
2583 * init.c (buld_new): Add new operand for ARRAY_REF.
2584 * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
2585 (do_build_assign_ref): Likewise.
2586 * parser.c (cp_parser_direct_new_declarator): Add new operands
2588 (cp_parser_direct_declarator): Likewise.
2589 * pt.c (tsubst): Likewise.
2590 (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
2592 * semantics.c (finish_non_static_data_member): Add new operand
2594 * typeck.c (build_class_member_access_expr): Likewise.
2595 (build_class_member_access_expr, finish_class_member_access_expr):
2597 (build_ptrmemfunc_access_expr): Likewise.
2598 (build_array_ref): Add new operands for ARRAY_REF.
2599 * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
2600 * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
2602 2004-06-21 Richard Henderson <rth@redhat.com>
2604 * dump.c (cp_dump_tree): Don't use dump_next_stmt.
2605 * parser.c (cp_parser_jump_statement): Update commentary.
2606 * pt.c (tsubst_expr): Use RETURN_EXPR.
2607 * semantics.c (finish_return_stmt): Likewise.
2608 (finalize_nrv_r): Likewise.
2609 * typeck.c, typeck2.c: Update file start commentary.
2611 2004-06-21 Richard Henderson <rth@redhat.com>
2613 * semantics.c (finish_expr_stmt): Call verify_sequence_points.
2615 2004-06-20 Richard Henderson <rth@redhat.com>
2617 * cp-tree.h (add_decl_stmt): Declare.
2618 * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
2619 * semantics.c (maybe_cleanup_point_expr): New.
2620 (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
2621 finish_for_expr, finish_switch_cond): Use it.
2622 (finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN.
2624 2004-06-20 Richard Henderson <rth@redhat.com>
2626 * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
2627 * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
2628 (cp_gimplify_expr): Call it.
2629 (gimplify_cleanup_stmt): Move from c-gimplify.c.
2630 (cp_genericize): New.
2631 * decl.c (finish_function): Call it.
2632 * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
2633 (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
2634 (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
2635 (cp_genericize): Declare.
2636 * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
2637 * dump.c (cp_dump_tree): Likewise.
2638 * semantics.c (push_cleanup): Move from c-semantics.c.
2640 2004-06-20 Zack Weinberg <zack@codesourcery.com>
2642 * cp-lang.c (has_c_linkage): Implement.
2644 * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
2645 * decl.c (duplicate_decls): Use COPY_DECL_RTL.
2646 (builtin_function_1): Don't call make_decl_rtl.
2647 (build_cp_library_fn): Don't call set_mangled_name_for_decl.
2648 (grokvardecl): Don't call mangle_decl.
2649 * except.c (nothrow_libfn_p): Look at DECL_NAME, not
2650 DECL_ASSEMBLER_NAME.
2651 * method.c (set_mangled_name_for_decl): Delete.
2652 * name-lookup.c (pushdecl): When a local extern shadows a
2653 file-scope declaration of the same object, give both DECLs the
2655 * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
2656 on DECL_ASSEMBLER_NAME.
2658 2004-06-19 Richard Henderson <rth@redhat.com>
2660 * cp-gimplify.c: Remove unnecessary prototypes.
2661 (cp_gimplify_stmt): Merge into ...
2662 (cp_gimplify_expr): ... here. Move to end of file. Handle
2663 stmts_are_full_exprs_p frobbing.
2664 * cp-tree.h (cp_gimplify_stmt): Remove.
2665 * pt.c (tsubst_expr): Merge prep_stmt and unify.
2666 * tree.c (init_tree): Don't set lang_gimplify_stmt.
2668 2004-06-18 Richard Henderson <rth@redhat.com>
2671 * semantics.c (begin_cond): New.
2672 (finish_cond): Rewrite to handle template DECL_STMTs specially.
2673 Assume that non-template decls go land before the conditional.
2674 (simplify_loop_decl_cond): Likewise.
2675 (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
2676 finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
2677 begin_switch_stmt, finish_switch_cond): Update to match.
2679 2004-06-17 Jason Merrill <jason@redhat.com>
2682 * semantics.c (simplify_aggr_init_expr): Don't return the slot.
2683 (finish_stmt_expr_expr): Update type after conversions.
2684 (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
2685 Handle void initializer.
2686 * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
2688 2004-06-17 Geoffrey Keating <geoffk@apple.com>
2690 * class.c (build_clone): Don't call defer_fn, let mark_used do it.
2691 * cp-tree.h (defer_fn): Delete.
2692 * decl2.c (defer_fn): Delete.
2693 (finish_file): Simplify deferred_fns loops; check that
2694 only used inline functions get into deferred_fns.
2695 (mark_used): Inline previous contents of defer_fn.
2697 2004-06-16 Richard Henderson <rth@redhat.com>
2699 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
2700 (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
2701 * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
2702 of CTOR_INITIALIZER ...
2703 (pp_cxx_statement): ... here.
2704 * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
2705 (finish_function): Use alloc_stmt_list to zap entire function.
2706 * parser.c (cp_parser_compound_statement): Update commentary.
2707 * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
2708 * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
2709 (finish_stmt_expr): Don't look through COMPOUND_STMT.
2711 2004-06-16 Geoffrey Keating <geoffk@apple.com>
2713 * pt.c (mark_decl_instantiated): Don't call defer_fn.
2715 2004-06-16 Richard Henderson <rth@redhat.com>
2717 * parser.c (cp_parser_labeled_statement): Update commentary.
2718 * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
2719 * tree.c (mark_local_for_remap_r): Likewise.
2721 2004-06-16 Richard Henderson <rth@redhat.com>
2723 * parser.c (cp_parser_asm_definition): Update commentary.
2724 * pt.c (tsubst_expr): Use ASM_EXPR.
2725 * semantics.c (finish_asm_stmt): Likewise.
2727 2004-06-16 Richard Henderson <rth@redhat.com>
2729 * decl.c (finish_destructor_body): Use LABEL_EXPR.
2730 * parser.c (cp_parser_statement): Update commentary.
2731 * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
2732 * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
2733 * tree.c (mark_local_for_remap_r): Likewise.
2735 2004-06-16 Richard Henderson <rth@redhat.com>
2738 * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
2739 statement in FOR_INIT_STMT for templates.
2741 2004-06-15 Richard Henderson <rth@redhat.com>
2743 * call.c (initialize_reference): Don't build CLEANUP_STMT here.
2744 * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
2745 (genericize_try_block): Use gimplify_stmt.
2746 (genericize_catch_block, genericize_eh_spec_block): Likewise.
2747 (cp_gimplify_init_expr): Remove STMT_EXPR special case.
2748 (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
2749 * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
2750 (cp_tree_chain_matters_p): Remove.
2751 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
2752 (COMPOUND_STMT_BODY_BLOCK): New.
2753 (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
2754 (EXPR_STMT_STMT_EXPR_RESULT): New.
2755 (building_stmt_tree): Check cur_stmt_list.
2756 (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
2757 (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
2758 * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
2759 (cp_finish_decl): Use push_cleanup.
2760 (start_function, finish_function): Use statement lists.
2761 (finish_stmt): Do nothing.
2762 * except.c (begin_eh_spec_block): Use statement lists.
2763 (check_handlers_1, check_handlers): Likewise.
2764 * init.c (construct_virtual_base): Don't add extra compound stmts.
2765 (build_vec_init): Likewise.
2766 * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
2767 * name-lookup.h (struct cp_binding_level): Add statement_list.
2768 * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
2769 (cp_parser_labeled_statement, cp_parser_expression_statement,
2770 cp_parser_statement_seq_opt): Likewise.
2771 (cp_parser_compound_statement): Likewise. Take bool for try block.
2772 (cp_parser_selection_statement): Tidy if processing.
2773 (cp_parser_already_scoped_statement): Rewrite to do what it says.
2774 * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
2775 (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST.
2776 Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
2777 * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
2778 (finish_cond): New, rewritten from FINISH_COND.
2779 (simplify_loop_decl_cond): New.
2780 (finish_expr_stmt): Avoid nested EXPR_STMTs.
2781 (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
2782 begin_else_clause, finish_else_clause, finish_if_stmt,
2783 begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
2784 begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
2785 finish_for_cond, finish_for_stmt, begin_switch_stmt,
2786 finish_switch_cond, finish_switch_stmt, begin_try_block,
2787 finish_try_block, finish_cleanup_try_block, finish_function_try_block,
2788 finish_handler_sequence, finish_function_handler_sequence,
2789 begin_handler, finish_handler_parms, finish_handler,
2790 begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
2791 using statement lists.
2792 (begin_compound_stmt): Replace has_no_scope argument with flags.
2793 Update all callers. Use statement lists.
2794 (finish_compound_stmt): Likewise.
2795 (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
2796 (current_scope_stmt_stack): Remove.
2797 (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
2798 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
2799 Rewrite with statement lists.
2801 2004-06-15 Alexandre Oliva <aoliva@redhat.com>
2803 * parser.c: Change all assignments of c_lex_string_translate
2804 to true and false to 1 and 0.
2805 (cp_lexer_read_token): Convert type of the translated string.
2806 (cp_parser_skip_to_closing_parentheses): Preserve original
2807 value of c_lex_string_translate, and set it to -1 while
2809 (cp_parser_cache_group): Likewise.
2810 (cp_parser_cache_group_1): Renamed.
2811 (cp_parser_asm_operand_list): Remove redundant setting of
2812 c_lex_string_translate.
2813 (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
2814 Handle chained strings.
2816 2004-06-12 Andrew Pinski <apinski@apple.com>
2820 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
2822 * cp-tree.h: Fix typo.
2824 * cp-tree.h: Include cgraph.h
2825 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
2826 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
2828 2004-06-12 Jason Merrill <jason@redhat.com>
2830 PR tree-optimization/14107
2831 * decl.c (finish_function): Warn about no return in all functions.
2833 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
2835 * cp-tree.h (struct language_function): Remove cannot_inline.
2836 * decl.c (save_function_data): cannot_inline is no more.
2837 (cxx_push_function_context): Likewise.
2838 * decl2.c (start_objects, start_static_storage_duration_function):
2839 Reset DECL_INLINE, set DECL_UNINLINABLE.
2841 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2844 * search.c (lookup_field): Propagate the ambiguity list.
2845 (lookup_fnfields): Likewise.
2847 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2850 * parser.c (cp_parser_template_name): Ctors/dtors never need a
2851 template keyword to disambiguate.
2853 2004-06-14 Mark Mitchell <mark@codesourcery.com>
2856 * decl.c (grokdeclarator): Ignore pointer-to-members when
2857 computing template depth.
2860 * name-lookup.c (pushtag): Do not try to put class declarations in
2861 explicit specialization scopes.
2863 2004-06-11 Andrew Pinski <pinskia@physics.uc.edu>
2865 * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
2867 2004-06-11 Mark Mitchell <mark@codesourcery.com>
2870 * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
2871 bindings for undeclared built-ins.
2873 2004-06-11 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2875 * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
2876 appear at the correct location.
2878 2004-06-10 Jason Merrill <jason@redhat.com>
2882 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2883 * init.c (build_offset_ref): Build SCOPE_REF with non-null
2884 TREE_TYPE for non-dependent names.
2885 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
2886 unknown_type_node as its TREE_TYPE.
2887 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
2888 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
2889 (dump_expr) <SCOPE_REF case>: Likewise.
2891 2004-06-10 Mark Mitchell <mark@codesourcery.com>
2894 * parser.c (cp_parser_direct_declarator): Robustify.
2897 * pt.c (tsubst_copy): Use decl_constant_value on enumeration
2898 constants in non-dependent contexts.
2902 * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
2905 2004-06-10 Jakub Jelinek <jakub@redhat.com>
2908 * decl.c (duplicate_decls): Handle fileptr_type_node arguments
2911 2004-06-09 Mark Mitchell <mark@codesourcery.com>
2915 2004-06-07 Mark Mitchell <mark@codesourcery.com>
2916 * lex.c (handle_pragma_interface): Deprecate.
2917 (handle_pragma_implementation): Likewise.
2919 2004-06-09 Andrew Pinski <pinskia@physics.uc.edu>
2921 * g++spec.c (lang_specific_driver): Remove check for -lm
2922 and -lmath when check it see if it was the math library.
2924 2004-06-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2927 * parser.c (cp_parser_direct_declarator): Reject constructor named
2928 as qualified template-id.
2930 2004-06-07 Mark Mitchell <mark@codesourcery.com>
2933 * lex.c (handle_pragma_interface): Deprecate.
2934 (handle_pragma_implementation): Likewise.
2936 2004-06-07 Mark Mitchell <mark@codesourcery.com>
2939 * parser.c (cp_parser_iteration_statement): Fix typo in error
2943 * pt.c (tsubst_default_argument): Do not defer access checks
2944 while substituting into the default argument.
2947 * pt.c (tsubst_copy): Do not try to substitute for an enumeration
2948 constant in a non-dependent context.
2951 * except.c (build_throw): Ensure that temp_expr has been
2954 2004-06-06 Roger Sayle <roger@eyesopen.com>
2956 * cp/cp-tree.h (lvalue_or_else): Add function prototype.
2958 2004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2961 * parser.c (cp_parser_mem_initializer_id): Gracefully reject
2962 'typename', and accept 'template'.
2964 2004-06-03 Andrew Pinski <pinskia@physics.uc.edu>
2965 Jan Hubicka <jh@suse.cz>
2968 * method.c (use_think): Do not mark thunk as referenced.
2970 2004-06-03 Matt Austern <austern@apple.com>
2973 * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
2974 is nonzero, and if we see a noninline definition of a key method,
2975 make the vtables nonweak.
2977 2004-06-02 Matt Austern <austern@apple.com>
2979 * cp-tree.h (instantiate_decl): new boolean parameter,
2980 undefined_ok. Current behavior is equivalent to its being 0.
2981 * decl2.c (mark_used): Add new argument when calling instantiate_decl
2982 * pt.c (mark_decl_instantiated): Unconditionally make
2983 instantiations explicit unconditionally
2984 (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
2985 since mark_decl_instantiated now does it.
2986 (instantiate_class_member): New. Instantiate a member of an
2987 explicitly instantiated class template.
2988 (do_type_instantiation): Explicitly instantiate members of an
2989 explicitly instantiated class template.
2990 (instantiate_decl): if undefined_ok is nonzero, and if we're
2991 trying to explicitly instantiated a template with no definition,
2992 change it to an implicit instantiation.
2993 (instantiate_pending_templates): Add new argument to instantiate_decl.
2994 * tree.c (cp_cannot_inline_tree_fn): Likewise.
2996 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
2998 * cp-tree.h: Fix typo.
3000 * cp-tree.h: Include cgraph.h
3001 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
3002 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
3004 2004-06-01 Jason Merrill <jason@redhat.com>
3007 * call.c (call_builtin_trap): Remove type parm.
3008 (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
3009 (build_x_va_arg): Dereference a null pointer for a non-POD argument.
3011 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3014 * init.c (build_offset_ref): Build SCOPE_REF with non-null
3015 TREE_TYPE for non-dependent names.
3016 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
3017 unknown_type_node as its TREE_TYPE.
3018 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
3019 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
3020 (dump_expr) <SCOPE_REF case>: Likewise.
3022 2004-06-01 Richard Henderson <rth@redhat.com>
3023 Andrew Pinski <pinskia@physics.uc.edu>
3025 * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
3026 * parser.c (struct cp_parser): Remove in_offsetof.
3027 (cp_parser_new): Don't set it.
3028 (cp_parser_unary_expression): Don't check it.
3029 (cp_parser_postfix_open_square_expression): Split out from ...
3030 (cp_parser_postfix_expression): ... here.
3031 (cp_parser_postfix_dot_deref_expression): Likewise.
3032 (cp_parser_builtin_offsetof): New.
3033 (cp_parser_primary_expression): Use it.
3035 2004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3038 * parser.c (cp_parser_postfix_expression): Allow subscript
3039 operator in offsetof.
3041 2004-05-31 Mark Mitchell <mark@codesourcery.com>
3044 * friend.c (add_friend): Do not try to perform access checks for
3045 functions from dependent classes.
3047 2004-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
3049 * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
3050 (pp_cxx_begin_template_argument_list): Turn into a function.
3051 (pp_cxx_end_template_argument_list): Likewise.
3052 (pp_cxx_separate_with): Define.
3053 (pp_cxx_unqualified_id): Tidy.
3054 (pp_cxx_primary_expression): Likewise.
3055 (pp_cxx_postfix_expression): Likewise.
3056 (pp_cxx_expression): Likewise.
3057 (pp_cxx_simple_type_specifier): Likewise.
3058 (pp_cxx_type_specifier_seq): Likewise.
3059 (pp_cxx_parameter_declaration_clause): Likewise.
3060 (pp_cxx_exception_specification): Likewise.
3061 (pp_cxx_direct_declarator): Likewise.
3062 (pp_cxx_type_id): Likewise.
3063 * cxx-pretty-print.h (pp_cxx_whitespace): Export from
3065 (pp_cxx_left_paren): Likewise.
3066 (pp_cxx_right_paren): Likewise.
3067 (pp_cxx_left_brace): Likewise.
3068 (pp_cxx_right_brace): Likewise.
3069 (pp_cxx_left_bracket): Likewise.
3070 (pp_cxx_right_bracket): Likewise.
3071 (pp_cxx_dot): Likewise.
3072 (pp_cxx_identifier): Likewise.
3073 (pp_cxx_tree_identifier): Likewise.
3074 (pp_cxx_ampersand): New macro.
3075 (pp_cxx_star): Likewise.
3076 (pp_cxx_arrow): Likewise.
3077 (pp_cxx_semicolon): Likewise.
3078 (pp_cxx_complement): Likewise.
3079 (pp_cxx_begin_template_argument_list): Declaree.
3080 (pp_cxx_end_template_argument_list): Likewise.
3081 (pp_cxx_colon_colon): likewise.
3083 2004-05-31 Eric Botcazou <ebotcazou@libertysurf.fr>
3085 * parser.c (cp_parser_simple_type_specifier): Explicitly test
3088 2004-05-31 Kazu Hirata <kazu@cs.umass.edu>
3090 * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
3091 typeck.c: Fix comment formatting.
3093 2004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
3095 * cp-lang.c (cp_expand_decl): Remove.
3096 (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
3098 2004-05-30 Andreas Jaeger <aj@suse.de>
3100 * lang-specs.h: Add missing initializers for .ii.
3102 2004-05-28 Aldy Hernandez <aldyh@redhat.com>
3104 * decl.c (cp_make_fname_decl): Free return value from
3107 2004-05-28 Mark Mitchell <mark@codesourcery.com>
3110 * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
3112 * init.c (build_new): Likewise.
3115 * name-lookup.c (arg_assoc): Robustify.
3118 * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
3119 when determining the scope to use for a pointer to member.
3120 (lookup_anon_field): Give it external linkage.
3121 * cp-tree.h (lookup_anon_field): Declare it.
3122 * expr.c (cplus_expand_constant): Use it.
3124 2004-05-28 Mark Mitchell <mark@codesourcery.com>
3127 * parser.c (cp_parser_simple_type_specifier): Call
3128 maybe_note_name_used_in_class.
3130 2004-05-28 Tom Marshall <tmarshall@real.com>
3133 * class.c (finish_struct_1): Warn only if the dtor is non-private or
3134 the class has friends.
3136 2004-05-27 Adam Nemet <anemet@lnxw.com>
3139 * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
3140 TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
3142 2004-05-24 Geoffrey Keating <geoffk@apple.com>
3144 * method.c (implicitly_declare_fn): Don't call defer_fn; abort
3145 if it might be needed.
3146 * pt.c (mark_decl_instantiated): Only call defer_fn if
3147 the function actually needs processing in finish_file.
3148 * decl2.c (finish_file): Add check that elements in
3149 deferred_fns_used are really needed there. Remove unnecessary
3150 test of DECL_SAVED_TREE.
3152 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
3154 * Make-lang.in: No need to specify $(LIBCPP).
3156 2004-05-23 Mark Mitchell <mark@codesourcery.com>
3159 * parser.c (cp_parser_class_head): Robustify.
3162 * parser.c (cp_parser_decl_specifier_seq): Correct error in
3164 (cp_parser_constructor_declarator_p): Treat attributes
3168 * typeck.c (build_unary_op): Do not attempt to resolve casts to
3169 base classes in templates.
3171 2004-05-23 Mark Mitchell <mark@codesourcery.com>
3174 * pt.c (instantiate_template): Robustify.
3176 2004-05-23 Mark Mitchell <mark@codesourcery.com>
3179 * decl.c (xref_tag): Issue errors about redeclaring template
3180 classes as non-template classes.
3182 2004-05-23 Mark Mitchell <mark@codesourcery.com>
3185 * name-lookup.c (supplement_binding): Allow redefinitions of
3189 * parser.c (cp_parser_template_argument): Robustify.
3191 2004-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
3193 * class.c (alter_access): Use %E format specifier to print an
3194 identifier node. Avoid looking at the IDENTIFIER_POINTER.
3195 (push_lang_context): Likewise.
3196 * decl.c (lookup_label): Likewise.
3197 (grokdeclarator): Likewise.
3198 * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
3199 * pt.c (do_type_instantiation): Likewise.
3200 * tree.c (handle_java_interface_attribute): Likewise.
3201 (handle_com_interface_attribute): Likewise.
3202 (handle_init_priority_attribute): Likewise.
3204 2004-05-22 Mark Mitchell <mark@codesourcery.com>
3208 * pt.c (build_non_dependent_expr): Expand the set of tree nodes
3209 recognized as overloaded functions.
3211 2004-05-22 Mark Mitchell <mark@codesourcery.com>
3214 * class.c (layout_nonempty_base_or_field): Do not try to avoid
3215 layout conflicts for unions.
3218 * typeck.c (build_x_unary_op): Instantiate template class
3219 specializations before looking for "operator &".
3222 * typeck.c (complete_type): Layout non-dependent array types, even
3226 * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
3229 2004-05-22 Roger Sayle <roger@eyesopen.com>
3231 * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
3232 returning when TREE_TYPE is error_mark_node.
3233 * typeck.c (require_complete_type): Return error_mark_node if
3234 value's type is an error_mark_node.
3236 2004-05-20 Andrew Pinski <pinskia@physics.uc.edu>
3238 * optimize.c (calls_setjmp_r): Remove.
3239 (calls_setjmp_p): Remove.
3240 * cp-tree.c (calls_setjmp_p): Remove.
3241 * decl.c (finish_function): Do not call calls_setjmp_p.
3243 2004-05-18 Zack Weinberg <zack@codesourcery.com>
3245 * decl.c (cp_finish_decl): Use mark_decl_referenced.
3246 * decl2.c (maybe_make_one_only): Likewise.
3247 * method.c (use_thunk): Likewise.
3249 2004-05-18 Jason Merrill <jason@redhat.com>
3251 * class.c (build_base_path): Tidy a bit.
3253 2004-05-14 Geoffrey Keating <geoffk@apple.com>
3255 * name-lookup.c (struct scope_binding): New.
3256 (EMPTY_SCOPE_BINDING): New.
3257 (lookup_using_namespace): Take a scope_binding instead of a
3259 (qualified_lookup_using_namespace): Likewise.
3260 (cxx_binding_clear): Delete.
3261 (do_nonmember_using_decl): Use a scope_binding instead of a
3263 (lookup_tag): Don't call select_decl.
3264 (ambiguous_decl): Don't return anything (and change callers to match).
3265 Take a scope_binding as the second parameter.
3266 (lookup_namespace_name): Use a scope_binding instead of a
3268 (unqualified_namespace_lookup): Likewise.
3269 (lookup_qualified_name): Likewise.
3270 (select_decl): Take a scope_binding instead of a cxx_binding.
3271 Use macros rather than hand-coding tests for type-ness.
3273 2004-05-13 Diego Novillo <dnovillo@redhat.com>
3275 * cp-gimplify.c: Rename from cp-simplify.c.
3276 * Make-lang.in, optimize.c: Update.
3278 2004-05-13 Diego Novillo <dnovillo@redhat.com>
3280 Merge from tree-ssa-20020619-branch. See
3281 ChangeLog.tree-ssa for details.
3283 * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
3284 cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
3285 expr.c, init.c, name-lookup.h, optimize.c, parser.c,
3286 pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
3288 * cp-mudflap.c: New file.
3289 * cp-simplify.c:: New file.
3291 2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3294 * decl2.c (check_classfn): For member templates, compare also the
3295 template parameters to match the declaration.
3296 * cp-tree.h: Adjust declaration of check_classfn.
3297 * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
3298 * friend.c (do_friend): Likewise.
3299 * pt.c (tsubst_friend_function): Likewise.
3301 2004-05-01 Zack Weinberg <zack@codesourcery.com>
3303 * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
3304 Instead, dig into the representation type to find the array bound.
3306 2004-04-30 Jason Merrill <jason@redhat.com>
3308 Refer to base members using COMPONENT_REFs where possible.
3309 * class.c (build_simple_base_path): New fn.
3310 (build_base_path): Use it for non-virtual base references.
3311 (layout_class_type): Change base fields to their real type
3312 after layout is done.
3313 * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
3314 * cp-lang.c (cxx_get_alias_set): Use it.
3316 2004-04-30 Kazu Hirata <kazu@cs.umass.edu>
3318 * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
3321 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3324 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
3325 used in integral constant expressions.
3327 2004-04-22 Mark Mitchell <mark@codesourcery.com>
3329 * init.c (build_aggr_init): Fix accidental use of C99 construct in
3332 * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
3334 * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
3335 * decl.c (reshape_init): Use it.
3336 * init.c (perform_member_init): Remove redundant condition.
3337 (build_aggr_init): Adjust to handle brace-enclosed initializers
3339 (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
3341 * parser.c (cp_parser_initializer_clause): Do not set
3342 TREE_HAS_CONSTRUCTOR on the initializer.
3343 * rtti.c (tinfo_base_init): Likewise.
3344 (generic_initializer): Likewise.
3345 (ptr_initializer): Likewise.
3346 (ptm_initializer): Likewise.
3347 (class_initializer): Likewise.
3348 (get_pseudo_ti_init): Likewise.
3349 * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
3351 2004-04-22 Alan Modra <amodra@bigpond.net.au>
3353 * name-lookup.c (anonymous_namespace_name): Make static.
3355 2004-04-19 Roger Sayle <roger@eyesopen.com>
3358 * class.c (build_base_path): Call fold whilst building the NULL
3359 pointer check expression trees.
3361 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
3363 * init.c (build_new_1): Don't use type size argument for Java
3364 _Jv_AllocObject call.
3366 2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
3368 * method.c (make_alias_for_thunk): Remove preprocessor guard on
3369 declaration and definition.
3371 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
3374 * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
3375 than ASM_OUTPUT_DEF.
3377 2004-04-08 Jakub Jelinek <jakub@redhat.com>
3379 * decl2.c (mark_used): Don't segfault if cfun != NULL but
3380 current_function_decl == NULL.
3382 2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
3385 * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
3388 2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3390 * init.c (decl_constant_value): Don't look at DECL_INITIAL
3392 * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
3393 or TREE_SIDE_EFFECTS of a type.
3395 2004-04-02 Nathan Sidwell <nathan@codesourcery.com>
3398 * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
3399 cv-qualifier unification.
3400 * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
3402 2004-04-02 Jan Hubicka <jh@suse.cz>
3404 * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
3405 * cp-tree.h (cp_update_decl_after_saving): Declare.
3406 * tree.c (cp_update_decl_after_saving): Define.
3408 2004-04-01 Mark Mitchell <mark@codesourcery.com>
3411 * typeck.c (get_delta_difference): Call fold before returning the
3414 2004-04-01 Richard Henderson <rth@redhat.com>
3417 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
3418 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
3420 2004-04-01 Mark Mitchell <mark@codesourcery.com>
3423 * name-lookup.c (maybe_push_cleanup_level): Robustify.
3425 2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3427 * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
3429 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3431 * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
3432 * class.c (check_bitfield_decl): Likewise.
3433 * cvt.c (type_promotes_to): Likewise.
3434 * decl.c (finish_enum): Likewise.
3435 * mangle.c (write_builtin_type): Likewise.
3436 * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
3437 * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
3438 (build_binary_op): Likewise.
3440 2004-03-31 Jan Hubicka <jh@suse.cz>
3442 * tree.h (optimize_function): Kill prototype.
3443 * optimize.c (dump_function, optimize_function, dump_finction): Kill.
3444 * semantics.c (expand_body): Kill.
3446 2004-03-30 Mark Mitchell <mark@codesourcery.com>
3449 * decl.c (start_decl_1): Do not decide whether or not to create a
3450 new cleanup level until after the type has been completed.
3453 * pt.c (tsubst_default_argument): Clear current_function_decl.
3455 2004-03-30 Zack Weinberg <zack@codesourcery.com>
3457 * name-lookup.c, parser.c: Use new shorter form of GTY markers.
3459 2004-03-29 Zack Weinberg <zack@codesourcery.com>
3461 * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
3462 is null, just print the literal name and return.
3464 2004-03-25 Kazu Hirata <kazu@cs.umass.edu>
3466 * cxx-pretty-print.c: Fix comment typos.
3468 2004-03-24 Kazu Hirata <kazu@cs.umass.edu>
3470 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
3473 2004-03-23 Ziemowit Laski <zlaski@apple.com>
3475 * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
3476 * mangle.c (write_type): Add call to 'mangle_fundamental_type'
3479 2004-03-23 Zack Weinberg <zack@codesourcery.com>
3481 PR 12267, 12391, 12560, 13129, 14114, 14133
3482 * cp-lang.c (c_reset_state): Delete.
3483 (push_file_scope, pop_file_scope): New stubs.
3484 * parser.c (c_parse_file): Call sorry() here if called more than once.
3486 2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3488 * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
3491 2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
3493 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
3495 2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
3497 * error.c (enum pad): Remove.
3498 (dump_qualifiers): Likewise.
3499 (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
3500 (dump_aggr_type): Likewise.
3501 (dump_type_suffix): Likewise.
3502 (dump_simple_decl): Likewise.
3503 (dump_function_decl): Likewise.
3504 (cv_to_string): Likewise.
3505 (dump_type_prefix): Likewise. Adjust return void.
3506 * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
3508 (pp_cxx_template_keyword_if_needed): Document.
3509 (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
3510 (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
3511 MUST_NOT_THROW_EXPR.
3513 2004-03-21 Mark Mitchell <mark@codesourcery.com>
3516 * decl.c (cp_finish_decl): Compute the size of arrays declared in
3517 templates, if their type is non-dependent.
3519 2004-03-19 Mark Mitchell <mark@codesourcery.com>
3521 * call.c (build_op_delete_call): Do not forget the placement
3522 arguments when iterating through mutiple delete operators.
3524 * cp-tree.h (svaed_scope): Remove last_parms.
3525 (NEW_DELETE_OPNAME_P): New macro.
3526 (last_function_parms): Remove.
3527 (do_friend): Adjust prototype.
3528 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
3529 using last_function_parms.
3530 (grokfndecl): Take the PARM_DECLs as an argument, rather than
3531 using last_function_parms.
3532 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
3533 for class-specific operator new and operator delete.
3534 (grok_op_properties): Do not look for allocation functions with
3536 (start_function): Use DECL_ARGUMENTS instead of
3537 last_function_parms.
3538 * decl.h (last_function_parms): Do not declare.
3539 * decl2.c (grokclassfn): Do not use last_function_parms.
3540 * friend.c (do_friend): Remove parmdecls parameter.
3541 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
3542 (pop_from_top_level): Do not restore it.
3543 * pt.c (check_explicit_specialization): Do not adjust
3544 last_function_parms.
3546 * name-lookup.c (do_local_using_decl): Create a local binding for
3547 types brought in via using declarations.
3549 * name-lookup.c (lookup_arg_dependent): Handle block-scope
3550 function declarations correctly.
3552 * semantics.c (finish_id_expression): Correct handling of
3553 conversion operators to dependent types.
3555 * typeck.c (lookup_destructor): Allow the use of destructors from
3558 2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3560 * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
3561 TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
3562 * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
3563 the field is named TEMPLATE_TYPE_PARM_INDEX.
3565 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3568 * parser.c (cp_parser_functional_cast): A cast to anything
3569 but integral or enumaration type is not an integral constant
3571 * pt.c (value_dependent_expression_p): Handle cast expressions
3572 without operands (such as "int()").
3574 2004-03-18 Mark Mitchell <mark@codesourcery.com>
3576 * semantics.c (finish_pseudo_destructor_expr): Allow differing
3577 cv-qualification between the type named by the
3578 pseudo-destructor-name and the object-type.
3580 * search.c (accessible_base_p): Handle non-proper bases.
3582 * name-lookup.c (do_nonmember_using_decl): If a using declaration
3583 refers to a single overloaded function, set the type of the
3585 * tree.c (lvalue_type): Simplify.
3586 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
3588 (build_unary_op): Handle OVERLOADs with known types.
3590 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
3593 * parser.c (cp_parser_postfix_expression): Handle the use of
3594 "typename" in non-dependent contexts. Convert appropriately when
3595 when using a qualified name after "->" or ".".
3597 * call.c (conditional_conversion): Honor the requirement that some
3598 conversions refer to the original object.
3600 2004-03-18 Mark Mitchell <mark@codesourcery.com>
3602 * call.c (build_conditional_expr): Do not call force_rvalue for
3603 operands of void_type when the conditional expression itself has
3605 * name-lookup.c (pushdecl): Don't consider a declaration of a
3606 function named "main" to be an overload of a type named "main".
3607 * parser.c (cp_parser_template_name): Perform name lookup when the
3608 template name is proceeded by "template" if the qualifying scope
3610 * typeck.c (composite_pointer_type_r): Correctly handle
3611 pointer-to-member types.
3612 (build_const_cast): Likewise.
3614 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3616 * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
3617 * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
3618 (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
3619 (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
3620 (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
3621 (TYPEOF_TYPE_EXPR): New macro.
3622 * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
3623 * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
3624 * pt.c (tsubst): Likewise.
3625 * semantics.c (finish_typeof): Likewise.
3626 * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
3627 and TEMPLATE_TYPE_PARM.
3628 * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
3629 (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
3631 2004-03-16 Mark Mitchell <mark@codesourcery.com>
3634 * cp-tree.h (build_new_op): Change prototype.
3635 (build_x_binary_op): Likewise.
3636 * call.c (build_new_op): Add overloaded_p parameter.
3637 * decl2.c (grok_array_decl): Adjust call to build_new_op.
3638 * parser.c (cp_parser_binary_expression): Note that uses of
3639 overloaded operators prevents an expression from being considered
3640 an integral constant.
3641 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
3643 * semantics.c (finish_call_expr): Likewise.
3644 * typeck.c (rationalize_conditional_expr): Likewise.
3645 (build_x_indirect_ref): Likewise.
3646 (build_x_binary_op): Likewise.
3647 (build_x_unary_op): Likewise.
3648 (build_x_compound_expr): Likewise.
3649 (build_modify_expr): Likewise.
3650 * typeck2.c (build_x_arrow): Likewise.
3652 2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
3654 * cp-lang.c, ptree.c: Update copyright.
3656 2004-03-13 Mark Mitchell <mark@codesourcery.com>
3659 * parser.c (cp_parser_non_integral_constant_expression): Encode
3660 more of the idiom that surrounded calls to this function within
3662 (cp_parser_primary_expression): Adjust accordingly.
3663 (cp_parser_postfix_expression): Likewise.
3664 (cp_parser_unary_expression): Likewise.
3665 (cp_parser_cast_expression): Likewise.
3666 (cp_parser_assignment_expression): Likewise.
3667 (cp_parser_expression): Likewise.
3668 (cp_parser_new_expression): Note that new-expressions are not
3669 allowed in integral constant expressions.
3670 (cp_parser_delete_expression): Likewise.
3672 2004-03-12 Matt Austern <austern@apple.com>
3674 * decl2.c (maybe_make_one_only): Look at
3675 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
3676 to make an explicit instantiation weak.
3677 * method.c (use_thunk): Make sure we call comdat_linkage
3679 * pt.c (do_type_instantiation): On systems where weak symbols
3680 don't go in a static archive's TOC, explicit instantiation of a
3681 class must imply *explicit* instantiation of its memeber.
3683 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
3685 * call.c, cp-tree.h, pt.c: Fix comment typos.
3687 2004-03-10 Mark Mitchell <mark@codesourcery.com>
3690 * decl.c (xref_tag): Disregard non-type declarations when
3691 looking up a tagged type.
3693 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
3696 * call.c (convert_like_real): Build a const qualified temporary,
3697 when testing ctor access.
3699 2004-03-09 Mark Mitchell <mark@codesourcery.com>
3701 * call.c (initialize_reference): Fix typo.
3703 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3706 * pt.c (determine_specialization): For member templates, match also
3710 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
3712 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
3714 2004-03-09 Mark Mitchell <mark@codesourcery.com>
3717 * call.c (initialize_reference): Handle initializers that are
3718 class-member access expressions applies to rvalues.
3720 2004-03-09 Mark Mitchell <mark@codesourcery.com>
3723 * name-lookup.c (supplement_binding): Ignore functions that are
3724 marked DECL_ANTICIPATED.
3726 2004-03-08 Mark Mitchell <mark@codesourcery.com>
3729 * class.c (check_field_decls): Complain about non-static data
3730 members of reference type in unions. Propagate
3731 CLASSTYPE_REF_FIELDS_NEED_INIT and
3732 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
3734 * init.c (perform_member_init): Complain about mbmers with const
3735 type that are not explicitly initialized.
3737 2004-03-08 Mark Mitchell <mark@codesourcery.com>
3739 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
3740 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
3741 (lang_identifier): Remove implicit_decl and error_locus.
3742 (IDENTIFIER_IMPLICIT_DECL): Remove.
3743 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
3744 (IDENTIFIER_ERROR_LOCUS): Likewise.
3745 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
3746 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
3747 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
3748 (implicitly_declare): Remove.
3749 * decl.c (warn_extern_redeclared_static): Remove check of
3750 IDENTIFIER_IMPLICIT_DECL.
3751 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
3752 (implicitly_declare): Remove.
3753 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
3754 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
3755 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
3756 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
3757 in the innermost scope, rather than at namespace scope.
3758 * name-lookup.c (push_local_binding): Give it external linkage.
3759 (pushdecl): Remove dead code.
3760 * name-lookup.h (push_local_binding): Declare it.
3761 * ptree.c (cxx_print_identifier): Don't print
3762 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
3763 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
3764 not IDENTIFIER_ERROR_LOCUS.
3765 * typeck.c (build_function_call): Remove dead code.
3767 2004-03-08 Jason Merrill <jason@redhat.com>
3770 * decl.c (xref_tag): Remove attribute handling.
3771 * cp-tree.h: Adjust prototype.
3772 * decl.c, parser.c, rtti.c: Adjust callers.
3773 * parser.c (cp_parser_class_head): Pass back attributes in the
3775 (cp_parser_class_specifier): Adjust.
3777 2004-03-08 Matt Austern <austern@apple.com>
3780 * name-lookup.c (add_decl_to_level): Add extern variables, as well
3781 as static, to static_decls array.
3783 2004-03-05 Jason Merrill <jason@redhat.com>
3785 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
3787 2004-03-04 Geoffrey Keating <geoffk@apple.com>
3789 * decl.c (grokfndecl): Update old incorrect comment.
3790 (grokvardecl): Diagnose C++ variables of type with no linkage.
3792 2004-03-01 Mark Mitchell <mark@codesourcery.com>
3795 * pt.c (build_non_dependent_expr): Do not create a
3796 NON_DEPENDENT_EXPR for a THROW_EXPR.
3798 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
3801 * error.c (dump_expr): Handle THROW_EXPR.
3803 2004-03-01 Mark Mitchell <mark@codesourcery.com>
3806 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
3807 lookup if ordinary name-lookup finds a non-function.
3808 * pt.c (tsubst_copy_and_build): Likewise.
3811 * parser.c (cp_parser_late_parsing_default_args): Check that there
3812 are no extra tokens after the end of the default-argument
3815 2004-03-01 Mark Mitchell <mark@codesourcery.com>
3818 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
3819 having C++ linkage for name-mangling purposes.
3822 * parser.c (cp_parser_direct_declarator): Recognize constructor
3823 declarators that use a template-id to name the class being
3827 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
3828 (tsubst_expr): Do not call tsubst_copy, even when
3829 processing_template_decl.
3831 2004-03-01 Jeff Law <law@redhat.com>
3833 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
3836 2004-02-29 Mark Mitchell <mark@codesourcery.com>
3839 * name-lookup.h (push_scope): Change prototype.
3840 * name-lookup.c (push_scope): Do not reenter the current class
3842 * decl.c (grokfndecl): Check return code from push_scope before
3844 * decl2.c (check_classfn): Likewise.
3845 * parser.c (cp_parser_conversion_function_id): Likewise.
3846 (cp_parser_init_declarator): Likewise.
3847 (cp_parser_direct_declarator): Likewise.
3848 (cp_parser_class_specifier): Likewise.
3849 (cp_parser_class_head): Likewise.
3850 (cp_parser_lookup_name): Likewise.
3851 (cp_parser_constructor_declarator_p): Likewise.
3852 * pt.c (instantiate_class_template): Likewise.
3853 (resolve_typename_type): Likewise.
3855 2004-02-29 Mark Mitchell <mark@codesourcery.com>
3858 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
3862 * class.c (update_vtable_entry_for_fn): Do not go through
3863 covariance machinery if the type returned by an overrider is the
3864 same as the original.
3866 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
3868 * call.c: Fix a comment typo.
3870 2004-02-27 Ziemowit Laski <zlaski@apple.com>
3872 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
3874 2004-02-26 Mark Mitchell <mark@codesourcery.com>
3877 * parser.c (cp_parser_parameter_declaration_list): Commit
3878 to fewer tentative parses.
3880 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3883 * pt.c (dependent_type_p_r): A template template parameter is a
3886 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3889 * mangle.c (write_template_arg_literal): Don't rely on identity for
3892 2004-02-24 Jason Merrill <jason@redhat.com>
3894 * tree.c (build_exception_variant): Use check_qualified_type.
3896 2004-02-23 Zack Weinberg <zack@codesourcery.com>
3897 Kazu Hirata <kazu@cs.umass.edu>
3899 * decl.c (cxx_init_decl_processing): Don't check
3900 flag_writable_strings.
3902 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
3905 * typeck.c (maybe_warn_about_returning_address_of_location):
3906 Change check for VAR_DECL to use DECL_P instead.
3908 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3911 * cvt.c (build_expr_type_conversion): Type must be complete before
3912 looking up for conversions.
3914 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3917 * name-lookup.c (arg_assoc_class): Don't look into template
3918 arguments if it is not a primary template.
3920 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3923 * method.c (use_thunk): Always clone function argument tree.
3925 2004-02-20 Mark Mitchell <mark@codesourcery.com>
3928 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
3931 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
3932 for all type variants.
3934 2004-02-19 Mark Mitchell <mark@codesourcery.com>
3937 * decl.c (duplicate_decls): Return error_mark_node for invalid
3939 * name-lookup.c (push_namespace): Ignore the return value from
3941 * pt.c (push_template_decl_real): Robustify.
3944 * name-lookup.c (push_class_level_binding): Do not complain about
3945 adding a binding for a member whose name is the same as the
3946 enclosing class if the member is located in a base class of the
3949 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3952 * parser.c (cp_parser_new_expression): Parse an ill-formed
3953 direct-new-declarator after a parenthesized type-id to emit good
3956 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
3958 * cp-tree.def, cvt.c: Update copyright.
3960 2004-02-17 Mark Mitchell <mark@codesourcery.com>
3963 * cp-tree.h (abi_version_at_least): Remove.
3964 * mangle.c: Include flags.h.
3966 2004-02-15 Mark Mitchell <mark@codesourcery.com>
3969 * call.c (build_conditional_expr): Handle conversions between
3970 class types which result in differently cv-qualified type
3974 * class.c (delete_duplicate_fields_1): Remove.
3975 (delete_duplicate_fields): Likewise.
3976 (finish_struct_anon): Remove check for members with the same name
3977 as their enclosing class.
3978 (check_field_decls): Do not call duplicate_fields.
3979 * decl.c (grokdeclarator): Remove check for static data members
3980 with the same name as their enclosing class.
3981 * name-lookup.c (push_class_level_binding): Check for members with
3982 the same name as their enclosing class.
3984 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
3987 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
3989 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3992 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
3993 has full set of arguments.
3995 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3998 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
4000 2004-02-13 Mark Mitchell <mark@codesourcery.com>
4003 * cp-tree.h (delete_sanity): Change prototype.
4004 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
4005 Remove dead code. Adjust code to warn about deleting an array.
4006 * typekc.c (decay_conversion): Use build_address and build_nop.
4009 * search.c (accessible_p): Do not check access in thunks.
4012 * call.c (build_conditional_expr): Call force_rvalue on the
4013 non-void operand in the case that one result is a throw-expression
4014 and the other is not.
4016 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
4019 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
4020 the type name and look ahead for ::~, and bail out early with a
4021 better error message if the parse is going to fail.
4023 2004-02-12 Mark Mitchell <mark@codesourcery.com>
4025 * call.c (conversion_kind): New type.
4026 (conversion_rank): Likewise.
4027 (conversion): Likewise.
4028 (CONVERSION_RANK): New macro.
4029 (conversion_obstack): New variable.
4030 (obstack_initialized): Likewise.
4031 (z_candidate): Change type of convs and second_conv.
4032 (candidate_warning): New type.
4033 (IDENTITY_RANK): Remove.
4034 (EXACT_RANK): Likewise.
4035 (PROMO_RANK): Likewise.
4036 (STD_RANK): Likewise.
4037 (PBOOL_RANK): Likewise.
4038 (USER_RANK): Likewise.
4039 (ELLIPSIS_RANK): Likewise.
4040 (BAD_RANK): Likewise.
4041 (ICS_RANK): Likewise.
4042 (ICS_STD_RANK): Likewise.
4043 (ICS_USER_FLAG): Likewise.
4044 (ICS_ELLIPSIS_FLAG): Likewise.
4045 (ICS_THIS_FLAG): Likewise.
4046 (ICS_BAD_FLAG): Likewise.
4047 (NEED_TEMPORARY_P): Likewise.
4048 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
4049 (USER_CONV_CAND): Likewise.
4050 (USER_CONV_FN): Likewise.
4051 (conversion_obstack_alloc): New function.
4052 (alloc_conversion): Likewise.
4053 (validate_conversion_obstack): Likewise.
4054 (alloc_conversions): Likewise.
4055 (build_conv): Adjust to deal with new conversion data structures.
4056 (build_identity_conv): New function.
4057 (build_ambiguous_conv): Likewise.
4058 (standard_conversion): Adjust to deal with new conversion data
4060 (convert_class_to_reference): Likewise.
4061 (direct_reference_binding): Likewise.
4062 (reference_binding): Likewise.
4063 (implicit_conversion): Likewise.
4064 (add_candidate): Likewise.
4065 (add_function_candidate): Likewise.
4066 (add_conv_candidate): Likewise.
4067 (build_builtin_candidate): Likewise.
4068 (print_z_candidate): Likewise.
4069 (merge_conversion_sequences): Likewise.
4070 (build_user_type_conversion_1): Likewise.
4071 (build_user_type_conversion): Likewise.
4072 (build_new_function_call): Likewise.
4073 (build_object_call): Likewise.
4074 (conditional_conversion): Likewise.
4075 (build_conditional_expr): Likewise.
4076 (build_new_op): Likewise.
4077 (build_op_delete_call): Likewise.
4078 (convert_like_real): Likewise.
4079 (build_over_call): Likewise.
4080 (build_new_method_call): Likewise.
4081 (is_subseq): Likewise.
4082 (maybe_handle_implicit_object): Likewise.
4083 (maybe_handle_ref_bind): Likewise.
4084 (compare_ics): Likewise.
4085 (source_type): Likewise.
4086 (add_warning): Likewise.
4088 (can_convert_arg): Likewise.
4089 (can_convert_arg_bad): Likewise.
4090 (perform_implicit_conversion): Likewise.
4091 (perform_direct_initialization_if_possible): Likewise.
4092 (initialize_reference): Likewise.
4093 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
4094 * cp-tree.def (WRAPPER): Likewise.
4095 (IDENTITY_CONV): Remove.
4096 (LVALUE_CONV): Likewise.
4097 (QUAL_CONV): Likewise.
4098 (STD_CONV): Likewise.
4099 (PTR_CONV): Likewise.
4100 (PMEM_CONV): Likewise.
4101 (BASE_CONV): Likewise.
4102 (REF_BIND): Likewise.
4103 (USER_CONV): Likewise.
4104 (AMBIG_CONV): Likewise.
4105 (RVALUE_CONV): Likewise.
4106 * cp-tree.h (tree_wrapper): Remove.
4107 (WRAPPER_ZC): Remove.
4108 (lang_tree_node): Remove wrapper.
4109 (LOOKUP_SPECULATIVELY): Remove.
4110 (build_op_delete_call): Adjust prototype.
4111 (validate_conversion_obstack): Declare.
4112 (build_zc_wrapper): Remove.
4113 * cvt.c (convert_to_reference): Remove dead code.
4114 (ocp_convert): Likewise.
4115 * decl.c (redeclaration_error_message): Correct handling of
4117 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
4118 (cp_tree_node_structure): Remove WRAPPER case.
4119 * decl2.c (finish_file): Call validate_conversion_obstack.
4120 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
4121 (build_op_delete_call): Likewise.
4122 (build_x_delete): Likewise.
4123 (build_delete): Adjust call to build_op_delete_call.
4124 * pt.c (tsubst_friend_declaration): Adjust code to determine
4125 whether or not a friend template is a definition.
4126 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
4127 * tree.c (build_zc_wrapper): Remove.
4129 2004-02-12 Zack Weinberg <zack@codesourcery.com>
4131 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
4132 * cp-tree.h: Don't declare cxx_builtin_type_decls.
4133 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
4134 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
4136 2004-02-10 Mark Mitchell <mark@codesourcery.com>
4138 * typeck.c (lookup_destructor): Fix typo in error message.
4140 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
4142 * call.c, parser.c, tree.c: Fix comment typos.
4144 2004-02-07 Zack Weinberg <zack@codesourcery.com>
4147 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
4148 * decl.c (duplicate_decls, start_function): Likewise.
4150 2004-02-07 Zack Weinberg <zack@codesourcery.com>
4152 * name-lookup.c (pushdecl): Issue shadow warnings directly.
4153 * parser.c (free_parser_stacks): Delete.
4155 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
4157 * rtti.c: Update copyright.
4159 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4162 * decl.c (require_complete_types_for_parms): Do not insert
4163 error_mark_node in the parameter list.
4165 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4168 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
4169 error when terminator can not be found.
4171 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
4173 Make-lang.in (po-generated): Delete.
4175 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
4177 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
4178 targetm.calls.promote_prototypes.
4180 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
4184 2004-01-15 Geoffrey Keating <geoffk@apple.com>
4186 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
4187 (handle_pragma_implementation): Likewise.
4189 2004-02-05 Mark Mitchell <mark@codesourcery.com>
4192 * typeck.c (lookup_destructor): Tweak error message.
4194 2004-02-05 Jan Hubicka <jh@suse.cz>
4196 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
4199 2004-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4202 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
4203 code, only emits the diagnostic now. Added lookup of the identifier
4204 and support for qualified ids.
4205 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
4206 Parse an (invalid) type name as id-expression within a declarator.
4207 (cp_parser_simple_declaration): Use it.
4208 (cp_parser_member_declaration): Likewise.
4209 (cp_parser_make_typename_type): New function. Handle errors through
4210 cp_parser_diagnose_invalid_typename.
4211 (cp_parser_elaborated_type_specifier): Use it.
4213 2004-02-04 Mark Mitchell <mark@codesourcery.com>
4216 * call.c (convert_like_real): Use "converting" rather than
4217 "argument" as the descriptive keyword to
4218 dubious_conversion_warnings.
4219 * typeck.c (convert_for_assignment): Do not call
4220 dubious_conversion_warnings.
4222 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4225 * init.c (build_delete): Emit a more informative error message in
4226 case of an incomplete type, and on the correct source line.
4228 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
4230 * error.c, search.c: Update copyright.
4232 2004-02-04 Mark Mitchell <mark@codesourcery.com>
4235 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
4236 linkage for the typeinfo name string.
4238 2004-02-04 Mark Mitchell <mark@codesourcery.com>
4241 * cp-tree.h (fold_non_dependent_expr): New function.
4242 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
4243 (cp_parser_template_argument): Use fold_non_dependent_expr.
4244 (cp_parser_direct_declarator): Likewise.
4245 * pt.c (fold_non_dependent_expr): New function.
4246 (convert_nontype_argument): Use it.
4247 (tsubst_qualified_id): Simplify.
4248 (tsubst_copy_and_build): Likewise.
4250 2004-02-04 Mark Mitchell <mark@codesourcery.com>
4252 * decl.c (cxx_push_function_context): Do not set
4253 current_function_is_thunk.
4254 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
4257 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4260 * pt.c (more_specialized_class): Increase processing_template_decl
4261 while partial ordering.
4263 2004-02-03 Mark Mitchell <mark@codesourcery.com>
4266 * decl.c (start_function): Do not call pushdecl for any
4267 instantiation or specialization of a primary template.
4269 2004-02-03 Mark Mitchell <mark@codesourcery.com>
4272 * parser.c (cp_parser_class_name): Robustify.
4275 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
4278 * semantics.c (finish_id_expression): Do not return an
4279 IDENTIFIER_NODE when lookup finds a PARM_DECL.
4281 2004-02-03 Mark Mitchell <mark@codesourcery.com>
4284 * pt.c (build_non_dependent_expr): Do not build
4285 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
4288 * semantics.c (finish_id_expression): Do not return an
4289 IDENTIFIER_NODE when lookup finds a VAR_DECL.
4292 * parser.c (cp_parser_simple_declaration): When skipping to the
4293 end of the statement swallow the terminating semicolon.
4295 2004-02-02 Mark Mitchell <mark@codesourcery.com>
4298 * init.c (build_offset_ref): Improve error recovery for invalid
4299 uses of non-static member functions.
4302 * cp-tree.h (cp_build_type_attribute_variant): New function.
4303 * class.c (build_clone): Use cp_build_type_attribute_variant.
4304 * decl.c (duplicate_decls): Likewise.
4305 * pt.c (copy_default_args_to_explicit_spec): Likewise.
4306 (tsubst_function_type): Likewise.
4307 * tree.c (build_exception_variant): Check attributes before
4308 concluding that two types are the same.
4309 (cp_build_type-attribute_variant): New method.
4310 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
4313 * call.c (convert_class_to_reference): Keep better track of
4314 pedantically invalid user-defined conversions.
4316 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4319 * pt.c (tsubst_qualified_id): Improved error message when a type
4320 is expected but not found.
4322 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
4324 * class.c: Fix comment typos.
4326 * error.c: Likewise.
4327 * parser.c: Likewise.
4329 * search.c: Likewise.
4330 * typeck.c: Likewise.
4332 2004-01-30 Richard Henderson <rth@redhat.com>
4335 * method.c (use_thunk): Don't force_target_expr for void thunks.
4336 * tree.c (build_target_expr_with_type): Assert non-void type.
4337 (force_target_expr): Likewise.
4339 2004-01-30 Michael Matz <matz@suse.de>
4341 * parser.c (cp_parser_labeled_statement): Accept case ranges.
4343 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4347 * decl.c (grokdeclarator): Check immediatly type completeness for
4348 non-dependent types.
4350 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4353 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
4354 a sizeof expression.block
4356 2004-01-29 Mark Mitchell <mark@codesourcery.com>
4359 * mangle.c (write_encoding): Correct encoding of member template
4362 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4364 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
4365 template name as it was `<::' (digraph typo).
4366 (cp_parser_nth_token_starts_template_argument_list_p): New function.
4367 (cp_parser_id_expression): Use it.
4368 (cp_parser_nested_name_specifier_opt): Likewise.
4369 (cp_parser_template_name): Likewise.
4370 (cp_parser_class_name): Likewise.
4371 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
4373 2004-01-28 Mark Mitchell <mark@codesourcery.com>
4376 * typeck.c (merge_types): Do not merge attributes into
4380 * parser.c (cp_parser_direct_declarator): Do not prevent
4381 backtracking inside a parenthesized declarator.
4382 (cp_parser_parameter_declaration): Fix typo in comment.
4384 2004-01-28 Jan Hubicka <jh@suse.cz>
4386 * semantics.c (expand_body) Do emit_associated_thunks before
4389 2004-01-27 Devang Patel <dpatel@apple.com>
4391 * name-lookup.c: Include "debug.h"
4392 (do_namespace_alias): Invoke debug_hooks to emit debug info
4393 for namespace alias.
4394 (do_local_using_decl): Invoke debug_hooks to emit debug info
4396 (do_class_using_decl): Same.
4397 (do_toplevel_using_decl): Same.
4398 (do_using_directive): Same.
4399 (cp_emit_debug_info_for_using): New function.
4400 * Make-lang.in (cp/parser.o): Depend on debug.h
4401 (cp/name-lookup.o): Same.
4403 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4405 * cp-tree.h (language_function, lang_type_header): Use
4407 * name-lookup.h (cp_binding_level): Likewise.
4409 2004-01-26 Mark Mitchell <mark@codesourcery.com>
4412 * semantics.c (finish_for_expr): Check for unresolved overloaded
4415 * class.c (add_method): Just check processing_template_decl to
4416 determine whether or not we are within a template.
4417 * decl2.c (maybe_retrofit_in_chrg): Likewise.
4418 * init.c (decl_constant_value): Check the type of the declaration,
4420 * name-lookup.c (maybe_push_to_top_level): Rename to ...
4421 (push_to_top_level): ... this.
4422 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
4423 * pt.c (push_template_decl_real): Reorder condition for speed.
4424 (convert_template_argument): Use dependency-checking functions in
4425 place of uses_template_parms.
4426 (lookup_template_class): Avoid calling uses_template_parms more
4428 (uses_template_parms): Reimplement, using dependency-checking
4430 (instantiate_class_template): Use push_to_top_level, not
4431 maybe_push_to_top_level.
4432 (type_unification_real): Simplify.
4433 (type_dependent_expression_p): Handle OFFSET_REFs and
4435 (any_dependent_template_arguments_p): Handle multiple levels of
4437 * semantics.c (expand_or_defer_fn): Do not check
4438 uses_template_parms for template instantiations.
4439 * typeck.c (comptypes): Avoid calling cp_type_quals.
4441 2004-01-25 Mark Mitchell <mark@codesourcery.com>
4444 * call.c (build_over_call): Do not convert arguments when
4445 processing a template.
4446 * pt.c (build_non_dependent_expr): Do not build a
4447 NON_DEPENDENT_EXPR for arithmetic constants.
4449 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4452 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
4453 returns a TYPE_DECL. no further lookup is required.
4454 * semantics.c (check_template_template_default_arg): A TYPE_DECL
4455 is invalid. Rework to give better diagnostics.
4457 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4460 * pt.c (instantiate_class_template): Add an error_mark_node
4462 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
4464 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
4467 * decl.c (finish_function): Move the call to
4468 finish_fname_decls below the call to
4469 finish_eh_spec_block.
4471 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
4473 * optimize.c, typeck2.c: Update copyright.
4475 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
4477 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
4478 init.c, mangle.c, typeck.c: Update copyright.
4480 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
4482 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
4484 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
4486 * Make-lang.in: Replace $(docdir) with doc.
4487 (c++.info, c++.srcinfo): Dummy entry.
4488 (c++.man, c++.srcman): New rules.
4489 (c++.install-man): Revamp rule.
4491 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
4493 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
4494 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
4495 immediate $(shell) instead of deferred backquote.
4497 2004-01-19 Mark Mitchell <mark@codesourcery.com>
4500 * parser.c (cp_parser_postfix_expression): When encountering
4501 incomplete type on left-hand side of "->" or ".", treat the entire
4502 expression as erroneous.
4505 * call.c (build_field_call): Remove.
4506 (n_build_method_call): Likewise.
4507 (build_method_call): Likewise.
4508 (build_new_method_call): Do not call build_field_call.
4509 * class.c (n_build_method_call): Remove.
4510 (print_class_statistics): Do not print it.
4511 * cp-tree.h (build_method_call): Remove declaration.
4512 (finish_object_call_expr): Likewise.
4513 (build_new_1): Do not use build_method_call.
4514 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
4515 when the function appearing on the right-hand-side of "." or "->"
4516 is not actually a function.
4517 * pt.c (tsubst_copy_and_build): Likewise.
4518 * semantics.c (finish_object_call_expr): Remove.
4520 2004-01-18 Mark Mitchell <mark@codesourcery.com>
4523 * pt.c (tsubst): Use finish_typeof.
4525 2004-01-18 Jason Merrill <jason@redhat.com>
4528 * except.c (build_throw): In a template, set
4529 current_function_returns_abnormally.
4531 2004-01-17 Fred Fish <fnf@intrinsity.com>
4534 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
4535 except don't call array_type_nelts() with a VECTOR_TYPE.
4537 2004-01-16 Jan Hubicka <jh@suse.cz>
4539 * mangle.c (write_mangled_name): Remove inline modifier.
4541 2004-01-16 Mark Mitchell <mark@codesourcery.com>
4544 * decl.c (compute_array_index_type): Fix grammar in comment.
4545 * init.c (build_zero_init): Handle zero-sized arrays correctly.
4548 * call.c (name_as_c_string): Print conversion operator names
4552 * call.c (initialize_reference): Pass -1 for inner parameter to
4555 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4558 * parser.c (cp_parser_base_specifier): Check for an invalid
4559 keyword `typename' and emit an user-friendly error message.
4561 2004-01-15 Geoffrey Keating <geoffk@apple.com>
4564 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
4565 (handle_pragma_implementation): Likewise.
4567 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4570 * typeck.c (build_class_member_access_expr): Allow to access members
4571 of the currently open class.
4572 (finish_class_member_access_expr): Likewise.
4574 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
4577 * name-lookup.c (validate_nonmember_using_decl): Take scope and
4578 name by value, instead of computing them.
4579 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
4580 arguments. Pass them to validate_nonmember_using_decl.
4581 * name-lookup.h (do_local_using_decl): Adjust.
4582 (do_toplevel_using_decl): Likewise.
4583 * parser.c (cp_parser_using_declaration): Likewise.
4584 * pt.c (tsubst_expr): Likewise.
4586 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
4590 * name-lookup.c (qualified_lookup_using_namespace): Search
4591 strongly-associated namespaces first, and only then try other
4594 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
4596 * Make-lang.in (c++.srcextra): Dummy entry.
4598 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4601 * parser.c (cp_parser_template_name): Don't try to parse a
4602 conversion-function-id, as it cannot be a template-name.
4603 (cp_parser_simple_type_specifier): Check for invalid template-ids
4604 even after a built-in type.
4606 2004-01-14 Jan Hubicka <jh@suse.cz>
4609 * pt.c (instantiate_decl): Do not increase function_depth.
4611 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
4615 * parser.c (cp_parser_elaborated_type_specifier): Warn about
4616 attributes and discard.
4617 * decl.c (xref_tag): Don't overwite existing attributes with
4620 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4623 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
4624 is no destructor while looking up a BIT_NOT_EXPR.
4626 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
4628 * cxxfilt.c: Remove unused file.
4630 2004-01-14 Jan Hubicka <jh@suse.cz>
4632 Partial fix to PR c++/12850
4633 * decl2.c (mark_used): Do not proactively instantiate templates
4634 when compiling in unit-at-a-time or not optimizing.
4635 * optimize.c (maybe_clone_body): Do not increase function depth.
4637 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4640 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
4642 2004-01-12 Steven Bosscher <stevenb@suse.de>
4645 * parser.c (cp_parser_member_declaration): Any non-type is also
4646 not a class or a function.
4648 2004-01-12 Jason Merrill <jason@redhat.com>
4651 * class.c (build_base_path): Do not mark vtable references as
4653 (build_vtbl_ref_1): Likewise.
4655 2004-01-12 Richard Henderson <rth@redhat.com>
4658 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
4659 (store_init_value): Use it.
4660 * decl.c (check_initializer): Expect full initialization code
4661 from store_init_value.
4662 * init.c (expand_aggr_init_1): Likewise.
4663 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
4665 2004-01-12 Mark Mitchell <mark@codesourcery.com>
4667 * class.c (layout_class_type): For non-POD class types, also copy
4668 the DECL_SIZE and DECL_MODE of fields to the base class type.
4670 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4673 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
4674 calling regenerate_decl_from_template.
4676 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
4679 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
4680 decl-specifier occurring along with a class definition.
4682 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
4684 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
4685 clauses to comments describing declares_class_or_enum.
4686 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
4689 2004-01-12 Jan Hubicka <jh@suse.cz>
4691 * pt.c (for_each_template_parm): Do not check for duplicates.
4692 (for_each_template_parm): Use walk_tree duplicate checking code.
4694 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
4697 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
4698 is error_mark_node, don't add any more decl_specs.
4699 (cp_parser_init_declarator): After committing to a declaration, if
4700 the decl_specifiers start with error_mark_node, issue an error and
4701 change the type to "int".
4703 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
4706 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
4708 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4712 * pt.c (tsubst): Substitution must fail if we are attempting to
4713 create an array with element type that is an abstract class type.
4714 * decl.c (cp_finish_decl): Strip pointers and array types recursively
4715 before calling abstract_virtuals_error.
4717 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
4719 * name-lookup.c (qualified_lookup_using_namespace): Consider
4720 strong using directives even if we've already found a binding.
4722 2004-01-09 Mark Mitchell <mark@codesourcery.com>
4724 * cp-tree.h (cxx_expand_expr): Change prototype.
4725 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
4727 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4730 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
4731 looking into them recursively. They can be there because of the
4732 new __offsetof__ extension.
4734 2004-01-07 Zack Weinberg <zack@codesourcery.com>
4736 * parser.c (cp_parser_save_member_function_body): Mark the
4739 2004-01-05 Mark Mitchell <mark@codesourcery.com>
4742 * class.c (build_clone): Copy type attributes from the original
4743 function to the clone.
4746 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
4747 references as constant.
4750 * parser.c (cp_parser_explicit_instantiation): Improve error
4752 (cp_parser_require): Improve indication of the error location.
4755 * parser.c (cp_parser_class_head): Reorder logic to check for
4756 invalid qualification.
4758 2004-01-04 Mark Mitchell <mark@codesourcery.com>
4761 * name-lookup.c (lookup_using_namespace): Remove spacesp
4763 (unqualified_namespace_lookup): Likewise.
4764 (lookup_qualified_name): Adjust accordingly.
4765 (lookup_name_real): Likewise.
4766 (lookup_arg_dependent): Do not eliminate the namespace of the
4767 functions found by unqualified name lookup unless that is the
4770 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
4772 * semantics.c (push_deferring_access_checks): Fix format.
4773 (resume_deferring_access_checks): Likewise.
4774 (stop_deferring_access_checks): Likewise.
4775 (pop_deferring_access_checks): Likewise.
4776 (get_deferred_access_checks): Likewise.
4777 (pop_to_parent_deferring_access_checks): Likewise.
4778 (perform_deferred_access_checks): Likewise.
4779 (perform_or_defer_access_check): Likewise.
4781 2004-01-04 Richard Henderson <rth@redhat.com>
4783 * call.c (build_over_call): Don't create a save_expr of an
4784 aggregate, but rather its address.
4786 2004-01-04 Mark Mitchell <mark@codesourcery.com>
4789 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
4790 an offsetof expression.
4792 * parser.c (cp_parser_parameter_declaration): Fix comment.
4795 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
4796 (reference_binding): Set it when appropriate.
4797 (build_temp): New function, split out from ...
4798 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
4799 (initialize_reference): Likewise.
4802 * parser.c (cp_parser): Add in_type_id_in_expr_p.
4803 (cp_parser_new): Initialize it.
4804 (cp_parser_postfix_expression): Set it.
4805 (cp_parser_sizeof_operand): Likewise.
4806 (cp_parser_parameteR_declaration): Do not commit early to tenative
4807 parsers when in_type_id_in_expr_p is set.
4809 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4812 * parser.c (cp_parser_template_argument): Don't call
4813 make_unbound_class_template directly.
4814 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
4815 UNBOUND_CLASS_TEMPLATE tree node.
4817 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
4820 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
4822 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4825 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
4826 (DECL_FUNCTION_TEMPLATE_P): Use it.
4827 (DECL_CLASS_TEMPLATE_P): Likewise.
4828 * parser.c (cp_parser_lookup_name): Add is_template parameter.
4829 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
4830 (cp_parser_template_name): Likewise.
4831 (cp_parser_elaborated_type_specifier): Likewise.
4832 (cp_parser_namespace_name): Likewise.
4833 (cp_parser_class_name): Likewise.
4834 (cp_parser_lookup_name_simple): Likewise.
4836 See ChangeLog.3 for earlier changes.