1 2004-09-21 Roger Sayle <roger@eyesopen.com>
4 * tree.c (lvalue_p_1): Disallow MIN_EXPR and MAX_EXPR as lvalues
5 if either operand has side-effects.
6 * typeck.c (rationalize_conditional_expr): Assert that neither
7 operand of MIN_EXPR or MAX_EXPR has side-effects.
8 (build_modify_expr): Add support for MIN_EXPR and MAX_EXPR.
9 Check that the "lhs" is a valid lvalue, i.e. that neither operand
10 of a MIN_EXPR or MAX_EXPR has a side-effect.
12 2004-09-21 Nathan Sidwell <nathan@codesourcery.com>
14 * cp-tree.h (struct lang_type_header): Remove
15 uses_multiple_inheritance field.
16 (TYPE_USES_MULTIPLE_INHERITANCE): Remove.
17 (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): Remove.
18 (TYPE_USES_VIRTUAL_BASECLASSES): Remove.
19 (DECL_NEEDS_VTT_PARM_P): Use CLASSTYPE_VBASECLASSES.
20 (TYPE_CONTAINS_VPTR_P): Likewise.
21 * call.c (add_template_candidate_real): Use
22 CLASSTYPE_VBASECLASSES.
23 (build_special_member_call): Likewise.
24 * class.c (finish_struct_bits): Remove
25 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P & TYPE_USES_VIRTUAL_BASECLASSES
27 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
28 (create_vtable_ptr): Remove TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P
30 (build_vtt_inits): Use CLASSTYPE_VBASECLASSES.
31 (accumulate_vtbl_inits, build_vbase_offset_vtbl_entries):
33 * decl.c (xref_basetypes): Remove TYPE_USES_MULTIPLE_INHERITANCE,
34 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
36 (cxx_maybe_build_cleanup): Use CLASSTYPE_VBASECLASSES.
37 * decl2.c (maybe_retrofit_in_chrg): Likewise.
38 * init.c (expand_member, push_base_cleanups): Likewise.
39 * pt.c (instantiate_class_template): Remove
40 TYPE_USES_MULTIPLE_INHERITANCE,
41 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
43 * ptree.c (cxx_print_type): Remove TYPE_USES_MULTIPLE_INHERITANCE
45 * typeck2.c (process_init_constructor): Replace some sorrys with
48 2004-09-21 Andreas Tobler <a.tobler@schweiz.ch>
50 * decl.c (reshape_init_array): Initialize max_index_cst to fix
53 2004-09-20 Mark Mitchell <mark@codesourcery.com>
56 * pt.c (tsubst): Fix parentheses to accomodate emacs.
57 (tsubst_baselink): If we get a single function, mark it as used.
59 2004-09-20 Matt Austern <austern@apple.com>
60 Zack Weinberg <zack@codesourcery.com>
62 * decl.c (make_rtl_for_nonlocal_decl, start_preparsed_function):
63 Apply lbasename to input_filename before passing to get_fileinfo.
64 * semantics.c (begin_class_definition): Likewise.
65 * lex.c (handle_pragma_interface): Apply get_fileinfo to the
66 correct filename. Rename variables to be less confusing.
67 (handle_pragma_implementation): Likewise. Disable "appears
68 after file is included" diagnostic.
70 * parser.c (struct cp_token): Add in_system_header fiag.
71 (CP_TOKEN_BLOCK_NUM_TOKENS, struct cp_token_block)
72 (CP_TOKEN_BUFFER_SIZE, cp_token_cache_push_token)
73 (CPP_NONE, cp_lexer_read_token): Delete.
74 (struct cp_lexer): Remove first_token, string_tokens,
75 main_lexer_p fields. Clarify comments.
76 (struct cp_token_cache): Now just a pair of pointers.
77 (CP_LEXER_BUFFER_SIZE): New #define.
78 (CPP_PURGED): New fake token type.
79 (cp_lexer_new_from_token_array, cp_lexer_destroy)
80 (cp_lexer_peek_token_emit_debug_info, cp_lexer_skip_purged_tokens)
81 (cp_lexer_handle_pragma, cp_token_cache_new, cp_parser_string_literal):
83 (cp_lexer_new_from_tokens): Now a simple wrapper around
84 cp_lexer_new_from_token_array.
85 (cp_lexer_set_source_position_from_token): Also update
87 (cp_lexer_next_token, cp_lexer_prev_token, cp_lexer_advance_token):
89 (cp_lexer_token_difference): Dont handle wrapping round.
90 (cp_lexer_new_main): Enable pragma deferral and raw strings,
91 read the entire translation unit through c_lex_with_flags into
92 this lexer's buffer, then turn raw strings back off again.
93 (cp_lexer_grow_buffer): Adjust for buffer no longer being circular.
94 (cp_lexer_get_preprocessor_token): No need to handle not being
95 the main lexer. Set token->in_system_header too.
96 (cp_lexer_peek_token): Skip purged tokens. Feed pragma tokens
97 to cp_lexer_handle_pragma. No need to call cp_lexer_read_token.
98 (cp_lexer_peek_nth_token): Likewise.
99 (cp_lexer_purge_token): Mark the token PURGED, don't shift all
100 the other tokens down.
101 (cp_lexer_purge_tokens_after): Likewise.
102 (cp_lexer_save_tokens, cp_lexer_rollback_tokens): Don't worry
103 about there being no tokens.
104 (cp_lexer_print_token): Revise to give useful information on
106 (struct cp_parser): Add field translate_strings_p.
107 (cp_parser_new): Initialize it.
108 (cp_parser_translation_unit): Destroy the lexer when done.
109 (cp_parser_parameter_declaration): Restructure saving of
111 (cp_parser_save_member_function_body): Likewise.
112 (cp_parser_check_for_invalid_template_id)
113 (cp_parser_nested_name_specifier_opt, cp_parser_template_id):
114 Adjust calls to cp_lexer_advance_token.
115 (cp_parser_skip_to_closing_parenthesis, cp_parser_declaration):
116 No need to fiddle c_lex_string_translate.
117 (cp_parser_primary_expression, cp_parser_linkage_specification)
118 (cp_parser_asm_definition, cp_parser_asm_specification_opt)
119 (cp_parser_asm_operand_list, cp_parser_asm_clobber_list)
120 Use cp_parser_string_literal.
121 (cp_parser_attribute_list): Save and restore
122 parser->translate_strings_p, not c_lex_string_translate.
123 (cp_parser_cache_group): Delete.
124 (cp_parser_cache_group_1): Rename cp_parser_cache_group. Do
125 not take a cache argument.
127 2004-09-20 Giovanni Bajo <giovannibajo@gcc.gnu.org>
130 * decl.c (reshape_init): Extract array handling into...
131 (reshape_init_array): New function. Use integers instead of trees
132 for indices. Handle out-of-range designated initializers.
134 2004-09-20 Steven Bosscher <stevenb@suse.de>
136 * lex.c (cxx_init): Don't set the ridpointer for RID_NULL
139 2004-09-19 Mark Mitchell <mark@codesourcery.com>
141 * decl2.c (determine_visibility): Allow class visibility
142 directives to override targetm.cxx.export_class_data.
144 2004-09-18 Kazu Hirata <kazu@cs.umass.edu>
146 * call.c, semantics.c: Follow spelling conventions.
147 * class.c: Fix a comment typo.
149 2004-09-16 Geoffrey Keating <geoffk@apple.com>
152 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
153 (handle_pragma_implementation): Likewise.
155 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
156 Zack Weinberg <zack@codesourcery.com>
158 * cp-tree.def: Use tree_code_class enumeration constants
159 instead of code letters.
160 * call.c, class.c, cp-gimplify.c, cp-lang.c, cxx-pretty-print.c
161 * mangle.c, pt.c, semantics.c, tree.c, typeck.c:
162 Update for new tree-class enumeration constants.
164 2004-09-16 Mark Mitchell <mark@codesourcery.com>
167 * parser.c (cp_parser_simple_declaration): Commit to tentative
168 parses after seeing a decl-specifier.
169 (cp_parser_simple_declaration): Eliminate spurious message.
170 (cp_parser_init_declarator): Adjust error message.
173 * lex.c (unqualified_name_lookup_error): Mark the dummy
177 * parser.c (cp_parser_nested_name_specifier): Do not resolve
178 typename types if the user explicitly said "typename".
180 2004-09-16 Andrew MacLeod <amacleod@redhat.com>
182 * error.c (dump_decl): Make sure there is lang_specific info before
183 checking for DTOR and CTOR decls.
185 2004-09-16 Nathan Sidwell <nathan@codesourcery.com>
187 * class.c (copy_virtuals): Remove.
188 (build_primary_vtable): Use copy_list directly.
189 (build_secondary_vtable): Likewise.
190 (update_vtable_entry_for_fn): Clear BV_CALL_INDEX here.
191 (create_vtable_ptr): Likewise.
193 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
195 * search.c: Follow spelling conventions.
197 2004-09-16 Nathan Sidwell <nathan@codesourcery.com>
199 * cp-tree.h (struct lang_type_class): Make pure_virtuals a
201 (CLASSTYPE_INLINE_FRIENDS, CLASSTYPE_PURE_VIRTUALS): Update
203 * call.c (build_new_method_call): Don't confirm a pure virtual is
204 in CLASSTYPE_PURE_VIRTUALS. Reorder checks. Make it a warning.
205 * class.c (check_methods): CLASSTYPE_INLINE_FRIENDS is a VEC(tree).
206 (fixup_inline_methods, finish_struct): Likewise.
207 * decl.c (finish_method): Likewise.
208 * search.c (dfs_get_pure_virtuals, get_pure_virtuals):
209 CLASSTYPE_PURE_VIRTUALS is a VEC(tree).
210 * typeck2.c (abstract_virtuals_error): Likewise. Truncate the
211 vector to avoid repeating the list in error messages.
213 2004-09-15 Mark Mitchell <mark@codesourcery.com>
215 * cp-objcp-common.h (LANG_HOOKS_COMDAT_GROUP): Define.
216 * cp-tree.h (cxx_comdat_group): Declare.
217 * decl.c (cxx_comdat_group): New function.
219 2004-09-15 Nathan Sidwell <nathan@codesourcery.com>
221 * search.c (get_pure_virtuals): Remove unused variables.
223 * cp-tree.h (struct lang_decl_flags): Remove
224 needs_final_overrider.
225 (DECL_NEEDS_FINAL_OVERRIDER_P): Remove.
226 * decl.c (duplicate_decls): Do not copy DECL_NEEDS_FINAL_OVERRIDER_P.
227 * class.c (finish_struct_bits): Correct comment about
228 CLASSTYPE_PURE_VIRTUALS.
229 * search.c (get_pure_virtuals): Remove useless loop.
231 2004-09-14 Mark Mitchell <mark@codesourcery.com>
234 * mangle.c (partially_mangled_name): New variable.
235 (partially_mangled_name_len): Likewise.
236 (save_partially_mangled_name): New function.
237 (restore_partially_mangled_name): Likewise.
238 (write_encoding): Save and restore partially mangled names around
239 calls to get_mostly_instantiated_function_type.
240 (write_unqualified_name): Likewise.
242 2004-09-14 Nathan Sidwell <nathan@codesourcery.com>
244 * pt.c (unify): Replace gcc_unreachable with gcc_assert.
246 2004-09-13 Mark Mitchell <mark@codesourcery.com>
249 * parser.c (cp_parser_id_expression): Correct value for
251 (cp_parser_nested_name_specifier_opt): Look through typenames as
253 (cp_parser_template_name): Honor check_dependency_p.
256 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name):
260 * pt.c (unify): Add ENUMERAL_TYPE case. Replace sorry with
263 2004-09-12 Richard Henderson <rth@redhat.com>
266 * semantics.c (maybe_cleanup_point_expr): Don't call fold.
267 * typeck.c (condition_conversion): Likewise.
269 2004-09-11 Richard Henderson <rth@redhat.com>
272 * pt.c (cur_stmt_expr): Move from tsubst_expr.
273 (tsubst_expr) <case STMT_EXPR>: Move ...
274 (tsubst_copy_and_build): ... here.
276 2004-09-10 Zack Weinberg <zack@codesourcery.com>
278 * cp-tree.h (interface_only, interface_unknown): Delete declarations;
279 comment explaining them moved to c-common.h.
280 * lex.c (interface_only, interface_unknown, extract_interface_info):
282 (cxx_finish): Don't reset interface_unknown.
283 (handle_pragma_interface): Don't set interface_only and
284 interface_unknown; just the like-named fields in finfo.
285 (handle_pragma_implementation): Adjust comment.
286 * decl2.c (cp_finish_file): Don't reset interface_only and
288 * method.c (synthesize_method): Don't reset interface_unknown or
289 call extract_interface_info.
290 * pt.c (pop_tinst_level): Don't call extract_interface_info.
291 * decl.c (start_cleanup_fn): Don't save or restore interface_only
292 and interface_unknown.
293 (make_rtl_for_nonlocal_decl): Call get_fileinfo on input_filename
294 and use the result instead of the interface_only/interface_unknown
296 (start_preparsed_function): Likewise.
297 * lex.c (cxx_make_type): Likewise.
298 * semantics.c (begin_class_definition): Likewise.
299 (expand_body): Don't call extract_interface_info.
301 2004-09-10 Ziemowit Laski <zlaski@apple.com>
303 * decl.c (objc_mark_locals_volatile): Make description of
304 routine more descriptive; only mark VAR_DECLs at each
307 2004-09-10 Richard Henderson <rth@redhat.com>
310 * call.c (build_vfield_ref): Move...
311 * class.c (build_vfield_ref): ... here. Convert datum to the
312 primary base containing the vptr.
313 (make_new_vtable): Simplify build_primary_vtable arguments.
314 (finish_struct_1): Do not duplicate TYPE_VFIELD.
315 * typeck.c (build_class_member_access_expr): Don't warn for
316 null object access to base fields.
318 2004-09-10 Ziemowit Laski <zlaski@apple.com>
320 * decl.c (objc_get_current_scope, objc_mark_locals_volatile):
321 New functions, to be called from ObjC++.
323 2004-09-10 Kazu Hirata <kazu@cs.umass.edu>
325 * class.c, cp-tree.h, decl.c, decl2.c, mangle.c,
326 name-lookup.h, parser.c, search.c, semantics.c, typeck2.c: Fix
329 2004-09-09 Ziemowit Laski <zlaski@apple.com>
331 * typeck.c (build_c_cast): Preserve the cast if casting
332 to and from an Objective-C type.
334 2004-09-09 Ziemowit Laski <zlaski@apple.com>
336 * Make-lang.in (cp/typeck.o): Depend on c-common.h.
337 * typeck.c: Include c-common.h.
338 (comptypes): For RECORD_TYPEs, call objc_comptypes() and
339 return the result if nonnegative.
341 2004-09-09 Zack Weinberg <zack@codesourcery.com>
343 * decl2.c (import_export_class)
344 * lex.c (handle_pragma_interface):
345 Test MULTIPLE_SYMBOL_SPACES with if, not #ifdef.
347 2004-09-08 Ziemowit Laski <zlaski@apple.com>
349 * Make-lang.in (cp/semantics.o): Depend on c-common.h.
350 * semantics.c: Include c-common.h.
351 (finish_compound_stmt): Call objc_clear_super_receiver().
353 2004-09-08 Ziemowit Laski <zlaski@apple.com>
355 * cp-tree.h (do_poplevel): New prototype.
356 * semantics.c (do_poplevel): Make externally visible.
358 2004-09-08 Nathan Sidwell <nathan@codesourcery.com>
360 * cp-tree.h (tree_pair_s): Define a GC'd vector.
361 * name-lookup.h (cxx_saved_binding, cp_class_binding): Likewise.
362 * semantics.c (deferred_access): Likewise.
364 2004-09-06 Daniel Jacobowitz <dan@debian.org>
366 * semantics.c (expand_body): Assert that we are not nested.
368 2004-09-06 Zack Weinberg <zack@codesourcery.com>
370 * decl.c (build_enumerator): Use add_double and int_fits_type_p
371 instead of cp_build_binary_op, to avoid creating short-lived trees.
372 * parser.c (cp_parse_type_specifier <RID_ENUM>): Use two-token
373 lookahead instead of backtracking. Move some code to avoid a
375 (cp_parser_enum_specifier): Avoid duplication of effort with caller.
376 Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
377 (cp_parser_enumerator_list, cp_parser_enumerator_definition):
378 Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
380 2004-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
382 * decl.c (grok_declarator): Remove a redundant semicolon.
384 * parser.c (cp_parser_decl_specifier_seq, cp_parser_type_specifier):
385 Correct comments describing function parameters.
387 2004-09-03 Matt Austern <austern@apple.com>
388 Compile speed improvement.
389 * parser.c (cp_lexer_print_token): Only define if ENABLE_CHECKING set.
390 Otherwise define a stub macro that expands to nothing.
391 (cp_lexer_debugging_p): Only define if ENABLE_CHECKING set. Otherwise
392 define a stub macro that expands to 0.
393 (cp_lexer_start_debugging): Only define if ENABLE_CHECKING set.
394 (cp_lexer_stop_debugging): Likewise.
395 (cp_lexer_debug_stream): Only define if ENABLE_CHECKING set. Otherwise
396 define a stub macro that expands to NULL.
397 (cp_lexer_new_main): Only set debugging_p if ENABLE_CHECKING set.
398 (cp_lexer_new_from_tokens): Likewise.
400 2004-09-03 Jan Hubicka <jh@suse.cz>
402 * decl.c (finish_function): Clean out pointers we no longer need.
404 2004-09-03 Jan Beulich <jbeulich@novell.com>
406 * g++spec.c (MATH_LIBRARY_PROFILE): Default to MATH_LIBRARY rather
409 2004-09-02 Paul Brook <paul@codesourcery.com>
411 * decl2.c (determine_visibility): Only check data visibility
414 2004-08-31 Mark Mitchell <mark@codesourcery.com>
416 * cp-tree.h (DECL_CONSTRUCTION_VTABLE_P): New macro.
417 * class.c (build_ctor_vtbl_group): Set DECL_CONSTRUCTION_VTABLE_P.
418 * decl2.c (determine_visibility): Honor
419 TARGET_CXX_EXPORT_CLASS_DATA.
421 * class.c (key_method): Rename to ...
422 (determine_key_method): ... this.
423 (finish_struct_1): Adjust accordingly.
424 * cp-tree.h (key_method): Declare.
425 * decl2.c (maybe_emit_vtables): Determine the key method here if
426 it has not already been done.
428 2004-08-31 Ziemowit Laski <zlaski@apple.com>
430 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-objcp-common.o.
431 (cp/cp-lang.o): Depend on debug.h, gtype-cp.h and cp/cp-objcp-common.h.
432 (cp/cp-decl.c): Do not depend on gtype-cp.h.
433 (cp/cp-objcp-common.o): New target.
434 * cp-lang.c: Include debug.h, cp-objcp-common.h and gtype-cp.h.
435 (cxx_get_alias_set, cxx_warn_unused_global_decl, cp_expr_size,
436 cp_tree_size, cp_var_mod_type_p, cxx_initialize_diagnostics): Move
437 prototypes and definitions to cp-objcp-common.h and cp-objcp-common.c,
439 (LANG_HOOKS_TREE_SIZE, LANG_HOOKS_FINISH,
440 LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_INIT_OPTIONS,
441 LANG_HOOKS_INITIALIZE_DIAGNOSTICS, LANG_HOOKS_HANDLE_OPTION,
442 LANG_HOOKS_HANDLE_FILENAME, LANG_HOOKS_MISSING_ARGUMENT,
443 LANG_HOOKS_POST_OPTIONS, LANG_HOOKS_GET_ALIAS_SET,
444 LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_EXPAND_EXPR,
445 LANG_HOOKS_EXPAND_DECL, LANG_HOOKS_PARSE_FILE,
446 LANG_HOOKS_DUP_LANG_SPECIFIC_DECL, LANG_HOOKS_TRUTHVALUE_CONVERSION,
447 LANG_HOOKS_SET_DECL_ASSEMBLER_NAME, LANG_HOOKS_MARK_ADDRESSABLE,
448 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
449 LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
450 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_PRINT_ERROR_FUNCTION,
451 LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL, LANG_HOOKS_WRITE_GLOBALS,
452 LANG_HOOKS_FUNCTION_INIT, LANG_HOOKS_FUNCTION_FINAL,
453 LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P,
454 LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE,
455 LANG_HOOKS_ATTRIBUTE_TABLE, LANG_HOOKS_TREE_INLINING_WALK_SUBTREES,
456 LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN,
457 LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS,
458 LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P,
459 LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P,
460 LANG_HOOKS_TREE_INLINING_VAR_MOD_TYPE_P,
461 LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN,
462 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN, LANG_HOOKS_EXPR_SIZE,
463 LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR,
464 LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, LANG_HOOKS_MAKE_TYPE,
465 LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE,
466 LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
467 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE, LANG_HOOKS_INCOMPLETE_TYPE_ERROR,
468 LANG_HOOKS_TYPE_PROMOTES_TO, LANG_HOOKS_REGISTER_BUILTIN_TYPE,
469 LANG_HOOKS_GIMPLIFY_EXPR, LANG_HOOKS_FOLD_OBJ_TYPE_REF): Move
470 hooks to cp-objcp-common.h.
471 (finish_file): New function.
472 * cp-objcp-common.c: New file.
473 * cp-objcp-common.h: New file.
474 * cp-tree.h (cp_finish_file): New prototype.
475 * decl.c: Do not include gtype-cp.h.
476 * decl2.c (finish_file): Rename to cp_finish_file.
478 2004-08-31 Richard Henderson <rth@redhat.com>
481 * pt.c (tsubst_expr): Move OFFSETOF_EXPR handling ...
482 (tsubst_copy_and_build): ... here.
484 2004-08-30 Mark Mitchell <mark@codesourcery.com>
486 * cp-tree.h (initialize_artificial_var): Declare.
487 * decl.c (initialize_artifical_var): New function.
488 * class.c (initialize_array): Remove.
489 (initialize_vtable): Use initialize_artificial_var.
490 (build_vtt): Likewise.
491 (build_ctor_vtbl_group): Likewise.
493 2004-08-30 Richard Henderson <rth@redhat.com>
495 * class.c (build_base_path): Use build_address directly.
496 * typeck.c (build_unary_op): Don't lower &a.b to pointer
498 * typeck2.c (store_init_value): Don't assume !TREE_CONSTANT
499 means !initializer_constant_valid_p.
501 2004-08-30 Richard Henderson <rth@redhat.com>
503 * class.c (fixed_type_or_null): Use get_base_address before
504 assuming an ADDR_EXPR is non-null.
506 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
508 * name-lookup.c (pop_binding, pushdecl,
509 set_identifier_type_value_with_scope, push_overloaded_decl,
510 arg_assoc_type): Replace abort with gcc_assert or gcc_unreachable.
511 * parser.c (cp_parser_diagnose_invalid_type_name,
512 cp_parser_postfix_expression, cp_parser_unary_expression,
513 cp_parser_check_declarator_template_para): Likewise.
514 * pt.c (push_inline_template_parms_recursive,
515 check_explicit_specialization, convert_nontype_argument,
516 coerce_template_template_parms, uses_template_parms,
517 instantiate_class_template, tsubst_decl, tsubst, tsubst_copy,
518 tsubst_expr, instantiate_template,
519 maybe_adjust_types_for_deduction, type_unification_real,
520 resolve_overloaded_unification, template_decl_level,
521 type_dependent_expression_p): Likewise.
522 * search.c (lookup_base_r): Likewise.
523 * semantics.c (finish_stmt_expr, simplify_aggr_init_expr): Likewise.
524 * tree.c (lvalue_p_1, count_functions, cxx_printable_name,
525 verify_stmt_tree_r, get_type_decl, stabilize_call): Likewise.
526 * typeck.c (common_type, get_member_function_from_ptrfunc,
527 build_binary_op, build_unary_op, expand_ptrmemfunc_cst): Likewise.
528 * typeck2.c (cxx_incomplete_type_diagnostic,
529 split_nonconstant_init_1, store_init_value,
530 process_init_constructor): Likewise.
532 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
534 * call.c (check_dtor_name): Replace abort with gcc_assert or
536 (build_call, add_builtin_candidate, build_new_op,
537 convert_like_real, build_over_call, in_charge_arg_for_name,
538 source_type, joust): Likewise.
539 * class.c (build_simple_base_path, get_vcall_index,
540 finish_struct_1, instantiate_type, get_enclosing_class,
541 add_vcall_offset_vtbl_entries_1, cp_fold_obj_type_ref): Likewise.
542 * cp-gimplify.c (cp_genericize): Likewise.
543 * cp-lang.c (cp_expr_size, cp_tree_size): Likewise.
544 * cvt.c (cp_convert_to_pointer, ocp_convert): Likewise.
545 * decl.c (poplevel, make_unbound_class_template, reshape_init,
546 check_special_function_return_type, grokdeclarator,
547 grok_op_properties, tag_name, xref_tag, start_preparsed_function,
548 finish_function): Likewise.
549 * decl2.c (grokfield, maybe_emit_vtables):Likewise.
550 * error.c (dump_global_iord, dump_decl, dump_template_decl,
551 language_to_string): Likewise.
552 * except.c (choose_personality_routine): Likewise.
553 * friend.c (do_friend): Likewise.
554 * g++spec.c (lang_specific_driver): Likewise.
555 * init.c (build_zero_init, expand_default_init, build_new_1,
556 build_vec_delete_1, build_vec_init, build_dtor_call): Likewise.
557 * lex.c (retrofit_lang_decl, cp_type_qual_from_rid): Likewise.
558 * mangle.c (add_substitution, write_unscoped_name,
559 write_template_prefix, write_identifier,
560 write_special_name_destructor, write_type, write_builtin_type,
561 write_expression, write_template_param,
562 write_java_integer_type_codes): Likewise.
563 * method.c (implicitly_declare_fn): Likewise.
565 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
567 * cp-tree.h (BINFO_PRIMARY_P): Use a binfo flag.
568 (BINFO_INDIRECT_PRIMARY_P): Remove.
569 * class.c (determine_primary_base): Rename to ...
570 (determine_primary_bases): ... here. Set all primary bases.
571 (set_primary_base): Remove.
572 (mark_primary_bases): Remove.
573 (build_simple_base_path, walk_subobject_offsets,
574 propagate_binfo_offsets, end_of_class): Adjust.
575 (layout_class_type): Rename determine_primary_base call.
576 (dump_class_hierarchy_r, dump_vtable): Adjust. Don't pass a binfo
578 (dfs_build_secondary_vptr_vtt_inits, dfs_accumulate_vtbl_inits,
579 build_rtti_vtbl_entries): Adjust.
580 * init.c (build_vtbl_address): Adjust.
582 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Use gcc_assert.
584 2004-08-28 Ziemowit Laski <zlaski@apple.com>
586 * Make-lang.in (CXX_OBJS): Split up into CXX_OBJS and
588 (CXX_C_OBJS): Include in CXX_AND_OBJCXX_OBJS instead of listing
589 separately on the link line.
591 2004-08-28 Jason Merrill <jason@redhat.com>
593 * decl.c (expand_static_init): Avoid bogus warnings.
595 2004-08-27 Jason Merrill <jason@redhat.com>
598 * tree.c (stabilize_init): See through a COMPOUND_EXPR.
601 * decl.c (expand_static_init): Use thread-safety API.
602 (register_dtor_fn): Return the call, don't expand it.
603 * tree.c (add_stmt_to_compound): New fn.
604 (stabilize_call): Use it.
606 2004-08-27 Richard Henderson <rth@redhat.com>
608 * cp-tree.def (OFFSETOF_EXPR): New.
609 * parser.c (cp_parser_builtin_offsetof): Either built an
610 OFFSETOF_EXPR, or call fold_offsetof immediately.
611 * pt.c (tsubst_expr): Handle OFFSETOF_EXPR.
613 2004-08-27 Nathan Sidwell <nathan@codesourcery.com>
615 * call.c (validate_conversion_obstack): Replace
616 my_friendly_assert with gcc_assert or gcc_unreachable.
617 (direct_reference_binding, merge_conversion_sequences,
618 build_user_type_conversion_1, perform_overload_resolution,
619 build_op_delete_call, enforce_access, call_builtin_trap,
620 build_over_call, build_special_member_call, build_new_method_call,
621 initialize_reference): Likewise.
622 * class.c (build_base_path, build_primary_vtable, alter_access,
623 check_bases, update_vtable_entry_for_fn, layout_empty_base,
624 clone_function_decl, adjust_clone_args,
625 type_requires_array_cookie, include_empty_classes,
626 finish_struct_1, resolve_address_of_overloaded_function,
627 instantiate_type, get_vtbl_decl_for_binfo, build_vtt_inits,
628 dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
629 accumulate_vtbl_inits, build_vtbl_initializer,
630 build_vbase_offset_vtbl_entries, build_rtti_vtbl_entries): Likewise.
631 * cvt.c (build_up_reference, convert_to_reference): Likewise.
632 * decl.c (poplevel, duplicate_decls, make_typename_type,
633 cxx_init_decl_processing, reshape_init, check_initializer,
634 make_rtl_for_nonlocal_decl, initialize_local_var, cp_finish_decl,
635 expand_static_init, grokfndecl, grokvardecl, build_ptrmem_type,
636 grokdeclarator, copy_fn_p, grok_op_properties, xref_tag,
637 xref_basetypes, start_preparsed_function, save_function_data,
638 finish_function, finish_method, maybe_register_incomplete_var,
639 complete_vars): Likewise.
640 * decl2.c (grok_array_decl, check_member_template,
641 check_classfn, finish_static_data_member_decl, coerce_new_type,
642 coerce_delete_type, import_export_class, decl_needed_p,
643 determine_visibility, import_export_decl, build_cleanup,
644 start_static_initialization_or_destructi, do_static_destruction,
645 prune_vars_needing_no_initialization,
646 build_offset_ref_call_from_tree): Likewise.
647 * error.c (dump_decl, dump_expr): Likewise.
648 * init.c (finish_init_stmts, build_zero_init,
649 expand_virtual_init, expand_default_init, expand_aggr_init_1,
650 build_offset_ref, build_new_1, build_delete, build_vbase_delete):
652 * mangle.c (write_method_parms, write_template_args,
653 write_expression, write_template_arg): Likewise.
654 * method.c (make_thunk, finish_thunk, use_thunk): Likewise.
655 * name-lookup.c (pop_binding, begin_scope, leave_scope,
656 resume_scope, push_using_decl, validate_nonmember_using_decl,
657 is_ancestor, poplevel_class, set_inherited_value_binding_p,
658 push_class_level_binding, do_class_using_decl, push_namespace,
659 pop_namespace, add_using_namespace, ambiguous_decl,
660 lookup_namespace_name, lookup_type_current_level,
661 maybe_process_template_type_declaration): Likewise.
662 * parser.c (cp_lexer_peek_nth_token,
663 cp_parser_parse_and_diagnose_invalid_typ,
664 cp_parser_translation_unit, cp_parser_template_id,
665 cp_parser_lookup_name, cp_parser_late_parsing_for_member): Likewise.
666 * pt.c (push_access_scope, finish_member_template_decl,
667 push_inline_template_parms_recursive, add_outermost_template_args,
668 get_innermost_template_args, begin_explicit_instantiation,
669 end_explicit_instantiation, retrieve_specialization,
670 is_specialization_of, is_specialization_of_friend,
671 register_specialization, check_explicit_specialization,
672 comp_template_parms, process_template_parm,
673 process_partial_specialization, convert_nontype_argument,
674 coerce_template_template_parms, coerce_template_parms,
675 mangle_class_name_for_template, lookup_template_function,
676 lookup_template_class, instantiate_class_template, tsubst_decl,
677 tsubst_function_type, tsubst, tsubst_qualified_id, tsubst_copy,
678 instantiate_template, fn_type_unification, type_unification_real,
679 get_template_base, regenerate_decl_from_template,
680 template_for_substitution, instantiate_decl,
681 get_mostly_instantiated_function_type, dependent_scope_ref_p,
682 value_dependent_expression_p, resolve_typename_type): Likewise.
683 * repo.c (repo_emit_p): Likewise.
684 * rtti.c (build_headof, get_tinfo_decl, get_pseudo_ti_init,
685 create_tinfo_types, emit_tinfo_decl): Likewise.
686 * search.c (lookup_base_r, lookup_base, lookup_field_1,
687 dfs_access_in_type, build_baselink, lookup_member,
688 adjust_result_of_qualified_name_lookup, copied_binfo): Likewise.
689 * semantics.c (perform_or_defer_access_check,
690 finish_non_static_data_member, finish_stmt_expr_expr,
691 finish_stmt_expr, finish_call_expr, finish_pseudo_destructor_expr,
692 finish_template_template_parm, finish_member_declaration,
693 emit_associated_thunks): Likewise.
694 * tree.c (build_target_expr_with_type, force_target_expr,
695 copy_binfo, get_first_fn, cp_tree_equal): Likewise.
696 * typeck.c (type_after_usual_arithmetic_conversions, comptypes,
697 cxx_sizeof_or_alignof_type, perform_integral_promotions,
698 build_class_member_access_expr, finish_class_member_access_expr,
699 build_ptrmemfunc_access_expr, build_unary_op,
700 unary_complex_lvalue, cxx_mark_addressable, build_modify_expr,
701 build_ptrmemfunc, expand_ptrmemfunc_cst, check_return_expr
702 * typeck2.c (complete_type_check_abstract,
703 abstract_virtuals_error, process_init_constructor,
704 add_exception_specifier): Likewise.
706 2004-08-27 Nathan Sidwell <nathan@codesourcery.com>
708 * class.c (build_vtbl_initializer): Use ssize_int.
709 * decl.c (complete_array_type): Likewise.
710 * method.c (finish_thunk): Likewise.
711 * search.c (get_dynamic_base_type): Likewise.
713 2004-08-26 Richard Henderson <rth@redhat.com>
715 * cp-tree.h (DECL_FIELD_IS_BASE): New.
716 * class.c (build_base_field): Set it.
717 (build_simple_base_path): Use it.
718 (fixed_type_or_null): Don't consider base fields definitive.
720 2004-08-25 Roger Sayle <roger@eyesopen.com>
723 PR tree-optimization/16372
724 * decl.c (finish_enum): Make the precision of the enumerated type
725 the same width as the underlying integer type.
727 2004-08-25 Mark Mitchell <mark@codesourcery.com>
730 * lex.c (build_lang_decl): Set DECL_NO_STATIC_CHAIN for all C++
733 * mangle.c (get_identifier_nocopy): Add cast.
735 * cp-tree.h (mangle_type): Remove.
736 * mangle.c (globals): GTY it.
737 (mangle_obstack): New variable.
738 (name_obstack): Likewise.
739 (name_base): Likewise.
740 (write_char): Adjust accordingly.
741 (write_chars): Likewise.
742 (write_string): Likewise.
743 (start_mangling): Initialize G.substitutions only one. Add
745 (finish_mangling): Use VARRAY_CLEAR to reclaim
746 storage in G.substitutions. Use obstack_finish.
747 (init_mangle): Adjust for changes to variable names above.
748 Initialize G.substitutions.
749 (mangle_decl_string): Adjust call to start_mangling.
750 (get_identifier_nocopy): New function.
751 (mangle_decl): Use it.
752 (mangle_type_string): Adjust call to start_mangling.
753 (mangle_special_for_type): Likewise.
754 (mangle_vtt_for_type): Likewise.
755 (mangle_ctor_vtbl_for_type): Likewise.
756 (mangle_thunk): Likewise.
757 (mangle_guard_variable): Likewise.
758 (mangle_ref_init_variable): Likewise.
760 2004-08-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
763 * pt.c (redeclare_class_template): Check the type of non-type and
764 template template parameter.
766 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
768 * call.c (convert_class_to_reference): Adjust build_int_cst calls.
769 (build_user_type_conversion_1, convert_like_real,
770 build_java_interface_fn_ref, build_special_member_call): Likewise.
771 * class.c (finish_struct_1, build_vtbl_initializer): Likewise.
772 * cp-gimplify.c (cp_gimplify_expr): Likewise.
773 * cvt.c (cp_convert_to_pointer): Likewise.
774 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
775 * decl2.c (start_static_initialization_or_destruction,
776 generate_ctor_or_dtor_function): Likewise.
777 * except.c (build_throw): Likewise.
778 * mangle.c (write_integer_cst): Likewise.
779 * method.c (finish_thunk): Likewise.
780 * rtti.c (build_headof, get_tinfo_decl_dynamic,
781 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
782 get_pseudo_ti_init): Likewise.
783 * search.c (get_dynamic_cast_base_type): Likewise.
785 2004-08-25 Zack Weinberg <zack@codesourcery.com>
787 * class.c, search.c: Remove references to DWARF_DEBUG.
789 2004-08-25 Adam Nemet <anemet@lnxw.com>
791 * repo.c (extract_string): Reset backquote after one character.
792 (get_base_filename): Fix indentation.
794 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
796 * decl.c (cxx_init_decl_processing): Adjust
797 build_common_tree_nodes call.
799 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
802 * (is_subobject_of_p): Resurrect & optimize.
803 (lookup_field_r): Use it.
805 2004-08-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
808 * search.c (friend_accessible_p): Increment processing_template_decl
809 when deal with TEMPLATE_DECL of SCOPE.
811 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
814 * semantics.c (check_accessibility_of_qualified_id): Defer check
815 if qualifying_type is a template parameter.
817 2004-08-23 Mark Mitchell <mark@codesourcery.com>
820 * pt.c (instantiate_decl): Do not try to apply
821 DECL_DECLARED_INLINED_P to a VAR_DECL.
823 * search.c (build_baselink): Fix typo in comment.
825 2004-08-22 Andrew Pinski <apinski@apple.com>
828 2004-08-22 Andrew Pinski <apinski@apple.com>
830 * typeck.c (build_unary_op): Use &a.b if the folded lowered
831 expression is not constant.
833 2004-08-23 Nathan Sidwell <nathan@codesourcery.com>
835 * name-lookup.c (pushdecl): Rename build_type_copy call.
836 * tree.c (cp_build_qualified_type_real,
837 build_exception_variant, handle_java_interface_attribute): Likewise.
839 2004-08-22 Andrew Pinski <apinski@apple.com>
842 * typeck.c (build_unary_op): Use &a.b if the folded lowered
843 expression is not constant.
845 2004-08-20 Mark Mitchell <mark@codesourcery.com>
848 * decl.c (expand_static_init): Use DECL_FUNCTION_SCOPE_P.
850 2004-08-21 Joseph S. Myers <jsm@polyomino.org.uk>
853 * pt.c (tsubst_copy_and_build): Avoid clearing TREE_NO_WARNING for
856 2004-08-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
858 * pt.c (register_specialization): Check DECL_TEMPLATE_SPECIALIZATION
859 before calling comp_template_args.
861 2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
863 * class.c (build_vtbl_initializer): Use build_int_cst for
865 * decl.c (complete_array_type): Likewise.
866 * method.c (finish_thunk): Likewise.
868 2004-08-20 Andreas Tobler <a.tobler@schweiz.ch>
870 * tree.c: Remove unused mark_local_for_remap_r.
872 2004-08-19 Eric Christopher <echristo@redhat.com>
874 * cp-tree.h (cxx_unsave_expr_now): Delete prototype.
875 * tree.c (cxx_unsave_expr_now): Delete.
876 (cp_unsave_r): Ditto.
878 2004-08-19 Mark Mitchell <mark@codesourcery.com>
881 * pt.c (push_template_decl_real): Disallow template allocation
882 functions with fewer than two parameters.
884 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
886 * cp-tree.h (build_shared_int_cst): Remove.
887 * tree.c (shared_int_cache): Remove.
888 (build_shared_int_cst): Remove.
889 * class.c (finish_struct_1): Use build_int_cst.
891 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
893 * decl.c (finish_enum): Do not copy value node early, copy
895 * lex.c (cxx_init): Force null_node to be unique.
897 2004-08-19 Joseph S. Myers <jsm@polyomino.org.uk>
900 * pt.c (tsubst_copy, tsubst_copy_and_build): Copy TREE_NO_WARNING
901 from input for MODOP_EXPR.
903 2004-08-18 Mark Mitchell <mark@codesourcery.com>
905 * pt.c (dependent_template_p): Fix typo in commment.
908 * pt.c (dependent_template_p): Treat IDENTIFIER_NODEs as
911 2004-08-17 Mark Mitchell <mark@codesourcery.com>
914 * pt.c (unify): Tidy ARRAY_TYPE handling. Make sure that non-type
915 arguments have the same type as the corresponding parameter.
918 * parser.c (cp_parser_name_lookup_error): If parser->object_scope
919 is set use it for diagnostic purposes.
920 (cp_parser_pseudo_destructor_name): Remove special-case error
924 * semantics.c (expand_or_defer_fn): Honor -fkeep-inline-functions.
927 * cp-tree.h (qualified_name_lookup_error): Add parameter.
928 * name-lookup.c (do_class_using_decl): Restrict set of entities
929 passed to cp_emit_debug_info_for_using more carefully.
930 (lookup_qualified_name): Allow lookup_member to return sets of
932 * parser.c (cp_parser_lookup_name): Add ambiguous_p parameter.
933 (cp_parser_primary_expression): Handle ambiguous lookups.
934 (cp_parser_template_name): Adjust use of cp_parser_lookup_name.
935 (cp_parser_template_argument): Likewise.
936 (cp_parser_elaborate_type_specifier): Likewise.
937 (cp_parser_namespace_name): Likewise.
938 (cp_parser_class_name): Likewise.
939 (cp_parser_lookup_name_simple): Likewise.
940 * pt.c (tsubst_qualified_id): Handle ambiguous results.
941 (tsubst_expr): Likewise.
942 * semantics.c (qualified_name_lookup_error): Add decl paramter.
943 For ambiguous lookups, print candidates.
945 2004-08-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
948 * pt.c (instantiate_pending_templates): Add int parameter. Don't
950 * cp-tree.h (instantiate_pending_templates): Adjust prototype.
951 * decl2.c (finish_file): Adjust call to
952 instantiate_pending_templates.
954 2004-08-15 Roger Sayle <roger@eyesopen.com>
956 * call.c (build_vfield_ref, build_call, build_conditional_expr,
957 convert_arg_to_ellipsis, build_x_va_arg, build_over_call,
958 build_java_interface_fn_ref, build_special_member_call,
959 build_new_method_call, initialize_reference): Replace calls to
960 build with calls to buildN.
961 * class.c (build_base_path, convert_to_base_statically,
962 build_vfn_ref, instantiate_type, dfs_accumulate_vtbl_inits,
963 build_vtbl_initializer): Likewise.
964 * cp-gimplify.c (genericize_try_block, genericize_catch_block,
965 gimplify_if_stmt, cp_genericize_r): Likewise.
966 * cvt.c (convert_to_void): Likewise.
967 * decl.c (check_initializer, finish_constructor_body,
968 finish_destructor_body): Likewise.
969 * error.c (dump_expr): Likewise.
970 * except.c (build_exc_ptr, expand_start_catch_block, build_throw):
972 * init.c (perform_member_init, expand_virtual_init,
973 expand_cleanup_for_base, build_init, expand_default_init,
974 build_offset_ref, decl_constant_value, build_new, build_new_1,
975 build_vec_delete_1, build_vec_init, build_delete,
976 push_base_cleanups, build_vec_delete): Likewise.
977 * mangle.c (write_integer_cst): Likewise.
978 * method.c (thunk_adjust, do_build_copy_constructor,
979 do_build_assign_ref): Likewise.
980 * pt.c (lookup_template_function, tsubst, tsubst_copy_and_build,
981 unify, build_non_dependent_expr): Likewise.
982 * rtti.c (build_headof, build_typeid, ifnonnull,
983 build_dyanmic_cast_1, tinfo_base_init): Likewise.
984 * semantics.c (begin_compound_stmt, finish_call_expr,
985 finish_pseudo_destructor_expr, finish_id_expression,
986 simplify_aggr_init_expr, finalize_nrv_r): Likewise.
987 * tree.c (build_target_expr, build_cplus_new, array_type_nelts_top,
988 array_type_nelts_total, stabilize_call): Likewise.
989 * typeck.c (decay_conversion, build_class_member_access_expr,
990 lookup_destructor, build_ptrmemfunc_access_expr, build_array_ref,
991 get_member_function_from_ptrfunc, build_binary_op, pointer_diff,
992 build_x_unary_op, build_unary_op, unary_complex_lvalue,
993 build_compound_expr, build_modify_expr, expand_ptrmemfunc_cst,
994 check_return_expr): Likewise.
995 * typeck2.c (split_nonconstant_1, split_nonconstant_init_1,
996 split_nonconstant_init, store_init_value, build_m_component_ref):
999 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
1001 * call.c (convert_class_to_reference,
1002 build_user_type_conversion_1, convert_like_real,
1003 build_java_interface_fn_ref, build_special_member_call): Use
1005 * class.c (build_vtbl_initializer): Likewise.
1006 * cp-gimplify.c (cp_gimplify_expr): Likewise.
1007 * cvt.c (cp_convert_to_pointer): Likewise.
1008 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
1009 * decl2.c (start_static_initialization_or_destruction,
1010 generate_ctor_or_dtor_function): Likewise.
1011 * except.c (build_throw): Likewise.
1012 * lex.c (cxx_init): Likewise.
1013 * mangle.c (write_integer_cst): Likewise.
1014 * rtti.c (build_headof, get_tinfo_decl_dynamic,
1015 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
1016 get_pseudo_ti_init): Likewise.
1017 * search.c (get_dynamic_cast_base_type): Likewise.
1018 * tree.c (build_shared_int_cst): Likewise.
1020 2004-08-12 Mark Mitchell <mark@codesourcery.com>
1023 * class.c (count_depth_data): New type.
1024 (dfs_depth_post): New function.
1025 (dfs_depth_q): Likewise.
1026 (find_final_overrider_data_s): Change type of vpath.
1028 (dfs_find_final_overrider_1): New function.
1029 (dfs_find_final_overrider): Use it.
1030 (dfs_find_final_overrider_q): Adjust use of vpath.
1031 (dfs_find_final_overrider_post): Likewise.
1032 (find_final_overrider): Use dfs_depth. Allocate and deallocate
1035 2004-08-12 Jan Beulich <jbeulich@novell.com>
1037 * parser.c (cp_parser_asm_definition): Properly consume scope operator
1038 tokens preceding the clobbers. Don't check for scope operator
1039 following inputs. Simplify inputs handling to match that now used for
1042 2004-08-11 Mark Mitchell <mark@codesourcery.com>
1045 * except.c (build_throw): Allocate cleanup_type and the function
1046 for __cxa_throw separately.
1049 * call.c (standard_conversion): Do not accept conversions between
1050 pointers to members if the class types are unrelated.
1053 * parser.c (cp_parser_builtin_offsetof): Cast to "const volatile
1054 char &" instead of just "char &".
1057 * pt.c (tsubst): Just return the unknown_type_node.
1059 2004-08-11 Mark Mitchell <mark@codesourcery.com>
1062 * parser.c (cp_parser_class_specifier): Robustify.
1065 * pt.c (tsubst_copy_and_build): Complain about invalid
1069 * pt.c (tsubst_default_argument): Clear out current_class_ptr and
1070 current_class_ref while tsubsting.
1072 2004-08-10 Mark Mitchell <mark@codesourcery.com>
1075 * parser.c (cp_parser_init_declarator): Robustify.
1077 2004-08-06 Richard Sandiford <rsandifo@redhat.com>
1079 * typeck2.c (process_init_constructor): Guard the missing field warning
1080 with warn_missing_field_initializers rather than extra_warnings.
1082 2004-08-06 Paolo Bonzini <bonzini@gnu.org>
1084 * class.c (instantiate_type) <ENTRY_VALUE_EXPR>: Do not handle.
1086 2004-08-05 Mark Mitchell <mark@codesourcery.com>
1088 * decl.c (start_preparsed_function): Move determine_visibility
1090 * decl2.c (determine_visibility): Incorporate dllexport testing.
1092 2004-08-05 Geoffrey Keating <geoffk@apple.com>
1094 * g++spec.c (lang_specific_driver): An -Xlinker or -Wl, option
1095 means that libstdc++ is needed.
1097 2004-08-05 Nathan Sidwell <nathan@codesourcery.com>
1099 * cvt.c (cp_convert_to_pointer): Adjust force_fit_type call.
1101 2004-08-04 Geoffrey Keating <geoffk@apple.com>
1103 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_ASSEMBLER_NAME rather
1104 than passing it as a parameter to rest_of_decl_compilation.
1105 * decl2.c (grokfield): Use set_user_assembler_name.
1107 2004-08-04 Nathan Sidwell <nathan@codesourcery.com>
1109 * decl.c (complete_array_type): Don't gratuitously copy
1110 maxindex. Its type is always set.
1112 2004-08-04 Paul Brook <paul@codesourcery.com>
1114 * Make-lang.in (cp/semantics.o, cp/optimize.o): Depend on TARGET_H.
1115 * cp-tree.h (struct language_function): Rename x_dtor_label to
1117 (dtor_label): Rename ...
1118 (cdtor_label): ... to this.
1119 * decl.c (begin_constructor_body): Remove.
1120 (check_special_function_return_type): Maybe change the return type.
1121 (grokdeclarator): Pass the class type.
1122 (start_preparsed_function): Constructors may need a return label.
1123 (finish_constructor_body, finish_destructor_body): Set the return
1125 (begin_function_body): Don't call begin_constructor_body.
1126 (finish_function): Don't warn for constructors or destructors.
1127 (implicitly_declare_fn): Maybe change the return type.
1128 * optimize.c: Include target.h.
1129 (maybe_clone_body): Remap the function result.
1130 * semantics.c: Include target.h.
1131 (finish_return_stmt): Maybe jump to return label for constructors.
1133 2004-08-03 Mark Mitchell <mark@codesourcery.com>
1135 * class.c (build_vtable): Do not set DECL_VISIBILITY here.
1136 (check_field_decls): Or here.
1137 (check_methods): Or here.
1138 (initialize_array): Don't mess with DECL_CONTEXT.
1139 * cp-tree.h (start_decl): Adjust prototype.
1140 (determine_visibility): New function.
1141 * decl.c (duplicate_decls): Remove checks for hidden "operator
1143 (build_library_fn_1): Give all library functions default
1145 (start_decl): Add pop_scope_p parameter. Tidy.
1146 (cp_finish_decl): Do not pop scopes here. Call
1147 determine_visibility for variable definitions.
1148 (start_preparsed_function): Call determine_visibility.
1149 * decl2.c (determine_visibility): New function.
1150 * method.c (use_thunk): Fix formatting.
1151 * parser.c (cp_parser_condition): Adjust calls to start_decl.
1152 (cp_parser_init_declarator): Likewise.
1153 * pt.c (instantiate_decl): Always call pop_nested_class.
1154 * rtti.c (get_tinfo_decl): Do not set DECL_VISIBILITY.
1155 (tinfo_base_init): Likewise.
1157 2004-08-02 Mark Mitchell <mark@codesourcery.com>
1160 * name-lookup.c (validate_nonmember_using_decl): Robustify.
1162 2004-08-01 Mark Mitchell <mark@codesourcery.com>
1165 * name-lookup.c (decl_namespace): Remove.
1166 (current_decl_namespace): Use decl_namespace_context instead of
1168 (push_decl_namespace): Likewise.
1169 (arg_assoc_class): Likewise.
1170 (arg_assoc_type): Likewise.
1171 * pt.c (check_specialization_namespace): New function.
1172 (maybe_process_partial_specialization): Use it.
1173 (register_specialization): Likewise.
1176 * cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): New macro.
1177 * call.c (null_ptr_cst_p): Handle variables with constant
1179 * pt.c (convert_nontype_argument): Use
1180 DECL_INTEGRAL_CONSTANT_VAR_P.
1181 * semantics.c (finish_id_expression): Likewise.
1184 * decl.c (duplicate_decls): Reject duplicate namespace
1188 * typeck.c (build_ptrmemfunc): Loosen assertion.
1190 2004-08-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
1192 * call.c (z_candidate::template_decl): Rename from template.
1193 (add_template_candidate_real): Adjust member reference.
1196 2004-07-29 Mark Mitchell <mark@codesourcery.com>
1198 * cp-tree.h (IDENTIFIER_REPO_CHOSEN): Define.
1199 (lang_decl_flags): Narrow the width of "languages". Add
1201 (DECL_NEEDED_P): Remove.
1202 (FOR_EACH_CLONE): New macro.
1203 (DECL_REPO_AVAILABLE_P): Likewise.
1204 (DECL_TINFO_P): Likewise.
1205 (set_linkage_according_to_type): Declare.
1206 (import_export_vtable): Remove.
1207 (import_export_tinfo): Likewise.
1208 (mark_needed): New function.
1209 (decl_needed_p): Likewise.
1210 (note_vauge_linkage_fn): Likewise.
1211 (init_repo): Change prototype.
1212 (repo_template_used): Remove.
1213 (repo_template_instantiated): Likewise.
1214 (repo_emit_p): New function.
1215 (repo_export_class_p): Likewise.
1216 (no_linkage_check): Change prototype.
1217 * class.c (set_linkage_according_to_type): New function.
1218 (build_vtable): Use it. Do not call import_export_vtable. Set
1219 DECL_IGNORED_P if appropriate.
1220 * decl.c (duplicate_decls): Preserve DECL_REPO_AVAILABLE_P.
1221 (make_rtL_for_nonlocal_decls): Check for template instantiations
1223 (grokfndecl): Adjust call to no_linkage_check.
1224 (set_linkage_for_static_data_member): New function.
1225 (grokvardecl): Use it. Adjust call to no_linkage_check.
1226 (grokdeclarator): Use set_linkage_for_static_data_member.
1227 * decl2.c (note_vague_linkage_fn): New function.
1228 (note_vague_linkage_var): Likewise.
1229 (finish_static_data_member_decl): Use it.
1230 (import_export_vtable): Remove.
1231 (import_export_class): Use repo_export_class_p.
1232 (var_finalized_p): Simplify.
1233 (maybe_emit_vtables): Simplify.
1234 (mark_needed): New function.
1235 (decl_needed_p): Likewise.
1236 (import_export_decl): Add documentation and consistency checks.
1237 Use repo_emit_p. Handle virtual tables and RTTI information
1239 (import_export_tinfo): Remove.
1240 (write_out_vars): Call import_export_decl.
1241 (cxx_callgraph_analyze_expr): Ensure that all vtables are emitted
1243 (finish_file): Use decl_needed_p. Do not call import_export_decl
1244 for undefined static data members. Do not warn about undefined
1245 inlines when using a repository.
1246 (mark_used): Use note_vague_linkage_fn. Always defer template
1248 * lex.c (cxx_init): Adjust call to init_repo. Always set
1249 flag_unit_at_a-time.
1250 * method.c (synthesize_method): Remove unncessary
1251 import_export_decl call.
1252 (implicitly_declare_fn): Use set_linkage_according_to_type.
1253 * optimize.c (maybe_clone_body): Use FOR_EACH_CLONE.
1254 * pt.c (instantiate_class_template): Don't redundantly add classes
1255 to keyed_classes. Don't call repo_template_used.
1256 (tsubst_decl): Set DECL_INTERFACE_KNOWN for instantiations of
1257 templates with internal linkage.
1258 (check_instantiated_args): Adjust call to no_linkage_check.
1259 (instantiate_template): Use FOR_EACH_CLONE.
1260 (mark_definable): New function.
1261 (mark_decl_instantiated): Use it.
1262 (do_decl_instantiation): Adjust tests for explicit instantiation
1263 after "extern template".
1264 (instantiate_class_member): Do not use repo_template_instantiated.
1265 (do_type_instantiation): Simplify.
1266 (instantiate_decl): Use mark_definable. Check repo_emit_p.
1268 * repo.c (repo_get_id): Remove.
1269 (original_repo): Remove.
1270 (IDENTIFIER_REPO_USED): Remove.
1271 (IDENTIFIER_REPO_CHOSEN): Remove.
1272 Remove all #if 0'd code.
1273 (repo_template_used): Remove.
1274 (repo_template_instantiated): Remove.
1275 (temporary_obstack_initialized_p): New variable.
1276 (init_repo): Register with lang_post_pch_load. Avoid creating
1277 identifiers unnecessarily. Don't use original_repo. Close the
1279 (reopen_repo_file_for_write): Not here.
1280 (finish_repo): Always write out a new repository file.
1281 (repo_emit_p): New function.
1282 (repo_export_class_p): Likewise.
1283 * rtti.c (get_tinfo_decl): Use set_linkage_according_to_type.
1284 (involves_incomplete_p): New function.
1285 (tinfo_base_init): Use it.
1286 (ptr_initializer): Remove non_public_ptr parameter.
1287 (ptm_initializer): Likewise.
1288 (get_pseudo_ti_init): Likewise.
1289 (unemitted_tinfo_decl_p): Remove.
1290 (emit_tinfo_decl): Use import_export_decl.
1291 * semantics.c (expand_body): Move updates of static_ctors and
1293 (expand_or_defer_fn): ... here.
1294 * tree.c (no_linkage_check): Add relaxed_p parameter.
1296 2004-07-28 Eric Christopher <echristo@redhat.com>
1298 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
1300 2004-07-28 Nathan Sidwell <nathan@codesourcery.com>
1302 * cp-tree.h (struct tree_pair_s): New.
1303 (typedef tree_pair_p): New.
1304 (DEF_VEC_O(tree_pair_s)): New.
1305 (struct lang_type_class): Make vcall_indices a VEC(tree_pair_s).
1306 (CLASSTYPE_VCALL_INDICES): Update documentation.
1307 * class.c (get_vcall_index): Adjust.
1308 (add_vcall_offset): Adjust.
1310 2004-07-27 Kelley Cook <kcook@gcc.gnu.org>
1312 * pt.c, typeck.c: Remove spurious carriage returns.
1314 2004-07-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1317 * pt.c (coerce_template_template_parms) <PARM_DECL case>: Only check
1318 when the type of ARG is not dependent.
1320 2004-07-26 Geoffrey Keating <geoffk@apple.com>
1322 * g++spec.c (LIBSTDCXX_PROFILE): Default to LIBSTDCXX.
1323 (lang_specific_driver): If the C++ or math library options don't
1324 start with '-l', don't count them as added libraries.
1326 2004-07-26 Nathan Sidwell <nathan@codesourcery.com>
1328 * decl.c (xref_basetypes): Adjust base access vector creation.
1329 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Adjust base
1331 * search.c (dynamic_cast_base_recurse, dfs_access_in_type): Likewise.
1333 2004-07-26 Niall Douglas <s_fsfeurope2@nedprod.com>
1334 Brian Ryner <bryner@brianryner.com>
1338 * class.c (check_field_decls): Apply hidden visibility if
1339 -fvisibility-inlines-hidden and inlined unless otherwise specified
1340 (build_vtable): Set vtable visibility to class visibility.
1341 (check_field_decls): Default static member visibility to class
1343 (check_methods): Default method visibility to class visibility.
1344 * cp-tree.h: Added CLASSTYPE_VISIBILITY and
1345 CLASSTYPE_VISIBILITY_SPECIFIED macro.
1346 * decl.c (duplicate_decls): New logic for merging definition decls
1347 with declaration decls. Added ignore & warning when non default
1348 applied to global operator new or delete.
1349 * method.c, optimize.c, rtti.c: Added setting of VISIBILITY_SPECIFIED
1350 wherever VISIBILITY was changed
1351 * rtti.c (get_tinfo_decl): Set typeinfo visibility to class
1353 (tinfo_base_init): Set typeinfo name visibility to class visibility.
1355 2004-07-25 Bernardo Innocenti <bernie@develer.com>
1357 * decl.c: Rename all identifiers named `class' to `cl'.
1358 * cp-tree.h: Likewise.
1360 2004-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
1362 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Use GGC_CNEW.
1363 * typeck2.c (abstract_virtuals_error): Use GGC_NEW.
1364 * name-lookup.c (binding_entry_make): Use GGC_NEW.
1365 (binding_table_construct): Use GGC_CNEWVEC.
1366 (binding_table_new): Use GGC_NEW.
1367 (cxx_binding_make): Likewise.
1368 (begin_scope): Likewise.
1369 (push_to_top_level): Use GCC_CNEW.
1370 * parser.c (cp_token_cache_new): Likewise.
1371 (cp_token_cache_push_token): Likewise.
1372 (cp_lexer_new_main): Likewise.
1373 (cp_lexer_new_from_tokens): Likewise.
1374 (cp_parser_context_new): Likewise.
1375 (cp_parser_new): Likewise.
1376 (cp_lexer_new_from_tokens): Use GGC_NEWVEC.
1377 * lex.c (cxx_make_type): Use GGC_CNEW.
1378 (retrofit_lang_decl): Use GGC_NEWVAR.
1379 (cxx_dup_lang_specific_decl): Likewise.
1380 (copy_lang_type): Likewise.
1381 * decl.c (use_label): Use GGC_NEW instead of ggc_alloc.
1382 (save_function_data): Likewise.
1383 (lookup_label): Use GGC_CNEW instead of ggc_alloc_cleared.
1384 (cxx_push_function_context): Likewise.
1386 2004-07-25 Richard Henderson <rth@redhat.com>
1388 * decl.c (start_preparsed_function): Set DECL_ARTIFICIAL and
1389 DECL_IGNORED_P on RESULT_DECL.
1390 * semantics.c (finalize_nrv): Copy them too.
1392 2004-07-23 Nathan Sidwell <nathan@codesourcery.com>
1394 * search.c (lookup_conversion_operator): Avoid two loops.
1395 (add_conversions): Remove.
1396 (check_hidden_convs, split_conversions,
1397 lookup_conversions_r): New.
1398 (lookup_conversions): Use lookup_conversions_r.
1400 2004-07-22 Nathan Sidwell <nathan@codesourcery.com>
1402 * pt.c (get_template_base): Check type is completable.
1404 2004-07-21 Eric Christopher <echristo@redhat.com>
1406 * decl.c (poplevel): Inline unused variable checking.
1409 2004-07-21 Paolo Bonzini <bonzini@gnu.org>
1411 * typeck.c (build_binary_op): Do not use RDIV_EXPR for
1414 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1417 * pt.c (check_explicit_specialization): Remove extension to accept
1418 specializations without template headers. Fall-through to normal
1421 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1424 * pt.c (determine_specialization): New parameter template_count.
1425 Disambiguate between member templates and member functions counting
1426 the template headers.
1427 (check_explicit_specialization): Update caller.
1428 (tsubst_friend_function): Likewise.
1430 2004-07-20 Steven Bosscher <stevenb@suse.de>
1432 * cp-tree.def (TINST_LEVEL): Make it an 'x' node.
1433 * cp-tree.h (tinst_level_t): New tree type.
1434 (union lang_tree_node): Handle it.
1435 (TINST_LOCATION): New accessor macro.
1436 (make_tinst_level): New prototype.
1437 * cp-lang.c (cp_tree_size): Handle TINST_LEVEL.
1438 * decl.c (cp_tree_node_structure): Likewise.
1439 * error.c (print_instantiation_full_context): Use TINST_LOCATION.
1440 (print_instantiation_partial_context): Likewise.
1441 * pt.c (pop_tinst_level): Likewise.
1442 (push_tinst_level): Use make_tinst_level.
1443 * tree.c (make_tinst_level): New function.
1444 (cp_walk_subtrees): Walk TINST_DECL for a TINST_LEVEL node.
1446 2004-07-20 Mark Mitchell <mark@codesourcery.com>
1448 * parser.c (cp_parser_simple_type_specifier): Fix typo.
1451 * parser.c (cp_parser_simple_type_specifier): Do not record usage
1452 of globally-qualified names.
1454 2004-07-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1457 * error.c (dump_type) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Output
1460 2004-07-19 Mark Mitchell <mark@codesourcery.com>
1463 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
1464 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
1465 * class.c (add_implicitly_declared_members): Use
1466 CLASSTYPE_LAZY_ASSIGNMENT_OP.
1467 * method.c (lazily_declare_fn): Clear
1468 CLASSTYPE_LAZY_ASSIGNMENT_OP.
1469 * search.c (lookup_fnfields_1): Check it.
1471 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
1473 * cp-tree.h (vec_binfo_member): Remove.
1474 * tree.c (vec_binfo_member): Remove.
1476 * cp-tree.h (struct lang_type_class): Remove vfields field.
1477 (CLASSTYPE_VFIELDS): Remove.
1478 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
1479 * class.c (determine_primary_base): Remove CLASSTYPE_VFIELDS
1481 (dfs_modify_vtables): Use TYPE_CONTAINS_VPTR_P.
1482 (finish_struct_1): Remove CLASSTYPE_VFIELDS handling.
1483 * init.c (dfs_initialize_vtbl_ptrs): Use TYPE_CONTAINS_VPTR_P.
1485 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
1487 * cp-tree.h (DEF_VEC_P(tree)): Remove here.
1488 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
1490 (BINFO_LANG_SLOTS): Remove.
1491 * tree.c (copy_binfo): Adjust BINFO creation and accessors.
1492 * decl.c (xref_basetypes): Adjust BINFO creation and accessors.
1493 * class.c (check_bases): Adjust BINFO accessors.
1494 (determine_primary_base, finish_struct_bits,
1495 maybe_warn_about_overly_private_class, warn_hidden,
1496 walk_subobject_offsets, propagate_binfo_offsets, end_of_class,
1497 warn_about_ambiguous_bases, get_vfield_name,
1498 dump_class_hierarchy_r, build_vtt_inits, accumulate_vtbl_inits,
1499 add_vcall_offset_vtbl_entries_r): Likewise.
1500 * dump.c (cp_dump_tree): Likewise.
1501 * init.c (sort_mem_initializers, expand_member_init, build_delete,
1502 push_base_cleanups): Likewise.
1503 * method.c (do_build_copy_constructor, do_build_assign_ref,
1504 synthesize_exception_spec): Likewise.
1505 name-lookup.c (arg_assoc_class): Likewise.
1506 * pt.c (instantiate_class_template,
1507 get_template_base_recursive): Likewise.
1508 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Likewise.
1509 * typeck2.c (process_init_constructor): Likewise.
1510 * search.c (lookup_base_r, dynamic_cast_base_recurse,
1511 dfs_access_in_type, dfs_walk_real, look_for_overrides,
1512 types_overlap_p, copied_binfo, original_binfo): Likewise.
1513 (binfo_for_vtable): Remove
1515 2004-07-20 Steven Bosscher <stevenb@suse.de>
1517 * cp-tree.h (struct lang_decl_flags): Unify the template_info and
1518 thunk_alias, and the access and virtual_offset fields.
1519 (THUNK_VIRTUAL_OFFSET, THUNK_ALIAS): Adjust.
1520 * decl.c (finish_case_label): Update c_add_case_node call.
1522 2004-07-19 Mark Mitchell <mark@codesourcery.com>
1524 Revert patch for PR c++/16623.
1526 2004-07-19 Kelley Cook <kcook@gcc.gnu.org>
1528 * except.c: Remove two spurious carriage returns.
1530 2004-07-19 Mark Mitchell <mark@codesourcery.com>
1533 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
1534 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
1535 * class.c (add_implicitly_declared_members): Use
1536 CLASSTYPE_LAZY_ASSIGNMENT_OP.
1537 * method.c (lazily_declare_fn): Clear
1538 CLASSTYPE_LAZY_ASSIGNMENT_OP.
1539 * search.c (lookup_fnfields_1): Check it.
1541 2004-07-19 Nathan Sidwell <nathan@codesourcery.com>
1543 * class.c (add_method): Delay adding the slot until the end.
1544 (determine_primary_base): Adjust VEC_iterate invokation.
1545 (resort_type_method_vec, finish_struct_methods, warn_hidden,
1546 walk_subobject_offsets, end_of_class, warn_about_ambiguous_bases,
1547 build_vtbl_initializer): Likewise.
1548 * init.c (sort_mem_initializers, build_delete, push_base_cleanups,
1549 build_vbase_delete): Likewise.
1550 * method.c (do_build_copy_constructor): Likewise.
1551 * name-lookup.c (new_class_binding, print_binding_level,
1552 poplevel_class, store_class_bindings, push_to_top_level,
1553 pop_from_top_level): Likewise.
1554 * pt.c (check_explicit_specialization): Likewise.
1555 * search.c (lookup_conversion_operator, lookup_fnfields_1,
1556 get_pure_virtuals, add_conversions, dfs_check_overlap,
1557 binfo_for_vbase): Likewise.
1559 2004-07-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1562 * pt.c (unify) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Use only
1563 innermost set of template arguments during deduction. Simplify.
1565 2004-07-19 Joseph S. Myers <jsm@polyomino.org.uk>
1567 * typeck.c (build_modify_expr, build_x_modify_expr): Set
1568 TREE_NO_WARNING on assignments with an operator other than '='.
1570 2004-07-10 Steven Bosscher <stevenb@suse.de>
1571 Joseph S. Myers <jsm@polyomino.org.uk>
1573 * cp-tree.h (C_SET_EXP_ORIGINAL_CODE): Remove.
1574 * decl2.c (grokfield): Don't check current_class_depth via
1575 unused TREE_COMPLEXITY.
1576 * semantics.c (finish_parenthesized_expr): Set TREE_NO_WARNING
1577 to avoid the missing parentheses warning.
1578 Don't set C_SET_EXP_ORIGINAL_CODE.
1580 2004-07-18 Mark Mitchell <mark@codesourcery.com>
1582 * tree.c (no_linkage_helper): Remove.
1583 (no_linkage_check): Don't use walk_tree_without_duplicates.
1585 * mangle.c (write_expression): Issue a sorry for zero-operand
1588 2004-07-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1591 * init.c (build_offset_ref): Build SCOPE_REF with non-null
1592 TREE_TYPE for non-dependent names.
1593 * typeck.c (build_x_unary_op): Handle non-dependent SCOPE_REF.
1594 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
1595 unknown_type_node as its TREE_TYPE.
1596 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
1597 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
1598 (dump_expr) <SCOPE_REF case>: Likewise.
1600 2004-07-17 Jason Merrill <jason@redhat.com>
1603 * call.c (type_passed_as): Make the invisible reference type
1605 * cp-gimplify.c (gimplify_cleanup_stmt): Rename to
1606 cp_genericize_r. Handle invisible reference lowering.
1607 (is_invisiref_parm): New fn.
1608 (cp_genericize): Adjust the types of invisible reference parms.
1609 Don't repeat the walk for clones.
1610 * decl.c (store_parm_decls): Don't generate any code for clones.
1612 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
1614 * cp-tree.h (builtin_function): Declare.
1616 2004-07-16 Mark Mitchell <mark@codesourcery.com>
1618 * class.c (finish_struct_methods): Remove unncessary code.
1619 (add_implicitly_declared_members): Create declarations for default
1620 constructors and copy constructors lazily.
1621 * cp-tree.h (lang_type_class): Remove lazy_default_ctor and
1623 (CLASSTYPE_LAZY_DEFAULT_CTOR): New macro.
1624 (CLASSTYPE_LAZY_COPY_CTOR): Likewise.
1625 * decl2.c (check_classfn): Robustify.
1626 (locate_dtor): Handle empty CLASSTYPE_METHOD_VEC.
1627 (locate_ctor): Handle lazy default constructors.
1628 (locate_copy): Handle lazy copy constructors.
1629 (implicitly_declare_fn): Make sure we're looking at the
1630 TYPE_MAIN_VARIANT for a class before creating functions. Don't
1631 set TYPE_HAS_CONSTRUCTOR.
1632 (lazily_declare_fn): New function.
1633 * name-lookup.c (constructor_name_full): Simplify.
1634 * search.c (lookup_fnfields_1): Lazily create methods, as
1636 (lookup_for_overrides): Handle empty CLASSTYPE_METHOD_VEC.
1638 2004-07-16 Steven Bosscher <stevenb@suse.de>
1640 * cp-tree.h (struct lang_type): Don't have three GTY options on a
1641 single bit GTY desc.
1643 2004-07-16 Richard Henderson <rth@redhat.com>
1645 * cp-lang.c (LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING): Die.
1646 * cp-tree.h (cp_copy_res_decl_for_inlining): Remove.
1647 * tree.c (cp_copy_res_decl_for_inlining): Remove.
1649 2004-07-16 Nathan Sidwell <nathan@codesourcery.com>
1651 * class.c (finish_struct_bits): Use for loop.
1652 (propagate_binfo_offsets): Do primary binfo outside of loop.
1655 * dump.c (cp_dump_tree): Don't dump the bases if there's no
1658 * pt.c (tsubst) <TREE_BINFO case>: We should never get here.
1660 2004-07-15 Mark Mitchell <mark@codesourcery.com>
1662 * cp-tree.h (lang_type_class): Remove has_real_assign_ref and
1663 has_abstract_assign_ref. Make methods a VEC(tree) *.
1664 (TYPE_HAS_CONST_ASSIGN_REF): Add documentation.
1665 (CLASSTYPE_CONSTRUCTORS): Adjust for changes to CLASSTYPE_METHOD_VEC.
1666 (CLASSTYPE_DESTRUCTORS): Likewise.
1667 (TYPE_HAS_REAL_ASSIGN_REF): Remove.
1668 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
1669 (add_method): Change prototoype.
1670 * class.c (add_method): Remove error_p parameter. Adjust for
1671 changes to CLASSTYPE_METHOD_VEC.
1672 (handle_using_decl): Adjust call to add_method.
1673 (maybe_warn_about_overly_private_class): Adjust for
1674 changes to CLASSTYPE_METHOD_VEC.
1675 (resort_type_method_vec): Likewise.
1676 (finish_struct_methods): Likewise.
1677 (check_for_override): Likewise.
1678 (warn_hidden): Likewise.
1679 (add_implicitly_declared_members): Defer creation of assignment
1680 operators. Adjust call to add_method.
1681 (clone_function_decl): Adjust call to add_method.
1682 (check_bases_and_members): Don't set TYPE_HAS_REAL_ASSIGN_REF.
1683 (finish_struct_1): Use CLASSTYPE_DESTRUCTORS.
1684 * decl.c (grok_special_member_properties): Don't set
1685 TYPE_HAS_ABSTRACT_ASSIGN_REF.
1686 * decl2.c (check_classfn): Adjust for
1687 changes to CLASSTYPE_METHOD_VEC.
1688 * method.c (locate_dtor): Use CLASSTYPE_DESTRUCTORS.
1689 (locate_ctor): Use CLASSTYPE_CONSTRUCTORS.
1690 (locate_copy): Adjust for changes to CLASSTYPE_METHOD_VEC.
1691 (implicitly_declare_fn): Set DECL_SOURCE_LOCATION. Do not call
1693 * pt.c (check_explicit_specialization): Adjust for
1694 changes to CLASSTYPE_METHOD_VEC.
1695 (instantiate_class_template): Do not set
1696 TYPE_HAS_ABSTRACT_ASSIGN_REF.
1697 * ptree.c (cxx_print_type): Don't try to print
1698 CLASSTYPE_METHOD_VEC.
1699 * rtti.c (emit_support_tinfos): Use CLASSTYPE_DESTRUCTORS.
1700 * search.c (lookup_field_r): Adjust for
1701 changes to CLASSTYPE_METHOD_VEC.
1702 (lookup_fnfields): Likewise.
1703 (lookup_conversion_operator): Likewise.
1704 (lookup_fnfields_1): Likewise. Create assignment operators
1706 (look_for_overrides_here): Adjust for
1707 changes to CLASSTYPE_METHOD_VEC.
1708 (add_conversions): Likewise.
1709 * semantics.c (finish_member_declaration): Adjust call to add_method.
1711 2004-07-15 Jason Merrill <jason@redhat.com>
1713 * cp-lang.c (cxx_types_compatible_p): To the middle-end,
1714 references and pointers are compatible.
1716 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
1718 * decl.c (xref_basetypes): Refactor.
1719 * tree.c (copy_base_binfos): Replace with ...
1720 (copy_binfo): ... this. Deep copy the given binfo, (not the just
1721 bases of the given base).
1722 * cp-tree.h (copy_base_binfo): Remove.
1723 (copy_binfo): Declare.
1725 2004-07-15 Mark Mitchell <mark@codesourcery.com>
1727 * name-lookup.c (set_inherited_value_binding_p): Add class_type
1729 (get_class_binding): Adjust.
1730 (push_class_level_binding): Don't use set_inherited_value_binding_p.
1732 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
1734 * class.c (finish_struct_bits): Don't set TYPE_HAS_CONVERSION here.
1735 * decl.c (xref_basetypes): Set it here.
1737 * class.c (check_bases): Don't set CLASSTYPE_NON_AGGREGATE here.
1738 Don't check for incomplete base.
1739 (get_vfield_name): Simplify while loop.
1740 * decl.c (xref_basetypes): Set CLASSTYPE_NON_AGGREGATE here.
1742 2004-07-14 Mark Mitchell <mark@codesourcery.com>
1744 * lex.c (cxx_make_type): Remove call to get_pointer_type.
1746 * cp-tree.h (IDENTIFIER_VALUE): Remove.
1747 (BINFO_PUSHDECLS_MARKED): Likewise.
1748 (maybe_inject_for_scope_var): Likewise.
1749 (push_class_decls): Likewise.
1750 * name-lookup.h (push_class_binding): Remove.
1751 (innermost_non_namespace_value): New function.
1752 (outer_binding): Likewise.
1753 * class.c (add_method): Push bindings before adding to
1755 (restore_class_cache): Do not restore class_shadowed.
1756 (pushclass): Do not add USING_DECLs. Do not call
1758 * config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c.
1759 * decl.c (pushdecl): Use outer_binding.
1760 (poplevel): Set the scope for an out-of-scope for-loop declaration
1762 (cp_finish_decl): Don't call maybe_inject_for_scope_var.
1763 * name-lookup.c (new_class_binding): New function.
1764 (push_binding): Use it.
1765 (pushdecl): Use innermost_non_namespace_value.
1766 (maybe_inject_for_scope_var): Remove.
1767 (push_class_binding): Remove.
1768 (set_inherited_value_binding_p): New function.
1769 (get_class_binding): New function.
1770 (push_class_level_binding): Assert that the current_class_type is
1772 (outer_binding): New function.
1773 (innermost_non_namespace_value): Likewise.
1774 (lookup_name_real): Use outer_binding.
1775 (lookup_name_current_level): Ignore out-of-scope variables.
1776 * pt.c (check_template_shadow): Use innermost_non_namespace_value.
1777 (lookup_template_class): Likewise.
1778 * search.c (dfs_push_type_decls): Remove.
1779 (dfs_push_decls): Likewise.
1780 (setup_class_bindings): Likewise.
1781 (lookup_field_1): Handle USING_DECLs from dependent scopes.
1782 (marked_pushdecls_p): Remove.
1783 (unmarked_pushdecls_p): Remove.
1784 (marked_identifiers): Remove.
1785 (setup_class_bindings): Remove.
1786 (dfs_push_type_decls): Remove.
1787 (dfs_push_decls): Remove.
1788 (push_class_decls): Remove.
1790 2004-07-13 Mark Mitchell <mark@codesourcery.com>
1794 * decl.c (grokvardecl): Make declspecs parameter const.
1795 (grokdeclarator): Likewise. Adjust accordingly.
1796 * decl.h (grokdeclarator): Adjust declaration.
1797 * parser.c (cp_parser_init_declarator): Do not clear
1798 decl_specifiers->attributes.
1800 * cp-tree.h (lang_identifier): Remove class_value.
1801 (IDENTIFIER_CLASS_VALUE): Remove.
1802 (pop_class_decls): Likewise.
1803 (init_search_processing): Likewise.
1804 * class.c (handle_using_decl): Use lookup_member, not
1805 IDENTIFIER_CLASS_VALUE.
1806 (restore_class_cache): New function, split out from ...
1807 (pushclass): ... here. Do not call clear_identifier_class_values.
1808 (invalidate_class_lookup_cache): Do not clear
1809 IDENTIFIER_CLASS_VALUE.
1810 (popclass): Do not call pop_class_decls.
1811 (maybe_note_name_used_in_class): Do not save names looked up after
1812 the class is complete. Use lookup_member, not
1813 IDENTIFIER_CLASS_VALUE.
1814 * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
1815 * decl.c (cxx_init_decl_processing): Do not call
1816 init_search_processing.
1817 * method.c (do_build_copy_constructor): Remove unnecessary code.
1818 (do_build_assign_ref): Likewise.
1819 * name-lookup.c (pushdecl): Use lookup_member, not
1820 IDENTIFIER_CLASS_VALUE.
1821 (set_identifier_type_value_with_scope): Set TREE_TYPE on the
1823 (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
1824 (push_class_binding): Do not set it.
1825 (clear_identifier_class_values): Remove.
1826 (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
1827 (store_binding): Do not save it.
1828 (pop_from_top_level): Do not restore it.
1829 * name-lookup.h (cxx_saved_binding): Remove class_value.
1830 (clear_identifier_class_values): Remove.
1831 * ptree.c (cxx_print_identifier): Do not print
1832 IDENTIFIER_CLASS_VALUE.
1833 * search.c (search_obstack): Remove.
1834 (push_stack_level): Remove.
1835 (pop_stack_level): Remove.
1836 (search_level): Remove.
1837 (search_stack): Remove.
1838 (lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
1839 (setup_class_bindings): Use IDENTIFIER_MARKED, not
1840 IDENTIFIER_CLASS_VALUE.
1841 (marked_identifiers): New variable.
1842 (push_class_decls): Clear IDENTIFIER_MARKED.
1843 (pop_class_decls): Don't call pop_search_level.
1844 (init_search_processing): Remove.
1846 2004-07-12 Mark Mitchell <mark@codesourcery.com>
1848 * cp-tree.h (get_aggr_typedef): Remove.
1849 * init.c (get_aggr_typedef): Likewise.
1851 * name-lookup.c (push_class_level_binding): Simplify.
1853 2004-07-12 Andrew Pinski <apinski@apple.com>
1857 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
1859 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
1862 2004-07-12 Eric Christopher <echristo@redhat.com>
1864 * parser.c (cp_parser_class_head): Remove unused variable.
1866 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1868 * decl.c (grok_op_properties): Reject [de-]allocation functions
1869 declared in a namespace, or declared as static.
1871 2004-07-12 Nathan Sidwell <nathan@codesourcery.com>
1873 * cp-tree.h (make_binfo): Remove.
1874 * decl.c (xref_basetypes): Use make_tree_binfo directly.
1875 * tree.h (copy_base_binfos): Likewise.
1876 (make_binfo): Remove.
1878 * call.c (build_user_type_conversion_1, build_new_op,
1879 check_constructor_callable, build_temp,
1880 perform_direct_initialization_of_possible): Pass type directly to
1881 lookup_fnfields & build_special_member_call.
1882 (build_special_member_call): Accept a type, and complete it.
1883 * class.c (finish_stuct_bits): Copy the BINFOs here.
1884 * cvt.c (ocp_convert): Pass type directly to
1885 build_special_member_call.
1886 * decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
1887 (xref_basetypes): Allocate the binfo here. Adjust.
1888 * init.c (build_init, build_new_1): Pass type directly to
1889 build_special_member_call.
1890 * lex.c (cxx_make_type): Do not allocate binfo here.
1891 * name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
1892 * parser.c (cp_parser_class_head): Always call xref_basetypes.
1893 * pt.c (instantiate_class_template): Likewise. Inhibit access
1894 checking for template friends.
1895 * ptree.c (cxx_print_type): Adjust record printing.
1896 * search.c (lookup_base): When taking a type, complete it before
1897 looking for a binfo.
1898 (lookup_member): Delay completing a type.
1899 (push_class_decls): Don't walk an incomplete type.
1900 (lookup_conversions): Likewise.
1901 * semantics.c (finish_stmt_expr_expr): Pass type directly to
1902 build_special_member_call.
1903 * tree.c (copy_base_binfos): Adjust.
1904 (make_binfo): Likewise.
1905 * typeck.c (build_modify_expr): Pass type directly to
1906 build_special_member_call.
1907 * typeck2.c (process_init_constructor): Check a binfo exists.
1908 (build_m_component_ref): Allow accessing an incomplete type.
1909 (build_functional_cast): Pass type directly to
1910 build_special_member_call.
1912 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1915 * config-lang.in (gtfiles): Add typeck2.c.
1916 * Make-lang.in: Tweak typeck2.c dependencies, and add rule for
1918 * cp-tree.h: Declare complete_type_check_abstract.
1919 * typeck2.c (pat_calc_hash, pat_compare,
1920 complete_type_check_abstract): New functions.
1921 (abstract_virtuals_error): If the type is abstract, register the
1922 declaration within abstract_pending_vars for further checks.
1923 Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
1924 * decl.c (cp_finish_decl): Do not strip array types.
1925 (create_array_type_for_decl): Check for abstractness of the element
1927 (complete_vars): Call complete_type_check_abstract.
1928 * class.c (finish_struct): Prepare a list of virtual functions for
1929 template types, and call complete_vars on it to check for abstractness.
1931 2004-07-12 Paolo Bonzini <bonzini@gnu.org>
1933 PR tree-optimization/14107
1934 * decl.c (finish_function): Remove temporary band-aid.
1936 2004-07-11 Mark Mitchell <mark@codesourcery.com>
1938 * call.c (build_operator_new_call): Avoid using push_to_top_level.
1939 (build_new_op): Adjust call to lookup_function_nonclass.
1940 * name-lookup.c (identifier_type_value): Adjust call to
1942 (lookup_name_real): Add block_p parameter.
1943 (lookup_name_nonclass): Adjust call to lookup_name_real.
1944 (lookup_function_nonclass): Likewise.
1945 (lookup_name): Likewise.
1946 * name-lookup.h (lookup_name_real): Change prototype.
1947 (lookup_name_nonclass): Likewise.
1948 * parser.c (cp_parser_lookup_name): Likewise.
1950 * cp-tree.h (saved_scope): Make old_bindings a vector.
1951 (unuse_fields): Remove.
1952 * name-lookup.h (cxx_saved_binding): Define it.
1953 * class.c (pushclass): Don't use unuse_fields.
1954 * name-lookup.c (cxx_saved_binding_make): Remove.
1955 (store_binding): Add new bindings to a vector, using an
1956 accumulator style, rather than adding them to a list.
1957 (store_bindings): Adjust accordingly.
1958 (store_class_bindings): Likewise.
1959 (push_to_top_level): Likewise.
1960 (pop_from_top_level): Likewise.
1961 * optimize.c (maybe_clone_body): Must push_to_top_level and
1962 pop_from_top_level calls outside of loop.
1963 * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope
1964 calls here from cp_parser_late_parsing_default_args.
1965 (cp_parser_save_default_args): Record the class type in which the
1966 function is declared.
1967 (cp_parser_late_parsing_default_args): Do not call
1968 push_nested_class/pop_nested_class.
1969 * search.c (dfs_unuse_fields): Remove.
1970 (unuse_fields): Remove.
1972 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
1974 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
1975 LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
1976 * cp-tree.h (poplevel): Declare.
1977 (set_block): Remove.
1978 * decl.c (set_block): Remove.
1980 2004-07-10 Mike Stump <mrs@apple.com>
1982 * decl2.c (import_export_class): Never export/import vtables
1983 with inline key functions.
1985 2004-07-09 Steven Bosscher <stevenb@suse.de>
1987 * typeck.c (c_expand_asm_operands): Remove.
1989 2004-07-09 Mike Stump <mrs@apple.com>
1991 * typeck.c (build_class_member_access_expr): Skip null deref
1992 warning when we don't dereference it.
1994 2004-07-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1998 * class.c (check_field_decls): Improve -Weffc++ warning: do not
1999 warn for pointers to functions/members, or for classes without
2002 2004-07-08 Mark Mitchell <mark@codesourcery.com>
2004 * name-lookup.h (struct cp_binding_level): Update documentation
2007 2004-07-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2010 * typeck.c (check_return_expr): Improve -Weffc++ warning: handle
2011 returning CALL_EXPR, and non-reference return type.
2013 2004-07-08 Nathan Sidwell <nathan@codesourcery.com>
2015 * name-lookup.c (push_binding): Use VEC_reserve.
2017 2004-07-08 Richard Henderson <rth@redhat.com>
2019 * cp-tree.h (expand_eh_spec_block): Remove.
2021 2004-07-07 Mark Mitchell <mark@codesourcery.com>
2023 * cp-tree.h (saved_scope): Remove x_previous_class_type and
2024 x_previous_class_values; add x_previous_class_level.
2025 (previous_class_type): Remove.
2026 (previous_class_values): Remove.
2027 (previous_class_level): New macro.
2028 * class.c (pushclass): Restore the identifier cache more
2030 (invalidate_class_lookup_cache): Use vector for class_shadowed and
2031 previous_class_values.
2032 * decl.c (poplevel): Likewise.
2033 * name-lookup.c (cxx_binding_init): New function.
2034 (cxx_binding_make): Use it.
2035 (push_binding): For a binding in a class level, use a vector of
2036 cp_class_binding nodes.
2037 (push_binding_level): New function.
2038 (begin_scope): Use it.
2039 (leave_scope): Do not put class binding levels on the free list.
2040 (print_binding_level): Adjust for the fact that class_shadowed is
2042 (poplevel_class): Likewise.
2043 (clear_identifier_class_values): Likewise.
2044 (push_class_level_binding): Likewise.
2045 (set_class_shadows): Remove.
2046 (store_binding): New function.
2047 (store_class_bindings): New function.
2048 (push_to_top_level): Use store_class_bindings as appropriate.
2049 (pop_from_top_level): Use previous_class_level, not
2050 previous_class_type.
2051 * name-lookup.h (cp_class_binding): New type.
2052 (cp_binding_level): Use a vector object for class_shadowed.
2053 (push_binding_level): Declare.
2054 (set_class_shadows): Remove.
2056 2004-07-07 Andrew Pinski <apinski@apple.com>
2058 * class.c (instantiate_type): BUFFER_REF is dead.
2059 * lex.c (init_operators): IN_EXPR is dead.
2061 2004-07-07 Jason Merrill <jason@redhat.com>
2064 * call.c (build_new_op): Give overload warnings for built-in
2067 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
2070 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
2073 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
2075 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
2076 * class.c (build_primary_vtable, check_bases,
2077 determine_primary_base, finish_struct_bits,
2078 maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
2079 get_basefndecls, warn_hidden, walk_subobject_offsets,
2080 build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
2081 layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
2082 finish_struct_1, get_vfield_name, contains_empty_class_p,
2083 dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
2084 dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
2085 add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
2087 * decl.c (xref_basetypes): Likewise.
2088 * dump.c (cp_dump_tree): Likewise.
2089 * error.c (dump_expr): Likewise.
2090 * init.c (sort_mem_initializers, expand_member_init,
2091 push_base_cleanups): Likewise.
2092 * method.c (do_build_copy_constructor, do_build_assign_reg,
2093 synthesize_exception_spec): Likewise.
2094 * name-lookup.c (arg_assoc_class): Likewise.
2095 * pt.c (instantiate_class_template, tsubst,
2096 get_template_base_recursive): Likewise.
2097 * ptree.c (cxx_print_type): Likewise.
2098 * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
2099 * search.c (lookup_base_r, dynamic_cast_base_recurse,
2100 dfs_access_in_type, access_in_type, lookup_field_queue_p,
2101 bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
2102 marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
2103 dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
2104 binfo_for_vtable, copied_binfo, original_binfo): Likewise
2105 * tree.c (copy_base_binfos, make_binfo): Likewise.
2106 * typeck.c (commmon_base_type): Likewise
2107 * typeck2.c (process_init_constructor): Likewise
2109 2004-07-06 Joseph S. Myers <jsm@polyomino.org.uk>
2111 * decl.c (check_tag_decl): Name redeclared type in diagnostic.
2113 2004-07-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2116 * pt.c (convert_nontype_argument): Disallow conversions between
2117 different enumeration types.
2119 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
2121 * cp-tree.h (BINFO_MARKED): Remove.
2122 (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
2123 BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
2124 BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
2125 (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
2126 * class.c (build_base_path): Use BINFO_VIRTUAL_P.
2127 (mark_primary_bases, determine_primary_base, base_derived_from,
2128 dfs_find_final_overrider, dfs_find_final_overrider_q,
2129 dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
2130 dfs_modify_vtables, walk_subobject_offsets,
2131 layout_nonempty_base_or_field, build_base_field,
2132 build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
2133 end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
2134 finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
2135 build_ctor_vtbl_group, accumulate_vtble_inits,
2136 dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
2137 build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
2138 add_vcall_offset_vtbl_entries_1): Likewise.
2139 * decl.c (xref_basetypes): Incomming virtual base indicated by
2141 * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
2142 * init.c (finish_init_stmts, sort_mem_initializers,
2143 emit_mem_initializers, build_vtble_address, expand_member_init,
2144 push_base_cleanups): Likewise.
2145 * method.c (do_build_copy_constructor): Likewise.
2146 * pt.c (instantiate_class_template,
2147 get_template_base_recursive): Likewise.
2148 * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
2149 get_pseudo_ti_desc): Likewise.
2150 * search.c (lookup_base_r, dynamic_cast_base_recurse,
2151 binfo_from_vbase, binfo_via_virtual, copied_binfo,
2152 original_binfo): Likewise.
2153 * semantics.c (finish_base_specifier): Virtualness is indicated
2155 * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
2157 2004-07-06 Mark Mitchell <mark@codesourcery.com>
2160 2004-06-24 Jason Merrill <jason@redhat.com>
2162 * decl.c (grokparms): Give the PARM_DECL reference type if the
2163 parameter is passed by invisible reference.
2165 2004-07-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2167 * cp-lang.c (cp_var_mod_type_p): Add extra arg.
2168 * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
2169 * pt.c (check_instantiated_args, unify): Likewise.
2171 2004-07-05 Phil Edwards <phil@codesourcery.com>
2173 * Make-lang.in (check-c++, lang_checks): Add some comments.
2175 2004-07-05 Zack Weinberg <zack@codesourcery.com>
2177 * cp-mudflap.c: Delete file.
2178 * Makefile.in: Remove all references to cp-mudflap.o.
2180 2004-07-05 Zack Weinberg <zack@codesourcery.com>
2182 * decl.c (cxx_init_decl_processing): Call
2183 build_common_tree_nodes before creating the global NAMESPACE_DECL.
2185 2004-07-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2188 * call.c (build_operator_new_call): Look only at global scope.
2190 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
2192 * call.c (enforce_access): Expect TREE_BINFO.
2193 * class.c (binfo_ctor_vtable): Check TREE_BINFO.
2194 * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
2195 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
2197 (BINFO_LANG_ELTS): Remove.
2198 (BINFO_LANG_SLOTS): New.
2199 (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
2200 (CLASSTYPE_TEMPLATE_INFO): Adjust.
2201 * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
2202 * search.c (lookup_member): Check TREE_BINFO.
2203 * semantics.c (perform_or_defer_access_check): Likewise.
2204 (check_accessibility_of_qualified_id): Check
2205 deferred_access_no_check.
2206 * tree.c (make_binfo): Use make_tree_binfo.
2208 2004-07-04 Mark Mitchell <mark@codesourcery.com>
2210 * method.c (implicitly_declare_fn): Set linkage of generated
2213 2004-07-04 Richard Henderson <rth@redhat.com>
2215 * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
2217 2004-07-03 Scott Brumbaugh <scottb.lists@verizon.net>
2220 * name-lookup.c (push_class_level_binding): Don't pass a
2221 TREE_LIST of ambiguous names to check_template_shadow as it
2222 only handles declarations. Instead, pull the declaration
2225 2004-07-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2228 * pt.c (check_explicit_specialization): Clarify error message.
2230 2004-07-02 Richard Henderson <rth@redhat.com>
2232 * tree.c (cp_unsave_r): Update remap_save_expr call.
2234 2004-07-02 Mark Mitchell <mark@codesourcery.com>
2237 * mangle.c (write_template_arg): Correct mangling.
2240 * decl.c (grokdeclarator): Robustify.
2242 2004-07-01 Richard Henderson <rth@redhat.com>
2244 * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
2245 * method.c (synthesize_method): Don't clear_last_expr.
2246 * name-lookup.c (maybe_push_cleanup_level): Likewise.
2248 2004-07-01 Nick Clifton <nickc@redhat.com>
2250 * decl2.c (import_export_class): Invoke the
2251 import_export_class field in the gcc_target structure if it is not
2254 2004-06-30 Richard Henderson (rth@redhat.com>
2256 * decl.c (start_preparsed_function): Don't set immediate_size_expand.
2257 * method.c (use_thunk): Likewise.
2259 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
2261 * call.c (build_over_call), typeck.c (build_function_call): Call
2262 check_function_arguments instead of check_function_format.
2264 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
2266 * call.c (build_over_call), typeck.c (build_function_call): Update
2267 calls to check_function_format.
2269 2004-06-30 Richard Henderson <rth@redhat.com>
2271 * call.c (build_over_call): Use __builtin_memcpy for copying
2272 CLASS_AS_BASE rather than funny casting.
2274 2004-06-30 Richard Henderson <rth@redhat.com>
2276 * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
2277 TYPE_SIZE_UNIT of full_type.
2279 2004-06-30 Per Bothner <per@bothner.com>
2281 Conditionally compile support for --enable-mapped_location.
2282 * decl.c (pop_label): Handle (imperfectly) USE_MAPPED_LOCATION case.
2283 * decl2.c: If USE_MAPPED_LOCATION, don't do some line number
2284 adjustments - which I don't understand.
2285 * error.c (dump_decl): Rename "<interrnal>" to "<built-in>".
2286 * error.c: Use LOCATION_FILE and EXPR_LOCATION macros.
2287 (print_instantiation_partial_context): Use expand_location.
2288 * decl.c (duplicate_decl): Use new DECL_IS_BUILTIN macro.
2289 * name-lookup.c: Likewise.
2290 * lex.c (cxx_init): Likewise. Also use BUILTINS_LOCATION.
2291 * name-lookup.c: Use input_line macro.
2292 * parser.c (cp_lexer_get_preprocessor_token): Use UNKNOWN_LOCATION.
2293 (cp_parser_statement): Rename locaal variable statement_locus to
2294 statement_location and use SET_EXPR_LOCATION macro.
2295 * pt.c: Handle USE_MAPPED_LOCATION case. Use new macros.
2296 * tree.c (cp_walk_subtrees): Likewise.
2298 2004-06-29 Per Bothner <per@bothner.com>
2300 * tree.c (build_min_nt, build_min, build_min_non_dep):
2301 Don't set TREE_COMPLEXITY from input_line.
2303 2004-06-29 Paul Brook <paul@codesourcery.com>
2305 * init.c: Include target.h.
2306 (get_cookie_size): Remove and replace with target hook.
2308 (build_new_1): Store the element size in the cookie.
2310 2004-06-29 Nathan Sidwell <nathan@codesourcery.com>
2313 * parser.c (cp_parser_template_declaration_after_export): Disable
2314 access checks here ...
2315 (cp_parser_class_specifier): ... not here.
2317 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
2319 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
2320 VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
2321 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
2324 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
2326 * cp-tree.h (struct deferred_access): Move to ...
2327 * semantics.c (struct deferred_access): ... here. Adjust.
2328 (deferred_access_stack): Make a VEC(deferred_access),
2329 (deferred_access_free_list): Remove.
2330 (deferred_access_no_check): New.
2331 (push_deferring_access_checks, resume_deferring_access_checks,
2332 stop_deferring_access_checks, pop_deferring_access_checks,
2333 get_deferred_access_checks, pop_to_parent_deferring_access_checks,
2334 perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
2336 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
2339 * call.c (build_temp): Declare.
2340 (check_constructor_callable): New.
2341 (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
2342 CONSTRUCTOR_CALLABLE.
2343 (convert_like_real, initialize_reference): Use
2344 check_constructor_callable.
2345 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
2346 (LOOKUP_*): Renumber.
2348 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
2350 * friend.c (add_friend): Only perform access checks when context
2352 * lex.c (cxx_make_type): Only create a binfo for aggregate types.
2353 * parser.c (cp_parser_class_specifier): Disable access checks here
2354 when parsing the body of a templated class.
2355 * semantics.c (perform_or_defer_access_checks): Reorder to allow
2356 NULL binfos when not checking access.
2358 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
2360 Use vector API for vbase list.
2361 * cp-tree.h: Include vec.h
2362 (DEF_VEC_P (tree)): New type.
2363 (struct lang_type_class): Change vbase's member type.
2364 (binfo_for_vbase): Declare.
2365 * class.c (determine_primary_base, base_derived_from,
2366 update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
2367 warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
2368 build_vtbl_initializer): Adjust.
2369 * decl.c (xref_basetypes): Adjust, accumulate upper bound of
2371 * init.c (sort_mem_initializers, expand_member_init,
2372 push_base_cleanups): Adjust.
2373 * method.c (do_build_copy_constructor): Adjust.
2374 * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
2375 (binfo_for_vbase): New.
2376 * tree.c (copy_base_binfos): Adjust.
2378 2004-06-28 Mark Mitchell <mark@codesourcery.com>
2380 * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
2382 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
2385 * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
2386 paranthesis in case of pointers to array members.
2387 * error.c (dump_type_prefix): Likewise.
2388 (dump_type_suffix): Maybe issue a whitespace when printing
2391 2004-06-27 Mark Mitchell <mark@codesourcery.com>
2394 * parser.c (cp_parser_set_decl_spec_type): Refine test for
2395 redefinition of built-in types.
2397 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
2399 * error.c (pp_template_argument_list_start): Remove.
2400 (pp_template_argument_list_end): Likewise.
2401 (pp_separate_with_comma): Use pp_cxx_separate_with.
2402 (reinit_global_formatting_buffer): Remove.
2403 (pp_non_consecutive_character): Likewise.
2404 (dump_scope): Use pp_cxx_colon_colon.
2405 (dump_template_parameter): Use pp_cxx_identifier,
2406 pp_cxx_tree_identifier and pp_cxx_whitespace.
2407 (dump_templat_bindings): Replace use of pp_string with sequence
2408 of pp_cxx_whitespace and pp_equal.
2409 (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
2410 pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set
2412 (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
2413 (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace,
2414 pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
2415 (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
2416 pp_cxx_right_bracket, pp_cxx_identifier throughout,
2417 (dump_decl): Likewise.
2418 (dump_template_decl): Likewise.
2419 (dump_function_decl): Likewise. Set padding as appropriate.
2420 (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
2422 (dump_exception_spec): Likewise.
2423 (dump_function_name): Use pp_cxx_tree_identifier and
2425 (dump_template_parms): Use pp_cxx_begin_template_argument_list and
2426 pp_cxx_end_template_argument_list.
2427 (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
2428 pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
2429 pp_cxx_whitespace throughout.
2430 (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
2432 (dump_unary_op): Likewise.
2433 (reinit_cxx_pp): New function.
2434 (type_as_string); Use it.
2435 (expr_as_string): Likewise.
2436 (decl_as_string); Likewise.
2437 (context_as_string): Likewise.
2438 (lang_decl_name): Likewise.
2439 (decl_to_string): Likewise.
2440 (expr_to_string): Likewise.
2441 (parm_to_string): Likewise.
2442 (type_to_string): Likewise.
2443 (args_to_string): Likewise.
2444 (cv_to_string): Likewise.
2446 2004-06-26 Mark Mitchell <mark@codesourcery.com>
2448 * cp-tree.h (cp_cv_quals): New type.
2449 (cp_declarator): Use it instead of "tree" as appropriate.
2450 (grok_method_quals): Adjust prototype.
2451 (grokclassfn): Likewise.
2452 (do_friend): Likewise.
2453 * decl.c (grokfndecl): Use cp_cv_quals, not tree.
2454 (grokdeclarator): Likewise.
2455 * decl2.c (grok_method_quals): Likewise.
2456 (grokclassfn): Likewise.
2457 * friend.c (do_friend): Likewise.
2458 * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
2459 * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
2460 (make_pointer_declarator): Likewise.
2461 (make_reference_declarator): Likewise.
2462 (make_ptrmem_declarator): Likewise.
2463 (cp_parser_ptr_operator): Likewise.
2464 (cp_parser_cv_qualifier_seq_opt): Likewise.
2465 (cp_parser_cv_qualifier_opt): Remove.
2466 (cp_parser_new_declarator_opt): Adjust call to
2467 cp_parser_ptr_operator.
2468 (cp_parser_conversion_declaration_opt): Likewise.
2469 (cp_parser_declarator): Use cp_cv_quals, not tree.
2470 (cp_parser_direct_declarator): Likewise.
2472 2004-06-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2474 * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
2475 Rename DECL_STMT to DECL_EXPR.
2476 * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
2477 * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
2478 * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
2480 2004-06-26 Jan Hubicka <jh@suse.cz>
2483 * decl2.c (maybe_emit_vtables): Always import_export_vtable for the
2484 reachability analysis.
2486 2004-06-25 Mark Mitchell <mark@codesourcery.com>
2488 * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
2491 2004-06-25 Paul Brook <paul@codesourcery.com>
2493 * decl2.c (get_guard): Call targetm.cxx.guard_type.
2494 (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
2496 2004-06-24 Mark Mitchell <mark@codesourcery.com>
2498 * decl.c (grokdeclarator): Restore error messages about __thread.
2499 * parser.c (cp_parser_decl_specifier_seq): Likewise.
2501 2004-06-24 Jason Merrill <jason@redhat.com>
2504 * decl.c (grokparms): Give the PARM_DECL reference type if the
2505 parameter is passed by invisible reference.
2507 2004-06-24 Andreas Schwab <schwab@suse.de>
2509 * cp-tree.h (enum cp_storage_class): Remove trailing comma.
2511 2004-06-23 Mark Mitchell <mark@codesourcery.com>
2513 * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
2514 (cp/decl.o): Likewise.
2515 (cp/decl2.o): Likewise.
2516 (cp/pt.o): Likewise.
2517 (cp/semantics.o): Likewise.
2518 * config-lang.in (gtfiles): Do not reference cp/lex.h.
2519 * class.c: Do not include lex.h.
2520 (add_implicitly_declared_members): Do not use
2521 adding_implicit_members.
2522 (check_bases_and_members): Do not talk about grok_x_components.
2523 * cp/cp-tree.h (adding_implicit_members): Remove.
2524 (cp_storage_class): New type.
2525 (cp_decl_spec): Likewise.
2526 (cp_decl_specifier_seq): Likewise.
2527 (cp_parameter_declarator): Use it for the decl_specifiers field.
2528 (check_tag_decl): Adjust prototype.
2529 (shadow_tag): Likewise.
2530 (groktypename): Likewise.
2531 (start_decl): Likewise.
2532 (start_function): Likewise.
2533 (start_method): Likewise.
2534 (grok_x_components): Remove.
2535 (grokfield): Adjust prototype.
2536 (grokbitfield): Likewise.
2537 (finish_member_class_template): Remove.
2538 * decl.c: Do not include lex.h.
2539 (adding_implicit_members): Do not define.
2540 (check_tag_decl): Do not use trees to represent decl-specifiers.
2541 (shadow_tag): Likewise.
2542 (groktypename): Likewise.
2543 (start_decl): Likewise.
2544 (grokvardecl): Likewise.
2545 (grokdeclarator): Likewise.
2546 (grokparms): Likewise.
2547 (start_function): Likewise.
2548 (start_method): Likewise.
2549 * decl.h (grokdeclarator): Adjust prototype.
2550 * decl2.c: Do not include lex.h.
2551 (grok_x_components): Remove.
2552 (grokfield): Do not use trees to represent decl-specifiers.
2553 (grokbitfield): Likewise.
2554 * lex.c: Do not include lex.h.
2556 * parser.c: Include target.h.
2557 (clear_decl_specs): New function.
2558 (cp_parser_translation_unit): Do not use trees to represent
2560 (cp_parser_postfix_expression): Likewise.
2561 (cp_parser_new_type_id): Likewise.
2562 (cp_parser_condition): Likewise.
2563 (cp_parser_simple_declaration): Likewise.
2564 (cp_parser_decl_specifier_seq): Likewise.
2565 (cp_parser_function_specifier_opt): Likewise.
2566 (cp_parser_conversion_type_id): Likewise.
2567 (cp_parser_template_parameter): Likewise.
2568 (cp_parser_explicit_instantiation): Likewise.
2569 (cp_parser_type_specifier): Likewise.
2570 (cp_parser_simple_type_specifier): Likewise.
2571 (cp_parser_init_declarator): Likewise.
2572 (cp_parser_type_id): Likewise.
2573 (cp_parser_type_specifier_seq): Likewise.
2574 (cp_parser_parameter_declaration): Likewise.
2575 (cp_parser_member_declaration): Likewise.
2576 (cp_parser_exception_declaration): Likewise.
2577 (cp_parser_function_definition_from_specifiers_and_declarator):
2579 (cp_parser_single_declaration): Likewise.
2580 (cp_parser_save_member_function_body): Likewise.
2581 (cp_parser_friend_p): Likewise.
2582 (cp_parser_set_storage_class): New function.
2583 (cp_parser_set_decl_spec_type): Likewise.
2584 * pt.c: Do not include lex.h.
2585 * semantics.c: Likewise.
2586 (finish_member_class_template): Remove.
2588 2004-06-23 Roger Sayle <roger@eyesopen.com>
2590 * call.c (build_cxx_call): Don't call expand_tree_builtin. No
2591 longer take both "args" and "convert_args" as arguments.
2592 (build_op_delete_call): Update call to build_cxx_call.
2593 (build_over_call): Likewise, update call to build_cxx_call.
2594 * cp-tree.h (build_cxx_call): Update funtion prototype.
2595 * typeck.c (build_function_call): Don't call expand_tree_builtin.
2596 * rtti.c (throw_bad_cast): Update call to build_cxx_call.
2597 (throw_bad_typeid): Likewise.
2598 (build_dynamic_cast_1): Likewise.
2600 2004-06-22 Richard Henderson <rth@redhat.com>
2602 * class.c (build_vfn_ref): Take a pointer not object. Build
2604 (cp_fold_obj_type_ref): New.
2605 * call.c (build_over_call): Update build_vfn_ref call.
2606 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
2607 * cp-tree.h (cp_fold_obj_type_ref): Declare.
2609 2004-06-21 Jason Merrill <jason@redhat.com>
2612 * cp-gimplify.c (cp_gimplify_init_expr): Look through
2615 2004-06-21 Mark Mitchell <mark@codesourcery.com>
2617 * cp-tree.def (NEW_EXPR): Add a fourth slot.
2618 * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
2619 (TREE_PARMLIST): Likewise.
2620 (CALL_DECLARATOR_PARMS): Likewise.
2621 (CALL_DECLARATOR_QUALS): Likewise.
2622 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
2623 (cp_declarator_kind): New type.
2624 (cp_parameter_declarator): Likewise.
2625 (cp_declarator): Likewise.
2626 (cp_error_declarator): Likewise.
2627 (no_parameters): Likewise.
2628 (groktypename): Change prototype.
2629 (start_decl): Likewise.
2630 (start_handler_parms): Likewise.
2631 (get_scope_of_declarator): Likewise.
2632 (start_function): Likewise.
2633 (start_preparsed_function): New function.
2634 (start_function): Change prototype.
2635 (start_method): Likewise.
2636 (grokfield): Likewise.
2637 (grokbitfield): Likewise.
2638 (build_new): Likewise.
2639 (make_pointer_declarator): Remove.
2640 (make_reference_declarator): Likewise.
2641 (make_call_declarator): Likewise.
2642 (set_quals_and_spec): Likewise.
2643 (process_template_parm): Change prototype.
2644 (begin_function_definition): Remove.
2645 (finish_parmlist): Remove.
2646 * decl.c (groktypename): Do not use trees to represent
2648 (start_decl): Likewise.
2649 (start_handler_parms): Remove.
2650 (get_scope_of_declarator): Reimplement.
2651 (grokdeclarator): Do not use trees to represent declarators.
2652 (grokparms): Likewise.
2653 (start_function): Likewise.
2654 (start_method): Likewise.
2655 (build_void_list_mode): Do not use TREE_PARMLIST.
2656 * decl.h (grokdeclarator): Change prototype.
2657 * decl2.c (grok_method_quals): Robustify.
2658 (grok_x_components): Do not use trees to represent declarators.
2659 (grokfield): Likewise.
2660 (grokbitfield): Likewise.
2661 (start_objects): Build FUNCTION_DECLs, not declarators.
2662 (start_static_storage_duration_function): Likewise.
2663 * init.c (build_new): Simplify.
2664 * lex.c (make_pointer_declarator): Remove.
2665 (make_reference_declarator): Likewise.
2666 (make_call_declarator): Likewise.
2667 (set_quals_and_spec): Likewise.
2668 * method.c (use_thunk): Use start_preparsed_function.
2669 (synthesize_method): Likewise.
2670 (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
2671 * optimize.c (maybe_clone_body): Use start_preparsed_function.
2672 * parser.c (cp_error_declarator): New variable.
2673 (declarator_obstack): Likewise.
2674 (alloc_declarator): New function.
2675 (make_declarator): Likewise.
2676 (make_id_declarator): Likewise.
2677 (make_pointer_declarator): Likewise.
2678 (make_reference_declarator): Likewise.
2679 (make_ptrmem_declarator): Likewise.
2680 (make_call_declarator): Likewise.
2681 (make_array_declarator): Likewise.
2682 (no_parameters): New variable.
2683 (make_parameter_declarator): Likewise.
2684 (cp_parser_check_for_definition_in_return_type): Do not use trees
2685 to represent declarators.
2686 (cp_parser_translation_unit): Likewise.
2687 (cp_parser_new_expression): Likewise.
2688 (cp_parser_new_type_id): Likewise.
2689 (cp_parser_new_declarator_opt): Likewise.
2690 (cp_parser_direct_new_declarator): Likewise.
2691 (cp_parser_condition): Likewise.
2692 (cp_parser_declaration_statement): Likewise.
2693 (cp_parser_declaration): Likewise.
2694 (cp_parser_conversion_type_id): Likewise.
2695 (cp_parser_conversion_declarator_opt): Likewise.
2696 (cp_parser_template_parameter_list): Likewise.
2697 (cp_parser_template_parameter): Likewise.
2698 (cp_parser_explicit_instantiation): Likewise.
2699 (cp_parser_init_declarator): Likewise.
2700 (cp_parser_declarator): Likewise.
2701 (cp_parser_direct_declarator): Likewise.
2702 (cp_parser_type_id): Likewise.
2703 (cp_parser_parameter_declaration_clause): Likewise.
2704 (cp_parser_parameter_declaration_list): Likewise.
2705 (cp_parser_parameter_declaration): Likewise.
2706 (cp_parser_member_declaration): Likewise.
2707 (cp_parser_exception_declaration): Likewise.
2708 (cp_parser_check_declarator_template_parameters): Likewise.
2709 (cp_parser_function_definition_from_specifiers_and_declarator):
2711 (cp_parser_save_member_function_body): Likewise.
2712 * pt.c (process_template_parm): Add is_non_type parameter.
2713 (convert_template_argument): Adjust call to groktypename.
2714 (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
2715 (tsubst): Do not expect declarators.
2716 (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
2718 (instantiate_decl): Use start_preparsed_function.
2719 * semantics.c (begin_function_definition): Remove.
2720 (finish_parmlist): Remove.
2721 * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
2724 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2726 * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
2727 (build_new_method_call): Likewise.
2728 * decl.c (local_variable_p_walkfn): Don't walk into types.
2729 * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
2730 (build_anon_union_vars): Add new operand for COMPONENT_REF.
2731 * init.c (buld_new): Add new operand for ARRAY_REF.
2732 * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
2733 (do_build_assign_ref): Likewise.
2734 * parser.c (cp_parser_direct_new_declarator): Add new operands
2736 (cp_parser_direct_declarator): Likewise.
2737 * pt.c (tsubst): Likewise.
2738 (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
2740 * semantics.c (finish_non_static_data_member): Add new operand
2742 * typeck.c (build_class_member_access_expr): Likewise.
2743 (build_class_member_access_expr, finish_class_member_access_expr):
2745 (build_ptrmemfunc_access_expr): Likewise.
2746 (build_array_ref): Add new operands for ARRAY_REF.
2747 * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
2748 * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
2750 2004-06-21 Richard Henderson <rth@redhat.com>
2752 * dump.c (cp_dump_tree): Don't use dump_next_stmt.
2753 * parser.c (cp_parser_jump_statement): Update commentary.
2754 * pt.c (tsubst_expr): Use RETURN_EXPR.
2755 * semantics.c (finish_return_stmt): Likewise.
2756 (finalize_nrv_r): Likewise.
2757 * typeck.c, typeck2.c: Update file start commentary.
2759 2004-06-21 Richard Henderson <rth@redhat.com>
2761 * semantics.c (finish_expr_stmt): Call verify_sequence_points.
2763 2004-06-20 Richard Henderson <rth@redhat.com>
2765 * cp-tree.h (add_decl_stmt): Declare.
2766 * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
2767 * semantics.c (maybe_cleanup_point_expr): New.
2768 (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
2769 finish_for_expr, finish_switch_cond): Use it.
2770 (finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN.
2772 2004-06-20 Richard Henderson <rth@redhat.com>
2774 * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
2775 * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
2776 (cp_gimplify_expr): Call it.
2777 (gimplify_cleanup_stmt): Move from c-gimplify.c.
2778 (cp_genericize): New.
2779 * decl.c (finish_function): Call it.
2780 * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
2781 (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
2782 (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
2783 (cp_genericize): Declare.
2784 * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
2785 * dump.c (cp_dump_tree): Likewise.
2786 * semantics.c (push_cleanup): Move from c-semantics.c.
2788 2004-06-20 Zack Weinberg <zack@codesourcery.com>
2790 * cp-lang.c (has_c_linkage): Implement.
2792 * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
2793 * decl.c (duplicate_decls): Use COPY_DECL_RTL.
2794 (builtin_function_1): Don't call make_decl_rtl.
2795 (build_cp_library_fn): Don't call set_mangled_name_for_decl.
2796 (grokvardecl): Don't call mangle_decl.
2797 * except.c (nothrow_libfn_p): Look at DECL_NAME, not
2798 DECL_ASSEMBLER_NAME.
2799 * method.c (set_mangled_name_for_decl): Delete.
2800 * name-lookup.c (pushdecl): When a local extern shadows a
2801 file-scope declaration of the same object, give both DECLs the
2803 * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
2804 on DECL_ASSEMBLER_NAME.
2806 2004-06-19 Richard Henderson <rth@redhat.com>
2808 * cp-gimplify.c: Remove unnecessary prototypes.
2809 (cp_gimplify_stmt): Merge into ...
2810 (cp_gimplify_expr): ... here. Move to end of file. Handle
2811 stmts_are_full_exprs_p frobbing.
2812 * cp-tree.h (cp_gimplify_stmt): Remove.
2813 * pt.c (tsubst_expr): Merge prep_stmt and unify.
2814 * tree.c (init_tree): Don't set lang_gimplify_stmt.
2816 2004-06-18 Richard Henderson <rth@redhat.com>
2819 * semantics.c (begin_cond): New.
2820 (finish_cond): Rewrite to handle template DECL_STMTs specially.
2821 Assume that non-template decls go land before the conditional.
2822 (simplify_loop_decl_cond): Likewise.
2823 (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
2824 finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
2825 begin_switch_stmt, finish_switch_cond): Update to match.
2827 2004-06-17 Jason Merrill <jason@redhat.com>
2830 * semantics.c (simplify_aggr_init_expr): Don't return the slot.
2831 (finish_stmt_expr_expr): Update type after conversions.
2832 (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
2833 Handle void initializer.
2834 * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
2836 2004-06-17 Geoffrey Keating <geoffk@apple.com>
2838 * class.c (build_clone): Don't call defer_fn, let mark_used do it.
2839 * cp-tree.h (defer_fn): Delete.
2840 * decl2.c (defer_fn): Delete.
2841 (finish_file): Simplify deferred_fns loops; check that
2842 only used inline functions get into deferred_fns.
2843 (mark_used): Inline previous contents of defer_fn.
2845 2004-06-16 Richard Henderson <rth@redhat.com>
2847 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
2848 (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
2849 * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
2850 of CTOR_INITIALIZER ...
2851 (pp_cxx_statement): ... here.
2852 * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
2853 (finish_function): Use alloc_stmt_list to zap entire function.
2854 * parser.c (cp_parser_compound_statement): Update commentary.
2855 * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
2856 * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
2857 (finish_stmt_expr): Don't look through COMPOUND_STMT.
2859 2004-06-16 Geoffrey Keating <geoffk@apple.com>
2861 * pt.c (mark_decl_instantiated): Don't call defer_fn.
2863 2004-06-16 Richard Henderson <rth@redhat.com>
2865 * parser.c (cp_parser_labeled_statement): Update commentary.
2866 * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
2867 * tree.c (mark_local_for_remap_r): Likewise.
2869 2004-06-16 Richard Henderson <rth@redhat.com>
2871 * parser.c (cp_parser_asm_definition): Update commentary.
2872 * pt.c (tsubst_expr): Use ASM_EXPR.
2873 * semantics.c (finish_asm_stmt): Likewise.
2875 2004-06-16 Richard Henderson <rth@redhat.com>
2877 * decl.c (finish_destructor_body): Use LABEL_EXPR.
2878 * parser.c (cp_parser_statement): Update commentary.
2879 * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
2880 * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
2881 * tree.c (mark_local_for_remap_r): Likewise.
2883 2004-06-16 Richard Henderson <rth@redhat.com>
2886 * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
2887 statement in FOR_INIT_STMT for templates.
2889 2004-06-15 Richard Henderson <rth@redhat.com>
2891 * call.c (initialize_reference): Don't build CLEANUP_STMT here.
2892 * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
2893 (genericize_try_block): Use gimplify_stmt.
2894 (genericize_catch_block, genericize_eh_spec_block): Likewise.
2895 (cp_gimplify_init_expr): Remove STMT_EXPR special case.
2896 (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
2897 * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
2898 (cp_tree_chain_matters_p): Remove.
2899 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
2900 (COMPOUND_STMT_BODY_BLOCK): New.
2901 (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
2902 (EXPR_STMT_STMT_EXPR_RESULT): New.
2903 (building_stmt_tree): Check cur_stmt_list.
2904 (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
2905 (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
2906 * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
2907 (cp_finish_decl): Use push_cleanup.
2908 (start_function, finish_function): Use statement lists.
2909 (finish_stmt): Do nothing.
2910 * except.c (begin_eh_spec_block): Use statement lists.
2911 (check_handlers_1, check_handlers): Likewise.
2912 * init.c (construct_virtual_base): Don't add extra compound stmts.
2913 (build_vec_init): Likewise.
2914 * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
2915 * name-lookup.h (struct cp_binding_level): Add statement_list.
2916 * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
2917 (cp_parser_labeled_statement, cp_parser_expression_statement,
2918 cp_parser_statement_seq_opt): Likewise.
2919 (cp_parser_compound_statement): Likewise. Take bool for try block.
2920 (cp_parser_selection_statement): Tidy if processing.
2921 (cp_parser_already_scoped_statement): Rewrite to do what it says.
2922 * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
2923 (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST.
2924 Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
2925 * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
2926 (finish_cond): New, rewritten from FINISH_COND.
2927 (simplify_loop_decl_cond): New.
2928 (finish_expr_stmt): Avoid nested EXPR_STMTs.
2929 (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
2930 begin_else_clause, finish_else_clause, finish_if_stmt,
2931 begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
2932 begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
2933 finish_for_cond, finish_for_stmt, begin_switch_stmt,
2934 finish_switch_cond, finish_switch_stmt, begin_try_block,
2935 finish_try_block, finish_cleanup_try_block, finish_function_try_block,
2936 finish_handler_sequence, finish_function_handler_sequence,
2937 begin_handler, finish_handler_parms, finish_handler,
2938 begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
2939 using statement lists.
2940 (begin_compound_stmt): Replace has_no_scope argument with flags.
2941 Update all callers. Use statement lists.
2942 (finish_compound_stmt): Likewise.
2943 (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
2944 (current_scope_stmt_stack): Remove.
2945 (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
2946 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
2947 Rewrite with statement lists.
2949 2004-06-15 Alexandre Oliva <aoliva@redhat.com>
2951 * parser.c: Change all assignments of c_lex_string_translate
2952 to true and false to 1 and 0.
2953 (cp_lexer_read_token): Convert type of the translated string.
2954 (cp_parser_skip_to_closing_parentheses): Preserve original
2955 value of c_lex_string_translate, and set it to -1 while
2957 (cp_parser_cache_group): Likewise.
2958 (cp_parser_cache_group_1): Renamed.
2959 (cp_parser_asm_operand_list): Remove redundant setting of
2960 c_lex_string_translate.
2961 (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
2962 Handle chained strings.
2964 2004-06-12 Andrew Pinski <apinski@apple.com>
2968 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
2970 * cp-tree.h: Fix typo.
2972 * cp-tree.h: Include cgraph.h
2973 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
2974 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
2976 2004-06-12 Jason Merrill <jason@redhat.com>
2978 PR tree-optimization/14107
2979 * decl.c (finish_function): Warn about no return in all functions.
2981 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
2983 * cp-tree.h (struct language_function): Remove cannot_inline.
2984 * decl.c (save_function_data): cannot_inline is no more.
2985 (cxx_push_function_context): Likewise.
2986 * decl2.c (start_objects, start_static_storage_duration_function):
2987 Reset DECL_INLINE, set DECL_UNINLINABLE.
2989 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2992 * search.c (lookup_field): Propagate the ambiguity list.
2993 (lookup_fnfields): Likewise.
2995 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2998 * parser.c (cp_parser_template_name): Ctors/dtors never need a
2999 template keyword to disambiguate.
3001 2004-06-14 Mark Mitchell <mark@codesourcery.com>
3004 * decl.c (grokdeclarator): Ignore pointer-to-members when
3005 computing template depth.
3008 * name-lookup.c (pushtag): Do not try to put class declarations in
3009 explicit specialization scopes.
3011 2004-06-11 Andrew Pinski <pinskia@physics.uc.edu>
3013 * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
3015 2004-06-11 Mark Mitchell <mark@codesourcery.com>
3018 * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
3019 bindings for undeclared built-ins.
3021 2004-06-11 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3023 * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
3024 appear at the correct location.
3026 2004-06-10 Jason Merrill <jason@redhat.com>
3030 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3031 * init.c (build_offset_ref): Build SCOPE_REF with non-null
3032 TREE_TYPE for non-dependent names.
3033 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
3034 unknown_type_node as its TREE_TYPE.
3035 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
3036 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
3037 (dump_expr) <SCOPE_REF case>: Likewise.
3039 2004-06-10 Mark Mitchell <mark@codesourcery.com>
3042 * parser.c (cp_parser_direct_declarator): Robustify.
3045 * pt.c (tsubst_copy): Use decl_constant_value on enumeration
3046 constants in non-dependent contexts.
3050 * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
3053 2004-06-10 Jakub Jelinek <jakub@redhat.com>
3056 * decl.c (duplicate_decls): Handle fileptr_type_node arguments
3059 2004-06-09 Mark Mitchell <mark@codesourcery.com>
3063 2004-06-07 Mark Mitchell <mark@codesourcery.com>
3064 * lex.c (handle_pragma_interface): Deprecate.
3065 (handle_pragma_implementation): Likewise.
3067 2004-06-09 Andrew Pinski <pinskia@physics.uc.edu>
3069 * g++spec.c (lang_specific_driver): Remove check for -lm
3070 and -lmath when check it see if it was the math library.
3072 2004-06-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3075 * parser.c (cp_parser_direct_declarator): Reject constructor named
3076 as qualified template-id.
3078 2004-06-07 Mark Mitchell <mark@codesourcery.com>
3081 * lex.c (handle_pragma_interface): Deprecate.
3082 (handle_pragma_implementation): Likewise.
3084 2004-06-07 Mark Mitchell <mark@codesourcery.com>
3087 * parser.c (cp_parser_iteration_statement): Fix typo in error
3091 * pt.c (tsubst_default_argument): Do not defer access checks
3092 while substituting into the default argument.
3095 * pt.c (tsubst_copy): Do not try to substitute for an enumeration
3096 constant in a non-dependent context.
3099 * except.c (build_throw): Ensure that temp_expr has been
3102 2004-06-06 Roger Sayle <roger@eyesopen.com>
3104 * cp/cp-tree.h (lvalue_or_else): Add function prototype.
3106 2004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3109 * parser.c (cp_parser_mem_initializer_id): Gracefully reject
3110 'typename', and accept 'template'.
3112 2004-06-03 Andrew Pinski <pinskia@physics.uc.edu>
3113 Jan Hubicka <jh@suse.cz>
3116 * method.c (use_think): Do not mark thunk as referenced.
3118 2004-06-03 Matt Austern <austern@apple.com>
3121 * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
3122 is nonzero, and if we see a noninline definition of a key method,
3123 make the vtables nonweak.
3125 2004-06-02 Matt Austern <austern@apple.com>
3127 * cp-tree.h (instantiate_decl): new boolean parameter,
3128 undefined_ok. Current behavior is equivalent to its being 0.
3129 * decl2.c (mark_used): Add new argument when calling instantiate_decl
3130 * pt.c (mark_decl_instantiated): Unconditionally make
3131 instantiations explicit unconditionally
3132 (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
3133 since mark_decl_instantiated now does it.
3134 (instantiate_class_member): New. Instantiate a member of an
3135 explicitly instantiated class template.
3136 (do_type_instantiation): Explicitly instantiate members of an
3137 explicitly instantiated class template.
3138 (instantiate_decl): if undefined_ok is nonzero, and if we're
3139 trying to explicitly instantiated a template with no definition,
3140 change it to an implicit instantiation.
3141 (instantiate_pending_templates): Add new argument to instantiate_decl.
3142 * tree.c (cp_cannot_inline_tree_fn): Likewise.
3144 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
3146 * cp-tree.h: Fix typo.
3148 * cp-tree.h: Include cgraph.h
3149 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
3150 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
3152 2004-06-01 Jason Merrill <jason@redhat.com>
3155 * call.c (call_builtin_trap): Remove type parm.
3156 (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
3157 (build_x_va_arg): Dereference a null pointer for a non-POD argument.
3159 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3162 * init.c (build_offset_ref): Build SCOPE_REF with non-null
3163 TREE_TYPE for non-dependent names.
3164 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
3165 unknown_type_node as its TREE_TYPE.
3166 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
3167 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
3168 (dump_expr) <SCOPE_REF case>: Likewise.
3170 2004-06-01 Richard Henderson <rth@redhat.com>
3171 Andrew Pinski <pinskia@physics.uc.edu>
3173 * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
3174 * parser.c (struct cp_parser): Remove in_offsetof.
3175 (cp_parser_new): Don't set it.
3176 (cp_parser_unary_expression): Don't check it.
3177 (cp_parser_postfix_open_square_expression): Split out from ...
3178 (cp_parser_postfix_expression): ... here.
3179 (cp_parser_postfix_dot_deref_expression): Likewise.
3180 (cp_parser_builtin_offsetof): New.
3181 (cp_parser_primary_expression): Use it.
3183 2004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3186 * parser.c (cp_parser_postfix_expression): Allow subscript
3187 operator in offsetof.
3189 2004-05-31 Mark Mitchell <mark@codesourcery.com>
3192 * friend.c (add_friend): Do not try to perform access checks for
3193 functions from dependent classes.
3195 2004-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
3197 * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
3198 (pp_cxx_begin_template_argument_list): Turn into a function.
3199 (pp_cxx_end_template_argument_list): Likewise.
3200 (pp_cxx_separate_with): Define.
3201 (pp_cxx_unqualified_id): Tidy.
3202 (pp_cxx_primary_expression): Likewise.
3203 (pp_cxx_postfix_expression): Likewise.
3204 (pp_cxx_expression): Likewise.
3205 (pp_cxx_simple_type_specifier): Likewise.
3206 (pp_cxx_type_specifier_seq): Likewise.
3207 (pp_cxx_parameter_declaration_clause): Likewise.
3208 (pp_cxx_exception_specification): Likewise.
3209 (pp_cxx_direct_declarator): Likewise.
3210 (pp_cxx_type_id): Likewise.
3211 * cxx-pretty-print.h (pp_cxx_whitespace): Export from
3213 (pp_cxx_left_paren): Likewise.
3214 (pp_cxx_right_paren): Likewise.
3215 (pp_cxx_left_brace): Likewise.
3216 (pp_cxx_right_brace): Likewise.
3217 (pp_cxx_left_bracket): Likewise.
3218 (pp_cxx_right_bracket): Likewise.
3219 (pp_cxx_dot): Likewise.
3220 (pp_cxx_identifier): Likewise.
3221 (pp_cxx_tree_identifier): Likewise.
3222 (pp_cxx_ampersand): New macro.
3223 (pp_cxx_star): Likewise.
3224 (pp_cxx_arrow): Likewise.
3225 (pp_cxx_semicolon): Likewise.
3226 (pp_cxx_complement): Likewise.
3227 (pp_cxx_begin_template_argument_list): Declaree.
3228 (pp_cxx_end_template_argument_list): Likewise.
3229 (pp_cxx_colon_colon): likewise.
3231 2004-05-31 Eric Botcazou <ebotcazou@libertysurf.fr>
3233 * parser.c (cp_parser_simple_type_specifier): Explicitly test
3236 2004-05-31 Kazu Hirata <kazu@cs.umass.edu>
3238 * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
3239 typeck.c: Fix comment formatting.
3241 2004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
3243 * cp-lang.c (cp_expand_decl): Remove.
3244 (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
3246 2004-05-30 Andreas Jaeger <aj@suse.de>
3248 * lang-specs.h: Add missing initializers for .ii.
3250 2004-05-28 Aldy Hernandez <aldyh@redhat.com>
3252 * decl.c (cp_make_fname_decl): Free return value from
3255 2004-05-28 Mark Mitchell <mark@codesourcery.com>
3258 * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
3260 * init.c (build_new): Likewise.
3263 * name-lookup.c (arg_assoc): Robustify.
3266 * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
3267 when determining the scope to use for a pointer to member.
3268 (lookup_anon_field): Give it external linkage.
3269 * cp-tree.h (lookup_anon_field): Declare it.
3270 * expr.c (cplus_expand_constant): Use it.
3272 2004-05-28 Mark Mitchell <mark@codesourcery.com>
3275 * parser.c (cp_parser_simple_type_specifier): Call
3276 maybe_note_name_used_in_class.
3278 2004-05-28 Tom Marshall <tmarshall@real.com>
3281 * class.c (finish_struct_1): Warn only if the dtor is non-private or
3282 the class has friends.
3284 2004-05-27 Adam Nemet <anemet@lnxw.com>
3287 * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
3288 TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
3290 2004-05-24 Geoffrey Keating <geoffk@apple.com>
3292 * method.c (implicitly_declare_fn): Don't call defer_fn; abort
3293 if it might be needed.
3294 * pt.c (mark_decl_instantiated): Only call defer_fn if
3295 the function actually needs processing in finish_file.
3296 * decl2.c (finish_file): Add check that elements in
3297 deferred_fns_used are really needed there. Remove unnecessary
3298 test of DECL_SAVED_TREE.
3300 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
3302 * Make-lang.in: No need to specify $(LIBCPP).
3304 2004-05-23 Mark Mitchell <mark@codesourcery.com>
3307 * parser.c (cp_parser_class_head): Robustify.
3310 * parser.c (cp_parser_decl_specifier_seq): Correct error in
3312 (cp_parser_constructor_declarator_p): Treat attributes
3316 * typeck.c (build_unary_op): Do not attempt to resolve casts to
3317 base classes in templates.
3319 2004-05-23 Mark Mitchell <mark@codesourcery.com>
3322 * pt.c (instantiate_template): Robustify.
3324 2004-05-23 Mark Mitchell <mark@codesourcery.com>
3327 * decl.c (xref_tag): Issue errors about redeclaring template
3328 classes as non-template classes.
3330 2004-05-23 Mark Mitchell <mark@codesourcery.com>
3333 * name-lookup.c (supplement_binding): Allow redefinitions of
3337 * parser.c (cp_parser_template_argument): Robustify.
3339 2004-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
3341 * class.c (alter_access): Use %E format specifier to print an
3342 identifier node. Avoid looking at the IDENTIFIER_POINTER.
3343 (push_lang_context): Likewise.
3344 * decl.c (lookup_label): Likewise.
3345 (grokdeclarator): Likewise.
3346 * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
3347 * pt.c (do_type_instantiation): Likewise.
3348 * tree.c (handle_java_interface_attribute): Likewise.
3349 (handle_com_interface_attribute): Likewise.
3350 (handle_init_priority_attribute): Likewise.
3352 2004-05-22 Mark Mitchell <mark@codesourcery.com>
3356 * pt.c (build_non_dependent_expr): Expand the set of tree nodes
3357 recognized as overloaded functions.
3359 2004-05-22 Mark Mitchell <mark@codesourcery.com>
3362 * class.c (layout_nonempty_base_or_field): Do not try to avoid
3363 layout conflicts for unions.
3366 * typeck.c (build_x_unary_op): Instantiate template class
3367 specializations before looking for "operator &".
3370 * typeck.c (complete_type): Layout non-dependent array types, even
3374 * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
3377 2004-05-22 Roger Sayle <roger@eyesopen.com>
3379 * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
3380 returning when TREE_TYPE is error_mark_node.
3381 * typeck.c (require_complete_type): Return error_mark_node if
3382 value's type is an error_mark_node.
3384 2004-05-20 Andrew Pinski <pinskia@physics.uc.edu>
3386 * optimize.c (calls_setjmp_r): Remove.
3387 (calls_setjmp_p): Remove.
3388 * cp-tree.c (calls_setjmp_p): Remove.
3389 * decl.c (finish_function): Do not call calls_setjmp_p.
3391 2004-05-18 Zack Weinberg <zack@codesourcery.com>
3393 * decl.c (cp_finish_decl): Use mark_decl_referenced.
3394 * decl2.c (maybe_make_one_only): Likewise.
3395 * method.c (use_thunk): Likewise.
3397 2004-05-18 Jason Merrill <jason@redhat.com>
3399 * class.c (build_base_path): Tidy a bit.
3401 2004-05-14 Geoffrey Keating <geoffk@apple.com>
3403 * name-lookup.c (struct scope_binding): New.
3404 (EMPTY_SCOPE_BINDING): New.
3405 (lookup_using_namespace): Take a scope_binding instead of a
3407 (qualified_lookup_using_namespace): Likewise.
3408 (cxx_binding_clear): Delete.
3409 (do_nonmember_using_decl): Use a scope_binding instead of a
3411 (lookup_tag): Don't call select_decl.
3412 (ambiguous_decl): Don't return anything (and change callers to match).
3413 Take a scope_binding as the second parameter.
3414 (lookup_namespace_name): Use a scope_binding instead of a
3416 (unqualified_namespace_lookup): Likewise.
3417 (lookup_qualified_name): Likewise.
3418 (select_decl): Take a scope_binding instead of a cxx_binding.
3419 Use macros rather than hand-coding tests for type-ness.
3421 2004-05-13 Diego Novillo <dnovillo@redhat.com>
3423 * cp-gimplify.c: Rename from cp-simplify.c.
3424 * Make-lang.in, optimize.c: Update.
3426 2004-05-13 Diego Novillo <dnovillo@redhat.com>
3428 Merge from tree-ssa-20020619-branch. See
3429 ChangeLog.tree-ssa for details.
3431 * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
3432 cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
3433 expr.c, init.c, name-lookup.h, optimize.c, parser.c,
3434 pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
3436 * cp-mudflap.c: New file.
3437 * cp-simplify.c:: New file.
3439 2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3442 * decl2.c (check_classfn): For member templates, compare also the
3443 template parameters to match the declaration.
3444 * cp-tree.h: Adjust declaration of check_classfn.
3445 * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
3446 * friend.c (do_friend): Likewise.
3447 * pt.c (tsubst_friend_function): Likewise.
3449 2004-05-01 Zack Weinberg <zack@codesourcery.com>
3451 * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
3452 Instead, dig into the representation type to find the array bound.
3454 2004-04-30 Jason Merrill <jason@redhat.com>
3456 Refer to base members using COMPONENT_REFs where possible.
3457 * class.c (build_simple_base_path): New fn.
3458 (build_base_path): Use it for non-virtual base references.
3459 (layout_class_type): Change base fields to their real type
3460 after layout is done.
3461 * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
3462 * cp-lang.c (cxx_get_alias_set): Use it.
3464 2004-04-30 Kazu Hirata <kazu@cs.umass.edu>
3466 * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
3469 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3472 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
3473 used in integral constant expressions.
3475 2004-04-22 Mark Mitchell <mark@codesourcery.com>
3477 * init.c (build_aggr_init): Fix accidental use of C99 construct in
3480 * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
3482 * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
3483 * decl.c (reshape_init): Use it.
3484 * init.c (perform_member_init): Remove redundant condition.
3485 (build_aggr_init): Adjust to handle brace-enclosed initializers
3487 (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
3489 * parser.c (cp_parser_initializer_clause): Do not set
3490 TREE_HAS_CONSTRUCTOR on the initializer.
3491 * rtti.c (tinfo_base_init): Likewise.
3492 (generic_initializer): Likewise.
3493 (ptr_initializer): Likewise.
3494 (ptm_initializer): Likewise.
3495 (class_initializer): Likewise.
3496 (get_pseudo_ti_init): Likewise.
3497 * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
3499 2004-04-22 Alan Modra <amodra@bigpond.net.au>
3501 * name-lookup.c (anonymous_namespace_name): Make static.
3503 2004-04-19 Roger Sayle <roger@eyesopen.com>
3506 * class.c (build_base_path): Call fold whilst building the NULL
3507 pointer check expression trees.
3509 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
3511 * init.c (build_new_1): Don't use type size argument for Java
3512 _Jv_AllocObject call.
3514 2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
3516 * method.c (make_alias_for_thunk): Remove preprocessor guard on
3517 declaration and definition.
3519 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
3522 * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
3523 than ASM_OUTPUT_DEF.
3525 2004-04-08 Jakub Jelinek <jakub@redhat.com>
3527 * decl2.c (mark_used): Don't segfault if cfun != NULL but
3528 current_function_decl == NULL.
3530 2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
3533 * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
3536 2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3538 * init.c (decl_constant_value): Don't look at DECL_INITIAL
3540 * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
3541 or TREE_SIDE_EFFECTS of a type.
3543 2004-04-02 Nathan Sidwell <nathan@codesourcery.com>
3546 * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
3547 cv-qualifier unification.
3548 * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
3550 2004-04-02 Jan Hubicka <jh@suse.cz>
3552 * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
3553 * cp-tree.h (cp_update_decl_after_saving): Declare.
3554 * tree.c (cp_update_decl_after_saving): Define.
3556 2004-04-01 Mark Mitchell <mark@codesourcery.com>
3559 * typeck.c (get_delta_difference): Call fold before returning the
3562 2004-04-01 Richard Henderson <rth@redhat.com>
3565 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
3566 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
3568 2004-04-01 Mark Mitchell <mark@codesourcery.com>
3571 * name-lookup.c (maybe_push_cleanup_level): Robustify.
3573 2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3575 * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
3577 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3579 * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
3580 * class.c (check_bitfield_decl): Likewise.
3581 * cvt.c (type_promotes_to): Likewise.
3582 * decl.c (finish_enum): Likewise.
3583 * mangle.c (write_builtin_type): Likewise.
3584 * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
3585 * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
3586 (build_binary_op): Likewise.
3588 2004-03-31 Jan Hubicka <jh@suse.cz>
3590 * tree.h (optimize_function): Kill prototype.
3591 * optimize.c (dump_function, optimize_function, dump_finction): Kill.
3592 * semantics.c (expand_body): Kill.
3594 2004-03-30 Mark Mitchell <mark@codesourcery.com>
3597 * decl.c (start_decl_1): Do not decide whether or not to create a
3598 new cleanup level until after the type has been completed.
3601 * pt.c (tsubst_default_argument): Clear current_function_decl.
3603 2004-03-30 Zack Weinberg <zack@codesourcery.com>
3605 * name-lookup.c, parser.c: Use new shorter form of GTY markers.
3607 2004-03-29 Zack Weinberg <zack@codesourcery.com>
3609 * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
3610 is null, just print the literal name and return.
3612 2004-03-25 Kazu Hirata <kazu@cs.umass.edu>
3614 * cxx-pretty-print.c: Fix comment typos.
3616 2004-03-24 Kazu Hirata <kazu@cs.umass.edu>
3618 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
3621 2004-03-23 Ziemowit Laski <zlaski@apple.com>
3623 * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
3624 * mangle.c (write_type): Add call to 'mangle_fundamental_type'
3627 2004-03-23 Zack Weinberg <zack@codesourcery.com>
3629 PR 12267, 12391, 12560, 13129, 14114, 14133
3630 * cp-lang.c (c_reset_state): Delete.
3631 (push_file_scope, pop_file_scope): New stubs.
3632 * parser.c (c_parse_file): Call sorry() here if called more than once.
3634 2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3636 * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
3639 2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
3641 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
3643 2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
3645 * error.c (enum pad): Remove.
3646 (dump_qualifiers): Likewise.
3647 (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
3648 (dump_aggr_type): Likewise.
3649 (dump_type_suffix): Likewise.
3650 (dump_simple_decl): Likewise.
3651 (dump_function_decl): Likewise.
3652 (cv_to_string): Likewise.
3653 (dump_type_prefix): Likewise. Adjust return void.
3654 * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
3656 (pp_cxx_template_keyword_if_needed): Document.
3657 (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
3658 (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
3659 MUST_NOT_THROW_EXPR.
3661 2004-03-21 Mark Mitchell <mark@codesourcery.com>
3664 * decl.c (cp_finish_decl): Compute the size of arrays declared in
3665 templates, if their type is non-dependent.
3667 2004-03-19 Mark Mitchell <mark@codesourcery.com>
3669 * call.c (build_op_delete_call): Do not forget the placement
3670 arguments when iterating through mutiple delete operators.
3672 * cp-tree.h (svaed_scope): Remove last_parms.
3673 (NEW_DELETE_OPNAME_P): New macro.
3674 (last_function_parms): Remove.
3675 (do_friend): Adjust prototype.
3676 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
3677 using last_function_parms.
3678 (grokfndecl): Take the PARM_DECLs as an argument, rather than
3679 using last_function_parms.
3680 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
3681 for class-specific operator new and operator delete.
3682 (grok_op_properties): Do not look for allocation functions with
3684 (start_function): Use DECL_ARGUMENTS instead of
3685 last_function_parms.
3686 * decl.h (last_function_parms): Do not declare.
3687 * decl2.c (grokclassfn): Do not use last_function_parms.
3688 * friend.c (do_friend): Remove parmdecls parameter.
3689 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
3690 (pop_from_top_level): Do not restore it.
3691 * pt.c (check_explicit_specialization): Do not adjust
3692 last_function_parms.
3694 * name-lookup.c (do_local_using_decl): Create a local binding for
3695 types brought in via using declarations.
3697 * name-lookup.c (lookup_arg_dependent): Handle block-scope
3698 function declarations correctly.
3700 * semantics.c (finish_id_expression): Correct handling of
3701 conversion operators to dependent types.
3703 * typeck.c (lookup_destructor): Allow the use of destructors from
3706 2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3708 * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
3709 TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
3710 * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
3711 the field is named TEMPLATE_TYPE_PARM_INDEX.
3713 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3716 * parser.c (cp_parser_functional_cast): A cast to anything
3717 but integral or enumaration type is not an integral constant
3719 * pt.c (value_dependent_expression_p): Handle cast expressions
3720 without operands (such as "int()").
3722 2004-03-18 Mark Mitchell <mark@codesourcery.com>
3724 * semantics.c (finish_pseudo_destructor_expr): Allow differing
3725 cv-qualification between the type named by the
3726 pseudo-destructor-name and the object-type.
3728 * search.c (accessible_base_p): Handle non-proper bases.
3730 * name-lookup.c (do_nonmember_using_decl): If a using declaration
3731 refers to a single overloaded function, set the type of the
3733 * tree.c (lvalue_type): Simplify.
3734 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
3736 (build_unary_op): Handle OVERLOADs with known types.
3738 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
3741 * parser.c (cp_parser_postfix_expression): Handle the use of
3742 "typename" in non-dependent contexts. Convert appropriately when
3743 when using a qualified name after "->" or ".".
3745 * call.c (conditional_conversion): Honor the requirement that some
3746 conversions refer to the original object.
3748 2004-03-18 Mark Mitchell <mark@codesourcery.com>
3750 * call.c (build_conditional_expr): Do not call force_rvalue for
3751 operands of void_type when the conditional expression itself has
3753 * name-lookup.c (pushdecl): Don't consider a declaration of a
3754 function named "main" to be an overload of a type named "main".
3755 * parser.c (cp_parser_template_name): Perform name lookup when the
3756 template name is proceeded by "template" if the qualifying scope
3758 * typeck.c (composite_pointer_type_r): Correctly handle
3759 pointer-to-member types.
3760 (build_const_cast): Likewise.
3762 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3764 * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
3765 * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
3766 (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
3767 (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
3768 (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
3769 (TYPEOF_TYPE_EXPR): New macro.
3770 * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
3771 * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
3772 * pt.c (tsubst): Likewise.
3773 * semantics.c (finish_typeof): Likewise.
3774 * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
3775 and TEMPLATE_TYPE_PARM.
3776 * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
3777 (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
3779 2004-03-16 Mark Mitchell <mark@codesourcery.com>
3782 * cp-tree.h (build_new_op): Change prototype.
3783 (build_x_binary_op): Likewise.
3784 * call.c (build_new_op): Add overloaded_p parameter.
3785 * decl2.c (grok_array_decl): Adjust call to build_new_op.
3786 * parser.c (cp_parser_binary_expression): Note that uses of
3787 overloaded operators prevents an expression from being considered
3788 an integral constant.
3789 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
3791 * semantics.c (finish_call_expr): Likewise.
3792 * typeck.c (rationalize_conditional_expr): Likewise.
3793 (build_x_indirect_ref): Likewise.
3794 (build_x_binary_op): Likewise.
3795 (build_x_unary_op): Likewise.
3796 (build_x_compound_expr): Likewise.
3797 (build_modify_expr): Likewise.
3798 * typeck2.c (build_x_arrow): Likewise.
3800 2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
3802 * cp-lang.c, ptree.c: Update copyright.
3804 2004-03-13 Mark Mitchell <mark@codesourcery.com>
3807 * parser.c (cp_parser_non_integral_constant_expression): Encode
3808 more of the idiom that surrounded calls to this function within
3810 (cp_parser_primary_expression): Adjust accordingly.
3811 (cp_parser_postfix_expression): Likewise.
3812 (cp_parser_unary_expression): Likewise.
3813 (cp_parser_cast_expression): Likewise.
3814 (cp_parser_assignment_expression): Likewise.
3815 (cp_parser_expression): Likewise.
3816 (cp_parser_new_expression): Note that new-expressions are not
3817 allowed in integral constant expressions.
3818 (cp_parser_delete_expression): Likewise.
3820 2004-03-12 Matt Austern <austern@apple.com>
3822 * decl2.c (maybe_make_one_only): Look at
3823 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
3824 to make an explicit instantiation weak.
3825 * method.c (use_thunk): Make sure we call comdat_linkage
3827 * pt.c (do_type_instantiation): On systems where weak symbols
3828 don't go in a static archive's TOC, explicit instantiation of a
3829 class must imply *explicit* instantiation of its memeber.
3831 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
3833 * call.c, cp-tree.h, pt.c: Fix comment typos.
3835 2004-03-10 Mark Mitchell <mark@codesourcery.com>
3838 * decl.c (xref_tag): Disregard non-type declarations when
3839 looking up a tagged type.
3841 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
3844 * call.c (convert_like_real): Build a const qualified temporary,
3845 when testing ctor access.
3847 2004-03-09 Mark Mitchell <mark@codesourcery.com>
3849 * call.c (initialize_reference): Fix typo.
3851 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3854 * pt.c (determine_specialization): For member templates, match also
3858 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
3860 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
3862 2004-03-09 Mark Mitchell <mark@codesourcery.com>
3865 * call.c (initialize_reference): Handle initializers that are
3866 class-member access expressions applies to rvalues.
3868 2004-03-09 Mark Mitchell <mark@codesourcery.com>
3871 * name-lookup.c (supplement_binding): Ignore functions that are
3872 marked DECL_ANTICIPATED.
3874 2004-03-08 Mark Mitchell <mark@codesourcery.com>
3877 * class.c (check_field_decls): Complain about non-static data
3878 members of reference type in unions. Propagate
3879 CLASSTYPE_REF_FIELDS_NEED_INIT and
3880 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
3882 * init.c (perform_member_init): Complain about mbmers with const
3883 type that are not explicitly initialized.
3885 2004-03-08 Mark Mitchell <mark@codesourcery.com>
3887 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
3888 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
3889 (lang_identifier): Remove implicit_decl and error_locus.
3890 (IDENTIFIER_IMPLICIT_DECL): Remove.
3891 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
3892 (IDENTIFIER_ERROR_LOCUS): Likewise.
3893 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
3894 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
3895 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
3896 (implicitly_declare): Remove.
3897 * decl.c (warn_extern_redeclared_static): Remove check of
3898 IDENTIFIER_IMPLICIT_DECL.
3899 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
3900 (implicitly_declare): Remove.
3901 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
3902 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
3903 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
3904 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
3905 in the innermost scope, rather than at namespace scope.
3906 * name-lookup.c (push_local_binding): Give it external linkage.
3907 (pushdecl): Remove dead code.
3908 * name-lookup.h (push_local_binding): Declare it.
3909 * ptree.c (cxx_print_identifier): Don't print
3910 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
3911 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
3912 not IDENTIFIER_ERROR_LOCUS.
3913 * typeck.c (build_function_call): Remove dead code.
3915 2004-03-08 Jason Merrill <jason@redhat.com>
3918 * decl.c (xref_tag): Remove attribute handling.
3919 * cp-tree.h: Adjust prototype.
3920 * decl.c, parser.c, rtti.c: Adjust callers.
3921 * parser.c (cp_parser_class_head): Pass back attributes in the
3923 (cp_parser_class_specifier): Adjust.
3925 2004-03-08 Matt Austern <austern@apple.com>
3928 * name-lookup.c (add_decl_to_level): Add extern variables, as well
3929 as static, to static_decls array.
3931 2004-03-05 Jason Merrill <jason@redhat.com>
3933 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
3935 2004-03-04 Geoffrey Keating <geoffk@apple.com>
3937 * decl.c (grokfndecl): Update old incorrect comment.
3938 (grokvardecl): Diagnose C++ variables of type with no linkage.
3940 2004-03-01 Mark Mitchell <mark@codesourcery.com>
3943 * pt.c (build_non_dependent_expr): Do not create a
3944 NON_DEPENDENT_EXPR for a THROW_EXPR.
3946 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
3949 * error.c (dump_expr): Handle THROW_EXPR.
3951 2004-03-01 Mark Mitchell <mark@codesourcery.com>
3954 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
3955 lookup if ordinary name-lookup finds a non-function.
3956 * pt.c (tsubst_copy_and_build): Likewise.
3959 * parser.c (cp_parser_late_parsing_default_args): Check that there
3960 are no extra tokens after the end of the default-argument
3963 2004-03-01 Mark Mitchell <mark@codesourcery.com>
3966 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
3967 having C++ linkage for name-mangling purposes.
3970 * parser.c (cp_parser_direct_declarator): Recognize constructor
3971 declarators that use a template-id to name the class being
3975 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
3976 (tsubst_expr): Do not call tsubst_copy, even when
3977 processing_template_decl.
3979 2004-03-01 Jeff Law <law@redhat.com>
3981 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
3984 2004-02-29 Mark Mitchell <mark@codesourcery.com>
3987 * name-lookup.h (push_scope): Change prototype.
3988 * name-lookup.c (push_scope): Do not reenter the current class
3990 * decl.c (grokfndecl): Check return code from push_scope before
3992 * decl2.c (check_classfn): Likewise.
3993 * parser.c (cp_parser_conversion_function_id): Likewise.
3994 (cp_parser_init_declarator): Likewise.
3995 (cp_parser_direct_declarator): Likewise.
3996 (cp_parser_class_specifier): Likewise.
3997 (cp_parser_class_head): Likewise.
3998 (cp_parser_lookup_name): Likewise.
3999 (cp_parser_constructor_declarator_p): Likewise.
4000 * pt.c (instantiate_class_template): Likewise.
4001 (resolve_typename_type): Likewise.
4003 2004-02-29 Mark Mitchell <mark@codesourcery.com>
4006 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
4010 * class.c (update_vtable_entry_for_fn): Do not go through
4011 covariance machinery if the type returned by an overrider is the
4012 same as the original.
4014 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
4016 * call.c: Fix a comment typo.
4018 2004-02-27 Ziemowit Laski <zlaski@apple.com>
4020 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
4022 2004-02-26 Mark Mitchell <mark@codesourcery.com>
4025 * parser.c (cp_parser_parameter_declaration_list): Commit
4026 to fewer tentative parses.
4028 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4031 * pt.c (dependent_type_p_r): A template template parameter is a
4034 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4037 * mangle.c (write_template_arg_literal): Don't rely on identity for
4040 2004-02-24 Jason Merrill <jason@redhat.com>
4042 * tree.c (build_exception_variant): Use check_qualified_type.
4044 2004-02-23 Zack Weinberg <zack@codesourcery.com>
4045 Kazu Hirata <kazu@cs.umass.edu>
4047 * decl.c (cxx_init_decl_processing): Don't check
4048 flag_writable_strings.
4050 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
4053 * typeck.c (maybe_warn_about_returning_address_of_location):
4054 Change check for VAR_DECL to use DECL_P instead.
4056 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4059 * cvt.c (build_expr_type_conversion): Type must be complete before
4060 looking up for conversions.
4062 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4065 * name-lookup.c (arg_assoc_class): Don't look into template
4066 arguments if it is not a primary template.
4068 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
4071 * method.c (use_thunk): Always clone function argument tree.
4073 2004-02-20 Mark Mitchell <mark@codesourcery.com>
4076 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
4079 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
4080 for all type variants.
4082 2004-02-19 Mark Mitchell <mark@codesourcery.com>
4085 * decl.c (duplicate_decls): Return error_mark_node for invalid
4087 * name-lookup.c (push_namespace): Ignore the return value from
4089 * pt.c (push_template_decl_real): Robustify.
4092 * name-lookup.c (push_class_level_binding): Do not complain about
4093 adding a binding for a member whose name is the same as the
4094 enclosing class if the member is located in a base class of the
4097 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4100 * parser.c (cp_parser_new_expression): Parse an ill-formed
4101 direct-new-declarator after a parenthesized type-id to emit good
4104 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
4106 * cp-tree.def, cvt.c: Update copyright.
4108 2004-02-17 Mark Mitchell <mark@codesourcery.com>
4111 * cp-tree.h (abi_version_at_least): Remove.
4112 * mangle.c: Include flags.h.
4114 2004-02-15 Mark Mitchell <mark@codesourcery.com>
4117 * call.c (build_conditional_expr): Handle conversions between
4118 class types which result in differently cv-qualified type
4122 * class.c (delete_duplicate_fields_1): Remove.
4123 (delete_duplicate_fields): Likewise.
4124 (finish_struct_anon): Remove check for members with the same name
4125 as their enclosing class.
4126 (check_field_decls): Do not call duplicate_fields.
4127 * decl.c (grokdeclarator): Remove check for static data members
4128 with the same name as their enclosing class.
4129 * name-lookup.c (push_class_level_binding): Check for members with
4130 the same name as their enclosing class.
4132 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
4135 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
4137 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4140 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
4141 has full set of arguments.
4143 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4146 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
4148 2004-02-13 Mark Mitchell <mark@codesourcery.com>
4151 * cp-tree.h (delete_sanity): Change prototype.
4152 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
4153 Remove dead code. Adjust code to warn about deleting an array.
4154 * typekc.c (decay_conversion): Use build_address and build_nop.
4157 * search.c (accessible_p): Do not check access in thunks.
4160 * call.c (build_conditional_expr): Call force_rvalue on the
4161 non-void operand in the case that one result is a throw-expression
4162 and the other is not.
4164 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
4167 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
4168 the type name and look ahead for ::~, and bail out early with a
4169 better error message if the parse is going to fail.
4171 2004-02-12 Mark Mitchell <mark@codesourcery.com>
4173 * call.c (conversion_kind): New type.
4174 (conversion_rank): Likewise.
4175 (conversion): Likewise.
4176 (CONVERSION_RANK): New macro.
4177 (conversion_obstack): New variable.
4178 (obstack_initialized): Likewise.
4179 (z_candidate): Change type of convs and second_conv.
4180 (candidate_warning): New type.
4181 (IDENTITY_RANK): Remove.
4182 (EXACT_RANK): Likewise.
4183 (PROMO_RANK): Likewise.
4184 (STD_RANK): Likewise.
4185 (PBOOL_RANK): Likewise.
4186 (USER_RANK): Likewise.
4187 (ELLIPSIS_RANK): Likewise.
4188 (BAD_RANK): Likewise.
4189 (ICS_RANK): Likewise.
4190 (ICS_STD_RANK): Likewise.
4191 (ICS_USER_FLAG): Likewise.
4192 (ICS_ELLIPSIS_FLAG): Likewise.
4193 (ICS_THIS_FLAG): Likewise.
4194 (ICS_BAD_FLAG): Likewise.
4195 (NEED_TEMPORARY_P): Likewise.
4196 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
4197 (USER_CONV_CAND): Likewise.
4198 (USER_CONV_FN): Likewise.
4199 (conversion_obstack_alloc): New function.
4200 (alloc_conversion): Likewise.
4201 (validate_conversion_obstack): Likewise.
4202 (alloc_conversions): Likewise.
4203 (build_conv): Adjust to deal with new conversion data structures.
4204 (build_identity_conv): New function.
4205 (build_ambiguous_conv): Likewise.
4206 (standard_conversion): Adjust to deal with new conversion data
4208 (convert_class_to_reference): Likewise.
4209 (direct_reference_binding): Likewise.
4210 (reference_binding): Likewise.
4211 (implicit_conversion): Likewise.
4212 (add_candidate): Likewise.
4213 (add_function_candidate): Likewise.
4214 (add_conv_candidate): Likewise.
4215 (build_builtin_candidate): Likewise.
4216 (print_z_candidate): Likewise.
4217 (merge_conversion_sequences): Likewise.
4218 (build_user_type_conversion_1): Likewise.
4219 (build_user_type_conversion): Likewise.
4220 (build_new_function_call): Likewise.
4221 (build_object_call): Likewise.
4222 (conditional_conversion): Likewise.
4223 (build_conditional_expr): Likewise.
4224 (build_new_op): Likewise.
4225 (build_op_delete_call): Likewise.
4226 (convert_like_real): Likewise.
4227 (build_over_call): Likewise.
4228 (build_new_method_call): Likewise.
4229 (is_subseq): Likewise.
4230 (maybe_handle_implicit_object): Likewise.
4231 (maybe_handle_ref_bind): Likewise.
4232 (compare_ics): Likewise.
4233 (source_type): Likewise.
4234 (add_warning): Likewise.
4236 (can_convert_arg): Likewise.
4237 (can_convert_arg_bad): Likewise.
4238 (perform_implicit_conversion): Likewise.
4239 (perform_direct_initialization_if_possible): Likewise.
4240 (initialize_reference): Likewise.
4241 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
4242 * cp-tree.def (WRAPPER): Likewise.
4243 (IDENTITY_CONV): Remove.
4244 (LVALUE_CONV): Likewise.
4245 (QUAL_CONV): Likewise.
4246 (STD_CONV): Likewise.
4247 (PTR_CONV): Likewise.
4248 (PMEM_CONV): Likewise.
4249 (BASE_CONV): Likewise.
4250 (REF_BIND): Likewise.
4251 (USER_CONV): Likewise.
4252 (AMBIG_CONV): Likewise.
4253 (RVALUE_CONV): Likewise.
4254 * cp-tree.h (tree_wrapper): Remove.
4255 (WRAPPER_ZC): Remove.
4256 (lang_tree_node): Remove wrapper.
4257 (LOOKUP_SPECULATIVELY): Remove.
4258 (build_op_delete_call): Adjust prototype.
4259 (validate_conversion_obstack): Declare.
4260 (build_zc_wrapper): Remove.
4261 * cvt.c (convert_to_reference): Remove dead code.
4262 (ocp_convert): Likewise.
4263 * decl.c (redeclaration_error_message): Correct handling of
4265 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
4266 (cp_tree_node_structure): Remove WRAPPER case.
4267 * decl2.c (finish_file): Call validate_conversion_obstack.
4268 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
4269 (build_op_delete_call): Likewise.
4270 (build_x_delete): Likewise.
4271 (build_delete): Adjust call to build_op_delete_call.
4272 * pt.c (tsubst_friend_declaration): Adjust code to determine
4273 whether or not a friend template is a definition.
4274 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
4275 * tree.c (build_zc_wrapper): Remove.
4277 2004-02-12 Zack Weinberg <zack@codesourcery.com>
4279 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
4280 * cp-tree.h: Don't declare cxx_builtin_type_decls.
4281 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
4282 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
4284 2004-02-10 Mark Mitchell <mark@codesourcery.com>
4286 * typeck.c (lookup_destructor): Fix typo in error message.
4288 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
4290 * call.c, parser.c, tree.c: Fix comment typos.
4292 2004-02-07 Zack Weinberg <zack@codesourcery.com>
4295 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
4296 * decl.c (duplicate_decls, start_function): Likewise.
4298 2004-02-07 Zack Weinberg <zack@codesourcery.com>
4300 * name-lookup.c (pushdecl): Issue shadow warnings directly.
4301 * parser.c (free_parser_stacks): Delete.
4303 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
4305 * rtti.c: Update copyright.
4307 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4310 * decl.c (require_complete_types_for_parms): Do not insert
4311 error_mark_node in the parameter list.
4313 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4316 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
4317 error when terminator can not be found.
4319 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
4321 Make-lang.in (po-generated): Delete.
4323 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
4325 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
4326 targetm.calls.promote_prototypes.
4328 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
4332 2004-01-15 Geoffrey Keating <geoffk@apple.com>
4334 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
4335 (handle_pragma_implementation): Likewise.
4337 2004-02-05 Mark Mitchell <mark@codesourcery.com>
4340 * typeck.c (lookup_destructor): Tweak error message.
4342 2004-02-05 Jan Hubicka <jh@suse.cz>
4344 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
4347 2004-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4350 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
4351 code, only emits the diagnostic now. Added lookup of the identifier
4352 and support for qualified ids.
4353 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
4354 Parse an (invalid) type name as id-expression within a declarator.
4355 (cp_parser_simple_declaration): Use it.
4356 (cp_parser_member_declaration): Likewise.
4357 (cp_parser_make_typename_type): New function. Handle errors through
4358 cp_parser_diagnose_invalid_typename.
4359 (cp_parser_elaborated_type_specifier): Use it.
4361 2004-02-04 Mark Mitchell <mark@codesourcery.com>
4364 * call.c (convert_like_real): Use "converting" rather than
4365 "argument" as the descriptive keyword to
4366 dubious_conversion_warnings.
4367 * typeck.c (convert_for_assignment): Do not call
4368 dubious_conversion_warnings.
4370 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4373 * init.c (build_delete): Emit a more informative error message in
4374 case of an incomplete type, and on the correct source line.
4376 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
4378 * error.c, search.c: Update copyright.
4380 2004-02-04 Mark Mitchell <mark@codesourcery.com>
4383 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
4384 linkage for the typeinfo name string.
4386 2004-02-04 Mark Mitchell <mark@codesourcery.com>
4389 * cp-tree.h (fold_non_dependent_expr): New function.
4390 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
4391 (cp_parser_template_argument): Use fold_non_dependent_expr.
4392 (cp_parser_direct_declarator): Likewise.
4393 * pt.c (fold_non_dependent_expr): New function.
4394 (convert_nontype_argument): Use it.
4395 (tsubst_qualified_id): Simplify.
4396 (tsubst_copy_and_build): Likewise.
4398 2004-02-04 Mark Mitchell <mark@codesourcery.com>
4400 * decl.c (cxx_push_function_context): Do not set
4401 current_function_is_thunk.
4402 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
4405 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4408 * pt.c (more_specialized_class): Increase processing_template_decl
4409 while partial ordering.
4411 2004-02-03 Mark Mitchell <mark@codesourcery.com>
4414 * decl.c (start_function): Do not call pushdecl for any
4415 instantiation or specialization of a primary template.
4417 2004-02-03 Mark Mitchell <mark@codesourcery.com>
4420 * parser.c (cp_parser_class_name): Robustify.
4423 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
4426 * semantics.c (finish_id_expression): Do not return an
4427 IDENTIFIER_NODE when lookup finds a PARM_DECL.
4429 2004-02-03 Mark Mitchell <mark@codesourcery.com>
4432 * pt.c (build_non_dependent_expr): Do not build
4433 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
4436 * semantics.c (finish_id_expression): Do not return an
4437 IDENTIFIER_NODE when lookup finds a VAR_DECL.
4440 * parser.c (cp_parser_simple_declaration): When skipping to the
4441 end of the statement swallow the terminating semicolon.
4443 2004-02-02 Mark Mitchell <mark@codesourcery.com>
4446 * init.c (build_offset_ref): Improve error recovery for invalid
4447 uses of non-static member functions.
4450 * cp-tree.h (cp_build_type_attribute_variant): New function.
4451 * class.c (build_clone): Use cp_build_type_attribute_variant.
4452 * decl.c (duplicate_decls): Likewise.
4453 * pt.c (copy_default_args_to_explicit_spec): Likewise.
4454 (tsubst_function_type): Likewise.
4455 * tree.c (build_exception_variant): Check attributes before
4456 concluding that two types are the same.
4457 (cp_build_type-attribute_variant): New method.
4458 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
4461 * call.c (convert_class_to_reference): Keep better track of
4462 pedantically invalid user-defined conversions.
4464 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4467 * pt.c (tsubst_qualified_id): Improved error message when a type
4468 is expected but not found.
4470 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
4472 * class.c: Fix comment typos.
4474 * error.c: Likewise.
4475 * parser.c: Likewise.
4477 * search.c: Likewise.
4478 * typeck.c: Likewise.
4480 2004-01-30 Richard Henderson <rth@redhat.com>
4483 * method.c (use_thunk): Don't force_target_expr for void thunks.
4484 * tree.c (build_target_expr_with_type): Assert non-void type.
4485 (force_target_expr): Likewise.
4487 2004-01-30 Michael Matz <matz@suse.de>
4489 * parser.c (cp_parser_labeled_statement): Accept case ranges.
4491 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4495 * decl.c (grokdeclarator): Check immediatly type completeness for
4496 non-dependent types.
4498 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4501 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
4502 a sizeof expression.block
4504 2004-01-29 Mark Mitchell <mark@codesourcery.com>
4507 * mangle.c (write_encoding): Correct encoding of member template
4510 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4512 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
4513 template name as it was `<::' (digraph typo).
4514 (cp_parser_nth_token_starts_template_argument_list_p): New function.
4515 (cp_parser_id_expression): Use it.
4516 (cp_parser_nested_name_specifier_opt): Likewise.
4517 (cp_parser_template_name): Likewise.
4518 (cp_parser_class_name): Likewise.
4519 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
4521 2004-01-28 Mark Mitchell <mark@codesourcery.com>
4524 * typeck.c (merge_types): Do not merge attributes into
4528 * parser.c (cp_parser_direct_declarator): Do not prevent
4529 backtracking inside a parenthesized declarator.
4530 (cp_parser_parameter_declaration): Fix typo in comment.
4532 2004-01-28 Jan Hubicka <jh@suse.cz>
4534 * semantics.c (expand_body) Do emit_associated_thunks before
4537 2004-01-27 Devang Patel <dpatel@apple.com>
4539 * name-lookup.c: Include "debug.h"
4540 (do_namespace_alias): Invoke debug_hooks to emit debug info
4541 for namespace alias.
4542 (do_local_using_decl): Invoke debug_hooks to emit debug info
4544 (do_class_using_decl): Same.
4545 (do_toplevel_using_decl): Same.
4546 (do_using_directive): Same.
4547 (cp_emit_debug_info_for_using): New function.
4548 * Make-lang.in (cp/parser.o): Depend on debug.h
4549 (cp/name-lookup.o): Same.
4551 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4553 * cp-tree.h (language_function, lang_type_header): Use
4555 * name-lookup.h (cp_binding_level): Likewise.
4557 2004-01-26 Mark Mitchell <mark@codesourcery.com>
4560 * semantics.c (finish_for_expr): Check for unresolved overloaded
4563 * class.c (add_method): Just check processing_template_decl to
4564 determine whether or not we are within a template.
4565 * decl2.c (maybe_retrofit_in_chrg): Likewise.
4566 * init.c (decl_constant_value): Check the type of the declaration,
4568 * name-lookup.c (maybe_push_to_top_level): Rename to ...
4569 (push_to_top_level): ... this.
4570 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
4571 * pt.c (push_template_decl_real): Reorder condition for speed.
4572 (convert_template_argument): Use dependency-checking functions in
4573 place of uses_template_parms.
4574 (lookup_template_class): Avoid calling uses_template_parms more
4576 (uses_template_parms): Reimplement, using dependency-checking
4578 (instantiate_class_template): Use push_to_top_level, not
4579 maybe_push_to_top_level.
4580 (type_unification_real): Simplify.
4581 (type_dependent_expression_p): Handle OFFSET_REFs and
4583 (any_dependent_template_arguments_p): Handle multiple levels of
4585 * semantics.c (expand_or_defer_fn): Do not check
4586 uses_template_parms for template instantiations.
4587 * typeck.c (comptypes): Avoid calling cp_type_quals.
4589 2004-01-25 Mark Mitchell <mark@codesourcery.com>
4592 * call.c (build_over_call): Do not convert arguments when
4593 processing a template.
4594 * pt.c (build_non_dependent_expr): Do not build a
4595 NON_DEPENDENT_EXPR for arithmetic constants.
4597 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4600 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
4601 returns a TYPE_DECL. no further lookup is required.
4602 * semantics.c (check_template_template_default_arg): A TYPE_DECL
4603 is invalid. Rework to give better diagnostics.
4605 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4608 * pt.c (instantiate_class_template): Add an error_mark_node
4610 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
4612 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
4615 * decl.c (finish_function): Move the call to
4616 finish_fname_decls below the call to
4617 finish_eh_spec_block.
4619 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
4621 * optimize.c, typeck2.c: Update copyright.
4623 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
4625 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
4626 init.c, mangle.c, typeck.c: Update copyright.
4628 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
4630 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
4632 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
4634 * Make-lang.in: Replace $(docdir) with doc.
4635 (c++.info, c++.srcinfo): Dummy entry.
4636 (c++.man, c++.srcman): New rules.
4637 (c++.install-man): Revamp rule.
4639 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
4641 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
4642 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
4643 immediate $(shell) instead of deferred backquote.
4645 2004-01-19 Mark Mitchell <mark@codesourcery.com>
4648 * parser.c (cp_parser_postfix_expression): When encountering
4649 incomplete type on left-hand side of "->" or ".", treat the entire
4650 expression as erroneous.
4653 * call.c (build_field_call): Remove.
4654 (n_build_method_call): Likewise.
4655 (build_method_call): Likewise.
4656 (build_new_method_call): Do not call build_field_call.
4657 * class.c (n_build_method_call): Remove.
4658 (print_class_statistics): Do not print it.
4659 * cp-tree.h (build_method_call): Remove declaration.
4660 (finish_object_call_expr): Likewise.
4661 (build_new_1): Do not use build_method_call.
4662 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
4663 when the function appearing on the right-hand-side of "." or "->"
4664 is not actually a function.
4665 * pt.c (tsubst_copy_and_build): Likewise.
4666 * semantics.c (finish_object_call_expr): Remove.
4668 2004-01-18 Mark Mitchell <mark@codesourcery.com>
4671 * pt.c (tsubst): Use finish_typeof.
4673 2004-01-18 Jason Merrill <jason@redhat.com>
4676 * except.c (build_throw): In a template, set
4677 current_function_returns_abnormally.
4679 2004-01-17 Fred Fish <fnf@intrinsity.com>
4682 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
4683 except don't call array_type_nelts() with a VECTOR_TYPE.
4685 2004-01-16 Jan Hubicka <jh@suse.cz>
4687 * mangle.c (write_mangled_name): Remove inline modifier.
4689 2004-01-16 Mark Mitchell <mark@codesourcery.com>
4692 * decl.c (compute_array_index_type): Fix grammar in comment.
4693 * init.c (build_zero_init): Handle zero-sized arrays correctly.
4696 * call.c (name_as_c_string): Print conversion operator names
4700 * call.c (initialize_reference): Pass -1 for inner parameter to
4703 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4706 * parser.c (cp_parser_base_specifier): Check for an invalid
4707 keyword `typename' and emit an user-friendly error message.
4709 2004-01-15 Geoffrey Keating <geoffk@apple.com>
4712 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
4713 (handle_pragma_implementation): Likewise.
4715 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4718 * typeck.c (build_class_member_access_expr): Allow to access members
4719 of the currently open class.
4720 (finish_class_member_access_expr): Likewise.
4722 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
4725 * name-lookup.c (validate_nonmember_using_decl): Take scope and
4726 name by value, instead of computing them.
4727 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
4728 arguments. Pass them to validate_nonmember_using_decl.
4729 * name-lookup.h (do_local_using_decl): Adjust.
4730 (do_toplevel_using_decl): Likewise.
4731 * parser.c (cp_parser_using_declaration): Likewise.
4732 * pt.c (tsubst_expr): Likewise.
4734 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
4738 * name-lookup.c (qualified_lookup_using_namespace): Search
4739 strongly-associated namespaces first, and only then try other
4742 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
4744 * Make-lang.in (c++.srcextra): Dummy entry.
4746 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4749 * parser.c (cp_parser_template_name): Don't try to parse a
4750 conversion-function-id, as it cannot be a template-name.
4751 (cp_parser_simple_type_specifier): Check for invalid template-ids
4752 even after a built-in type.
4754 2004-01-14 Jan Hubicka <jh@suse.cz>
4757 * pt.c (instantiate_decl): Do not increase function_depth.
4759 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
4763 * parser.c (cp_parser_elaborated_type_specifier): Warn about
4764 attributes and discard.
4765 * decl.c (xref_tag): Don't overwite existing attributes with
4768 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4771 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
4772 is no destructor while looking up a BIT_NOT_EXPR.
4774 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
4776 * cxxfilt.c: Remove unused file.
4778 2004-01-14 Jan Hubicka <jh@suse.cz>
4780 Partial fix to PR c++/12850
4781 * decl2.c (mark_used): Do not proactively instantiate templates
4782 when compiling in unit-at-a-time or not optimizing.
4783 * optimize.c (maybe_clone_body): Do not increase function depth.
4785 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4788 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
4790 2004-01-12 Steven Bosscher <stevenb@suse.de>
4793 * parser.c (cp_parser_member_declaration): Any non-type is also
4794 not a class or a function.
4796 2004-01-12 Jason Merrill <jason@redhat.com>
4799 * class.c (build_base_path): Do not mark vtable references as
4801 (build_vtbl_ref_1): Likewise.
4803 2004-01-12 Richard Henderson <rth@redhat.com>
4806 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
4807 (store_init_value): Use it.
4808 * decl.c (check_initializer): Expect full initialization code
4809 from store_init_value.
4810 * init.c (expand_aggr_init_1): Likewise.
4811 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
4813 2004-01-12 Mark Mitchell <mark@codesourcery.com>
4815 * class.c (layout_class_type): For non-POD class types, also copy
4816 the DECL_SIZE and DECL_MODE of fields to the base class type.
4818 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4821 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
4822 calling regenerate_decl_from_template.
4824 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
4827 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
4828 decl-specifier occurring along with a class definition.
4830 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
4832 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
4833 clauses to comments describing declares_class_or_enum.
4834 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
4837 2004-01-12 Jan Hubicka <jh@suse.cz>
4839 * pt.c (for_each_template_parm): Do not check for duplicates.
4840 (for_each_template_parm): Use walk_tree duplicate checking code.
4842 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
4845 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
4846 is error_mark_node, don't add any more decl_specs.
4847 (cp_parser_init_declarator): After committing to a declaration, if
4848 the decl_specifiers start with error_mark_node, issue an error and
4849 change the type to "int".
4851 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
4854 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
4856 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4860 * pt.c (tsubst): Substitution must fail if we are attempting to
4861 create an array with element type that is an abstract class type.
4862 * decl.c (cp_finish_decl): Strip pointers and array types recursively
4863 before calling abstract_virtuals_error.
4865 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
4867 * name-lookup.c (qualified_lookup_using_namespace): Consider
4868 strong using directives even if we've already found a binding.
4870 2004-01-09 Mark Mitchell <mark@codesourcery.com>
4872 * cp-tree.h (cxx_expand_expr): Change prototype.
4873 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
4875 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4878 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
4879 looking into them recursively. They can be there because of the
4880 new __offsetof__ extension.
4882 2004-01-07 Zack Weinberg <zack@codesourcery.com>
4884 * parser.c (cp_parser_save_member_function_body): Mark the
4887 2004-01-05 Mark Mitchell <mark@codesourcery.com>
4890 * class.c (build_clone): Copy type attributes from the original
4891 function to the clone.
4894 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
4895 references as constant.
4898 * parser.c (cp_parser_explicit_instantiation): Improve error
4900 (cp_parser_require): Improve indication of the error location.
4903 * parser.c (cp_parser_class_head): Reorder logic to check for
4904 invalid qualification.
4906 2004-01-04 Mark Mitchell <mark@codesourcery.com>
4909 * name-lookup.c (lookup_using_namespace): Remove spacesp
4911 (unqualified_namespace_lookup): Likewise.
4912 (lookup_qualified_name): Adjust accordingly.
4913 (lookup_name_real): Likewise.
4914 (lookup_arg_dependent): Do not eliminate the namespace of the
4915 functions found by unqualified name lookup unless that is the
4918 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
4920 * semantics.c (push_deferring_access_checks): Fix format.
4921 (resume_deferring_access_checks): Likewise.
4922 (stop_deferring_access_checks): Likewise.
4923 (pop_deferring_access_checks): Likewise.
4924 (get_deferred_access_checks): Likewise.
4925 (pop_to_parent_deferring_access_checks): Likewise.
4926 (perform_deferred_access_checks): Likewise.
4927 (perform_or_defer_access_check): Likewise.
4929 2004-01-04 Richard Henderson <rth@redhat.com>
4931 * call.c (build_over_call): Don't create a save_expr of an
4932 aggregate, but rather its address.
4934 2004-01-04 Mark Mitchell <mark@codesourcery.com>
4937 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
4938 an offsetof expression.
4940 * parser.c (cp_parser_parameter_declaration): Fix comment.
4943 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
4944 (reference_binding): Set it when appropriate.
4945 (build_temp): New function, split out from ...
4946 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
4947 (initialize_reference): Likewise.
4950 * parser.c (cp_parser): Add in_type_id_in_expr_p.
4951 (cp_parser_new): Initialize it.
4952 (cp_parser_postfix_expression): Set it.
4953 (cp_parser_sizeof_operand): Likewise.
4954 (cp_parser_parameteR_declaration): Do not commit early to tenative
4955 parsers when in_type_id_in_expr_p is set.
4957 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4960 * parser.c (cp_parser_template_argument): Don't call
4961 make_unbound_class_template directly.
4962 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
4963 UNBOUND_CLASS_TEMPLATE tree node.
4965 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
4968 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
4970 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4973 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
4974 (DECL_FUNCTION_TEMPLATE_P): Use it.
4975 (DECL_CLASS_TEMPLATE_P): Likewise.
4976 * parser.c (cp_parser_lookup_name): Add is_template parameter.
4977 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
4978 (cp_parser_template_name): Likewise.
4979 (cp_parser_elaborated_type_specifier): Likewise.
4980 (cp_parser_namespace_name): Likewise.
4981 (cp_parser_class_name): Likewise.
4982 (cp_parser_lookup_name_simple): Likewise.
4984 See ChangeLog.3 for earlier changes.