1 2004-09-20 Matt Austern <austern@apple.com>
2 Zack Weinberg <zack@codesourcery.com>
4 * decl.c (make_rtl_for_nonlocal_decl, start_preparsed_function):
5 Apply lbasename to input_filename before passing to get_fileinfo.
6 * semantics.c (begin_class_definition): Likewise.
7 * lex.c (handle_pragma_interface): Apply get_fileinfo to the
8 correct filename. Rename variables to be less confusing.
9 (handle_pragma_implementation): Likewise. Disable "appears
10 after file is included" diagnostic.
12 * parser.c (struct cp_token): Add in_system_header fiag.
13 (CP_TOKEN_BLOCK_NUM_TOKENS, struct cp_token_block)
14 (CP_TOKEN_BUFFER_SIZE, cp_token_cache_push_token)
15 (CPP_NONE, cp_lexer_read_token): Delete.
16 (struct cp_lexer): Remove first_token, string_tokens,
17 main_lexer_p fields. Clarify comments.
18 (struct cp_token_cache): Now just a pair of pointers.
19 (CP_LEXER_BUFFER_SIZE): New #define.
20 (CPP_PURGED): New fake token type.
21 (cp_lexer_new_from_token_array, cp_lexer_destroy)
22 (cp_lexer_peek_token_emit_debug_info, cp_lexer_skip_purged_tokens)
23 (cp_lexer_handle_pragma, cp_token_cache_new, cp_parser_string_literal):
25 (cp_lexer_new_from_tokens): Now a simple wrapper around
26 cp_lexer_new_from_token_array.
27 (cp_lexer_set_source_position_from_token): Also update
29 (cp_lexer_next_token, cp_lexer_prev_token, cp_lexer_advance_token):
31 (cp_lexer_token_difference): Dont handle wrapping round.
32 (cp_lexer_new_main): Enable pragma deferral and raw strings,
33 read the entire translation unit through c_lex_with_flags into
34 this lexer's buffer, then turn raw strings back off again.
35 (cp_lexer_grow_buffer): Adjust for buffer no longer being circular.
36 (cp_lexer_get_preprocessor_token): No need to handle not being
37 the main lexer. Set token->in_system_header too.
38 (cp_lexer_peek_token): Skip purged tokens. Feed pragma tokens
39 to cp_lexer_handle_pragma. No need to call cp_lexer_read_token.
40 (cp_lexer_peek_nth_token): Likewise.
41 (cp_lexer_purge_token): Mark the token PURGED, don't shift all
42 the other tokens down.
43 (cp_lexer_purge_tokens_after): Likewise.
44 (cp_lexer_save_tokens, cp_lexer_rollback_tokens): Don't worry
45 about there being no tokens.
46 (cp_lexer_print_token): Revise to give useful information on
48 (struct cp_parser): Add field translate_strings_p.
49 (cp_parser_new): Initialize it.
50 (cp_parser_translation_unit): Destroy the lexer when done.
51 (cp_parser_parameter_declaration): Restructure saving of
53 (cp_parser_save_member_function_body): Likewise.
54 (cp_parser_check_for_invalid_template_id)
55 (cp_parser_nested_name_specifier_opt, cp_parser_template_id):
56 Adjust calls to cp_lexer_advance_token.
57 (cp_parser_skip_to_closing_parenthesis, cp_parser_declaration):
58 No need to fiddle c_lex_string_translate.
59 (cp_parser_primary_expression, cp_parser_linkage_specification)
60 (cp_parser_asm_definition, cp_parser_asm_specification_opt)
61 (cp_parser_asm_operand_list, cp_parser_asm_clobber_list)
62 Use cp_parser_string_literal.
63 (cp_parser_attribute_list): Save and restore
64 parser->translate_strings_p, not c_lex_string_translate.
65 (cp_parser_cache_group): Delete.
66 (cp_parser_cache_group_1): Rename cp_parser_cache_group. Do
67 not take a cache argument.
69 2004-09-20 Giovanni Bajo <giovannibajo@gcc.gnu.org>
72 * decl.c (reshape_init): Extract array handling into...
73 (reshape_init_array): New function. Use integers instead of trees
74 for indices. Handle out-of-range designated initializers.
76 2004-09-20 Steven Bosscher <stevenb@suse.de>
78 * lex.c (cxx_init): Don't set the ridpointer for RID_NULL
81 2004-09-19 Mark Mitchell <mark@codesourcery.com>
83 * decl2.c (determine_visibility): Allow class visibility
84 directives to override targetm.cxx.export_class_data.
86 2004-09-18 Kazu Hirata <kazu@cs.umass.edu>
88 * call.c, semantics.c: Follow spelling conventions.
89 * class.c: Fix a comment typo.
91 2004-09-16 Geoffrey Keating <geoffk@apple.com>
94 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
95 (handle_pragma_implementation): Likewise.
97 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
98 Zack Weinberg <zack@codesourcery.com>
100 * cp-tree.def: Use tree_code_class enumeration constants
101 instead of code letters.
102 * call.c, class.c, cp-gimplify.c, cp-lang.c, cxx-pretty-print.c
103 * mangle.c, pt.c, semantics.c, tree.c, typeck.c:
104 Update for new tree-class enumeration constants.
106 2004-09-16 Mark Mitchell <mark@codesourcery.com>
109 * parser.c (cp_parser_simple_declaration): Commit to tentative
110 parses after seeing a decl-specifier.
111 (cp_parser_simple_declaration): Eliminate spurious message.
112 (cp_parser_init_declarator): Adjust error message.
115 * lex.c (unqualified_name_lookup_error): Mark the dummy
119 * parser.c (cp_parser_nested_name_specifier): Do not resolve
120 typename types if the user explicitly said "typename".
122 2004-09-16 Andrew MacLeod <amacleod@redhat.com>
124 * error.c (dump_decl): Make sure there is lang_specific info before
125 checking for DTOR and CTOR decls.
127 2004-09-16 Nathan Sidwell <nathan@codesourcery.com>
129 * class.c (copy_virtuals): Remove.
130 (build_primary_vtable): Use copy_list directly.
131 (build_secondary_vtable): Likewise.
132 (update_vtable_entry_for_fn): Clear BV_CALL_INDEX here.
133 (create_vtable_ptr): Likewise.
135 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
137 * search.c: Follow spelling conventions.
139 2004-09-16 Nathan Sidwell <nathan@codesourcery.com>
141 * cp-tree.h (struct lang_type_class): Make pure_virtuals a
143 (CLASSTYPE_INLINE_FRIENDS, CLASSTYPE_PURE_VIRTUALS): Update
145 * call.c (build_new_method_call): Don't confirm a pure virtual is
146 in CLASSTYPE_PURE_VIRTUALS. Reorder checks. Make it a warning.
147 * class.c (check_methods): CLASSTYPE_INLINE_FRIENDS is a VEC(tree).
148 (fixup_inline_methods, finish_struct): Likewise.
149 * decl.c (finish_method): Likewise.
150 * search.c (dfs_get_pure_virtuals, get_pure_virtuals):
151 CLASSTYPE_PURE_VIRTUALS is a VEC(tree).
152 * typeck2.c (abstract_virtuals_error): Likewise. Truncate the
153 vector to avoid repeating the list in error messages.
155 2004-09-15 Mark Mitchell <mark@codesourcery.com>
157 * cp-objcp-common.h (LANG_HOOKS_COMDAT_GROUP): Define.
158 * cp-tree.h (cxx_comdat_group): Declare.
159 * decl.c (cxx_comdat_group): New function.
161 2004-09-15 Nathan Sidwell <nathan@codesourcery.com>
163 * search.c (get_pure_virtuals): Remove unused variables.
165 * cp-tree.h (struct lang_decl_flags): Remove
166 needs_final_overrider.
167 (DECL_NEEDS_FINAL_OVERRIDER_P): Remove.
168 * decl.c (duplicate_decls): Do not copy DECL_NEEDS_FINAL_OVERRIDER_P.
169 * class.c (finish_struct_bits): Correct comment about
170 CLASSTYPE_PURE_VIRTUALS.
171 * search.c (get_pure_virtuals): Remove useless loop.
173 2004-09-14 Mark Mitchell <mark@codesourcery.com>
176 * mangle.c (partially_mangled_name): New variable.
177 (partially_mangled_name_len): Likewise.
178 (save_partially_mangled_name): New function.
179 (restore_partially_mangled_name): Likewise.
180 (write_encoding): Save and restore partially mangled names around
181 calls to get_mostly_instantiated_function_type.
182 (write_unqualified_name): Likewise.
184 2004-09-14 Nathan Sidwell <nathan@codesourcery.com>
186 * pt.c (unify): Replace gcc_unreachable with gcc_assert.
188 2004-09-13 Mark Mitchell <mark@codesourcery.com>
191 * parser.c (cp_parser_id_expression): Correct value for
193 (cp_parser_nested_name_specifier_opt): Look through typenames as
195 (cp_parser_template_name): Honor check_dependency_p.
198 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name):
202 * pt.c (unify): Add ENUMERAL_TYPE case. Replace sorry with
205 2004-09-12 Richard Henderson <rth@redhat.com>
208 * semantics.c (maybe_cleanup_point_expr): Don't call fold.
209 * typeck.c (condition_conversion): Likewise.
211 2004-09-11 Richard Henderson <rth@redhat.com>
214 * pt.c (cur_stmt_expr): Move from tsubst_expr.
215 (tsubst_expr) <case STMT_EXPR>: Move ...
216 (tsubst_copy_and_build): ... here.
218 2004-09-10 Zack Weinberg <zack@codesourcery.com>
220 * cp-tree.h (interface_only, interface_unknown): Delete declarations;
221 comment explaining them moved to c-common.h.
222 * lex.c (interface_only, interface_unknown, extract_interface_info):
224 (cxx_finish): Don't reset interface_unknown.
225 (handle_pragma_interface): Don't set interface_only and
226 interface_unknown; just the like-named fields in finfo.
227 (handle_pragma_implementation): Adjust comment.
228 * decl2.c (cp_finish_file): Don't reset interface_only and
230 * method.c (synthesize_method): Don't reset interface_unknown or
231 call extract_interface_info.
232 * pt.c (pop_tinst_level): Don't call extract_interface_info.
233 * decl.c (start_cleanup_fn): Don't save or restore interface_only
234 and interface_unknown.
235 (make_rtl_for_nonlocal_decl): Call get_fileinfo on input_filename
236 and use the result instead of the interface_only/interface_unknown
238 (start_preparsed_function): Likewise.
239 * lex.c (cxx_make_type): Likewise.
240 * semantics.c (begin_class_definition): Likewise.
241 (expand_body): Don't call extract_interface_info.
243 2004-09-10 Ziemowit Laski <zlaski@apple.com>
245 * decl.c (objc_mark_locals_volatile): Make description of
246 routine more descriptive; only mark VAR_DECLs at each
249 2004-09-10 Richard Henderson <rth@redhat.com>
252 * call.c (build_vfield_ref): Move...
253 * class.c (build_vfield_ref): ... here. Convert datum to the
254 primary base containing the vptr.
255 (make_new_vtable): Simplify build_primary_vtable arguments.
256 (finish_struct_1): Do not duplicate TYPE_VFIELD.
257 * typeck.c (build_class_member_access_expr): Don't warn for
258 null object access to base fields.
260 2004-09-10 Ziemowit Laski <zlaski@apple.com>
262 * decl.c (objc_get_current_scope, objc_mark_locals_volatile):
263 New functions, to be called from ObjC++.
265 2004-09-10 Kazu Hirata <kazu@cs.umass.edu>
267 * class.c, cp-tree.h, decl.c, decl2.c, mangle.c,
268 name-lookup.h, parser.c, search.c, semantics.c, typeck2.c: Fix
271 2004-09-09 Ziemowit Laski <zlaski@apple.com>
273 * typeck.c (build_c_cast): Preserve the cast if casting
274 to and from an Objective-C type.
276 2004-09-09 Ziemowit Laski <zlaski@apple.com>
278 * Make-lang.in (cp/typeck.o): Depend on c-common.h.
279 * typeck.c: Include c-common.h.
280 (comptypes): For RECORD_TYPEs, call objc_comptypes() and
281 return the result if nonnegative.
283 2004-09-09 Zack Weinberg <zack@codesourcery.com>
285 * decl2.c (import_export_class)
286 * lex.c (handle_pragma_interface):
287 Test MULTIPLE_SYMBOL_SPACES with if, not #ifdef.
289 2004-09-08 Ziemowit Laski <zlaski@apple.com>
291 * Make-lang.in (cp/semantics.o): Depend on c-common.h.
292 * semantics.c: Include c-common.h.
293 (finish_compound_stmt): Call objc_clear_super_receiver().
295 2004-09-08 Ziemowit Laski <zlaski@apple.com>
297 * cp-tree.h (do_poplevel): New prototype.
298 * semantics.c (do_poplevel): Make externally visible.
300 2004-09-08 Nathan Sidwell <nathan@codesourcery.com>
302 * cp-tree.h (tree_pair_s): Define a GC'd vector.
303 * name-lookup.h (cxx_saved_binding, cp_class_binding): Likewise.
304 * semantics.c (deferred_access): Likewise.
306 2004-09-06 Daniel Jacobowitz <dan@debian.org>
308 * semantics.c (expand_body): Assert that we are not nested.
310 2004-09-06 Zack Weinberg <zack@codesourcery.com>
312 * decl.c (build_enumerator): Use add_double and int_fits_type_p
313 instead of cp_build_binary_op, to avoid creating short-lived trees.
314 * parser.c (cp_parse_type_specifier <RID_ENUM>): Use two-token
315 lookahead instead of backtracking. Move some code to avoid a
317 (cp_parser_enum_specifier): Avoid duplication of effort with caller.
318 Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
319 (cp_parser_enumerator_list, cp_parser_enumerator_definition):
320 Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
322 2004-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
324 * decl.c (grok_declarator): Remove a redundant semicolon.
326 * parser.c (cp_parser_decl_specifier_seq, cp_parser_type_specifier):
327 Correct comments describing function parameters.
329 2004-09-03 Matt Austern <austern@apple.com>
330 Compile speed improvement.
331 * parser.c (cp_lexer_print_token): Only define if ENABLE_CHECKING set.
332 Otherwise define a stub macro that expands to nothing.
333 (cp_lexer_debugging_p): Only define if ENABLE_CHECKING set. Otherwise
334 define a stub macro that expands to 0.
335 (cp_lexer_start_debugging): Only define if ENABLE_CHECKING set.
336 (cp_lexer_stop_debugging): Likewise.
337 (cp_lexer_debug_stream): Only define if ENABLE_CHECKING set. Otherwise
338 define a stub macro that expands to NULL.
339 (cp_lexer_new_main): Only set debugging_p if ENABLE_CHECKING set.
340 (cp_lexer_new_from_tokens): Likewise.
342 2004-09-03 Jan Hubicka <jh@suse.cz>
344 * decl.c (finish_function): Clean out pointers we no longer need.
346 2004-09-03 Jan Beulich <jbeulich@novell.com>
348 * g++spec.c (MATH_LIBRARY_PROFILE): Default to MATH_LIBRARY rather
351 2004-09-02 Paul Brook <paul@codesourcery.com>
353 * decl2.c (determine_visibility): Only check data visibility
356 2004-08-31 Mark Mitchell <mark@codesourcery.com>
358 * cp-tree.h (DECL_CONSTRUCTION_VTABLE_P): New macro.
359 * class.c (build_ctor_vtbl_group): Set DECL_CONSTRUCTION_VTABLE_P.
360 * decl2.c (determine_visibility): Honor
361 TARGET_CXX_EXPORT_CLASS_DATA.
363 * class.c (key_method): Rename to ...
364 (determine_key_method): ... this.
365 (finish_struct_1): Adjust accordingly.
366 * cp-tree.h (key_method): Declare.
367 * decl2.c (maybe_emit_vtables): Determine the key method here if
368 it has not already been done.
370 2004-08-31 Ziemowit Laski <zlaski@apple.com>
372 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-objcp-common.o.
373 (cp/cp-lang.o): Depend on debug.h, gtype-cp.h and cp/cp-objcp-common.h.
374 (cp/cp-decl.c): Do not depend on gtype-cp.h.
375 (cp/cp-objcp-common.o): New target.
376 * cp-lang.c: Include debug.h, cp-objcp-common.h and gtype-cp.h.
377 (cxx_get_alias_set, cxx_warn_unused_global_decl, cp_expr_size,
378 cp_tree_size, cp_var_mod_type_p, cxx_initialize_diagnostics): Move
379 prototypes and definitions to cp-objcp-common.h and cp-objcp-common.c,
381 (LANG_HOOKS_TREE_SIZE, LANG_HOOKS_FINISH,
382 LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_INIT_OPTIONS,
383 LANG_HOOKS_INITIALIZE_DIAGNOSTICS, LANG_HOOKS_HANDLE_OPTION,
384 LANG_HOOKS_HANDLE_FILENAME, LANG_HOOKS_MISSING_ARGUMENT,
385 LANG_HOOKS_POST_OPTIONS, LANG_HOOKS_GET_ALIAS_SET,
386 LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_EXPAND_EXPR,
387 LANG_HOOKS_EXPAND_DECL, LANG_HOOKS_PARSE_FILE,
388 LANG_HOOKS_DUP_LANG_SPECIFIC_DECL, LANG_HOOKS_TRUTHVALUE_CONVERSION,
389 LANG_HOOKS_SET_DECL_ASSEMBLER_NAME, LANG_HOOKS_MARK_ADDRESSABLE,
390 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
391 LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
392 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_PRINT_ERROR_FUNCTION,
393 LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL, LANG_HOOKS_WRITE_GLOBALS,
394 LANG_HOOKS_FUNCTION_INIT, LANG_HOOKS_FUNCTION_FINAL,
395 LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P,
396 LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE,
397 LANG_HOOKS_ATTRIBUTE_TABLE, LANG_HOOKS_TREE_INLINING_WALK_SUBTREES,
398 LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN,
399 LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS,
400 LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P,
401 LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P,
402 LANG_HOOKS_TREE_INLINING_VAR_MOD_TYPE_P,
403 LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN,
404 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN, LANG_HOOKS_EXPR_SIZE,
405 LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR,
406 LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, LANG_HOOKS_MAKE_TYPE,
407 LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE,
408 LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
409 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE, LANG_HOOKS_INCOMPLETE_TYPE_ERROR,
410 LANG_HOOKS_TYPE_PROMOTES_TO, LANG_HOOKS_REGISTER_BUILTIN_TYPE,
411 LANG_HOOKS_GIMPLIFY_EXPR, LANG_HOOKS_FOLD_OBJ_TYPE_REF): Move
412 hooks to cp-objcp-common.h.
413 (finish_file): New function.
414 * cp-objcp-common.c: New file.
415 * cp-objcp-common.h: New file.
416 * cp-tree.h (cp_finish_file): New prototype.
417 * decl.c: Do not include gtype-cp.h.
418 * decl2.c (finish_file): Rename to cp_finish_file.
420 2004-08-31 Richard Henderson <rth@redhat.com>
423 * pt.c (tsubst_expr): Move OFFSETOF_EXPR handling ...
424 (tsubst_copy_and_build): ... here.
426 2004-08-30 Mark Mitchell <mark@codesourcery.com>
428 * cp-tree.h (initialize_artificial_var): Declare.
429 * decl.c (initialize_artifical_var): New function.
430 * class.c (initialize_array): Remove.
431 (initialize_vtable): Use initialize_artificial_var.
432 (build_vtt): Likewise.
433 (build_ctor_vtbl_group): Likewise.
435 2004-08-30 Richard Henderson <rth@redhat.com>
437 * class.c (build_base_path): Use build_address directly.
438 * typeck.c (build_unary_op): Don't lower &a.b to pointer
440 * typeck2.c (store_init_value): Don't assume !TREE_CONSTANT
441 means !initializer_constant_valid_p.
443 2004-08-30 Richard Henderson <rth@redhat.com>
445 * class.c (fixed_type_or_null): Use get_base_address before
446 assuming an ADDR_EXPR is non-null.
448 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
450 * name-lookup.c (pop_binding, pushdecl,
451 set_identifier_type_value_with_scope, push_overloaded_decl,
452 arg_assoc_type): Replace abort with gcc_assert or gcc_unreachable.
453 * parser.c (cp_parser_diagnose_invalid_type_name,
454 cp_parser_postfix_expression, cp_parser_unary_expression,
455 cp_parser_check_declarator_template_para): Likewise.
456 * pt.c (push_inline_template_parms_recursive,
457 check_explicit_specialization, convert_nontype_argument,
458 coerce_template_template_parms, uses_template_parms,
459 instantiate_class_template, tsubst_decl, tsubst, tsubst_copy,
460 tsubst_expr, instantiate_template,
461 maybe_adjust_types_for_deduction, type_unification_real,
462 resolve_overloaded_unification, template_decl_level,
463 type_dependent_expression_p): Likewise.
464 * search.c (lookup_base_r): Likewise.
465 * semantics.c (finish_stmt_expr, simplify_aggr_init_expr): Likewise.
466 * tree.c (lvalue_p_1, count_functions, cxx_printable_name,
467 verify_stmt_tree_r, get_type_decl, stabilize_call): Likewise.
468 * typeck.c (common_type, get_member_function_from_ptrfunc,
469 build_binary_op, build_unary_op, expand_ptrmemfunc_cst): Likewise.
470 * typeck2.c (cxx_incomplete_type_diagnostic,
471 split_nonconstant_init_1, store_init_value,
472 process_init_constructor): Likewise.
474 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
476 * call.c (check_dtor_name): Replace abort with gcc_assert or
478 (build_call, add_builtin_candidate, build_new_op,
479 convert_like_real, build_over_call, in_charge_arg_for_name,
480 source_type, joust): Likewise.
481 * class.c (build_simple_base_path, get_vcall_index,
482 finish_struct_1, instantiate_type, get_enclosing_class,
483 add_vcall_offset_vtbl_entries_1, cp_fold_obj_type_ref): Likewise.
484 * cp-gimplify.c (cp_genericize): Likewise.
485 * cp-lang.c (cp_expr_size, cp_tree_size): Likewise.
486 * cvt.c (cp_convert_to_pointer, ocp_convert): Likewise.
487 * decl.c (poplevel, make_unbound_class_template, reshape_init,
488 check_special_function_return_type, grokdeclarator,
489 grok_op_properties, tag_name, xref_tag, start_preparsed_function,
490 finish_function): Likewise.
491 * decl2.c (grokfield, maybe_emit_vtables):Likewise.
492 * error.c (dump_global_iord, dump_decl, dump_template_decl,
493 language_to_string): Likewise.
494 * except.c (choose_personality_routine): Likewise.
495 * friend.c (do_friend): Likewise.
496 * g++spec.c (lang_specific_driver): Likewise.
497 * init.c (build_zero_init, expand_default_init, build_new_1,
498 build_vec_delete_1, build_vec_init, build_dtor_call): Likewise.
499 * lex.c (retrofit_lang_decl, cp_type_qual_from_rid): Likewise.
500 * mangle.c (add_substitution, write_unscoped_name,
501 write_template_prefix, write_identifier,
502 write_special_name_destructor, write_type, write_builtin_type,
503 write_expression, write_template_param,
504 write_java_integer_type_codes): Likewise.
505 * method.c (implicitly_declare_fn): Likewise.
507 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
509 * cp-tree.h (BINFO_PRIMARY_P): Use a binfo flag.
510 (BINFO_INDIRECT_PRIMARY_P): Remove.
511 * class.c (determine_primary_base): Rename to ...
512 (determine_primary_bases): ... here. Set all primary bases.
513 (set_primary_base): Remove.
514 (mark_primary_bases): Remove.
515 (build_simple_base_path, walk_subobject_offsets,
516 propagate_binfo_offsets, end_of_class): Adjust.
517 (layout_class_type): Rename determine_primary_base call.
518 (dump_class_hierarchy_r, dump_vtable): Adjust. Don't pass a binfo
520 (dfs_build_secondary_vptr_vtt_inits, dfs_accumulate_vtbl_inits,
521 build_rtti_vtbl_entries): Adjust.
522 * init.c (build_vtbl_address): Adjust.
524 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Use gcc_assert.
526 2004-08-28 Ziemowit Laski <zlaski@apple.com>
528 * Make-lang.in (CXX_OBJS): Split up into CXX_OBJS and
530 (CXX_C_OBJS): Include in CXX_AND_OBJCXX_OBJS instead of listing
531 separately on the link line.
533 2004-08-28 Jason Merrill <jason@redhat.com>
535 * decl.c (expand_static_init): Avoid bogus warnings.
537 2004-08-27 Jason Merrill <jason@redhat.com>
540 * tree.c (stabilize_init): See through a COMPOUND_EXPR.
543 * decl.c (expand_static_init): Use thread-safety API.
544 (register_dtor_fn): Return the call, don't expand it.
545 * tree.c (add_stmt_to_compound): New fn.
546 (stabilize_call): Use it.
548 2004-08-27 Richard Henderson <rth@redhat.com>
550 * cp-tree.def (OFFSETOF_EXPR): New.
551 * parser.c (cp_parser_builtin_offsetof): Either built an
552 OFFSETOF_EXPR, or call fold_offsetof immediately.
553 * pt.c (tsubst_expr): Handle OFFSETOF_EXPR.
555 2004-08-27 Nathan Sidwell <nathan@codesourcery.com>
557 * call.c (validate_conversion_obstack): Replace
558 my_friendly_assert with gcc_assert or gcc_unreachable.
559 (direct_reference_binding, merge_conversion_sequences,
560 build_user_type_conversion_1, perform_overload_resolution,
561 build_op_delete_call, enforce_access, call_builtin_trap,
562 build_over_call, build_special_member_call, build_new_method_call,
563 initialize_reference): Likewise.
564 * class.c (build_base_path, build_primary_vtable, alter_access,
565 check_bases, update_vtable_entry_for_fn, layout_empty_base,
566 clone_function_decl, adjust_clone_args,
567 type_requires_array_cookie, include_empty_classes,
568 finish_struct_1, resolve_address_of_overloaded_function,
569 instantiate_type, get_vtbl_decl_for_binfo, build_vtt_inits,
570 dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
571 accumulate_vtbl_inits, build_vtbl_initializer,
572 build_vbase_offset_vtbl_entries, build_rtti_vtbl_entries): Likewise.
573 * cvt.c (build_up_reference, convert_to_reference): Likewise.
574 * decl.c (poplevel, duplicate_decls, make_typename_type,
575 cxx_init_decl_processing, reshape_init, check_initializer,
576 make_rtl_for_nonlocal_decl, initialize_local_var, cp_finish_decl,
577 expand_static_init, grokfndecl, grokvardecl, build_ptrmem_type,
578 grokdeclarator, copy_fn_p, grok_op_properties, xref_tag,
579 xref_basetypes, start_preparsed_function, save_function_data,
580 finish_function, finish_method, maybe_register_incomplete_var,
581 complete_vars): Likewise.
582 * decl2.c (grok_array_decl, check_member_template,
583 check_classfn, finish_static_data_member_decl, coerce_new_type,
584 coerce_delete_type, import_export_class, decl_needed_p,
585 determine_visibility, import_export_decl, build_cleanup,
586 start_static_initialization_or_destructi, do_static_destruction,
587 prune_vars_needing_no_initialization,
588 build_offset_ref_call_from_tree): Likewise.
589 * error.c (dump_decl, dump_expr): Likewise.
590 * init.c (finish_init_stmts, build_zero_init,
591 expand_virtual_init, expand_default_init, expand_aggr_init_1,
592 build_offset_ref, build_new_1, build_delete, build_vbase_delete):
594 * mangle.c (write_method_parms, write_template_args,
595 write_expression, write_template_arg): Likewise.
596 * method.c (make_thunk, finish_thunk, use_thunk): Likewise.
597 * name-lookup.c (pop_binding, begin_scope, leave_scope,
598 resume_scope, push_using_decl, validate_nonmember_using_decl,
599 is_ancestor, poplevel_class, set_inherited_value_binding_p,
600 push_class_level_binding, do_class_using_decl, push_namespace,
601 pop_namespace, add_using_namespace, ambiguous_decl,
602 lookup_namespace_name, lookup_type_current_level,
603 maybe_process_template_type_declaration): Likewise.
604 * parser.c (cp_lexer_peek_nth_token,
605 cp_parser_parse_and_diagnose_invalid_typ,
606 cp_parser_translation_unit, cp_parser_template_id,
607 cp_parser_lookup_name, cp_parser_late_parsing_for_member): Likewise.
608 * pt.c (push_access_scope, finish_member_template_decl,
609 push_inline_template_parms_recursive, add_outermost_template_args,
610 get_innermost_template_args, begin_explicit_instantiation,
611 end_explicit_instantiation, retrieve_specialization,
612 is_specialization_of, is_specialization_of_friend,
613 register_specialization, check_explicit_specialization,
614 comp_template_parms, process_template_parm,
615 process_partial_specialization, convert_nontype_argument,
616 coerce_template_template_parms, coerce_template_parms,
617 mangle_class_name_for_template, lookup_template_function,
618 lookup_template_class, instantiate_class_template, tsubst_decl,
619 tsubst_function_type, tsubst, tsubst_qualified_id, tsubst_copy,
620 instantiate_template, fn_type_unification, type_unification_real,
621 get_template_base, regenerate_decl_from_template,
622 template_for_substitution, instantiate_decl,
623 get_mostly_instantiated_function_type, dependent_scope_ref_p,
624 value_dependent_expression_p, resolve_typename_type): Likewise.
625 * repo.c (repo_emit_p): Likewise.
626 * rtti.c (build_headof, get_tinfo_decl, get_pseudo_ti_init,
627 create_tinfo_types, emit_tinfo_decl): Likewise.
628 * search.c (lookup_base_r, lookup_base, lookup_field_1,
629 dfs_access_in_type, build_baselink, lookup_member,
630 adjust_result_of_qualified_name_lookup, copied_binfo): Likewise.
631 * semantics.c (perform_or_defer_access_check,
632 finish_non_static_data_member, finish_stmt_expr_expr,
633 finish_stmt_expr, finish_call_expr, finish_pseudo_destructor_expr,
634 finish_template_template_parm, finish_member_declaration,
635 emit_associated_thunks): Likewise.
636 * tree.c (build_target_expr_with_type, force_target_expr,
637 copy_binfo, get_first_fn, cp_tree_equal): Likewise.
638 * typeck.c (type_after_usual_arithmetic_conversions, comptypes,
639 cxx_sizeof_or_alignof_type, perform_integral_promotions,
640 build_class_member_access_expr, finish_class_member_access_expr,
641 build_ptrmemfunc_access_expr, build_unary_op,
642 unary_complex_lvalue, cxx_mark_addressable, build_modify_expr,
643 build_ptrmemfunc, expand_ptrmemfunc_cst, check_return_expr
644 * typeck2.c (complete_type_check_abstract,
645 abstract_virtuals_error, process_init_constructor,
646 add_exception_specifier): Likewise.
648 2004-08-27 Nathan Sidwell <nathan@codesourcery.com>
650 * class.c (build_vtbl_initializer): Use ssize_int.
651 * decl.c (complete_array_type): Likewise.
652 * method.c (finish_thunk): Likewise.
653 * search.c (get_dynamic_base_type): Likewise.
655 2004-08-26 Richard Henderson <rth@redhat.com>
657 * cp-tree.h (DECL_FIELD_IS_BASE): New.
658 * class.c (build_base_field): Set it.
659 (build_simple_base_path): Use it.
660 (fixed_type_or_null): Don't consider base fields definitive.
662 2004-08-25 Roger Sayle <roger@eyesopen.com>
665 PR tree-optimization/16372
666 * decl.c (finish_enum): Make the precision of the enumerated type
667 the same width as the underlying integer type.
669 2004-08-25 Mark Mitchell <mark@codesourcery.com>
672 * lex.c (build_lang_decl): Set DECL_NO_STATIC_CHAIN for all C++
675 * mangle.c (get_identifier_nocopy): Add cast.
677 * cp-tree.h (mangle_type): Remove.
678 * mangle.c (globals): GTY it.
679 (mangle_obstack): New variable.
680 (name_obstack): Likewise.
681 (name_base): Likewise.
682 (write_char): Adjust accordingly.
683 (write_chars): Likewise.
684 (write_string): Likewise.
685 (start_mangling): Initialize G.substitutions only one. Add
687 (finish_mangling): Use VARRAY_CLEAR to reclaim
688 storage in G.substitutions. Use obstack_finish.
689 (init_mangle): Adjust for changes to variable names above.
690 Initialize G.substitutions.
691 (mangle_decl_string): Adjust call to start_mangling.
692 (get_identifier_nocopy): New function.
693 (mangle_decl): Use it.
694 (mangle_type_string): Adjust call to start_mangling.
695 (mangle_special_for_type): Likewise.
696 (mangle_vtt_for_type): Likewise.
697 (mangle_ctor_vtbl_for_type): Likewise.
698 (mangle_thunk): Likewise.
699 (mangle_guard_variable): Likewise.
700 (mangle_ref_init_variable): Likewise.
702 2004-08-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
705 * pt.c (redeclare_class_template): Check the type of non-type and
706 template template parameter.
708 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
710 * call.c (convert_class_to_reference): Adjust build_int_cst calls.
711 (build_user_type_conversion_1, convert_like_real,
712 build_java_interface_fn_ref, build_special_member_call): Likewise.
713 * class.c (finish_struct_1, build_vtbl_initializer): Likewise.
714 * cp-gimplify.c (cp_gimplify_expr): Likewise.
715 * cvt.c (cp_convert_to_pointer): Likewise.
716 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
717 * decl2.c (start_static_initialization_or_destruction,
718 generate_ctor_or_dtor_function): Likewise.
719 * except.c (build_throw): Likewise.
720 * mangle.c (write_integer_cst): Likewise.
721 * method.c (finish_thunk): Likewise.
722 * rtti.c (build_headof, get_tinfo_decl_dynamic,
723 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
724 get_pseudo_ti_init): Likewise.
725 * search.c (get_dynamic_cast_base_type): Likewise.
727 2004-08-25 Zack Weinberg <zack@codesourcery.com>
729 * class.c, search.c: Remove references to DWARF_DEBUG.
731 2004-08-25 Adam Nemet <anemet@lnxw.com>
733 * repo.c (extract_string): Reset backquote after one character.
734 (get_base_filename): Fix indentation.
736 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
738 * decl.c (cxx_init_decl_processing): Adjust
739 build_common_tree_nodes call.
741 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
744 * (is_subobject_of_p): Resurrect & optimize.
745 (lookup_field_r): Use it.
747 2004-08-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
750 * search.c (friend_accessible_p): Increment processing_template_decl
751 when deal with TEMPLATE_DECL of SCOPE.
753 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
756 * semantics.c (check_accessibility_of_qualified_id): Defer check
757 if qualifying_type is a template parameter.
759 2004-08-23 Mark Mitchell <mark@codesourcery.com>
762 * pt.c (instantiate_decl): Do not try to apply
763 DECL_DECLARED_INLINED_P to a VAR_DECL.
765 * search.c (build_baselink): Fix typo in comment.
767 2004-08-22 Andrew Pinski <apinski@apple.com>
770 2004-08-22 Andrew Pinski <apinski@apple.com>
772 * typeck.c (build_unary_op): Use &a.b if the folded lowered
773 expression is not constant.
775 2004-08-23 Nathan Sidwell <nathan@codesourcery.com>
777 * name-lookup.c (pushdecl): Rename build_type_copy call.
778 * tree.c (cp_build_qualified_type_real,
779 build_exception_variant, handle_java_interface_attribute): Likewise.
781 2004-08-22 Andrew Pinski <apinski@apple.com>
784 * typeck.c (build_unary_op): Use &a.b if the folded lowered
785 expression is not constant.
787 2004-08-20 Mark Mitchell <mark@codesourcery.com>
790 * decl.c (expand_static_init): Use DECL_FUNCTION_SCOPE_P.
792 2004-08-21 Joseph S. Myers <jsm@polyomino.org.uk>
795 * pt.c (tsubst_copy_and_build): Avoid clearing TREE_NO_WARNING for
798 2004-08-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
800 * pt.c (register_specialization): Check DECL_TEMPLATE_SPECIALIZATION
801 before calling comp_template_args.
803 2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
805 * class.c (build_vtbl_initializer): Use build_int_cst for
807 * decl.c (complete_array_type): Likewise.
808 * method.c (finish_thunk): Likewise.
810 2004-08-20 Andreas Tobler <a.tobler@schweiz.ch>
812 * tree.c: Remove unused mark_local_for_remap_r.
814 2004-08-19 Eric Christopher <echristo@redhat.com>
816 * cp-tree.h (cxx_unsave_expr_now): Delete prototype.
817 * tree.c (cxx_unsave_expr_now): Delete.
818 (cp_unsave_r): Ditto.
820 2004-08-19 Mark Mitchell <mark@codesourcery.com>
823 * pt.c (push_template_decl_real): Disallow template allocation
824 functions with fewer than two parameters.
826 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
828 * cp-tree.h (build_shared_int_cst): Remove.
829 * tree.c (shared_int_cache): Remove.
830 (build_shared_int_cst): Remove.
831 * class.c (finish_struct_1): Use build_int_cst.
833 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
835 * decl.c (finish_enum): Do not copy value node early, copy
837 * lex.c (cxx_init): Force null_node to be unique.
839 2004-08-19 Joseph S. Myers <jsm@polyomino.org.uk>
842 * pt.c (tsubst_copy, tsubst_copy_and_build): Copy TREE_NO_WARNING
843 from input for MODOP_EXPR.
845 2004-08-18 Mark Mitchell <mark@codesourcery.com>
847 * pt.c (dependent_template_p): Fix typo in commment.
850 * pt.c (dependent_template_p): Treat IDENTIFIER_NODEs as
853 2004-08-17 Mark Mitchell <mark@codesourcery.com>
856 * pt.c (unify): Tidy ARRAY_TYPE handling. Make sure that non-type
857 arguments have the same type as the corresponding parameter.
860 * parser.c (cp_parser_name_lookup_error): If parser->object_scope
861 is set use it for diagnostic purposes.
862 (cp_parser_pseudo_destructor_name): Remove special-case error
866 * semantics.c (expand_or_defer_fn): Honor -fkeep-inline-functions.
869 * cp-tree.h (qualified_name_lookup_error): Add parameter.
870 * name-lookup.c (do_class_using_decl): Restrict set of entities
871 passed to cp_emit_debug_info_for_using more carefully.
872 (lookup_qualified_name): Allow lookup_member to return sets of
874 * parser.c (cp_parser_lookup_name): Add ambiguous_p parameter.
875 (cp_parser_primary_expression): Handle ambiguous lookups.
876 (cp_parser_template_name): Adjust use of cp_parser_lookup_name.
877 (cp_parser_template_argument): Likewise.
878 (cp_parser_elaborate_type_specifier): Likewise.
879 (cp_parser_namespace_name): Likewise.
880 (cp_parser_class_name): Likewise.
881 (cp_parser_lookup_name_simple): Likewise.
882 * pt.c (tsubst_qualified_id): Handle ambiguous results.
883 (tsubst_expr): Likewise.
884 * semantics.c (qualified_name_lookup_error): Add decl paramter.
885 For ambiguous lookups, print candidates.
887 2004-08-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
890 * pt.c (instantiate_pending_templates): Add int parameter. Don't
892 * cp-tree.h (instantiate_pending_templates): Adjust prototype.
893 * decl2.c (finish_file): Adjust call to
894 instantiate_pending_templates.
896 2004-08-15 Roger Sayle <roger@eyesopen.com>
898 * call.c (build_vfield_ref, build_call, build_conditional_expr,
899 convert_arg_to_ellipsis, build_x_va_arg, build_over_call,
900 build_java_interface_fn_ref, build_special_member_call,
901 build_new_method_call, initialize_reference): Replace calls to
902 build with calls to buildN.
903 * class.c (build_base_path, convert_to_base_statically,
904 build_vfn_ref, instantiate_type, dfs_accumulate_vtbl_inits,
905 build_vtbl_initializer): Likewise.
906 * cp-gimplify.c (genericize_try_block, genericize_catch_block,
907 gimplify_if_stmt, cp_genericize_r): Likewise.
908 * cvt.c (convert_to_void): Likewise.
909 * decl.c (check_initializer, finish_constructor_body,
910 finish_destructor_body): Likewise.
911 * error.c (dump_expr): Likewise.
912 * except.c (build_exc_ptr, expand_start_catch_block, build_throw):
914 * init.c (perform_member_init, expand_virtual_init,
915 expand_cleanup_for_base, build_init, expand_default_init,
916 build_offset_ref, decl_constant_value, build_new, build_new_1,
917 build_vec_delete_1, build_vec_init, build_delete,
918 push_base_cleanups, build_vec_delete): Likewise.
919 * mangle.c (write_integer_cst): Likewise.
920 * method.c (thunk_adjust, do_build_copy_constructor,
921 do_build_assign_ref): Likewise.
922 * pt.c (lookup_template_function, tsubst, tsubst_copy_and_build,
923 unify, build_non_dependent_expr): Likewise.
924 * rtti.c (build_headof, build_typeid, ifnonnull,
925 build_dyanmic_cast_1, tinfo_base_init): Likewise.
926 * semantics.c (begin_compound_stmt, finish_call_expr,
927 finish_pseudo_destructor_expr, finish_id_expression,
928 simplify_aggr_init_expr, finalize_nrv_r): Likewise.
929 * tree.c (build_target_expr, build_cplus_new, array_type_nelts_top,
930 array_type_nelts_total, stabilize_call): Likewise.
931 * typeck.c (decay_conversion, build_class_member_access_expr,
932 lookup_destructor, build_ptrmemfunc_access_expr, build_array_ref,
933 get_member_function_from_ptrfunc, build_binary_op, pointer_diff,
934 build_x_unary_op, build_unary_op, unary_complex_lvalue,
935 build_compound_expr, build_modify_expr, expand_ptrmemfunc_cst,
936 check_return_expr): Likewise.
937 * typeck2.c (split_nonconstant_1, split_nonconstant_init_1,
938 split_nonconstant_init, store_init_value, build_m_component_ref):
941 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
943 * call.c (convert_class_to_reference,
944 build_user_type_conversion_1, convert_like_real,
945 build_java_interface_fn_ref, build_special_member_call): Use
947 * class.c (build_vtbl_initializer): Likewise.
948 * cp-gimplify.c (cp_gimplify_expr): Likewise.
949 * cvt.c (cp_convert_to_pointer): Likewise.
950 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
951 * decl2.c (start_static_initialization_or_destruction,
952 generate_ctor_or_dtor_function): Likewise.
953 * except.c (build_throw): Likewise.
954 * lex.c (cxx_init): Likewise.
955 * mangle.c (write_integer_cst): Likewise.
956 * rtti.c (build_headof, get_tinfo_decl_dynamic,
957 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
958 get_pseudo_ti_init): Likewise.
959 * search.c (get_dynamic_cast_base_type): Likewise.
960 * tree.c (build_shared_int_cst): Likewise.
962 2004-08-12 Mark Mitchell <mark@codesourcery.com>
965 * class.c (count_depth_data): New type.
966 (dfs_depth_post): New function.
967 (dfs_depth_q): Likewise.
968 (find_final_overrider_data_s): Change type of vpath.
970 (dfs_find_final_overrider_1): New function.
971 (dfs_find_final_overrider): Use it.
972 (dfs_find_final_overrider_q): Adjust use of vpath.
973 (dfs_find_final_overrider_post): Likewise.
974 (find_final_overrider): Use dfs_depth. Allocate and deallocate
977 2004-08-12 Jan Beulich <jbeulich@novell.com>
979 * parser.c (cp_parser_asm_definition): Properly consume scope operator
980 tokens preceding the clobbers. Don't check for scope operator
981 following inputs. Simplify inputs handling to match that now used for
984 2004-08-11 Mark Mitchell <mark@codesourcery.com>
987 * except.c (build_throw): Allocate cleanup_type and the function
988 for __cxa_throw separately.
991 * call.c (standard_conversion): Do not accept conversions between
992 pointers to members if the class types are unrelated.
995 * parser.c (cp_parser_builtin_offsetof): Cast to "const volatile
996 char &" instead of just "char &".
999 * pt.c (tsubst): Just return the unknown_type_node.
1001 2004-08-11 Mark Mitchell <mark@codesourcery.com>
1004 * parser.c (cp_parser_class_specifier): Robustify.
1007 * pt.c (tsubst_copy_and_build): Complain about invalid
1011 * pt.c (tsubst_default_argument): Clear out current_class_ptr and
1012 current_class_ref while tsubsting.
1014 2004-08-10 Mark Mitchell <mark@codesourcery.com>
1017 * parser.c (cp_parser_init_declarator): Robustify.
1019 2004-08-06 Richard Sandiford <rsandifo@redhat.com>
1021 * typeck2.c (process_init_constructor): Guard the missing field warning
1022 with warn_missing_field_initializers rather than extra_warnings.
1024 2004-08-06 Paolo Bonzini <bonzini@gnu.org>
1026 * class.c (instantiate_type) <ENTRY_VALUE_EXPR>: Do not handle.
1028 2004-08-05 Mark Mitchell <mark@codesourcery.com>
1030 * decl.c (start_preparsed_function): Move determine_visibility
1032 * decl2.c (determine_visibility): Incorporate dllexport testing.
1034 2004-08-05 Geoffrey Keating <geoffk@apple.com>
1036 * g++spec.c (lang_specific_driver): An -Xlinker or -Wl, option
1037 means that libstdc++ is needed.
1039 2004-08-05 Nathan Sidwell <nathan@codesourcery.com>
1041 * cvt.c (cp_convert_to_pointer): Adjust force_fit_type call.
1043 2004-08-04 Geoffrey Keating <geoffk@apple.com>
1045 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_ASSEMBLER_NAME rather
1046 than passing it as a parameter to rest_of_decl_compilation.
1047 * decl2.c (grokfield): Use set_user_assembler_name.
1049 2004-08-04 Nathan Sidwell <nathan@codesourcery.com>
1051 * decl.c (complete_array_type): Don't gratuitously copy
1052 maxindex. Its type is always set.
1054 2004-08-04 Paul Brook <paul@codesourcery.com>
1056 * Make-lang.in (cp/semantics.o, cp/optimize.o): Depend on TARGET_H.
1057 * cp-tree.h (struct language_function): Rename x_dtor_label to
1059 (dtor_label): Rename ...
1060 (cdtor_label): ... to this.
1061 * decl.c (begin_constructor_body): Remove.
1062 (check_special_function_return_type): Maybe change the return type.
1063 (grokdeclarator): Pass the class type.
1064 (start_preparsed_function): Constructors may need a return label.
1065 (finish_constructor_body, finish_destructor_body): Set the return
1067 (begin_function_body): Don't call begin_constructor_body.
1068 (finish_function): Don't warn for constructors or destructors.
1069 (implicitly_declare_fn): Maybe change the return type.
1070 * optimize.c: Include target.h.
1071 (maybe_clone_body): Remap the function result.
1072 * semantics.c: Include target.h.
1073 (finish_return_stmt): Maybe jump to return label for constructors.
1075 2004-08-03 Mark Mitchell <mark@codesourcery.com>
1077 * class.c (build_vtable): Do not set DECL_VISIBILITY here.
1078 (check_field_decls): Or here.
1079 (check_methods): Or here.
1080 (initialize_array): Don't mess with DECL_CONTEXT.
1081 * cp-tree.h (start_decl): Adjust prototype.
1082 (determine_visibility): New function.
1083 * decl.c (duplicate_decls): Remove checks for hidden "operator
1085 (build_library_fn_1): Give all library functions default
1087 (start_decl): Add pop_scope_p parameter. Tidy.
1088 (cp_finish_decl): Do not pop scopes here. Call
1089 determine_visibility for variable definitions.
1090 (start_preparsed_function): Call determine_visibility.
1091 * decl2.c (determine_visibility): New function.
1092 * method.c (use_thunk): Fix formatting.
1093 * parser.c (cp_parser_condition): Adjust calls to start_decl.
1094 (cp_parser_init_declarator): Likewise.
1095 * pt.c (instantiate_decl): Always call pop_nested_class.
1096 * rtti.c (get_tinfo_decl): Do not set DECL_VISIBILITY.
1097 (tinfo_base_init): Likewise.
1099 2004-08-02 Mark Mitchell <mark@codesourcery.com>
1102 * name-lookup.c (validate_nonmember_using_decl): Robustify.
1104 2004-08-01 Mark Mitchell <mark@codesourcery.com>
1107 * name-lookup.c (decl_namespace): Remove.
1108 (current_decl_namespace): Use decl_namespace_context instead of
1110 (push_decl_namespace): Likewise.
1111 (arg_assoc_class): Likewise.
1112 (arg_assoc_type): Likewise.
1113 * pt.c (check_specialization_namespace): New function.
1114 (maybe_process_partial_specialization): Use it.
1115 (register_specialization): Likewise.
1118 * cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): New macro.
1119 * call.c (null_ptr_cst_p): Handle variables with constant
1121 * pt.c (convert_nontype_argument): Use
1122 DECL_INTEGRAL_CONSTANT_VAR_P.
1123 * semantics.c (finish_id_expression): Likewise.
1126 * decl.c (duplicate_decls): Reject duplicate namespace
1130 * typeck.c (build_ptrmemfunc): Loosen assertion.
1132 2004-08-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
1134 * call.c (z_candidate::template_decl): Rename from template.
1135 (add_template_candidate_real): Adjust member reference.
1138 2004-07-29 Mark Mitchell <mark@codesourcery.com>
1140 * cp-tree.h (IDENTIFIER_REPO_CHOSEN): Define.
1141 (lang_decl_flags): Narrow the width of "languages". Add
1143 (DECL_NEEDED_P): Remove.
1144 (FOR_EACH_CLONE): New macro.
1145 (DECL_REPO_AVAILABLE_P): Likewise.
1146 (DECL_TINFO_P): Likewise.
1147 (set_linkage_according_to_type): Declare.
1148 (import_export_vtable): Remove.
1149 (import_export_tinfo): Likewise.
1150 (mark_needed): New function.
1151 (decl_needed_p): Likewise.
1152 (note_vauge_linkage_fn): Likewise.
1153 (init_repo): Change prototype.
1154 (repo_template_used): Remove.
1155 (repo_template_instantiated): Likewise.
1156 (repo_emit_p): New function.
1157 (repo_export_class_p): Likewise.
1158 (no_linkage_check): Change prototype.
1159 * class.c (set_linkage_according_to_type): New function.
1160 (build_vtable): Use it. Do not call import_export_vtable. Set
1161 DECL_IGNORED_P if appropriate.
1162 * decl.c (duplicate_decls): Preserve DECL_REPO_AVAILABLE_P.
1163 (make_rtL_for_nonlocal_decls): Check for template instantiations
1165 (grokfndecl): Adjust call to no_linkage_check.
1166 (set_linkage_for_static_data_member): New function.
1167 (grokvardecl): Use it. Adjust call to no_linkage_check.
1168 (grokdeclarator): Use set_linkage_for_static_data_member.
1169 * decl2.c (note_vague_linkage_fn): New function.
1170 (note_vague_linkage_var): Likewise.
1171 (finish_static_data_member_decl): Use it.
1172 (import_export_vtable): Remove.
1173 (import_export_class): Use repo_export_class_p.
1174 (var_finalized_p): Simplify.
1175 (maybe_emit_vtables): Simplify.
1176 (mark_needed): New function.
1177 (decl_needed_p): Likewise.
1178 (import_export_decl): Add documentation and consistency checks.
1179 Use repo_emit_p. Handle virtual tables and RTTI information
1181 (import_export_tinfo): Remove.
1182 (write_out_vars): Call import_export_decl.
1183 (cxx_callgraph_analyze_expr): Ensure that all vtables are emitted
1185 (finish_file): Use decl_needed_p. Do not call import_export_decl
1186 for undefined static data members. Do not warn about undefined
1187 inlines when using a repository.
1188 (mark_used): Use note_vague_linkage_fn. Always defer template
1190 * lex.c (cxx_init): Adjust call to init_repo. Always set
1191 flag_unit_at_a-time.
1192 * method.c (synthesize_method): Remove unncessary
1193 import_export_decl call.
1194 (implicitly_declare_fn): Use set_linkage_according_to_type.
1195 * optimize.c (maybe_clone_body): Use FOR_EACH_CLONE.
1196 * pt.c (instantiate_class_template): Don't redundantly add classes
1197 to keyed_classes. Don't call repo_template_used.
1198 (tsubst_decl): Set DECL_INTERFACE_KNOWN for instantiations of
1199 templates with internal linkage.
1200 (check_instantiated_args): Adjust call to no_linkage_check.
1201 (instantiate_template): Use FOR_EACH_CLONE.
1202 (mark_definable): New function.
1203 (mark_decl_instantiated): Use it.
1204 (do_decl_instantiation): Adjust tests for explicit instantiation
1205 after "extern template".
1206 (instantiate_class_member): Do not use repo_template_instantiated.
1207 (do_type_instantiation): Simplify.
1208 (instantiate_decl): Use mark_definable. Check repo_emit_p.
1210 * repo.c (repo_get_id): Remove.
1211 (original_repo): Remove.
1212 (IDENTIFIER_REPO_USED): Remove.
1213 (IDENTIFIER_REPO_CHOSEN): Remove.
1214 Remove all #if 0'd code.
1215 (repo_template_used): Remove.
1216 (repo_template_instantiated): Remove.
1217 (temporary_obstack_initialized_p): New variable.
1218 (init_repo): Register with lang_post_pch_load. Avoid creating
1219 identifiers unnecessarily. Don't use original_repo. Close the
1221 (reopen_repo_file_for_write): Not here.
1222 (finish_repo): Always write out a new repository file.
1223 (repo_emit_p): New function.
1224 (repo_export_class_p): Likewise.
1225 * rtti.c (get_tinfo_decl): Use set_linkage_according_to_type.
1226 (involves_incomplete_p): New function.
1227 (tinfo_base_init): Use it.
1228 (ptr_initializer): Remove non_public_ptr parameter.
1229 (ptm_initializer): Likewise.
1230 (get_pseudo_ti_init): Likewise.
1231 (unemitted_tinfo_decl_p): Remove.
1232 (emit_tinfo_decl): Use import_export_decl.
1233 * semantics.c (expand_body): Move updates of static_ctors and
1235 (expand_or_defer_fn): ... here.
1236 * tree.c (no_linkage_check): Add relaxed_p parameter.
1238 2004-07-28 Eric Christopher <echristo@redhat.com>
1240 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
1242 2004-07-28 Nathan Sidwell <nathan@codesourcery.com>
1244 * cp-tree.h (struct tree_pair_s): New.
1245 (typedef tree_pair_p): New.
1246 (DEF_VEC_O(tree_pair_s)): New.
1247 (struct lang_type_class): Make vcall_indices a VEC(tree_pair_s).
1248 (CLASSTYPE_VCALL_INDICES): Update documentation.
1249 * class.c (get_vcall_index): Adjust.
1250 (add_vcall_offset): Adjust.
1252 2004-07-27 Kelley Cook <kcook@gcc.gnu.org>
1254 * pt.c, typeck.c: Remove spurious carriage returns.
1256 2004-07-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1259 * pt.c (coerce_template_template_parms) <PARM_DECL case>: Only check
1260 when the type of ARG is not dependent.
1262 2004-07-26 Geoffrey Keating <geoffk@apple.com>
1264 * g++spec.c (LIBSTDCXX_PROFILE): Default to LIBSTDCXX.
1265 (lang_specific_driver): If the C++ or math library options don't
1266 start with '-l', don't count them as added libraries.
1268 2004-07-26 Nathan Sidwell <nathan@codesourcery.com>
1270 * decl.c (xref_basetypes): Adjust base access vector creation.
1271 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Adjust base
1273 * search.c (dynamic_cast_base_recurse, dfs_access_in_type): Likewise.
1275 2004-07-26 Niall Douglas <s_fsfeurope2@nedprod.com>
1276 Brian Ryner <bryner@brianryner.com>
1280 * class.c (check_field_decls): Apply hidden visibility if
1281 -fvisibility-inlines-hidden and inlined unless otherwise specified
1282 (build_vtable): Set vtable visibility to class visibility.
1283 (check_field_decls): Default static member visibility to class
1285 (check_methods): Default method visibility to class visibility.
1286 * cp-tree.h: Added CLASSTYPE_VISIBILITY and
1287 CLASSTYPE_VISIBILITY_SPECIFIED macro.
1288 * decl.c (duplicate_decls): New logic for merging definition decls
1289 with declaration decls. Added ignore & warning when non default
1290 applied to global operator new or delete.
1291 * method.c, optimize.c, rtti.c: Added setting of VISIBILITY_SPECIFIED
1292 wherever VISIBILITY was changed
1293 * rtti.c (get_tinfo_decl): Set typeinfo visibility to class
1295 (tinfo_base_init): Set typeinfo name visibility to class visibility.
1297 2004-07-25 Bernardo Innocenti <bernie@develer.com>
1299 * decl.c: Rename all identifiers named `class' to `cl'.
1300 * cp-tree.h: Likewise.
1302 2004-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
1304 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Use GGC_CNEW.
1305 * typeck2.c (abstract_virtuals_error): Use GGC_NEW.
1306 * name-lookup.c (binding_entry_make): Use GGC_NEW.
1307 (binding_table_construct): Use GGC_CNEWVEC.
1308 (binding_table_new): Use GGC_NEW.
1309 (cxx_binding_make): Likewise.
1310 (begin_scope): Likewise.
1311 (push_to_top_level): Use GCC_CNEW.
1312 * parser.c (cp_token_cache_new): Likewise.
1313 (cp_token_cache_push_token): Likewise.
1314 (cp_lexer_new_main): Likewise.
1315 (cp_lexer_new_from_tokens): Likewise.
1316 (cp_parser_context_new): Likewise.
1317 (cp_parser_new): Likewise.
1318 (cp_lexer_new_from_tokens): Use GGC_NEWVEC.
1319 * lex.c (cxx_make_type): Use GGC_CNEW.
1320 (retrofit_lang_decl): Use GGC_NEWVAR.
1321 (cxx_dup_lang_specific_decl): Likewise.
1322 (copy_lang_type): Likewise.
1323 * decl.c (use_label): Use GGC_NEW instead of ggc_alloc.
1324 (save_function_data): Likewise.
1325 (lookup_label): Use GGC_CNEW instead of ggc_alloc_cleared.
1326 (cxx_push_function_context): Likewise.
1328 2004-07-25 Richard Henderson <rth@redhat.com>
1330 * decl.c (start_preparsed_function): Set DECL_ARTIFICIAL and
1331 DECL_IGNORED_P on RESULT_DECL.
1332 * semantics.c (finalize_nrv): Copy them too.
1334 2004-07-23 Nathan Sidwell <nathan@codesourcery.com>
1336 * search.c (lookup_conversion_operator): Avoid two loops.
1337 (add_conversions): Remove.
1338 (check_hidden_convs, split_conversions,
1339 lookup_conversions_r): New.
1340 (lookup_conversions): Use lookup_conversions_r.
1342 2004-07-22 Nathan Sidwell <nathan@codesourcery.com>
1344 * pt.c (get_template_base): Check type is completable.
1346 2004-07-21 Eric Christopher <echristo@redhat.com>
1348 * decl.c (poplevel): Inline unused variable checking.
1351 2004-07-21 Paolo Bonzini <bonzini@gnu.org>
1353 * typeck.c (build_binary_op): Do not use RDIV_EXPR for
1356 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1359 * pt.c (check_explicit_specialization): Remove extension to accept
1360 specializations without template headers. Fall-through to normal
1363 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1366 * pt.c (determine_specialization): New parameter template_count.
1367 Disambiguate between member templates and member functions counting
1368 the template headers.
1369 (check_explicit_specialization): Update caller.
1370 (tsubst_friend_function): Likewise.
1372 2004-07-20 Steven Bosscher <stevenb@suse.de>
1374 * cp-tree.def (TINST_LEVEL): Make it an 'x' node.
1375 * cp-tree.h (tinst_level_t): New tree type.
1376 (union lang_tree_node): Handle it.
1377 (TINST_LOCATION): New accessor macro.
1378 (make_tinst_level): New prototype.
1379 * cp-lang.c (cp_tree_size): Handle TINST_LEVEL.
1380 * decl.c (cp_tree_node_structure): Likewise.
1381 * error.c (print_instantiation_full_context): Use TINST_LOCATION.
1382 (print_instantiation_partial_context): Likewise.
1383 * pt.c (pop_tinst_level): Likewise.
1384 (push_tinst_level): Use make_tinst_level.
1385 * tree.c (make_tinst_level): New function.
1386 (cp_walk_subtrees): Walk TINST_DECL for a TINST_LEVEL node.
1388 2004-07-20 Mark Mitchell <mark@codesourcery.com>
1390 * parser.c (cp_parser_simple_type_specifier): Fix typo.
1393 * parser.c (cp_parser_simple_type_specifier): Do not record usage
1394 of globally-qualified names.
1396 2004-07-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1399 * error.c (dump_type) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Output
1402 2004-07-19 Mark Mitchell <mark@codesourcery.com>
1405 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
1406 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
1407 * class.c (add_implicitly_declared_members): Use
1408 CLASSTYPE_LAZY_ASSIGNMENT_OP.
1409 * method.c (lazily_declare_fn): Clear
1410 CLASSTYPE_LAZY_ASSIGNMENT_OP.
1411 * search.c (lookup_fnfields_1): Check it.
1413 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
1415 * cp-tree.h (vec_binfo_member): Remove.
1416 * tree.c (vec_binfo_member): Remove.
1418 * cp-tree.h (struct lang_type_class): Remove vfields field.
1419 (CLASSTYPE_VFIELDS): Remove.
1420 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
1421 * class.c (determine_primary_base): Remove CLASSTYPE_VFIELDS
1423 (dfs_modify_vtables): Use TYPE_CONTAINS_VPTR_P.
1424 (finish_struct_1): Remove CLASSTYPE_VFIELDS handling.
1425 * init.c (dfs_initialize_vtbl_ptrs): Use TYPE_CONTAINS_VPTR_P.
1427 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
1429 * cp-tree.h (DEF_VEC_P(tree)): Remove here.
1430 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
1432 (BINFO_LANG_SLOTS): Remove.
1433 * tree.c (copy_binfo): Adjust BINFO creation and accessors.
1434 * decl.c (xref_basetypes): Adjust BINFO creation and accessors.
1435 * class.c (check_bases): Adjust BINFO accessors.
1436 (determine_primary_base, finish_struct_bits,
1437 maybe_warn_about_overly_private_class, warn_hidden,
1438 walk_subobject_offsets, propagate_binfo_offsets, end_of_class,
1439 warn_about_ambiguous_bases, get_vfield_name,
1440 dump_class_hierarchy_r, build_vtt_inits, accumulate_vtbl_inits,
1441 add_vcall_offset_vtbl_entries_r): Likewise.
1442 * dump.c (cp_dump_tree): Likewise.
1443 * init.c (sort_mem_initializers, expand_member_init, build_delete,
1444 push_base_cleanups): Likewise.
1445 * method.c (do_build_copy_constructor, do_build_assign_ref,
1446 synthesize_exception_spec): Likewise.
1447 name-lookup.c (arg_assoc_class): Likewise.
1448 * pt.c (instantiate_class_template,
1449 get_template_base_recursive): Likewise.
1450 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Likewise.
1451 * typeck2.c (process_init_constructor): Likewise.
1452 * search.c (lookup_base_r, dynamic_cast_base_recurse,
1453 dfs_access_in_type, dfs_walk_real, look_for_overrides,
1454 types_overlap_p, copied_binfo, original_binfo): Likewise.
1455 (binfo_for_vtable): Remove
1457 2004-07-20 Steven Bosscher <stevenb@suse.de>
1459 * cp-tree.h (struct lang_decl_flags): Unify the template_info and
1460 thunk_alias, and the access and virtual_offset fields.
1461 (THUNK_VIRTUAL_OFFSET, THUNK_ALIAS): Adjust.
1462 * decl.c (finish_case_label): Update c_add_case_node call.
1464 2004-07-19 Mark Mitchell <mark@codesourcery.com>
1466 Revert patch for PR c++/16623.
1468 2004-07-19 Kelley Cook <kcook@gcc.gnu.org>
1470 * except.c: Remove two spurious carriage returns.
1472 2004-07-19 Mark Mitchell <mark@codesourcery.com>
1475 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
1476 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
1477 * class.c (add_implicitly_declared_members): Use
1478 CLASSTYPE_LAZY_ASSIGNMENT_OP.
1479 * method.c (lazily_declare_fn): Clear
1480 CLASSTYPE_LAZY_ASSIGNMENT_OP.
1481 * search.c (lookup_fnfields_1): Check it.
1483 2004-07-19 Nathan Sidwell <nathan@codesourcery.com>
1485 * class.c (add_method): Delay adding the slot until the end.
1486 (determine_primary_base): Adjust VEC_iterate invokation.
1487 (resort_type_method_vec, finish_struct_methods, warn_hidden,
1488 walk_subobject_offsets, end_of_class, warn_about_ambiguous_bases,
1489 build_vtbl_initializer): Likewise.
1490 * init.c (sort_mem_initializers, build_delete, push_base_cleanups,
1491 build_vbase_delete): Likewise.
1492 * method.c (do_build_copy_constructor): Likewise.
1493 * name-lookup.c (new_class_binding, print_binding_level,
1494 poplevel_class, store_class_bindings, push_to_top_level,
1495 pop_from_top_level): Likewise.
1496 * pt.c (check_explicit_specialization): Likewise.
1497 * search.c (lookup_conversion_operator, lookup_fnfields_1,
1498 get_pure_virtuals, add_conversions, dfs_check_overlap,
1499 binfo_for_vbase): Likewise.
1501 2004-07-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1504 * pt.c (unify) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Use only
1505 innermost set of template arguments during deduction. Simplify.
1507 2004-07-19 Joseph S. Myers <jsm@polyomino.org.uk>
1509 * typeck.c (build_modify_expr, build_x_modify_expr): Set
1510 TREE_NO_WARNING on assignments with an operator other than '='.
1512 2004-07-10 Steven Bosscher <stevenb@suse.de>
1513 Joseph S. Myers <jsm@polyomino.org.uk>
1515 * cp-tree.h (C_SET_EXP_ORIGINAL_CODE): Remove.
1516 * decl2.c (grokfield): Don't check current_class_depth via
1517 unused TREE_COMPLEXITY.
1518 * semantics.c (finish_parenthesized_expr): Set TREE_NO_WARNING
1519 to avoid the missing parentheses warning.
1520 Don't set C_SET_EXP_ORIGINAL_CODE.
1522 2004-07-18 Mark Mitchell <mark@codesourcery.com>
1524 * tree.c (no_linkage_helper): Remove.
1525 (no_linkage_check): Don't use walk_tree_without_duplicates.
1527 * mangle.c (write_expression): Issue a sorry for zero-operand
1530 2004-07-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1533 * init.c (build_offset_ref): Build SCOPE_REF with non-null
1534 TREE_TYPE for non-dependent names.
1535 * typeck.c (build_x_unary_op): Handle non-dependent SCOPE_REF.
1536 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
1537 unknown_type_node as its TREE_TYPE.
1538 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
1539 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
1540 (dump_expr) <SCOPE_REF case>: Likewise.
1542 2004-07-17 Jason Merrill <jason@redhat.com>
1545 * call.c (type_passed_as): Make the invisible reference type
1547 * cp-gimplify.c (gimplify_cleanup_stmt): Rename to
1548 cp_genericize_r. Handle invisible reference lowering.
1549 (is_invisiref_parm): New fn.
1550 (cp_genericize): Adjust the types of invisible reference parms.
1551 Don't repeat the walk for clones.
1552 * decl.c (store_parm_decls): Don't generate any code for clones.
1554 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
1556 * cp-tree.h (builtin_function): Declare.
1558 2004-07-16 Mark Mitchell <mark@codesourcery.com>
1560 * class.c (finish_struct_methods): Remove unncessary code.
1561 (add_implicitly_declared_members): Create declarations for default
1562 constructors and copy constructors lazily.
1563 * cp-tree.h (lang_type_class): Remove lazy_default_ctor and
1565 (CLASSTYPE_LAZY_DEFAULT_CTOR): New macro.
1566 (CLASSTYPE_LAZY_COPY_CTOR): Likewise.
1567 * decl2.c (check_classfn): Robustify.
1568 (locate_dtor): Handle empty CLASSTYPE_METHOD_VEC.
1569 (locate_ctor): Handle lazy default constructors.
1570 (locate_copy): Handle lazy copy constructors.
1571 (implicitly_declare_fn): Make sure we're looking at the
1572 TYPE_MAIN_VARIANT for a class before creating functions. Don't
1573 set TYPE_HAS_CONSTRUCTOR.
1574 (lazily_declare_fn): New function.
1575 * name-lookup.c (constructor_name_full): Simplify.
1576 * search.c (lookup_fnfields_1): Lazily create methods, as
1578 (lookup_for_overrides): Handle empty CLASSTYPE_METHOD_VEC.
1580 2004-07-16 Steven Bosscher <stevenb@suse.de>
1582 * cp-tree.h (struct lang_type): Don't have three GTY options on a
1583 single bit GTY desc.
1585 2004-07-16 Richard Henderson <rth@redhat.com>
1587 * cp-lang.c (LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING): Die.
1588 * cp-tree.h (cp_copy_res_decl_for_inlining): Remove.
1589 * tree.c (cp_copy_res_decl_for_inlining): Remove.
1591 2004-07-16 Nathan Sidwell <nathan@codesourcery.com>
1593 * class.c (finish_struct_bits): Use for loop.
1594 (propagate_binfo_offsets): Do primary binfo outside of loop.
1597 * dump.c (cp_dump_tree): Don't dump the bases if there's no
1600 * pt.c (tsubst) <TREE_BINFO case>: We should never get here.
1602 2004-07-15 Mark Mitchell <mark@codesourcery.com>
1604 * cp-tree.h (lang_type_class): Remove has_real_assign_ref and
1605 has_abstract_assign_ref. Make methods a VEC(tree) *.
1606 (TYPE_HAS_CONST_ASSIGN_REF): Add documentation.
1607 (CLASSTYPE_CONSTRUCTORS): Adjust for changes to CLASSTYPE_METHOD_VEC.
1608 (CLASSTYPE_DESTRUCTORS): Likewise.
1609 (TYPE_HAS_REAL_ASSIGN_REF): Remove.
1610 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
1611 (add_method): Change prototoype.
1612 * class.c (add_method): Remove error_p parameter. Adjust for
1613 changes to CLASSTYPE_METHOD_VEC.
1614 (handle_using_decl): Adjust call to add_method.
1615 (maybe_warn_about_overly_private_class): Adjust for
1616 changes to CLASSTYPE_METHOD_VEC.
1617 (resort_type_method_vec): Likewise.
1618 (finish_struct_methods): Likewise.
1619 (check_for_override): Likewise.
1620 (warn_hidden): Likewise.
1621 (add_implicitly_declared_members): Defer creation of assignment
1622 operators. Adjust call to add_method.
1623 (clone_function_decl): Adjust call to add_method.
1624 (check_bases_and_members): Don't set TYPE_HAS_REAL_ASSIGN_REF.
1625 (finish_struct_1): Use CLASSTYPE_DESTRUCTORS.
1626 * decl.c (grok_special_member_properties): Don't set
1627 TYPE_HAS_ABSTRACT_ASSIGN_REF.
1628 * decl2.c (check_classfn): Adjust for
1629 changes to CLASSTYPE_METHOD_VEC.
1630 * method.c (locate_dtor): Use CLASSTYPE_DESTRUCTORS.
1631 (locate_ctor): Use CLASSTYPE_CONSTRUCTORS.
1632 (locate_copy): Adjust for changes to CLASSTYPE_METHOD_VEC.
1633 (implicitly_declare_fn): Set DECL_SOURCE_LOCATION. Do not call
1635 * pt.c (check_explicit_specialization): Adjust for
1636 changes to CLASSTYPE_METHOD_VEC.
1637 (instantiate_class_template): Do not set
1638 TYPE_HAS_ABSTRACT_ASSIGN_REF.
1639 * ptree.c (cxx_print_type): Don't try to print
1640 CLASSTYPE_METHOD_VEC.
1641 * rtti.c (emit_support_tinfos): Use CLASSTYPE_DESTRUCTORS.
1642 * search.c (lookup_field_r): Adjust for
1643 changes to CLASSTYPE_METHOD_VEC.
1644 (lookup_fnfields): Likewise.
1645 (lookup_conversion_operator): Likewise.
1646 (lookup_fnfields_1): Likewise. Create assignment operators
1648 (look_for_overrides_here): Adjust for
1649 changes to CLASSTYPE_METHOD_VEC.
1650 (add_conversions): Likewise.
1651 * semantics.c (finish_member_declaration): Adjust call to add_method.
1653 2004-07-15 Jason Merrill <jason@redhat.com>
1655 * cp-lang.c (cxx_types_compatible_p): To the middle-end,
1656 references and pointers are compatible.
1658 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
1660 * decl.c (xref_basetypes): Refactor.
1661 * tree.c (copy_base_binfos): Replace with ...
1662 (copy_binfo): ... this. Deep copy the given binfo, (not the just
1663 bases of the given base).
1664 * cp-tree.h (copy_base_binfo): Remove.
1665 (copy_binfo): Declare.
1667 2004-07-15 Mark Mitchell <mark@codesourcery.com>
1669 * name-lookup.c (set_inherited_value_binding_p): Add class_type
1671 (get_class_binding): Adjust.
1672 (push_class_level_binding): Don't use set_inherited_value_binding_p.
1674 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
1676 * class.c (finish_struct_bits): Don't set TYPE_HAS_CONVERSION here.
1677 * decl.c (xref_basetypes): Set it here.
1679 * class.c (check_bases): Don't set CLASSTYPE_NON_AGGREGATE here.
1680 Don't check for incomplete base.
1681 (get_vfield_name): Simplify while loop.
1682 * decl.c (xref_basetypes): Set CLASSTYPE_NON_AGGREGATE here.
1684 2004-07-14 Mark Mitchell <mark@codesourcery.com>
1686 * lex.c (cxx_make_type): Remove call to get_pointer_type.
1688 * cp-tree.h (IDENTIFIER_VALUE): Remove.
1689 (BINFO_PUSHDECLS_MARKED): Likewise.
1690 (maybe_inject_for_scope_var): Likewise.
1691 (push_class_decls): Likewise.
1692 * name-lookup.h (push_class_binding): Remove.
1693 (innermost_non_namespace_value): New function.
1694 (outer_binding): Likewise.
1695 * class.c (add_method): Push bindings before adding to
1697 (restore_class_cache): Do not restore class_shadowed.
1698 (pushclass): Do not add USING_DECLs. Do not call
1700 * config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c.
1701 * decl.c (pushdecl): Use outer_binding.
1702 (poplevel): Set the scope for an out-of-scope for-loop declaration
1704 (cp_finish_decl): Don't call maybe_inject_for_scope_var.
1705 * name-lookup.c (new_class_binding): New function.
1706 (push_binding): Use it.
1707 (pushdecl): Use innermost_non_namespace_value.
1708 (maybe_inject_for_scope_var): Remove.
1709 (push_class_binding): Remove.
1710 (set_inherited_value_binding_p): New function.
1711 (get_class_binding): New function.
1712 (push_class_level_binding): Assert that the current_class_type is
1714 (outer_binding): New function.
1715 (innermost_non_namespace_value): Likewise.
1716 (lookup_name_real): Use outer_binding.
1717 (lookup_name_current_level): Ignore out-of-scope variables.
1718 * pt.c (check_template_shadow): Use innermost_non_namespace_value.
1719 (lookup_template_class): Likewise.
1720 * search.c (dfs_push_type_decls): Remove.
1721 (dfs_push_decls): Likewise.
1722 (setup_class_bindings): Likewise.
1723 (lookup_field_1): Handle USING_DECLs from dependent scopes.
1724 (marked_pushdecls_p): Remove.
1725 (unmarked_pushdecls_p): Remove.
1726 (marked_identifiers): Remove.
1727 (setup_class_bindings): Remove.
1728 (dfs_push_type_decls): Remove.
1729 (dfs_push_decls): Remove.
1730 (push_class_decls): Remove.
1732 2004-07-13 Mark Mitchell <mark@codesourcery.com>
1736 * decl.c (grokvardecl): Make declspecs parameter const.
1737 (grokdeclarator): Likewise. Adjust accordingly.
1738 * decl.h (grokdeclarator): Adjust declaration.
1739 * parser.c (cp_parser_init_declarator): Do not clear
1740 decl_specifiers->attributes.
1742 * cp-tree.h (lang_identifier): Remove class_value.
1743 (IDENTIFIER_CLASS_VALUE): Remove.
1744 (pop_class_decls): Likewise.
1745 (init_search_processing): Likewise.
1746 * class.c (handle_using_decl): Use lookup_member, not
1747 IDENTIFIER_CLASS_VALUE.
1748 (restore_class_cache): New function, split out from ...
1749 (pushclass): ... here. Do not call clear_identifier_class_values.
1750 (invalidate_class_lookup_cache): Do not clear
1751 IDENTIFIER_CLASS_VALUE.
1752 (popclass): Do not call pop_class_decls.
1753 (maybe_note_name_used_in_class): Do not save names looked up after
1754 the class is complete. Use lookup_member, not
1755 IDENTIFIER_CLASS_VALUE.
1756 * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
1757 * decl.c (cxx_init_decl_processing): Do not call
1758 init_search_processing.
1759 * method.c (do_build_copy_constructor): Remove unnecessary code.
1760 (do_build_assign_ref): Likewise.
1761 * name-lookup.c (pushdecl): Use lookup_member, not
1762 IDENTIFIER_CLASS_VALUE.
1763 (set_identifier_type_value_with_scope): Set TREE_TYPE on the
1765 (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
1766 (push_class_binding): Do not set it.
1767 (clear_identifier_class_values): Remove.
1768 (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
1769 (store_binding): Do not save it.
1770 (pop_from_top_level): Do not restore it.
1771 * name-lookup.h (cxx_saved_binding): Remove class_value.
1772 (clear_identifier_class_values): Remove.
1773 * ptree.c (cxx_print_identifier): Do not print
1774 IDENTIFIER_CLASS_VALUE.
1775 * search.c (search_obstack): Remove.
1776 (push_stack_level): Remove.
1777 (pop_stack_level): Remove.
1778 (search_level): Remove.
1779 (search_stack): Remove.
1780 (lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
1781 (setup_class_bindings): Use IDENTIFIER_MARKED, not
1782 IDENTIFIER_CLASS_VALUE.
1783 (marked_identifiers): New variable.
1784 (push_class_decls): Clear IDENTIFIER_MARKED.
1785 (pop_class_decls): Don't call pop_search_level.
1786 (init_search_processing): Remove.
1788 2004-07-12 Mark Mitchell <mark@codesourcery.com>
1790 * cp-tree.h (get_aggr_typedef): Remove.
1791 * init.c (get_aggr_typedef): Likewise.
1793 * name-lookup.c (push_class_level_binding): Simplify.
1795 2004-07-12 Andrew Pinski <apinski@apple.com>
1799 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
1801 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
1804 2004-07-12 Eric Christopher <echristo@redhat.com>
1806 * parser.c (cp_parser_class_head): Remove unused variable.
1808 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1810 * decl.c (grok_op_properties): Reject [de-]allocation functions
1811 declared in a namespace, or declared as static.
1813 2004-07-12 Nathan Sidwell <nathan@codesourcery.com>
1815 * cp-tree.h (make_binfo): Remove.
1816 * decl.c (xref_basetypes): Use make_tree_binfo directly.
1817 * tree.h (copy_base_binfos): Likewise.
1818 (make_binfo): Remove.
1820 * call.c (build_user_type_conversion_1, build_new_op,
1821 check_constructor_callable, build_temp,
1822 perform_direct_initialization_of_possible): Pass type directly to
1823 lookup_fnfields & build_special_member_call.
1824 (build_special_member_call): Accept a type, and complete it.
1825 * class.c (finish_stuct_bits): Copy the BINFOs here.
1826 * cvt.c (ocp_convert): Pass type directly to
1827 build_special_member_call.
1828 * decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
1829 (xref_basetypes): Allocate the binfo here. Adjust.
1830 * init.c (build_init, build_new_1): Pass type directly to
1831 build_special_member_call.
1832 * lex.c (cxx_make_type): Do not allocate binfo here.
1833 * name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
1834 * parser.c (cp_parser_class_head): Always call xref_basetypes.
1835 * pt.c (instantiate_class_template): Likewise. Inhibit access
1836 checking for template friends.
1837 * ptree.c (cxx_print_type): Adjust record printing.
1838 * search.c (lookup_base): When taking a type, complete it before
1839 looking for a binfo.
1840 (lookup_member): Delay completing a type.
1841 (push_class_decls): Don't walk an incomplete type.
1842 (lookup_conversions): Likewise.
1843 * semantics.c (finish_stmt_expr_expr): Pass type directly to
1844 build_special_member_call.
1845 * tree.c (copy_base_binfos): Adjust.
1846 (make_binfo): Likewise.
1847 * typeck.c (build_modify_expr): Pass type directly to
1848 build_special_member_call.
1849 * typeck2.c (process_init_constructor): Check a binfo exists.
1850 (build_m_component_ref): Allow accessing an incomplete type.
1851 (build_functional_cast): Pass type directly to
1852 build_special_member_call.
1854 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1857 * config-lang.in (gtfiles): Add typeck2.c.
1858 * Make-lang.in: Tweak typeck2.c dependencies, and add rule for
1860 * cp-tree.h: Declare complete_type_check_abstract.
1861 * typeck2.c (pat_calc_hash, pat_compare,
1862 complete_type_check_abstract): New functions.
1863 (abstract_virtuals_error): If the type is abstract, register the
1864 declaration within abstract_pending_vars for further checks.
1865 Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
1866 * decl.c (cp_finish_decl): Do not strip array types.
1867 (create_array_type_for_decl): Check for abstractness of the element
1869 (complete_vars): Call complete_type_check_abstract.
1870 * class.c (finish_struct): Prepare a list of virtual functions for
1871 template types, and call complete_vars on it to check for abstractness.
1873 2004-07-12 Paolo Bonzini <bonzini@gnu.org>
1875 PR tree-optimization/14107
1876 * decl.c (finish_function): Remove temporary band-aid.
1878 2004-07-11 Mark Mitchell <mark@codesourcery.com>
1880 * call.c (build_operator_new_call): Avoid using push_to_top_level.
1881 (build_new_op): Adjust call to lookup_function_nonclass.
1882 * name-lookup.c (identifier_type_value): Adjust call to
1884 (lookup_name_real): Add block_p parameter.
1885 (lookup_name_nonclass): Adjust call to lookup_name_real.
1886 (lookup_function_nonclass): Likewise.
1887 (lookup_name): Likewise.
1888 * name-lookup.h (lookup_name_real): Change prototype.
1889 (lookup_name_nonclass): Likewise.
1890 * parser.c (cp_parser_lookup_name): Likewise.
1892 * cp-tree.h (saved_scope): Make old_bindings a vector.
1893 (unuse_fields): Remove.
1894 * name-lookup.h (cxx_saved_binding): Define it.
1895 * class.c (pushclass): Don't use unuse_fields.
1896 * name-lookup.c (cxx_saved_binding_make): Remove.
1897 (store_binding): Add new bindings to a vector, using an
1898 accumulator style, rather than adding them to a list.
1899 (store_bindings): Adjust accordingly.
1900 (store_class_bindings): Likewise.
1901 (push_to_top_level): Likewise.
1902 (pop_from_top_level): Likewise.
1903 * optimize.c (maybe_clone_body): Must push_to_top_level and
1904 pop_from_top_level calls outside of loop.
1905 * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope
1906 calls here from cp_parser_late_parsing_default_args.
1907 (cp_parser_save_default_args): Record the class type in which the
1908 function is declared.
1909 (cp_parser_late_parsing_default_args): Do not call
1910 push_nested_class/pop_nested_class.
1911 * search.c (dfs_unuse_fields): Remove.
1912 (unuse_fields): Remove.
1914 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
1916 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
1917 LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
1918 * cp-tree.h (poplevel): Declare.
1919 (set_block): Remove.
1920 * decl.c (set_block): Remove.
1922 2004-07-10 Mike Stump <mrs@apple.com>
1924 * decl2.c (import_export_class): Never export/import vtables
1925 with inline key functions.
1927 2004-07-09 Steven Bosscher <stevenb@suse.de>
1929 * typeck.c (c_expand_asm_operands): Remove.
1931 2004-07-09 Mike Stump <mrs@apple.com>
1933 * typeck.c (build_class_member_access_expr): Skip null deref
1934 warning when we don't dereference it.
1936 2004-07-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1940 * class.c (check_field_decls): Improve -Weffc++ warning: do not
1941 warn for pointers to functions/members, or for classes without
1944 2004-07-08 Mark Mitchell <mark@codesourcery.com>
1946 * name-lookup.h (struct cp_binding_level): Update documentation
1949 2004-07-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1952 * typeck.c (check_return_expr): Improve -Weffc++ warning: handle
1953 returning CALL_EXPR, and non-reference return type.
1955 2004-07-08 Nathan Sidwell <nathan@codesourcery.com>
1957 * name-lookup.c (push_binding): Use VEC_reserve.
1959 2004-07-08 Richard Henderson <rth@redhat.com>
1961 * cp-tree.h (expand_eh_spec_block): Remove.
1963 2004-07-07 Mark Mitchell <mark@codesourcery.com>
1965 * cp-tree.h (saved_scope): Remove x_previous_class_type and
1966 x_previous_class_values; add x_previous_class_level.
1967 (previous_class_type): Remove.
1968 (previous_class_values): Remove.
1969 (previous_class_level): New macro.
1970 * class.c (pushclass): Restore the identifier cache more
1972 (invalidate_class_lookup_cache): Use vector for class_shadowed and
1973 previous_class_values.
1974 * decl.c (poplevel): Likewise.
1975 * name-lookup.c (cxx_binding_init): New function.
1976 (cxx_binding_make): Use it.
1977 (push_binding): For a binding in a class level, use a vector of
1978 cp_class_binding nodes.
1979 (push_binding_level): New function.
1980 (begin_scope): Use it.
1981 (leave_scope): Do not put class binding levels on the free list.
1982 (print_binding_level): Adjust for the fact that class_shadowed is
1984 (poplevel_class): Likewise.
1985 (clear_identifier_class_values): Likewise.
1986 (push_class_level_binding): Likewise.
1987 (set_class_shadows): Remove.
1988 (store_binding): New function.
1989 (store_class_bindings): New function.
1990 (push_to_top_level): Use store_class_bindings as appropriate.
1991 (pop_from_top_level): Use previous_class_level, not
1992 previous_class_type.
1993 * name-lookup.h (cp_class_binding): New type.
1994 (cp_binding_level): Use a vector object for class_shadowed.
1995 (push_binding_level): Declare.
1996 (set_class_shadows): Remove.
1998 2004-07-07 Andrew Pinski <apinski@apple.com>
2000 * class.c (instantiate_type): BUFFER_REF is dead.
2001 * lex.c (init_operators): IN_EXPR is dead.
2003 2004-07-07 Jason Merrill <jason@redhat.com>
2006 * call.c (build_new_op): Give overload warnings for built-in
2009 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
2012 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
2015 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
2017 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
2018 * class.c (build_primary_vtable, check_bases,
2019 determine_primary_base, finish_struct_bits,
2020 maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
2021 get_basefndecls, warn_hidden, walk_subobject_offsets,
2022 build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
2023 layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
2024 finish_struct_1, get_vfield_name, contains_empty_class_p,
2025 dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
2026 dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
2027 add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
2029 * decl.c (xref_basetypes): Likewise.
2030 * dump.c (cp_dump_tree): Likewise.
2031 * error.c (dump_expr): Likewise.
2032 * init.c (sort_mem_initializers, expand_member_init,
2033 push_base_cleanups): Likewise.
2034 * method.c (do_build_copy_constructor, do_build_assign_reg,
2035 synthesize_exception_spec): Likewise.
2036 * name-lookup.c (arg_assoc_class): Likewise.
2037 * pt.c (instantiate_class_template, tsubst,
2038 get_template_base_recursive): Likewise.
2039 * ptree.c (cxx_print_type): Likewise.
2040 * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
2041 * search.c (lookup_base_r, dynamic_cast_base_recurse,
2042 dfs_access_in_type, access_in_type, lookup_field_queue_p,
2043 bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
2044 marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
2045 dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
2046 binfo_for_vtable, copied_binfo, original_binfo): Likewise
2047 * tree.c (copy_base_binfos, make_binfo): Likewise.
2048 * typeck.c (commmon_base_type): Likewise
2049 * typeck2.c (process_init_constructor): Likewise
2051 2004-07-06 Joseph S. Myers <jsm@polyomino.org.uk>
2053 * decl.c (check_tag_decl): Name redeclared type in diagnostic.
2055 2004-07-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2058 * pt.c (convert_nontype_argument): Disallow conversions between
2059 different enumeration types.
2061 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
2063 * cp-tree.h (BINFO_MARKED): Remove.
2064 (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
2065 BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
2066 BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
2067 (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
2068 * class.c (build_base_path): Use BINFO_VIRTUAL_P.
2069 (mark_primary_bases, determine_primary_base, base_derived_from,
2070 dfs_find_final_overrider, dfs_find_final_overrider_q,
2071 dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
2072 dfs_modify_vtables, walk_subobject_offsets,
2073 layout_nonempty_base_or_field, build_base_field,
2074 build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
2075 end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
2076 finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
2077 build_ctor_vtbl_group, accumulate_vtble_inits,
2078 dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
2079 build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
2080 add_vcall_offset_vtbl_entries_1): Likewise.
2081 * decl.c (xref_basetypes): Incomming virtual base indicated by
2083 * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
2084 * init.c (finish_init_stmts, sort_mem_initializers,
2085 emit_mem_initializers, build_vtble_address, expand_member_init,
2086 push_base_cleanups): Likewise.
2087 * method.c (do_build_copy_constructor): Likewise.
2088 * pt.c (instantiate_class_template,
2089 get_template_base_recursive): Likewise.
2090 * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
2091 get_pseudo_ti_desc): Likewise.
2092 * search.c (lookup_base_r, dynamic_cast_base_recurse,
2093 binfo_from_vbase, binfo_via_virtual, copied_binfo,
2094 original_binfo): Likewise.
2095 * semantics.c (finish_base_specifier): Virtualness is indicated
2097 * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
2099 2004-07-06 Mark Mitchell <mark@codesourcery.com>
2102 2004-06-24 Jason Merrill <jason@redhat.com>
2104 * decl.c (grokparms): Give the PARM_DECL reference type if the
2105 parameter is passed by invisible reference.
2107 2004-07-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2109 * cp-lang.c (cp_var_mod_type_p): Add extra arg.
2110 * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
2111 * pt.c (check_instantiated_args, unify): Likewise.
2113 2004-07-05 Phil Edwards <phil@codesourcery.com>
2115 * Make-lang.in (check-c++, lang_checks): Add some comments.
2117 2004-07-05 Zack Weinberg <zack@codesourcery.com>
2119 * cp-mudflap.c: Delete file.
2120 * Makefile.in: Remove all references to cp-mudflap.o.
2122 2004-07-05 Zack Weinberg <zack@codesourcery.com>
2124 * decl.c (cxx_init_decl_processing): Call
2125 build_common_tree_nodes before creating the global NAMESPACE_DECL.
2127 2004-07-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2130 * call.c (build_operator_new_call): Look only at global scope.
2132 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
2134 * call.c (enforce_access): Expect TREE_BINFO.
2135 * class.c (binfo_ctor_vtable): Check TREE_BINFO.
2136 * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
2137 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
2139 (BINFO_LANG_ELTS): Remove.
2140 (BINFO_LANG_SLOTS): New.
2141 (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
2142 (CLASSTYPE_TEMPLATE_INFO): Adjust.
2143 * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
2144 * search.c (lookup_member): Check TREE_BINFO.
2145 * semantics.c (perform_or_defer_access_check): Likewise.
2146 (check_accessibility_of_qualified_id): Check
2147 deferred_access_no_check.
2148 * tree.c (make_binfo): Use make_tree_binfo.
2150 2004-07-04 Mark Mitchell <mark@codesourcery.com>
2152 * method.c (implicitly_declare_fn): Set linkage of generated
2155 2004-07-04 Richard Henderson <rth@redhat.com>
2157 * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
2159 2004-07-03 Scott Brumbaugh <scottb.lists@verizon.net>
2162 * name-lookup.c (push_class_level_binding): Don't pass a
2163 TREE_LIST of ambiguous names to check_template_shadow as it
2164 only handles declarations. Instead, pull the declaration
2167 2004-07-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2170 * pt.c (check_explicit_specialization): Clarify error message.
2172 2004-07-02 Richard Henderson <rth@redhat.com>
2174 * tree.c (cp_unsave_r): Update remap_save_expr call.
2176 2004-07-02 Mark Mitchell <mark@codesourcery.com>
2179 * mangle.c (write_template_arg): Correct mangling.
2182 * decl.c (grokdeclarator): Robustify.
2184 2004-07-01 Richard Henderson <rth@redhat.com>
2186 * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
2187 * method.c (synthesize_method): Don't clear_last_expr.
2188 * name-lookup.c (maybe_push_cleanup_level): Likewise.
2190 2004-07-01 Nick Clifton <nickc@redhat.com>
2192 * decl2.c (import_export_class): Invoke the
2193 import_export_class field in the gcc_target structure if it is not
2196 2004-06-30 Richard Henderson (rth@redhat.com>
2198 * decl.c (start_preparsed_function): Don't set immediate_size_expand.
2199 * method.c (use_thunk): Likewise.
2201 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
2203 * call.c (build_over_call), typeck.c (build_function_call): Call
2204 check_function_arguments instead of check_function_format.
2206 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
2208 * call.c (build_over_call), typeck.c (build_function_call): Update
2209 calls to check_function_format.
2211 2004-06-30 Richard Henderson <rth@redhat.com>
2213 * call.c (build_over_call): Use __builtin_memcpy for copying
2214 CLASS_AS_BASE rather than funny casting.
2216 2004-06-30 Richard Henderson <rth@redhat.com>
2218 * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
2219 TYPE_SIZE_UNIT of full_type.
2221 2004-06-30 Per Bothner <per@bothner.com>
2223 Conditionally compile support for --enable-mapped_location.
2224 * decl.c (pop_label): Handle (imperfectly) USE_MAPPED_LOCATION case.
2225 * decl2.c: If USE_MAPPED_LOCATION, don't do some line number
2226 adjustments - which I don't understand.
2227 * error.c (dump_decl): Rename "<interrnal>" to "<built-in>".
2228 * error.c: Use LOCATION_FILE and EXPR_LOCATION macros.
2229 (print_instantiation_partial_context): Use expand_location.
2230 * decl.c (duplicate_decl): Use new DECL_IS_BUILTIN macro.
2231 * name-lookup.c: Likewise.
2232 * lex.c (cxx_init): Likewise. Also use BUILTINS_LOCATION.
2233 * name-lookup.c: Use input_line macro.
2234 * parser.c (cp_lexer_get_preprocessor_token): Use UNKNOWN_LOCATION.
2235 (cp_parser_statement): Rename locaal variable statement_locus to
2236 statement_location and use SET_EXPR_LOCATION macro.
2237 * pt.c: Handle USE_MAPPED_LOCATION case. Use new macros.
2238 * tree.c (cp_walk_subtrees): Likewise.
2240 2004-06-29 Per Bothner <per@bothner.com>
2242 * tree.c (build_min_nt, build_min, build_min_non_dep):
2243 Don't set TREE_COMPLEXITY from input_line.
2245 2004-06-29 Paul Brook <paul@codesourcery.com>
2247 * init.c: Include target.h.
2248 (get_cookie_size): Remove and replace with target hook.
2250 (build_new_1): Store the element size in the cookie.
2252 2004-06-29 Nathan Sidwell <nathan@codesourcery.com>
2255 * parser.c (cp_parser_template_declaration_after_export): Disable
2256 access checks here ...
2257 (cp_parser_class_specifier): ... not here.
2259 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
2261 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
2262 VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
2263 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
2266 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
2268 * cp-tree.h (struct deferred_access): Move to ...
2269 * semantics.c (struct deferred_access): ... here. Adjust.
2270 (deferred_access_stack): Make a VEC(deferred_access),
2271 (deferred_access_free_list): Remove.
2272 (deferred_access_no_check): New.
2273 (push_deferring_access_checks, resume_deferring_access_checks,
2274 stop_deferring_access_checks, pop_deferring_access_checks,
2275 get_deferred_access_checks, pop_to_parent_deferring_access_checks,
2276 perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
2278 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
2281 * call.c (build_temp): Declare.
2282 (check_constructor_callable): New.
2283 (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
2284 CONSTRUCTOR_CALLABLE.
2285 (convert_like_real, initialize_reference): Use
2286 check_constructor_callable.
2287 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
2288 (LOOKUP_*): Renumber.
2290 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
2292 * friend.c (add_friend): Only perform access checks when context
2294 * lex.c (cxx_make_type): Only create a binfo for aggregate types.
2295 * parser.c (cp_parser_class_specifier): Disable access checks here
2296 when parsing the body of a templated class.
2297 * semantics.c (perform_or_defer_access_checks): Reorder to allow
2298 NULL binfos when not checking access.
2300 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
2302 Use vector API for vbase list.
2303 * cp-tree.h: Include vec.h
2304 (DEF_VEC_P (tree)): New type.
2305 (struct lang_type_class): Change vbase's member type.
2306 (binfo_for_vbase): Declare.
2307 * class.c (determine_primary_base, base_derived_from,
2308 update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
2309 warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
2310 build_vtbl_initializer): Adjust.
2311 * decl.c (xref_basetypes): Adjust, accumulate upper bound of
2313 * init.c (sort_mem_initializers, expand_member_init,
2314 push_base_cleanups): Adjust.
2315 * method.c (do_build_copy_constructor): Adjust.
2316 * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
2317 (binfo_for_vbase): New.
2318 * tree.c (copy_base_binfos): Adjust.
2320 2004-06-28 Mark Mitchell <mark@codesourcery.com>
2322 * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
2324 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
2327 * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
2328 paranthesis in case of pointers to array members.
2329 * error.c (dump_type_prefix): Likewise.
2330 (dump_type_suffix): Maybe issue a whitespace when printing
2333 2004-06-27 Mark Mitchell <mark@codesourcery.com>
2336 * parser.c (cp_parser_set_decl_spec_type): Refine test for
2337 redefinition of built-in types.
2339 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
2341 * error.c (pp_template_argument_list_start): Remove.
2342 (pp_template_argument_list_end): Likewise.
2343 (pp_separate_with_comma): Use pp_cxx_separate_with.
2344 (reinit_global_formatting_buffer): Remove.
2345 (pp_non_consecutive_character): Likewise.
2346 (dump_scope): Use pp_cxx_colon_colon.
2347 (dump_template_parameter): Use pp_cxx_identifier,
2348 pp_cxx_tree_identifier and pp_cxx_whitespace.
2349 (dump_templat_bindings): Replace use of pp_string with sequence
2350 of pp_cxx_whitespace and pp_equal.
2351 (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
2352 pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set
2354 (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
2355 (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace,
2356 pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
2357 (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
2358 pp_cxx_right_bracket, pp_cxx_identifier throughout,
2359 (dump_decl): Likewise.
2360 (dump_template_decl): Likewise.
2361 (dump_function_decl): Likewise. Set padding as appropriate.
2362 (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
2364 (dump_exception_spec): Likewise.
2365 (dump_function_name): Use pp_cxx_tree_identifier and
2367 (dump_template_parms): Use pp_cxx_begin_template_argument_list and
2368 pp_cxx_end_template_argument_list.
2369 (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
2370 pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
2371 pp_cxx_whitespace throughout.
2372 (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
2374 (dump_unary_op): Likewise.
2375 (reinit_cxx_pp): New function.
2376 (type_as_string); Use it.
2377 (expr_as_string): Likewise.
2378 (decl_as_string); Likewise.
2379 (context_as_string): Likewise.
2380 (lang_decl_name): Likewise.
2381 (decl_to_string): Likewise.
2382 (expr_to_string): Likewise.
2383 (parm_to_string): Likewise.
2384 (type_to_string): Likewise.
2385 (args_to_string): Likewise.
2386 (cv_to_string): Likewise.
2388 2004-06-26 Mark Mitchell <mark@codesourcery.com>
2390 * cp-tree.h (cp_cv_quals): New type.
2391 (cp_declarator): Use it instead of "tree" as appropriate.
2392 (grok_method_quals): Adjust prototype.
2393 (grokclassfn): Likewise.
2394 (do_friend): Likewise.
2395 * decl.c (grokfndecl): Use cp_cv_quals, not tree.
2396 (grokdeclarator): Likewise.
2397 * decl2.c (grok_method_quals): Likewise.
2398 (grokclassfn): Likewise.
2399 * friend.c (do_friend): Likewise.
2400 * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
2401 * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
2402 (make_pointer_declarator): Likewise.
2403 (make_reference_declarator): Likewise.
2404 (make_ptrmem_declarator): Likewise.
2405 (cp_parser_ptr_operator): Likewise.
2406 (cp_parser_cv_qualifier_seq_opt): Likewise.
2407 (cp_parser_cv_qualifier_opt): Remove.
2408 (cp_parser_new_declarator_opt): Adjust call to
2409 cp_parser_ptr_operator.
2410 (cp_parser_conversion_declaration_opt): Likewise.
2411 (cp_parser_declarator): Use cp_cv_quals, not tree.
2412 (cp_parser_direct_declarator): Likewise.
2414 2004-06-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2416 * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
2417 Rename DECL_STMT to DECL_EXPR.
2418 * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
2419 * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
2420 * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
2422 2004-06-26 Jan Hubicka <jh@suse.cz>
2425 * decl2.c (maybe_emit_vtables): Always import_export_vtable for the
2426 reachability analysis.
2428 2004-06-25 Mark Mitchell <mark@codesourcery.com>
2430 * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
2433 2004-06-25 Paul Brook <paul@codesourcery.com>
2435 * decl2.c (get_guard): Call targetm.cxx.guard_type.
2436 (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
2438 2004-06-24 Mark Mitchell <mark@codesourcery.com>
2440 * decl.c (grokdeclarator): Restore error messages about __thread.
2441 * parser.c (cp_parser_decl_specifier_seq): Likewise.
2443 2004-06-24 Jason Merrill <jason@redhat.com>
2446 * decl.c (grokparms): Give the PARM_DECL reference type if the
2447 parameter is passed by invisible reference.
2449 2004-06-24 Andreas Schwab <schwab@suse.de>
2451 * cp-tree.h (enum cp_storage_class): Remove trailing comma.
2453 2004-06-23 Mark Mitchell <mark@codesourcery.com>
2455 * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
2456 (cp/decl.o): Likewise.
2457 (cp/decl2.o): Likewise.
2458 (cp/pt.o): Likewise.
2459 (cp/semantics.o): Likewise.
2460 * config-lang.in (gtfiles): Do not reference cp/lex.h.
2461 * class.c: Do not include lex.h.
2462 (add_implicitly_declared_members): Do not use
2463 adding_implicit_members.
2464 (check_bases_and_members): Do not talk about grok_x_components.
2465 * cp/cp-tree.h (adding_implicit_members): Remove.
2466 (cp_storage_class): New type.
2467 (cp_decl_spec): Likewise.
2468 (cp_decl_specifier_seq): Likewise.
2469 (cp_parameter_declarator): Use it for the decl_specifiers field.
2470 (check_tag_decl): Adjust prototype.
2471 (shadow_tag): Likewise.
2472 (groktypename): Likewise.
2473 (start_decl): Likewise.
2474 (start_function): Likewise.
2475 (start_method): Likewise.
2476 (grok_x_components): Remove.
2477 (grokfield): Adjust prototype.
2478 (grokbitfield): Likewise.
2479 (finish_member_class_template): Remove.
2480 * decl.c: Do not include lex.h.
2481 (adding_implicit_members): Do not define.
2482 (check_tag_decl): Do not use trees to represent decl-specifiers.
2483 (shadow_tag): Likewise.
2484 (groktypename): Likewise.
2485 (start_decl): Likewise.
2486 (grokvardecl): Likewise.
2487 (grokdeclarator): Likewise.
2488 (grokparms): Likewise.
2489 (start_function): Likewise.
2490 (start_method): Likewise.
2491 * decl.h (grokdeclarator): Adjust prototype.
2492 * decl2.c: Do not include lex.h.
2493 (grok_x_components): Remove.
2494 (grokfield): Do not use trees to represent decl-specifiers.
2495 (grokbitfield): Likewise.
2496 * lex.c: Do not include lex.h.
2498 * parser.c: Include target.h.
2499 (clear_decl_specs): New function.
2500 (cp_parser_translation_unit): Do not use trees to represent
2502 (cp_parser_postfix_expression): Likewise.
2503 (cp_parser_new_type_id): Likewise.
2504 (cp_parser_condition): Likewise.
2505 (cp_parser_simple_declaration): Likewise.
2506 (cp_parser_decl_specifier_seq): Likewise.
2507 (cp_parser_function_specifier_opt): Likewise.
2508 (cp_parser_conversion_type_id): Likewise.
2509 (cp_parser_template_parameter): Likewise.
2510 (cp_parser_explicit_instantiation): Likewise.
2511 (cp_parser_type_specifier): Likewise.
2512 (cp_parser_simple_type_specifier): Likewise.
2513 (cp_parser_init_declarator): Likewise.
2514 (cp_parser_type_id): Likewise.
2515 (cp_parser_type_specifier_seq): Likewise.
2516 (cp_parser_parameter_declaration): Likewise.
2517 (cp_parser_member_declaration): Likewise.
2518 (cp_parser_exception_declaration): Likewise.
2519 (cp_parser_function_definition_from_specifiers_and_declarator):
2521 (cp_parser_single_declaration): Likewise.
2522 (cp_parser_save_member_function_body): Likewise.
2523 (cp_parser_friend_p): Likewise.
2524 (cp_parser_set_storage_class): New function.
2525 (cp_parser_set_decl_spec_type): Likewise.
2526 * pt.c: Do not include lex.h.
2527 * semantics.c: Likewise.
2528 (finish_member_class_template): Remove.
2530 2004-06-23 Roger Sayle <roger@eyesopen.com>
2532 * call.c (build_cxx_call): Don't call expand_tree_builtin. No
2533 longer take both "args" and "convert_args" as arguments.
2534 (build_op_delete_call): Update call to build_cxx_call.
2535 (build_over_call): Likewise, update call to build_cxx_call.
2536 * cp-tree.h (build_cxx_call): Update funtion prototype.
2537 * typeck.c (build_function_call): Don't call expand_tree_builtin.
2538 * rtti.c (throw_bad_cast): Update call to build_cxx_call.
2539 (throw_bad_typeid): Likewise.
2540 (build_dynamic_cast_1): Likewise.
2542 2004-06-22 Richard Henderson <rth@redhat.com>
2544 * class.c (build_vfn_ref): Take a pointer not object. Build
2546 (cp_fold_obj_type_ref): New.
2547 * call.c (build_over_call): Update build_vfn_ref call.
2548 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
2549 * cp-tree.h (cp_fold_obj_type_ref): Declare.
2551 2004-06-21 Jason Merrill <jason@redhat.com>
2554 * cp-gimplify.c (cp_gimplify_init_expr): Look through
2557 2004-06-21 Mark Mitchell <mark@codesourcery.com>
2559 * cp-tree.def (NEW_EXPR): Add a fourth slot.
2560 * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
2561 (TREE_PARMLIST): Likewise.
2562 (CALL_DECLARATOR_PARMS): Likewise.
2563 (CALL_DECLARATOR_QUALS): Likewise.
2564 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
2565 (cp_declarator_kind): New type.
2566 (cp_parameter_declarator): Likewise.
2567 (cp_declarator): Likewise.
2568 (cp_error_declarator): Likewise.
2569 (no_parameters): Likewise.
2570 (groktypename): Change prototype.
2571 (start_decl): Likewise.
2572 (start_handler_parms): Likewise.
2573 (get_scope_of_declarator): Likewise.
2574 (start_function): Likewise.
2575 (start_preparsed_function): New function.
2576 (start_function): Change prototype.
2577 (start_method): Likewise.
2578 (grokfield): Likewise.
2579 (grokbitfield): Likewise.
2580 (build_new): Likewise.
2581 (make_pointer_declarator): Remove.
2582 (make_reference_declarator): Likewise.
2583 (make_call_declarator): Likewise.
2584 (set_quals_and_spec): Likewise.
2585 (process_template_parm): Change prototype.
2586 (begin_function_definition): Remove.
2587 (finish_parmlist): Remove.
2588 * decl.c (groktypename): Do not use trees to represent
2590 (start_decl): Likewise.
2591 (start_handler_parms): Remove.
2592 (get_scope_of_declarator): Reimplement.
2593 (grokdeclarator): Do not use trees to represent declarators.
2594 (grokparms): Likewise.
2595 (start_function): Likewise.
2596 (start_method): Likewise.
2597 (build_void_list_mode): Do not use TREE_PARMLIST.
2598 * decl.h (grokdeclarator): Change prototype.
2599 * decl2.c (grok_method_quals): Robustify.
2600 (grok_x_components): Do not use trees to represent declarators.
2601 (grokfield): Likewise.
2602 (grokbitfield): Likewise.
2603 (start_objects): Build FUNCTION_DECLs, not declarators.
2604 (start_static_storage_duration_function): Likewise.
2605 * init.c (build_new): Simplify.
2606 * lex.c (make_pointer_declarator): Remove.
2607 (make_reference_declarator): Likewise.
2608 (make_call_declarator): Likewise.
2609 (set_quals_and_spec): Likewise.
2610 * method.c (use_thunk): Use start_preparsed_function.
2611 (synthesize_method): Likewise.
2612 (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
2613 * optimize.c (maybe_clone_body): Use start_preparsed_function.
2614 * parser.c (cp_error_declarator): New variable.
2615 (declarator_obstack): Likewise.
2616 (alloc_declarator): New function.
2617 (make_declarator): Likewise.
2618 (make_id_declarator): Likewise.
2619 (make_pointer_declarator): Likewise.
2620 (make_reference_declarator): Likewise.
2621 (make_ptrmem_declarator): Likewise.
2622 (make_call_declarator): Likewise.
2623 (make_array_declarator): Likewise.
2624 (no_parameters): New variable.
2625 (make_parameter_declarator): Likewise.
2626 (cp_parser_check_for_definition_in_return_type): Do not use trees
2627 to represent declarators.
2628 (cp_parser_translation_unit): Likewise.
2629 (cp_parser_new_expression): Likewise.
2630 (cp_parser_new_type_id): Likewise.
2631 (cp_parser_new_declarator_opt): Likewise.
2632 (cp_parser_direct_new_declarator): Likewise.
2633 (cp_parser_condition): Likewise.
2634 (cp_parser_declaration_statement): Likewise.
2635 (cp_parser_declaration): Likewise.
2636 (cp_parser_conversion_type_id): Likewise.
2637 (cp_parser_conversion_declarator_opt): Likewise.
2638 (cp_parser_template_parameter_list): Likewise.
2639 (cp_parser_template_parameter): Likewise.
2640 (cp_parser_explicit_instantiation): Likewise.
2641 (cp_parser_init_declarator): Likewise.
2642 (cp_parser_declarator): Likewise.
2643 (cp_parser_direct_declarator): Likewise.
2644 (cp_parser_type_id): Likewise.
2645 (cp_parser_parameter_declaration_clause): Likewise.
2646 (cp_parser_parameter_declaration_list): Likewise.
2647 (cp_parser_parameter_declaration): Likewise.
2648 (cp_parser_member_declaration): Likewise.
2649 (cp_parser_exception_declaration): Likewise.
2650 (cp_parser_check_declarator_template_parameters): Likewise.
2651 (cp_parser_function_definition_from_specifiers_and_declarator):
2653 (cp_parser_save_member_function_body): Likewise.
2654 * pt.c (process_template_parm): Add is_non_type parameter.
2655 (convert_template_argument): Adjust call to groktypename.
2656 (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
2657 (tsubst): Do not expect declarators.
2658 (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
2660 (instantiate_decl): Use start_preparsed_function.
2661 * semantics.c (begin_function_definition): Remove.
2662 (finish_parmlist): Remove.
2663 * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
2666 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2668 * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
2669 (build_new_method_call): Likewise.
2670 * decl.c (local_variable_p_walkfn): Don't walk into types.
2671 * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
2672 (build_anon_union_vars): Add new operand for COMPONENT_REF.
2673 * init.c (buld_new): Add new operand for ARRAY_REF.
2674 * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
2675 (do_build_assign_ref): Likewise.
2676 * parser.c (cp_parser_direct_new_declarator): Add new operands
2678 (cp_parser_direct_declarator): Likewise.
2679 * pt.c (tsubst): Likewise.
2680 (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
2682 * semantics.c (finish_non_static_data_member): Add new operand
2684 * typeck.c (build_class_member_access_expr): Likewise.
2685 (build_class_member_access_expr, finish_class_member_access_expr):
2687 (build_ptrmemfunc_access_expr): Likewise.
2688 (build_array_ref): Add new operands for ARRAY_REF.
2689 * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
2690 * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
2692 2004-06-21 Richard Henderson <rth@redhat.com>
2694 * dump.c (cp_dump_tree): Don't use dump_next_stmt.
2695 * parser.c (cp_parser_jump_statement): Update commentary.
2696 * pt.c (tsubst_expr): Use RETURN_EXPR.
2697 * semantics.c (finish_return_stmt): Likewise.
2698 (finalize_nrv_r): Likewise.
2699 * typeck.c, typeck2.c: Update file start commentary.
2701 2004-06-21 Richard Henderson <rth@redhat.com>
2703 * semantics.c (finish_expr_stmt): Call verify_sequence_points.
2705 2004-06-20 Richard Henderson <rth@redhat.com>
2707 * cp-tree.h (add_decl_stmt): Declare.
2708 * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
2709 * semantics.c (maybe_cleanup_point_expr): New.
2710 (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
2711 finish_for_expr, finish_switch_cond): Use it.
2712 (finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN.
2714 2004-06-20 Richard Henderson <rth@redhat.com>
2716 * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
2717 * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
2718 (cp_gimplify_expr): Call it.
2719 (gimplify_cleanup_stmt): Move from c-gimplify.c.
2720 (cp_genericize): New.
2721 * decl.c (finish_function): Call it.
2722 * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
2723 (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
2724 (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
2725 (cp_genericize): Declare.
2726 * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
2727 * dump.c (cp_dump_tree): Likewise.
2728 * semantics.c (push_cleanup): Move from c-semantics.c.
2730 2004-06-20 Zack Weinberg <zack@codesourcery.com>
2732 * cp-lang.c (has_c_linkage): Implement.
2734 * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
2735 * decl.c (duplicate_decls): Use COPY_DECL_RTL.
2736 (builtin_function_1): Don't call make_decl_rtl.
2737 (build_cp_library_fn): Don't call set_mangled_name_for_decl.
2738 (grokvardecl): Don't call mangle_decl.
2739 * except.c (nothrow_libfn_p): Look at DECL_NAME, not
2740 DECL_ASSEMBLER_NAME.
2741 * method.c (set_mangled_name_for_decl): Delete.
2742 * name-lookup.c (pushdecl): When a local extern shadows a
2743 file-scope declaration of the same object, give both DECLs the
2745 * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
2746 on DECL_ASSEMBLER_NAME.
2748 2004-06-19 Richard Henderson <rth@redhat.com>
2750 * cp-gimplify.c: Remove unnecessary prototypes.
2751 (cp_gimplify_stmt): Merge into ...
2752 (cp_gimplify_expr): ... here. Move to end of file. Handle
2753 stmts_are_full_exprs_p frobbing.
2754 * cp-tree.h (cp_gimplify_stmt): Remove.
2755 * pt.c (tsubst_expr): Merge prep_stmt and unify.
2756 * tree.c (init_tree): Don't set lang_gimplify_stmt.
2758 2004-06-18 Richard Henderson <rth@redhat.com>
2761 * semantics.c (begin_cond): New.
2762 (finish_cond): Rewrite to handle template DECL_STMTs specially.
2763 Assume that non-template decls go land before the conditional.
2764 (simplify_loop_decl_cond): Likewise.
2765 (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
2766 finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
2767 begin_switch_stmt, finish_switch_cond): Update to match.
2769 2004-06-17 Jason Merrill <jason@redhat.com>
2772 * semantics.c (simplify_aggr_init_expr): Don't return the slot.
2773 (finish_stmt_expr_expr): Update type after conversions.
2774 (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
2775 Handle void initializer.
2776 * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
2778 2004-06-17 Geoffrey Keating <geoffk@apple.com>
2780 * class.c (build_clone): Don't call defer_fn, let mark_used do it.
2781 * cp-tree.h (defer_fn): Delete.
2782 * decl2.c (defer_fn): Delete.
2783 (finish_file): Simplify deferred_fns loops; check that
2784 only used inline functions get into deferred_fns.
2785 (mark_used): Inline previous contents of defer_fn.
2787 2004-06-16 Richard Henderson <rth@redhat.com>
2789 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
2790 (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
2791 * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
2792 of CTOR_INITIALIZER ...
2793 (pp_cxx_statement): ... here.
2794 * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
2795 (finish_function): Use alloc_stmt_list to zap entire function.
2796 * parser.c (cp_parser_compound_statement): Update commentary.
2797 * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
2798 * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
2799 (finish_stmt_expr): Don't look through COMPOUND_STMT.
2801 2004-06-16 Geoffrey Keating <geoffk@apple.com>
2803 * pt.c (mark_decl_instantiated): Don't call defer_fn.
2805 2004-06-16 Richard Henderson <rth@redhat.com>
2807 * parser.c (cp_parser_labeled_statement): Update commentary.
2808 * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
2809 * tree.c (mark_local_for_remap_r): Likewise.
2811 2004-06-16 Richard Henderson <rth@redhat.com>
2813 * parser.c (cp_parser_asm_definition): Update commentary.
2814 * pt.c (tsubst_expr): Use ASM_EXPR.
2815 * semantics.c (finish_asm_stmt): Likewise.
2817 2004-06-16 Richard Henderson <rth@redhat.com>
2819 * decl.c (finish_destructor_body): Use LABEL_EXPR.
2820 * parser.c (cp_parser_statement): Update commentary.
2821 * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
2822 * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
2823 * tree.c (mark_local_for_remap_r): Likewise.
2825 2004-06-16 Richard Henderson <rth@redhat.com>
2828 * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
2829 statement in FOR_INIT_STMT for templates.
2831 2004-06-15 Richard Henderson <rth@redhat.com>
2833 * call.c (initialize_reference): Don't build CLEANUP_STMT here.
2834 * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
2835 (genericize_try_block): Use gimplify_stmt.
2836 (genericize_catch_block, genericize_eh_spec_block): Likewise.
2837 (cp_gimplify_init_expr): Remove STMT_EXPR special case.
2838 (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
2839 * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
2840 (cp_tree_chain_matters_p): Remove.
2841 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
2842 (COMPOUND_STMT_BODY_BLOCK): New.
2843 (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
2844 (EXPR_STMT_STMT_EXPR_RESULT): New.
2845 (building_stmt_tree): Check cur_stmt_list.
2846 (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
2847 (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
2848 * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
2849 (cp_finish_decl): Use push_cleanup.
2850 (start_function, finish_function): Use statement lists.
2851 (finish_stmt): Do nothing.
2852 * except.c (begin_eh_spec_block): Use statement lists.
2853 (check_handlers_1, check_handlers): Likewise.
2854 * init.c (construct_virtual_base): Don't add extra compound stmts.
2855 (build_vec_init): Likewise.
2856 * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
2857 * name-lookup.h (struct cp_binding_level): Add statement_list.
2858 * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
2859 (cp_parser_labeled_statement, cp_parser_expression_statement,
2860 cp_parser_statement_seq_opt): Likewise.
2861 (cp_parser_compound_statement): Likewise. Take bool for try block.
2862 (cp_parser_selection_statement): Tidy if processing.
2863 (cp_parser_already_scoped_statement): Rewrite to do what it says.
2864 * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
2865 (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST.
2866 Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
2867 * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
2868 (finish_cond): New, rewritten from FINISH_COND.
2869 (simplify_loop_decl_cond): New.
2870 (finish_expr_stmt): Avoid nested EXPR_STMTs.
2871 (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
2872 begin_else_clause, finish_else_clause, finish_if_stmt,
2873 begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
2874 begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
2875 finish_for_cond, finish_for_stmt, begin_switch_stmt,
2876 finish_switch_cond, finish_switch_stmt, begin_try_block,
2877 finish_try_block, finish_cleanup_try_block, finish_function_try_block,
2878 finish_handler_sequence, finish_function_handler_sequence,
2879 begin_handler, finish_handler_parms, finish_handler,
2880 begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
2881 using statement lists.
2882 (begin_compound_stmt): Replace has_no_scope argument with flags.
2883 Update all callers. Use statement lists.
2884 (finish_compound_stmt): Likewise.
2885 (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
2886 (current_scope_stmt_stack): Remove.
2887 (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
2888 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
2889 Rewrite with statement lists.
2891 2004-06-15 Alexandre Oliva <aoliva@redhat.com>
2893 * parser.c: Change all assignments of c_lex_string_translate
2894 to true and false to 1 and 0.
2895 (cp_lexer_read_token): Convert type of the translated string.
2896 (cp_parser_skip_to_closing_parentheses): Preserve original
2897 value of c_lex_string_translate, and set it to -1 while
2899 (cp_parser_cache_group): Likewise.
2900 (cp_parser_cache_group_1): Renamed.
2901 (cp_parser_asm_operand_list): Remove redundant setting of
2902 c_lex_string_translate.
2903 (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
2904 Handle chained strings.
2906 2004-06-12 Andrew Pinski <apinski@apple.com>
2910 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
2912 * cp-tree.h: Fix typo.
2914 * cp-tree.h: Include cgraph.h
2915 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
2916 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
2918 2004-06-12 Jason Merrill <jason@redhat.com>
2920 PR tree-optimization/14107
2921 * decl.c (finish_function): Warn about no return in all functions.
2923 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
2925 * cp-tree.h (struct language_function): Remove cannot_inline.
2926 * decl.c (save_function_data): cannot_inline is no more.
2927 (cxx_push_function_context): Likewise.
2928 * decl2.c (start_objects, start_static_storage_duration_function):
2929 Reset DECL_INLINE, set DECL_UNINLINABLE.
2931 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2934 * search.c (lookup_field): Propagate the ambiguity list.
2935 (lookup_fnfields): Likewise.
2937 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2940 * parser.c (cp_parser_template_name): Ctors/dtors never need a
2941 template keyword to disambiguate.
2943 2004-06-14 Mark Mitchell <mark@codesourcery.com>
2946 * decl.c (grokdeclarator): Ignore pointer-to-members when
2947 computing template depth.
2950 * name-lookup.c (pushtag): Do not try to put class declarations in
2951 explicit specialization scopes.
2953 2004-06-11 Andrew Pinski <pinskia@physics.uc.edu>
2955 * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
2957 2004-06-11 Mark Mitchell <mark@codesourcery.com>
2960 * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
2961 bindings for undeclared built-ins.
2963 2004-06-11 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2965 * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
2966 appear at the correct location.
2968 2004-06-10 Jason Merrill <jason@redhat.com>
2972 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2973 * init.c (build_offset_ref): Build SCOPE_REF with non-null
2974 TREE_TYPE for non-dependent names.
2975 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
2976 unknown_type_node as its TREE_TYPE.
2977 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
2978 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
2979 (dump_expr) <SCOPE_REF case>: Likewise.
2981 2004-06-10 Mark Mitchell <mark@codesourcery.com>
2984 * parser.c (cp_parser_direct_declarator): Robustify.
2987 * pt.c (tsubst_copy): Use decl_constant_value on enumeration
2988 constants in non-dependent contexts.
2992 * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
2995 2004-06-10 Jakub Jelinek <jakub@redhat.com>
2998 * decl.c (duplicate_decls): Handle fileptr_type_node arguments
3001 2004-06-09 Mark Mitchell <mark@codesourcery.com>
3005 2004-06-07 Mark Mitchell <mark@codesourcery.com>
3006 * lex.c (handle_pragma_interface): Deprecate.
3007 (handle_pragma_implementation): Likewise.
3009 2004-06-09 Andrew Pinski <pinskia@physics.uc.edu>
3011 * g++spec.c (lang_specific_driver): Remove check for -lm
3012 and -lmath when check it see if it was the math library.
3014 2004-06-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3017 * parser.c (cp_parser_direct_declarator): Reject constructor named
3018 as qualified template-id.
3020 2004-06-07 Mark Mitchell <mark@codesourcery.com>
3023 * lex.c (handle_pragma_interface): Deprecate.
3024 (handle_pragma_implementation): Likewise.
3026 2004-06-07 Mark Mitchell <mark@codesourcery.com>
3029 * parser.c (cp_parser_iteration_statement): Fix typo in error
3033 * pt.c (tsubst_default_argument): Do not defer access checks
3034 while substituting into the default argument.
3037 * pt.c (tsubst_copy): Do not try to substitute for an enumeration
3038 constant in a non-dependent context.
3041 * except.c (build_throw): Ensure that temp_expr has been
3044 2004-06-06 Roger Sayle <roger@eyesopen.com>
3046 * cp/cp-tree.h (lvalue_or_else): Add function prototype.
3048 2004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3051 * parser.c (cp_parser_mem_initializer_id): Gracefully reject
3052 'typename', and accept 'template'.
3054 2004-06-03 Andrew Pinski <pinskia@physics.uc.edu>
3055 Jan Hubicka <jh@suse.cz>
3058 * method.c (use_think): Do not mark thunk as referenced.
3060 2004-06-03 Matt Austern <austern@apple.com>
3063 * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
3064 is nonzero, and if we see a noninline definition of a key method,
3065 make the vtables nonweak.
3067 2004-06-02 Matt Austern <austern@apple.com>
3069 * cp-tree.h (instantiate_decl): new boolean parameter,
3070 undefined_ok. Current behavior is equivalent to its being 0.
3071 * decl2.c (mark_used): Add new argument when calling instantiate_decl
3072 * pt.c (mark_decl_instantiated): Unconditionally make
3073 instantiations explicit unconditionally
3074 (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
3075 since mark_decl_instantiated now does it.
3076 (instantiate_class_member): New. Instantiate a member of an
3077 explicitly instantiated class template.
3078 (do_type_instantiation): Explicitly instantiate members of an
3079 explicitly instantiated class template.
3080 (instantiate_decl): if undefined_ok is nonzero, and if we're
3081 trying to explicitly instantiated a template with no definition,
3082 change it to an implicit instantiation.
3083 (instantiate_pending_templates): Add new argument to instantiate_decl.
3084 * tree.c (cp_cannot_inline_tree_fn): Likewise.
3086 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
3088 * cp-tree.h: Fix typo.
3090 * cp-tree.h: Include cgraph.h
3091 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
3092 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
3094 2004-06-01 Jason Merrill <jason@redhat.com>
3097 * call.c (call_builtin_trap): Remove type parm.
3098 (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
3099 (build_x_va_arg): Dereference a null pointer for a non-POD argument.
3101 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3104 * init.c (build_offset_ref): Build SCOPE_REF with non-null
3105 TREE_TYPE for non-dependent names.
3106 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
3107 unknown_type_node as its TREE_TYPE.
3108 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
3109 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
3110 (dump_expr) <SCOPE_REF case>: Likewise.
3112 2004-06-01 Richard Henderson <rth@redhat.com>
3113 Andrew Pinski <pinskia@physics.uc.edu>
3115 * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
3116 * parser.c (struct cp_parser): Remove in_offsetof.
3117 (cp_parser_new): Don't set it.
3118 (cp_parser_unary_expression): Don't check it.
3119 (cp_parser_postfix_open_square_expression): Split out from ...
3120 (cp_parser_postfix_expression): ... here.
3121 (cp_parser_postfix_dot_deref_expression): Likewise.
3122 (cp_parser_builtin_offsetof): New.
3123 (cp_parser_primary_expression): Use it.
3125 2004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3128 * parser.c (cp_parser_postfix_expression): Allow subscript
3129 operator in offsetof.
3131 2004-05-31 Mark Mitchell <mark@codesourcery.com>
3134 * friend.c (add_friend): Do not try to perform access checks for
3135 functions from dependent classes.
3137 2004-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
3139 * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
3140 (pp_cxx_begin_template_argument_list): Turn into a function.
3141 (pp_cxx_end_template_argument_list): Likewise.
3142 (pp_cxx_separate_with): Define.
3143 (pp_cxx_unqualified_id): Tidy.
3144 (pp_cxx_primary_expression): Likewise.
3145 (pp_cxx_postfix_expression): Likewise.
3146 (pp_cxx_expression): Likewise.
3147 (pp_cxx_simple_type_specifier): Likewise.
3148 (pp_cxx_type_specifier_seq): Likewise.
3149 (pp_cxx_parameter_declaration_clause): Likewise.
3150 (pp_cxx_exception_specification): Likewise.
3151 (pp_cxx_direct_declarator): Likewise.
3152 (pp_cxx_type_id): Likewise.
3153 * cxx-pretty-print.h (pp_cxx_whitespace): Export from
3155 (pp_cxx_left_paren): Likewise.
3156 (pp_cxx_right_paren): Likewise.
3157 (pp_cxx_left_brace): Likewise.
3158 (pp_cxx_right_brace): Likewise.
3159 (pp_cxx_left_bracket): Likewise.
3160 (pp_cxx_right_bracket): Likewise.
3161 (pp_cxx_dot): Likewise.
3162 (pp_cxx_identifier): Likewise.
3163 (pp_cxx_tree_identifier): Likewise.
3164 (pp_cxx_ampersand): New macro.
3165 (pp_cxx_star): Likewise.
3166 (pp_cxx_arrow): Likewise.
3167 (pp_cxx_semicolon): Likewise.
3168 (pp_cxx_complement): Likewise.
3169 (pp_cxx_begin_template_argument_list): Declaree.
3170 (pp_cxx_end_template_argument_list): Likewise.
3171 (pp_cxx_colon_colon): likewise.
3173 2004-05-31 Eric Botcazou <ebotcazou@libertysurf.fr>
3175 * parser.c (cp_parser_simple_type_specifier): Explicitly test
3178 2004-05-31 Kazu Hirata <kazu@cs.umass.edu>
3180 * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
3181 typeck.c: Fix comment formatting.
3183 2004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
3185 * cp-lang.c (cp_expand_decl): Remove.
3186 (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
3188 2004-05-30 Andreas Jaeger <aj@suse.de>
3190 * lang-specs.h: Add missing initializers for .ii.
3192 2004-05-28 Aldy Hernandez <aldyh@redhat.com>
3194 * decl.c (cp_make_fname_decl): Free return value from
3197 2004-05-28 Mark Mitchell <mark@codesourcery.com>
3200 * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
3202 * init.c (build_new): Likewise.
3205 * name-lookup.c (arg_assoc): Robustify.
3208 * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
3209 when determining the scope to use for a pointer to member.
3210 (lookup_anon_field): Give it external linkage.
3211 * cp-tree.h (lookup_anon_field): Declare it.
3212 * expr.c (cplus_expand_constant): Use it.
3214 2004-05-28 Mark Mitchell <mark@codesourcery.com>
3217 * parser.c (cp_parser_simple_type_specifier): Call
3218 maybe_note_name_used_in_class.
3220 2004-05-28 Tom Marshall <tmarshall@real.com>
3223 * class.c (finish_struct_1): Warn only if the dtor is non-private or
3224 the class has friends.
3226 2004-05-27 Adam Nemet <anemet@lnxw.com>
3229 * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
3230 TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
3232 2004-05-24 Geoffrey Keating <geoffk@apple.com>
3234 * method.c (implicitly_declare_fn): Don't call defer_fn; abort
3235 if it might be needed.
3236 * pt.c (mark_decl_instantiated): Only call defer_fn if
3237 the function actually needs processing in finish_file.
3238 * decl2.c (finish_file): Add check that elements in
3239 deferred_fns_used are really needed there. Remove unnecessary
3240 test of DECL_SAVED_TREE.
3242 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
3244 * Make-lang.in: No need to specify $(LIBCPP).
3246 2004-05-23 Mark Mitchell <mark@codesourcery.com>
3249 * parser.c (cp_parser_class_head): Robustify.
3252 * parser.c (cp_parser_decl_specifier_seq): Correct error in
3254 (cp_parser_constructor_declarator_p): Treat attributes
3258 * typeck.c (build_unary_op): Do not attempt to resolve casts to
3259 base classes in templates.
3261 2004-05-23 Mark Mitchell <mark@codesourcery.com>
3264 * pt.c (instantiate_template): Robustify.
3266 2004-05-23 Mark Mitchell <mark@codesourcery.com>
3269 * decl.c (xref_tag): Issue errors about redeclaring template
3270 classes as non-template classes.
3272 2004-05-23 Mark Mitchell <mark@codesourcery.com>
3275 * name-lookup.c (supplement_binding): Allow redefinitions of
3279 * parser.c (cp_parser_template_argument): Robustify.
3281 2004-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
3283 * class.c (alter_access): Use %E format specifier to print an
3284 identifier node. Avoid looking at the IDENTIFIER_POINTER.
3285 (push_lang_context): Likewise.
3286 * decl.c (lookup_label): Likewise.
3287 (grokdeclarator): Likewise.
3288 * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
3289 * pt.c (do_type_instantiation): Likewise.
3290 * tree.c (handle_java_interface_attribute): Likewise.
3291 (handle_com_interface_attribute): Likewise.
3292 (handle_init_priority_attribute): Likewise.
3294 2004-05-22 Mark Mitchell <mark@codesourcery.com>
3298 * pt.c (build_non_dependent_expr): Expand the set of tree nodes
3299 recognized as overloaded functions.
3301 2004-05-22 Mark Mitchell <mark@codesourcery.com>
3304 * class.c (layout_nonempty_base_or_field): Do not try to avoid
3305 layout conflicts for unions.
3308 * typeck.c (build_x_unary_op): Instantiate template class
3309 specializations before looking for "operator &".
3312 * typeck.c (complete_type): Layout non-dependent array types, even
3316 * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
3319 2004-05-22 Roger Sayle <roger@eyesopen.com>
3321 * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
3322 returning when TREE_TYPE is error_mark_node.
3323 * typeck.c (require_complete_type): Return error_mark_node if
3324 value's type is an error_mark_node.
3326 2004-05-20 Andrew Pinski <pinskia@physics.uc.edu>
3328 * optimize.c (calls_setjmp_r): Remove.
3329 (calls_setjmp_p): Remove.
3330 * cp-tree.c (calls_setjmp_p): Remove.
3331 * decl.c (finish_function): Do not call calls_setjmp_p.
3333 2004-05-18 Zack Weinberg <zack@codesourcery.com>
3335 * decl.c (cp_finish_decl): Use mark_decl_referenced.
3336 * decl2.c (maybe_make_one_only): Likewise.
3337 * method.c (use_thunk): Likewise.
3339 2004-05-18 Jason Merrill <jason@redhat.com>
3341 * class.c (build_base_path): Tidy a bit.
3343 2004-05-14 Geoffrey Keating <geoffk@apple.com>
3345 * name-lookup.c (struct scope_binding): New.
3346 (EMPTY_SCOPE_BINDING): New.
3347 (lookup_using_namespace): Take a scope_binding instead of a
3349 (qualified_lookup_using_namespace): Likewise.
3350 (cxx_binding_clear): Delete.
3351 (do_nonmember_using_decl): Use a scope_binding instead of a
3353 (lookup_tag): Don't call select_decl.
3354 (ambiguous_decl): Don't return anything (and change callers to match).
3355 Take a scope_binding as the second parameter.
3356 (lookup_namespace_name): Use a scope_binding instead of a
3358 (unqualified_namespace_lookup): Likewise.
3359 (lookup_qualified_name): Likewise.
3360 (select_decl): Take a scope_binding instead of a cxx_binding.
3361 Use macros rather than hand-coding tests for type-ness.
3363 2004-05-13 Diego Novillo <dnovillo@redhat.com>
3365 * cp-gimplify.c: Rename from cp-simplify.c.
3366 * Make-lang.in, optimize.c: Update.
3368 2004-05-13 Diego Novillo <dnovillo@redhat.com>
3370 Merge from tree-ssa-20020619-branch. See
3371 ChangeLog.tree-ssa for details.
3373 * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
3374 cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
3375 expr.c, init.c, name-lookup.h, optimize.c, parser.c,
3376 pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
3378 * cp-mudflap.c: New file.
3379 * cp-simplify.c:: New file.
3381 2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3384 * decl2.c (check_classfn): For member templates, compare also the
3385 template parameters to match the declaration.
3386 * cp-tree.h: Adjust declaration of check_classfn.
3387 * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
3388 * friend.c (do_friend): Likewise.
3389 * pt.c (tsubst_friend_function): Likewise.
3391 2004-05-01 Zack Weinberg <zack@codesourcery.com>
3393 * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
3394 Instead, dig into the representation type to find the array bound.
3396 2004-04-30 Jason Merrill <jason@redhat.com>
3398 Refer to base members using COMPONENT_REFs where possible.
3399 * class.c (build_simple_base_path): New fn.
3400 (build_base_path): Use it for non-virtual base references.
3401 (layout_class_type): Change base fields to their real type
3402 after layout is done.
3403 * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
3404 * cp-lang.c (cxx_get_alias_set): Use it.
3406 2004-04-30 Kazu Hirata <kazu@cs.umass.edu>
3408 * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
3411 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3414 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
3415 used in integral constant expressions.
3417 2004-04-22 Mark Mitchell <mark@codesourcery.com>
3419 * init.c (build_aggr_init): Fix accidental use of C99 construct in
3422 * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
3424 * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
3425 * decl.c (reshape_init): Use it.
3426 * init.c (perform_member_init): Remove redundant condition.
3427 (build_aggr_init): Adjust to handle brace-enclosed initializers
3429 (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
3431 * parser.c (cp_parser_initializer_clause): Do not set
3432 TREE_HAS_CONSTRUCTOR on the initializer.
3433 * rtti.c (tinfo_base_init): Likewise.
3434 (generic_initializer): Likewise.
3435 (ptr_initializer): Likewise.
3436 (ptm_initializer): Likewise.
3437 (class_initializer): Likewise.
3438 (get_pseudo_ti_init): Likewise.
3439 * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
3441 2004-04-22 Alan Modra <amodra@bigpond.net.au>
3443 * name-lookup.c (anonymous_namespace_name): Make static.
3445 2004-04-19 Roger Sayle <roger@eyesopen.com>
3448 * class.c (build_base_path): Call fold whilst building the NULL
3449 pointer check expression trees.
3451 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
3453 * init.c (build_new_1): Don't use type size argument for Java
3454 _Jv_AllocObject call.
3456 2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
3458 * method.c (make_alias_for_thunk): Remove preprocessor guard on
3459 declaration and definition.
3461 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
3464 * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
3465 than ASM_OUTPUT_DEF.
3467 2004-04-08 Jakub Jelinek <jakub@redhat.com>
3469 * decl2.c (mark_used): Don't segfault if cfun != NULL but
3470 current_function_decl == NULL.
3472 2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
3475 * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
3478 2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3480 * init.c (decl_constant_value): Don't look at DECL_INITIAL
3482 * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
3483 or TREE_SIDE_EFFECTS of a type.
3485 2004-04-02 Nathan Sidwell <nathan@codesourcery.com>
3488 * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
3489 cv-qualifier unification.
3490 * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
3492 2004-04-02 Jan Hubicka <jh@suse.cz>
3494 * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
3495 * cp-tree.h (cp_update_decl_after_saving): Declare.
3496 * tree.c (cp_update_decl_after_saving): Define.
3498 2004-04-01 Mark Mitchell <mark@codesourcery.com>
3501 * typeck.c (get_delta_difference): Call fold before returning the
3504 2004-04-01 Richard Henderson <rth@redhat.com>
3507 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
3508 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
3510 2004-04-01 Mark Mitchell <mark@codesourcery.com>
3513 * name-lookup.c (maybe_push_cleanup_level): Robustify.
3515 2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3517 * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
3519 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3521 * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
3522 * class.c (check_bitfield_decl): Likewise.
3523 * cvt.c (type_promotes_to): Likewise.
3524 * decl.c (finish_enum): Likewise.
3525 * mangle.c (write_builtin_type): Likewise.
3526 * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
3527 * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
3528 (build_binary_op): Likewise.
3530 2004-03-31 Jan Hubicka <jh@suse.cz>
3532 * tree.h (optimize_function): Kill prototype.
3533 * optimize.c (dump_function, optimize_function, dump_finction): Kill.
3534 * semantics.c (expand_body): Kill.
3536 2004-03-30 Mark Mitchell <mark@codesourcery.com>
3539 * decl.c (start_decl_1): Do not decide whether or not to create a
3540 new cleanup level until after the type has been completed.
3543 * pt.c (tsubst_default_argument): Clear current_function_decl.
3545 2004-03-30 Zack Weinberg <zack@codesourcery.com>
3547 * name-lookup.c, parser.c: Use new shorter form of GTY markers.
3549 2004-03-29 Zack Weinberg <zack@codesourcery.com>
3551 * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
3552 is null, just print the literal name and return.
3554 2004-03-25 Kazu Hirata <kazu@cs.umass.edu>
3556 * cxx-pretty-print.c: Fix comment typos.
3558 2004-03-24 Kazu Hirata <kazu@cs.umass.edu>
3560 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
3563 2004-03-23 Ziemowit Laski <zlaski@apple.com>
3565 * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
3566 * mangle.c (write_type): Add call to 'mangle_fundamental_type'
3569 2004-03-23 Zack Weinberg <zack@codesourcery.com>
3571 PR 12267, 12391, 12560, 13129, 14114, 14133
3572 * cp-lang.c (c_reset_state): Delete.
3573 (push_file_scope, pop_file_scope): New stubs.
3574 * parser.c (c_parse_file): Call sorry() here if called more than once.
3576 2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3578 * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
3581 2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
3583 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
3585 2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
3587 * error.c (enum pad): Remove.
3588 (dump_qualifiers): Likewise.
3589 (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
3590 (dump_aggr_type): Likewise.
3591 (dump_type_suffix): Likewise.
3592 (dump_simple_decl): Likewise.
3593 (dump_function_decl): Likewise.
3594 (cv_to_string): Likewise.
3595 (dump_type_prefix): Likewise. Adjust return void.
3596 * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
3598 (pp_cxx_template_keyword_if_needed): Document.
3599 (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
3600 (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
3601 MUST_NOT_THROW_EXPR.
3603 2004-03-21 Mark Mitchell <mark@codesourcery.com>
3606 * decl.c (cp_finish_decl): Compute the size of arrays declared in
3607 templates, if their type is non-dependent.
3609 2004-03-19 Mark Mitchell <mark@codesourcery.com>
3611 * call.c (build_op_delete_call): Do not forget the placement
3612 arguments when iterating through mutiple delete operators.
3614 * cp-tree.h (svaed_scope): Remove last_parms.
3615 (NEW_DELETE_OPNAME_P): New macro.
3616 (last_function_parms): Remove.
3617 (do_friend): Adjust prototype.
3618 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
3619 using last_function_parms.
3620 (grokfndecl): Take the PARM_DECLs as an argument, rather than
3621 using last_function_parms.
3622 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
3623 for class-specific operator new and operator delete.
3624 (grok_op_properties): Do not look for allocation functions with
3626 (start_function): Use DECL_ARGUMENTS instead of
3627 last_function_parms.
3628 * decl.h (last_function_parms): Do not declare.
3629 * decl2.c (grokclassfn): Do not use last_function_parms.
3630 * friend.c (do_friend): Remove parmdecls parameter.
3631 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
3632 (pop_from_top_level): Do not restore it.
3633 * pt.c (check_explicit_specialization): Do not adjust
3634 last_function_parms.
3636 * name-lookup.c (do_local_using_decl): Create a local binding for
3637 types brought in via using declarations.
3639 * name-lookup.c (lookup_arg_dependent): Handle block-scope
3640 function declarations correctly.
3642 * semantics.c (finish_id_expression): Correct handling of
3643 conversion operators to dependent types.
3645 * typeck.c (lookup_destructor): Allow the use of destructors from
3648 2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3650 * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
3651 TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
3652 * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
3653 the field is named TEMPLATE_TYPE_PARM_INDEX.
3655 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3658 * parser.c (cp_parser_functional_cast): A cast to anything
3659 but integral or enumaration type is not an integral constant
3661 * pt.c (value_dependent_expression_p): Handle cast expressions
3662 without operands (such as "int()").
3664 2004-03-18 Mark Mitchell <mark@codesourcery.com>
3666 * semantics.c (finish_pseudo_destructor_expr): Allow differing
3667 cv-qualification between the type named by the
3668 pseudo-destructor-name and the object-type.
3670 * search.c (accessible_base_p): Handle non-proper bases.
3672 * name-lookup.c (do_nonmember_using_decl): If a using declaration
3673 refers to a single overloaded function, set the type of the
3675 * tree.c (lvalue_type): Simplify.
3676 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
3678 (build_unary_op): Handle OVERLOADs with known types.
3680 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
3683 * parser.c (cp_parser_postfix_expression): Handle the use of
3684 "typename" in non-dependent contexts. Convert appropriately when
3685 when using a qualified name after "->" or ".".
3687 * call.c (conditional_conversion): Honor the requirement that some
3688 conversions refer to the original object.
3690 2004-03-18 Mark Mitchell <mark@codesourcery.com>
3692 * call.c (build_conditional_expr): Do not call force_rvalue for
3693 operands of void_type when the conditional expression itself has
3695 * name-lookup.c (pushdecl): Don't consider a declaration of a
3696 function named "main" to be an overload of a type named "main".
3697 * parser.c (cp_parser_template_name): Perform name lookup when the
3698 template name is proceeded by "template" if the qualifying scope
3700 * typeck.c (composite_pointer_type_r): Correctly handle
3701 pointer-to-member types.
3702 (build_const_cast): Likewise.
3704 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3706 * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
3707 * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
3708 (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
3709 (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
3710 (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
3711 (TYPEOF_TYPE_EXPR): New macro.
3712 * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
3713 * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
3714 * pt.c (tsubst): Likewise.
3715 * semantics.c (finish_typeof): Likewise.
3716 * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
3717 and TEMPLATE_TYPE_PARM.
3718 * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
3719 (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
3721 2004-03-16 Mark Mitchell <mark@codesourcery.com>
3724 * cp-tree.h (build_new_op): Change prototype.
3725 (build_x_binary_op): Likewise.
3726 * call.c (build_new_op): Add overloaded_p parameter.
3727 * decl2.c (grok_array_decl): Adjust call to build_new_op.
3728 * parser.c (cp_parser_binary_expression): Note that uses of
3729 overloaded operators prevents an expression from being considered
3730 an integral constant.
3731 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
3733 * semantics.c (finish_call_expr): Likewise.
3734 * typeck.c (rationalize_conditional_expr): Likewise.
3735 (build_x_indirect_ref): Likewise.
3736 (build_x_binary_op): Likewise.
3737 (build_x_unary_op): Likewise.
3738 (build_x_compound_expr): Likewise.
3739 (build_modify_expr): Likewise.
3740 * typeck2.c (build_x_arrow): Likewise.
3742 2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
3744 * cp-lang.c, ptree.c: Update copyright.
3746 2004-03-13 Mark Mitchell <mark@codesourcery.com>
3749 * parser.c (cp_parser_non_integral_constant_expression): Encode
3750 more of the idiom that surrounded calls to this function within
3752 (cp_parser_primary_expression): Adjust accordingly.
3753 (cp_parser_postfix_expression): Likewise.
3754 (cp_parser_unary_expression): Likewise.
3755 (cp_parser_cast_expression): Likewise.
3756 (cp_parser_assignment_expression): Likewise.
3757 (cp_parser_expression): Likewise.
3758 (cp_parser_new_expression): Note that new-expressions are not
3759 allowed in integral constant expressions.
3760 (cp_parser_delete_expression): Likewise.
3762 2004-03-12 Matt Austern <austern@apple.com>
3764 * decl2.c (maybe_make_one_only): Look at
3765 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
3766 to make an explicit instantiation weak.
3767 * method.c (use_thunk): Make sure we call comdat_linkage
3769 * pt.c (do_type_instantiation): On systems where weak symbols
3770 don't go in a static archive's TOC, explicit instantiation of a
3771 class must imply *explicit* instantiation of its memeber.
3773 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
3775 * call.c, cp-tree.h, pt.c: Fix comment typos.
3777 2004-03-10 Mark Mitchell <mark@codesourcery.com>
3780 * decl.c (xref_tag): Disregard non-type declarations when
3781 looking up a tagged type.
3783 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
3786 * call.c (convert_like_real): Build a const qualified temporary,
3787 when testing ctor access.
3789 2004-03-09 Mark Mitchell <mark@codesourcery.com>
3791 * call.c (initialize_reference): Fix typo.
3793 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3796 * pt.c (determine_specialization): For member templates, match also
3800 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
3802 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
3804 2004-03-09 Mark Mitchell <mark@codesourcery.com>
3807 * call.c (initialize_reference): Handle initializers that are
3808 class-member access expressions applies to rvalues.
3810 2004-03-09 Mark Mitchell <mark@codesourcery.com>
3813 * name-lookup.c (supplement_binding): Ignore functions that are
3814 marked DECL_ANTICIPATED.
3816 2004-03-08 Mark Mitchell <mark@codesourcery.com>
3819 * class.c (check_field_decls): Complain about non-static data
3820 members of reference type in unions. Propagate
3821 CLASSTYPE_REF_FIELDS_NEED_INIT and
3822 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
3824 * init.c (perform_member_init): Complain about mbmers with const
3825 type that are not explicitly initialized.
3827 2004-03-08 Mark Mitchell <mark@codesourcery.com>
3829 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
3830 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
3831 (lang_identifier): Remove implicit_decl and error_locus.
3832 (IDENTIFIER_IMPLICIT_DECL): Remove.
3833 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
3834 (IDENTIFIER_ERROR_LOCUS): Likewise.
3835 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
3836 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
3837 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
3838 (implicitly_declare): Remove.
3839 * decl.c (warn_extern_redeclared_static): Remove check of
3840 IDENTIFIER_IMPLICIT_DECL.
3841 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
3842 (implicitly_declare): Remove.
3843 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
3844 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
3845 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
3846 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
3847 in the innermost scope, rather than at namespace scope.
3848 * name-lookup.c (push_local_binding): Give it external linkage.
3849 (pushdecl): Remove dead code.
3850 * name-lookup.h (push_local_binding): Declare it.
3851 * ptree.c (cxx_print_identifier): Don't print
3852 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
3853 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
3854 not IDENTIFIER_ERROR_LOCUS.
3855 * typeck.c (build_function_call): Remove dead code.
3857 2004-03-08 Jason Merrill <jason@redhat.com>
3860 * decl.c (xref_tag): Remove attribute handling.
3861 * cp-tree.h: Adjust prototype.
3862 * decl.c, parser.c, rtti.c: Adjust callers.
3863 * parser.c (cp_parser_class_head): Pass back attributes in the
3865 (cp_parser_class_specifier): Adjust.
3867 2004-03-08 Matt Austern <austern@apple.com>
3870 * name-lookup.c (add_decl_to_level): Add extern variables, as well
3871 as static, to static_decls array.
3873 2004-03-05 Jason Merrill <jason@redhat.com>
3875 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
3877 2004-03-04 Geoffrey Keating <geoffk@apple.com>
3879 * decl.c (grokfndecl): Update old incorrect comment.
3880 (grokvardecl): Diagnose C++ variables of type with no linkage.
3882 2004-03-01 Mark Mitchell <mark@codesourcery.com>
3885 * pt.c (build_non_dependent_expr): Do not create a
3886 NON_DEPENDENT_EXPR for a THROW_EXPR.
3888 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
3891 * error.c (dump_expr): Handle THROW_EXPR.
3893 2004-03-01 Mark Mitchell <mark@codesourcery.com>
3896 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
3897 lookup if ordinary name-lookup finds a non-function.
3898 * pt.c (tsubst_copy_and_build): Likewise.
3901 * parser.c (cp_parser_late_parsing_default_args): Check that there
3902 are no extra tokens after the end of the default-argument
3905 2004-03-01 Mark Mitchell <mark@codesourcery.com>
3908 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
3909 having C++ linkage for name-mangling purposes.
3912 * parser.c (cp_parser_direct_declarator): Recognize constructor
3913 declarators that use a template-id to name the class being
3917 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
3918 (tsubst_expr): Do not call tsubst_copy, even when
3919 processing_template_decl.
3921 2004-03-01 Jeff Law <law@redhat.com>
3923 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
3926 2004-02-29 Mark Mitchell <mark@codesourcery.com>
3929 * name-lookup.h (push_scope): Change prototype.
3930 * name-lookup.c (push_scope): Do not reenter the current class
3932 * decl.c (grokfndecl): Check return code from push_scope before
3934 * decl2.c (check_classfn): Likewise.
3935 * parser.c (cp_parser_conversion_function_id): Likewise.
3936 (cp_parser_init_declarator): Likewise.
3937 (cp_parser_direct_declarator): Likewise.
3938 (cp_parser_class_specifier): Likewise.
3939 (cp_parser_class_head): Likewise.
3940 (cp_parser_lookup_name): Likewise.
3941 (cp_parser_constructor_declarator_p): Likewise.
3942 * pt.c (instantiate_class_template): Likewise.
3943 (resolve_typename_type): Likewise.
3945 2004-02-29 Mark Mitchell <mark@codesourcery.com>
3948 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
3952 * class.c (update_vtable_entry_for_fn): Do not go through
3953 covariance machinery if the type returned by an overrider is the
3954 same as the original.
3956 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
3958 * call.c: Fix a comment typo.
3960 2004-02-27 Ziemowit Laski <zlaski@apple.com>
3962 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
3964 2004-02-26 Mark Mitchell <mark@codesourcery.com>
3967 * parser.c (cp_parser_parameter_declaration_list): Commit
3968 to fewer tentative parses.
3970 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3973 * pt.c (dependent_type_p_r): A template template parameter is a
3976 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3979 * mangle.c (write_template_arg_literal): Don't rely on identity for
3982 2004-02-24 Jason Merrill <jason@redhat.com>
3984 * tree.c (build_exception_variant): Use check_qualified_type.
3986 2004-02-23 Zack Weinberg <zack@codesourcery.com>
3987 Kazu Hirata <kazu@cs.umass.edu>
3989 * decl.c (cxx_init_decl_processing): Don't check
3990 flag_writable_strings.
3992 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
3995 * typeck.c (maybe_warn_about_returning_address_of_location):
3996 Change check for VAR_DECL to use DECL_P instead.
3998 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4001 * cvt.c (build_expr_type_conversion): Type must be complete before
4002 looking up for conversions.
4004 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4007 * name-lookup.c (arg_assoc_class): Don't look into template
4008 arguments if it is not a primary template.
4010 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
4013 * method.c (use_thunk): Always clone function argument tree.
4015 2004-02-20 Mark Mitchell <mark@codesourcery.com>
4018 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
4021 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
4022 for all type variants.
4024 2004-02-19 Mark Mitchell <mark@codesourcery.com>
4027 * decl.c (duplicate_decls): Return error_mark_node for invalid
4029 * name-lookup.c (push_namespace): Ignore the return value from
4031 * pt.c (push_template_decl_real): Robustify.
4034 * name-lookup.c (push_class_level_binding): Do not complain about
4035 adding a binding for a member whose name is the same as the
4036 enclosing class if the member is located in a base class of the
4039 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4042 * parser.c (cp_parser_new_expression): Parse an ill-formed
4043 direct-new-declarator after a parenthesized type-id to emit good
4046 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
4048 * cp-tree.def, cvt.c: Update copyright.
4050 2004-02-17 Mark Mitchell <mark@codesourcery.com>
4053 * cp-tree.h (abi_version_at_least): Remove.
4054 * mangle.c: Include flags.h.
4056 2004-02-15 Mark Mitchell <mark@codesourcery.com>
4059 * call.c (build_conditional_expr): Handle conversions between
4060 class types which result in differently cv-qualified type
4064 * class.c (delete_duplicate_fields_1): Remove.
4065 (delete_duplicate_fields): Likewise.
4066 (finish_struct_anon): Remove check for members with the same name
4067 as their enclosing class.
4068 (check_field_decls): Do not call duplicate_fields.
4069 * decl.c (grokdeclarator): Remove check for static data members
4070 with the same name as their enclosing class.
4071 * name-lookup.c (push_class_level_binding): Check for members with
4072 the same name as their enclosing class.
4074 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
4077 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
4079 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4082 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
4083 has full set of arguments.
4085 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4088 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
4090 2004-02-13 Mark Mitchell <mark@codesourcery.com>
4093 * cp-tree.h (delete_sanity): Change prototype.
4094 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
4095 Remove dead code. Adjust code to warn about deleting an array.
4096 * typekc.c (decay_conversion): Use build_address and build_nop.
4099 * search.c (accessible_p): Do not check access in thunks.
4102 * call.c (build_conditional_expr): Call force_rvalue on the
4103 non-void operand in the case that one result is a throw-expression
4104 and the other is not.
4106 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
4109 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
4110 the type name and look ahead for ::~, and bail out early with a
4111 better error message if the parse is going to fail.
4113 2004-02-12 Mark Mitchell <mark@codesourcery.com>
4115 * call.c (conversion_kind): New type.
4116 (conversion_rank): Likewise.
4117 (conversion): Likewise.
4118 (CONVERSION_RANK): New macro.
4119 (conversion_obstack): New variable.
4120 (obstack_initialized): Likewise.
4121 (z_candidate): Change type of convs and second_conv.
4122 (candidate_warning): New type.
4123 (IDENTITY_RANK): Remove.
4124 (EXACT_RANK): Likewise.
4125 (PROMO_RANK): Likewise.
4126 (STD_RANK): Likewise.
4127 (PBOOL_RANK): Likewise.
4128 (USER_RANK): Likewise.
4129 (ELLIPSIS_RANK): Likewise.
4130 (BAD_RANK): Likewise.
4131 (ICS_RANK): Likewise.
4132 (ICS_STD_RANK): Likewise.
4133 (ICS_USER_FLAG): Likewise.
4134 (ICS_ELLIPSIS_FLAG): Likewise.
4135 (ICS_THIS_FLAG): Likewise.
4136 (ICS_BAD_FLAG): Likewise.
4137 (NEED_TEMPORARY_P): Likewise.
4138 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
4139 (USER_CONV_CAND): Likewise.
4140 (USER_CONV_FN): Likewise.
4141 (conversion_obstack_alloc): New function.
4142 (alloc_conversion): Likewise.
4143 (validate_conversion_obstack): Likewise.
4144 (alloc_conversions): Likewise.
4145 (build_conv): Adjust to deal with new conversion data structures.
4146 (build_identity_conv): New function.
4147 (build_ambiguous_conv): Likewise.
4148 (standard_conversion): Adjust to deal with new conversion data
4150 (convert_class_to_reference): Likewise.
4151 (direct_reference_binding): Likewise.
4152 (reference_binding): Likewise.
4153 (implicit_conversion): Likewise.
4154 (add_candidate): Likewise.
4155 (add_function_candidate): Likewise.
4156 (add_conv_candidate): Likewise.
4157 (build_builtin_candidate): Likewise.
4158 (print_z_candidate): Likewise.
4159 (merge_conversion_sequences): Likewise.
4160 (build_user_type_conversion_1): Likewise.
4161 (build_user_type_conversion): Likewise.
4162 (build_new_function_call): Likewise.
4163 (build_object_call): Likewise.
4164 (conditional_conversion): Likewise.
4165 (build_conditional_expr): Likewise.
4166 (build_new_op): Likewise.
4167 (build_op_delete_call): Likewise.
4168 (convert_like_real): Likewise.
4169 (build_over_call): Likewise.
4170 (build_new_method_call): Likewise.
4171 (is_subseq): Likewise.
4172 (maybe_handle_implicit_object): Likewise.
4173 (maybe_handle_ref_bind): Likewise.
4174 (compare_ics): Likewise.
4175 (source_type): Likewise.
4176 (add_warning): Likewise.
4178 (can_convert_arg): Likewise.
4179 (can_convert_arg_bad): Likewise.
4180 (perform_implicit_conversion): Likewise.
4181 (perform_direct_initialization_if_possible): Likewise.
4182 (initialize_reference): Likewise.
4183 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
4184 * cp-tree.def (WRAPPER): Likewise.
4185 (IDENTITY_CONV): Remove.
4186 (LVALUE_CONV): Likewise.
4187 (QUAL_CONV): Likewise.
4188 (STD_CONV): Likewise.
4189 (PTR_CONV): Likewise.
4190 (PMEM_CONV): Likewise.
4191 (BASE_CONV): Likewise.
4192 (REF_BIND): Likewise.
4193 (USER_CONV): Likewise.
4194 (AMBIG_CONV): Likewise.
4195 (RVALUE_CONV): Likewise.
4196 * cp-tree.h (tree_wrapper): Remove.
4197 (WRAPPER_ZC): Remove.
4198 (lang_tree_node): Remove wrapper.
4199 (LOOKUP_SPECULATIVELY): Remove.
4200 (build_op_delete_call): Adjust prototype.
4201 (validate_conversion_obstack): Declare.
4202 (build_zc_wrapper): Remove.
4203 * cvt.c (convert_to_reference): Remove dead code.
4204 (ocp_convert): Likewise.
4205 * decl.c (redeclaration_error_message): Correct handling of
4207 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
4208 (cp_tree_node_structure): Remove WRAPPER case.
4209 * decl2.c (finish_file): Call validate_conversion_obstack.
4210 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
4211 (build_op_delete_call): Likewise.
4212 (build_x_delete): Likewise.
4213 (build_delete): Adjust call to build_op_delete_call.
4214 * pt.c (tsubst_friend_declaration): Adjust code to determine
4215 whether or not a friend template is a definition.
4216 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
4217 * tree.c (build_zc_wrapper): Remove.
4219 2004-02-12 Zack Weinberg <zack@codesourcery.com>
4221 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
4222 * cp-tree.h: Don't declare cxx_builtin_type_decls.
4223 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
4224 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
4226 2004-02-10 Mark Mitchell <mark@codesourcery.com>
4228 * typeck.c (lookup_destructor): Fix typo in error message.
4230 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
4232 * call.c, parser.c, tree.c: Fix comment typos.
4234 2004-02-07 Zack Weinberg <zack@codesourcery.com>
4237 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
4238 * decl.c (duplicate_decls, start_function): Likewise.
4240 2004-02-07 Zack Weinberg <zack@codesourcery.com>
4242 * name-lookup.c (pushdecl): Issue shadow warnings directly.
4243 * parser.c (free_parser_stacks): Delete.
4245 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
4247 * rtti.c: Update copyright.
4249 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4252 * decl.c (require_complete_types_for_parms): Do not insert
4253 error_mark_node in the parameter list.
4255 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4258 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
4259 error when terminator can not be found.
4261 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
4263 Make-lang.in (po-generated): Delete.
4265 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
4267 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
4268 targetm.calls.promote_prototypes.
4270 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
4274 2004-01-15 Geoffrey Keating <geoffk@apple.com>
4276 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
4277 (handle_pragma_implementation): Likewise.
4279 2004-02-05 Mark Mitchell <mark@codesourcery.com>
4282 * typeck.c (lookup_destructor): Tweak error message.
4284 2004-02-05 Jan Hubicka <jh@suse.cz>
4286 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
4289 2004-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4292 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
4293 code, only emits the diagnostic now. Added lookup of the identifier
4294 and support for qualified ids.
4295 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
4296 Parse an (invalid) type name as id-expression within a declarator.
4297 (cp_parser_simple_declaration): Use it.
4298 (cp_parser_member_declaration): Likewise.
4299 (cp_parser_make_typename_type): New function. Handle errors through
4300 cp_parser_diagnose_invalid_typename.
4301 (cp_parser_elaborated_type_specifier): Use it.
4303 2004-02-04 Mark Mitchell <mark@codesourcery.com>
4306 * call.c (convert_like_real): Use "converting" rather than
4307 "argument" as the descriptive keyword to
4308 dubious_conversion_warnings.
4309 * typeck.c (convert_for_assignment): Do not call
4310 dubious_conversion_warnings.
4312 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4315 * init.c (build_delete): Emit a more informative error message in
4316 case of an incomplete type, and on the correct source line.
4318 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
4320 * error.c, search.c: Update copyright.
4322 2004-02-04 Mark Mitchell <mark@codesourcery.com>
4325 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
4326 linkage for the typeinfo name string.
4328 2004-02-04 Mark Mitchell <mark@codesourcery.com>
4331 * cp-tree.h (fold_non_dependent_expr): New function.
4332 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
4333 (cp_parser_template_argument): Use fold_non_dependent_expr.
4334 (cp_parser_direct_declarator): Likewise.
4335 * pt.c (fold_non_dependent_expr): New function.
4336 (convert_nontype_argument): Use it.
4337 (tsubst_qualified_id): Simplify.
4338 (tsubst_copy_and_build): Likewise.
4340 2004-02-04 Mark Mitchell <mark@codesourcery.com>
4342 * decl.c (cxx_push_function_context): Do not set
4343 current_function_is_thunk.
4344 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
4347 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4350 * pt.c (more_specialized_class): Increase processing_template_decl
4351 while partial ordering.
4353 2004-02-03 Mark Mitchell <mark@codesourcery.com>
4356 * decl.c (start_function): Do not call pushdecl for any
4357 instantiation or specialization of a primary template.
4359 2004-02-03 Mark Mitchell <mark@codesourcery.com>
4362 * parser.c (cp_parser_class_name): Robustify.
4365 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
4368 * semantics.c (finish_id_expression): Do not return an
4369 IDENTIFIER_NODE when lookup finds a PARM_DECL.
4371 2004-02-03 Mark Mitchell <mark@codesourcery.com>
4374 * pt.c (build_non_dependent_expr): Do not build
4375 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
4378 * semantics.c (finish_id_expression): Do not return an
4379 IDENTIFIER_NODE when lookup finds a VAR_DECL.
4382 * parser.c (cp_parser_simple_declaration): When skipping to the
4383 end of the statement swallow the terminating semicolon.
4385 2004-02-02 Mark Mitchell <mark@codesourcery.com>
4388 * init.c (build_offset_ref): Improve error recovery for invalid
4389 uses of non-static member functions.
4392 * cp-tree.h (cp_build_type_attribute_variant): New function.
4393 * class.c (build_clone): Use cp_build_type_attribute_variant.
4394 * decl.c (duplicate_decls): Likewise.
4395 * pt.c (copy_default_args_to_explicit_spec): Likewise.
4396 (tsubst_function_type): Likewise.
4397 * tree.c (build_exception_variant): Check attributes before
4398 concluding that two types are the same.
4399 (cp_build_type-attribute_variant): New method.
4400 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
4403 * call.c (convert_class_to_reference): Keep better track of
4404 pedantically invalid user-defined conversions.
4406 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4409 * pt.c (tsubst_qualified_id): Improved error message when a type
4410 is expected but not found.
4412 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
4414 * class.c: Fix comment typos.
4416 * error.c: Likewise.
4417 * parser.c: Likewise.
4419 * search.c: Likewise.
4420 * typeck.c: Likewise.
4422 2004-01-30 Richard Henderson <rth@redhat.com>
4425 * method.c (use_thunk): Don't force_target_expr for void thunks.
4426 * tree.c (build_target_expr_with_type): Assert non-void type.
4427 (force_target_expr): Likewise.
4429 2004-01-30 Michael Matz <matz@suse.de>
4431 * parser.c (cp_parser_labeled_statement): Accept case ranges.
4433 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4437 * decl.c (grokdeclarator): Check immediatly type completeness for
4438 non-dependent types.
4440 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4443 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
4444 a sizeof expression.block
4446 2004-01-29 Mark Mitchell <mark@codesourcery.com>
4449 * mangle.c (write_encoding): Correct encoding of member template
4452 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4454 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
4455 template name as it was `<::' (digraph typo).
4456 (cp_parser_nth_token_starts_template_argument_list_p): New function.
4457 (cp_parser_id_expression): Use it.
4458 (cp_parser_nested_name_specifier_opt): Likewise.
4459 (cp_parser_template_name): Likewise.
4460 (cp_parser_class_name): Likewise.
4461 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
4463 2004-01-28 Mark Mitchell <mark@codesourcery.com>
4466 * typeck.c (merge_types): Do not merge attributes into
4470 * parser.c (cp_parser_direct_declarator): Do not prevent
4471 backtracking inside a parenthesized declarator.
4472 (cp_parser_parameter_declaration): Fix typo in comment.
4474 2004-01-28 Jan Hubicka <jh@suse.cz>
4476 * semantics.c (expand_body) Do emit_associated_thunks before
4479 2004-01-27 Devang Patel <dpatel@apple.com>
4481 * name-lookup.c: Include "debug.h"
4482 (do_namespace_alias): Invoke debug_hooks to emit debug info
4483 for namespace alias.
4484 (do_local_using_decl): Invoke debug_hooks to emit debug info
4486 (do_class_using_decl): Same.
4487 (do_toplevel_using_decl): Same.
4488 (do_using_directive): Same.
4489 (cp_emit_debug_info_for_using): New function.
4490 * Make-lang.in (cp/parser.o): Depend on debug.h
4491 (cp/name-lookup.o): Same.
4493 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4495 * cp-tree.h (language_function, lang_type_header): Use
4497 * name-lookup.h (cp_binding_level): Likewise.
4499 2004-01-26 Mark Mitchell <mark@codesourcery.com>
4502 * semantics.c (finish_for_expr): Check for unresolved overloaded
4505 * class.c (add_method): Just check processing_template_decl to
4506 determine whether or not we are within a template.
4507 * decl2.c (maybe_retrofit_in_chrg): Likewise.
4508 * init.c (decl_constant_value): Check the type of the declaration,
4510 * name-lookup.c (maybe_push_to_top_level): Rename to ...
4511 (push_to_top_level): ... this.
4512 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
4513 * pt.c (push_template_decl_real): Reorder condition for speed.
4514 (convert_template_argument): Use dependency-checking functions in
4515 place of uses_template_parms.
4516 (lookup_template_class): Avoid calling uses_template_parms more
4518 (uses_template_parms): Reimplement, using dependency-checking
4520 (instantiate_class_template): Use push_to_top_level, not
4521 maybe_push_to_top_level.
4522 (type_unification_real): Simplify.
4523 (type_dependent_expression_p): Handle OFFSET_REFs and
4525 (any_dependent_template_arguments_p): Handle multiple levels of
4527 * semantics.c (expand_or_defer_fn): Do not check
4528 uses_template_parms for template instantiations.
4529 * typeck.c (comptypes): Avoid calling cp_type_quals.
4531 2004-01-25 Mark Mitchell <mark@codesourcery.com>
4534 * call.c (build_over_call): Do not convert arguments when
4535 processing a template.
4536 * pt.c (build_non_dependent_expr): Do not build a
4537 NON_DEPENDENT_EXPR for arithmetic constants.
4539 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4542 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
4543 returns a TYPE_DECL. no further lookup is required.
4544 * semantics.c (check_template_template_default_arg): A TYPE_DECL
4545 is invalid. Rework to give better diagnostics.
4547 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4550 * pt.c (instantiate_class_template): Add an error_mark_node
4552 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
4554 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
4557 * decl.c (finish_function): Move the call to
4558 finish_fname_decls below the call to
4559 finish_eh_spec_block.
4561 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
4563 * optimize.c, typeck2.c: Update copyright.
4565 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
4567 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
4568 init.c, mangle.c, typeck.c: Update copyright.
4570 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
4572 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
4574 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
4576 * Make-lang.in: Replace $(docdir) with doc.
4577 (c++.info, c++.srcinfo): Dummy entry.
4578 (c++.man, c++.srcman): New rules.
4579 (c++.install-man): Revamp rule.
4581 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
4583 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
4584 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
4585 immediate $(shell) instead of deferred backquote.
4587 2004-01-19 Mark Mitchell <mark@codesourcery.com>
4590 * parser.c (cp_parser_postfix_expression): When encountering
4591 incomplete type on left-hand side of "->" or ".", treat the entire
4592 expression as erroneous.
4595 * call.c (build_field_call): Remove.
4596 (n_build_method_call): Likewise.
4597 (build_method_call): Likewise.
4598 (build_new_method_call): Do not call build_field_call.
4599 * class.c (n_build_method_call): Remove.
4600 (print_class_statistics): Do not print it.
4601 * cp-tree.h (build_method_call): Remove declaration.
4602 (finish_object_call_expr): Likewise.
4603 (build_new_1): Do not use build_method_call.
4604 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
4605 when the function appearing on the right-hand-side of "." or "->"
4606 is not actually a function.
4607 * pt.c (tsubst_copy_and_build): Likewise.
4608 * semantics.c (finish_object_call_expr): Remove.
4610 2004-01-18 Mark Mitchell <mark@codesourcery.com>
4613 * pt.c (tsubst): Use finish_typeof.
4615 2004-01-18 Jason Merrill <jason@redhat.com>
4618 * except.c (build_throw): In a template, set
4619 current_function_returns_abnormally.
4621 2004-01-17 Fred Fish <fnf@intrinsity.com>
4624 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
4625 except don't call array_type_nelts() with a VECTOR_TYPE.
4627 2004-01-16 Jan Hubicka <jh@suse.cz>
4629 * mangle.c (write_mangled_name): Remove inline modifier.
4631 2004-01-16 Mark Mitchell <mark@codesourcery.com>
4634 * decl.c (compute_array_index_type): Fix grammar in comment.
4635 * init.c (build_zero_init): Handle zero-sized arrays correctly.
4638 * call.c (name_as_c_string): Print conversion operator names
4642 * call.c (initialize_reference): Pass -1 for inner parameter to
4645 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4648 * parser.c (cp_parser_base_specifier): Check for an invalid
4649 keyword `typename' and emit an user-friendly error message.
4651 2004-01-15 Geoffrey Keating <geoffk@apple.com>
4654 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
4655 (handle_pragma_implementation): Likewise.
4657 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4660 * typeck.c (build_class_member_access_expr): Allow to access members
4661 of the currently open class.
4662 (finish_class_member_access_expr): Likewise.
4664 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
4667 * name-lookup.c (validate_nonmember_using_decl): Take scope and
4668 name by value, instead of computing them.
4669 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
4670 arguments. Pass them to validate_nonmember_using_decl.
4671 * name-lookup.h (do_local_using_decl): Adjust.
4672 (do_toplevel_using_decl): Likewise.
4673 * parser.c (cp_parser_using_declaration): Likewise.
4674 * pt.c (tsubst_expr): Likewise.
4676 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
4680 * name-lookup.c (qualified_lookup_using_namespace): Search
4681 strongly-associated namespaces first, and only then try other
4684 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
4686 * Make-lang.in (c++.srcextra): Dummy entry.
4688 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4691 * parser.c (cp_parser_template_name): Don't try to parse a
4692 conversion-function-id, as it cannot be a template-name.
4693 (cp_parser_simple_type_specifier): Check for invalid template-ids
4694 even after a built-in type.
4696 2004-01-14 Jan Hubicka <jh@suse.cz>
4699 * pt.c (instantiate_decl): Do not increase function_depth.
4701 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
4705 * parser.c (cp_parser_elaborated_type_specifier): Warn about
4706 attributes and discard.
4707 * decl.c (xref_tag): Don't overwite existing attributes with
4710 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4713 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
4714 is no destructor while looking up a BIT_NOT_EXPR.
4716 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
4718 * cxxfilt.c: Remove unused file.
4720 2004-01-14 Jan Hubicka <jh@suse.cz>
4722 Partial fix to PR c++/12850
4723 * decl2.c (mark_used): Do not proactively instantiate templates
4724 when compiling in unit-at-a-time or not optimizing.
4725 * optimize.c (maybe_clone_body): Do not increase function depth.
4727 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4730 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
4732 2004-01-12 Steven Bosscher <stevenb@suse.de>
4735 * parser.c (cp_parser_member_declaration): Any non-type is also
4736 not a class or a function.
4738 2004-01-12 Jason Merrill <jason@redhat.com>
4741 * class.c (build_base_path): Do not mark vtable references as
4743 (build_vtbl_ref_1): Likewise.
4745 2004-01-12 Richard Henderson <rth@redhat.com>
4748 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
4749 (store_init_value): Use it.
4750 * decl.c (check_initializer): Expect full initialization code
4751 from store_init_value.
4752 * init.c (expand_aggr_init_1): Likewise.
4753 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
4755 2004-01-12 Mark Mitchell <mark@codesourcery.com>
4757 * class.c (layout_class_type): For non-POD class types, also copy
4758 the DECL_SIZE and DECL_MODE of fields to the base class type.
4760 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4763 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
4764 calling regenerate_decl_from_template.
4766 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
4769 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
4770 decl-specifier occurring along with a class definition.
4772 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
4774 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
4775 clauses to comments describing declares_class_or_enum.
4776 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
4779 2004-01-12 Jan Hubicka <jh@suse.cz>
4781 * pt.c (for_each_template_parm): Do not check for duplicates.
4782 (for_each_template_parm): Use walk_tree duplicate checking code.
4784 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
4787 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
4788 is error_mark_node, don't add any more decl_specs.
4789 (cp_parser_init_declarator): After committing to a declaration, if
4790 the decl_specifiers start with error_mark_node, issue an error and
4791 change the type to "int".
4793 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
4796 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
4798 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4802 * pt.c (tsubst): Substitution must fail if we are attempting to
4803 create an array with element type that is an abstract class type.
4804 * decl.c (cp_finish_decl): Strip pointers and array types recursively
4805 before calling abstract_virtuals_error.
4807 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
4809 * name-lookup.c (qualified_lookup_using_namespace): Consider
4810 strong using directives even if we've already found a binding.
4812 2004-01-09 Mark Mitchell <mark@codesourcery.com>
4814 * cp-tree.h (cxx_expand_expr): Change prototype.
4815 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
4817 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4820 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
4821 looking into them recursively. They can be there because of the
4822 new __offsetof__ extension.
4824 2004-01-07 Zack Weinberg <zack@codesourcery.com>
4826 * parser.c (cp_parser_save_member_function_body): Mark the
4829 2004-01-05 Mark Mitchell <mark@codesourcery.com>
4832 * class.c (build_clone): Copy type attributes from the original
4833 function to the clone.
4836 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
4837 references as constant.
4840 * parser.c (cp_parser_explicit_instantiation): Improve error
4842 (cp_parser_require): Improve indication of the error location.
4845 * parser.c (cp_parser_class_head): Reorder logic to check for
4846 invalid qualification.
4848 2004-01-04 Mark Mitchell <mark@codesourcery.com>
4851 * name-lookup.c (lookup_using_namespace): Remove spacesp
4853 (unqualified_namespace_lookup): Likewise.
4854 (lookup_qualified_name): Adjust accordingly.
4855 (lookup_name_real): Likewise.
4856 (lookup_arg_dependent): Do not eliminate the namespace of the
4857 functions found by unqualified name lookup unless that is the
4860 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
4862 * semantics.c (push_deferring_access_checks): Fix format.
4863 (resume_deferring_access_checks): Likewise.
4864 (stop_deferring_access_checks): Likewise.
4865 (pop_deferring_access_checks): Likewise.
4866 (get_deferred_access_checks): Likewise.
4867 (pop_to_parent_deferring_access_checks): Likewise.
4868 (perform_deferred_access_checks): Likewise.
4869 (perform_or_defer_access_check): Likewise.
4871 2004-01-04 Richard Henderson <rth@redhat.com>
4873 * call.c (build_over_call): Don't create a save_expr of an
4874 aggregate, but rather its address.
4876 2004-01-04 Mark Mitchell <mark@codesourcery.com>
4879 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
4880 an offsetof expression.
4882 * parser.c (cp_parser_parameter_declaration): Fix comment.
4885 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
4886 (reference_binding): Set it when appropriate.
4887 (build_temp): New function, split out from ...
4888 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
4889 (initialize_reference): Likewise.
4892 * parser.c (cp_parser): Add in_type_id_in_expr_p.
4893 (cp_parser_new): Initialize it.
4894 (cp_parser_postfix_expression): Set it.
4895 (cp_parser_sizeof_operand): Likewise.
4896 (cp_parser_parameteR_declaration): Do not commit early to tenative
4897 parsers when in_type_id_in_expr_p is set.
4899 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4902 * parser.c (cp_parser_template_argument): Don't call
4903 make_unbound_class_template directly.
4904 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
4905 UNBOUND_CLASS_TEMPLATE tree node.
4907 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
4910 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
4912 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4915 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
4916 (DECL_FUNCTION_TEMPLATE_P): Use it.
4917 (DECL_CLASS_TEMPLATE_P): Likewise.
4918 * parser.c (cp_parser_lookup_name): Add is_template parameter.
4919 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
4920 (cp_parser_template_name): Likewise.
4921 (cp_parser_elaborated_type_specifier): Likewise.
4922 (cp_parser_namespace_name): Likewise.
4923 (cp_parser_class_name): Likewise.
4924 (cp_parser_lookup_name_simple): Likewise.
4926 See ChangeLog.3 for earlier changes.