1 2005-05-24 Andrew Pinski <pinskia@physics.uc.edu>
4 * optimize.c (update_cloned_parm): Copy the TYPE also from the
7 2005-05-19 Jakub Jelinek <jakub@redhat.com>
10 * decl.c (grokdeclarator): Fix "storage class specified for"
13 2005-05-19 Kazu Hirata <kazu@cs.umass.edu>
15 * parser.c: Fix comment typos.
17 2005-05-18 Geoffrey Keating <geoffk@apple.com>
19 * Make-lang.in (cc1plus-dummy): New.
20 (cc1plus-checksum.c): New.
21 (cc1plus-checksum.o): New.
22 (cc1plus): Add cc1plus-checksum.o.
24 2005-05-17 H.J. Lu <hongjiu.lu@intel.com>
27 * decl2.c (determine_visibility): Don't set visibility to
28 hidden if it has been set explicitly by user.
30 2005-05-17 Ziemowit Laski <zlaski@apple.com>
31 Mike Stump <mrs@apple.com>
33 Yet more Objective-C++...
35 * cp-objcp-common.h (cxx_get_alias_set): Move from
37 (cxx_warn_unused_global_decl): Likewise.
38 (cp_expr_size): Likewise.
39 (cp_tree_size): Likewise.
40 (cp_var_mod_type_p): Likewise.
41 (cxx_initialize_diagnostics): Likewise.
42 (cxx_types_compatible_p): Likewise.
45 * lex.c (D_OBJC): Add.
47 * Make-lang.in (cp/pt.o): Add cp/cp-objcp-common.h.
48 * parser.c: Add c-common.h include.
49 * pt.c: Add c-common.h and cp-objcp-common.h includes.
50 (template_args_equal): Use objc_comptypes as well.
51 (tsubst_copy_and_build): Use objcp_tsubst_copy_and_build as well.
52 * semantics.c (do_poplevel): Remove static.
54 * decl.c (objc_mark_locals_volatile): Don't change decls that are
56 * decl2.c (generate_ctor_or_dtor_function): Add code to initialize
57 Objective C++ early enough.
58 * lex.c (struct resword reswords): Add Objective-C++ support.
59 * parser.c (cp_lexer_get_preprocessor_token): Add Objective-C++.
60 (cp_parser_objc_message_receiver): Add.
61 (cp_parser_objc_message_args): Likewise.
62 (cp_parser_objc_message_expression): Likewise.
63 (cp_parser_objc_encode_expression): Likewise.
64 (cp_parser_objc_defs_expression): Likewise.
65 (cp_parser_objc_protocol_expression): Likewise.
66 (cp_parser_objc_selector_expression): Likewise.
67 (cp_parser_objc_expression): Likewise.
68 (cp_parser_objc_visibility_spec): Likewise.
69 (cp_parser_objc_method_type): Likewise.
70 (cp_parser_objc_protocol_qualifiers): Likewise.
71 (cp_parser_objc_typename): Likewise.
72 (cp_parser_objc_selector_p): Likewise.
73 (cp_parser_objc_selector): Likewise.
74 (cp_parser_objc_method_keyword_params): Likewise.
75 (cp_parser_objc_method_tail_params_opt): Likewise.
76 (cp_parser_objc_interstitial_code): Likewise.
77 (cp_parser_objc_method_signature): Likewise.
78 (cp_parser_objc_method_prototype_list): Likewise.
79 (cp_parser_objc_method_definition_list): Likewise.
80 (cp_parser_objc_class_ivars): Likewise.
81 (cp_parser_objc_identifier_list): Likewise.
82 (cp_parser_objc_alias_declaration): Likewise.
83 (cp_parser_objc_class_declaration): Likewise.
84 (cp_parser_objc_protocol_declaration): Likewise.
85 (cp_parser_objc_protocol_refs_opt): Likewise.
86 (cp_parser_objc_superclass_or_category): Likewise.
87 (cp_parser_objc_class_interface): Likewise.
88 (cp_parser_objc_class_implementation): Likewise.
89 (cp_parser_objc_end_implementation): Likewise.
90 (cp_parser_objc_declaration): Likewise.
91 (cp_parser_objc_try_catch_finally_statement): Likewise.
92 (cp_parser_objc_synchronized_statement): Likewise.
93 (cp_parser_objc_throw_statement): Likewise.
94 (cp_parser_objc_statement): Likewise.
95 (cp_parser_primary_expression): Add Objective-C++.
96 (cp_parser_statement): Likewise.
97 (cp_parser_declaration): Likewise.
98 (cp_parser_simple_type_specifier): Likewise.
99 (cp_parser_type_name): Likewise.
100 (cp_parser_parameter_declaration_list): Likewise.
101 (cp_parser_member_declaration) Likewise.
102 * tree.c: Include debug.h.
103 * typeck.c (composite_pointer_type): Add Objective-C++ support.
104 (finish_class_member_access_expr): Likewise.
105 (build_function_call): Allow objc to rewrite FUNCTION_DECLs.
106 (build_modify_expr): Allow objc to generate write barriers.
108 * Make-lang.in (cp/tree.o): Add debug.h.
109 * tree.c (lvalue_p_1, case CONST_DECL): Add.
111 2005-05-18 Jan Hubicka <jh@suse.cz>
113 * method.c: Include tree-pass.h
114 (use_thunk): Lower body before expanding.
116 2005-05-17 Jakub Jelinek <jakub@redhat.com>
119 * decl.c (maybe_deduce_size_from_array_init): Call
120 cp_apply_type_quals_to_decl after completing array type.
122 2005-05-16 Richard Henderson <rth@redhat.com>
124 * decl.c (build_library_fn_1): Move setting TREE_NOTHROW ...
125 (build_library_fn): ... here.
127 2005-05-12 Ian Lance Taylor <ian@airs.com>
129 * cp-tree.h (cp_stmt_codes): Don't define.
130 (statement_code_p): Declare.
131 (STATEMENT_CODE_P): Define.
132 * lex.c (statement_code_p): Define.
133 (cxx_init): Use actual codes in stmt_codes initializer, not
134 cp_stmt_codes macro. Initialize statement_code_p directly, rather
135 than using INIT_STATEMENT_CODES.
137 2005-05-09 Mark Mitchell <mark@codesourcery.com>
139 * typeck.c (build_unary_op): Do not resort to address arithmetic
140 when taking the address of a COMPONENT_REF.
142 2005-05-08 Kazu Hirata <kazu@cs.umass.edu>
144 * class.c (vtbl_init_data_s): Change the type of fns to
146 (build_vtbl_initializer, add_vcall_offset, add_vcall_offset):
147 Use VEC instead of VARRAY.
149 2005-05-07 Richard Sandiford <rsandifo@redhat.com>
151 * mangle.c: Remove a reference to the MIPS -mint64 option.
153 2005-05-07 Kazu Hirata <kazu@cs.umass.edu>
155 * decl.c (wrapup_globals_for_namespace): Use VEC instead of
157 * name-lookup.c (add_decl_to_level, begin_scope): Likewise.
158 * name-lookup.h (cp_binding_level): Change the type of
159 static_decls to VEC(tree,gc)*.
161 * mangle.c (globals): Change the type of substitutions to
163 (dump_substitution_candidates, add_substitution,
164 find_substitution, finish_mangling, init_mangle): Use VEC
167 2005-05-06 Kazu Hirata <kazu@cs.umass.edu>
169 * decl2.c (spew_debug): Remove.
171 * decl2.c (ssdf_decls, start_static_storage_duration_function,
172 generate_ctor_or_dtor_function): Use VEC instead of VARRAY.
174 * decl2.c (pending_statics, note_vague_linkage_var,
175 cp_finish_file): Use VEC instead of VARRAY.
176 (pending_statics_used): Remove.
178 2005-05-05 Kazu Hirata <kazu@cs.umass.edu>
180 * decl2.c (deferred_fns, note_vague_linkage_fn,
181 cp_finish_file): Use VEC instead of VARRAY.
183 2005-05-05 Mark Mitchell <mark@codesourcery.com>
186 * pt.c (build_non_dependent_expr): Use is_overloaded_fn.
188 2005-05-05 Kazu Hirata <kazu@cs.umass.edu>
190 * pt.c: Fix a comment typo.
192 2005-05-04 Kazu Hirata <kazu@cs.umass.edu>
194 * cp-tree.h (language_function): Change the type of
195 x_local_names to VEC.
196 * decl.c (push_local_name): Adjust uses of local_names.
198 2005-05-03 Kazu Hirata <kazu@cs.umass.edu>
200 * friend.c, lex.c, mangle.c, repo.c: Update copyright.
202 2005-05-02 Kazu Hirata <kazu@cs.umass.edu>
204 * class.c (local_classes, init_class_processing): Use VEC
206 * cp-tree.h (local_classes): Likewise.
207 * mangle.c (discriminator_for_local_entity): Likewise.
208 * name-lookup.c (pushtag): Likewise.
210 * class.c (current_lang_depth, push_lang_context,
211 pop_lang_context): Use VEC instead of VARRAY.
212 * cp-tree.h (saved_scope): Use VEC for lang_base instead of
214 * name-lookup.c (push_to_top_level): Use VEC instead of
217 2005-05-02 Paolo Bonzini <bonzini@gnu.org>
219 * semantics.c (finish_call_expr): Call resolve_overloaded_builtin
220 for BUILT_IN_MD built-ins.
222 2005-05-02 Michael Matz <matz@suse.de>
225 * cp-tree.h (cp_tree_index): Remove CPTI_NULL, to be defined in C
228 * lex.c (cxx_init): Move null_node initialisation to C common frontend.
230 2005-04-25 Ian Lance Taylor <ian@airs.com>
232 * cp-tree.def: Add EXPR_STMT.
233 * cp-tree.h (cp_stmt_codes): Add EXPR_STMT.
234 (EXPR_STMT_EXPR): Define.
235 * cp-gimplify.c: Include "flags.h".
236 (gimplify_expr_stmt): New static function.
237 (cp_gimplify_expr): Handle EXPR_STMT.
238 * cxx-pretty-print.c (pp_cxx_statement): Use pp_cxx_expression
239 rather than pp_expression.
240 (pp_cxx_statement): Handle EXPR_STMT.
241 * dump.c (cp_dump_tree): Handle EXPR_STMT.
242 * lex.c (cxx_init): Don't use c_common_stmt_codes in stmt_codes
245 2005-04-25 Andrew Pinski <pinskia@physics.uc.edu>
248 * rtti.c (ifnonnull): Cast the zero comparison operand
251 2005-04-24 Jakub Jelinek <jakub@redhat.com>
254 * class.c: Include cgraph.h.
255 (cp_fold_obj_type_ref): Set node->local.vtable_method.
256 * Make-lang.in (cgraph.o): Depend on $(CGRAPH_H).
258 2005-04-12 Markus F.X.J. Oberhumer <markus@oberhumer.com>
260 * mangle.c (write_builtin_type): Handle integer types which are
261 not one of the shared integer type nodes and emit a "vendor
262 extended builtin type" with an encoding in the form of "u5int96".
264 2005-04-24 Ian Lance Taylor <ian@airs.com>
266 * cp-tree.def (USING_STMT): Change class to tcc_statement.
267 (TRY_BLOCK, EH_SPEC_BLOCK, HANDLER, CLEANUP_STMT): Likewise.
268 (IF_STMT, FOR_STMT, WHILE_STMT, DO_STMT): Likewise.
269 (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
271 2005-04-23 DJ Delorie <dj@redhat.com>
273 * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, friend.c,
274 init.c, lex.c, mangle.c, method.c, name-lookup.c, parser.c,
275 repo.c, rtti.c, tree.c, typeck.c, typeck2.c: Adjust warning()
278 2005-04-22 Per Bothner <per@bothner.com>
280 * decl.c (make_rtl_for_nonlocal_decl): Don't try get_fileinfo if
281 input_filename is NULL, as it is for (say) __PRETTY_FUNCTION__.
283 2005-04-22 Alexandre Oliva <aoliva@redhat.com>
286 * name-lookup.c (push_overloaded_decl): Do not overload with
287 non-duplicate anticipated built-in.
289 2005-04-21 Kazu Hirata <kazu@cs.umass.edu>
291 * cp-tree.h (THROW_NAME, AUTO_VTABLE_NAME, AUTO_TEMP_FORMAT,
292 VTABLE_BASE, VTABLE_NAME_PREFIX, STATIC_NAME_FORMAT): Remove.
294 2005-04-21 Nathan Sidwell <nathan@codesourcery.com>
296 * cp-tree.h: Adjust for new VEC API.
297 Define VEC(tree_pair_s,gc).
298 (struct save_scope): Adjust.
299 (struct lang_type_class): Adjust.
300 (unemitted_tinfo_decls): Adjust.
301 * class.c (add_method, resort_type_method_vec,
302 finish_struct_methods, struct find_final_overrider_data,
303 dfs_find_final_overrider_pre, find_final_overrider,
304 get_vcall_index, warn_hidden, walk_subobject_offsets,
305 check_methods, fixup_inline_methods, end_of_class,
306 warn_about_ambiguous_bases, finish_struct, build_vtbl_initializer,
307 add_vcall_offset): Adjust.
308 * decl.c (xref_basetypes, finish_method): Adjust.
309 * decl2.c (check_classfn): Adjust.
310 * init.c (sort_mem_initializers, push_base_cleanups): Adjust.
311 * method.c (do_build_copy_constructor): Adjust.
312 * name-lookup.c (new_class_binding, store_binding,
313 store_bindings, store_class_bindings): Adjust.
314 * name-lookup.h: Define VEC(cxx_saved_binding,gc),
315 VEC(cp_class_binding,gc).
316 (struct cp_binding_level): Adjust.
317 * parser.c: Define VEC(cp_token_position,heap).
318 (struct cp_lexer): Adjust.
319 (cp_lexer_new_main, cp_lexer_new_from_tokens, cp_lexer_destroy,
320 cp_lexer_save_tokens): Adjust.
321 * pt.c (retrieve_specialization,
322 check_explicit_specialization): Adjust.
323 * rtti.c (unemitted_tinfo_decls): Adjust.
324 (init_rtti_processing, get_tinfo_decl, get_pseudo_ti_init,
325 get_pseudo_ti_desc): Adjust.
326 * search.c (dfs_access_in_type, lookup_conversion_operator,
327 lookup_fnfields_1, dfs_walk_once, dfs_walk_once_accessible,
328 dfs_get_pure_virtuals, lookup_conversions_r, binfo_for_vbase): Adjust.
329 * semantics.c: Define VEC(deferred_access,gc).
330 (push_deferring_access_checks): Adjust.
331 * typeck2.c (abstract_virtuals_error): Adjust.
333 2005-04-20 Ian Lance Taylor <ian@airs.com>
335 * cp-tree.def: Add STMT_EXPR.
336 * cp-tree.h (STMT_EXPR_NO_SCOPE): Define.
337 (STMT_EXPR_STMT): Define.
338 * cxx-pretty-print.c (pp_cxx_primary_expression): Handle
340 (pp_cxx_expression): Likewise.
341 (pp_cxx_statement): Call pp_cxx_statement, not pp_statement.
342 * dump.c (cp_dump_tree): Handle STMT_EXPR.
344 2005-04-18 Kazu Hirata <kazu@cs.umass.edu>
346 * decl.c (expand_static_init): Call build2 and build3 instead
349 * cp-tree.h (VPTR_NAME, VPTR_NAME_P): Remove.
351 2005-04-17 Ian Lance Taylor <ian@airs.com>
353 * cp-tree.def: Add SIZEOF_EXPR, ARROW_EXPR and ALIGNOF_EXPR.
354 * cxx-pretty-print.c (pp_cxx_postfix_expression): Handle
356 (pp_cxx_unary_expression): Handle SIZEOF_EXPR and ALIGNOF_EXPR.
357 (pp_cxx_expression): Handle ARROW_EXPR, SIZEOF_EXPR, and
359 * typeck.c (cxx_sizeof_or_alignof_type): Update call to
360 c_sizeof_or_alignof_type for change in parameter type.
362 2005-04-16 Mark Mitchell <mark@codesourcery.com>
365 * typeck.c (cxx_sizeof_or_alignof_type): Check whether the type to
366 which sizeof/alignof is dependent, rather than just whether we are
367 processing_template_decl.
369 2005-04-17 Kazu Hirata <kazu@cs.umass.edu>
371 * cp-tree.h (LOOKUP_GLOBAL): Remove.
372 (LOOKUP_ONLYCONVERTING, DIRECT_BIND, LOOKUP_NO_CONVERSION,
373 LOOKUP_DESTRUCTOR, LOOKUP_NO_TEMP_BIND, LOOKUP_PREFER_TYPES,
374 LOOKUP_PREFER_NAMESPACES, LOOKUP_CONSTRUCTOR_CALLABLE): Adjust
377 2005-04-15 Richard Henderson <rth@redhat.com>
380 * semantics.c (finish_call_expr): Call resolve_overloaded_builtin.
382 2005-04-15 Kazu Hirata <kazu@cs.umass.edu>
384 * cp-tree.h (lang_type_class): Remove redefined. Move
385 java_interface into where redefined was. Increment the width
387 (TYPE_REDEFINED): Remove.
389 2005-04-14 Kazu Hirata <kazu@cs.umass.edu>
391 * cp-tree.h (SET_TMPL_ARG, ENUM_TI_TEMPLATE, ENUM_TI_ARGS,
392 CLASSTYPE_TEMPLATE_LEVEL): Remove.
394 2005-04-11 Mark Mitchell <mark@codesourcery.com>
396 * decl2.c (determine_visibility): Don't use export_class_data.
397 (import_export_decl): Honor TARGET_CXX_CLASS_DATA_ALWAYS_WEAK and
398 TARGET_CXX_DETERMINE_CLASS_DATA_VISIBILITY.
400 2005-04-09 Kazu Hirata <kazu@cs.umass.edu>
402 * cp-tree.h (cxx_alignof): Remove.
404 * cp-tree.h (DECL_ARRAY_DELETE_OPERATOR_P): Remove.
406 * cp-tree.h (EXCEPTION_CLEANUP_NAME, B_SET, B_CLR, B_TST,
407 CONV_STATIC_CAST): Remove.
409 * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Remove.
411 * cp-tree.h (VF_BINFO_VALUE, VF_BASETYPE_VALUE): Remove.
413 * cp-tree.h (cp_deprecated): Remove.
415 2005-04-08 Ian Lance Taylor <ian@airs.com>
417 * cp-tree.def: Define FOR_STMT, WHILE_STMT, DO_STMT, BREAK_STMT,
418 CONTINUE_STMT, SWITCH_STMT.
419 * cp-tree.h (cp_stmt_codes): Add FOR_STMT, WHILE_STMT, DO_STMT,
420 BREAK_STMT, CONTINUE_STMT, SWITCH_STMT.
421 (WHILE_COND, WHILE_BODY): Define.
422 (DO_COND, DO_BODY): Define.
423 (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY): Define.
424 (SWITCH_STMT_COND, SWITCH_STMT_BODY, SWITCH_STMT_TYPE): Define.
425 * cp-gimplify.c (enum bc_t): Define.
426 (struct cp_gimplify_ctx, ctxp): Define.
427 (push_context, pop_context): New static functions.
428 (begin_bc_block, finish_bc_block): New static functions.
429 (build_bc_goto): New static function.
430 (gimplify_cp_loop, gimplify_for_stmt): New static functions.
431 (gimplify_while_stmt, gimplify_do_stmt): Likewise.
432 (gimplify_switch_stmt): Likewise.
433 (cp_gimplify_expr): Handle FOR_STMT, WHILE_STMT, DO_STMT,
434 SWITCH_STMT, CONTINUE_STMT, BREAK_STMT.
435 (cp_genericize): Call push_context and pop_context.
436 * semantics.c (finish_break_stmt): Just call build_stmt
437 (BREAK_STMT) rather than build_break_stmt.
438 (finish_continue_stmt): Corresponding change.
439 * decl.c (pop_switch): Update call to c_do_switch_warnings for new
441 * cxx-pretty-print.c (pp_cxx_statement): Handle SWITCH_STMT,
442 WHILE_STMT, DO_STMT, FOR_STMT, BREAK_STMT, CONTINUE_STMT.
443 * dump.c (cp_dump_tree): Likewise.
445 2005-04-08 Mark Mitchell <mark@codesourcery.com>
448 * parser.c (cp_parser_type_specifier_seq): Add is_condition
450 (cp_parser_new_type_id): Pass it.
451 (cp_parser_condition): Likewise.
452 (cp_parser_conversion_type_id): Likewise.
453 (cp_parser_type_id): Likewise.
454 (cp_parser_type_specifier_seq): In a condition, do not allow
455 invalid type-specifier combinations.
456 (cp_parser_exception_declaration): Adjust call to
457 cp_parser_type_specifier_seq.
459 * cp-tree.def (TINST_LEVEL): Document TINST_IN_SYSTEM_HEADER_P.
460 * cp-tree.h (struct tinst_level): Add in_system_header_p.
461 (TINST_IN_SYSTEM_HEADER_P): New macro.
462 (make_tinst_level): Remove.
463 * pt.c (lookup_template_class): Preserve DECL_IN_SYSTEM_HEADER on
464 the instantiated class.
465 (push_tinst_level): Do not use make_tinst_level. Set
466 TINST_IN_SYSTEM_HEADER_P.
467 (pop_tinst_level): Likewise.
468 (instantiate_class_template): Set in_system_header.
469 (instantiate_pending_templates): Likewise.
470 * tree.c (make_tinst_level): Remove.
472 2005-04-06 Joseph S. Myers <joseph@codesourcery.com>
474 * decl.c (start_decl): Apply pending #pragma weak regardless of
477 2005-04-06 Mark Mitchell <mark@codesourcery.com>
480 * pt.c (regenerate_decl_from_template): Copy attributes for
481 parameters from the pattern to the instantiation.
483 2005-04-05 Mark Mitchell <mark@codesourcery.com>
486 * cp-tree.def (OFFSET_REF): Correct comments.
487 * init.c (build_offset_ref): Remove misleading comment.
488 * typeck.c (build_unary_op): Handle pointer-to-member creation
489 here, rather than ...
490 (unary_complex_lvalue): ... here.
492 2005-04-06 Jason Merrill <jason@redhat.com>
495 * tree.c (stabilize_init): Don't bother trying to stabilize
496 something with no side-effects.
498 2005-04-05 Mark Mitchell <mark@codesourcery.com>
501 * decl.c (grokdeclarator): Correct attribute handling.
503 2005-04-05 Mark Mitchell <mark@codesourcery.com>
506 * decl2.c (import_export_decl): Use non-COMDAT external linkage
507 for virtual tables, typeinfo, etc. that will be emitted in only
508 one translation unit on systems without weak symbols.
510 2005-04-04 Mark Mitchell <mark@codesourcery.com>
513 * parser.c (cp_parser_template_name): Fix thinko.
515 2005-04-04 Nathan Sidwell <nathan@codesourcery.com>
518 * method.c (use_thunk): Protect covariant pointer return
519 adjustments from NULL pointers.
521 2005-04-04 Jan Hubicka <jh@suse.cz>
523 * decl2.c (finish_objects): Revert my previous patch.
524 (cp_finish_file): Likewise.
526 2005-04-03 Kazu Hirata <kazu@cs.umass.edu>
528 * pt.c: Fix comment typos.
530 2005-04-03 Nathan Sidwell <nathan@codesourcery.com>
533 * pt.c (more_specialized_fn): Member functions are unordered wrt
534 non-members. Conversion operators are unordered wrt other
537 2005-04-01 Nathan Sidwell <nathan@codesourcery.com>
539 * call.c (add_template_candidates_real): Remove length parameter
540 from fn_type_unification call.
541 * class.c (resolve_address_of_overloaded_function): Likewise
542 * cp-tree.h (fn_type_unification): Remove length parameter.
543 * pt.c (get_bindings_overload): Remove.
544 (get_bindings_real): Rename to ...
545 (get_bindings): ... here. Remove length and strict
546 parameters. Change return type flag to boolean. Remove original
548 (determine_specialization): Adjust get_bindings call.
549 (fn_type_unification): Remove length parameter. Adjust.
550 (type_unification_real): Remove length parameter. Adjust.
551 (resolve_overloaded_unification): Adjust get_bindings call.
552 (try_one_overload): Simplify confusing cascaded if control flow.
553 (unify): Remove length paramter from type_unification_real call.
554 (most_specialized_instantiation): Adjust get_bindings calls.
555 (most_specialized): Likewise.
557 2005-03-31 Nathan Sidwell <nathan@codesourcery.com>
559 PR c++/19203, implement DR 214
560 * call.c (joust): Use more_specialized_fn.
561 * cp-tree.h (DEDUCE_ORDER): Remove.
562 (more_specialized): Replace with ...
563 (more_specialized_fn): ... this.
564 * pt.c (maybe_adjust_types_for_deduction): Remove DEDUCE_ORDER
566 (type_unification_real): Remove DEDUCE_ORDER case.
567 (more_specialized): Replace with ...
568 (more_specialized_fn): ... this. Implement DR 214.
569 (most_specialized_instantiation): Use get_bindings_real directly.
571 2005-03-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
574 * call.c (build_new_op): Remove check for -Wsynth.
576 2005-03-31 Jan Hubicka <jh@suse.cz>
578 * decl2.c (finish_objects): Mark ctor as needed.
579 (cp_finish_file): Output variables only in nonunit-at-a-time.
581 2005-03-29 Richard Henderson <rth@redhat.com>
584 * decl.c (cp_complete_array_type): Rename from complete_array_type.
585 Use the new complete_array_type in c-common.c. Update all callers.
586 * cp-tree.h (cp_complete_array_type): Update to match.
588 2005-03-24 Geoffrey Keating <geoffk@apple.com>
590 * typeck.c (build_static_cast_1): Allow scalar_cast between
591 any integral, floating, or enumeration type.
593 2005-03-24 Steven Bosscher <stevenb@suse.de>
595 * typeck.c (comptypes): First determine if the types are compatible
596 from a target-independent point of view. Check target attributes
599 * class.c (build_base_path):
600 (build_vbase_offset_vtbl_entries):
601 (add_vcall_offset): Replace fold (buildN (...)) with fold_buildN.
602 * error.c (dump_expr): Likewise.
603 * init.c (build_zero_init, expand_cleanup_for_base,
604 build_vec_delete_1): Likewise.
605 * mangle.c (write_integer_cst): Likewise.
606 * method.c (thunk_adjust): Likewise.
607 * pt.c (convert_nontype_argument, tsubst, unify): Likewise.
608 * tree.c (cxx_print_statistics, array_type_nelts_total): Likewise.
609 * typeck.c (build_ptrmemfunc_access_expr,
610 (get_member_function_from_ptrfunc): Likewise.
612 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
614 * cp-objcp-common.h (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
616 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
618 * cp-tree.h (perform_integral_promotions): Remove.
619 (default_conversion): Add.
621 2005-03-22 Mark Mitchell <mark@codesourcery.com>
623 * parser.c (cp_parser_warn_min_max): New function.
624 (cp_parser_binary_expression): Use it.
625 (cp_parser_assignment_operator_opt): Likewise.
626 (cp_parser_operator): Likewise.
628 2005-03-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
631 * decl.c (start_preparsed_function): Robustify.
633 2005-03-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
636 * parser.c (cp_parser_class_head): Return NULL_TREE when
637 encountering a redefinition.
639 2005-03-22 Nathan Sidwell <nathan@codesourcery.com>
643 * typeck.c (build_ptrmemfunc): Allow OFFSET_REF when processing a
646 2005-03-21 Paolo Carlini <pcarlini@suse.de>
650 * init.c (emit_mem_initializers): Don't crash on undefined
653 2005-03-21 Paolo Carlini <pcarlini@suse.de>
656 * semantics.c (finish_stmt_expr_expr): Return immediately
657 if error_operand_p (expr).
659 2005-03-21 Joseph S. Myers <joseph@codesourcery.com>
661 * cp-tree.h (lvalue_or_else, lvalue_p): New.
662 * typeck.c (lvalue_or_else): New. Call lvalue_error.
664 2005-03-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
667 * decl.c (decls_match): Compare context of VAR_DECL.
669 2005-03-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
672 * parser.c (cp_parser_postfix_expression) <case RID_TYPENAME>:
673 Check the return value of cp_parser_nested_name_specifier.
675 2005-03-18 Dale Johannesen <dalej@apple.com>
677 * cp/tree.c (cp_tree_equal): Handle SSA_NAME.
679 2005-03-18 Paolo Carlini <pcarlini@suse.de>
682 * parser.c (cp_parser_diagnose_invalid_type_name):
683 Check TYPE_BINFO (current_class_type) before attempting
684 to emit inform messages.
686 2005-03-17 Paolo Carlini <pcarlini@suse.de>
689 * cp-tree.h (grok_op_properties): Change return type to void.
690 * decl.c (grok_op_properties): Return early - don't check the
691 arity - in case of a static member or an operator that cannot
692 be non-member; tidy a bit.
694 2005-03-17 Nathan Sidwell <nathan@codesourcery.com>
697 * pt.c (contains_dependent_cast_p): Remove.
698 (fold_non_dependent_expr): Don't use it.
699 (value_dependent_expression_p): Use a switch statement.
700 reference_exprs can be dependent.
702 2005-03-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
706 * name-lookup.c (pushtag): Skip template parameter scope when
707 scope is ts_global. Don't push tag into template parameter
709 * pt.c (instantiate_class_template): Reorder friend class
710 template substitution to handle non-dependent friend class
711 that hasn't been previously declared.
713 2005-03-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
715 Friend class name lookup 5/n
717 * cp-tree.h (pushtag): Adjust declaration.
718 * decl.c (lookup_and_check_tag): Call lookup_type_scope if
720 (xref_tag): Adjust call to pushtag. Make hidden class visible.
721 (start_enum): Adjust call to pushtag.
722 * name-lookup.c (ambiguous_decl): Ignore hidden names.
723 (qualify_lookup): Change return type to bool.
724 (hidden_name_p): New function.
725 (lookup_namespace_name, unqualified_namespace_lookup,
726 lookup_name_real): Use it.
727 (lookup_type_scope): Update comments.
728 (maybe_process_template_type_declaration): Change parameter name
729 from globalize to is_friend.
730 (pushtag): Change globalize parameter of type int to tag_scope.
731 Hide name if introduced by friend declaration.
732 * name-lookup.h (hidden_name_p): Add declaration.
733 * parser.c (cp_parser_lookup_name): Don't deal with hidden name
735 * pt.c (push_template_decl_real): Make hidden class template
737 (lookup_template_class, instantiate_class_template): Adjust call
739 * semantics.c (begin_class_definition): Likewise.
740 * rtti.c (init_rtti_processing, build_dynamic_cast_1,
741 tinfo_base_init, emit_support_tinfos): Use ts_current instead of
744 2005-03-13 Mark Mitchell <mark@codesourcery.com>
747 * pt.c (determine_specialization): Reject non-specializations.
749 2005-03-11 Per Bothner <per@bothner.com>
751 * cp-tree.h (struct cp_declarator): New id_loc field.
752 * cp/parser.c (cp_lexer_get_preprocessor_token): Set cp_token's
753 location using c_lex_with_flags, instead of input_location.
754 (cp_parser_direct_declarator): Set declarator's id_loc from
757 2005-03-10 Jakub Jelinek <jakub@redhat.com>
759 PR c++/18384, c++/18327
760 * decl.c (reshape_init_array): Use UHWI type for max_index_cst
761 and index. Convert max_index to size_type_node if it isn't
764 2005-03-09 Mark Mitchell <mark@codesourcery.com>
767 * pt.c (tsubst_decl): Apply array-to-pointer and
768 function-to-pointer conversions to function arguments.
769 (regenerate_decl_from_template): Likewise.
771 2005-03-09 Paolo Carlini <pcarlini@suse.de>
774 * decl.c (complete_array_type): In pedantic mode, return
775 3 for an empty initializer list as the initializer for an
776 array of unknown bound (8.5.1/4).
777 (maybe_deduce_size_from_array_init): Fix final test to use
780 2005-03-08 Nathan Sidwell <nathan@codesourcery.com>
783 * pt.c (contains_dependent_cast_p): New.
784 (fold_non_dependent_expr): Call it.
786 2005-03-08 Mark Mitchell <mark@codesourcery.com>
789 * cp-tree.h (target_type): Remove.
790 * decl.c (layout_var_decl): Remove #if 0'd code.
791 (cp_finish_decl): Remove dead code.
792 * init.c (build_vec_init): When determining whether or not the
793 element type has an asignment operator, look through all array
795 * typeck.c (target_type): Remove.
797 2005-03-07 Mark Mitchell <mark@codesourcery.com>
799 * class.c (finish_struct_1): Do not warn about non-virtual
800 destructors in Java classes.
802 2005-03-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
805 * init.c (build_offset_ref): Don't build non-dependent SCOPE_REF.
806 * pt.c (build_non_dependent_expr): Don't build NON_DEPENDENT_EXPR
808 * typeck.c (build_x_unary_op): Don't build non-dependent SCOPE_REF.
809 Also set PTRMEM_OK_P for NON_DEPENDENT_EXPR.
810 (build_unary_op): Handle building ADDR_EXPR of OFFSET_REF inside
813 2005-03-02 Alexandre Oliva <aoliva@redhat.com>
815 * name-lookup.c (push_overloaded_decl): Don't error if the new
816 decl matches the old one.
817 * decl.c (redeclaration_error_message): Likewise.
819 2005-03-01 Per Bothner <per@bothner.com>
821 * decl.c (finish_function): Use SET_EXPR_LOCATION instead of
822 unavailable annotate_with_file_line, if USE_MAPPED_LOCATION.
824 2005-03-01 Nathan Sidwell <nathan@codesourcery.com>
827 * class.c (update_vtable_entry_for_fn): Don't crash on invalid
830 * cp-tree.g (THUNK_TARGET): Expand comment.
831 * method.c (use_thunk): Make sure we also use the target, if that
834 2005-02-27 Jakub Jelinek <jakub@redhat.com>
837 * decl.c (cxx_comdat_group): Put thunks for
838 TARGET_USE_LOCAL_THUNK_ALIAS_P (function) functions into the same
839 comdat group as the thunk target.
841 2005-02-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
843 * call.c, class.c, cp-tree.h, decl2.c, error.c, init.c, mangle.c,
844 parser.c: Fix comment typo(s).
846 2005-02-24 Jakub Jelinek <jakub@redhat.com>
849 * decl.c (reshape_init): Don't warn about missing braces if STRING_CST
850 initializes a char/wchar_t array.
852 2005-02-23 Mark Mitchell <mark@codesourcery.com>
855 * decl.c (grokvardecl): Set DECL_INTERFACE_KNOWN for declarations
856 with internal linkage.
858 2005-02-23 Alexandre Oliva <aoliva@redhat.com>
860 * decl.c (grokvardecl): Don't exempt anonymous types from having
861 linkage for variables that have linkage other than "C".
863 2005-02-23 Kazu Hirata <kazu@cs.umass.edu>
865 * cp-objcp-common.h, error.c: Update copyright.
867 2005-02-22 Mark Mitchell <mark@codesourcery.com>
870 * decl.c (start_decl_1): Don't clear TREE_READONLY.
871 (cp_finish_decl): Likewise.
872 (complete_vars): Call cp_apply_type_quals_to_decl.
873 * typeck.c (cp_apply_type_quals): Avoid setting TREE_READONLY in
874 cases where that's not valid.
877 * init.c (integral_constant_value): Iterate if the value of a decl
878 is itself a constant.
881 * parser.c (cp_parser_class_head): Check for redefintions here.
882 * semantics.c (begin_class_definition): Not here.
885 * decl2.c (build_anon_union_vars): Add type parameter.
886 (finish_anon_union): Pass it.
889 * error.c (dump_expr): Do not print the body of a BIND_EXPR.
890 Handle STATEMENT_LIST.
893 * parser.c (cp_parser_direct_declarator): Always complain about
894 non-constant array bounds when in a function scope.
895 * semantics.c (finish_id_expression): Do not mark dependent names
898 2005-02-21 Douglas Gregor <dgregor@cs.indiana.edu>
902 * cp-tree.h (cp_apply_type_quals_to_decl): Declared.
903 * decl.c (grokdeclarator): Pedwarn about qualifying a function
905 Add qualifiers when declaring a typedef of a function type.
906 Member function pointers pick up the qualifiers of the typedef
907 used to declare them.
908 Don't complain about creating cv-qualified function types.
909 Complain about qualified function typedefs that are used to
910 declare non-static member functions or free functions.
911 Use cp_apply_type_quals_to_decl.
912 (start_preparsed_function): Use cp_apply_type_quals_to_decl.
913 (grokclassfn): Use cp_apply_type_quals_to_decl.
914 * error.c (dump_type_suffix): Print qualifiers for function
916 * pt.c (tsubst_decl): Use cp_apply_type_quals_to_decl.
917 (tsubst): When substituting a function type into a member
918 pointer type, pass along the qualifiers.
919 (unify): Unify member pointers to member function pointers.
920 * tree.c (cp_build_qualified_type_real): Function types may be
921 qualified. This includes restrict qualifiers.
922 * typeck.c (cp_apply_type_quals_to_decl): New function to replace
923 use of c_apply_type_quals_to_decl. Drops qualifiers that are being
924 added to function types.
926 2005-02-20 Zack Weinberg <zack@codesourcery.com>
929 * cp-objcp-common.h (LANG_HOOKS_TO_TARGET_CHARSET): Set to
930 c_common_to_target_charset. Delete bogus comment.
932 2005-02-18 Richard Henderson <rth@redhat.com>
935 * except.c (do_get_exception_ptr): New.
936 (expand_start_catch_block): Use it.
938 2005-02-19 Jakub Jelinek <jakub@redhat.com>
940 * decl.c (start_decl_1): Only check TYPE_NEEDS_CONSTRUCTING
941 if type is not error_mark_node.
943 2005-01-20 Giovanni Bajo <giovannibajo@gcc.gnu.org>
946 * decl2.c (grokfield): Do not apply attributes to template parameters
947 as they are ignored by tsubst anyway.
949 2005-02-18 Jakub Jelinek <jakub@redhat.com>
952 * decl.c (start_decl_1): Clear TREE_READONLY flag if
953 its type has TYPE_NEEDS_CONSTRUCTING.
954 (complete_vars): Likewise.
956 2005-02-17 Alexandre Oliva <aoliva@redhat.com>
959 * class.c (finish_struct): Initialize TYPE_SIZE_UNIT of a
960 template along with TYPE_SIZE.
963 * semantics.c (perform_deferred_access_checks): Use
964 get_deferred_access_checks to get the top of the stack.
966 2005-02-15 Alexandre Oliva <aoliva@redhat.com>
969 * class.c (add_implicitly_declared_members, check_field_decl)
970 (check_field_decls, check_bases): Remove arguments, tests and
971 assignments of cant_have_default_ctor-related variables.
973 2005-02-15 Alexandre Oliva <aoliva@redhat.com>
975 * decl2.c (mark_used): Set the source location of the used decl to
976 the current input location here...
977 * method.c (synthesize_method): ... not here. Set input_location
978 from the decl instead.
980 2005-02-14 Nathan Sidwell <nathan@codesourcery.com>
983 * parser.c (cp_parser_late_parsing_for_member): Use
984 current_function_decl as scope to push to and from.
987 * pt.c (check_explicit_specialization): Make sure namespace
988 binding lookup found an overloaded function.
989 (lookup_template_function): Just assert FNS is an overloaded
993 * decl.c (grokdeclarator): Check for error mark node in ptrmem
996 2005-02-14 Alexandre Oliva <aoliva@redhat.com>
999 * decl.c (redeclaration_error_message): Report redefinition of
1000 pure virtual function.
1002 2005-02-14 Nathan Sidwell <nathan@codesourcery.com>
1005 * class.c (build_simple_base_path): Build the component_ref
1007 (update_vtable_entry_for_fn): Walk the covariant's binfo chain
1008 rather than using lookup_base.
1009 * search.c (dfs_walk_once): Add non-recursive assert check.
1010 * typeck.c (build_class_member_access_expr): It is possible for
1011 the member type to be both const and volatile.
1013 2005-02-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1017 * pt.c (maybe_check_template_type): Remove.
1018 * cp-tree.h (maybe_check_template_type): Remove prototype.
1019 * name-lookup.c (maybe_process_template_type_declaration): Don't
1020 use maybe_check_template_type.
1022 2005-02-11 Richard Henderson <rth@redhat.com>
1025 * pt.c (get_mostly_instantiated_function_type): Save and restore
1026 flag_access_control instead of push/pop_access_scope.
1028 2005-02-10 Mark Mitchell <mark@codesourcery.com>
1031 * decl.c (reshape_init): Issue warnings about missing braces.
1033 2005-02-11 Kazu Hirata <kazu@cs.umass.edu>
1035 * cp-tree.def, except.c, ptree.c: Update copyright.
1037 2005-02-09 Mark Mitchell <mark@codesourcery.com>
1040 * call.c (build_op_delete_call): Check COMPLETE_TYPE_P before
1041 attempting name lookup.
1043 * parser.c (cp_parser_unqualified_id): Initialize type_decl.
1046 * call.c (initialize_reference): Robustify.
1049 * decl.c (grokdeclarator): Check for invalid use of destructor
1053 * parser.c (cp_parser_unqualified_id): Avoid creating destructor
1054 names with invalid types.
1057 * parser.c (cp_parser_direct_declarator): Allow type-dependent
1058 expressions as array bounds.
1061 * parser.c (cp_parser_attributes_list): Allow empty lists.
1063 2005-02-08 Mark Mitchell <mark@codesourcery.com>
1066 * class.c (add_method): Don't set TYPE_HAS_DESTRUCTOR.
1067 (check_bases): Give warnings about a base class with a
1068 non-virtual destructor, even if it is implicit.
1069 (finish_struct_bits): Don't copy TYPE_HAS_DESTRUCTOR.
1070 (maybe_warn_about_overly_private_class): Don't use
1071 TYPE_HAS_DESTRUCTOR.
1072 (finish_struct_methods): Don't set TYPE_HAS_DESTRUCTOR.
1073 (check_for_override): Give it external linkage.
1074 (add_implicitly_declared_members): Generate destructors lazily.
1075 (check_field_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not
1076 TYPE_HAS_DESTRUCTOR.
1077 (check_bases_and_members): Call check_methods before
1079 (check_bases_and_members): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not
1080 TYPE_HAS_DESTRUCTOR.
1081 (finish_struct_1): Do not use TYPE_HAS_DESTRUCTOR.
1082 * cp-tree.def (PSEUDO_DTOR_EXPR): Document.
1083 * cp-tree.h (TYPE_HAS_DESTRUCTOR): Remove.
1084 (lang_type_class): Add lazy_destructor.
1085 (CLASSTYPE_LAZY_DESTRUCTOR): New macro.
1086 (CLASSTYPE_DESTRUCTORS): Robustify.
1087 (TYPE_HAS_DESTRUCTOR): Remove.
1088 (check_for_override): Declare.
1089 (build_vbase_delete): Remove.
1090 * cvt.c (convert_to_void): Issue errors about pseudo-destructor
1092 * decl.c (cxx_maybe_build_cleanup): Remove dead code.
1093 * except.c (dtor_nothrow): Lazily create destructors if necessary.
1094 (build_throw): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
1095 * init.c (build_delete): Lazily create destructors, if necessary.
1096 (build_vbase_delete): Remove.
1097 * method.c (locate_dtor): Simplify.
1098 (implicitly_declare_fn): Add support for destructors.
1099 * parser.c (cp_parser_lookup_name): Lazily create destructors, if
1101 * pt.c (check_explicit_specialization): Don't use
1102 TYPE_HAS_DESTRUCTOR.
1103 (instantiate_class_template): Likewise.
1104 * ptree.c (cxx_print_type): Don't print TYPE_HAS_DESTRUCTOR.
1105 * rtti.c (emit_support_tinfos): Robustify.
1106 * search.c (lookup_fnfields_1): Lazily create destructors.
1107 * typeck.c (build_class_member_access_expr): Remove
1108 PSEUDO_DTOR_EXPR handling.
1109 (lookup_destructor): Likewise.
1111 2005-02-08 Kazu Hirata <kazu@cs.umass.edu>
1113 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h: Update
1116 2005-02-07 Mark Mitchell <mark@codesourcery.com>
1118 * parser.c (cp_lexer_start_debugging): Avoid arithmetic operations
1119 on boolean variables.
1120 (cp_lexer_stop_debugging): Likewise.
1122 2005-02-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1125 * parser.c (cp_parser_pure_specifier): Emit a specific error
1126 message with an invalid pure specifier.
1127 * decl2.c (grok_function_init): Remove.
1128 (grokfield): An initializer for a method is a always a pure
1131 2005-02-02 Matt Austern <austern@apple.com>
1134 * cp-tree.h (builtin_valid_in_constant_expr_p): Declare.
1135 * parser.c (cp_parser_postfix_expression): Accept function call in
1136 constant expression if builtin_valid_in_constant_expr_p is true
1138 * pt.c (value_dependent_expression_p): Handle CALL_EXPRs properly.
1139 * semantics.c (finish_id_expression): Accept function call in constant
1140 expression if builtin_valid_in_constant_expr_p is true for that
1142 * tree.c (builtin_valid_in_constant_expr_p): New.
1144 2005-02-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1147 * pt.c (check_instantiated_args): Improve error message.
1148 Fix logic when to print its second part.
1150 2005-02-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1152 * cp-tree.h (complete_type_or_else): Remove macro.
1153 (complete_type_or_diagnostic): Rename to complete_type_or_else
1154 and remove last argument.
1155 * typeck.c (complete_type_or_diagnostic): Rename to
1156 complete_type_or_else and remove last argument.
1158 2005-02-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1160 * cp-tree.h (commonparms): Remove prototype.
1161 (convert_arguments): Likewise.
1162 (PFN_FROM_PTRMEMFUNC): Remove.
1163 * typeck.c (commonparms): Make static.
1164 (convert_arguments): Add prototype. Make static.
1165 (PFN_FROM_PTRMEMFUNC): Replace by pfn_from_ptrmemfunc.
1167 2005-01-31 Mark Mitchell <mark@codesourcery.com>
1169 * parser.c (cp_parser_primary_expression): Don't complain about
1170 floating-point literals in integral constant expressions when
1173 2005-02-01 Alexandre Oliva <aoliva@redhat.com>
1175 * parser.c (cp_parser_template_id): Revert comment patch too.
1180 * parser.c (cp_parser_template_id): Revert 2004-12-09's patch.
1181 Issue an error when creating the template id.
1182 * pt.c (fn_type_unification): Return early if the explicit
1183 template arg list is an error_mark_node.
1185 2005-01-31 Mark Mitchell <mark@codesourcery.com>
1187 * decl.c (build_enumerator): Do not issue duplicate error messages
1188 about invalid enumeration constants.
1189 * parser.c (cp_parser_non_integral_constant_expression): Always
1190 set parser->non_integral_constant_expression_p.
1191 (cp_parser_primary_expression): Add cast_p parameter. Issue
1192 errors about invalid uses of floating-point literals in
1194 (cp_parser_postfix_expression): Add cast_p parameter.
1195 (cp_parser_open_square_expression): Pass it.
1196 (cp_parser_parenthesized_expression_list): Add cast_p parameter.
1197 (cp_parser_unary_expression): Likewise.
1198 (cp_parser_new_placement): Pass it.
1199 (cp_parser_direct_new_declarator): Likewise.
1200 (cp_parser_new_initializer): Likewise.
1201 (cp_parser_cast_expression): Add cast_p parameter.
1202 (cp_parser_binary_expression): Likewise.
1203 (cp_parser_question_colon_clause): Likewise.
1204 (cp_parser_assignment_expression): Likewise.
1205 (cp_parser_expression): Likewise.
1206 (cp_parser_constant_expression): If an integral constant
1207 expression is invalid, return error_mark_node.
1208 (cp_parser_expression_statement): Pass cast_p.
1209 (cp_parser_condition): Likewise.
1210 (cp_parser_iteration_statement): Likewise.
1211 (cp_parser_jump_statement): Likewise.
1212 (cp_parser_mem_initializer): Likewise.
1213 (cp_parser_template_argument): Likewise.
1214 (cp_parser_parameter_declaration): Likewise.
1215 (cp_parser_initializer): Likewise.
1216 (cp_parser_throw_expression): Likewise.
1217 (cp_parser_attribute_list): Likewise.
1218 (cp_parser_simple_cast_expression): Likewise.
1219 (cp_parser_functional_cast): Likewise.
1220 (cp_parser_late_parsing_default_args): Likewise.
1221 (cp_parser_sizeof_operand): Save/restore
1222 non_integral_constant_expression_p.
1224 2005-01-31 Mike Stump <mrs@apple.com>
1226 * parser.c (cp_lexer_new_main): Get the first token, first, before
1229 2005-01-31 Mark Mitchell <mark@codesourcery.com>
1231 * decl.c (start_decl): Add missing parentheses.
1233 2005-01-30 Mark Mitchell <mark@codesourcery.com>
1236 * cp-tree.h (DECL_USE_TEMPLATE): Expand documentation.
1237 * decl.c (duplicate_decls): Do not discard
1238 DECL_IMPLICIT_INSTANTIATION when merging declarations.
1239 (start_decl): Do not SET_DECL_TEMPLATE_SPECIALIZATION for
1240 variables that do not have DECL_USE_TEMPLATE.
1243 * decl.c (grokdeclarator): Refactor code so that qualified names
1244 are never allowed as the declarator in a typedef.
1247 * name-lookup.c (do_nonmember_using_decl): Avoid overloading
1248 builtin declarations.
1251 * call.c (convert_like_real): Inline call to
1252 dubious_conversion_warnings here.
1253 * cp-tree.h (dubious_conversion_warnings): Remove.
1254 * semantics.c (finish_unary_op_expr): Copy INTEGER_CSTs before
1255 setting TREE_NEGATED_INT.
1256 * typeck.c (dubious_conversion_warnings): Remove.
1259 * name-lookup.c (pushdecl_namespace_level): Avoid accessing free'd
1262 2005-01-28 Mark Mitchell <mark@codesourcery.com>
1265 * parser.c (cp_parser_diagnose_invalid_type_name): Commit to
1269 * pt.c (redeclare_class_template): Robustify.
1271 2005-01-27 Steven Bosscher <stevenb@suse.de>
1273 * decl.c (finish_case_label): Use SWITCH_STMT accessor macros
1274 instead of SWITCH_EXPR ones.
1275 * pt.c (tsubst_expr): Likewise.
1276 * semantics.c (begin_switch_stmt, finish_switch_cond,
1277 finish_switch_stmt): Likewise.
1279 2005-01-26 J"orn Rennecke <joern.rennecke@st.com>
1282 * parser.c (cp_parser_initializer_clause): Initialize *non_constant_p.
1284 2005-01-25 Andrew Pinski <pinskia@physics.uc.edu>
1286 * class.c (abort_fndecl_addr): New variable.
1287 (build_vtbl_initializer): If we have a pure virtual function
1288 share the abort function's address.
1289 Include gt-cp-class.h at the end.
1290 * config-lang.in (gtfiles): Add cp/class.c.
1292 2005-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1294 * cxx-pretty-print.c (pp_cxx_statement): Add prototype. Make static.
1295 (pp_cxx_function_definition): Make static.
1296 * cxx-pretty-print.h (pp_cxx_statement): Remove prototype.
1297 (pp_cxx_function_definition): Likewise.
1299 2005-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1301 * name-lookup.c (print_binding_level): Make static.
1302 (constructor_name_full): Make static inline.
1303 (current_decl_namespace): Make static.
1304 * name-lookup.h (constructor_name_full): Remove prototype.
1305 (print_binding_level): Likewise.
1306 (current_decl_namespace): Likewise.
1308 2005-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1310 * decl.h (debug_bindings_indentation): Remove.
1312 2005-01-23 Kazu Hirata <kazu@cs.umass.edu>
1314 * typeck.c: Fix a comment typo.
1316 2005-01-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1319 * pt.c (fold_decl_constant_value): Always call fold_non_dependent_expr
1321 (tsubst): Use fold_decl_constant_value in place of a bare call to
1322 integral_constant_value.
1324 2005-01-20 Kazu Hirata <kazu@cs.umass.edu>
1326 * typeck.c (more_qualified_p): Remove.
1327 * cp-tree.h: Remove the corresponding prototype.
1329 2005-01-19 Matt Austern <austern@apple.com>
1331 * typeck.c (comptypes): Handle return code from objc_comptypes
1334 2005-01-19 Kazu Hirata <kazu@cs.umass.edu>
1336 * cp-tree.h, name-lookup.h: Remove unused prototypes.
1338 2005-01-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1341 * semantics.c (finish_id_expression): Disable access checking for
1342 already lookuped FIELD_DECL.
1344 2005-01-18 Kazu Hirata <kazu@cs.umass.edu>
1346 * decl.c (delete_block): Remove.
1347 * cp-tree.h: Remove the corresponding prototype.
1349 * decl.c (vtable_decl_p, vtype_decl_p, walk_globals_data,
1350 walk_vtables_r, walk_vtables, walk_globals_r, walk_globals):
1352 * cp-tree.h: Remove the corresponding prototypes.
1354 * tree.c (count_functions, bound_pmf_p, cp_is_overload_p,
1355 cp_update_decl_after_saving, name_p): Remove.
1356 * cp-tree.h: Remove the corresponding prototypes.
1358 2005-01-18 Andrew Pinski <pinskia@physics.uc.edu>
1361 * semantics.c (finish_asm_stmt): Strip nops off
1362 input memory operands.
1364 2005-01-18 Kazu Hirata <kazu@cs.umass.edu>
1366 * Make-lang.in, call.c, cvt.c, init.c, rtti.c, tree.c,
1367 typeck2.c: Update copyright.
1369 2005-01-16 Kazu Hirata <kazu@cs.umass.edu>
1371 * class.c (get_enclosing_class): Remove.
1372 * cp-tree.h: Remove the corresponding prototypes.
1374 * cvt.c (convert_lvalue): Remove.
1375 * cp-tree.h: Remove the corresponding prototype.
1377 * pt.c (tinst_for_decl): Remove.
1378 * cp-tree.h: Remove the corresponding prototypes.
1380 * tree.c (hash_chainon): Remove.
1381 * cp-tree.h: Remove the corresponding prototypes.
1383 2005-01-15 Jakub Jelinek <jakub@redhat.com>
1386 * typeck2.c (split_nonconstant_init_1) <case VECTOR_TYPE>: Put a copy
1387 of CONSTRUCTOR's node into MODIFY_EXPR, as the original is modified.
1389 2005-01-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1391 * Make-lang.in (cp-warn): Don't append $(WERROR).
1393 2005-01-10 Kazu Hirata <kazu@cs.umass.edu>
1395 * cp-tree.h: Fix a comment typo.
1397 2005-01-07 Nathan Sidwell <nathan@codesourcery.com>
1400 * pt.c (tsubst_qualified_id): Call convert_from_reference.
1402 2005-01-06 Mark Mitchell <mark@codesourcery.com>
1405 * class.c (add_implicitly_declared_members): Remove dead code.
1406 * decl.c (grokfndecl): Add sfk parameter. Use it do set
1408 (grokdeclarator): Adjust calls to grokfndecl.
1409 * method.c (implicitly_declare_fn): Improve documentation.
1410 * parser.c (cp_parser_direct_declarator): Do not consider a
1411 function to be a constructor if the containing class was
1412 originally anonymous.
1414 2005-01-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1417 * search.c (lookup_field_1): Handle using declaration in
1418 class template partial specialization.
1420 2005-01-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1423 * pt.c (push_access_scope): Handle friend defined in class.
1424 (pop_access_scope): Likewise.
1426 2005-01-06 Nathan Sidwell <nathan@codesourcery.com>
1429 * pt.c (tsubst_copy) <ARRAY_REF case>: Handle separately.
1430 (tsubst_copy_and_build) <ARRAY_REF case>: Remove obsolete
1431 array-new handling code. Use build_x_binary_op.
1433 2005-01-05 Nathan Sidwell <nathan@codesourcery.com>
1436 * cp-tree.h (start_decl): Take pointer to pushed scope, not bool.
1437 * name-lookup.h (push_scope): Return pushed scope, not flag.
1438 * name-lookup.c (push_scope): Return scope that should be popped,
1440 * decl.c (start_decl): Adjust.
1441 (grokfndecl): Adjust scope push and pop.
1442 * decl2.c (check_classfn): Likewise.
1443 * parser.c (cp_parser_condition, cp_parser_conversion_function_id,
1444 cp_parser_init_declarator, cp_parser_direct_declarator,
1445 cp_parser_class_specifier, cp_parser_class_head,
1446 cp_parser_lookup_name,
1447 cp_parser_constructor_declarator_p): Likewise.
1448 * pt.c (instantiate_class_template,
1449 resolve_typename_type): Likewise.
1451 2005-01-03 Volker Reichelt <reichelt@igpm.rwth-aaachen.de>
1454 * parser.c (cp_parser_unqualified_id): Do not issue error message
1455 for typedef-name as destructor declarator when performing an
1456 uncommitted tentative parse.
1458 2005-01-01 Steven Bosscher <stevenb@suse.de>
1461 * decl.c (finish_function): Fix comment. Annotate the compiler
1462 generated return with the current file name and line 0.
1464 2004-12-31 Richard Henderson <rth@redhat.com>
1467 * call.c (make_temporary_var_for_ref_to_temp): Set DECL_IGNORED_P.
1468 * class.c (build_vtable): Don't conditionallize setting it
1469 based on DWARF2_DEBUG.
1470 (layout_class_type): Set DECL_IGNORED_P.
1471 * decl2.c (get_guard): Likewise.
1472 * rtti.c (get_tinfo_decl, build_lang_decl): Likewise.
1473 * tree.c (build_local_temp): Likewise.
1475 2004-12-30 Mark Mitchell <mark@codesourcery.com>
1477 * cp-tree.h (cp_declarator): Split "name" field into
1478 qualifying_scope and unqualified_name.
1479 * decl.c (get_scope_of_declarator): Adjust accordingly.
1480 (grokdeclarator): Likewise.
1481 * decl2.c (grokfield): Likewise, and adjust call to
1482 do_class_using_decl.
1483 * name-lookup.c (do_class_using_decl): Split "decl" into
1484 "scope" and "name". Remove unnecessary code.
1485 * name-lookup.h (do_class_using_decl): Adjust declaration.
1486 * parser.c (make_id_declarator): Split "id" into qualifying_scope
1487 and unqualified_name.
1488 (cp_parser_using_declaration): Adjust call to do_class_using_decl.
1489 (cp_parser_direct_declarator): Adjust to handle the fact that
1490 cp_parser_declarator_id no longer returns a SCOPE_REF.
1491 (cp_parser_direct_declarator): Likewise.
1492 (cp_parser_declarator_id): Do not create a SCOPE_REF for qualified
1494 (cp_parser_member_declaration): Adjust call to make_id_declarator.
1495 (cp_parser_check_declarator_template_parameters): Do not expect a
1498 * decl.c (duplicate_decls): Call ggc_free on declarations we will
1499 not be needing any longer.
1502 * cvt.c (convert_to_void): Do not use STRIP_NOPs.
1504 2004-12-28 Richard Henderson <rth@redhat.com>
1507 * semantics.c (finish_asm_stmt): Resolve asm names. Validate input
1508 constraints. Mark memory inputs addressable.
1510 2004-12-27 Jason Merrill <jason@redhat.com>
1512 * decl.c (expand_static_init): Don't use shortcut if
1513 targetm.relaxed_ordering.
1515 2004-12-27 Mark Mitchell <mark@codesourcery.com>
1518 * decl.c (check_tag_decl): Robustify.
1520 2004-12-23 Mark Mitchell <mark@codesourcery.com>
1523 * parser.c (cp_parser_error): Issue better messages about
1524 #pragma in locations where it is not permitted.
1527 * pt.c (check_instantiated_args): Remove bogus SFINAE code.
1529 * cvt.c (convert_to_void): Fix typo in comment.
1531 2004-12-23 Alexandre Oliva <aoliva@redhat.com>
1534 * pt.c (check_explicit_specialization): Use the argument list from
1535 the definition in a template function specialization definition.
1537 2004-12-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1540 * pt.c (check_explicit_specialization): Use special logic to validate
1541 befriended specializations.
1543 2004-12-22 Mark Mitchell <mark@codesourcery.com>
1545 * rtti.c (emit_support_tinfos): Avoid using C99 semantics.
1548 * call.c (build_this): In templates, do not bother with
1550 * typeck.c (unary_complex_lvalue): In a template, always refuse
1554 * cp-gimplify.c (cp_genericize): Relax assertion.
1557 * cvt.c (convert_to_void): Warn about unused values.
1560 * rtti.c (emit_support_tinfos): On systems without weak symbols,
1561 emit the runtime library type-info objects as non-COMDAT.
1563 2004-12-21 Mark Mitchell <mark@codesourcery.com>
1566 * call.c (convert_like_real): Do not permit the use of a copy
1567 constructor to copy a packed field.
1570 * decl.c (grokdeclarator): Return error_mark_node, not
1571 void_type_node, to indicate errors.
1572 * parser.c (cp_parser_template_parameter_list): Robustify.
1573 (cp_parser_template_parameter): Likewise.
1576 * tree.c (cp_tree_equal): Handle OVERLOAD.
1578 2004-12-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1580 * decl.c (define_label): Use POP_TIMEVAR_AND_RETURN.
1581 * name-lookup.c (pushdecl_class_level): Likewise.
1583 2004-12-21 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1585 * name-lookup.c (pushtag): Add missing POP_TIMEVAR_AND_RETURN.
1587 2004-12-21 Andrew Pinski <pinskia@physics.uc.edu>
1590 * cp-gimplify.c (cp_genericize_r): Don't insert first but instead
1591 check to see if contains the pointer. Insert the statement before
1594 2004-12-21 Nathan Sidwell <nathan@codesourcery.com>
1597 * decl.c (check_initializer): Check string initializer of array is
1599 * cp-tree.h (PAREN_STRING_LITERAL_P): New.
1600 * semantics.c (finish_parenthesized_expr): Mark a STRING_CST.
1601 * error.c (dump_expr): <STRING_CST case> Add parens, if needed.
1603 * cp-tree.def (TEMPLATE_TYPE_PARM,
1604 BOUND_TEMPLATE_TEMPLATE_PARM, TYPE_OF_TYPE, TYPENAME_TYPE): Reorder
1605 for better code efficiency.
1606 * cp-tree.h (CLASS_TYPE_P): Short circuit IS_AGGR_TYPE check.
1607 (CAN_HAVE_FULL_LANG_DECL_P): Reorder for better optimization.
1608 (INTEGRAL_CODE_P, CP_INTEGRAL_TYPE_P,
1609 INTEGRAL_OR_ENUMERATION_TYPE_P, SCALAR_TYPE_P,
1610 CP_AGGREGATE_TYPE_P, TYPE_PTROB_P, TYPE_REF_OBJ_P,
1611 TYPE_PTROBV_P): Likewise.
1614 * method.c (do_build_copy_constructor): Refactor. Don't const
1615 qualify a mutable field.
1616 (do_build_assign_ref): Likewise.
1618 2004-12-20 Matt Austern <austern@apple.com>
1621 * decl.c (make_rtl_for_nonlocal_decl): Use
1622 set_builtin_user_assembler_name.
1624 2004-12-19 Mark Mitchell <mark@codesourcery.com>
1626 * cp-tree.h (note_decl_for_pch): New function.
1627 * class.c (build_clone): Call note_decl_for_pch.
1628 * semantics.c (finish_member_declaration): Likewise.
1629 (note_decl_for_pch): New function.
1631 2004-12-17 Steven Bosscher <stevenb@suse.de>
1633 * init.c (build_zero_init): max_index is the number of
1636 2004-12-17 Nathan Sidwell <nathan@codesourcery.com>
1639 * class.c (add_method): Do not push conversion operators into a
1642 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE_TYPE): Reformat.
1643 * error.c (dump_decl): <TYPE_DECL case> Remove extraneous braces.
1645 2004-12-16 Nathan Sidwell <nathan@codesourcery.com>
1648 * cp-tree.h (integral_constant_value): Declare.
1649 * call.c (null_ptr_cst_p): Use integral_constant_value, not
1650 decl_constant_value.
1651 (convert_like_real): Likewise.
1652 * class.c (check_bitfield_decl): Likewise.
1653 * cvt.c (ocp_convert): Likewise.
1654 (convert): Remove unnecessary decl_constant_value call.
1655 * decl.c (compute_array_index_type): Use integral_constant_value,
1656 not decl_constant_value.
1657 (build_enumerator): Likewise.
1658 * decl2.c (grokfield): Likewise.
1659 * init.c (decl_constant_value): Simplify.
1660 (integral_constant_value): New.
1661 * pt.c (fold_decl_constant_value): Use integral_constant_value,
1662 remove subsequent check.
1663 (tsubst): Use integral_constant_value, not decl_constant_value.
1664 (tsubst_copy, unify): Likewise.
1665 * typeck.c (decay_conversion): Likewise.
1666 (build_compound_expr): Remove unnecessary decl_constant_value
1668 (build_static_cast_1, build_reinterpret_cast_1):
1669 (convert_for_assignment): Remove comment about not calling
1670 decl_constant_value.
1672 2004-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1675 * pt.c (instantiate_class_template): Set input_location for
1677 (tsubst_friend_function): Don't set input_location here.
1678 Make sure the context is complete if necessary.
1680 2004-12-15 Nathan Sidwell <nathan@codesourcery.com>
1683 * parser.c (cp_parser_lookup_name): Remove unneeded TYPENAME_TYPE
1686 2004-12-14 Mark Mitchell <mark@codesourcery.com>
1689 * decl.c (make_typename_type): Do not handle namespace-scoped
1691 (tag_name): Handle typename_type.
1692 (check_elaborated_type_specifier): Handle typenames.
1693 * parser.c (cp_parser_diagnose_invalid_type_name): Improve
1695 (cp_parser_elaborated_type_specifier): Use
1696 cp_parser_diagnose_invalid_type_name.
1698 2004-12-14 Andrew Pinski <pinskia@physics.uc.edu>
1701 * init.c (build_zero_init): If the max_index is 0, there is no
1702 need to create a RANGE_EXPR.
1704 2004-12-14 Mark Mitchell <mark@codesourcery.com>
1707 * cp-objcp-common.c (cp_expr_size): Loosen assertion.
1709 2004-12-14 Nathan Sidwell <nathan@codesourcery.com>
1712 * pt.c (tsubst_copy_and_build): <INDIRECT_REF case> Check that a
1713 REFERENCE_REF_P is dereferencing a reference type.
1714 * typeck.c (build_static_cast): Convert from reference even in a
1716 (build_reinterpret_cast, build_const_cast, build_c_cast): Likewise.
1718 2004-12-14 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1720 * parser.c (cp_parser_uncommitted_to_tentative_parse_p): New function.
1721 (cp_parser_name_lookup_error): Use it.
1722 (cp_parser_check_for_invalid_template_id): Likewise.
1723 (cp_parser_skip_to_closing_parenthesis): Likewise.
1724 (cp_parser_nested_name_specifier_opt): Likewise.
1725 (cp_parser_simple_declaration, cp_parser_template_id): Likewise.
1726 (cp_parser_parameter_declaration_list): Likewise.
1727 (cp_parser_parameter_declaration): Likewise.
1728 (cp_parser_template_name): Let cp_parser_simulate_error perform
1730 (cp_parser_committed_to_tentative_parse): Remove.
1732 2004-12-13 Andrew Pinski <pinskia@physics.uc.edu>
1735 * class.c (build_base_path): Convert the zero constant to the correct
1736 type when comparing.
1738 2004-12-13 Mark Mitchell <mark@codesourcery.com>
1741 * class.c (layout_class_type): Determine the visibility of static
1744 2004-12-12 Roger Sayle <roger@eyesopen.com>
1747 * cp-gimplify.c (gimplify_if_stmt): Optimize the case where the
1748 condition is a constant and the unexecuted clause is empty.
1750 2004-12-10 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1753 * parser.c (cp_parser_class_head): Reject typedef-name in class head.
1755 2004-12-09 Matt Austern <austern@apple.com>
1758 * name-lookup.c (do_nonmember_using_decl): A real function
1759 declaration takes precedence over an anticipated declaration.
1761 2004-12-09 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1763 * parser.c (cp_parser_member_declaration): Fix comment typo.
1765 2004-12-09 Alexandre Oliva <aoliva@redhat.com>
1768 * parser.c (cp_parser_template_id): Don't create a CPP_TEMPLATE_ID
1771 2004-12-09 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1774 * typeck.c (build_reinterpret_cast_1): Allow cast from vector type.
1776 2004-12-09 Nathan Sidwell <nathan@codesourcery.com>
1779 * init.c (build_zero_init): Build a RANGE_EXPR for an array
1782 2004-12-08 Kelley Cook <kcook@gcc.gnu.org>
1784 * typeck.c: Remove DOS line endings.
1786 2004-12-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1789 * decl.c (lookup_and_check_tag): Diagnose nested class with
1790 the same name as enclosing class.
1792 2004-12-08 Nathan Sidwell <nathan@codesourcery.com>
1795 * cp-tree.h (REFERENCE_REF_P): New.
1796 (CPTI_TYPE_INFO_TYPE): Rename to ...
1797 (CPTI_CONST_TYPE_INFO_TYPE): ... here.
1798 (CPTI_TYPE_INFO_REF_TYPE): Remove.
1799 (type_info_type_node): Rename to ...
1800 (const_type_info_type_node): ... here.
1801 (type_info_ref_type): Remove.
1802 * call.c (build_user_type_conversion): Reformat.
1803 (resolve_args): Do not convert_from_reference.
1804 (build_object_call): Call convert_from_reference.
1805 (prep_operand): Do not convert_from_reference.
1806 (build_new_method_call): Likewise.
1807 * class.c (build_vfield_ref): Likewise.
1808 * cvt.c (convert_to_reference): Likewise.
1809 (convert_from_reference): Build INDIRECT_REF here, not with
1811 (convert_force): Do not convert_from_reference.
1812 (build_expr_type_conversion): Likewise.
1813 * decl.c (grok_reference_init): Likewise.
1814 * decl2.c (delete_sanity): Likewise.
1815 * except.c (initialize_handler_parm): Use POINTER_TYPE_P.
1816 * init.c (build_dtor_call): Do not convert_from_reference.
1817 * parser.c (cp_parser_template_argument): Unwrap indirected
1818 reference. Allow TEMPLATE_PARM_INDEX as an object parm.
1819 * pt.c (tsubst_copy_and_build) <case INDIRECT_REF>: Use
1820 convert_from_reference, if indicated.
1821 <case CALL_EXPR>: Do not convert_from_reference.
1822 <case PARM_DECL, VAR_DECL>: Convert_from_reference if needed.
1823 (tsubst_initializer_list): Do not convert_from_reference.
1824 * rtti.c (init_rtti_processing): Adjust node creation.
1825 (throw_bad_typeid): Use const_type_info_type_node.
1826 Do not convert_from_reference.
1827 (typeid_ok_p): Use const_type_info_type_node.
1828 (build_typeid, get_typeid): Always return type_info typed node.
1829 (build_dynamic_cast_1): Dont convert_from_reference. Refactor.
1830 * semantics.c (finish_stmt_expr_expr): Do not
1831 convert_from_reference.
1832 (finish_id_expression): Convert_from_reference as appropriate.
1833 * typeck.c (decay_conversion): Do not convert_from_reference.
1834 (finish_class_member_access_expr): Likewise.
1835 (build_indirect_ref): Use POINTER_TYPE_P.
1836 (convert_arguments): Do not convert_from_reference.
1837 (build_modify_expr): Likewise.
1838 (convert_for_initialization): Likewise.
1839 * typeck2.c (build_x_arrow): Likewise.
1841 2004-12-07 Ziemowit Laski <zlaski@apple.com>
1843 * cp-tree.h (struct lang_type_class): Rename 'objc_protocols'
1844 field to 'objc_info'.
1846 2004-12-07 Kazu Hirata <kazu@cs.umass.edu>
1848 * pt.c: Replace a use of first_rtl_op with TREE_CODE_LENGTH.
1850 2004-12-07 Roger Sayle <roger@eyesopen.com>
1852 * name-lookup.c (leave_scope): We only need to update
1853 class_binding_level when leaving a class scope.
1855 2004-12-06 Ziemowit Laski <zlaski@apple.com>
1857 * cp-tree.h (struct lang_type_class): Add 'objc_protocols' field.
1859 2004-12-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1861 PR c++/17011, c++/17971
1862 * pt.c (tsubst_copy) <FIELD_DECL case>: Check and diagnose
1864 (tsubst_copy_and_build) <COMPONENT_REF case>: Check
1865 error_mark_node after member substitution.
1866 * semantics.c (finish_id_expression): Call
1867 finish_non_static_data_member for non-dependent FIELD_DECL.
1869 2004-12-03 Nathan Sidwell <nathan@codesourcery.com>
1872 * decl.c (grokdeclarator): Make sure class in pointer to member is
1875 2004-12-02 Nathan Sidwell <nathan@codesourcery.com>
1878 * parser.c (cp_parser_new_type_id): Move array size expression
1879 checks from here ...
1880 * init.c (build_new): ... to here.
1882 2004-12-02 Nathan Sidwell <nathan@codesourcery.com>
1885 * parser.c (cp_parser_class_head): Return NULL_TREE when
1886 push_template_decl fails. Update comment.
1888 2004-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1890 PR c++/15664, c++/18276
1891 * pt.c (tsubst_decl) <TEMPLATE_DECL case>: Reorganize. Correctly
1892 tsubst TEMPLATE_DECL that is a TEMPLATE_TEMPLATE_PARM.
1894 2004-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1897 * parser.c (cp_parser_type_specifier): Catch template declaration
1900 2004-12-01 Matt Austern <austern@apple.com>
1902 * name-lookup.c (namespace_binding): Omit alias check for global
1905 2004-12-01 Nathan Sidwell <nathan@codesourcery.com>
1908 * parser.c (cp_parser_class_name): Check decl's type is not
1912 * call.c (standard_conversion): Add FLAGS parameter. Do not allow
1913 derived to base conversion when checking constructor
1915 (implicit_conversion): Pass FLAGS to standard_conversion.
1916 (check_constructir_callable): Disallow conversion functions.
1918 2004-11-30 Kazu Hirata <kazu@cs.umass.edu>
1920 * parser.c: Fix comment typos.
1922 2004-11-27 Mark Mitchell <mark@codesourcery.com>
1925 * parser.c (cp_parser_check_for_definition_in_return_type): Take
1926 the defined type as a parameter, and inform the user about the
1927 possibility of a missing semicolon.
1928 (cp_parser_explicit_instantiation): Adjust call to
1929 cp_parser_check_for_definition_in_return_type.
1930 (cp_parser_init_declarator): Likewise.
1931 (cp_parser_member_declaration): Likewise.
1934 * cp-tree.def (TYPENAME_TYPE): Remove discussion of implicit
1935 typename from comments.
1936 * cp-tree.h (TYPENAME_IS_ENUM_P): New macro.
1937 (TYPENAME_IS_CLASS_P): Likewise.
1938 (make_typename_type): Change prototype.
1939 * decl.c (struct_typename_info): New type.
1940 (typename_compare): Expect the second argument to be a
1941 typename_info, not a tree.
1942 (build_typename_type): Add tag_type parameter. Do not create a
1943 new type until necessary.
1944 (make_typename_type): Add tag_type parameter.
1945 * error.c (TYPENAME_TYPE): Print tags other than "typename" if
1947 * friend.c (make_friend_class): Adjust call to make_typename_type.
1948 * parser.c (cp_parser_make_typename_type): Likewise.
1949 (cp_parser_primary_expression): Adjust call to
1950 cp_parser_lookup_name.
1951 (cp_parser_unqualified_id): Adjust calls to cp_parser_class_name.
1952 (cp_parser_class_or_namespace_name): Likewise.
1953 (cp_parser_postfix_expression): Adjust calls to
1955 (cp_parser_mem_initializer_id): Adjust calls to
1956 cp_parser_class_name.
1957 (cp_parser_type_parameter): Adjust calls to cp_parser_lookup_name.
1958 (cp_parser_template_name): Likewise.
1959 (cp_parser_template_argument): Likewise.
1960 (cp_parser_type_name): Adjust call to cp_parser_class_name.
1961 (cp_parser_elaborated_type_specifier): Adjust calls to
1962 make_typename_type and cp_parser_lookup_name.
1963 (cp_parser_namespace_name): Likewise.
1964 (cp_parser_class_name): Replace type_p parameter with tag_type.
1965 Adjust calls to make_typename_type and cp_parser_lookup_name.
1966 (cp_parser_class_head): Adjust calls to cp_parser_class_name.
1967 (cp_parser_base_specifier): Likewise.
1968 (cp_parser_lookup_name): Replace is_type parameter with tag_type.
1969 Adjust calls to make_typename_type and lookup_qualified_name.
1970 (cp_parser_lookup_name_simple): Adjust call to
1971 cp_parser_lookup_name.
1972 (cp_parser_constructor_declarator_p): Adjust call to
1973 cp_parser_class_name.
1974 * pt.c (convert_template_argument): Adjust all to
1976 (tsubst_decl): Do not pre-substitute the type of the declaration.
1977 (tsubst): Hand off declarations more quickly. Adjust call to
1981 * parser.c (cp_parser_postfix_dot_deref_expression): Robustify.
1983 2004-11-29 Daniel Jacobowitz <dan@codesourcery.com>
1986 * Make-lang.in (cp/decl2.o): Update dependencies.
1987 * decl2.c (finish_file): Call maybe_apply_pending_pragma_weaks.
1989 2004-11-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1992 * name-lookup.c (pushtag): Change return type to tree.
1993 * cp-tree.h (pushtag): Adjust declaration.
1994 * decl.c (xref_tag, start_enum): Use return value of pushtag.
1995 * pt.c (push_template_decl_real): Return immediately if
1996 pushdecl_namespace_level returns error_mark_node.
1998 2004-11-27 Kazu Hirata <kazu@cs.umass.edu>
2000 * pt.c: Fix a comment typo.
2002 2004-11-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2004 Friend class name lookup 4/n
2005 * class.c (pushclass): Don't call cxx_remember_type_decls.
2006 * cp-tree.h (clear_anon_tags): Remove declaration.
2007 * decl.c (grokdeclarator): Don't call lookup_tag_reverse.
2008 * name-lookup.c (binding_entry_free, binding_table_free): Comment
2010 (binding_table_find_anon_type, binding_table_reverse_maybe_remap,
2011 binding_table_remove_anonymous_types, cxx_remember_type_decls,
2012 bt_print_entry, clear_anon_tags, follow_tag_typedef, lookup_tag,
2013 lookup_tag_reverse): Remove
2014 (begin_scope, leave_scope, kept_level_p, print_binding_level):
2015 Don't use type_decls field in cp_binding_level.
2016 (maybe_process_template_type_declaration, pushtag): Set
2017 CLASSTYPE_NESTED_UTDS directly.
2018 * name-lookup.h (binding_table_remove_anonymous_types,
2019 cxx_remember_type_decls, lookup_tag, lookup_tag_reverse): Remove
2021 (cp_binding_level): Remove type_decls field.
2023 2004-11-26 Kazu Hirata <kazu@cs.umass.edu>
2025 * typeck.c: Fix a comment typo.
2027 2004-11-25 Mark Mitchell <mark@codesourcery.com>
2030 * class.c (instantiate_type): Treat NON_DEPENDENT_EXPRs with
2031 unknown_type as non matching. Tidy up.
2032 * pt.c (build_non_dependent_expr): Do not build a
2033 NON_DEPENDENT_EXPR for a VAR_DECL.
2036 * cp-tree.h (lvalue_or_else): Remove declaration.
2037 * tree.c (lvalue_or_else): Remove.
2038 * typeck.c (build_unary_op): Adjust call to lvalue_or_else.
2039 (build_modify_expr): Likewise.
2042 * decl.c (duplicate_decls): Return error_mark_node on error, as
2046 * decl.c (grokvardecl): Keep track of whether or not a there was
2047 explicit qualification.
2048 * name-lookup.c (set_decl_namespace): Complain about explicit
2049 qualification of a name within its own namespace.
2052 * typeck.c (check_return_expr): Robustify.
2054 2004-11-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2056 Friend class name lookup 3/n, PR c++/3332
2057 * name-lookup.c (push_inner_scope, pop_inner_scope): New functions.
2058 (lookup_type_scope): Don't deal with name from user declaration
2060 * name-lookup.h (push_inner_scope, pop_inner_scope): Add declarations.
2061 * parser.c (cp_parser_class_specifier): Use push_inner_scope and
2064 2004-11-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2066 Friend class name lookup 2/n, PR c++/14513, c++/15410
2067 * name-lookup.c (lookup_name_real): Simplify.
2068 (lookup_type_scope): Add SCOPE parameter. Handle friend class
2070 * name-lookup.h (tag_scope): New enum type.
2071 (lookup_type_scope): Adjust declaration.
2072 * decl.c (lookup_and_check_tag, xref_tag, xref_tag_from_type):
2073 Change bool parameter GLOBALIZED to TAG_SCOPE parameter SCOPE.
2074 (start_enum): Likewise. Add assertion test that NAME is
2075 IDENTIFIER_NODE. Use anonymous name for dummy ENUMERAL_TYPE in
2077 * cp-tree.h (xref_tag, xref_tag_from_type): Adjust declarations.
2078 * parser.c (cp_parser_elaborated_type_specifier,
2079 cp_parser_class_head): Adjust call to xref_tag.
2080 * pt.c (lookup_template_class, instantiate_class_template):
2082 * rtti.c (init_rtti_processing, build_dynamic_cast_1,
2083 tinfo_base_init, emit_support_tinfos): Likewise.
2085 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
2087 * g++spec.c, lex.c: Avoid ` as left quote in diagnostics.
2089 2004-11-24 Mark Mitchell <mark@codesourcery.com>
2092 * name-lookup.c (supplement_binding): Do not allow typedefs to be
2093 redefined in class scope.
2096 * parser.c (cp_parser_set_decl_type_spec): Do not try to allow
2097 redefinitions of builtin types other that "bool" or "wchar_t".
2099 2004-11-24 Steven Bosscher <stevenb@suse.de>
2101 * decl.c (cxx_init_decl_processing): Don't clear
2102 flag_inline_functions.
2104 2004-11-24 Mark Mitchell <mark@codesourcery.com>
2106 * pt.c (tsubst_function_type): Do not permit function types which
2107 return arrays or functions.
2110 * parser.c (cp_parser_init_declarator): Do not pop scope twice.
2113 * cp-tree.h (CTOR_NAME): Remove.
2114 (DTOR_NAME): Remove.
2115 * decl.c (initialize_predefined_identifiers): Add spaces to the
2116 end of constructor and destructor names.
2118 2004-11-24 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2121 * decl.c (start_decl): Check for invalid specialization headers.
2123 2004-11-24 Paolo Bonzini <bonzini@gnu.org>
2127 * call.c (standard_conversion): Move check for conversions between
2129 * typeck.c (ptr_reasonably_similar): ... here.
2131 2004-11-23 Ben Elliston <bje@au.ibm.com>
2133 * cp-tree.h (context_as_string): Remove extern.
2134 * error.c (context_as_string): Remove.
2136 * cp-tree.h (cp_type_qual_from_rid): Remove extern.
2137 * lex.c (cp_type_qual_from_rid): Remove.
2139 * cp-tree.h (do_poplevel): Remove extern.
2140 (check_multiple_declarators): Likewise.
2141 * semantics.c (do_poplevel): Make static.
2142 (check_multiple_declarators): Remove.
2144 * cp-tree.h (check_final_overrider): Remove extern.
2145 * search.c (check_final_overrider): Make static.
2147 * cp-tree.h (build_artificial_parm): Remove extern.
2148 * decl2.c (build_artificial_parm): Make static.
2150 2004-11-22 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2153 * typeck.c (build_unary_op) <CONVERT_EXPR, NEGATE_EXPR>: Unify code.
2154 Make sure the result is always a rvalue.
2156 2004-11-16 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2158 * decl.c (start_preparsed_function): Call check_function_type even
2160 (require_complete_types_for_parms): Skip dependent types.
2161 (check_function_type): Likewise.
2163 2004-11-16 Steven Bosscher <stevenb@suse.de>
2165 * Make-lang.in (cp/decl.o, cp/search.o): Don't depend on stack.h.
2166 * search.c: Don't include it.
2168 2004-11-15 Andrew Pinski <pinskia@physics.uc.edu>
2170 * cp-gimplify.c: Include pointer-set.h
2171 (cp_genericize_r): Use pointer_sets instead of a hashtable.
2172 Also instert the new statement for CLEANUP_STMT.
2173 (cp_genericize): Use pointer_sets instead of a hashtable.
2174 * Make-lang.in (cp-gimplify.o): Depend on pointer-set.h.
2176 2004-11-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2178 Friend class name lookup 1/n, PR c++/18471
2179 * decl.c (lookup_and_check_tag): New function.
2180 (xref_tag, start_enum): Use it.
2181 (check_elaborated_type_specifier): Move TEMPLATE_TYPE_PARM check
2182 before !DECL_IMPLICIT_TYPEDEF_P. Also display previously declared
2184 * name-lookup.c (lookup_name_current_level): Rename to ...
2185 (lookup_name_innermost_nonclass_level): ... this.
2186 (lookup_type_scope): New function.
2187 * name-lookup.h (lookup_name_current_level): Rename to ...
2188 (lookup_name_innermost_nonclass_level): ... this.
2189 (lookup_type_scope): Add declaration.
2191 2004-11-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2194 * pt.c (coerce_template_parms): Only emit error message about
2195 invalid template argument when TF_ERROR.
2197 2004-11-12 Mark Mitchell <mark@codesourcery.com>
2200 * decl.c (start_decl): Make sure to set *pop_scope_p. Return
2201 error_mark_node to indicate errors.
2204 * parser.c (cp_parser_direct_declarator): Disallow non-constant
2205 array bounds when not inside a function.
2208 * pt.c (tsubst_copy_and_build): Do not do Koenig lookup when an
2209 unqualified name resolves to a member function.
2212 * pt.c (tsubst_copy_and_build): Handle qualified names used from a
2213 derived class correctly.
2215 * decl2.c (import_export_decl): Fix typo in comment.
2216 * tree.c (pod_type_p): Likewise.
2218 2004-11-10 Andrew Pinski <pinskia@physics.uc.edu>
2220 * typeck.c (cxx_mark_addressable): Add braces around the first if.
2222 2004-11-10 Adam Nemet <anemet@lnxw.com>
2225 * typeck.c (cxx_mark_addressable): Issue an error if address of an
2226 explicit register variable is requested.
2228 2004-11-10 Nathan Sidwell <nathan@codesourcery.com>
2231 * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK): New.
2232 (struct lang_decl_flags): Add thunk_p flag.
2233 (struct lang_decl): Remove separate fixed_offset. Place
2234 cloned_function and fixed_offset into union.
2235 (DECL_CLONED_FUNCTION_P, DECL_CLONED_FUNCTION): Adjust.
2236 (DECL_THUNK_P, SET_DECL_THUNK_P): Adjust.
2237 (THUNK_FIXED_OFFSET): Adjust.
2238 * method.c (make_thunk): Adjust.
2240 2004-11-09 Mark Mitchell <mark@codesourcery.com>
2243 * init.c (build_new_1): Handle parenthesized type-ids that name an
2246 2004-11-09 Joseph S. Myers <joseph@codesourcery.com>
2248 * call.c, class.c, decl.c, decl2.c, error.c, mangle.c, parser.c,
2249 pt.c, search.c, semantics.c, typeck.c: Use %q, %< and %> for
2250 quoting in diagnostics.
2251 * parser.c (cp_parser_sizeof_operand): Use '' instead of `' for
2252 quoting in printf format.
2253 * decl.c (duplicate_decls, start_decl): Use %qD instead of
2256 2004-11-08 Kazu Hirata <kazu@cs.umass.edu>
2258 * class.c, decl.c, lex.c, name-lookup.c, parser.c, pt.c,
2259 search.c, typeck2.c: Fix comment formatting.
2261 2004-11-04 Ulrich Weigand <uweigand@de.ibm.com>
2263 PR tree-optimization/18184
2264 * cp-objcp-common.c (cxx_types_compatible_p): Do not treat pointers
2265 of different modes or alias-all flags as equivalent.
2266 * typeck.c (comptypes): Likewise.
2268 2004-11-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2271 * cp-tree.h (TYPE_REF_OBJ_P): New macro.
2272 (TYPE_PTR_P, TYPE_PTROB_P, TYPE_PTROBV_P, TYPE_PTRFN_P,
2273 TYPE_REFFN_P): Document.
2274 (fold_decl_constant_value): New prototype.
2275 * pt.c (convert_nontype_argument_function): Rewrite and extract
2277 (fold_decl_constant_value, convert_nontype_argument_function): New.
2278 (lookup_template_class): Add comment about useless double call.
2279 * mangle.c (write_expression): Strip conversions before lowering
2281 * cvt.c (ocp_convert): Check LOOKUP_COMPLAIN for a pedwarn. Disallow
2282 enum to enum conversion.
2284 2004-11-02 Mark Mitchell <mark@codesourcery.com>
2287 * parser.c (cp_parser_type_parameter): Robustify.
2290 * parser.c (cp_parser_single_declaration): Disallow template
2294 * typeck.c (build_const_cast): Use error_operand_p.
2296 2004-11-02 Ziemowit Laski <zlaski@apple.com>
2298 * cp-lang.c (cxx_types_compatible_p): Remove prototype and definition.
2299 (LANG_HOOKS_TYPES_COMPATIBLE_P): Move to cp-objcp-common.h.
2300 * cp-objcp-common.c (cxx_types_compatible_p): Moved definition here
2302 * cp-objcp-common.h (cxx_types_compatible_p): Moved prototype here
2304 (LANG_HOOKS_TYPES_COMPATIBLE_P): Moved here from cp-lang.c.
2306 2004-11-01 Nathan Sidwell <nathan@codesourcery.com>
2309 * search.c (check_final_overrider): Deprecate gnu covariant extension.
2311 2004-10-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
2313 Convert diagnostics to use quoting flag q 9/n
2314 * typeck.c (build_x_unary_op, convert_member_func_to_ptr,
2315 get_delta_difference): Use new quotation style.
2316 * repo.c (reopen_repo_file_for_write): Likewise.
2317 * pt.c (do_type_instantiation): Likewise.
2318 * parser.c (cp_parser_diagnose_invalid_type_name):
2319 * name-lookup.c (push_overloaded_decl, set_decl_namespace):
2320 * error.c (cp_print_error_function,
2321 print_instantiation_full_context): Likewise.
2322 * decl.c (define_label, grok_reference_init,
2323 maybe_deduce_size_from_array_init, revert_static_member_fn):
2324 * decl2.c (check_classfn): Likewise.
2325 * class.c (add_method, check_field_decls, layout_class_type,
2326 resolve_address_of_overloaded_function): Likewise.
2327 * call.c (build_x_va_arg, build_over_call): Likewise.
2329 2004-10-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
2331 Convert diagnostics to use quoting flag q 8/n
2332 * cvt.c (cp_convert_to_pointer, warn_ref_binding,
2333 convert_to_reference, ocp_convert, convert_to_void
2334 cp_convert_to_pointer): Use new quotation style.
2336 2004-10-31 Mark Mitchell <mark@codesourcery.com>
2339 * typeck2.c (store_init_value): Use split_nonconstant_init even
2340 for types that require construction.
2342 1004-10-28 Matt Austern <austern@apple.com>
2345 * cp-tree.h (class_key_or_enum_as_string): Declare.
2346 * error.c (class_key_or_enum): Rename to class_key_or_enum_as_string
2347 and remove static qualifier.
2348 * decl.c (shadow_tag): Warn about ignored attributes in class/struct/
2349 union/enum declaration.
2351 2004-10-29 Kazu Hirata <kazu@cs.umass.edu>
2353 * pt.c: Fix a comment typo.
2355 2004-10-28 Nathan Sidwell <nathan@codesourcery.com>
2357 * typeck.c (composite_pointer_type): Remove comment about DR 195.
2358 (build_reinterpret_cast_1): Revert DR195 patch. Only emit a
2359 warning when being pedantic.
2360 (build_reinterpet_cast, build_c_cast): Adjust.
2362 2004-10-29 Mark Mitchell <mark@codesourcery.com>
2365 * decl.c (grokdeclarator): Mark TYPE_DECLs as abstract when they
2366 appear in a constructor/destructor that will be cloned.
2368 1004-10-28 Matt Austern <austern@apple.com>
2371 * decl.c (finish_enum): Handle packed attribute.
2372 * parser.c (cp_parser_enum_specifier): Process trailing attributes.
2374 2004-10-28 Mark Mitchell <mark@codesourcery.com>
2377 * pt.c (instantiate_class_template): Increment
2378 processing_template_decl when substituting into a member class
2381 2004-10-27 Mark Mitchell <mark@codesourcery.com>
2384 * call.c (convert_like_real): Fix formatting.
2385 (initialize_reference): When binding a temporary to a base class,
2386 ensure that the nominal copy made is to the derived class, not the
2390 * parser.c (cp_parser_next_token_ends_template_argument_p): Do not
2393 2004-10-27 Andrew Pinski <pinskia@physics.uc.edu>
2395 * decl.c (bad_specifiers): Move the q after the %.
2397 2004-10-27 Andrew Pinski <pinskia@physics.uc.edu>
2399 * parser.c (cp_parser_diagnose_invalid_type_name): Move the q after
2402 2004-10-26 Mark Mitchell <mark@codesourcery.com>
2404 * name-lookup.c (do_namespace_alias): Use FROB_CONTEXT.
2405 * search.c (current_scope): Fix prototype.
2408 * search.c (current_scope): Return the innermost non-block scope,
2409 not the innermost non-block, non-namespace scope.
2410 (at_namespace_scope_p): Adjust accordingly.
2411 (dfs_accessible_post): Do not pass namespaces to is_friend.
2412 (dfs_walk_once_accessible_r): Likewise.
2413 * decl.c (grokvardecl): Adjust call to current_scope.
2414 (build_enumerator): Likewise.
2415 * parser.c (cp_parser_using_declaration): Likewise.
2416 (cp_parser_direct_declarator): Use at_namespace_scope_p instead of
2418 (cp_parser_class_head): Adjust call to current_scope.
2419 * name-lookup.c (do_namespace_alias): Set the DECL_CONTEXT for the
2423 * pt.c (tusbst_copy_and_build): Resolve enumeration constants to
2424 their underlying values.
2427 * typeck.c (build_binary_op): Honor build_type, even when in a
2430 2004-10-26 Nathan Sidwell <nathan@codesourcery.com>
2432 * parser.c (cp_lexer_get_preprocessor_token): Remove unneeded
2433 padding token checking.
2435 2004-10-25 Andrew Pinski <pinskia@physics.uc.edu>
2438 * decl.c (grokdeclarator) <case cdk_array>: Remove the call
2439 layout_type as it is already done by create_array_type_for_decl.
2441 2004-10-22 Nathan Sidwell <nathan@codesourcery.com>
2444 * parser.c (eof_token): Make const, correctly initialize rid and
2446 (struct cp_lexer): Replace buffer_end pointer with buffer_length
2448 (cp_lexer_new_main): Directly grow lexer's buffer here. Don't
2450 (cp_lexer_new_from_tokens): Adjust.
2451 (cp_lexer_grow_buffer): Remove.
2452 (cp_lexer_peek_nth_token, cp_lexer_consume_token,
2453 cp_lexer_purge_token): Add const casts.
2455 2004-10-21 Mark Mitchell <mark@codesourcery.com>
2459 * cp-tree.h (convert_to_base): Change prototype.
2460 (build_ptrmemfunc): Likewise.
2461 (convert_ptrmem): New function.
2462 * call.c (struct conversion): Adjust documentation for base_p.
2463 (standard_conversion): Set base_p for ck_pmem conversions as
2465 (convert_like_real): Use convert_to_base for ck_pmem and ck_ptr
2467 * class.c (convert_to_base): Handle both pointers and objects.
2468 Add nonnull parameter.
2469 (build_vfield_ref): Adjust call to convert_to_base.
2470 * cvt.c (cp_convert_to_pointer): Adjust call to build_ptrmemfunc.
2471 (convert_force): Likewise.
2472 * typeck.c (build_unary_op): Likewise.
2473 (convert_ptrmem): New function.
2474 (build_static_cast_1): Use it.
2475 (build_reinterpret_cast): Allow conversions to vector types.
2476 (get_delta_difference): Add c_cast_p parameter.
2477 (build_ptrmemfunc): Likewise. Adjust calls to
2478 get_delta_difference.
2480 2004-10-21 Andrew Pinski <pinskia@physics.uc.edu>
2483 * error.c (cp_error_at): Output the context as it might be
2484 different file as the other location.
2486 2004-10-21 Kazu Hirata <kazu@cs.umass.edu>
2488 * typeck.c: Fix a comment typo.
2490 2004-10-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2493 * decl.c (make_unbound_class_template): Add PARM_LIST parameter.
2494 * cp-tree.h (make_unbound_class_template): Adjust prototype.
2495 * parser.c (cp_parser_lookup_name): Adjust call to
2496 make_unbound_class_template.
2497 (cp_parser_single_declaration): Handle member class of class
2498 template as template friend parsing correctly.
2499 * friend.c (is_friend): Call is_specialization_of_friend for
2500 template friend class.
2501 (make_friend_class): Handle member class of class template as
2503 * pt.c (is_specialization_of_friend): Likewise.
2504 (instantiate_class_template): Likewise.
2505 (tsubst): Adjust call to make_unbound_class_template.
2507 2004-10-20 Nathan Sidwell <nathan@codesourcery.com>
2509 * typeck.c (composite_pointer_type): Add comment about DR 195
2510 (build_reinterpret_cast_1): Add for_reinterpret_cast_p parameter.
2511 Allow function pointer conversions that DR195 suggests.
2512 (build_reinterpret_cast, build_c_cast): Update
2513 build_reinterpret_cast_1 calls.
2515 2004-10-20 Kazu Hirata <kazu@cs.umass.edu>
2517 * call.c, typeck.c: Fix comment typos.
2519 2004-10-20 Nathan Sidwell <nathan@codesourcery.com>
2521 * parser.c (cp_token_position): New typedef. Define VEC thereof.
2522 (struct cp_lexer): Allow buffer and buffer_end to be NULL. Make
2523 next_token and last_token cp_token_position. Make saved_tokens a
2524 VEC(cp_token_position).
2525 (eof_token): New static variable.
2526 (CP_SAVED_TOKENS_SIZE): Rename to ...
2527 (CP_SAVED_TOKEN_STACK): ... here.
2528 (cp_lexer_new_main): Adjust main lexer creation and buffer
2530 (cp_lexer_new_from_tokens): Do not copy the tokens, merely point
2531 to the parent buffer. Do not append eof token.
2532 (cp_lexer_destroy): Only free buffer if non-NULL. Free token
2534 (cp_lexer_next_token, cp_lexer_prev_token): Remove.
2535 (cp_lexer_token_position, cp_lexer_token_at): New.
2536 (cp_lexer_saving_tokens): Adjust. Make inline.
2537 (cp_lexer_advance_token, cp_lexer_token_difference): Remove.
2538 (cp_lexer_peek_token_emit_debug_info): Fold into ...
2539 (cp_lexer_peek_token): ... here.
2540 (cp_lexer_peek_nth_token): Don't peek past EOF.
2541 (cp_lexer_consume_token): Set next_token to eof_token, if reaching
2543 (cp_lexer_purge_token): Adjust eof setting.
2544 (cp_lexer_purge_tokens_after): Likewise.
2545 (cp_lexer_save_tokens): Push next_token directly.
2546 (cp_lexer_commit_tokens): Adjust.
2547 (cp_lexer_rollback_tokens): Pop next_token directly.
2548 (cp_parser_check_for_invalid_template_id): Adjust token purging.
2549 (cp_parser_translation_unit): Do not consume the EOF.
2550 (cp_parser_nested_name_specifier_opt): Adjust token purging.
2551 (cp_parser_template_id, cp_parser_template_name): Likewise.
2553 2004-10-19 Mark Mitchell <mark@codesourcery.com>
2556 * call.c (struct conversion): Add base_p.
2557 (convert_like): Add c_cast_p argument.
2558 (convert_like_with_conversion): Likewise.
2559 (build_conv): Clear base_p.
2560 (standard_conversion): Set it, for derived-to-base conversions.
2561 (convert_like_real): Add c_cast_p parameter. Handle pointer
2562 conversions directly rather than relying on ocp_convert.
2563 (perform_direct_initialization_if_possible): Add c_cast_p
2565 * cp-tree.h (perform_direct_initialization_if_possible): Change
2567 (convert_member_func_to_ptr): New function.
2568 * typeck.c (check_for_casting_away_constness): Add diag_fn
2570 (build_static_cast_1): New function, split out from ...
2571 (build_static_cast): ... here. Use build_static_cast_1.
2572 (build_reinterpret_cast_1): New function, split out from ...
2573 (build_reinterpret_cast): ... here. Use build_reinterpret_cast_1.
2574 (build_const_cast_1): New function, split out from ...
2575 (build_const_cast): ... here. Use build_const_cast_1.
2576 (build_c_cast): Rewrite to use build_const_cast_1,
2577 build_static_cast_1, and build_reinterpret_cast_1.
2578 (convert_member_func_to_ptr): New function.
2580 2004-10-19 Paolo Bonzini <bonzini@gnu.org>
2583 * parser.c (enum cp_parser_prec): Give relational expressions
2584 a higher precedence than equality expressions.
2586 2004-10-15 Nathan Sidwell <nathan@codesourcery.com>
2588 * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Adjust lookup_base call.
2589 (ACCESSIBLY_UNIQUELY_DERIVED_P): Remove.
2590 (PUBLICLY_UNIQUELY_DERIVED_P): Adjust lookup_base call.
2591 (enum base_access): Reorganize.
2592 (accessible_base_p, accessible_p): Add consider_local_p parameter.
2593 * call.c (standard_conversion): Update comment about
2595 (enforce_access): Adjust accessible_p call.
2596 (build_over_call): Adjust accessible_base_p call.
2597 * class.c (convert_to_base): Adjust lookup_base call.
2598 (build_vtbl_ref_1): Likewise.
2599 (warn_about_ambiguous_bases): Likewise. Add early exit.
2600 * cvt.c (convert_to_pointer_force) Adjust lookup_base call.
2601 * search.c (accessible_base_p): Add consider_local_p parameter.
2602 (lookup_base): Pass consider_local_p to accessible_base_p call.
2603 (friend_accessible_p): Check whether scope is a class member.
2604 Remove unnecessary class template check.
2605 (accessible_p): Add consider_local_p parameter. Use it.
2606 (adjust_result_of_qualified_name_lookup): Adjust lookup_base call.
2607 * tree.c (maybe_dummy_object): Likewise.
2608 * typeck.c (comp_except_type): Use PUBLICLY_UNIQUELY_DERIVED_P.
2609 (build_class_member_access_expr): Adjust lookup_base call.
2610 * typeck2.c (binfo_or_else): Likewise.
2611 * rtti.c (build_dynamic_cast_1): Access can consider friendship
2614 2004-10-17 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2617 * decl2.c (grokfield): Apply attributes also to TYPE_DECLs.
2619 2004-10-16 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2622 * parser.c (cp_parser_parenthesized_expression_list): Fold
2623 non-dependent expressions in attribute lists.
2625 2004-10-15 Mark Mitchell <mark@codesourcery.com>
2628 * decl.c (declare_global_var): Use the return value from pushdecl.
2631 * parser.c (cp_parser_simple_declaration): Do not diagnose invalid
2632 type names if we have already found a valid type.
2633 (cp_parser_member_declaration): Likewise.
2636 * parser.c (cp_parser_member_specification_opt): Handle
2639 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
2641 * dump.c, g++spec.c, repo.c: Update copyright.
2643 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
2645 * decl.c: Fix a comment typo.
2647 2004-10-13 Andrew Pinski <pinskia@physics.uc.edu>
2650 * name-lookup.c (parse_using_directive): If we have a
2651 error_mark_node, do not set the decl namespace associations
2654 2004-10-14 Mark Mitchell <mark@codesourcery.com>
2657 * decl.c (cp_finish_decl): Do not call expand_static_init more
2658 than once for a single variable.
2660 2004-10-14 Matt Austern <austern@apple.com>
2662 * Make-lang.in (pt.o): depends on pointer-set.h
2663 * cp-tree.h (cp_walk_subtrees): Last argument is pointer_set_t* now.
2664 * pt.c (struct pair_fn_data): Use pointer_set_t, not htab_t
2665 (for_each_template_parm): Convert from htab_t to pointer_set_t.
2666 * tree.c (cp_walk_subtrees): Last argument is pointer_set_t* now.
2668 2004-10-13 Andrew Pinski <pinskia@physics.uc.edu>
2671 * semantics.c (finish_for_expr): Convert expression to void
2672 so that we don't create temporaries for a?b:c.
2674 2004-10-13 Kazu Hirata <kazu@cs.umass.edu>
2676 * search.c: Fix a comment typo.
2678 2004-10-12 Nathan Sidwell <nathan@codesourcery.com>
2680 * class.c (dfs_modify_vtables): Simplify condition. Return
2681 dfs_skip_bases as appropriate.
2682 (modify_all_vtables): Walk in pre-order.
2683 * search.c (dfs_walk_all, dfs_walk_once_r,
2684 dfs_walk_once_accessible_r): Assert post order function never
2685 returns dfs_skip_bases.
2687 * search.c (struct lookup_base_data_s): New.
2688 (lookup_base_r): Replace with ...
2689 (dfs_lookup_base): ... this.
2690 (lookup_base): Use dfs_walk_all.
2692 2004-10-12 Kazu Hirata <kazu@cs.umass.edu>
2694 * search.c: Fix comment typos.
2696 2004-10-11 Mark Mitchell <mark@codesourcery.com>
2699 * parser.c (cp_parser_declarator): Add member_p parameter.
2700 (cp_parser_condition): Adjust calls to cp_parser_declarator.
2701 (cp_parser_explicit_instantiation): Likewise.
2702 (cp_parser_init_declarator): Likewise.
2703 (cp_parser_direct_declarator): Add member_p parameter. Do not
2704 parse tentatively when parsing the parameters to a member.
2705 (cp_parser_type_id): Adjust calls to cp_parser_declarator.
2706 (cp_parser_parameter_declaration): Likewise.
2707 (cp_parser_member_declaration): Likewise.
2708 (cp_parser_exception_declaration): Likewise.
2711 * cp-tree.h (CLASSTYPE_TEMPLATE_SPECIALIZATION): Add a comment.
2712 * pt.c (optimize_specialization_lookup_p): Do not optimize lookups
2713 for members of partial or explicit specializations.
2716 * decl2.c (finish_anon_union): Robustify.
2718 2004-10-11 Nathan Sidwell <nathan@codesourcery.com>
2720 * cp-tree.h (get_dynamic_cast_base_type): Rename to ...
2721 (dcast_base_hint): ... here.
2722 * rtti.c (build_dynamic_cast_1): Use dcast_base_hint.
2723 * search.c (struct dcast_data_s): New.
2724 (dynamic_cast_base_recurse): Remove. Replace with ...
2725 (dfs_dcast_hint_pre, dfs_dcast_base_post): ... these. New.
2726 (get_dynamic_cast_base_type): Rename to ...
2727 (dcast_base_hint): ... here. Use dfs_walk_once_accessible.
2728 (accessible_r): Remove.
2729 (dfs_accessible_post): New, broken out of accessible_r.
2730 (accessible_p): Use dfs_walk_once_accessible.
2731 (dfs_walk_once_accessible_r): New. From accessible_r.
2732 (dfs_walk_once_accessible): New. From acessible_p.
2734 * cp-tree.h (SAME_BINFO_TYPE_P): New.
2735 * class.c (build_base_path): Use SAME_BINFO_TYPE_P to compare
2737 (convert_to_base_statically, determine_primary_bases,
2738 update_vtable_entry_for_fn, dfs_modify_vtables, build_vtt_inits,
2739 dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
2740 accumulate_vtbl_inits, dfs_accumulate_vtbl_inits,
2741 build_vtbl_initializer, add_vcall_offset_vtbl_entries_1): Likewise.
2742 * init.c (expand_member_init): Likewise.
2743 * search.c (lookup_base_r, dynamic_cast_base_recurse,
2744 binfo_via_virtual, copied_binfo, binfo_for_vbase,
2745 original_binfo): Likewise.
2746 * tree.c (copy_binfo): Likewise.
2748 2004-10-11 Kazu Hirata <kazu@cs.umass.edu>
2750 * semantics.c: Fix comment typos.
2752 2004-10-10 Andrew Pinski <pinskia@physics.uc.edu>
2757 * semantics.c (maybe_cleanup_point_expr): Call
2758 fold_build_cleanup_point_expr.
2759 (maybe_cleanup_point_expr_void): New function.
2760 (add_decl_expr): Call maybe_cleanup_point_expr_void.
2761 (finish_expr_stmt): Likewise.
2762 (finish_return_stmt): Likewise.
2763 (finish_for_expr): Likewise.
2764 (finish_asm_stmt): Likewise.
2765 * typeck.c (condition_conversion): Call
2766 fold_build_cleanup_point_expr.
2768 2004-10-10 Andrew Pinski <pinskia@physics.uc.edu>
2771 * semantics.c (add_decl_expr): If the decl has a size which
2772 has side effects then the decl expression needs a cleanup point.
2774 2004-10-10 Mark Mitchell <mark@codesourcery.com>
2777 * decl.c (grokdeclarator): Robustify error-recovery on invalid
2780 2004-10-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
2782 Convert diagnostics to use quoting flag q 7/n
2783 * typeck.c (composite_pointer_type_r, composite_pointer_type,
2784 cxx_sizeof_or_alignof_type, cxx_sizeof_or_alignof_expr,
2785 string_conv_p, build_class_member_access_expr,
2786 build_class_member_access_expr, lookup_destructor,
2787 finish_class_member_access_expr, build_indirect_ref,
2788 get_member_function_from_ptrfunc, build_function_call,
2789 convert_arguments, build_binary_op, pointer_diff, build_unary_op,
2790 check_for_casting_away_constness, build_static_cast,
2791 build_reinterpret_cast, build_const_cast, build_c_cast,
2792 build_modify_expr, get_delta_difference, build_ptrmemfunc,
2793 dubious_conversion_warnings, convert_for_assignment,
2794 convert_for_initialization,
2795 maybe_warn_about_returning_address_of_local, check_return_expr):
2798 * typeck2.c (error_not_base_type, readonly_error,
2799 abstract_virtuals_error, cxx_incomplete_type_diagnostic,
2800 store_init_value, digest_init, build_x_arrow,
2801 build_m_component_ref, require_complete_eh_spec_types): Likewise.
2803 * tree.c (cp_build_qualified_type_real,
2804 handle_java_interface_attribute, handle_init_priority_attribute):
2807 * semantics.c (finish_asm_stmt, finish_non_static_data_member,
2808 finish_pseudo_destructor_expr,
2809 check_template_template_default_arg, begin_class_definition,
2810 finish_base_specifier, qualified_name_lookup_error,
2811 finish_id_expression, finish_typeof): Likewise.
2813 * search.c (lookup_base, check_final_overrider,
2814 look_for_overrides_r): Likewise.
2816 * rtti.c (get_tinfo_decl, build_dynamic_cast_1): Likewise.
2818 2004-10-09 Mark Mitchell <mark@codesourcery.com>
2821 * error.c (dump_expr): Correct handling of AGGR_INIT_EXPRs using a
2825 * init.c (build_new): Correct comments.
2826 * parser.c (cp_parser_new_expression): Use NULL_TREE for nelts in
2830 * parser.c (cp_parser_postfix_dot_deref_expression): If the
2831 pseduo-destructor-name production does not work, fall back to the
2832 ordinary production.
2835 * tree.c (cp_tree_equal): Handle a BASELINK.
2838 * cp-tree.h (check_var_type): New function.
2839 * decl.c (check_var_type): New function, split out from ...
2840 (grokdeclarator): ... here.
2841 * pt.c (tsubst_decl): Use check_var_type.
2844 * decl.c (grokdeclarator): Disallow declarations of operators as
2847 2004-10-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2850 * error.c (dump_expr): Add missing case for RDIV_EXPR.
2852 2004-10-08 Kazu Hirata <kazu@cs.umass.edu>
2854 * pt.c, search.c: Fix comment typos.
2856 2004-10-08 Nathan Sidwell <nathan@codesourcery.com>
2858 * cp-tree.h (dfs_walk, dfs_walk_real, dfs_unmark, markedp,
2860 (dfs_skip_bases, dfs_walk_all, dfs_walk_once): New.
2861 * class.c (struct find_final_overrider_data): Remove most_derived,
2862 vpath_list and vpath fields. Add path field.
2863 (dfs_find_final_ocerrider_1): Add DEPTH parameter. Adjust.
2864 (dfs_find_final_overrider): Rename to ...
2865 (dfs_find_final_overrider_pre): ... here. Adjust.
2866 (dfs_find_final_overrider_post): Adjust.
2867 (dfs_find_final_overrider_q): Fold into
2868 dfs_find_final_overrider_pre.
2869 (find_final_overrider): Adjust dfs searching.
2870 (dfs_modify_vtables): Don't mark binfo here.
2871 (modify_all_vtables): Use dfs_walk_once.
2872 (build_vtt_inits): Likwise. Use dfs_walk_all.
2873 (dfs_build_secondary_vptr_vtt_inits): Don't mark binfo here.
2874 Return dfs_skip_bases as appropriate.
2875 (dfs_fixup_binfo_vtbls): Return dfs_skip_bases as appropriate.
2876 * init.c (dfs_initialized_vtbl_ptrs): Return dfs_skip_bases as
2877 appropriate. Don't mark binfo here.
2878 (initialize_vtbl_ptrs): Use dfs_walk_once.
2879 * search.c (struct vbase_info): Remove unused struct.
2880 (access_in_type): Use dfs_walk_once.
2881 (dfs_access_in_type): Don't mark binfo here.
2882 (dfs_accessible_queue_p, dfs_accessible_p) Remove.
2884 (accessible_r): ... here. New. Specialize dfs_walk_once.
2885 (accessible_p): Use accessible_r.
2886 (lookup_field_queue_p): Remove. Fold into ...
2887 (lookup_field_r): ... here. Adjust.
2888 (lookup_member): Use dfs_walk_all.
2889 (dfs_walk_real, dfs_walk): Replace with ...
2890 (dfs_walk_all, dfs_walk_once): ... these.
2891 (dfs_walk_once_r, dfs_unmark_r): Workers for dfs_walk_once.
2892 (dfs_unmark, unmarkedp, markedp): Remove.
2893 (dfs_get_pure_virtuals): Don't mark binfo here.
2894 (get_pure_virtuals): Use dfs_walk_once.
2895 (dfs_debug_unmarked_p): Remove. Fold into ...
2896 (dfs_debug_mark): ... here.
2897 (note_debug_info_needed): Use dfs_walk_all.
2899 2004-10-07 Andrew Pinski <pinskia@physics.uc.edu>
2901 * pt.c (tsubst_expr) <case ASM_EXPR>: Look passed the
2902 CLEANUP_POINT_EXPR to get the asm expression.
2904 2004-10-07 Mark Mitchell <mark@codesourcery.com>
2906 * cp-tree.h (ICS_USER_FLAG): Remove comment about obsolete flag.
2907 (DECL_MEMBER_TEMPLATE_P): New macro.
2908 (is_member_template): Remove.
2909 (class_method_index_for_fn): New function.
2910 * pt.c (build_over_call): Use DECL_MEMBER_TEMPLATE_P.
2911 * class.c (finish_struct_methods): Remove out-of-date comment.
2912 * decl.c (copy_fn_p): Use DECL_MBMER_TEMPLATE_P.
2913 * decl2.c (check_classfn): Use DECL_MEMBER_TEMPLATE_P and
2914 class_method_index_for_fn.
2915 * pt.c (is_member_template): Remove.
2916 (is_member_template_class): Likewise.
2917 (optimize_specialization_lookup_p): New function.
2918 (retrieve_specialization): Optimize lookups for members that are
2919 not member templates.
2920 (register_specialization): Adjust accordingly.
2921 (build_template_decl): Add member_template_p parameter. Set
2922 DECL_MEMBER_TEMPLATE_P.
2923 (process_partial_specialization): Adjust call to
2924 retrieve_specialization.
2925 (push_template_decl_real): Determine whether the template is a
2927 (lookup_template_class): Use retrieve_specialization.
2928 (tsubst_decl): Adjust call to retrieve_specialization.
2929 (tsubst_exception_specification): New function.
2931 (tsubst_copy): Use DECL_MEMBER_TEMPLATE_P.
2932 (instantiate_template): Adjust call to retrieve_specialization.
2933 (regenerate_decl_from_template): Do not actually generate a new
2935 (instantiate_decl): Adjust call to retrieve_specialization.
2936 (class_method_index_for_fn): New method.
2938 2004-10-07 Andrew Pinski <pinskia@physics.uc.edu>
2940 * parser.c (cp_parser_asm_definition): Look passed the
2941 CLEANUP_POINT_EXPR to get the asm expression.
2943 2004-10-06 Andrew Pinski <pinskia@physics.uc.edu>
2946 * semantics.c (finish_asm_stmt): Asm expressions need cleanup
2949 2004-10-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
2951 Convert diagnostics to use quoting flag q 6/n
2952 * pt.c (finish_member_template_decl, check_specialization_scope,
2953 maybe_process_partial_specialization, determine_specialization,
2954 check_explicit_specialization, maybe_check_template_type,
2955 process_partial_specialization, check_default_tmpl_args,
2956 push_template_decl_real, redeclare_class_template,
2957 convert_nontype_argument, coerce_template_parms,
2958 lookup_template_class, push_tinst_level,
2959 instantiate_class_template, tsubst_arg_types,
2960 tsubst_function_type, tsubst, tsubst_qualified_id,
2961 tsubst_copy_and_build, check_instantiated_args,
2962 do_decl_instantiation, do_type_instantiation,
2963 invalid_nontype_parm_type_p, check_specialization_namespace,
2964 convert_template_argument, determine_specialization,
2965 check_template_shadow, tsubst_decl
2966 instantiate_pending_templates): Use quoting marks.
2968 2004-10-05 Nathan Sidwell <nathan@codesourcery.com>
2971 * parser.c (cp_parser_postfix_expression): Inhibit Koenig when
2972 unqualified lookup finds a member function.
2974 2004-10-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
2976 Convert diagnostics to use quoting flag q 5/n
2977 * parser.c (cp_parser_name_lookup_error,
2978 cp_parser_diagnose_invalid_type_name,
2979 cp_parser_primary_expression, cp_parser_unqualified_id,
2980 cp_parser_nested_name_specifier_opt, cp_parser_labeled_statement,
2981 cp_parser_jump_statement, cp_parser_simple_declaration,
2982 cp_parser_decl_specifier_seq, cp_parser_mem_initializer_id,
2983 cp_parser_type_parameter, cp_parser_template_id,
2984 cp_parser_template_name, cp_parser_direct_declarator,
2985 cp_parser_parameter_declaration_list, cp_parser_class_head,
2986 cp_parser_base_specifier, cp_parser_lookup_name,
2987 cp_parser_late_parsing_default_args,
2988 cp_parser_optional_template_keyword
2989 cp_parser_elaborated_type_specifier, cp_parser_check_class_key,
2990 cp_parser_check_access_in_redeclaration): Use quoting marks.
2992 * name-lookup.c (supplement_binding, pushdecl,
2993 check_for_out_of_scope_variable, validate_nonmember_using_decl,
2994 do_nonmember_using_decl, lookup_tag, set_decl_namespace,
2995 push_namespace, do_namespace_alias, do_using_directive,
2996 ambiguous_decl, lookup_namespace_name, add_function): Likewise.
2998 * method.c (use_thunk): Likewise.
3000 * lex.c (unqualified_name_lookup_error,
3001 unqualified_fn_lookup_error): Likewise.
3003 2004-10-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
3005 Convert diagnostics to use quoting flag q 4/n
3006 * except.c (decl_is_java_type, build_throw,
3007 is_admissible_throw_operand, check_handlers_1, check_handlers):
3008 Use quoting formats.
3009 * friend.c (add_friend, make_friend_class, do_friend): Likewise.
3010 * init.c (sort_mem_initializers, emit_mem_initializers,
3011 member_init_ok_or_else, expand_member_init, is_aggr_type,
3012 build_offset_ref, build_java_class_ref): Likewise.
3014 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
3016 Convert diagnostics to use quoting flag q 3/n
3017 * decl.c (pop_label, duplicate_decls, redeclaration_error_message,
3018 redeclaration_error_message, lookup_label, check_goto,
3019 make_typename_type, make_unbound_class_template,
3020 fixup_anonymous_aggr, check_tag_decl, start_decl, start_decl_1,
3021 grok_reference_init, layout_var_decl, maybe_commonize_var,
3022 check_for_uninitialized_const_var, reshape_init_array,
3023 reshape_init, check_initializer, cp_finish_decl,
3024 member_function_or_else, bad_specifiers, grokfndecl, grokvardecl,
3025 check_static_variable_definition, compute_array_index_type,
3026 create_array_type_for_decl, check_special_function_return_type,
3027 grokdeclarator, check_default_argument, grokparms,
3028 grok_ctor_properties, grok_op_properties,
3029 check_elaborated_type_specifier, xref_tag, finish_enum,
3030 build_enumerator, check_function_type, start_preparsed_function,
3031 store_parm_decls): Use quoting formats.
3032 * decl2.c (grok_array_decl, delete_sanity, check_member_template,
3033 check_java_method, check_classfn, finish_static_data_member_decl,
3034 grokfield, grokbitfield, grok_function_init,
3035 build_anon_union_vars, coerce_new_type, coerce_delete_type,
3036 check_default_args): Likewise.
3037 * parser.c (cp_parser_decl_specifier_seq): Likewise.
3039 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
3041 Convert diagnostics to use quoting flag q 2/n
3042 * class.c (build_base_path, add_method, alter_access,
3043 handle_using_decl, check_bases,
3044 maybe_warn_about_overly_private_class, find_final_overrider,
3045 warn_hidden, finish_struct_anon, add_implicitly_declared_members,
3046 check_bitfield_decl, check_field_decls, layout_empty_base,
3047 build_base_field, check_methods, layout_virtual_bases,
3048 warn_about_ambiguous_bases, layout_class_type, finish_struct_1,
3049 resolve_address_of_overloaded_function, instantiate_type,
3050 note_name_declared_in_class): Use format flag "q" for quoting.
3052 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
3054 Convert diagnostics to use quoting flag q 1/n
3055 * error.c (locate_error): Ignore quoting flag q.
3056 * call.c (build_user_type_conversion_1, build_operator_new_call,
3057 build_object_call, op_error, build_conditional_expr,
3058 build_new_op, build_op_delete_call, enforce_access,
3059 convert_like_real, convert_arg_to_ellipsis, build_x_va_arg,
3060 convert_default_arg, build_over_call, build_new_method_call,
3061 joust, perform_implicit_conversion, initialize_reference): Use the
3064 2004-10-03 Andrew Pinski <pinskia@physics.uc.edu>
3067 * typeck.c (build_reinterpret_cast): Return if the inner type
3070 2004-10-01 Jan Hubicka <jh@suse.cz>
3072 * semantics.c (expand_body): Update call of tree_rest_of_compilation.
3074 2004-09-30 Nathan Sidwell <nathan@codesourcery.com>
3076 * cp-tree.h (struct lang_decl): Shrink by reordering fields and
3077 turning operator_code and fixed_offset into bitfields.
3079 2004-09-29 Joseph S. Myers <jsm@polyomino.org.uk>
3081 * decl.c (duplicate_decls): Merge TREE_DEPRECATED.
3083 2004-09-29 Jason Merrill <jason@redhat.com>
3085 PR tree-optimization/17697
3086 * decl.c (duplicate_decls): Copy TREE_NOTHROW from newdecl to olddecl.
3088 2004-09-28 Jason Merrill <jason@redhat.com>
3091 * class.c (build_base_field): Set TYPE_MODE.
3093 2004-09-28 Roger Sayle <roger@eyesopen.com>
3096 * g++spec.c (lang_specific_driver): Unrecognized libraries, other
3097 than -lc and -lm, may require linking against libstc++.
3099 2004-09-28 Kazu Hirata <kazu@cs.umass.edu>
3101 * tree.c: Fix a comment typo.
3103 2004-09-28 Nathan Sidwell <nathan@codesourcery.com>
3105 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): Remove.
3106 (struct secondary_vptr_vtt_init_data_s): New.
3107 (build_vtt_inits): Adjust dfs_walkers.
3108 (dfs_build_secondary_vptr_vtt_inits): Caller data is a
3109 secondary_vptr_vtt_init_data_s structure. Adjust.
3110 (dfs_ctor_vtable_bases_queue_p): Remove.
3111 (dfs_fixup_binfo_vtbls): No need to clear BINFO_MARKED. Simplify.
3113 * pt.c (struct get_template_base_data_s): Remove.
3114 (get_template_base_r): Fold into get_template_base.
3115 (get_template_base): Walk base binfos directly in inheritance
3118 2004-09-27 Mark Mitchell <mark@codesourcery.com>
3121 * cp-tree.h (fold_if_not_in_template): New function.
3122 * call.c (build_conditional_expr): Use fold_if_not_in_template.
3123 (build_cxx_call): Likewise.
3124 * cvt.c (convert_to_complex): Likewise.
3125 (ocp_convert): Likewise.
3126 (convert): Likewise.
3127 (convert_force): Likewise.
3128 * decl.c (compute_array_index_type): Clear
3129 processing_template_decl while folding array bounds.
3130 * pt.c (convert_nontype_argument): Clear
3131 processing_template_decl while processing non-type argument
3133 * tree.c (fold_if_not_in_template): New function.
3134 * typeck.c (build_class_member_access_expr): Use
3135 fold_if_not_in_template.
3136 (build_array_ref): Likewise.
3137 (build_binary_op): Likewise. Do not try to optimize computations
3138 when processing templates.
3139 (cp_pointer_int_sum): Use fold_if_not_in_template.
3140 (pointer_diff): Likewise.
3141 (build_unary_op): Likewise.
3142 (build_reinterpret_cast): Likewise.
3143 (get_delta_difference): Likewise.
3144 (expand_ptrmemfunc_cst): Likewise.
3145 (dubious_conversion_warnings): Likewise.
3147 2004-09-27 Matt Austern <austern@apple.com>
3149 * cp/parser.c (struct cp_token): New one-bit field , implicit_extern_c
3150 (cp_lexer_get_preprocessor_token): Set implicit_extern_c for
3151 tokens that come from headers that are implicitly extern "C".
3152 (struct cp_parser): new one-bit field, implicit_extern_c.
3153 (cp_parser_new): Set parser's implicit_extern_c to false.
3154 (cp_parser_translation_unit): Pop lang context if we were in a
3155 header that was implicitly extern "C".
3156 (cp_parser_declaration_seq_opt): Push/pop lang context as
3157 required by the token's and parser's implicit_extern_c.
3159 2004-09-27 Mark Mitchell <mark@codesourcery.com>
3162 * cp-tree.h (shared_member_p): Declare.
3163 * search.c (shared_member_p): Give it external linkage.
3164 * semantics.c (finish_qualified_id_expr): Use it.
3165 (finish_id_expression): Likewise.
3168 * semantics.c (finish_id_expression): Do not add "this->" to
3169 static member functions.
3171 2004-09-27 Nathan Sidwell <nathan@codesourcery.com>
3174 * error.c (dump_type): Change TREE_VEC case into TREE_BINFO.
3176 * class.c (struct count_depth_data): Remove.
3177 (dfs_depth_post, dfs_depth_q): Remove.
3178 (find_final_overrider): Use number of vbase classes as depth
3181 * cp-tree.h (types_overlap_p): Remove.
3182 * search.c (struct overlap_info): Remove.
3183 (dfs_check_overlap, dfs_no_overlap_yet, types_overlap_p): Remove.
3185 * pt.c (GTB_VIA_VIRTUAL, GTB_IGNORE_TYPE): Remove.
3186 (get_template_base_recursive): Remove. Replace with ...
3187 (get_template_base_r): ... this.
3188 (struct get_template_base_data_s): New.
3189 (get_template_base): Use get_template_base_r via dfs_walk. Always
3190 return NULL on failure.
3191 (unify): Remove error_mark_node check from get_template_base result.
3193 2004-09-24 Paolo Bonzini <bonzini@gnu.org>
3195 * parser.c (cp_parser_expression_stack): Clarify why it is
3196 an array of NUM_PREC_VALUES elements.
3197 (cp_parser_binary_expression): Clarify why we do not need to
3198 handle stack overflow.
3200 2004-09-24 Nathan Sidwell <nathan@codesourcery.com>
3203 * search.c (lookup_field_queue_p): Correct check for hidden base.
3205 * search.c (bfs_walk): Remove.
3206 (lookup_member): Use dfs_walk_real.
3207 (dfs_walk_real): Move and adjust documentation from bfs_walk.
3209 2004-09-23 Zack Weinberg <zack@codesourcery.com>
3211 * decl.c (grokfndecl): If ::main is found not to return int,
3212 correct it after issuing a diagnostic.
3213 (grokdeclarator): If the incoming type was error_mark_node, do
3214 not complain about declaring something with no type.
3215 (start_function): Change check for ::main not returning int to
3216 an assertion, as grokfndecl now catches this when the user did it.
3217 * init.c (perform_member_init, sort_mem_initializers)
3218 (emit_mem_initializers): Make most diagnostics be issued on
3219 the line of current_function_decl, not whatever the current
3221 * parser.c (cp_lexer_peek_token_emit_debug_info): Surround
3222 definition and declaration with #ifdef ENABLE_CHECKING.
3223 Avoid unnecessary use of fprintf.
3224 (cp_lexer_print_token, cp_lexer_debug_stream): Adjust stub
3225 definitions to avoid warnings.
3226 (cp_lexer_new_main): Add assertion that first token is not a
3228 (cp_lexer_new_from_token_array): Fold into ...
3229 (cp_lexer_new_from_tokens): ... here. Add assertion that
3230 first token is not a padding token.
3231 (cp_lexer_set_source_position_from_token): Move nearer to callers.
3232 Remove unused lexer argument.
3233 (cp_lexer_peek_token): Just print debugging report (if enabled)
3234 and return lexer->next_token.
3235 (cp_lexer_skip_purged_tokens): Delete.
3236 (cp_lexer_next_token_is, cp_lexer_next_token_is_not): Make
3237 inline, simplify bodies.
3238 (cp_lexer_peek_nth_token): Add debugging report a la
3239 cp_lexer_peek_token.
3240 (cp_lexer_consume_token): Correct commentary. Advance over
3241 purged tokens here. Set current source position here, from
3242 token to be returned. Avoid unnecessary use of fprintf.
3243 (cp_lexer_purge_token): Advance next_token pointer over this and
3244 subsequent purged tokens.
3245 (cp_parser_error): Adjust source position to that of the
3247 (cp_parser_push_lexer_for_tokens, cp_parser_pop_lexer): New functions.
3248 (cp_parser_string_literal): Remove some excessive cleverness.
3249 (cp_parser_enum_specifier): Call start_enum before consuming
3251 (cp_parser_member_declaration): Make the "extra semicolon"
3252 diagnostic consistently-worded with the other place this is
3253 diagnosed. Explicitly set the diagnostic location to the
3254 location of the offending semicolon.
3255 (cp_parser_enclosed_template_argument_list): Use %</%> quoting
3256 in diagnostics. Do not use cp_parser_require. Set location
3257 of diagnostics about improper use of '>>' to location of
3259 (cp_parser_late_parsing_for_member):
3260 Use cp_parser_push_lexer_for_tokens and cp_parser_pop_lexer.
3261 (cp_parser_late_parsing_default_args): Likewise. Manually
3262 move some logic outside the loop.
3264 2004-09-23 Andrew Pinski <pinskia@physics.uc.edu>
3267 * cvt.c (cp_convert_to_pointer): Return early when the type is
3270 2004-09-21 Fariborz Jahanian <fjahanian@apple.com>
3274 * decl.c (grokfndecl): Add new argument "attrlist", use it
3275 to call cplus_decl_attributes.
3276 (start_function): Remove call to cplus_decl_attributes.
3277 * cvt.c (ocp_convert): Add support to use type conversion
3278 function to vector type.
3279 * parser.c (cp_parser_conversion_type_id): Add attributes, if any,
3282 2004-09-23 Paolo Bonzini <bonzini@gnu.org>
3286 * parser.c (cp_parser_token_tree_map_node,
3287 cp_parser_pm_expression, cp_parser_additive_expression,
3288 cp_parser_multiplicative_expression, cp_parser_shift_expression,
3289 cp_parser_relational_expression, cp_parser_equality_expression,
3290 cp_parser_and_expression, cp_parser_exclusive_or_expression,
3291 cp_parser_inclusive_or_expression,
3292 cp_parser_logical_and_expression,
3293 cp_parser_logical_or_expression): Removed.
3294 (enum cp_parser_prec, struct cp_parser_token_tree_map_node,
3295 binops, binops_by_token): New.
3296 (cp_parser_assignment_expression): Use cp_parser_binary_expression.
3297 (cp_parser_new): Initialize binops_by_token.
3298 (cp_parser_binary_expression): Rewritten.
3301 2004-09-23 Kazu Hirata <kazu@cs.umass.edu>
3303 * parser.c: Fix a comment typo.
3305 2004-09-23 Nathan Sidwell <nathan@codesourcery.com>
3308 * decl.c (xref_basetypes): Look through typedefs before checking
3311 2004-09-22 Nathan Sidwell <nathan@codesourcery.com>
3313 * cp-tree.h (unemitted_tinfo_decls): Make a VEC(tree).
3314 * decl2.c (cp_finish_file): Adjust tinfo decl emission loop.
3315 * rtti.c (unemitted_tinfo_decls): Make a VEC(tree).
3316 (init_rtti_processing): Initialize it to something realistic.
3317 (get_tinfo_decl): Adjust pushing the new decl.
3319 * cp-tree.h (struct lang_type_class): Remove marked flags, add
3320 diamond_shaped and repeated_base flags. Reorder to keep 8-bit blocks.
3321 (TYPE_MARKED_P): New.
3322 (CLASSTYPE_DIAMOND_SHAPED_P, CLASSTYPE_REPEATED_BASE_P): New.
3323 (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
3324 CLEAR_CLASSTYPE_MARKED_N): Remove.
3325 (CLASSTYPE_MARKED_*, SET_CLASSTYPE_MARKED_*,
3326 CLEAR_CLASSTYPE_MARKED_*): Remove.
3327 * decl.c (xref_basetypes): Use TYPE_MARKED_P. Determine diamond
3328 shaped and repeated base properties.
3329 * lex.c (cxx_make_type): Don't clear TYPE_ALIAS_SET.
3330 * rtti.c (dfs_class_hint_mark, dfs_class_hint_unmark,
3331 class_hint_flags): Remove.
3332 (get_pseudo_ti_init): Use CLASSTYPE_REPEATED_BASE_P and
3333 CLASSTYPE_DIAMOND_SHAPED_P.
3335 2004-09-21 Ziemowit Laski <zlaski@apple.com>
3337 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved here from
3339 (objcp_tsubst_copy_and_build): Reformat function signature.
3340 * cp-objcp-common.h (objcp_tsubst_copy_and_build): Likewise.
3341 (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved to cp-lang.c.
3343 2004-09-21 Zack Weinberg <zack@codesourcery.com>
3345 * parser.c (cp_lexer_peek_token, cp_lexer_consume_token):
3346 Don't handle CPP_PRAGMA tokens specially.
3347 (cp_lexer_handle_pragma): Use cp_lexer_consume_token. Don't
3348 purge the token; do clear token->value after processing. Add
3349 assertion at beginning that token->value is nonzero.
3350 (cp_parser_statement, cp_parser_declaration_seq_opt): Handle
3351 CPP_PRAGMA as a full statement or declaration in its own right.
3353 2004-09-21 Matt Austern <austern@apple.com>
3356 * decl.c (grokvardecl): Accept declarations of global variables
3357 using anonymous types.
3359 2004-09-21 Roger Sayle <roger@eyesopen.com>
3362 * tree.c (lvalue_p_1): Disallow MIN_EXPR and MAX_EXPR as lvalues
3363 if either operand has side-effects.
3364 * typeck.c (rationalize_conditional_expr): Assert that neither
3365 operand of MIN_EXPR or MAX_EXPR has side-effects.
3366 (build_modify_expr): Add support for MIN_EXPR and MAX_EXPR.
3367 Check that the "lhs" is a valid lvalue, i.e. that neither operand
3368 of a MIN_EXPR or MAX_EXPR has a side-effect.
3370 2004-09-21 Nathan Sidwell <nathan@codesourcery.com>
3372 * cp-tree.h (struct lang_type_header): Remove
3373 uses_multiple_inheritance field.
3374 (TYPE_USES_MULTIPLE_INHERITANCE): Remove.
3375 (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): Remove.
3376 (TYPE_USES_VIRTUAL_BASECLASSES): Remove.
3377 (DECL_NEEDS_VTT_PARM_P): Use CLASSTYPE_VBASECLASSES.
3378 (TYPE_CONTAINS_VPTR_P): Likewise.
3379 * call.c (add_template_candidate_real): Use
3380 CLASSTYPE_VBASECLASSES.
3381 (build_special_member_call): Likewise.
3382 * class.c (finish_struct_bits): Remove
3383 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P & TYPE_USES_VIRTUAL_BASECLASSES
3385 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
3386 (create_vtable_ptr): Remove TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P
3388 (build_vtt_inits): Use CLASSTYPE_VBASECLASSES.
3389 (accumulate_vtbl_inits, build_vbase_offset_vtbl_entries):
3391 * decl.c (xref_basetypes): Remove TYPE_USES_MULTIPLE_INHERITANCE,
3392 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
3394 (cxx_maybe_build_cleanup): Use CLASSTYPE_VBASECLASSES.
3395 * decl2.c (maybe_retrofit_in_chrg): Likewise.
3396 * init.c (expand_member, push_base_cleanups): Likewise.
3397 * pt.c (instantiate_class_template): Remove
3398 TYPE_USES_MULTIPLE_INHERITANCE,
3399 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
3401 * ptree.c (cxx_print_type): Remove TYPE_USES_MULTIPLE_INHERITANCE
3403 * typeck2.c (process_init_constructor): Replace some sorrys with
3406 2004-09-21 Andreas Tobler <a.tobler@schweiz.ch>
3408 * decl.c (reshape_init_array): Initialize max_index_cst to fix
3411 2004-09-20 Mark Mitchell <mark@codesourcery.com>
3414 * pt.c (tsubst): Fix parentheses to accomodate emacs.
3415 (tsubst_baselink): If we get a single function, mark it as used.
3417 2004-09-20 Matt Austern <austern@apple.com>
3418 Zack Weinberg <zack@codesourcery.com>
3420 * decl.c (make_rtl_for_nonlocal_decl, start_preparsed_function):
3421 Apply lbasename to input_filename before passing to get_fileinfo.
3422 * semantics.c (begin_class_definition): Likewise.
3423 * lex.c (handle_pragma_interface): Apply get_fileinfo to the
3424 correct filename. Rename variables to be less confusing.
3425 (handle_pragma_implementation): Likewise. Disable "appears
3426 after file is included" diagnostic.
3428 * parser.c (struct cp_token): Add in_system_header fiag.
3429 (CP_TOKEN_BLOCK_NUM_TOKENS, struct cp_token_block)
3430 (CP_TOKEN_BUFFER_SIZE, cp_token_cache_push_token)
3431 (CPP_NONE, cp_lexer_read_token): Delete.
3432 (struct cp_lexer): Remove first_token, string_tokens,
3433 main_lexer_p fields. Clarify comments.
3434 (struct cp_token_cache): Now just a pair of pointers.
3435 (CP_LEXER_BUFFER_SIZE): New #define.
3436 (CPP_PURGED): New fake token type.
3437 (cp_lexer_new_from_token_array, cp_lexer_destroy)
3438 (cp_lexer_peek_token_emit_debug_info, cp_lexer_skip_purged_tokens)
3439 (cp_lexer_handle_pragma, cp_token_cache_new, cp_parser_string_literal):
3441 (cp_lexer_new_from_tokens): Now a simple wrapper around
3442 cp_lexer_new_from_token_array.
3443 (cp_lexer_set_source_position_from_token): Also update
3445 (cp_lexer_next_token, cp_lexer_prev_token, cp_lexer_advance_token):
3447 (cp_lexer_token_difference): Dont handle wrapping round.
3448 (cp_lexer_new_main): Enable pragma deferral and raw strings,
3449 read the entire translation unit through c_lex_with_flags into
3450 this lexer's buffer, then turn raw strings back off again.
3451 (cp_lexer_grow_buffer): Adjust for buffer no longer being circular.
3452 (cp_lexer_get_preprocessor_token): No need to handle not being
3453 the main lexer. Set token->in_system_header too.
3454 (cp_lexer_peek_token): Skip purged tokens. Feed pragma tokens
3455 to cp_lexer_handle_pragma. No need to call cp_lexer_read_token.
3456 (cp_lexer_peek_nth_token): Likewise.
3457 (cp_lexer_purge_token): Mark the token PURGED, don't shift all
3458 the other tokens down.
3459 (cp_lexer_purge_tokens_after): Likewise.
3460 (cp_lexer_save_tokens, cp_lexer_rollback_tokens): Don't worry
3461 about there being no tokens.
3462 (cp_lexer_print_token): Revise to give useful information on
3464 (struct cp_parser): Add field translate_strings_p.
3465 (cp_parser_new): Initialize it.
3466 (cp_parser_translation_unit): Destroy the lexer when done.
3467 (cp_parser_parameter_declaration): Restructure saving of
3469 (cp_parser_save_member_function_body): Likewise.
3470 (cp_parser_check_for_invalid_template_id)
3471 (cp_parser_nested_name_specifier_opt, cp_parser_template_id):
3472 Adjust calls to cp_lexer_advance_token.
3473 (cp_parser_skip_to_closing_parenthesis, cp_parser_declaration):
3474 No need to fiddle c_lex_string_translate.
3475 (cp_parser_primary_expression, cp_parser_linkage_specification)
3476 (cp_parser_asm_definition, cp_parser_asm_specification_opt)
3477 (cp_parser_asm_operand_list, cp_parser_asm_clobber_list)
3478 Use cp_parser_string_literal.
3479 (cp_parser_attribute_list): Save and restore
3480 parser->translate_strings_p, not c_lex_string_translate.
3481 (cp_parser_cache_group): Delete.
3482 (cp_parser_cache_group_1): Rename cp_parser_cache_group. Do
3483 not take a cache argument.
3485 2004-09-20 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3488 * decl.c (reshape_init): Extract array handling into...
3489 (reshape_init_array): New function. Use integers instead of trees
3490 for indices. Handle out-of-range designated initializers.
3492 2004-09-20 Steven Bosscher <stevenb@suse.de>
3494 * lex.c (cxx_init): Don't set the ridpointer for RID_NULL
3497 2004-09-19 Mark Mitchell <mark@codesourcery.com>
3499 * decl2.c (determine_visibility): Allow class visibility
3500 directives to override targetm.cxx.export_class_data.
3502 2004-09-18 Kazu Hirata <kazu@cs.umass.edu>
3504 * call.c, semantics.c: Follow spelling conventions.
3505 * class.c: Fix a comment typo.
3507 2004-09-16 Geoffrey Keating <geoffk@apple.com>
3510 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
3511 (handle_pragma_implementation): Likewise.
3513 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
3514 Zack Weinberg <zack@codesourcery.com>
3516 * cp-tree.def: Use tree_code_class enumeration constants
3517 instead of code letters.
3518 * call.c, class.c, cp-gimplify.c, cp-lang.c, cxx-pretty-print.c
3519 * mangle.c, pt.c, semantics.c, tree.c, typeck.c:
3520 Update for new tree-class enumeration constants.
3522 2004-09-16 Mark Mitchell <mark@codesourcery.com>
3525 * parser.c (cp_parser_simple_declaration): Commit to tentative
3526 parses after seeing a decl-specifier.
3527 (cp_parser_simple_declaration): Eliminate spurious message.
3528 (cp_parser_init_declarator): Adjust error message.
3531 * lex.c (unqualified_name_lookup_error): Mark the dummy
3532 declaration as used.
3535 * parser.c (cp_parser_nested_name_specifier): Do not resolve
3536 typename types if the user explicitly said "typename".
3538 2004-09-16 Andrew MacLeod <amacleod@redhat.com>
3540 * error.c (dump_decl): Make sure there is lang_specific info before
3541 checking for DTOR and CTOR decls.
3543 2004-09-16 Nathan Sidwell <nathan@codesourcery.com>
3545 * class.c (copy_virtuals): Remove.
3546 (build_primary_vtable): Use copy_list directly.
3547 (build_secondary_vtable): Likewise.
3548 (update_vtable_entry_for_fn): Clear BV_CALL_INDEX here.
3549 (create_vtable_ptr): Likewise.
3551 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
3553 * search.c: Follow spelling conventions.
3555 2004-09-16 Nathan Sidwell <nathan@codesourcery.com>
3557 * cp-tree.h (struct lang_type_class): Make pure_virtuals a
3559 (CLASSTYPE_INLINE_FRIENDS, CLASSTYPE_PURE_VIRTUALS): Update
3561 * call.c (build_new_method_call): Don't confirm a pure virtual is
3562 in CLASSTYPE_PURE_VIRTUALS. Reorder checks. Make it a warning.
3563 * class.c (check_methods): CLASSTYPE_INLINE_FRIENDS is a VEC(tree).
3564 (fixup_inline_methods, finish_struct): Likewise.
3565 * decl.c (finish_method): Likewise.
3566 * search.c (dfs_get_pure_virtuals, get_pure_virtuals):
3567 CLASSTYPE_PURE_VIRTUALS is a VEC(tree).
3568 * typeck2.c (abstract_virtuals_error): Likewise. Truncate the
3569 vector to avoid repeating the list in error messages.
3571 2004-09-15 Mark Mitchell <mark@codesourcery.com>
3573 * cp-objcp-common.h (LANG_HOOKS_COMDAT_GROUP): Define.
3574 * cp-tree.h (cxx_comdat_group): Declare.
3575 * decl.c (cxx_comdat_group): New function.
3577 2004-09-15 Nathan Sidwell <nathan@codesourcery.com>
3579 * search.c (get_pure_virtuals): Remove unused variables.
3581 * cp-tree.h (struct lang_decl_flags): Remove
3582 needs_final_overrider.
3583 (DECL_NEEDS_FINAL_OVERRIDER_P): Remove.
3584 * decl.c (duplicate_decls): Do not copy DECL_NEEDS_FINAL_OVERRIDER_P.
3585 * class.c (finish_struct_bits): Correct comment about
3586 CLASSTYPE_PURE_VIRTUALS.
3587 * search.c (get_pure_virtuals): Remove useless loop.
3589 2004-09-14 Mark Mitchell <mark@codesourcery.com>
3592 * mangle.c (partially_mangled_name): New variable.
3593 (partially_mangled_name_len): Likewise.
3594 (save_partially_mangled_name): New function.
3595 (restore_partially_mangled_name): Likewise.
3596 (write_encoding): Save and restore partially mangled names around
3597 calls to get_mostly_instantiated_function_type.
3598 (write_unqualified_name): Likewise.
3600 2004-09-14 Nathan Sidwell <nathan@codesourcery.com>
3602 * pt.c (unify): Replace gcc_unreachable with gcc_assert.
3604 2004-09-13 Mark Mitchell <mark@codesourcery.com>
3607 * parser.c (cp_parser_id_expression): Correct value for
3609 (cp_parser_nested_name_specifier_opt): Look through typenames as
3611 (cp_parser_template_name): Honor check_dependency_p.
3614 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name):
3618 * pt.c (unify): Add ENUMERAL_TYPE case. Replace sorry with
3621 2004-09-12 Richard Henderson <rth@redhat.com>
3624 * semantics.c (maybe_cleanup_point_expr): Don't call fold.
3625 * typeck.c (condition_conversion): Likewise.
3627 2004-09-11 Richard Henderson <rth@redhat.com>
3630 * pt.c (cur_stmt_expr): Move from tsubst_expr.
3631 (tsubst_expr) <case STMT_EXPR>: Move ...
3632 (tsubst_copy_and_build): ... here.
3634 2004-09-10 Zack Weinberg <zack@codesourcery.com>
3636 * cp-tree.h (interface_only, interface_unknown): Delete declarations;
3637 comment explaining them moved to c-common.h.
3638 * lex.c (interface_only, interface_unknown, extract_interface_info):
3640 (cxx_finish): Don't reset interface_unknown.
3641 (handle_pragma_interface): Don't set interface_only and
3642 interface_unknown; just the like-named fields in finfo.
3643 (handle_pragma_implementation): Adjust comment.
3644 * decl2.c (cp_finish_file): Don't reset interface_only and
3646 * method.c (synthesize_method): Don't reset interface_unknown or
3647 call extract_interface_info.
3648 * pt.c (pop_tinst_level): Don't call extract_interface_info.
3649 * decl.c (start_cleanup_fn): Don't save or restore interface_only
3650 and interface_unknown.
3651 (make_rtl_for_nonlocal_decl): Call get_fileinfo on input_filename
3652 and use the result instead of the interface_only/interface_unknown
3654 (start_preparsed_function): Likewise.
3655 * lex.c (cxx_make_type): Likewise.
3656 * semantics.c (begin_class_definition): Likewise.
3657 (expand_body): Don't call extract_interface_info.
3659 2004-09-10 Ziemowit Laski <zlaski@apple.com>
3661 * decl.c (objc_mark_locals_volatile): Make description of
3662 routine more descriptive; only mark VAR_DECLs at each
3665 2004-09-10 Richard Henderson <rth@redhat.com>
3668 * call.c (build_vfield_ref): Move...
3669 * class.c (build_vfield_ref): ... here. Convert datum to the
3670 primary base containing the vptr.
3671 (make_new_vtable): Simplify build_primary_vtable arguments.
3672 (finish_struct_1): Do not duplicate TYPE_VFIELD.
3673 * typeck.c (build_class_member_access_expr): Don't warn for
3674 null object access to base fields.
3676 2004-09-10 Ziemowit Laski <zlaski@apple.com>
3678 * decl.c (objc_get_current_scope, objc_mark_locals_volatile):
3679 New functions, to be called from ObjC++.
3681 2004-09-10 Kazu Hirata <kazu@cs.umass.edu>
3683 * class.c, cp-tree.h, decl.c, decl2.c, mangle.c,
3684 name-lookup.h, parser.c, search.c, semantics.c, typeck2.c: Fix
3687 2004-09-09 Ziemowit Laski <zlaski@apple.com>
3689 * typeck.c (build_c_cast): Preserve the cast if casting
3690 to and from an Objective-C type.
3692 2004-09-09 Ziemowit Laski <zlaski@apple.com>
3694 * Make-lang.in (cp/typeck.o): Depend on c-common.h.
3695 * typeck.c: Include c-common.h.
3696 (comptypes): For RECORD_TYPEs, call objc_comptypes() and
3697 return the result if nonnegative.
3699 2004-09-09 Zack Weinberg <zack@codesourcery.com>
3701 * decl2.c (import_export_class)
3702 * lex.c (handle_pragma_interface):
3703 Test MULTIPLE_SYMBOL_SPACES with if, not #ifdef.
3705 2004-09-08 Ziemowit Laski <zlaski@apple.com>
3707 * Make-lang.in (cp/semantics.o): Depend on c-common.h.
3708 * semantics.c: Include c-common.h.
3709 (finish_compound_stmt): Call objc_clear_super_receiver().
3711 2004-09-08 Ziemowit Laski <zlaski@apple.com>
3713 * cp-tree.h (do_poplevel): New prototype.
3714 * semantics.c (do_poplevel): Make externally visible.
3716 2004-09-08 Nathan Sidwell <nathan@codesourcery.com>
3718 * cp-tree.h (tree_pair_s): Define a GC'd vector.
3719 * name-lookup.h (cxx_saved_binding, cp_class_binding): Likewise.
3720 * semantics.c (deferred_access): Likewise.
3722 2004-09-06 Daniel Jacobowitz <dan@debian.org>
3724 * semantics.c (expand_body): Assert that we are not nested.
3726 2004-09-06 Zack Weinberg <zack@codesourcery.com>
3728 * decl.c (build_enumerator): Use add_double and int_fits_type_p
3729 instead of cp_build_binary_op, to avoid creating short-lived trees.
3730 * parser.c (cp_parse_type_specifier <RID_ENUM>): Use two-token
3731 lookahead instead of backtracking. Move some code to avoid a
3733 (cp_parser_enum_specifier): Avoid duplication of effort with caller.
3734 Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
3735 (cp_parser_enumerator_list, cp_parser_enumerator_definition):
3736 Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
3738 2004-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3740 * decl.c (grok_declarator): Remove a redundant semicolon.
3742 * parser.c (cp_parser_decl_specifier_seq, cp_parser_type_specifier):
3743 Correct comments describing function parameters.
3745 2004-09-03 Matt Austern <austern@apple.com>
3746 Compile speed improvement.
3747 * parser.c (cp_lexer_print_token): Only define if ENABLE_CHECKING set.
3748 Otherwise define a stub macro that expands to nothing.
3749 (cp_lexer_debugging_p): Only define if ENABLE_CHECKING set. Otherwise
3750 define a stub macro that expands to 0.
3751 (cp_lexer_start_debugging): Only define if ENABLE_CHECKING set.
3752 (cp_lexer_stop_debugging): Likewise.
3753 (cp_lexer_debug_stream): Only define if ENABLE_CHECKING set. Otherwise
3754 define a stub macro that expands to NULL.
3755 (cp_lexer_new_main): Only set debugging_p if ENABLE_CHECKING set.
3756 (cp_lexer_new_from_tokens): Likewise.
3758 2004-09-03 Jan Hubicka <jh@suse.cz>
3760 * decl.c (finish_function): Clean out pointers we no longer need.
3762 2004-09-03 Jan Beulich <jbeulich@novell.com>
3764 * g++spec.c (MATH_LIBRARY_PROFILE): Default to MATH_LIBRARY rather
3767 2004-09-02 Paul Brook <paul@codesourcery.com>
3769 * decl2.c (determine_visibility): Only check data visibility
3772 2004-08-31 Mark Mitchell <mark@codesourcery.com>
3774 * cp-tree.h (DECL_CONSTRUCTION_VTABLE_P): New macro.
3775 * class.c (build_ctor_vtbl_group): Set DECL_CONSTRUCTION_VTABLE_P.
3776 * decl2.c (determine_visibility): Honor
3777 TARGET_CXX_EXPORT_CLASS_DATA.
3779 * class.c (key_method): Rename to ...
3780 (determine_key_method): ... this.
3781 (finish_struct_1): Adjust accordingly.
3782 * cp-tree.h (key_method): Declare.
3783 * decl2.c (maybe_emit_vtables): Determine the key method here if
3784 it has not already been done.
3786 2004-08-31 Ziemowit Laski <zlaski@apple.com>
3788 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-objcp-common.o.
3789 (cp/cp-lang.o): Depend on debug.h, gtype-cp.h and cp/cp-objcp-common.h.
3790 (cp/cp-decl.c): Do not depend on gtype-cp.h.
3791 (cp/cp-objcp-common.o): New target.
3792 * cp-lang.c: Include debug.h, cp-objcp-common.h and gtype-cp.h.
3793 (cxx_get_alias_set, cxx_warn_unused_global_decl, cp_expr_size,
3794 cp_tree_size, cp_var_mod_type_p, cxx_initialize_diagnostics): Move
3795 prototypes and definitions to cp-objcp-common.h and cp-objcp-common.c,
3797 (LANG_HOOKS_TREE_SIZE, LANG_HOOKS_FINISH,
3798 LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_INIT_OPTIONS,
3799 LANG_HOOKS_INITIALIZE_DIAGNOSTICS, LANG_HOOKS_HANDLE_OPTION,
3800 LANG_HOOKS_HANDLE_FILENAME, LANG_HOOKS_MISSING_ARGUMENT,
3801 LANG_HOOKS_POST_OPTIONS, LANG_HOOKS_GET_ALIAS_SET,
3802 LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_EXPAND_EXPR,
3803 LANG_HOOKS_EXPAND_DECL, LANG_HOOKS_PARSE_FILE,
3804 LANG_HOOKS_DUP_LANG_SPECIFIC_DECL, LANG_HOOKS_TRUTHVALUE_CONVERSION,
3805 LANG_HOOKS_SET_DECL_ASSEMBLER_NAME, LANG_HOOKS_MARK_ADDRESSABLE,
3806 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
3807 LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
3808 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_PRINT_ERROR_FUNCTION,
3809 LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL, LANG_HOOKS_WRITE_GLOBALS,
3810 LANG_HOOKS_FUNCTION_INIT, LANG_HOOKS_FUNCTION_FINAL,
3811 LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P,
3812 LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE,
3813 LANG_HOOKS_ATTRIBUTE_TABLE, LANG_HOOKS_TREE_INLINING_WALK_SUBTREES,
3814 LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN,
3815 LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS,
3816 LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P,
3817 LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P,
3818 LANG_HOOKS_TREE_INLINING_VAR_MOD_TYPE_P,
3819 LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN,
3820 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN, LANG_HOOKS_EXPR_SIZE,
3821 LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR,
3822 LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, LANG_HOOKS_MAKE_TYPE,
3823 LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE,
3824 LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
3825 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE, LANG_HOOKS_INCOMPLETE_TYPE_ERROR,
3826 LANG_HOOKS_TYPE_PROMOTES_TO, LANG_HOOKS_REGISTER_BUILTIN_TYPE,
3827 LANG_HOOKS_GIMPLIFY_EXPR, LANG_HOOKS_FOLD_OBJ_TYPE_REF): Move
3828 hooks to cp-objcp-common.h.
3829 (finish_file): New function.
3830 * cp-objcp-common.c: New file.
3831 * cp-objcp-common.h: New file.
3832 * cp-tree.h (cp_finish_file): New prototype.
3833 * decl.c: Do not include gtype-cp.h.
3834 * decl2.c (finish_file): Rename to cp_finish_file.
3836 2004-08-31 Richard Henderson <rth@redhat.com>
3839 * pt.c (tsubst_expr): Move OFFSETOF_EXPR handling ...
3840 (tsubst_copy_and_build): ... here.
3842 2004-08-30 Mark Mitchell <mark@codesourcery.com>
3844 * cp-tree.h (initialize_artificial_var): Declare.
3845 * decl.c (initialize_artifical_var): New function.
3846 * class.c (initialize_array): Remove.
3847 (initialize_vtable): Use initialize_artificial_var.
3848 (build_vtt): Likewise.
3849 (build_ctor_vtbl_group): Likewise.
3851 2004-08-30 Richard Henderson <rth@redhat.com>
3853 * class.c (build_base_path): Use build_address directly.
3854 * typeck.c (build_unary_op): Don't lower &a.b to pointer
3855 arithmetic directly.
3856 * typeck2.c (store_init_value): Don't assume !TREE_CONSTANT
3857 means !initializer_constant_valid_p.
3859 2004-08-30 Richard Henderson <rth@redhat.com>
3861 * class.c (fixed_type_or_null): Use get_base_address before
3862 assuming an ADDR_EXPR is non-null.
3864 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
3866 * name-lookup.c (pop_binding, pushdecl,
3867 set_identifier_type_value_with_scope, push_overloaded_decl,
3868 arg_assoc_type): Replace abort with gcc_assert or gcc_unreachable.
3869 * parser.c (cp_parser_diagnose_invalid_type_name,
3870 cp_parser_postfix_expression, cp_parser_unary_expression,
3871 cp_parser_check_declarator_template_para): Likewise.
3872 * pt.c (push_inline_template_parms_recursive,
3873 check_explicit_specialization, convert_nontype_argument,
3874 coerce_template_template_parms, uses_template_parms,
3875 instantiate_class_template, tsubst_decl, tsubst, tsubst_copy,
3876 tsubst_expr, instantiate_template,
3877 maybe_adjust_types_for_deduction, type_unification_real,
3878 resolve_overloaded_unification, template_decl_level,
3879 type_dependent_expression_p): Likewise.
3880 * search.c (lookup_base_r): Likewise.
3881 * semantics.c (finish_stmt_expr, simplify_aggr_init_expr): Likewise.
3882 * tree.c (lvalue_p_1, count_functions, cxx_printable_name,
3883 verify_stmt_tree_r, get_type_decl, stabilize_call): Likewise.
3884 * typeck.c (common_type, get_member_function_from_ptrfunc,
3885 build_binary_op, build_unary_op, expand_ptrmemfunc_cst): Likewise.
3886 * typeck2.c (cxx_incomplete_type_diagnostic,
3887 split_nonconstant_init_1, store_init_value,
3888 process_init_constructor): Likewise.
3890 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
3892 * call.c (check_dtor_name): Replace abort with gcc_assert or
3894 (build_call, add_builtin_candidate, build_new_op,
3895 convert_like_real, build_over_call, in_charge_arg_for_name,
3896 source_type, joust): Likewise.
3897 * class.c (build_simple_base_path, get_vcall_index,
3898 finish_struct_1, instantiate_type, get_enclosing_class,
3899 add_vcall_offset_vtbl_entries_1, cp_fold_obj_type_ref): Likewise.
3900 * cp-gimplify.c (cp_genericize): Likewise.
3901 * cp-lang.c (cp_expr_size, cp_tree_size): Likewise.
3902 * cvt.c (cp_convert_to_pointer, ocp_convert): Likewise.
3903 * decl.c (poplevel, make_unbound_class_template, reshape_init,
3904 check_special_function_return_type, grokdeclarator,
3905 grok_op_properties, tag_name, xref_tag, start_preparsed_function,
3906 finish_function): Likewise.
3907 * decl2.c (grokfield, maybe_emit_vtables):Likewise.
3908 * error.c (dump_global_iord, dump_decl, dump_template_decl,
3909 language_to_string): Likewise.
3910 * except.c (choose_personality_routine): Likewise.
3911 * friend.c (do_friend): Likewise.
3912 * g++spec.c (lang_specific_driver): Likewise.
3913 * init.c (build_zero_init, expand_default_init, build_new_1,
3914 build_vec_delete_1, build_vec_init, build_dtor_call): Likewise.
3915 * lex.c (retrofit_lang_decl, cp_type_qual_from_rid): Likewise.
3916 * mangle.c (add_substitution, write_unscoped_name,
3917 write_template_prefix, write_identifier,
3918 write_special_name_destructor, write_type, write_builtin_type,
3919 write_expression, write_template_param,
3920 write_java_integer_type_codes): Likewise.
3921 * method.c (implicitly_declare_fn): Likewise.
3923 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
3925 * cp-tree.h (BINFO_PRIMARY_P): Use a binfo flag.
3926 (BINFO_INDIRECT_PRIMARY_P): Remove.
3927 * class.c (determine_primary_base): Rename to ...
3928 (determine_primary_bases): ... here. Set all primary bases.
3929 (set_primary_base): Remove.
3930 (mark_primary_bases): Remove.
3931 (build_simple_base_path, walk_subobject_offsets,
3932 propagate_binfo_offsets, end_of_class): Adjust.
3933 (layout_class_type): Rename determine_primary_base call.
3934 (dump_class_hierarchy_r, dump_vtable): Adjust. Don't pass a binfo
3936 (dfs_build_secondary_vptr_vtt_inits, dfs_accumulate_vtbl_inits,
3937 build_rtti_vtbl_entries): Adjust.
3938 * init.c (build_vtbl_address): Adjust.
3940 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Use gcc_assert.
3942 2004-08-28 Ziemowit Laski <zlaski@apple.com>
3944 * Make-lang.in (CXX_OBJS): Split up into CXX_OBJS and
3945 CXX_AND_OBJCXX_OBJS.
3946 (CXX_C_OBJS): Include in CXX_AND_OBJCXX_OBJS instead of listing
3947 separately on the link line.
3949 2004-08-28 Jason Merrill <jason@redhat.com>
3951 * decl.c (expand_static_init): Avoid bogus warnings.
3953 2004-08-27 Jason Merrill <jason@redhat.com>
3956 * tree.c (stabilize_init): See through a COMPOUND_EXPR.
3959 * decl.c (expand_static_init): Use thread-safety API.
3960 (register_dtor_fn): Return the call, don't expand it.
3961 * tree.c (add_stmt_to_compound): New fn.
3962 (stabilize_call): Use it.
3964 2004-08-27 Richard Henderson <rth@redhat.com>
3966 * cp-tree.def (OFFSETOF_EXPR): New.
3967 * parser.c (cp_parser_builtin_offsetof): Either built an
3968 OFFSETOF_EXPR, or call fold_offsetof immediately.
3969 * pt.c (tsubst_expr): Handle OFFSETOF_EXPR.
3971 2004-08-27 Nathan Sidwell <nathan@codesourcery.com>
3973 * call.c (validate_conversion_obstack): Replace
3974 my_friendly_assert with gcc_assert or gcc_unreachable.
3975 (direct_reference_binding, merge_conversion_sequences,
3976 build_user_type_conversion_1, perform_overload_resolution,
3977 build_op_delete_call, enforce_access, call_builtin_trap,
3978 build_over_call, build_special_member_call, build_new_method_call,
3979 initialize_reference): Likewise.
3980 * class.c (build_base_path, build_primary_vtable, alter_access,
3981 check_bases, update_vtable_entry_for_fn, layout_empty_base,
3982 clone_function_decl, adjust_clone_args,
3983 type_requires_array_cookie, include_empty_classes,
3984 finish_struct_1, resolve_address_of_overloaded_function,
3985 instantiate_type, get_vtbl_decl_for_binfo, build_vtt_inits,
3986 dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
3987 accumulate_vtbl_inits, build_vtbl_initializer,
3988 build_vbase_offset_vtbl_entries, build_rtti_vtbl_entries): Likewise.
3989 * cvt.c (build_up_reference, convert_to_reference): Likewise.
3990 * decl.c (poplevel, duplicate_decls, make_typename_type,
3991 cxx_init_decl_processing, reshape_init, check_initializer,
3992 make_rtl_for_nonlocal_decl, initialize_local_var, cp_finish_decl,
3993 expand_static_init, grokfndecl, grokvardecl, build_ptrmem_type,
3994 grokdeclarator, copy_fn_p, grok_op_properties, xref_tag,
3995 xref_basetypes, start_preparsed_function, save_function_data,
3996 finish_function, finish_method, maybe_register_incomplete_var,
3997 complete_vars): Likewise.
3998 * decl2.c (grok_array_decl, check_member_template,
3999 check_classfn, finish_static_data_member_decl, coerce_new_type,
4000 coerce_delete_type, import_export_class, decl_needed_p,
4001 determine_visibility, import_export_decl, build_cleanup,
4002 start_static_initialization_or_destructi, do_static_destruction,
4003 prune_vars_needing_no_initialization,
4004 build_offset_ref_call_from_tree): Likewise.
4005 * error.c (dump_decl, dump_expr): Likewise.
4006 * init.c (finish_init_stmts, build_zero_init,
4007 expand_virtual_init, expand_default_init, expand_aggr_init_1,
4008 build_offset_ref, build_new_1, build_delete, build_vbase_delete):
4010 * mangle.c (write_method_parms, write_template_args,
4011 write_expression, write_template_arg): Likewise.
4012 * method.c (make_thunk, finish_thunk, use_thunk): Likewise.
4013 * name-lookup.c (pop_binding, begin_scope, leave_scope,
4014 resume_scope, push_using_decl, validate_nonmember_using_decl,
4015 is_ancestor, poplevel_class, set_inherited_value_binding_p,
4016 push_class_level_binding, do_class_using_decl, push_namespace,
4017 pop_namespace, add_using_namespace, ambiguous_decl,
4018 lookup_namespace_name, lookup_type_current_level,
4019 maybe_process_template_type_declaration): Likewise.
4020 * parser.c (cp_lexer_peek_nth_token,
4021 cp_parser_parse_and_diagnose_invalid_typ,
4022 cp_parser_translation_unit, cp_parser_template_id,
4023 cp_parser_lookup_name, cp_parser_late_parsing_for_member): Likewise.
4024 * pt.c (push_access_scope, finish_member_template_decl,
4025 push_inline_template_parms_recursive, add_outermost_template_args,
4026 get_innermost_template_args, begin_explicit_instantiation,
4027 end_explicit_instantiation, retrieve_specialization,
4028 is_specialization_of, is_specialization_of_friend,
4029 register_specialization, check_explicit_specialization,
4030 comp_template_parms, process_template_parm,