1 2005-05-19 Jakub Jelinek <jakub@redhat.com>
4 * decl.c (grokdeclarator): Fix "storage class specified for"
7 2005-05-19 Kazu Hirata <kazu@cs.umass.edu>
9 * parser.c: Fix comment typos.
11 2005-05-18 Geoffrey Keating <geoffk@apple.com>
13 * Make-lang.in (cc1plus-dummy): New.
14 (cc1plus-checksum.c): New.
15 (cc1plus-checksum.o): New.
16 (cc1plus): Add cc1plus-checksum.o.
18 2005-05-17 H.J. Lu <hongjiu.lu@intel.com>
21 * decl2.c (determine_visibility): Don't set visibility to
22 hidden if it has been set explicitly by user.
24 2005-05-17 Ziemowit Laski <zlaski@apple.com>
25 Mike Stump <mrs@apple.com>
27 Yet more Objective-C++...
29 * cp-objcp-common.h (cxx_get_alias_set): Move from
31 (cxx_warn_unused_global_decl): Likewise.
32 (cp_expr_size): Likewise.
33 (cp_tree_size): Likewise.
34 (cp_var_mod_type_p): Likewise.
35 (cxx_initialize_diagnostics): Likewise.
36 (cxx_types_compatible_p): Likewise.
39 * lex.c (D_OBJC): Add.
41 * Make-lang.in (cp/pt.o): Add cp/cp-objcp-common.h.
42 * parser.c: Add c-common.h include.
43 * pt.c: Add c-common.h and cp-objcp-common.h includes.
44 (template_args_equal): Use objc_comptypes as well.
45 (tsubst_copy_and_build): Use objcp_tsubst_copy_and_build as well.
46 * semantics.c (do_poplevel): Remove static.
48 * decl.c (objc_mark_locals_volatile): Don't change decls that are
50 * decl2.c (generate_ctor_or_dtor_function): Add code to initialize
51 Objective C++ early enough.
52 * lex.c (struct resword reswords): Add Objective-C++ support.
53 * parser.c (cp_lexer_get_preprocessor_token): Add Objective-C++.
54 (cp_parser_objc_message_receiver): Add.
55 (cp_parser_objc_message_args): Likewise.
56 (cp_parser_objc_message_expression): Likewise.
57 (cp_parser_objc_encode_expression): Likewise.
58 (cp_parser_objc_defs_expression): Likewise.
59 (cp_parser_objc_protocol_expression): Likewise.
60 (cp_parser_objc_selector_expression): Likewise.
61 (cp_parser_objc_expression): Likewise.
62 (cp_parser_objc_visibility_spec): Likewise.
63 (cp_parser_objc_method_type): Likewise.
64 (cp_parser_objc_protocol_qualifiers): Likewise.
65 (cp_parser_objc_typename): Likewise.
66 (cp_parser_objc_selector_p): Likewise.
67 (cp_parser_objc_selector): Likewise.
68 (cp_parser_objc_method_keyword_params): Likewise.
69 (cp_parser_objc_method_tail_params_opt): Likewise.
70 (cp_parser_objc_interstitial_code): Likewise.
71 (cp_parser_objc_method_signature): Likewise.
72 (cp_parser_objc_method_prototype_list): Likewise.
73 (cp_parser_objc_method_definition_list): Likewise.
74 (cp_parser_objc_class_ivars): Likewise.
75 (cp_parser_objc_identifier_list): Likewise.
76 (cp_parser_objc_alias_declaration): Likewise.
77 (cp_parser_objc_class_declaration): Likewise.
78 (cp_parser_objc_protocol_declaration): Likewise.
79 (cp_parser_objc_protocol_refs_opt): Likewise.
80 (cp_parser_objc_superclass_or_category): Likewise.
81 (cp_parser_objc_class_interface): Likewise.
82 (cp_parser_objc_class_implementation): Likewise.
83 (cp_parser_objc_end_implementation): Likewise.
84 (cp_parser_objc_declaration): Likewise.
85 (cp_parser_objc_try_catch_finally_statement): Likewise.
86 (cp_parser_objc_synchronized_statement): Likewise.
87 (cp_parser_objc_throw_statement): Likewise.
88 (cp_parser_objc_statement): Likewise.
89 (cp_parser_primary_expression): Add Objective-C++.
90 (cp_parser_statement): Likewise.
91 (cp_parser_declaration): Likewise.
92 (cp_parser_simple_type_specifier): Likewise.
93 (cp_parser_type_name): Likewise.
94 (cp_parser_parameter_declaration_list): Likewise.
95 (cp_parser_member_declaration) Likewise.
96 * tree.c: Include debug.h.
97 * typeck.c (composite_pointer_type): Add Objective-C++ support.
98 (finish_class_member_access_expr): Likewise.
99 (build_function_call): Allow objc to rewrite FUNCTION_DECLs.
100 (build_modify_expr): Allow objc to generate write barriers.
102 * Make-lang.in (cp/tree.o): Add debug.h.
103 * tree.c (lvalue_p_1, case CONST_DECL): Add.
105 2005-05-18 Jan Hubicka <jh@suse.cz>
107 * method.c: Include tree-pass.h
108 (use_thunk): Lower body before expanding.
110 2005-05-17 Jakub Jelinek <jakub@redhat.com>
113 * decl.c (maybe_deduce_size_from_array_init): Call
114 cp_apply_type_quals_to_decl after completing array type.
116 2005-05-16 Richard Henderson <rth@redhat.com>
118 * decl.c (build_library_fn_1): Move setting TREE_NOTHROW ...
119 (build_library_fn): ... here.
121 2005-05-12 Ian Lance Taylor <ian@airs.com>
123 * cp-tree.h (cp_stmt_codes): Don't define.
124 (statement_code_p): Declare.
125 (STATEMENT_CODE_P): Define.
126 * lex.c (statement_code_p): Define.
127 (cxx_init): Use actual codes in stmt_codes initializer, not
128 cp_stmt_codes macro. Initialize statement_code_p directly, rather
129 than using INIT_STATEMENT_CODES.
131 2005-05-09 Mark Mitchell <mark@codesourcery.com>
133 * typeck.c (build_unary_op): Do not resort to address arithmetic
134 when taking the address of a COMPONENT_REF.
136 2005-05-08 Kazu Hirata <kazu@cs.umass.edu>
138 * class.c (vtbl_init_data_s): Change the type of fns to
140 (build_vtbl_initializer, add_vcall_offset, add_vcall_offset):
141 Use VEC instead of VARRAY.
143 2005-05-07 Richard Sandiford <rsandifo@redhat.com>
145 * mangle.c: Remove a reference to the MIPS -mint64 option.
147 2005-05-07 Kazu Hirata <kazu@cs.umass.edu>
149 * decl.c (wrapup_globals_for_namespace): Use VEC instead of
151 * name-lookup.c (add_decl_to_level, begin_scope): Likewise.
152 * name-lookup.h (cp_binding_level): Change the type of
153 static_decls to VEC(tree,gc)*.
155 * mangle.c (globals): Change the type of substitutions to
157 (dump_substitution_candidates, add_substitution,
158 find_substitution, finish_mangling, init_mangle): Use VEC
161 2005-05-06 Kazu Hirata <kazu@cs.umass.edu>
163 * decl2.c (spew_debug): Remove.
165 * decl2.c (ssdf_decls, start_static_storage_duration_function,
166 generate_ctor_or_dtor_function): Use VEC instead of VARRAY.
168 * decl2.c (pending_statics, note_vague_linkage_var,
169 cp_finish_file): Use VEC instead of VARRAY.
170 (pending_statics_used): Remove.
172 2005-05-05 Kazu Hirata <kazu@cs.umass.edu>
174 * decl2.c (deferred_fns, note_vague_linkage_fn,
175 cp_finish_file): Use VEC instead of VARRAY.
177 2005-05-05 Mark Mitchell <mark@codesourcery.com>
180 * pt.c (build_non_dependent_expr): Use is_overloaded_fn.
182 2005-05-05 Kazu Hirata <kazu@cs.umass.edu>
184 * pt.c: Fix a comment typo.
186 2005-05-04 Kazu Hirata <kazu@cs.umass.edu>
188 * cp-tree.h (language_function): Change the type of
189 x_local_names to VEC.
190 * decl.c (push_local_name): Adjust uses of local_names.
192 2005-05-03 Kazu Hirata <kazu@cs.umass.edu>
194 * friend.c, lex.c, mangle.c, repo.c: Update copyright.
196 2005-05-02 Kazu Hirata <kazu@cs.umass.edu>
198 * class.c (local_classes, init_class_processing): Use VEC
200 * cp-tree.h (local_classes): Likewise.
201 * mangle.c (discriminator_for_local_entity): Likewise.
202 * name-lookup.c (pushtag): Likewise.
204 * class.c (current_lang_depth, push_lang_context,
205 pop_lang_context): Use VEC instead of VARRAY.
206 * cp-tree.h (saved_scope): Use VEC for lang_base instead of
208 * name-lookup.c (push_to_top_level): Use VEC instead of
211 2005-05-02 Paolo Bonzini <bonzini@gnu.org>
213 * semantics.c (finish_call_expr): Call resolve_overloaded_builtin
214 for BUILT_IN_MD built-ins.
216 2005-05-02 Michael Matz <matz@suse.de>
219 * cp-tree.h (cp_tree_index): Remove CPTI_NULL, to be defined in C
222 * lex.c (cxx_init): Move null_node initialisation to C common frontend.
224 2005-04-25 Ian Lance Taylor <ian@airs.com>
226 * cp-tree.def: Add EXPR_STMT.
227 * cp-tree.h (cp_stmt_codes): Add EXPR_STMT.
228 (EXPR_STMT_EXPR): Define.
229 * cp-gimplify.c: Include "flags.h".
230 (gimplify_expr_stmt): New static function.
231 (cp_gimplify_expr): Handle EXPR_STMT.
232 * cxx-pretty-print.c (pp_cxx_statement): Use pp_cxx_expression
233 rather than pp_expression.
234 (pp_cxx_statement): Handle EXPR_STMT.
235 * dump.c (cp_dump_tree): Handle EXPR_STMT.
236 * lex.c (cxx_init): Don't use c_common_stmt_codes in stmt_codes
239 2005-04-25 Andrew Pinski <pinskia@physics.uc.edu>
242 * rtti.c (ifnonnull): Cast the zero comparison operand
245 2005-04-24 Jakub Jelinek <jakub@redhat.com>
248 * class.c: Include cgraph.h.
249 (cp_fold_obj_type_ref): Set node->local.vtable_method.
250 * Make-lang.in (cgraph.o): Depend on $(CGRAPH_H).
252 2005-04-12 Markus F.X.J. Oberhumer <markus@oberhumer.com>
254 * mangle.c (write_builtin_type): Handle integer types which are
255 not one of the shared integer type nodes and emit a "vendor
256 extended builtin type" with an encoding in the form of "u5int96".
258 2005-04-24 Ian Lance Taylor <ian@airs.com>
260 * cp-tree.def (USING_STMT): Change class to tcc_statement.
261 (TRY_BLOCK, EH_SPEC_BLOCK, HANDLER, CLEANUP_STMT): Likewise.
262 (IF_STMT, FOR_STMT, WHILE_STMT, DO_STMT): Likewise.
263 (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
265 2005-04-23 DJ Delorie <dj@redhat.com>
267 * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, friend.c,
268 init.c, lex.c, mangle.c, method.c, name-lookup.c, parser.c,
269 repo.c, rtti.c, tree.c, typeck.c, typeck2.c: Adjust warning()
272 2005-04-22 Per Bothner <per@bothner.com>
274 * decl.c (make_rtl_for_nonlocal_decl): Don't try get_fileinfo if
275 input_filename is NULL, as it is for (say) __PRETTY_FUNCTION__.
277 2005-04-22 Alexandre Oliva <aoliva@redhat.com>
280 * name-lookup.c (push_overloaded_decl): Do not overload with
281 non-duplicate anticipated built-in.
283 2005-04-21 Kazu Hirata <kazu@cs.umass.edu>
285 * cp-tree.h (THROW_NAME, AUTO_VTABLE_NAME, AUTO_TEMP_FORMAT,
286 VTABLE_BASE, VTABLE_NAME_PREFIX, STATIC_NAME_FORMAT): Remove.
288 2005-04-21 Nathan Sidwell <nathan@codesourcery.com>
290 * cp-tree.h: Adjust for new VEC API.
291 Define VEC(tree_pair_s,gc).
292 (struct save_scope): Adjust.
293 (struct lang_type_class): Adjust.
294 (unemitted_tinfo_decls): Adjust.
295 * class.c (add_method, resort_type_method_vec,
296 finish_struct_methods, struct find_final_overrider_data,
297 dfs_find_final_overrider_pre, find_final_overrider,
298 get_vcall_index, warn_hidden, walk_subobject_offsets,
299 check_methods, fixup_inline_methods, end_of_class,
300 warn_about_ambiguous_bases, finish_struct, build_vtbl_initializer,
301 add_vcall_offset): Adjust.
302 * decl.c (xref_basetypes, finish_method): Adjust.
303 * decl2.c (check_classfn): Adjust.
304 * init.c (sort_mem_initializers, push_base_cleanups): Adjust.
305 * method.c (do_build_copy_constructor): Adjust.
306 * name-lookup.c (new_class_binding, store_binding,
307 store_bindings, store_class_bindings): Adjust.
308 * name-lookup.h: Define VEC(cxx_saved_binding,gc),
309 VEC(cp_class_binding,gc).
310 (struct cp_binding_level): Adjust.
311 * parser.c: Define VEC(cp_token_position,heap).
312 (struct cp_lexer): Adjust.
313 (cp_lexer_new_main, cp_lexer_new_from_tokens, cp_lexer_destroy,
314 cp_lexer_save_tokens): Adjust.
315 * pt.c (retrieve_specialization,
316 check_explicit_specialization): Adjust.
317 * rtti.c (unemitted_tinfo_decls): Adjust.
318 (init_rtti_processing, get_tinfo_decl, get_pseudo_ti_init,
319 get_pseudo_ti_desc): Adjust.
320 * search.c (dfs_access_in_type, lookup_conversion_operator,
321 lookup_fnfields_1, dfs_walk_once, dfs_walk_once_accessible,
322 dfs_get_pure_virtuals, lookup_conversions_r, binfo_for_vbase): Adjust.
323 * semantics.c: Define VEC(deferred_access,gc).
324 (push_deferring_access_checks): Adjust.
325 * typeck2.c (abstract_virtuals_error): Adjust.
327 2005-04-20 Ian Lance Taylor <ian@airs.com>
329 * cp-tree.def: Add STMT_EXPR.
330 * cp-tree.h (STMT_EXPR_NO_SCOPE): Define.
331 (STMT_EXPR_STMT): Define.
332 * cxx-pretty-print.c (pp_cxx_primary_expression): Handle
334 (pp_cxx_expression): Likewise.
335 (pp_cxx_statement): Call pp_cxx_statement, not pp_statement.
336 * dump.c (cp_dump_tree): Handle STMT_EXPR.
338 2005-04-18 Kazu Hirata <kazu@cs.umass.edu>
340 * decl.c (expand_static_init): Call build2 and build3 instead
343 * cp-tree.h (VPTR_NAME, VPTR_NAME_P): Remove.
345 2005-04-17 Ian Lance Taylor <ian@airs.com>
347 * cp-tree.def: Add SIZEOF_EXPR, ARROW_EXPR and ALIGNOF_EXPR.
348 * cxx-pretty-print.c (pp_cxx_postfix_expression): Handle
350 (pp_cxx_unary_expression): Handle SIZEOF_EXPR and ALIGNOF_EXPR.
351 (pp_cxx_expression): Handle ARROW_EXPR, SIZEOF_EXPR, and
353 * typeck.c (cxx_sizeof_or_alignof_type): Update call to
354 c_sizeof_or_alignof_type for change in parameter type.
356 2005-04-16 Mark Mitchell <mark@codesourcery.com>
359 * typeck.c (cxx_sizeof_or_alignof_type): Check whether the type to
360 which sizeof/alignof is dependent, rather than just whether we are
361 processing_template_decl.
363 2005-04-17 Kazu Hirata <kazu@cs.umass.edu>
365 * cp-tree.h (LOOKUP_GLOBAL): Remove.
366 (LOOKUP_ONLYCONVERTING, DIRECT_BIND, LOOKUP_NO_CONVERSION,
367 LOOKUP_DESTRUCTOR, LOOKUP_NO_TEMP_BIND, LOOKUP_PREFER_TYPES,
368 LOOKUP_PREFER_NAMESPACES, LOOKUP_CONSTRUCTOR_CALLABLE): Adjust
371 2005-04-15 Richard Henderson <rth@redhat.com>
374 * semantics.c (finish_call_expr): Call resolve_overloaded_builtin.
376 2005-04-15 Kazu Hirata <kazu@cs.umass.edu>
378 * cp-tree.h (lang_type_class): Remove redefined. Move
379 java_interface into where redefined was. Increment the width
381 (TYPE_REDEFINED): Remove.
383 2005-04-14 Kazu Hirata <kazu@cs.umass.edu>
385 * cp-tree.h (SET_TMPL_ARG, ENUM_TI_TEMPLATE, ENUM_TI_ARGS,
386 CLASSTYPE_TEMPLATE_LEVEL): Remove.
388 2005-04-11 Mark Mitchell <mark@codesourcery.com>
390 * decl2.c (determine_visibility): Don't use export_class_data.
391 (import_export_decl): Honor TARGET_CXX_CLASS_DATA_ALWAYS_WEAK and
392 TARGET_CXX_DETERMINE_CLASS_DATA_VISIBILITY.
394 2005-04-09 Kazu Hirata <kazu@cs.umass.edu>
396 * cp-tree.h (cxx_alignof): Remove.
398 * cp-tree.h (DECL_ARRAY_DELETE_OPERATOR_P): Remove.
400 * cp-tree.h (EXCEPTION_CLEANUP_NAME, B_SET, B_CLR, B_TST,
401 CONV_STATIC_CAST): Remove.
403 * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Remove.
405 * cp-tree.h (VF_BINFO_VALUE, VF_BASETYPE_VALUE): Remove.
407 * cp-tree.h (cp_deprecated): Remove.
409 2005-04-08 Ian Lance Taylor <ian@airs.com>
411 * cp-tree.def: Define FOR_STMT, WHILE_STMT, DO_STMT, BREAK_STMT,
412 CONTINUE_STMT, SWITCH_STMT.
413 * cp-tree.h (cp_stmt_codes): Add FOR_STMT, WHILE_STMT, DO_STMT,
414 BREAK_STMT, CONTINUE_STMT, SWITCH_STMT.
415 (WHILE_COND, WHILE_BODY): Define.
416 (DO_COND, DO_BODY): Define.
417 (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY): Define.
418 (SWITCH_STMT_COND, SWITCH_STMT_BODY, SWITCH_STMT_TYPE): Define.
419 * cp-gimplify.c (enum bc_t): Define.
420 (struct cp_gimplify_ctx, ctxp): Define.
421 (push_context, pop_context): New static functions.
422 (begin_bc_block, finish_bc_block): New static functions.
423 (build_bc_goto): New static function.
424 (gimplify_cp_loop, gimplify_for_stmt): New static functions.
425 (gimplify_while_stmt, gimplify_do_stmt): Likewise.
426 (gimplify_switch_stmt): Likewise.
427 (cp_gimplify_expr): Handle FOR_STMT, WHILE_STMT, DO_STMT,
428 SWITCH_STMT, CONTINUE_STMT, BREAK_STMT.
429 (cp_genericize): Call push_context and pop_context.
430 * semantics.c (finish_break_stmt): Just call build_stmt
431 (BREAK_STMT) rather than build_break_stmt.
432 (finish_continue_stmt): Corresponding change.
433 * decl.c (pop_switch): Update call to c_do_switch_warnings for new
435 * cxx-pretty-print.c (pp_cxx_statement): Handle SWITCH_STMT,
436 WHILE_STMT, DO_STMT, FOR_STMT, BREAK_STMT, CONTINUE_STMT.
437 * dump.c (cp_dump_tree): Likewise.
439 2005-04-08 Mark Mitchell <mark@codesourcery.com>
442 * parser.c (cp_parser_type_specifier_seq): Add is_condition
444 (cp_parser_new_type_id): Pass it.
445 (cp_parser_condition): Likewise.
446 (cp_parser_conversion_type_id): Likewise.
447 (cp_parser_type_id): Likewise.
448 (cp_parser_type_specifier_seq): In a condition, do not allow
449 invalid type-specifier combinations.
450 (cp_parser_exception_declaration): Adjust call to
451 cp_parser_type_specifier_seq.
453 * cp-tree.def (TINST_LEVEL): Document TINST_IN_SYSTEM_HEADER_P.
454 * cp-tree.h (struct tinst_level): Add in_system_header_p.
455 (TINST_IN_SYSTEM_HEADER_P): New macro.
456 (make_tinst_level): Remove.
457 * pt.c (lookup_template_class): Preserve DECL_IN_SYSTEM_HEADER on
458 the instantiated class.
459 (push_tinst_level): Do not use make_tinst_level. Set
460 TINST_IN_SYSTEM_HEADER_P.
461 (pop_tinst_level): Likewise.
462 (instantiate_class_template): Set in_system_header.
463 (instantiate_pending_templates): Likewise.
464 * tree.c (make_tinst_level): Remove.
466 2005-04-06 Joseph S. Myers <joseph@codesourcery.com>
468 * decl.c (start_decl): Apply pending #pragma weak regardless of
471 2005-04-06 Mark Mitchell <mark@codesourcery.com>
474 * pt.c (regenerate_decl_from_template): Copy attributes for
475 parameters from the pattern to the instantiation.
477 2005-04-05 Mark Mitchell <mark@codesourcery.com>
480 * cp-tree.def (OFFSET_REF): Correct comments.
481 * init.c (build_offset_ref): Remove misleading comment.
482 * typeck.c (build_unary_op): Handle pointer-to-member creation
483 here, rather than ...
484 (unary_complex_lvalue): ... here.
486 2005-04-06 Jason Merrill <jason@redhat.com>
489 * tree.c (stabilize_init): Don't bother trying to stabilize
490 something with no side-effects.
492 2005-04-05 Mark Mitchell <mark@codesourcery.com>
495 * decl.c (grokdeclarator): Correct attribute handling.
497 2005-04-05 Mark Mitchell <mark@codesourcery.com>
500 * decl2.c (import_export_decl): Use non-COMDAT external linkage
501 for virtual tables, typeinfo, etc. that will be emitted in only
502 one translation unit on systems without weak symbols.
504 2005-04-04 Mark Mitchell <mark@codesourcery.com>
507 * parser.c (cp_parser_template_name): Fix thinko.
509 2005-04-04 Nathan Sidwell <nathan@codesourcery.com>
512 * method.c (use_thunk): Protect covariant pointer return
513 adjustments from NULL pointers.
515 2005-04-04 Jan Hubicka <jh@suse.cz>
517 * decl2.c (finish_objects): Revert my previous patch.
518 (cp_finish_file): Likewise.
520 2005-04-03 Kazu Hirata <kazu@cs.umass.edu>
522 * pt.c: Fix comment typos.
524 2005-04-03 Nathan Sidwell <nathan@codesourcery.com>
527 * pt.c (more_specialized_fn): Member functions are unordered wrt
528 non-members. Conversion operators are unordered wrt other
531 2005-04-01 Nathan Sidwell <nathan@codesourcery.com>
533 * call.c (add_template_candidates_real): Remove length parameter
534 from fn_type_unification call.
535 * class.c (resolve_address_of_overloaded_function): Likewise
536 * cp-tree.h (fn_type_unification): Remove length parameter.
537 * pt.c (get_bindings_overload): Remove.
538 (get_bindings_real): Rename to ...
539 (get_bindings): ... here. Remove length and strict
540 parameters. Change return type flag to boolean. Remove original
542 (determine_specialization): Adjust get_bindings call.
543 (fn_type_unification): Remove length parameter. Adjust.
544 (type_unification_real): Remove length parameter. Adjust.
545 (resolve_overloaded_unification): Adjust get_bindings call.
546 (try_one_overload): Simplify confusing cascaded if control flow.
547 (unify): Remove length paramter from type_unification_real call.
548 (most_specialized_instantiation): Adjust get_bindings calls.
549 (most_specialized): Likewise.
551 2005-03-31 Nathan Sidwell <nathan@codesourcery.com>
553 PR c++/19203, implement DR 214
554 * call.c (joust): Use more_specialized_fn.
555 * cp-tree.h (DEDUCE_ORDER): Remove.
556 (more_specialized): Replace with ...
557 (more_specialized_fn): ... this.
558 * pt.c (maybe_adjust_types_for_deduction): Remove DEDUCE_ORDER
560 (type_unification_real): Remove DEDUCE_ORDER case.
561 (more_specialized): Replace with ...
562 (more_specialized_fn): ... this. Implement DR 214.
563 (most_specialized_instantiation): Use get_bindings_real directly.
565 2005-03-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
568 * call.c (build_new_op): Remove check for -Wsynth.
570 2005-03-31 Jan Hubicka <jh@suse.cz>
572 * decl2.c (finish_objects): Mark ctor as needed.
573 (cp_finish_file): Output variables only in nonunit-at-a-time.
575 2005-03-29 Richard Henderson <rth@redhat.com>
578 * decl.c (cp_complete_array_type): Rename from complete_array_type.
579 Use the new complete_array_type in c-common.c. Update all callers.
580 * cp-tree.h (cp_complete_array_type): Update to match.
582 2005-03-24 Geoffrey Keating <geoffk@apple.com>
584 * typeck.c (build_static_cast_1): Allow scalar_cast between
585 any integral, floating, or enumeration type.
587 2005-03-24 Steven Bosscher <stevenb@suse.de>
589 * typeck.c (comptypes): First determine if the types are compatible
590 from a target-independent point of view. Check target attributes
593 * class.c (build_base_path):
594 (build_vbase_offset_vtbl_entries):
595 (add_vcall_offset): Replace fold (buildN (...)) with fold_buildN.
596 * error.c (dump_expr): Likewise.
597 * init.c (build_zero_init, expand_cleanup_for_base,
598 build_vec_delete_1): Likewise.
599 * mangle.c (write_integer_cst): Likewise.
600 * method.c (thunk_adjust): Likewise.
601 * pt.c (convert_nontype_argument, tsubst, unify): Likewise.
602 * tree.c (cxx_print_statistics, array_type_nelts_total): Likewise.
603 * typeck.c (build_ptrmemfunc_access_expr,
604 (get_member_function_from_ptrfunc): Likewise.
606 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
608 * cp-objcp-common.h (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
610 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
612 * cp-tree.h (perform_integral_promotions): Remove.
613 (default_conversion): Add.
615 2005-03-22 Mark Mitchell <mark@codesourcery.com>
617 * parser.c (cp_parser_warn_min_max): New function.
618 (cp_parser_binary_expression): Use it.
619 (cp_parser_assignment_operator_opt): Likewise.
620 (cp_parser_operator): Likewise.
622 2005-03-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
625 * decl.c (start_preparsed_function): Robustify.
627 2005-03-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
630 * parser.c (cp_parser_class_head): Return NULL_TREE when
631 encountering a redefinition.
633 2005-03-22 Nathan Sidwell <nathan@codesourcery.com>
637 * typeck.c (build_ptrmemfunc): Allow OFFSET_REF when processing a
640 2005-03-21 Paolo Carlini <pcarlini@suse.de>
644 * init.c (emit_mem_initializers): Don't crash on undefined
647 2005-03-21 Paolo Carlini <pcarlini@suse.de>
650 * semantics.c (finish_stmt_expr_expr): Return immediately
651 if error_operand_p (expr).
653 2005-03-21 Joseph S. Myers <joseph@codesourcery.com>
655 * cp-tree.h (lvalue_or_else, lvalue_p): New.
656 * typeck.c (lvalue_or_else): New. Call lvalue_error.
658 2005-03-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
661 * decl.c (decls_match): Compare context of VAR_DECL.
663 2005-03-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
666 * parser.c (cp_parser_postfix_expression) <case RID_TYPENAME>:
667 Check the return value of cp_parser_nested_name_specifier.
669 2005-03-18 Dale Johannesen <dalej@apple.com>
671 * cp/tree.c (cp_tree_equal): Handle SSA_NAME.
673 2005-03-18 Paolo Carlini <pcarlini@suse.de>
676 * parser.c (cp_parser_diagnose_invalid_type_name):
677 Check TYPE_BINFO (current_class_type) before attempting
678 to emit inform messages.
680 2005-03-17 Paolo Carlini <pcarlini@suse.de>
683 * cp-tree.h (grok_op_properties): Change return type to void.
684 * decl.c (grok_op_properties): Return early - don't check the
685 arity - in case of a static member or an operator that cannot
686 be non-member; tidy a bit.
688 2005-03-17 Nathan Sidwell <nathan@codesourcery.com>
691 * pt.c (contains_dependent_cast_p): Remove.
692 (fold_non_dependent_expr): Don't use it.
693 (value_dependent_expression_p): Use a switch statement.
694 reference_exprs can be dependent.
696 2005-03-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
700 * name-lookup.c (pushtag): Skip template parameter scope when
701 scope is ts_global. Don't push tag into template parameter
703 * pt.c (instantiate_class_template): Reorder friend class
704 template substitution to handle non-dependent friend class
705 that hasn't been previously declared.
707 2005-03-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
709 Friend class name lookup 5/n
711 * cp-tree.h (pushtag): Adjust declaration.
712 * decl.c (lookup_and_check_tag): Call lookup_type_scope if
714 (xref_tag): Adjust call to pushtag. Make hidden class visible.
715 (start_enum): Adjust call to pushtag.
716 * name-lookup.c (ambiguous_decl): Ignore hidden names.
717 (qualify_lookup): Change return type to bool.
718 (hidden_name_p): New function.
719 (lookup_namespace_name, unqualified_namespace_lookup,
720 lookup_name_real): Use it.
721 (lookup_type_scope): Update comments.
722 (maybe_process_template_type_declaration): Change parameter name
723 from globalize to is_friend.
724 (pushtag): Change globalize parameter of type int to tag_scope.
725 Hide name if introduced by friend declaration.
726 * name-lookup.h (hidden_name_p): Add declaration.
727 * parser.c (cp_parser_lookup_name): Don't deal with hidden name
729 * pt.c (push_template_decl_real): Make hidden class template
731 (lookup_template_class, instantiate_class_template): Adjust call
733 * semantics.c (begin_class_definition): Likewise.
734 * rtti.c (init_rtti_processing, build_dynamic_cast_1,
735 tinfo_base_init, emit_support_tinfos): Use ts_current instead of
738 2005-03-13 Mark Mitchell <mark@codesourcery.com>
741 * pt.c (determine_specialization): Reject non-specializations.
743 2005-03-11 Per Bothner <per@bothner.com>
745 * cp-tree.h (struct cp_declarator): New id_loc field.
746 * cp/parser.c (cp_lexer_get_preprocessor_token): Set cp_token's
747 location using c_lex_with_flags, instead of input_location.
748 (cp_parser_direct_declarator): Set declarator's id_loc from
751 2005-03-10 Jakub Jelinek <jakub@redhat.com>
753 PR c++/18384, c++/18327
754 * decl.c (reshape_init_array): Use UHWI type for max_index_cst
755 and index. Convert max_index to size_type_node if it isn't
758 2005-03-09 Mark Mitchell <mark@codesourcery.com>
761 * pt.c (tsubst_decl): Apply array-to-pointer and
762 function-to-pointer conversions to function arguments.
763 (regenerate_decl_from_template): Likewise.
765 2005-03-09 Paolo Carlini <pcarlini@suse.de>
768 * decl.c (complete_array_type): In pedantic mode, return
769 3 for an empty initializer list as the initializer for an
770 array of unknown bound (8.5.1/4).
771 (maybe_deduce_size_from_array_init): Fix final test to use
774 2005-03-08 Nathan Sidwell <nathan@codesourcery.com>
777 * pt.c (contains_dependent_cast_p): New.
778 (fold_non_dependent_expr): Call it.
780 2005-03-08 Mark Mitchell <mark@codesourcery.com>
783 * cp-tree.h (target_type): Remove.
784 * decl.c (layout_var_decl): Remove #if 0'd code.
785 (cp_finish_decl): Remove dead code.
786 * init.c (build_vec_init): When determining whether or not the
787 element type has an asignment operator, look through all array
789 * typeck.c (target_type): Remove.
791 2005-03-07 Mark Mitchell <mark@codesourcery.com>
793 * class.c (finish_struct_1): Do not warn about non-virtual
794 destructors in Java classes.
796 2005-03-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
799 * init.c (build_offset_ref): Don't build non-dependent SCOPE_REF.
800 * pt.c (build_non_dependent_expr): Don't build NON_DEPENDENT_EXPR
802 * typeck.c (build_x_unary_op): Don't build non-dependent SCOPE_REF.
803 Also set PTRMEM_OK_P for NON_DEPENDENT_EXPR.
804 (build_unary_op): Handle building ADDR_EXPR of OFFSET_REF inside
807 2005-03-02 Alexandre Oliva <aoliva@redhat.com>
809 * name-lookup.c (push_overloaded_decl): Don't error if the new
810 decl matches the old one.
811 * decl.c (redeclaration_error_message): Likewise.
813 2005-03-01 Per Bothner <per@bothner.com>
815 * decl.c (finish_function): Use SET_EXPR_LOCATION instead of
816 unavailable annotate_with_file_line, if USE_MAPPED_LOCATION.
818 2005-03-01 Nathan Sidwell <nathan@codesourcery.com>
821 * class.c (update_vtable_entry_for_fn): Don't crash on invalid
824 * cp-tree.g (THUNK_TARGET): Expand comment.
825 * method.c (use_thunk): Make sure we also use the target, if that
828 2005-02-27 Jakub Jelinek <jakub@redhat.com>
831 * decl.c (cxx_comdat_group): Put thunks for
832 TARGET_USE_LOCAL_THUNK_ALIAS_P (function) functions into the same
833 comdat group as the thunk target.
835 2005-02-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
837 * call.c, class.c, cp-tree.h, decl2.c, error.c, init.c, mangle.c,
838 parser.c: Fix comment typo(s).
840 2005-02-24 Jakub Jelinek <jakub@redhat.com>
843 * decl.c (reshape_init): Don't warn about missing braces if STRING_CST
844 initializes a char/wchar_t array.
846 2005-02-23 Mark Mitchell <mark@codesourcery.com>
849 * decl.c (grokvardecl): Set DECL_INTERFACE_KNOWN for declarations
850 with internal linkage.
852 2005-02-23 Alexandre Oliva <aoliva@redhat.com>
854 * decl.c (grokvardecl): Don't exempt anonymous types from having
855 linkage for variables that have linkage other than "C".
857 2005-02-23 Kazu Hirata <kazu@cs.umass.edu>
859 * cp-objcp-common.h, error.c: Update copyright.
861 2005-02-22 Mark Mitchell <mark@codesourcery.com>
864 * decl.c (start_decl_1): Don't clear TREE_READONLY.
865 (cp_finish_decl): Likewise.
866 (complete_vars): Call cp_apply_type_quals_to_decl.
867 * typeck.c (cp_apply_type_quals): Avoid setting TREE_READONLY in
868 cases where that's not valid.
871 * init.c (integral_constant_value): Iterate if the value of a decl
872 is itself a constant.
875 * parser.c (cp_parser_class_head): Check for redefintions here.
876 * semantics.c (begin_class_definition): Not here.
879 * decl2.c (build_anon_union_vars): Add type parameter.
880 (finish_anon_union): Pass it.
883 * error.c (dump_expr): Do not print the body of a BIND_EXPR.
884 Handle STATEMENT_LIST.
887 * parser.c (cp_parser_direct_declarator): Always complain about
888 non-constant array bounds when in a function scope.
889 * semantics.c (finish_id_expression): Do not mark dependent names
892 2005-02-21 Douglas Gregor <dgregor@cs.indiana.edu>
896 * cp-tree.h (cp_apply_type_quals_to_decl): Declared.
897 * decl.c (grokdeclarator): Pedwarn about qualifying a function
899 Add qualifiers when declaring a typedef of a function type.
900 Member function pointers pick up the qualifiers of the typedef
901 used to declare them.
902 Don't complain about creating cv-qualified function types.
903 Complain about qualified function typedefs that are used to
904 declare non-static member functions or free functions.
905 Use cp_apply_type_quals_to_decl.
906 (start_preparsed_function): Use cp_apply_type_quals_to_decl.
907 (grokclassfn): Use cp_apply_type_quals_to_decl.
908 * error.c (dump_type_suffix): Print qualifiers for function
910 * pt.c (tsubst_decl): Use cp_apply_type_quals_to_decl.
911 (tsubst): When substituting a function type into a member
912 pointer type, pass along the qualifiers.
913 (unify): Unify member pointers to member function pointers.
914 * tree.c (cp_build_qualified_type_real): Function types may be
915 qualified. This includes restrict qualifiers.
916 * typeck.c (cp_apply_type_quals_to_decl): New function to replace
917 use of c_apply_type_quals_to_decl. Drops qualifiers that are being
918 added to function types.
920 2005-02-20 Zack Weinberg <zack@codesourcery.com>
923 * cp-objcp-common.h (LANG_HOOKS_TO_TARGET_CHARSET): Set to
924 c_common_to_target_charset. Delete bogus comment.
926 2005-02-18 Richard Henderson <rth@redhat.com>
929 * except.c (do_get_exception_ptr): New.
930 (expand_start_catch_block): Use it.
932 2005-02-19 Jakub Jelinek <jakub@redhat.com>
934 * decl.c (start_decl_1): Only check TYPE_NEEDS_CONSTRUCTING
935 if type is not error_mark_node.
937 2005-01-20 Giovanni Bajo <giovannibajo@gcc.gnu.org>
940 * decl2.c (grokfield): Do not apply attributes to template parameters
941 as they are ignored by tsubst anyway.
943 2005-02-18 Jakub Jelinek <jakub@redhat.com>
946 * decl.c (start_decl_1): Clear TREE_READONLY flag if
947 its type has TYPE_NEEDS_CONSTRUCTING.
948 (complete_vars): Likewise.
950 2005-02-17 Alexandre Oliva <aoliva@redhat.com>
953 * class.c (finish_struct): Initialize TYPE_SIZE_UNIT of a
954 template along with TYPE_SIZE.
957 * semantics.c (perform_deferred_access_checks): Use
958 get_deferred_access_checks to get the top of the stack.
960 2005-02-15 Alexandre Oliva <aoliva@redhat.com>
963 * class.c (add_implicitly_declared_members, check_field_decl)
964 (check_field_decls, check_bases): Remove arguments, tests and
965 assignments of cant_have_default_ctor-related variables.
967 2005-02-15 Alexandre Oliva <aoliva@redhat.com>
969 * decl2.c (mark_used): Set the source location of the used decl to
970 the current input location here...
971 * method.c (synthesize_method): ... not here. Set input_location
972 from the decl instead.
974 2005-02-14 Nathan Sidwell <nathan@codesourcery.com>
977 * parser.c (cp_parser_late_parsing_for_member): Use
978 current_function_decl as scope to push to and from.
981 * pt.c (check_explicit_specialization): Make sure namespace
982 binding lookup found an overloaded function.
983 (lookup_template_function): Just assert FNS is an overloaded
987 * decl.c (grokdeclarator): Check for error mark node in ptrmem
990 2005-02-14 Alexandre Oliva <aoliva@redhat.com>
993 * decl.c (redeclaration_error_message): Report redefinition of
994 pure virtual function.
996 2005-02-14 Nathan Sidwell <nathan@codesourcery.com>
999 * class.c (build_simple_base_path): Build the component_ref
1001 (update_vtable_entry_for_fn): Walk the covariant's binfo chain
1002 rather than using lookup_base.
1003 * search.c (dfs_walk_once): Add non-recursive assert check.
1004 * typeck.c (build_class_member_access_expr): It is possible for
1005 the member type to be both const and volatile.
1007 2005-02-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1011 * pt.c (maybe_check_template_type): Remove.
1012 * cp-tree.h (maybe_check_template_type): Remove prototype.
1013 * name-lookup.c (maybe_process_template_type_declaration): Don't
1014 use maybe_check_template_type.
1016 2005-02-11 Richard Henderson <rth@redhat.com>
1019 * pt.c (get_mostly_instantiated_function_type): Save and restore
1020 flag_access_control instead of push/pop_access_scope.
1022 2005-02-10 Mark Mitchell <mark@codesourcery.com>
1025 * decl.c (reshape_init): Issue warnings about missing braces.
1027 2005-02-11 Kazu Hirata <kazu@cs.umass.edu>
1029 * cp-tree.def, except.c, ptree.c: Update copyright.
1031 2005-02-09 Mark Mitchell <mark@codesourcery.com>
1034 * call.c (build_op_delete_call): Check COMPLETE_TYPE_P before
1035 attempting name lookup.
1037 * parser.c (cp_parser_unqualified_id): Initialize type_decl.
1040 * call.c (initialize_reference): Robustify.
1043 * decl.c (grokdeclarator): Check for invalid use of destructor
1047 * parser.c (cp_parser_unqualified_id): Avoid creating destructor
1048 names with invalid types.
1051 * parser.c (cp_parser_direct_declarator): Allow type-dependent
1052 expressions as array bounds.
1055 * parser.c (cp_parser_attributes_list): Allow empty lists.
1057 2005-02-08 Mark Mitchell <mark@codesourcery.com>
1060 * class.c (add_method): Don't set TYPE_HAS_DESTRUCTOR.
1061 (check_bases): Give warnings about a base class with a
1062 non-virtual destructor, even if it is implicit.
1063 (finish_struct_bits): Don't copy TYPE_HAS_DESTRUCTOR.
1064 (maybe_warn_about_overly_private_class): Don't use
1065 TYPE_HAS_DESTRUCTOR.
1066 (finish_struct_methods): Don't set TYPE_HAS_DESTRUCTOR.
1067 (check_for_override): Give it external linkage.
1068 (add_implicitly_declared_members): Generate destructors lazily.
1069 (check_field_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not
1070 TYPE_HAS_DESTRUCTOR.
1071 (check_bases_and_members): Call check_methods before
1073 (check_bases_and_members): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not
1074 TYPE_HAS_DESTRUCTOR.
1075 (finish_struct_1): Do not use TYPE_HAS_DESTRUCTOR.
1076 * cp-tree.def (PSEUDO_DTOR_EXPR): Document.
1077 * cp-tree.h (TYPE_HAS_DESTRUCTOR): Remove.
1078 (lang_type_class): Add lazy_destructor.
1079 (CLASSTYPE_LAZY_DESTRUCTOR): New macro.
1080 (CLASSTYPE_DESTRUCTORS): Robustify.
1081 (TYPE_HAS_DESTRUCTOR): Remove.
1082 (check_for_override): Declare.
1083 (build_vbase_delete): Remove.
1084 * cvt.c (convert_to_void): Issue errors about pseudo-destructor
1086 * decl.c (cxx_maybe_build_cleanup): Remove dead code.
1087 * except.c (dtor_nothrow): Lazily create destructors if necessary.
1088 (build_throw): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
1089 * init.c (build_delete): Lazily create destructors, if necessary.
1090 (build_vbase_delete): Remove.
1091 * method.c (locate_dtor): Simplify.
1092 (implicitly_declare_fn): Add support for destructors.
1093 * parser.c (cp_parser_lookup_name): Lazily create destructors, if
1095 * pt.c (check_explicit_specialization): Don't use
1096 TYPE_HAS_DESTRUCTOR.
1097 (instantiate_class_template): Likewise.
1098 * ptree.c (cxx_print_type): Don't print TYPE_HAS_DESTRUCTOR.
1099 * rtti.c (emit_support_tinfos): Robustify.
1100 * search.c (lookup_fnfields_1): Lazily create destructors.
1101 * typeck.c (build_class_member_access_expr): Remove
1102 PSEUDO_DTOR_EXPR handling.
1103 (lookup_destructor): Likewise.
1105 2005-02-08 Kazu Hirata <kazu@cs.umass.edu>
1107 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h: Update
1110 2005-02-07 Mark Mitchell <mark@codesourcery.com>
1112 * parser.c (cp_lexer_start_debugging): Avoid arithmetic operations
1113 on boolean variables.
1114 (cp_lexer_stop_debugging): Likewise.
1116 2005-02-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1119 * parser.c (cp_parser_pure_specifier): Emit a specific error
1120 message with an invalid pure specifier.
1121 * decl2.c (grok_function_init): Remove.
1122 (grokfield): An initializer for a method is a always a pure
1125 2005-02-02 Matt Austern <austern@apple.com>
1128 * cp-tree.h (builtin_valid_in_constant_expr_p): Declare.
1129 * parser.c (cp_parser_postfix_expression): Accept function call in
1130 constant expression if builtin_valid_in_constant_expr_p is true
1132 * pt.c (value_dependent_expression_p): Handle CALL_EXPRs properly.
1133 * semantics.c (finish_id_expression): Accept function call in constant
1134 expression if builtin_valid_in_constant_expr_p is true for that
1136 * tree.c (builtin_valid_in_constant_expr_p): New.
1138 2005-02-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1141 * pt.c (check_instantiated_args): Improve error message.
1142 Fix logic when to print its second part.
1144 2005-02-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1146 * cp-tree.h (complete_type_or_else): Remove macro.
1147 (complete_type_or_diagnostic): Rename to complete_type_or_else
1148 and remove last argument.
1149 * typeck.c (complete_type_or_diagnostic): Rename to
1150 complete_type_or_else and remove last argument.
1152 2005-02-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1154 * cp-tree.h (commonparms): Remove prototype.
1155 (convert_arguments): Likewise.
1156 (PFN_FROM_PTRMEMFUNC): Remove.
1157 * typeck.c (commonparms): Make static.
1158 (convert_arguments): Add prototype. Make static.
1159 (PFN_FROM_PTRMEMFUNC): Replace by pfn_from_ptrmemfunc.
1161 2005-01-31 Mark Mitchell <mark@codesourcery.com>
1163 * parser.c (cp_parser_primary_expression): Don't complain about
1164 floating-point literals in integral constant expressions when
1167 2005-02-01 Alexandre Oliva <aoliva@redhat.com>
1169 * parser.c (cp_parser_template_id): Revert comment patch too.
1174 * parser.c (cp_parser_template_id): Revert 2004-12-09's patch.
1175 Issue an error when creating the template id.
1176 * pt.c (fn_type_unification): Return early if the explicit
1177 template arg list is an error_mark_node.
1179 2005-01-31 Mark Mitchell <mark@codesourcery.com>
1181 * decl.c (build_enumerator): Do not issue duplicate error messages
1182 about invalid enumeration constants.
1183 * parser.c (cp_parser_non_integral_constant_expression): Always
1184 set parser->non_integral_constant_expression_p.
1185 (cp_parser_primary_expression): Add cast_p parameter. Issue
1186 errors about invalid uses of floating-point literals in
1188 (cp_parser_postfix_expression): Add cast_p parameter.
1189 (cp_parser_open_square_expression): Pass it.
1190 (cp_parser_parenthesized_expression_list): Add cast_p parameter.
1191 (cp_parser_unary_expression): Likewise.
1192 (cp_parser_new_placement): Pass it.
1193 (cp_parser_direct_new_declarator): Likewise.
1194 (cp_parser_new_initializer): Likewise.
1195 (cp_parser_cast_expression): Add cast_p parameter.
1196 (cp_parser_binary_expression): Likewise.
1197 (cp_parser_question_colon_clause): Likewise.
1198 (cp_parser_assignment_expression): Likewise.
1199 (cp_parser_expression): Likewise.
1200 (cp_parser_constant_expression): If an integral constant
1201 expression is invalid, return error_mark_node.
1202 (cp_parser_expression_statement): Pass cast_p.
1203 (cp_parser_condition): Likewise.
1204 (cp_parser_iteration_statement): Likewise.
1205 (cp_parser_jump_statement): Likewise.
1206 (cp_parser_mem_initializer): Likewise.
1207 (cp_parser_template_argument): Likewise.
1208 (cp_parser_parameter_declaration): Likewise.
1209 (cp_parser_initializer): Likewise.
1210 (cp_parser_throw_expression): Likewise.
1211 (cp_parser_attribute_list): Likewise.
1212 (cp_parser_simple_cast_expression): Likewise.
1213 (cp_parser_functional_cast): Likewise.
1214 (cp_parser_late_parsing_default_args): Likewise.
1215 (cp_parser_sizeof_operand): Save/restore
1216 non_integral_constant_expression_p.
1218 2005-01-31 Mike Stump <mrs@apple.com>
1220 * parser.c (cp_lexer_new_main): Get the first token, first, before
1223 2005-01-31 Mark Mitchell <mark@codesourcery.com>
1225 * decl.c (start_decl): Add missing parentheses.
1227 2005-01-30 Mark Mitchell <mark@codesourcery.com>
1230 * cp-tree.h (DECL_USE_TEMPLATE): Expand documentation.
1231 * decl.c (duplicate_decls): Do not discard
1232 DECL_IMPLICIT_INSTANTIATION when merging declarations.
1233 (start_decl): Do not SET_DECL_TEMPLATE_SPECIALIZATION for
1234 variables that do not have DECL_USE_TEMPLATE.
1237 * decl.c (grokdeclarator): Refactor code so that qualified names
1238 are never allowed as the declarator in a typedef.
1241 * name-lookup.c (do_nonmember_using_decl): Avoid overloading
1242 builtin declarations.
1245 * call.c (convert_like_real): Inline call to
1246 dubious_conversion_warnings here.
1247 * cp-tree.h (dubious_conversion_warnings): Remove.
1248 * semantics.c (finish_unary_op_expr): Copy INTEGER_CSTs before
1249 setting TREE_NEGATED_INT.
1250 * typeck.c (dubious_conversion_warnings): Remove.
1253 * name-lookup.c (pushdecl_namespace_level): Avoid accessing free'd
1256 2005-01-28 Mark Mitchell <mark@codesourcery.com>
1259 * parser.c (cp_parser_diagnose_invalid_type_name): Commit to
1263 * pt.c (redeclare_class_template): Robustify.
1265 2005-01-27 Steven Bosscher <stevenb@suse.de>
1267 * decl.c (finish_case_label): Use SWITCH_STMT accessor macros
1268 instead of SWITCH_EXPR ones.
1269 * pt.c (tsubst_expr): Likewise.
1270 * semantics.c (begin_switch_stmt, finish_switch_cond,
1271 finish_switch_stmt): Likewise.
1273 2005-01-26 J"orn Rennecke <joern.rennecke@st.com>
1276 * parser.c (cp_parser_initializer_clause): Initialize *non_constant_p.
1278 2005-01-25 Andrew Pinski <pinskia@physics.uc.edu>
1280 * class.c (abort_fndecl_addr): New variable.
1281 (build_vtbl_initializer): If we have a pure virtual function
1282 share the abort function's address.
1283 Include gt-cp-class.h at the end.
1284 * config-lang.in (gtfiles): Add cp/class.c.
1286 2005-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1288 * cxx-pretty-print.c (pp_cxx_statement): Add prototype. Make static.
1289 (pp_cxx_function_definition): Make static.
1290 * cxx-pretty-print.h (pp_cxx_statement): Remove prototype.
1291 (pp_cxx_function_definition): Likewise.
1293 2005-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1295 * name-lookup.c (print_binding_level): Make static.
1296 (constructor_name_full): Make static inline.
1297 (current_decl_namespace): Make static.
1298 * name-lookup.h (constructor_name_full): Remove prototype.
1299 (print_binding_level): Likewise.
1300 (current_decl_namespace): Likewise.
1302 2005-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1304 * decl.h (debug_bindings_indentation): Remove.
1306 2005-01-23 Kazu Hirata <kazu@cs.umass.edu>
1308 * typeck.c: Fix a comment typo.
1310 2005-01-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1313 * pt.c (fold_decl_constant_value): Always call fold_non_dependent_expr
1315 (tsubst): Use fold_decl_constant_value in place of a bare call to
1316 integral_constant_value.
1318 2005-01-20 Kazu Hirata <kazu@cs.umass.edu>
1320 * typeck.c (more_qualified_p): Remove.
1321 * cp-tree.h: Remove the corresponding prototype.
1323 2005-01-19 Matt Austern <austern@apple.com>
1325 * typeck.c (comptypes): Handle return code from objc_comptypes
1328 2005-01-19 Kazu Hirata <kazu@cs.umass.edu>
1330 * cp-tree.h, name-lookup.h: Remove unused prototypes.
1332 2005-01-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1335 * semantics.c (finish_id_expression): Disable access checking for
1336 already lookuped FIELD_DECL.
1338 2005-01-18 Kazu Hirata <kazu@cs.umass.edu>
1340 * decl.c (delete_block): Remove.
1341 * cp-tree.h: Remove the corresponding prototype.
1343 * decl.c (vtable_decl_p, vtype_decl_p, walk_globals_data,
1344 walk_vtables_r, walk_vtables, walk_globals_r, walk_globals):
1346 * cp-tree.h: Remove the corresponding prototypes.
1348 * tree.c (count_functions, bound_pmf_p, cp_is_overload_p,
1349 cp_update_decl_after_saving, name_p): Remove.
1350 * cp-tree.h: Remove the corresponding prototypes.
1352 2005-01-18 Andrew Pinski <pinskia@physics.uc.edu>
1355 * semantics.c (finish_asm_stmt): Strip nops off
1356 input memory operands.
1358 2005-01-18 Kazu Hirata <kazu@cs.umass.edu>
1360 * Make-lang.in, call.c, cvt.c, init.c, rtti.c, tree.c,
1361 typeck2.c: Update copyright.
1363 2005-01-16 Kazu Hirata <kazu@cs.umass.edu>
1365 * class.c (get_enclosing_class): Remove.
1366 * cp-tree.h: Remove the corresponding prototypes.
1368 * cvt.c (convert_lvalue): Remove.
1369 * cp-tree.h: Remove the corresponding prototype.
1371 * pt.c (tinst_for_decl): Remove.
1372 * cp-tree.h: Remove the corresponding prototypes.
1374 * tree.c (hash_chainon): Remove.
1375 * cp-tree.h: Remove the corresponding prototypes.
1377 2005-01-15 Jakub Jelinek <jakub@redhat.com>
1380 * typeck2.c (split_nonconstant_init_1) <case VECTOR_TYPE>: Put a copy
1381 of CONSTRUCTOR's node into MODIFY_EXPR, as the original is modified.
1383 2005-01-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1385 * Make-lang.in (cp-warn): Don't append $(WERROR).
1387 2005-01-10 Kazu Hirata <kazu@cs.umass.edu>
1389 * cp-tree.h: Fix a comment typo.
1391 2005-01-07 Nathan Sidwell <nathan@codesourcery.com>
1394 * pt.c (tsubst_qualified_id): Call convert_from_reference.
1396 2005-01-06 Mark Mitchell <mark@codesourcery.com>
1399 * class.c (add_implicitly_declared_members): Remove dead code.
1400 * decl.c (grokfndecl): Add sfk parameter. Use it do set
1402 (grokdeclarator): Adjust calls to grokfndecl.
1403 * method.c (implicitly_declare_fn): Improve documentation.
1404 * parser.c (cp_parser_direct_declarator): Do not consider a
1405 function to be a constructor if the containing class was
1406 originally anonymous.
1408 2005-01-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1411 * search.c (lookup_field_1): Handle using declaration in
1412 class template partial specialization.
1414 2005-01-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1417 * pt.c (push_access_scope): Handle friend defined in class.
1418 (pop_access_scope): Likewise.
1420 2005-01-06 Nathan Sidwell <nathan@codesourcery.com>
1423 * pt.c (tsubst_copy) <ARRAY_REF case>: Handle separately.
1424 (tsubst_copy_and_build) <ARRAY_REF case>: Remove obsolete
1425 array-new handling code. Use build_x_binary_op.
1427 2005-01-05 Nathan Sidwell <nathan@codesourcery.com>
1430 * cp-tree.h (start_decl): Take pointer to pushed scope, not bool.
1431 * name-lookup.h (push_scope): Return pushed scope, not flag.
1432 * name-lookup.c (push_scope): Return scope that should be popped,
1434 * decl.c (start_decl): Adjust.
1435 (grokfndecl): Adjust scope push and pop.
1436 * decl2.c (check_classfn): Likewise.
1437 * parser.c (cp_parser_condition, cp_parser_conversion_function_id,
1438 cp_parser_init_declarator, cp_parser_direct_declarator,
1439 cp_parser_class_specifier, cp_parser_class_head,
1440 cp_parser_lookup_name,
1441 cp_parser_constructor_declarator_p): Likewise.
1442 * pt.c (instantiate_class_template,
1443 resolve_typename_type): Likewise.
1445 2005-01-03 Volker Reichelt <reichelt@igpm.rwth-aaachen.de>
1448 * parser.c (cp_parser_unqualified_id): Do not issue error message
1449 for typedef-name as destructor declarator when performing an
1450 uncommitted tentative parse.
1452 2005-01-01 Steven Bosscher <stevenb@suse.de>
1455 * decl.c (finish_function): Fix comment. Annotate the compiler
1456 generated return with the current file name and line 0.
1458 2004-12-31 Richard Henderson <rth@redhat.com>
1461 * call.c (make_temporary_var_for_ref_to_temp): Set DECL_IGNORED_P.
1462 * class.c (build_vtable): Don't conditionallize setting it
1463 based on DWARF2_DEBUG.
1464 (layout_class_type): Set DECL_IGNORED_P.
1465 * decl2.c (get_guard): Likewise.
1466 * rtti.c (get_tinfo_decl, build_lang_decl): Likewise.
1467 * tree.c (build_local_temp): Likewise.
1469 2004-12-30 Mark Mitchell <mark@codesourcery.com>
1471 * cp-tree.h (cp_declarator): Split "name" field into
1472 qualifying_scope and unqualified_name.
1473 * decl.c (get_scope_of_declarator): Adjust accordingly.
1474 (grokdeclarator): Likewise.
1475 * decl2.c (grokfield): Likewise, and adjust call to
1476 do_class_using_decl.
1477 * name-lookup.c (do_class_using_decl): Split "decl" into
1478 "scope" and "name". Remove unnecessary code.
1479 * name-lookup.h (do_class_using_decl): Adjust declaration.
1480 * parser.c (make_id_declarator): Split "id" into qualifying_scope
1481 and unqualified_name.
1482 (cp_parser_using_declaration): Adjust call to do_class_using_decl.
1483 (cp_parser_direct_declarator): Adjust to handle the fact that
1484 cp_parser_declarator_id no longer returns a SCOPE_REF.
1485 (cp_parser_direct_declarator): Likewise.
1486 (cp_parser_declarator_id): Do not create a SCOPE_REF for qualified
1488 (cp_parser_member_declaration): Adjust call to make_id_declarator.
1489 (cp_parser_check_declarator_template_parameters): Do not expect a
1492 * decl.c (duplicate_decls): Call ggc_free on declarations we will
1493 not be needing any longer.
1496 * cvt.c (convert_to_void): Do not use STRIP_NOPs.
1498 2004-12-28 Richard Henderson <rth@redhat.com>
1501 * semantics.c (finish_asm_stmt): Resolve asm names. Validate input
1502 constraints. Mark memory inputs addressable.
1504 2004-12-27 Jason Merrill <jason@redhat.com>
1506 * decl.c (expand_static_init): Don't use shortcut if
1507 targetm.relaxed_ordering.
1509 2004-12-27 Mark Mitchell <mark@codesourcery.com>
1512 * decl.c (check_tag_decl): Robustify.
1514 2004-12-23 Mark Mitchell <mark@codesourcery.com>
1517 * parser.c (cp_parser_error): Issue better messages about
1518 #pragma in locations where it is not permitted.
1521 * pt.c (check_instantiated_args): Remove bogus SFINAE code.
1523 * cvt.c (convert_to_void): Fix typo in comment.
1525 2004-12-23 Alexandre Oliva <aoliva@redhat.com>
1528 * pt.c (check_explicit_specialization): Use the argument list from
1529 the definition in a template function specialization definition.
1531 2004-12-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1534 * pt.c (check_explicit_specialization): Use special logic to validate
1535 befriended specializations.
1537 2004-12-22 Mark Mitchell <mark@codesourcery.com>
1539 * rtti.c (emit_support_tinfos): Avoid using C99 semantics.
1542 * call.c (build_this): In templates, do not bother with
1544 * typeck.c (unary_complex_lvalue): In a template, always refuse
1548 * cp-gimplify.c (cp_genericize): Relax assertion.
1551 * cvt.c (convert_to_void): Warn about unused values.
1554 * rtti.c (emit_support_tinfos): On systems without weak symbols,
1555 emit the runtime library type-info objects as non-COMDAT.
1557 2004-12-21 Mark Mitchell <mark@codesourcery.com>
1560 * call.c (convert_like_real): Do not permit the use of a copy
1561 constructor to copy a packed field.
1564 * decl.c (grokdeclarator): Return error_mark_node, not
1565 void_type_node, to indicate errors.
1566 * parser.c (cp_parser_template_parameter_list): Robustify.
1567 (cp_parser_template_parameter): Likewise.
1570 * tree.c (cp_tree_equal): Handle OVERLOAD.
1572 2004-12-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1574 * decl.c (define_label): Use POP_TIMEVAR_AND_RETURN.
1575 * name-lookup.c (pushdecl_class_level): Likewise.
1577 2004-12-21 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1579 * name-lookup.c (pushtag): Add missing POP_TIMEVAR_AND_RETURN.
1581 2004-12-21 Andrew Pinski <pinskia@physics.uc.edu>
1584 * cp-gimplify.c (cp_genericize_r): Don't insert first but instead
1585 check to see if contains the pointer. Insert the statement before
1588 2004-12-21 Nathan Sidwell <nathan@codesourcery.com>
1591 * decl.c (check_initializer): Check string initializer of array is
1593 * cp-tree.h (PAREN_STRING_LITERAL_P): New.
1594 * semantics.c (finish_parenthesized_expr): Mark a STRING_CST.
1595 * error.c (dump_expr): <STRING_CST case> Add parens, if needed.
1597 * cp-tree.def (TEMPLATE_TYPE_PARM,
1598 BOUND_TEMPLATE_TEMPLATE_PARM, TYPE_OF_TYPE, TYPENAME_TYPE): Reorder
1599 for better code efficiency.
1600 * cp-tree.h (CLASS_TYPE_P): Short circuit IS_AGGR_TYPE check.
1601 (CAN_HAVE_FULL_LANG_DECL_P): Reorder for better optimization.
1602 (INTEGRAL_CODE_P, CP_INTEGRAL_TYPE_P,
1603 INTEGRAL_OR_ENUMERATION_TYPE_P, SCALAR_TYPE_P,
1604 CP_AGGREGATE_TYPE_P, TYPE_PTROB_P, TYPE_REF_OBJ_P,
1605 TYPE_PTROBV_P): Likewise.
1608 * method.c (do_build_copy_constructor): Refactor. Don't const
1609 qualify a mutable field.
1610 (do_build_assign_ref): Likewise.
1612 2004-12-20 Matt Austern <austern@apple.com>
1615 * decl.c (make_rtl_for_nonlocal_decl): Use
1616 set_builtin_user_assembler_name.
1618 2004-12-19 Mark Mitchell <mark@codesourcery.com>
1620 * cp-tree.h (note_decl_for_pch): New function.
1621 * class.c (build_clone): Call note_decl_for_pch.
1622 * semantics.c (finish_member_declaration): Likewise.
1623 (note_decl_for_pch): New function.
1625 2004-12-17 Steven Bosscher <stevenb@suse.de>
1627 * init.c (build_zero_init): max_index is the number of
1630 2004-12-17 Nathan Sidwell <nathan@codesourcery.com>
1633 * class.c (add_method): Do not push conversion operators into a
1636 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE_TYPE): Reformat.
1637 * error.c (dump_decl): <TYPE_DECL case> Remove extraneous braces.
1639 2004-12-16 Nathan Sidwell <nathan@codesourcery.com>
1642 * cp-tree.h (integral_constant_value): Declare.
1643 * call.c (null_ptr_cst_p): Use integral_constant_value, not
1644 decl_constant_value.
1645 (convert_like_real): Likewise.
1646 * class.c (check_bitfield_decl): Likewise.
1647 * cvt.c (ocp_convert): Likewise.
1648 (convert): Remove unnecessary decl_constant_value call.
1649 * decl.c (compute_array_index_type): Use integral_constant_value,
1650 not decl_constant_value.
1651 (build_enumerator): Likewise.
1652 * decl2.c (grokfield): Likewise.
1653 * init.c (decl_constant_value): Simplify.
1654 (integral_constant_value): New.
1655 * pt.c (fold_decl_constant_value): Use integral_constant_value,
1656 remove subsequent check.
1657 (tsubst): Use integral_constant_value, not decl_constant_value.
1658 (tsubst_copy, unify): Likewise.
1659 * typeck.c (decay_conversion): Likewise.
1660 (build_compound_expr): Remove unnecessary decl_constant_value
1662 (build_static_cast_1, build_reinterpret_cast_1):
1663 (convert_for_assignment): Remove comment about not calling
1664 decl_constant_value.
1666 2004-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1669 * pt.c (instantiate_class_template): Set input_location for
1671 (tsubst_friend_function): Don't set input_location here.
1672 Make sure the context is complete if necessary.
1674 2004-12-15 Nathan Sidwell <nathan@codesourcery.com>
1677 * parser.c (cp_parser_lookup_name): Remove unneeded TYPENAME_TYPE
1680 2004-12-14 Mark Mitchell <mark@codesourcery.com>
1683 * decl.c (make_typename_type): Do not handle namespace-scoped
1685 (tag_name): Handle typename_type.
1686 (check_elaborated_type_specifier): Handle typenames.
1687 * parser.c (cp_parser_diagnose_invalid_type_name): Improve
1689 (cp_parser_elaborated_type_specifier): Use
1690 cp_parser_diagnose_invalid_type_name.
1692 2004-12-14 Andrew Pinski <pinskia@physics.uc.edu>
1695 * init.c (build_zero_init): If the max_index is 0, there is no
1696 need to create a RANGE_EXPR.
1698 2004-12-14 Mark Mitchell <mark@codesourcery.com>
1701 * cp-objcp-common.c (cp_expr_size): Loosen assertion.
1703 2004-12-14 Nathan Sidwell <nathan@codesourcery.com>
1706 * pt.c (tsubst_copy_and_build): <INDIRECT_REF case> Check that a
1707 REFERENCE_REF_P is dereferencing a reference type.
1708 * typeck.c (build_static_cast): Convert from reference even in a
1710 (build_reinterpret_cast, build_const_cast, build_c_cast): Likewise.
1712 2004-12-14 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1714 * parser.c (cp_parser_uncommitted_to_tentative_parse_p): New function.
1715 (cp_parser_name_lookup_error): Use it.
1716 (cp_parser_check_for_invalid_template_id): Likewise.
1717 (cp_parser_skip_to_closing_parenthesis): Likewise.
1718 (cp_parser_nested_name_specifier_opt): Likewise.
1719 (cp_parser_simple_declaration, cp_parser_template_id): Likewise.
1720 (cp_parser_parameter_declaration_list): Likewise.
1721 (cp_parser_parameter_declaration): Likewise.
1722 (cp_parser_template_name): Let cp_parser_simulate_error perform
1724 (cp_parser_committed_to_tentative_parse): Remove.
1726 2004-12-13 Andrew Pinski <pinskia@physics.uc.edu>
1729 * class.c (build_base_path): Convert the zero constant to the correct
1730 type when comparing.
1732 2004-12-13 Mark Mitchell <mark@codesourcery.com>
1735 * class.c (layout_class_type): Determine the visibility of static
1738 2004-12-12 Roger Sayle <roger@eyesopen.com>
1741 * cp-gimplify.c (gimplify_if_stmt): Optimize the case where the
1742 condition is a constant and the unexecuted clause is empty.
1744 2004-12-10 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1747 * parser.c (cp_parser_class_head): Reject typedef-name in class head.
1749 2004-12-09 Matt Austern <austern@apple.com>
1752 * name-lookup.c (do_nonmember_using_decl): A real function
1753 declaration takes precedence over an anticipated declaration.
1755 2004-12-09 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1757 * parser.c (cp_parser_member_declaration): Fix comment typo.
1759 2004-12-09 Alexandre Oliva <aoliva@redhat.com>
1762 * parser.c (cp_parser_template_id): Don't create a CPP_TEMPLATE_ID
1765 2004-12-09 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1768 * typeck.c (build_reinterpret_cast_1): Allow cast from vector type.
1770 2004-12-09 Nathan Sidwell <nathan@codesourcery.com>
1773 * init.c (build_zero_init): Build a RANGE_EXPR for an array
1776 2004-12-08 Kelley Cook <kcook@gcc.gnu.org>
1778 * typeck.c: Remove DOS line endings.
1780 2004-12-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1783 * decl.c (lookup_and_check_tag): Diagnose nested class with
1784 the same name as enclosing class.
1786 2004-12-08 Nathan Sidwell <nathan@codesourcery.com>
1789 * cp-tree.h (REFERENCE_REF_P): New.
1790 (CPTI_TYPE_INFO_TYPE): Rename to ...
1791 (CPTI_CONST_TYPE_INFO_TYPE): ... here.
1792 (CPTI_TYPE_INFO_REF_TYPE): Remove.
1793 (type_info_type_node): Rename to ...
1794 (const_type_info_type_node): ... here.
1795 (type_info_ref_type): Remove.
1796 * call.c (build_user_type_conversion): Reformat.
1797 (resolve_args): Do not convert_from_reference.
1798 (build_object_call): Call convert_from_reference.
1799 (prep_operand): Do not convert_from_reference.
1800 (build_new_method_call): Likewise.
1801 * class.c (build_vfield_ref): Likewise.
1802 * cvt.c (convert_to_reference): Likewise.
1803 (convert_from_reference): Build INDIRECT_REF here, not with
1805 (convert_force): Do not convert_from_reference.
1806 (build_expr_type_conversion): Likewise.
1807 * decl.c (grok_reference_init): Likewise.
1808 * decl2.c (delete_sanity): Likewise.
1809 * except.c (initialize_handler_parm): Use POINTER_TYPE_P.
1810 * init.c (build_dtor_call): Do not convert_from_reference.
1811 * parser.c (cp_parser_template_argument): Unwrap indirected
1812 reference. Allow TEMPLATE_PARM_INDEX as an object parm.
1813 * pt.c (tsubst_copy_and_build) <case INDIRECT_REF>: Use
1814 convert_from_reference, if indicated.
1815 <case CALL_EXPR>: Do not convert_from_reference.
1816 <case PARM_DECL, VAR_DECL>: Convert_from_reference if needed.
1817 (tsubst_initializer_list): Do not convert_from_reference.
1818 * rtti.c (init_rtti_processing): Adjust node creation.
1819 (throw_bad_typeid): Use const_type_info_type_node.
1820 Do not convert_from_reference.
1821 (typeid_ok_p): Use const_type_info_type_node.
1822 (build_typeid, get_typeid): Always return type_info typed node.
1823 (build_dynamic_cast_1): Dont convert_from_reference. Refactor.
1824 * semantics.c (finish_stmt_expr_expr): Do not
1825 convert_from_reference.
1826 (finish_id_expression): Convert_from_reference as appropriate.
1827 * typeck.c (decay_conversion): Do not convert_from_reference.
1828 (finish_class_member_access_expr): Likewise.
1829 (build_indirect_ref): Use POINTER_TYPE_P.
1830 (convert_arguments): Do not convert_from_reference.
1831 (build_modify_expr): Likewise.
1832 (convert_for_initialization): Likewise.
1833 * typeck2.c (build_x_arrow): Likewise.
1835 2004-12-07 Ziemowit Laski <zlaski@apple.com>
1837 * cp-tree.h (struct lang_type_class): Rename 'objc_protocols'
1838 field to 'objc_info'.
1840 2004-12-07 Kazu Hirata <kazu@cs.umass.edu>
1842 * pt.c: Replace a use of first_rtl_op with TREE_CODE_LENGTH.
1844 2004-12-07 Roger Sayle <roger@eyesopen.com>
1846 * name-lookup.c (leave_scope): We only need to update
1847 class_binding_level when leaving a class scope.
1849 2004-12-06 Ziemowit Laski <zlaski@apple.com>
1851 * cp-tree.h (struct lang_type_class): Add 'objc_protocols' field.
1853 2004-12-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1855 PR c++/17011, c++/17971
1856 * pt.c (tsubst_copy) <FIELD_DECL case>: Check and diagnose
1858 (tsubst_copy_and_build) <COMPONENT_REF case>: Check
1859 error_mark_node after member substitution.
1860 * semantics.c (finish_id_expression): Call
1861 finish_non_static_data_member for non-dependent FIELD_DECL.
1863 2004-12-03 Nathan Sidwell <nathan@codesourcery.com>
1866 * decl.c (grokdeclarator): Make sure class in pointer to member is
1869 2004-12-02 Nathan Sidwell <nathan@codesourcery.com>
1872 * parser.c (cp_parser_new_type_id): Move array size expression
1873 checks from here ...
1874 * init.c (build_new): ... to here.
1876 2004-12-02 Nathan Sidwell <nathan@codesourcery.com>
1879 * parser.c (cp_parser_class_head): Return NULL_TREE when
1880 push_template_decl fails. Update comment.
1882 2004-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1884 PR c++/15664, c++/18276
1885 * pt.c (tsubst_decl) <TEMPLATE_DECL case>: Reorganize. Correctly
1886 tsubst TEMPLATE_DECL that is a TEMPLATE_TEMPLATE_PARM.
1888 2004-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1891 * parser.c (cp_parser_type_specifier): Catch template declaration
1894 2004-12-01 Matt Austern <austern@apple.com>
1896 * name-lookup.c (namespace_binding): Omit alias check for global
1899 2004-12-01 Nathan Sidwell <nathan@codesourcery.com>
1902 * parser.c (cp_parser_class_name): Check decl's type is not
1906 * call.c (standard_conversion): Add FLAGS parameter. Do not allow
1907 derived to base conversion when checking constructor
1909 (implicit_conversion): Pass FLAGS to standard_conversion.
1910 (check_constructir_callable): Disallow conversion functions.
1912 2004-11-30 Kazu Hirata <kazu@cs.umass.edu>
1914 * parser.c: Fix comment typos.
1916 2004-11-27 Mark Mitchell <mark@codesourcery.com>
1919 * parser.c (cp_parser_check_for_definition_in_return_type): Take
1920 the defined type as a parameter, and inform the user about the
1921 possibility of a missing semicolon.
1922 (cp_parser_explicit_instantiation): Adjust call to
1923 cp_parser_check_for_definition_in_return_type.
1924 (cp_parser_init_declarator): Likewise.
1925 (cp_parser_member_declaration): Likewise.
1928 * cp-tree.def (TYPENAME_TYPE): Remove discussion of implicit
1929 typename from comments.
1930 * cp-tree.h (TYPENAME_IS_ENUM_P): New macro.
1931 (TYPENAME_IS_CLASS_P): Likewise.
1932 (make_typename_type): Change prototype.
1933 * decl.c (struct_typename_info): New type.
1934 (typename_compare): Expect the second argument to be a
1935 typename_info, not a tree.
1936 (build_typename_type): Add tag_type parameter. Do not create a
1937 new type until necessary.
1938 (make_typename_type): Add tag_type parameter.
1939 * error.c (TYPENAME_TYPE): Print tags other than "typename" if
1941 * friend.c (make_friend_class): Adjust call to make_typename_type.
1942 * parser.c (cp_parser_make_typename_type): Likewise.
1943 (cp_parser_primary_expression): Adjust call to
1944 cp_parser_lookup_name.
1945 (cp_parser_unqualified_id): Adjust calls to cp_parser_class_name.
1946 (cp_parser_class_or_namespace_name): Likewise.
1947 (cp_parser_postfix_expression): Adjust calls to
1949 (cp_parser_mem_initializer_id): Adjust calls to
1950 cp_parser_class_name.
1951 (cp_parser_type_parameter): Adjust calls to cp_parser_lookup_name.
1952 (cp_parser_template_name): Likewise.
1953 (cp_parser_template_argument): Likewise.
1954 (cp_parser_type_name): Adjust call to cp_parser_class_name.
1955 (cp_parser_elaborated_type_specifier): Adjust calls to
1956 make_typename_type and cp_parser_lookup_name.
1957 (cp_parser_namespace_name): Likewise.
1958 (cp_parser_class_name): Replace type_p parameter with tag_type.
1959 Adjust calls to make_typename_type and cp_parser_lookup_name.
1960 (cp_parser_class_head): Adjust calls to cp_parser_class_name.
1961 (cp_parser_base_specifier): Likewise.
1962 (cp_parser_lookup_name): Replace is_type parameter with tag_type.
1963 Adjust calls to make_typename_type and lookup_qualified_name.
1964 (cp_parser_lookup_name_simple): Adjust call to
1965 cp_parser_lookup_name.
1966 (cp_parser_constructor_declarator_p): Adjust call to
1967 cp_parser_class_name.
1968 * pt.c (convert_template_argument): Adjust all to
1970 (tsubst_decl): Do not pre-substitute the type of the declaration.
1971 (tsubst): Hand off declarations more quickly. Adjust call to
1975 * parser.c (cp_parser_postfix_dot_deref_expression): Robustify.
1977 2004-11-29 Daniel Jacobowitz <dan@codesourcery.com>
1980 * Make-lang.in (cp/decl2.o): Update dependencies.
1981 * decl2.c (finish_file): Call maybe_apply_pending_pragma_weaks.
1983 2004-11-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1986 * name-lookup.c (pushtag): Change return type to tree.
1987 * cp-tree.h (pushtag): Adjust declaration.
1988 * decl.c (xref_tag, start_enum): Use return value of pushtag.
1989 * pt.c (push_template_decl_real): Return immediately if
1990 pushdecl_namespace_level returns error_mark_node.
1992 2004-11-27 Kazu Hirata <kazu@cs.umass.edu>
1994 * pt.c: Fix a comment typo.
1996 2004-11-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1998 Friend class name lookup 4/n
1999 * class.c (pushclass): Don't call cxx_remember_type_decls.
2000 * cp-tree.h (clear_anon_tags): Remove declaration.
2001 * decl.c (grokdeclarator): Don't call lookup_tag_reverse.
2002 * name-lookup.c (binding_entry_free, binding_table_free): Comment
2004 (binding_table_find_anon_type, binding_table_reverse_maybe_remap,
2005 binding_table_remove_anonymous_types, cxx_remember_type_decls,
2006 bt_print_entry, clear_anon_tags, follow_tag_typedef, lookup_tag,
2007 lookup_tag_reverse): Remove
2008 (begin_scope, leave_scope, kept_level_p, print_binding_level):
2009 Don't use type_decls field in cp_binding_level.
2010 (maybe_process_template_type_declaration, pushtag): Set
2011 CLASSTYPE_NESTED_UTDS directly.
2012 * name-lookup.h (binding_table_remove_anonymous_types,
2013 cxx_remember_type_decls, lookup_tag, lookup_tag_reverse): Remove
2015 (cp_binding_level): Remove type_decls field.
2017 2004-11-26 Kazu Hirata <kazu@cs.umass.edu>
2019 * typeck.c: Fix a comment typo.
2021 2004-11-25 Mark Mitchell <mark@codesourcery.com>
2024 * class.c (instantiate_type): Treat NON_DEPENDENT_EXPRs with
2025 unknown_type as non matching. Tidy up.
2026 * pt.c (build_non_dependent_expr): Do not build a
2027 NON_DEPENDENT_EXPR for a VAR_DECL.
2030 * cp-tree.h (lvalue_or_else): Remove declaration.
2031 * tree.c (lvalue_or_else): Remove.
2032 * typeck.c (build_unary_op): Adjust call to lvalue_or_else.
2033 (build_modify_expr): Likewise.
2036 * decl.c (duplicate_decls): Return error_mark_node on error, as
2040 * decl.c (grokvardecl): Keep track of whether or not a there was
2041 explicit qualification.
2042 * name-lookup.c (set_decl_namespace): Complain about explicit
2043 qualification of a name within its own namespace.
2046 * typeck.c (check_return_expr): Robustify.
2048 2004-11-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2050 Friend class name lookup 3/n, PR c++/3332
2051 * name-lookup.c (push_inner_scope, pop_inner_scope): New functions.
2052 (lookup_type_scope): Don't deal with name from user declaration
2054 * name-lookup.h (push_inner_scope, pop_inner_scope): Add declarations.
2055 * parser.c (cp_parser_class_specifier): Use push_inner_scope and
2058 2004-11-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2060 Friend class name lookup 2/n, PR c++/14513, c++/15410
2061 * name-lookup.c (lookup_name_real): Simplify.
2062 (lookup_type_scope): Add SCOPE parameter. Handle friend class
2064 * name-lookup.h (tag_scope): New enum type.
2065 (lookup_type_scope): Adjust declaration.
2066 * decl.c (lookup_and_check_tag, xref_tag, xref_tag_from_type):
2067 Change bool parameter GLOBALIZED to TAG_SCOPE parameter SCOPE.
2068 (start_enum): Likewise. Add assertion test that NAME is
2069 IDENTIFIER_NODE. Use anonymous name for dummy ENUMERAL_TYPE in
2071 * cp-tree.h (xref_tag, xref_tag_from_type): Adjust declarations.
2072 * parser.c (cp_parser_elaborated_type_specifier,
2073 cp_parser_class_head): Adjust call to xref_tag.
2074 * pt.c (lookup_template_class, instantiate_class_template):
2076 * rtti.c (init_rtti_processing, build_dynamic_cast_1,
2077 tinfo_base_init, emit_support_tinfos): Likewise.
2079 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
2081 * g++spec.c, lex.c: Avoid ` as left quote in diagnostics.
2083 2004-11-24 Mark Mitchell <mark@codesourcery.com>
2086 * name-lookup.c (supplement_binding): Do not allow typedefs to be
2087 redefined in class scope.
2090 * parser.c (cp_parser_set_decl_type_spec): Do not try to allow
2091 redefinitions of builtin types other that "bool" or "wchar_t".
2093 2004-11-24 Steven Bosscher <stevenb@suse.de>
2095 * decl.c (cxx_init_decl_processing): Don't clear
2096 flag_inline_functions.
2098 2004-11-24 Mark Mitchell <mark@codesourcery.com>
2100 * pt.c (tsubst_function_type): Do not permit function types which
2101 return arrays or functions.
2104 * parser.c (cp_parser_init_declarator): Do not pop scope twice.
2107 * cp-tree.h (CTOR_NAME): Remove.
2108 (DTOR_NAME): Remove.
2109 * decl.c (initialize_predefined_identifiers): Add spaces to the
2110 end of constructor and destructor names.
2112 2004-11-24 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2115 * decl.c (start_decl): Check for invalid specialization headers.
2117 2004-11-24 Paolo Bonzini <bonzini@gnu.org>
2121 * call.c (standard_conversion): Move check for conversions between
2123 * typeck.c (ptr_reasonably_similar): ... here.
2125 2004-11-23 Ben Elliston <bje@au.ibm.com>
2127 * cp-tree.h (context_as_string): Remove extern.
2128 * error.c (context_as_string): Remove.
2130 * cp-tree.h (cp_type_qual_from_rid): Remove extern.
2131 * lex.c (cp_type_qual_from_rid): Remove.
2133 * cp-tree.h (do_poplevel): Remove extern.
2134 (check_multiple_declarators): Likewise.
2135 * semantics.c (do_poplevel): Make static.
2136 (check_multiple_declarators): Remove.
2138 * cp-tree.h (check_final_overrider): Remove extern.
2139 * search.c (check_final_overrider): Make static.
2141 * cp-tree.h (build_artificial_parm): Remove extern.
2142 * decl2.c (build_artificial_parm): Make static.
2144 2004-11-22 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2147 * typeck.c (build_unary_op) <CONVERT_EXPR, NEGATE_EXPR>: Unify code.
2148 Make sure the result is always a rvalue.
2150 2004-11-16 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2152 * decl.c (start_preparsed_function): Call check_function_type even
2154 (require_complete_types_for_parms): Skip dependent types.
2155 (check_function_type): Likewise.
2157 2004-11-16 Steven Bosscher <stevenb@suse.de>
2159 * Make-lang.in (cp/decl.o, cp/search.o): Don't depend on stack.h.
2160 * search.c: Don't include it.
2162 2004-11-15 Andrew Pinski <pinskia@physics.uc.edu>
2164 * cp-gimplify.c: Include pointer-set.h
2165 (cp_genericize_r): Use pointer_sets instead of a hashtable.
2166 Also instert the new statement for CLEANUP_STMT.
2167 (cp_genericize): Use pointer_sets instead of a hashtable.
2168 * Make-lang.in (cp-gimplify.o): Depend on pointer-set.h.
2170 2004-11-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2172 Friend class name lookup 1/n, PR c++/18471
2173 * decl.c (lookup_and_check_tag): New function.
2174 (xref_tag, start_enum): Use it.
2175 (check_elaborated_type_specifier): Move TEMPLATE_TYPE_PARM check
2176 before !DECL_IMPLICIT_TYPEDEF_P. Also display previously declared
2178 * name-lookup.c (lookup_name_current_level): Rename to ...
2179 (lookup_name_innermost_nonclass_level): ... this.
2180 (lookup_type_scope): New function.
2181 * name-lookup.h (lookup_name_current_level): Rename to ...
2182 (lookup_name_innermost_nonclass_level): ... this.
2183 (lookup_type_scope): Add declaration.
2185 2004-11-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2188 * pt.c (coerce_template_parms): Only emit error message about
2189 invalid template argument when TF_ERROR.
2191 2004-11-12 Mark Mitchell <mark@codesourcery.com>
2194 * decl.c (start_decl): Make sure to set *pop_scope_p. Return
2195 error_mark_node to indicate errors.
2198 * parser.c (cp_parser_direct_declarator): Disallow non-constant
2199 array bounds when not inside a function.
2202 * pt.c (tsubst_copy_and_build): Do not do Koenig lookup when an
2203 unqualified name resolves to a member function.
2206 * pt.c (tsubst_copy_and_build): Handle qualified names used from a
2207 derived class correctly.
2209 * decl2.c (import_export_decl): Fix typo in comment.
2210 * tree.c (pod_type_p): Likewise.
2212 2004-11-10 Andrew Pinski <pinskia@physics.uc.edu>
2214 * typeck.c (cxx_mark_addressable): Add braces around the first if.
2216 2004-11-10 Adam Nemet <anemet@lnxw.com>
2219 * typeck.c (cxx_mark_addressable): Issue an error if address of an
2220 explicit register variable is requested.
2222 2004-11-10 Nathan Sidwell <nathan@codesourcery.com>
2225 * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK): New.
2226 (struct lang_decl_flags): Add thunk_p flag.
2227 (struct lang_decl): Remove separate fixed_offset. Place
2228 cloned_function and fixed_offset into union.
2229 (DECL_CLONED_FUNCTION_P, DECL_CLONED_FUNCTION): Adjust.
2230 (DECL_THUNK_P, SET_DECL_THUNK_P): Adjust.
2231 (THUNK_FIXED_OFFSET): Adjust.
2232 * method.c (make_thunk): Adjust.
2234 2004-11-09 Mark Mitchell <mark@codesourcery.com>
2237 * init.c (build_new_1): Handle parenthesized type-ids that name an
2240 2004-11-09 Joseph S. Myers <joseph@codesourcery.com>
2242 * call.c, class.c, decl.c, decl2.c, error.c, mangle.c, parser.c,
2243 pt.c, search.c, semantics.c, typeck.c: Use %q, %< and %> for
2244 quoting in diagnostics.
2245 * parser.c (cp_parser_sizeof_operand): Use '' instead of `' for
2246 quoting in printf format.
2247 * decl.c (duplicate_decls, start_decl): Use %qD instead of
2250 2004-11-08 Kazu Hirata <kazu@cs.umass.edu>
2252 * class.c, decl.c, lex.c, name-lookup.c, parser.c, pt.c,
2253 search.c, typeck2.c: Fix comment formatting.
2255 2004-11-04 Ulrich Weigand <uweigand@de.ibm.com>
2257 PR tree-optimization/18184
2258 * cp-objcp-common.c (cxx_types_compatible_p): Do not treat pointers
2259 of different modes or alias-all flags as equivalent.
2260 * typeck.c (comptypes): Likewise.
2262 2004-11-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2265 * cp-tree.h (TYPE_REF_OBJ_P): New macro.
2266 (TYPE_PTR_P, TYPE_PTROB_P, TYPE_PTROBV_P, TYPE_PTRFN_P,
2267 TYPE_REFFN_P): Document.
2268 (fold_decl_constant_value): New prototype.
2269 * pt.c (convert_nontype_argument_function): Rewrite and extract
2271 (fold_decl_constant_value, convert_nontype_argument_function): New.
2272 (lookup_template_class): Add comment about useless double call.
2273 * mangle.c (write_expression): Strip conversions before lowering
2275 * cvt.c (ocp_convert): Check LOOKUP_COMPLAIN for a pedwarn. Disallow
2276 enum to enum conversion.
2278 2004-11-02 Mark Mitchell <mark@codesourcery.com>
2281 * parser.c (cp_parser_type_parameter): Robustify.
2284 * parser.c (cp_parser_single_declaration): Disallow template
2288 * typeck.c (build_const_cast): Use error_operand_p.
2290 2004-11-02 Ziemowit Laski <zlaski@apple.com>
2292 * cp-lang.c (cxx_types_compatible_p): Remove prototype and definition.
2293 (LANG_HOOKS_TYPES_COMPATIBLE_P): Move to cp-objcp-common.h.
2294 * cp-objcp-common.c (cxx_types_compatible_p): Moved definition here
2296 * cp-objcp-common.h (cxx_types_compatible_p): Moved prototype here
2298 (LANG_HOOKS_TYPES_COMPATIBLE_P): Moved here from cp-lang.c.
2300 2004-11-01 Nathan Sidwell <nathan@codesourcery.com>
2303 * search.c (check_final_overrider): Deprecate gnu covariant extension.
2305 2004-10-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
2307 Convert diagnostics to use quoting flag q 9/n
2308 * typeck.c (build_x_unary_op, convert_member_func_to_ptr,
2309 get_delta_difference): Use new quotation style.
2310 * repo.c (reopen_repo_file_for_write): Likewise.
2311 * pt.c (do_type_instantiation): Likewise.
2312 * parser.c (cp_parser_diagnose_invalid_type_name):
2313 * name-lookup.c (push_overloaded_decl, set_decl_namespace):
2314 * error.c (cp_print_error_function,
2315 print_instantiation_full_context): Likewise.
2316 * decl.c (define_label, grok_reference_init,
2317 maybe_deduce_size_from_array_init, revert_static_member_fn):
2318 * decl2.c (check_classfn): Likewise.
2319 * class.c (add_method, check_field_decls, layout_class_type,
2320 resolve_address_of_overloaded_function): Likewise.
2321 * call.c (build_x_va_arg, build_over_call): Likewise.
2323 2004-10-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
2325 Convert diagnostics to use quoting flag q 8/n
2326 * cvt.c (cp_convert_to_pointer, warn_ref_binding,
2327 convert_to_reference, ocp_convert, convert_to_void
2328 cp_convert_to_pointer): Use new quotation style.
2330 2004-10-31 Mark Mitchell <mark@codesourcery.com>
2333 * typeck2.c (store_init_value): Use split_nonconstant_init even
2334 for types that require construction.
2336 1004-10-28 Matt Austern <austern@apple.com>
2339 * cp-tree.h (class_key_or_enum_as_string): Declare.
2340 * error.c (class_key_or_enum): Rename to class_key_or_enum_as_string
2341 and remove static qualifier.
2342 * decl.c (shadow_tag): Warn about ignored attributes in class/struct/
2343 union/enum declaration.
2345 2004-10-29 Kazu Hirata <kazu@cs.umass.edu>
2347 * pt.c: Fix a comment typo.
2349 2004-10-28 Nathan Sidwell <nathan@codesourcery.com>
2351 * typeck.c (composite_pointer_type): Remove comment about DR 195.
2352 (build_reinterpret_cast_1): Revert DR195 patch. Only emit a
2353 warning when being pedantic.
2354 (build_reinterpet_cast, build_c_cast): Adjust.
2356 2004-10-29 Mark Mitchell <mark@codesourcery.com>
2359 * decl.c (grokdeclarator): Mark TYPE_DECLs as abstract when they
2360 appear in a constructor/destructor that will be cloned.
2362 1004-10-28 Matt Austern <austern@apple.com>
2365 * decl.c (finish_enum): Handle packed attribute.
2366 * parser.c (cp_parser_enum_specifier): Process trailing attributes.
2368 2004-10-28 Mark Mitchell <mark@codesourcery.com>
2371 * pt.c (instantiate_class_template): Increment
2372 processing_template_decl when substituting into a member class
2375 2004-10-27 Mark Mitchell <mark@codesourcery.com>
2378 * call.c (convert_like_real): Fix formatting.
2379 (initialize_reference): When binding a temporary to a base class,
2380 ensure that the nominal copy made is to the derived class, not the
2384 * parser.c (cp_parser_next_token_ends_template_argument_p): Do not
2387 2004-10-27 Andrew Pinski <pinskia@physics.uc.edu>
2389 * decl.c (bad_specifiers): Move the q after the %.
2391 2004-10-27 Andrew Pinski <pinskia@physics.uc.edu>
2393 * parser.c (cp_parser_diagnose_invalid_type_name): Move the q after
2396 2004-10-26 Mark Mitchell <mark@codesourcery.com>
2398 * name-lookup.c (do_namespace_alias): Use FROB_CONTEXT.
2399 * search.c (current_scope): Fix prototype.
2402 * search.c (current_scope): Return the innermost non-block scope,
2403 not the innermost non-block, non-namespace scope.
2404 (at_namespace_scope_p): Adjust accordingly.
2405 (dfs_accessible_post): Do not pass namespaces to is_friend.
2406 (dfs_walk_once_accessible_r): Likewise.
2407 * decl.c (grokvardecl): Adjust call to current_scope.
2408 (build_enumerator): Likewise.
2409 * parser.c (cp_parser_using_declaration): Likewise.
2410 (cp_parser_direct_declarator): Use at_namespace_scope_p instead of
2412 (cp_parser_class_head): Adjust call to current_scope.
2413 * name-lookup.c (do_namespace_alias): Set the DECL_CONTEXT for the
2417 * pt.c (tusbst_copy_and_build): Resolve enumeration constants to
2418 their underlying values.
2421 * typeck.c (build_binary_op): Honor build_type, even when in a
2424 2004-10-26 Nathan Sidwell <nathan@codesourcery.com>
2426 * parser.c (cp_lexer_get_preprocessor_token): Remove unneeded
2427 padding token checking.
2429 2004-10-25 Andrew Pinski <pinskia@physics.uc.edu>
2432 * decl.c (grokdeclarator) <case cdk_array>: Remove the call
2433 layout_type as it is already done by create_array_type_for_decl.
2435 2004-10-22 Nathan Sidwell <nathan@codesourcery.com>
2438 * parser.c (eof_token): Make const, correctly initialize rid and
2440 (struct cp_lexer): Replace buffer_end pointer with buffer_length
2442 (cp_lexer_new_main): Directly grow lexer's buffer here. Don't
2444 (cp_lexer_new_from_tokens): Adjust.
2445 (cp_lexer_grow_buffer): Remove.
2446 (cp_lexer_peek_nth_token, cp_lexer_consume_token,
2447 cp_lexer_purge_token): Add const casts.
2449 2004-10-21 Mark Mitchell <mark@codesourcery.com>
2453 * cp-tree.h (convert_to_base): Change prototype.
2454 (build_ptrmemfunc): Likewise.
2455 (convert_ptrmem): New function.
2456 * call.c (struct conversion): Adjust documentation for base_p.
2457 (standard_conversion): Set base_p for ck_pmem conversions as
2459 (convert_like_real): Use convert_to_base for ck_pmem and ck_ptr
2461 * class.c (convert_to_base): Handle both pointers and objects.
2462 Add nonnull parameter.
2463 (build_vfield_ref): Adjust call to convert_to_base.
2464 * cvt.c (cp_convert_to_pointer): Adjust call to build_ptrmemfunc.
2465 (convert_force): Likewise.
2466 * typeck.c (build_unary_op): Likewise.
2467 (convert_ptrmem): New function.
2468 (build_static_cast_1): Use it.
2469 (build_reinterpret_cast): Allow conversions to vector types.
2470 (get_delta_difference): Add c_cast_p parameter.
2471 (build_ptrmemfunc): Likewise. Adjust calls to
2472 get_delta_difference.
2474 2004-10-21 Andrew Pinski <pinskia@physics.uc.edu>
2477 * error.c (cp_error_at): Output the context as it might be
2478 different file as the other location.
2480 2004-10-21 Kazu Hirata <kazu@cs.umass.edu>
2482 * typeck.c: Fix a comment typo.
2484 2004-10-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2487 * decl.c (make_unbound_class_template): Add PARM_LIST parameter.
2488 * cp-tree.h (make_unbound_class_template): Adjust prototype.
2489 * parser.c (cp_parser_lookup_name): Adjust call to
2490 make_unbound_class_template.
2491 (cp_parser_single_declaration): Handle member class of class
2492 template as template friend parsing correctly.
2493 * friend.c (is_friend): Call is_specialization_of_friend for
2494 template friend class.
2495 (make_friend_class): Handle member class of class template as
2497 * pt.c (is_specialization_of_friend): Likewise.
2498 (instantiate_class_template): Likewise.
2499 (tsubst): Adjust call to make_unbound_class_template.
2501 2004-10-20 Nathan Sidwell <nathan@codesourcery.com>
2503 * typeck.c (composite_pointer_type): Add comment about DR 195
2504 (build_reinterpret_cast_1): Add for_reinterpret_cast_p parameter.
2505 Allow function pointer conversions that DR195 suggests.
2506 (build_reinterpret_cast, build_c_cast): Update
2507 build_reinterpret_cast_1 calls.
2509 2004-10-20 Kazu Hirata <kazu@cs.umass.edu>
2511 * call.c, typeck.c: Fix comment typos.
2513 2004-10-20 Nathan Sidwell <nathan@codesourcery.com>
2515 * parser.c (cp_token_position): New typedef. Define VEC thereof.
2516 (struct cp_lexer): Allow buffer and buffer_end to be NULL. Make
2517 next_token and last_token cp_token_position. Make saved_tokens a
2518 VEC(cp_token_position).
2519 (eof_token): New static variable.
2520 (CP_SAVED_TOKENS_SIZE): Rename to ...
2521 (CP_SAVED_TOKEN_STACK): ... here.
2522 (cp_lexer_new_main): Adjust main lexer creation and buffer
2524 (cp_lexer_new_from_tokens): Do not copy the tokens, merely point
2525 to the parent buffer. Do not append eof token.
2526 (cp_lexer_destroy): Only free buffer if non-NULL. Free token
2528 (cp_lexer_next_token, cp_lexer_prev_token): Remove.
2529 (cp_lexer_token_position, cp_lexer_token_at): New.
2530 (cp_lexer_saving_tokens): Adjust. Make inline.
2531 (cp_lexer_advance_token, cp_lexer_token_difference): Remove.
2532 (cp_lexer_peek_token_emit_debug_info): Fold into ...
2533 (cp_lexer_peek_token): ... here.
2534 (cp_lexer_peek_nth_token): Don't peek past EOF.
2535 (cp_lexer_consume_token): Set next_token to eof_token, if reaching
2537 (cp_lexer_purge_token): Adjust eof setting.
2538 (cp_lexer_purge_tokens_after): Likewise.
2539 (cp_lexer_save_tokens): Push next_token directly.
2540 (cp_lexer_commit_tokens): Adjust.
2541 (cp_lexer_rollback_tokens): Pop next_token directly.
2542 (cp_parser_check_for_invalid_template_id): Adjust token purging.
2543 (cp_parser_translation_unit): Do not consume the EOF.
2544 (cp_parser_nested_name_specifier_opt): Adjust token purging.
2545 (cp_parser_template_id, cp_parser_template_name): Likewise.
2547 2004-10-19 Mark Mitchell <mark@codesourcery.com>
2550 * call.c (struct conversion): Add base_p.
2551 (convert_like): Add c_cast_p argument.
2552 (convert_like_with_conversion): Likewise.
2553 (build_conv): Clear base_p.
2554 (standard_conversion): Set it, for derived-to-base conversions.
2555 (convert_like_real): Add c_cast_p parameter. Handle pointer
2556 conversions directly rather than relying on ocp_convert.
2557 (perform_direct_initialization_if_possible): Add c_cast_p
2559 * cp-tree.h (perform_direct_initialization_if_possible): Change
2561 (convert_member_func_to_ptr): New function.
2562 * typeck.c (check_for_casting_away_constness): Add diag_fn
2564 (build_static_cast_1): New function, split out from ...
2565 (build_static_cast): ... here. Use build_static_cast_1.
2566 (build_reinterpret_cast_1): New function, split out from ...
2567 (build_reinterpret_cast): ... here. Use build_reinterpret_cast_1.
2568 (build_const_cast_1): New function, split out from ...
2569 (build_const_cast): ... here. Use build_const_cast_1.
2570 (build_c_cast): Rewrite to use build_const_cast_1,
2571 build_static_cast_1, and build_reinterpret_cast_1.
2572 (convert_member_func_to_ptr): New function.
2574 2004-10-19 Paolo Bonzini <bonzini@gnu.org>
2577 * parser.c (enum cp_parser_prec): Give relational expressions
2578 a higher precedence than equality expressions.
2580 2004-10-15 Nathan Sidwell <nathan@codesourcery.com>
2582 * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Adjust lookup_base call.
2583 (ACCESSIBLY_UNIQUELY_DERIVED_P): Remove.
2584 (PUBLICLY_UNIQUELY_DERIVED_P): Adjust lookup_base call.
2585 (enum base_access): Reorganize.
2586 (accessible_base_p, accessible_p): Add consider_local_p parameter.
2587 * call.c (standard_conversion): Update comment about
2589 (enforce_access): Adjust accessible_p call.
2590 (build_over_call): Adjust accessible_base_p call.
2591 * class.c (convert_to_base): Adjust lookup_base call.
2592 (build_vtbl_ref_1): Likewise.
2593 (warn_about_ambiguous_bases): Likewise. Add early exit.
2594 * cvt.c (convert_to_pointer_force) Adjust lookup_base call.
2595 * search.c (accessible_base_p): Add consider_local_p parameter.
2596 (lookup_base): Pass consider_local_p to accessible_base_p call.
2597 (friend_accessible_p): Check whether scope is a class member.
2598 Remove unnecessary class template check.
2599 (accessible_p): Add consider_local_p parameter. Use it.
2600 (adjust_result_of_qualified_name_lookup): Adjust lookup_base call.
2601 * tree.c (maybe_dummy_object): Likewise.
2602 * typeck.c (comp_except_type): Use PUBLICLY_UNIQUELY_DERIVED_P.
2603 (build_class_member_access_expr): Adjust lookup_base call.
2604 * typeck2.c (binfo_or_else): Likewise.
2605 * rtti.c (build_dynamic_cast_1): Access can consider friendship
2608 2004-10-17 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2611 * decl2.c (grokfield): Apply attributes also to TYPE_DECLs.
2613 2004-10-16 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2616 * parser.c (cp_parser_parenthesized_expression_list): Fold
2617 non-dependent expressions in attribute lists.
2619 2004-10-15 Mark Mitchell <mark@codesourcery.com>
2622 * decl.c (declare_global_var): Use the return value from pushdecl.
2625 * parser.c (cp_parser_simple_declaration): Do not diagnose invalid
2626 type names if we have already found a valid type.
2627 (cp_parser_member_declaration): Likewise.
2630 * parser.c (cp_parser_member_specification_opt): Handle
2633 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
2635 * dump.c, g++spec.c, repo.c: Update copyright.
2637 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
2639 * decl.c: Fix a comment typo.
2641 2004-10-13 Andrew Pinski <pinskia@physics.uc.edu>
2644 * name-lookup.c (parse_using_directive): If we have a
2645 error_mark_node, do not set the decl namespace associations
2648 2004-10-14 Mark Mitchell <mark@codesourcery.com>
2651 * decl.c (cp_finish_decl): Do not call expand_static_init more
2652 than once for a single variable.
2654 2004-10-14 Matt Austern <austern@apple.com>
2656 * Make-lang.in (pt.o): depends on pointer-set.h
2657 * cp-tree.h (cp_walk_subtrees): Last argument is pointer_set_t* now.
2658 * pt.c (struct pair_fn_data): Use pointer_set_t, not htab_t
2659 (for_each_template_parm): Convert from htab_t to pointer_set_t.
2660 * tree.c (cp_walk_subtrees): Last argument is pointer_set_t* now.
2662 2004-10-13 Andrew Pinski <pinskia@physics.uc.edu>
2665 * semantics.c (finish_for_expr): Convert expression to void
2666 so that we don't create temporaries for a?b:c.
2668 2004-10-13 Kazu Hirata <kazu@cs.umass.edu>
2670 * search.c: Fix a comment typo.
2672 2004-10-12 Nathan Sidwell <nathan@codesourcery.com>
2674 * class.c (dfs_modify_vtables): Simplify condition. Return
2675 dfs_skip_bases as appropriate.
2676 (modify_all_vtables): Walk in pre-order.
2677 * search.c (dfs_walk_all, dfs_walk_once_r,
2678 dfs_walk_once_accessible_r): Assert post order function never
2679 returns dfs_skip_bases.
2681 * search.c (struct lookup_base_data_s): New.
2682 (lookup_base_r): Replace with ...
2683 (dfs_lookup_base): ... this.
2684 (lookup_base): Use dfs_walk_all.
2686 2004-10-12 Kazu Hirata <kazu@cs.umass.edu>
2688 * search.c: Fix comment typos.
2690 2004-10-11 Mark Mitchell <mark@codesourcery.com>
2693 * parser.c (cp_parser_declarator): Add member_p parameter.
2694 (cp_parser_condition): Adjust calls to cp_parser_declarator.
2695 (cp_parser_explicit_instantiation): Likewise.
2696 (cp_parser_init_declarator): Likewise.
2697 (cp_parser_direct_declarator): Add member_p parameter. Do not
2698 parse tentatively when parsing the parameters to a member.
2699 (cp_parser_type_id): Adjust calls to cp_parser_declarator.
2700 (cp_parser_parameter_declaration): Likewise.
2701 (cp_parser_member_declaration): Likewise.
2702 (cp_parser_exception_declaration): Likewise.
2705 * cp-tree.h (CLASSTYPE_TEMPLATE_SPECIALIZATION): Add a comment.
2706 * pt.c (optimize_specialization_lookup_p): Do not optimize lookups
2707 for members of partial or explicit specializations.
2710 * decl2.c (finish_anon_union): Robustify.
2712 2004-10-11 Nathan Sidwell <nathan@codesourcery.com>
2714 * cp-tree.h (get_dynamic_cast_base_type): Rename to ...
2715 (dcast_base_hint): ... here.
2716 * rtti.c (build_dynamic_cast_1): Use dcast_base_hint.
2717 * search.c (struct dcast_data_s): New.
2718 (dynamic_cast_base_recurse): Remove. Replace with ...
2719 (dfs_dcast_hint_pre, dfs_dcast_base_post): ... these. New.
2720 (get_dynamic_cast_base_type): Rename to ...
2721 (dcast_base_hint): ... here. Use dfs_walk_once_accessible.
2722 (accessible_r): Remove.
2723 (dfs_accessible_post): New, broken out of accessible_r.
2724 (accessible_p): Use dfs_walk_once_accessible.
2725 (dfs_walk_once_accessible_r): New. From accessible_r.
2726 (dfs_walk_once_accessible): New. From acessible_p.
2728 * cp-tree.h (SAME_BINFO_TYPE_P): New.
2729 * class.c (build_base_path): Use SAME_BINFO_TYPE_P to compare
2731 (convert_to_base_statically, determine_primary_bases,
2732 update_vtable_entry_for_fn, dfs_modify_vtables, build_vtt_inits,
2733 dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
2734 accumulate_vtbl_inits, dfs_accumulate_vtbl_inits,
2735 build_vtbl_initializer, add_vcall_offset_vtbl_entries_1): Likewise.
2736 * init.c (expand_member_init): Likewise.
2737 * search.c (lookup_base_r, dynamic_cast_base_recurse,
2738 binfo_via_virtual, copied_binfo, binfo_for_vbase,
2739 original_binfo): Likewise.
2740 * tree.c (copy_binfo): Likewise.
2742 2004-10-11 Kazu Hirata <kazu@cs.umass.edu>
2744 * semantics.c: Fix comment typos.
2746 2004-10-10 Andrew Pinski <pinskia@physics.uc.edu>
2751 * semantics.c (maybe_cleanup_point_expr): Call
2752 fold_build_cleanup_point_expr.
2753 (maybe_cleanup_point_expr_void): New function.
2754 (add_decl_expr): Call maybe_cleanup_point_expr_void.
2755 (finish_expr_stmt): Likewise.
2756 (finish_return_stmt): Likewise.
2757 (finish_for_expr): Likewise.
2758 (finish_asm_stmt): Likewise.
2759 * typeck.c (condition_conversion): Call
2760 fold_build_cleanup_point_expr.
2762 2004-10-10 Andrew Pinski <pinskia@physics.uc.edu>
2765 * semantics.c (add_decl_expr): If the decl has a size which
2766 has side effects then the decl expression needs a cleanup point.
2768 2004-10-10 Mark Mitchell <mark@codesourcery.com>
2771 * decl.c (grokdeclarator): Robustify error-recovery on invalid
2774 2004-10-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
2776 Convert diagnostics to use quoting flag q 7/n
2777 * typeck.c (composite_pointer_type_r, composite_pointer_type,
2778 cxx_sizeof_or_alignof_type, cxx_sizeof_or_alignof_expr,
2779 string_conv_p, build_class_member_access_expr,
2780 build_class_member_access_expr, lookup_destructor,
2781 finish_class_member_access_expr, build_indirect_ref,
2782 get_member_function_from_ptrfunc, build_function_call,
2783 convert_arguments, build_binary_op, pointer_diff, build_unary_op,
2784 check_for_casting_away_constness, build_static_cast,
2785 build_reinterpret_cast, build_const_cast, build_c_cast,
2786 build_modify_expr, get_delta_difference, build_ptrmemfunc,
2787 dubious_conversion_warnings, convert_for_assignment,
2788 convert_for_initialization,
2789 maybe_warn_about_returning_address_of_local, check_return_expr):
2792 * typeck2.c (error_not_base_type, readonly_error,
2793 abstract_virtuals_error, cxx_incomplete_type_diagnostic,
2794 store_init_value, digest_init, build_x_arrow,
2795 build_m_component_ref, require_complete_eh_spec_types): Likewise.
2797 * tree.c (cp_build_qualified_type_real,
2798 handle_java_interface_attribute, handle_init_priority_attribute):
2801 * semantics.c (finish_asm_stmt, finish_non_static_data_member,
2802 finish_pseudo_destructor_expr,
2803 check_template_template_default_arg, begin_class_definition,
2804 finish_base_specifier, qualified_name_lookup_error,
2805 finish_id_expression, finish_typeof): Likewise.
2807 * search.c (lookup_base, check_final_overrider,
2808 look_for_overrides_r): Likewise.
2810 * rtti.c (get_tinfo_decl, build_dynamic_cast_1): Likewise.
2812 2004-10-09 Mark Mitchell <mark@codesourcery.com>
2815 * error.c (dump_expr): Correct handling of AGGR_INIT_EXPRs using a
2819 * init.c (build_new): Correct comments.
2820 * parser.c (cp_parser_new_expression): Use NULL_TREE for nelts in
2824 * parser.c (cp_parser_postfix_dot_deref_expression): If the
2825 pseduo-destructor-name production does not work, fall back to the
2826 ordinary production.
2829 * tree.c (cp_tree_equal): Handle a BASELINK.
2832 * cp-tree.h (check_var_type): New function.
2833 * decl.c (check_var_type): New function, split out from ...
2834 (grokdeclarator): ... here.
2835 * pt.c (tsubst_decl): Use check_var_type.
2838 * decl.c (grokdeclarator): Disallow declarations of operators as
2841 2004-10-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2844 * error.c (dump_expr): Add missing case for RDIV_EXPR.
2846 2004-10-08 Kazu Hirata <kazu@cs.umass.edu>
2848 * pt.c, search.c: Fix comment typos.
2850 2004-10-08 Nathan Sidwell <nathan@codesourcery.com>
2852 * cp-tree.h (dfs_walk, dfs_walk_real, dfs_unmark, markedp,
2854 (dfs_skip_bases, dfs_walk_all, dfs_walk_once): New.
2855 * class.c (struct find_final_overrider_data): Remove most_derived,
2856 vpath_list and vpath fields. Add path field.
2857 (dfs_find_final_ocerrider_1): Add DEPTH parameter. Adjust.
2858 (dfs_find_final_overrider): Rename to ...
2859 (dfs_find_final_overrider_pre): ... here. Adjust.
2860 (dfs_find_final_overrider_post): Adjust.
2861 (dfs_find_final_overrider_q): Fold into
2862 dfs_find_final_overrider_pre.
2863 (find_final_overrider): Adjust dfs searching.
2864 (dfs_modify_vtables): Don't mark binfo here.
2865 (modify_all_vtables): Use dfs_walk_once.
2866 (build_vtt_inits): Likwise. Use dfs_walk_all.
2867 (dfs_build_secondary_vptr_vtt_inits): Don't mark binfo here.
2868 Return dfs_skip_bases as appropriate.
2869 (dfs_fixup_binfo_vtbls): Return dfs_skip_bases as appropriate.
2870 * init.c (dfs_initialized_vtbl_ptrs): Return dfs_skip_bases as
2871 appropriate. Don't mark binfo here.
2872 (initialize_vtbl_ptrs): Use dfs_walk_once.
2873 * search.c (struct vbase_info): Remove unused struct.
2874 (access_in_type): Use dfs_walk_once.
2875 (dfs_access_in_type): Don't mark binfo here.
2876 (dfs_accessible_queue_p, dfs_accessible_p) Remove.
2878 (accessible_r): ... here. New. Specialize dfs_walk_once.
2879 (accessible_p): Use accessible_r.
2880 (lookup_field_queue_p): Remove. Fold into ...
2881 (lookup_field_r): ... here. Adjust.
2882 (lookup_member): Use dfs_walk_all.
2883 (dfs_walk_real, dfs_walk): Replace with ...
2884 (dfs_walk_all, dfs_walk_once): ... these.
2885 (dfs_walk_once_r, dfs_unmark_r): Workers for dfs_walk_once.
2886 (dfs_unmark, unmarkedp, markedp): Remove.
2887 (dfs_get_pure_virtuals): Don't mark binfo here.
2888 (get_pure_virtuals): Use dfs_walk_once.
2889 (dfs_debug_unmarked_p): Remove. Fold into ...
2890 (dfs_debug_mark): ... here.
2891 (note_debug_info_needed): Use dfs_walk_all.
2893 2004-10-07 Andrew Pinski <pinskia@physics.uc.edu>
2895 * pt.c (tsubst_expr) <case ASM_EXPR>: Look passed the
2896 CLEANUP_POINT_EXPR to get the asm expression.
2898 2004-10-07 Mark Mitchell <mark@codesourcery.com>
2900 * cp-tree.h (ICS_USER_FLAG): Remove comment about obsolete flag.
2901 (DECL_MEMBER_TEMPLATE_P): New macro.
2902 (is_member_template): Remove.
2903 (class_method_index_for_fn): New function.
2904 * pt.c (build_over_call): Use DECL_MEMBER_TEMPLATE_P.
2905 * class.c (finish_struct_methods): Remove out-of-date comment.
2906 * decl.c (copy_fn_p): Use DECL_MBMER_TEMPLATE_P.
2907 * decl2.c (check_classfn): Use DECL_MEMBER_TEMPLATE_P and
2908 class_method_index_for_fn.
2909 * pt.c (is_member_template): Remove.
2910 (is_member_template_class): Likewise.
2911 (optimize_specialization_lookup_p): New function.
2912 (retrieve_specialization): Optimize lookups for members that are
2913 not member templates.
2914 (register_specialization): Adjust accordingly.
2915 (build_template_decl): Add member_template_p parameter. Set
2916 DECL_MEMBER_TEMPLATE_P.
2917 (process_partial_specialization): Adjust call to
2918 retrieve_specialization.
2919 (push_template_decl_real): Determine whether the template is a
2921 (lookup_template_class): Use retrieve_specialization.
2922 (tsubst_decl): Adjust call to retrieve_specialization.
2923 (tsubst_exception_specification): New function.
2925 (tsubst_copy): Use DECL_MEMBER_TEMPLATE_P.
2926 (instantiate_template): Adjust call to retrieve_specialization.
2927 (regenerate_decl_from_template): Do not actually generate a new
2929 (instantiate_decl): Adjust call to retrieve_specialization.
2930 (class_method_index_for_fn): New method.
2932 2004-10-07 Andrew Pinski <pinskia@physics.uc.edu>
2934 * parser.c (cp_parser_asm_definition): Look passed the
2935 CLEANUP_POINT_EXPR to get the asm expression.
2937 2004-10-06 Andrew Pinski <pinskia@physics.uc.edu>
2940 * semantics.c (finish_asm_stmt): Asm expressions need cleanup
2943 2004-10-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
2945 Convert diagnostics to use quoting flag q 6/n
2946 * pt.c (finish_member_template_decl, check_specialization_scope,
2947 maybe_process_partial_specialization, determine_specialization,
2948 check_explicit_specialization, maybe_check_template_type,
2949 process_partial_specialization, check_default_tmpl_args,
2950 push_template_decl_real, redeclare_class_template,
2951 convert_nontype_argument, coerce_template_parms,
2952 lookup_template_class, push_tinst_level,
2953 instantiate_class_template, tsubst_arg_types,
2954 tsubst_function_type, tsubst, tsubst_qualified_id,
2955 tsubst_copy_and_build, check_instantiated_args,
2956 do_decl_instantiation, do_type_instantiation,
2957 invalid_nontype_parm_type_p, check_specialization_namespace,
2958 convert_template_argument, determine_specialization,
2959 check_template_shadow, tsubst_decl
2960 instantiate_pending_templates): Use quoting marks.
2962 2004-10-05 Nathan Sidwell <nathan@codesourcery.com>
2965 * parser.c (cp_parser_postfix_expression): Inhibit Koenig when
2966 unqualified lookup finds a member function.
2968 2004-10-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
2970 Convert diagnostics to use quoting flag q 5/n
2971 * parser.c (cp_parser_name_lookup_error,
2972 cp_parser_diagnose_invalid_type_name,
2973 cp_parser_primary_expression, cp_parser_unqualified_id,
2974 cp_parser_nested_name_specifier_opt, cp_parser_labeled_statement,
2975 cp_parser_jump_statement, cp_parser_simple_declaration,
2976 cp_parser_decl_specifier_seq, cp_parser_mem_initializer_id,
2977 cp_parser_type_parameter, cp_parser_template_id,
2978 cp_parser_template_name, cp_parser_direct_declarator,
2979 cp_parser_parameter_declaration_list, cp_parser_class_head,
2980 cp_parser_base_specifier, cp_parser_lookup_name,
2981 cp_parser_late_parsing_default_args,
2982 cp_parser_optional_template_keyword
2983 cp_parser_elaborated_type_specifier, cp_parser_check_class_key,
2984 cp_parser_check_access_in_redeclaration): Use quoting marks.
2986 * name-lookup.c (supplement_binding, pushdecl,
2987 check_for_out_of_scope_variable, validate_nonmember_using_decl,
2988 do_nonmember_using_decl, lookup_tag, set_decl_namespace,
2989 push_namespace, do_namespace_alias, do_using_directive,
2990 ambiguous_decl, lookup_namespace_name, add_function): Likewise.
2992 * method.c (use_thunk): Likewise.
2994 * lex.c (unqualified_name_lookup_error,
2995 unqualified_fn_lookup_error): Likewise.
2997 2004-10-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
2999 Convert diagnostics to use quoting flag q 4/n
3000 * except.c (decl_is_java_type, build_throw,
3001 is_admissible_throw_operand, check_handlers_1, check_handlers):
3002 Use quoting formats.
3003 * friend.c (add_friend, make_friend_class, do_friend): Likewise.
3004 * init.c (sort_mem_initializers, emit_mem_initializers,
3005 member_init_ok_or_else, expand_member_init, is_aggr_type,
3006 build_offset_ref, build_java_class_ref): Likewise.
3008 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
3010 Convert diagnostics to use quoting flag q 3/n
3011 * decl.c (pop_label, duplicate_decls, redeclaration_error_message,
3012 redeclaration_error_message, lookup_label, check_goto,
3013 make_typename_type, make_unbound_class_template,
3014 fixup_anonymous_aggr, check_tag_decl, start_decl, start_decl_1,
3015 grok_reference_init, layout_var_decl, maybe_commonize_var,
3016 check_for_uninitialized_const_var, reshape_init_array,
3017 reshape_init, check_initializer, cp_finish_decl,
3018 member_function_or_else, bad_specifiers, grokfndecl, grokvardecl,
3019 check_static_variable_definition, compute_array_index_type,
3020 create_array_type_for_decl, check_special_function_return_type,
3021 grokdeclarator, check_default_argument, grokparms,
3022 grok_ctor_properties, grok_op_properties,
3023 check_elaborated_type_specifier, xref_tag, finish_enum,
3024 build_enumerator, check_function_type, start_preparsed_function,
3025 store_parm_decls): Use quoting formats.
3026 * decl2.c (grok_array_decl, delete_sanity, check_member_template,
3027 check_java_method, check_classfn, finish_static_data_member_decl,
3028 grokfield, grokbitfield, grok_function_init,
3029 build_anon_union_vars, coerce_new_type, coerce_delete_type,
3030 check_default_args): Likewise.
3031 * parser.c (cp_parser_decl_specifier_seq): Likewise.
3033 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
3035 Convert diagnostics to use quoting flag q 2/n
3036 * class.c (build_base_path, add_method, alter_access,
3037 handle_using_decl, check_bases,
3038 maybe_warn_about_overly_private_class, find_final_overrider,
3039 warn_hidden, finish_struct_anon, add_implicitly_declared_members,
3040 check_bitfield_decl, check_field_decls, layout_empty_base,
3041 build_base_field, check_methods, layout_virtual_bases,
3042 warn_about_ambiguous_bases, layout_class_type, finish_struct_1,
3043 resolve_address_of_overloaded_function, instantiate_type,
3044 note_name_declared_in_class): Use format flag "q" for quoting.
3046 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
3048 Convert diagnostics to use quoting flag q 1/n
3049 * error.c (locate_error): Ignore quoting flag q.
3050 * call.c (build_user_type_conversion_1, build_operator_new_call,
3051 build_object_call, op_error, build_conditional_expr,
3052 build_new_op, build_op_delete_call, enforce_access,
3053 convert_like_real, convert_arg_to_ellipsis, build_x_va_arg,
3054 convert_default_arg, build_over_call, build_new_method_call,
3055 joust, perform_implicit_conversion, initialize_reference): Use the
3058 2004-10-03 Andrew Pinski <pinskia@physics.uc.edu>
3061 * typeck.c (build_reinterpret_cast): Return if the inner type
3064 2004-10-01 Jan Hubicka <jh@suse.cz>
3066 * semantics.c (expand_body): Update call of tree_rest_of_compilation.
3068 2004-09-30 Nathan Sidwell <nathan@codesourcery.com>
3070 * cp-tree.h (struct lang_decl): Shrink by reordering fields and
3071 turning operator_code and fixed_offset into bitfields.
3073 2004-09-29 Joseph S. Myers <jsm@polyomino.org.uk>
3075 * decl.c (duplicate_decls): Merge TREE_DEPRECATED.
3077 2004-09-29 Jason Merrill <jason@redhat.com>
3079 PR tree-optimization/17697
3080 * decl.c (duplicate_decls): Copy TREE_NOTHROW from newdecl to olddecl.
3082 2004-09-28 Jason Merrill <jason@redhat.com>
3085 * class.c (build_base_field): Set TYPE_MODE.
3087 2004-09-28 Roger Sayle <roger@eyesopen.com>
3090 * g++spec.c (lang_specific_driver): Unrecognized libraries, other
3091 than -lc and -lm, may require linking against libstc++.
3093 2004-09-28 Kazu Hirata <kazu@cs.umass.edu>
3095 * tree.c: Fix a comment typo.
3097 2004-09-28 Nathan Sidwell <nathan@codesourcery.com>
3099 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): Remove.
3100 (struct secondary_vptr_vtt_init_data_s): New.
3101 (build_vtt_inits): Adjust dfs_walkers.
3102 (dfs_build_secondary_vptr_vtt_inits): Caller data is a
3103 secondary_vptr_vtt_init_data_s structure. Adjust.
3104 (dfs_ctor_vtable_bases_queue_p): Remove.
3105 (dfs_fixup_binfo_vtbls): No need to clear BINFO_MARKED. Simplify.
3107 * pt.c (struct get_template_base_data_s): Remove.
3108 (get_template_base_r): Fold into get_template_base.
3109 (get_template_base): Walk base binfos directly in inheritance
3112 2004-09-27 Mark Mitchell <mark@codesourcery.com>
3115 * cp-tree.h (fold_if_not_in_template): New function.
3116 * call.c (build_conditional_expr): Use fold_if_not_in_template.
3117 (build_cxx_call): Likewise.
3118 * cvt.c (convert_to_complex): Likewise.
3119 (ocp_convert): Likewise.
3120 (convert): Likewise.
3121 (convert_force): Likewise.
3122 * decl.c (compute_array_index_type): Clear
3123 processing_template_decl while folding array bounds.
3124 * pt.c (convert_nontype_argument): Clear
3125 processing_template_decl while processing non-type argument
3127 * tree.c (fold_if_not_in_template): New function.
3128 * typeck.c (build_class_member_access_expr): Use
3129 fold_if_not_in_template.
3130 (build_array_ref): Likewise.
3131 (build_binary_op): Likewise. Do not try to optimize computations
3132 when processing templates.
3133 (cp_pointer_int_sum): Use fold_if_not_in_template.
3134 (pointer_diff): Likewise.
3135 (build_unary_op): Likewise.
3136 (build_reinterpret_cast): Likewise.
3137 (get_delta_difference): Likewise.
3138 (expand_ptrmemfunc_cst): Likewise.
3139 (dubious_conversion_warnings): Likewise.
3141 2004-09-27 Matt Austern <austern@apple.com>
3143 * cp/parser.c (struct cp_token): New one-bit field , implicit_extern_c
3144 (cp_lexer_get_preprocessor_token): Set implicit_extern_c for
3145 tokens that come from headers that are implicitly extern "C".
3146 (struct cp_parser): new one-bit field, implicit_extern_c.
3147 (cp_parser_new): Set parser's implicit_extern_c to false.
3148 (cp_parser_translation_unit): Pop lang context if we were in a
3149 header that was implicitly extern "C".
3150 (cp_parser_declaration_seq_opt): Push/pop lang context as
3151 required by the token's and parser's implicit_extern_c.
3153 2004-09-27 Mark Mitchell <mark@codesourcery.com>
3156 * cp-tree.h (shared_member_p): Declare.
3157 * search.c (shared_member_p): Give it external linkage.
3158 * semantics.c (finish_qualified_id_expr): Use it.
3159 (finish_id_expression): Likewise.
3162 * semantics.c (finish_id_expression): Do not add "this->" to
3163 static member functions.
3165 2004-09-27 Nathan Sidwell <nathan@codesourcery.com>
3168 * error.c (dump_type): Change TREE_VEC case into TREE_BINFO.
3170 * class.c (struct count_depth_data): Remove.
3171 (dfs_depth_post, dfs_depth_q): Remove.
3172 (find_final_overrider): Use number of vbase classes as depth
3175 * cp-tree.h (types_overlap_p): Remove.
3176 * search.c (struct overlap_info): Remove.
3177 (dfs_check_overlap, dfs_no_overlap_yet, types_overlap_p): Remove.
3179 * pt.c (GTB_VIA_VIRTUAL, GTB_IGNORE_TYPE): Remove.
3180 (get_template_base_recursive): Remove. Replace with ...
3181 (get_template_base_r): ... this.
3182 (struct get_template_base_data_s): New.
3183 (get_template_base): Use get_template_base_r via dfs_walk. Always
3184 return NULL on failure.
3185 (unify): Remove error_mark_node check from get_template_base result.
3187 2004-09-24 Paolo Bonzini <bonzini@gnu.org>
3189 * parser.c (cp_parser_expression_stack): Clarify why it is
3190 an array of NUM_PREC_VALUES elements.
3191 (cp_parser_binary_expression): Clarify why we do not need to
3192 handle stack overflow.
3194 2004-09-24 Nathan Sidwell <nathan@codesourcery.com>
3197 * search.c (lookup_field_queue_p): Correct check for hidden base.
3199 * search.c (bfs_walk): Remove.
3200 (lookup_member): Use dfs_walk_real.
3201 (dfs_walk_real): Move and adjust documentation from bfs_walk.
3203 2004-09-23 Zack Weinberg <zack@codesourcery.com>
3205 * decl.c (grokfndecl): If ::main is found not to return int,
3206 correct it after issuing a diagnostic.
3207 (grokdeclarator): If the incoming type was error_mark_node, do
3208 not complain about declaring something with no type.
3209 (start_function): Change check for ::main not returning int to
3210 an assertion, as grokfndecl now catches this when the user did it.
3211 * init.c (perform_member_init, sort_mem_initializers)
3212 (emit_mem_initializers): Make most diagnostics be issued on
3213 the line of current_function_decl, not whatever the current
3215 * parser.c (cp_lexer_peek_token_emit_debug_info): Surround
3216 definition and declaration with #ifdef ENABLE_CHECKING.
3217 Avoid unnecessary use of fprintf.
3218 (cp_lexer_print_token, cp_lexer_debug_stream): Adjust stub
3219 definitions to avoid warnings.
3220 (cp_lexer_new_main): Add assertion that first token is not a
3222 (cp_lexer_new_from_token_array): Fold into ...
3223 (cp_lexer_new_from_tokens): ... here. Add assertion that
3224 first token is not a padding token.
3225 (cp_lexer_set_source_position_from_token): Move nearer to callers.
3226 Remove unused lexer argument.
3227 (cp_lexer_peek_token): Just print debugging report (if enabled)
3228 and return lexer->next_token.
3229 (cp_lexer_skip_purged_tokens): Delete.
3230 (cp_lexer_next_token_is, cp_lexer_next_token_is_not): Make
3231 inline, simplify bodies.
3232 (cp_lexer_peek_nth_token): Add debugging report a la
3233 cp_lexer_peek_token.
3234 (cp_lexer_consume_token): Correct commentary. Advance over
3235 purged tokens here. Set current source position here, from
3236 token to be returned. Avoid unnecessary use of fprintf.
3237 (cp_lexer_purge_token): Advance next_token pointer over this and
3238 subsequent purged tokens.
3239 (cp_parser_error): Adjust source position to that of the
3241 (cp_parser_push_lexer_for_tokens, cp_parser_pop_lexer): New functions.
3242 (cp_parser_string_literal): Remove some excessive cleverness.
3243 (cp_parser_enum_specifier): Call start_enum before consuming
3245 (cp_parser_member_declaration): Make the "extra semicolon"
3246 diagnostic consistently-worded with the other place this is
3247 diagnosed. Explicitly set the diagnostic location to the
3248 location of the offending semicolon.
3249 (cp_parser_enclosed_template_argument_list): Use %</%> quoting
3250 in diagnostics. Do not use cp_parser_require. Set location
3251 of diagnostics about improper use of '>>' to location of
3253 (cp_parser_late_parsing_for_member):
3254 Use cp_parser_push_lexer_for_tokens and cp_parser_pop_lexer.
3255 (cp_parser_late_parsing_default_args): Likewise. Manually
3256 move some logic outside the loop.
3258 2004-09-23 Andrew Pinski <pinskia@physics.uc.edu>
3261 * cvt.c (cp_convert_to_pointer): Return early when the type is
3264 2004-09-21 Fariborz Jahanian <fjahanian@apple.com>
3268 * decl.c (grokfndecl): Add new argument "attrlist", use it
3269 to call cplus_decl_attributes.
3270 (start_function): Remove call to cplus_decl_attributes.
3271 * cvt.c (ocp_convert): Add support to use type conversion
3272 function to vector type.
3273 * parser.c (cp_parser_conversion_type_id): Add attributes, if any,
3276 2004-09-23 Paolo Bonzini <bonzini@gnu.org>
3280 * parser.c (cp_parser_token_tree_map_node,
3281 cp_parser_pm_expression, cp_parser_additive_expression,
3282 cp_parser_multiplicative_expression, cp_parser_shift_expression,
3283 cp_parser_relational_expression, cp_parser_equality_expression,
3284 cp_parser_and_expression, cp_parser_exclusive_or_expression,
3285 cp_parser_inclusive_or_expression,
3286 cp_parser_logical_and_expression,
3287 cp_parser_logical_or_expression): Removed.
3288 (enum cp_parser_prec, struct cp_parser_token_tree_map_node,
3289 binops, binops_by_token): New.
3290 (cp_parser_assignment_expression): Use cp_parser_binary_expression.
3291 (cp_parser_new): Initialize binops_by_token.
3292 (cp_parser_binary_expression): Rewritten.
3295 2004-09-23 Kazu Hirata <kazu@cs.umass.edu>
3297 * parser.c: Fix a comment typo.
3299 2004-09-23 Nathan Sidwell <nathan@codesourcery.com>
3302 * decl.c (xref_basetypes): Look through typedefs before checking
3305 2004-09-22 Nathan Sidwell <nathan@codesourcery.com>
3307 * cp-tree.h (unemitted_tinfo_decls): Make a VEC(tree).
3308 * decl2.c (cp_finish_file): Adjust tinfo decl emission loop.
3309 * rtti.c (unemitted_tinfo_decls): Make a VEC(tree).
3310 (init_rtti_processing): Initialize it to something realistic.
3311 (get_tinfo_decl): Adjust pushing the new decl.
3313 * cp-tree.h (struct lang_type_class): Remove marked flags, add
3314 diamond_shaped and repeated_base flags. Reorder to keep 8-bit blocks.
3315 (TYPE_MARKED_P): New.
3316 (CLASSTYPE_DIAMOND_SHAPED_P, CLASSTYPE_REPEATED_BASE_P): New.
3317 (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
3318 CLEAR_CLASSTYPE_MARKED_N): Remove.
3319 (CLASSTYPE_MARKED_*, SET_CLASSTYPE_MARKED_*,
3320 CLEAR_CLASSTYPE_MARKED_*): Remove.
3321 * decl.c (xref_basetypes): Use TYPE_MARKED_P. Determine diamond
3322 shaped and repeated base properties.
3323 * lex.c (cxx_make_type): Don't clear TYPE_ALIAS_SET.
3324 * rtti.c (dfs_class_hint_mark, dfs_class_hint_unmark,
3325 class_hint_flags): Remove.
3326 (get_pseudo_ti_init): Use CLASSTYPE_REPEATED_BASE_P and
3327 CLASSTYPE_DIAMOND_SHAPED_P.
3329 2004-09-21 Ziemowit Laski <zlaski@apple.com>
3331 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved here from
3333 (objcp_tsubst_copy_and_build): Reformat function signature.
3334 * cp-objcp-common.h (objcp_tsubst_copy_and_build): Likewise.
3335 (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved to cp-lang.c.
3337 2004-09-21 Zack Weinberg <zack@codesourcery.com>
3339 * parser.c (cp_lexer_peek_token, cp_lexer_consume_token):
3340 Don't handle CPP_PRAGMA tokens specially.
3341 (cp_lexer_handle_pragma): Use cp_lexer_consume_token. Don't
3342 purge the token; do clear token->value after processing. Add
3343 assertion at beginning that token->value is nonzero.
3344 (cp_parser_statement, cp_parser_declaration_seq_opt): Handle
3345 CPP_PRAGMA as a full statement or declaration in its own right.
3347 2004-09-21 Matt Austern <austern@apple.com>
3350 * decl.c (grokvardecl): Accept declarations of global variables
3351 using anonymous types.
3353 2004-09-21 Roger Sayle <roger@eyesopen.com>
3356 * tree.c (lvalue_p_1): Disallow MIN_EXPR and MAX_EXPR as lvalues
3357 if either operand has side-effects.
3358 * typeck.c (rationalize_conditional_expr): Assert that neither
3359 operand of MIN_EXPR or MAX_EXPR has side-effects.
3360 (build_modify_expr): Add support for MIN_EXPR and MAX_EXPR.
3361 Check that the "lhs" is a valid lvalue, i.e. that neither operand
3362 of a MIN_EXPR or MAX_EXPR has a side-effect.
3364 2004-09-21 Nathan Sidwell <nathan@codesourcery.com>
3366 * cp-tree.h (struct lang_type_header): Remove
3367 uses_multiple_inheritance field.
3368 (TYPE_USES_MULTIPLE_INHERITANCE): Remove.
3369 (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): Remove.
3370 (TYPE_USES_VIRTUAL_BASECLASSES): Remove.
3371 (DECL_NEEDS_VTT_PARM_P): Use CLASSTYPE_VBASECLASSES.
3372 (TYPE_CONTAINS_VPTR_P): Likewise.
3373 * call.c (add_template_candidate_real): Use
3374 CLASSTYPE_VBASECLASSES.
3375 (build_special_member_call): Likewise.
3376 * class.c (finish_struct_bits): Remove
3377 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P & TYPE_USES_VIRTUAL_BASECLASSES
3379 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
3380 (create_vtable_ptr): Remove TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P
3382 (build_vtt_inits): Use CLASSTYPE_VBASECLASSES.
3383 (accumulate_vtbl_inits, build_vbase_offset_vtbl_entries):
3385 * decl.c (xref_basetypes): Remove TYPE_USES_MULTIPLE_INHERITANCE,
3386 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
3388 (cxx_maybe_build_cleanup): Use CLASSTYPE_VBASECLASSES.
3389 * decl2.c (maybe_retrofit_in_chrg): Likewise.
3390 * init.c (expand_member, push_base_cleanups): Likewise.
3391 * pt.c (instantiate_class_template): Remove
3392 TYPE_USES_MULTIPLE_INHERITANCE,
3393 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
3395 * ptree.c (cxx_print_type): Remove TYPE_USES_MULTIPLE_INHERITANCE
3397 * typeck2.c (process_init_constructor): Replace some sorrys with
3400 2004-09-21 Andreas Tobler <a.tobler@schweiz.ch>
3402 * decl.c (reshape_init_array): Initialize max_index_cst to fix
3405 2004-09-20 Mark Mitchell <mark@codesourcery.com>
3408 * pt.c (tsubst): Fix parentheses to accomodate emacs.
3409 (tsubst_baselink): If we get a single function, mark it as used.
3411 2004-09-20 Matt Austern <austern@apple.com>
3412 Zack Weinberg <zack@codesourcery.com>
3414 * decl.c (make_rtl_for_nonlocal_decl, start_preparsed_function):
3415 Apply lbasename to input_filename before passing to get_fileinfo.
3416 * semantics.c (begin_class_definition): Likewise.
3417 * lex.c (handle_pragma_interface): Apply get_fileinfo to the
3418 correct filename. Rename variables to be less confusing.
3419 (handle_pragma_implementation): Likewise. Disable "appears
3420 after file is included" diagnostic.
3422 * parser.c (struct cp_token): Add in_system_header fiag.
3423 (CP_TOKEN_BLOCK_NUM_TOKENS, struct cp_token_block)
3424 (CP_TOKEN_BUFFER_SIZE, cp_token_cache_push_token)
3425 (CPP_NONE, cp_lexer_read_token): Delete.
3426 (struct cp_lexer): Remove first_token, string_tokens,
3427 main_lexer_p fields. Clarify comments.
3428 (struct cp_token_cache): Now just a pair of pointers.
3429 (CP_LEXER_BUFFER_SIZE): New #define.
3430 (CPP_PURGED): New fake token type.
3431 (cp_lexer_new_from_token_array, cp_lexer_destroy)
3432 (cp_lexer_peek_token_emit_debug_info, cp_lexer_skip_purged_tokens)
3433 (cp_lexer_handle_pragma, cp_token_cache_new, cp_parser_string_literal):
3435 (cp_lexer_new_from_tokens): Now a simple wrapper around
3436 cp_lexer_new_from_token_array.
3437 (cp_lexer_set_source_position_from_token): Also update
3439 (cp_lexer_next_token, cp_lexer_prev_token, cp_lexer_advance_token):
3441 (cp_lexer_token_difference): Dont handle wrapping round.
3442 (cp_lexer_new_main): Enable pragma deferral and raw strings,
3443 read the entire translation unit through c_lex_with_flags into
3444 this lexer's buffer, then turn raw strings back off again.
3445 (cp_lexer_grow_buffer): Adjust for buffer no longer being circular.
3446 (cp_lexer_get_preprocessor_token): No need to handle not being
3447 the main lexer. Set token->in_system_header too.
3448 (cp_lexer_peek_token): Skip purged tokens. Feed pragma tokens
3449 to cp_lexer_handle_pragma. No need to call cp_lexer_read_token.
3450 (cp_lexer_peek_nth_token): Likewise.
3451 (cp_lexer_purge_token): Mark the token PURGED, don't shift all
3452 the other tokens down.
3453 (cp_lexer_purge_tokens_after): Likewise.
3454 (cp_lexer_save_tokens, cp_lexer_rollback_tokens): Don't worry
3455 about there being no tokens.
3456 (cp_lexer_print_token): Revise to give useful information on
3458 (struct cp_parser): Add field translate_strings_p.
3459 (cp_parser_new): Initialize it.
3460 (cp_parser_translation_unit): Destroy the lexer when done.
3461 (cp_parser_parameter_declaration): Restructure saving of
3463 (cp_parser_save_member_function_body): Likewise.
3464 (cp_parser_check_for_invalid_template_id)
3465 (cp_parser_nested_name_specifier_opt, cp_parser_template_id):
3466 Adjust calls to cp_lexer_advance_token.
3467 (cp_parser_skip_to_closing_parenthesis, cp_parser_declaration):
3468 No need to fiddle c_lex_string_translate.
3469 (cp_parser_primary_expression, cp_parser_linkage_specification)
3470 (cp_parser_asm_definition, cp_parser_asm_specification_opt)
3471 (cp_parser_asm_operand_list, cp_parser_asm_clobber_list)
3472 Use cp_parser_string_literal.
3473 (cp_parser_attribute_list): Save and restore
3474 parser->translate_strings_p, not c_lex_string_translate.
3475 (cp_parser_cache_group): Delete.
3476 (cp_parser_cache_group_1): Rename cp_parser_cache_group. Do
3477 not take a cache argument.
3479 2004-09-20 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3482 * decl.c (reshape_init): Extract array handling into...
3483 (reshape_init_array): New function. Use integers instead of trees
3484 for indices. Handle out-of-range designated initializers.
3486 2004-09-20 Steven Bosscher <stevenb@suse.de>
3488 * lex.c (cxx_init): Don't set the ridpointer for RID_NULL
3491 2004-09-19 Mark Mitchell <mark@codesourcery.com>
3493 * decl2.c (determine_visibility): Allow class visibility
3494 directives to override targetm.cxx.export_class_data.
3496 2004-09-18 Kazu Hirata <kazu@cs.umass.edu>
3498 * call.c, semantics.c: Follow spelling conventions.
3499 * class.c: Fix a comment typo.
3501 2004-09-16 Geoffrey Keating <geoffk@apple.com>
3504 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
3505 (handle_pragma_implementation): Likewise.
3507 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
3508 Zack Weinberg <zack@codesourcery.com>
3510 * cp-tree.def: Use tree_code_class enumeration constants
3511 instead of code letters.
3512 * call.c, class.c, cp-gimplify.c, cp-lang.c, cxx-pretty-print.c
3513 * mangle.c, pt.c, semantics.c, tree.c, typeck.c:
3514 Update for new tree-class enumeration constants.
3516 2004-09-16 Mark Mitchell <mark@codesourcery.com>
3519 * parser.c (cp_parser_simple_declaration): Commit to tentative
3520 parses after seeing a decl-specifier.
3521 (cp_parser_simple_declaration): Eliminate spurious message.
3522 (cp_parser_init_declarator): Adjust error message.
3525 * lex.c (unqualified_name_lookup_error): Mark the dummy
3526 declaration as used.
3529 * parser.c (cp_parser_nested_name_specifier): Do not resolve
3530 typename types if the user explicitly said "typename".
3532 2004-09-16 Andrew MacLeod <amacleod@redhat.com>
3534 * error.c (dump_decl): Make sure there is lang_specific info before
3535 checking for DTOR and CTOR decls.
3537 2004-09-16 Nathan Sidwell <nathan@codesourcery.com>
3539 * class.c (copy_virtuals): Remove.
3540 (build_primary_vtable): Use copy_list directly.
3541 (build_secondary_vtable): Likewise.
3542 (update_vtable_entry_for_fn): Clear BV_CALL_INDEX here.
3543 (create_vtable_ptr): Likewise.
3545 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
3547 * search.c: Follow spelling conventions.
3549 2004-09-16 Nathan Sidwell <nathan@codesourcery.com>
3551 * cp-tree.h (struct lang_type_class): Make pure_virtuals a
3553 (CLASSTYPE_INLINE_FRIENDS, CLASSTYPE_PURE_VIRTUALS): Update
3555 * call.c (build_new_method_call): Don't confirm a pure virtual is
3556 in CLASSTYPE_PURE_VIRTUALS. Reorder checks. Make it a warning.
3557 * class.c (check_methods): CLASSTYPE_INLINE_FRIENDS is a VEC(tree).
3558 (fixup_inline_methods, finish_struct): Likewise.
3559 * decl.c (finish_method): Likewise.
3560 * search.c (dfs_get_pure_virtuals, get_pure_virtuals):
3561 CLASSTYPE_PURE_VIRTUALS is a VEC(tree).
3562 * typeck2.c (abstract_virtuals_error): Likewise. Truncate the
3563 vector to avoid repeating the list in error messages.
3565 2004-09-15 Mark Mitchell <mark@codesourcery.com>
3567 * cp-objcp-common.h (LANG_HOOKS_COMDAT_GROUP): Define.
3568 * cp-tree.h (cxx_comdat_group): Declare.
3569 * decl.c (cxx_comdat_group): New function.
3571 2004-09-15 Nathan Sidwell <nathan@codesourcery.com>
3573 * search.c (get_pure_virtuals): Remove unused variables.
3575 * cp-tree.h (struct lang_decl_flags): Remove
3576 needs_final_overrider.
3577 (DECL_NEEDS_FINAL_OVERRIDER_P): Remove.
3578 * decl.c (duplicate_decls): Do not copy DECL_NEEDS_FINAL_OVERRIDER_P.
3579 * class.c (finish_struct_bits): Correct comment about
3580 CLASSTYPE_PURE_VIRTUALS.
3581 * search.c (get_pure_virtuals): Remove useless loop.
3583 2004-09-14 Mark Mitchell <mark@codesourcery.com>
3586 * mangle.c (partially_mangled_name): New variable.
3587 (partially_mangled_name_len): Likewise.
3588 (save_partially_mangled_name): New function.
3589 (restore_partially_mangled_name): Likewise.
3590 (write_encoding): Save and restore partially mangled names around
3591 calls to get_mostly_instantiated_function_type.
3592 (write_unqualified_name): Likewise.
3594 2004-09-14 Nathan Sidwell <nathan@codesourcery.com>
3596 * pt.c (unify): Replace gcc_unreachable with gcc_assert.
3598 2004-09-13 Mark Mitchell <mark@codesourcery.com>
3601 * parser.c (cp_parser_id_expression): Correct value for
3603 (cp_parser_nested_name_specifier_opt): Look through typenames as
3605 (cp_parser_template_name): Honor check_dependency_p.
3608 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name):
3612 * pt.c (unify): Add ENUMERAL_TYPE case. Replace sorry with
3615 2004-09-12 Richard Henderson <rth@redhat.com>
3618 * semantics.c (maybe_cleanup_point_expr): Don't call fold.
3619 * typeck.c (condition_conversion): Likewise.
3621 2004-09-11 Richard Henderson <rth@redhat.com>
3624 * pt.c (cur_stmt_expr): Move from tsubst_expr.
3625 (tsubst_expr) <case STMT_EXPR>: Move ...
3626 (tsubst_copy_and_build): ... here.
3628 2004-09-10 Zack Weinberg <zack@codesourcery.com>
3630 * cp-tree.h (interface_only, interface_unknown): Delete declarations;
3631 comment explaining them moved to c-common.h.
3632 * lex.c (interface_only, interface_unknown, extract_interface_info):
3634 (cxx_finish): Don't reset interface_unknown.
3635 (handle_pragma_interface): Don't set interface_only and
3636 interface_unknown; just the like-named fields in finfo.
3637 (handle_pragma_implementation): Adjust comment.
3638 * decl2.c (cp_finish_file): Don't reset interface_only and
3640 * method.c (synthesize_method): Don't reset interface_unknown or
3641 call extract_interface_info.
3642 * pt.c (pop_tinst_level): Don't call extract_interface_info.
3643 * decl.c (start_cleanup_fn): Don't save or restore interface_only
3644 and interface_unknown.
3645 (make_rtl_for_nonlocal_decl): Call get_fileinfo on input_filename
3646 and use the result instead of the interface_only/interface_unknown
3648 (start_preparsed_function): Likewise.
3649 * lex.c (cxx_make_type): Likewise.
3650 * semantics.c (begin_class_definition): Likewise.
3651 (expand_body): Don't call extract_interface_info.
3653 2004-09-10 Ziemowit Laski <zlaski@apple.com>
3655 * decl.c (objc_mark_locals_volatile): Make description of
3656 routine more descriptive; only mark VAR_DECLs at each
3659 2004-09-10 Richard Henderson <rth@redhat.com>
3662 * call.c (build_vfield_ref): Move...
3663 * class.c (build_vfield_ref): ... here. Convert datum to the
3664 primary base containing the vptr.
3665 (make_new_vtable): Simplify build_primary_vtable arguments.
3666 (finish_struct_1): Do not duplicate TYPE_VFIELD.
3667 * typeck.c (build_class_member_access_expr): Don't warn for
3668 null object access to base fields.
3670 2004-09-10 Ziemowit Laski <zlaski@apple.com>
3672 * decl.c (objc_get_current_scope, objc_mark_locals_volatile):
3673 New functions, to be called from ObjC++.
3675 2004-09-10 Kazu Hirata <kazu@cs.umass.edu>
3677 * class.c, cp-tree.h, decl.c, decl2.c, mangle.c,
3678 name-lookup.h, parser.c, search.c, semantics.c, typeck2.c: Fix
3681 2004-09-09 Ziemowit Laski <zlaski@apple.com>
3683 * typeck.c (build_c_cast): Preserve the cast if casting
3684 to and from an Objective-C type.
3686 2004-09-09 Ziemowit Laski <zlaski@apple.com>
3688 * Make-lang.in (cp/typeck.o): Depend on c-common.h.
3689 * typeck.c: Include c-common.h.
3690 (comptypes): For RECORD_TYPEs, call objc_comptypes() and
3691 return the result if nonnegative.
3693 2004-09-09 Zack Weinberg <zack@codesourcery.com>
3695 * decl2.c (import_export_class)
3696 * lex.c (handle_pragma_interface):
3697 Test MULTIPLE_SYMBOL_SPACES with if, not #ifdef.
3699 2004-09-08 Ziemowit Laski <zlaski@apple.com>
3701 * Make-lang.in (cp/semantics.o): Depend on c-common.h.
3702 * semantics.c: Include c-common.h.
3703 (finish_compound_stmt): Call objc_clear_super_receiver().
3705 2004-09-08 Ziemowit Laski <zlaski@apple.com>
3707 * cp-tree.h (do_poplevel): New prototype.
3708 * semantics.c (do_poplevel): Make externally visible.
3710 2004-09-08 Nathan Sidwell <nathan@codesourcery.com>
3712 * cp-tree.h (tree_pair_s): Define a GC'd vector.
3713 * name-lookup.h (cxx_saved_binding, cp_class_binding): Likewise.
3714 * semantics.c (deferred_access): Likewise.
3716 2004-09-06 Daniel Jacobowitz <dan@debian.org>
3718 * semantics.c (expand_body): Assert that we are not nested.
3720 2004-09-06 Zack Weinberg <zack@codesourcery.com>
3722 * decl.c (build_enumerator): Use add_double and int_fits_type_p
3723 instead of cp_build_binary_op, to avoid creating short-lived trees.
3724 * parser.c (cp_parse_type_specifier <RID_ENUM>): Use two-token
3725 lookahead instead of backtracking. Move some code to avoid a
3727 (cp_parser_enum_specifier): Avoid duplication of effort with caller.
3728 Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
3729 (cp_parser_enumerator_list, cp_parser_enumerator_definition):
3730 Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
3732 2004-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3734 * decl.c (grok_declarator): Remove a redundant semicolon.
3736 * parser.c (cp_parser_decl_specifier_seq, cp_parser_type_specifier):
3737 Correct comments describing function parameters.
3739 2004-09-03 Matt Austern <austern@apple.com>
3740 Compile speed improvement.
3741 * parser.c (cp_lexer_print_token): Only define if ENABLE_CHECKING set.
3742 Otherwise define a stub macro that expands to nothing.
3743 (cp_lexer_debugging_p): Only define if ENABLE_CHECKING set. Otherwise
3744 define a stub macro that expands to 0.
3745 (cp_lexer_start_debugging): Only define if ENABLE_CHECKING set.
3746 (cp_lexer_stop_debugging): Likewise.
3747 (cp_lexer_debug_stream): Only define if ENABLE_CHECKING set. Otherwise
3748 define a stub macro that expands to NULL.
3749 (cp_lexer_new_main): Only set debugging_p if ENABLE_CHECKING set.
3750 (cp_lexer_new_from_tokens): Likewise.
3752 2004-09-03 Jan Hubicka <jh@suse.cz>
3754 * decl.c (finish_function): Clean out pointers we no longer need.
3756 2004-09-03 Jan Beulich <jbeulich@novell.com>
3758 * g++spec.c (MATH_LIBRARY_PROFILE): Default to MATH_LIBRARY rather
3761 2004-09-02 Paul Brook <paul@codesourcery.com>
3763 * decl2.c (determine_visibility): Only check data visibility
3766 2004-08-31 Mark Mitchell <mark@codesourcery.com>
3768 * cp-tree.h (DECL_CONSTRUCTION_VTABLE_P): New macro.
3769 * class.c (build_ctor_vtbl_group): Set DECL_CONSTRUCTION_VTABLE_P.
3770 * decl2.c (determine_visibility): Honor
3771 TARGET_CXX_EXPORT_CLASS_DATA.
3773 * class.c (key_method): Rename to ...
3774 (determine_key_method): ... this.
3775 (finish_struct_1): Adjust accordingly.
3776 * cp-tree.h (key_method): Declare.
3777 * decl2.c (maybe_emit_vtables): Determine the key method here if
3778 it has not already been done.
3780 2004-08-31 Ziemowit Laski <zlaski@apple.com>
3782 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-objcp-common.o.
3783 (cp/cp-lang.o): Depend on debug.h, gtype-cp.h and cp/cp-objcp-common.h.
3784 (cp/cp-decl.c): Do not depend on gtype-cp.h.
3785 (cp/cp-objcp-common.o): New target.
3786 * cp-lang.c: Include debug.h, cp-objcp-common.h and gtype-cp.h.
3787 (cxx_get_alias_set, cxx_warn_unused_global_decl, cp_expr_size,
3788 cp_tree_size, cp_var_mod_type_p, cxx_initialize_diagnostics): Move
3789 prototypes and definitions to cp-objcp-common.h and cp-objcp-common.c,
3791 (LANG_HOOKS_TREE_SIZE, LANG_HOOKS_FINISH,
3792 LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_INIT_OPTIONS,
3793 LANG_HOOKS_INITIALIZE_DIAGNOSTICS, LANG_HOOKS_HANDLE_OPTION,
3794 LANG_HOOKS_HANDLE_FILENAME, LANG_HOOKS_MISSING_ARGUMENT,
3795 LANG_HOOKS_POST_OPTIONS, LANG_HOOKS_GET_ALIAS_SET,
3796 LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_EXPAND_EXPR,
3797 LANG_HOOKS_EXPAND_DECL, LANG_HOOKS_PARSE_FILE,
3798 LANG_HOOKS_DUP_LANG_SPECIFIC_DECL, LANG_HOOKS_TRUTHVALUE_CONVERSION,
3799 LANG_HOOKS_SET_DECL_ASSEMBLER_NAME, LANG_HOOKS_MARK_ADDRESSABLE,
3800 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
3801 LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
3802 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_PRINT_ERROR_FUNCTION,
3803 LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL, LANG_HOOKS_WRITE_GLOBALS,
3804 LANG_HOOKS_FUNCTION_INIT, LANG_HOOKS_FUNCTION_FINAL,
3805 LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P,
3806 LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE,
3807 LANG_HOOKS_ATTRIBUTE_TABLE, LANG_HOOKS_TREE_INLINING_WALK_SUBTREES,
3808 LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN,
3809 LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS,
3810 LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P,
3811 LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P,
3812 LANG_HOOKS_TREE_INLINING_VAR_MOD_TYPE_P,
3813 LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN,
3814 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN, LANG_HOOKS_EXPR_SIZE,
3815 LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR,
3816 LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, LANG_HOOKS_MAKE_TYPE,
3817 LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE,
3818 LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
3819 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE, LANG_HOOKS_INCOMPLETE_TYPE_ERROR,
3820 LANG_HOOKS_TYPE_PROMOTES_TO, LANG_HOOKS_REGISTER_BUILTIN_TYPE,
3821 LANG_HOOKS_GIMPLIFY_EXPR, LANG_HOOKS_FOLD_OBJ_TYPE_REF): Move
3822 hooks to cp-objcp-common.h.
3823 (finish_file): New function.
3824 * cp-objcp-common.c: New file.
3825 * cp-objcp-common.h: New file.
3826 * cp-tree.h (cp_finish_file): New prototype.
3827 * decl.c: Do not include gtype-cp.h.
3828 * decl2.c (finish_file): Rename to cp_finish_file.
3830 2004-08-31 Richard Henderson <rth@redhat.com>
3833 * pt.c (tsubst_expr): Move OFFSETOF_EXPR handling ...
3834 (tsubst_copy_and_build): ... here.
3836 2004-08-30 Mark Mitchell <mark@codesourcery.com>
3838 * cp-tree.h (initialize_artificial_var): Declare.
3839 * decl.c (initialize_artifical_var): New function.
3840 * class.c (initialize_array): Remove.
3841 (initialize_vtable): Use initialize_artificial_var.
3842 (build_vtt): Likewise.
3843 (build_ctor_vtbl_group): Likewise.
3845 2004-08-30 Richard Henderson <rth@redhat.com>
3847 * class.c (build_base_path): Use build_address directly.
3848 * typeck.c (build_unary_op): Don't lower &a.b to pointer
3849 arithmetic directly.
3850 * typeck2.c (store_init_value): Don't assume !TREE_CONSTANT
3851 means !initializer_constant_valid_p.
3853 2004-08-30 Richard Henderson <rth@redhat.com>
3855 * class.c (fixed_type_or_null): Use get_base_address before
3856 assuming an ADDR_EXPR is non-null.
3858 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
3860 * name-lookup.c (pop_binding, pushdecl,
3861 set_identifier_type_value_with_scope, push_overloaded_decl,
3862 arg_assoc_type): Replace abort with gcc_assert or gcc_unreachable.
3863 * parser.c (cp_parser_diagnose_invalid_type_name,
3864 cp_parser_postfix_expression, cp_parser_unary_expression,
3865 cp_parser_check_declarator_template_para): Likewise.
3866 * pt.c (push_inline_template_parms_recursive,
3867 check_explicit_specialization, convert_nontype_argument,
3868 coerce_template_template_parms, uses_template_parms,
3869 instantiate_class_template, tsubst_decl, tsubst, tsubst_copy,
3870 tsubst_expr, instantiate_template,
3871 maybe_adjust_types_for_deduction, type_unification_real,
3872 resolve_overloaded_unification, template_decl_level,
3873 type_dependent_expression_p): Likewise.
3874 * search.c (lookup_base_r): Likewise.
3875 * semantics.c (finish_stmt_expr, simplify_aggr_init_expr): Likewise.
3876 * tree.c (lvalue_p_1, count_functions, cxx_printable_name,
3877 verify_stmt_tree_r, get_type_decl, stabilize_call): Likewise.
3878 * typeck.c (common_type, get_member_function_from_ptrfunc,
3879 build_binary_op, build_unary_op, expand_ptrmemfunc_cst): Likewise.
3880 * typeck2.c (cxx_incomplete_type_diagnostic,
3881 split_nonconstant_init_1, store_init_value,
3882 process_init_constructor): Likewise.
3884 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
3886 * call.c (check_dtor_name): Replace abort with gcc_assert or
3888 (build_call, add_builtin_candidate, build_new_op,
3889 convert_like_real, build_over_call, in_charge_arg_for_name,
3890 source_type, joust): Likewise.
3891 * class.c (build_simple_base_path, get_vcall_index,
3892 finish_struct_1, instantiate_type, get_enclosing_class,
3893 add_vcall_offset_vtbl_entries_1, cp_fold_obj_type_ref): Likewise.
3894 * cp-gimplify.c (cp_genericize): Likewise.
3895 * cp-lang.c (cp_expr_size, cp_tree_size): Likewise.
3896 * cvt.c (cp_convert_to_pointer, ocp_convert): Likewise.
3897 * decl.c (poplevel, make_unbound_class_template, reshape_init,
3898 check_special_function_return_type, grokdeclarator,
3899 grok_op_properties, tag_name, xref_tag, start_preparsed_function,
3900 finish_function): Likewise.
3901 * decl2.c (grokfield, maybe_emit_vtables):Likewise.
3902 * error.c (dump_global_iord, dump_decl, dump_template_decl,
3903 language_to_string): Likewise.
3904 * except.c (choose_personality_routine): Likewise.
3905 * friend.c (do_friend): Likewise.
3906 * g++spec.c (lang_specific_driver): Likewise.
3907 * init.c (build_zero_init, expand_default_init, build_new_1,
3908 build_vec_delete_1, build_vec_init, build_dtor_call): Likewise.
3909 * lex.c (retrofit_lang_decl, cp_type_qual_from_rid): Likewise.
3910 * mangle.c (add_substitution, write_unscoped_name,
3911 write_template_prefix, write_identifier,
3912 write_special_name_destructor, write_type, write_builtin_type,
3913 write_expression, write_template_param,
3914 write_java_integer_type_codes): Likewise.
3915 * method.c (implicitly_declare_fn): Likewise.
3917 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
3919 * cp-tree.h (BINFO_PRIMARY_P): Use a binfo flag.
3920 (BINFO_INDIRECT_PRIMARY_P): Remove.
3921 * class.c (determine_primary_base): Rename to ...
3922 (determine_primary_bases): ... here. Set all primary bases.
3923 (set_primary_base): Remove.
3924 (mark_primary_bases): Remove.
3925 (build_simple_base_path, walk_subobject_offsets,
3926 propagate_binfo_offsets, end_of_class): Adjust.
3927 (layout_class_type): Rename determine_primary_base call.
3928 (dump_class_hierarchy_r, dump_vtable): Adjust. Don't pass a binfo
3930 (dfs_build_secondary_vptr_vtt_inits, dfs_accumulate_vtbl_inits,
3931 build_rtti_vtbl_entries): Adjust.
3932 * init.c (build_vtbl_address): Adjust.
3934 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Use gcc_assert.
3936 2004-08-28 Ziemowit Laski <zlaski@apple.com>
3938 * Make-lang.in (CXX_OBJS): Split up into CXX_OBJS and
3939 CXX_AND_OBJCXX_OBJS.
3940 (CXX_C_OBJS): Include in CXX_AND_OBJCXX_OBJS instead of listing
3941 separately on the link line.
3943 2004-08-28 Jason Merrill <jason@redhat.com>
3945 * decl.c (expand_static_init): Avoid bogus warnings.
3947 2004-08-27 Jason Merrill <jason@redhat.com>
3950 * tree.c (stabilize_init): See through a COMPOUND_EXPR.
3953 * decl.c (expand_static_init): Use thread-safety API.
3954 (register_dtor_fn): Return the call, don't expand it.
3955 * tree.c (add_stmt_to_compound): New fn.
3956 (stabilize_call): Use it.
3958 2004-08-27 Richard Henderson <rth@redhat.com>
3960 * cp-tree.def (OFFSETOF_EXPR): New.
3961 * parser.c (cp_parser_builtin_offsetof): Either built an
3962 OFFSETOF_EXPR, or call fold_offsetof immediately.
3963 * pt.c (tsubst_expr): Handle OFFSETOF_EXPR.
3965 2004-08-27 Nathan Sidwell <nathan@codesourcery.com>
3967 * call.c (validate_conversion_obstack): Replace
3968 my_friendly_assert with gcc_assert or gcc_unreachable.
3969 (direct_reference_binding, merge_conversion_sequences,
3970 build_user_type_conversion_1, perform_overload_resolution,
3971 build_op_delete_call, enforce_access, call_builtin_trap,
3972 build_over_call, build_special_member_call, build_new_method_call,
3973 initialize_reference): Likewise.
3974 * class.c (build_base_path, build_primary_vtable, alter_access,
3975 check_bases, update_vtable_entry_for_fn, layout_empty_base,
3976 clone_function_decl, adjust_clone_args,
3977 type_requires_array_cookie, include_empty_classes,
3978 finish_struct_1, resolve_address_of_overloaded_function,
3979 instantiate_type, get_vtbl_decl_for_binfo, build_vtt_inits,
3980 dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
3981 accumulate_vtbl_inits, build_vtbl_initializer,
3982 build_vbase_offset_vtbl_entries, build_rtti_vtbl_entries): Likewise.
3983 * cvt.c (build_up_reference, convert_to_reference): Likewise.
3984 * decl.c (poplevel, duplicate_decls, make_typename_type,
3985 cxx_init_decl_processing, reshape_init, check_initializer,
3986 make_rtl_for_nonlocal_decl, initialize_local_var, cp_finish_decl,
3987 expand_static_init, grokfndecl, grokvardecl, build_ptrmem_type,
3988 grokdeclarator, copy_fn_p, grok_op_properties, xref_tag,
3989 xref_basetypes, start_preparsed_function, save_function_data,
3990 finish_function, finish_method, maybe_register_incomplete_var,
3991 complete_vars): Likewise.
3992 * decl2.c (grok_array_decl, check_member_template,
3993 check_classfn, finish_static_data_member_decl, coerce_new_type,
3994 coerce_delete_type, import_export_class, decl_needed_p,
3995 determine_visibility, import_export_decl, build_cleanup,
3996 start_static_initialization_or_destructi, do_static_destruction,
3997 prune_vars_needing_no_initialization,
3998 build_offset_ref_call_from_tree): Likewise.
3999 * error.c (dump_decl, dump_expr): Likewise.
4000 * init.c (finish_init_stmts, build_zero_init,
4001 expand_virtual_init, expand_default_init, expand_aggr_init_1,
4002 build_offset_ref, build_new_1, build_delete, build_vbase_delete):
4004 * mangle.c (write_method_parms, write_template_args,
4005 write_expression, write_template_arg): Likewise.
4006 * method.c (make_thunk, finish_thunk, use_thunk): Likewise.
4007 * name-lookup.c (pop_binding, begin_scope, leave_scope,
4008 resume_scope, push_using_decl, validate_nonmember_using_decl,
4009 is_ancestor, poplevel_class, set_inherited_value_binding_p,
4010 push_class_level_binding, do_class_using_decl, push_namespace,
4011 pop_namespace, add_using_namespace, ambiguous_decl,
4012 lookup_namespace_name, lookup_type_current_level,
4013 maybe_process_template_type_declaration): Likewise.
4014 * parser.c (cp_lexer_peek_nth_token,
4015 cp_parser_parse_and_diagnose_invalid_typ,
4016 cp_parser_translation_unit, cp_parser_template_id,
4017 cp_parser_lookup_name, cp_parser_late_parsing_for_member): Likewise.
4018 * pt.c (push_access_scope, finish_member_template_decl,
4019 push_inline_template_parms_recursive, add_outermost_template_args,
4020 get_innermost_template_args, begin_explicit_instantiation,
4021 end_explicit_instantiation, retrieve_specialization,
4022 is_specialization_of, is_specialization_of_friend,
4023 register_specialization, check_explicit_specialization,
4024 comp_template_parms, process_template_parm,
4025 process_partial_specialization, convert_nontype_argument,
4026 coerce_template_template_parms, coerce_template_parms,
4027 mangle_class_name_for_template, lookup_template_function,
4028 lookup_template_class, instantiate_class_template, tsubst_decl,
4029 tsubst_function_type, tsubst, tsubst_qualified_id, tsubst_copy,
4030 instantiate_template, fn_type_unification, type_unification_real,
4031 get_template_base, regenerate_decl_from_template,
4032 template_for_substitution, instantiate_decl,
4033 get_mostly_instantiated_function_type, dependent_scope_ref_p,
4034 value_dependent_expression_p, resolve_typename_type): Likewise.
4035 * repo.c (repo_emit_p): Likewise.
4036 * rtti.c (build_headof, get_tinfo_decl, get_pseudo_ti_init,
4037 create_tinfo_types, emit_tinfo_decl): Likewise.
4038 * search.c (lookup_base_r, lookup_base, lookup_field_1,
4039 dfs_access_in_type, build_baselink, lookup_member,
4040 adjust_result_of_qualified_name_lookup, copied_binfo): Likewise.
4041 * semantics.c (perform_or_defer_access_check,
4042 finish_non_static_data_member, finish_stmt_expr_expr,
4043 finish_stmt_expr, finish_call_expr, finish_pseudo_destructor_expr,
4044 finish_template_template_parm, finish_member_declaration,
4045 emit_associated_thunks): Likewise.
4046 * tree.c (build_target_expr_with_type, force_target_expr,
4047 copy_binfo, get_first_fn, cp_tree_equal): Likewise.
4048 * typeck.c (type_after_usual_arithmetic_conversions, comptypes,
4049 cxx_sizeof_or_alignof_type, perform_integral_promotions,
4050 build_class_member_access_expr, finish_class_member_access_expr,
4051 build_ptrmemfunc_access_expr, build_unary_op,
4052 unary_complex_lvalue, cxx_mark_addressable, build_modify_expr,
4053 build_ptrmemfunc, expand_ptrmemfunc_cst, check_return_expr
4054 * typeck2.c (complete_type_check_abstract,
4055 abstract_virtuals_error, process_init_constructor,
4056 add_exception_specifier): Likewise.
4058 2004-08-27 Nathan Sidwell <nathan@codesourcery.com>
4060 * class.c (build_vtbl_initializer): Use ssize_int.
4061 * decl.c (complete_array_type): Likewise.
4062 * method.c (finish_thunk): Likewise.
4063 * search.c (get_dynamic_base_type): Likewise.
4065 2004-08-26 Richard Henderson <rth@redhat.com>
4067 * cp-tree.h (DECL_FIELD_IS_BASE): New.
4068 * class.c (build_base_field): Set it.
4069 (build_simple_base_path): Use it.
4070 (fixed_type_or_null): Don't consider base fields definitive.
4072 2004-08-25 Roger Sayle <roger@eyesopen.com>
4075 PR tree-optimization/16372
4076 * decl.c (finish_enum): Make the precision of the enumerated type
4077 the same width as the underlying integer type.
4079 2004-08-25 Mark Mitchell <mark@codesourcery.com>
4082 * lex.c (build_lang_decl): Set DECL_NO_STATIC_CHAIN for all C++
4085 * mangle.c (get_identifier_nocopy): Add cast.
4087 * cp-tree.h (mangle_type): Remove.
4088 * mangle.c (globals): GTY it.
4089 (mangle_obstack): New variable.
4090 (name_obstack): Likewise.
4091 (name_base): Likewise.
4092 (write_char): Adjust accordingly.
4093 (write_chars): Likewise.
4094 (write_string): Likewise.
4095 (start_mangling): Initialize G.substitutions only one. Add
4097 (finish_mangling): Use VARRAY_CLEAR to reclaim
4098 storage in G.substitutions. Use obstack_finish.
4099 (init_mangle): Adjust for changes to variable names above.
4100 Initialize G.substitutions.
4101 (mangle_decl_string): Adjust call to start_mangling.
4102 (get_identifier_nocopy): New function.
4103 (mangle_decl): Use it.
4104 (mangle_type_string): Adjust call to start_mangling.
4105 (mangle_special_for_type): Likewise.
4106 (mangle_vtt_for_type): Likewise.
4107 (mangle_ctor_vtbl_for_type): Likewise.
4108 (mangle_thunk): Likewise.
4109 (mangle_guard_variable): Likewise.
4110 (mangle_ref_init_variable): Likewise.
4112 2004-08-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4115 * pt.c (redeclare_class_template): Check the type of non-type and
4116 template template parameter.
4118 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
4120 * call.c (convert_class_to_reference): Adjust build_int_cst calls.
4121 (build_user_type_conversion_1, convert_like_real,
4122 build_java_interface_fn_ref, build_special_member_call): Likewise.
4123 * class.c (finish_struct_1, build_vtbl_initializer): Likewise.
4124 * cp-gimplify.c (cp_gimplify_expr): Likewise.
4125 * cvt.c (cp_convert_to_pointer): Likewise.
4126 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
4127 * decl2.c (start_static_initialization_or_destruction,
4128 generate_ctor_or_dtor_function): Likewise.
4129 * except.c (build_throw): Likewise.
4130 * mangle.c (write_integer_cst): Likewise.
4131 * method.c (finish_thunk): Likewise.
4132 * rtti.c (build_headof, get_tinfo_decl_dynamic,
4133 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
4134 get_pseudo_ti_init): Likewise.
4135 * search.c (get_dynamic_cast_base_type): Likewise.
4137 2004-08-25 Zack Weinberg <zack@codesourcery.com>
4139 * class.c, search.c: Remove references to DWARF_DEBUG.
4141 2004-08-25 Adam Nemet <anemet@lnxw.com>
4143 * repo.c (extract_string): Reset backquote after one character.
4144 (get_base_filename): Fix indentation.
4146 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
4148 * decl.c (cxx_init_decl_processing): Adjust
4149 build_common_tree_nodes call.
4151 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
4154 * (is_subobject_of_p): Resurrect & optimize.
4155 (lookup_field_r): Use it.
4157 2004-08-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4160 * search.c (friend_accessible_p): Increment processing_template_decl
4161 when deal with TEMPLATE_DECL of SCOPE.
4163 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
4166 * semantics.c (check_accessibility_of_qualified_id): Defer check
4167 if qualifying_type is a template parameter.
4169 2004-08-23 Mark Mitchell <mark@codesourcery.com>
4172 * pt.c (instantiate_decl): Do not try to apply
4173 DECL_DECLARED_INLINED_P to a VAR_DECL.
4175 * search.c (build_baselink): Fix typo in comment.
4177 2004-08-22 Andrew Pinski <apinski@apple.com>
4180 2004-08-22 Andrew Pinski <apinski@apple.com>
4182 * typeck.c (build_unary_op): Use &a.b if the folded lowered
4183 expression is not constant.
4185 2004-08-23 Nathan Sidwell <nathan@codesourcery.com>
4187 * name-lookup.c (pushdecl): Rename build_type_copy call.
4188 * tree.c (cp_build_qualified_type_real,
4189 build_exception_variant, handle_java_interface_attribute): Likewise.
4191 2004-08-22 Andrew Pinski <apinski@apple.com>
4194 * typeck.c (build_unary_op): Use &a.b if the folded lowered
4195 expression is not constant.
4197 2004-08-20 Mark Mitchell <mark@codesourcery.com>
4200 * decl.c (expand_static_init): Use DECL_FUNCTION_SCOPE_P.
4202 2004-08-21 Joseph S. Myers <jsm@polyomino.org.uk>
4205 * pt.c (tsubst_copy_and_build): Avoid clearing TREE_NO_WARNING for
4208 2004-08-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4210 * pt.c (register_specialization): Check DECL_TEMPLATE_SPECIALIZATION
4211 before calling comp_template_args.
4213 2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
4215 * class.c (build_vtbl_initializer): Use build_int_cst for
4216 negative size types.
4217 * decl.c (complete_array_type): Likewise.
4218 * method.c (finish_thunk): Likewise.
4220 2004-08-20 Andreas Tobler <a.tobler@schweiz.ch>
4222 * tree.c: Remove unused mark_local_for_remap_r.
4224 2004-08-19 Eric Christopher <echristo@redhat.com>
4226 * cp-tree.h (cxx_unsave_expr_now): Delete prototype.
4227 * tree.c (cxx_unsave_expr_now): Delete.
4228 (cp_unsave_r): Ditto.
4230 2004-08-19 Mark Mitchell <mark@codesourcery.com>
4233 * pt.c (push_template_decl_real): Disallow template allocation
4234 functions with fewer than two parameters.
4236 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
4238 * cp-tree.h (build_shared_int_cst): Remove.
4239 * tree.c (shared_int_cache): Remove.
4240 (build_shared_int_cst): Remove.
4241 * class.c (finish_struct_1): Use build_int_cst.
4243 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
4245 * decl.c (finish_enum): Do not copy value node early, copy
4247 * lex.c (cxx_init): Force null_node to be unique.
4249 2004-08-19 Joseph S. Myers <jsm@polyomino.org.uk>
4252 * pt.c (tsubst_copy, tsubst_copy_and_build): Copy TREE_NO_WARNING
4253 from input for MODOP_EXPR.
4255 2004-08-18 Mark Mitchell <mark@codesourcery.com>
4257 * pt.c (dependent_template_p): Fix typo in commment.
4260 * pt.c (dependent_template_p): Treat IDENTIFIER_NODEs as
4263 2004-08-17 Mark Mitchell <mark@codesourcery.com>
4266 * pt.c (unify): Tidy ARRAY_TYPE handling. Make sure that non-type
4267 arguments have the same type as the corresponding parameter.
4270 * parser.c (cp_parser_name_lookup_error): If parser->object_scope
4271 is set use it for diagnostic purposes.
4272 (cp_parser_pseudo_destructor_name): Remove special-case error
4276 * semantics.c (expand_or_defer_fn): Honor -fkeep-inline-functions.
4279 * cp-tree.h (qualified_name_lookup_error): Add parameter.
4280 * name-lookup.c (do_class_using_decl): Restrict set of entities
4281 passed to cp_emit_debug_info_for_using more carefully.
4282 (lookup_qualified_name): Allow lookup_member to return sets of
4284 * parser.c (cp_parser_lookup_name): Add ambiguous_p parameter.
4285 (cp_parser_primary_expression): Handle ambiguous lookups.
4286 (cp_parser_template_name): Adjust use of cp_parser_lookup_name.
4287 (cp_parser_template_argument): Likewise.
4288 (cp_parser_elaborate_type_specifier): Likewise.
4289 (cp_parser_namespace_name): Likewise.
4290 (cp_parser_class_name): Likewise.
4291 (cp_parser_lookup_name_simple): Likewise.
4292 * pt.c (tsubst_qualified_id): Handle ambiguous results.
4293 (tsubst_expr): Likewise.
4294 * semantics.c (qualified_name_lookup_error): Add decl paramter.
4295 For ambiguous lookups, print candidates.
4297 2004-08-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4300 * pt.c (instantiate_pending_templates): Add int parameter. Don't
4302 * cp-tree.h (instantiate_pending_templates): Adjust prototype.
4303 * decl2.c (finish_file): Adjust call to
4304 instantiate_pending_templates.
4306 2004-08-15 Roger Sayle <roger@eyesopen.com>
4308 * call.c (build_vfield_ref, build_call, build_conditional_expr,
4309 convert_arg_to_ellipsis, build_x_va_arg, build_over_call,
4310 build_java_interface_fn_ref, build_special_member_call,
4311 build_new_method_call, initialize_reference): Replace calls to
4312 build with calls to buildN.
4313 * class.c (build_base_path, convert_to_base_statically,
4314 build_vfn_ref, instantiate_type, dfs_accumulate_vtbl_inits,
4315 build_vtbl_initializer): Likewise.
4316 * cp-gimplify.c (genericize_try_block, genericize_catch_block,
4317 gimplify_if_stmt, cp_genericize_r): Likewise.
4318 * cvt.c (convert_to_void): Likewise.
4319 * decl.c (check_initializer, finish_constructor_body,
4320 finish_destructor_body): Likewise.
4321 * error.c (dump_expr): Likewise.
4322 * except.c (build_exc_ptr, expand_start_catch_block, build_throw):
4324 * init.c (perform_member_init, expand_virtual_init,
4325 expand_cleanup_for_base, build_init, expand_default_init,
4326 build_offset_ref, decl_constant_value, build_new, build_new_1,
4327 build_vec_delete_1, build_vec_init, build_delete,
4328 push_base_cleanups, build_vec_delete): Likewise.
4329 * mangle.c (write_integer_cst): Likewise.
4330 * method.c (thunk_adjust, do_build_copy_constructor,
4331 do_build_assign_ref): Likewise.
4332 * pt.c (lookup_template_function, tsubst, tsubst_copy_and_build,
4333 unify, build_non_dependent_expr): Likewise.
4334 * rtti.c (build_headof, build_typeid, ifnonnull,
4335 build_dyanmic_cast_1, tinfo_base_init): Likewise.
4336 * semantics.c (begin_compound_stmt, finish_call_expr,
4337 finish_pseudo_destructor_expr, finish_id_expression,
4338 simplify_aggr_init_expr, finalize_nrv_r): Likewise.
4339 * tree.c (build_target_expr, build_cplus_new, array_type_nelts_top,
4340 array_type_nelts_total, stabilize_call): Likewise.
4341 * typeck.c (decay_conversion, build_class_member_access_expr,
4342 lookup_destructor, build_ptrmemfunc_access_expr, build_array_ref,
4343 get_member_function_from_ptrfunc, build_binary_op, pointer_diff,
4344 build_x_unary_op, build_unary_op, unary_complex_lvalue,
4345 build_compound_expr, build_modify_expr, expand_ptrmemfunc_cst,
4346 check_return_expr): Likewise.
4347 * typeck2.c (split_nonconstant_1, split_nonconstant_init_1,
4348 split_nonconstant_init, store_init_value, build_m_component_ref):
4351 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
4353 * call.c (convert_class_to_reference,
4354 build_user_type_conversion_1, convert_like_real,
4355 build_java_interface_fn_ref, build_special_member_call): Use
4357 * class.c (build_vtbl_initializer): Likewise.
4358 * cp-gimplify.c (cp_gimplify_expr): Likewise.
4359 * cvt.c (cp_convert_to_pointer): Likewise.
4360 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
4361 * decl2.c (start_static_initialization_or_destruction,
4362 generate_ctor_or_dtor_function): Likewise.
4363 * except.c (build_throw): Likewise.
4364 * lex.c (cxx_init): Likewise.
4365 * mangle.c (write_integer_cst): Likewise.
4366 * rtti.c (build_headof, get_tinfo_decl_dynamic,
4367 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
4368 get_pseudo_ti_init): Likewise.
4369 * search.c (get_dynamic_cast_base_type): Likewise.
4370 * tree.c (build_shared_int_cst): Likewise.
4372 2004-08-12 Mark Mitchell <mark@codesourcery.com>
4375 * class.c (count_depth_data): New type.
4376 (dfs_depth_post): New function.
4377 (dfs_depth_q): Likewise.
4378 (find_final_overrider_data_s): Change type of vpath.
4380 (dfs_find_final_overrider_1): New function.
4381 (dfs_find_final_overrider): Use it.
4382 (dfs_find_final_overrider_q): Adjust use of vpath.
4383 (dfs_find_final_overrider_post): Likewise.
4384 (find_final_overrider): Use dfs_depth. Allocate and deallocate
4387 2004-08-12 Jan Beulich <jbeulich@novell.com>
4389 * parser.c (cp_parser_asm_definition): Properly consume scope operator
4390 tokens preceding the clobbers. Don't check for scope operator
4391 following inputs. Simplify inputs handling to match that now used for
4394 2004-08-11 Mark Mitchell <mark@codesourcery.com>
4397 * except.c (build_throw): Allocate cleanup_type and the function
4398 for __cxa_throw separately.
4401 * call.c (standard_conversion): Do not accept conversions between
4402 pointers to members if the class types are unrelated.
4405 * parser.c (cp_parser_builtin_offsetof): Cast to "const volatile
4406 char &" instead of just "char &".
4409 * pt.c (tsubst): Just return the unknown_type_node.
4411 2004-08-11 Mark Mitchell <mark@codesourcery.com>
4414 * parser.c (cp_parser_class_specifier): Robustify.
4417 * pt.c (tsubst_copy_and_build): Complain about invalid
4421 * pt.c (tsubst_default_argument): Clear out current_class_ptr and
4422 current_class_ref while tsubsting.
4424 2004-08-10 Mark Mitchell <mark@codesourcery.com>
4427 * parser.c (cp_parser_init_declarator): Robustify.
4429 2004-08-06 Richard Sandiford <rsandifo@redhat.com>
4431 * typeck2.c (process_init_constructor): Guard the missing field warning
4432 with warn_missing_field_initializers rather than extra_warnings.
4434 2004-08-06 Paolo Bonzini <bonzini@gnu.org>
4436 * class.c (instantiate_type) <ENTRY_VALUE_EXPR>: Do not handle.
4438 2004-08-05 Mark Mitchell <mark@codesourcery.com>
4440 * decl.c (start_preparsed_function): Move determine_visibility
4442 * decl2.c (determine_visibility): Incorporate dllexport testing.
4444 2004-08-05 Geoffrey Keating <geoffk@apple.com>
4446 * g++spec.c (lang_specific_driver): An -Xlinker or -Wl, option
4447 means that libstdc++ is needed.
4449 2004-08-05 Nathan Sidwell <nathan@codesourcery.com>
4451 * cvt.c (cp_convert_to_pointer): Adjust force_fit_type call.
4453 2004-08-04 Geoffrey Keating <geoffk@apple.com>
4455 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_ASSEMBLER_NAME rather
4456 than passing it as a parameter to rest_of_decl_compilation.
4457 * decl2.c (grokfield): Use set_user_assembler_name.
4459 2004-08-04 Nathan Sidwell <nathan@codesourcery.com>
4461 * decl.c (complete_array_type): Don't gratuitously copy
4462 maxindex. Its type is always set.
4464 2004-08-04 Paul Brook <paul@codesourcery.com>
4466 * Make-lang.in (cp/semantics.o, cp/optimize.o): Depend on TARGET_H.
4467 * cp-tree.h (struct language_function): Rename x_dtor_label to
4469 (dtor_label): Rename ...
4470 (cdtor_label): ... to this.
4471 * decl.c (begin_constructor_body): Remove.
4472 (check_special_function_return_type): Maybe change the return type.
4473 (grokdeclarator): Pass the class type.
4474 (start_preparsed_function): Constructors may need a return label.
4475 (finish_constructor_body, finish_destructor_body): Set the return
4477 (begin_function_body): Don't call begin_constructor_body.
4478 (finish_function): Don't warn for constructors or destructors.
4479 (implicitly_declare_fn): Maybe change the return type.
4480 * optimize.c: Include target.h.
4481 (maybe_clone_body): Remap the function result.
4482 * semantics.c: Include target.h.
4483 (finish_return_stmt): Maybe jump to return label for constructors.
4485 2004-08-03 Mark Mitchell <mark@codesourcery.com>
4487 * class.c (build_vtable): Do not set DECL_VISIBILITY here.
4488 (check_field_decls): Or here.
4489 (check_methods): Or here.
4490 (initialize_array): Don't mess with DECL_CONTEXT.
4491 * cp-tree.h (start_decl): Adjust prototype.
4492 (determine_visibility): New function.
4493 * decl.c (duplicate_decls): Remove checks for hidden "operator
4495 (build_library_fn_1): Give all library functions default
4497 (start_decl): Add pop_scope_p parameter. Tidy.
4498 (cp_finish_decl): Do not pop scopes here. Call
4499 determine_visibility for variable definitions.
4500 (start_preparsed_function): Call determine_visibility.
4501 * decl2.c (determine_visibility): New function.
4502 * method.c (use_thunk): Fix formatting.
4503 * parser.c (cp_parser_condition): Adjust calls to start_decl.
4504 (cp_parser_init_declarator): Likewise.
4505 * pt.c (instantiate_decl): Always call pop_nested_class.
4506 * rtti.c (get_tinfo_decl): Do not set DECL_VISIBILITY.
4507 (tinfo_base_init): Likewise.
4509 2004-08-02 Mark Mitchell <mark@codesourcery.com>
4512 * name-lookup.c (validate_nonmember_using_decl): Robustify.
4514 2004-08-01 Mark Mitchell <mark@codesourcery.com>
4517 * name-lookup.c (decl_namespace): Remove.
4518 (current_decl_namespace): Use decl_namespace_context instead of
4520 (push_decl_namespace): Likewise.
4521 (arg_assoc_class): Likewise.
4522 (arg_assoc_type): Likewise.
4523 * pt.c (check_specialization_namespace): New function.
4524 (maybe_process_partial_specialization): Use it.
4525 (register_specialization): Likewise.
4528 * cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): New macro.
4529 * call.c (null_ptr_cst_p): Handle variables with constant
4531 * pt.c (convert_nontype_argument): Use
4532 DECL_INTEGRAL_CONSTANT_VAR_P.
4533 * semantics.c (finish_id_expression): Likewise.
4536 * decl.c (duplicate_decls): Reject duplicate namespace
4540 * typeck.c (build_ptrmemfunc): Loosen assertion.
4542 2004-08-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
4544 * call.c (z_candidate::template_decl): Rename from template.
4545 (add_template_candidate_real): Adjust member reference.
4548 2004-07-29 Mark Mitchell <mark@codesourcery.com>
4550 * cp-tree.h (IDENTIFIER_REPO_CHOSEN): Define.
4551 (lang_decl_flags): Narrow the width of "languages". Add
4553 (DECL_NEEDED_P): Remove.
4554 (FOR_EACH_CLONE): New macro.
4555 (DECL_REPO_AVAILABLE_P): Likewise.
4556 (DECL_TINFO_P): Likewise.
4557 (set_linkage_according_to_type): Declare.
4558 (import_export_vtable): Remove.
4559 (import_export_tinfo): Likewise.
4560 (mark_needed): New function.
4561 (decl_needed_p): Likewise.
4562 (note_vauge_linkage_fn): Likewise.
4563 (init_repo): Change prototype.
4564 (repo_template_used): Remove.
4565 (repo_template_instantiated): Likewise.
4566 (repo_emit_p): New function.
4567 (repo_export_class_p): Likewise.
4568 (no_linkage_check): Change prototype.
4569 * class.c (set_linkage_according_to_type): New function.
4570 (build_vtable): Use it. Do not call import_export_vtable. Set
4571 DECL_IGNORED_P if appropriate.
4572 * decl.c (duplicate_decls): Preserve DECL_REPO_AVAILABLE_P.
4573 (make_rtL_for_nonlocal_decls): Check for template instantiations
4575 (grokfndecl): Adjust call to no_linkage_check.
4576 (set_linkage_for_static_data_member): New function.
4577 (grokvardecl): Use it. Adjust call to no_linkage_check.
4578 (grokdeclarator): Use set_linkage_for_static_data_member.
4579 * decl2.c (note_vague_linkage_fn): New function.
4580 (note_vague_linkage_var): Likewise.
4581 (finish_static_data_member_decl): Use it.
4582 (import_export_vtable): Remove.
4583 (import_export_class): Use repo_export_class_p.
4584 (var_finalized_p): Simplify.
4585 (maybe_emit_vtables): Simplify.
4586 (mark_needed): New function.
4587 (decl_needed_p): Likewise.
4588 (import_export_decl): Add documentation and consistency checks.
4589 Use repo_emit_p. Handle virtual tables and RTTI information
4591 (import_export_tinfo): Remove.
4592 (write_out_vars): Call import_export_decl.
4593 (cxx_callgraph_analyze_expr): Ensure that all vtables are emitted
4595 (finish_file): Use decl_needed_p. Do not call import_export_decl
4596 for undefined static data members. Do not warn about undefined
4597 inlines when using a repository.
4598 (mark_used): Use note_vague_linkage_fn. Always defer template
4600 * lex.c (cxx_init): Adjust call to init_repo. Always set
4601 flag_unit_at_a-time.
4602 * method.c (synthesize_method): Remove unncessary
4603 import_export_decl call.
4604 (implicitly_declare_fn): Use set_linkage_according_to_type.
4605 * optimize.c (maybe_clone_body): Use FOR_EACH_CLONE.
4606 * pt.c (instantiate_class_template): Don't redundantly add classes
4607 to keyed_classes. Don't call repo_template_used.
4608 (tsubst_decl): Set DECL_INTERFACE_KNOWN for instantiations of
4609 templates with internal linkage.
4610 (check_instantiated_args): Adjust call to no_linkage_check.
4611 (instantiate_template): Use FOR_EACH_CLONE.
4612 (mark_definable): New function.
4613 (mark_decl_instantiated): Use it.
4614 (do_decl_instantiation): Adjust tests for explicit instantiation
4615 after "extern template".
4616 (instantiate_class_member): Do not use repo_template_instantiated.
4617 (do_type_instantiation): Simplify.
4618 (instantiate_decl): Use mark_definable. Check repo_emit_p.
4620 * repo.c (repo_get_id): Remove.
4621 (original_repo): Remove.
4622 (IDENTIFIER_REPO_USED): Remove.
4623 (IDENTIFIER_REPO_CHOSEN): Remove.
4624 Remove all #if 0'd code.
4625 (repo_template_used): Remove.
4626 (repo_template_instantiated): Remove.
4627 (temporary_obstack_initialized_p): New variable.
4628 (init_repo): Register with lang_post_pch_load. Avoid creating
4629 identifiers unnecessarily. Don't use original_repo. Close the
4631 (reopen_repo_file_for_write): Not here.
4632 (finish_repo): Always write out a new repository file.
4633 (repo_emit_p): New function.
4634 (repo_export_class_p): Likewise.
4635 * rtti.c (get_tinfo_decl): Use set_linkage_according_to_type.
4636 (involves_incomplete_p): New function.
4637 (tinfo_base_init): Use it.
4638 (ptr_initializer): Remove non_public_ptr parameter.
4639 (ptm_initializer): Likewise.
4640 (get_pseudo_ti_init): Likewise.
4641 (unemitted_tinfo_decl_p): Remove.
4642 (emit_tinfo_decl): Use import_export_decl.
4643 * semantics.c (expand_body): Move updates of static_ctors and
4645 (expand_or_defer_fn): ... here.
4646 * tree.c (no_linkage_check): Add relaxed_p parameter.
4648 2004-07-28 Eric Christopher <echristo@redhat.com>
4650 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
4652 2004-07-28 Nathan Sidwell <nathan@codesourcery.com>
4654 * cp-tree.h (struct tree_pair_s): New.
4655 (typedef tree_pair_p): New.
4656 (DEF_VEC_O(tree_pair_s)): New.
4657 (struct lang_type_class): Make vcall_indices a VEC(tree_pair_s).
4658 (CLASSTYPE_VCALL_INDICES): Update documentation.
4659 * class.c (get_vcall_index): Adjust.
4660 (add_vcall_offset): Adjust.
4662 2004-07-27 Kelley Cook <kcook@gcc.gnu.org>
4664 * pt.c, typeck.c: Remove spurious carriage returns.
4666 2004-07-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4669 * pt.c (coerce_template_template_parms) <PARM_DECL case>: Only check
4670 when the type of ARG is not dependent.
4672 2004-07-26 Geoffrey Keating <geoffk@apple.com>
4674 * g++spec.c (LIBSTDCXX_PROFILE): Default to LIBSTDCXX.
4675 (lang_specific_driver): If the C++ or math library options don't
4676 start with '-l', don't count them as added libraries.
4678 2004-07-26 Nathan Sidwell <nathan@codesourcery.com>
4680 * decl.c (xref_basetypes): Adjust base access vector creation.
4681 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Adjust base
4683 * search.c (dynamic_cast_base_recurse, dfs_access_in_type): Likewise.
4685 2004-07-26 Niall Douglas <s_fsfeurope2@nedprod.com>
4686 Brian Ryner <bryner@brianryner.com>
4690 * class.c (check_field_decls): Apply hidden visibility if
4691 -fvisibility-inlines-hidden and inlined unless otherwise specified
4692 (build_vtable): Set vtable visibility to class visibility.
4693 (check_field_decls): Default static member visibility to class
4695 (check_methods): Default method visibility to class visibility.
4696 * cp-tree.h: Added CLASSTYPE_VISIBILITY and
4697 CLASSTYPE_VISIBILITY_SPECIFIED macro.
4698 * decl.c (duplicate_decls): New logic for merging definition decls
4699 with declaration decls. Added ignore & warning when non default
4700 applied to global operator new or delete.
4701 * method.c, optimize.c, rtti.c: Added setting of VISIBILITY_SPECIFIED
4702 wherever VISIBILITY was changed
4703 * rtti.c (get_tinfo_decl): Set typeinfo visibility to class
4705 (tinfo_base_init): Set typeinfo name visibility to class visibility.
4707 2004-07-25 Bernardo Innocenti <bernie@develer.com>
4709 * decl.c: Rename all identifiers named `class' to `cl'.
4710 * cp-tree.h: Likewise.
4712 2004-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
4714 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Use GGC_CNEW.
4715 * typeck2.c (abstract_virtuals_error): Use GGC_NEW.
4716 * name-lookup.c (binding_entry_make): Use GGC_NEW.
4717 (binding_table_construct): Use GGC_CNEWVEC.
4718 (binding_table_new): Use GGC_NEW.
4719 (cxx_binding_make): Likewise.
4720 (begin_scope): Likewise.
4721 (push_to_top_level): Use GCC_CNEW.
4722 * parser.c (cp_token_cache_new): Likewise.
4723 (cp_token_cache_push_token): Likewise.
4724 (cp_lexer_new_main): Likewise.
4725 (cp_lexer_new_from_tokens): Likewise.
4726 (cp_parser_context_new): Likewise.
4727 (cp_parser_new): Likewise.
4728 (cp_lexer_new_from_tokens): Use GGC_NEWVEC.
4729 * lex.c (cxx_make_type): Use GGC_CNEW.
4730 (retrofit_lang_decl): Use GGC_NEWVAR.
4731 (cxx_dup_lang_specific_decl): Likewise.
4732 (copy_lang_type): Likewise.
4733 * decl.c (use_label): Use GGC_NEW instead of ggc_alloc.
4734 (save_function_data): Likewise.
4735 (lookup_label): Use GGC_CNEW instead of ggc_alloc_cleared.
4736 (cxx_push_function_context): Likewise.
4738 2004-07-25 Richard Henderson <rth@redhat.com>
4740 * decl.c (start_preparsed_function): Set DECL_ARTIFICIAL and
4741 DECL_IGNORED_P on RESULT_DECL.
4742 * semantics.c (finalize_nrv): Copy them too.
4744 2004-07-23 Nathan Sidwell <nathan@codesourcery.com>
4746 * search.c (lookup_conversion_operator): Avoid two loops.
4747 (add_conversions): Remove.
4748 (check_hidden_convs, split_conversions,
4749 lookup_conversions_r): New.
4750 (lookup_conversions): Use lookup_conversions_r.
4752 2004-07-22 Nathan Sidwell <nathan@codesourcery.com>
4754 * pt.c (get_template_base): Check type is completable.
4756 2004-07-21 Eric Christopher <echristo@redhat.com>
4758 * decl.c (poplevel): Inline unused variable checking.
4761 2004-07-21 Paolo Bonzini <bonzini@gnu.org>
4763 * typeck.c (build_binary_op): Do not use RDIV_EXPR for
4766 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4769 * pt.c (check_explicit_specialization): Remove extension to accept
4770 specializations without template headers. Fall-through to normal
4773 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4776 * pt.c (determine_specialization): New parameter template_count.
4777 Disambiguate between member templates and member functions counting
4778 the template headers.
4779 (check_explicit_specialization): Update caller.
4780 (tsubst_friend_function): Likewise.
4782 2004-07-20 Steven Bosscher <stevenb@suse.de>
4784 * cp-tree.def (TINST_LEVEL): Make it an 'x' node.
4785 * cp-tree.h (tinst_level_t): New tree type.
4786 (union lang_tree_node): Handle it.
4787 (TINST_LOCATION): New accessor macro.
4788 (make_tinst_level): New prototype.
4789 * cp-lang.c (cp_tree_size): Handle TINST_LEVEL.
4790 * decl.c (cp_tree_node_structure): Likewise.
4791 * error.c (print_instantiation_full_context): Use TINST_LOCATION.
4792 (print_instantiation_partial_context): Likewise.
4793 * pt.c (pop_tinst_level): Likewise.
4794 (push_tinst_level): Use make_tinst_level.
4795 * tree.c (make_tinst_level): New function.
4796 (cp_walk_subtrees): Walk TINST_DECL for a TINST_LEVEL node.
4798 2004-07-20 Mark Mitchell <mark@codesourcery.com>
4800 * parser.c (cp_parser_simple_type_specifier): Fix typo.
4803 * parser.c (cp_parser_simple_type_specifier): Do not record usage
4804 of globally-qualified names.
4806 2004-07-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4809 * error.c (dump_type) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Output
4812 2004-07-19 Mark Mitchell <mark@codesourcery.com>
4815 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
4816 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
4817 * class.c (add_implicitly_declared_members): Use
4818 CLASSTYPE_LAZY_ASSIGNMENT_OP.
4819 * method.c (lazily_declare_fn): Clear
4820 CLASSTYPE_LAZY_ASSIGNMENT_OP.
4821 * search.c (lookup_fnfields_1): Check it.
4823 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
4825 * cp-tree.h (vec_binfo_member): Remove.
4826 * tree.c (vec_binfo_member): Remove.
4828 * cp-tree.h (struct lang_type_class): Remove vfields field.
4829 (CLASSTYPE_VFIELDS): Remove.
4830 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
4831 * class.c (determine_primary_base): Remove CLASSTYPE_VFIELDS
4833 (dfs_modify_vtables): Use TYPE_CONTAINS_VPTR_P.
4834 (finish_struct_1): Remove CLASSTYPE_VFIELDS handling.
4835 * init.c (dfs_initialize_vtbl_ptrs): Use TYPE_CONTAINS_VPTR_P.
4837 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
4839 * cp-tree.h (DEF_VEC_P(tree)): Remove here.
4840 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
4842 (BINFO_LANG_SLOTS): Remove.
4843 * tree.c (copy_binfo): Adjust BINFO creation and accessors.
4844 * decl.c (xref_basetypes): Adjust BINFO creation and accessors.
4845 * class.c (check_bases): Adjust BINFO accessors.
4846 (determine_primary_base, finish_struct_bits,
4847 maybe_warn_about_overly_private_class, warn_hidden,
4848 walk_subobject_offsets, propagate_binfo_offsets, end_of_class,
4849 warn_about_ambiguous_bases, get_vfield_name,
4850 dump_class_hierarchy_r, build_vtt_inits, accumulate_vtbl_inits,
4851 add_vcall_offset_vtbl_entries_r): Likewise.
4852 * dump.c (cp_dump_tree): Likewise.
4853 * init.c (sort_mem_initializers, expand_member_init, build_delete,
4854 push_base_cleanups): Likewise.
4855 * method.c (do_build_copy_constructor, do_build_assign_ref,
4856 synthesize_exception_spec): Likewise.
4857 name-lookup.c (arg_assoc_class): Likewise.
4858 * pt.c (instantiate_class_template,
4859 get_template_base_recursive): Likewise.
4860 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Likewise.
4861 * typeck2.c (process_init_constructor): Likewise.
4862 * search.c (lookup_base_r, dynamic_cast_base_recurse,
4863 dfs_access_in_type, dfs_walk_real, look_for_overrides,
4864 types_overlap_p, copied_binfo, original_binfo): Likewise.
4865 (binfo_for_vtable): Remove
4867 2004-07-20 Steven Bosscher <stevenb@suse.de>
4869 * cp-tree.h (struct lang_decl_flags): Unify the template_info and
4870 thunk_alias, and the access and virtual_offset fields.
4871 (THUNK_VIRTUAL_OFFSET, THUNK_ALIAS): Adjust.
4872 * decl.c (finish_case_label): Update c_add_case_node call.
4874 2004-07-19 Mark Mitchell <mark@codesourcery.com>
4876 Revert patch for PR c++/16623.
4878 2004-07-19 Kelley Cook <kcook@gcc.gnu.org>
4880 * except.c: Remove two spurious carriage returns.
4882 2004-07-19 Mark Mitchell <mark@codesourcery.com>
4885 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
4886 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
4887 * class.c (add_implicitly_declared_members): Use
4888 CLASSTYPE_LAZY_ASSIGNMENT_OP.
4889 * method.c (lazily_declare_fn): Clear
4890 CLASSTYPE_LAZY_ASSIGNMENT_OP.
4891 * search.c (lookup_fnfields_1): Check it.
4893 2004-07-19 Nathan Sidwell <nathan@codesourcery.com>
4895 * class.c (add_method): Delay adding the slot until the end.
4896 (determine_primary_base): Adjust VEC_iterate invokation.
4897 (resort_type_method_vec, finish_struct_methods, warn_hidden,
4898 walk_subobject_offsets, end_of_class, warn_about_ambiguous_bases,
4899 build_vtbl_initializer): Likewise.
4900 * init.c (sort_mem_initializers, build_delete, push_base_cleanups,
4901 build_vbase_delete): Likewise.
4902 * method.c (do_build_copy_constructor): Likewise.
4903 * name-lookup.c (new_class_binding, print_binding_level,
4904 poplevel_class, store_class_bindings, push_to_top_level,
4905 pop_from_top_level): Likewise.
4906 * pt.c (check_explicit_specialization): Likewise.
4907 * search.c (lookup_conversion_operator, lookup_fnfields_1,
4908 get_pure_virtuals, add_conversions, dfs_check_overlap,
4909 binfo_for_vbase): Likewise.
4911 2004-07-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4914 * pt.c (unify) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Use only
4915 innermost set of template arguments during deduction. Simplify.
4917 2004-07-19 Joseph S. Myers <jsm@polyomino.org.uk>
4919 * typeck.c (build_modify_expr, build_x_modify_expr): Set
4920 TREE_NO_WARNING on assignments with an operator other than '='.
4922 2004-07-10 Steven Bosscher <stevenb@suse.de>
4923 Joseph S. Myers <jsm@polyomino.org.uk>
4925 * cp-tree.h (C_SET_EXP_ORIGINAL_CODE): Remove.
4926 * decl2.c (grokfield): Don't check current_class_depth via
4927 unused TREE_COMPLEXITY.
4928 * semantics.c (finish_parenthesized_expr): Set TREE_NO_WARNING
4929 to avoid the missing parentheses warning.
4930 Don't set C_SET_EXP_ORIGINAL_CODE.
4932 2004-07-18 Mark Mitchell <mark@codesourcery.com>
4934 * tree.c (no_linkage_helper): Remove.
4935 (no_linkage_check): Don't use walk_tree_without_duplicates.
4937 * mangle.c (write_expression): Issue a sorry for zero-operand
4940 2004-07-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4943 * init.c (build_offset_ref): Build SCOPE_REF with non-null
4944 TREE_TYPE for non-dependent names.
4945 * typeck.c (build_x_unary_op): Handle non-dependent SCOPE_REF.
4946 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
4947 unknown_type_node as its TREE_TYPE.
4948 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
4949 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
4950 (dump_expr) <SCOPE_REF case>: Likewise.
4952 2004-07-17 Jason Merrill <jason@redhat.com>
4955 * call.c (type_passed_as): Make the invisible reference type
4957 * cp-gimplify.c (gimplify_cleanup_stmt): Rename to
4958 cp_genericize_r. Handle invisible reference lowering.
4959 (is_invisiref_parm): New fn.
4960 (cp_genericize): Adjust the types of invisible reference parms.
4961 Don't repeat the walk for clones.
4962 * decl.c (store_parm_decls): Don't generate any code for clones.
4964 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
4966 * cp-tree.h (builtin_function): Declare.
4968 2004-07-16 Mark Mitchell <mark@codesourcery.com>
4970 * class.c (finish_struct_methods): Remove unncessary code.
4971 (add_implicitly_declared_members): Create declarations for default
4972 constructors and copy constructors lazily.
4973 * cp-tree.h (lang_type_class): Remove lazy_default_ctor and
4975 (CLASSTYPE_LAZY_DEFAULT_CTOR): New macro.
4976 (CLASSTYPE_LAZY_COPY_CTOR): Likewise.
4977 * decl2.c (check_classfn): Robustify.
4978 (locate_dtor): Handle empty CLASSTYPE_METHOD_VEC.
4979 (locate_ctor): Handle lazy default constructors.
4980 (locate_copy): Handle lazy copy constructors.
4981 (implicitly_declare_fn): Make sure we're looking at the
4982 TYPE_MAIN_VARIANT for a class before creating functions. Don't
4983 set TYPE_HAS_CONSTRUCTOR.
4984 (lazily_declare_fn): New function.
4985 * name-lookup.c (constructor_name_full): Simplify.
4986 * search.c (lookup_fnfields_1): Lazily create methods, as
4988 (lookup_for_overrides): Handle empty CLASSTYPE_METHOD_VEC.
4990 2004-07-16 Steven Bosscher <stevenb@suse.de>
4992 * cp-tree.h (struct lang_type): Don't have three GTY options on a
4993 single bit GTY desc.
4995 2004-07-16 Richard Henderson <rth@redhat.com>
4997 * cp-lang.c (LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING): Die.
4998 * cp-tree.h (cp_copy_res_decl_for_inlining): Remove.
4999 * tree.c (cp_copy_res_decl_for_inlining): Remove.
5001 2004-07-16 Nathan Sidwell <nathan@codesourcery.com>
5003 * class.c (finish_struct_bits): Use for loop.
5004 (propagate_binfo_offsets): Do primary binfo outside of loop.
5007 * dump.c (cp_dump_tree): Don't dump the bases if there's no
5010 * pt.c (tsubst) <TREE_BINFO case>: We should never get here.
5012 2004-07-15 Mark Mitchell <mark@codesourcery.com>
5014 * cp-tree.h (lang_type_class): Remove has_real_assign_ref and
5015 has_abstract_assign_ref. Make methods a VEC(tree) *.
5016 (TYPE_HAS_CONST_ASSIGN_REF): Add documentation.
5017 (CLASSTYPE_CONSTRUCTORS): Adjust for changes to CLASSTYPE_METHOD_VEC.
5018 (CLASSTYPE_DESTRUCTORS): Likewise.
5019 (TYPE_HAS_REAL_ASSIGN_REF): Remove.
5020 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
5021 (add_method): Change prototoype.
5022 * class.c (add_method): Remove error_p parameter. Adjust for
5023 changes to CLASSTYPE_METHOD_VEC.
5024 (handle_using_decl): Adjust call to add_method.
5025 (maybe_warn_about_overly_private_class): Adjust for
5026 changes to CLASSTYPE_METHOD_VEC.
5027 (resort_type_method_vec): Likewise.
5028 (finish_struct_methods): Likewise.
5029 (check_for_override): Likewise.
5030 (warn_hidden): Likewise.
5031 (add_implicitly_declared_members): Defer creation of assignment
5032 operators. Adjust call to add_method.
5033 (clone_function_decl): Adjust call to add_method.
5034 (check_bases_and_members): Don't set TYPE_HAS_REAL_ASSIGN_REF.
5035 (finish_struct_1): Use CLASSTYPE_DESTRUCTORS.
5036 * decl.c (grok_special_member_properties): Don't set
5037 TYPE_HAS_ABSTRACT_ASSIGN_REF.
5038 * decl2.c (check_classfn): Adjust for
5039 changes to CLASSTYPE_METHOD_VEC.
5040 * method.c (locate_dtor): Use CLASSTYPE_DESTRUCTORS.
5041 (locate_ctor): Use CLASSTYPE_CONSTRUCTORS.
5042 (locate_copy): Adjust for changes to CLASSTYPE_METHOD_VEC.
5043 (implicitly_declare_fn): Set DECL_SOURCE_LOCATION. Do not call
5045 * pt.c (check_explicit_specialization): Adjust for
5046 changes to CLASSTYPE_METHOD_VEC.
5047 (instantiate_class_template): Do not set
5048 TYPE_HAS_ABSTRACT_ASSIGN_REF.
5049 * ptree.c (cxx_print_type): Don't try to print
5050 CLASSTYPE_METHOD_VEC.
5051 * rtti.c (emit_support_tinfos): Use CLASSTYPE_DESTRUCTORS.
5052 * search.c (lookup_field_r): Adjust for
5053 changes to CLASSTYPE_METHOD_VEC.
5054 (lookup_fnfields): Likewise.
5055 (lookup_conversion_operator): Likewise.
5056 (lookup_fnfields_1): Likewise. Create assignment operators
5058 (look_for_overrides_here): Adjust for
5059 changes to CLASSTYPE_METHOD_VEC.
5060 (add_conversions): Likewise.
5061 * semantics.c (finish_member_declaration): Adjust call to add_method.
5063 2004-07-15 Jason Merrill <jason@redhat.com>
5065 * cp-lang.c (cxx_types_compatible_p): To the middle-end,
5066 references and pointers are compatible.
5068 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
5070 * decl.c (xref_basetypes): Refactor.
5071 * tree.c (copy_base_binfos): Replace with ...
5072 (copy_binfo): ... this. Deep copy the given binfo, (not the just
5073 bases of the given base).
5074 * cp-tree.h (copy_base_binfo): Remove.
5075 (copy_binfo): Declare.
5077 2004-07-15 Mark Mitchell <mark@codesourcery.com>
5079 * name-lookup.c (set_inherited_value_binding_p): Add class_type
5081 (get_class_binding): Adjust.
5082 (push_class_level_binding): Don't use set_inherited_value_binding_p.
5084 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
5086 * class.c (finish_struct_bits): Don't set TYPE_HAS_CONVERSION here.
5087 * decl.c (xref_basetypes): Set it here.
5089 * class.c (check_bases): Don't set CLASSTYPE_NON_AGGREGATE here.
5090 Don't check for incomplete base.
5091 (get_vfield_name): Simplify while loop.
5092 * decl.c (xref_basetypes): Set CLASSTYPE_NON_AGGREGATE here.
5094 2004-07-14 Mark Mitchell <mark@codesourcery.com>
5096 * lex.c (cxx_make_type): Remove call to get_pointer_type.
5098 * cp-tree.h (IDENTIFIER_VALUE): Remove.
5099 (BINFO_PUSHDECLS_MARKED): Likewise.
5100 (maybe_inject_for_scope_var): Likewise.
5101 (push_class_decls): Likewise.
5102 * name-lookup.h (push_class_binding): Remove.
5103 (innermost_non_namespace_value): New function.
5104 (outer_binding): Likewise.
5105 * class.c (add_method): Push bindings before adding to
5107 (restore_class_cache): Do not restore class_shadowed.
5108 (pushclass): Do not add USING_DECLs. Do not call
5110 * config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c.
5111 * decl.c (pushdecl): Use outer_binding.
5112 (poplevel): Set the scope for an out-of-scope for-loop declaration
5114 (cp_finish_decl): Don't call maybe_inject_for_scope_var.
5115 * name-lookup.c (new_class_binding): New function.
5116 (push_binding): Use it.
5117 (pushdecl): Use innermost_non_namespace_value.
5118 (maybe_inject_for_scope_var): Remove.
5119 (push_class_binding): Remove.
5120 (set_inherited_value_binding_p): New function.
5121 (get_class_binding): New function.
5122 (push_class_level_binding): Assert that the current_class_type is
5124 (outer_binding): New function.
5125 (innermost_non_namespace_value): Likewise.
5126 (lookup_name_real): Use outer_binding.
5127 (lookup_name_current_level): Ignore out-of-scope variables.
5128 * pt.c (check_template_shadow): Use innermost_non_namespace_value.
5129 (lookup_template_class): Likewise.
5130 * search.c (dfs_push_type_decls): Remove.
5131 (dfs_push_decls): Likewise.
5132 (setup_class_bindings): Likewise.
5133 (lookup_field_1): Handle USING_DECLs from dependent scopes.
5134 (marked_pushdecls_p): Remove.
5135 (unmarked_pushdecls_p): Remove.
5136 (marked_identifiers): Remove.
5137 (setup_class_bindings): Remove.
5138 (dfs_push_type_decls): Remove.
5139 (dfs_push_decls): Remove.
5140 (push_class_decls): Remove.
5142 2004-07-13 Mark Mitchell <mark@codesourcery.com>
5146 * decl.c (grokvardecl): Make declspecs parameter const.
5147 (grokdeclarator): Likewise. Adjust accordingly.
5148 * decl.h (grokdeclarator): Adjust declaration.
5149 * parser.c (cp_parser_init_declarator): Do not clear
5150 decl_specifiers->attributes.
5152 * cp-tree.h (lang_identifier): Remove class_value.
5153 (IDENTIFIER_CLASS_VALUE): Remove.
5154 (pop_class_decls): Likewise.
5155 (init_search_processing): Likewise.
5156 * class.c (handle_using_decl): Use lookup_member, not
5157 IDENTIFIER_CLASS_VALUE.
5158 (restore_class_cache): New function, split out from ...
5159 (pushclass): ... here. Do not call clear_identifier_class_values.
5160 (invalidate_class_lookup_cache): Do not clear
5161 IDENTIFIER_CLASS_VALUE.
5162 (popclass): Do not call pop_class_decls.
5163 (maybe_note_name_used_in_class): Do not save names looked up after
5164 the class is complete. Use lookup_member, not
5165 IDENTIFIER_CLASS_VALUE.
5166 * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
5167 * decl.c (cxx_init_decl_processing): Do not call
5168 init_search_processing.
5169 * method.c (do_build_copy_constructor): Remove unnecessary code.
5170 (do_build_assign_ref): Likewise.
5171 * name-lookup.c (pushdecl): Use lookup_member, not
5172 IDENTIFIER_CLASS_VALUE.
5173 (set_identifier_type_value_with_scope): Set TREE_TYPE on the
5175 (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
5176 (push_class_binding): Do not set it.
5177 (clear_identifier_class_values): Remove.
5178 (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
5179 (store_binding): Do not save it.
5180 (pop_from_top_level): Do not restore it.
5181 * name-lookup.h (cxx_saved_binding): Remove class_value.
5182 (clear_identifier_class_values): Remove.
5183 * ptree.c (cxx_print_identifier): Do not print
5184 IDENTIFIER_CLASS_VALUE.
5185 * search.c (search_obstack): Remove.
5186 (push_stack_level): Remove.
5187 (pop_stack_level): Remove.
5188 (search_level): Remove.
5189 (search_stack): Remove.
5190 (lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
5191 (setup_class_bindings): Use IDENTIFIER_MARKED, not
5192 IDENTIFIER_CLASS_VALUE.
5193 (marked_identifiers): New variable.
5194 (push_class_decls): Clear IDENTIFIER_MARKED.
5195 (pop_class_decls): Don't call pop_search_level.
5196 (init_search_processing): Remove.
5198 2004-07-12 Mark Mitchell <mark@codesourcery.com>
5200 * cp-tree.h (get_aggr_typedef): Remove.
5201 * init.c (get_aggr_typedef): Likewise.
5203 * name-lookup.c (push_class_level_binding): Simplify.
5205 2004-07-12 Andrew Pinski <apinski@apple.com>
5209 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
5211 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
5214 2004-07-12 Eric Christopher <echristo@redhat.com>
5216 * parser.c (cp_parser_class_head): Remove unused variable.
5218 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5220 * decl.c (grok_op_properties): Reject [de-]allocation functions
5221 declared in a namespace, or declared as static.
5223 2004-07-12 Nathan Sidwell <nathan@codesourcery.com>
5225 * cp-tree.h (make_binfo): Remove.
5226 * decl.c (xref_basetypes): Use make_tree_binfo directly.
5227 * tree.h (copy_base_binfos): Likewise.
5228 (make_binfo): Remove.
5230 * call.c (build_user_type_conversion_1, build_new_op,
5231 check_constructor_callable, build_temp,
5232 perform_direct_initialization_of_possible): Pass type directly to
5233 lookup_fnfields & build_special_member_call.
5234 (build_special_member_call): Accept a type, and complete it.
5235 * class.c (finish_stuct_bits): Copy the BINFOs here.
5236 * cvt.c (ocp_convert): Pass type directly to
5237 build_special_member_call.
5238 * decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
5239 (xref_basetypes): Allocate the binfo here. Adjust.
5240 * init.c (build_init, build_new_1): Pass type directly to
5241 build_special_member_call.
5242 * lex.c (cxx_make_type): Do not allocate binfo here.
5243 * name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
5244 * parser.c (cp_parser_class_head): Always call xref_basetypes.
5245 * pt.c (instantiate_class_template): Likewise. Inhibit access
5246 checking for template friends.
5247 * ptree.c (cxx_print_type): Adjust record printing.
5248 * search.c (lookup_base): When taking a type, complete it before
5249 looking for a binfo.
5250 (lookup_member): Delay completing a type.
5251 (push_class_decls): Don't walk an incomplete type.
5252 (lookup_conversions): Likewise.
5253 * semantics.c (finish_stmt_expr_expr): Pass type directly to
5254 build_special_member_call.
5255 * tree.c (copy_base_binfos): Adjust.
5256 (make_binfo): Likewise.
5257 * typeck.c (build_modify_expr): Pass type directly to
5258 build_special_member_call.
5259 * typeck2.c (process_init_constructor): Check a binfo exists.
5260 (build_m_component_ref): Allow accessing an incomplete type.
5261 (build_functional_cast): Pass type directly to
5262 build_special_member_call.
5264 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5267 * config-lang.in (gtfiles): Add typeck2.c.
5268 * Make-lang.in: Tweak typeck2.c dependencies, and add rule for
5270 * cp-tree.h: Declare complete_type_check_abstract.
5271 * typeck2.c (pat_calc_hash, pat_compare,
5272 complete_type_check_abstract): New functions.
5273 (abstract_virtuals_error): If the type is abstract, register the
5274 declaration within abstract_pending_vars for further checks.
5275 Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
5276 * decl.c (cp_finish_decl): Do not strip array types.
5277 (create_array_type_for_decl): Check for abstractness of the element
5279 (complete_vars): Call complete_type_check_abstract.
5280 * class.c (finish_struct): Prepare a list of virtual functions for
5281 template types, and call complete_vars on it to check for abstractness.
5283 2004-07-12 Paolo Bonzini <bonzini@gnu.org>
5285 PR tree-optimization/14107
5286 * decl.c (finish_function): Remove temporary band-aid.
5288 2004-07-11 Mark Mitchell <mark@codesourcery.com>
5290 * call.c (build_operator_new_call): Avoid using push_to_top_level.
5291 (build_new_op): Adjust call to lookup_function_nonclass.
5292 * name-lookup.c (identifier_type_value): Adjust call to
5294 (lookup_name_real): Add block_p parameter.
5295 (lookup_name_nonclass): Adjust call to lookup_name_real.
5296 (lookup_function_nonclass): Likewise.
5297 (lookup_name): Likewise.
5298 * name-lookup.h (lookup_name_real): Change prototype.
5299 (lookup_name_nonclass): Likewise.
5300 * parser.c (cp_parser_lookup_name): Likewise.
5302 * cp-tree.h (saved_scope): Make old_bindings a vector.
5303 (unuse_fields): Remove.
5304 * name-lookup.h (cxx_saved_binding): Define it.
5305 * class.c (pushclass): Don't use unuse_fields.
5306 * name-lookup.c (cxx_saved_binding_make): Remove.
5307 (store_binding): Add new bindings to a vector, using an
5308 accumulator style, rather than adding them to a list.
5309 (store_bindings): Adjust accordingly.
5310 (store_class_bindings): Likewise.
5311 (push_to_top_level): Likewise.
5312 (pop_from_top_level): Likewise.
5313 * optimize.c (maybe_clone_body): Must push_to_top_level and
5314 pop_from_top_level calls outside of loop.
5315 * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope
5316 calls here from cp_parser_late_parsing_default_args.
5317 (cp_parser_save_default_args): Record the class type in which the
5318 function is declared.
5319 (cp_parser_late_parsing_default_args): Do not call
5320 push_nested_class/pop_nested_class.
5321 * search.c (dfs_unuse_fields): Remove.
5322 (unuse_fields): Remove.
5324 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
5326 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
5327 LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
5328 * cp-tree.h (poplevel): Declare.
5329 (set_block): Remove.
5330 * decl.c (set_block): Remove.
5332 2004-07-10 Mike Stump <mrs@apple.com>
5334 * decl2.c (import_export_class): Never export/import vtables
5335 with inline key functions.
5337 2004-07-09 Steven Bosscher <stevenb@suse.de>
5339 * typeck.c (c_expand_asm_operands): Remove.
5341 2004-07-09 Mike Stump <mrs@apple.com>
5343 * typeck.c (build_class_member_access_expr): Skip null deref
5344 warning when we don't dereference it.
5346 2004-07-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5350 * class.c (check_field_decls): Improve -Weffc++ warning: do not
5351 warn for pointers to functions/members, or for classes without
5354 2004-07-08 Mark Mitchell <mark@codesourcery.com>
5356 * name-lookup.h (struct cp_binding_level): Update documentation
5359 2004-07-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5362 * typeck.c (check_return_expr): Improve -Weffc++ warning: handle
5363 returning CALL_EXPR, and non-reference return type.
5365 2004-07-08 Nathan Sidwell <nathan@codesourcery.com>
5367 * name-lookup.c (push_binding): Use VEC_reserve.
5369 2004-07-08 Richard Henderson <rth@redhat.com>
5371 * cp-tree.h (expand_eh_spec_block): Remove.
5373 2004-07-07 Mark Mitchell <mark@codesourcery.com>
5375 * cp-tree.h (saved_scope): Remove x_previous_class_type and
5376 x_previous_class_values; add x_previous_class_level.
5377 (previous_class_type): Remove.
5378 (previous_class_values): Remove.
5379 (previous_class_level): New macro.
5380 * class.c (pushclass): Restore the identifier cache more
5382 (invalidate_class_lookup_cache): Use vector for class_shadowed and
5383 previous_class_values.
5384 * decl.c (poplevel): Likewise.
5385 * name-lookup.c (cxx_binding_init): New function.
5386 (cxx_binding_make): Use it.
5387 (push_binding): For a binding in a class level, use a vector of
5388 cp_class_binding nodes.
5389 (push_binding_level): New function.
5390 (begin_scope): Use it.
5391 (leave_scope): Do not put class binding levels on the free list.
5392 (print_binding_level): Adjust for the fact that class_shadowed is
5394 (poplevel_class): Likewise.
5395 (clear_identifier_class_values): Likewise.
5396 (push_class_level_binding): Likewise.
5397 (set_class_shadows): Remove.
5398 (store_binding): New function.
5399 (store_class_bindings): New function.
5400 (push_to_top_level): Use store_class_bindings as appropriate.
5401 (pop_from_top_level): Use previous_class_level, not
5402 previous_class_type.
5403 * name-lookup.h (cp_class_binding): New type.
5404 (cp_binding_level): Use a vector object for class_shadowed.
5405 (push_binding_level): Declare.
5406 (set_class_shadows): Remove.
5408 2004-07-07 Andrew Pinski <apinski@apple.com>
5410 * class.c (instantiate_type): BUFFER_REF is dead.
5411 * lex.c (init_operators): IN_EXPR is dead.
5413 2004-07-07 Jason Merrill <jason@redhat.com>
5416 * call.c (build_new_op): Give overload warnings for built-in
5419 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
5422 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
5425 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
5427 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
5428 * class.c (build_primary_vtable, check_bases,
5429 determine_primary_base, finish_struct_bits,
5430 maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
5431 get_basefndecls, warn_hidden, walk_subobject_offsets,
5432 build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
5433 layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
5434 finish_struct_1, get_vfield_name, contains_empty_class_p,
5435 dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
5436 dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
5437 add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
5439 * decl.c (xref_basetypes): Likewise.
5440 * dump.c (cp_dump_tree): Likewise.
5441 * error.c (dump_expr): Likewise.
5442 * init.c (sort_mem_initializers, expand_member_init,
5443 push_base_cleanups): Likewise.
5444 * method.c (do_build_copy_constructor, do_build_assign_reg,
5445 synthesize_exception_spec): Likewise.
5446 * name-lookup.c (arg_assoc_class): Likewise.
5447 * pt.c (instantiate_class_template, tsubst,
5448 get_template_base_recursive): Likewise.
5449 * ptree.c (cxx_print_type): Likewise.
5450 * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
5451 * search.c (lookup_base_r, dynamic_cast_base_recurse,
5452 dfs_access_in_type, access_in_type, lookup_field_queue_p,
5453 bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
5454 marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
5455 dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
5456 binfo_for_vtable, copied_binfo, original_binfo): Likewise
5457 * tree.c (copy_base_binfos, make_binfo): Likewise.
5458 * typeck.c (commmon_base_type): Likewise
5459 * typeck2.c (process_init_constructor): Likewise
5461 2004-07-06 Joseph S. Myers <jsm@polyomino.org.uk>
5463 * decl.c (check_tag_decl): Name redeclared type in diagnostic.
5465 2004-07-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5468 * pt.c (convert_nontype_argument): Disallow conversions between
5469 different enumeration types.
5471 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
5473 * cp-tree.h (BINFO_MARKED): Remove.
5474 (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
5475 BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
5476 BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
5477 (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
5478 * class.c (build_base_path): Use BINFO_VIRTUAL_P.
5479 (mark_primary_bases, determine_primary_base, base_derived_from,
5480 dfs_find_final_overrider, dfs_find_final_overrider_q,
5481 dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
5482 dfs_modify_vtables, walk_subobject_offsets,
5483 layout_nonempty_base_or_field, build_base_field,
5484 build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
5485 end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
5486 finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
5487 build_ctor_vtbl_group, accumulate_vtble_inits,
5488 dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
5489 build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
5490 add_vcall_offset_vtbl_entries_1): Likewise.
5491 * decl.c (xref_basetypes): Incomming virtual base indicated by
5493 * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
5494 * init.c (finish_init_stmts, sort_mem_initializers,
5495 emit_mem_initializers, build_vtble_address, expand_member_init,
5496 push_base_cleanups): Likewise.
5497 * method.c (do_build_copy_constructor): Likewise.
5498 * pt.c (instantiate_class_template,
5499 get_template_base_recursive): Likewise.
5500 * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
5501 get_pseudo_ti_desc): Likewise.
5502 * search.c (lookup_base_r, dynamic_cast_base_recurse,
5503 binfo_from_vbase, binfo_via_virtual, copied_binfo,
5504 original_binfo): Likewise.
5505 * semantics.c (finish_base_specifier): Virtualness is indicated
5507 * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
5509 2004-07-06 Mark Mitchell <mark@codesourcery.com>
5512 2004-06-24 Jason Merrill <jason@redhat.com>
5514 * decl.c (grokparms): Give the PARM_DECL reference type if the
5515 parameter is passed by invisible reference.
5517 2004-07-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5519 * cp-lang.c (cp_var_mod_type_p): Add extra arg.
5520 * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
5521 * pt.c (check_instantiated_args, unify): Likewise.
5523 2004-07-05 Phil Edwards <phil@codesourcery.com>
5525 * Make-lang.in (check-c++, lang_checks): Add some comments.
5527 2004-07-05 Zack Weinberg <zack@codesourcery.com>
5529 * cp-mudflap.c: Delete file.
5530 * Makefile.in: Remove all references to cp-mudflap.o.
5532 2004-07-05 Zack Weinberg <zack@codesourcery.com>
5534 * decl.c (cxx_init_decl_processing): Call
5535 build_common_tree_nodes before creating the global NAMESPACE_DECL.
5537 2004-07-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5540 * call.c (build_operator_new_call): Look only at global scope.
5542 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
5544 * call.c (enforce_access): Expect TREE_BINFO.
5545 * class.c (binfo_ctor_vtable): Check TREE_BINFO.
5546 * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
5547 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
5549 (BINFO_LANG_ELTS): Remove.
5550 (BINFO_LANG_SLOTS): New.
5551 (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
5552 (CLASSTYPE_TEMPLATE_INFO): Adjust.
5553 * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
5554 * search.c (lookup_member): Check TREE_BINFO.
5555 * semantics.c (perform_or_defer_access_check): Likewise.
5556 (check_accessibility_of_qualified_id): Check
5557 deferred_access_no_check.
5558 * tree.c (make_binfo): Use make_tree_binfo.
5560 2004-07-04 Mark Mitchell <mark@codesourcery.com>
5562 * method.c (implicitly_declare_fn): Set linkage of generated
5565 2004-07-04 Richard Henderson <rth@redhat.com>
5567 * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
5569 2004-07-03 Scott Brumbaugh <scottb.lists@verizon.net>
5572 * name-lookup.c (push_class_level_binding): Don't pass a
5573 TREE_LIST of ambiguous names to check_template_shadow as it
5574 only handles declarations. Instead, pull the declaration
5577 2004-07-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5580 * pt.c (check_explicit_specialization): Clarify error message.
5582 2004-07-02 Richard Henderson <rth@redhat.com>
5584 * tree.c (cp_unsave_r): Update remap_save_expr call.
5586 2004-07-02 Mark Mitchell <mark@codesourcery.com>
5589 * mangle.c (write_template_arg): Correct mangling.
5592 * decl.c (grokdeclarator): Robustify.
5594 2004-07-01 Richard Henderson <rth@redhat.com>
5596 * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
5597 * method.c (synthesize_method): Don't clear_last_expr.
5598 * name-lookup.c (maybe_push_cleanup_level): Likewise.
5600 2004-07-01 Nick Clifton <nickc@redhat.com>
5602 * decl2.c (import_export_class): Invoke the
5603 import_export_class field in the gcc_target structure if it is not
5606 2004-06-30 Richard Henderson (rth@redhat.com>
5608 * decl.c (start_preparsed_function): Don't set immediate_size_expand.
5609 * method.c (use_thunk): Likewise.
5611 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
5613 * call.c (build_over_call), typeck.c (build_function_call): Call
5614 check_function_arguments instead of check_function_format.
5616 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
5618 * call.c (build_over_call), typeck.c (build_function_call): Update
5619 calls to check_function_format.
5621 2004-06-30 Richard Henderson <rth@redhat.com>
5623 * call.c (build_over_call): Use __builtin_memcpy for copying
5624 CLASS_AS_BASE rather than funny casting.
5626 2004-06-30 Richard Henderson <rth@redhat.com>
5628 * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
5629 TYPE_SIZE_UNIT of full_type.
5631 2004-06-30 Per Bothner <per@bothner.com>
5633 Conditionally compile support for --enable-mapped_location.
5634 * decl.c (pop_label): Handle (imperfectly) USE_MAPPED_LOCATION case.
5635 * decl2.c: If USE_MAPPED_LOCATION, don't do some line number
5636 adjustments - which I don't understand.
5637 * error.c (dump_decl): Rename "<interrnal>" to "<built-in>".
5638 * error.c: Use LOCATION_FILE and EXPR_LOCATION macros.
5639 (print_instantiation_partial_context): Use expand_location.
5640 * decl.c (duplicate_decl): Use new DECL_IS_BUILTIN macro.
5641 * name-lookup.c: Likewise.
5642 * lex.c (cxx_init): Likewise. Also use BUILTINS_LOCATION.
5643 * name-lookup.c: Use input_line macro.
5644 * parser.c (cp_lexer_get_preprocessor_token): Use UNKNOWN_LOCATION.
5645 (cp_parser_statement): Rename locaal variable statement_locus to
5646 statement_location and use SET_EXPR_LOCATION macro.
5647 * pt.c: Handle USE_MAPPED_LOCATION case. Use new macros.
5648 * tree.c (cp_walk_subtrees): Likewise.
5650 2004-06-29 Per Bothner <per@bothner.com>
5652 * tree.c (build_min_nt, build_min, build_min_non_dep):
5653 Don't set TREE_COMPLEXITY from input_line.
5655 2004-06-29 Paul Brook <paul@codesourcery.com>
5657 * init.c: Include target.h.
5658 (get_cookie_size): Remove and replace with target hook.
5660 (build_new_1): Store the element size in the cookie.
5662 2004-06-29 Nathan Sidwell <nathan@codesourcery.com>
5665 * parser.c (cp_parser_template_declaration_after_export): Disable
5666 access checks here ...
5667 (cp_parser_class_specifier): ... not here.
5669 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
5671 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
5672 VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
5673 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
5676 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
5678 * cp-tree.h (struct deferred_access): Move to ...
5679 * semantics.c (struct deferred_access): ... here. Adjust.
5680 (deferred_access_stack): Make a VEC(deferred_access),
5681 (deferred_access_free_list): Remove.
5682 (deferred_access_no_check): New.
5683 (push_deferring_access_checks, resume_deferring_access_checks,
5684 stop_deferring_access_checks, pop_deferring_access_checks,
5685 get_deferred_access_checks, pop_to_parent_deferring_access_checks,
5686 perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
5688 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
5691 * call.c (build_temp): Declare.
5692 (check_constructor_callable): New.
5693 (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
5694 CONSTRUCTOR_CALLABLE.
5695 (convert_like_real, initialize_reference): Use
5696 check_constructor_callable.
5697 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
5698 (LOOKUP_*): Renumber.
5700 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
5702 * friend.c (add_friend): Only perform access checks when context
5704 * lex.c (cxx_make_type): Only create a binfo for aggregate types.
5705 * parser.c (cp_parser_class_specifier): Disable access checks here
5706 when parsing the body of a templated class.
5707 * semantics.c (perform_or_defer_access_checks): Reorder to allow
5708 NULL binfos when not checking access.
5710 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
5712 Use vector API for vbase list.
5713 * cp-tree.h: Include vec.h
5714 (DEF_VEC_P (tree)): New type.
5715 (struct lang_type_class): Change vbase's member type.
5716 (binfo_for_vbase): Declare.
5717 * class.c (determine_primary_base, base_derived_from,
5718 update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
5719 warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
5720 build_vtbl_initializer): Adjust.
5721 * decl.c (xref_basetypes): Adjust, accumulate upper bound of
5723 * init.c (sort_mem_initializers, expand_member_init,
5724 push_base_cleanups): Adjust.
5725 * method.c (do_build_copy_constructor): Adjust.
5726 * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
5727 (binfo_for_vbase): New.
5728 * tree.c (copy_base_binfos): Adjust.
5730 2004-06-28 Mark Mitchell <mark@codesourcery.com>
5732 * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
5734 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
5737 * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
5738 paranthesis in case of pointers to array members.
5739 * error.c (dump_type_prefix): Likewise.
5740 (dump_type_suffix): Maybe issue a whitespace when printing
5743 2004-06-27 Mark Mitchell <mark@codesourcery.com>
5746 * parser.c (cp_parser_set_decl_spec_type): Refine test for
5747 redefinition of built-in types.
5749 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
5751 * error.c (pp_template_argument_list_start): Remove.
5752 (pp_template_argument_list_end): Likewise.
5753 (pp_separate_with_comma): Use pp_cxx_separate_with.
5754 (reinit_global_formatting_buffer): Remove.
5755 (pp_non_consecutive_character): Likewise.
5756 (dump_scope): Use pp_cxx_colon_colon.
5757 (dump_template_parameter): Use pp_cxx_identifier,
5758 pp_cxx_tree_identifier and pp_cxx_whitespace.
5759 (dump_templat_bindings): Replace use of pp_string with sequence
5760 of pp_cxx_whitespace and pp_equal.
5761 (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
5762 pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set
5764 (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
5765 (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace,
5766 pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
5767 (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
5768 pp_cxx_right_bracket, pp_cxx_identifier throughout,
5769 (dump_decl): Likewise.
5770 (dump_template_decl): Likewise.
5771 (dump_function_decl): Likewise. Set padding as appropriate.
5772 (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
5774 (dump_exception_spec): Likewise.
5775 (dump_function_name): Use pp_cxx_tree_identifier and
5777 (dump_template_parms): Use pp_cxx_begin_template_argument_list and
5778 pp_cxx_end_template_argument_list.
5779 (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
5780 pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
5781 pp_cxx_whitespace throughout.
5782 (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
5784 (dump_unary_op): Likewise.
5785 (reinit_cxx_pp): New function.
5786 (type_as_string); Use it.
5787 (expr_as_string): Likewise.
5788 (decl_as_string); Likewise.
5789 (context_as_string): Likewise.
5790 (lang_decl_name): Likewise.
5791 (decl_to_string): Likewise.
5792 (expr_to_string): Likewise.
5793 (parm_to_string): Likewise.
5794 (type_to_string): Likewise.
5795 (args_to_string): Likewise.
5796 (cv_to_string): Likewise.
5798 2004-06-26 Mark Mitchell <mark@codesourcery.com>
5800 * cp-tree.h (cp_cv_quals): New type.
5801 (cp_declarator): Use it instead of "tree" as appropriate.
5802 (grok_method_quals): Adjust prototype.
5803 (grokclassfn): Likewise.
5804 (do_friend): Likewise.
5805 * decl.c (grokfndecl): Use cp_cv_quals, not tree.
5806 (grokdeclarator): Likewise.
5807 * decl2.c (grok_method_quals): Likewise.
5808 (grokclassfn): Likewise.
5809 * friend.c (do_friend): Likewise.
5810 * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
5811 * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
5812 (make_pointer_declarator): Likewise.
5813 (make_reference_declarator): Likewise.
5814 (make_ptrmem_declarator): Likewise.
5815 (cp_parser_ptr_operator): Likewise.
5816 (cp_parser_cv_qualifier_seq_opt): Likewise.
5817 (cp_parser_cv_qualifier_opt): Remove.
5818 (cp_parser_new_declarator_opt): Adjust call to
5819 cp_parser_ptr_operator.
5820 (cp_parser_conversion_declaration_opt): Likewise.
5821 (cp_parser_declarator): Use cp_cv_quals, not tree.
5822 (cp_parser_direct_declarator): Likewise.
5824 2004-06-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5826 * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
5827 Rename DECL_STMT to DECL_EXPR.
5828 * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
5829 * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
5830 * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
5832 2004-06-26 Jan Hubicka <jh@suse.cz>
5835 * decl2.c (maybe_emit_vtables): Always import_export_vtable for the
5836 reachability analysis.
5838 2004-06-25 Mark Mitchell <mark@codesourcery.com>
5840 * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
5843 2004-06-25 Paul Brook <paul@codesourcery.com>
5845 * decl2.c (get_guard): Call targetm.cxx.guard_type.
5846 (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
5848 2004-06-24 Mark Mitchell <mark@codesourcery.com>
5850 * decl.c (grokdeclarator): Restore error messages about __thread.
5851 * parser.c (cp_parser_decl_specifier_seq): Likewise.
5853 2004-06-24 Jason Merrill <jason@redhat.com>
5856 * decl.c (grokparms): Give the PARM_DECL reference type if the
5857 parameter is passed by invisible reference.
5859 2004-06-24 Andreas Schwab <schwab@suse.de>
5861 * cp-tree.h (enum cp_storage_class): Remove trailing comma.
5863 2004-06-23 Mark Mitchell <mark@codesourcery.com>
5865 * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
5866 (cp/decl.o): Likewise.
5867 (cp/decl2.o): Likewise.
5868 (cp/pt.o): Likewise.
5869 (cp/semantics.o): Likewise.
5870 * config-lang.in (gtfiles): Do not reference cp/lex.h.
5871 * class.c: Do not include lex.h.
5872 (add_implicitly_declared_members): Do not use
5873 adding_implicit_members.
5874 (check_bases_and_members): Do not talk about grok_x_components.
5875 * cp/cp-tree.h (adding_implicit_members): Remove.
5876 (cp_storage_class): New type.
5877 (cp_decl_spec): Likewise.
5878 (cp_decl_specifier_seq): Likewise.
5879 (cp_parameter_declarator): Use it for the decl_specifiers field.
5880 (check_tag_decl): Adjust prototype.
5881 (shadow_tag): Likewise.
5882 (groktypename): Likewise.
5883 (start_decl): Likewise.
5884 (start_function): Likewise.
5885 (start_method): Likewise.
5886 (grok_x_components): Remove.
5887 (grokfield): Adjust prototype.
5888 (grokbitfield): Likewise.
5889 (finish_member_class_template): Remove.
5890 * decl.c: Do not include lex.h.
5891 (adding_implicit_members): Do not define.
5892 (check_tag_decl): Do not use trees to represent decl-specifiers.
5893 (shadow_tag): Likewise.
5894 (groktypename): Likewise.
5895 (start_decl): Likewise.
5896 (grokvardecl): Likewise.
5897 (grokdeclarator): Likewise.
5898 (grokparms): Likewise.
5899 (start_function): Likewise.
5900 (start_method): Likewise.
5901 * decl.h (grokdeclarator): Adjust prototype.
5902 * decl2.c: Do not include lex.h.
5903 (grok_x_components): Remove.
5904 (grokfield): Do not use trees to represent decl-specifiers.
5905 (grokbitfield): Likewise.
5906 * lex.c: Do not include lex.h.
5908 * parser.c: Include target.h.
5909 (clear_decl_specs): New function.
5910 (cp_parser_translation_unit): Do not use trees to represent
5912 (cp_parser_postfix_expression): Likewise.
5913 (cp_parser_new_type_id): Likewise.
5914 (cp_parser_condition): Likewise.
5915 (cp_parser_simple_declaration): Likewise.
5916 (cp_parser_decl_specifier_seq): Likewise.
5917 (cp_parser_function_specifier_opt): Likewise.
5918 (cp_parser_conversion_type_id): Likewise.
5919 (cp_parser_template_parameter): Likewise.
5920 (cp_parser_explicit_instantiation): Likewise.
5921 (cp_parser_type_specifier): Likewise.
5922 (cp_parser_simple_type_specifier): Likewise.
5923 (cp_parser_init_declarator): Likewise.
5924 (cp_parser_type_id): Likewise.
5925 (cp_parser_type_specifier_seq): Likewise.
5926 (cp_parser_parameter_declaration): Likewise.
5927 (cp_parser_member_declaration): Likewise.
5928 (cp_parser_exception_declaration): Likewise.
5929 (cp_parser_function_definition_from_specifiers_and_declarator):
5931 (cp_parser_single_declaration): Likewise.
5932 (cp_parser_save_member_function_body): Likewise.
5933 (cp_parser_friend_p): Likewise.
5934 (cp_parser_set_storage_class): New function.
5935 (cp_parser_set_decl_spec_type): Likewise.
5936 * pt.c: Do not include lex.h.
5937 * semantics.c: Likewise.
5938 (finish_member_class_template): Remove.
5940 2004-06-23 Roger Sayle <roger@eyesopen.com>
5942 * call.c (build_cxx_call): Don't call expand_tree_builtin. No
5943 longer take both "args" and "convert_args" as arguments.
5944 (build_op_delete_call): Update call to build_cxx_call.
5945 (build_over_call): Likewise, update call to build_cxx_call.
5946 * cp-tree.h (build_cxx_call): Update funtion prototype.
5947 * typeck.c (build_function_call): Don't call expand_tree_builtin.
5948 * rtti.c (throw_bad_cast): Update call to build_cxx_call.
5949 (throw_bad_typeid): Likewise.
5950 (build_dynamic_cast_1): Likewise.
5952 2004-06-22 Richard Henderson <rth@redhat.com>
5954 * class.c (build_vfn_ref): Take a pointer not object. Build
5956 (cp_fold_obj_type_ref): New.
5957 * call.c (build_over_call): Update build_vfn_ref call.
5958 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
5959 * cp-tree.h (cp_fold_obj_type_ref): Declare.
5961 2004-06-21 Jason Merrill <jason@redhat.com>
5964 * cp-gimplify.c (cp_gimplify_init_expr): Look through
5967 2004-06-21 Mark Mitchell <mark@codesourcery.com>
5969 * cp-tree.def (NEW_EXPR): Add a fourth slot.
5970 * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
5971 (TREE_PARMLIST): Likewise.
5972 (CALL_DECLARATOR_PARMS): Likewise.
5973 (CALL_DECLARATOR_QUALS): Likewise.
5974 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
5975 (cp_declarator_kind): New type.
5976 (cp_parameter_declarator): Likewise.
5977 (cp_declarator): Likewise.
5978 (cp_error_declarator): Likewise.
5979 (no_parameters): Likewise.
5980 (groktypename): Change prototype.
5981 (start_decl): Likewise.
5982 (start_handler_parms): Likewise.
5983 (get_scope_of_declarator): Likewise.
5984 (start_function): Likewise.
5985 (start_preparsed_function): New function.
5986 (start_function): Change prototype.
5987 (start_method): Likewise.
5988 (grokfield): Likewise.
5989 (grokbitfield): Likewise.
5990 (build_new): Likewise.
5991 (make_pointer_declarator): Remove.
5992 (make_reference_declarator): Likewise.
5993 (make_call_declarator): Likewise.
5994 (set_quals_and_spec): Likewise.
5995 (process_template_parm): Change prototype.
5996 (begin_function_definition): Remove.
5997 (finish_parmlist): Remove.
5998 * decl.c (groktypename): Do not use trees to represent
6000 (start_decl): Likewise.
6001 (start_handler_parms): Remove.
6002 (get_scope_of_declarator): Reimplement.
6003 (grokdeclarator): Do not use trees to represent declarators.
6004 (grokparms): Likewise.
6005 (start_function): Likewise.
6006 (start_method): Likewise.
6007 (build_void_list_mode): Do not use TREE_PARMLIST.
6008 * decl.h (grokdeclarator): Change prototype.
6009 * decl2.c (grok_method_quals): Robustify.
6010 (grok_x_components): Do not use trees to represent declarators.
6011 (grokfield): Likewise.
6012 (grokbitfield): Likewise.
6013 (start_objects): Build FUNCTION_DECLs, not declarators.
6014 (start_static_storage_duration_function): Likewise.
6015 * init.c (build_new): Simplify.
6016 * lex.c (make_pointer_declarator): Remove.
6017 (make_reference_declarator): Likewise.
6018 (make_call_declarator): Likewise.
6019 (set_quals_and_spec): Likewise.
6020 * method.c (use_thunk): Use start_preparsed_function.
6021 (synthesize_method): Likewise.
6022 (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
6023 * optimize.c (maybe_clone_body): Use start_preparsed_function.
6024 * parser.c (cp_error_declarator): New variable.
6025 (declarator_obstack): Likewise.
6026 (alloc_declarator): New function.
6027 (make_declarator): Likewise.
6028 (make_id_declarator): Likewise.
6029 (make_pointer_declarator): Likewise.
6030 (make_reference_declarator): Likewise.
6031 (make_ptrmem_declarator): Likewise.
6032 (make_call_declarator): Likewise.
6033 (make_array_declarator): Likewise.
6034 (no_parameters): New variable.
6035 (make_parameter_declarator): Likewise.
6036 (cp_parser_check_for_definition_in_return_type): Do not use trees
6037 to represent declarators.
6038 (cp_parser_translation_unit): Likewise.
6039 (cp_parser_new_expression): Likewise.
6040 (cp_parser_new_type_id): Likewise.
6041 (cp_parser_new_declarator_opt): Likewise.
6042 (cp_parser_direct_new_declarator): Likewise.
6043 (cp_parser_condition): Likewise.
6044 (cp_parser_declaration_statement): Likewise.
6045 (cp_parser_declaration): Likewise.
6046 (cp_parser_conversion_type_id): Likewise.
6047 (cp_parser_conversion_declarator_opt): Likewise.
6048 (cp_parser_template_parameter_list): Likewise.
6049 (cp_parser_template_parameter): Likewise.
6050 (cp_parser_explicit_instantiation): Likewise.
6051 (cp_parser_init_declarator): Likewise.
6052 (cp_parser_declarator): Likewise.
6053 (cp_parser_direct_declarator): Likewise.
6054 (cp_parser_type_id): Likewise.
6055 (cp_parser_parameter_declaration_clause): Likewise.
6056 (cp_parser_parameter_declaration_list): Likewise.
6057 (cp_parser_parameter_declaration): Likewise.
6058 (cp_parser_member_declaration): Likewise.
6059 (cp_parser_exception_declaration): Likewise.
6060 (cp_parser_check_declarator_template_parameters): Likewise.
6061 (cp_parser_function_definition_from_specifiers_and_declarator):
6063 (cp_parser_save_member_function_body): Likewise.
6064 * pt.c (process_template_parm): Add is_non_type parameter.
6065 (convert_template_argument): Adjust call to groktypename.
6066 (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
6067 (tsubst): Do not expect declarators.
6068 (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
6070 (instantiate_decl): Use start_preparsed_function.
6071 * semantics.c (begin_function_definition): Remove.
6072 (finish_parmlist): Remove.
6073 * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
6076 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6078 * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
6079 (build_new_method_call): Likewise.
6080 * decl.c (local_variable_p_walkfn): Don't walk into types.
6081 * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
6082 (build_anon_union_vars): Add new operand for COMPONENT_REF.
6083 * init.c (buld_new): Add new operand for ARRAY_REF.
6084 * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
6085 (do_build_assign_ref): Likewise.
6086 * parser.c (cp_parser_direct_new_declarator): Add new operands
6088 (cp_parser_direct_declarator): Likewise.
6089 * pt.c (tsubst): Likewise.
6090 (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
6092 * semantics.c (finish_non_static_data_member): Add new operand
6094 * typeck.c (build_class_member_access_expr): Likewise.
6095 (build_class_member_access_expr, finish_class_member_access_expr):
6097 (build_ptrmemfunc_access_expr): Likewise.
6098 (build_array_ref): Add new operands for ARRAY_REF.
6099 * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
6100 * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
6102 2004-06-21 Richard Henderson <rth@redhat.com>
6104 * dump.c (cp_dump_tree): Don't use dump_next_stmt.
6105 * parser.c (cp_parser_jump_statement): Update commentary.
6106 * pt.c (tsubst_expr): Use RETURN_EXPR.
6107 * semantics.c (finish_return_stmt): Likewise.
6108 (finalize_nrv_r): Likewise.
6109 * typeck.c, typeck2.c: Update file start commentary.
6111 2004-06-21 Richard Henderson <rth@redhat.com>
6113 * semantics.c (finish_expr_stmt): Call verify_sequence_points.
6115 2004-06-20 Richard Henderson <rth@redhat.com>
6117 * cp-tree.h (add_decl_stmt): Declare.
6118 * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
6119 * semantics.c (maybe_cleanup_point_expr): New.
6120 (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
6121 finish_for_expr, finish_switch_cond): Use it.
6122 (finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN.
6124 2004-06-20 Richard Henderson <rth@redhat.com>
6126 * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
6127 * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
6128 (cp_gimplify_expr): Call it.
6129 (gimplify_cleanup_stmt): Move from c-gimplify.c.
6130 (cp_genericize): New.
6131 * decl.c (finish_function): Call it.
6132 * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
6133 (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
6134 (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
6135 (cp_genericize): Declare.
6136 * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
6137 * dump.c (cp_dump_tree): Likewise.
6138 * semantics.c (push_cleanup): Move from c-semantics.c.
6140 2004-06-20 Zack Weinberg <zack@codesourcery.com>
6142 * cp-lang.c (has_c_linkage): Implement.
6144 * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
6145 * decl.c (duplicate_decls): Use COPY_DECL_RTL.
6146 (builtin_function_1): Don't call make_decl_rtl.
6147 (build_cp_library_fn): Don't call set_mangled_name_for_decl.
6148 (grokvardecl): Don't call mangle_decl.
6149 * except.c (nothrow_libfn_p): Look at DECL_NAME, not
6150 DECL_ASSEMBLER_NAME.
6151 * method.c (set_mangled_name_for_decl): Delete.
6152 * name-lookup.c (pushdecl): When a local extern shadows a
6153 file-scope declaration of the same object, give both DECLs the
6155 * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
6156 on DECL_ASSEMBLER_NAME.
6158 2004-06-19 Richard Henderson <rth@redhat.com>
6160 * cp-gimplify.c: Remove unnecessary prototypes.
6161 (cp_gimplify_stmt): Merge into ...
6162 (cp_gimplify_expr): ... here. Move to end of file. Handle
6163 stmts_are_full_exprs_p frobbing.
6164 * cp-tree.h (cp_gimplify_stmt): Remove.
6165 * pt.c (tsubst_expr): Merge prep_stmt and unify.
6166 * tree.c (init_tree): Don't set lang_gimplify_stmt.
6168 2004-06-18 Richard Henderson <rth@redhat.com>
6171 * semantics.c (begin_cond): New.
6172 (finish_cond): Rewrite to handle template DECL_STMTs specially.
6173 Assume that non-template decls go land before the conditional.
6174 (simplify_loop_decl_cond): Likewise.
6175 (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
6176 finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
6177 begin_switch_stmt, finish_switch_cond): Update to match.
6179 2004-06-17 Jason Merrill <jason@redhat.com>
6182 * semantics.c (simplify_aggr_init_expr): Don't return the slot.
6183 (finish_stmt_expr_expr): Update type after conversions.
6184 (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
6185 Handle void initializer.
6186 * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
6188 2004-06-17 Geoffrey Keating <geoffk@apple.com>
6190 * class.c (build_clone): Don't call defer_fn, let mark_used do it.
6191 * cp-tree.h (defer_fn): Delete.
6192 * decl2.c (defer_fn): Delete.
6193 (finish_file): Simplify deferred_fns loops; check that
6194 only used inline functions get into deferred_fns.
6195 (mark_used): Inline previous contents of defer_fn.
6197 2004-06-16 Richard Henderson <rth@redhat.com>
6199 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
6200 (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
6201 * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
6202 of CTOR_INITIALIZER ...
6203 (pp_cxx_statement): ... here.
6204 * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
6205 (finish_function): Use alloc_stmt_list to zap entire function.
6206 * parser.c (cp_parser_compound_statement): Update commentary.
6207 * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
6208 * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
6209 (finish_stmt_expr): Don't look through COMPOUND_STMT.
6211 2004-06-16 Geoffrey Keating <geoffk@apple.com>
6213 * pt.c (mark_decl_instantiated): Don't call defer_fn.
6215 2004-06-16 Richard Henderson <rth@redhat.com>
6217 * parser.c (cp_parser_labeled_statement): Update commentary.
6218 * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
6219 * tree.c (mark_local_for_remap_r): Likewise.
6221 2004-06-16 Richard Henderson <rth@redhat.com>
6223 * parser.c (cp_parser_asm_definition): Update commentary.
6224 * pt.c (tsubst_expr): Use ASM_EXPR.
6225 * semantics.c (finish_asm_stmt): Likewise.
6227 2004-06-16 Richard Henderson <rth@redhat.com>
6229 * decl.c (finish_destructor_body): Use LABEL_EXPR.
6230 * parser.c (cp_parser_statement): Update commentary.
6231 * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
6232 * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
6233 * tree.c (mark_local_for_remap_r): Likewise.
6235 2004-06-16 Richard Henderson <rth@redhat.com>
6238 * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
6239 statement in FOR_INIT_STMT for templates.
6241 2004-06-15 Richard Henderson <rth@redhat.com>
6243 * call.c (initialize_reference): Don't build CLEANUP_STMT here.
6244 * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
6245 (genericize_try_block): Use gimplify_stmt.
6246 (genericize_catch_block, genericize_eh_spec_block): Likewise.
6247 (cp_gimplify_init_expr): Remove STMT_EXPR special case.
6248 (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
6249 * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
6250 (cp_tree_chain_matters_p): Remove.
6251 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
6252 (COMPOUND_STMT_BODY_BLOCK): New.
6253 (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
6254 (EXPR_STMT_STMT_EXPR_RESULT): New.
6255 (building_stmt_tree): Check cur_stmt_list.
6256 (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
6257 (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
6258 * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
6259 (cp_finish_decl): Use push_cleanup.
6260 (start_function, finish_function): Use statement lists.
6261 (finish_stmt): Do nothing.
6262 * except.c (begin_eh_spec_block): Use statement lists.
6263 (check_handlers_1, check_handlers): Likewise.
6264 * init.c (construct_virtual_base): Don't add extra compound stmts.
6265 (build_vec_init): Likewise.
6266 * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
6267 * name-lookup.h (struct cp_binding_level): Add statement_list.
6268 * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
6269 (cp_parser_labeled_statement, cp_parser_expression_statement,
6270 cp_parser_statement_seq_opt): Likewise.
6271 (cp_parser_compound_statement): Likewise. Take bool for try block.
6272 (cp_parser_selection_statement): Tidy if processing.
6273 (cp_parser_already_scoped_statement): Rewrite to do what it says.
6274 * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
6275 (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST.
6276 Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
6277 * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
6278 (finish_cond): New, rewritten from FINISH_COND.
6279 (simplify_loop_decl_cond): New.
6280 (finish_expr_stmt): Avoid nested EXPR_STMTs.
6281 (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
6282 begin_else_clause, finish_else_clause, finish_if_stmt,
6283 begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
6284 begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
6285 finish_for_cond, finish_for_stmt, begin_switch_stmt,
6286 finish_switch_cond, finish_switch_stmt, begin_try_block,
6287 finish_try_block, finish_cleanup_try_block, finish_function_try_block,
6288 finish_handler_sequence, finish_function_handler_sequence,
6289 begin_handler, finish_handler_parms, finish_handler,
6290 begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
6291 using statement lists.
6292 (begin_compound_stmt): Replace has_no_scope argument with flags.
6293 Update all callers. Use statement lists.
6294 (finish_compound_stmt): Likewise.
6295 (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
6296 (current_scope_stmt_stack): Remove.
6297 (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
6298 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
6299 Rewrite with statement lists.
6301 2004-06-15 Alexandre Oliva <aoliva@redhat.com>
6303 * parser.c: Change all assignments of c_lex_string_translate
6304 to true and false to 1 and 0.
6305 (cp_lexer_read_token): Convert type of the translated string.
6306 (cp_parser_skip_to_closing_parentheses): Preserve original
6307 value of c_lex_string_translate, and set it to -1 while
6309 (cp_parser_cache_group): Likewise.
6310 (cp_parser_cache_group_1): Renamed.
6311 (cp_parser_asm_operand_list): Remove redundant setting of
6312 c_lex_string_translate.
6313 (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
6314 Handle chained strings.
6316 2004-06-12 Andrew Pinski <apinski@apple.com>
6320 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
6322 * cp-tree.h: Fix typo.
6324 * cp-tree.h: Include cgraph.h
6325 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
6326 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
6328 2004-06-12 Jason Merrill <jason@redhat.com>
6330 PR tree-optimization/14107
6331 * decl.c (finish_function): Warn about no return in all functions.
6333 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
6335 * cp-tree.h (struct language_function): Remove cannot_inline.
6336 * decl.c (save_function_data): cannot_inline is no more.
6337 (cxx_push_function_context): Likewise.
6338 * decl2.c (start_objects, start_static_storage_duration_function):
6339 Reset DECL_INLINE, set DECL_UNINLINABLE.
6341 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6344 * search.c (lookup_field): Propagate the ambiguity list.
6345 (lookup_fnfields): Likewise.
6347 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6350 * parser.c (cp_parser_template_name): Ctors/dtors never need a
6351 template keyword to disambiguate.
6353 2004-06-14 Mark Mitchell <mark@codesourcery.com>
6356 * decl.c (grokdeclarator): Ignore pointer-to-members when
6357 computing template depth.
6360 * name-lookup.c (pushtag): Do not try to put class declarations in
6361 explicit specialization scopes.
6363 2004-06-11 Andrew Pinski <pinskia@physics.uc.edu>
6365 * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
6367 2004-06-11 Mark Mitchell <mark@codesourcery.com>
6370 * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
6371 bindings for undeclared built-ins.
6373 2004-06-11 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6375 * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
6376 appear at the correct location.
6378 2004-06-10 Jason Merrill <jason@redhat.com>
6382 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6383 * init.c (build_offset_ref): Build SCOPE_REF with non-null
6384 TREE_TYPE for non-dependent names.
6385 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
6386 unknown_type_node as its TREE_TYPE.
6387 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
6388 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
6389 (dump_expr) <SCOPE_REF case>: Likewise.
6391 2004-06-10 Mark Mitchell <mark@codesourcery.com>
6394 * parser.c (cp_parser_direct_declarator): Robustify.
6397 * pt.c (tsubst_copy): Use decl_constant_value on enumeration
6398 constants in non-dependent contexts.
6402 * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
6405 2004-06-10 Jakub Jelinek <jakub@redhat.com>
6408 * decl.c (duplicate_decls): Handle fileptr_type_node arguments
6411 2004-06-09 Mark Mitchell <mark@codesourcery.com>
6415 2004-06-07 Mark Mitchell <mark@codesourcery.com>
6416 * lex.c (handle_pragma_interface): Deprecate.
6417 (handle_pragma_implementation): Likewise.
6419 2004-06-09 Andrew Pinski <pinskia@physics.uc.edu>
6421 * g++spec.c (lang_specific_driver): Remove check for -lm
6422 and -lmath when check it see if it was the math library.
6424 2004-06-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6427 * parser.c (cp_parser_direct_declarator): Reject constructor named
6428 as qualified template-id.
6430 2004-06-07 Mark Mitchell <mark@codesourcery.com>
6433 * lex.c (handle_pragma_interface): Deprecate.
6434 (handle_pragma_implementation): Likewise.
6436 2004-06-07 Mark Mitchell <mark@codesourcery.com>
6439 * parser.c (cp_parser_iteration_statement): Fix typo in error
6443 * pt.c (tsubst_default_argument): Do not defer access checks
6444 while substituting into the default argument.
6447 * pt.c (tsubst_copy): Do not try to substitute for an enumeration
6448 constant in a non-dependent context.
6451 * except.c (build_throw): Ensure that temp_expr has been
6454 2004-06-06 Roger Sayle <roger@eyesopen.com>
6456 * cp/cp-tree.h (lvalue_or_else): Add function prototype.
6458 2004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6461 * parser.c (cp_parser_mem_initializer_id): Gracefully reject
6462 'typename', and accept 'template'.
6464 2004-06-03 Andrew Pinski <pinskia@physics.uc.edu>
6465 Jan Hubicka <jh@suse.cz>
6468 * method.c (use_think): Do not mark thunk as referenced.
6470 2004-06-03 Matt Austern <austern@apple.com>
6473 * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
6474 is nonzero, and if we see a noninline definition of a key method,
6475 make the vtables nonweak.
6477 2004-06-02 Matt Austern <austern@apple.com>
6479 * cp-tree.h (instantiate_decl): new boolean parameter,
6480 undefined_ok. Current behavior is equivalent to its being 0.
6481 * decl2.c (mark_used): Add new argument when calling instantiate_decl
6482 * pt.c (mark_decl_instantiated): Unconditionally make
6483 instantiations explicit unconditionally
6484 (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
6485 since mark_decl_instantiated now does it.
6486 (instantiate_class_member): New. Instantiate a member of an
6487 explicitly instantiated class template.
6488 (do_type_instantiation): Explicitly instantiate members of an
6489 explicitly instantiated class template.
6490 (instantiate_decl): if undefined_ok is nonzero, and if we're
6491 trying to explicitly instantiated a template with no definition,
6492 change it to an implicit instantiation.
6493 (instantiate_pending_templates): Add new argument to instantiate_decl.
6494 * tree.c (cp_cannot_inline_tree_fn): Likewise.
6496 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
6498 * cp-tree.h: Fix typo.
6500 * cp-tree.h: Include cgraph.h
6501 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
6502 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
6504 2004-06-01 Jason Merrill <jason@redhat.com>
6507 * call.c (call_builtin_trap): Remove type parm.
6508 (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
6509 (build_x_va_arg): Dereference a null pointer for a non-POD argument.
6511 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6514 * init.c (build_offset_ref): Build SCOPE_REF with non-null
6515 TREE_TYPE for non-dependent names.
6516 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
6517 unknown_type_node as its TREE_TYPE.
6518 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
6519 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
6520 (dump_expr) <SCOPE_REF case>: Likewise.
6522 2004-06-01 Richard Henderson <rth@redhat.com>
6523 Andrew Pinski <pinskia@physics.uc.edu>
6525 * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
6526 * parser.c (struct cp_parser): Remove in_offsetof.
6527 (cp_parser_new): Don't set it.
6528 (cp_parser_unary_expression): Don't check it.
6529 (cp_parser_postfix_open_square_expression): Split out from ...
6530 (cp_parser_postfix_expression): ... here.
6531 (cp_parser_postfix_dot_deref_expression): Likewise.
6532 (cp_parser_builtin_offsetof): New.
6533 (cp_parser_primary_expression): Use it.
6535 2004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6538 * parser.c (cp_parser_postfix_expression): Allow subscript
6539 operator in offsetof.
6541 2004-05-31 Mark Mitchell <mark@codesourcery.com>
6544 * friend.c (add_friend): Do not try to perform access checks for
6545 functions from dependent classes.
6547 2004-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
6549 * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
6550 (pp_cxx_begin_template_argument_list): Turn into a function.
6551 (pp_cxx_end_template_argument_list): Likewise.
6552 (pp_cxx_separate_with): Define.
6553 (pp_cxx_unqualified_id): Tidy.
6554 (pp_cxx_primary_expression): Likewise.
6555 (pp_cxx_postfix_expression): Likewise.
6556 (pp_cxx_expression): Likewise.
6557 (pp_cxx_simple_type_specifier): Likewise.
6558 (pp_cxx_type_specifier_seq): Likewise.
6559 (pp_cxx_parameter_declaration_clause): Likewise.
6560 (pp_cxx_exception_specification): Likewise.
6561 (pp_cxx_direct_declarator): Likewise.
6562 (pp_cxx_type_id): Likewise.
6563 * cxx-pretty-print.h (pp_cxx_whitespace): Export from
6565 (pp_cxx_left_paren): Likewise.
6566 (pp_cxx_right_paren): Likewise.
6567 (pp_cxx_left_brace): Likewise.
6568 (pp_cxx_right_brace): Likewise.
6569 (pp_cxx_left_bracket): Likewise.
6570 (pp_cxx_right_bracket): Likewise.
6571 (pp_cxx_dot): Likewise.
6572 (pp_cxx_identifier): Likewise.
6573 (pp_cxx_tree_identifier): Likewise.
6574 (pp_cxx_ampersand): New macro.
6575 (pp_cxx_star): Likewise.
6576 (pp_cxx_arrow): Likewise.
6577 (pp_cxx_semicolon): Likewise.
6578 (pp_cxx_complement): Likewise.
6579 (pp_cxx_begin_template_argument_list): Declaree.
6580 (pp_cxx_end_template_argument_list): Likewise.
6581 (pp_cxx_colon_colon): likewise.
6583 2004-05-31 Eric Botcazou <ebotcazou@libertysurf.fr>
6585 * parser.c (cp_parser_simple_type_specifier): Explicitly test
6588 2004-05-31 Kazu Hirata <kazu@cs.umass.edu>
6590 * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
6591 typeck.c: Fix comment formatting.
6593 2004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
6595 * cp-lang.c (cp_expand_decl): Remove.
6596 (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
6598 2004-05-30 Andreas Jaeger <aj@suse.de>
6600 * lang-specs.h: Add missing initializers for .ii.
6602 2004-05-28 Aldy Hernandez <aldyh@redhat.com>
6604 * decl.c (cp_make_fname_decl): Free return value from
6607 2004-05-28 Mark Mitchell <mark@codesourcery.com>
6610 * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
6612 * init.c (build_new): Likewise.
6615 * name-lookup.c (arg_assoc): Robustify.
6618 * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
6619 when determining the scope to use for a pointer to member.
6620 (lookup_anon_field): Give it external linkage.
6621 * cp-tree.h (lookup_anon_field): Declare it.
6622 * expr.c (cplus_expand_constant): Use it.
6624 2004-05-28 Mark Mitchell <mark@codesourcery.com>
6627 * parser.c (cp_parser_simple_type_specifier): Call
6628 maybe_note_name_used_in_class.
6630 2004-05-28 Tom Marshall <tmarshall@real.com>
6633 * class.c (finish_struct_1): Warn only if the dtor is non-private or
6634 the class has friends.
6636 2004-05-27 Adam Nemet <anemet@lnxw.com>
6639 * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
6640 TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
6642 2004-05-24 Geoffrey Keating <geoffk@apple.com>
6644 * method.c (implicitly_declare_fn): Don't call defer_fn; abort
6645 if it might be needed.
6646 * pt.c (mark_decl_instantiated): Only call defer_fn if
6647 the function actually needs processing in finish_file.
6648 * decl2.c (finish_file): Add check that elements in
6649 deferred_fns_used are really needed there. Remove unnecessary
6650 test of DECL_SAVED_TREE.
6652 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
6654 * Make-lang.in: No need to specify $(LIBCPP).
6656 2004-05-23 Mark Mitchell <mark@codesourcery.com>
6659 * parser.c (cp_parser_class_head): Robustify.
6662 * parser.c (cp_parser_decl_specifier_seq): Correct error in
6664 (cp_parser_constructor_declarator_p): Treat attributes
6668 * typeck.c (build_unary_op): Do not attempt to resolve casts to
6669 base classes in templates.
6671 2004-05-23 Mark Mitchell <mark@codesourcery.com>
6674 * pt.c (instantiate_template): Robustify.
6676 2004-05-23 Mark Mitchell <mark@codesourcery.com>
6679 * decl.c (xref_tag): Issue errors about redeclaring template
6680 classes as non-template classes.
6682 2004-05-23 Mark Mitchell <mark@codesourcery.com>
6685 * name-lookup.c (supplement_binding): Allow redefinitions of
6689 * parser.c (cp_parser_template_argument): Robustify.
6691 2004-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
6693 * class.c (alter_access): Use %E format specifier to print an
6694 identifier node. Avoid looking at the IDENTIFIER_POINTER.
6695 (push_lang_context): Likewise.
6696 * decl.c (lookup_label): Likewise.
6697 (grokdeclarator): Likewise.
6698 * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
6699 * pt.c (do_type_instantiation): Likewise.
6700 * tree.c (handle_java_interface_attribute): Likewise.
6701 (handle_com_interface_attribute): Likewise.
6702 (handle_init_priority_attribute): Likewise.
6704 2004-05-22 Mark Mitchell <mark@codesourcery.com>
6708 * pt.c (build_non_dependent_expr): Expand the set of tree nodes
6709 recognized as overloaded functions.
6711 2004-05-22 Mark Mitchell <mark@codesourcery.com>
6714 * class.c (layout_nonempty_base_or_field): Do not try to avoid
6715 layout conflicts for unions.
6718 * typeck.c (build_x_unary_op): Instantiate template class
6719 specializations before looking for "operator &".
6722 * typeck.c (complete_type): Layout non-dependent array types, even
6726 * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
6729 2004-05-22 Roger Sayle <roger@eyesopen.com>
6731 * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
6732 returning when TREE_TYPE is error_mark_node.
6733 * typeck.c (require_complete_type): Return error_mark_node if
6734 value's type is an error_mark_node.
6736 2004-05-20 Andrew Pinski <pinskia@physics.uc.edu>
6738 * optimize.c (calls_setjmp_r): Remove.
6739 (calls_setjmp_p): Remove.
6740 * cp-tree.c (calls_setjmp_p): Remove.
6741 * decl.c (finish_function): Do not call calls_setjmp_p.
6743 2004-05-18 Zack Weinberg <zack@codesourcery.com>
6745 * decl.c (cp_finish_decl): Use mark_decl_referenced.
6746 * decl2.c (maybe_make_one_only): Likewise.
6747 * method.c (use_thunk): Likewise.
6749 2004-05-18 Jason Merrill <jason@redhat.com>
6751 * class.c (build_base_path): Tidy a bit.
6753 2004-05-14 Geoffrey Keating <geoffk@apple.com>
6755 * name-lookup.c (struct scope_binding): New.
6756 (EMPTY_SCOPE_BINDING): New.
6757 (lookup_using_namespace): Take a scope_binding instead of a
6759 (qualified_lookup_using_namespace): Likewise.
6760 (cxx_binding_clear): Delete.
6761 (do_nonmember_using_decl): Use a scope_binding instead of a
6763 (lookup_tag): Don't call select_decl.
6764 (ambiguous_decl): Don't return anything (and change callers to match).
6765 Take a scope_binding as the second parameter.
6766 (lookup_namespace_name): Use a scope_binding instead of a
6768 (unqualified_namespace_lookup): Likewise.
6769 (lookup_qualified_name): Likewise.
6770 (select_decl): Take a scope_binding instead of a cxx_binding.
6771 Use macros rather than hand-coding tests for type-ness.
6773 2004-05-13 Diego Novillo <dnovillo@redhat.com>
6775 * cp-gimplify.c: Rename from cp-simplify.c.
6776 * Make-lang.in, optimize.c: Update.
6778 2004-05-13 Diego Novillo <dnovillo@redhat.com>
6780 Merge from tree-ssa-20020619-branch. See
6781 ChangeLog.tree-ssa for details.
6783 * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
6784 cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
6785 expr.c, init.c, name-lookup.h, optimize.c, parser.c,
6786 pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
6788 * cp-mudflap.c: New file.
6789 * cp-simplify.c:: New file.
6791 2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6794 * decl2.c (check_classfn): For member templates, compare also the
6795 template parameters to match the declaration.
6796 * cp-tree.h: Adjust declaration of check_classfn.
6797 * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
6798 * friend.c (do_friend): Likewise.
6799 * pt.c (tsubst_friend_function): Likewise.
6801 2004-05-01 Zack Weinberg <zack@codesourcery.com>
6803 * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
6804 Instead, dig into the representation type to find the array bound.
6806 2004-04-30 Jason Merrill <jason@redhat.com>
6808 Refer to base members using COMPONENT_REFs where possible.
6809 * class.c (build_simple_base_path): New fn.
6810 (build_base_path): Use it for non-virtual base references.
6811 (layout_class_type): Change base fields to their real type
6812 after layout is done.
6813 * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
6814 * cp-lang.c (cxx_get_alias_set): Use it.
6816 2004-04-30 Kazu Hirata <kazu@cs.umass.edu>
6818 * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
6821 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6824 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
6825 used in integral constant expressions.
6827 2004-04-22 Mark Mitchell <mark@codesourcery.com>
6829 * init.c (build_aggr_init): Fix accidental use of C99 construct in
6832 * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
6834 * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
6835 * decl.c (reshape_init): Use it.
6836 * init.c (perform_member_init): Remove redundant condition.
6837 (build_aggr_init): Adjust to handle brace-enclosed initializers
6839 (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
6841 * parser.c (cp_parser_initializer_clause): Do not set
6842 TREE_HAS_CONSTRUCTOR on the initializer.
6843 * rtti.c (tinfo_base_init): Likewise.
6844 (generic_initializer): Likewise.
6845 (ptr_initializer): Likewise.
6846 (ptm_initializer): Likewise.
6847 (class_initializer): Likewise.
6848 (get_pseudo_ti_init): Likewise.
6849 * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
6851 2004-04-22 Alan Modra <amodra@bigpond.net.au>
6853 * name-lookup.c (anonymous_namespace_name): Make static.
6855 2004-04-19 Roger Sayle <roger@eyesopen.com>
6858 * class.c (build_base_path): Call fold whilst building the NULL
6859 pointer check expression trees.
6861 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
6863 * init.c (build_new_1): Don't use type size argument for Java
6864 _Jv_AllocObject call.
6866 2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
6868 * method.c (make_alias_for_thunk): Remove preprocessor guard on
6869 declaration and definition.
6871 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
6874 * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
6875 than ASM_OUTPUT_DEF.
6877 2004-04-08 Jakub Jelinek <jakub@redhat.com>
6879 * decl2.c (mark_used): Don't segfault if cfun != NULL but
6880 current_function_decl == NULL.
6882 2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
6885 * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
6888 2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6890 * init.c (decl_constant_value): Don't look at DECL_INITIAL
6892 * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
6893 or TREE_SIDE_EFFECTS of a type.
6895 2004-04-02 Nathan Sidwell <nathan@codesourcery.com>
6898 * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
6899 cv-qualifier unification.
6900 * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
6902 2004-04-02 Jan Hubicka <jh@suse.cz>
6904 * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
6905 * cp-tree.h (cp_update_decl_after_saving): Declare.
6906 * tree.c (cp_update_decl_after_saving): Define.
6908 2004-04-01 Mark Mitchell <mark@codesourcery.com>
6911 * typeck.c (get_delta_difference): Call fold before returning the
6914 2004-04-01 Richard Henderson <rth@redhat.com>
6917 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
6918 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
6920 2004-04-01 Mark Mitchell <mark@codesourcery.com>
6923 * name-lookup.c (maybe_push_cleanup_level): Robustify.
6925 2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6927 * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
6929 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6931 * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
6932 * class.c (check_bitfield_decl): Likewise.
6933 * cvt.c (type_promotes_to): Likewise.
6934 * decl.c (finish_enum): Likewise.
6935 * mangle.c (write_builtin_type): Likewise.
6936 * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
6937 * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
6938 (build_binary_op): Likewise.
6940 2004-03-31 Jan Hubicka <jh@suse.cz>
6942 * tree.h (optimize_function): Kill prototype.
6943 * optimize.c (dump_function, optimize_function, dump_finction): Kill.
6944 * semantics.c (expand_body): Kill.
6946 2004-03-30 Mark Mitchell <mark@codesourcery.com>
6949 * decl.c (start_decl_1): Do not decide whether or not to create a
6950 new cleanup level until after the type has been completed.
6953 * pt.c (tsubst_default_argument): Clear current_function_decl.
6955 2004-03-30 Zack Weinberg <zack@codesourcery.com>
6957 * name-lookup.c, parser.c: Use new shorter form of GTY markers.
6959 2004-03-29 Zack Weinberg <zack@codesourcery.com>
6961 * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
6962 is null, just print the literal name and return.
6964 2004-03-25 Kazu Hirata <kazu@cs.umass.edu>
6966 * cxx-pretty-print.c: Fix comment typos.
6968 2004-03-24 Kazu Hirata <kazu@cs.umass.edu>
6970 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
6973 2004-03-23 Ziemowit Laski <zlaski@apple.com>
6975 * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
6976 * mangle.c (write_type): Add call to 'mangle_fundamental_type'
6979 2004-03-23 Zack Weinberg <zack@codesourcery.com>
6981 PR 12267, 12391, 12560, 13129, 14114, 14133
6982 * cp-lang.c (c_reset_state): Delete.
6983 (push_file_scope, pop_file_scope): New stubs.
6984 * parser.c (c_parse_file): Call sorry() here if called more than once.
6986 2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6988 * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
6991 2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
6993 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
6995 2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
6997 * error.c (enum pad): Remove.
6998 (dump_qualifiers): Likewise.
6999 (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
7000 (dump_aggr_type): Likewise.
7001 (dump_type_suffix): Likewise.
7002 (dump_simple_decl): Likewise.
7003 (dump_function_decl): Likewise.
7004 (cv_to_string): Likewise.
7005 (dump_type_prefix): Likewise. Adjust return void.
7006 * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
7008 (pp_cxx_template_keyword_if_needed): Document.
7009 (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
7010 (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
7011 MUST_NOT_THROW_EXPR.
7013 2004-03-21 Mark Mitchell <mark@codesourcery.com>
7016 * decl.c (cp_finish_decl): Compute the size of arrays declared in
7017 templates, if their type is non-dependent.
7019 2004-03-19 Mark Mitchell <mark@codesourcery.com>
7021 * call.c (build_op_delete_call): Do not forget the placement
7022 arguments when iterating through mutiple delete operators.
7024 * cp-tree.h (svaed_scope): Remove last_parms.
7025 (NEW_DELETE_OPNAME_P): New macro.
7026 (last_function_parms): Remove.
7027 (do_friend): Adjust prototype.
7028 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
7029 using last_function_parms.
7030 (grokfndecl): Take the PARM_DECLs as an argument, rather than
7031 using last_function_parms.
7032 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
7033 for class-specific operator new and operator delete.
7034 (grok_op_properties): Do not look for allocation functions with
7036 (start_function): Use DECL_ARGUMENTS instead of
7037 last_function_parms.
7038 * decl.h (last_function_parms): Do not declare.
7039 * decl2.c (grokclassfn): Do not use last_function_parms.
7040 * friend.c (do_friend): Remove parmdecls parameter.
7041 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
7042 (pop_from_top_level): Do not restore it.
7043 * pt.c (check_explicit_specialization): Do not adjust
7044 last_function_parms.
7046 * name-lookup.c (do_local_using_decl): Create a local binding for
7047 types brought in via using declarations.
7049 * name-lookup.c (lookup_arg_dependent): Handle block-scope
7050 function declarations correctly.
7052 * semantics.c (finish_id_expression): Correct handling of
7053 conversion operators to dependent types.
7055 * typeck.c (lookup_destructor): Allow the use of destructors from
7058 2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7060 * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
7061 TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
7062 * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
7063 the field is named TEMPLATE_TYPE_PARM_INDEX.
7065 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7068 * parser.c (cp_parser_functional_cast): A cast to anything
7069 but integral or enumaration type is not an integral constant
7071 * pt.c (value_dependent_expression_p): Handle cast expressions
7072 without operands (such as "int()").
7074 2004-03-18 Mark Mitchell <mark@codesourcery.com>
7076 * semantics.c (finish_pseudo_destructor_expr): Allow differing
7077 cv-qualification between the type named by the
7078 pseudo-destructor-name and the object-type.
7080 * search.c (accessible_base_p): Handle non-proper bases.
7082 * name-lookup.c (do_nonmember_using_decl): If a using declaration
7083 refers to a single overloaded function, set the type of the
7085 * tree.c (lvalue_type): Simplify.
7086 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
7088 (build_unary_op): Handle OVERLOADs with known types.
7090 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
7093 * parser.c (cp_parser_postfix_expression): Handle the use of
7094 "typename" in non-dependent contexts. Convert appropriately when
7095 when using a qualified name after "->" or ".".
7097 * call.c (conditional_conversion): Honor the requirement that some
7098 conversions refer to the original object.
7100 2004-03-18 Mark Mitchell <mark@codesourcery.com>
7102 * call.c (build_conditional_expr): Do not call force_rvalue for
7103 operands of void_type when the conditional expression itself has
7105 * name-lookup.c (pushdecl): Don't consider a declaration of a
7106 function named "main" to be an overload of a type named "main".
7107 * parser.c (cp_parser_template_name): Perform name lookup when the
7108 template name is proceeded by "template" if the qualifying scope
7110 * typeck.c (composite_pointer_type_r): Correctly handle
7111 pointer-to-member types.
7112 (build_const_cast): Likewise.
7114 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7116 * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
7117 * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
7118 (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
7119 (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
7120 (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
7121 (TYPEOF_TYPE_EXPR): New macro.
7122 * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
7123 * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
7124 * pt.c (tsubst): Likewise.
7125 * semantics.c (finish_typeof): Likewise.
7126 * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
7127 and TEMPLATE_TYPE_PARM.
7128 * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
7129 (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
7131 2004-03-16 Mark Mitchell <mark@codesourcery.com>
7134 * cp-tree.h (build_new_op): Change prototype.
7135 (build_x_binary_op): Likewise.
7136 * call.c (build_new_op): Add overloaded_p parameter.
7137 * decl2.c (grok_array_decl): Adjust call to build_new_op.
7138 * parser.c (cp_parser_binary_expression): Note that uses of
7139 overloaded operators prevents an expression from being considered
7140 an integral constant.
7141 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
7143 * semantics.c (finish_call_expr): Likewise.
7144 * typeck.c (rationalize_conditional_expr): Likewise.
7145 (build_x_indirect_ref): Likewise.
7146 (build_x_binary_op): Likewise.
7147 (build_x_unary_op): Likewise.
7148 (build_x_compound_expr): Likewise.
7149 (build_modify_expr): Likewise.
7150 * typeck2.c (build_x_arrow): Likewise.
7152 2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
7154 * cp-lang.c, ptree.c: Update copyright.
7156 2004-03-13 Mark Mitchell <mark@codesourcery.com>
7159 * parser.c (cp_parser_non_integral_constant_expression): Encode
7160 more of the idiom that surrounded calls to this function within
7162 (cp_parser_primary_expression): Adjust accordingly.
7163 (cp_parser_postfix_expression): Likewise.
7164 (cp_parser_unary_expression): Likewise.
7165 (cp_parser_cast_expression): Likewise.
7166 (cp_parser_assignment_expression): Likewise.
7167 (cp_parser_expression): Likewise.
7168 (cp_parser_new_expression): Note that new-expressions are not
7169 allowed in integral constant expressions.
7170 (cp_parser_delete_expression): Likewise.
7172 2004-03-12 Matt Austern <austern@apple.com>
7174 * decl2.c (maybe_make_one_only): Look at
7175 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
7176 to make an explicit instantiation weak.
7177 * method.c (use_thunk): Make sure we call comdat_linkage
7179 * pt.c (do_type_instantiation): On systems where weak symbols
7180 don't go in a static archive's TOC, explicit instantiation of a
7181 class must imply *explicit* instantiation of its memeber.
7183 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
7185 * call.c, cp-tree.h, pt.c: Fix comment typos.
7187 2004-03-10 Mark Mitchell <mark@codesourcery.com>
7190 * decl.c (xref_tag): Disregard non-type declarations when
7191 looking up a tagged type.
7193 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
7196 * call.c (convert_like_real): Build a const qualified temporary,
7197 when testing ctor access.
7199 2004-03-09 Mark Mitchell <mark@codesourcery.com>
7201 * call.c (initialize_reference): Fix typo.
7203 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7206 * pt.c (determine_specialization): For member templates, match also
7210 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
7212 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
7214 2004-03-09 Mark Mitchell <mark@codesourcery.com>
7217 * call.c (initialize_reference): Handle initializers that are
7218 class-member access expressions applies to rvalues.
7220 2004-03-09 Mark Mitchell <mark@codesourcery.com>
7223 * name-lookup.c (supplement_binding): Ignore functions that are
7224 marked DECL_ANTICIPATED.
7226 2004-03-08 Mark Mitchell <mark@codesourcery.com>
7229 * class.c (check_field_decls): Complain about non-static data
7230 members of reference type in unions. Propagate
7231 CLASSTYPE_REF_FIELDS_NEED_INIT and
7232 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
7234 * init.c (perform_member_init): Complain about mbmers with const
7235 type that are not explicitly initialized.
7237 2004-03-08 Mark Mitchell <mark@codesourcery.com>
7239 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
7240 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
7241 (lang_identifier): Remove implicit_decl and error_locus.
7242 (IDENTIFIER_IMPLICIT_DECL): Remove.
7243 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
7244 (IDENTIFIER_ERROR_LOCUS): Likewise.
7245 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
7246 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
7247 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
7248 (implicitly_declare): Remove.
7249 * decl.c (warn_extern_redeclared_static): Remove check of
7250 IDENTIFIER_IMPLICIT_DECL.
7251 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
7252 (implicitly_declare): Remove.
7253 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
7254 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
7255 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
7256 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
7257 in the innermost scope, rather than at namespace scope.
7258 * name-lookup.c (push_local_binding): Give it external linkage.
7259 (pushdecl): Remove dead code.
7260 * name-lookup.h (push_local_binding): Declare it.
7261 * ptree.c (cxx_print_identifier): Don't print
7262 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
7263 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
7264 not IDENTIFIER_ERROR_LOCUS.
7265 * typeck.c (build_function_call): Remove dead code.
7267 2004-03-08 Jason Merrill <jason@redhat.com>
7270 * decl.c (xref_tag): Remove attribute handling.
7271 * cp-tree.h: Adjust prototype.
7272 * decl.c, parser.c, rtti.c: Adjust callers.
7273 * parser.c (cp_parser_class_head): Pass back attributes in the
7275 (cp_parser_class_specifier): Adjust.
7277 2004-03-08 Matt Austern <austern@apple.com>
7280 * name-lookup.c (add_decl_to_level): Add extern variables, as well
7281 as static, to static_decls array.
7283 2004-03-05 Jason Merrill <jason@redhat.com>
7285 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
7287 2004-03-04 Geoffrey Keating <geoffk@apple.com>
7289 * decl.c (grokfndecl): Update old incorrect comment.
7290 (grokvardecl): Diagnose C++ variables of type with no linkage.
7292 2004-03-01 Mark Mitchell <mark@codesourcery.com>
7295 * pt.c (build_non_dependent_expr): Do not create a
7296 NON_DEPENDENT_EXPR for a THROW_EXPR.
7298 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
7301 * error.c (dump_expr): Handle THROW_EXPR.
7303 2004-03-01 Mark Mitchell <mark@codesourcery.com>
7306 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
7307 lookup if ordinary name-lookup finds a non-function.
7308 * pt.c (tsubst_copy_and_build): Likewise.
7311 * parser.c (cp_parser_late_parsing_default_args): Check that there
7312 are no extra tokens after the end of the default-argument
7315 2004-03-01 Mark Mitchell <mark@codesourcery.com>
7318 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
7319 having C++ linkage for name-mangling purposes.
7322 * parser.c (cp_parser_direct_declarator): Recognize constructor
7323 declarators that use a template-id to name the class being
7327 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
7328 (tsubst_expr): Do not call tsubst_copy, even when
7329 processing_template_decl.
7331 2004-03-01 Jeff Law <law@redhat.com>
7333 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
7336 2004-02-29 Mark Mitchell <mark@codesourcery.com>
7339 * name-lookup.h (push_scope): Change prototype.
7340 * name-lookup.c (push_scope): Do not reenter the current class
7342 * decl.c (grokfndecl): Check return code from push_scope before
7344 * decl2.c (check_classfn): Likewise.
7345 * parser.c (cp_parser_conversion_function_id): Likewise.
7346 (cp_parser_init_declarator): Likewise.
7347 (cp_parser_direct_declarator): Likewise.
7348 (cp_parser_class_specifier): Likewise.
7349 (cp_parser_class_head): Likewise.
7350 (cp_parser_lookup_name): Likewise.
7351 (cp_parser_constructor_declarator_p): Likewise.
7352 * pt.c (instantiate_class_template): Likewise.
7353 (resolve_typename_type): Likewise.
7355 2004-02-29 Mark Mitchell <mark@codesourcery.com>
7358 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
7362 * class.c (update_vtable_entry_for_fn): Do not go through
7363 covariance machinery if the type returned by an overrider is the
7364 same as the original.
7366 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
7368 * call.c: Fix a comment typo.
7370 2004-02-27 Ziemowit Laski <zlaski@apple.com>
7372 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
7374 2004-02-26 Mark Mitchell <mark@codesourcery.com>
7377 * parser.c (cp_parser_parameter_declaration_list): Commit
7378 to fewer tentative parses.
7380 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7383 * pt.c (dependent_type_p_r): A template template parameter is a
7386 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7389 * mangle.c (write_template_arg_literal): Don't rely on identity for
7392 2004-02-24 Jason Merrill <jason@redhat.com>
7394 * tree.c (build_exception_variant): Use check_qualified_type.
7396 2004-02-23 Zack Weinberg <zack@codesourcery.com>
7397 Kazu Hirata <kazu@cs.umass.edu>
7399 * decl.c (cxx_init_decl_processing): Don't check
7400 flag_writable_strings.
7402 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
7405 * typeck.c (maybe_warn_about_returning_address_of_location):
7406 Change check for VAR_DECL to use DECL_P instead.
7408 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7411 * cvt.c (build_expr_type_conversion): Type must be complete before
7412 looking up for conversions.
7414 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7417 * name-lookup.c (arg_assoc_class): Don't look into template
7418 arguments if it is not a primary template.
7420 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
7423 * method.c (use_thunk): Always clone function argument tree.
7425 2004-02-20 Mark Mitchell <mark@codesourcery.com>
7428 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
7431 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
7432 for all type variants.
7434 2004-02-19 Mark Mitchell <mark@codesourcery.com>
7437 * decl.c (duplicate_decls): Return error_mark_node for invalid
7439 * name-lookup.c (push_namespace): Ignore the return value from
7441 * pt.c (push_template_decl_real): Robustify.
7444 * name-lookup.c (push_class_level_binding): Do not complain about
7445 adding a binding for a member whose name is the same as the
7446 enclosing class if the member is located in a base class of the
7449 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7452 * parser.c (cp_parser_new_expression): Parse an ill-formed
7453 direct-new-declarator after a parenthesized type-id to emit good
7456 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
7458 * cp-tree.def, cvt.c: Update copyright.
7460 2004-02-17 Mark Mitchell <mark@codesourcery.com>
7463 * cp-tree.h (abi_version_at_least): Remove.
7464 * mangle.c: Include flags.h.
7466 2004-02-15 Mark Mitchell <mark@codesourcery.com>
7469 * call.c (build_conditional_expr): Handle conversions between
7470 class types which result in differently cv-qualified type
7474 * class.c (delete_duplicate_fields_1): Remove.
7475 (delete_duplicate_fields): Likewise.
7476 (finish_struct_anon): Remove check for members with the same name
7477 as their enclosing class.
7478 (check_field_decls): Do not call duplicate_fields.
7479 * decl.c (grokdeclarator): Remove check for static data members
7480 with the same name as their enclosing class.
7481 * name-lookup.c (push_class_level_binding): Check for members with
7482 the same name as their enclosing class.
7484 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
7487 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
7489 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7492 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
7493 has full set of arguments.
7495 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7498 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
7500 2004-02-13 Mark Mitchell <mark@codesourcery.com>
7503 * cp-tree.h (delete_sanity): Change prototype.
7504 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
7505 Remove dead code. Adjust code to warn about deleting an array.
7506 * typekc.c (decay_conversion): Use build_address and build_nop.
7509 * search.c (accessible_p): Do not check access in thunks.
7512 * call.c (build_conditional_expr): Call force_rvalue on the
7513 non-void operand in the case that one result is a throw-expression
7514 and the other is not.
7516 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
7519 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
7520 the type name and look ahead for ::~, and bail out early with a
7521 better error message if the parse is going to fail.
7523 2004-02-12 Mark Mitchell <mark@codesourcery.com>
7525 * call.c (conversion_kind): New type.
7526 (conversion_rank): Likewise.
7527 (conversion): Likewise.
7528 (CONVERSION_RANK): New macro.
7529 (conversion_obstack): New variable.
7530 (obstack_initialized): Likewise.
7531 (z_candidate): Change type of convs and second_conv.
7532 (candidate_warning): New type.
7533 (IDENTITY_RANK): Remove.
7534 (EXACT_RANK): Likewise.
7535 (PROMO_RANK): Likewise.
7536 (STD_RANK): Likewise.
7537 (PBOOL_RANK): Likewise.
7538 (USER_RANK): Likewise.
7539 (ELLIPSIS_RANK): Likewise.
7540 (BAD_RANK): Likewise.
7541 (ICS_RANK): Likewise.
7542 (ICS_STD_RANK): Likewise.
7543 (ICS_USER_FLAG): Likewise.
7544 (ICS_ELLIPSIS_FLAG): Likewise.
7545 (ICS_THIS_FLAG): Likewise.
7546 (ICS_BAD_FLAG): Likewise.
7547 (NEED_TEMPORARY_P): Likewise.
7548 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
7549 (USER_CONV_CAND): Likewise.
7550 (USER_CONV_FN): Likewise.
7551 (conversion_obstack_alloc): New function.
7552 (alloc_conversion): Likewise.
7553 (validate_conversion_obstack): Likewise.
7554 (alloc_conversions): Likewise.
7555 (build_conv): Adjust to deal with new conversion data structures.
7556 (build_identity_conv): New function.
7557 (build_ambiguous_conv): Likewise.
7558 (standard_conversion): Adjust to deal with new conversion data
7560 (convert_class_to_reference): Likewise.
7561 (direct_reference_binding): Likewise.
7562 (reference_binding): Likewise.
7563 (implicit_conversion): Likewise.
7564 (add_candidate): Likewise.
7565 (add_function_candidate): Likewise.
7566 (add_conv_candidate): Likewise.
7567 (build_builtin_candidate): Likewise.
7568 (print_z_candidate): Likewise.
7569 (merge_conversion_sequences): Likewise.
7570 (build_user_type_conversion_1): Likewise.
7571 (build_user_type_conversion): Likewise.
7572 (build_new_function_call): Likewise.
7573 (build_object_call): Likewise.
7574 (conditional_conversion): Likewise.
7575 (build_conditional_expr): Likewise.
7576 (build_new_op): Likewise.
7577 (build_op_delete_call): Likewise.
7578 (convert_like_real): Likewise.
7579 (build_over_call): Likewise.
7580 (build_new_method_call): Likewise.
7581 (is_subseq): Likewise.
7582 (maybe_handle_implicit_object): Likewise.
7583 (maybe_handle_ref_bind): Likewise.
7584 (compare_ics): Likewise.
7585 (source_type): Likewise.
7586 (add_warning): Likewise.
7588 (can_convert_arg): Likewise.
7589 (can_convert_arg_bad): Likewise.
7590 (perform_implicit_conversion): Likewise.
7591 (perform_direct_initialization_if_possible): Likewise.
7592 (initialize_reference): Likewise.
7593 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
7594 * cp-tree.def (WRAPPER): Likewise.
7595 (IDENTITY_CONV): Remove.
7596 (LVALUE_CONV): Likewise.
7597 (QUAL_CONV): Likewise.
7598 (STD_CONV): Likewise.
7599 (PTR_CONV): Likewise.
7600 (PMEM_CONV): Likewise.
7601 (BASE_CONV): Likewise.
7602 (REF_BIND): Likewise.
7603 (USER_CONV): Likewise.
7604 (AMBIG_CONV): Likewise.
7605 (RVALUE_CONV): Likewise.
7606 * cp-tree.h (tree_wrapper): Remove.
7607 (WRAPPER_ZC): Remove.
7608 (lang_tree_node): Remove wrapper.
7609 (LOOKUP_SPECULATIVELY): Remove.
7610 (build_op_delete_call): Adjust prototype.
7611 (validate_conversion_obstack): Declare.
7612 (build_zc_wrapper): Remove.
7613 * cvt.c (convert_to_reference): Remove dead code.
7614 (ocp_convert): Likewise.
7615 * decl.c (redeclaration_error_message): Correct handling of
7617 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
7618 (cp_tree_node_structure): Remove WRAPPER case.
7619 * decl2.c (finish_file): Call validate_conversion_obstack.
7620 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
7621 (build_op_delete_call): Likewise.
7622 (build_x_delete): Likewise.
7623 (build_delete): Adjust call to build_op_delete_call.
7624 * pt.c (tsubst_friend_declaration): Adjust code to determine
7625 whether or not a friend template is a definition.
7626 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
7627 * tree.c (build_zc_wrapper): Remove.
7629 2004-02-12 Zack Weinberg <zack@codesourcery.com>
7631 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
7632 * cp-tree.h: Don't declare cxx_builtin_type_decls.
7633 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
7634 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
7636 2004-02-10 Mark Mitchell <mark@codesourcery.com>
7638 * typeck.c (lookup_destructor): Fix typo in error message.
7640 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
7642 * call.c, parser.c, tree.c: Fix comment typos.
7644 2004-02-07 Zack Weinberg <zack@codesourcery.com>
7647 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
7648 * decl.c (duplicate_decls, start_function): Likewise.
7650 2004-02-07 Zack Weinberg <zack@codesourcery.com>
7652 * name-lookup.c (pushdecl): Issue shadow warnings directly.
7653 * parser.c (free_parser_stacks): Delete.
7655 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
7657 * rtti.c: Update copyright.
7659 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7662 * decl.c (require_complete_types_for_parms): Do not insert
7663 error_mark_node in the parameter list.
7665 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7668 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
7669 error when terminator can not be found.
7671 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
7673 Make-lang.in (po-generated): Delete.
7675 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
7677 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
7678 targetm.calls.promote_prototypes.
7680 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
7684 2004-01-15 Geoffrey Keating <geoffk@apple.com>
7686 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
7687 (handle_pragma_implementation): Likewise.
7689 2004-02-05 Mark Mitchell <mark@codesourcery.com>
7692 * typeck.c (lookup_destructor): Tweak error message.
7694 2004-02-05 Jan Hubicka <jh@suse.cz>
7696 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
7699 2004-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7702 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
7703 code, only emits the diagnostic now. Added lookup of the identifier
7704 and support for qualified ids.
7705 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
7706 Parse an (invalid) type name as id-expression within a declarator.
7707 (cp_parser_simple_declaration): Use it.
7708 (cp_parser_member_declaration): Likewise.
7709 (cp_parser_make_typename_type): New function. Handle errors through
7710 cp_parser_diagnose_invalid_typename.
7711 (cp_parser_elaborated_type_specifier): Use it.
7713 2004-02-04 Mark Mitchell <mark@codesourcery.com>
7716 * call.c (convert_like_real): Use "converting" rather than
7717 "argument" as the descriptive keyword to
7718 dubious_conversion_warnings.
7719 * typeck.c (convert_for_assignment): Do not call
7720 dubious_conversion_warnings.
7722 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7725 * init.c (build_delete): Emit a more informative error message in
7726 case of an incomplete type, and on the correct source line.
7728 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
7730 * error.c, search.c: Update copyright.
7732 2004-02-04 Mark Mitchell <mark@codesourcery.com>
7735 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
7736 linkage for the typeinfo name string.
7738 2004-02-04 Mark Mitchell <mark@codesourcery.com>
7741 * cp-tree.h (fold_non_dependent_expr): New function.
7742 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
7743 (cp_parser_template_argument): Use fold_non_dependent_expr.
7744 (cp_parser_direct_declarator): Likewise.
7745 * pt.c (fold_non_dependent_expr): New function.
7746 (convert_nontype_argument): Use it.
7747 (tsubst_qualified_id): Simplify.
7748 (tsubst_copy_and_build): Likewise.
7750 2004-02-04 Mark Mitchell <mark@codesourcery.com>
7752 * decl.c (cxx_push_function_context): Do not set
7753 current_function_is_thunk.
7754 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
7757 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7760 * pt.c (more_specialized_class): Increase processing_template_decl
7761 while partial ordering.
7763 2004-02-03 Mark Mitchell <mark@codesourcery.com>
7766 * decl.c (start_function): Do not call pushdecl for any
7767 instantiation or specialization of a primary template.
7769 2004-02-03 Mark Mitchell <mark@codesourcery.com>
7772 * parser.c (cp_parser_class_name): Robustify.
7775 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
7778 * semantics.c (finish_id_expression): Do not return an
7779 IDENTIFIER_NODE when lookup finds a PARM_DECL.
7781 2004-02-03 Mark Mitchell <mark@codesourcery.com>
7784 * pt.c (build_non_dependent_expr): Do not build
7785 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
7788 * semantics.c (finish_id_expression): Do not return an
7789 IDENTIFIER_NODE when lookup finds a VAR_DECL.
7792 * parser.c (cp_parser_simple_declaration): When skipping to the
7793 end of the statement swallow the terminating semicolon.
7795 2004-02-02 Mark Mitchell <mark@codesourcery.com>
7798 * init.c (build_offset_ref): Improve error recovery for invalid
7799 uses of non-static member functions.
7802 * cp-tree.h (cp_build_type_attribute_variant): New function.
7803 * class.c (build_clone): Use cp_build_type_attribute_variant.
7804 * decl.c (duplicate_decls): Likewise.
7805 * pt.c (copy_default_args_to_explicit_spec): Likewise.
7806 (tsubst_function_type): Likewise.
7807 * tree.c (build_exception_variant): Check attributes before
7808 concluding that two types are the same.
7809 (cp_build_type-attribute_variant): New method.
7810 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
7813 * call.c (convert_class_to_reference): Keep better track of
7814 pedantically invalid user-defined conversions.
7816 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7819 * pt.c (tsubst_qualified_id): Improved error message when a type
7820 is expected but not found.
7822 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
7824 * class.c: Fix comment typos.
7826 * error.c: Likewise.
7827 * parser.c: Likewise.
7829 * search.c: Likewise.
7830 * typeck.c: Likewise.
7832 2004-01-30 Richard Henderson <rth@redhat.com>
7835 * method.c (use_thunk): Don't force_target_expr for void thunks.
7836 * tree.c (build_target_expr_with_type): Assert non-void type.
7837 (force_target_expr): Likewise.
7839 2004-01-30 Michael Matz <matz@suse.de>
7841 * parser.c (cp_parser_labeled_statement): Accept case ranges.
7843 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7847 * decl.c (grokdeclarator): Check immediatly type completeness for
7848 non-dependent types.
7850 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7853 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
7854 a sizeof expression.block
7856 2004-01-29 Mark Mitchell <mark@codesourcery.com>
7859 * mangle.c (write_encoding): Correct encoding of member template
7862 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7864 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
7865 template name as it was `<::' (digraph typo).
7866 (cp_parser_nth_token_starts_template_argument_list_p): New function.
7867 (cp_parser_id_expression): Use it.
7868 (cp_parser_nested_name_specifier_opt): Likewise.
7869 (cp_parser_template_name): Likewise.
7870 (cp_parser_class_name): Likewise.
7871 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
7873 2004-01-28 Mark Mitchell <mark@codesourcery.com>
7876 * typeck.c (merge_types): Do not merge attributes into
7880 * parser.c (cp_parser_direct_declarator): Do not prevent
7881 backtracking inside a parenthesized declarator.
7882 (cp_parser_parameter_declaration): Fix typo in comment.
7884 2004-01-28 Jan Hubicka <jh@suse.cz>
7886 * semantics.c (expand_body) Do emit_associated_thunks before
7889 2004-01-27 Devang Patel <dpatel@apple.com>
7891 * name-lookup.c: Include "debug.h"
7892 (do_namespace_alias): Invoke debug_hooks to emit debug info
7893 for namespace alias.
7894 (do_local_using_decl): Invoke debug_hooks to emit debug info
7896 (do_class_using_decl): Same.
7897 (do_toplevel_using_decl): Same.
7898 (do_using_directive): Same.
7899 (cp_emit_debug_info_for_using): New function.
7900 * Make-lang.in (cp/parser.o): Depend on debug.h
7901 (cp/name-lookup.o): Same.
7903 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7905 * cp-tree.h (language_function, lang_type_header): Use
7907 * name-lookup.h (cp_binding_level): Likewise.
7909 2004-01-26 Mark Mitchell <mark@codesourcery.com>
7912 * semantics.c (finish_for_expr): Check for unresolved overloaded
7915 * class.c (add_method): Just check processing_template_decl to
7916 determine whether or not we are within a template.
7917 * decl2.c (maybe_retrofit_in_chrg): Likewise.
7918 * init.c (decl_constant_value): Check the type of the declaration,
7920 * name-lookup.c (maybe_push_to_top_level): Rename to ...
7921 (push_to_top_level): ... this.
7922 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
7923 * pt.c (push_template_decl_real): Reorder condition for speed.
7924 (convert_template_argument): Use dependency-checking functions in
7925 place of uses_template_parms.
7926 (lookup_template_class): Avoid calling uses_template_parms more
7928 (uses_template_parms): Reimplement, using dependency-checking
7930 (instantiate_class_template): Use push_to_top_level, not
7931 maybe_push_to_top_level.
7932 (type_unification_real): Simplify.
7933 (type_dependent_expression_p): Handle OFFSET_REFs and
7935 (any_dependent_template_arguments_p): Handle multiple levels of
7937 * semantics.c (expand_or_defer_fn): Do not check
7938 uses_template_parms for template instantiations.
7939 * typeck.c (comptypes): Avoid calling cp_type_quals.
7941 2004-01-25 Mark Mitchell <mark@codesourcery.com>
7944 * call.c (build_over_call): Do not convert arguments when
7945 processing a template.
7946 * pt.c (build_non_dependent_expr): Do not build a
7947 NON_DEPENDENT_EXPR for arithmetic constants.
7949 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7952 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
7953 returns a TYPE_DECL. no further lookup is required.
7954 * semantics.c (check_template_template_default_arg): A TYPE_DECL
7955 is invalid. Rework to give better diagnostics.
7957 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7960 * pt.c (instantiate_class_template): Add an error_mark_node
7962 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
7964 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
7967 * decl.c (finish_function): Move the call to
7968 finish_fname_decls below the call to
7969 finish_eh_spec_block.
7971 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
7973 * optimize.c, typeck2.c: Update copyright.
7975 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
7977 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
7978 init.c, mangle.c, typeck.c: Update copyright.
7980 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
7982 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
7984 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
7986 * Make-lang.in: Replace $(docdir) with doc.
7987 (c++.info, c++.srcinfo): Dummy entry.
7988 (c++.man, c++.srcman): New rules.
7989 (c++.install-man): Revamp rule.
7991 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
7993 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
7994 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
7995 immediate $(shell) instead of deferred backquote.
7997 2004-01-19 Mark Mitchell <mark@codesourcery.com>
8000 * parser.c (cp_parser_postfix_expression): When encountering
8001 incomplete type on left-hand side of "->" or ".", treat the entire
8002 expression as erroneous.
8005 * call.c (build_field_call): Remove.
8006 (n_build_method_call): Likewise.
8007 (build_method_call): Likewise.
8008 (build_new_method_call): Do not call build_field_call.
8009 * class.c (n_build_method_call): Remove.
8010 (print_class_statistics): Do not print it.
8011 * cp-tree.h (build_method_call): Remove declaration.
8012 (finish_object_call_expr): Likewise.
8013 (build_new_1): Do not use build_method_call.
8014 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
8015 when the function appearing on the right-hand-side of "." or "->"
8016 is not actually a function.
8017 * pt.c (tsubst_copy_and_build): Likewise.
8018 * semantics.c (finish_object_call_expr): Remove.
8020 2004-01-18 Mark Mitchell <mark@codesourcery.com>
8023 * pt.c (tsubst): Use finish_typeof.
8025 2004-01-18 Jason Merrill <jason@redhat.com>
8028 * except.c (build_throw): In a template, set
8029 current_function_returns_abnormally.
8031 2004-01-17 Fred Fish <fnf@intrinsity.com>
8034 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
8035 except don't call array_type_nelts() with a VECTOR_TYPE.
8037 2004-01-16 Jan Hubicka <jh@suse.cz>
8039 * mangle.c (write_mangled_name): Remove inline modifier.
8041 2004-01-16 Mark Mitchell <mark@codesourcery.com>
8044 * decl.c (compute_array_index_type): Fix grammar in comment.
8045 * init.c (build_zero_init): Handle zero-sized arrays correctly.
8048 * call.c (name_as_c_string): Print conversion operator names
8052 * call.c (initialize_reference): Pass -1 for inner parameter to
8055 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
8058 * parser.c (cp_parser_base_specifier): Check for an invalid
8059 keyword `typename' and emit an user-friendly error message.
8061 2004-01-15 Geoffrey Keating <geoffk@apple.com>
8064 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
8065 (handle_pragma_implementation): Likewise.
8067 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
8070 * typeck.c (build_class_member_access_expr): Allow to access members
8071 of the currently open class.
8072 (finish_class_member_access_expr): Likewise.
8074 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
8077 * name-lookup.c (validate_nonmember_using_decl): Take scope and
8078 name by value, instead of computing them.
8079 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
8080 arguments. Pass them to validate_nonmember_using_decl.
8081 * name-lookup.h (do_local_using_decl): Adjust.
8082 (do_toplevel_using_decl): Likewise.
8083 * parser.c (cp_parser_using_declaration): Likewise.
8084 * pt.c (tsubst_expr): Likewise.
8086 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
8090 * name-lookup.c (qualified_lookup_using_namespace): Search
8091 strongly-associated namespaces first, and only then try other
8094 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
8096 * Make-lang.in (c++.srcextra): Dummy entry.
8098 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
8101 * parser.c (cp_parser_template_name): Don't try to parse a
8102 conversion-function-id, as it cannot be a template-name.
8103 (cp_parser_simple_type_specifier): Check for invalid template-ids
8104 even after a built-in type.
8106 2004-01-14 Jan Hubicka <jh@suse.cz>
8109 * pt.c (instantiate_decl): Do not increase function_depth.
8111 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
8115 * parser.c (cp_parser_elaborated_type_specifier): Warn about
8116 attributes and discard.
8117 * decl.c (xref_tag): Don't overwite existing attributes with
8120 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
8123 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
8124 is no destructor while looking up a BIT_NOT_EXPR.
8126 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
8128 * cxxfilt.c: Remove unused file.
8130 2004-01-14 Jan Hubicka <jh@suse.cz>
8132 Partial fix to PR c++/12850
8133 * decl2.c (mark_used): Do not proactively instantiate templates
8134 when compiling in unit-at-a-time or not optimizing.
8135 * optimize.c (maybe_clone_body): Do not increase function depth.
8137 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
8140 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
8142 2004-01-12 Steven Bosscher <stevenb@suse.de>
8145 * parser.c (cp_parser_member_declaration): Any non-type is also
8146 not a class or a function.
8148 2004-01-12 Jason Merrill <jason@redhat.com>
8151 * class.c (build_base_path): Do not mark vtable references as
8153 (build_vtbl_ref_1): Likewise.
8155 2004-01-12 Richard Henderson <rth@redhat.com>
8158 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
8159 (store_init_value): Use it.
8160 * decl.c (check_initializer): Expect full initialization code
8161 from store_init_value.
8162 * init.c (expand_aggr_init_1): Likewise.
8163 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
8165 2004-01-12 Mark Mitchell <mark@codesourcery.com>
8167 * class.c (layout_class_type): For non-POD class types, also copy
8168 the DECL_SIZE and DECL_MODE of fields to the base class type.
8170 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8173 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
8174 calling regenerate_decl_from_template.
8176 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
8179 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
8180 decl-specifier occurring along with a class definition.
8182 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
8184 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
8185 clauses to comments describing declares_class_or_enum.
8186 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
8189 2004-01-12 Jan Hubicka <jh@suse.cz>
8191 * pt.c (for_each_template_parm): Do not check for duplicates.
8192 (for_each_template_parm): Use walk_tree duplicate checking code.
8194 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
8197 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
8198 is error_mark_node, don't add any more decl_specs.
8199 (cp_parser_init_declarator): After committing to a declaration, if
8200 the decl_specifiers start with error_mark_node, issue an error and
8201 change the type to "int".
8203 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
8206 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
8208 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
8212 * pt.c (tsubst): Substitution must fail if we are attempting to
8213 create an array with element type that is an abstract class type.
8214 * decl.c (cp_finish_decl): Strip pointers and array types recursively
8215 before calling abstract_virtuals_error.
8217 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
8219 * name-lookup.c (qualified_lookup_using_namespace): Consider
8220 strong using directives even if we've already found a binding.
8222 2004-01-09 Mark Mitchell <mark@codesourcery.com>
8224 * cp-tree.h (cxx_expand_expr): Change prototype.
8225 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
8227 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
8230 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
8231 looking into them recursively. They can be there because of the
8232 new __offsetof__ extension.
8234 2004-01-07 Zack Weinberg <zack@codesourcery.com>
8236 * parser.c (cp_parser_save_member_function_body): Mark the
8239 2004-01-05 Mark Mitchell <mark@codesourcery.com>
8242 * class.c (build_clone): Copy type attributes from the original
8243 function to the clone.
8246 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
8247 references as constant.
8250 * parser.c (cp_parser_explicit_instantiation): Improve error
8252 (cp_parser_require): Improve indication of the error location.
8255 * parser.c (cp_parser_class_head): Reorder logic to check for
8256 invalid qualification.
8258 2004-01-04 Mark Mitchell <mark@codesourcery.com>
8261 * name-lookup.c (lookup_using_namespace): Remove spacesp
8263 (unqualified_namespace_lookup): Likewise.
8264 (lookup_qualified_name): Adjust accordingly.
8265 (lookup_name_real): Likewise.
8266 (lookup_arg_dependent): Do not eliminate the namespace of the
8267 functions found by unqualified name lookup unless that is the
8270 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
8272 * semantics.c (push_deferring_access_checks): Fix format.
8273 (resume_deferring_access_checks): Likewise.
8274 (stop_deferring_access_checks): Likewise.
8275 (pop_deferring_access_checks): Likewise.
8276 (get_deferred_access_checks): Likewise.
8277 (pop_to_parent_deferring_access_checks): Likewise.
8278 (perform_deferred_access_checks): Likewise.
8279 (perform_or_defer_access_check): Likewise.
8281 2004-01-04 Richard Henderson <rth@redhat.com>
8283 * call.c (build_over_call): Don't create a save_expr of an
8284 aggregate, but rather its address.
8286 2004-01-04 Mark Mitchell <mark@codesourcery.com>
8289 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
8290 an offsetof expression.
8292 * parser.c (cp_parser_parameter_declaration): Fix comment.
8295 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
8296 (reference_binding): Set it when appropriate.
8297 (build_temp): New function, split out from ...
8298 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
8299 (initialize_reference): Likewise.
8302 * parser.c (cp_parser): Add in_type_id_in_expr_p.
8303 (cp_parser_new): Initialize it.
8304 (cp_parser_postfix_expression): Set it.
8305 (cp_parser_sizeof_operand): Likewise.
8306 (cp_parser_parameteR_declaration): Do not commit early to tenative
8307 parsers when in_type_id_in_expr_p is set.
8309 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8312 * parser.c (cp_parser_template_argument): Don't call
8313 make_unbound_class_template directly.
8314 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
8315 UNBOUND_CLASS_TEMPLATE tree node.
8317 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
8320 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
8322 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8325 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
8326 (DECL_FUNCTION_TEMPLATE_P): Use it.
8327 (DECL_CLASS_TEMPLATE_P): Likewise.
8328 * parser.c (cp_parser_lookup_name): Add is_template parameter.
8329 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
8330 (cp_parser_template_name): Likewise.
8331 (cp_parser_elaborated_type_specifier): Likewise.
8332 (cp_parser_namespace_name): Likewise.
8333 (cp_parser_class_name): Likewise.
8334 (cp_parser_lookup_name_simple): Likewise.
8336 See ChangeLog.3 for earlier changes.