1 2004-09-20 Steven Bosscher <stevenb@suse.de>
3 * lex.c (cxx_init): Don't set the ridpointer for RID_NULL
6 2004-09-19 Mark Mitchell <mark@codesourcery.com>
8 * decl2.c (determine_visibility): Allow class visibility
9 directives to override targetm.cxx.export_class_data.
11 2004-09-18 Kazu Hirata <kazu@cs.umass.edu>
13 * call.c, semantics.c: Follow spelling conventions.
14 * class.c: Fix a comment typo.
16 2004-09-16 Geoffrey Keating <geoffk@apple.com>
19 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
20 (handle_pragma_implementation): Likewise.
22 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
23 Zack Weinberg <zack@codesourcery.com>
25 * cp-tree.def: Use tree_code_class enumeration constants
26 instead of code letters.
27 * call.c, class.c, cp-gimplify.c, cp-lang.c, cxx-pretty-print.c
28 * mangle.c, pt.c, semantics.c, tree.c, typeck.c:
29 Update for new tree-class enumeration constants.
31 2004-09-16 Mark Mitchell <mark@codesourcery.com>
34 * parser.c (cp_parser_simple_declaration): Commit to tentative
35 parses after seeing a decl-specifier.
36 (cp_parser_simple_declaration): Eliminate spurious message.
37 (cp_parser_init_declarator): Adjust error message.
40 * lex.c (unqualified_name_lookup_error): Mark the dummy
44 * parser.c (cp_parser_nested_name_specifier): Do not resolve
45 typename types if the user explicitly said "typename".
47 2004-09-16 Andrew MacLeod <amacleod@redhat.com>
49 * error.c (dump_decl): Make sure there is lang_specific info before
50 checking for DTOR and CTOR decls.
52 2004-09-16 Nathan Sidwell <nathan@codesourcery.com>
54 * class.c (copy_virtuals): Remove.
55 (build_primary_vtable): Use copy_list directly.
56 (build_secondary_vtable): Likewise.
57 (update_vtable_entry_for_fn): Clear BV_CALL_INDEX here.
58 (create_vtable_ptr): Likewise.
60 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
62 * search.c: Follow spelling conventions.
64 2004-09-16 Nathan Sidwell <nathan@codesourcery.com>
66 * cp-tree.h (struct lang_type_class): Make pure_virtuals a
68 (CLASSTYPE_INLINE_FRIENDS, CLASSTYPE_PURE_VIRTUALS): Update
70 * call.c (build_new_method_call): Don't confirm a pure virtual is
71 in CLASSTYPE_PURE_VIRTUALS. Reorder checks. Make it a warning.
72 * class.c (check_methods): CLASSTYPE_INLINE_FRIENDS is a VEC(tree).
73 (fixup_inline_methods, finish_struct): Likewise.
74 * decl.c (finish_method): Likewise.
75 * search.c (dfs_get_pure_virtuals, get_pure_virtuals):
76 CLASSTYPE_PURE_VIRTUALS is a VEC(tree).
77 * typeck2.c (abstract_virtuals_error): Likewise. Truncate the
78 vector to avoid repeating the list in error messages.
80 2004-09-15 Mark Mitchell <mark@codesourcery.com>
82 * cp-objcp-common.h (LANG_HOOKS_COMDAT_GROUP): Define.
83 * cp-tree.h (cxx_comdat_group): Declare.
84 * decl.c (cxx_comdat_group): New function.
86 2004-09-15 Nathan Sidwell <nathan@codesourcery.com>
88 * search.c (get_pure_virtuals): Remove unused variables.
90 * cp-tree.h (struct lang_decl_flags): Remove
91 needs_final_overrider.
92 (DECL_NEEDS_FINAL_OVERRIDER_P): Remove.
93 * decl.c (duplicate_decls): Do not copy DECL_NEEDS_FINAL_OVERRIDER_P.
94 * class.c (finish_struct_bits): Correct comment about
95 CLASSTYPE_PURE_VIRTUALS.
96 * search.c (get_pure_virtuals): Remove useless loop.
98 2004-09-14 Mark Mitchell <mark@codesourcery.com>
101 * mangle.c (partially_mangled_name): New variable.
102 (partially_mangled_name_len): Likewise.
103 (save_partially_mangled_name): New function.
104 (restore_partially_mangled_name): Likewise.
105 (write_encoding): Save and restore partially mangled names around
106 calls to get_mostly_instantiated_function_type.
107 (write_unqualified_name): Likewise.
109 2004-09-14 Nathan Sidwell <nathan@codesourcery.com>
111 * pt.c (unify): Replace gcc_unreachable with gcc_assert.
113 2004-09-13 Mark Mitchell <mark@codesourcery.com>
116 * parser.c (cp_parser_id_expression): Correct value for
118 (cp_parser_nested_name_specifier_opt): Look through typenames as
120 (cp_parser_template_name): Honor check_dependency_p.
123 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name):
127 * pt.c (unify): Add ENUMERAL_TYPE case. Replace sorry with
130 2004-09-12 Richard Henderson <rth@redhat.com>
133 * semantics.c (maybe_cleanup_point_expr): Don't call fold.
134 * typeck.c (condition_conversion): Likewise.
136 2004-09-11 Richard Henderson <rth@redhat.com>
139 * pt.c (cur_stmt_expr): Move from tsubst_expr.
140 (tsubst_expr) <case STMT_EXPR>: Move ...
141 (tsubst_copy_and_build): ... here.
143 2004-09-10 Zack Weinberg <zack@codesourcery.com>
145 * cp-tree.h (interface_only, interface_unknown): Delete declarations;
146 comment explaining them moved to c-common.h.
147 * lex.c (interface_only, interface_unknown, extract_interface_info):
149 (cxx_finish): Don't reset interface_unknown.
150 (handle_pragma_interface): Don't set interface_only and
151 interface_unknown; just the like-named fields in finfo.
152 (handle_pragma_implementation): Adjust comment.
153 * decl2.c (cp_finish_file): Don't reset interface_only and
155 * method.c (synthesize_method): Don't reset interface_unknown or
156 call extract_interface_info.
157 * pt.c (pop_tinst_level): Don't call extract_interface_info.
158 * decl.c (start_cleanup_fn): Don't save or restore interface_only
159 and interface_unknown.
160 (make_rtl_for_nonlocal_decl): Call get_fileinfo on input_filename
161 and use the result instead of the interface_only/interface_unknown
163 (start_preparsed_function): Likewise.
164 * lex.c (cxx_make_type): Likewise.
165 * semantics.c (begin_class_definition): Likewise.
166 (expand_body): Don't call extract_interface_info.
168 2004-09-10 Ziemowit Laski <zlaski@apple.com>
170 * decl.c (objc_mark_locals_volatile): Make description of
171 routine more descriptive; only mark VAR_DECLs at each
174 2004-09-10 Richard Henderson <rth@redhat.com>
177 * call.c (build_vfield_ref): Move...
178 * class.c (build_vfield_ref): ... here. Convert datum to the
179 primary base containing the vptr.
180 (make_new_vtable): Simplify build_primary_vtable arguments.
181 (finish_struct_1): Do not duplicate TYPE_VFIELD.
182 * typeck.c (build_class_member_access_expr): Don't warn for
183 null object access to base fields.
185 2004-09-10 Ziemowit Laski <zlaski@apple.com>
187 * decl.c (objc_get_current_scope, objc_mark_locals_volatile):
188 New functions, to be called from ObjC++.
190 2004-09-10 Kazu Hirata <kazu@cs.umass.edu>
192 * class.c, cp-tree.h, decl.c, decl2.c, mangle.c,
193 name-lookup.h, parser.c, search.c, semantics.c, typeck2.c: Fix
196 2004-09-09 Ziemowit Laski <zlaski@apple.com>
198 * typeck.c (build_c_cast): Preserve the cast if casting
199 to and from an Objective-C type.
201 2004-09-09 Ziemowit Laski <zlaski@apple.com>
203 * Make-lang.in (cp/typeck.o): Depend on c-common.h.
204 * typeck.c: Include c-common.h.
205 (comptypes): For RECORD_TYPEs, call objc_comptypes() and
206 return the result if nonnegative.
208 2004-09-09 Zack Weinberg <zack@codesourcery.com>
210 * decl2.c (import_export_class)
211 * lex.c (handle_pragma_interface):
212 Test MULTIPLE_SYMBOL_SPACES with if, not #ifdef.
214 2004-09-08 Ziemowit Laski <zlaski@apple.com>
216 * Make-lang.in (cp/semantics.o): Depend on c-common.h.
217 * semantics.c: Include c-common.h.
218 (finish_compound_stmt): Call objc_clear_super_receiver().
220 2004-09-08 Ziemowit Laski <zlaski@apple.com>
222 * cp-tree.h (do_poplevel): New prototype.
223 * semantics.c (do_poplevel): Make externally visible.
225 2004-09-08 Nathan Sidwell <nathan@codesourcery.com>
227 * cp-tree.h (tree_pair_s): Define a GC'd vector.
228 * name-lookup.h (cxx_saved_binding, cp_class_binding): Likewise.
229 * semantics.c (deferred_access): Likewise.
231 2004-09-06 Daniel Jacobowitz <dan@debian.org>
233 * semantics.c (expand_body): Assert that we are not nested.
235 2004-09-06 Zack Weinberg <zack@codesourcery.com>
237 * decl.c (build_enumerator): Use add_double and int_fits_type_p
238 instead of cp_build_binary_op, to avoid creating short-lived trees.
239 * parser.c (cp_parse_type_specifier <RID_ENUM>): Use two-token
240 lookahead instead of backtracking. Move some code to avoid a
242 (cp_parser_enum_specifier): Avoid duplication of effort with caller.
243 Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
244 (cp_parser_enumerator_list, cp_parser_enumerator_definition):
245 Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
247 2004-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
249 * decl.c (grok_declarator): Remove a redundant semicolon.
251 * parser.c (cp_parser_decl_specifier_seq, cp_parser_type_specifier):
252 Correct comments describing function parameters.
254 2004-09-03 Matt Austern <austern@apple.com>
255 Compile speed improvement.
256 * parser.c (cp_lexer_print_token): Only define if ENABLE_CHECKING set.
257 Otherwise define a stub macro that expands to nothing.
258 (cp_lexer_debugging_p): Only define if ENABLE_CHECKING set. Otherwise
259 define a stub macro that expands to 0.
260 (cp_lexer_start_debugging): Only define if ENABLE_CHECKING set.
261 (cp_lexer_stop_debugging): Likewise.
262 (cp_lexer_debug_stream): Only define if ENABLE_CHECKING set. Otherwise
263 define a stub macro that expands to NULL.
264 (cp_lexer_new_main): Only set debugging_p if ENABLE_CHECKING set.
265 (cp_lexer_new_from_tokens): Likewise.
267 2004-09-03 Jan Hubicka <jh@suse.cz>
269 * decl.c (finish_function): Clean out pointers we no longer need.
271 2004-09-03 Jan Beulich <jbeulich@novell.com>
273 * g++spec.c (MATH_LIBRARY_PROFILE): Default to MATH_LIBRARY rather
276 2004-09-02 Paul Brook <paul@codesourcery.com>
278 * decl2.c (determine_visibility): Only check data visibility
281 2004-08-31 Mark Mitchell <mark@codesourcery.com>
283 * cp-tree.h (DECL_CONSTRUCTION_VTABLE_P): New macro.
284 * class.c (build_ctor_vtbl_group): Set DECL_CONSTRUCTION_VTABLE_P.
285 * decl2.c (determine_visibility): Honor
286 TARGET_CXX_EXPORT_CLASS_DATA.
288 * class.c (key_method): Rename to ...
289 (determine_key_method): ... this.
290 (finish_struct_1): Adjust accordingly.
291 * cp-tree.h (key_method): Declare.
292 * decl2.c (maybe_emit_vtables): Determine the key method here if
293 it has not already been done.
295 2004-08-31 Ziemowit Laski <zlaski@apple.com>
297 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-objcp-common.o.
298 (cp/cp-lang.o): Depend on debug.h, gtype-cp.h and cp/cp-objcp-common.h.
299 (cp/cp-decl.c): Do not depend on gtype-cp.h.
300 (cp/cp-objcp-common.o): New target.
301 * cp-lang.c: Include debug.h, cp-objcp-common.h and gtype-cp.h.
302 (cxx_get_alias_set, cxx_warn_unused_global_decl, cp_expr_size,
303 cp_tree_size, cp_var_mod_type_p, cxx_initialize_diagnostics): Move
304 prototypes and definitions to cp-objcp-common.h and cp-objcp-common.c,
306 (LANG_HOOKS_TREE_SIZE, LANG_HOOKS_FINISH,
307 LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_INIT_OPTIONS,
308 LANG_HOOKS_INITIALIZE_DIAGNOSTICS, LANG_HOOKS_HANDLE_OPTION,
309 LANG_HOOKS_HANDLE_FILENAME, LANG_HOOKS_MISSING_ARGUMENT,
310 LANG_HOOKS_POST_OPTIONS, LANG_HOOKS_GET_ALIAS_SET,
311 LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_EXPAND_EXPR,
312 LANG_HOOKS_EXPAND_DECL, LANG_HOOKS_PARSE_FILE,
313 LANG_HOOKS_DUP_LANG_SPECIFIC_DECL, LANG_HOOKS_TRUTHVALUE_CONVERSION,
314 LANG_HOOKS_SET_DECL_ASSEMBLER_NAME, LANG_HOOKS_MARK_ADDRESSABLE,
315 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
316 LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
317 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_PRINT_ERROR_FUNCTION,
318 LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL, LANG_HOOKS_WRITE_GLOBALS,
319 LANG_HOOKS_FUNCTION_INIT, LANG_HOOKS_FUNCTION_FINAL,
320 LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P,
321 LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE,
322 LANG_HOOKS_ATTRIBUTE_TABLE, LANG_HOOKS_TREE_INLINING_WALK_SUBTREES,
323 LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN,
324 LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS,
325 LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P,
326 LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P,
327 LANG_HOOKS_TREE_INLINING_VAR_MOD_TYPE_P,
328 LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN,
329 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN, LANG_HOOKS_EXPR_SIZE,
330 LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR,
331 LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, LANG_HOOKS_MAKE_TYPE,
332 LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE,
333 LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
334 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE, LANG_HOOKS_INCOMPLETE_TYPE_ERROR,
335 LANG_HOOKS_TYPE_PROMOTES_TO, LANG_HOOKS_REGISTER_BUILTIN_TYPE,
336 LANG_HOOKS_GIMPLIFY_EXPR, LANG_HOOKS_FOLD_OBJ_TYPE_REF): Move
337 hooks to cp-objcp-common.h.
338 (finish_file): New function.
339 * cp-objcp-common.c: New file.
340 * cp-objcp-common.h: New file.
341 * cp-tree.h (cp_finish_file): New prototype.
342 * decl.c: Do not include gtype-cp.h.
343 * decl2.c (finish_file): Rename to cp_finish_file.
345 2004-08-31 Richard Henderson <rth@redhat.com>
348 * pt.c (tsubst_expr): Move OFFSETOF_EXPR handling ...
349 (tsubst_copy_and_build): ... here.
351 2004-08-30 Mark Mitchell <mark@codesourcery.com>
353 * cp-tree.h (initialize_artificial_var): Declare.
354 * decl.c (initialize_artifical_var): New function.
355 * class.c (initialize_array): Remove.
356 (initialize_vtable): Use initialize_artificial_var.
357 (build_vtt): Likewise.
358 (build_ctor_vtbl_group): Likewise.
360 2004-08-30 Richard Henderson <rth@redhat.com>
362 * class.c (build_base_path): Use build_address directly.
363 * typeck.c (build_unary_op): Don't lower &a.b to pointer
365 * typeck2.c (store_init_value): Don't assume !TREE_CONSTANT
366 means !initializer_constant_valid_p.
368 2004-08-30 Richard Henderson <rth@redhat.com>
370 * class.c (fixed_type_or_null): Use get_base_address before
371 assuming an ADDR_EXPR is non-null.
373 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
375 * name-lookup.c (pop_binding, pushdecl,
376 set_identifier_type_value_with_scope, push_overloaded_decl,
377 arg_assoc_type): Replace abort with gcc_assert or gcc_unreachable.
378 * parser.c (cp_parser_diagnose_invalid_type_name,
379 cp_parser_postfix_expression, cp_parser_unary_expression,
380 cp_parser_check_declarator_template_para): Likewise.
381 * pt.c (push_inline_template_parms_recursive,
382 check_explicit_specialization, convert_nontype_argument,
383 coerce_template_template_parms, uses_template_parms,
384 instantiate_class_template, tsubst_decl, tsubst, tsubst_copy,
385 tsubst_expr, instantiate_template,
386 maybe_adjust_types_for_deduction, type_unification_real,
387 resolve_overloaded_unification, template_decl_level,
388 type_dependent_expression_p): Likewise.
389 * search.c (lookup_base_r): Likewise.
390 * semantics.c (finish_stmt_expr, simplify_aggr_init_expr): Likewise.
391 * tree.c (lvalue_p_1, count_functions, cxx_printable_name,
392 verify_stmt_tree_r, get_type_decl, stabilize_call): Likewise.
393 * typeck.c (common_type, get_member_function_from_ptrfunc,
394 build_binary_op, build_unary_op, expand_ptrmemfunc_cst): Likewise.
395 * typeck2.c (cxx_incomplete_type_diagnostic,
396 split_nonconstant_init_1, store_init_value,
397 process_init_constructor): Likewise.
399 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
401 * call.c (check_dtor_name): Replace abort with gcc_assert or
403 (build_call, add_builtin_candidate, build_new_op,
404 convert_like_real, build_over_call, in_charge_arg_for_name,
405 source_type, joust): Likewise.
406 * class.c (build_simple_base_path, get_vcall_index,
407 finish_struct_1, instantiate_type, get_enclosing_class,
408 add_vcall_offset_vtbl_entries_1, cp_fold_obj_type_ref): Likewise.
409 * cp-gimplify.c (cp_genericize): Likewise.
410 * cp-lang.c (cp_expr_size, cp_tree_size): Likewise.
411 * cvt.c (cp_convert_to_pointer, ocp_convert): Likewise.
412 * decl.c (poplevel, make_unbound_class_template, reshape_init,
413 check_special_function_return_type, grokdeclarator,
414 grok_op_properties, tag_name, xref_tag, start_preparsed_function,
415 finish_function): Likewise.
416 * decl2.c (grokfield, maybe_emit_vtables):Likewise.
417 * error.c (dump_global_iord, dump_decl, dump_template_decl,
418 language_to_string): Likewise.
419 * except.c (choose_personality_routine): Likewise.
420 * friend.c (do_friend): Likewise.
421 * g++spec.c (lang_specific_driver): Likewise.
422 * init.c (build_zero_init, expand_default_init, build_new_1,
423 build_vec_delete_1, build_vec_init, build_dtor_call): Likewise.
424 * lex.c (retrofit_lang_decl, cp_type_qual_from_rid): Likewise.
425 * mangle.c (add_substitution, write_unscoped_name,
426 write_template_prefix, write_identifier,
427 write_special_name_destructor, write_type, write_builtin_type,
428 write_expression, write_template_param,
429 write_java_integer_type_codes): Likewise.
430 * method.c (implicitly_declare_fn): Likewise.
432 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
434 * cp-tree.h (BINFO_PRIMARY_P): Use a binfo flag.
435 (BINFO_INDIRECT_PRIMARY_P): Remove.
436 * class.c (determine_primary_base): Rename to ...
437 (determine_primary_bases): ... here. Set all primary bases.
438 (set_primary_base): Remove.
439 (mark_primary_bases): Remove.
440 (build_simple_base_path, walk_subobject_offsets,
441 propagate_binfo_offsets, end_of_class): Adjust.
442 (layout_class_type): Rename determine_primary_base call.
443 (dump_class_hierarchy_r, dump_vtable): Adjust. Don't pass a binfo
445 (dfs_build_secondary_vptr_vtt_inits, dfs_accumulate_vtbl_inits,
446 build_rtti_vtbl_entries): Adjust.
447 * init.c (build_vtbl_address): Adjust.
449 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Use gcc_assert.
451 2004-08-28 Ziemowit Laski <zlaski@apple.com>
453 * Make-lang.in (CXX_OBJS): Split up into CXX_OBJS and
455 (CXX_C_OBJS): Include in CXX_AND_OBJCXX_OBJS instead of listing
456 separately on the link line.
458 2004-08-28 Jason Merrill <jason@redhat.com>
460 * decl.c (expand_static_init): Avoid bogus warnings.
462 2004-08-27 Jason Merrill <jason@redhat.com>
465 * tree.c (stabilize_init): See through a COMPOUND_EXPR.
468 * decl.c (expand_static_init): Use thread-safety API.
469 (register_dtor_fn): Return the call, don't expand it.
470 * tree.c (add_stmt_to_compound): New fn.
471 (stabilize_call): Use it.
473 2004-08-27 Richard Henderson <rth@redhat.com>
475 * cp-tree.def (OFFSETOF_EXPR): New.
476 * parser.c (cp_parser_builtin_offsetof): Either built an
477 OFFSETOF_EXPR, or call fold_offsetof immediately.
478 * pt.c (tsubst_expr): Handle OFFSETOF_EXPR.
480 2004-08-27 Nathan Sidwell <nathan@codesourcery.com>
482 * call.c (validate_conversion_obstack): Replace
483 my_friendly_assert with gcc_assert or gcc_unreachable.
484 (direct_reference_binding, merge_conversion_sequences,
485 build_user_type_conversion_1, perform_overload_resolution,
486 build_op_delete_call, enforce_access, call_builtin_trap,
487 build_over_call, build_special_member_call, build_new_method_call,
488 initialize_reference): Likewise.
489 * class.c (build_base_path, build_primary_vtable, alter_access,
490 check_bases, update_vtable_entry_for_fn, layout_empty_base,
491 clone_function_decl, adjust_clone_args,
492 type_requires_array_cookie, include_empty_classes,
493 finish_struct_1, resolve_address_of_overloaded_function,
494 instantiate_type, get_vtbl_decl_for_binfo, build_vtt_inits,
495 dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
496 accumulate_vtbl_inits, build_vtbl_initializer,
497 build_vbase_offset_vtbl_entries, build_rtti_vtbl_entries): Likewise.
498 * cvt.c (build_up_reference, convert_to_reference): Likewise.
499 * decl.c (poplevel, duplicate_decls, make_typename_type,
500 cxx_init_decl_processing, reshape_init, check_initializer,
501 make_rtl_for_nonlocal_decl, initialize_local_var, cp_finish_decl,
502 expand_static_init, grokfndecl, grokvardecl, build_ptrmem_type,
503 grokdeclarator, copy_fn_p, grok_op_properties, xref_tag,
504 xref_basetypes, start_preparsed_function, save_function_data,
505 finish_function, finish_method, maybe_register_incomplete_var,
506 complete_vars): Likewise.
507 * decl2.c (grok_array_decl, check_member_template,
508 check_classfn, finish_static_data_member_decl, coerce_new_type,
509 coerce_delete_type, import_export_class, decl_needed_p,
510 determine_visibility, import_export_decl, build_cleanup,
511 start_static_initialization_or_destructi, do_static_destruction,
512 prune_vars_needing_no_initialization,
513 build_offset_ref_call_from_tree): Likewise.
514 * error.c (dump_decl, dump_expr): Likewise.
515 * init.c (finish_init_stmts, build_zero_init,
516 expand_virtual_init, expand_default_init, expand_aggr_init_1,
517 build_offset_ref, build_new_1, build_delete, build_vbase_delete):
519 * mangle.c (write_method_parms, write_template_args,
520 write_expression, write_template_arg): Likewise.
521 * method.c (make_thunk, finish_thunk, use_thunk): Likewise.
522 * name-lookup.c (pop_binding, begin_scope, leave_scope,
523 resume_scope, push_using_decl, validate_nonmember_using_decl,
524 is_ancestor, poplevel_class, set_inherited_value_binding_p,
525 push_class_level_binding, do_class_using_decl, push_namespace,
526 pop_namespace, add_using_namespace, ambiguous_decl,
527 lookup_namespace_name, lookup_type_current_level,
528 maybe_process_template_type_declaration): Likewise.
529 * parser.c (cp_lexer_peek_nth_token,
530 cp_parser_parse_and_diagnose_invalid_typ,
531 cp_parser_translation_unit, cp_parser_template_id,
532 cp_parser_lookup_name, cp_parser_late_parsing_for_member): Likewise.
533 * pt.c (push_access_scope, finish_member_template_decl,
534 push_inline_template_parms_recursive, add_outermost_template_args,
535 get_innermost_template_args, begin_explicit_instantiation,
536 end_explicit_instantiation, retrieve_specialization,
537 is_specialization_of, is_specialization_of_friend,
538 register_specialization, check_explicit_specialization,
539 comp_template_parms, process_template_parm,
540 process_partial_specialization, convert_nontype_argument,
541 coerce_template_template_parms, coerce_template_parms,
542 mangle_class_name_for_template, lookup_template_function,
543 lookup_template_class, instantiate_class_template, tsubst_decl,
544 tsubst_function_type, tsubst, tsubst_qualified_id, tsubst_copy,
545 instantiate_template, fn_type_unification, type_unification_real,
546 get_template_base, regenerate_decl_from_template,
547 template_for_substitution, instantiate_decl,
548 get_mostly_instantiated_function_type, dependent_scope_ref_p,
549 value_dependent_expression_p, resolve_typename_type): Likewise.
550 * repo.c (repo_emit_p): Likewise.
551 * rtti.c (build_headof, get_tinfo_decl, get_pseudo_ti_init,
552 create_tinfo_types, emit_tinfo_decl): Likewise.
553 * search.c (lookup_base_r, lookup_base, lookup_field_1,
554 dfs_access_in_type, build_baselink, lookup_member,
555 adjust_result_of_qualified_name_lookup, copied_binfo): Likewise.
556 * semantics.c (perform_or_defer_access_check,
557 finish_non_static_data_member, finish_stmt_expr_expr,
558 finish_stmt_expr, finish_call_expr, finish_pseudo_destructor_expr,
559 finish_template_template_parm, finish_member_declaration,
560 emit_associated_thunks): Likewise.
561 * tree.c (build_target_expr_with_type, force_target_expr,
562 copy_binfo, get_first_fn, cp_tree_equal): Likewise.
563 * typeck.c (type_after_usual_arithmetic_conversions, comptypes,
564 cxx_sizeof_or_alignof_type, perform_integral_promotions,
565 build_class_member_access_expr, finish_class_member_access_expr,
566 build_ptrmemfunc_access_expr, build_unary_op,
567 unary_complex_lvalue, cxx_mark_addressable, build_modify_expr,
568 build_ptrmemfunc, expand_ptrmemfunc_cst, check_return_expr
569 * typeck2.c (complete_type_check_abstract,
570 abstract_virtuals_error, process_init_constructor,
571 add_exception_specifier): Likewise.
573 2004-08-27 Nathan Sidwell <nathan@codesourcery.com>
575 * class.c (build_vtbl_initializer): Use ssize_int.
576 * decl.c (complete_array_type): Likewise.
577 * method.c (finish_thunk): Likewise.
578 * search.c (get_dynamic_base_type): Likewise.
580 2004-08-26 Richard Henderson <rth@redhat.com>
582 * cp-tree.h (DECL_FIELD_IS_BASE): New.
583 * class.c (build_base_field): Set it.
584 (build_simple_base_path): Use it.
585 (fixed_type_or_null): Don't consider base fields definitive.
587 2004-08-25 Roger Sayle <roger@eyesopen.com>
590 PR tree-optimization/16372
591 * decl.c (finish_enum): Make the precision of the enumerated type
592 the same width as the underlying integer type.
594 2004-08-25 Mark Mitchell <mark@codesourcery.com>
597 * lex.c (build_lang_decl): Set DECL_NO_STATIC_CHAIN for all C++
600 * mangle.c (get_identifier_nocopy): Add cast.
602 * cp-tree.h (mangle_type): Remove.
603 * mangle.c (globals): GTY it.
604 (mangle_obstack): New variable.
605 (name_obstack): Likewise.
606 (name_base): Likewise.
607 (write_char): Adjust accordingly.
608 (write_chars): Likewise.
609 (write_string): Likewise.
610 (start_mangling): Initialize G.substitutions only one. Add
612 (finish_mangling): Use VARRAY_CLEAR to reclaim
613 storage in G.substitutions. Use obstack_finish.
614 (init_mangle): Adjust for changes to variable names above.
615 Initialize G.substitutions.
616 (mangle_decl_string): Adjust call to start_mangling.
617 (get_identifier_nocopy): New function.
618 (mangle_decl): Use it.
619 (mangle_type_string): Adjust call to start_mangling.
620 (mangle_special_for_type): Likewise.
621 (mangle_vtt_for_type): Likewise.
622 (mangle_ctor_vtbl_for_type): Likewise.
623 (mangle_thunk): Likewise.
624 (mangle_guard_variable): Likewise.
625 (mangle_ref_init_variable): Likewise.
627 2004-08-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
630 * pt.c (redeclare_class_template): Check the type of non-type and
631 template template parameter.
633 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
635 * call.c (convert_class_to_reference): Adjust build_int_cst calls.
636 (build_user_type_conversion_1, convert_like_real,
637 build_java_interface_fn_ref, build_special_member_call): Likewise.
638 * class.c (finish_struct_1, build_vtbl_initializer): Likewise.
639 * cp-gimplify.c (cp_gimplify_expr): Likewise.
640 * cvt.c (cp_convert_to_pointer): Likewise.
641 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
642 * decl2.c (start_static_initialization_or_destruction,
643 generate_ctor_or_dtor_function): Likewise.
644 * except.c (build_throw): Likewise.
645 * mangle.c (write_integer_cst): Likewise.
646 * method.c (finish_thunk): Likewise.
647 * rtti.c (build_headof, get_tinfo_decl_dynamic,
648 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
649 get_pseudo_ti_init): Likewise.
650 * search.c (get_dynamic_cast_base_type): Likewise.
652 2004-08-25 Zack Weinberg <zack@codesourcery.com>
654 * class.c, search.c: Remove references to DWARF_DEBUG.
656 2004-08-25 Adam Nemet <anemet@lnxw.com>
658 * repo.c (extract_string): Reset backquote after one character.
659 (get_base_filename): Fix indentation.
661 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
663 * decl.c (cxx_init_decl_processing): Adjust
664 build_common_tree_nodes call.
666 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
669 * (is_subobject_of_p): Resurrect & optimize.
670 (lookup_field_r): Use it.
672 2004-08-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
675 * search.c (friend_accessible_p): Increment processing_template_decl
676 when deal with TEMPLATE_DECL of SCOPE.
678 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
681 * semantics.c (check_accessibility_of_qualified_id): Defer check
682 if qualifying_type is a template parameter.
684 2004-08-23 Mark Mitchell <mark@codesourcery.com>
687 * pt.c (instantiate_decl): Do not try to apply
688 DECL_DECLARED_INLINED_P to a VAR_DECL.
690 * search.c (build_baselink): Fix typo in comment.
692 2004-08-22 Andrew Pinski <apinski@apple.com>
695 2004-08-22 Andrew Pinski <apinski@apple.com>
697 * typeck.c (build_unary_op): Use &a.b if the folded lowered
698 expression is not constant.
700 2004-08-23 Nathan Sidwell <nathan@codesourcery.com>
702 * name-lookup.c (pushdecl): Rename build_type_copy call.
703 * tree.c (cp_build_qualified_type_real,
704 build_exception_variant, handle_java_interface_attribute): Likewise.
706 2004-08-22 Andrew Pinski <apinski@apple.com>
709 * typeck.c (build_unary_op): Use &a.b if the folded lowered
710 expression is not constant.
712 2004-08-20 Mark Mitchell <mark@codesourcery.com>
715 * decl.c (expand_static_init): Use DECL_FUNCTION_SCOPE_P.
717 2004-08-21 Joseph S. Myers <jsm@polyomino.org.uk>
720 * pt.c (tsubst_copy_and_build): Avoid clearing TREE_NO_WARNING for
723 2004-08-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
725 * pt.c (register_specialization): Check DECL_TEMPLATE_SPECIALIZATION
726 before calling comp_template_args.
728 2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
730 * class.c (build_vtbl_initializer): Use build_int_cst for
732 * decl.c (complete_array_type): Likewise.
733 * method.c (finish_thunk): Likewise.
735 2004-08-20 Andreas Tobler <a.tobler@schweiz.ch>
737 * tree.c: Remove unused mark_local_for_remap_r.
739 2004-08-19 Eric Christopher <echristo@redhat.com>
741 * cp-tree.h (cxx_unsave_expr_now): Delete prototype.
742 * tree.c (cxx_unsave_expr_now): Delete.
743 (cp_unsave_r): Ditto.
745 2004-08-19 Mark Mitchell <mark@codesourcery.com>
748 * pt.c (push_template_decl_real): Disallow template allocation
749 functions with fewer than two parameters.
751 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
753 * cp-tree.h (build_shared_int_cst): Remove.
754 * tree.c (shared_int_cache): Remove.
755 (build_shared_int_cst): Remove.
756 * class.c (finish_struct_1): Use build_int_cst.
758 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
760 * decl.c (finish_enum): Do not copy value node early, copy
762 * lex.c (cxx_init): Force null_node to be unique.
764 2004-08-19 Joseph S. Myers <jsm@polyomino.org.uk>
767 * pt.c (tsubst_copy, tsubst_copy_and_build): Copy TREE_NO_WARNING
768 from input for MODOP_EXPR.
770 2004-08-18 Mark Mitchell <mark@codesourcery.com>
772 * pt.c (dependent_template_p): Fix typo in commment.
775 * pt.c (dependent_template_p): Treat IDENTIFIER_NODEs as
778 2004-08-17 Mark Mitchell <mark@codesourcery.com>
781 * pt.c (unify): Tidy ARRAY_TYPE handling. Make sure that non-type
782 arguments have the same type as the corresponding parameter.
785 * parser.c (cp_parser_name_lookup_error): If parser->object_scope
786 is set use it for diagnostic purposes.
787 (cp_parser_pseudo_destructor_name): Remove special-case error
791 * semantics.c (expand_or_defer_fn): Honor -fkeep-inline-functions.
794 * cp-tree.h (qualified_name_lookup_error): Add parameter.
795 * name-lookup.c (do_class_using_decl): Restrict set of entities
796 passed to cp_emit_debug_info_for_using more carefully.
797 (lookup_qualified_name): Allow lookup_member to return sets of
799 * parser.c (cp_parser_lookup_name): Add ambiguous_p parameter.
800 (cp_parser_primary_expression): Handle ambiguous lookups.
801 (cp_parser_template_name): Adjust use of cp_parser_lookup_name.
802 (cp_parser_template_argument): Likewise.
803 (cp_parser_elaborate_type_specifier): Likewise.
804 (cp_parser_namespace_name): Likewise.
805 (cp_parser_class_name): Likewise.
806 (cp_parser_lookup_name_simple): Likewise.
807 * pt.c (tsubst_qualified_id): Handle ambiguous results.
808 (tsubst_expr): Likewise.
809 * semantics.c (qualified_name_lookup_error): Add decl paramter.
810 For ambiguous lookups, print candidates.
812 2004-08-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
815 * pt.c (instantiate_pending_templates): Add int parameter. Don't
817 * cp-tree.h (instantiate_pending_templates): Adjust prototype.
818 * decl2.c (finish_file): Adjust call to
819 instantiate_pending_templates.
821 2004-08-15 Roger Sayle <roger@eyesopen.com>
823 * call.c (build_vfield_ref, build_call, build_conditional_expr,
824 convert_arg_to_ellipsis, build_x_va_arg, build_over_call,
825 build_java_interface_fn_ref, build_special_member_call,
826 build_new_method_call, initialize_reference): Replace calls to
827 build with calls to buildN.
828 * class.c (build_base_path, convert_to_base_statically,
829 build_vfn_ref, instantiate_type, dfs_accumulate_vtbl_inits,
830 build_vtbl_initializer): Likewise.
831 * cp-gimplify.c (genericize_try_block, genericize_catch_block,
832 gimplify_if_stmt, cp_genericize_r): Likewise.
833 * cvt.c (convert_to_void): Likewise.
834 * decl.c (check_initializer, finish_constructor_body,
835 finish_destructor_body): Likewise.
836 * error.c (dump_expr): Likewise.
837 * except.c (build_exc_ptr, expand_start_catch_block, build_throw):
839 * init.c (perform_member_init, expand_virtual_init,
840 expand_cleanup_for_base, build_init, expand_default_init,
841 build_offset_ref, decl_constant_value, build_new, build_new_1,
842 build_vec_delete_1, build_vec_init, build_delete,
843 push_base_cleanups, build_vec_delete): Likewise.
844 * mangle.c (write_integer_cst): Likewise.
845 * method.c (thunk_adjust, do_build_copy_constructor,
846 do_build_assign_ref): Likewise.
847 * pt.c (lookup_template_function, tsubst, tsubst_copy_and_build,
848 unify, build_non_dependent_expr): Likewise.
849 * rtti.c (build_headof, build_typeid, ifnonnull,
850 build_dyanmic_cast_1, tinfo_base_init): Likewise.
851 * semantics.c (begin_compound_stmt, finish_call_expr,
852 finish_pseudo_destructor_expr, finish_id_expression,
853 simplify_aggr_init_expr, finalize_nrv_r): Likewise.
854 * tree.c (build_target_expr, build_cplus_new, array_type_nelts_top,
855 array_type_nelts_total, stabilize_call): Likewise.
856 * typeck.c (decay_conversion, build_class_member_access_expr,
857 lookup_destructor, build_ptrmemfunc_access_expr, build_array_ref,
858 get_member_function_from_ptrfunc, build_binary_op, pointer_diff,
859 build_x_unary_op, build_unary_op, unary_complex_lvalue,
860 build_compound_expr, build_modify_expr, expand_ptrmemfunc_cst,
861 check_return_expr): Likewise.
862 * typeck2.c (split_nonconstant_1, split_nonconstant_init_1,
863 split_nonconstant_init, store_init_value, build_m_component_ref):
866 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
868 * call.c (convert_class_to_reference,
869 build_user_type_conversion_1, convert_like_real,
870 build_java_interface_fn_ref, build_special_member_call): Use
872 * class.c (build_vtbl_initializer): Likewise.
873 * cp-gimplify.c (cp_gimplify_expr): Likewise.
874 * cvt.c (cp_convert_to_pointer): Likewise.
875 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
876 * decl2.c (start_static_initialization_or_destruction,
877 generate_ctor_or_dtor_function): Likewise.
878 * except.c (build_throw): Likewise.
879 * lex.c (cxx_init): Likewise.
880 * mangle.c (write_integer_cst): Likewise.
881 * rtti.c (build_headof, get_tinfo_decl_dynamic,
882 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
883 get_pseudo_ti_init): Likewise.
884 * search.c (get_dynamic_cast_base_type): Likewise.
885 * tree.c (build_shared_int_cst): Likewise.
887 2004-08-12 Mark Mitchell <mark@codesourcery.com>
890 * class.c (count_depth_data): New type.
891 (dfs_depth_post): New function.
892 (dfs_depth_q): Likewise.
893 (find_final_overrider_data_s): Change type of vpath.
895 (dfs_find_final_overrider_1): New function.
896 (dfs_find_final_overrider): Use it.
897 (dfs_find_final_overrider_q): Adjust use of vpath.
898 (dfs_find_final_overrider_post): Likewise.
899 (find_final_overrider): Use dfs_depth. Allocate and deallocate
902 2004-08-12 Jan Beulich <jbeulich@novell.com>
904 * parser.c (cp_parser_asm_definition): Properly consume scope operator
905 tokens preceding the clobbers. Don't check for scope operator
906 following inputs. Simplify inputs handling to match that now used for
909 2004-08-11 Mark Mitchell <mark@codesourcery.com>
912 * except.c (build_throw): Allocate cleanup_type and the function
913 for __cxa_throw separately.
916 * call.c (standard_conversion): Do not accept conversions between
917 pointers to members if the class types are unrelated.
920 * parser.c (cp_parser_builtin_offsetof): Cast to "const volatile
921 char &" instead of just "char &".
924 * pt.c (tsubst): Just return the unknown_type_node.
926 2004-08-11 Mark Mitchell <mark@codesourcery.com>
929 * parser.c (cp_parser_class_specifier): Robustify.
932 * pt.c (tsubst_copy_and_build): Complain about invalid
936 * pt.c (tsubst_default_argument): Clear out current_class_ptr and
937 current_class_ref while tsubsting.
939 2004-08-10 Mark Mitchell <mark@codesourcery.com>
942 * parser.c (cp_parser_init_declarator): Robustify.
944 2004-08-06 Richard Sandiford <rsandifo@redhat.com>
946 * typeck2.c (process_init_constructor): Guard the missing field warning
947 with warn_missing_field_initializers rather than extra_warnings.
949 2004-08-06 Paolo Bonzini <bonzini@gnu.org>
951 * class.c (instantiate_type) <ENTRY_VALUE_EXPR>: Do not handle.
953 2004-08-05 Mark Mitchell <mark@codesourcery.com>
955 * decl.c (start_preparsed_function): Move determine_visibility
957 * decl2.c (determine_visibility): Incorporate dllexport testing.
959 2004-08-05 Geoffrey Keating <geoffk@apple.com>
961 * g++spec.c (lang_specific_driver): An -Xlinker or -Wl, option
962 means that libstdc++ is needed.
964 2004-08-05 Nathan Sidwell <nathan@codesourcery.com>
966 * cvt.c (cp_convert_to_pointer): Adjust force_fit_type call.
968 2004-08-04 Geoffrey Keating <geoffk@apple.com>
970 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_ASSEMBLER_NAME rather
971 than passing it as a parameter to rest_of_decl_compilation.
972 * decl2.c (grokfield): Use set_user_assembler_name.
974 2004-08-04 Nathan Sidwell <nathan@codesourcery.com>
976 * decl.c (complete_array_type): Don't gratuitously copy
977 maxindex. Its type is always set.
979 2004-08-04 Paul Brook <paul@codesourcery.com>
981 * Make-lang.in (cp/semantics.o, cp/optimize.o): Depend on TARGET_H.
982 * cp-tree.h (struct language_function): Rename x_dtor_label to
984 (dtor_label): Rename ...
985 (cdtor_label): ... to this.
986 * decl.c (begin_constructor_body): Remove.
987 (check_special_function_return_type): Maybe change the return type.
988 (grokdeclarator): Pass the class type.
989 (start_preparsed_function): Constructors may need a return label.
990 (finish_constructor_body, finish_destructor_body): Set the return
992 (begin_function_body): Don't call begin_constructor_body.
993 (finish_function): Don't warn for constructors or destructors.
994 (implicitly_declare_fn): Maybe change the return type.
995 * optimize.c: Include target.h.
996 (maybe_clone_body): Remap the function result.
997 * semantics.c: Include target.h.
998 (finish_return_stmt): Maybe jump to return label for constructors.
1000 2004-08-03 Mark Mitchell <mark@codesourcery.com>
1002 * class.c (build_vtable): Do not set DECL_VISIBILITY here.
1003 (check_field_decls): Or here.
1004 (check_methods): Or here.
1005 (initialize_array): Don't mess with DECL_CONTEXT.
1006 * cp-tree.h (start_decl): Adjust prototype.
1007 (determine_visibility): New function.
1008 * decl.c (duplicate_decls): Remove checks for hidden "operator
1010 (build_library_fn_1): Give all library functions default
1012 (start_decl): Add pop_scope_p parameter. Tidy.
1013 (cp_finish_decl): Do not pop scopes here. Call
1014 determine_visibility for variable definitions.
1015 (start_preparsed_function): Call determine_visibility.
1016 * decl2.c (determine_visibility): New function.
1017 * method.c (use_thunk): Fix formatting.
1018 * parser.c (cp_parser_condition): Adjust calls to start_decl.
1019 (cp_parser_init_declarator): Likewise.
1020 * pt.c (instantiate_decl): Always call pop_nested_class.
1021 * rtti.c (get_tinfo_decl): Do not set DECL_VISIBILITY.
1022 (tinfo_base_init): Likewise.
1024 2004-08-02 Mark Mitchell <mark@codesourcery.com>
1027 * name-lookup.c (validate_nonmember_using_decl): Robustify.
1029 2004-08-01 Mark Mitchell <mark@codesourcery.com>
1032 * name-lookup.c (decl_namespace): Remove.
1033 (current_decl_namespace): Use decl_namespace_context instead of
1035 (push_decl_namespace): Likewise.
1036 (arg_assoc_class): Likewise.
1037 (arg_assoc_type): Likewise.
1038 * pt.c (check_specialization_namespace): New function.
1039 (maybe_process_partial_specialization): Use it.
1040 (register_specialization): Likewise.
1043 * cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): New macro.
1044 * call.c (null_ptr_cst_p): Handle variables with constant
1046 * pt.c (convert_nontype_argument): Use
1047 DECL_INTEGRAL_CONSTANT_VAR_P.
1048 * semantics.c (finish_id_expression): Likewise.
1051 * decl.c (duplicate_decls): Reject duplicate namespace
1055 * typeck.c (build_ptrmemfunc): Loosen assertion.
1057 2004-08-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
1059 * call.c (z_candidate::template_decl): Rename from template.
1060 (add_template_candidate_real): Adjust member reference.
1063 2004-07-29 Mark Mitchell <mark@codesourcery.com>
1065 * cp-tree.h (IDENTIFIER_REPO_CHOSEN): Define.
1066 (lang_decl_flags): Narrow the width of "languages". Add
1068 (DECL_NEEDED_P): Remove.
1069 (FOR_EACH_CLONE): New macro.
1070 (DECL_REPO_AVAILABLE_P): Likewise.
1071 (DECL_TINFO_P): Likewise.
1072 (set_linkage_according_to_type): Declare.
1073 (import_export_vtable): Remove.
1074 (import_export_tinfo): Likewise.
1075 (mark_needed): New function.
1076 (decl_needed_p): Likewise.
1077 (note_vauge_linkage_fn): Likewise.
1078 (init_repo): Change prototype.
1079 (repo_template_used): Remove.
1080 (repo_template_instantiated): Likewise.
1081 (repo_emit_p): New function.
1082 (repo_export_class_p): Likewise.
1083 (no_linkage_check): Change prototype.
1084 * class.c (set_linkage_according_to_type): New function.
1085 (build_vtable): Use it. Do not call import_export_vtable. Set
1086 DECL_IGNORED_P if appropriate.
1087 * decl.c (duplicate_decls): Preserve DECL_REPO_AVAILABLE_P.
1088 (make_rtL_for_nonlocal_decls): Check for template instantiations
1090 (grokfndecl): Adjust call to no_linkage_check.
1091 (set_linkage_for_static_data_member): New function.
1092 (grokvardecl): Use it. Adjust call to no_linkage_check.
1093 (grokdeclarator): Use set_linkage_for_static_data_member.
1094 * decl2.c (note_vague_linkage_fn): New function.
1095 (note_vague_linkage_var): Likewise.
1096 (finish_static_data_member_decl): Use it.
1097 (import_export_vtable): Remove.
1098 (import_export_class): Use repo_export_class_p.
1099 (var_finalized_p): Simplify.
1100 (maybe_emit_vtables): Simplify.
1101 (mark_needed): New function.
1102 (decl_needed_p): Likewise.
1103 (import_export_decl): Add documentation and consistency checks.
1104 Use repo_emit_p. Handle virtual tables and RTTI information
1106 (import_export_tinfo): Remove.
1107 (write_out_vars): Call import_export_decl.
1108 (cxx_callgraph_analyze_expr): Ensure that all vtables are emitted
1110 (finish_file): Use decl_needed_p. Do not call import_export_decl
1111 for undefined static data members. Do not warn about undefined
1112 inlines when using a repository.
1113 (mark_used): Use note_vague_linkage_fn. Always defer template
1115 * lex.c (cxx_init): Adjust call to init_repo. Always set
1116 flag_unit_at_a-time.
1117 * method.c (synthesize_method): Remove unncessary
1118 import_export_decl call.
1119 (implicitly_declare_fn): Use set_linkage_according_to_type.
1120 * optimize.c (maybe_clone_body): Use FOR_EACH_CLONE.
1121 * pt.c (instantiate_class_template): Don't redundantly add classes
1122 to keyed_classes. Don't call repo_template_used.
1123 (tsubst_decl): Set DECL_INTERFACE_KNOWN for instantiations of
1124 templates with internal linkage.
1125 (check_instantiated_args): Adjust call to no_linkage_check.
1126 (instantiate_template): Use FOR_EACH_CLONE.
1127 (mark_definable): New function.
1128 (mark_decl_instantiated): Use it.
1129 (do_decl_instantiation): Adjust tests for explicit instantiation
1130 after "extern template".
1131 (instantiate_class_member): Do not use repo_template_instantiated.
1132 (do_type_instantiation): Simplify.
1133 (instantiate_decl): Use mark_definable. Check repo_emit_p.
1135 * repo.c (repo_get_id): Remove.
1136 (original_repo): Remove.
1137 (IDENTIFIER_REPO_USED): Remove.
1138 (IDENTIFIER_REPO_CHOSEN): Remove.
1139 Remove all #if 0'd code.
1140 (repo_template_used): Remove.
1141 (repo_template_instantiated): Remove.
1142 (temporary_obstack_initialized_p): New variable.
1143 (init_repo): Register with lang_post_pch_load. Avoid creating
1144 identifiers unnecessarily. Don't use original_repo. Close the
1146 (reopen_repo_file_for_write): Not here.
1147 (finish_repo): Always write out a new repository file.
1148 (repo_emit_p): New function.
1149 (repo_export_class_p): Likewise.
1150 * rtti.c (get_tinfo_decl): Use set_linkage_according_to_type.
1151 (involves_incomplete_p): New function.
1152 (tinfo_base_init): Use it.
1153 (ptr_initializer): Remove non_public_ptr parameter.
1154 (ptm_initializer): Likewise.
1155 (get_pseudo_ti_init): Likewise.
1156 (unemitted_tinfo_decl_p): Remove.
1157 (emit_tinfo_decl): Use import_export_decl.
1158 * semantics.c (expand_body): Move updates of static_ctors and
1160 (expand_or_defer_fn): ... here.
1161 * tree.c (no_linkage_check): Add relaxed_p parameter.
1163 2004-07-28 Eric Christopher <echristo@redhat.com>
1165 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
1167 2004-07-28 Nathan Sidwell <nathan@codesourcery.com>
1169 * cp-tree.h (struct tree_pair_s): New.
1170 (typedef tree_pair_p): New.
1171 (DEF_VEC_O(tree_pair_s)): New.
1172 (struct lang_type_class): Make vcall_indices a VEC(tree_pair_s).
1173 (CLASSTYPE_VCALL_INDICES): Update documentation.
1174 * class.c (get_vcall_index): Adjust.
1175 (add_vcall_offset): Adjust.
1177 2004-07-27 Kelley Cook <kcook@gcc.gnu.org>
1179 * pt.c, typeck.c: Remove spurious carriage returns.
1181 2004-07-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1184 * pt.c (coerce_template_template_parms) <PARM_DECL case>: Only check
1185 when the type of ARG is not dependent.
1187 2004-07-26 Geoffrey Keating <geoffk@apple.com>
1189 * g++spec.c (LIBSTDCXX_PROFILE): Default to LIBSTDCXX.
1190 (lang_specific_driver): If the C++ or math library options don't
1191 start with '-l', don't count them as added libraries.
1193 2004-07-26 Nathan Sidwell <nathan@codesourcery.com>
1195 * decl.c (xref_basetypes): Adjust base access vector creation.
1196 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Adjust base
1198 * search.c (dynamic_cast_base_recurse, dfs_access_in_type): Likewise.
1200 2004-07-26 Niall Douglas <s_fsfeurope2@nedprod.com>
1201 Brian Ryner <bryner@brianryner.com>
1205 * class.c (check_field_decls): Apply hidden visibility if
1206 -fvisibility-inlines-hidden and inlined unless otherwise specified
1207 (build_vtable): Set vtable visibility to class visibility.
1208 (check_field_decls): Default static member visibility to class
1210 (check_methods): Default method visibility to class visibility.
1211 * cp-tree.h: Added CLASSTYPE_VISIBILITY and
1212 CLASSTYPE_VISIBILITY_SPECIFIED macro.
1213 * decl.c (duplicate_decls): New logic for merging definition decls
1214 with declaration decls. Added ignore & warning when non default
1215 applied to global operator new or delete.
1216 * method.c, optimize.c, rtti.c: Added setting of VISIBILITY_SPECIFIED
1217 wherever VISIBILITY was changed
1218 * rtti.c (get_tinfo_decl): Set typeinfo visibility to class
1220 (tinfo_base_init): Set typeinfo name visibility to class visibility.
1222 2004-07-25 Bernardo Innocenti <bernie@develer.com>
1224 * decl.c: Rename all identifiers named `class' to `cl'.
1225 * cp-tree.h: Likewise.
1227 2004-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
1229 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Use GGC_CNEW.
1230 * typeck2.c (abstract_virtuals_error): Use GGC_NEW.
1231 * name-lookup.c (binding_entry_make): Use GGC_NEW.
1232 (binding_table_construct): Use GGC_CNEWVEC.
1233 (binding_table_new): Use GGC_NEW.
1234 (cxx_binding_make): Likewise.
1235 (begin_scope): Likewise.
1236 (push_to_top_level): Use GCC_CNEW.
1237 * parser.c (cp_token_cache_new): Likewise.
1238 (cp_token_cache_push_token): Likewise.
1239 (cp_lexer_new_main): Likewise.
1240 (cp_lexer_new_from_tokens): Likewise.
1241 (cp_parser_context_new): Likewise.
1242 (cp_parser_new): Likewise.
1243 (cp_lexer_new_from_tokens): Use GGC_NEWVEC.
1244 * lex.c (cxx_make_type): Use GGC_CNEW.
1245 (retrofit_lang_decl): Use GGC_NEWVAR.
1246 (cxx_dup_lang_specific_decl): Likewise.
1247 (copy_lang_type): Likewise.
1248 * decl.c (use_label): Use GGC_NEW instead of ggc_alloc.
1249 (save_function_data): Likewise.
1250 (lookup_label): Use GGC_CNEW instead of ggc_alloc_cleared.
1251 (cxx_push_function_context): Likewise.
1253 2004-07-25 Richard Henderson <rth@redhat.com>
1255 * decl.c (start_preparsed_function): Set DECL_ARTIFICIAL and
1256 DECL_IGNORED_P on RESULT_DECL.
1257 * semantics.c (finalize_nrv): Copy them too.
1259 2004-07-23 Nathan Sidwell <nathan@codesourcery.com>
1261 * search.c (lookup_conversion_operator): Avoid two loops.
1262 (add_conversions): Remove.
1263 (check_hidden_convs, split_conversions,
1264 lookup_conversions_r): New.
1265 (lookup_conversions): Use lookup_conversions_r.
1267 2004-07-22 Nathan Sidwell <nathan@codesourcery.com>
1269 * pt.c (get_template_base): Check type is completable.
1271 2004-07-21 Eric Christopher <echristo@redhat.com>
1273 * decl.c (poplevel): Inline unused variable checking.
1276 2004-07-21 Paolo Bonzini <bonzini@gnu.org>
1278 * typeck.c (build_binary_op): Do not use RDIV_EXPR for
1281 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1284 * pt.c (check_explicit_specialization): Remove extension to accept
1285 specializations without template headers. Fall-through to normal
1288 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1291 * pt.c (determine_specialization): New parameter template_count.
1292 Disambiguate between member templates and member functions counting
1293 the template headers.
1294 (check_explicit_specialization): Update caller.
1295 (tsubst_friend_function): Likewise.
1297 2004-07-20 Steven Bosscher <stevenb@suse.de>
1299 * cp-tree.def (TINST_LEVEL): Make it an 'x' node.
1300 * cp-tree.h (tinst_level_t): New tree type.
1301 (union lang_tree_node): Handle it.
1302 (TINST_LOCATION): New accessor macro.
1303 (make_tinst_level): New prototype.
1304 * cp-lang.c (cp_tree_size): Handle TINST_LEVEL.
1305 * decl.c (cp_tree_node_structure): Likewise.
1306 * error.c (print_instantiation_full_context): Use TINST_LOCATION.
1307 (print_instantiation_partial_context): Likewise.
1308 * pt.c (pop_tinst_level): Likewise.
1309 (push_tinst_level): Use make_tinst_level.
1310 * tree.c (make_tinst_level): New function.
1311 (cp_walk_subtrees): Walk TINST_DECL for a TINST_LEVEL node.
1313 2004-07-20 Mark Mitchell <mark@codesourcery.com>
1315 * parser.c (cp_parser_simple_type_specifier): Fix typo.
1318 * parser.c (cp_parser_simple_type_specifier): Do not record usage
1319 of globally-qualified names.
1321 2004-07-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1324 * error.c (dump_type) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Output
1327 2004-07-19 Mark Mitchell <mark@codesourcery.com>
1330 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
1331 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
1332 * class.c (add_implicitly_declared_members): Use
1333 CLASSTYPE_LAZY_ASSIGNMENT_OP.
1334 * method.c (lazily_declare_fn): Clear
1335 CLASSTYPE_LAZY_ASSIGNMENT_OP.
1336 * search.c (lookup_fnfields_1): Check it.
1338 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
1340 * cp-tree.h (vec_binfo_member): Remove.
1341 * tree.c (vec_binfo_member): Remove.
1343 * cp-tree.h (struct lang_type_class): Remove vfields field.
1344 (CLASSTYPE_VFIELDS): Remove.
1345 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
1346 * class.c (determine_primary_base): Remove CLASSTYPE_VFIELDS
1348 (dfs_modify_vtables): Use TYPE_CONTAINS_VPTR_P.
1349 (finish_struct_1): Remove CLASSTYPE_VFIELDS handling.
1350 * init.c (dfs_initialize_vtbl_ptrs): Use TYPE_CONTAINS_VPTR_P.
1352 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
1354 * cp-tree.h (DEF_VEC_P(tree)): Remove here.
1355 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
1357 (BINFO_LANG_SLOTS): Remove.
1358 * tree.c (copy_binfo): Adjust BINFO creation and accessors.
1359 * decl.c (xref_basetypes): Adjust BINFO creation and accessors.
1360 * class.c (check_bases): Adjust BINFO accessors.
1361 (determine_primary_base, finish_struct_bits,
1362 maybe_warn_about_overly_private_class, warn_hidden,
1363 walk_subobject_offsets, propagate_binfo_offsets, end_of_class,
1364 warn_about_ambiguous_bases, get_vfield_name,
1365 dump_class_hierarchy_r, build_vtt_inits, accumulate_vtbl_inits,
1366 add_vcall_offset_vtbl_entries_r): Likewise.
1367 * dump.c (cp_dump_tree): Likewise.
1368 * init.c (sort_mem_initializers, expand_member_init, build_delete,
1369 push_base_cleanups): Likewise.
1370 * method.c (do_build_copy_constructor, do_build_assign_ref,
1371 synthesize_exception_spec): Likewise.
1372 name-lookup.c (arg_assoc_class): Likewise.
1373 * pt.c (instantiate_class_template,
1374 get_template_base_recursive): Likewise.
1375 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Likewise.
1376 * typeck2.c (process_init_constructor): Likewise.
1377 * search.c (lookup_base_r, dynamic_cast_base_recurse,
1378 dfs_access_in_type, dfs_walk_real, look_for_overrides,
1379 types_overlap_p, copied_binfo, original_binfo): Likewise.
1380 (binfo_for_vtable): Remove
1382 2004-07-20 Steven Bosscher <stevenb@suse.de>
1384 * cp-tree.h (struct lang_decl_flags): Unify the template_info and
1385 thunk_alias, and the access and virtual_offset fields.
1386 (THUNK_VIRTUAL_OFFSET, THUNK_ALIAS): Adjust.
1387 * decl.c (finish_case_label): Update c_add_case_node call.
1389 2004-07-19 Mark Mitchell <mark@codesourcery.com>
1391 Revert patch for PR c++/16623.
1393 2004-07-19 Kelley Cook <kcook@gcc.gnu.org>
1395 * except.c: Remove two spurious carriage returns.
1397 2004-07-19 Mark Mitchell <mark@codesourcery.com>
1400 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
1401 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
1402 * class.c (add_implicitly_declared_members): Use
1403 CLASSTYPE_LAZY_ASSIGNMENT_OP.
1404 * method.c (lazily_declare_fn): Clear
1405 CLASSTYPE_LAZY_ASSIGNMENT_OP.
1406 * search.c (lookup_fnfields_1): Check it.
1408 2004-07-19 Nathan Sidwell <nathan@codesourcery.com>
1410 * class.c (add_method): Delay adding the slot until the end.
1411 (determine_primary_base): Adjust VEC_iterate invokation.
1412 (resort_type_method_vec, finish_struct_methods, warn_hidden,
1413 walk_subobject_offsets, end_of_class, warn_about_ambiguous_bases,
1414 build_vtbl_initializer): Likewise.
1415 * init.c (sort_mem_initializers, build_delete, push_base_cleanups,
1416 build_vbase_delete): Likewise.
1417 * method.c (do_build_copy_constructor): Likewise.
1418 * name-lookup.c (new_class_binding, print_binding_level,
1419 poplevel_class, store_class_bindings, push_to_top_level,
1420 pop_from_top_level): Likewise.
1421 * pt.c (check_explicit_specialization): Likewise.
1422 * search.c (lookup_conversion_operator, lookup_fnfields_1,
1423 get_pure_virtuals, add_conversions, dfs_check_overlap,
1424 binfo_for_vbase): Likewise.
1426 2004-07-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1429 * pt.c (unify) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Use only
1430 innermost set of template arguments during deduction. Simplify.
1432 2004-07-19 Joseph S. Myers <jsm@polyomino.org.uk>
1434 * typeck.c (build_modify_expr, build_x_modify_expr): Set
1435 TREE_NO_WARNING on assignments with an operator other than '='.
1437 2004-07-10 Steven Bosscher <stevenb@suse.de>
1438 Joseph S. Myers <jsm@polyomino.org.uk>
1440 * cp-tree.h (C_SET_EXP_ORIGINAL_CODE): Remove.
1441 * decl2.c (grokfield): Don't check current_class_depth via
1442 unused TREE_COMPLEXITY.
1443 * semantics.c (finish_parenthesized_expr): Set TREE_NO_WARNING
1444 to avoid the missing parentheses warning.
1445 Don't set C_SET_EXP_ORIGINAL_CODE.
1447 2004-07-18 Mark Mitchell <mark@codesourcery.com>
1449 * tree.c (no_linkage_helper): Remove.
1450 (no_linkage_check): Don't use walk_tree_without_duplicates.
1452 * mangle.c (write_expression): Issue a sorry for zero-operand
1455 2004-07-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1458 * init.c (build_offset_ref): Build SCOPE_REF with non-null
1459 TREE_TYPE for non-dependent names.
1460 * typeck.c (build_x_unary_op): Handle non-dependent SCOPE_REF.
1461 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
1462 unknown_type_node as its TREE_TYPE.
1463 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
1464 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
1465 (dump_expr) <SCOPE_REF case>: Likewise.
1467 2004-07-17 Jason Merrill <jason@redhat.com>
1470 * call.c (type_passed_as): Make the invisible reference type
1472 * cp-gimplify.c (gimplify_cleanup_stmt): Rename to
1473 cp_genericize_r. Handle invisible reference lowering.
1474 (is_invisiref_parm): New fn.
1475 (cp_genericize): Adjust the types of invisible reference parms.
1476 Don't repeat the walk for clones.
1477 * decl.c (store_parm_decls): Don't generate any code for clones.
1479 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
1481 * cp-tree.h (builtin_function): Declare.
1483 2004-07-16 Mark Mitchell <mark@codesourcery.com>
1485 * class.c (finish_struct_methods): Remove unncessary code.
1486 (add_implicitly_declared_members): Create declarations for default
1487 constructors and copy constructors lazily.
1488 * cp-tree.h (lang_type_class): Remove lazy_default_ctor and
1490 (CLASSTYPE_LAZY_DEFAULT_CTOR): New macro.
1491 (CLASSTYPE_LAZY_COPY_CTOR): Likewise.
1492 * decl2.c (check_classfn): Robustify.
1493 (locate_dtor): Handle empty CLASSTYPE_METHOD_VEC.
1494 (locate_ctor): Handle lazy default constructors.
1495 (locate_copy): Handle lazy copy constructors.
1496 (implicitly_declare_fn): Make sure we're looking at the
1497 TYPE_MAIN_VARIANT for a class before creating functions. Don't
1498 set TYPE_HAS_CONSTRUCTOR.
1499 (lazily_declare_fn): New function.
1500 * name-lookup.c (constructor_name_full): Simplify.
1501 * search.c (lookup_fnfields_1): Lazily create methods, as
1503 (lookup_for_overrides): Handle empty CLASSTYPE_METHOD_VEC.
1505 2004-07-16 Steven Bosscher <stevenb@suse.de>
1507 * cp-tree.h (struct lang_type): Don't have three GTY options on a
1508 single bit GTY desc.
1510 2004-07-16 Richard Henderson <rth@redhat.com>
1512 * cp-lang.c (LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING): Die.
1513 * cp-tree.h (cp_copy_res_decl_for_inlining): Remove.
1514 * tree.c (cp_copy_res_decl_for_inlining): Remove.
1516 2004-07-16 Nathan Sidwell <nathan@codesourcery.com>
1518 * class.c (finish_struct_bits): Use for loop.
1519 (propagate_binfo_offsets): Do primary binfo outside of loop.
1522 * dump.c (cp_dump_tree): Don't dump the bases if there's no
1525 * pt.c (tsubst) <TREE_BINFO case>: We should never get here.
1527 2004-07-15 Mark Mitchell <mark@codesourcery.com>
1529 * cp-tree.h (lang_type_class): Remove has_real_assign_ref and
1530 has_abstract_assign_ref. Make methods a VEC(tree) *.
1531 (TYPE_HAS_CONST_ASSIGN_REF): Add documentation.
1532 (CLASSTYPE_CONSTRUCTORS): Adjust for changes to CLASSTYPE_METHOD_VEC.
1533 (CLASSTYPE_DESTRUCTORS): Likewise.
1534 (TYPE_HAS_REAL_ASSIGN_REF): Remove.
1535 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
1536 (add_method): Change prototoype.
1537 * class.c (add_method): Remove error_p parameter. Adjust for
1538 changes to CLASSTYPE_METHOD_VEC.
1539 (handle_using_decl): Adjust call to add_method.
1540 (maybe_warn_about_overly_private_class): Adjust for
1541 changes to CLASSTYPE_METHOD_VEC.
1542 (resort_type_method_vec): Likewise.
1543 (finish_struct_methods): Likewise.
1544 (check_for_override): Likewise.
1545 (warn_hidden): Likewise.
1546 (add_implicitly_declared_members): Defer creation of assignment
1547 operators. Adjust call to add_method.
1548 (clone_function_decl): Adjust call to add_method.
1549 (check_bases_and_members): Don't set TYPE_HAS_REAL_ASSIGN_REF.
1550 (finish_struct_1): Use CLASSTYPE_DESTRUCTORS.
1551 * decl.c (grok_special_member_properties): Don't set
1552 TYPE_HAS_ABSTRACT_ASSIGN_REF.
1553 * decl2.c (check_classfn): Adjust for
1554 changes to CLASSTYPE_METHOD_VEC.
1555 * method.c (locate_dtor): Use CLASSTYPE_DESTRUCTORS.
1556 (locate_ctor): Use CLASSTYPE_CONSTRUCTORS.
1557 (locate_copy): Adjust for changes to CLASSTYPE_METHOD_VEC.
1558 (implicitly_declare_fn): Set DECL_SOURCE_LOCATION. Do not call
1560 * pt.c (check_explicit_specialization): Adjust for
1561 changes to CLASSTYPE_METHOD_VEC.
1562 (instantiate_class_template): Do not set
1563 TYPE_HAS_ABSTRACT_ASSIGN_REF.
1564 * ptree.c (cxx_print_type): Don't try to print
1565 CLASSTYPE_METHOD_VEC.
1566 * rtti.c (emit_support_tinfos): Use CLASSTYPE_DESTRUCTORS.
1567 * search.c (lookup_field_r): Adjust for
1568 changes to CLASSTYPE_METHOD_VEC.
1569 (lookup_fnfields): Likewise.
1570 (lookup_conversion_operator): Likewise.
1571 (lookup_fnfields_1): Likewise. Create assignment operators
1573 (look_for_overrides_here): Adjust for
1574 changes to CLASSTYPE_METHOD_VEC.
1575 (add_conversions): Likewise.
1576 * semantics.c (finish_member_declaration): Adjust call to add_method.
1578 2004-07-15 Jason Merrill <jason@redhat.com>
1580 * cp-lang.c (cxx_types_compatible_p): To the middle-end,
1581 references and pointers are compatible.
1583 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
1585 * decl.c (xref_basetypes): Refactor.
1586 * tree.c (copy_base_binfos): Replace with ...
1587 (copy_binfo): ... this. Deep copy the given binfo, (not the just
1588 bases of the given base).
1589 * cp-tree.h (copy_base_binfo): Remove.
1590 (copy_binfo): Declare.
1592 2004-07-15 Mark Mitchell <mark@codesourcery.com>
1594 * name-lookup.c (set_inherited_value_binding_p): Add class_type
1596 (get_class_binding): Adjust.
1597 (push_class_level_binding): Don't use set_inherited_value_binding_p.
1599 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
1601 * class.c (finish_struct_bits): Don't set TYPE_HAS_CONVERSION here.
1602 * decl.c (xref_basetypes): Set it here.
1604 * class.c (check_bases): Don't set CLASSTYPE_NON_AGGREGATE here.
1605 Don't check for incomplete base.
1606 (get_vfield_name): Simplify while loop.
1607 * decl.c (xref_basetypes): Set CLASSTYPE_NON_AGGREGATE here.
1609 2004-07-14 Mark Mitchell <mark@codesourcery.com>
1611 * lex.c (cxx_make_type): Remove call to get_pointer_type.
1613 * cp-tree.h (IDENTIFIER_VALUE): Remove.
1614 (BINFO_PUSHDECLS_MARKED): Likewise.
1615 (maybe_inject_for_scope_var): Likewise.
1616 (push_class_decls): Likewise.
1617 * name-lookup.h (push_class_binding): Remove.
1618 (innermost_non_namespace_value): New function.
1619 (outer_binding): Likewise.
1620 * class.c (add_method): Push bindings before adding to
1622 (restore_class_cache): Do not restore class_shadowed.
1623 (pushclass): Do not add USING_DECLs. Do not call
1625 * config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c.
1626 * decl.c (pushdecl): Use outer_binding.
1627 (poplevel): Set the scope for an out-of-scope for-loop declaration
1629 (cp_finish_decl): Don't call maybe_inject_for_scope_var.
1630 * name-lookup.c (new_class_binding): New function.
1631 (push_binding): Use it.
1632 (pushdecl): Use innermost_non_namespace_value.
1633 (maybe_inject_for_scope_var): Remove.
1634 (push_class_binding): Remove.
1635 (set_inherited_value_binding_p): New function.
1636 (get_class_binding): New function.
1637 (push_class_level_binding): Assert that the current_class_type is
1639 (outer_binding): New function.
1640 (innermost_non_namespace_value): Likewise.
1641 (lookup_name_real): Use outer_binding.
1642 (lookup_name_current_level): Ignore out-of-scope variables.
1643 * pt.c (check_template_shadow): Use innermost_non_namespace_value.
1644 (lookup_template_class): Likewise.
1645 * search.c (dfs_push_type_decls): Remove.
1646 (dfs_push_decls): Likewise.
1647 (setup_class_bindings): Likewise.
1648 (lookup_field_1): Handle USING_DECLs from dependent scopes.
1649 (marked_pushdecls_p): Remove.
1650 (unmarked_pushdecls_p): Remove.
1651 (marked_identifiers): Remove.
1652 (setup_class_bindings): Remove.
1653 (dfs_push_type_decls): Remove.
1654 (dfs_push_decls): Remove.
1655 (push_class_decls): Remove.
1657 2004-07-13 Mark Mitchell <mark@codesourcery.com>
1661 * decl.c (grokvardecl): Make declspecs parameter const.
1662 (grokdeclarator): Likewise. Adjust accordingly.
1663 * decl.h (grokdeclarator): Adjust declaration.
1664 * parser.c (cp_parser_init_declarator): Do not clear
1665 decl_specifiers->attributes.
1667 * cp-tree.h (lang_identifier): Remove class_value.
1668 (IDENTIFIER_CLASS_VALUE): Remove.
1669 (pop_class_decls): Likewise.
1670 (init_search_processing): Likewise.
1671 * class.c (handle_using_decl): Use lookup_member, not
1672 IDENTIFIER_CLASS_VALUE.
1673 (restore_class_cache): New function, split out from ...
1674 (pushclass): ... here. Do not call clear_identifier_class_values.
1675 (invalidate_class_lookup_cache): Do not clear
1676 IDENTIFIER_CLASS_VALUE.
1677 (popclass): Do not call pop_class_decls.
1678 (maybe_note_name_used_in_class): Do not save names looked up after
1679 the class is complete. Use lookup_member, not
1680 IDENTIFIER_CLASS_VALUE.
1681 * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
1682 * decl.c (cxx_init_decl_processing): Do not call
1683 init_search_processing.
1684 * method.c (do_build_copy_constructor): Remove unnecessary code.
1685 (do_build_assign_ref): Likewise.
1686 * name-lookup.c (pushdecl): Use lookup_member, not
1687 IDENTIFIER_CLASS_VALUE.
1688 (set_identifier_type_value_with_scope): Set TREE_TYPE on the
1690 (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
1691 (push_class_binding): Do not set it.
1692 (clear_identifier_class_values): Remove.
1693 (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
1694 (store_binding): Do not save it.
1695 (pop_from_top_level): Do not restore it.
1696 * name-lookup.h (cxx_saved_binding): Remove class_value.
1697 (clear_identifier_class_values): Remove.
1698 * ptree.c (cxx_print_identifier): Do not print
1699 IDENTIFIER_CLASS_VALUE.
1700 * search.c (search_obstack): Remove.
1701 (push_stack_level): Remove.
1702 (pop_stack_level): Remove.
1703 (search_level): Remove.
1704 (search_stack): Remove.
1705 (lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
1706 (setup_class_bindings): Use IDENTIFIER_MARKED, not
1707 IDENTIFIER_CLASS_VALUE.
1708 (marked_identifiers): New variable.
1709 (push_class_decls): Clear IDENTIFIER_MARKED.
1710 (pop_class_decls): Don't call pop_search_level.
1711 (init_search_processing): Remove.
1713 2004-07-12 Mark Mitchell <mark@codesourcery.com>
1715 * cp-tree.h (get_aggr_typedef): Remove.
1716 * init.c (get_aggr_typedef): Likewise.
1718 * name-lookup.c (push_class_level_binding): Simplify.
1720 2004-07-12 Andrew Pinski <apinski@apple.com>
1724 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
1726 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
1729 2004-07-12 Eric Christopher <echristo@redhat.com>
1731 * parser.c (cp_parser_class_head): Remove unused variable.
1733 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1735 * decl.c (grok_op_properties): Reject [de-]allocation functions
1736 declared in a namespace, or declared as static.
1738 2004-07-12 Nathan Sidwell <nathan@codesourcery.com>
1740 * cp-tree.h (make_binfo): Remove.
1741 * decl.c (xref_basetypes): Use make_tree_binfo directly.
1742 * tree.h (copy_base_binfos): Likewise.
1743 (make_binfo): Remove.
1745 * call.c (build_user_type_conversion_1, build_new_op,
1746 check_constructor_callable, build_temp,
1747 perform_direct_initialization_of_possible): Pass type directly to
1748 lookup_fnfields & build_special_member_call.
1749 (build_special_member_call): Accept a type, and complete it.
1750 * class.c (finish_stuct_bits): Copy the BINFOs here.
1751 * cvt.c (ocp_convert): Pass type directly to
1752 build_special_member_call.
1753 * decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
1754 (xref_basetypes): Allocate the binfo here. Adjust.
1755 * init.c (build_init, build_new_1): Pass type directly to
1756 build_special_member_call.
1757 * lex.c (cxx_make_type): Do not allocate binfo here.
1758 * name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
1759 * parser.c (cp_parser_class_head): Always call xref_basetypes.
1760 * pt.c (instantiate_class_template): Likewise. Inhibit access
1761 checking for template friends.
1762 * ptree.c (cxx_print_type): Adjust record printing.
1763 * search.c (lookup_base): When taking a type, complete it before
1764 looking for a binfo.
1765 (lookup_member): Delay completing a type.
1766 (push_class_decls): Don't walk an incomplete type.
1767 (lookup_conversions): Likewise.
1768 * semantics.c (finish_stmt_expr_expr): Pass type directly to
1769 build_special_member_call.
1770 * tree.c (copy_base_binfos): Adjust.
1771 (make_binfo): Likewise.
1772 * typeck.c (build_modify_expr): Pass type directly to
1773 build_special_member_call.
1774 * typeck2.c (process_init_constructor): Check a binfo exists.
1775 (build_m_component_ref): Allow accessing an incomplete type.
1776 (build_functional_cast): Pass type directly to
1777 build_special_member_call.
1779 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1782 * config-lang.in (gtfiles): Add typeck2.c.
1783 * Make-lang.in: Tweak typeck2.c dependencies, and add rule for
1785 * cp-tree.h: Declare complete_type_check_abstract.
1786 * typeck2.c (pat_calc_hash, pat_compare,
1787 complete_type_check_abstract): New functions.
1788 (abstract_virtuals_error): If the type is abstract, register the
1789 declaration within abstract_pending_vars for further checks.
1790 Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
1791 * decl.c (cp_finish_decl): Do not strip array types.
1792 (create_array_type_for_decl): Check for abstractness of the element
1794 (complete_vars): Call complete_type_check_abstract.
1795 * class.c (finish_struct): Prepare a list of virtual functions for
1796 template types, and call complete_vars on it to check for abstractness.
1798 2004-07-12 Paolo Bonzini <bonzini@gnu.org>
1800 PR tree-optimization/14107
1801 * decl.c (finish_function): Remove temporary band-aid.
1803 2004-07-11 Mark Mitchell <mark@codesourcery.com>
1805 * call.c (build_operator_new_call): Avoid using push_to_top_level.
1806 (build_new_op): Adjust call to lookup_function_nonclass.
1807 * name-lookup.c (identifier_type_value): Adjust call to
1809 (lookup_name_real): Add block_p parameter.
1810 (lookup_name_nonclass): Adjust call to lookup_name_real.
1811 (lookup_function_nonclass): Likewise.
1812 (lookup_name): Likewise.
1813 * name-lookup.h (lookup_name_real): Change prototype.
1814 (lookup_name_nonclass): Likewise.
1815 * parser.c (cp_parser_lookup_name): Likewise.
1817 * cp-tree.h (saved_scope): Make old_bindings a vector.
1818 (unuse_fields): Remove.
1819 * name-lookup.h (cxx_saved_binding): Define it.
1820 * class.c (pushclass): Don't use unuse_fields.
1821 * name-lookup.c (cxx_saved_binding_make): Remove.
1822 (store_binding): Add new bindings to a vector, using an
1823 accumulator style, rather than adding them to a list.
1824 (store_bindings): Adjust accordingly.
1825 (store_class_bindings): Likewise.
1826 (push_to_top_level): Likewise.
1827 (pop_from_top_level): Likewise.
1828 * optimize.c (maybe_clone_body): Must push_to_top_level and
1829 pop_from_top_level calls outside of loop.
1830 * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope
1831 calls here from cp_parser_late_parsing_default_args.
1832 (cp_parser_save_default_args): Record the class type in which the
1833 function is declared.
1834 (cp_parser_late_parsing_default_args): Do not call
1835 push_nested_class/pop_nested_class.
1836 * search.c (dfs_unuse_fields): Remove.
1837 (unuse_fields): Remove.
1839 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
1841 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
1842 LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
1843 * cp-tree.h (poplevel): Declare.
1844 (set_block): Remove.
1845 * decl.c (set_block): Remove.
1847 2004-07-10 Mike Stump <mrs@apple.com>
1849 * decl2.c (import_export_class): Never export/import vtables
1850 with inline key functions.
1852 2004-07-09 Steven Bosscher <stevenb@suse.de>
1854 * typeck.c (c_expand_asm_operands): Remove.
1856 2004-07-09 Mike Stump <mrs@apple.com>
1858 * typeck.c (build_class_member_access_expr): Skip null deref
1859 warning when we don't dereference it.
1861 2004-07-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1865 * class.c (check_field_decls): Improve -Weffc++ warning: do not
1866 warn for pointers to functions/members, or for classes without
1869 2004-07-08 Mark Mitchell <mark@codesourcery.com>
1871 * name-lookup.h (struct cp_binding_level): Update documentation
1874 2004-07-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1877 * typeck.c (check_return_expr): Improve -Weffc++ warning: handle
1878 returning CALL_EXPR, and non-reference return type.
1880 2004-07-08 Nathan Sidwell <nathan@codesourcery.com>
1882 * name-lookup.c (push_binding): Use VEC_reserve.
1884 2004-07-08 Richard Henderson <rth@redhat.com>
1886 * cp-tree.h (expand_eh_spec_block): Remove.
1888 2004-07-07 Mark Mitchell <mark@codesourcery.com>
1890 * cp-tree.h (saved_scope): Remove x_previous_class_type and
1891 x_previous_class_values; add x_previous_class_level.
1892 (previous_class_type): Remove.
1893 (previous_class_values): Remove.
1894 (previous_class_level): New macro.
1895 * class.c (pushclass): Restore the identifier cache more
1897 (invalidate_class_lookup_cache): Use vector for class_shadowed and
1898 previous_class_values.
1899 * decl.c (poplevel): Likewise.
1900 * name-lookup.c (cxx_binding_init): New function.
1901 (cxx_binding_make): Use it.
1902 (push_binding): For a binding in a class level, use a vector of
1903 cp_class_binding nodes.
1904 (push_binding_level): New function.
1905 (begin_scope): Use it.
1906 (leave_scope): Do not put class binding levels on the free list.
1907 (print_binding_level): Adjust for the fact that class_shadowed is
1909 (poplevel_class): Likewise.
1910 (clear_identifier_class_values): Likewise.
1911 (push_class_level_binding): Likewise.
1912 (set_class_shadows): Remove.
1913 (store_binding): New function.
1914 (store_class_bindings): New function.
1915 (push_to_top_level): Use store_class_bindings as appropriate.
1916 (pop_from_top_level): Use previous_class_level, not
1917 previous_class_type.
1918 * name-lookup.h (cp_class_binding): New type.
1919 (cp_binding_level): Use a vector object for class_shadowed.
1920 (push_binding_level): Declare.
1921 (set_class_shadows): Remove.
1923 2004-07-07 Andrew Pinski <apinski@apple.com>
1925 * class.c (instantiate_type): BUFFER_REF is dead.
1926 * lex.c (init_operators): IN_EXPR is dead.
1928 2004-07-07 Jason Merrill <jason@redhat.com>
1931 * call.c (build_new_op): Give overload warnings for built-in
1934 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
1937 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
1940 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
1942 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
1943 * class.c (build_primary_vtable, check_bases,
1944 determine_primary_base, finish_struct_bits,
1945 maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
1946 get_basefndecls, warn_hidden, walk_subobject_offsets,
1947 build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
1948 layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
1949 finish_struct_1, get_vfield_name, contains_empty_class_p,
1950 dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
1951 dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
1952 add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
1954 * decl.c (xref_basetypes): Likewise.
1955 * dump.c (cp_dump_tree): Likewise.
1956 * error.c (dump_expr): Likewise.
1957 * init.c (sort_mem_initializers, expand_member_init,
1958 push_base_cleanups): Likewise.
1959 * method.c (do_build_copy_constructor, do_build_assign_reg,
1960 synthesize_exception_spec): Likewise.
1961 * name-lookup.c (arg_assoc_class): Likewise.
1962 * pt.c (instantiate_class_template, tsubst,
1963 get_template_base_recursive): Likewise.
1964 * ptree.c (cxx_print_type): Likewise.
1965 * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
1966 * search.c (lookup_base_r, dynamic_cast_base_recurse,
1967 dfs_access_in_type, access_in_type, lookup_field_queue_p,
1968 bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
1969 marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
1970 dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
1971 binfo_for_vtable, copied_binfo, original_binfo): Likewise
1972 * tree.c (copy_base_binfos, make_binfo): Likewise.
1973 * typeck.c (commmon_base_type): Likewise
1974 * typeck2.c (process_init_constructor): Likewise
1976 2004-07-06 Joseph S. Myers <jsm@polyomino.org.uk>
1978 * decl.c (check_tag_decl): Name redeclared type in diagnostic.
1980 2004-07-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1983 * pt.c (convert_nontype_argument): Disallow conversions between
1984 different enumeration types.
1986 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
1988 * cp-tree.h (BINFO_MARKED): Remove.
1989 (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
1990 BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
1991 BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
1992 (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
1993 * class.c (build_base_path): Use BINFO_VIRTUAL_P.
1994 (mark_primary_bases, determine_primary_base, base_derived_from,
1995 dfs_find_final_overrider, dfs_find_final_overrider_q,
1996 dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
1997 dfs_modify_vtables, walk_subobject_offsets,
1998 layout_nonempty_base_or_field, build_base_field,
1999 build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
2000 end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
2001 finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
2002 build_ctor_vtbl_group, accumulate_vtble_inits,
2003 dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
2004 build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
2005 add_vcall_offset_vtbl_entries_1): Likewise.
2006 * decl.c (xref_basetypes): Incomming virtual base indicated by
2008 * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
2009 * init.c (finish_init_stmts, sort_mem_initializers,
2010 emit_mem_initializers, build_vtble_address, expand_member_init,
2011 push_base_cleanups): Likewise.
2012 * method.c (do_build_copy_constructor): Likewise.
2013 * pt.c (instantiate_class_template,
2014 get_template_base_recursive): Likewise.
2015 * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
2016 get_pseudo_ti_desc): Likewise.
2017 * search.c (lookup_base_r, dynamic_cast_base_recurse,
2018 binfo_from_vbase, binfo_via_virtual, copied_binfo,
2019 original_binfo): Likewise.
2020 * semantics.c (finish_base_specifier): Virtualness is indicated
2022 * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
2024 2004-07-06 Mark Mitchell <mark@codesourcery.com>
2027 2004-06-24 Jason Merrill <jason@redhat.com>
2029 * decl.c (grokparms): Give the PARM_DECL reference type if the
2030 parameter is passed by invisible reference.
2032 2004-07-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2034 * cp-lang.c (cp_var_mod_type_p): Add extra arg.
2035 * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
2036 * pt.c (check_instantiated_args, unify): Likewise.
2038 2004-07-05 Phil Edwards <phil@codesourcery.com>
2040 * Make-lang.in (check-c++, lang_checks): Add some comments.
2042 2004-07-05 Zack Weinberg <zack@codesourcery.com>
2044 * cp-mudflap.c: Delete file.
2045 * Makefile.in: Remove all references to cp-mudflap.o.
2047 2004-07-05 Zack Weinberg <zack@codesourcery.com>
2049 * decl.c (cxx_init_decl_processing): Call
2050 build_common_tree_nodes before creating the global NAMESPACE_DECL.
2052 2004-07-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2055 * call.c (build_operator_new_call): Look only at global scope.
2057 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
2059 * call.c (enforce_access): Expect TREE_BINFO.
2060 * class.c (binfo_ctor_vtable): Check TREE_BINFO.
2061 * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
2062 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
2064 (BINFO_LANG_ELTS): Remove.
2065 (BINFO_LANG_SLOTS): New.
2066 (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
2067 (CLASSTYPE_TEMPLATE_INFO): Adjust.
2068 * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
2069 * search.c (lookup_member): Check TREE_BINFO.
2070 * semantics.c (perform_or_defer_access_check): Likewise.
2071 (check_accessibility_of_qualified_id): Check
2072 deferred_access_no_check.
2073 * tree.c (make_binfo): Use make_tree_binfo.
2075 2004-07-04 Mark Mitchell <mark@codesourcery.com>
2077 * method.c (implicitly_declare_fn): Set linkage of generated
2080 2004-07-04 Richard Henderson <rth@redhat.com>
2082 * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
2084 2004-07-03 Scott Brumbaugh <scottb.lists@verizon.net>
2087 * name-lookup.c (push_class_level_binding): Don't pass a
2088 TREE_LIST of ambiguous names to check_template_shadow as it
2089 only handles declarations. Instead, pull the declaration
2092 2004-07-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2095 * pt.c (check_explicit_specialization): Clarify error message.
2097 2004-07-02 Richard Henderson <rth@redhat.com>
2099 * tree.c (cp_unsave_r): Update remap_save_expr call.
2101 2004-07-02 Mark Mitchell <mark@codesourcery.com>
2104 * mangle.c (write_template_arg): Correct mangling.
2107 * decl.c (grokdeclarator): Robustify.
2109 2004-07-01 Richard Henderson <rth@redhat.com>
2111 * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
2112 * method.c (synthesize_method): Don't clear_last_expr.
2113 * name-lookup.c (maybe_push_cleanup_level): Likewise.
2115 2004-07-01 Nick Clifton <nickc@redhat.com>
2117 * decl2.c (import_export_class): Invoke the
2118 import_export_class field in the gcc_target structure if it is not
2121 2004-06-30 Richard Henderson (rth@redhat.com>
2123 * decl.c (start_preparsed_function): Don't set immediate_size_expand.
2124 * method.c (use_thunk): Likewise.
2126 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
2128 * call.c (build_over_call), typeck.c (build_function_call): Call
2129 check_function_arguments instead of check_function_format.
2131 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
2133 * call.c (build_over_call), typeck.c (build_function_call): Update
2134 calls to check_function_format.
2136 2004-06-30 Richard Henderson <rth@redhat.com>
2138 * call.c (build_over_call): Use __builtin_memcpy for copying
2139 CLASS_AS_BASE rather than funny casting.
2141 2004-06-30 Richard Henderson <rth@redhat.com>
2143 * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
2144 TYPE_SIZE_UNIT of full_type.
2146 2004-06-30 Per Bothner <per@bothner.com>
2148 Conditionally compile support for --enable-mapped_location.
2149 * decl.c (pop_label): Handle (imperfectly) USE_MAPPED_LOCATION case.
2150 * decl2.c: If USE_MAPPED_LOCATION, don't do some line number
2151 adjustments - which I don't understand.
2152 * error.c (dump_decl): Rename "<interrnal>" to "<built-in>".
2153 * error.c: Use LOCATION_FILE and EXPR_LOCATION macros.
2154 (print_instantiation_partial_context): Use expand_location.
2155 * decl.c (duplicate_decl): Use new DECL_IS_BUILTIN macro.
2156 * name-lookup.c: Likewise.
2157 * lex.c (cxx_init): Likewise. Also use BUILTINS_LOCATION.
2158 * name-lookup.c: Use input_line macro.
2159 * parser.c (cp_lexer_get_preprocessor_token): Use UNKNOWN_LOCATION.
2160 (cp_parser_statement): Rename locaal variable statement_locus to
2161 statement_location and use SET_EXPR_LOCATION macro.
2162 * pt.c: Handle USE_MAPPED_LOCATION case. Use new macros.
2163 * tree.c (cp_walk_subtrees): Likewise.
2165 2004-06-29 Per Bothner <per@bothner.com>
2167 * tree.c (build_min_nt, build_min, build_min_non_dep):
2168 Don't set TREE_COMPLEXITY from input_line.
2170 2004-06-29 Paul Brook <paul@codesourcery.com>
2172 * init.c: Include target.h.
2173 (get_cookie_size): Remove and replace with target hook.
2175 (build_new_1): Store the element size in the cookie.
2177 2004-06-29 Nathan Sidwell <nathan@codesourcery.com>
2180 * parser.c (cp_parser_template_declaration_after_export): Disable
2181 access checks here ...
2182 (cp_parser_class_specifier): ... not here.
2184 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
2186 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
2187 VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
2188 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
2191 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
2193 * cp-tree.h (struct deferred_access): Move to ...
2194 * semantics.c (struct deferred_access): ... here. Adjust.
2195 (deferred_access_stack): Make a VEC(deferred_access),
2196 (deferred_access_free_list): Remove.
2197 (deferred_access_no_check): New.
2198 (push_deferring_access_checks, resume_deferring_access_checks,
2199 stop_deferring_access_checks, pop_deferring_access_checks,
2200 get_deferred_access_checks, pop_to_parent_deferring_access_checks,
2201 perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
2203 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
2206 * call.c (build_temp): Declare.
2207 (check_constructor_callable): New.
2208 (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
2209 CONSTRUCTOR_CALLABLE.
2210 (convert_like_real, initialize_reference): Use
2211 check_constructor_callable.
2212 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
2213 (LOOKUP_*): Renumber.
2215 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
2217 * friend.c (add_friend): Only perform access checks when context
2219 * lex.c (cxx_make_type): Only create a binfo for aggregate types.
2220 * parser.c (cp_parser_class_specifier): Disable access checks here
2221 when parsing the body of a templated class.
2222 * semantics.c (perform_or_defer_access_checks): Reorder to allow
2223 NULL binfos when not checking access.
2225 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
2227 Use vector API for vbase list.
2228 * cp-tree.h: Include vec.h
2229 (DEF_VEC_P (tree)): New type.
2230 (struct lang_type_class): Change vbase's member type.
2231 (binfo_for_vbase): Declare.
2232 * class.c (determine_primary_base, base_derived_from,
2233 update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
2234 warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
2235 build_vtbl_initializer): Adjust.
2236 * decl.c (xref_basetypes): Adjust, accumulate upper bound of
2238 * init.c (sort_mem_initializers, expand_member_init,
2239 push_base_cleanups): Adjust.
2240 * method.c (do_build_copy_constructor): Adjust.
2241 * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
2242 (binfo_for_vbase): New.
2243 * tree.c (copy_base_binfos): Adjust.
2245 2004-06-28 Mark Mitchell <mark@codesourcery.com>
2247 * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
2249 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
2252 * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
2253 paranthesis in case of pointers to array members.
2254 * error.c (dump_type_prefix): Likewise.
2255 (dump_type_suffix): Maybe issue a whitespace when printing
2258 2004-06-27 Mark Mitchell <mark@codesourcery.com>
2261 * parser.c (cp_parser_set_decl_spec_type): Refine test for
2262 redefinition of built-in types.
2264 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
2266 * error.c (pp_template_argument_list_start): Remove.
2267 (pp_template_argument_list_end): Likewise.
2268 (pp_separate_with_comma): Use pp_cxx_separate_with.
2269 (reinit_global_formatting_buffer): Remove.
2270 (pp_non_consecutive_character): Likewise.
2271 (dump_scope): Use pp_cxx_colon_colon.
2272 (dump_template_parameter): Use pp_cxx_identifier,
2273 pp_cxx_tree_identifier and pp_cxx_whitespace.
2274 (dump_templat_bindings): Replace use of pp_string with sequence
2275 of pp_cxx_whitespace and pp_equal.
2276 (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
2277 pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set
2279 (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
2280 (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace,
2281 pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
2282 (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
2283 pp_cxx_right_bracket, pp_cxx_identifier throughout,
2284 (dump_decl): Likewise.
2285 (dump_template_decl): Likewise.
2286 (dump_function_decl): Likewise. Set padding as appropriate.
2287 (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
2289 (dump_exception_spec): Likewise.
2290 (dump_function_name): Use pp_cxx_tree_identifier and
2292 (dump_template_parms): Use pp_cxx_begin_template_argument_list and
2293 pp_cxx_end_template_argument_list.
2294 (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
2295 pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
2296 pp_cxx_whitespace throughout.
2297 (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
2299 (dump_unary_op): Likewise.
2300 (reinit_cxx_pp): New function.
2301 (type_as_string); Use it.
2302 (expr_as_string): Likewise.
2303 (decl_as_string); Likewise.
2304 (context_as_string): Likewise.
2305 (lang_decl_name): Likewise.
2306 (decl_to_string): Likewise.
2307 (expr_to_string): Likewise.
2308 (parm_to_string): Likewise.
2309 (type_to_string): Likewise.
2310 (args_to_string): Likewise.
2311 (cv_to_string): Likewise.
2313 2004-06-26 Mark Mitchell <mark@codesourcery.com>
2315 * cp-tree.h (cp_cv_quals): New type.
2316 (cp_declarator): Use it instead of "tree" as appropriate.
2317 (grok_method_quals): Adjust prototype.
2318 (grokclassfn): Likewise.
2319 (do_friend): Likewise.
2320 * decl.c (grokfndecl): Use cp_cv_quals, not tree.
2321 (grokdeclarator): Likewise.
2322 * decl2.c (grok_method_quals): Likewise.
2323 (grokclassfn): Likewise.
2324 * friend.c (do_friend): Likewise.
2325 * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
2326 * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
2327 (make_pointer_declarator): Likewise.
2328 (make_reference_declarator): Likewise.
2329 (make_ptrmem_declarator): Likewise.
2330 (cp_parser_ptr_operator): Likewise.
2331 (cp_parser_cv_qualifier_seq_opt): Likewise.
2332 (cp_parser_cv_qualifier_opt): Remove.
2333 (cp_parser_new_declarator_opt): Adjust call to
2334 cp_parser_ptr_operator.
2335 (cp_parser_conversion_declaration_opt): Likewise.
2336 (cp_parser_declarator): Use cp_cv_quals, not tree.
2337 (cp_parser_direct_declarator): Likewise.
2339 2004-06-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2341 * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
2342 Rename DECL_STMT to DECL_EXPR.
2343 * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
2344 * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
2345 * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
2347 2004-06-26 Jan Hubicka <jh@suse.cz>
2350 * decl2.c (maybe_emit_vtables): Always import_export_vtable for the
2351 reachability analysis.
2353 2004-06-25 Mark Mitchell <mark@codesourcery.com>
2355 * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
2358 2004-06-25 Paul Brook <paul@codesourcery.com>
2360 * decl2.c (get_guard): Call targetm.cxx.guard_type.
2361 (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
2363 2004-06-24 Mark Mitchell <mark@codesourcery.com>
2365 * decl.c (grokdeclarator): Restore error messages about __thread.
2366 * parser.c (cp_parser_decl_specifier_seq): Likewise.
2368 2004-06-24 Jason Merrill <jason@redhat.com>
2371 * decl.c (grokparms): Give the PARM_DECL reference type if the
2372 parameter is passed by invisible reference.
2374 2004-06-24 Andreas Schwab <schwab@suse.de>
2376 * cp-tree.h (enum cp_storage_class): Remove trailing comma.
2378 2004-06-23 Mark Mitchell <mark@codesourcery.com>
2380 * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
2381 (cp/decl.o): Likewise.
2382 (cp/decl2.o): Likewise.
2383 (cp/pt.o): Likewise.
2384 (cp/semantics.o): Likewise.
2385 * config-lang.in (gtfiles): Do not reference cp/lex.h.
2386 * class.c: Do not include lex.h.
2387 (add_implicitly_declared_members): Do not use
2388 adding_implicit_members.
2389 (check_bases_and_members): Do not talk about grok_x_components.
2390 * cp/cp-tree.h (adding_implicit_members): Remove.
2391 (cp_storage_class): New type.
2392 (cp_decl_spec): Likewise.
2393 (cp_decl_specifier_seq): Likewise.
2394 (cp_parameter_declarator): Use it for the decl_specifiers field.
2395 (check_tag_decl): Adjust prototype.
2396 (shadow_tag): Likewise.
2397 (groktypename): Likewise.
2398 (start_decl): Likewise.
2399 (start_function): Likewise.
2400 (start_method): Likewise.
2401 (grok_x_components): Remove.
2402 (grokfield): Adjust prototype.
2403 (grokbitfield): Likewise.
2404 (finish_member_class_template): Remove.
2405 * decl.c: Do not include lex.h.
2406 (adding_implicit_members): Do not define.
2407 (check_tag_decl): Do not use trees to represent decl-specifiers.
2408 (shadow_tag): Likewise.
2409 (groktypename): Likewise.
2410 (start_decl): Likewise.
2411 (grokvardecl): Likewise.
2412 (grokdeclarator): Likewise.
2413 (grokparms): Likewise.
2414 (start_function): Likewise.
2415 (start_method): Likewise.
2416 * decl.h (grokdeclarator): Adjust prototype.
2417 * decl2.c: Do not include lex.h.
2418 (grok_x_components): Remove.
2419 (grokfield): Do not use trees to represent decl-specifiers.
2420 (grokbitfield): Likewise.
2421 * lex.c: Do not include lex.h.
2423 * parser.c: Include target.h.
2424 (clear_decl_specs): New function.
2425 (cp_parser_translation_unit): Do not use trees to represent
2427 (cp_parser_postfix_expression): Likewise.
2428 (cp_parser_new_type_id): Likewise.
2429 (cp_parser_condition): Likewise.
2430 (cp_parser_simple_declaration): Likewise.
2431 (cp_parser_decl_specifier_seq): Likewise.
2432 (cp_parser_function_specifier_opt): Likewise.
2433 (cp_parser_conversion_type_id): Likewise.
2434 (cp_parser_template_parameter): Likewise.
2435 (cp_parser_explicit_instantiation): Likewise.
2436 (cp_parser_type_specifier): Likewise.
2437 (cp_parser_simple_type_specifier): Likewise.
2438 (cp_parser_init_declarator): Likewise.
2439 (cp_parser_type_id): Likewise.
2440 (cp_parser_type_specifier_seq): Likewise.
2441 (cp_parser_parameter_declaration): Likewise.
2442 (cp_parser_member_declaration): Likewise.
2443 (cp_parser_exception_declaration): Likewise.
2444 (cp_parser_function_definition_from_specifiers_and_declarator):
2446 (cp_parser_single_declaration): Likewise.
2447 (cp_parser_save_member_function_body): Likewise.
2448 (cp_parser_friend_p): Likewise.
2449 (cp_parser_set_storage_class): New function.
2450 (cp_parser_set_decl_spec_type): Likewise.
2451 * pt.c: Do not include lex.h.
2452 * semantics.c: Likewise.
2453 (finish_member_class_template): Remove.
2455 2004-06-23 Roger Sayle <roger@eyesopen.com>
2457 * call.c (build_cxx_call): Don't call expand_tree_builtin. No
2458 longer take both "args" and "convert_args" as arguments.
2459 (build_op_delete_call): Update call to build_cxx_call.
2460 (build_over_call): Likewise, update call to build_cxx_call.
2461 * cp-tree.h (build_cxx_call): Update funtion prototype.
2462 * typeck.c (build_function_call): Don't call expand_tree_builtin.
2463 * rtti.c (throw_bad_cast): Update call to build_cxx_call.
2464 (throw_bad_typeid): Likewise.
2465 (build_dynamic_cast_1): Likewise.
2467 2004-06-22 Richard Henderson <rth@redhat.com>
2469 * class.c (build_vfn_ref): Take a pointer not object. Build
2471 (cp_fold_obj_type_ref): New.
2472 * call.c (build_over_call): Update build_vfn_ref call.
2473 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
2474 * cp-tree.h (cp_fold_obj_type_ref): Declare.
2476 2004-06-21 Jason Merrill <jason@redhat.com>
2479 * cp-gimplify.c (cp_gimplify_init_expr): Look through
2482 2004-06-21 Mark Mitchell <mark@codesourcery.com>
2484 * cp-tree.def (NEW_EXPR): Add a fourth slot.
2485 * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
2486 (TREE_PARMLIST): Likewise.
2487 (CALL_DECLARATOR_PARMS): Likewise.
2488 (CALL_DECLARATOR_QUALS): Likewise.
2489 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
2490 (cp_declarator_kind): New type.
2491 (cp_parameter_declarator): Likewise.
2492 (cp_declarator): Likewise.
2493 (cp_error_declarator): Likewise.
2494 (no_parameters): Likewise.
2495 (groktypename): Change prototype.
2496 (start_decl): Likewise.
2497 (start_handler_parms): Likewise.
2498 (get_scope_of_declarator): Likewise.
2499 (start_function): Likewise.
2500 (start_preparsed_function): New function.
2501 (start_function): Change prototype.
2502 (start_method): Likewise.
2503 (grokfield): Likewise.
2504 (grokbitfield): Likewise.
2505 (build_new): Likewise.
2506 (make_pointer_declarator): Remove.
2507 (make_reference_declarator): Likewise.
2508 (make_call_declarator): Likewise.
2509 (set_quals_and_spec): Likewise.
2510 (process_template_parm): Change prototype.
2511 (begin_function_definition): Remove.
2512 (finish_parmlist): Remove.
2513 * decl.c (groktypename): Do not use trees to represent
2515 (start_decl): Likewise.
2516 (start_handler_parms): Remove.
2517 (get_scope_of_declarator): Reimplement.
2518 (grokdeclarator): Do not use trees to represent declarators.
2519 (grokparms): Likewise.
2520 (start_function): Likewise.
2521 (start_method): Likewise.
2522 (build_void_list_mode): Do not use TREE_PARMLIST.
2523 * decl.h (grokdeclarator): Change prototype.
2524 * decl2.c (grok_method_quals): Robustify.
2525 (grok_x_components): Do not use trees to represent declarators.
2526 (grokfield): Likewise.
2527 (grokbitfield): Likewise.
2528 (start_objects): Build FUNCTION_DECLs, not declarators.
2529 (start_static_storage_duration_function): Likewise.
2530 * init.c (build_new): Simplify.
2531 * lex.c (make_pointer_declarator): Remove.
2532 (make_reference_declarator): Likewise.
2533 (make_call_declarator): Likewise.
2534 (set_quals_and_spec): Likewise.
2535 * method.c (use_thunk): Use start_preparsed_function.
2536 (synthesize_method): Likewise.
2537 (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
2538 * optimize.c (maybe_clone_body): Use start_preparsed_function.
2539 * parser.c (cp_error_declarator): New variable.
2540 (declarator_obstack): Likewise.
2541 (alloc_declarator): New function.
2542 (make_declarator): Likewise.
2543 (make_id_declarator): Likewise.
2544 (make_pointer_declarator): Likewise.
2545 (make_reference_declarator): Likewise.
2546 (make_ptrmem_declarator): Likewise.
2547 (make_call_declarator): Likewise.
2548 (make_array_declarator): Likewise.
2549 (no_parameters): New variable.
2550 (make_parameter_declarator): Likewise.
2551 (cp_parser_check_for_definition_in_return_type): Do not use trees
2552 to represent declarators.
2553 (cp_parser_translation_unit): Likewise.
2554 (cp_parser_new_expression): Likewise.
2555 (cp_parser_new_type_id): Likewise.
2556 (cp_parser_new_declarator_opt): Likewise.
2557 (cp_parser_direct_new_declarator): Likewise.
2558 (cp_parser_condition): Likewise.
2559 (cp_parser_declaration_statement): Likewise.
2560 (cp_parser_declaration): Likewise.
2561 (cp_parser_conversion_type_id): Likewise.
2562 (cp_parser_conversion_declarator_opt): Likewise.
2563 (cp_parser_template_parameter_list): Likewise.
2564 (cp_parser_template_parameter): Likewise.
2565 (cp_parser_explicit_instantiation): Likewise.
2566 (cp_parser_init_declarator): Likewise.
2567 (cp_parser_declarator): Likewise.
2568 (cp_parser_direct_declarator): Likewise.
2569 (cp_parser_type_id): Likewise.
2570 (cp_parser_parameter_declaration_clause): Likewise.
2571 (cp_parser_parameter_declaration_list): Likewise.
2572 (cp_parser_parameter_declaration): Likewise.
2573 (cp_parser_member_declaration): Likewise.
2574 (cp_parser_exception_declaration): Likewise.
2575 (cp_parser_check_declarator_template_parameters): Likewise.
2576 (cp_parser_function_definition_from_specifiers_and_declarator):
2578 (cp_parser_save_member_function_body): Likewise.
2579 * pt.c (process_template_parm): Add is_non_type parameter.
2580 (convert_template_argument): Adjust call to groktypename.
2581 (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
2582 (tsubst): Do not expect declarators.
2583 (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
2585 (instantiate_decl): Use start_preparsed_function.
2586 * semantics.c (begin_function_definition): Remove.
2587 (finish_parmlist): Remove.
2588 * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
2591 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2593 * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
2594 (build_new_method_call): Likewise.
2595 * decl.c (local_variable_p_walkfn): Don't walk into types.
2596 * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
2597 (build_anon_union_vars): Add new operand for COMPONENT_REF.
2598 * init.c (buld_new): Add new operand for ARRAY_REF.
2599 * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
2600 (do_build_assign_ref): Likewise.
2601 * parser.c (cp_parser_direct_new_declarator): Add new operands
2603 (cp_parser_direct_declarator): Likewise.
2604 * pt.c (tsubst): Likewise.
2605 (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
2607 * semantics.c (finish_non_static_data_member): Add new operand
2609 * typeck.c (build_class_member_access_expr): Likewise.
2610 (build_class_member_access_expr, finish_class_member_access_expr):
2612 (build_ptrmemfunc_access_expr): Likewise.
2613 (build_array_ref): Add new operands for ARRAY_REF.
2614 * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
2615 * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
2617 2004-06-21 Richard Henderson <rth@redhat.com>
2619 * dump.c (cp_dump_tree): Don't use dump_next_stmt.
2620 * parser.c (cp_parser_jump_statement): Update commentary.
2621 * pt.c (tsubst_expr): Use RETURN_EXPR.
2622 * semantics.c (finish_return_stmt): Likewise.
2623 (finalize_nrv_r): Likewise.
2624 * typeck.c, typeck2.c: Update file start commentary.
2626 2004-06-21 Richard Henderson <rth@redhat.com>
2628 * semantics.c (finish_expr_stmt): Call verify_sequence_points.
2630 2004-06-20 Richard Henderson <rth@redhat.com>
2632 * cp-tree.h (add_decl_stmt): Declare.
2633 * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
2634 * semantics.c (maybe_cleanup_point_expr): New.
2635 (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
2636 finish_for_expr, finish_switch_cond): Use it.
2637 (finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN.
2639 2004-06-20 Richard Henderson <rth@redhat.com>
2641 * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
2642 * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
2643 (cp_gimplify_expr): Call it.
2644 (gimplify_cleanup_stmt): Move from c-gimplify.c.
2645 (cp_genericize): New.
2646 * decl.c (finish_function): Call it.
2647 * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
2648 (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
2649 (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
2650 (cp_genericize): Declare.
2651 * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
2652 * dump.c (cp_dump_tree): Likewise.
2653 * semantics.c (push_cleanup): Move from c-semantics.c.
2655 2004-06-20 Zack Weinberg <zack@codesourcery.com>
2657 * cp-lang.c (has_c_linkage): Implement.
2659 * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
2660 * decl.c (duplicate_decls): Use COPY_DECL_RTL.
2661 (builtin_function_1): Don't call make_decl_rtl.
2662 (build_cp_library_fn): Don't call set_mangled_name_for_decl.
2663 (grokvardecl): Don't call mangle_decl.
2664 * except.c (nothrow_libfn_p): Look at DECL_NAME, not
2665 DECL_ASSEMBLER_NAME.
2666 * method.c (set_mangled_name_for_decl): Delete.
2667 * name-lookup.c (pushdecl): When a local extern shadows a
2668 file-scope declaration of the same object, give both DECLs the
2670 * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
2671 on DECL_ASSEMBLER_NAME.
2673 2004-06-19 Richard Henderson <rth@redhat.com>
2675 * cp-gimplify.c: Remove unnecessary prototypes.
2676 (cp_gimplify_stmt): Merge into ...
2677 (cp_gimplify_expr): ... here. Move to end of file. Handle
2678 stmts_are_full_exprs_p frobbing.
2679 * cp-tree.h (cp_gimplify_stmt): Remove.
2680 * pt.c (tsubst_expr): Merge prep_stmt and unify.
2681 * tree.c (init_tree): Don't set lang_gimplify_stmt.
2683 2004-06-18 Richard Henderson <rth@redhat.com>
2686 * semantics.c (begin_cond): New.
2687 (finish_cond): Rewrite to handle template DECL_STMTs specially.
2688 Assume that non-template decls go land before the conditional.
2689 (simplify_loop_decl_cond): Likewise.
2690 (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
2691 finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
2692 begin_switch_stmt, finish_switch_cond): Update to match.
2694 2004-06-17 Jason Merrill <jason@redhat.com>
2697 * semantics.c (simplify_aggr_init_expr): Don't return the slot.
2698 (finish_stmt_expr_expr): Update type after conversions.
2699 (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
2700 Handle void initializer.
2701 * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
2703 2004-06-17 Geoffrey Keating <geoffk@apple.com>
2705 * class.c (build_clone): Don't call defer_fn, let mark_used do it.
2706 * cp-tree.h (defer_fn): Delete.
2707 * decl2.c (defer_fn): Delete.
2708 (finish_file): Simplify deferred_fns loops; check that
2709 only used inline functions get into deferred_fns.
2710 (mark_used): Inline previous contents of defer_fn.
2712 2004-06-16 Richard Henderson <rth@redhat.com>
2714 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
2715 (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
2716 * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
2717 of CTOR_INITIALIZER ...
2718 (pp_cxx_statement): ... here.
2719 * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
2720 (finish_function): Use alloc_stmt_list to zap entire function.
2721 * parser.c (cp_parser_compound_statement): Update commentary.
2722 * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
2723 * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
2724 (finish_stmt_expr): Don't look through COMPOUND_STMT.
2726 2004-06-16 Geoffrey Keating <geoffk@apple.com>
2728 * pt.c (mark_decl_instantiated): Don't call defer_fn.
2730 2004-06-16 Richard Henderson <rth@redhat.com>
2732 * parser.c (cp_parser_labeled_statement): Update commentary.
2733 * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
2734 * tree.c (mark_local_for_remap_r): Likewise.
2736 2004-06-16 Richard Henderson <rth@redhat.com>
2738 * parser.c (cp_parser_asm_definition): Update commentary.
2739 * pt.c (tsubst_expr): Use ASM_EXPR.
2740 * semantics.c (finish_asm_stmt): Likewise.
2742 2004-06-16 Richard Henderson <rth@redhat.com>
2744 * decl.c (finish_destructor_body): Use LABEL_EXPR.
2745 * parser.c (cp_parser_statement): Update commentary.
2746 * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
2747 * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
2748 * tree.c (mark_local_for_remap_r): Likewise.
2750 2004-06-16 Richard Henderson <rth@redhat.com>
2753 * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
2754 statement in FOR_INIT_STMT for templates.
2756 2004-06-15 Richard Henderson <rth@redhat.com>
2758 * call.c (initialize_reference): Don't build CLEANUP_STMT here.
2759 * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
2760 (genericize_try_block): Use gimplify_stmt.
2761 (genericize_catch_block, genericize_eh_spec_block): Likewise.
2762 (cp_gimplify_init_expr): Remove STMT_EXPR special case.
2763 (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
2764 * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
2765 (cp_tree_chain_matters_p): Remove.
2766 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
2767 (COMPOUND_STMT_BODY_BLOCK): New.
2768 (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
2769 (EXPR_STMT_STMT_EXPR_RESULT): New.
2770 (building_stmt_tree): Check cur_stmt_list.
2771 (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
2772 (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
2773 * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
2774 (cp_finish_decl): Use push_cleanup.
2775 (start_function, finish_function): Use statement lists.
2776 (finish_stmt): Do nothing.
2777 * except.c (begin_eh_spec_block): Use statement lists.
2778 (check_handlers_1, check_handlers): Likewise.
2779 * init.c (construct_virtual_base): Don't add extra compound stmts.
2780 (build_vec_init): Likewise.
2781 * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
2782 * name-lookup.h (struct cp_binding_level): Add statement_list.
2783 * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
2784 (cp_parser_labeled_statement, cp_parser_expression_statement,
2785 cp_parser_statement_seq_opt): Likewise.
2786 (cp_parser_compound_statement): Likewise. Take bool for try block.
2787 (cp_parser_selection_statement): Tidy if processing.
2788 (cp_parser_already_scoped_statement): Rewrite to do what it says.
2789 * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
2790 (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST.
2791 Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
2792 * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
2793 (finish_cond): New, rewritten from FINISH_COND.
2794 (simplify_loop_decl_cond): New.
2795 (finish_expr_stmt): Avoid nested EXPR_STMTs.
2796 (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
2797 begin_else_clause, finish_else_clause, finish_if_stmt,
2798 begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
2799 begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
2800 finish_for_cond, finish_for_stmt, begin_switch_stmt,
2801 finish_switch_cond, finish_switch_stmt, begin_try_block,
2802 finish_try_block, finish_cleanup_try_block, finish_function_try_block,
2803 finish_handler_sequence, finish_function_handler_sequence,
2804 begin_handler, finish_handler_parms, finish_handler,
2805 begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
2806 using statement lists.
2807 (begin_compound_stmt): Replace has_no_scope argument with flags.
2808 Update all callers. Use statement lists.
2809 (finish_compound_stmt): Likewise.
2810 (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
2811 (current_scope_stmt_stack): Remove.
2812 (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
2813 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
2814 Rewrite with statement lists.
2816 2004-06-15 Alexandre Oliva <aoliva@redhat.com>
2818 * parser.c: Change all assignments of c_lex_string_translate
2819 to true and false to 1 and 0.
2820 (cp_lexer_read_token): Convert type of the translated string.
2821 (cp_parser_skip_to_closing_parentheses): Preserve original
2822 value of c_lex_string_translate, and set it to -1 while
2824 (cp_parser_cache_group): Likewise.
2825 (cp_parser_cache_group_1): Renamed.
2826 (cp_parser_asm_operand_list): Remove redundant setting of
2827 c_lex_string_translate.
2828 (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
2829 Handle chained strings.
2831 2004-06-12 Andrew Pinski <apinski@apple.com>
2835 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
2837 * cp-tree.h: Fix typo.
2839 * cp-tree.h: Include cgraph.h
2840 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
2841 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
2843 2004-06-12 Jason Merrill <jason@redhat.com>
2845 PR tree-optimization/14107
2846 * decl.c (finish_function): Warn about no return in all functions.
2848 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
2850 * cp-tree.h (struct language_function): Remove cannot_inline.
2851 * decl.c (save_function_data): cannot_inline is no more.
2852 (cxx_push_function_context): Likewise.
2853 * decl2.c (start_objects, start_static_storage_duration_function):
2854 Reset DECL_INLINE, set DECL_UNINLINABLE.
2856 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2859 * search.c (lookup_field): Propagate the ambiguity list.
2860 (lookup_fnfields): Likewise.
2862 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2865 * parser.c (cp_parser_template_name): Ctors/dtors never need a
2866 template keyword to disambiguate.
2868 2004-06-14 Mark Mitchell <mark@codesourcery.com>
2871 * decl.c (grokdeclarator): Ignore pointer-to-members when
2872 computing template depth.
2875 * name-lookup.c (pushtag): Do not try to put class declarations in
2876 explicit specialization scopes.
2878 2004-06-11 Andrew Pinski <pinskia@physics.uc.edu>
2880 * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
2882 2004-06-11 Mark Mitchell <mark@codesourcery.com>
2885 * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
2886 bindings for undeclared built-ins.
2888 2004-06-11 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2890 * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
2891 appear at the correct location.
2893 2004-06-10 Jason Merrill <jason@redhat.com>
2897 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2898 * init.c (build_offset_ref): Build SCOPE_REF with non-null
2899 TREE_TYPE for non-dependent names.
2900 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
2901 unknown_type_node as its TREE_TYPE.
2902 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
2903 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
2904 (dump_expr) <SCOPE_REF case>: Likewise.
2906 2004-06-10 Mark Mitchell <mark@codesourcery.com>
2909 * parser.c (cp_parser_direct_declarator): Robustify.
2912 * pt.c (tsubst_copy): Use decl_constant_value on enumeration
2913 constants in non-dependent contexts.
2917 * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
2920 2004-06-10 Jakub Jelinek <jakub@redhat.com>
2923 * decl.c (duplicate_decls): Handle fileptr_type_node arguments
2926 2004-06-09 Mark Mitchell <mark@codesourcery.com>
2930 2004-06-07 Mark Mitchell <mark@codesourcery.com>
2931 * lex.c (handle_pragma_interface): Deprecate.
2932 (handle_pragma_implementation): Likewise.
2934 2004-06-09 Andrew Pinski <pinskia@physics.uc.edu>
2936 * g++spec.c (lang_specific_driver): Remove check for -lm
2937 and -lmath when check it see if it was the math library.
2939 2004-06-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2942 * parser.c (cp_parser_direct_declarator): Reject constructor named
2943 as qualified template-id.
2945 2004-06-07 Mark Mitchell <mark@codesourcery.com>
2948 * lex.c (handle_pragma_interface): Deprecate.
2949 (handle_pragma_implementation): Likewise.
2951 2004-06-07 Mark Mitchell <mark@codesourcery.com>
2954 * parser.c (cp_parser_iteration_statement): Fix typo in error
2958 * pt.c (tsubst_default_argument): Do not defer access checks
2959 while substituting into the default argument.
2962 * pt.c (tsubst_copy): Do not try to substitute for an enumeration
2963 constant in a non-dependent context.
2966 * except.c (build_throw): Ensure that temp_expr has been
2969 2004-06-06 Roger Sayle <roger@eyesopen.com>
2971 * cp/cp-tree.h (lvalue_or_else): Add function prototype.
2973 2004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2976 * parser.c (cp_parser_mem_initializer_id): Gracefully reject
2977 'typename', and accept 'template'.
2979 2004-06-03 Andrew Pinski <pinskia@physics.uc.edu>
2980 Jan Hubicka <jh@suse.cz>
2983 * method.c (use_think): Do not mark thunk as referenced.
2985 2004-06-03 Matt Austern <austern@apple.com>
2988 * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
2989 is nonzero, and if we see a noninline definition of a key method,
2990 make the vtables nonweak.
2992 2004-06-02 Matt Austern <austern@apple.com>
2994 * cp-tree.h (instantiate_decl): new boolean parameter,
2995 undefined_ok. Current behavior is equivalent to its being 0.
2996 * decl2.c (mark_used): Add new argument when calling instantiate_decl
2997 * pt.c (mark_decl_instantiated): Unconditionally make
2998 instantiations explicit unconditionally
2999 (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
3000 since mark_decl_instantiated now does it.
3001 (instantiate_class_member): New. Instantiate a member of an
3002 explicitly instantiated class template.
3003 (do_type_instantiation): Explicitly instantiate members of an
3004 explicitly instantiated class template.
3005 (instantiate_decl): if undefined_ok is nonzero, and if we're
3006 trying to explicitly instantiated a template with no definition,
3007 change it to an implicit instantiation.
3008 (instantiate_pending_templates): Add new argument to instantiate_decl.
3009 * tree.c (cp_cannot_inline_tree_fn): Likewise.
3011 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
3013 * cp-tree.h: Fix typo.
3015 * cp-tree.h: Include cgraph.h
3016 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
3017 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
3019 2004-06-01 Jason Merrill <jason@redhat.com>
3022 * call.c (call_builtin_trap): Remove type parm.
3023 (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
3024 (build_x_va_arg): Dereference a null pointer for a non-POD argument.
3026 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3029 * init.c (build_offset_ref): Build SCOPE_REF with non-null
3030 TREE_TYPE for non-dependent names.
3031 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
3032 unknown_type_node as its TREE_TYPE.
3033 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
3034 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
3035 (dump_expr) <SCOPE_REF case>: Likewise.
3037 2004-06-01 Richard Henderson <rth@redhat.com>
3038 Andrew Pinski <pinskia@physics.uc.edu>
3040 * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
3041 * parser.c (struct cp_parser): Remove in_offsetof.
3042 (cp_parser_new): Don't set it.
3043 (cp_parser_unary_expression): Don't check it.
3044 (cp_parser_postfix_open_square_expression): Split out from ...
3045 (cp_parser_postfix_expression): ... here.
3046 (cp_parser_postfix_dot_deref_expression): Likewise.
3047 (cp_parser_builtin_offsetof): New.
3048 (cp_parser_primary_expression): Use it.
3050 2004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3053 * parser.c (cp_parser_postfix_expression): Allow subscript
3054 operator in offsetof.
3056 2004-05-31 Mark Mitchell <mark@codesourcery.com>
3059 * friend.c (add_friend): Do not try to perform access checks for
3060 functions from dependent classes.
3062 2004-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
3064 * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
3065 (pp_cxx_begin_template_argument_list): Turn into a function.
3066 (pp_cxx_end_template_argument_list): Likewise.
3067 (pp_cxx_separate_with): Define.
3068 (pp_cxx_unqualified_id): Tidy.
3069 (pp_cxx_primary_expression): Likewise.
3070 (pp_cxx_postfix_expression): Likewise.
3071 (pp_cxx_expression): Likewise.
3072 (pp_cxx_simple_type_specifier): Likewise.
3073 (pp_cxx_type_specifier_seq): Likewise.
3074 (pp_cxx_parameter_declaration_clause): Likewise.
3075 (pp_cxx_exception_specification): Likewise.
3076 (pp_cxx_direct_declarator): Likewise.
3077 (pp_cxx_type_id): Likewise.
3078 * cxx-pretty-print.h (pp_cxx_whitespace): Export from
3080 (pp_cxx_left_paren): Likewise.
3081 (pp_cxx_right_paren): Likewise.
3082 (pp_cxx_left_brace): Likewise.
3083 (pp_cxx_right_brace): Likewise.
3084 (pp_cxx_left_bracket): Likewise.
3085 (pp_cxx_right_bracket): Likewise.
3086 (pp_cxx_dot): Likewise.
3087 (pp_cxx_identifier): Likewise.
3088 (pp_cxx_tree_identifier): Likewise.
3089 (pp_cxx_ampersand): New macro.
3090 (pp_cxx_star): Likewise.
3091 (pp_cxx_arrow): Likewise.
3092 (pp_cxx_semicolon): Likewise.
3093 (pp_cxx_complement): Likewise.
3094 (pp_cxx_begin_template_argument_list): Declaree.
3095 (pp_cxx_end_template_argument_list): Likewise.
3096 (pp_cxx_colon_colon): likewise.
3098 2004-05-31 Eric Botcazou <ebotcazou@libertysurf.fr>
3100 * parser.c (cp_parser_simple_type_specifier): Explicitly test
3103 2004-05-31 Kazu Hirata <kazu@cs.umass.edu>
3105 * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
3106 typeck.c: Fix comment formatting.
3108 2004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
3110 * cp-lang.c (cp_expand_decl): Remove.
3111 (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
3113 2004-05-30 Andreas Jaeger <aj@suse.de>
3115 * lang-specs.h: Add missing initializers for .ii.
3117 2004-05-28 Aldy Hernandez <aldyh@redhat.com>
3119 * decl.c (cp_make_fname_decl): Free return value from
3122 2004-05-28 Mark Mitchell <mark@codesourcery.com>
3125 * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
3127 * init.c (build_new): Likewise.
3130 * name-lookup.c (arg_assoc): Robustify.
3133 * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
3134 when determining the scope to use for a pointer to member.
3135 (lookup_anon_field): Give it external linkage.
3136 * cp-tree.h (lookup_anon_field): Declare it.
3137 * expr.c (cplus_expand_constant): Use it.
3139 2004-05-28 Mark Mitchell <mark@codesourcery.com>
3142 * parser.c (cp_parser_simple_type_specifier): Call
3143 maybe_note_name_used_in_class.
3145 2004-05-28 Tom Marshall <tmarshall@real.com>
3148 * class.c (finish_struct_1): Warn only if the dtor is non-private or
3149 the class has friends.
3151 2004-05-27 Adam Nemet <anemet@lnxw.com>
3154 * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
3155 TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
3157 2004-05-24 Geoffrey Keating <geoffk@apple.com>
3159 * method.c (implicitly_declare_fn): Don't call defer_fn; abort
3160 if it might be needed.
3161 * pt.c (mark_decl_instantiated): Only call defer_fn if
3162 the function actually needs processing in finish_file.
3163 * decl2.c (finish_file): Add check that elements in
3164 deferred_fns_used are really needed there. Remove unnecessary
3165 test of DECL_SAVED_TREE.
3167 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
3169 * Make-lang.in: No need to specify $(LIBCPP).
3171 2004-05-23 Mark Mitchell <mark@codesourcery.com>
3174 * parser.c (cp_parser_class_head): Robustify.
3177 * parser.c (cp_parser_decl_specifier_seq): Correct error in
3179 (cp_parser_constructor_declarator_p): Treat attributes
3183 * typeck.c (build_unary_op): Do not attempt to resolve casts to
3184 base classes in templates.
3186 2004-05-23 Mark Mitchell <mark@codesourcery.com>
3189 * pt.c (instantiate_template): Robustify.
3191 2004-05-23 Mark Mitchell <mark@codesourcery.com>
3194 * decl.c (xref_tag): Issue errors about redeclaring template
3195 classes as non-template classes.
3197 2004-05-23 Mark Mitchell <mark@codesourcery.com>
3200 * name-lookup.c (supplement_binding): Allow redefinitions of
3204 * parser.c (cp_parser_template_argument): Robustify.
3206 2004-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
3208 * class.c (alter_access): Use %E format specifier to print an
3209 identifier node. Avoid looking at the IDENTIFIER_POINTER.
3210 (push_lang_context): Likewise.
3211 * decl.c (lookup_label): Likewise.
3212 (grokdeclarator): Likewise.
3213 * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
3214 * pt.c (do_type_instantiation): Likewise.
3215 * tree.c (handle_java_interface_attribute): Likewise.
3216 (handle_com_interface_attribute): Likewise.
3217 (handle_init_priority_attribute): Likewise.
3219 2004-05-22 Mark Mitchell <mark@codesourcery.com>
3223 * pt.c (build_non_dependent_expr): Expand the set of tree nodes
3224 recognized as overloaded functions.
3226 2004-05-22 Mark Mitchell <mark@codesourcery.com>
3229 * class.c (layout_nonempty_base_or_field): Do not try to avoid
3230 layout conflicts for unions.
3233 * typeck.c (build_x_unary_op): Instantiate template class
3234 specializations before looking for "operator &".
3237 * typeck.c (complete_type): Layout non-dependent array types, even
3241 * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
3244 2004-05-22 Roger Sayle <roger@eyesopen.com>
3246 * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
3247 returning when TREE_TYPE is error_mark_node.
3248 * typeck.c (require_complete_type): Return error_mark_node if
3249 value's type is an error_mark_node.
3251 2004-05-20 Andrew Pinski <pinskia@physics.uc.edu>
3253 * optimize.c (calls_setjmp_r): Remove.
3254 (calls_setjmp_p): Remove.
3255 * cp-tree.c (calls_setjmp_p): Remove.
3256 * decl.c (finish_function): Do not call calls_setjmp_p.
3258 2004-05-18 Zack Weinberg <zack@codesourcery.com>
3260 * decl.c (cp_finish_decl): Use mark_decl_referenced.
3261 * decl2.c (maybe_make_one_only): Likewise.
3262 * method.c (use_thunk): Likewise.
3264 2004-05-18 Jason Merrill <jason@redhat.com>
3266 * class.c (build_base_path): Tidy a bit.
3268 2004-05-14 Geoffrey Keating <geoffk@apple.com>
3270 * name-lookup.c (struct scope_binding): New.
3271 (EMPTY_SCOPE_BINDING): New.
3272 (lookup_using_namespace): Take a scope_binding instead of a
3274 (qualified_lookup_using_namespace): Likewise.
3275 (cxx_binding_clear): Delete.
3276 (do_nonmember_using_decl): Use a scope_binding instead of a
3278 (lookup_tag): Don't call select_decl.
3279 (ambiguous_decl): Don't return anything (and change callers to match).
3280 Take a scope_binding as the second parameter.
3281 (lookup_namespace_name): Use a scope_binding instead of a
3283 (unqualified_namespace_lookup): Likewise.
3284 (lookup_qualified_name): Likewise.
3285 (select_decl): Take a scope_binding instead of a cxx_binding.
3286 Use macros rather than hand-coding tests for type-ness.
3288 2004-05-13 Diego Novillo <dnovillo@redhat.com>
3290 * cp-gimplify.c: Rename from cp-simplify.c.
3291 * Make-lang.in, optimize.c: Update.
3293 2004-05-13 Diego Novillo <dnovillo@redhat.com>
3295 Merge from tree-ssa-20020619-branch. See
3296 ChangeLog.tree-ssa for details.
3298 * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
3299 cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
3300 expr.c, init.c, name-lookup.h, optimize.c, parser.c,
3301 pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
3303 * cp-mudflap.c: New file.
3304 * cp-simplify.c:: New file.
3306 2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3309 * decl2.c (check_classfn): For member templates, compare also the
3310 template parameters to match the declaration.
3311 * cp-tree.h: Adjust declaration of check_classfn.
3312 * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
3313 * friend.c (do_friend): Likewise.
3314 * pt.c (tsubst_friend_function): Likewise.
3316 2004-05-01 Zack Weinberg <zack@codesourcery.com>
3318 * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
3319 Instead, dig into the representation type to find the array bound.
3321 2004-04-30 Jason Merrill <jason@redhat.com>
3323 Refer to base members using COMPONENT_REFs where possible.
3324 * class.c (build_simple_base_path): New fn.
3325 (build_base_path): Use it for non-virtual base references.
3326 (layout_class_type): Change base fields to their real type
3327 after layout is done.
3328 * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
3329 * cp-lang.c (cxx_get_alias_set): Use it.
3331 2004-04-30 Kazu Hirata <kazu@cs.umass.edu>
3333 * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
3336 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3339 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
3340 used in integral constant expressions.
3342 2004-04-22 Mark Mitchell <mark@codesourcery.com>
3344 * init.c (build_aggr_init): Fix accidental use of C99 construct in
3347 * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
3349 * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
3350 * decl.c (reshape_init): Use it.
3351 * init.c (perform_member_init): Remove redundant condition.
3352 (build_aggr_init): Adjust to handle brace-enclosed initializers
3354 (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
3356 * parser.c (cp_parser_initializer_clause): Do not set
3357 TREE_HAS_CONSTRUCTOR on the initializer.
3358 * rtti.c (tinfo_base_init): Likewise.
3359 (generic_initializer): Likewise.
3360 (ptr_initializer): Likewise.
3361 (ptm_initializer): Likewise.
3362 (class_initializer): Likewise.
3363 (get_pseudo_ti_init): Likewise.
3364 * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
3366 2004-04-22 Alan Modra <amodra@bigpond.net.au>
3368 * name-lookup.c (anonymous_namespace_name): Make static.
3370 2004-04-19 Roger Sayle <roger@eyesopen.com>
3373 * class.c (build_base_path): Call fold whilst building the NULL
3374 pointer check expression trees.
3376 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
3378 * init.c (build_new_1): Don't use type size argument for Java
3379 _Jv_AllocObject call.
3381 2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
3383 * method.c (make_alias_for_thunk): Remove preprocessor guard on
3384 declaration and definition.
3386 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
3389 * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
3390 than ASM_OUTPUT_DEF.
3392 2004-04-08 Jakub Jelinek <jakub@redhat.com>
3394 * decl2.c (mark_used): Don't segfault if cfun != NULL but
3395 current_function_decl == NULL.
3397 2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
3400 * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
3403 2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3405 * init.c (decl_constant_value): Don't look at DECL_INITIAL
3407 * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
3408 or TREE_SIDE_EFFECTS of a type.
3410 2004-04-02 Nathan Sidwell <nathan@codesourcery.com>
3413 * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
3414 cv-qualifier unification.
3415 * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
3417 2004-04-02 Jan Hubicka <jh@suse.cz>
3419 * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
3420 * cp-tree.h (cp_update_decl_after_saving): Declare.
3421 * tree.c (cp_update_decl_after_saving): Define.
3423 2004-04-01 Mark Mitchell <mark@codesourcery.com>
3426 * typeck.c (get_delta_difference): Call fold before returning the
3429 2004-04-01 Richard Henderson <rth@redhat.com>
3432 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
3433 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
3435 2004-04-01 Mark Mitchell <mark@codesourcery.com>
3438 * name-lookup.c (maybe_push_cleanup_level): Robustify.
3440 2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3442 * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
3444 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3446 * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
3447 * class.c (check_bitfield_decl): Likewise.
3448 * cvt.c (type_promotes_to): Likewise.
3449 * decl.c (finish_enum): Likewise.
3450 * mangle.c (write_builtin_type): Likewise.
3451 * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
3452 * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
3453 (build_binary_op): Likewise.
3455 2004-03-31 Jan Hubicka <jh@suse.cz>
3457 * tree.h (optimize_function): Kill prototype.
3458 * optimize.c (dump_function, optimize_function, dump_finction): Kill.
3459 * semantics.c (expand_body): Kill.
3461 2004-03-30 Mark Mitchell <mark@codesourcery.com>
3464 * decl.c (start_decl_1): Do not decide whether or not to create a
3465 new cleanup level until after the type has been completed.
3468 * pt.c (tsubst_default_argument): Clear current_function_decl.
3470 2004-03-30 Zack Weinberg <zack@codesourcery.com>
3472 * name-lookup.c, parser.c: Use new shorter form of GTY markers.
3474 2004-03-29 Zack Weinberg <zack@codesourcery.com>
3476 * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
3477 is null, just print the literal name and return.
3479 2004-03-25 Kazu Hirata <kazu@cs.umass.edu>
3481 * cxx-pretty-print.c: Fix comment typos.
3483 2004-03-24 Kazu Hirata <kazu@cs.umass.edu>
3485 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
3488 2004-03-23 Ziemowit Laski <zlaski@apple.com>
3490 * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
3491 * mangle.c (write_type): Add call to 'mangle_fundamental_type'
3494 2004-03-23 Zack Weinberg <zack@codesourcery.com>
3496 PR 12267, 12391, 12560, 13129, 14114, 14133
3497 * cp-lang.c (c_reset_state): Delete.
3498 (push_file_scope, pop_file_scope): New stubs.
3499 * parser.c (c_parse_file): Call sorry() here if called more than once.
3501 2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3503 * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
3506 2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
3508 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
3510 2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
3512 * error.c (enum pad): Remove.
3513 (dump_qualifiers): Likewise.
3514 (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
3515 (dump_aggr_type): Likewise.
3516 (dump_type_suffix): Likewise.
3517 (dump_simple_decl): Likewise.
3518 (dump_function_decl): Likewise.
3519 (cv_to_string): Likewise.
3520 (dump_type_prefix): Likewise. Adjust return void.
3521 * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
3523 (pp_cxx_template_keyword_if_needed): Document.
3524 (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
3525 (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
3526 MUST_NOT_THROW_EXPR.
3528 2004-03-21 Mark Mitchell <mark@codesourcery.com>
3531 * decl.c (cp_finish_decl): Compute the size of arrays declared in
3532 templates, if their type is non-dependent.
3534 2004-03-19 Mark Mitchell <mark@codesourcery.com>
3536 * call.c (build_op_delete_call): Do not forget the placement
3537 arguments when iterating through mutiple delete operators.
3539 * cp-tree.h (svaed_scope): Remove last_parms.
3540 (NEW_DELETE_OPNAME_P): New macro.
3541 (last_function_parms): Remove.
3542 (do_friend): Adjust prototype.
3543 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
3544 using last_function_parms.
3545 (grokfndecl): Take the PARM_DECLs as an argument, rather than
3546 using last_function_parms.
3547 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
3548 for class-specific operator new and operator delete.
3549 (grok_op_properties): Do not look for allocation functions with
3551 (start_function): Use DECL_ARGUMENTS instead of
3552 last_function_parms.
3553 * decl.h (last_function_parms): Do not declare.
3554 * decl2.c (grokclassfn): Do not use last_function_parms.
3555 * friend.c (do_friend): Remove parmdecls parameter.
3556 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
3557 (pop_from_top_level): Do not restore it.
3558 * pt.c (check_explicit_specialization): Do not adjust
3559 last_function_parms.
3561 * name-lookup.c (do_local_using_decl): Create a local binding for
3562 types brought in via using declarations.
3564 * name-lookup.c (lookup_arg_dependent): Handle block-scope
3565 function declarations correctly.
3567 * semantics.c (finish_id_expression): Correct handling of
3568 conversion operators to dependent types.
3570 * typeck.c (lookup_destructor): Allow the use of destructors from
3573 2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3575 * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
3576 TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
3577 * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
3578 the field is named TEMPLATE_TYPE_PARM_INDEX.
3580 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3583 * parser.c (cp_parser_functional_cast): A cast to anything
3584 but integral or enumaration type is not an integral constant
3586 * pt.c (value_dependent_expression_p): Handle cast expressions
3587 without operands (such as "int()").
3589 2004-03-18 Mark Mitchell <mark@codesourcery.com>
3591 * semantics.c (finish_pseudo_destructor_expr): Allow differing
3592 cv-qualification between the type named by the
3593 pseudo-destructor-name and the object-type.
3595 * search.c (accessible_base_p): Handle non-proper bases.
3597 * name-lookup.c (do_nonmember_using_decl): If a using declaration
3598 refers to a single overloaded function, set the type of the
3600 * tree.c (lvalue_type): Simplify.
3601 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
3603 (build_unary_op): Handle OVERLOADs with known types.
3605 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
3608 * parser.c (cp_parser_postfix_expression): Handle the use of
3609 "typename" in non-dependent contexts. Convert appropriately when
3610 when using a qualified name after "->" or ".".
3612 * call.c (conditional_conversion): Honor the requirement that some
3613 conversions refer to the original object.
3615 2004-03-18 Mark Mitchell <mark@codesourcery.com>
3617 * call.c (build_conditional_expr): Do not call force_rvalue for
3618 operands of void_type when the conditional expression itself has
3620 * name-lookup.c (pushdecl): Don't consider a declaration of a
3621 function named "main" to be an overload of a type named "main".
3622 * parser.c (cp_parser_template_name): Perform name lookup when the
3623 template name is proceeded by "template" if the qualifying scope
3625 * typeck.c (composite_pointer_type_r): Correctly handle
3626 pointer-to-member types.
3627 (build_const_cast): Likewise.
3629 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3631 * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
3632 * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
3633 (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
3634 (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
3635 (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
3636 (TYPEOF_TYPE_EXPR): New macro.
3637 * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
3638 * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
3639 * pt.c (tsubst): Likewise.
3640 * semantics.c (finish_typeof): Likewise.
3641 * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
3642 and TEMPLATE_TYPE_PARM.
3643 * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
3644 (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
3646 2004-03-16 Mark Mitchell <mark@codesourcery.com>
3649 * cp-tree.h (build_new_op): Change prototype.
3650 (build_x_binary_op): Likewise.
3651 * call.c (build_new_op): Add overloaded_p parameter.
3652 * decl2.c (grok_array_decl): Adjust call to build_new_op.
3653 * parser.c (cp_parser_binary_expression): Note that uses of
3654 overloaded operators prevents an expression from being considered
3655 an integral constant.
3656 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
3658 * semantics.c (finish_call_expr): Likewise.
3659 * typeck.c (rationalize_conditional_expr): Likewise.
3660 (build_x_indirect_ref): Likewise.
3661 (build_x_binary_op): Likewise.
3662 (build_x_unary_op): Likewise.
3663 (build_x_compound_expr): Likewise.
3664 (build_modify_expr): Likewise.
3665 * typeck2.c (build_x_arrow): Likewise.
3667 2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
3669 * cp-lang.c, ptree.c: Update copyright.
3671 2004-03-13 Mark Mitchell <mark@codesourcery.com>
3674 * parser.c (cp_parser_non_integral_constant_expression): Encode
3675 more of the idiom that surrounded calls to this function within
3677 (cp_parser_primary_expression): Adjust accordingly.
3678 (cp_parser_postfix_expression): Likewise.
3679 (cp_parser_unary_expression): Likewise.
3680 (cp_parser_cast_expression): Likewise.
3681 (cp_parser_assignment_expression): Likewise.
3682 (cp_parser_expression): Likewise.
3683 (cp_parser_new_expression): Note that new-expressions are not
3684 allowed in integral constant expressions.
3685 (cp_parser_delete_expression): Likewise.
3687 2004-03-12 Matt Austern <austern@apple.com>
3689 * decl2.c (maybe_make_one_only): Look at
3690 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
3691 to make an explicit instantiation weak.
3692 * method.c (use_thunk): Make sure we call comdat_linkage
3694 * pt.c (do_type_instantiation): On systems where weak symbols
3695 don't go in a static archive's TOC, explicit instantiation of a
3696 class must imply *explicit* instantiation of its memeber.
3698 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
3700 * call.c, cp-tree.h, pt.c: Fix comment typos.
3702 2004-03-10 Mark Mitchell <mark@codesourcery.com>
3705 * decl.c (xref_tag): Disregard non-type declarations when
3706 looking up a tagged type.
3708 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
3711 * call.c (convert_like_real): Build a const qualified temporary,
3712 when testing ctor access.
3714 2004-03-09 Mark Mitchell <mark@codesourcery.com>
3716 * call.c (initialize_reference): Fix typo.
3718 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3721 * pt.c (determine_specialization): For member templates, match also
3725 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
3727 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
3729 2004-03-09 Mark Mitchell <mark@codesourcery.com>
3732 * call.c (initialize_reference): Handle initializers that are
3733 class-member access expressions applies to rvalues.
3735 2004-03-09 Mark Mitchell <mark@codesourcery.com>
3738 * name-lookup.c (supplement_binding): Ignore functions that are
3739 marked DECL_ANTICIPATED.
3741 2004-03-08 Mark Mitchell <mark@codesourcery.com>
3744 * class.c (check_field_decls): Complain about non-static data
3745 members of reference type in unions. Propagate
3746 CLASSTYPE_REF_FIELDS_NEED_INIT and
3747 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
3749 * init.c (perform_member_init): Complain about mbmers with const
3750 type that are not explicitly initialized.
3752 2004-03-08 Mark Mitchell <mark@codesourcery.com>
3754 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
3755 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
3756 (lang_identifier): Remove implicit_decl and error_locus.
3757 (IDENTIFIER_IMPLICIT_DECL): Remove.
3758 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
3759 (IDENTIFIER_ERROR_LOCUS): Likewise.
3760 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
3761 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
3762 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
3763 (implicitly_declare): Remove.
3764 * decl.c (warn_extern_redeclared_static): Remove check of
3765 IDENTIFIER_IMPLICIT_DECL.
3766 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
3767 (implicitly_declare): Remove.
3768 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
3769 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
3770 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
3771 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
3772 in the innermost scope, rather than at namespace scope.
3773 * name-lookup.c (push_local_binding): Give it external linkage.
3774 (pushdecl): Remove dead code.
3775 * name-lookup.h (push_local_binding): Declare it.
3776 * ptree.c (cxx_print_identifier): Don't print
3777 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
3778 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
3779 not IDENTIFIER_ERROR_LOCUS.
3780 * typeck.c (build_function_call): Remove dead code.
3782 2004-03-08 Jason Merrill <jason@redhat.com>
3785 * decl.c (xref_tag): Remove attribute handling.
3786 * cp-tree.h: Adjust prototype.
3787 * decl.c, parser.c, rtti.c: Adjust callers.
3788 * parser.c (cp_parser_class_head): Pass back attributes in the
3790 (cp_parser_class_specifier): Adjust.
3792 2004-03-08 Matt Austern <austern@apple.com>
3795 * name-lookup.c (add_decl_to_level): Add extern variables, as well
3796 as static, to static_decls array.
3798 2004-03-05 Jason Merrill <jason@redhat.com>
3800 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
3802 2004-03-04 Geoffrey Keating <geoffk@apple.com>
3804 * decl.c (grokfndecl): Update old incorrect comment.
3805 (grokvardecl): Diagnose C++ variables of type with no linkage.
3807 2004-03-01 Mark Mitchell <mark@codesourcery.com>
3810 * pt.c (build_non_dependent_expr): Do not create a
3811 NON_DEPENDENT_EXPR for a THROW_EXPR.
3813 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
3816 * error.c (dump_expr): Handle THROW_EXPR.
3818 2004-03-01 Mark Mitchell <mark@codesourcery.com>
3821 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
3822 lookup if ordinary name-lookup finds a non-function.
3823 * pt.c (tsubst_copy_and_build): Likewise.
3826 * parser.c (cp_parser_late_parsing_default_args): Check that there
3827 are no extra tokens after the end of the default-argument
3830 2004-03-01 Mark Mitchell <mark@codesourcery.com>
3833 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
3834 having C++ linkage for name-mangling purposes.
3837 * parser.c (cp_parser_direct_declarator): Recognize constructor
3838 declarators that use a template-id to name the class being
3842 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
3843 (tsubst_expr): Do not call tsubst_copy, even when
3844 processing_template_decl.
3846 2004-03-01 Jeff Law <law@redhat.com>
3848 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
3851 2004-02-29 Mark Mitchell <mark@codesourcery.com>
3854 * name-lookup.h (push_scope): Change prototype.
3855 * name-lookup.c (push_scope): Do not reenter the current class
3857 * decl.c (grokfndecl): Check return code from push_scope before
3859 * decl2.c (check_classfn): Likewise.
3860 * parser.c (cp_parser_conversion_function_id): Likewise.
3861 (cp_parser_init_declarator): Likewise.
3862 (cp_parser_direct_declarator): Likewise.
3863 (cp_parser_class_specifier): Likewise.
3864 (cp_parser_class_head): Likewise.
3865 (cp_parser_lookup_name): Likewise.
3866 (cp_parser_constructor_declarator_p): Likewise.
3867 * pt.c (instantiate_class_template): Likewise.
3868 (resolve_typename_type): Likewise.
3870 2004-02-29 Mark Mitchell <mark@codesourcery.com>
3873 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
3877 * class.c (update_vtable_entry_for_fn): Do not go through
3878 covariance machinery if the type returned by an overrider is the
3879 same as the original.
3881 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
3883 * call.c: Fix a comment typo.
3885 2004-02-27 Ziemowit Laski <zlaski@apple.com>
3887 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
3889 2004-02-26 Mark Mitchell <mark@codesourcery.com>
3892 * parser.c (cp_parser_parameter_declaration_list): Commit
3893 to fewer tentative parses.
3895 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3898 * pt.c (dependent_type_p_r): A template template parameter is a
3901 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3904 * mangle.c (write_template_arg_literal): Don't rely on identity for
3907 2004-02-24 Jason Merrill <jason@redhat.com>
3909 * tree.c (build_exception_variant): Use check_qualified_type.
3911 2004-02-23 Zack Weinberg <zack@codesourcery.com>
3912 Kazu Hirata <kazu@cs.umass.edu>
3914 * decl.c (cxx_init_decl_processing): Don't check
3915 flag_writable_strings.
3917 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
3920 * typeck.c (maybe_warn_about_returning_address_of_location):
3921 Change check for VAR_DECL to use DECL_P instead.
3923 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3926 * cvt.c (build_expr_type_conversion): Type must be complete before
3927 looking up for conversions.
3929 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3932 * name-lookup.c (arg_assoc_class): Don't look into template
3933 arguments if it is not a primary template.
3935 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3938 * method.c (use_thunk): Always clone function argument tree.
3940 2004-02-20 Mark Mitchell <mark@codesourcery.com>
3943 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
3946 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
3947 for all type variants.
3949 2004-02-19 Mark Mitchell <mark@codesourcery.com>
3952 * decl.c (duplicate_decls): Return error_mark_node for invalid
3954 * name-lookup.c (push_namespace): Ignore the return value from
3956 * pt.c (push_template_decl_real): Robustify.
3959 * name-lookup.c (push_class_level_binding): Do not complain about
3960 adding a binding for a member whose name is the same as the
3961 enclosing class if the member is located in a base class of the
3964 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3967 * parser.c (cp_parser_new_expression): Parse an ill-formed
3968 direct-new-declarator after a parenthesized type-id to emit good
3971 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
3973 * cp-tree.def, cvt.c: Update copyright.
3975 2004-02-17 Mark Mitchell <mark@codesourcery.com>
3978 * cp-tree.h (abi_version_at_least): Remove.
3979 * mangle.c: Include flags.h.
3981 2004-02-15 Mark Mitchell <mark@codesourcery.com>
3984 * call.c (build_conditional_expr): Handle conversions between
3985 class types which result in differently cv-qualified type
3989 * class.c (delete_duplicate_fields_1): Remove.
3990 (delete_duplicate_fields): Likewise.
3991 (finish_struct_anon): Remove check for members with the same name
3992 as their enclosing class.
3993 (check_field_decls): Do not call duplicate_fields.
3994 * decl.c (grokdeclarator): Remove check for static data members
3995 with the same name as their enclosing class.
3996 * name-lookup.c (push_class_level_binding): Check for members with
3997 the same name as their enclosing class.
3999 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
4002 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
4004 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4007 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
4008 has full set of arguments.
4010 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4013 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
4015 2004-02-13 Mark Mitchell <mark@codesourcery.com>
4018 * cp-tree.h (delete_sanity): Change prototype.
4019 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
4020 Remove dead code. Adjust code to warn about deleting an array.
4021 * typekc.c (decay_conversion): Use build_address and build_nop.
4024 * search.c (accessible_p): Do not check access in thunks.
4027 * call.c (build_conditional_expr): Call force_rvalue on the
4028 non-void operand in the case that one result is a throw-expression
4029 and the other is not.
4031 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
4034 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
4035 the type name and look ahead for ::~, and bail out early with a
4036 better error message if the parse is going to fail.
4038 2004-02-12 Mark Mitchell <mark@codesourcery.com>
4040 * call.c (conversion_kind): New type.
4041 (conversion_rank): Likewise.
4042 (conversion): Likewise.
4043 (CONVERSION_RANK): New macro.
4044 (conversion_obstack): New variable.
4045 (obstack_initialized): Likewise.
4046 (z_candidate): Change type of convs and second_conv.
4047 (candidate_warning): New type.
4048 (IDENTITY_RANK): Remove.
4049 (EXACT_RANK): Likewise.
4050 (PROMO_RANK): Likewise.
4051 (STD_RANK): Likewise.
4052 (PBOOL_RANK): Likewise.
4053 (USER_RANK): Likewise.
4054 (ELLIPSIS_RANK): Likewise.
4055 (BAD_RANK): Likewise.
4056 (ICS_RANK): Likewise.
4057 (ICS_STD_RANK): Likewise.
4058 (ICS_USER_FLAG): Likewise.
4059 (ICS_ELLIPSIS_FLAG): Likewise.
4060 (ICS_THIS_FLAG): Likewise.
4061 (ICS_BAD_FLAG): Likewise.
4062 (NEED_TEMPORARY_P): Likewise.
4063 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
4064 (USER_CONV_CAND): Likewise.
4065 (USER_CONV_FN): Likewise.
4066 (conversion_obstack_alloc): New function.
4067 (alloc_conversion): Likewise.
4068 (validate_conversion_obstack): Likewise.
4069 (alloc_conversions): Likewise.
4070 (build_conv): Adjust to deal with new conversion data structures.
4071 (build_identity_conv): New function.
4072 (build_ambiguous_conv): Likewise.
4073 (standard_conversion): Adjust to deal with new conversion data
4075 (convert_class_to_reference): Likewise.
4076 (direct_reference_binding): Likewise.
4077 (reference_binding): Likewise.
4078 (implicit_conversion): Likewise.
4079 (add_candidate): Likewise.
4080 (add_function_candidate): Likewise.
4081 (add_conv_candidate): Likewise.
4082 (build_builtin_candidate): Likewise.
4083 (print_z_candidate): Likewise.
4084 (merge_conversion_sequences): Likewise.
4085 (build_user_type_conversion_1): Likewise.
4086 (build_user_type_conversion): Likewise.
4087 (build_new_function_call): Likewise.
4088 (build_object_call): Likewise.
4089 (conditional_conversion): Likewise.
4090 (build_conditional_expr): Likewise.
4091 (build_new_op): Likewise.
4092 (build_op_delete_call): Likewise.
4093 (convert_like_real): Likewise.
4094 (build_over_call): Likewise.
4095 (build_new_method_call): Likewise.
4096 (is_subseq): Likewise.
4097 (maybe_handle_implicit_object): Likewise.
4098 (maybe_handle_ref_bind): Likewise.
4099 (compare_ics): Likewise.
4100 (source_type): Likewise.
4101 (add_warning): Likewise.
4103 (can_convert_arg): Likewise.
4104 (can_convert_arg_bad): Likewise.
4105 (perform_implicit_conversion): Likewise.
4106 (perform_direct_initialization_if_possible): Likewise.
4107 (initialize_reference): Likewise.
4108 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
4109 * cp-tree.def (WRAPPER): Likewise.
4110 (IDENTITY_CONV): Remove.
4111 (LVALUE_CONV): Likewise.
4112 (QUAL_CONV): Likewise.
4113 (STD_CONV): Likewise.
4114 (PTR_CONV): Likewise.
4115 (PMEM_CONV): Likewise.
4116 (BASE_CONV): Likewise.
4117 (REF_BIND): Likewise.
4118 (USER_CONV): Likewise.
4119 (AMBIG_CONV): Likewise.
4120 (RVALUE_CONV): Likewise.
4121 * cp-tree.h (tree_wrapper): Remove.
4122 (WRAPPER_ZC): Remove.
4123 (lang_tree_node): Remove wrapper.
4124 (LOOKUP_SPECULATIVELY): Remove.
4125 (build_op_delete_call): Adjust prototype.
4126 (validate_conversion_obstack): Declare.
4127 (build_zc_wrapper): Remove.
4128 * cvt.c (convert_to_reference): Remove dead code.
4129 (ocp_convert): Likewise.
4130 * decl.c (redeclaration_error_message): Correct handling of
4132 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
4133 (cp_tree_node_structure): Remove WRAPPER case.
4134 * decl2.c (finish_file): Call validate_conversion_obstack.
4135 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
4136 (build_op_delete_call): Likewise.
4137 (build_x_delete): Likewise.
4138 (build_delete): Adjust call to build_op_delete_call.
4139 * pt.c (tsubst_friend_declaration): Adjust code to determine
4140 whether or not a friend template is a definition.
4141 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
4142 * tree.c (build_zc_wrapper): Remove.
4144 2004-02-12 Zack Weinberg <zack@codesourcery.com>
4146 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
4147 * cp-tree.h: Don't declare cxx_builtin_type_decls.
4148 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
4149 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
4151 2004-02-10 Mark Mitchell <mark@codesourcery.com>
4153 * typeck.c (lookup_destructor): Fix typo in error message.
4155 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
4157 * call.c, parser.c, tree.c: Fix comment typos.
4159 2004-02-07 Zack Weinberg <zack@codesourcery.com>
4162 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
4163 * decl.c (duplicate_decls, start_function): Likewise.
4165 2004-02-07 Zack Weinberg <zack@codesourcery.com>
4167 * name-lookup.c (pushdecl): Issue shadow warnings directly.
4168 * parser.c (free_parser_stacks): Delete.
4170 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
4172 * rtti.c: Update copyright.
4174 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4177 * decl.c (require_complete_types_for_parms): Do not insert
4178 error_mark_node in the parameter list.
4180 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4183 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
4184 error when terminator can not be found.
4186 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
4188 Make-lang.in (po-generated): Delete.
4190 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
4192 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
4193 targetm.calls.promote_prototypes.
4195 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
4199 2004-01-15 Geoffrey Keating <geoffk@apple.com>
4201 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
4202 (handle_pragma_implementation): Likewise.
4204 2004-02-05 Mark Mitchell <mark@codesourcery.com>
4207 * typeck.c (lookup_destructor): Tweak error message.
4209 2004-02-05 Jan Hubicka <jh@suse.cz>
4211 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
4214 2004-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4217 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
4218 code, only emits the diagnostic now. Added lookup of the identifier
4219 and support for qualified ids.
4220 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
4221 Parse an (invalid) type name as id-expression within a declarator.
4222 (cp_parser_simple_declaration): Use it.
4223 (cp_parser_member_declaration): Likewise.
4224 (cp_parser_make_typename_type): New function. Handle errors through
4225 cp_parser_diagnose_invalid_typename.
4226 (cp_parser_elaborated_type_specifier): Use it.
4228 2004-02-04 Mark Mitchell <mark@codesourcery.com>
4231 * call.c (convert_like_real): Use "converting" rather than
4232 "argument" as the descriptive keyword to
4233 dubious_conversion_warnings.
4234 * typeck.c (convert_for_assignment): Do not call
4235 dubious_conversion_warnings.
4237 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4240 * init.c (build_delete): Emit a more informative error message in
4241 case of an incomplete type, and on the correct source line.
4243 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
4245 * error.c, search.c: Update copyright.
4247 2004-02-04 Mark Mitchell <mark@codesourcery.com>
4250 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
4251 linkage for the typeinfo name string.
4253 2004-02-04 Mark Mitchell <mark@codesourcery.com>
4256 * cp-tree.h (fold_non_dependent_expr): New function.
4257 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
4258 (cp_parser_template_argument): Use fold_non_dependent_expr.
4259 (cp_parser_direct_declarator): Likewise.
4260 * pt.c (fold_non_dependent_expr): New function.
4261 (convert_nontype_argument): Use it.
4262 (tsubst_qualified_id): Simplify.
4263 (tsubst_copy_and_build): Likewise.
4265 2004-02-04 Mark Mitchell <mark@codesourcery.com>
4267 * decl.c (cxx_push_function_context): Do not set
4268 current_function_is_thunk.
4269 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
4272 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4275 * pt.c (more_specialized_class): Increase processing_template_decl
4276 while partial ordering.
4278 2004-02-03 Mark Mitchell <mark@codesourcery.com>
4281 * decl.c (start_function): Do not call pushdecl for any
4282 instantiation or specialization of a primary template.
4284 2004-02-03 Mark Mitchell <mark@codesourcery.com>
4287 * parser.c (cp_parser_class_name): Robustify.
4290 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
4293 * semantics.c (finish_id_expression): Do not return an
4294 IDENTIFIER_NODE when lookup finds a PARM_DECL.
4296 2004-02-03 Mark Mitchell <mark@codesourcery.com>
4299 * pt.c (build_non_dependent_expr): Do not build
4300 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
4303 * semantics.c (finish_id_expression): Do not return an
4304 IDENTIFIER_NODE when lookup finds a VAR_DECL.
4307 * parser.c (cp_parser_simple_declaration): When skipping to the
4308 end of the statement swallow the terminating semicolon.
4310 2004-02-02 Mark Mitchell <mark@codesourcery.com>
4313 * init.c (build_offset_ref): Improve error recovery for invalid
4314 uses of non-static member functions.
4317 * cp-tree.h (cp_build_type_attribute_variant): New function.
4318 * class.c (build_clone): Use cp_build_type_attribute_variant.
4319 * decl.c (duplicate_decls): Likewise.
4320 * pt.c (copy_default_args_to_explicit_spec): Likewise.
4321 (tsubst_function_type): Likewise.
4322 * tree.c (build_exception_variant): Check attributes before
4323 concluding that two types are the same.
4324 (cp_build_type-attribute_variant): New method.
4325 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
4328 * call.c (convert_class_to_reference): Keep better track of
4329 pedantically invalid user-defined conversions.
4331 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4334 * pt.c (tsubst_qualified_id): Improved error message when a type
4335 is expected but not found.
4337 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
4339 * class.c: Fix comment typos.
4341 * error.c: Likewise.
4342 * parser.c: Likewise.
4344 * search.c: Likewise.
4345 * typeck.c: Likewise.
4347 2004-01-30 Richard Henderson <rth@redhat.com>
4350 * method.c (use_thunk): Don't force_target_expr for void thunks.
4351 * tree.c (build_target_expr_with_type): Assert non-void type.
4352 (force_target_expr): Likewise.
4354 2004-01-30 Michael Matz <matz@suse.de>
4356 * parser.c (cp_parser_labeled_statement): Accept case ranges.
4358 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4362 * decl.c (grokdeclarator): Check immediatly type completeness for
4363 non-dependent types.
4365 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4368 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
4369 a sizeof expression.block
4371 2004-01-29 Mark Mitchell <mark@codesourcery.com>
4374 * mangle.c (write_encoding): Correct encoding of member template
4377 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4379 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
4380 template name as it was `<::' (digraph typo).
4381 (cp_parser_nth_token_starts_template_argument_list_p): New function.
4382 (cp_parser_id_expression): Use it.
4383 (cp_parser_nested_name_specifier_opt): Likewise.
4384 (cp_parser_template_name): Likewise.
4385 (cp_parser_class_name): Likewise.
4386 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
4388 2004-01-28 Mark Mitchell <mark@codesourcery.com>
4391 * typeck.c (merge_types): Do not merge attributes into
4395 * parser.c (cp_parser_direct_declarator): Do not prevent
4396 backtracking inside a parenthesized declarator.
4397 (cp_parser_parameter_declaration): Fix typo in comment.
4399 2004-01-28 Jan Hubicka <jh@suse.cz>
4401 * semantics.c (expand_body) Do emit_associated_thunks before
4404 2004-01-27 Devang Patel <dpatel@apple.com>
4406 * name-lookup.c: Include "debug.h"
4407 (do_namespace_alias): Invoke debug_hooks to emit debug info
4408 for namespace alias.
4409 (do_local_using_decl): Invoke debug_hooks to emit debug info
4411 (do_class_using_decl): Same.
4412 (do_toplevel_using_decl): Same.
4413 (do_using_directive): Same.
4414 (cp_emit_debug_info_for_using): New function.
4415 * Make-lang.in (cp/parser.o): Depend on debug.h
4416 (cp/name-lookup.o): Same.
4418 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4420 * cp-tree.h (language_function, lang_type_header): Use
4422 * name-lookup.h (cp_binding_level): Likewise.
4424 2004-01-26 Mark Mitchell <mark@codesourcery.com>
4427 * semantics.c (finish_for_expr): Check for unresolved overloaded
4430 * class.c (add_method): Just check processing_template_decl to
4431 determine whether or not we are within a template.
4432 * decl2.c (maybe_retrofit_in_chrg): Likewise.
4433 * init.c (decl_constant_value): Check the type of the declaration,
4435 * name-lookup.c (maybe_push_to_top_level): Rename to ...
4436 (push_to_top_level): ... this.
4437 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
4438 * pt.c (push_template_decl_real): Reorder condition for speed.
4439 (convert_template_argument): Use dependency-checking functions in
4440 place of uses_template_parms.
4441 (lookup_template_class): Avoid calling uses_template_parms more
4443 (uses_template_parms): Reimplement, using dependency-checking
4445 (instantiate_class_template): Use push_to_top_level, not
4446 maybe_push_to_top_level.
4447 (type_unification_real): Simplify.
4448 (type_dependent_expression_p): Handle OFFSET_REFs and
4450 (any_dependent_template_arguments_p): Handle multiple levels of
4452 * semantics.c (expand_or_defer_fn): Do not check
4453 uses_template_parms for template instantiations.
4454 * typeck.c (comptypes): Avoid calling cp_type_quals.
4456 2004-01-25 Mark Mitchell <mark@codesourcery.com>
4459 * call.c (build_over_call): Do not convert arguments when
4460 processing a template.
4461 * pt.c (build_non_dependent_expr): Do not build a
4462 NON_DEPENDENT_EXPR for arithmetic constants.
4464 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4467 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
4468 returns a TYPE_DECL. no further lookup is required.
4469 * semantics.c (check_template_template_default_arg): A TYPE_DECL
4470 is invalid. Rework to give better diagnostics.
4472 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4475 * pt.c (instantiate_class_template): Add an error_mark_node
4477 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
4479 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
4482 * decl.c (finish_function): Move the call to
4483 finish_fname_decls below the call to
4484 finish_eh_spec_block.
4486 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
4488 * optimize.c, typeck2.c: Update copyright.
4490 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
4492 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
4493 init.c, mangle.c, typeck.c: Update copyright.
4495 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
4497 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
4499 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
4501 * Make-lang.in: Replace $(docdir) with doc.
4502 (c++.info, c++.srcinfo): Dummy entry.
4503 (c++.man, c++.srcman): New rules.
4504 (c++.install-man): Revamp rule.
4506 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
4508 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
4509 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
4510 immediate $(shell) instead of deferred backquote.
4512 2004-01-19 Mark Mitchell <mark@codesourcery.com>
4515 * parser.c (cp_parser_postfix_expression): When encountering
4516 incomplete type on left-hand side of "->" or ".", treat the entire
4517 expression as erroneous.
4520 * call.c (build_field_call): Remove.
4521 (n_build_method_call): Likewise.
4522 (build_method_call): Likewise.
4523 (build_new_method_call): Do not call build_field_call.
4524 * class.c (n_build_method_call): Remove.
4525 (print_class_statistics): Do not print it.
4526 * cp-tree.h (build_method_call): Remove declaration.
4527 (finish_object_call_expr): Likewise.
4528 (build_new_1): Do not use build_method_call.
4529 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
4530 when the function appearing on the right-hand-side of "." or "->"
4531 is not actually a function.
4532 * pt.c (tsubst_copy_and_build): Likewise.
4533 * semantics.c (finish_object_call_expr): Remove.
4535 2004-01-18 Mark Mitchell <mark@codesourcery.com>
4538 * pt.c (tsubst): Use finish_typeof.
4540 2004-01-18 Jason Merrill <jason@redhat.com>
4543 * except.c (build_throw): In a template, set
4544 current_function_returns_abnormally.
4546 2004-01-17 Fred Fish <fnf@intrinsity.com>
4549 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
4550 except don't call array_type_nelts() with a VECTOR_TYPE.
4552 2004-01-16 Jan Hubicka <jh@suse.cz>
4554 * mangle.c (write_mangled_name): Remove inline modifier.
4556 2004-01-16 Mark Mitchell <mark@codesourcery.com>
4559 * decl.c (compute_array_index_type): Fix grammar in comment.
4560 * init.c (build_zero_init): Handle zero-sized arrays correctly.
4563 * call.c (name_as_c_string): Print conversion operator names
4567 * call.c (initialize_reference): Pass -1 for inner parameter to
4570 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4573 * parser.c (cp_parser_base_specifier): Check for an invalid
4574 keyword `typename' and emit an user-friendly error message.
4576 2004-01-15 Geoffrey Keating <geoffk@apple.com>
4579 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
4580 (handle_pragma_implementation): Likewise.
4582 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4585 * typeck.c (build_class_member_access_expr): Allow to access members
4586 of the currently open class.
4587 (finish_class_member_access_expr): Likewise.
4589 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
4592 * name-lookup.c (validate_nonmember_using_decl): Take scope and
4593 name by value, instead of computing them.
4594 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
4595 arguments. Pass them to validate_nonmember_using_decl.
4596 * name-lookup.h (do_local_using_decl): Adjust.
4597 (do_toplevel_using_decl): Likewise.
4598 * parser.c (cp_parser_using_declaration): Likewise.
4599 * pt.c (tsubst_expr): Likewise.
4601 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
4605 * name-lookup.c (qualified_lookup_using_namespace): Search
4606 strongly-associated namespaces first, and only then try other
4609 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
4611 * Make-lang.in (c++.srcextra): Dummy entry.
4613 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4616 * parser.c (cp_parser_template_name): Don't try to parse a
4617 conversion-function-id, as it cannot be a template-name.
4618 (cp_parser_simple_type_specifier): Check for invalid template-ids
4619 even after a built-in type.
4621 2004-01-14 Jan Hubicka <jh@suse.cz>
4624 * pt.c (instantiate_decl): Do not increase function_depth.
4626 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
4630 * parser.c (cp_parser_elaborated_type_specifier): Warn about
4631 attributes and discard.
4632 * decl.c (xref_tag): Don't overwite existing attributes with
4635 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4638 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
4639 is no destructor while looking up a BIT_NOT_EXPR.
4641 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
4643 * cxxfilt.c: Remove unused file.
4645 2004-01-14 Jan Hubicka <jh@suse.cz>
4647 Partial fix to PR c++/12850
4648 * decl2.c (mark_used): Do not proactively instantiate templates
4649 when compiling in unit-at-a-time or not optimizing.
4650 * optimize.c (maybe_clone_body): Do not increase function depth.
4652 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4655 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
4657 2004-01-12 Steven Bosscher <stevenb@suse.de>
4660 * parser.c (cp_parser_member_declaration): Any non-type is also
4661 not a class or a function.
4663 2004-01-12 Jason Merrill <jason@redhat.com>
4666 * class.c (build_base_path): Do not mark vtable references as
4668 (build_vtbl_ref_1): Likewise.
4670 2004-01-12 Richard Henderson <rth@redhat.com>
4673 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
4674 (store_init_value): Use it.
4675 * decl.c (check_initializer): Expect full initialization code
4676 from store_init_value.
4677 * init.c (expand_aggr_init_1): Likewise.
4678 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
4680 2004-01-12 Mark Mitchell <mark@codesourcery.com>
4682 * class.c (layout_class_type): For non-POD class types, also copy
4683 the DECL_SIZE and DECL_MODE of fields to the base class type.
4685 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4688 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
4689 calling regenerate_decl_from_template.
4691 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
4694 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
4695 decl-specifier occurring along with a class definition.
4697 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
4699 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
4700 clauses to comments describing declares_class_or_enum.
4701 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
4704 2004-01-12 Jan Hubicka <jh@suse.cz>
4706 * pt.c (for_each_template_parm): Do not check for duplicates.
4707 (for_each_template_parm): Use walk_tree duplicate checking code.
4709 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
4712 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
4713 is error_mark_node, don't add any more decl_specs.
4714 (cp_parser_init_declarator): After committing to a declaration, if
4715 the decl_specifiers start with error_mark_node, issue an error and
4716 change the type to "int".
4718 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
4721 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
4723 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4727 * pt.c (tsubst): Substitution must fail if we are attempting to
4728 create an array with element type that is an abstract class type.
4729 * decl.c (cp_finish_decl): Strip pointers and array types recursively
4730 before calling abstract_virtuals_error.
4732 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
4734 * name-lookup.c (qualified_lookup_using_namespace): Consider
4735 strong using directives even if we've already found a binding.
4737 2004-01-09 Mark Mitchell <mark@codesourcery.com>
4739 * cp-tree.h (cxx_expand_expr): Change prototype.
4740 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
4742 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4745 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
4746 looking into them recursively. They can be there because of the
4747 new __offsetof__ extension.
4749 2004-01-07 Zack Weinberg <zack@codesourcery.com>
4751 * parser.c (cp_parser_save_member_function_body): Mark the
4754 2004-01-05 Mark Mitchell <mark@codesourcery.com>
4757 * class.c (build_clone): Copy type attributes from the original
4758 function to the clone.
4761 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
4762 references as constant.
4765 * parser.c (cp_parser_explicit_instantiation): Improve error
4767 (cp_parser_require): Improve indication of the error location.
4770 * parser.c (cp_parser_class_head): Reorder logic to check for
4771 invalid qualification.
4773 2004-01-04 Mark Mitchell <mark@codesourcery.com>
4776 * name-lookup.c (lookup_using_namespace): Remove spacesp
4778 (unqualified_namespace_lookup): Likewise.
4779 (lookup_qualified_name): Adjust accordingly.
4780 (lookup_name_real): Likewise.
4781 (lookup_arg_dependent): Do not eliminate the namespace of the
4782 functions found by unqualified name lookup unless that is the
4785 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
4787 * semantics.c (push_deferring_access_checks): Fix format.
4788 (resume_deferring_access_checks): Likewise.
4789 (stop_deferring_access_checks): Likewise.
4790 (pop_deferring_access_checks): Likewise.
4791 (get_deferred_access_checks): Likewise.
4792 (pop_to_parent_deferring_access_checks): Likewise.
4793 (perform_deferred_access_checks): Likewise.
4794 (perform_or_defer_access_check): Likewise.
4796 2004-01-04 Richard Henderson <rth@redhat.com>
4798 * call.c (build_over_call): Don't create a save_expr of an
4799 aggregate, but rather its address.
4801 2004-01-04 Mark Mitchell <mark@codesourcery.com>
4804 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
4805 an offsetof expression.
4807 * parser.c (cp_parser_parameter_declaration): Fix comment.
4810 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
4811 (reference_binding): Set it when appropriate.
4812 (build_temp): New function, split out from ...
4813 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
4814 (initialize_reference): Likewise.
4817 * parser.c (cp_parser): Add in_type_id_in_expr_p.
4818 (cp_parser_new): Initialize it.
4819 (cp_parser_postfix_expression): Set it.
4820 (cp_parser_sizeof_operand): Likewise.
4821 (cp_parser_parameteR_declaration): Do not commit early to tenative
4822 parsers when in_type_id_in_expr_p is set.
4824 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4827 * parser.c (cp_parser_template_argument): Don't call
4828 make_unbound_class_template directly.
4829 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
4830 UNBOUND_CLASS_TEMPLATE tree node.
4832 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
4835 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
4837 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4840 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
4841 (DECL_FUNCTION_TEMPLATE_P): Use it.
4842 (DECL_CLASS_TEMPLATE_P): Likewise.
4843 * parser.c (cp_parser_lookup_name): Add is_template parameter.
4844 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
4845 (cp_parser_template_name): Likewise.
4846 (cp_parser_elaborated_type_specifier): Likewise.
4847 (cp_parser_namespace_name): Likewise.
4848 (cp_parser_class_name): Likewise.
4849 (cp_parser_lookup_name_simple): Likewise.
4851 See ChangeLog.3 for earlier changes.