./
[official-gcc.git] / gcc / cp / ChangeLog
blob09677e8f645bd56c5cdb538bb344ba00a0f98d8f
1 2005-04-25  Ian Lance Taylor  <ian@airs.com>
3         * cp-tree.def: Add EXPR_STMT.
4         * cp-tree.h (cp_stmt_codes): Add EXPR_STMT.
5         (EXPR_STMT_EXPR): Define.
6         * cp-gimplify.c: Include "flags.h".
7         (gimplify_expr_stmt): New static function.
8         (cp_gimplify_expr): Handle EXPR_STMT.
9         * cxx-pretty-print.c (pp_cxx_statement): Use pp_cxx_expression
10         rather than pp_expression.
11         (pp_cxx_statement): Handle EXPR_STMT.
12         * dump.c (cp_dump_tree): Handle EXPR_STMT.
13         * lex.c (cxx_init): Don't use c_common_stmt_codes in stmt_codes
14         initializer.
16 2005-04-25  Andrew Pinski  <pinskia@physics.uc.edu>
18         PR C++/21188
19         * rtti.c (ifnonnull): Cast the zero comparison operand
20         to the correct type.
22 2005-04-24  Jakub Jelinek  <jakub@redhat.com>
24         PR middle-end/20991
25         * class.c: Include cgraph.h.
26         (cp_fold_obj_type_ref): Set node->local.vtable_method.
27         * Make-lang.in (cgraph.o): Depend on $(CGRAPH_H).
29 2005-04-12  Markus F.X.J. Oberhumer  <markus@oberhumer.com>
31         * mangle.c (write_builtin_type): Handle integer types which are
32         not one of the shared integer type nodes and emit a "vendor
33         extended builtin type" with an encoding in the form of "u5int96".
35 2005-04-24  Ian Lance Taylor  <ian@airs.com>
37         * cp-tree.def (USING_STMT): Change class to tcc_statement.
38         (TRY_BLOCK, EH_SPEC_BLOCK, HANDLER, CLEANUP_STMT): Likewise.
39         (IF_STMT, FOR_STMT, WHILE_STMT, DO_STMT): Likewise.
40         (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
42 2005-04-23  DJ Delorie  <dj@redhat.com>
44         * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, friend.c,
45         init.c, lex.c, mangle.c, method.c, name-lookup.c, parser.c,
46         repo.c, rtti.c, tree.c, typeck.c, typeck2.c: Adjust warning()
47         callers.
49 2005-04-22  Per Bothner  <per@bothner.com>
51         * decl.c (make_rtl_for_nonlocal_decl): Don't try get_fileinfo if
52         input_filename is NULL, as it is for (say) __PRETTY_FUNCTION__.
54 2005-04-22  Alexandre Oliva  <aoliva@redhat.com>
56         PR c++/21087
57         * name-lookup.c (push_overloaded_decl): Do not overload with
58         non-duplicate anticipated built-in.
60 2005-04-21  Kazu Hirata  <kazu@cs.umass.edu>
62         * cp-tree.h (THROW_NAME, AUTO_VTABLE_NAME, AUTO_TEMP_FORMAT,
63         VTABLE_BASE, VTABLE_NAME_PREFIX, STATIC_NAME_FORMAT): Remove.
65 2005-04-21  Nathan Sidwell  <nathan@codesourcery.com>
67         * cp-tree.h: Adjust for new VEC API.
68         Define VEC(tree_pair_s,gc).
69         (struct save_scope): Adjust.
70         (struct lang_type_class): Adjust.
71         (unemitted_tinfo_decls): Adjust.
72         * class.c (add_method, resort_type_method_vec,
73         finish_struct_methods, struct find_final_overrider_data,
74         dfs_find_final_overrider_pre, find_final_overrider,
75         get_vcall_index, warn_hidden, walk_subobject_offsets,
76         check_methods, fixup_inline_methods, end_of_class,
77         warn_about_ambiguous_bases, finish_struct, build_vtbl_initializer,
78         add_vcall_offset): Adjust.
79         * decl.c (xref_basetypes, finish_method): Adjust.
80         * decl2.c (check_classfn): Adjust.
81         * init.c (sort_mem_initializers, push_base_cleanups): Adjust.
82         * method.c (do_build_copy_constructor): Adjust.
83         * name-lookup.c (new_class_binding, store_binding, 
84         store_bindings, store_class_bindings): Adjust.
85         * name-lookup.h: Define VEC(cxx_saved_binding,gc),
86         VEC(cp_class_binding,gc).
87         (struct cp_binding_level): Adjust.
88         * parser.c: Define VEC(cp_token_position,heap).
89         (struct cp_lexer): Adjust.
90         (cp_lexer_new_main, cp_lexer_new_from_tokens, cp_lexer_destroy,
91         cp_lexer_save_tokens): Adjust.
92         * pt.c (retrieve_specialization,
93         check_explicit_specialization): Adjust.
94         * rtti.c (unemitted_tinfo_decls): Adjust.
95         (init_rtti_processing, get_tinfo_decl, get_pseudo_ti_init,
96         get_pseudo_ti_desc): Adjust.
97         * search.c (dfs_access_in_type, lookup_conversion_operator,
98         lookup_fnfields_1, dfs_walk_once, dfs_walk_once_accessible,
99         dfs_get_pure_virtuals, lookup_conversions_r, binfo_for_vbase): Adjust.
100         * semantics.c: Define VEC(deferred_access,gc).
101         (push_deferring_access_checks): Adjust.
102         * typeck2.c (abstract_virtuals_error): Adjust.
104 2005-04-20  Ian Lance Taylor  <ian@airs.com>
106         * cp-tree.def: Add STMT_EXPR.
107         * cp-tree.h (STMT_EXPR_NO_SCOPE): Define.
108         (STMT_EXPR_STMT): Define.
109         * cxx-pretty-print.c (pp_cxx_primary_expression): Handle
110         STMT_EXPR.
111         (pp_cxx_expression): Likewise.
112         (pp_cxx_statement): Call pp_cxx_statement, not pp_statement.
113         * dump.c (cp_dump_tree): Handle STMT_EXPR.
115 2005-04-18  Kazu Hirata  <kazu@cs.umass.edu>
117         * decl.c (expand_static_init): Call build2 and build3 instead
118         of build.
120         * cp-tree.h (VPTR_NAME, VPTR_NAME_P): Remove.
122 2005-04-17  Ian Lance Taylor  <ian@airs.com>
124         * cp-tree.def: Add SIZEOF_EXPR, ARROW_EXPR and ALIGNOF_EXPR.
125         * cxx-pretty-print.c (pp_cxx_postfix_expression): Handle
126         ARROW_EXPR.
127         (pp_cxx_unary_expression): Handle SIZEOF_EXPR and ALIGNOF_EXPR.
128         (pp_cxx_expression): Handle ARROW_EXPR, SIZEOF_EXPR, and
129         ALIGNOF_EXPR.
130         * typeck.c (cxx_sizeof_or_alignof_type): Update call to
131         c_sizeof_or_alignof_type for change in parameter type.
133 2005-04-16  Mark Mitchell  <mark@codesourcery.com>
135         PR c++/21025
136         * typeck.c (cxx_sizeof_or_alignof_type): Check whether the type to
137         which sizeof/alignof is dependent, rather than just whether we are
138         processing_template_decl.
139         
140 2005-04-17  Kazu Hirata  <kazu@cs.umass.edu>
142         * cp-tree.h (LOOKUP_GLOBAL): Remove.
143         (LOOKUP_ONLYCONVERTING, DIRECT_BIND, LOOKUP_NO_CONVERSION,
144         LOOKUP_DESTRUCTOR, LOOKUP_NO_TEMP_BIND, LOOKUP_PREFER_TYPES,
145         LOOKUP_PREFER_NAMESPACES, LOOKUP_CONSTRUCTOR_CALLABLE): Adjust
146         their values.
148 2005-04-15  Richard Henderson  <rth@redhat.com>
150         PR middle-end/14311
151         * semantics.c (finish_call_expr): Call resolve_overloaded_builtin.
153 2005-04-15  Kazu Hirata  <kazu@cs.umass.edu>
155         * cp-tree.h (lang_type_class): Remove redefined.  Move
156         java_interface into where redefined was.  Increment the width
157         of dummy.
158         (TYPE_REDEFINED): Remove.
160 2005-04-14  Kazu Hirata  <kazu@cs.umass.edu>
162         * cp-tree.h (SET_TMPL_ARG, ENUM_TI_TEMPLATE, ENUM_TI_ARGS,
163         CLASSTYPE_TEMPLATE_LEVEL): Remove.
165 2005-04-11  Mark Mitchell  <mark@codesourcery.com>
167         * decl2.c (determine_visibility): Don't use export_class_data.
168         (import_export_decl): Honor TARGET_CXX_CLASS_DATA_ALWAYS_WEAK and
169         TARGET_CXX_DETERMINE_CLASS_DATA_VISIBILITY. 
171 2005-04-09  Kazu Hirata  <kazu@cs.umass.edu>
173         * cp-tree.h (cxx_alignof): Remove.
175         * cp-tree.h (DECL_ARRAY_DELETE_OPERATOR_P): Remove.
177         * cp-tree.h (EXCEPTION_CLEANUP_NAME, B_SET, B_CLR, B_TST,
178         CONV_STATIC_CAST): Remove.
180         * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Remove.
182         * cp-tree.h (VF_BINFO_VALUE, VF_BASETYPE_VALUE): Remove.
184         * cp-tree.h (cp_deprecated): Remove.
186 2005-04-08  Ian Lance Taylor  <ian@airs.com>
188         * cp-tree.def: Define FOR_STMT, WHILE_STMT, DO_STMT, BREAK_STMT,
189         CONTINUE_STMT, SWITCH_STMT.
190         * cp-tree.h (cp_stmt_codes): Add FOR_STMT, WHILE_STMT, DO_STMT,
191         BREAK_STMT, CONTINUE_STMT, SWITCH_STMT.
192         (WHILE_COND, WHILE_BODY): Define.
193         (DO_COND, DO_BODY): Define.
194         (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY): Define.
195         (SWITCH_STMT_COND, SWITCH_STMT_BODY, SWITCH_STMT_TYPE): Define.
196         * cp-gimplify.c (enum bc_t): Define.
197         (struct cp_gimplify_ctx, ctxp): Define.
198         (push_context, pop_context): New static functions.
199         (begin_bc_block, finish_bc_block): New static functions.
200         (build_bc_goto): New static function.
201         (gimplify_cp_loop, gimplify_for_stmt): New static functions.
202         (gimplify_while_stmt, gimplify_do_stmt): Likewise.
203         (gimplify_switch_stmt): Likewise.
204         (cp_gimplify_expr): Handle FOR_STMT, WHILE_STMT, DO_STMT,
205         SWITCH_STMT, CONTINUE_STMT, BREAK_STMT.
206         (cp_genericize): Call push_context and pop_context.
207         * semantics.c (finish_break_stmt): Just call build_stmt
208         (BREAK_STMT) rather than build_break_stmt.
209         (finish_continue_stmt): Corresponding change.
210         * decl.c (pop_switch): Update call to c_do_switch_warnings for new
211         parameters.
212         * cxx-pretty-print.c (pp_cxx_statement): Handle SWITCH_STMT,
213         WHILE_STMT, DO_STMT, FOR_STMT, BREAK_STMT, CONTINUE_STMT.
214         * dump.c (cp_dump_tree): Likewise.
216 2005-04-08  Mark Mitchell  <mark@codesourcery.com>
218         PR c++/20905
219         * parser.c (cp_parser_type_specifier_seq): Add is_condition
220         parameter.
221         (cp_parser_new_type_id): Pass it.
222         (cp_parser_condition): Likewise.
223         (cp_parser_conversion_type_id): Likewise.
224         (cp_parser_type_id): Likewise.
225         (cp_parser_type_specifier_seq): In a condition, do not allow
226         invalid type-specifier combinations.
227         (cp_parser_exception_declaration): Adjust call to
228         cp_parser_type_specifier_seq. 
230         * cp-tree.def (TINST_LEVEL): Document TINST_IN_SYSTEM_HEADER_P.
231         * cp-tree.h (struct tinst_level): Add in_system_header_p.
232         (TINST_IN_SYSTEM_HEADER_P): New macro.
233         (make_tinst_level): Remove.
234         * pt.c (lookup_template_class): Preserve DECL_IN_SYSTEM_HEADER on
235         the instantiated class.
236         (push_tinst_level): Do not use make_tinst_level.  Set
237         TINST_IN_SYSTEM_HEADER_P.
238         (pop_tinst_level): Likewise.
239         (instantiate_class_template): Set in_system_header.
240         (instantiate_pending_templates): Likewise.
241         * tree.c (make_tinst_level): Remove.
243 2005-04-06  Joseph S. Myers  <joseph@codesourcery.com>
245         * decl.c (start_decl): Apply pending #pragma weak regardless of
246         scope.
248 2005-04-06  Mark Mitchell  <mark@codesourcery.com>
250         PR c++/20212
251         * pt.c (regenerate_decl_from_template): Copy attributes for
252         parameters from the pattern to the instantiation.
254 2005-04-05  Mark Mitchell  <mark@codesourcery.com>
256         PR c++/20734
257         * cp-tree.def (OFFSET_REF): Correct comments.
258         * init.c (build_offset_ref): Remove misleading comment.
259         * typeck.c (build_unary_op): Handle pointer-to-member creation
260         here, rather than ...
261         (unary_complex_lvalue): ... here.
263 2005-04-06  Jason Merrill  <jason@redhat.com>
265         PR c++/19312
266         * tree.c (stabilize_init): Don't bother trying to stabilize
267         something with no side-effects.
269 2005-04-05  Mark Mitchell  <mark@codesourcery.com>
271         PR c++/20763
272         * decl.c (grokdeclarator): Correct attribute handling.
274 2005-04-05  Mark Mitchell  <mark@codesourcery.com>
276         PR c++/19159
277         * decl2.c (import_export_decl): Use non-COMDAT external linkage
278         for virtual tables, typeinfo, etc. that will be emitted in only
279         one translation unit on systems without weak symbols.
281 2005-04-04  Mark Mitchell  <mark@codesourcery.com>
283         PR c++/20679
284         * parser.c (cp_parser_template_name): Fix thinko.
286 2005-04-04  Nathan Sidwell  <nathan@codesourcery.com>
288         PR c++/20746
289         * method.c (use_thunk): Protect covariant pointer return
290         adjustments from NULL pointers.
292 2005-04-04  Jan Hubicka  <jh@suse.cz>
294         * decl2.c (finish_objects): Revert my previous patch.
295         (cp_finish_file): Likewise.
297 2005-04-03  Kazu Hirata  <kazu@cs.umass.edu>
299         * pt.c: Fix comment typos.
301 2005-04-03  Nathan Sidwell  <nathan@codesourcery.com>
303         PR c++/20723
304         * pt.c (more_specialized_fn): Member functions are unordered wrt
305         non-members.  Conversion operators are unordered wrt other
306         functions.
308 2005-04-01  Nathan Sidwell  <nathan@codesourcery.com>
310         * call.c (add_template_candidates_real): Remove length parameter
311         from fn_type_unification call.
312         * class.c (resolve_address_of_overloaded_function): Likewise
313         * cp-tree.h (fn_type_unification): Remove length parameter.
314         * pt.c (get_bindings_overload): Remove.
315         (get_bindings_real): Rename to ...
316         (get_bindings): ... here.  Remove length and strict
317         parameters. Change return type flag to boolean.  Remove original
318         forwarding function.
319         (determine_specialization): Adjust get_bindings call.
320         (fn_type_unification): Remove length parameter.  Adjust.
321         (type_unification_real): Remove length parameter.  Adjust.
322         (resolve_overloaded_unification): Adjust get_bindings call.
323         (try_one_overload): Simplify confusing cascaded if control flow.
324         (unify): Remove length paramter from type_unification_real call.
325         (most_specialized_instantiation): Adjust get_bindings calls.
326         (most_specialized): Likewise.
328 2005-03-31  Nathan Sidwell  <nathan@codesourcery.com>
330         PR c++/19203, implement DR 214
331         * call.c (joust): Use more_specialized_fn.
332         * cp-tree.h (DEDUCE_ORDER): Remove.
333         (more_specialized): Replace with ...
334         (more_specialized_fn): ... this.
335         * pt.c (maybe_adjust_types_for_deduction): Remove DEDUCE_ORDER
336         case.
337         (type_unification_real): Remove DEDUCE_ORDER case.
338         (more_specialized): Replace with ...
339         (more_specialized_fn): ... this.  Implement DR 214.
340         (most_specialized_instantiation): Use get_bindings_real directly.
342 2005-03-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
344         PR c++/18644
345         * call.c (build_new_op): Remove check for -Wsynth.
347 2005-03-31  Jan Hubicka  <jh@suse.cz>
349         * decl2.c (finish_objects): Mark ctor as needed.
350         (cp_finish_file): Output variables only in nonunit-at-a-time.
352 2005-03-29  Richard Henderson  <rth@redhat.com>
354         PR c/20519
355         * decl.c (cp_complete_array_type): Rename from complete_array_type.
356         Use the new complete_array_type in c-common.c.  Update all callers.
357         * cp-tree.h (cp_complete_array_type): Update to match.
359 2005-03-24  Geoffrey Keating  <geoffk@apple.com>
361         * typeck.c (build_static_cast_1): Allow scalar_cast between
362         any integral, floating, or enumeration type.
364 2005-03-24  Steven Bosscher  <stevenb@suse.de>
366         * typeck.c (comptypes): First determine if the types are compatible
367         from a target-independent point of view.  Check target attributes
368         last.
370         * class.c (build_base_path):
371         (build_vbase_offset_vtbl_entries):
372         (add_vcall_offset): Replace fold (buildN (...)) with fold_buildN.
373         * error.c (dump_expr): Likewise.
374         * init.c (build_zero_init, expand_cleanup_for_base,
375         build_vec_delete_1): Likewise.
376         * mangle.c (write_integer_cst): Likewise.
377         * method.c (thunk_adjust): Likewise.
378         * pt.c (convert_nontype_argument, tsubst, unify): Likewise.
379         * tree.c (cxx_print_statistics, array_type_nelts_total): Likewise.
380         * typeck.c (build_ptrmemfunc_access_expr,
381         (get_member_function_from_ptrfunc): Likewise.
383 2005-03-23  Joseph S. Myers  <joseph@codesourcery.com>
385         * cp-objcp-common.h (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
387 2005-03-23  Joseph S. Myers  <joseph@codesourcery.com>
389         * cp-tree.h (perform_integral_promotions): Remove.
390         (default_conversion): Add.
392 2005-03-22  Mark Mitchell  <mark@codesourcery.com>
394         * parser.c (cp_parser_warn_min_max): New function.
395         (cp_parser_binary_expression): Use it.
396         (cp_parser_assignment_operator_opt): Likewise.
397         (cp_parser_operator): Likewise.
399 2005-03-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
401         PR c++/19980
402         * decl.c (start_preparsed_function): Robustify.
404 2005-03-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
406         PR c++/20499
407         * parser.c (cp_parser_class_head): Return NULL_TREE when
408         encountering a redefinition.
410 2005-03-22  Nathan Sidwell  <nathan@codesourcery.com>
412         PR c++/20465
413         PR c++/20381
414         * typeck.c (build_ptrmemfunc): Allow OFFSET_REF when processing a
415         template.
417 2005-03-21  Paolo Carlini  <pcarlini@suse.de>
419         PR c++/20461
420         PR c++/20536
421         * init.c (emit_mem_initializers): Don't crash on undefined
422         types.
424 2005-03-21  Paolo Carlini  <pcarlini@suse.de>
426         PR c++/20147
427         * semantics.c (finish_stmt_expr_expr): Return immediately
428         if error_operand_p (expr).
430 2005-03-21  Joseph S. Myers  <joseph@codesourcery.com>
432         * cp-tree.h (lvalue_or_else, lvalue_p): New.
433         * typeck.c (lvalue_or_else): New.  Call lvalue_error.
435 2005-03-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
437         PR c++/20240
438         * decl.c (decls_match): Compare context of VAR_DECL.
440 2005-03-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
442         PR c++/20333
443         * parser.c (cp_parser_postfix_expression) <case RID_TYPENAME>:
444         Check the return value of cp_parser_nested_name_specifier.
446 2005-03-18  Dale Johannesen <dalej@apple.com>
448         * cp/tree.c (cp_tree_equal):  Handle SSA_NAME.
450 2005-03-18  Paolo Carlini  <pcarlini@suse.de>
452         PR c++/20463
453         * parser.c (cp_parser_diagnose_invalid_type_name):
454         Check TYPE_BINFO (current_class_type) before attempting
455         to emit inform messages.
457 2005-03-17  Paolo Carlini  <pcarlini@suse.de>
459         PR c++/19966
460         * cp-tree.h (grok_op_properties): Change return type to void.
461         * decl.c (grok_op_properties): Return early - don't check the
462         arity - in case of a static member or an operator that cannot
463         be non-member; tidy a bit.
465 2005-03-17  Nathan Sidwell  <nathan@codesourcery.com>
467         PR c++/20186
468         * pt.c (contains_dependent_cast_p): Remove.
469         (fold_non_dependent_expr): Don't use it.
470         (value_dependent_expression_p): Use a switch statement.
471         reference_exprs can be dependent.
473 2005-03-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
475         PR c++/4403
476         PR c++/9783, DR433
477         * name-lookup.c (pushtag): Skip template parameter scope when
478         scope is ts_global.  Don't push tag into template parameter
479         scope.
480         * pt.c (instantiate_class_template): Reorder friend class
481         template substitution to handle non-dependent friend class
482         that hasn't been previously declared.
484 2005-03-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
486         Friend class name lookup 5/n
487         PR c++/1016
488         * cp-tree.h (pushtag): Adjust declaration.
489         * decl.c (lookup_and_check_tag): Call lookup_type_scope if
490         lookup_name fails.
491         (xref_tag): Adjust call to pushtag.  Make hidden class visible.
492         (start_enum): Adjust call to pushtag.
493         * name-lookup.c (ambiguous_decl): Ignore hidden names.
494         (qualify_lookup): Change return type to bool.
495         (hidden_name_p): New function.
496         (lookup_namespace_name, unqualified_namespace_lookup,
497         lookup_name_real): Use it.
498         (lookup_type_scope): Update comments.
499         (maybe_process_template_type_declaration): Change parameter name
500         from globalize to is_friend.
501         (pushtag): Change globalize parameter of type int to tag_scope.
502         Hide name if introduced by friend declaration.
503         * name-lookup.h (hidden_name_p): Add declaration.
504         * parser.c (cp_parser_lookup_name): Don't deal with hidden name
505         here.
506         * pt.c (push_template_decl_real): Make hidden class template
507         visible.
508         (lookup_template_class, instantiate_class_template): Adjust call
509         to pushtag.
510         * semantics.c (begin_class_definition): Likewise.
511         * rtti.c (init_rtti_processing, build_dynamic_cast_1, 
512         tinfo_base_init, emit_support_tinfos): Use ts_current instead of
513         ts_global.
515 2005-03-13  Mark Mitchell  <mark@codesourcery.com>
517         PR c++/20157
518         * pt.c (determine_specialization): Reject non-specializations. 
520 2005-03-11  Per Bothner  <per@bothner.com>
522         * cp-tree.h (struct cp_declarator): New id_loc field.
523         * cp/parser.c (cp_lexer_get_preprocessor_token): Set cp_token's
524         location using c_lex_with_flags, instead of input_location.
525         (cp_parser_direct_declarator): Set declarator's id_loc from
526         cp_token's id_loc.
528 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
530         PR c++/18384, c++/18327
531         * decl.c (reshape_init_array): Use UHWI type for max_index_cst
532         and index.  Convert max_index to size_type_node if it isn't
533         host_integerp (, 1).
535 2005-03-09  Mark Mitchell  <mark@codesourcery.com>
537         PR c++/20208
538         * pt.c (tsubst_decl): Apply array-to-pointer and
539         function-to-pointer conversions to function arguments.
540         (regenerate_decl_from_template): Likewise.
542 2005-03-09  Paolo Carlini  <pcarlini@suse.de>
544         PR c++/16859    
545         * decl.c (complete_array_type): In pedantic mode, return
546         3 for an empty initializer list as the initializer for an
547         array of unknown bound (8.5.1/4).
548         (maybe_deduce_size_from_array_init): Fix final test to use
549         the above.
551 2005-03-08  Nathan Sidwell  <nathan@codesourcery.com>
553         PR c++/20186
554         * pt.c (contains_dependent_cast_p): New.
555         (fold_non_dependent_expr): Call it.
557 2005-03-08  Mark Mitchell  <mark@codesourcery.com>
559         PR c++/20142
560         * cp-tree.h (target_type): Remove.
561         * decl.c (layout_var_decl): Remove #if 0'd code.
562         (cp_finish_decl): Remove dead code.
563         * init.c (build_vec_init): When determining whether or not the
564         element type has an asignment operator, look through all array
565         dimensions. 
566         * typeck.c (target_type): Remove.
568 2005-03-07  Mark Mitchell  <mark@codesourcery.com>
570         * class.c (finish_struct_1): Do not warn about non-virtual
571         destructors in Java classes.
573 2005-03-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
575         PR c++/19311
576         * init.c (build_offset_ref): Don't build non-dependent SCOPE_REF.
577         * pt.c (build_non_dependent_expr): Don't build NON_DEPENDENT_EXPR
578         for OFFSET_TYPE.
579         * typeck.c (build_x_unary_op): Don't build non-dependent SCOPE_REF.
580         Also set PTRMEM_OK_P for NON_DEPENDENT_EXPR.
581         (build_unary_op): Handle building ADDR_EXPR of OFFSET_REF inside
582         template.
584 2005-03-02  Alexandre Oliva  <aoliva@redhat.com>
586         * name-lookup.c (push_overloaded_decl): Don't error if the new
587         decl matches the old one.
588         * decl.c (redeclaration_error_message): Likewise.
590 2005-03-01  Per Bothner  <per@bothner.com>
592         * decl.c (finish_function): Use SET_EXPR_LOCATION instead of
593         unavailable annotate_with_file_line, if USE_MAPPED_LOCATION.
595 2005-03-01  Nathan Sidwell  <nathan@codesourcery.com>
597         PR c++/20232
598         * class.c (update_vtable_entry_for_fn): Don't crash on invalid
599         covariancy. 
601         * cp-tree.g (THUNK_TARGET): Expand comment.
602         * method.c (use_thunk): Make sure we also use the target, if that
603         is a thunk.
605 2005-02-27  Jakub Jelinek  <jakub@redhat.com>
607         PR c++/20206
608         * decl.c (cxx_comdat_group): Put thunks for
609         TARGET_USE_LOCAL_THUNK_ALIAS_P (function) functions into the same
610         comdat group as the thunk target.
612 2005-02-24  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
614         * call.c, class.c, cp-tree.h, decl2.c, error.c, init.c, mangle.c,
615         parser.c: Fix comment typo(s).
617 2005-02-24  Jakub Jelinek  <jakub@redhat.com>
619         PR c++/20175
620         * decl.c (reshape_init): Don't warn about missing braces if STRING_CST
621         initializes a char/wchar_t array.
623 2005-02-23  Mark Mitchell  <mark@codesourcery.com>
625         PR c++/19878
626         * decl.c (grokvardecl): Set DECL_INTERFACE_KNOWN for declarations
627         with internal linkage.
629 2005-02-23  Alexandre Oliva  <aoliva@redhat.com>
631         * decl.c (grokvardecl): Don't exempt anonymous types from having
632         linkage for variables that have linkage other than "C".
634 2005-02-23  Kazu Hirata  <kazu@cs.umass.edu>
636         * cp-objcp-common.h, error.c: Update copyright.
638 2005-02-22  Mark Mitchell  <mark@codesourcery.com>
640         PR c++/20073
641         * decl.c (start_decl_1): Don't clear TREE_READONLY.
642         (cp_finish_decl): Likewise.
643         (complete_vars): Call cp_apply_type_quals_to_decl.
644         * typeck.c (cp_apply_type_quals): Avoid setting TREE_READONLY in
645         cases where that's not valid.
647         PR c++/19991
648         * init.c (integral_constant_value): Iterate if the value of a decl
649         is itself a constant.
651         PR c++/20152
652         * parser.c (cp_parser_class_head): Check for redefintions here.
653         * semantics.c (begin_class_definition): Not here.
654         
655         PR c++/20153
656         * decl2.c (build_anon_union_vars): Add type parameter.
657         (finish_anon_union): Pass it.
659         PR c++/20148
660         * error.c (dump_expr): Do not print the body of a BIND_EXPR.
661         Handle STATEMENT_LIST.
663         PR c++/19883
664         * parser.c (cp_parser_direct_declarator): Always complain about
665         non-constant array bounds when in a function scope.
666         * semantics.c (finish_id_expression): Do not mark dependent names
667         as non-constant. 
669 2005-02-21  Douglas Gregor  <dgregor@cs.indiana.edu>
670         
671         PR c++/19076
672         PR c++/6628
673         * cp-tree.h (cp_apply_type_quals_to_decl): Declared.
674         * decl.c (grokdeclarator): Pedwarn about qualifying a function
675         type. 
676         Add qualifiers when declaring a typedef of a function type.
677         Member function pointers pick up the qualifiers of the typedef
678         used to declare them.
679         Don't complain about creating cv-qualified function types.
680         Complain about qualified function typedefs that are used to
681         declare non-static member functions or free functions.
682         Use cp_apply_type_quals_to_decl.
683         (start_preparsed_function): Use cp_apply_type_quals_to_decl.
684         (grokclassfn): Use cp_apply_type_quals_to_decl.
685         * error.c (dump_type_suffix): Print qualifiers for function
686         types. 
687         * pt.c (tsubst_decl): Use cp_apply_type_quals_to_decl.
688         (tsubst): When substituting a function type into a member
689         pointer type, pass along the qualifiers.
690         (unify): Unify member pointers to member function pointers.
691         * tree.c (cp_build_qualified_type_real): Function types may be
692         qualified. This includes restrict qualifiers.
693         * typeck.c (cp_apply_type_quals_to_decl): New function to replace
694         use of c_apply_type_quals_to_decl. Drops qualifiers that are being
695         added to function types.
697 2005-02-20  Zack Weinberg  <zack@codesourcery.com>
699         PR 18785
700         * cp-objcp-common.h (LANG_HOOKS_TO_TARGET_CHARSET): Set to
701         c_common_to_target_charset.  Delete bogus comment.
703 2005-02-18  Richard Henderson  <rth@redhat.com>
705         PR libstdc++/10606
706         * except.c (do_get_exception_ptr): New.
707         (expand_start_catch_block): Use it.
709 2005-02-19  Jakub Jelinek  <jakub@redhat.com>
711         * decl.c (start_decl_1): Only check TYPE_NEEDS_CONSTRUCTING
712         if type is not error_mark_node.
714 2005-01-20  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
716         PR c++/19508
717         * decl2.c (grokfield): Do not apply attributes to template parameters
718         as they are ignored by tsubst anyway.
720 2005-02-18  Jakub Jelinek  <jakub@redhat.com>
722         PR c++/19813
723         * decl.c (start_decl_1): Clear TREE_READONLY flag if
724         its type has TYPE_NEEDS_CONSTRUCTING.
725         (complete_vars): Likewise.
727 2005-02-17  Alexandre Oliva  <aoliva@redhat.com>
729         PR c++/20028
730         * class.c (finish_struct): Initialize TYPE_SIZE_UNIT of a
731         template along with TYPE_SIZE.
733         PR c++/20022
734         * semantics.c (perform_deferred_access_checks): Use
735         get_deferred_access_checks to get the top of the stack.
737 2005-02-15  Alexandre Oliva  <aoliva@redhat.com>
739         PR c++/17788
740         * class.c (add_implicitly_declared_members, check_field_decl)
741         (check_field_decls, check_bases): Remove arguments, tests and
742         assignments of cant_have_default_ctor-related variables.
744 2005-02-15  Alexandre Oliva  <aoliva@redhat.com>
746         * decl2.c (mark_used): Set the source location of the used decl to
747         the current input location here...
748         * method.c (synthesize_method): ... not here.  Set input_location
749         from the decl instead.
751 2005-02-14  Nathan Sidwell  <nathan@codesourcery.com>
753         PR c++/19608
754         * parser.c (cp_parser_late_parsing_for_member): Use
755         current_function_decl as scope to push to and from.
757         PR c++/19884
758         * pt.c (check_explicit_specialization): Make sure namespace
759         binding lookup found an overloaded function.
760         (lookup_template_function): Just assert FNS is an overloaded
761         function.
763         PR c++/19895
764         * decl.c (grokdeclarator): Check for error mark node in ptrmem
765         construction.
767 2005-02-14  Alexandre Oliva  <aoliva@redhat.com>
769         PR c++/17816
770         * decl.c (redeclaration_error_message): Report redefinition of
771         pure virtual function.
773 2005-02-14  Nathan Sidwell  <nathan@codesourcery.com>
775         PR c++/19891
776         * class.c (build_simple_base_path): Build the component_ref
777         directly.
778         (update_vtable_entry_for_fn): Walk the covariant's binfo chain
779         rather than using lookup_base.
780         * search.c (dfs_walk_once): Add non-recursive assert check.
781         * typeck.c (build_class_member_access_expr): It is possible for
782         the member type to be both const and volatile.
784 2005-02-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
786         PR c++/14479
787         PR c++/19487
788         * pt.c (maybe_check_template_type): Remove.
789         * cp-tree.h (maybe_check_template_type): Remove prototype.
790         * name-lookup.c (maybe_process_template_type_declaration): Don't
791         use maybe_check_template_type.
793 2005-02-11  Richard Henderson  <rth@redhat.com>
795         PR c++/19632
796         * pt.c (get_mostly_instantiated_function_type): Save and restore
797         flag_access_control instead of push/pop_access_scope.
799 2005-02-10  Mark Mitchell  <mark@codesourcery.com>
801         PR c++/19755
802         * decl.c (reshape_init): Issue warnings about missing braces.
804 2005-02-11  Kazu Hirata  <kazu@cs.umass.edu>
806         * cp-tree.def, except.c, ptree.c: Update copyright.
808 2005-02-09  Mark Mitchell  <mark@codesourcery.com>
810         PR c++/19811
811         * call.c (build_op_delete_call): Check COMPLETE_TYPE_P before
812         attempting name lookup.
814         * parser.c (cp_parser_unqualified_id): Initialize type_decl.
816         PR c++/19787
817         * call.c (initialize_reference): Robustify.
819         PR ++/19732
820         * decl.c (grokdeclarator): Check for invalid use of destructor
821         names.
823         PR c++/19762
824         * parser.c (cp_parser_unqualified_id): Avoid creating destructor
825         names with invalid types.
827         PR c++/19826
828         * parser.c (cp_parser_direct_declarator): Allow type-dependent
829         expressions as array bounds.
831         PR c++/19739
832         * parser.c (cp_parser_attributes_list): Allow empty lists.
834 2005-02-08  Mark Mitchell  <mark@codesourcery.com>
836         PR c++/19733
837         * class.c (add_method): Don't set TYPE_HAS_DESTRUCTOR.
838         (check_bases): Give warnings about a base class with a
839         non-virtual destructor, even if it is implicit.
840         (finish_struct_bits): Don't copy TYPE_HAS_DESTRUCTOR.
841         (maybe_warn_about_overly_private_class): Don't use
842         TYPE_HAS_DESTRUCTOR.
843         (finish_struct_methods): Don't set TYPE_HAS_DESTRUCTOR.
844         (check_for_override): Give it external linkage.
845         (add_implicitly_declared_members): Generate destructors lazily.
846         (check_field_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not
847         TYPE_HAS_DESTRUCTOR.
848         (check_bases_and_members): Call check_methods before
849         check_field_decls.
850         (check_bases_and_members): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not
851         TYPE_HAS_DESTRUCTOR.
852         (finish_struct_1): Do not use TYPE_HAS_DESTRUCTOR.
853         * cp-tree.def (PSEUDO_DTOR_EXPR): Document.
854         * cp-tree.h (TYPE_HAS_DESTRUCTOR): Remove.
855         (lang_type_class): Add lazy_destructor.
856         (CLASSTYPE_LAZY_DESTRUCTOR): New macro.
857         (CLASSTYPE_DESTRUCTORS): Robustify.
858         (TYPE_HAS_DESTRUCTOR): Remove.
859         (check_for_override): Declare.
860         (build_vbase_delete): Remove.
861         * cvt.c (convert_to_void): Issue errors about pseudo-destructor
862         expressions.
863         * decl.c (cxx_maybe_build_cleanup): Remove dead code.
864         * except.c (dtor_nothrow): Lazily create destructors if necessary.
865         (build_throw): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
866         * init.c (build_delete): Lazily create destructors, if necessary.
867         (build_vbase_delete): Remove.
868         * method.c (locate_dtor): Simplify.
869         (implicitly_declare_fn): Add support for destructors.
870         * parser.c (cp_parser_lookup_name): Lazily create destructors, if
871         necessary.
872         * pt.c (check_explicit_specialization): Don't use
873         TYPE_HAS_DESTRUCTOR.
874         (instantiate_class_template): Likewise.
875         * ptree.c (cxx_print_type): Don't print TYPE_HAS_DESTRUCTOR.
876         * rtti.c (emit_support_tinfos): Robustify.
877         * search.c (lookup_fnfields_1): Lazily create destructors.
878         * typeck.c (build_class_member_access_expr): Remove
879         PSEUDO_DTOR_EXPR handling.
880         (lookup_destructor): Likewise.
882 2005-02-08  Kazu Hirata  <kazu@cs.umass.edu>
884         * cxx-pretty-print.c, cxx-pretty-print.h, decl.h: Update
885         copyright.
887 2005-02-07  Mark Mitchell  <mark@codesourcery.com>
889         * parser.c (cp_lexer_start_debugging): Avoid arithmetic operations
890         on boolean variables.
891         (cp_lexer_stop_debugging): Likewise.
893 2005-02-03  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
895         PR c++/17401
896         * parser.c (cp_parser_pure_specifier): Emit a specific error
897         message with an invalid pure specifier.
898         * decl2.c (grok_function_init): Remove.
899         (grokfield): An initializer for a method is a always a pure
900         specifier.
902 2005-02-02  Matt Austern  <austern@apple.com>
904         PR c++/19628
905         * cp-tree.h (builtin_valid_in_constant_expr_p): Declare.
906         * parser.c (cp_parser_postfix_expression): Accept function call in
907         constant expression if builtin_valid_in_constant_expr_p is true
908         for that function.
909         * pt.c (value_dependent_expression_p): Handle CALL_EXPRs properly.
910         * semantics.c (finish_id_expression): Accept function call in constant
911         expression if builtin_valid_in_constant_expr_p is true for that
912         function.
913         * tree.c (builtin_valid_in_constant_expr_p): New.
915 2005-02-02  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
917         PR c++/17413
918         * pt.c (check_instantiated_args): Improve error message.
919         Fix logic when to print its second part.
921 2005-02-02  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
923         * cp-tree.h (complete_type_or_else): Remove macro.
924         (complete_type_or_diagnostic): Rename to complete_type_or_else
925         and remove last argument.
926         * typeck.c (complete_type_or_diagnostic): Rename to
927         complete_type_or_else and remove last argument.
929 2005-02-02  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
931         * cp-tree.h (commonparms): Remove prototype.
932         (convert_arguments): Likewise.
933         (PFN_FROM_PTRMEMFUNC): Remove.
934         * typeck.c (commonparms): Make static.
935         (convert_arguments): Add prototype. Make static.
936         (PFN_FROM_PTRMEMFUNC): Replace by pfn_from_ptrmemfunc.
938 2005-01-31  Mark Mitchell  <mark@codesourcery.com>
940         * parser.c (cp_parser_primary_expression): Don't complain about
941         floating-point literals in integral constant expressions when
942         !pedantic.
944 2005-02-01  Alexandre Oliva  <aoliva@redhat.com>
946         * parser.c (cp_parser_template_id): Revert comment patch too.
948         PR c++/18757
949         PR c++/19366
950         PR c++/19499
951         * parser.c (cp_parser_template_id): Revert 2004-12-09's patch.
952         Issue an error when creating the template id.
953         * pt.c (fn_type_unification): Return early if the explicit
954         template arg list is an error_mark_node.
956 2005-01-31  Mark Mitchell  <mark@codesourcery.com>
958         * decl.c (build_enumerator): Do not issue duplicate error messages
959         about invalid enumeration constants.
960         * parser.c (cp_parser_non_integral_constant_expression): Always
961         set parser->non_integral_constant_expression_p.
962         (cp_parser_primary_expression): Add cast_p parameter.  Issue
963         errors about invalid uses of floating-point literals in
964         cast-expressions.
965         (cp_parser_postfix_expression): Add cast_p parameter.
966         (cp_parser_open_square_expression): Pass it.
967         (cp_parser_parenthesized_expression_list): Add cast_p parameter.
968         (cp_parser_unary_expression): Likewise.
969         (cp_parser_new_placement): Pass it.
970         (cp_parser_direct_new_declarator): Likewise.
971         (cp_parser_new_initializer): Likewise.
972         (cp_parser_cast_expression): Add cast_p parameter.
973         (cp_parser_binary_expression): Likewise.
974         (cp_parser_question_colon_clause): Likewise.
975         (cp_parser_assignment_expression): Likewise.
976         (cp_parser_expression): Likewise.
977         (cp_parser_constant_expression): If an integral constant
978         expression is invalid, return error_mark_node.
979         (cp_parser_expression_statement): Pass cast_p.
980         (cp_parser_condition): Likewise.
981         (cp_parser_iteration_statement): Likewise.
982         (cp_parser_jump_statement): Likewise.
983         (cp_parser_mem_initializer): Likewise.
984         (cp_parser_template_argument): Likewise.
985         (cp_parser_parameter_declaration): Likewise.
986         (cp_parser_initializer): Likewise.
987         (cp_parser_throw_expression): Likewise.
988         (cp_parser_attribute_list): Likewise.
989         (cp_parser_simple_cast_expression): Likewise.
990         (cp_parser_functional_cast): Likewise.
991         (cp_parser_late_parsing_default_args): Likewise.
992         (cp_parser_sizeof_operand): Save/restore
993         non_integral_constant_expression_p.
995 2005-01-31  Mike Stump  <mrs@apple.com>
997         * parser.c (cp_lexer_new_main): Get the first token, first, before
998         doing anything.
1000 2005-01-31  Mark Mitchell  <mark@codesourcery.com>
1002         * decl.c (start_decl): Add missing parentheses.
1004 2005-01-30  Mark Mitchell  <mark@codesourcery.com>
1006         PR c++/19555
1007         * cp-tree.h (DECL_USE_TEMPLATE): Expand documentation.
1008         * decl.c (duplicate_decls): Do not discard
1009         DECL_IMPLICIT_INSTANTIATION when merging declarations.
1010         (start_decl): Do not SET_DECL_TEMPLATE_SPECIALIZATION for
1011         variables that do not have DECL_USE_TEMPLATE.
1013         PR c++/19395
1014         * decl.c (grokdeclarator): Refactor code so that qualified names
1015         are never allowed as the declarator in a typedef.
1017         PR c++/19367
1018         * name-lookup.c (do_nonmember_using_decl): Avoid overloading
1019         builtin declarations.
1021         PR c++/19457
1022         * call.c (convert_like_real): Inline call to
1023         dubious_conversion_warnings here.
1024         * cp-tree.h (dubious_conversion_warnings): Remove.
1025         * semantics.c (finish_unary_op_expr): Copy INTEGER_CSTs before
1026         setting TREE_NEGATED_INT.
1027         * typeck.c (dubious_conversion_warnings): Remove.
1029         PR c++/19349
1030         * name-lookup.c (pushdecl_namespace_level): Avoid accessing free'd
1031         memory.
1033 2005-01-28  Mark Mitchell  <mark@codesourcery.com>
1035         PR c++/19253
1036         * parser.c (cp_parser_diagnose_invalid_type_name): Commit to
1037         tentative parses.
1039         PR c++/19667
1040         * pt.c (redeclare_class_template): Robustify.
1042 2005-01-27  Steven Bosscher  <stevenb@suse.de>
1044         * decl.c (finish_case_label): Use SWITCH_STMT accessor macros
1045         instead of SWITCH_EXPR ones.
1046         * pt.c (tsubst_expr): Likewise.
1047         * semantics.c (begin_switch_stmt, finish_switch_cond,
1048         finish_switch_stmt): Likewise.
1050 2005-01-26  J"orn Rennecke <joern.rennecke@st.com>
1052         PR c++/18370
1053         * parser.c (cp_parser_initializer_clause): Initialize *non_constant_p.
1055 2005-01-25  Andrew Pinski  <pinskia@physics.uc.edu>
1057         * class.c (abort_fndecl_addr): New variable.
1058         (build_vtbl_initializer): If we have a pure virtual function
1059         share the abort function's address.
1060         Include gt-cp-class.h at the end.
1061         * config-lang.in (gtfiles): Add cp/class.c.
1063 2005-01-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1065         * cxx-pretty-print.c (pp_cxx_statement): Add prototype. Make static.
1066         (pp_cxx_function_definition): Make static.
1067         * cxx-pretty-print.h (pp_cxx_statement): Remove prototype.
1068         (pp_cxx_function_definition): Likewise.
1070 2005-01-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1072         * name-lookup.c (print_binding_level): Make static.
1073         (constructor_name_full): Make static inline.
1074         (current_decl_namespace): Make static.
1075         * name-lookup.h (constructor_name_full): Remove prototype.
1076         (print_binding_level): Likewise.
1077         (current_decl_namespace): Likewise.
1079 2005-01-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1081         * decl.h (debug_bindings_indentation): Remove.
1083 2005-01-23  Kazu Hirata  <kazu@cs.umass.edu>
1085         * typeck.c: Fix a comment typo.
1087 2005-01-21  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1089         PR c++/19208
1090         * pt.c (fold_decl_constant_value): Always call fold_non_dependent_expr
1091         at least once.
1092         (tsubst): Use fold_decl_constant_value in place of a bare call to
1093         integral_constant_value.
1095 2005-01-20  Kazu Hirata  <kazu@cs.umass.edu>
1097         * typeck.c (more_qualified_p): Remove.
1098         * cp-tree.h: Remove the corresponding prototype.
1100 2005-01-19  Matt Austern  <austern@apple.com>
1102         * typeck.c (comptypes): Handle return code from objc_comptypes
1103         correctly.
1105 2005-01-19  Kazu Hirata  <kazu@cs.umass.edu>
1107         * cp-tree.h, name-lookup.h: Remove unused prototypes.
1109 2005-01-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1111         PR c++/19375
1112         * semantics.c (finish_id_expression): Disable access checking for
1113         already lookuped FIELD_DECL.
1115 2005-01-18  Kazu Hirata  <kazu@cs.umass.edu>
1117         * decl.c (delete_block): Remove.
1118         * cp-tree.h: Remove the corresponding prototype.
1120         * decl.c (vtable_decl_p, vtype_decl_p, walk_globals_data,
1121         walk_vtables_r, walk_vtables, walk_globals_r, walk_globals):
1122         Remove.
1123         * cp-tree.h: Remove the corresponding prototypes.
1125         * tree.c (count_functions, bound_pmf_p, cp_is_overload_p,
1126         cp_update_decl_after_saving, name_p): Remove.
1127         * cp-tree.h: Remove the corresponding prototypes.
1129 2005-01-18  Andrew Pinski  <pinskia@physics.uc.edu>
1131         PR c/19472
1132         * semantics.c (finish_asm_stmt): Strip nops off
1133         input memory operands.
1135 2005-01-18  Kazu Hirata  <kazu@cs.umass.edu>
1137         * Make-lang.in, call.c, cvt.c, init.c, rtti.c, tree.c,
1138         typeck2.c: Update copyright.
1140 2005-01-16  Kazu Hirata  <kazu@cs.umass.edu>
1142         * class.c (get_enclosing_class): Remove.
1143         * cp-tree.h: Remove the corresponding prototypes.
1145         * cvt.c (convert_lvalue): Remove.
1146         * cp-tree.h: Remove the corresponding prototype.
1148         * pt.c (tinst_for_decl): Remove.
1149         * cp-tree.h: Remove the corresponding prototypes.
1151         * tree.c (hash_chainon): Remove.
1152         * cp-tree.h: Remove the corresponding prototypes.
1154 2005-01-15  Jakub Jelinek  <jakub@redhat.com>
1156         PR c++/19263
1157         * typeck2.c (split_nonconstant_init_1) <case VECTOR_TYPE>: Put a copy
1158         of CONSTRUCTOR's node into MODIFY_EXPR, as the original is modified.
1160 2005-01-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1162         * Make-lang.in (cp-warn): Don't append $(WERROR).
1164 2005-01-10  Kazu Hirata  <kazu@cs.umass.edu>
1166         * cp-tree.h: Fix a comment typo.
1168 2005-01-07  Nathan Sidwell  <nathan@codesourcery.com>
1170         PR c++/19298
1171         * pt.c (tsubst_qualified_id): Call convert_from_reference.
1173 2005-01-06  Mark Mitchell  <mark@codesourcery.com>
1175         PR c++/19244
1176         * class.c (add_implicitly_declared_members): Remove dead code.
1177         * decl.c (grokfndecl): Add sfk parameter.  Use it do set
1178         DECL_CONSTRUCTOR_P.
1179         (grokdeclarator): Adjust calls to grokfndecl.
1180         * method.c (implicitly_declare_fn): Improve documentation.
1181         * parser.c (cp_parser_direct_declarator): Do not consider a
1182         function to be a constructor if the containing class was
1183         originally anonymous.
1185 2005-01-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1187         PR c++/17154
1188         * search.c (lookup_field_1): Handle using declaration in
1189         class template partial specialization.
1191 2005-01-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1193         PR c++/19258
1194         * pt.c (push_access_scope): Handle friend defined in class.
1195         (pop_access_scope): Likewise.
1197 2005-01-06  Nathan Sidwell  <nathan@codesourcery.com>
1199         PR c++/19270
1200         * pt.c (tsubst_copy) <ARRAY_REF case>: Handle separately.
1201         (tsubst_copy_and_build) <ARRAY_REF case>: Remove obsolete
1202         array-new handling code.  Use build_x_binary_op.
1204 2005-01-05  Nathan Sidwell  <nathan@codesourcery.com>
1206         PR c++/19030
1207         * cp-tree.h (start_decl): Take pointer to pushed scope, not bool.
1208         * name-lookup.h (push_scope): Return pushed scope, not flag.
1209         * name-lookup.c (push_scope): Return scope that should be popped,
1210         not a flag.
1211         * decl.c (start_decl): Adjust.
1212         (grokfndecl): Adjust scope push and pop.
1213         * decl2.c (check_classfn): Likewise.
1214         * parser.c (cp_parser_condition, cp_parser_conversion_function_id,
1215         cp_parser_init_declarator, cp_parser_direct_declarator,
1216         cp_parser_class_specifier, cp_parser_class_head,
1217         cp_parser_lookup_name,
1218         cp_parser_constructor_declarator_p): Likewise.
1219         * pt.c (instantiate_class_template,
1220         resolve_typename_type): Likewise.
1222 2005-01-03  Volker Reichelt  <reichelt@igpm.rwth-aaachen.de>
1224         PR c++/14136
1225         * parser.c (cp_parser_unqualified_id): Do not issue error message
1226         for typedef-name as destructor declarator when performing an
1227         uncommitted tentative parse.
1229 2005-01-01  Steven Bosscher  <stevenb@suse.de>
1231         PR middle-end/17544
1232         * decl.c (finish_function): Fix comment.  Annotate the compiler
1233         generated return with the current file name and line 0.
1235 2004-12-31  Richard Henderson  <rth@redhat.com>
1237         PR middle-end/17799
1238         * call.c (make_temporary_var_for_ref_to_temp): Set DECL_IGNORED_P.
1239         * class.c (build_vtable): Don't conditionallize setting it
1240         based on DWARF2_DEBUG.
1241         (layout_class_type): Set DECL_IGNORED_P.
1242         * decl2.c (get_guard): Likewise.
1243         * rtti.c (get_tinfo_decl, build_lang_decl): Likewise.
1244         * tree.c (build_local_temp): Likewise.
1246 2004-12-30  Mark Mitchell  <mark@codesourcery.com>
1248         * cp-tree.h (cp_declarator): Split "name" field into
1249         qualifying_scope and unqualified_name.
1250         * decl.c (get_scope_of_declarator): Adjust accordingly.
1251         (grokdeclarator): Likewise.
1252         * decl2.c (grokfield): Likewise, and adjust call to
1253         do_class_using_decl.
1254         * name-lookup.c (do_class_using_decl): Split "decl" into
1255         "scope" and "name".  Remove unnecessary code.
1256         * name-lookup.h (do_class_using_decl): Adjust declaration.
1257         * parser.c (make_id_declarator): Split "id" into qualifying_scope
1258         and unqualified_name.
1259         (cp_parser_using_declaration): Adjust call to do_class_using_decl.
1260         (cp_parser_direct_declarator): Adjust to handle the fact that
1261         cp_parser_declarator_id no longer returns a SCOPE_REF.
1262         (cp_parser_direct_declarator): Likewise.
1263         (cp_parser_declarator_id): Do not create a SCOPE_REF for qualified
1264         names.
1265         (cp_parser_member_declaration): Adjust call to make_id_declarator.
1266         (cp_parser_check_declarator_template_parameters): Do not expect a
1267         SCOPE_REF.
1269         * decl.c (duplicate_decls): Call ggc_free on declarations we will
1270         not be needing any longer.
1272         PR c++/19190
1273         * cvt.c (convert_to_void): Do not use STRIP_NOPs.
1275 2004-12-28  Richard Henderson  <rth@redhat.com>
1277         PR inline-asm/15740
1278         * semantics.c (finish_asm_stmt): Resolve asm names.  Validate input
1279         constraints.  Mark memory inputs addressable.
1281 2004-12-27  Jason Merrill  <jason@redhat.com>
1283         * decl.c (expand_static_init): Don't use shortcut if
1284         targetm.relaxed_ordering.
1286 2004-12-27  Mark Mitchell  <mark@codesourcery.com>
1288         PR c++/19149
1289         * decl.c (check_tag_decl): Robustify.
1291 2004-12-23  Mark Mitchell  <mark@codesourcery.com>
1293         PR c++/17595
1294         * parser.c (cp_parser_error): Issue better messages about
1295         #pragma in locations where it is not permitted.
1297         PR c++/17413
1298         * pt.c (check_instantiated_args): Remove bogus SFINAE code.
1300         * cvt.c (convert_to_void): Fix typo in comment.
1302 2004-12-23  Alexandre Oliva  <aoliva@redhat.com>
1304         PR c++/18962
1305         * pt.c (check_explicit_specialization): Use the argument list from
1306         the definition in a template function specialization definition.
1308 2004-12-23  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1310         PR c++/18733
1311         * pt.c (check_explicit_specialization): Use special logic to validate
1312         befriended specializations.
1314 2004-12-22  Mark Mitchell  <mark@codesourcery.com>
1316         * rtti.c (emit_support_tinfos): Avoid using C99 semantics.
1318         PR c++/18464
1319         * call.c (build_this): In templates, do not bother with
1320         build_unary_op.
1321         * typeck.c (unary_complex_lvalue): In a template, always refuse
1322         simplifications.
1324         PR c++/18492
1325         * cp-gimplify.c (cp_genericize): Relax assertion.
1327         PR c++/11224
1328         * cvt.c (convert_to_void): Warn about unused values.
1330         PR c++/18257
1331         * rtti.c (emit_support_tinfos): On systems without weak symbols,
1332         emit the runtime library type-info objects as non-COMDAT.
1334 2004-12-21  Mark Mitchell  <mark@codesourcery.com>
1336         PR c++/18378
1337         * call.c (convert_like_real): Do not permit the use of a copy
1338         constructor to copy a packed field.
1340         PR c++/19063
1341         * decl.c (grokdeclarator): Return error_mark_node, not
1342         void_type_node, to indicate errors.
1343         * parser.c (cp_parser_template_parameter_list): Robustify.
1344         (cp_parser_template_parameter): Likewise.
1346         PR c++/19034
1347         * tree.c (cp_tree_equal): Handle OVERLOAD.
1349 2004-12-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1351         * decl.c (define_label): Use POP_TIMEVAR_AND_RETURN.
1352         * name-lookup.c (pushdecl_class_level): Likewise.
1354 2004-12-21  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1356         * name-lookup.c (pushtag): Add missing POP_TIMEVAR_AND_RETURN.
1358 2004-12-21  Andrew Pinski  <pinskia@physics.uc.edu>
1360         PR c++/18984
1361         * cp-gimplify.c (cp_genericize_r): Don't insert first but instead
1362         check to see if contains the pointer.  Insert the statement before
1363         returning.
1365 2004-12-21  Nathan Sidwell  <nathan@codesourcery.com>
1367         PR c++/14075
1368         * decl.c (check_initializer): Check string initializer of array is
1369         not parenthesized.
1370         * cp-tree.h (PAREN_STRING_LITERAL_P): New.
1371         * semantics.c (finish_parenthesized_expr): Mark a STRING_CST.
1372         * error.c (dump_expr): <STRING_CST case> Add parens, if needed.
1374         * cp-tree.def (TEMPLATE_TYPE_PARM,
1375         BOUND_TEMPLATE_TEMPLATE_PARM, TYPE_OF_TYPE, TYPENAME_TYPE): Reorder
1376         for better code efficiency.
1377         * cp-tree.h (CLASS_TYPE_P): Short circuit IS_AGGR_TYPE check.
1378         (CAN_HAVE_FULL_LANG_DECL_P): Reorder for better optimization.
1379         (INTEGRAL_CODE_P, CP_INTEGRAL_TYPE_P,
1380         INTEGRAL_OR_ENUMERATION_TYPE_P, SCALAR_TYPE_P,
1381         CP_AGGREGATE_TYPE_P, TYPE_PTROB_P, TYPE_REF_OBJ_P,
1382         TYPE_PTROBV_P): Likewise.
1384         PR c++/18975
1385         * method.c (do_build_copy_constructor): Refactor. Don't const
1386         qualify a mutable field.
1387         (do_build_assign_ref): Likewise.
1389 2004-12-20  Matt Austern <austern@apple.com>
1391         PR c++/19044
1392         * decl.c (make_rtl_for_nonlocal_decl): Use
1393         set_builtin_user_assembler_name.
1395 2004-12-19  Mark Mitchell  <mark@codesourcery.com>
1397         * cp-tree.h (note_decl_for_pch): New function.
1398         * class.c (build_clone): Call note_decl_for_pch.
1399         * semantics.c (finish_member_declaration): Likewise.
1400         (note_decl_for_pch): New function.
1402 2004-12-17  Steven Bosscher  <stevenb@suse.de>
1404         * init.c (build_zero_init): max_index is the number of
1405         elements, minus 1.
1407 2004-12-17  Nathan Sidwell  <nathan@codesourcery.com>
1409         PR c++/18721
1410         * class.c (add_method): Do not push conversion operators into a
1411         binding level.
1413         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE_TYPE): Reformat.
1414         * error.c (dump_decl): <TYPE_DECL case> Remove extraneous braces.
1416 2004-12-16  Nathan Sidwell  <nathan@codesourcery.com>
1418         PR c++/18905
1419         * cp-tree.h (integral_constant_value): Declare.
1420         * call.c (null_ptr_cst_p): Use integral_constant_value, not
1421         decl_constant_value.
1422         (convert_like_real): Likewise.
1423         * class.c (check_bitfield_decl): Likewise.
1424         * cvt.c (ocp_convert): Likewise.
1425         (convert): Remove unnecessary decl_constant_value call.
1426         * decl.c (compute_array_index_type): Use integral_constant_value,
1427         not decl_constant_value.
1428         (build_enumerator): Likewise.
1429         * decl2.c (grokfield): Likewise.
1430         * init.c (decl_constant_value): Simplify.
1431         (integral_constant_value): New.
1432         * pt.c (fold_decl_constant_value): Use integral_constant_value,
1433         remove subsequent check.
1434         (tsubst): Use integral_constant_value, not decl_constant_value.
1435         (tsubst_copy, unify): Likewise.
1436         * typeck.c (decay_conversion): Likewise.
1437         (build_compound_expr): Remove unnecessary decl_constant_value
1438         calls.
1439         (build_static_cast_1, build_reinterpret_cast_1):
1440         (convert_for_assignment): Remove comment about not calling
1441         decl_constant_value.
1443 2004-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1445         PR c++/18825
1446         * pt.c (instantiate_class_template): Set input_location for
1447         friend function.
1448         (tsubst_friend_function): Don't set input_location here.
1449         Make sure the context is complete if necessary.
1451 2004-12-15  Nathan Sidwell  <nathan@codesourcery.com>
1453         PR c++/18981
1454         * parser.c (cp_parser_lookup_name): Remove unneeded TYPENAME_TYPE
1455         flag setting.
1457 2004-12-14  Mark Mitchell  <mark@codesourcery.com>
1459         PR c++/18738
1460         * decl.c (make_typename_type): Do not handle namespace-scoped
1461         names here.
1462         (tag_name): Handle typename_type.
1463         (check_elaborated_type_specifier): Handle typenames.
1464         * parser.c (cp_parser_diagnose_invalid_type_name): Improve
1465         comment.
1466         (cp_parser_elaborated_type_specifier): Use
1467         cp_parser_diagnose_invalid_type_name.
1469 2004-12-14  Andrew Pinski  <pinskia@physics.uc.edu>
1471         PR c++/18965
1472         * init.c (build_zero_init): If the max_index is 0, there is no
1473         need to create a RANGE_EXPR.
1475 2004-12-14  Mark Mitchell  <mark@codesourcery.com>
1477         PR c++/18793
1478         * cp-objcp-common.c (cp_expr_size): Loosen assertion.
1480 2004-12-14  Nathan Sidwell  <nathan@codesourcery.com>
1482         PR c++/18949
1483         * pt.c (tsubst_copy_and_build): <INDIRECT_REF case> Check that a
1484         REFERENCE_REF_P is dereferencing a reference type.
1485         * typeck.c (build_static_cast): Convert from reference even in a
1486         template.
1487         (build_reinterpret_cast, build_const_cast, build_c_cast): Likewise.
1489 2004-12-14  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1491         * parser.c (cp_parser_uncommitted_to_tentative_parse_p): New function.
1492         (cp_parser_name_lookup_error): Use it.
1493         (cp_parser_check_for_invalid_template_id): Likewise.
1494         (cp_parser_skip_to_closing_parenthesis): Likewise.
1495         (cp_parser_nested_name_specifier_opt): Likewise.
1496         (cp_parser_simple_declaration, cp_parser_template_id): Likewise.
1497         (cp_parser_parameter_declaration_list): Likewise.
1498         (cp_parser_parameter_declaration): Likewise.
1499         (cp_parser_template_name): Let cp_parser_simulate_error perform
1500         the checking.
1501         (cp_parser_committed_to_tentative_parse): Remove.
1503 2004-12-13  Andrew Pinski  <pinskia@physics.uc.edu>
1505         PR c++/18968
1506         * class.c (build_base_path): Convert the zero constant to the correct
1507         type when comparing.
1509 2004-12-13  Mark Mitchell  <mark@codesourcery.com>
1511         PR c++/18925
1512         * class.c (layout_class_type): Determine the visibility of static
1513         data members.
1515 2004-12-12  Roger Sayle  <roger@eyesopen.com>
1517         PR middle-end/12454
1518         * cp-gimplify.c (gimplify_if_stmt): Optimize the case where the
1519         condition is a constant and the unexecuted clause is empty.
1521 2004-12-10  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1523         PR c++/18731
1524         * parser.c (cp_parser_class_head): Reject typedef-name in class head.
1526 2004-12-09  Matt Austern  <austern@apple.com>
1528         PR c++/18514
1529         * name-lookup.c (do_nonmember_using_decl): A real function
1530         declaration takes precedence over an anticipated declaration.
1532 2004-12-09  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1534         * parser.c (cp_parser_member_declaration): Fix comment typo.
1536 2004-12-09  Alexandre Oliva  <aoliva@redhat.com>
1538         PR c++/18757
1539         * parser.c (cp_parser_template_id): Don't create a CPP_TEMPLATE_ID
1540         if parsing failed.
1542 2004-12-09  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1544         PR c++/18073
1545         * typeck.c (build_reinterpret_cast_1): Allow cast from vector type.
1547 2004-12-09  Nathan Sidwell  <nathan@codesourcery.com>
1549         PR c++/16681
1550         * init.c (build_zero_init): Build a RANGE_EXPR for an array
1551         initializer.
1553 2004-12-08  Kelley Cook  <kcook@gcc.gnu.org>
1555         * typeck.c: Remove DOS line endings.
1557 2004-12-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1559         PR c++/18100
1560         * decl.c (lookup_and_check_tag): Diagnose nested class with
1561         the same name as enclosing class.
1563 2004-12-08  Nathan Sidwell  <nathan@codesourcery.com>
1565         PR c++/18803
1566         * cp-tree.h (REFERENCE_REF_P): New.
1567         (CPTI_TYPE_INFO_TYPE): Rename to ...
1568         (CPTI_CONST_TYPE_INFO_TYPE): ... here.
1569         (CPTI_TYPE_INFO_REF_TYPE): Remove.
1570         (type_info_type_node): Rename to ...
1571         (const_type_info_type_node): ... here.
1572         (type_info_ref_type): Remove.
1573         * call.c (build_user_type_conversion): Reformat.
1574         (resolve_args): Do not convert_from_reference.
1575         (build_object_call): Call convert_from_reference.
1576         (prep_operand): Do not convert_from_reference.
1577         (build_new_method_call): Likewise.
1578         * class.c (build_vfield_ref): Likewise.
1579         * cvt.c (convert_to_reference): Likewise.
1580         (convert_from_reference): Build INDIRECT_REF here, not with
1581         build_indirect_ref.
1582         (convert_force): Do not convert_from_reference.
1583         (build_expr_type_conversion): Likewise.
1584         * decl.c (grok_reference_init): Likewise.
1585         * decl2.c (delete_sanity): Likewise.
1586         * except.c (initialize_handler_parm): Use POINTER_TYPE_P.
1587         * init.c (build_dtor_call): Do not convert_from_reference.
1588         * parser.c (cp_parser_template_argument): Unwrap indirected
1589         reference. Allow TEMPLATE_PARM_INDEX as an object parm.
1590         * pt.c (tsubst_copy_and_build) <case INDIRECT_REF>: Use
1591         convert_from_reference, if indicated.
1592         <case CALL_EXPR>: Do not convert_from_reference.
1593         <case PARM_DECL, VAR_DECL>: Convert_from_reference if needed.
1594         (tsubst_initializer_list): Do not convert_from_reference.
1595         * rtti.c (init_rtti_processing): Adjust node creation.
1596         (throw_bad_typeid): Use const_type_info_type_node.
1597         Do not convert_from_reference.
1598         (typeid_ok_p): Use const_type_info_type_node.
1599         (build_typeid, get_typeid): Always return type_info typed node.
1600         (build_dynamic_cast_1): Dont convert_from_reference. Refactor.
1601         * semantics.c (finish_stmt_expr_expr): Do not
1602         convert_from_reference.
1603         (finish_id_expression): Convert_from_reference as appropriate.
1604         * typeck.c (decay_conversion): Do not convert_from_reference.
1605         (finish_class_member_access_expr): Likewise.
1606         (build_indirect_ref): Use POINTER_TYPE_P.
1607         (convert_arguments): Do not convert_from_reference.
1608         (build_modify_expr): Likewise.
1609         (convert_for_initialization): Likewise.
1610         * typeck2.c (build_x_arrow): Likewise.
1612 2004-12-07  Ziemowit Laski  <zlaski@apple.com>
1614         * cp-tree.h (struct lang_type_class): Rename 'objc_protocols'
1615         field to 'objc_info'.
1617 2004-12-07  Kazu Hirata  <kazu@cs.umass.edu>
1619         * pt.c: Replace a use of first_rtl_op with TREE_CODE_LENGTH.
1621 2004-12-07  Roger Sayle  <roger@eyesopen.com>
1623         * name-lookup.c (leave_scope): We only need to update
1624         class_binding_level when leaving a class scope.
1626 2004-12-06  Ziemowit Laski  <zlaski@apple.com>
1628         * cp-tree.h (struct lang_type_class): Add 'objc_protocols' field.
1630 2004-12-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1632         PR c++/17011, c++/17971
1633         * pt.c (tsubst_copy) <FIELD_DECL case>: Check and diagnose
1634         invalid field.
1635         (tsubst_copy_and_build) <COMPONENT_REF case>: Check
1636         error_mark_node after member substitution.
1637         * semantics.c (finish_id_expression): Call
1638         finish_non_static_data_member for non-dependent FIELD_DECL.
1640 2004-12-03  Nathan Sidwell  <nathan@codesourcery.com>
1642         PR c++/18782
1643         * decl.c (grokdeclarator): Make sure class in pointer to member is
1644         not a namespace.
1646 2004-12-02  Nathan Sidwell  <nathan@codesourcery.com>
1648         PR c++/18318
1649         * parser.c (cp_parser_new_type_id): Move array size expression
1650         checks from here ...
1651         * init.c (build_new): ... to here.
1653 2004-12-02  Nathan Sidwell  <nathan@codesourcery.com>
1655         PR c++/18758
1656         * parser.c (cp_parser_class_head): Return NULL_TREE when
1657         push_template_decl fails.  Update comment.
1659 2004-12-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1661         PR c++/15664, c++/18276
1662         * pt.c (tsubst_decl) <TEMPLATE_DECL case>: Reorganize.  Correctly
1663         tsubst TEMPLATE_DECL that is a TEMPLATE_TEMPLATE_PARM.
1665 2004-12-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1667         PR c++/18123
1668         * parser.c (cp_parser_type_specifier): Catch template declaration
1669         of enum.
1671 2004-12-01  Matt Austern  <austern@apple.com>
1673         * name-lookup.c (namespace_binding): Omit alias check for global
1674         namespace.
1676 2004-12-01  Nathan Sidwell  <nathan@codesourcery.com>
1678         PR c++/18729
1679         * parser.c (cp_parser_class_name): Check decl's type is not
1680         error_mark_node.
1682         PR c++/17431
1683         * call.c (standard_conversion): Add FLAGS parameter. Do not allow
1684         derived to base conversion when checking constructor
1685         accessibility.
1686         (implicit_conversion): Pass FLAGS to standard_conversion.
1687         (check_constructir_callable): Disallow conversion functions.
1689 2004-11-30  Kazu Hirata  <kazu@cs.umass.edu>
1691         * parser.c: Fix comment typos.
1693 2004-11-27  Mark Mitchell  <mark@codesourcery.com>
1695         PR c++/18368
1696         * parser.c (cp_parser_check_for_definition_in_return_type): Take
1697         the defined type as a parameter, and inform the user about the
1698         possibility of a missing semicolon.
1699         (cp_parser_explicit_instantiation): Adjust call to
1700         cp_parser_check_for_definition_in_return_type.
1701         (cp_parser_init_declarator): Likewise.
1702         (cp_parser_member_declaration): Likewise.
1704         PR c++/18674
1705         * cp-tree.def (TYPENAME_TYPE): Remove discussion of implicit
1706         typename from comments.
1707         * cp-tree.h (TYPENAME_IS_ENUM_P): New macro.
1708         (TYPENAME_IS_CLASS_P): Likewise.
1709         (make_typename_type): Change prototype.
1710         * decl.c (struct_typename_info): New type.
1711         (typename_compare): Expect the second argument to be a
1712         typename_info, not a tree.
1713         (build_typename_type): Add tag_type parameter.  Do not create a
1714         new type until necessary.
1715         (make_typename_type): Add tag_type parameter.
1716         * error.c (TYPENAME_TYPE): Print tags other than "typename" if
1717         appropriate.
1718         * friend.c (make_friend_class): Adjust call to make_typename_type.
1719         * parser.c (cp_parser_make_typename_type): Likewise.
1720         (cp_parser_primary_expression): Adjust call to
1721         cp_parser_lookup_name.
1722         (cp_parser_unqualified_id): Adjust calls to cp_parser_class_name.
1723         (cp_parser_class_or_namespace_name): Likewise.
1724         (cp_parser_postfix_expression): Adjust calls to
1725         make_typename_type.
1726         (cp_parser_mem_initializer_id): Adjust calls to
1727         cp_parser_class_name.
1728         (cp_parser_type_parameter): Adjust calls to cp_parser_lookup_name.
1729         (cp_parser_template_name): Likewise.
1730         (cp_parser_template_argument): Likewise.
1731         (cp_parser_type_name): Adjust call to cp_parser_class_name.
1732         (cp_parser_elaborated_type_specifier): Adjust calls to
1733         make_typename_type and cp_parser_lookup_name.
1734         (cp_parser_namespace_name): Likewise.
1735         (cp_parser_class_name): Replace type_p parameter with tag_type.
1736         Adjust calls to make_typename_type and cp_parser_lookup_name.
1737         (cp_parser_class_head): Adjust calls to cp_parser_class_name.
1738         (cp_parser_base_specifier): Likewise.
1739         (cp_parser_lookup_name): Replace is_type parameter with tag_type.
1740         Adjust calls to make_typename_type and lookup_qualified_name.
1741         (cp_parser_lookup_name_simple): Adjust call to
1742         cp_parser_lookup_name.
1743         (cp_parser_constructor_declarator_p): Adjust call to
1744         cp_parser_class_name.
1745         * pt.c (convert_template_argument): Adjust all to
1746         make_typename_type.
1747         (tsubst_decl): Do not pre-substitute the type of the declaration.
1748         (tsubst): Hand off declarations more quickly.  Adjust call to
1749         make_typename_type.
1751         PR c++/18512
1752         * parser.c (cp_parser_postfix_dot_deref_expression): Robustify.
1754 2004-11-29  Daniel Jacobowitz  <dan@codesourcery.com>
1756         PR c/7544
1757         * Make-lang.in (cp/decl2.o): Update dependencies.
1758         * decl2.c (finish_file): Call maybe_apply_pending_pragma_weaks.
1760 2004-11-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1762         PR c++/18652
1763         * name-lookup.c (pushtag): Change return type to tree.
1764         * cp-tree.h (pushtag): Adjust declaration.
1765         * decl.c (xref_tag, start_enum): Use return value of pushtag.
1766         * pt.c (push_template_decl_real): Return immediately if
1767         pushdecl_namespace_level returns error_mark_node.
1769 2004-11-27  Kazu Hirata  <kazu@cs.umass.edu>
1771         * pt.c: Fix a comment typo.
1773 2004-11-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1775         Friend class name lookup 4/n
1776         * class.c (pushclass): Don't call cxx_remember_type_decls.
1777         * cp-tree.h (clear_anon_tags): Remove declaration.
1778         * decl.c (grokdeclarator): Don't call lookup_tag_reverse.
1779         * name-lookup.c (binding_entry_free, binding_table_free): Comment
1780         out functions.
1781         (binding_table_find_anon_type, binding_table_reverse_maybe_remap,
1782         binding_table_remove_anonymous_types, cxx_remember_type_decls,
1783         bt_print_entry, clear_anon_tags, follow_tag_typedef, lookup_tag,
1784         lookup_tag_reverse): Remove
1785         (begin_scope, leave_scope, kept_level_p, print_binding_level):
1786         Don't use type_decls field in cp_binding_level.
1787         (maybe_process_template_type_declaration, pushtag): Set
1788         CLASSTYPE_NESTED_UTDS directly.
1789         * name-lookup.h (binding_table_remove_anonymous_types,
1790         cxx_remember_type_decls, lookup_tag, lookup_tag_reverse): Remove
1791         declaration.
1792         (cp_binding_level): Remove type_decls field.
1794 2004-11-26  Kazu Hirata  <kazu@cs.umass.edu>
1796         * typeck.c: Fix a comment typo.
1798 2004-11-25  Mark Mitchell  <mark@codesourcery.com>
1800         PR c++/18445
1801         * class.c (instantiate_type): Treat NON_DEPENDENT_EXPRs with
1802         unknown_type as non matching.  Tidy up.
1803         * pt.c (build_non_dependent_expr): Do not build a
1804         NON_DEPENDENT_EXPR for a VAR_DECL.
1806         PR c++/18001
1807         * cp-tree.h (lvalue_or_else): Remove declaration.
1808         * tree.c (lvalue_or_else): Remove.
1809         * typeck.c (build_unary_op): Adjust call to lvalue_or_else.
1810         (build_modify_expr): Likewise.
1812         PR c++/18625
1813         * decl.c (duplicate_decls): Return error_mark_node on error, as
1814         specified.
1816         PR c++/18466
1817         * decl.c (grokvardecl): Keep track of whether or not a there was
1818         explicit qualification.
1819         * name-lookup.c (set_decl_namespace): Complain about explicit
1820         qualification of a name within its own namespace.
1822         PR c++/18545
1823         * typeck.c (check_return_expr): Robustify.
1825 2004-11-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1827         Friend class name lookup 3/n, PR c++/3332
1828         * name-lookup.c (push_inner_scope, pop_inner_scope): New functions.
1829         (lookup_type_scope): Don't deal with name from user declaration
1830         specially.
1831         * name-lookup.h (push_inner_scope, pop_inner_scope): Add declarations.
1832         * parser.c (cp_parser_class_specifier): Use push_inner_scope and
1833         pop_inner_scope.
1835 2004-11-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1837         Friend class name lookup 2/n, PR c++/14513, c++/15410
1838         * name-lookup.c (lookup_name_real): Simplify.
1839         (lookup_type_scope): Add SCOPE parameter.  Handle friend class
1840         lookup.
1841         * name-lookup.h (tag_scope): New enum type.
1842         (lookup_type_scope): Adjust declaration.
1843         * decl.c (lookup_and_check_tag, xref_tag, xref_tag_from_type):
1844         Change bool parameter GLOBALIZED to TAG_SCOPE parameter SCOPE.
1845         (start_enum): Likewise.  Add assertion test that NAME is
1846         IDENTIFIER_NODE.  Use anonymous name for dummy ENUMERAL_TYPE in
1847         case of error.
1848         * cp-tree.h (xref_tag, xref_tag_from_type): Adjust declarations.
1849         * parser.c (cp_parser_elaborated_type_specifier,
1850         cp_parser_class_head): Adjust call to xref_tag.
1851         * pt.c (lookup_template_class, instantiate_class_template):
1852         Likewise.
1853         * rtti.c (init_rtti_processing, build_dynamic_cast_1,
1854         tinfo_base_init, emit_support_tinfos): Likewise.
1856 2004-11-25  Joseph S. Myers  <joseph@codesourcery.com>
1858         * g++spec.c, lex.c: Avoid ` as left quote in diagnostics.
1860 2004-11-24  Mark Mitchell  <mark@codesourcery.com>
1862         PR c++/17473
1863         * name-lookup.c (supplement_binding): Do not allow typedefs to be
1864         redefined in class scope.
1866         PR c++/18285
1867         * parser.c (cp_parser_set_decl_type_spec): Do not try to allow
1868         redefinitions of builtin types other that "bool" or "wchar_t".
1870 2004-11-24  Steven Bosscher  <stevenb@suse.de>
1872         * decl.c (cxx_init_decl_processing): Don't clear
1873         flag_inline_functions.
1875 2004-11-24  Mark Mitchell  <mark@codesourcery.com>
1877         * pt.c (tsubst_function_type): Do not permit function types which
1878         return arrays or functions.
1880         PR c++/18586
1881         * parser.c (cp_parser_init_declarator): Do not pop scope twice.
1883         PR c++/18530
1884         * cp-tree.h (CTOR_NAME): Remove.
1885         (DTOR_NAME): Remove.
1886         * decl.c (initialize_predefined_identifiers): Add spaces to the
1887         end of constructor and destructor names.
1889 2004-11-24  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1891         PR c++/8929
1892         * decl.c (start_decl): Check for invalid specialization headers.
1894 2004-11-24  Paolo Bonzini  <bonzini@gnu.org>
1896         PR c++/16882
1898         * call.c (standard_conversion): Move check for conversions between
1899         vector pointers...
1900         * typeck.c (ptr_reasonably_similar): ... here.
1902 2004-11-23  Ben Elliston  <bje@au.ibm.com>
1904         * cp-tree.h (context_as_string): Remove extern.
1905         * error.c (context_as_string): Remove.
1907         * cp-tree.h (cp_type_qual_from_rid): Remove extern.
1908         * lex.c (cp_type_qual_from_rid): Remove.
1910         * cp-tree.h (do_poplevel): Remove extern.
1911         (check_multiple_declarators): Likewise.
1912         * semantics.c (do_poplevel): Make static.
1913         (check_multiple_declarators): Remove.
1915         * cp-tree.h (check_final_overrider): Remove extern.
1916         * search.c (check_final_overrider): Make static.
1918         * cp-tree.h (build_artificial_parm): Remove extern.
1919         * decl2.c (build_artificial_parm): Make static.
1921 2004-11-22  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1923         PR c++/18354
1924         * typeck.c (build_unary_op) <CONVERT_EXPR, NEGATE_EXPR>: Unify code.
1925         Make sure the result is always a rvalue.
1927 2004-11-16  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1929         * decl.c (start_preparsed_function): Call check_function_type even
1930         in templates.
1931         (require_complete_types_for_parms): Skip dependent types.
1932         (check_function_type): Likewise.
1934 2004-11-16  Steven Bosscher  <stevenb@suse.de>
1936         * Make-lang.in (cp/decl.o, cp/search.o): Don't depend on stack.h.
1937         * search.c: Don't include it.
1939 2004-11-15  Andrew Pinski  <pinskia@physics.uc.edu>
1941         * cp-gimplify.c: Include pointer-set.h
1942         (cp_genericize_r): Use pointer_sets instead of a hashtable.
1943         Also instert the new statement for CLEANUP_STMT.
1944         (cp_genericize): Use pointer_sets instead of a hashtable.
1945         * Make-lang.in (cp-gimplify.o): Depend on pointer-set.h.
1947 2004-11-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1949         Friend class name lookup 1/n, PR c++/18471
1950         * decl.c (lookup_and_check_tag): New function.
1951         (xref_tag, start_enum): Use it.
1952         (check_elaborated_type_specifier): Move TEMPLATE_TYPE_PARM check
1953         before !DECL_IMPLICIT_TYPEDEF_P.  Also display previously declared
1954         location.
1955         * name-lookup.c (lookup_name_current_level): Rename to ...
1956         (lookup_name_innermost_nonclass_level): ... this.
1957         (lookup_type_scope): New function.
1958         * name-lookup.h (lookup_name_current_level): Rename to ...
1959         (lookup_name_innermost_nonclass_level): ... this.
1960         (lookup_type_scope): Add declaration.
1962 2004-11-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1964         PR c++/17344
1965         * pt.c (coerce_template_parms): Only emit error message about
1966         invalid template argument when TF_ERROR.
1968 2004-11-12  Mark Mitchell  <mark@codesourcery.com>
1970         PR c++/18389
1971         * decl.c (start_decl): Make sure to set *pop_scope_p.  Return
1972         error_mark_node to indicate errors.
1974         PR c++/18429
1975         * parser.c (cp_parser_direct_declarator): Disallow non-constant
1976         array bounds when not inside a function.
1978         PR c++/18436
1979         * pt.c (tsubst_copy_and_build): Do not do Koenig lookup when an
1980         unqualified name resolves to a member function.
1982         PR c++/18407
1983         * pt.c (tsubst_copy_and_build): Handle qualified names used from a
1984         derived class correctly.
1986         * decl2.c (import_export_decl): Fix typo in comment.
1987         * tree.c (pod_type_p): Likewise.
1989 2004-11-10  Andrew Pinski  <pinskia@physics.uc.edu>
1991         * typeck.c (cxx_mark_addressable): Add braces around the first if.
1993 2004-11-10  Adam Nemet  <anemet@lnxw.com>
1995         PR middle-end/18160
1996         * typeck.c (cxx_mark_addressable): Issue an error if address of an
1997         explicit register variable is requested.
1999 2004-11-10  Nathan Sidwell  <nathan@codesourcery.com>
2001         PR c++/18143
2002         * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK): New.
2003         (struct lang_decl_flags): Add thunk_p flag.
2004         (struct lang_decl): Remove separate fixed_offset. Place
2005         cloned_function and fixed_offset into union.
2006         (DECL_CLONED_FUNCTION_P, DECL_CLONED_FUNCTION): Adjust.
2007         (DECL_THUNK_P, SET_DECL_THUNK_P): Adjust.
2008         (THUNK_FIXED_OFFSET): Adjust.
2009         * method.c (make_thunk): Adjust.
2011 2004-11-09  Mark Mitchell  <mark@codesourcery.com>
2013         PR c++/18369
2014         * init.c (build_new_1): Handle parenthesized type-ids that name an
2015         array type.  Tidy.
2017 2004-11-09  Joseph S. Myers  <joseph@codesourcery.com>
2019         * call.c, class.c, decl.c, decl2.c, error.c, mangle.c, parser.c,
2020         pt.c, search.c, semantics.c, typeck.c: Use %q, %< and %> for
2021         quoting in diagnostics.
2022         * parser.c (cp_parser_sizeof_operand): Use '' instead of `' for
2023         quoting in printf format.
2024         * decl.c (duplicate_decls, start_decl): Use %qD instead of
2025         unquoted %D.
2027 2004-11-08  Kazu Hirata  <kazu@cs.umass.edu>
2029         * class.c, decl.c, lex.c, name-lookup.c, parser.c, pt.c,
2030         search.c, typeck2.c: Fix comment formatting.
2032 2004-11-04  Ulrich Weigand  <uweigand@de.ibm.com>
2034         PR tree-optimization/18184
2035         * cp-objcp-common.c (cxx_types_compatible_p): Do not treat pointers
2036         of different modes or alias-all flags as equivalent.
2037         * typeck.c (comptypes): Likewise.
2039 2004-11-04  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2041         DR 49, 100
2042         * cp-tree.h (TYPE_REF_OBJ_P): New macro.
2043         (TYPE_PTR_P, TYPE_PTROB_P, TYPE_PTROBV_P, TYPE_PTRFN_P,
2044         TYPE_REFFN_P): Document.
2045         (fold_decl_constant_value): New prototype.
2046         * pt.c (convert_nontype_argument_function): Rewrite and extract
2047         parts into...
2048         (fold_decl_constant_value, convert_nontype_argument_function): New.
2049         (lookup_template_class): Add comment about useless double call.
2050         * mangle.c (write_expression): Strip conversions before lowering
2051         pointer to members.
2052         * cvt.c (ocp_convert): Check LOOKUP_COMPLAIN for a pedwarn. Disallow
2053         enum to enum conversion.
2055 2004-11-02  Mark Mitchell  <mark@codesourcery.com>
2057         PR c++/18124
2058         * parser.c (cp_parser_type_parameter): Robustify.
2060         PR c++/18155
2061         * parser.c (cp_parser_single_declaration): Disallow template
2062         typedefs.
2064         PR c++/18177
2065         * typeck.c (build_const_cast): Use error_operand_p.
2067 2004-11-02  Ziemowit Laski  <zlaski@apple.com>
2069         * cp-lang.c (cxx_types_compatible_p): Remove prototype and definition.
2070         (LANG_HOOKS_TYPES_COMPATIBLE_P): Move to cp-objcp-common.h.
2071         * cp-objcp-common.c (cxx_types_compatible_p): Moved definition here
2072         from cp-lang.c.
2073         * cp-objcp-common.h (cxx_types_compatible_p): Moved prototype here
2074         from cp-lang.c.
2075         (LANG_HOOKS_TYPES_COMPATIBLE_P): Moved here from cp-lang.c.
2077 2004-11-01  Nathan Sidwell  <nathan@codesourcery.com>
2079         PR c++/18064
2080         * search.c (check_final_overrider): Deprecate gnu covariant extension.
2082 2004-10-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2084         Convert diagnostics to use quoting flag q 9/n
2085         * typeck.c (build_x_unary_op, convert_member_func_to_ptr,
2086         get_delta_difference):  Use new quotation style.
2087         * repo.c (reopen_repo_file_for_write): Likewise.
2088         * pt.c (do_type_instantiation): Likewise.
2089         * parser.c (cp_parser_diagnose_invalid_type_name):
2090         * name-lookup.c (push_overloaded_decl, set_decl_namespace):
2091         * error.c (cp_print_error_function,
2092         print_instantiation_full_context): Likewise.
2093         * decl.c (define_label, grok_reference_init,
2094         maybe_deduce_size_from_array_init, revert_static_member_fn):
2095         * decl2.c (check_classfn): Likewise.
2096         * class.c (add_method, check_field_decls, layout_class_type,
2097         resolve_address_of_overloaded_function): Likewise.
2098         * call.c (build_x_va_arg, build_over_call): Likewise.
2100 2004-10-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2102         Convert diagnostics to use quoting flag q 8/n
2103         * cvt.c (cp_convert_to_pointer, warn_ref_binding,
2104         convert_to_reference, ocp_convert, convert_to_void
2105         cp_convert_to_pointer): Use new quotation style.
2107 2004-10-31  Mark Mitchell  <mark@codesourcery.com>
2109         PR c++/15172
2110         * typeck2.c (store_init_value): Use split_nonconstant_init even
2111         for types that require construction.
2113 1004-10-28  Matt Austern  <austern@apple.com>
2115         PR c++/17542
2116         * cp-tree.h (class_key_or_enum_as_string): Declare.
2117         * error.c (class_key_or_enum): Rename to class_key_or_enum_as_string
2118         and remove static qualifier.
2119         * decl.c (shadow_tag): Warn about ignored attributes in class/struct/
2120         union/enum declaration.
2122 2004-10-29  Kazu Hirata  <kazu@cs.umass.edu>
2124         * pt.c: Fix a comment typo.
2126 2004-10-28  Nathan Sidwell  <nathan@codesourcery.com>
2128         * typeck.c (composite_pointer_type): Remove comment about DR 195.
2129         (build_reinterpret_cast_1): Revert DR195 patch. Only emit a
2130         warning when being pedantic.
2131         (build_reinterpet_cast, build_c_cast): Adjust.
2133 2004-10-29  Mark Mitchell  <mark@codesourcery.com>
2135         PR c++/17695
2136         * decl.c (grokdeclarator): Mark TYPE_DECLs as abstract when they
2137         appear in a constructor/destructor that will be cloned.
2139 1004-10-28  Matt Austern  <austern@apple.com>
2141         PR c++/14124
2142         * decl.c (finish_enum): Handle packed attribute.
2143         * parser.c (cp_parser_enum_specifier): Process trailing attributes.
2145 2004-10-28  Mark Mitchell  <mark@codesourcery.com>
2147         PR c++/17132
2148         * pt.c (instantiate_class_template): Increment
2149         processing_template_decl when substituting into a member class
2150         template.
2152 2004-10-27  Mark Mitchell  <mark@codesourcery.com>
2154         PR c++/17435
2155         * call.c (convert_like_real): Fix formatting.
2156         (initialize_reference): When binding a temporary to a base class,
2157         ensure that the nominal copy made is to the derived class, not the
2158         base class.
2160         PR c++/18140
2161         * parser.c (cp_parser_next_token_ends_template_argument_p): Do not
2162         include ">>".
2164 2004-10-27  Andrew Pinski  <pinskia@physics.uc.edu>
2166         * decl.c (bad_specifiers): Move the q after the %.
2168 2004-10-27  Andrew Pinski  <pinskia@physics.uc.edu>
2170         * parser.c (cp_parser_diagnose_invalid_type_name): Move the q after
2171         the %.
2173 2004-10-26  Mark Mitchell  <mark@codesourcery.com>
2175         * name-lookup.c (do_namespace_alias): Use FROB_CONTEXT.
2176         * search.c (current_scope): Fix prototype.
2178         PR c++/18093
2179         * search.c (current_scope): Return the innermost non-block scope,
2180         not the innermost non-block, non-namespace scope.
2181         (at_namespace_scope_p): Adjust accordingly.
2182         (dfs_accessible_post): Do not pass namespaces to is_friend.
2183         (dfs_walk_once_accessible_r): Likewise.
2184         * decl.c (grokvardecl): Adjust call to current_scope.
2185         (build_enumerator): Likewise.
2186         * parser.c (cp_parser_using_declaration): Likewise.
2187         (cp_parser_direct_declarator): Use at_namespace_scope_p instead of
2188         current_scope.
2189         (cp_parser_class_head): Adjust call to current_scope.
2190         * name-lookup.c (do_namespace_alias): Set the DECL_CONTEXT for the
2191         alias.
2193         PR c++/18020
2194         * pt.c (tusbst_copy_and_build): Resolve enumeration constants to
2195         their underlying values.
2197         PR c++/18161
2198         * typeck.c (build_binary_op): Honor build_type, even when in a
2199         template.
2201 2004-10-26  Nathan Sidwell  <nathan@codesourcery.com>
2203         * parser.c (cp_lexer_get_preprocessor_token): Remove unneeded
2204         padding token checking.
2206 2004-10-25  Andrew Pinski  <pinskia@physics.uc.edu>
2208         PR c++/18121
2209         * decl.c (grokdeclarator) <case cdk_array>: Remove the call
2210         layout_type as it is already done by create_array_type_for_decl.
2212 2004-10-22  Nathan Sidwell  <nathan@codesourcery.com>
2214         PR c++/18095
2215         * parser.c (eof_token): Make const, correctly initialize rid and
2216         location fields.
2217         (struct cp_lexer): Replace buffer_end pointer with buffer_length
2218         count. Adjust.
2219         (cp_lexer_new_main): Directly grow lexer's buffer here.  Don't
2220         zero it out.
2221         (cp_lexer_new_from_tokens): Adjust.
2222         (cp_lexer_grow_buffer): Remove.
2223         (cp_lexer_peek_nth_token, cp_lexer_consume_token,
2224         cp_lexer_purge_token): Add const casts.
2226 2004-10-21  Mark Mitchell  <mark@codesourcery.com>
2228         PR c++/18073
2229         PR c++/10841
2230         * cp-tree.h (convert_to_base): Change prototype.
2231         (build_ptrmemfunc): Likewise.
2232         (convert_ptrmem): New function.
2233         * call.c (struct conversion): Adjust documentation for base_p.
2234         (standard_conversion): Set base_p for ck_pmem conversions as
2235         appropriate.
2236         (convert_like_real): Use convert_to_base for ck_pmem and ck_ptr
2237         conversions.
2238         * class.c (convert_to_base): Handle both pointers and objects.
2239         Add nonnull parameter.
2240         (build_vfield_ref): Adjust call to convert_to_base.
2241         * cvt.c (cp_convert_to_pointer): Adjust call to build_ptrmemfunc.
2242         (convert_force): Likewise.
2243         * typeck.c (build_unary_op): Likewise.
2244         (convert_ptrmem): New function.
2245         (build_static_cast_1): Use it.
2246         (build_reinterpret_cast): Allow conversions to vector types.
2247         (get_delta_difference): Add c_cast_p parameter.
2248         (build_ptrmemfunc): Likewise.  Adjust calls to
2249         get_delta_difference.
2251 2004-10-21  Andrew Pinski  <pinskia@physics.uc.edu>
2253         PR c++/13560
2254         * error.c (cp_error_at): Output the context as it might be
2255         different file as the other location.
2257 2004-10-21  Kazu Hirata  <kazu@cs.umass.edu>
2259         * typeck.c: Fix a comment typo.
2261 2004-10-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2263         PR c++/13495
2264         * decl.c (make_unbound_class_template): Add PARM_LIST parameter.
2265         * cp-tree.h (make_unbound_class_template): Adjust prototype.
2266         * parser.c (cp_parser_lookup_name): Adjust call to
2267         make_unbound_class_template.
2268         (cp_parser_single_declaration): Handle member class of class
2269         template as template friend parsing correctly.
2270         * friend.c (is_friend): Call is_specialization_of_friend for
2271         template friend class.
2272         (make_friend_class): Handle member class of class template as
2273         template friend.
2274         * pt.c (is_specialization_of_friend): Likewise.
2275         (instantiate_class_template): Likewise.
2276         (tsubst): Adjust call to make_unbound_class_template.
2278 2004-10-20  Nathan Sidwell  <nathan@codesourcery.com>
2280         * typeck.c (composite_pointer_type): Add comment about DR 195
2281         (build_reinterpret_cast_1): Add for_reinterpret_cast_p parameter.
2282         Allow function pointer conversions that DR195 suggests.
2283         (build_reinterpret_cast, build_c_cast): Update
2284         build_reinterpret_cast_1 calls.
2286 2004-10-20  Kazu Hirata  <kazu@cs.umass.edu>
2288         * call.c, typeck.c: Fix comment typos.
2290 2004-10-20  Nathan Sidwell  <nathan@codesourcery.com>
2292         * parser.c (cp_token_position): New typedef. Define VEC thereof.
2293         (struct cp_lexer): Allow buffer and buffer_end to be NULL. Make
2294         next_token and last_token cp_token_position. Make saved_tokens a
2295         VEC(cp_token_position).
2296         (eof_token): New static variable.
2297         (CP_SAVED_TOKENS_SIZE): Rename to ...
2298         (CP_SAVED_TOKEN_STACK): ... here.
2299         (cp_lexer_new_main): Adjust main lexer creation and buffer
2300         filling.
2301         (cp_lexer_new_from_tokens): Do not copy the tokens, merely point
2302         to the parent buffer.  Do not append eof token.
2303         (cp_lexer_destroy): Only free buffer if non-NULL. Free token
2304         stack.
2305         (cp_lexer_next_token, cp_lexer_prev_token): Remove.
2306         (cp_lexer_token_position, cp_lexer_token_at): New.
2307         (cp_lexer_saving_tokens): Adjust. Make inline.
2308         (cp_lexer_advance_token, cp_lexer_token_difference): Remove.
2309         (cp_lexer_peek_token_emit_debug_info): Fold into ...
2310         (cp_lexer_peek_token): ... here.
2311         (cp_lexer_peek_nth_token): Don't peek past EOF.
2312         (cp_lexer_consume_token): Set next_token to eof_token, if reaching
2313         EOF.
2314         (cp_lexer_purge_token): Adjust eof setting.
2315         (cp_lexer_purge_tokens_after): Likewise.
2316         (cp_lexer_save_tokens): Push next_token directly.
2317         (cp_lexer_commit_tokens): Adjust.
2318         (cp_lexer_rollback_tokens): Pop next_token directly.
2319         (cp_parser_check_for_invalid_template_id): Adjust token purging.
2320         (cp_parser_translation_unit): Do not consume the EOF.
2321         (cp_parser_nested_name_specifier_opt): Adjust token purging.
2322         (cp_parser_template_id, cp_parser_template_name): Likewise.
2324 2004-10-19  Mark Mitchell  <mark@codesourcery.com>
2326         PR c++/14035
2327         * call.c (struct conversion): Add base_p.
2328         (convert_like): Add c_cast_p argument.
2329         (convert_like_with_conversion): Likewise.
2330         (build_conv): Clear base_p.
2331         (standard_conversion): Set it, for derived-to-base conversions.
2332         (convert_like_real): Add c_cast_p parameter.  Handle pointer
2333         conversions directly rather than relying on ocp_convert.
2334         (perform_direct_initialization_if_possible): Add c_cast_p
2335         parameter.
2336         * cp-tree.h (perform_direct_initialization_if_possible): Change
2337         prototype.
2338         (convert_member_func_to_ptr): New function.
2339         * typeck.c (check_for_casting_away_constness): Add diag_fn
2340         parameter.
2341         (build_static_cast_1): New function, split out from ...
2342         (build_static_cast): ... here.  Use build_static_cast_1.
2343         (build_reinterpret_cast_1): New function, split out from ...
2344         (build_reinterpret_cast): ... here.  Use build_reinterpret_cast_1.
2345         (build_const_cast_1): New function, split out from ...
2346         (build_const_cast): ... here.  Use build_const_cast_1.
2347         (build_c_cast): Rewrite to use build_const_cast_1,
2348         build_static_cast_1, and build_reinterpret_cast_1.
2349         (convert_member_func_to_ptr): New function.
2351 2004-10-19  Paolo Bonzini  <bonzini@gnu.org>
2353         PR c++/18047
2354         * parser.c (enum cp_parser_prec): Give relational expressions
2355         a higher precedence than equality expressions.
2357 2004-10-15  Nathan Sidwell  <nathan@codesourcery.com>
2359         * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Adjust lookup_base call.
2360         (ACCESSIBLY_UNIQUELY_DERIVED_P): Remove.
2361         (PUBLICLY_UNIQUELY_DERIVED_P): Adjust lookup_base call.
2362         (enum base_access): Reorganize.
2363         (accessible_base_p, accessible_p): Add consider_local_p parameter.
2364         * call.c (standard_conversion): Update comment about
2365         DERIVED_FROM_P.
2366         (enforce_access): Adjust accessible_p call.
2367         (build_over_call): Adjust accessible_base_p call.
2368         * class.c (convert_to_base): Adjust lookup_base call.
2369         (build_vtbl_ref_1): Likewise.
2370         (warn_about_ambiguous_bases): Likewise. Add early exit.
2371         * cvt.c (convert_to_pointer_force) Adjust lookup_base call.
2372         * search.c (accessible_base_p): Add consider_local_p parameter.
2373         (lookup_base): Pass consider_local_p to accessible_base_p call.
2374         (friend_accessible_p): Check whether scope is a class member.
2375         Remove unnecessary class template check.
2376         (accessible_p): Add consider_local_p parameter. Use it.
2377         (adjust_result_of_qualified_name_lookup): Adjust lookup_base call.
2378         * tree.c (maybe_dummy_object): Likewise.
2379         * typeck.c (comp_except_type): Use PUBLICLY_UNIQUELY_DERIVED_P.
2380         (build_class_member_access_expr): Adjust lookup_base call.
2381         * typeck2.c (binfo_or_else): Likewise.
2382         * rtti.c (build_dynamic_cast_1): Access can consider friendship
2383         and current scope.
2385 2004-10-17  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2387         PR c++/17743
2388         * decl2.c (grokfield): Apply attributes also to TYPE_DECLs.
2390 2004-10-16  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2392         PR c++/10479
2393         * parser.c (cp_parser_parenthesized_expression_list): Fold
2394         non-dependent expressions in attribute lists.
2396 2004-10-15  Mark Mitchell  <mark@codesourcery.com>
2398         PR c++/17042
2399         * decl.c (declare_global_var): Use the return value from pushdecl.
2401         PR c++/14667
2402         * parser.c (cp_parser_simple_declaration): Do not diagnose invalid
2403         type names if we have already found a valid type.
2404         (cp_parser_member_declaration): Likewise.
2406         PR c++/17916
2407         * parser.c (cp_parser_member_specification_opt): Handle
2408         CPP_PRAGMA.
2410 2004-10-15  Kazu Hirata  <kazu@cs.umass.edu>
2412         * dump.c, g++spec.c, repo.c: Update copyright.
2414 2004-10-15  Kazu Hirata  <kazu@cs.umass.edu>
2416         * decl.c: Fix a comment typo.
2418 2004-10-13  Andrew Pinski  <pinskia@physics.uc.edu>
2420         PR c++/16301
2421         * name-lookup.c (parse_using_directive): If we have a
2422         error_mark_node, do not set the decl namespace associations
2423         on it.
2425 2004-10-14  Mark Mitchell  <mark@codesourcery.com>
2427         PR c++/17976
2428         * decl.c (cp_finish_decl): Do not call expand_static_init more
2429         than once for a single variable.
2431 2004-10-14  Matt Austern  <austern@apple.com>
2433         * Make-lang.in (pt.o): depends on pointer-set.h
2434         * cp-tree.h (cp_walk_subtrees): Last argument is pointer_set_t* now.
2435         * pt.c (struct pair_fn_data): Use pointer_set_t, not htab_t
2436         (for_each_template_parm): Convert from htab_t to pointer_set_t.
2437         * tree.c (cp_walk_subtrees): Last argument is pointer_set_t* now.
2439 2004-10-13  Andrew Pinski  <pinskia@physics.uc.edu>
2441         PR c++/17661
2442         * semantics.c (finish_for_expr): Convert expression to void
2443         so that we don't create temporaries for a?b:c.
2445 2004-10-13  Kazu Hirata  <kazu@cs.umass.edu>
2447         * search.c: Fix a comment typo.
2449 2004-10-12  Nathan Sidwell  <nathan@codesourcery.com>
2451         * class.c (dfs_modify_vtables): Simplify condition. Return
2452         dfs_skip_bases as appropriate.
2453         (modify_all_vtables): Walk in pre-order.
2454         * search.c (dfs_walk_all, dfs_walk_once_r,
2455         dfs_walk_once_accessible_r): Assert post order function never
2456         returns dfs_skip_bases.
2458         * search.c (struct lookup_base_data_s): New.
2459         (lookup_base_r): Replace with ...
2460         (dfs_lookup_base): ... this.
2461         (lookup_base): Use dfs_walk_all.
2463 2004-10-12  Kazu Hirata  <kazu@cs.umass.edu>
2465         * search.c: Fix comment typos.
2467 2004-10-11  Mark Mitchell  <mark@codesourcery.com>
2469         PR c++/15786
2470         * parser.c (cp_parser_declarator): Add member_p parameter.
2471         (cp_parser_condition): Adjust calls to cp_parser_declarator.
2472         (cp_parser_explicit_instantiation): Likewise.
2473         (cp_parser_init_declarator): Likewise.
2474         (cp_parser_direct_declarator): Add member_p parameter.  Do not
2475         parse tentatively when parsing the parameters to a member.
2476         (cp_parser_type_id): Adjust calls to cp_parser_declarator.
2477         (cp_parser_parameter_declaration): Likewise.
2478         (cp_parser_member_declaration): Likewise.
2479         (cp_parser_exception_declaration): Likewise.
2481         PR c++/17936
2482         * cp-tree.h (CLASSTYPE_TEMPLATE_SPECIALIZATION): Add a comment.
2483         * pt.c (optimize_specialization_lookup_p): Do not optimize lookups
2484         for members of partial or explicit specializations.
2486         PR c++/17929
2487         * decl2.c (finish_anon_union): Robustify.
2489 2004-10-11  Nathan Sidwell  <nathan@codesourcery.com>
2491         * cp-tree.h (get_dynamic_cast_base_type): Rename to ...
2492         (dcast_base_hint): ... here.
2493         * rtti.c (build_dynamic_cast_1): Use dcast_base_hint.
2494         * search.c (struct dcast_data_s): New.
2495         (dynamic_cast_base_recurse): Remove. Replace with ...
2496         (dfs_dcast_hint_pre, dfs_dcast_base_post): ... these. New.
2497         (get_dynamic_cast_base_type): Rename to ...
2498         (dcast_base_hint): ... here.  Use dfs_walk_once_accessible.
2499         (accessible_r): Remove.
2500         (dfs_accessible_post): New, broken out of accessible_r.
2501         (accessible_p): Use dfs_walk_once_accessible.
2502         (dfs_walk_once_accessible_r): New. From accessible_r.
2503         (dfs_walk_once_accessible): New. From acessible_p.
2505         * cp-tree.h (SAME_BINFO_TYPE_P): New.
2506         * class.c (build_base_path): Use SAME_BINFO_TYPE_P to compare
2507         binfo types.
2508         (convert_to_base_statically, determine_primary_bases,
2509         update_vtable_entry_for_fn, dfs_modify_vtables, build_vtt_inits,
2510         dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
2511         accumulate_vtbl_inits, dfs_accumulate_vtbl_inits,
2512         build_vtbl_initializer, add_vcall_offset_vtbl_entries_1): Likewise.
2513         * init.c (expand_member_init): Likewise.
2514         * search.c (lookup_base_r, dynamic_cast_base_recurse,
2515         binfo_via_virtual, copied_binfo, binfo_for_vbase,
2516         original_binfo): Likewise.
2517         * tree.c (copy_binfo): Likewise.
2519 2004-10-11  Kazu Hirata  <kazu@cs.umass.edu>
2521         * semantics.c: Fix comment typos.
2523 2004-10-10  Andrew Pinski  <pinskia@physics.uc.edu>
2525         PR c++/17554
2526         part of c++/17657
2527         middle-end/17703
2528         * semantics.c (maybe_cleanup_point_expr): Call
2529         fold_build_cleanup_point_expr.
2530         (maybe_cleanup_point_expr_void): New function.
2531         (add_decl_expr): Call maybe_cleanup_point_expr_void.
2532         (finish_expr_stmt): Likewise.
2533         (finish_return_stmt): Likewise.
2534         (finish_for_expr): Likewise.
2535         (finish_asm_stmt): Likewise.
2536         * typeck.c (condition_conversion): Call
2537         fold_build_cleanup_point_expr.
2539 2004-10-10  Andrew Pinski  <pinskia@physics.uc.edu>
2541         PR c++/17907
2542         * semantics.c (add_decl_expr): If the decl has a size which
2543         has side effects then the decl expression needs a cleanup point.
2545 2004-10-10  Mark Mitchell  <mark@codesourcery.com>
2547         PR c++/17393
2548         * decl.c (grokdeclarator): Robustify error-recovery on invalid
2549         declarations.
2551 2004-10-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2553         Convert diagnostics to use quoting flag q 7/n
2554         * typeck.c (composite_pointer_type_r, composite_pointer_type,
2555         cxx_sizeof_or_alignof_type, cxx_sizeof_or_alignof_expr,
2556         string_conv_p, build_class_member_access_expr,
2557         build_class_member_access_expr, lookup_destructor,
2558         finish_class_member_access_expr, build_indirect_ref,
2559         get_member_function_from_ptrfunc, build_function_call,
2560         convert_arguments, build_binary_op, pointer_diff, build_unary_op,
2561         check_for_casting_away_constness, build_static_cast,
2562         build_reinterpret_cast, build_const_cast, build_c_cast,
2563         build_modify_expr, get_delta_difference, build_ptrmemfunc,
2564         dubious_conversion_warnings, convert_for_assignment,
2565         convert_for_initialization,
2566         maybe_warn_about_returning_address_of_local, check_return_expr):
2567         Use quoting marks.
2569         * typeck2.c (error_not_base_type, readonly_error,
2570         abstract_virtuals_error, cxx_incomplete_type_diagnostic,
2571         store_init_value, digest_init, build_x_arrow,
2572         build_m_component_ref, require_complete_eh_spec_types): Likewise.
2574         * tree.c (cp_build_qualified_type_real,
2575         handle_java_interface_attribute, handle_init_priority_attribute):
2576         Likewise.
2578         * semantics.c (finish_asm_stmt, finish_non_static_data_member,
2579         finish_pseudo_destructor_expr,
2580         check_template_template_default_arg, begin_class_definition,
2581         finish_base_specifier, qualified_name_lookup_error,
2582         finish_id_expression, finish_typeof): Likewise.
2584         * search.c (lookup_base, check_final_overrider,
2585         look_for_overrides_r): Likewise.
2587         * rtti.c (get_tinfo_decl, build_dynamic_cast_1): Likewise.
2589 2004-10-09  Mark Mitchell  <mark@codesourcery.com>
2591         PR c++/17867
2592         * error.c (dump_expr): Correct handling of AGGR_INIT_EXPRs using a
2593         constructor.
2595         PR c++/17670
2596         * init.c (build_new): Correct comments.
2597         * parser.c (cp_parser_new_expression): Use NULL_TREE for nelts in
2598         the non-array case.
2600         PR c++/17821
2601         * parser.c (cp_parser_postfix_dot_deref_expression): If the
2602         pseduo-destructor-name production does not work, fall back to the
2603         ordinary production.
2605         PR c++/17826
2606         * tree.c (cp_tree_equal): Handle a BASELINK.
2608         PR c++/17524
2609         * cp-tree.h (check_var_type): New function.
2610         * decl.c (check_var_type): New function, split out from ...
2611         (grokdeclarator): ... here.
2612         * pt.c (tsubst_decl): Use check_var_type.
2614         PR c++/17685
2615         * decl.c (grokdeclarator): Disallow declarations of operators as
2616         non-functions.
2618 2004-10-08  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2620         PR c++/17868
2621         * error.c (dump_expr): Add missing case for RDIV_EXPR.
2623 2004-10-08  Kazu Hirata  <kazu@cs.umass.edu>
2625         * pt.c, search.c: Fix comment typos.
2627 2004-10-08  Nathan Sidwell  <nathan@codesourcery.com>
2629         * cp-tree.h (dfs_walk, dfs_walk_real, dfs_unmark, markedp,
2630         unmarkedp): Remove.
2631         (dfs_skip_bases, dfs_walk_all, dfs_walk_once): New.
2632         * class.c (struct find_final_overrider_data): Remove most_derived,
2633         vpath_list and vpath fields.  Add path field.
2634         (dfs_find_final_ocerrider_1): Add DEPTH parameter. Adjust.
2635         (dfs_find_final_overrider): Rename to ...
2636         (dfs_find_final_overrider_pre): ... here. Adjust.
2637         (dfs_find_final_overrider_post): Adjust.
2638         (dfs_find_final_overrider_q): Fold into
2639         dfs_find_final_overrider_pre.
2640         (find_final_overrider): Adjust dfs searching.
2641         (dfs_modify_vtables): Don't mark binfo here.
2642         (modify_all_vtables): Use dfs_walk_once.
2643         (build_vtt_inits): Likwise. Use dfs_walk_all.
2644         (dfs_build_secondary_vptr_vtt_inits): Don't mark binfo here.
2645         Return dfs_skip_bases as appropriate.
2646         (dfs_fixup_binfo_vtbls): Return dfs_skip_bases as appropriate.
2647         * init.c (dfs_initialized_vtbl_ptrs): Return dfs_skip_bases as
2648         appropriate. Don't mark binfo here.
2649         (initialize_vtbl_ptrs): Use dfs_walk_once.
2650         * search.c (struct vbase_info): Remove unused struct.
2651         (access_in_type): Use dfs_walk_once.
2652         (dfs_access_in_type): Don't mark binfo here.
2653         (dfs_accessible_queue_p, dfs_accessible_p) Remove.
2654         Fold into ...
2655         (accessible_r): ... here. New. Specialize dfs_walk_once.
2656         (accessible_p): Use accessible_r.
2657         (lookup_field_queue_p): Remove. Fold into ...
2658         (lookup_field_r): ... here. Adjust.
2659         (lookup_member): Use dfs_walk_all.
2660         (dfs_walk_real, dfs_walk): Replace with ...
2661         (dfs_walk_all, dfs_walk_once): ... these.
2662         (dfs_walk_once_r, dfs_unmark_r): Workers for dfs_walk_once.
2663         (dfs_unmark, unmarkedp, markedp): Remove.
2664         (dfs_get_pure_virtuals): Don't mark binfo here.
2665         (get_pure_virtuals): Use dfs_walk_once.
2666         (dfs_debug_unmarked_p): Remove. Fold into ...
2667         (dfs_debug_mark): ... here.
2668         (note_debug_info_needed): Use dfs_walk_all.
2670 2004-10-07  Andrew Pinski  <pinskia@physics.uc.edu>
2672         * pt.c (tsubst_expr) <case ASM_EXPR>: Look passed the
2673         CLEANUP_POINT_EXPR to get the asm expression.
2675 2004-10-07  Mark Mitchell  <mark@codesourcery.com>
2677         * cp-tree.h (ICS_USER_FLAG): Remove comment about obsolete flag.
2678         (DECL_MEMBER_TEMPLATE_P): New macro.
2679         (is_member_template): Remove.
2680         (class_method_index_for_fn): New function.
2681         * pt.c (build_over_call): Use DECL_MEMBER_TEMPLATE_P.
2682         * class.c (finish_struct_methods): Remove out-of-date comment.
2683         * decl.c (copy_fn_p): Use DECL_MBMER_TEMPLATE_P.
2684         * decl2.c (check_classfn): Use DECL_MEMBER_TEMPLATE_P and
2685         class_method_index_for_fn.
2686         * pt.c (is_member_template): Remove.
2687         (is_member_template_class): Likewise.
2688         (optimize_specialization_lookup_p): New function.
2689         (retrieve_specialization): Optimize lookups for members that are
2690         not member templates.
2691         (register_specialization): Adjust accordingly.
2692         (build_template_decl): Add member_template_p parameter.  Set
2693         DECL_MEMBER_TEMPLATE_P.
2694         (process_partial_specialization): Adjust call to
2695         retrieve_specialization.
2696         (push_template_decl_real): Determine whether the template is a
2697         member template.
2698         (lookup_template_class): Use retrieve_specialization.
2699         (tsubst_decl): Adjust call to retrieve_specialization.
2700         (tsubst_exception_specification): New function.
2701         (tsubst): Use it.
2702         (tsubst_copy): Use DECL_MEMBER_TEMPLATE_P.
2703         (instantiate_template): Adjust call to retrieve_specialization.
2704         (regenerate_decl_from_template): Do not actually generate a new
2705         DECL.
2706         (instantiate_decl): Adjust call to retrieve_specialization.
2707         (class_method_index_for_fn): New method.
2709 2004-10-07  Andrew Pinski  <pinskia@physics.uc.edu>
2711         * parser.c (cp_parser_asm_definition): Look passed the
2712         CLEANUP_POINT_EXPR to get the asm expression.
2714 2004-10-06  Andrew Pinski  <pinskia@physics.uc.edu>
2716         PR c++/17368
2717         * semantics.c (finish_asm_stmt): Asm expressions need cleanup
2718         also.
2720 2004-10-05  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2722         Convert diagnostics to use quoting flag q 6/n
2723         * pt.c (finish_member_template_decl, check_specialization_scope,
2724         maybe_process_partial_specialization, determine_specialization,
2725         check_explicit_specialization, maybe_check_template_type,
2726         process_partial_specialization, check_default_tmpl_args,
2727         push_template_decl_real, redeclare_class_template,
2728         convert_nontype_argument, coerce_template_parms,
2729         lookup_template_class, push_tinst_level,
2730         instantiate_class_template, tsubst_arg_types,
2731         tsubst_function_type, tsubst, tsubst_qualified_id,
2732         tsubst_copy_and_build, check_instantiated_args,
2733         do_decl_instantiation, do_type_instantiation,
2734         invalid_nontype_parm_type_p, check_specialization_namespace,
2735         convert_template_argument, determine_specialization,
2736         check_template_shadow, tsubst_decl
2737         instantiate_pending_templates): Use quoting marks.
2739 2004-10-05  Nathan Sidwell  <nathan@codesourcery.com>
2741         PR c++/17829
2742         * parser.c (cp_parser_postfix_expression): Inhibit Koenig when
2743         unqualified lookup finds a member function.
2745 2004-10-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2747         Convert diagnostics to use quoting flag q 5/n
2748         * parser.c (cp_parser_name_lookup_error,
2749         cp_parser_diagnose_invalid_type_name,
2750         cp_parser_primary_expression, cp_parser_unqualified_id,
2751         cp_parser_nested_name_specifier_opt, cp_parser_labeled_statement,
2752         cp_parser_jump_statement, cp_parser_simple_declaration,
2753         cp_parser_decl_specifier_seq, cp_parser_mem_initializer_id,
2754         cp_parser_type_parameter, cp_parser_template_id,
2755         cp_parser_template_name, cp_parser_direct_declarator,
2756         cp_parser_parameter_declaration_list, cp_parser_class_head,
2757         cp_parser_base_specifier, cp_parser_lookup_name,
2758         cp_parser_late_parsing_default_args,
2759         cp_parser_optional_template_keyword
2760         cp_parser_elaborated_type_specifier, cp_parser_check_class_key,
2761         cp_parser_check_access_in_redeclaration): Use quoting marks.
2763         * name-lookup.c (supplement_binding, pushdecl,
2764         check_for_out_of_scope_variable, validate_nonmember_using_decl,
2765         do_nonmember_using_decl, lookup_tag, set_decl_namespace,
2766         push_namespace, do_namespace_alias, do_using_directive,
2767         ambiguous_decl, lookup_namespace_name, add_function): Likewise.
2769         * method.c (use_thunk): Likewise.
2771         * lex.c (unqualified_name_lookup_error,
2772         unqualified_fn_lookup_error): Likewise.
2774 2004-10-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2776         Convert diagnostics to use quoting flag q 4/n
2777         * except.c (decl_is_java_type, build_throw,
2778         is_admissible_throw_operand, check_handlers_1, check_handlers):
2779         Use quoting formats.
2780         * friend.c (add_friend, make_friend_class, do_friend): Likewise.
2781         * init.c (sort_mem_initializers, emit_mem_initializers,
2782         member_init_ok_or_else, expand_member_init, is_aggr_type,
2783         build_offset_ref, build_java_class_ref): Likewise.
2785 2004-10-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2787         Convert diagnostics to use quoting flag q 3/n
2788         * decl.c (pop_label, duplicate_decls, redeclaration_error_message,
2789         redeclaration_error_message, lookup_label, check_goto,
2790         make_typename_type, make_unbound_class_template,
2791         fixup_anonymous_aggr, check_tag_decl, start_decl, start_decl_1,
2792         grok_reference_init, layout_var_decl, maybe_commonize_var,
2793         check_for_uninitialized_const_var, reshape_init_array,
2794         reshape_init, check_initializer, cp_finish_decl,
2795         member_function_or_else, bad_specifiers, grokfndecl, grokvardecl,
2796         check_static_variable_definition, compute_array_index_type,
2797         create_array_type_for_decl, check_special_function_return_type,
2798         grokdeclarator, check_default_argument, grokparms,
2799         grok_ctor_properties, grok_op_properties,
2800         check_elaborated_type_specifier, xref_tag, finish_enum,
2801         build_enumerator, check_function_type, start_preparsed_function,
2802         store_parm_decls): Use quoting formats.
2803         * decl2.c (grok_array_decl, delete_sanity, check_member_template,
2804         check_java_method, check_classfn, finish_static_data_member_decl,
2805         grokfield, grokbitfield, grok_function_init,
2806         build_anon_union_vars, coerce_new_type, coerce_delete_type,
2807         check_default_args): Likewise.
2808         * parser.c (cp_parser_decl_specifier_seq): Likewise.
2810 2004-10-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2812         Convert diagnostics to use quoting flag q 2/n
2813         * class.c (build_base_path, add_method, alter_access,
2814         handle_using_decl, check_bases,
2815         maybe_warn_about_overly_private_class, find_final_overrider,
2816         warn_hidden, finish_struct_anon, add_implicitly_declared_members,
2817         check_bitfield_decl, check_field_decls, layout_empty_base,
2818         build_base_field, check_methods, layout_virtual_bases,
2819         warn_about_ambiguous_bases, layout_class_type, finish_struct_1,
2820         resolve_address_of_overloaded_function, instantiate_type,
2821         note_name_declared_in_class): Use format flag "q" for quoting.
2823 2004-10-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2825         Convert diagnostics to use quoting flag q 1/n
2826         * error.c (locate_error): Ignore quoting flag q.
2827         * call.c (build_user_type_conversion_1, build_operator_new_call,
2828         build_object_call, op_error, build_conditional_expr,
2829         build_new_op, build_op_delete_call, enforce_access,
2830         convert_like_real, convert_arg_to_ellipsis, build_x_va_arg,
2831         convert_default_arg, build_over_call, build_new_method_call,
2832         joust, perform_implicit_conversion, initialize_reference): Use the
2833         quoting flag q.
2835 2004-10-03  Andrew Pinski  <pinskia@physics.uc.edu>
2837         PR c++/17797
2838         * typeck.c (build_reinterpret_cast): Return if the inner type
2839         is error_mark_node.
2841 2004-10-01  Jan Hubicka  <jh@suse.cz>
2843         * semantics.c (expand_body): Update call of tree_rest_of_compilation.
2845 2004-09-30  Nathan Sidwell  <nathan@codesourcery.com>
2847         * cp-tree.h (struct lang_decl): Shrink by reordering fields and
2848         turning operator_code and fixed_offset into bitfields.
2850 2004-09-29  Joseph S. Myers  <jsm@polyomino.org.uk>
2852         * decl.c (duplicate_decls): Merge TREE_DEPRECATED.
2854 2004-09-29  Jason Merrill  <jason@redhat.com>
2856         PR tree-optimization/17697
2857         * decl.c (duplicate_decls): Copy TREE_NOTHROW from newdecl to olddecl.
2859 2004-09-28  Jason Merrill  <jason@redhat.com>
2861         PR middle-end/17525
2862         * class.c (build_base_field): Set TYPE_MODE.
2864 2004-09-28  Roger Sayle  <roger@eyesopen.com>
2866         PR driver/17537
2867         * g++spec.c (lang_specific_driver): Unrecognized libraries, other
2868         than -lc and -lm, may require linking against libstc++.
2870 2004-09-28  Kazu Hirata  <kazu@cs.umass.edu>
2872         * tree.c: Fix a comment typo.
2874 2004-09-28  Nathan Sidwell  <nathan@codesourcery.com>
2876         * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): Remove.
2877         (struct secondary_vptr_vtt_init_data_s): New.
2878         (build_vtt_inits): Adjust dfs_walkers.
2879         (dfs_build_secondary_vptr_vtt_inits): Caller data is a
2880         secondary_vptr_vtt_init_data_s structure. Adjust.
2881         (dfs_ctor_vtable_bases_queue_p): Remove.
2882         (dfs_fixup_binfo_vtbls): No need to clear BINFO_MARKED. Simplify.
2884         * pt.c (struct get_template_base_data_s): Remove.
2885         (get_template_base_r): Fold into get_template_base.
2886         (get_template_base): Walk base binfos directly in inheritance
2887         graph order.
2889 2004-09-27  Mark Mitchell  <mark@codesourcery.com>
2891         PR c++/17642
2892         * cp-tree.h (fold_if_not_in_template): New function.
2893         * call.c (build_conditional_expr): Use fold_if_not_in_template.
2894         (build_cxx_call): Likewise.
2895         * cvt.c (convert_to_complex): Likewise.
2896         (ocp_convert): Likewise.
2897         (convert): Likewise.
2898         (convert_force): Likewise.
2899         * decl.c (compute_array_index_type): Clear
2900         processing_template_decl while folding array bounds.
2901         * pt.c (convert_nontype_argument): Clear
2902         processing_template_decl while processing non-type argument
2903         initialization.
2904         * tree.c (fold_if_not_in_template): New function.
2905         * typeck.c (build_class_member_access_expr): Use
2906         fold_if_not_in_template.
2907         (build_array_ref): Likewise.
2908         (build_binary_op): Likewise.  Do not try to optimize computations
2909         when processing templates.
2910         (cp_pointer_int_sum): Use fold_if_not_in_template.
2911         (pointer_diff): Likewise.
2912         (build_unary_op): Likewise.
2913         (build_reinterpret_cast): Likewise.
2914         (get_delta_difference): Likewise.
2915         (expand_ptrmemfunc_cst): Likewise.
2916         (dubious_conversion_warnings): Likewise.
2918 2004-09-27  Matt Austern  <austern@apple.com>
2920         * cp/parser.c (struct cp_token): New one-bit field , implicit_extern_c
2921         (cp_lexer_get_preprocessor_token): Set implicit_extern_c for
2922         tokens that come from headers that are implicitly extern "C".
2923         (struct cp_parser): new one-bit field, implicit_extern_c.
2924         (cp_parser_new): Set parser's implicit_extern_c to false.
2925         (cp_parser_translation_unit): Pop lang context if we were in a
2926         header that was implicitly extern "C".
2927         (cp_parser_declaration_seq_opt): Push/pop lang context as
2928         required by the token's and parser's implicit_extern_c.
2930 2004-09-27  Mark Mitchell  <mark@codesourcery.com>
2932         PR c++/17585
2933         * cp-tree.h (shared_member_p): Declare.
2934         * search.c (shared_member_p): Give it external linkage.
2935         * semantics.c (finish_qualified_id_expr): Use it.
2936         (finish_id_expression): Likewise.
2938         PR c++/17585
2939         * semantics.c (finish_id_expression): Do not add "this->" to
2940         static member functions.
2942 2004-09-27  Nathan Sidwell  <nathan@codesourcery.com>
2944         PR c++/17681
2945         * error.c (dump_type): Change TREE_VEC case into TREE_BINFO.
2947         * class.c (struct count_depth_data): Remove.
2948         (dfs_depth_post, dfs_depth_q): Remove.
2949         (find_final_overrider): Use number of vbase classes as depth
2950         bound.
2952         * cp-tree.h (types_overlap_p): Remove.
2953         * search.c (struct overlap_info): Remove.
2954         (dfs_check_overlap, dfs_no_overlap_yet, types_overlap_p): Remove.
2956         * pt.c (GTB_VIA_VIRTUAL, GTB_IGNORE_TYPE): Remove.
2957         (get_template_base_recursive): Remove. Replace with ...
2958         (get_template_base_r): ... this.
2959         (struct get_template_base_data_s): New.
2960         (get_template_base): Use get_template_base_r via dfs_walk.  Always
2961         return NULL on failure.
2962         (unify): Remove error_mark_node check from get_template_base result.
2964 2004-09-24  Paolo Bonzini  <bonzini@gnu.org>
2966         * parser.c (cp_parser_expression_stack): Clarify why it is
2967         an array of NUM_PREC_VALUES elements.
2968         (cp_parser_binary_expression): Clarify why we do not need to
2969         handle stack overflow.
2971 2004-09-24  Nathan Sidwell  <nathan@codesourcery.com>
2973         PR c++/16889
2974         * search.c (lookup_field_queue_p): Correct check for hidden base.
2976         * search.c (bfs_walk): Remove.
2977         (lookup_member): Use dfs_walk_real.
2978         (dfs_walk_real): Move and adjust documentation from bfs_walk.
2980 2004-09-23  Zack Weinberg  <zack@codesourcery.com>
2982         * decl.c (grokfndecl): If ::main is found not to return int,
2983         correct it after issuing a diagnostic.
2984         (grokdeclarator): If the incoming type was error_mark_node, do
2985         not complain about declaring something with no type.
2986         (start_function): Change check for ::main not returning int to
2987         an assertion, as grokfndecl now catches this when the user did it.
2988         * init.c (perform_member_init, sort_mem_initializers)
2989         (emit_mem_initializers): Make most diagnostics be issued on
2990         the line of current_function_decl, not whatever the current
2991         input line is.
2992         * parser.c (cp_lexer_peek_token_emit_debug_info): Surround
2993         definition and declaration with #ifdef ENABLE_CHECKING.
2994         Avoid unnecessary use of fprintf.
2995         (cp_lexer_print_token, cp_lexer_debug_stream): Adjust stub
2996         definitions to avoid warnings.
2997         (cp_lexer_new_main): Add assertion that first token is not a
2998         padding token.
2999         (cp_lexer_new_from_token_array): Fold into ...
3000         (cp_lexer_new_from_tokens): ... here.  Add assertion that
3001         first token is not a padding token.
3002         (cp_lexer_set_source_position_from_token): Move nearer to callers.
3003         Remove unused lexer argument.
3004         (cp_lexer_peek_token): Just print debugging report (if enabled)
3005         and return lexer->next_token.
3006         (cp_lexer_skip_purged_tokens): Delete.
3007         (cp_lexer_next_token_is, cp_lexer_next_token_is_not): Make
3008         inline, simplify bodies.
3009         (cp_lexer_peek_nth_token): Add debugging report a la
3010         cp_lexer_peek_token.
3011         (cp_lexer_consume_token): Correct commentary.  Advance over
3012         purged tokens here.  Set current source position here, from
3013         token to be returned.  Avoid unnecessary use of fprintf.
3014         (cp_lexer_purge_token): Advance next_token pointer over this and
3015         subsequent purged tokens.
3016         (cp_parser_error): Adjust source position to that of the
3017         peeked token.
3018         (cp_parser_push_lexer_for_tokens, cp_parser_pop_lexer): New functions.
3019         (cp_parser_string_literal): Remove some excessive cleverness.
3020         (cp_parser_enum_specifier): Call start_enum before consuming
3021         the opening brace.
3022         (cp_parser_member_declaration): Make the "extra semicolon"
3023         diagnostic consistently-worded with the other place this is
3024         diagnosed.  Explicitly set the diagnostic location to the
3025         location of the offending semicolon.
3026         (cp_parser_enclosed_template_argument_list): Use %</%> quoting
3027         in diagnostics.  Do not use cp_parser_require.  Set location
3028         of diagnostics about improper use of '>>' to location of
3029         offending token.
3030         (cp_parser_late_parsing_for_member):
3031         Use cp_parser_push_lexer_for_tokens and cp_parser_pop_lexer.
3032         (cp_parser_late_parsing_default_args): Likewise.  Manually
3033         move some logic outside the loop.
3035 2004-09-23  Andrew Pinski  <pinskia@physics.uc.edu>
3037         PR c++/17618
3038         * cvt.c (cp_convert_to_pointer): Return early when the type is
3039         an error_mark_node.
3041 2004-09-21 Fariborz Jahanian <fjahanian@apple.com>
3043         PR c++/13989
3044         PR c++/9844
3045         * decl.c (grokfndecl): Add new argument "attrlist", use it
3046         to call cplus_decl_attributes.
3047         (start_function): Remove call to cplus_decl_attributes.
3048         * cvt.c (ocp_convert): Add support to use type conversion
3049         function to vector type.
3050         * parser.c (cp_parser_conversion_type_id): Add attributes, if any,
3051         to the parsed type.
3053 2004-09-23  Paolo Bonzini  <bonzini@gnu.org>
3055         PR c++/17596
3057         * parser.c (cp_parser_token_tree_map_node,
3058         cp_parser_pm_expression, cp_parser_additive_expression,
3059         cp_parser_multiplicative_expression, cp_parser_shift_expression,
3060         cp_parser_relational_expression, cp_parser_equality_expression,
3061         cp_parser_and_expression, cp_parser_exclusive_or_expression,
3062         cp_parser_inclusive_or_expression,
3063         cp_parser_logical_and_expression,
3064         cp_parser_logical_or_expression): Removed.
3065         (enum cp_parser_prec, struct cp_parser_token_tree_map_node,
3066         binops, binops_by_token): New.
3067         (cp_parser_assignment_expression): Use cp_parser_binary_expression.
3068         (cp_parser_new): Initialize binops_by_token.
3069         (cp_parser_binary_expression): Rewritten.
3070         (N_CP_TTYPES): New.
3072 2004-09-23  Kazu Hirata  <kazu@cs.umass.edu>
3074         * parser.c: Fix a comment typo.
3076 2004-09-23  Nathan Sidwell  <nathan@codesourcery.com>
3078         PR c++/17620
3079         * decl.c (xref_basetypes): Look through typedefs before checking
3080         for duplicate base.
3082 2004-09-22  Nathan Sidwell  <nathan@codesourcery.com>
3084         * cp-tree.h (unemitted_tinfo_decls): Make a VEC(tree).
3085         * decl2.c (cp_finish_file): Adjust tinfo decl emission loop.
3086         * rtti.c (unemitted_tinfo_decls): Make a VEC(tree).
3087         (init_rtti_processing): Initialize it to something realistic.
3088         (get_tinfo_decl): Adjust pushing the new decl.
3090         * cp-tree.h (struct lang_type_class): Remove marked flags, add
3091         diamond_shaped and repeated_base flags.  Reorder to keep 8-bit blocks.
3092         (TYPE_MARKED_P): New.
3093         (CLASSTYPE_DIAMOND_SHAPED_P, CLASSTYPE_REPEATED_BASE_P): New.
3094         (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
3095         CLEAR_CLASSTYPE_MARKED_N): Remove.
3096         (CLASSTYPE_MARKED_*, SET_CLASSTYPE_MARKED_*,
3097         CLEAR_CLASSTYPE_MARKED_*): Remove.
3098         * decl.c (xref_basetypes): Use TYPE_MARKED_P. Determine diamond
3099         shaped and repeated base properties.
3100         * lex.c (cxx_make_type): Don't clear TYPE_ALIAS_SET.
3101         * rtti.c (dfs_class_hint_mark, dfs_class_hint_unmark,
3102         class_hint_flags): Remove.
3103         (get_pseudo_ti_init): Use CLASSTYPE_REPEATED_BASE_P and
3104         CLASSTYPE_DIAMOND_SHAPED_P.
3106 2004-09-21  Ziemowit Laski  <zlaski@apple.com>
3108         * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved here from
3109         cp-objcp-common.h.
3110         (objcp_tsubst_copy_and_build): Reformat function signature.
3111         * cp-objcp-common.h (objcp_tsubst_copy_and_build): Likewise.
3112         (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved to cp-lang.c.
3114 2004-09-21  Zack Weinberg  <zack@codesourcery.com>
3116         * parser.c (cp_lexer_peek_token, cp_lexer_consume_token):
3117         Don't handle CPP_PRAGMA tokens specially.
3118         (cp_lexer_handle_pragma): Use cp_lexer_consume_token.  Don't
3119         purge the token; do clear token->value after processing.  Add
3120         assertion at beginning that token->value is nonzero.
3121         (cp_parser_statement, cp_parser_declaration_seq_opt): Handle
3122         CPP_PRAGMA as a full statement or declaration in its own right.
3124 2004-09-21  Matt Austern  <austern@apple.com>
3126         PR c++/15049
3127         * decl.c (grokvardecl): Accept declarations of global variables
3128         using anonymous types.
3130 2004-09-21  Roger Sayle  <roger@eyesopen.com>
3132         PR c++/7503
3133         * tree.c (lvalue_p_1):  Disallow MIN_EXPR and MAX_EXPR as lvalues
3134         if either operand has side-effects.
3135         * typeck.c (rationalize_conditional_expr): Assert that neither
3136         operand of MIN_EXPR or MAX_EXPR has side-effects.
3137         (build_modify_expr):  Add support for MIN_EXPR and MAX_EXPR.
3138         Check that the "lhs" is a valid lvalue, i.e. that neither operand
3139         of a MIN_EXPR or MAX_EXPR has a side-effect.
3141 2004-09-21  Nathan Sidwell  <nathan@codesourcery.com>
3143         * cp-tree.h (struct lang_type_header): Remove
3144         uses_multiple_inheritance field.
3145         (TYPE_USES_MULTIPLE_INHERITANCE): Remove.
3146         (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): Remove.
3147         (TYPE_USES_VIRTUAL_BASECLASSES): Remove.
3148         (DECL_NEEDS_VTT_PARM_P): Use CLASSTYPE_VBASECLASSES.
3149         (TYPE_CONTAINS_VPTR_P): Likewise.
3150         * call.c (add_template_candidate_real): Use
3151         CLASSTYPE_VBASECLASSES.
3152         (build_special_member_call): Likewise.
3153         * class.c (finish_struct_bits): Remove
3154         TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P & TYPE_USES_VIRTUAL_BASECLASSES
3155         bookkeeping.
3156         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
3157         (create_vtable_ptr): Remove TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P
3158         bookkeeping.
3159         (build_vtt_inits): Use CLASSTYPE_VBASECLASSES.
3160         (accumulate_vtbl_inits, build_vbase_offset_vtbl_entries):
3161         Likewise.
3162         * decl.c (xref_basetypes): Remove TYPE_USES_MULTIPLE_INHERITANCE,
3163         TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
3164         bookkeeping.
3165         (cxx_maybe_build_cleanup): Use CLASSTYPE_VBASECLASSES.
3166         * decl2.c (maybe_retrofit_in_chrg): Likewise.
3167         * init.c (expand_member, push_base_cleanups): Likewise.
3168         * pt.c (instantiate_class_template): Remove
3169         TYPE_USES_MULTIPLE_INHERITANCE,
3170         TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
3171         bookkeeping.
3172         * ptree.c (cxx_print_type): Remove TYPE_USES_MULTIPLE_INHERITANCE
3173         check.
3174         * typeck2.c (process_init_constructor): Replace some sorrys with
3175         asserts.
3177 2004-09-21  Andreas Tobler  <a.tobler@schweiz.ch>
3179         * decl.c (reshape_init_array): Initialize max_index_cst to fix
3180         bootstrap failure.
3182 2004-09-20  Mark Mitchell  <mark@codesourcery.com>
3184         PR c++/17530
3185         * pt.c (tsubst): Fix parentheses to accomodate emacs.
3186         (tsubst_baselink): If we get a single function, mark it as used.
3188 2004-09-20  Matt Austern <austern@apple.com>
3189             Zack Weinberg  <zack@codesourcery.com>
3191         * decl.c (make_rtl_for_nonlocal_decl, start_preparsed_function):
3192         Apply lbasename to input_filename before passing to get_fileinfo.
3193         * semantics.c (begin_class_definition): Likewise.
3194         * lex.c (handle_pragma_interface): Apply get_fileinfo to the
3195         correct filename.  Rename variables to be less confusing.
3196         (handle_pragma_implementation): Likewise.  Disable "appears
3197         after file is included" diagnostic.
3199         * parser.c (struct cp_token): Add in_system_header fiag.
3200         (CP_TOKEN_BLOCK_NUM_TOKENS, struct cp_token_block)
3201         (CP_TOKEN_BUFFER_SIZE, cp_token_cache_push_token)
3202         (CPP_NONE, cp_lexer_read_token): Delete.
3203         (struct cp_lexer): Remove first_token, string_tokens,
3204         main_lexer_p fields.  Clarify comments.
3205         (struct cp_token_cache): Now just a pair of pointers.
3206         (CP_LEXER_BUFFER_SIZE): New #define.
3207         (CPP_PURGED): New fake token type.
3208         (cp_lexer_new_from_token_array, cp_lexer_destroy)
3209         (cp_lexer_peek_token_emit_debug_info, cp_lexer_skip_purged_tokens)
3210         (cp_lexer_handle_pragma, cp_token_cache_new, cp_parser_string_literal):
3211         New functions.
3212         (cp_lexer_new_from_tokens): Now a simple wrapper around
3213         cp_lexer_new_from_token_array.
3214         (cp_lexer_set_source_position_from_token): Also update
3215         in_system_header.
3216         (cp_lexer_next_token, cp_lexer_prev_token, cp_lexer_advance_token):
3217         Don't wrap round.
3218         (cp_lexer_token_difference): Dont handle wrapping round.
3219         (cp_lexer_new_main): Enable pragma deferral and raw strings,
3220         read the entire translation unit through c_lex_with_flags into
3221         this lexer's buffer, then turn raw strings back off again.
3222         (cp_lexer_grow_buffer): Adjust for buffer no longer being circular.
3223         (cp_lexer_get_preprocessor_token): No need to handle not being
3224         the main lexer.  Set token->in_system_header too.
3225         (cp_lexer_peek_token): Skip purged tokens.  Feed pragma tokens
3226         to cp_lexer_handle_pragma.  No need to call cp_lexer_read_token.
3227         (cp_lexer_peek_nth_token): Likewise.
3228         (cp_lexer_purge_token): Mark the token PURGED, don't shift all
3229         the other tokens down.
3230         (cp_lexer_purge_tokens_after): Likewise.
3231         (cp_lexer_save_tokens, cp_lexer_rollback_tokens): Don't worry
3232         about there being no tokens.
3233         (cp_lexer_print_token): Revise to give useful information on
3234         all tokens.
3235         (struct cp_parser): Add field translate_strings_p.
3236         (cp_parser_new): Initialize it.
3237         (cp_parser_translation_unit): Destroy the lexer when done.
3238         (cp_parser_parameter_declaration): Restructure saving of
3239         default arguments.
3240         (cp_parser_save_member_function_body): Likewise.
3241         (cp_parser_check_for_invalid_template_id)
3242         (cp_parser_nested_name_specifier_opt, cp_parser_template_id):
3243         Adjust calls to cp_lexer_advance_token.
3244         (cp_parser_skip_to_closing_parenthesis, cp_parser_declaration):
3245         No need to fiddle c_lex_string_translate.
3246         (cp_parser_primary_expression, cp_parser_linkage_specification)
3247         (cp_parser_asm_definition, cp_parser_asm_specification_opt)
3248         (cp_parser_asm_operand_list, cp_parser_asm_clobber_list)
3249         Use cp_parser_string_literal.
3250         (cp_parser_attribute_list): Save and restore
3251         parser->translate_strings_p, not c_lex_string_translate.
3252         (cp_parser_cache_group): Delete.
3253         (cp_parser_cache_group_1): Rename cp_parser_cache_group.  Do
3254         not take a cache argument.
3256 2004-09-20  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
3258         PR c++/14179
3259         * decl.c (reshape_init): Extract array handling into...
3260         (reshape_init_array): New function. Use integers instead of trees
3261         for indices. Handle out-of-range designated initializers.
3263 2004-09-20  Steven Bosscher  <stevenb@suse.de>
3265         * lex.c (cxx_init): Don't set the ridpointer for RID_NULL
3266         to null_node.
3268 2004-09-19  Mark Mitchell  <mark@codesourcery.com>
3270         * decl2.c (determine_visibility): Allow class visibility
3271         directives to override targetm.cxx.export_class_data.
3273 2004-09-18  Kazu Hirata  <kazu@cs.umass.edu>
3275         * call.c, semantics.c: Follow spelling conventions.
3276         * class.c: Fix a comment typo.
3278 2004-09-16  Geoffrey Keating  <geoffk@apple.com>
3280         PR pch/13361
3281         * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
3282         (handle_pragma_implementation): Likewise.
3284 2004-09-17  Jeffrey D. Oldham  <oldham@codesourcery.com>
3285             Zack Weinberg  <zack@codesourcery.com>
3287         * cp-tree.def: Use tree_code_class enumeration constants
3288         instead of code letters.
3289         * call.c, class.c, cp-gimplify.c, cp-lang.c, cxx-pretty-print.c
3290         * mangle.c, pt.c, semantics.c, tree.c, typeck.c:
3291         Update for new tree-class enumeration constants.
3293 2004-09-16  Mark Mitchell  <mark@codesourcery.com>
3295         PR c++/16002
3296         * parser.c (cp_parser_simple_declaration): Commit to tentative
3297         parses after seeing a decl-specifier.
3298         (cp_parser_simple_declaration): Eliminate spurious message.
3299         (cp_parser_init_declarator): Adjust error message.
3301         PR c++/16029
3302         * lex.c (unqualified_name_lookup_error): Mark the dummy
3303         declaration as used.
3305         PR c++/17501
3306         * parser.c (cp_parser_nested_name_specifier): Do not resolve
3307         typename types if the user explicitly said "typename".
3309 2004-09-16  Andrew MacLeod  <amacleod@redhat.com>
3311         * error.c (dump_decl): Make sure there is lang_specific info before
3312         checking for DTOR and CTOR decls.
3314 2004-09-16  Nathan Sidwell  <nathan@codesourcery.com>
3316         * class.c (copy_virtuals): Remove.
3317         (build_primary_vtable): Use copy_list directly.
3318         (build_secondary_vtable): Likewise.
3319         (update_vtable_entry_for_fn): Clear BV_CALL_INDEX here.
3320         (create_vtable_ptr): Likewise.
3322 2004-09-16  Kazu Hirata  <kazu@cs.umass.edu>
3324         * search.c: Follow spelling conventions.
3326 2004-09-16  Nathan Sidwell  <nathan@codesourcery.com>
3328         * cp-tree.h (struct lang_type_class): Make pure_virtuals a
3329         VEC(tree).
3330         (CLASSTYPE_INLINE_FRIENDS, CLASSTYPE_PURE_VIRTUALS): Update
3331         comments.
3332         * call.c (build_new_method_call): Don't confirm a pure virtual is
3333         in CLASSTYPE_PURE_VIRTUALS.  Reorder checks. Make it a warning.
3334         * class.c (check_methods): CLASSTYPE_INLINE_FRIENDS is a VEC(tree).
3335         (fixup_inline_methods, finish_struct): Likewise.
3336         * decl.c (finish_method): Likewise.
3337         * search.c (dfs_get_pure_virtuals, get_pure_virtuals):
3338         CLASSTYPE_PURE_VIRTUALS is a VEC(tree).
3339         * typeck2.c (abstract_virtuals_error): Likewise. Truncate the
3340         vector to avoid repeating the list in error messages.
3342 2004-09-15  Mark Mitchell  <mark@codesourcery.com>
3344         * cp-objcp-common.h (LANG_HOOKS_COMDAT_GROUP): Define.
3345         * cp-tree.h (cxx_comdat_group): Declare.
3346         * decl.c (cxx_comdat_group): New function.
3348 2004-09-15  Nathan Sidwell  <nathan@codesourcery.com>
3350         * search.c (get_pure_virtuals): Remove unused variables.
3352         * cp-tree.h (struct lang_decl_flags): Remove
3353         needs_final_overrider.
3354         (DECL_NEEDS_FINAL_OVERRIDER_P): Remove.
3355         * decl.c (duplicate_decls): Do not copy DECL_NEEDS_FINAL_OVERRIDER_P.
3356         * class.c (finish_struct_bits): Correct comment about
3357         CLASSTYPE_PURE_VIRTUALS.
3358         * search.c (get_pure_virtuals): Remove useless loop.
3360 2004-09-14  Mark Mitchell  <mark@codesourcery.com>
3362         PR c++/17324
3363         * mangle.c (partially_mangled_name): New variable.
3364         (partially_mangled_name_len): Likewise.
3365         (save_partially_mangled_name): New function.
3366         (restore_partially_mangled_name): Likewise.
3367         (write_encoding): Save and restore partially mangled names around
3368         calls to get_mostly_instantiated_function_type.
3369         (write_unqualified_name): Likewise.
3371 2004-09-14  Nathan Sidwell  <nathan@codesourcery.com>
3373         * pt.c (unify): Replace gcc_unreachable with gcc_assert.
3375 2004-09-13  Mark Mitchell  <mark@codesourcery.com>
3377         PR c++/16162
3378         * parser.c (cp_parser_id_expression): Correct value for
3379         is_declarator.
3380         (cp_parser_nested_name_specifier_opt): Look through typenames as
3381         necessary.
3382         (cp_parser_template_name): Honor check_dependency_p.
3384         PR c++/16716
3385         * parser.c (cp_parser_parse_and_diagnose_invalid_type_name):
3386         Robustify.
3388         PR c++/17327
3389         * pt.c (unify): Add ENUMERAL_TYPE case.  Replace sorry with
3390         gcc_unreacable.
3392 2004-09-12  Richard Henderson  <rth@redhat.com>
3394         PR c++/16254
3395         * semantics.c (maybe_cleanup_point_expr): Don't call fold.
3396         * typeck.c (condition_conversion): Likewise.
3398 2004-09-11  Richard Henderson  <rth@redhat.com>
3400         PR c++/17404
3401         * pt.c (cur_stmt_expr): Move from tsubst_expr.
3402         (tsubst_expr) <case STMT_EXPR>: Move ...
3403         (tsubst_copy_and_build): ... here.
3405 2004-09-10  Zack Weinberg  <zack@codesourcery.com>
3407         * cp-tree.h (interface_only, interface_unknown): Delete declarations;
3408         comment explaining them moved to c-common.h.
3409         * lex.c (interface_only, interface_unknown, extract_interface_info):
3410         Delete definitions.
3411         (cxx_finish): Don't reset interface_unknown.
3412         (handle_pragma_interface): Don't set interface_only and
3413         interface_unknown; just the like-named fields in finfo.
3414         (handle_pragma_implementation): Adjust comment.
3415         * decl2.c (cp_finish_file): Don't reset interface_only and
3416         interface_unknown.
3417         * method.c (synthesize_method): Don't reset interface_unknown or
3418         call extract_interface_info.
3419         * pt.c (pop_tinst_level): Don't call extract_interface_info.
3420         * decl.c (start_cleanup_fn): Don't save or restore interface_only
3421         and interface_unknown.
3422         (make_rtl_for_nonlocal_decl): Call get_fileinfo on input_filename
3423         and use the result instead of the interface_only/interface_unknown
3424         globals.
3425         (start_preparsed_function): Likewise.
3426         * lex.c (cxx_make_type): Likewise.
3427         * semantics.c (begin_class_definition): Likewise.
3428         (expand_body): Don't call extract_interface_info.
3430 2004-09-10  Ziemowit Laski  <zlaski@apple.com>
3432         * decl.c (objc_mark_locals_volatile): Make description of
3433         routine more descriptive; only mark VAR_DECLs at each
3434         binding level.
3436 2004-09-10  Richard Henderson  <rth@redhat.com>
3438         PR c++/17386
3439         * call.c (build_vfield_ref): Move...
3440         * class.c (build_vfield_ref): ... here.  Convert datum to the
3441         primary base containing the vptr.
3442         (make_new_vtable): Simplify build_primary_vtable arguments.
3443         (finish_struct_1): Do not duplicate TYPE_VFIELD.
3444         * typeck.c (build_class_member_access_expr): Don't warn for
3445         null object access to base fields.
3447 2004-09-10  Ziemowit Laski  <zlaski@apple.com>
3449         * decl.c (objc_get_current_scope, objc_mark_locals_volatile):
3450         New functions, to be called from ObjC++.
3452 2004-09-10  Kazu Hirata  <kazu@cs.umass.edu>
3454         * class.c, cp-tree.h, decl.c, decl2.c, mangle.c,
3455         name-lookup.h, parser.c, search.c, semantics.c, typeck2.c: Fix
3456         comment typos.
3458 2004-09-09  Ziemowit Laski  <zlaski@apple.com>
3460         * typeck.c (build_c_cast): Preserve the cast if casting
3461         to and from an Objective-C type.
3463 2004-09-09  Ziemowit Laski  <zlaski@apple.com>
3465         * Make-lang.in (cp/typeck.o): Depend on c-common.h.
3466         * typeck.c: Include c-common.h.
3467         (comptypes): For RECORD_TYPEs, call objc_comptypes() and
3468         return the result if nonnegative.
3470 2004-09-09  Zack Weinberg  <zack@codesourcery.com>
3472         * decl2.c (import_export_class)
3473         * lex.c (handle_pragma_interface):
3474         Test MULTIPLE_SYMBOL_SPACES with if, not #ifdef.
3476 2004-09-08  Ziemowit Laski  <zlaski@apple.com>
3478         * Make-lang.in (cp/semantics.o): Depend on c-common.h.
3479         * semantics.c: Include c-common.h.
3480         (finish_compound_stmt): Call objc_clear_super_receiver().
3482 2004-09-08  Ziemowit Laski  <zlaski@apple.com>
3484         * cp-tree.h (do_poplevel): New prototype.
3485         * semantics.c (do_poplevel): Make externally visible.
3487 2004-09-08  Nathan Sidwell  <nathan@codesourcery.com>
3489         * cp-tree.h (tree_pair_s): Define a GC'd vector.
3490         * name-lookup.h (cxx_saved_binding, cp_class_binding): Likewise.
3491         * semantics.c (deferred_access): Likewise.
3493 2004-09-06  Daniel Jacobowitz  <dan@debian.org>
3495         * semantics.c (expand_body): Assert that we are not nested.
3497 2004-09-06  Zack Weinberg  <zack@codesourcery.com>
3499         * decl.c (build_enumerator): Use add_double and int_fits_type_p
3500         instead of cp_build_binary_op, to avoid creating short-lived trees.
3501         * parser.c (cp_parse_type_specifier <RID_ENUM>): Use two-token
3502         lookahead instead of backtracking.  Move some code to avoid a
3503         conditional branch.
3504         (cp_parser_enum_specifier): Avoid duplication of effort with caller.
3505         Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
3506         (cp_parser_enumerator_list, cp_parser_enumerator_definition):
3507         Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
3509 2004-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3511         * decl.c (grok_declarator): Remove a redundant semicolon.
3513         * parser.c (cp_parser_decl_specifier_seq, cp_parser_type_specifier):
3514         Correct comments describing function parameters.
3516 2004-09-03  Matt Austern  <austern@apple.com>
3517         Compile speed improvement.
3518         * parser.c (cp_lexer_print_token): Only define if ENABLE_CHECKING set.
3519         Otherwise define a stub macro that expands to nothing.
3520         (cp_lexer_debugging_p): Only define if ENABLE_CHECKING set.  Otherwise
3521         define a stub macro that expands to 0.
3522         (cp_lexer_start_debugging): Only define if ENABLE_CHECKING set.
3523         (cp_lexer_stop_debugging): Likewise.
3524         (cp_lexer_debug_stream): Only define if ENABLE_CHECKING set.  Otherwise
3525         define a stub macro that expands to NULL.
3526         (cp_lexer_new_main): Only set debugging_p if ENABLE_CHECKING set.
3527         (cp_lexer_new_from_tokens): Likewise.
3529 2004-09-03  Jan Hubicka  <jh@suse.cz>
3531         * decl.c (finish_function): Clean out pointers we no longer need.
3533 2004-09-03  Jan Beulich  <jbeulich@novell.com>
3535         * g++spec.c (MATH_LIBRARY_PROFILE): Default to MATH_LIBRARY rather
3536         than "-lm".
3538 2004-09-02  Paul Brook  <paul@codesourcery.com>
3540         * decl2.c (determine_visibility): Only check data visibility
3541         for VAR_DECLS.
3543 2004-08-31  Mark Mitchell  <mark@codesourcery.com>
3545         * cp-tree.h (DECL_CONSTRUCTION_VTABLE_P): New macro.
3546         * class.c (build_ctor_vtbl_group): Set DECL_CONSTRUCTION_VTABLE_P.
3547         * decl2.c (determine_visibility): Honor
3548         TARGET_CXX_EXPORT_CLASS_DATA.
3550         * class.c (key_method): Rename to ...
3551         (determine_key_method): ... this.
3552         (finish_struct_1): Adjust accordingly.
3553         * cp-tree.h (key_method): Declare.
3554         * decl2.c (maybe_emit_vtables): Determine the key method here if
3555         it has not already been done.
3557 2004-08-31  Ziemowit Laski  <zlaski@apple.com>
3559         * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-objcp-common.o.
3560         (cp/cp-lang.o): Depend on debug.h, gtype-cp.h and cp/cp-objcp-common.h.
3561         (cp/cp-decl.c): Do not depend on gtype-cp.h.
3562         (cp/cp-objcp-common.o): New target.
3563         * cp-lang.c: Include debug.h, cp-objcp-common.h and gtype-cp.h.
3564         (cxx_get_alias_set, cxx_warn_unused_global_decl, cp_expr_size,
3565         cp_tree_size, cp_var_mod_type_p, cxx_initialize_diagnostics): Move
3566         prototypes and definitions to cp-objcp-common.h and cp-objcp-common.c,
3567         respectively.
3568         (LANG_HOOKS_TREE_SIZE, LANG_HOOKS_FINISH,
3569         LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_INIT_OPTIONS,
3570         LANG_HOOKS_INITIALIZE_DIAGNOSTICS, LANG_HOOKS_HANDLE_OPTION,
3571         LANG_HOOKS_HANDLE_FILENAME, LANG_HOOKS_MISSING_ARGUMENT,
3572         LANG_HOOKS_POST_OPTIONS, LANG_HOOKS_GET_ALIAS_SET,
3573         LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_EXPAND_EXPR,
3574         LANG_HOOKS_EXPAND_DECL, LANG_HOOKS_PARSE_FILE,
3575         LANG_HOOKS_DUP_LANG_SPECIFIC_DECL, LANG_HOOKS_TRUTHVALUE_CONVERSION,
3576         LANG_HOOKS_SET_DECL_ASSEMBLER_NAME, LANG_HOOKS_MARK_ADDRESSABLE,
3577         LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
3578         LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
3579         LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_PRINT_ERROR_FUNCTION,
3580         LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL, LANG_HOOKS_WRITE_GLOBALS,
3581         LANG_HOOKS_FUNCTION_INIT, LANG_HOOKS_FUNCTION_FINAL,
3582         LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P,
3583         LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE,
3584         LANG_HOOKS_ATTRIBUTE_TABLE, LANG_HOOKS_TREE_INLINING_WALK_SUBTREES,
3585         LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN,
3586         LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS,
3587         LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P,
3588         LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P,
3589         LANG_HOOKS_TREE_INLINING_VAR_MOD_TYPE_P,
3590         LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN,
3591         LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN, LANG_HOOKS_EXPR_SIZE,
3592         LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR,
3593         LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, LANG_HOOKS_MAKE_TYPE,
3594         LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE,
3595         LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
3596         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE, LANG_HOOKS_INCOMPLETE_TYPE_ERROR,
3597         LANG_HOOKS_TYPE_PROMOTES_TO, LANG_HOOKS_REGISTER_BUILTIN_TYPE,
3598         LANG_HOOKS_GIMPLIFY_EXPR, LANG_HOOKS_FOLD_OBJ_TYPE_REF): Move
3599         hooks to cp-objcp-common.h.
3600         (finish_file): New function.
3601         * cp-objcp-common.c: New file.
3602         * cp-objcp-common.h: New file.
3603         * cp-tree.h (cp_finish_file): New prototype.
3604         * decl.c: Do not include gtype-cp.h.
3605         * decl2.c (finish_file): Rename to cp_finish_file.
3607 2004-08-31  Richard Henderson  <rth@redhat.com>
3609         PR c++/17221
3610         * pt.c (tsubst_expr): Move OFFSETOF_EXPR handling ...
3611         (tsubst_copy_and_build): ... here.
3613 2004-08-30  Mark Mitchell  <mark@codesourcery.com>
3615         * cp-tree.h (initialize_artificial_var): Declare.
3616         * decl.c (initialize_artifical_var): New function.
3617         * class.c (initialize_array): Remove.
3618         (initialize_vtable): Use initialize_artificial_var.
3619         (build_vtt): Likewise.
3620         (build_ctor_vtbl_group): Likewise.
3622 2004-08-30  Richard Henderson  <rth@redhat.com>
3624         * class.c (build_base_path): Use build_address directly.
3625         * typeck.c (build_unary_op): Don't lower &a.b to pointer
3626         arithmetic directly.
3627         * typeck2.c (store_init_value): Don't assume !TREE_CONSTANT
3628         means !initializer_constant_valid_p.
3630 2004-08-30  Richard Henderson  <rth@redhat.com>
3632         * class.c (fixed_type_or_null): Use get_base_address before
3633         assuming an ADDR_EXPR is non-null.
3635 2004-08-30  Nathan Sidwell  <nathan@codesourcery.com>
3637         * name-lookup.c (pop_binding, pushdecl,
3638         set_identifier_type_value_with_scope, push_overloaded_decl,
3639         arg_assoc_type): Replace abort with gcc_assert or gcc_unreachable.
3640         * parser.c (cp_parser_diagnose_invalid_type_name,
3641         cp_parser_postfix_expression, cp_parser_unary_expression,
3642         cp_parser_check_declarator_template_para): Likewise.
3643         * pt.c (push_inline_template_parms_recursive,
3644         check_explicit_specialization, convert_nontype_argument,
3645         coerce_template_template_parms, uses_template_parms,
3646         instantiate_class_template, tsubst_decl, tsubst, tsubst_copy,
3647         tsubst_expr, instantiate_template,
3648         maybe_adjust_types_for_deduction, type_unification_real,
3649         resolve_overloaded_unification, template_decl_level,
3650         type_dependent_expression_p): Likewise.
3651         * search.c (lookup_base_r): Likewise.
3652         * semantics.c (finish_stmt_expr, simplify_aggr_init_expr): Likewise.
3653         * tree.c (lvalue_p_1, count_functions, cxx_printable_name,
3654         verify_stmt_tree_r, get_type_decl, stabilize_call): Likewise.
3655         * typeck.c (common_type, get_member_function_from_ptrfunc,
3656         build_binary_op, build_unary_op, expand_ptrmemfunc_cst): Likewise.
3657         * typeck2.c (cxx_incomplete_type_diagnostic,
3658         split_nonconstant_init_1, store_init_value,
3659         process_init_constructor): Likewise.
3661 2004-08-30  Nathan Sidwell  <nathan@codesourcery.com>
3663         * call.c (check_dtor_name): Replace abort with gcc_assert or
3664         gcc_unreachable.
3665         (build_call, add_builtin_candidate, build_new_op,
3666         convert_like_real, build_over_call, in_charge_arg_for_name,
3667         source_type, joust): Likewise.
3668         * class.c (build_simple_base_path, get_vcall_index,
3669         finish_struct_1, instantiate_type, get_enclosing_class,
3670         add_vcall_offset_vtbl_entries_1, cp_fold_obj_type_ref): Likewise.
3671         * cp-gimplify.c (cp_genericize): Likewise.
3672         * cp-lang.c (cp_expr_size, cp_tree_size): Likewise.
3673         * cvt.c (cp_convert_to_pointer, ocp_convert): Likewise.
3674         * decl.c (poplevel, make_unbound_class_template, reshape_init,
3675         check_special_function_return_type, grokdeclarator,
3676         grok_op_properties, tag_name, xref_tag, start_preparsed_function,
3677         finish_function): Likewise.
3678         * decl2.c (grokfield, maybe_emit_vtables):Likewise.
3679         * error.c (dump_global_iord, dump_decl, dump_template_decl,
3680         language_to_string): Likewise.
3681         * except.c (choose_personality_routine): Likewise.
3682         * friend.c (do_friend): Likewise.
3683         * g++spec.c (lang_specific_driver): Likewise.
3684         * init.c (build_zero_init, expand_default_init, build_new_1,
3685         build_vec_delete_1, build_vec_init, build_dtor_call): Likewise.
3686         * lex.c (retrofit_lang_decl, cp_type_qual_from_rid): Likewise.
3687         * mangle.c (add_substitution, write_unscoped_name,
3688         write_template_prefix, write_identifier,
3689         write_special_name_destructor, write_type, write_builtin_type,
3690         write_expression, write_template_param,
3691         write_java_integer_type_codes): Likewise.
3692         * method.c (implicitly_declare_fn): Likewise.
3694 2004-08-30  Nathan Sidwell  <nathan@codesourcery.com>
3696         * cp-tree.h (BINFO_PRIMARY_P): Use a binfo flag.
3697         (BINFO_INDIRECT_PRIMARY_P): Remove.
3698         * class.c (determine_primary_base): Rename to ...
3699         (determine_primary_bases): ... here.  Set all primary bases.
3700         (set_primary_base): Remove.
3701         (mark_primary_bases): Remove.
3702         (build_simple_base_path, walk_subobject_offsets,
3703         propagate_binfo_offsets, end_of_class): Adjust.
3704         (layout_class_type): Rename determine_primary_base call.
3705         (dump_class_hierarchy_r, dump_vtable): Adjust. Don't pass a binfo
3706         to type_as_string.
3707         (dfs_build_secondary_vptr_vtt_inits, dfs_accumulate_vtbl_inits,
3708         build_rtti_vtbl_entries): Adjust.
3709         * init.c (build_vtbl_address): Adjust.
3711         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Use gcc_assert.
3713 2004-08-28  Ziemowit Laski  <zlaski@apple.com>
3715         * Make-lang.in (CXX_OBJS): Split up into CXX_OBJS and
3716         CXX_AND_OBJCXX_OBJS.
3717         (CXX_C_OBJS): Include in CXX_AND_OBJCXX_OBJS instead of listing
3718         separately on the link line.
3720 2004-08-28  Jason Merrill  <jason@redhat.com>
3722         * decl.c (expand_static_init): Avoid bogus warnings.
3724 2004-08-27  Jason Merrill  <jason@redhat.com>
3726         PR c++/16851
3727         * tree.c (stabilize_init): See through a COMPOUND_EXPR.
3729         PR c++/13684
3730         * decl.c (expand_static_init): Use thread-safety API.
3731         (register_dtor_fn): Return the call, don't expand it.
3732         * tree.c (add_stmt_to_compound): New fn.
3733         (stabilize_call): Use it.
3735 2004-08-27  Richard Henderson  <rth@redhat.com>
3737         * cp-tree.def (OFFSETOF_EXPR): New.
3738         * parser.c (cp_parser_builtin_offsetof): Either built an
3739         OFFSETOF_EXPR, or call fold_offsetof immediately.
3740         * pt.c (tsubst_expr): Handle OFFSETOF_EXPR.
3742 2004-08-27  Nathan Sidwell  <nathan@codesourcery.com>
3744         * call.c (validate_conversion_obstack): Replace
3745         my_friendly_assert with gcc_assert or gcc_unreachable.
3746         (direct_reference_binding, merge_conversion_sequences,
3747         build_user_type_conversion_1, perform_overload_resolution,
3748         build_op_delete_call, enforce_access, call_builtin_trap,
3749         build_over_call, build_special_member_call, build_new_method_call,
3750         initialize_reference): Likewise.
3751         * class.c (build_base_path, build_primary_vtable, alter_access,
3752         check_bases, update_vtable_entry_for_fn, layout_empty_base,
3753         clone_function_decl, adjust_clone_args,
3754         type_requires_array_cookie, include_empty_classes,
3755         finish_struct_1, resolve_address_of_overloaded_function,
3756         instantiate_type, get_vtbl_decl_for_binfo, build_vtt_inits,
3757         dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
3758         accumulate_vtbl_inits, build_vtbl_initializer,
3759         build_vbase_offset_vtbl_entries, build_rtti_vtbl_entries): Likewise.
3760         * cvt.c (build_up_reference, convert_to_reference): Likewise.
3761         * decl.c (poplevel, duplicate_decls, make_typename_type,
3762         cxx_init_decl_processing, reshape_init, check_initializer,
3763         make_rtl_for_nonlocal_decl, initialize_local_var, cp_finish_decl,
3764         expand_static_init, grokfndecl, grokvardecl, build_ptrmem_type,
3765         grokdeclarator, copy_fn_p, grok_op_properties, xref_tag,
3766         xref_basetypes, start_preparsed_function, save_function_data,
3767         finish_function, finish_method, maybe_register_incomplete_var,
3768         complete_vars): Likewise.
3769         * decl2.c (grok_array_decl, check_member_template,
3770         check_classfn, finish_static_data_member_decl, coerce_new_type,
3771         coerce_delete_type, import_export_class, decl_needed_p,
3772         determine_visibility, import_export_decl, build_cleanup,
3773         start_static_initialization_or_destructi, do_static_destruction,
3774         prune_vars_needing_no_initialization,
3775         build_offset_ref_call_from_tree): Likewise.
3776         * error.c (dump_decl, dump_expr): Likewise.
3777         * init.c (finish_init_stmts, build_zero_init,
3778         expand_virtual_init, expand_default_init, expand_aggr_init_1,
3779         build_offset_ref, build_new_1, build_delete, build_vbase_delete):
3780         Likewise.
3781         * mangle.c (write_method_parms, write_template_args,
3782         write_expression, write_template_arg): Likewise.
3783         * method.c (make_thunk, finish_thunk, use_thunk): Likewise.
3784         * name-lookup.c (pop_binding, begin_scope, leave_scope,
3785         resume_scope, push_using_decl, validate_nonmember_using_decl,
3786         is_ancestor, poplevel_class, set_inherited_value_binding_p,
3787         push_class_level_binding, do_class_using_decl, push_namespace,
3788         pop_namespace, add_using_namespace, ambiguous_decl,
3789         lookup_namespace_name, lookup_type_current_level,
3790         maybe_process_template_type_declaration): Likewise.
3791         * parser.c (cp_lexer_peek_nth_token,
3792         cp_parser_parse_and_diagnose_invalid_typ,
3793         cp_parser_translation_unit, cp_parser_template_id,
3794         cp_parser_lookup_name, cp_parser_late_parsing_for_member): Likewise.
3795         * pt.c (push_access_scope, finish_member_template_decl,
3796         push_inline_template_parms_recursive, add_outermost_template_args,
3797         get_innermost_template_args, begin_explicit_instantiation,
3798         end_explicit_instantiation, retrieve_specialization,
3799         is_specialization_of, is_specialization_of_friend,
3800         register_specialization, check_explicit_specialization,
3801         comp_template_parms, process_template_parm,
3802         process_partial_specialization, convert_nontype_argument,
3803         coerce_template_template_parms, coerce_template_parms,
3804         mangle_class_name_for_template, lookup_template_function,
3805         lookup_template_class, instantiate_class_template, tsubst_decl,
3806         tsubst_function_type, tsubst, tsubst_qualified_id, tsubst_copy,
3807         instantiate_template, fn_type_unification, type_unification_real,
3808         get_template_base, regenerate_decl_from_template,
3809         template_for_substitution, instantiate_decl,
3810         get_mostly_instantiated_function_type, dependent_scope_ref_p,
3811         value_dependent_expression_p, resolve_typename_type): Likewise.
3812         * repo.c (repo_emit_p): Likewise.
3813         * rtti.c (build_headof, get_tinfo_decl, get_pseudo_ti_init,
3814         create_tinfo_types, emit_tinfo_decl): Likewise.
3815         * search.c (lookup_base_r, lookup_base, lookup_field_1,
3816         dfs_access_in_type, build_baselink, lookup_member,
3817         adjust_result_of_qualified_name_lookup, copied_binfo): Likewise.
3818         * semantics.c (perform_or_defer_access_check,
3819         finish_non_static_data_member, finish_stmt_expr_expr,
3820         finish_stmt_expr, finish_call_expr, finish_pseudo_destructor_expr,
3821         finish_template_template_parm, finish_member_declaration,
3822         emit_associated_thunks): Likewise.
3823         * tree.c (build_target_expr_with_type, force_target_expr,
3824         copy_binfo, get_first_fn, cp_tree_equal): Likewise.
3825         * typeck.c (type_after_usual_arithmetic_conversions, comptypes,
3826         cxx_sizeof_or_alignof_type, perform_integral_promotions,
3827         build_class_member_access_expr, finish_class_member_access_expr,
3828         build_ptrmemfunc_access_expr, build_unary_op,
3829         unary_complex_lvalue, cxx_mark_addressable, build_modify_expr,
3830         build_ptrmemfunc, expand_ptrmemfunc_cst, check_return_expr
3831         * typeck2.c (complete_type_check_abstract,
3832         abstract_virtuals_error, process_init_constructor,
3833         add_exception_specifier): Likewise.
3835 2004-08-27  Nathan Sidwell  <nathan@codesourcery.com>
3837         * class.c (build_vtbl_initializer): Use ssize_int.
3838         * decl.c (complete_array_type): Likewise.
3839         * method.c (finish_thunk): Likewise.
3840         * search.c (get_dynamic_base_type): Likewise.
3842 2004-08-26  Richard Henderson  <rth@redhat.com>
3844         * cp-tree.h (DECL_FIELD_IS_BASE): New.
3845         * class.c (build_base_field): Set it.
3846         (build_simple_base_path): Use it.
3847         (fixed_type_or_null): Don't consider base fields definitive.
3849 2004-08-25  Roger Sayle  <roger@eyesopen.com>
3851         PR middle-end/16693
3852         PR tree-optimization/16372
3853         * decl.c (finish_enum): Make the precision of the enumerated type
3854         the same width as the underlying integer type.
3856 2004-08-25  Mark Mitchell  <mark@codesourcery.com>
3858         PR c++/17155
3859         * lex.c (build_lang_decl): Set DECL_NO_STATIC_CHAIN for all C++
3860         functions.
3862         * mangle.c (get_identifier_nocopy): Add cast.
3864         * cp-tree.h (mangle_type): Remove.
3865         * mangle.c (globals): GTY it.
3866         (mangle_obstack): New variable.
3867         (name_obstack): Likewise.
3868         (name_base): Likewise.
3869         (write_char): Adjust accordingly.
3870         (write_chars): Likewise.
3871         (write_string): Likewise.
3872         (start_mangling): Initialize G.substitutions only one.  Add
3873         ident_p parameter.
3874         (finish_mangling): Use VARRAY_CLEAR to reclaim
3875         storage in G.substitutions.  Use obstack_finish.
3876         (init_mangle): Adjust for changes to variable names above.
3877         Initialize G.substitutions.
3878         (mangle_decl_string): Adjust call to start_mangling.
3879         (get_identifier_nocopy): New function.
3880         (mangle_decl): Use it.
3881         (mangle_type_string): Adjust call to start_mangling.
3882         (mangle_special_for_type): Likewise.
3883         (mangle_vtt_for_type): Likewise.
3884         (mangle_ctor_vtbl_for_type): Likewise.
3885         (mangle_thunk): Likewise.
3886         (mangle_guard_variable): Likewise.
3887         (mangle_ref_init_variable): Likewise.
3889 2004-08-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3891         PR c++/14428
3892         * pt.c (redeclare_class_template): Check the type of non-type and
3893         template template parameter.
3895 2004-08-25  Nathan Sidwell  <nathan@codesourcery.com>
3897         * call.c (convert_class_to_reference): Adjust build_int_cst calls.
3898         (build_user_type_conversion_1, convert_like_real,
3899         build_java_interface_fn_ref, build_special_member_call): Likewise.
3900         * class.c (finish_struct_1, build_vtbl_initializer): Likewise.
3901         * cp-gimplify.c (cp_gimplify_expr): Likewise.
3902         * cvt.c (cp_convert_to_pointer): Likewise.
3903         * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
3904         * decl2.c (start_static_initialization_or_destruction,
3905         generate_ctor_or_dtor_function): Likewise.
3906         * except.c (build_throw): Likewise.
3907         * mangle.c (write_integer_cst): Likewise.
3908         * method.c (finish_thunk): Likewise.
3909         * rtti.c (build_headof, get_tinfo_decl_dynamic,
3910         build_dynamic_cast_1, ptr_initializer, ptm_initializer,
3911         get_pseudo_ti_init): Likewise.
3912         * search.c (get_dynamic_cast_base_type): Likewise.
3914 2004-08-25  Zack Weinberg  <zack@codesourcery.com>
3916         * class.c, search.c: Remove references to DWARF_DEBUG.
3918 2004-08-25  Adam Nemet  <anemet@lnxw.com>
3920         * repo.c (extract_string): Reset backquote after one character.
3921         (get_base_filename): Fix indentation.
3923 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>
3925         * decl.c (cxx_init_decl_processing): Adjust
3926         build_common_tree_nodes call.
3928 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>
3930         PR c++/16889
3931         * (is_subobject_of_p): Resurrect & optimize.
3932         (lookup_field_r): Use it.
3934 2004-08-24  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3936         PR c++/16706
3937         * search.c (friend_accessible_p): Increment processing_template_decl
3938         when deal with TEMPLATE_DECL of SCOPE.
3940 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>
3942         PR c++/17149
3943         * semantics.c (check_accessibility_of_qualified_id): Defer check
3944         if qualifying_type is a template parameter.
3946 2004-08-23  Mark Mitchell  <mark@codesourcery.com>
3948         PR c++/17163
3949         * pt.c (instantiate_decl): Do not try to apply
3950         DECL_DECLARED_INLINED_P to a VAR_DECL.
3952         * search.c (build_baselink): Fix typo in comment.
3954 2004-08-22 Andrew Pinski  <apinski@apple.com>
3956         Revert:
3957         2004-08-22  Andrew Pinski  <apinski@apple.com>
3958         PR c++/14029
3959         * typeck.c (build_unary_op): Use &a.b if the folded lowered
3960         expression is not constant.
3962 2004-08-23  Nathan Sidwell  <nathan@codesourcery.com>
3964         * name-lookup.c (pushdecl): Rename build_type_copy call.
3965         * tree.c (cp_build_qualified_type_real,
3966         build_exception_variant, handle_java_interface_attribute): Likewise.
3968 2004-08-22  Andrew Pinski  <apinski@apple.com>
3970         PR c++/14029
3971         * typeck.c (build_unary_op): Use &a.b if the folded lowered
3972         expression is not constant.
3974 2004-08-20  Mark Mitchell  <mark@codesourcery.com>
3976         PR c++/17121
3977         * decl.c (expand_static_init): Use DECL_FUNCTION_SCOPE_P.
3979 2004-08-21  Joseph S. Myers  <jsm@polyomino.org.uk>
3981         PR c++/17120
3982         * pt.c (tsubst_copy_and_build): Avoid clearing TREE_NO_WARNING for
3983         MODOP_EXPR.
3985 2004-08-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3987         * pt.c (register_specialization): Check DECL_TEMPLATE_SPECIALIZATION
3988         before calling comp_template_args.
3990 2004-08-20  Nathan Sidwell  <nathan@codesourcery.com>
3992         * class.c (build_vtbl_initializer): Use build_int_cst for
3993         negative size types.
3994         * decl.c (complete_array_type): Likewise.
3995         * method.c (finish_thunk): Likewise.
3997 2004-08-20  Andreas Tobler  <a.tobler@schweiz.ch>
3999         * tree.c: Remove unused mark_local_for_remap_r.
4001 2004-08-19  Eric Christopher  <echristo@redhat.com>
4003         * cp-tree.h (cxx_unsave_expr_now): Delete prototype.
4004         * tree.c (cxx_unsave_expr_now): Delete.
4005         (cp_unsave_r): Ditto.
4007 2004-08-19  Mark Mitchell  <mark@codesourcery.com>
4009         PR c++/15890
4010         * pt.c (push_template_decl_real): Disallow template allocation
4011         functions with fewer than two parameters.
4013 2004-08-19  Nathan Sidwell  <nathan@codesourcery.com>
4015         * cp-tree.h (build_shared_int_cst): Remove.
4016         * tree.c (shared_int_cache): Remove.
4017         (build_shared_int_cst): Remove.
4018         * class.c (finish_struct_1): Use build_int_cst.
4020 2004-08-19  Nathan Sidwell  <nathan@codesourcery.com>
4022         * decl.c (finish_enum): Do not copy value node early, copy
4023         later.
4024         * lex.c (cxx_init): Force null_node to be unique.
4026 2004-08-19  Joseph S. Myers  <jsm@polyomino.org.uk>
4028         PR c++/17041
4029         * pt.c (tsubst_copy, tsubst_copy_and_build): Copy TREE_NO_WARNING
4030         from input for MODOP_EXPR.
4032 2004-08-18  Mark Mitchell  <mark@codesourcery.com>
4034         * pt.c (dependent_template_p): Fix typo in commment.
4036         PR c++/17068
4037         * pt.c (dependent_template_p): Treat IDENTIFIER_NODEs as
4038         dependent.
4040 2004-08-17  Mark Mitchell  <mark@codesourcery.com>
4042         PR c++/16246
4043         * pt.c (unify): Tidy ARRAY_TYPE handling.  Make sure that non-type
4044         arguments have the same type as the corresponding parameter.
4046         PR c++/16215
4047         * parser.c (cp_parser_name_lookup_error): If parser->object_scope
4048         is set use it for diagnostic purposes.
4049         (cp_parser_pseudo_destructor_name): Remove special-case error
4050         message.
4052         PR c++/15871
4053         * semantics.c (expand_or_defer_fn): Honor -fkeep-inline-functions.
4055         PR c++/16965
4056         * cp-tree.h (qualified_name_lookup_error): Add parameter.
4057         * name-lookup.c (do_class_using_decl): Restrict set of entities
4058         passed to cp_emit_debug_info_for_using more carefully.
4059         (lookup_qualified_name): Allow lookup_member to return sets of
4060         ambiguous entries.
4061         * parser.c (cp_parser_lookup_name): Add ambiguous_p parameter.
4062         (cp_parser_primary_expression): Handle ambiguous lookups.
4063         (cp_parser_template_name): Adjust use of cp_parser_lookup_name.
4064         (cp_parser_template_argument): Likewise.
4065         (cp_parser_elaborate_type_specifier): Likewise.
4066         (cp_parser_namespace_name): Likewise.
4067         (cp_parser_class_name): Likewise.
4068         (cp_parser_lookup_name_simple): Likewise.
4069         * pt.c (tsubst_qualified_id): Handle ambiguous results.
4070         (tsubst_expr): Likewise.
4071         * semantics.c (qualified_name_lookup_error): Add decl paramter.
4072         For ambiguous lookups, print candidates.
4074 2004-08-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4076         PR c++/6749
4077         * pt.c (instantiate_pending_templates): Add int parameter.  Don't
4078         return anything.
4079         * cp-tree.h (instantiate_pending_templates): Adjust prototype.
4080         * decl2.c (finish_file): Adjust call to
4081         instantiate_pending_templates.
4083 2004-08-15  Roger Sayle  <roger@eyesopen.com>
4085         * call.c (build_vfield_ref, build_call, build_conditional_expr,
4086         convert_arg_to_ellipsis, build_x_va_arg, build_over_call,
4087         build_java_interface_fn_ref, build_special_member_call,
4088         build_new_method_call, initialize_reference): Replace calls to
4089         build with calls to buildN.
4090         * class.c (build_base_path, convert_to_base_statically,
4091         build_vfn_ref, instantiate_type, dfs_accumulate_vtbl_inits,
4092         build_vtbl_initializer): Likewise.
4093         * cp-gimplify.c (genericize_try_block, genericize_catch_block,
4094         gimplify_if_stmt, cp_genericize_r): Likewise.
4095         * cvt.c (convert_to_void): Likewise.
4096         * decl.c (check_initializer, finish_constructor_body,
4097         finish_destructor_body): Likewise.
4098         * error.c (dump_expr): Likewise.
4099         * except.c (build_exc_ptr, expand_start_catch_block, build_throw):
4100         Likewise.
4101         * init.c (perform_member_init, expand_virtual_init,
4102         expand_cleanup_for_base, build_init, expand_default_init,
4103         build_offset_ref, decl_constant_value, build_new, build_new_1,
4104         build_vec_delete_1, build_vec_init, build_delete,
4105         push_base_cleanups, build_vec_delete): Likewise.
4106         * mangle.c (write_integer_cst): Likewise.
4107         * method.c (thunk_adjust, do_build_copy_constructor,
4108         do_build_assign_ref): Likewise.
4109         * pt.c (lookup_template_function, tsubst, tsubst_copy_and_build,
4110         unify, build_non_dependent_expr): Likewise.
4111         * rtti.c (build_headof, build_typeid, ifnonnull,
4112         build_dyanmic_cast_1, tinfo_base_init): Likewise.
4113         * semantics.c (begin_compound_stmt, finish_call_expr,
4114         finish_pseudo_destructor_expr, finish_id_expression,
4115         simplify_aggr_init_expr, finalize_nrv_r): Likewise.
4116         * tree.c (build_target_expr, build_cplus_new, array_type_nelts_top,
4117         array_type_nelts_total, stabilize_call): Likewise.
4118         * typeck.c (decay_conversion, build_class_member_access_expr,
4119         lookup_destructor, build_ptrmemfunc_access_expr, build_array_ref,
4120         get_member_function_from_ptrfunc, build_binary_op, pointer_diff,
4121         build_x_unary_op, build_unary_op, unary_complex_lvalue,
4122         build_compound_expr, build_modify_expr, expand_ptrmemfunc_cst,
4123         check_return_expr): Likewise.
4124         * typeck2.c (split_nonconstant_1, split_nonconstant_init_1,
4125         split_nonconstant_init, store_init_value, build_m_component_ref):
4126         Likewise.
4128 2004-08-15  Nathan Sidwell  <nathan@codesourcery.com>
4130         * call.c (convert_class_to_reference,
4131         build_user_type_conversion_1, convert_like_real,
4132         build_java_interface_fn_ref, build_special_member_call): Use
4133         build_int_cst.
4134         * class.c (build_vtbl_initializer): Likewise.
4135         * cp-gimplify.c (cp_gimplify_expr): Likewise.
4136         * cvt.c (cp_convert_to_pointer): Likewise.
4137         * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
4138         * decl2.c (start_static_initialization_or_destruction,
4139         generate_ctor_or_dtor_function): Likewise.
4140         * except.c (build_throw): Likewise.
4141         * lex.c (cxx_init): Likewise.
4142         * mangle.c (write_integer_cst): Likewise.
4143         * rtti.c (build_headof, get_tinfo_decl_dynamic,
4144         build_dynamic_cast_1, ptr_initializer, ptm_initializer,
4145         get_pseudo_ti_init): Likewise.
4146         * search.c (get_dynamic_cast_base_type): Likewise.
4147         * tree.c (build_shared_int_cst): Likewise.
4149 2004-08-12  Mark Mitchell  <mark@codesourcery.com>
4151         PR c++/16273
4152         * class.c (count_depth_data): New type.
4153         (dfs_depth_post): New function.
4154         (dfs_depth_q): Likewise.
4155         (find_final_overrider_data_s): Change type of vpath.
4156         Add vpath_list.
4157         (dfs_find_final_overrider_1): New function.
4158         (dfs_find_final_overrider): Use it.
4159         (dfs_find_final_overrider_q): Adjust use of vpath.
4160         (dfs_find_final_overrider_post): Likewise.
4161         (find_final_overrider): Use dfs_depth.  Allocate and deallocate
4162         vpath_list.
4164 2004-08-12 Jan Beulich <jbeulich@novell.com>
4166         * parser.c (cp_parser_asm_definition): Properly consume scope operator
4167         tokens preceding the clobbers. Don't check for scope operator
4168         following inputs. Simplify inputs handling to match that now used for
4169         clobbers.
4171 2004-08-11  Mark Mitchell  <mark@codesourcery.com>
4173         PR c++/16698
4174         * except.c (build_throw): Allocate cleanup_type and the function
4175         for __cxa_throw separately.
4177         PR c++/16853
4178         * call.c (standard_conversion): Do not accept conversions between
4179         pointers to members if the class types are unrelated.
4181         PR c++/16618
4182         * parser.c (cp_parser_builtin_offsetof): Cast to "const volatile
4183         char &" instead of just "char &".
4185         PR c++/16870
4186         * pt.c (tsubst): Just return the unknown_type_node.
4188 2004-08-11  Mark Mitchell  <mark@codesourcery.com>
4190         PR c++/16964
4191         * parser.c (cp_parser_class_specifier): Robustify.
4193         PR c++/16904
4194         * pt.c (tsubst_copy_and_build): Complain about invalid
4195         qualification.
4197         PR c++/16929
4198         * pt.c (tsubst_default_argument): Clear out current_class_ptr and
4199         current_class_ref while tsubsting.
4201 2004-08-10  Mark Mitchell  <mark@codesourcery.com>
4203         PR c++/16971
4204         * parser.c (cp_parser_init_declarator): Robustify.
4206 2004-08-06  Richard Sandiford  <rsandifo@redhat.com>
4208         * typeck2.c (process_init_constructor): Guard the missing field warning
4209         with warn_missing_field_initializers rather than extra_warnings.
4211 2004-08-06  Paolo Bonzini  <bonzini@gnu.org>
4213         * class.c (instantiate_type) <ENTRY_VALUE_EXPR>: Do not handle.
4215 2004-08-05  Mark Mitchell  <mark@codesourcery.com>
4217         * decl.c (start_preparsed_function): Move determine_visibility
4218         call.
4219         * decl2.c (determine_visibility): Incorporate dllexport testing.
4221 2004-08-05  Geoffrey Keating  <geoffk@apple.com>
4223         * g++spec.c (lang_specific_driver): An -Xlinker or -Wl, option
4224         means that libstdc++ is needed.
4226 2004-08-05  Nathan Sidwell  <nathan@codesourcery.com>
4228         * cvt.c (cp_convert_to_pointer): Adjust force_fit_type call.
4230 2004-08-04  Geoffrey Keating  <geoffk@apple.com>
4232         * decl.c (make_rtl_for_nonlocal_decl): Set DECL_ASSEMBLER_NAME rather
4233         than passing it as a parameter to rest_of_decl_compilation.
4234         * decl2.c (grokfield): Use set_user_assembler_name.
4236 2004-08-04  Nathan Sidwell  <nathan@codesourcery.com>
4238         * decl.c (complete_array_type): Don't gratuitously copy
4239         maxindex. Its type is always set.
4241 2004-08-04  Paul Brook  <paul@codesourcery.com>
4243         * Make-lang.in (cp/semantics.o, cp/optimize.o): Depend on TARGET_H.
4244         * cp-tree.h (struct language_function): Rename x_dtor_label to
4245         x_cdtor_label.
4246         (dtor_label): Rename ...
4247         (cdtor_label): ... to this.
4248         * decl.c (begin_constructor_body): Remove.
4249         (check_special_function_return_type): Maybe change the return type.
4250         (grokdeclarator): Pass the class type.
4251         (start_preparsed_function): Constructors may need a return label.
4252         (finish_constructor_body, finish_destructor_body): Set the return
4253         value.
4254         (begin_function_body): Don't call begin_constructor_body.
4255         (finish_function): Don't warn for constructors or destructors.
4256         (implicitly_declare_fn): Maybe change the return type.
4257         * optimize.c: Include target.h.
4258         (maybe_clone_body): Remap the function result.
4259         * semantics.c: Include target.h.
4260         (finish_return_stmt): Maybe jump to return label for constructors.
4262 2004-08-03  Mark Mitchell  <mark@codesourcery.com>
4264         * class.c (build_vtable): Do not set DECL_VISIBILITY here.
4265         (check_field_decls): Or here.
4266         (check_methods): Or here.
4267         (initialize_array): Don't mess with DECL_CONTEXT.
4268         * cp-tree.h (start_decl): Adjust prototype.
4269         (determine_visibility): New function.
4270         * decl.c (duplicate_decls): Remove checks for hidden "operator
4271         new".
4272         (build_library_fn_1): Give all library functions default
4273         visibility.
4274         (start_decl): Add pop_scope_p parameter.  Tidy.
4275         (cp_finish_decl): Do not pop scopes here.  Call
4276         determine_visibility for variable definitions.
4277         (start_preparsed_function): Call determine_visibility.
4278         * decl2.c (determine_visibility): New function.
4279         * method.c (use_thunk): Fix formatting.
4280         * parser.c (cp_parser_condition): Adjust calls to start_decl.
4281         (cp_parser_init_declarator): Likewise.
4282         * pt.c (instantiate_decl): Always call pop_nested_class.
4283         * rtti.c (get_tinfo_decl): Do not set DECL_VISIBILITY.
4284         (tinfo_base_init): Likewise.
4286 2004-08-02  Mark Mitchell  <mark@codesourcery.com>
4288         PR c++/16707
4289         * name-lookup.c (validate_nonmember_using_decl): Robustify.
4291 2004-08-01  Mark Mitchell  <mark@codesourcery.com>
4293         PR c++/16224
4294         * name-lookup.c (decl_namespace): Remove.
4295         (current_decl_namespace): Use decl_namespace_context instead of
4296         decl_namespace.
4297         (push_decl_namespace): Likewise.
4298         (arg_assoc_class): Likewise.
4299         (arg_assoc_type): Likewise.
4300         * pt.c (check_specialization_namespace): New function.
4301         (maybe_process_partial_specialization): Use it.
4302         (register_specialization): Likewise.
4304         PR c++/16489
4305         * cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): New macro.
4306         * call.c (null_ptr_cst_p): Handle variables with constant
4307         initializers.
4308         * pt.c (convert_nontype_argument): Use
4309         DECL_INTEGRAL_CONSTANT_VAR_P.
4310         * semantics.c (finish_id_expression): Likewise.
4312         PR c++/16529
4313         * decl.c (duplicate_decls): Reject duplicate namespace
4314         declarations.
4316         PR c++/16810
4317         * typeck.c (build_ptrmemfunc): Loosen assertion.
4319 2004-08-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4321         * call.c (z_candidate::template_decl): Rename from template.
4322         (add_template_candidate_real): Adjust member reference.
4323         (joust): Likewise.
4325 2004-07-29  Mark Mitchell  <mark@codesourcery.com>
4327         * cp-tree.h (IDENTIFIER_REPO_CHOSEN): Define.
4328         (lang_decl_flags): Narrow the width of "languages".  Add
4329         repo_available_p.
4330         (DECL_NEEDED_P): Remove.
4331         (FOR_EACH_CLONE): New macro.
4332         (DECL_REPO_AVAILABLE_P): Likewise.
4333         (DECL_TINFO_P): Likewise.
4334         (set_linkage_according_to_type): Declare.
4335         (import_export_vtable): Remove.
4336         (import_export_tinfo): Likewise.
4337         (mark_needed): New function.
4338         (decl_needed_p): Likewise.
4339         (note_vauge_linkage_fn): Likewise.
4340         (init_repo): Change prototype.
4341         (repo_template_used): Remove.
4342         (repo_template_instantiated): Likewise.
4343         (repo_emit_p): New function.
4344         (repo_export_class_p): Likewise.
4345         (no_linkage_check): Change prototype.
4346         * class.c (set_linkage_according_to_type): New function.
4347         (build_vtable): Use it.  Do not call import_export_vtable.  Set
4348         DECL_IGNORED_P if appropriate.
4349         * decl.c (duplicate_decls): Preserve DECL_REPO_AVAILABLE_P.
4350         (make_rtL_for_nonlocal_decls): Check for template instantiations
4351         explicitly.
4352         (grokfndecl): Adjust call to no_linkage_check.
4353         (set_linkage_for_static_data_member): New function.
4354         (grokvardecl): Use it.  Adjust call to no_linkage_check.
4355         (grokdeclarator): Use set_linkage_for_static_data_member.
4356         * decl2.c (note_vague_linkage_fn): New function.
4357         (note_vague_linkage_var): Likewise.
4358         (finish_static_data_member_decl): Use it.
4359         (import_export_vtable): Remove.
4360         (import_export_class): Use repo_export_class_p.
4361         (var_finalized_p): Simplify.
4362         (maybe_emit_vtables): Simplify.
4363         (mark_needed): New function.
4364         (decl_needed_p): Likewise.
4365         (import_export_decl): Add documentation and consistency checks.
4366         Use repo_emit_p.  Handle virtual tables and RTTI information
4367         here.
4368         (import_export_tinfo): Remove.
4369         (write_out_vars): Call import_export_decl.
4370         (cxx_callgraph_analyze_expr): Ensure that all vtables are emitted
4371         whenever one is.
4372         (finish_file): Use decl_needed_p.  Do not call import_export_decl
4373         for undefined static data members.  Do not warn about undefined
4374         inlines when using a repository.
4375         (mark_used): Use note_vague_linkage_fn.  Always defer template
4376         instantiations.
4377         * lex.c (cxx_init): Adjust call to init_repo.  Always set
4378         flag_unit_at_a-time.
4379         * method.c (synthesize_method): Remove unncessary
4380         import_export_decl call.
4381         (implicitly_declare_fn): Use set_linkage_according_to_type.
4382         * optimize.c (maybe_clone_body): Use FOR_EACH_CLONE.
4383         * pt.c (instantiate_class_template): Don't redundantly add classes
4384         to keyed_classes.  Don't call repo_template_used.
4385         (tsubst_decl): Set DECL_INTERFACE_KNOWN for instantiations of
4386         templates with internal linkage.
4387         (check_instantiated_args): Adjust call to no_linkage_check.
4388         (instantiate_template): Use FOR_EACH_CLONE.
4389         (mark_definable): New function.
4390         (mark_decl_instantiated): Use it.
4391         (do_decl_instantiation): Adjust tests for explicit instantiation
4392         after "extern template".
4393         (instantiate_class_member): Do not use repo_template_instantiated.
4394         (do_type_instantiation): Simplify.
4395         (instantiate_decl): Use mark_definable.  Check repo_emit_p.
4396         Simplify.
4397         * repo.c (repo_get_id): Remove.
4398         (original_repo): Remove.
4399         (IDENTIFIER_REPO_USED): Remove.
4400         (IDENTIFIER_REPO_CHOSEN): Remove.
4401         Remove all #if 0'd code.
4402         (repo_template_used): Remove.
4403         (repo_template_instantiated): Remove.
4404         (temporary_obstack_initialized_p): New variable.
4405         (init_repo): Register with lang_post_pch_load.  Avoid creating
4406         identifiers unnecessarily.  Don't use original_repo.  Close the
4407         file here.
4408         (reopen_repo_file_for_write): Not here.
4409         (finish_repo): Always write out a new repository file.
4410         (repo_emit_p): New function.
4411         (repo_export_class_p): Likewise.
4412         * rtti.c (get_tinfo_decl): Use set_linkage_according_to_type.
4413         (involves_incomplete_p): New function.
4414         (tinfo_base_init): Use it.
4415         (ptr_initializer): Remove non_public_ptr parameter.
4416         (ptm_initializer): Likewise.
4417         (get_pseudo_ti_init): Likewise.
4418         (unemitted_tinfo_decl_p): Remove.
4419         (emit_tinfo_decl): Use import_export_decl.
4420         * semantics.c (expand_body): Move updates of static_ctors and
4421         static_dtors to ...
4422         (expand_or_defer_fn): ... here.
4423         * tree.c (no_linkage_check): Add relaxed_p parameter.
4425 2004-07-28  Eric Christopher  <echristo@redhat.com>
4427         * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
4429 2004-07-28  Nathan Sidwell  <nathan@codesourcery.com>
4431         * cp-tree.h (struct tree_pair_s): New.
4432         (typedef tree_pair_p): New.
4433         (DEF_VEC_O(tree_pair_s)): New.
4434         (struct lang_type_class): Make vcall_indices a VEC(tree_pair_s).
4435         (CLASSTYPE_VCALL_INDICES): Update documentation.
4436         * class.c (get_vcall_index): Adjust.
4437         (add_vcall_offset): Adjust.
4439 2004-07-27  Kelley Cook  <kcook@gcc.gnu.org>
4441         * pt.c, typeck.c: Remove spurious carriage returns.
4443 2004-07-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4445         PR c++/14429
4446         * pt.c (coerce_template_template_parms) <PARM_DECL case>: Only check
4447         when the type of ARG is not dependent.
4449 2004-07-26  Geoffrey Keating  <geoffk@apple.com>
4451         * g++spec.c (LIBSTDCXX_PROFILE): Default to LIBSTDCXX.
4452         (lang_specific_driver): If the C++ or math library options don't
4453         start with '-l', don't count them as added libraries.
4455 2004-07-26  Nathan Sidwell  <nathan@codesourcery.com>
4457         * decl.c (xref_basetypes): Adjust base access vector creation.
4458         * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Adjust base
4459         access accesses.
4460         * search.c (dynamic_cast_base_recurse, dfs_access_in_type): Likewise.
4462 2004-07-26  Niall Douglas  <s_fsfeurope2@nedprod.com>
4463             Brian Ryner  <bryner@brianryner.com>
4465         PR c++/15000
4466         PR c++/9283
4467         * class.c (check_field_decls): Apply hidden visibility if
4468         -fvisibility-inlines-hidden and inlined unless otherwise specified
4469         (build_vtable): Set vtable visibility to class visibility.
4470         (check_field_decls): Default static member visibility to class
4471         visibility.
4472         (check_methods): Default method visibility to class visibility.
4473         * cp-tree.h: Added CLASSTYPE_VISIBILITY and
4474         CLASSTYPE_VISIBILITY_SPECIFIED macro.
4475         * decl.c (duplicate_decls): New logic for merging definition decls
4476         with declaration decls. Added ignore & warning when non default
4477         applied to global operator new or delete.
4478         * method.c, optimize.c, rtti.c: Added setting of VISIBILITY_SPECIFIED
4479         wherever VISIBILITY was changed
4480         * rtti.c (get_tinfo_decl): Set typeinfo visibility to class
4481         visibility.
4482         (tinfo_base_init): Set typeinfo name visibility to class visibility.
4484 2004-07-25  Bernardo Innocenti  <bernie@develer.com>
4486         * decl.c: Rename all identifiers named `class' to `cl'.
4487         * cp-tree.h: Likewise.
4489 2004-07-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4491         * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Use GGC_CNEW.
4492         * typeck2.c (abstract_virtuals_error): Use GGC_NEW.
4493         * name-lookup.c (binding_entry_make): Use GGC_NEW.
4494         (binding_table_construct): Use GGC_CNEWVEC.
4495         (binding_table_new): Use GGC_NEW.
4496         (cxx_binding_make): Likewise.
4497         (begin_scope): Likewise.
4498         (push_to_top_level): Use GCC_CNEW.
4499         * parser.c (cp_token_cache_new): Likewise.
4500         (cp_token_cache_push_token): Likewise.
4501         (cp_lexer_new_main): Likewise.
4502         (cp_lexer_new_from_tokens): Likewise.
4503         (cp_parser_context_new): Likewise.
4504         (cp_parser_new): Likewise.
4505         (cp_lexer_new_from_tokens): Use GGC_NEWVEC.
4506         * lex.c (cxx_make_type): Use GGC_CNEW.
4507         (retrofit_lang_decl): Use GGC_NEWVAR.
4508         (cxx_dup_lang_specific_decl): Likewise.
4509         (copy_lang_type): Likewise.
4510         * decl.c (use_label): Use GGC_NEW instead of ggc_alloc.
4511         (save_function_data): Likewise.
4512         (lookup_label): Use GGC_CNEW instead of ggc_alloc_cleared.
4513         (cxx_push_function_context): Likewise.
4515 2004-07-25  Richard Henderson  <rth@redhat.com>
4517         * decl.c (start_preparsed_function): Set DECL_ARTIFICIAL and
4518         DECL_IGNORED_P on RESULT_DECL.
4519         * semantics.c (finalize_nrv): Copy them too.
4521 2004-07-23  Nathan Sidwell  <nathan@codesourcery.com>
4523         * search.c (lookup_conversion_operator): Avoid two loops.
4524         (add_conversions): Remove.
4525         (check_hidden_convs, split_conversions,
4526         lookup_conversions_r):  New.
4527         (lookup_conversions): Use lookup_conversions_r.
4529 2004-07-22  Nathan Sidwell  <nathan@codesourcery.com>
4531         * pt.c (get_template_base): Check type is completable.
4533 2004-07-21  Eric Christopher  <echristo@redhat.com>
4535         * decl.c (poplevel): Inline unused variable checking.
4536         Change formatting.
4538 2004-07-21  Paolo Bonzini  <bonzini@gnu.org>
4540         * typeck.c (build_binary_op): Do not use RDIV_EXPR for
4541         integer vectors.
4543 2004-07-21  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
4545         PR c++/14497
4546         * pt.c (check_explicit_specialization): Remove extension to accept
4547         specializations without template headers. Fall-through to normal
4548         processing.
4550 2004-07-21  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
4552         PR c++/509
4553         * pt.c (determine_specialization): New parameter template_count.
4554         Disambiguate between member templates and member functions counting
4555         the template headers.
4556         (check_explicit_specialization): Update caller.
4557         (tsubst_friend_function): Likewise.
4559 2004-07-20  Steven Bosscher  <stevenb@suse.de>
4561         * cp-tree.def (TINST_LEVEL): Make it an 'x' node.
4562         * cp-tree.h (tinst_level_t): New tree type.
4563         (union lang_tree_node): Handle it.
4564         (TINST_LOCATION): New accessor macro.
4565         (make_tinst_level): New prototype.
4566         * cp-lang.c (cp_tree_size): Handle TINST_LEVEL.
4567         * decl.c (cp_tree_node_structure): Likewise.
4568         * error.c (print_instantiation_full_context): Use TINST_LOCATION.
4569         (print_instantiation_partial_context): Likewise.
4570         * pt.c (pop_tinst_level): Likewise.
4571          (push_tinst_level): Use make_tinst_level.
4572         * tree.c (make_tinst_level): New function.
4573         (cp_walk_subtrees): Walk TINST_DECL for a TINST_LEVEL node.
4575 2004-07-20  Mark Mitchell  <mark@codesourcery.com>
4577         * parser.c (cp_parser_simple_type_specifier): Fix typo.
4579         PR c++/16637
4580         * parser.c (cp_parser_simple_type_specifier): Do not record usage
4581         of globally-qualified names.
4583 2004-07-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4585         PR c++/16175
4586         * error.c (dump_type) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Output
4587         cv qualifier.
4589 2004-07-19  Mark Mitchell  <mark@codesourcery.com>
4591         PR c++/16623
4592         * cp-tree.h (lang_type_class): Add lazy_assignment_op.
4593         (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
4594         * class.c (add_implicitly_declared_members): Use
4595         CLASSTYPE_LAZY_ASSIGNMENT_OP.
4596         * method.c (lazily_declare_fn): Clear
4597         CLASSTYPE_LAZY_ASSIGNMENT_OP.
4598         * search.c (lookup_fnfields_1): Check it.
4600 2004-07-20  Nathan Sidwell  <nathan@codesourcery.com>
4602         * cp-tree.h (vec_binfo_member): Remove.
4603         * tree.c (vec_binfo_member): Remove.
4605         * cp-tree.h (struct lang_type_class): Remove vfields field.
4606         (CLASSTYPE_VFIELDS): Remove.
4607         (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
4608         * class.c (determine_primary_base): Remove CLASSTYPE_VFIELDS
4609         handling.
4610         (dfs_modify_vtables): Use TYPE_CONTAINS_VPTR_P.
4611         (finish_struct_1): Remove CLASSTYPE_VFIELDS handling.
4612         * init.c (dfs_initialize_vtbl_ptrs): Use TYPE_CONTAINS_VPTR_P.
4614 2004-07-20  Nathan Sidwell  <nathan@codesourcery.com>
4616         * cp-tree.h (DEF_VEC_P(tree)): Remove here.
4617         (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
4618         Moved to common.
4619         (BINFO_LANG_SLOTS): Remove.
4620         * tree.c (copy_binfo): Adjust BINFO creation and accessors.
4621         * decl.c (xref_basetypes): Adjust BINFO creation and accessors.
4622         * class.c (check_bases): Adjust BINFO accessors.
4623         (determine_primary_base, finish_struct_bits,
4624         maybe_warn_about_overly_private_class, warn_hidden,
4625         walk_subobject_offsets, propagate_binfo_offsets, end_of_class,
4626         warn_about_ambiguous_bases, get_vfield_name,
4627         dump_class_hierarchy_r, build_vtt_inits, accumulate_vtbl_inits,
4628         add_vcall_offset_vtbl_entries_r): Likewise.
4629         * dump.c (cp_dump_tree): Likewise.
4630         * init.c (sort_mem_initializers, expand_member_init, build_delete,
4631         push_base_cleanups): Likewise.
4632         * method.c (do_build_copy_constructor, do_build_assign_ref,
4633         synthesize_exception_spec): Likewise.
4634         name-lookup.c (arg_assoc_class): Likewise.
4635         * pt.c (instantiate_class_template,
4636         get_template_base_recursive): Likewise.
4637         * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Likewise.
4638         * typeck2.c (process_init_constructor): Likewise.
4639         * search.c (lookup_base_r, dynamic_cast_base_recurse,
4640         dfs_access_in_type, dfs_walk_real, look_for_overrides,
4641         types_overlap_p, copied_binfo, original_binfo): Likewise.
4642         (binfo_for_vtable): Remove
4644 2004-07-20  Steven Bosscher  <stevenb@suse.de>
4646         * cp-tree.h (struct lang_decl_flags): Unify the template_info and
4647         thunk_alias, and the access and virtual_offset fields.
4648         (THUNK_VIRTUAL_OFFSET, THUNK_ALIAS): Adjust.
4649         * decl.c (finish_case_label): Update c_add_case_node call.
4651 2004-07-19  Mark Mitchell  <mark@codesourcery.com>
4653         Revert patch for PR c++/16623.
4655 2004-07-19  Kelley Cook  <kcook@gcc.gnu.org>
4657         * except.c: Remove two spurious carriage returns.
4659 2004-07-19  Mark Mitchell  <mark@codesourcery.com>
4661         PR c++/16623
4662         * cp-tree.h (lang_type_class): Add lazy_assignment_op.
4663         (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
4664         * class.c (add_implicitly_declared_members): Use
4665         CLASSTYPE_LAZY_ASSIGNMENT_OP.
4666         * method.c (lazily_declare_fn): Clear
4667         CLASSTYPE_LAZY_ASSIGNMENT_OP.
4668         * search.c (lookup_fnfields_1): Check it.
4670 2004-07-19  Nathan Sidwell  <nathan@codesourcery.com>
4672         * class.c (add_method): Delay adding the slot until the end.
4673         (determine_primary_base): Adjust VEC_iterate invokation.
4674         (resort_type_method_vec, finish_struct_methods, warn_hidden,
4675         walk_subobject_offsets, end_of_class, warn_about_ambiguous_bases,
4676         build_vtbl_initializer): Likewise.
4677         * init.c (sort_mem_initializers, build_delete, push_base_cleanups,
4678         build_vbase_delete): Likewise.
4679         * method.c (do_build_copy_constructor): Likewise.
4680         * name-lookup.c (new_class_binding, print_binding_level,
4681         poplevel_class, store_class_bindings, push_to_top_level,
4682         pop_from_top_level): Likewise.
4683         * pt.c (check_explicit_specialization): Likewise.
4684         * search.c (lookup_conversion_operator, lookup_fnfields_1,
4685         get_pure_virtuals, add_conversions, dfs_check_overlap,
4686         binfo_for_vbase): Likewise.
4688 2004-07-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4690         PR c++/12170
4691         * pt.c (unify) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Use only
4692         innermost set of template arguments during deduction.  Simplify.
4694 2004-07-19  Joseph S. Myers  <jsm@polyomino.org.uk>
4696         * typeck.c (build_modify_expr, build_x_modify_expr): Set
4697         TREE_NO_WARNING on assignments with an operator other than '='.
4699 2004-07-10  Steven Bosscher  <stevenb@suse.de>
4700             Joseph S. Myers  <jsm@polyomino.org.uk>
4702         * cp-tree.h (C_SET_EXP_ORIGINAL_CODE): Remove.
4703         * decl2.c (grokfield): Don't check current_class_depth via
4704         unused TREE_COMPLEXITY.
4705         * semantics.c (finish_parenthesized_expr): Set TREE_NO_WARNING
4706         to avoid the missing parentheses warning.
4707         Don't set C_SET_EXP_ORIGINAL_CODE.
4709 2004-07-18  Mark Mitchell  <mark@codesourcery.com>
4711         * tree.c (no_linkage_helper): Remove.
4712         (no_linkage_check): Don't use walk_tree_without_duplicates.
4714         * mangle.c (write_expression): Issue a sorry for zero-operand
4715         functional casts.
4717 2004-07-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4719         PR c++/13092
4720         * init.c (build_offset_ref): Build SCOPE_REF with non-null
4721         TREE_TYPE for non-dependent names.
4722         * typeck.c (build_x_unary_op): Handle non-dependent SCOPE_REF.
4723         * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
4724         unknown_type_node as its TREE_TYPE.
4725         * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
4726         * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
4727         (dump_expr) <SCOPE_REF case>: Likewise.
4729 2004-07-17  Jason Merrill  <jason@redhat.com>
4731         PR c++/16115
4732         * call.c (type_passed_as): Make the invisible reference type
4733         __restrict.
4734         * cp-gimplify.c (gimplify_cleanup_stmt): Rename to
4735         cp_genericize_r.  Handle invisible reference lowering.
4736         (is_invisiref_parm): New fn.
4737         (cp_genericize): Adjust the types of invisible reference parms.
4738         Don't repeat the walk for clones.
4739         * decl.c (store_parm_decls): Don't generate any code for clones.
4741 2004-07-17  Joseph S. Myers  <jsm@polyomino.org.uk>
4743         * cp-tree.h (builtin_function): Declare.
4745 2004-07-16  Mark Mitchell  <mark@codesourcery.com>
4747         * class.c (finish_struct_methods): Remove unncessary code.
4748         (add_implicitly_declared_members): Create declarations for default
4749         constructors and copy constructors lazily.
4750         * cp-tree.h (lang_type_class): Remove lazy_default_ctor and
4751         lazy_copy_ctor.
4752         (CLASSTYPE_LAZY_DEFAULT_CTOR): New macro.
4753         (CLASSTYPE_LAZY_COPY_CTOR): Likewise.
4754         * decl2.c (check_classfn): Robustify.
4755         (locate_dtor): Handle empty CLASSTYPE_METHOD_VEC.
4756         (locate_ctor): Handle lazy default constructors.
4757         (locate_copy): Handle lazy copy constructors.
4758         (implicitly_declare_fn): Make sure we're looking at the
4759         TYPE_MAIN_VARIANT for a class before creating functions.  Don't
4760         set TYPE_HAS_CONSTRUCTOR.
4761         (lazily_declare_fn): New function.
4762         * name-lookup.c (constructor_name_full): Simplify.
4763         * search.c (lookup_fnfields_1): Lazily create methods, as
4764         necessary.
4765         (lookup_for_overrides): Handle empty CLASSTYPE_METHOD_VEC.
4767 2004-07-16  Steven Bosscher  <stevenb@suse.de>
4769         * cp-tree.h (struct lang_type): Don't have three GTY options on a
4770         single bit GTY desc.
4772 2004-07-16  Richard Henderson  <rth@redhat.com>
4774         * cp-lang.c (LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING): Die.
4775         * cp-tree.h (cp_copy_res_decl_for_inlining): Remove.
4776         * tree.c (cp_copy_res_decl_for_inlining): Remove.
4778 2004-07-16  Nathan Sidwell  <nathan@codesourcery.com>
4780         * class.c (finish_struct_bits): Use for loop.
4781         (propagate_binfo_offsets): Do primary binfo outside of loop.
4783         PR c++/16583
4784         * dump.c (cp_dump_tree): Don't dump the bases if there's no
4785         binfo.
4787         * pt.c (tsubst) <TREE_BINFO case>: We should never get here.
4789 2004-07-15  Mark Mitchell  <mark@codesourcery.com>
4791         * cp-tree.h (lang_type_class): Remove has_real_assign_ref and
4792         has_abstract_assign_ref.  Make methods a VEC(tree) *.
4793         (TYPE_HAS_CONST_ASSIGN_REF): Add documentation.
4794         (CLASSTYPE_CONSTRUCTORS): Adjust for changes to CLASSTYPE_METHOD_VEC.
4795         (CLASSTYPE_DESTRUCTORS): Likewise.
4796         (TYPE_HAS_REAL_ASSIGN_REF): Remove.
4797         (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
4798         (add_method): Change prototoype.
4799         * class.c (add_method): Remove error_p parameter.  Adjust for
4800         changes to CLASSTYPE_METHOD_VEC.
4801         (handle_using_decl): Adjust call to add_method.
4802         (maybe_warn_about_overly_private_class): Adjust for
4803         changes to CLASSTYPE_METHOD_VEC.
4804         (resort_type_method_vec): Likewise.
4805         (finish_struct_methods): Likewise.
4806         (check_for_override): Likewise.
4807         (warn_hidden): Likewise.
4808         (add_implicitly_declared_members): Defer creation of assignment
4809         operators.  Adjust call to add_method.
4810         (clone_function_decl): Adjust call to add_method.
4811         (check_bases_and_members): Don't set TYPE_HAS_REAL_ASSIGN_REF.
4812         (finish_struct_1): Use CLASSTYPE_DESTRUCTORS.
4813         * decl.c (grok_special_member_properties): Don't set
4814         TYPE_HAS_ABSTRACT_ASSIGN_REF.
4815         * decl2.c (check_classfn): Adjust for
4816         changes to CLASSTYPE_METHOD_VEC.
4817         * method.c (locate_dtor): Use CLASSTYPE_DESTRUCTORS.
4818         (locate_ctor): Use CLASSTYPE_CONSTRUCTORS.
4819         (locate_copy): Adjust for changes to CLASSTYPE_METHOD_VEC.
4820         (implicitly_declare_fn): Set DECL_SOURCE_LOCATION.  Do not call
4821         cp_finish_decl.
4822         * pt.c (check_explicit_specialization): Adjust for
4823         changes to CLASSTYPE_METHOD_VEC.
4824         (instantiate_class_template): Do not set
4825         TYPE_HAS_ABSTRACT_ASSIGN_REF.
4826         * ptree.c (cxx_print_type): Don't try to print
4827         CLASSTYPE_METHOD_VEC.
4828         * rtti.c (emit_support_tinfos): Use CLASSTYPE_DESTRUCTORS.
4829         * search.c (lookup_field_r): Adjust for
4830         changes to CLASSTYPE_METHOD_VEC.
4831         (lookup_fnfields): Likewise.
4832         (lookup_conversion_operator): Likewise.
4833         (lookup_fnfields_1): Likewise.  Create assignment operators
4834         lazily.
4835         (look_for_overrides_here): Adjust for
4836         changes to CLASSTYPE_METHOD_VEC.
4837         (add_conversions): Likewise.
4838         * semantics.c (finish_member_declaration): Adjust call to add_method.
4840 2004-07-15  Jason Merrill  <jason@redhat.com>
4842         * cp-lang.c (cxx_types_compatible_p): To the middle-end,
4843         references and pointers are compatible.
4845 2004-07-15  Nathan Sidwell  <nathan@codesourcery.com>
4847         * decl.c (xref_basetypes): Refactor.
4848         * tree.c (copy_base_binfos): Replace with ...
4849         (copy_binfo): ... this. Deep copy the given binfo, (not the just
4850         bases of the given base).
4851         * cp-tree.h (copy_base_binfo): Remove.
4852         (copy_binfo): Declare.
4854 2004-07-15  Mark Mitchell  <mark@codesourcery.com>
4856         * name-lookup.c (set_inherited_value_binding_p): Add class_type
4857         parameter.
4858         (get_class_binding): Adjust.
4859         (push_class_level_binding): Don't use set_inherited_value_binding_p.
4861 2004-07-15  Nathan Sidwell  <nathan@codesourcery.com>
4863         * class.c (finish_struct_bits): Don't set TYPE_HAS_CONVERSION here.
4864         * decl.c (xref_basetypes): Set it here.
4866         * class.c (check_bases): Don't set CLASSTYPE_NON_AGGREGATE here.
4867         Don't check for incomplete base.
4868         (get_vfield_name): Simplify while loop.
4869         * decl.c (xref_basetypes): Set CLASSTYPE_NON_AGGREGATE here.
4871 2004-07-14  Mark Mitchell  <mark@codesourcery.com>
4873         * lex.c (cxx_make_type): Remove call to get_pointer_type.
4875         * cp-tree.h (IDENTIFIER_VALUE): Remove.
4876         (BINFO_PUSHDECLS_MARKED): Likewise.
4877         (maybe_inject_for_scope_var): Likewise.
4878         (push_class_decls): Likewise.
4879         * name-lookup.h (push_class_binding): Remove.
4880         (innermost_non_namespace_value): New function.
4881         (outer_binding): Likewise.
4882         * class.c (add_method): Push bindings before adding to
4883         TYPE_METHODS.
4884         (restore_class_cache): Do not restore class_shadowed.
4885         (pushclass): Do not add USING_DECLs.  Do not call
4886         push_class_decls.
4887         * config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c.
4888         * decl.c (pushdecl): Use outer_binding.
4889         (poplevel): Set the scope for an out-of-scope for-loop declaration
4890         appropriately.
4891         (cp_finish_decl): Don't call maybe_inject_for_scope_var.
4892         * name-lookup.c (new_class_binding): New function.
4893         (push_binding): Use it.
4894         (pushdecl): Use innermost_non_namespace_value.
4895         (maybe_inject_for_scope_var): Remove.
4896         (push_class_binding): Remove.
4897         (set_inherited_value_binding_p): New function.
4898         (get_class_binding): New function.
4899         (push_class_level_binding): Assert that the current_class_type is
4900         being defined.
4901         (outer_binding): New function.
4902         (innermost_non_namespace_value): Likewise.
4903         (lookup_name_real): Use outer_binding.
4904         (lookup_name_current_level): Ignore out-of-scope variables.
4905         * pt.c (check_template_shadow): Use innermost_non_namespace_value.
4906         (lookup_template_class): Likewise.
4907         * search.c (dfs_push_type_decls): Remove.
4908         (dfs_push_decls): Likewise.
4909         (setup_class_bindings): Likewise.
4910         (lookup_field_1): Handle USING_DECLs from dependent scopes.
4911         (marked_pushdecls_p): Remove.
4912         (unmarked_pushdecls_p): Remove.
4913         (marked_identifiers): Remove.
4914         (setup_class_bindings): Remove.
4915         (dfs_push_type_decls): Remove.
4916         (dfs_push_decls): Remove.
4917         (push_class_decls): Remove.
4919 2004-07-13  Mark Mitchell  <mark@codesourcery.com>
4921         PR c++/16518
4922         PR c++/16337
4923         * decl.c (grokvardecl): Make declspecs parameter const.
4924         (grokdeclarator): Likewise.  Adjust accordingly.
4925         * decl.h (grokdeclarator): Adjust declaration.
4926         * parser.c (cp_parser_init_declarator): Do not clear
4927         decl_specifiers->attributes.
4929         * cp-tree.h (lang_identifier): Remove class_value.
4930         (IDENTIFIER_CLASS_VALUE): Remove.
4931         (pop_class_decls): Likewise.
4932         (init_search_processing): Likewise.
4933         * class.c (handle_using_decl): Use lookup_member, not
4934         IDENTIFIER_CLASS_VALUE.
4935         (restore_class_cache): New function, split out from ...
4936         (pushclass): ... here.  Do not call clear_identifier_class_values.
4937         (invalidate_class_lookup_cache): Do not clear
4938         IDENTIFIER_CLASS_VALUE.
4939         (popclass): Do not call pop_class_decls.
4940         (maybe_note_name_used_in_class): Do not save names looked up after
4941         the class is complete.  Use lookup_member, not
4942         IDENTIFIER_CLASS_VALUE.
4943         * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
4944         * decl.c (cxx_init_decl_processing): Do not call
4945         init_search_processing.
4946         * method.c (do_build_copy_constructor): Remove unnecessary code.
4947         (do_build_assign_ref): Likewise.
4948         * name-lookup.c (pushdecl): Use lookup_member, not
4949         IDENTIFIER_CLASS_VALUE.
4950         (set_identifier_type_value_with_scope): Set TREE_TYPE on the
4951         type_shadowed list.
4952         (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
4953         (push_class_binding): Do not set it.
4954         (clear_identifier_class_values): Remove.
4955         (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
4956         (store_binding): Do not save it.
4957         (pop_from_top_level): Do not restore it.
4958         * name-lookup.h (cxx_saved_binding): Remove class_value.
4959         (clear_identifier_class_values): Remove.
4960         * ptree.c (cxx_print_identifier): Do not print
4961         IDENTIFIER_CLASS_VALUE.
4962         * search.c (search_obstack): Remove.
4963         (push_stack_level): Remove.
4964         (pop_stack_level): Remove.
4965         (search_level): Remove.
4966         (search_stack): Remove.
4967         (lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
4968         (setup_class_bindings): Use IDENTIFIER_MARKED, not
4969         IDENTIFIER_CLASS_VALUE.
4970         (marked_identifiers): New variable.
4971         (push_class_decls): Clear IDENTIFIER_MARKED.
4972         (pop_class_decls): Don't call pop_search_level.
4973         (init_search_processing): Remove.
4975 2004-07-12  Mark Mitchell  <mark@codesourcery.com>
4977         * cp-tree.h (get_aggr_typedef): Remove.
4978         * init.c (get_aggr_typedef): Likewise.
4980         * name-lookup.c (push_class_level_binding): Simplify.
4982 2004-07-12  Andrew Pinski  <apinski@apple.com>
4984         PR c++/16475
4985         Revert:
4986         2004-07-07  H.J. Lu  <hongjiu.lu@intel.com>
4987                 PR c++/16276
4988                 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
4989                 is not public.
4991 2004-07-12  Eric Christopher  <echristo@redhat.com>
4993         * parser.c (cp_parser_class_head): Remove unused variable.
4995 2004-07-12  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
4997         * decl.c (grok_op_properties): Reject [de-]allocation functions
4998         declared in a namespace, or declared as static.
5000 2004-07-12  Nathan Sidwell  <nathan@codesourcery.com>
5002         * cp-tree.h (make_binfo): Remove.
5003         * decl.c (xref_basetypes): Use make_tree_binfo directly.
5004         * tree.h (copy_base_binfos): Likewise.
5005         (make_binfo): Remove.
5007         * call.c (build_user_type_conversion_1, build_new_op,
5008         check_constructor_callable, build_temp,
5009         perform_direct_initialization_of_possible): Pass type directly to
5010         lookup_fnfields & build_special_member_call.
5011         (build_special_member_call): Accept a type, and complete it.
5012         * class.c (finish_stuct_bits): Copy the BINFOs here.
5013         * cvt.c (ocp_convert): Pass type directly to
5014         build_special_member_call.
5015         * decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
5016         (xref_basetypes): Allocate the binfo here. Adjust.
5017         * init.c (build_init, build_new_1): Pass type directly to
5018         build_special_member_call.
5019         * lex.c (cxx_make_type): Do not allocate binfo here.
5020         * name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
5021         * parser.c (cp_parser_class_head): Always call xref_basetypes.
5022         * pt.c (instantiate_class_template): Likewise. Inhibit access
5023         checking for template friends.
5024         * ptree.c (cxx_print_type): Adjust record printing.
5025         * search.c (lookup_base): When taking a type, complete it before
5026         looking for a binfo.
5027         (lookup_member): Delay completing a type.
5028         (push_class_decls): Don't walk an incomplete type.
5029         (lookup_conversions): Likewise.
5030         * semantics.c (finish_stmt_expr_expr): Pass type directly to
5031         build_special_member_call.
5032         * tree.c (copy_base_binfos): Adjust.
5033         (make_binfo): Likewise.
5034         * typeck.c (build_modify_expr): Pass type directly to
5035         build_special_member_call.
5036         * typeck2.c (process_init_constructor): Check a binfo exists.
5037         (build_m_component_ref): Allow accessing an incomplete type.
5038         (build_functional_cast): Pass type directly to
5039         build_special_member_call.
5041 2004-07-12  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5043         PR c++/2204
5044         * config-lang.in (gtfiles): Add typeck2.c.
5045         * Make-lang.in: Tweak typeck2.c dependencies, and add rule for
5046         gt-cp-typeck2.h.
5047         * cp-tree.h: Declare complete_type_check_abstract.
5048         * typeck2.c (pat_calc_hash, pat_compare,
5049         complete_type_check_abstract): New functions.
5050         (abstract_virtuals_error): If the type is abstract, register the
5051         declaration within abstract_pending_vars for further checks.
5052         Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
5053         * decl.c (cp_finish_decl): Do not strip array types.
5054         (create_array_type_for_decl): Check for abstractness of the element
5055         type.
5056         (complete_vars): Call complete_type_check_abstract.
5057         * class.c (finish_struct): Prepare a list of virtual functions for
5058         template types, and call complete_vars on it to check for abstractness.
5060 2004-07-12  Paolo Bonzini  <bonzini@gnu.org>
5062         PR tree-optimization/14107
5063         * decl.c (finish_function): Remove temporary band-aid.
5065 2004-07-11  Mark Mitchell  <mark@codesourcery.com>
5067         * call.c (build_operator_new_call): Avoid using push_to_top_level.
5068         (build_new_op): Adjust call to lookup_function_nonclass.
5069         * name-lookup.c (identifier_type_value): Adjust call to
5070         lookup_name_real.
5071         (lookup_name_real): Add block_p parameter.
5072         (lookup_name_nonclass): Adjust call to lookup_name_real.
5073         (lookup_function_nonclass): Likewise.
5074         (lookup_name): Likewise.
5075         * name-lookup.h (lookup_name_real): Change prototype.
5076         (lookup_name_nonclass): Likewise.
5077         * parser.c (cp_parser_lookup_name): Likewise.
5079         * cp-tree.h (saved_scope): Make old_bindings a vector.
5080         (unuse_fields): Remove.
5081         * name-lookup.h (cxx_saved_binding): Define it.
5082         * class.c (pushclass): Don't use unuse_fields.
5083         * name-lookup.c (cxx_saved_binding_make): Remove.
5084         (store_binding): Add new bindings to a vector, using an
5085         accumulator style, rather than adding them to a list.
5086         (store_bindings): Adjust accordingly.
5087         (store_class_bindings): Likewise.
5088         (push_to_top_level): Likewise.
5089         (pop_from_top_level): Likewise.
5090         * optimize.c (maybe_clone_body): Must push_to_top_level and
5091         pop_from_top_level calls outside of loop.
5092         * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope
5093         calls here from cp_parser_late_parsing_default_args.
5094         (cp_parser_save_default_args): Record the class type in which the
5095         function is declared.
5096         (cp_parser_late_parsing_default_args): Do not call
5097         push_nested_class/pop_nested_class.
5098         * search.c (dfs_unuse_fields): Remove.
5099         (unuse_fields): Remove.
5101 2004-07-11  Joseph S. Myers  <jsm@polyomino.org.uk>
5103         * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
5104         LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
5105         * cp-tree.h (poplevel): Declare.
5106         (set_block): Remove.
5107         * decl.c (set_block): Remove.
5109 2004-07-10  Mike Stump  <mrs@apple.com>
5111         * decl2.c (import_export_class): Never export/import vtables
5112         with inline key functions.
5114 2004-07-09  Steven Bosscher  <stevenb@suse.de>
5116         * typeck.c (c_expand_asm_operands): Remove.
5118 2004-07-09  Mike Stump  <mrs@apple.com>
5120         * typeck.c (build_class_member_access_expr): Skip null deref
5121         warning when we don't dereference it.
5123 2004-07-09  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5125         PR c++/8211
5126         PR c++/16165
5127         * class.c (check_field_decls): Improve -Weffc++ warning: do not
5128         warn for pointers to functions/members, or for classes without
5129         destructors.
5131 2004-07-08  Mark Mitchell  <mark@codesourcery.com>
5133         * name-lookup.h (struct cp_binding_level): Update documentation
5134         for class_shadowed.
5136 2004-07-08  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5138         PR c++/16169
5139         * typeck.c (check_return_expr): Improve -Weffc++ warning: handle
5140         returning CALL_EXPR, and non-reference return type.
5142 2004-07-08  Nathan Sidwell  <nathan@codesourcery.com>
5144         * name-lookup.c (push_binding): Use VEC_reserve.
5146 2004-07-08  Richard Henderson  <rth@redhat.com>
5148         * cp-tree.h (expand_eh_spec_block): Remove.
5150 2004-07-07  Mark Mitchell  <mark@codesourcery.com>
5152         * cp-tree.h (saved_scope): Remove x_previous_class_type and
5153         x_previous_class_values; add x_previous_class_level.
5154         (previous_class_type): Remove.
5155         (previous_class_values): Remove.
5156         (previous_class_level): New macro.
5157         * class.c (pushclass): Restore the identifier cache more
5158         expeditiously.
5159         (invalidate_class_lookup_cache): Use vector for class_shadowed and
5160         previous_class_values.
5161         * decl.c (poplevel): Likewise.
5162         * name-lookup.c (cxx_binding_init): New function.
5163         (cxx_binding_make): Use it.
5164         (push_binding): For a binding in a class level, use a vector of
5165         cp_class_binding nodes.
5166         (push_binding_level): New function.
5167         (begin_scope): Use it.
5168         (leave_scope): Do not put class binding levels on the free list.
5169         (print_binding_level): Adjust for the fact that class_shadowed is
5170         a vector.
5171         (poplevel_class): Likewise.
5172         (clear_identifier_class_values): Likewise.
5173         (push_class_level_binding): Likewise.
5174         (set_class_shadows): Remove.
5175         (store_binding): New function.
5176         (store_class_bindings): New function.
5177         (push_to_top_level): Use store_class_bindings as appropriate.
5178         (pop_from_top_level): Use previous_class_level, not
5179         previous_class_type.
5180         * name-lookup.h (cp_class_binding): New type.
5181         (cp_binding_level): Use a vector object for class_shadowed.
5182         (push_binding_level): Declare.
5183         (set_class_shadows): Remove.
5185 2004-07-07  Andrew Pinski  <apinski@apple.com>
5187         * class.c (instantiate_type): BUFFER_REF is dead.
5188         * lex.c (init_operators): IN_EXPR is dead.
5190 2004-07-07  Jason Merrill  <jason@redhat.com>
5192         PR c++/16334
5193         * call.c (build_new_op): Give overload warnings for built-in
5194         candidates.
5196 2004-07-07  H.J. Lu  <hongjiu.lu@intel.com>
5198         PR c++/16276
5199         * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
5200         is not public.
5202 2004-07-07  Nathan Sidwell  <nathan@codesourcery.com>
5204         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
5205         * class.c (build_primary_vtable, check_bases,
5206         determine_primary_base, finish_struct_bits,
5207         maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
5208         get_basefndecls, warn_hidden, walk_subobject_offsets,
5209         build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
5210         layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
5211         finish_struct_1, get_vfield_name, contains_empty_class_p,
5212         dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
5213         dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
5214         add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
5215         BINFO macros.
5216         * decl.c (xref_basetypes): Likewise.
5217         * dump.c (cp_dump_tree): Likewise.
5218         * error.c (dump_expr): Likewise.
5219         * init.c (sort_mem_initializers, expand_member_init,
5220         push_base_cleanups): Likewise.
5221         * method.c (do_build_copy_constructor, do_build_assign_reg,
5222         synthesize_exception_spec): Likewise.
5223         * name-lookup.c (arg_assoc_class): Likewise.
5224         * pt.c (instantiate_class_template, tsubst,
5225         get_template_base_recursive): Likewise.
5226         * ptree.c (cxx_print_type): Likewise.
5227         * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
5228         * search.c (lookup_base_r, dynamic_cast_base_recurse,
5229         dfs_access_in_type, access_in_type, lookup_field_queue_p,
5230         bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
5231         marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
5232         dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
5233         binfo_for_vtable, copied_binfo, original_binfo): Likewise
5234         * tree.c (copy_base_binfos, make_binfo): Likewise.
5235         * typeck.c (commmon_base_type): Likewise
5236         * typeck2.c (process_init_constructor): Likewise
5238 2004-07-06  Joseph S. Myers  <jsm@polyomino.org.uk>
5240         * decl.c (check_tag_decl): Name redeclared type in diagnostic.
5242 2004-07-06  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5244         PR c++/3671
5245         * pt.c (convert_nontype_argument): Disallow conversions between
5246         different enumeration types.
5248 2004-07-06  Nathan Sidwell  <nathan@codesourcery.com>
5250         * cp-tree.h (BINFO_MARKED): Remove.
5251         (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
5252         BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
5253         BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
5254         (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
5255         * class.c (build_base_path): Use BINFO_VIRTUAL_P.
5256         (mark_primary_bases, determine_primary_base, base_derived_from,
5257         dfs_find_final_overrider, dfs_find_final_overrider_q,
5258         dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
5259         dfs_modify_vtables, walk_subobject_offsets,
5260         layout_nonempty_base_or_field, build_base_field,
5261         build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
5262         end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
5263         finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
5264         build_ctor_vtbl_group, accumulate_vtble_inits,
5265         dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
5266         build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
5267         add_vcall_offset_vtbl_entries_1): Likewise.
5268         * decl.c (xref_basetypes): Incomming virtual base indicated by
5269         TREE_TYPE. Adjust.
5270         * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
5271         * init.c (finish_init_stmts, sort_mem_initializers,
5272         emit_mem_initializers, build_vtble_address, expand_member_init,
5273         push_base_cleanups): Likewise.
5274         * method.c (do_build_copy_constructor): Likewise.
5275         * pt.c (instantiate_class_template,
5276         get_template_base_recursive): Likewise.
5277         * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
5278         get_pseudo_ti_desc): Likewise.
5279         * search.c (lookup_base_r, dynamic_cast_base_recurse,
5280         binfo_from_vbase, binfo_via_virtual, copied_binfo,
5281         original_binfo): Likewise.
5282         * semantics.c (finish_base_specifier): Virtualness is indicated
5283         by TREE_TYPE.
5284         * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
5286 2004-07-06  Mark Mitchell  <mark@codesourcery.com>
5288         Revert:
5289         2004-06-24  Jason Merrill  <jason@redhat.com>
5290         PR c++/16115
5291         * decl.c (grokparms): Give the PARM_DECL reference type if the
5292         parameter is passed by invisible reference.
5294 2004-07-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5296         * cp-lang.c (cp_var_mod_type_p): Add extra arg.
5297         * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
5298         * pt.c (check_instantiated_args, unify): Likewise.
5300 2004-07-05  Phil Edwards  <phil@codesourcery.com>
5302         * Make-lang.in (check-c++, lang_checks):  Add some comments.
5304 2004-07-05  Zack Weinberg  <zack@codesourcery.com>
5306         * cp-mudflap.c: Delete file.
5307         * Makefile.in: Remove all references to cp-mudflap.o.
5309 2004-07-05  Zack Weinberg  <zack@codesourcery.com>
5311         * decl.c (cxx_init_decl_processing): Call
5312         build_common_tree_nodes before creating the global NAMESPACE_DECL.
5314 2004-07-05  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5316         PR c++/2518
5317         * call.c (build_operator_new_call): Look only at global scope.
5319 2004-07-05  Nathan Sidwell  <nathan@codesourcery.com>
5321         * call.c (enforce_access): Expect TREE_BINFO.
5322         * class.c (binfo_ctor_vtable): Check TREE_BINFO.
5323         * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
5324         (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
5325         Adjust.
5326         (BINFO_LANG_ELTS): Remove.
5327         (BINFO_LANG_SLOTS): New.
5328         (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
5329         (CLASSTYPE_TEMPLATE_INFO): Adjust.
5330         * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
5331         * search.c (lookup_member): Check TREE_BINFO.
5332         * semantics.c (perform_or_defer_access_check): Likewise.
5333         (check_accessibility_of_qualified_id): Check
5334         deferred_access_no_check.
5335         * tree.c (make_binfo): Use make_tree_binfo.
5337 2004-07-04  Mark Mitchell  <mark@codesourcery.com>
5339         * method.c (implicitly_declare_fn): Set linkage of generated
5340         functions.
5342 2004-07-04  Richard Henderson  <rth@redhat.com>
5344         * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
5346 2004-07-03  Scott Brumbaugh  <scottb.lists@verizon.net>
5348         PR c++/3761
5349         * name-lookup.c (push_class_level_binding): Don't pass a
5350         TREE_LIST of ambiguous names to check_template_shadow as it
5351         only handles declarations. Instead, pull the declaration
5352         out and pass that.
5354 2004-07-03  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5356         PR c++/14971
5357         * pt.c (check_explicit_specialization): Clarify error message.
5359 2004-07-02  Richard Henderson  <rth@redhat.com>
5361         * tree.c (cp_unsave_r): Update remap_save_expr call.
5363 2004-07-02  Mark Mitchell  <mark@codesourcery.com>
5365         PR c++/16240
5366         * mangle.c (write_template_arg): Correct mangling.
5368         PR c++/16297
5369         * decl.c (grokdeclarator): Robustify.
5371 2004-07-01  Richard Henderson  <rth@redhat.com>
5373         * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
5374         * method.c (synthesize_method): Don't clear_last_expr.
5375         * name-lookup.c (maybe_push_cleanup_level): Likewise.
5377 2004-07-01  Nick Clifton  <nickc@redhat.com>
5379         * decl2.c (import_export_class): Invoke the
5380         import_export_class field in the gcc_target structure if it is not
5381         empty.
5383 2004-06-30  Richard Henderson  (rth@redhat.com>
5385         * decl.c (start_preparsed_function): Don't set immediate_size_expand.
5386         * method.c (use_thunk): Likewise.
5388 2004-06-30  Joseph S. Myers  <jsm@polyomino.org.uk>
5390         * call.c (build_over_call), typeck.c (build_function_call): Call
5391         check_function_arguments instead of check_function_format.
5393 2004-06-30  Joseph S. Myers  <jsm@polyomino.org.uk>
5395         * call.c (build_over_call), typeck.c (build_function_call): Update
5396         calls to check_function_format.
5398 2004-06-30  Richard Henderson  <rth@redhat.com>
5400         * call.c (build_over_call): Use __builtin_memcpy for copying
5401         CLASS_AS_BASE rather than funny casting.
5403 2004-06-30  Richard Henderson  <rth@redhat.com>
5405         * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
5406         TYPE_SIZE_UNIT of full_type.
5408 2004-06-30  Per Bothner  <per@bothner.com>
5410         Conditionally compile support for --enable-mapped_location.
5411         * decl.c (pop_label):  Handle (imperfectly) USE_MAPPED_LOCATION case.
5412         * decl2.c:  If USE_MAPPED_LOCATION, don't do some line number
5413         adjustments - which I don't understand.
5414         * error.c (dump_decl):  Rename "<interrnal>" to "<built-in>".
5415         * error.c:  Use LOCATION_FILE and EXPR_LOCATION macros.
5416         (print_instantiation_partial_context):  Use expand_location.
5417         * decl.c (duplicate_decl):  Use new DECL_IS_BUILTIN macro.
5418         * name-lookup.c:  Likewise.
5419         * lex.c (cxx_init):  Likewise.  Also use BUILTINS_LOCATION.
5420         * name-lookup.c:  Use input_line macro.
5421         * parser.c (cp_lexer_get_preprocessor_token):  Use UNKNOWN_LOCATION.
5422         (cp_parser_statement):  Rename locaal variable statement_locus to
5423         statement_location and use SET_EXPR_LOCATION macro.
5424         * pt.c:  Handle USE_MAPPED_LOCATION case.  Use new macros.
5425         * tree.c (cp_walk_subtrees):  Likewise.
5427 2004-06-29  Per Bothner  <per@bothner.com>
5429         * tree.c (build_min_nt, build_min, build_min_non_dep):
5430         Don't set TREE_COMPLEXITY from input_line.
5432 2004-06-29  Paul Brook  <paul@codesourcery.com>
5434         * init.c: Include target.h.
5435         (get_cookie_size): Remove and replace with target hook.
5436         Update callers.
5437         (build_new_1): Store the element size in the cookie.
5439 2004-06-29  Nathan Sidwell  <nathan@codesourcery.com>
5441         PR c++/16260
5442         * parser.c (cp_parser_template_declaration_after_export): Disable
5443         access checks here ...
5444         (cp_parser_class_specifier): ... not here.
5446 2004-06-28  Nathan Sidwell  <nathan@codesourcery.com>
5448         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
5449         VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
5450         BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
5451         TREE_CHECK macro.
5453 2004-06-28  Nathan Sidwell  <nathan@codesourcery.com>
5455         * cp-tree.h (struct deferred_access): Move to ...
5456         * semantics.c (struct deferred_access): ... here. Adjust.
5457         (deferred_access_stack): Make a VEC(deferred_access),
5458         (deferred_access_free_list): Remove.
5459         (deferred_access_no_check): New.
5460         (push_deferring_access_checks, resume_deferring_access_checks,
5461         stop_deferring_access_checks, pop_deferring_access_checks,
5462         get_deferred_access_checks, pop_to_parent_deferring_access_checks,
5463         perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
5465 2004-06-28  Nathan Sidwell  <nathan@codesourcery.com>
5467         PR c++/16174
5468         * call.c (build_temp): Declare.
5469         (check_constructor_callable): New.
5470         (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
5471         CONSTRUCTOR_CALLABLE.
5472         (convert_like_real, initialize_reference): Use
5473         check_constructor_callable.
5474         * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
5475         (LOOKUP_*): Renumber.
5477 2004-06-28  Nathan Sidwell  <nathan@codesourcery.com>
5479         * friend.c (add_friend): Only perform access checks when context
5480         is a class.
5481         * lex.c (cxx_make_type): Only create a binfo for aggregate types.
5482         * parser.c (cp_parser_class_specifier): Disable access checks here
5483         when parsing the body of a templated class.
5484         * semantics.c (perform_or_defer_access_checks): Reorder to allow
5485         NULL binfos when not checking access.
5487 2004-06-28  Nathan Sidwell  <nathan@codesourcery.com>
5489         Use vector API for vbase list.
5490         * cp-tree.h: Include vec.h
5491         (DEF_VEC_P (tree)): New type.
5492         (struct lang_type_class): Change vbase's member type.
5493         (binfo_for_vbase): Declare.
5494         * class.c (determine_primary_base, base_derived_from,
5495         update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
5496         warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
5497         build_vtbl_initializer): Adjust.
5498         * decl.c (xref_basetypes): Adjust, accumulate upper bound of
5499         vbases.
5500         * init.c (sort_mem_initializers, expand_member_init,
5501         push_base_cleanups): Adjust.
5502         * method.c (do_build_copy_constructor): Adjust.
5503         * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
5504         (binfo_for_vbase): New.
5505         * tree.c (copy_base_binfos): Adjust.
5507 2004-06-28  Mark Mitchell  <mark@codesourcery.com>
5509         * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
5511 2004-06-27  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5513         PR c++/14123
5514         * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
5515         paranthesis in case of pointers to array members.
5516         * error.c (dump_type_prefix): Likewise.
5517         (dump_type_suffix): Maybe issue a whitespace when printing
5518         ARRAY_TYPE.
5520 2004-06-27  Mark Mitchell  <mark@codesourcery.com>
5522         PR c++/16193
5523         * parser.c (cp_parser_set_decl_spec_type): Refine test for
5524         redefinition of built-in types.
5526 2004-06-27  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5528         * error.c (pp_template_argument_list_start): Remove.
5529         (pp_template_argument_list_end): Likewise.
5530         (pp_separate_with_comma): Use pp_cxx_separate_with.
5531         (reinit_global_formatting_buffer): Remove.
5532         (pp_non_consecutive_character): Likewise.
5533         (dump_scope): Use pp_cxx_colon_colon.
5534         (dump_template_parameter): Use pp_cxx_identifier,
5535         pp_cxx_tree_identifier and pp_cxx_whitespace.
5536         (dump_templat_bindings): Replace use of pp_string with sequence
5537         of pp_cxx_whitespace and pp_equal.
5538         (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
5539         pp_cxx_colon_colon, pp_cxx_whitespace throughout.  Don't set
5540         padding here.
5541         (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
5542         (dump_type_prefix): Don't set padding.  Use pp_cxx_whitespace,
5543         pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
5544         (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
5545         pp_cxx_right_bracket, pp_cxx_identifier throughout,
5546         (dump_decl): Likewise.
5547         (dump_template_decl): Likewise.
5548         (dump_function_decl): Likewise.  Set padding as appropriate.
5549         (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
5550         pp_cxx_right_paren.
5551         (dump_exception_spec): Likewise.
5552         (dump_function_name): Use pp_cxx_tree_identifier and
5553         pp_cxx_identifier.
5554         (dump_template_parms): Use pp_cxx_begin_template_argument_list and
5555         pp_cxx_end_template_argument_list.
5556         (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
5557         pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
5558         pp_cxx_whitespace throughout.
5559         (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
5560         pp_cxx_right_paren.
5561         (dump_unary_op): Likewise.
5562         (reinit_cxx_pp): New function.
5563         (type_as_string); Use it.
5564         (expr_as_string): Likewise.
5565         (decl_as_string); Likewise.
5566         (context_as_string): Likewise.
5567         (lang_decl_name): Likewise.
5568         (decl_to_string): Likewise.
5569         (expr_to_string): Likewise.
5570         (parm_to_string): Likewise.
5571         (type_to_string): Likewise.
5572         (args_to_string): Likewise.
5573         (cv_to_string): Likewise.
5575 2004-06-26  Mark Mitchell  <mark@codesourcery.com>
5577         * cp-tree.h (cp_cv_quals): New type.
5578         (cp_declarator): Use it instead of "tree" as appropriate.
5579         (grok_method_quals): Adjust prototype.
5580         (grokclassfn): Likewise.
5581         (do_friend): Likewise.
5582         * decl.c (grokfndecl): Use cp_cv_quals, not tree.
5583         (grokdeclarator): Likewise.
5584         * decl2.c (grok_method_quals): Likewise.
5585         (grokclassfn): Likewise.
5586         * friend.c (do_friend): Likewise.
5587         * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
5588         * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
5589         (make_pointer_declarator): Likewise.
5590         (make_reference_declarator): Likewise.
5591         (make_ptrmem_declarator): Likewise.
5592         (cp_parser_ptr_operator): Likewise.
5593         (cp_parser_cv_qualifier_seq_opt): Likewise.
5594         (cp_parser_cv_qualifier_opt): Remove.
5595         (cp_parser_new_declarator_opt): Adjust call to
5596         cp_parser_ptr_operator.
5597         (cp_parser_conversion_declaration_opt): Likewise.
5598         (cp_parser_declarator): Use cp_cv_quals, not tree.
5599         (cp_parser_direct_declarator): Likewise.
5601 2004-06-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5603         * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
5604         Rename DECL_STMT to DECL_EXPR.
5605         * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
5606         * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
5607         * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
5609 2004-06-26  Jan Hubicka  <jh@suse.cz>
5611         PR C++/14865
5612         * decl2.c (maybe_emit_vtables):  Always import_export_vtable for the
5613         reachability analysis.
5615 2004-06-25  Mark Mitchell  <mark@codesourcery.com>
5617         * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
5618         2004-06-23 change.
5620 2004-06-25  Paul Brook  <paul@codesourcery.com>
5622         * decl2.c (get_guard): Call targetm.cxx.guard_type.
5623         (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
5625 2004-06-24  Mark Mitchell  <mark@codesourcery.com>
5627         * decl.c (grokdeclarator): Restore error messages about __thread.
5628         * parser.c (cp_parser_decl_specifier_seq): Likewise.
5630 2004-06-24  Jason Merrill  <jason@redhat.com>
5632         PR c++/16115
5633         * decl.c (grokparms): Give the PARM_DECL reference type if the
5634         parameter is passed by invisible reference.
5636 2004-06-24  Andreas Schwab  <schwab@suse.de>
5638         * cp-tree.h (enum cp_storage_class): Remove trailing comma.
5640 2004-06-23  Mark Mitchell  <mark@codesourcery.com>
5642         * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
5643         (cp/decl.o): Likewise.
5644         (cp/decl2.o): Likewise.
5645         (cp/pt.o): Likewise.
5646         (cp/semantics.o): Likewise.
5647         * config-lang.in (gtfiles): Do not reference cp/lex.h.
5648         * class.c: Do not include lex.h.
5649         (add_implicitly_declared_members): Do not use
5650         adding_implicit_members.
5651         (check_bases_and_members): Do not talk about grok_x_components.
5652         * cp/cp-tree.h (adding_implicit_members): Remove.
5653         (cp_storage_class): New type.
5654         (cp_decl_spec): Likewise.
5655         (cp_decl_specifier_seq): Likewise.
5656         (cp_parameter_declarator): Use it for the decl_specifiers field.
5657         (check_tag_decl): Adjust prototype.
5658         (shadow_tag): Likewise.
5659         (groktypename): Likewise.
5660         (start_decl): Likewise.
5661         (start_function): Likewise.
5662         (start_method): Likewise.
5663         (grok_x_components): Remove.
5664         (grokfield): Adjust prototype.
5665         (grokbitfield): Likewise.
5666         (finish_member_class_template): Remove.
5667         * decl.c: Do not include lex.h.
5668         (adding_implicit_members): Do not define.
5669         (check_tag_decl): Do not use trees to represent decl-specifiers.
5670         (shadow_tag): Likewise.
5671         (groktypename): Likewise.
5672         (start_decl): Likewise.
5673         (grokvardecl): Likewise.
5674         (grokdeclarator): Likewise.
5675         (grokparms): Likewise.
5676         (start_function): Likewise.
5677         (start_method): Likewise.
5678         * decl.h (grokdeclarator): Adjust prototype.
5679         * decl2.c: Do not include lex.h.
5680         (grok_x_components): Remove.
5681         (grokfield): Do not use trees to represent decl-specifiers.
5682         (grokbitfield): Likewise.
5683         * lex.c: Do not include lex.h.
5684         * lex.h: Remove.
5685         * parser.c: Include target.h.
5686         (clear_decl_specs): New function.
5687         (cp_parser_translation_unit): Do not use trees to represent
5688         decl-specifiers.
5689         (cp_parser_postfix_expression): Likewise.
5690         (cp_parser_new_type_id): Likewise.
5691         (cp_parser_condition): Likewise.
5692         (cp_parser_simple_declaration): Likewise.
5693         (cp_parser_decl_specifier_seq): Likewise.
5694         (cp_parser_function_specifier_opt): Likewise.
5695         (cp_parser_conversion_type_id): Likewise.
5696         (cp_parser_template_parameter): Likewise.
5697         (cp_parser_explicit_instantiation): Likewise.
5698         (cp_parser_type_specifier): Likewise.
5699         (cp_parser_simple_type_specifier): Likewise.
5700         (cp_parser_init_declarator): Likewise.
5701         (cp_parser_type_id): Likewise.
5702         (cp_parser_type_specifier_seq): Likewise.
5703         (cp_parser_parameter_declaration): Likewise.
5704         (cp_parser_member_declaration): Likewise.
5705         (cp_parser_exception_declaration): Likewise.
5706         (cp_parser_function_definition_from_specifiers_and_declarator):
5707         Likewise.
5708         (cp_parser_single_declaration): Likewise.
5709         (cp_parser_save_member_function_body): Likewise.
5710         (cp_parser_friend_p): Likewise.
5711         (cp_parser_set_storage_class): New function.
5712         (cp_parser_set_decl_spec_type): Likewise.
5713         * pt.c: Do not include lex.h.
5714         * semantics.c: Likewise.
5715         (finish_member_class_template): Remove.
5717 2004-06-23  Roger Sayle  <roger@eyesopen.com>
5719         * call.c (build_cxx_call): Don't call expand_tree_builtin.  No
5720         longer take both "args" and "convert_args" as arguments.
5721         (build_op_delete_call): Update call to build_cxx_call.
5722         (build_over_call): Likewise, update call to build_cxx_call.
5723         * cp-tree.h (build_cxx_call): Update funtion prototype.
5724         * typeck.c (build_function_call): Don't call expand_tree_builtin.
5725         * rtti.c (throw_bad_cast): Update call to build_cxx_call.
5726         (throw_bad_typeid): Likewise.
5727         (build_dynamic_cast_1): Likewise.
5729 2004-06-22  Richard Henderson  <rth@redhat.com>
5731         * class.c (build_vfn_ref): Take a pointer not object.  Build
5732         an OBJ_TYPE_REF.
5733         (cp_fold_obj_type_ref): New.
5734         * call.c (build_over_call): Update build_vfn_ref call.
5735         * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
5736         * cp-tree.h (cp_fold_obj_type_ref): Declare.
5738 2004-06-21  Jason Merrill  <jason@redhat.com>
5740         PR c++/16112
5741         * cp-gimplify.c (cp_gimplify_init_expr): Look through
5742         CLEANUP_POINT_EXPR.
5744 2004-06-21  Mark Mitchell  <mark@codesourcery.com>
5746         * cp-tree.def (NEW_EXPR): Add a fourth slot.
5747         * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
5748         (TREE_PARMLIST): Likewise.
5749         (CALL_DECLARATOR_PARMS): Likewise.
5750         (CALL_DECLARATOR_QUALS): Likewise.
5751         (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
5752         (cp_declarator_kind): New type.
5753         (cp_parameter_declarator): Likewise.
5754         (cp_declarator): Likewise.
5755         (cp_error_declarator): Likewise.
5756         (no_parameters): Likewise.
5757         (groktypename): Change prototype.
5758         (start_decl): Likewise.
5759         (start_handler_parms): Likewise.
5760         (get_scope_of_declarator): Likewise.
5761         (start_function): Likewise.
5762         (start_preparsed_function): New function.
5763         (start_function): Change prototype.
5764         (start_method): Likewise.
5765         (grokfield): Likewise.
5766         (grokbitfield): Likewise.
5767         (build_new): Likewise.
5768         (make_pointer_declarator): Remove.
5769         (make_reference_declarator): Likewise.
5770         (make_call_declarator): Likewise.
5771         (set_quals_and_spec): Likewise.
5772         (process_template_parm): Change prototype.
5773         (begin_function_definition): Remove.
5774         (finish_parmlist): Remove.
5775         * decl.c (groktypename): Do not use trees to represent
5776         declarators.
5777         (start_decl): Likewise.
5778         (start_handler_parms): Remove.
5779         (get_scope_of_declarator): Reimplement.
5780         (grokdeclarator): Do not use trees to represent declarators.
5781         (grokparms): Likewise.
5782         (start_function): Likewise.
5783         (start_method): Likewise.
5784         (build_void_list_mode): Do not use TREE_PARMLIST.
5785         * decl.h (grokdeclarator): Change prototype.
5786         * decl2.c (grok_method_quals): Robustify.
5787         (grok_x_components): Do not use trees to represent declarators.
5788         (grokfield): Likewise.
5789         (grokbitfield): Likewise.
5790         (start_objects): Build FUNCTION_DECLs, not declarators.
5791         (start_static_storage_duration_function): Likewise.
5792         * init.c (build_new): Simplify.
5793         * lex.c (make_pointer_declarator): Remove.
5794         (make_reference_declarator): Likewise.
5795         (make_call_declarator): Likewise.
5796         (set_quals_and_spec): Likewise.
5797         * method.c (use_thunk): Use start_preparsed_function.
5798         (synthesize_method): Likewise.
5799         (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
5800         * optimize.c (maybe_clone_body): Use start_preparsed_function.
5801         * parser.c (cp_error_declarator): New variable.
5802         (declarator_obstack): Likewise.
5803         (alloc_declarator): New function.
5804         (make_declarator): Likewise.
5805         (make_id_declarator): Likewise.
5806         (make_pointer_declarator): Likewise.
5807         (make_reference_declarator): Likewise.
5808         (make_ptrmem_declarator): Likewise.
5809         (make_call_declarator): Likewise.
5810         (make_array_declarator): Likewise.
5811         (no_parameters): New variable.
5812         (make_parameter_declarator): Likewise.
5813         (cp_parser_check_for_definition_in_return_type): Do not use trees
5814         to represent declarators.
5815         (cp_parser_translation_unit): Likewise.
5816         (cp_parser_new_expression): Likewise.
5817         (cp_parser_new_type_id): Likewise.
5818         (cp_parser_new_declarator_opt): Likewise.
5819         (cp_parser_direct_new_declarator): Likewise.
5820         (cp_parser_condition): Likewise.
5821         (cp_parser_declaration_statement): Likewise.
5822         (cp_parser_declaration): Likewise.
5823         (cp_parser_conversion_type_id): Likewise.
5824         (cp_parser_conversion_declarator_opt): Likewise.
5825         (cp_parser_template_parameter_list): Likewise.
5826         (cp_parser_template_parameter): Likewise.
5827         (cp_parser_explicit_instantiation): Likewise.
5828         (cp_parser_init_declarator): Likewise.
5829         (cp_parser_declarator): Likewise.
5830         (cp_parser_direct_declarator): Likewise.
5831         (cp_parser_type_id): Likewise.
5832         (cp_parser_parameter_declaration_clause): Likewise.
5833         (cp_parser_parameter_declaration_list): Likewise.
5834         (cp_parser_parameter_declaration): Likewise.
5835         (cp_parser_member_declaration): Likewise.
5836         (cp_parser_exception_declaration): Likewise.
5837         (cp_parser_check_declarator_template_parameters): Likewise.
5838         (cp_parser_function_definition_from_specifiers_and_declarator):
5839         Likewise.
5840         (cp_parser_save_member_function_body): Likewise.
5841         * pt.c (process_template_parm): Add is_non_type parameter.
5842         (convert_template_argument): Adjust call to groktypename.
5843         (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
5844         (tsubst): Do not expect declarators.
5845         (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
5846         argument.
5847         (instantiate_decl): Use start_preparsed_function.
5848         * semantics.c (begin_function_definition): Remove.
5849         (finish_parmlist): Remove.
5850         * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
5851         declarators.
5853 2004-06-21  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5855         * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
5856         (build_new_method_call): Likewise.
5857         * decl.c (local_variable_p_walkfn): Don't walk into types.
5858         * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
5859         (build_anon_union_vars): Add new operand for COMPONENT_REF.
5860         * init.c (buld_new): Add new operand for ARRAY_REF.
5861         * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
5862         (do_build_assign_ref): Likewise.
5863         * parser.c (cp_parser_direct_new_declarator): Add new operands
5864         for ARRAY_REF.
5865         (cp_parser_direct_declarator): Likewise.
5866         * pt.c (tsubst): Likewise.
5867         (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
5868         for COMPONENT_REF.
5869         * semantics.c (finish_non_static_data_member): Add new operand
5870         for COMPONENT_REF.
5871         * typeck.c (build_class_member_access_expr): Likewise.
5872         (build_class_member_access_expr, finish_class_member_access_expr):
5873         Likewise.
5874         (build_ptrmemfunc_access_expr): Likewise.
5875         (build_array_ref): Add new operands for ARRAY_REF.
5876         * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
5877         * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
5879 2004-06-21  Richard Henderson  <rth@redhat.com>
5881         * dump.c (cp_dump_tree): Don't use dump_next_stmt.
5882         * parser.c (cp_parser_jump_statement): Update commentary.
5883         * pt.c (tsubst_expr): Use RETURN_EXPR.
5884         * semantics.c (finish_return_stmt): Likewise.
5885         (finalize_nrv_r): Likewise.
5886         * typeck.c, typeck2.c: Update file start commentary.
5888 2004-06-21  Richard Henderson  <rth@redhat.com>
5890         * semantics.c (finish_expr_stmt): Call verify_sequence_points.
5892 2004-06-20  Richard Henderson  <rth@redhat.com>
5894         * cp-tree.h (add_decl_stmt): Declare.
5895         * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
5896         * semantics.c (maybe_cleanup_point_expr): New.
5897         (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
5898         finish_for_expr, finish_switch_cond): Use it.
5899         (finalize_nrv_r): Don't build an EXPR_STMT.  Don't frob TREE_CHAIN.
5901 2004-06-20  Richard Henderson  <rth@redhat.com>
5903         * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
5904         * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
5905         (cp_gimplify_expr): Call it.
5906         (gimplify_cleanup_stmt): Move from c-gimplify.c.
5907         (cp_genericize): New.
5908         * decl.c (finish_function): Call it.
5909         * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
5910         (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
5911         (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
5912         (cp_genericize): Declare.
5913         * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
5914         * dump.c (cp_dump_tree): Likewise.
5915         * semantics.c (push_cleanup): Move from c-semantics.c.
5917 2004-06-20  Zack Weinberg  <zack@codesourcery.com>
5919         * cp-lang.c (has_c_linkage): Implement.
5921         * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
5922         * decl.c (duplicate_decls): Use COPY_DECL_RTL.
5923         (builtin_function_1): Don't call make_decl_rtl.
5924         (build_cp_library_fn): Don't call set_mangled_name_for_decl.
5925         (grokvardecl): Don't call mangle_decl.
5926         * except.c (nothrow_libfn_p): Look at DECL_NAME, not
5927         DECL_ASSEMBLER_NAME.
5928         * method.c (set_mangled_name_for_decl): Delete.
5929         * name-lookup.c (pushdecl): When a local extern shadows a
5930         file-scope declaration of the same object, give both DECLs the
5931         same DECL_UID.
5932         * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
5933         on DECL_ASSEMBLER_NAME.
5935 2004-06-19  Richard Henderson  <rth@redhat.com>
5937         * cp-gimplify.c: Remove unnecessary prototypes.
5938         (cp_gimplify_stmt): Merge into ...
5939         (cp_gimplify_expr): ... here.  Move to end of file.  Handle
5940         stmts_are_full_exprs_p frobbing.
5941         * cp-tree.h (cp_gimplify_stmt): Remove.
5942         * pt.c (tsubst_expr): Merge prep_stmt and unify.
5943         * tree.c (init_tree): Don't set lang_gimplify_stmt.
5945 2004-06-18  Richard Henderson  <rth@redhat.com>
5947         PR c++/16034
5948         * semantics.c (begin_cond): New.
5949         (finish_cond): Rewrite to handle template DECL_STMTs specially.
5950         Assume that non-template decls go land before the conditional.
5951         (simplify_loop_decl_cond): Likewise.
5952         (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
5953         finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
5954         begin_switch_stmt, finish_switch_cond): Update to match.
5956 2004-06-17  Jason Merrill  <jason@redhat.com>
5958         PR c++/16015
5959         * semantics.c (simplify_aggr_init_expr): Don't return the slot.
5960         (finish_stmt_expr_expr): Update type after conversions.
5961         (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
5962         Handle void initializer.
5963         * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
5965 2004-06-17  Geoffrey Keating  <geoffk@apple.com>
5967         * class.c (build_clone): Don't call defer_fn, let mark_used do it.
5968         * cp-tree.h (defer_fn): Delete.
5969         * decl2.c (defer_fn): Delete.
5970         (finish_file): Simplify deferred_fns loops; check that
5971         only used inline functions get into deferred_fns.
5972         (mark_used): Inline previous contents of defer_fn.
5974 2004-06-16  Richard Henderson  <rth@redhat.com>
5976         * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
5977         (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
5978         * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
5979         of CTOR_INITIALIZER ...
5980         (pp_cxx_statement): ... here.
5981         * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
5982         (finish_function): Use alloc_stmt_list to zap entire function.
5983         * parser.c (cp_parser_compound_statement): Update commentary.
5984         * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
5985         * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
5986         (finish_stmt_expr): Don't look through COMPOUND_STMT.
5988 2004-06-16  Geoffrey Keating  <geoffk@apple.com>
5990         * pt.c (mark_decl_instantiated): Don't call defer_fn.
5992 2004-06-16  Richard Henderson  <rth@redhat.com>
5994         * parser.c (cp_parser_labeled_statement): Update commentary.
5995         * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
5996         * tree.c (mark_local_for_remap_r): Likewise.
5998 2004-06-16  Richard Henderson  <rth@redhat.com>
6000         * parser.c (cp_parser_asm_definition): Update commentary.
6001         * pt.c (tsubst_expr): Use ASM_EXPR.
6002         * semantics.c (finish_asm_stmt): Likewise.
6004 2004-06-16  Richard Henderson  <rth@redhat.com>
6006         * decl.c (finish_destructor_body): Use LABEL_EXPR.
6007         * parser.c (cp_parser_statement): Update commentary.
6008         * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
6009         * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
6010         * tree.c (mark_local_for_remap_r): Likewise.
6012 2004-06-16  Richard Henderson  <rth@redhat.com>
6014         PR c++/16012
6015         * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
6016         statement in FOR_INIT_STMT for templates.
6018 2004-06-15  Richard Henderson  <rth@redhat.com>
6020         * call.c (initialize_reference): Don't build CLEANUP_STMT here.
6021         * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
6022         (genericize_try_block): Use gimplify_stmt.
6023         (genericize_catch_block, genericize_eh_spec_block): Likewise.
6024         (cp_gimplify_init_expr): Remove STMT_EXPR special case.
6025         (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
6026         * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
6027         (cp_tree_chain_matters_p): Remove.
6028         * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
6029         (COMPOUND_STMT_BODY_BLOCK): New.
6030         (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
6031         (EXPR_STMT_STMT_EXPR_RESULT): New.
6032         (building_stmt_tree): Check cur_stmt_list.
6033         (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
6034         (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
6035         * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
6036         (cp_finish_decl): Use push_cleanup.
6037         (start_function, finish_function): Use statement lists.
6038         (finish_stmt): Do nothing.
6039         * except.c (begin_eh_spec_block): Use statement lists.
6040         (check_handlers_1, check_handlers): Likewise.
6041         * init.c (construct_virtual_base): Don't add extra compound stmts.
6042         (build_vec_init): Likewise.
6043         * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
6044         * name-lookup.h (struct cp_binding_level): Add statement_list.
6045         * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
6046         (cp_parser_labeled_statement, cp_parser_expression_statement,
6047         cp_parser_statement_seq_opt): Likewise.
6048         (cp_parser_compound_statement): Likewise.  Take bool for try block.
6049         (cp_parser_selection_statement): Tidy if processing.
6050         (cp_parser_already_scoped_statement): Rewrite to do what it says.
6051         * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
6052         (tsubst_expr): Rewrite STMT_EXPR processing.  Handle STATEMENT_LIST.
6053         Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
6054         * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
6055         (finish_cond): New, rewritten from FINISH_COND.
6056         (simplify_loop_decl_cond): New.
6057         (finish_expr_stmt): Avoid nested EXPR_STMTs.
6058         (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
6059         begin_else_clause, finish_else_clause, finish_if_stmt,
6060         begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
6061         begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
6062         finish_for_cond, finish_for_stmt, begin_switch_stmt,
6063         finish_switch_cond, finish_switch_stmt, begin_try_block,
6064         finish_try_block, finish_cleanup_try_block, finish_function_try_block,
6065         finish_handler_sequence, finish_function_handler_sequence,
6066         begin_handler, finish_handler_parms, finish_handler,
6067         begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
6068         using statement lists.
6069         (begin_compound_stmt): Replace has_no_scope argument with flags.
6070         Update all callers.  Use statement lists.
6071         (finish_compound_stmt): Likewise.
6072         (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
6073         (current_scope_stmt_stack): Remove.
6074         (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
6075         * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
6076         Rewrite with statement lists.
6078 2004-06-15  Alexandre Oliva  <aoliva@redhat.com>
6080         * parser.c: Change all assignments of c_lex_string_translate
6081         to true and false to 1 and 0.
6082         (cp_lexer_read_token): Convert type of the translated string.
6083         (cp_parser_skip_to_closing_parentheses): Preserve original
6084         value of c_lex_string_translate, and set it to -1 while
6085         running.
6086         (cp_parser_cache_group): Likewise.
6087         (cp_parser_cache_group_1): Renamed.
6088         (cp_parser_asm_operand_list): Remove redundant setting of
6089         c_lex_string_translate.
6090         (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
6091         Handle chained strings.
6093 2004-06-12  Andrew Pinski  <apinski@apple.com>
6095         PR c++/14639
6096         Revert:
6097         2004-06-02  Andrew Pinski  <pinskia@physics.uc.edu>
6099                 * cp-tree.h: Fix typo.
6101                 * cp-tree.h: Include cgraph.h
6102                 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
6103                 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
6105 2004-06-12  Jason Merrill  <jason@redhat.com>
6107         PR tree-optimization/14107
6108         * decl.c (finish_function): Warn about no return in all functions.
6110 2004-06-15  Paolo Bonzini  <bonzini@gnu.org>
6112         * cp-tree.h (struct language_function): Remove cannot_inline.
6113         * decl.c (save_function_data): cannot_inline is no more.
6114         (cxx_push_function_context): Likewise.
6115         * decl2.c (start_objects, start_static_storage_duration_function):
6116         Reset DECL_INLINE, set DECL_UNINLINABLE.
6118 2004-06-14  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6120         PR c++/15967
6121         * search.c (lookup_field): Propagate the ambiguity list.
6122         (lookup_fnfields): Likewise.
6124 2004-06-14  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6126         PR c++/15947
6127         * parser.c (cp_parser_template_name): Ctors/dtors never need a
6128         template keyword to disambiguate.
6130 2004-06-14  Mark Mitchell  <mark@codesourcery.com>
6132         PR c++/15096
6133         * decl.c (grokdeclarator): Ignore pointer-to-members when
6134         computing template depth.
6136         PR c++/14930
6137         * name-lookup.c (pushtag): Do not try to put class declarations in
6138         explicit specialization scopes.
6140 2004-06-11  Andrew Pinski  <pinskia@physics.uc.edu>
6142         * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
6144 2004-06-11  Mark Mitchell  <mark@codesourcery.com>
6146         PR c++/15862
6147         * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
6148         bindings for undeclared built-ins.
6150 2004-06-11  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6152         * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
6153         appear at the correct location.
6155 2004-06-10  Jason Merrill  <jason@redhat.com>
6157         PR c++/15875
6158         Revert:
6159         2004-06-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6160         * init.c (build_offset_ref): Build SCOPE_REF with non-null
6161         TREE_TYPE for non-dependent names.
6162         * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
6163         unknown_type_node as its TREE_TYPE.
6164         * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
6165         * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
6166         (dump_expr) <SCOPE_REF case>: Likewise.
6168 2004-06-10  Mark Mitchell  <mark@codesourcery.com>
6170         PR c++/15227
6171         * parser.c (cp_parser_direct_declarator): Robustify.
6173         PR c++/15877
6174         * pt.c (tsubst_copy): Use decl_constant_value on enumeration
6175         constants in non-dependent contexts.
6177         PR c++/14211
6178         PR c++/15076
6179         * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
6180         necessary.
6182 2004-06-10  Jakub Jelinek  <jakub@redhat.com>
6184         PR c++/14791
6185         * decl.c (duplicate_decls): Handle fileptr_type_node arguments
6186         specially.
6188 2004-06-09  Mark Mitchell  <mark@codesourcery.com>
6190         Revert:
6191         PR c++/15815
6192         2004-06-07  Mark Mitchell  <mark@codesourcery.com>
6193         * lex.c (handle_pragma_interface): Deprecate.
6194         (handle_pragma_implementation): Likewise.
6196 2004-06-09  Andrew Pinski  <pinskia@physics.uc.edu>
6198         * g++spec.c (lang_specific_driver): Remove check for -lm
6199         and -lmath when check it see if it was the math library.
6201 2004-06-08  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6203         PR c++/7841
6204         * parser.c (cp_parser_direct_declarator): Reject constructor named
6205         as qualified template-id.
6207 2004-06-07  Mark Mitchell  <mark@codesourcery.com>
6209         PR c++/15815
6210         * lex.c (handle_pragma_interface): Deprecate.
6211         (handle_pragma_implementation): Likewise.
6213 2004-06-07  Mark Mitchell  <mark@codesourcery.com>
6215         PR c++/15766
6216         * parser.c (cp_parser_iteration_statement): Fix typo in error
6217         message.
6219         PR c++/14777
6220         * pt.c (tsubst_default_argument): Do not defer access checks
6221         while substituting into the default argument.
6223         PR c++/15554
6224         * pt.c (tsubst_copy): Do not try to substitute for an enumeration
6225         constant in a non-dependent context.
6227         PR c++/15057
6228         * except.c (build_throw): Ensure that temp_expr has been
6229         initialized.
6231 2004-06-06  Roger Sayle  <roger@eyesopen.com>
6233         * cp/cp-tree.h (lvalue_or_else): Add function prototype.
6235 2004-06-06  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6237         PR c++/15503
6238         * parser.c (cp_parser_mem_initializer_id): Gracefully reject
6239         'typename', and accept 'template'.
6241 2004-06-03  Andrew Pinski  <pinskia@physics.uc.edu>
6242             Jan Hubicka  <jh@suse.cz>
6244         PR c++/14639
6245         * method.c (use_think): Do not mark thunk as referenced.
6247 2004-06-03  Matt Austern  <austern@apple.com>
6249         PR c++/15428
6250         * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
6251         is nonzero, and if we see a noninline definition of a key method,
6252         make the vtables nonweak.
6254 2004-06-02  Matt Austern  <austern@apple.com>
6256         * cp-tree.h (instantiate_decl): new boolean parameter,
6257         undefined_ok. Current behavior is equivalent to its being 0.
6258         * decl2.c (mark_used): Add new argument when calling instantiate_decl
6259         * pt.c (mark_decl_instantiated): Unconditionally make
6260         instantiations explicit unconditionally
6261         (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
6262         since mark_decl_instantiated now does it.
6263         (instantiate_class_member): New.  Instantiate a member of an
6264         explicitly instantiated class template.
6265         (do_type_instantiation): Explicitly instantiate members of an
6266         explicitly instantiated class template.
6267         (instantiate_decl): if undefined_ok is nonzero, and if we're
6268         trying to explicitly instantiated a template with no definition,
6269         change it to an implicit instantiation.
6270         (instantiate_pending_templates): Add new argument to instantiate_decl.
6271         * tree.c (cp_cannot_inline_tree_fn): Likewise.
6273 2004-06-02  Andrew Pinski  <pinskia@physics.uc.edu>
6275         * cp-tree.h: Fix typo.
6277         * cp-tree.h: Include cgraph.h
6278         (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
6279         TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
6281 2004-06-01  Jason Merrill  <jason@redhat.com>
6283         PR c++/15142
6284         * call.c (call_builtin_trap): Remove type parm.
6285         (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
6286         (build_x_va_arg): Dereference a null pointer for a non-POD argument.
6288 2004-06-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6290         PR c++/13092
6291         * init.c (build_offset_ref): Build SCOPE_REF with non-null
6292         TREE_TYPE for non-dependent names.
6293         * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
6294         unknown_type_node as its TREE_TYPE.
6295         * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
6296         * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
6297         (dump_expr) <SCOPE_REF case>: Likewise.
6299 2004-06-01  Richard Henderson  <rth@redhat.com>
6300             Andrew Pinski  <pinskia@physics.uc.edu>
6302         * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
6303         * parser.c (struct cp_parser): Remove in_offsetof.
6304         (cp_parser_new): Don't set it.
6305         (cp_parser_unary_expression): Don't check it.
6306         (cp_parser_postfix_open_square_expression): Split out from ...
6307         (cp_parser_postfix_expression): ... here.
6308         (cp_parser_postfix_dot_deref_expression): Likewise.
6309         (cp_parser_builtin_offsetof): New.
6310         (cp_parser_primary_expression): Use it.
6312 2004-06-01  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6314         PR c++/14932
6315         * parser.c (cp_parser_postfix_expression): Allow subscript
6316         operator in offsetof.
6318 2004-05-31  Mark Mitchell  <mark@codesourcery.com>
6320         PR c++/15701
6321         * friend.c (add_friend): Do not try to perform access checks for
6322         functions from dependent classes.
6324 2004-05-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6326         * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
6327         (pp_cxx_begin_template_argument_list): Turn into a function.
6328         (pp_cxx_end_template_argument_list): Likewise.
6329         (pp_cxx_separate_with): Define.
6330         (pp_cxx_unqualified_id): Tidy.
6331         (pp_cxx_primary_expression): Likewise.
6332         (pp_cxx_postfix_expression): Likewise.
6333         (pp_cxx_expression): Likewise.
6334         (pp_cxx_simple_type_specifier): Likewise.
6335         (pp_cxx_type_specifier_seq): Likewise.
6336         (pp_cxx_parameter_declaration_clause): Likewise.
6337         (pp_cxx_exception_specification): Likewise.
6338         (pp_cxx_direct_declarator): Likewise.
6339         (pp_cxx_type_id): Likewise.
6340         * cxx-pretty-print.h (pp_cxx_whitespace): Export from
6341         cxx-pretty-print.c.
6342         (pp_cxx_left_paren): Likewise.
6343         (pp_cxx_right_paren): Likewise.
6344         (pp_cxx_left_brace): Likewise.
6345         (pp_cxx_right_brace): Likewise.
6346         (pp_cxx_left_bracket): Likewise.
6347         (pp_cxx_right_bracket): Likewise.
6348         (pp_cxx_dot): Likewise.
6349         (pp_cxx_identifier): Likewise.
6350         (pp_cxx_tree_identifier): Likewise.
6351         (pp_cxx_ampersand): New macro.
6352         (pp_cxx_star): Likewise.
6353         (pp_cxx_arrow): Likewise.
6354         (pp_cxx_semicolon): Likewise.
6355         (pp_cxx_complement): Likewise.
6356         (pp_cxx_begin_template_argument_list): Declaree.
6357         (pp_cxx_end_template_argument_list): Likewise.
6358         (pp_cxx_colon_colon): likewise.
6360 2004-05-31  Eric Botcazou  <ebotcazou@libertysurf.fr>
6362         * parser.c (cp_parser_simple_type_specifier): Explicitly test
6363         against NULL_TREE.
6365 2004-05-31  Kazu Hirata  <kazu@cs.umass.edu>
6367         * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
6368         typeck.c: Fix comment formatting.
6370 2004-05-30  Andrew Pinski  <pinskia@physics.uc.edu>
6372         * cp-lang.c (cp_expand_decl): Remove.
6373         (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
6375 2004-05-30  Andreas Jaeger  <aj@suse.de>
6377         * lang-specs.h: Add missing initializers for .ii.
6379 2004-05-28  Aldy Hernandez  <aldyh@redhat.com>
6381         * decl.c (cp_make_fname_decl): Free return value from
6382         fname_as_string.
6384 2004-05-28  Mark Mitchell  <mark@codesourcery.com>
6386         PR c++/15083
6387         * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
6388         even in a templat.e
6389         * init.c (build_new): Likewise.
6391         PR c++/15640
6392         * name-lookup.c (arg_assoc): Robustify.
6394         PR c++/15471
6395         * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
6396         when determining the scope to use for a pointer to member.
6397         (lookup_anon_field): Give it external linkage.
6398         * cp-tree.h (lookup_anon_field): Declare it.
6399         * expr.c (cplus_expand_constant): Use it.
6401 2004-05-28  Mark Mitchell  <mark@codesourcery.com>
6403         PR c++/14668
6404         * parser.c (cp_parser_simple_type_specifier): Call
6405         maybe_note_name_used_in_class.
6407 2004-05-28  Tom Marshall  <tmarshall@real.com>
6409         PR c++/15214
6410         * class.c (finish_struct_1): Warn only if the dtor is non-private or
6411         the class has friends.
6413 2004-05-27  Adam Nemet  <anemet@lnxw.com>
6415         PR c++/12883
6416         * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
6417         TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
6419 2004-05-24  Geoffrey Keating  <geoffk@apple.com>
6421         * method.c (implicitly_declare_fn): Don't call defer_fn; abort
6422         if it might be needed.
6423         * pt.c (mark_decl_instantiated): Only call defer_fn if
6424         the function actually needs processing in finish_file.
6425         * decl2.c (finish_file): Add check that elements in
6426         deferred_fns_used are really needed there.  Remove unnecessary
6427         test of DECL_SAVED_TREE.
6429 2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
6431         * Make-lang.in: No need to specify $(LIBCPP).
6433 2004-05-23  Mark Mitchell  <mark@codesourcery.com>
6435         PR c++/15044
6436         * parser.c (cp_parser_class_head): Robustify.
6438         PR c++/15317
6439         * parser.c (cp_parser_decl_specifier_seq): Correct error in
6440         comment.
6441         (cp_parser_constructor_declarator_p): Treat attributes
6442         as decl-specifiers.
6444         PR c++/15329
6445         * typeck.c (build_unary_op): Do not attempt to resolve casts to
6446         base classes in templates.
6448 2004-05-23  Mark Mitchell  <mark@codesourcery.com>
6450         PR c++/15165
6451         * pt.c (instantiate_template): Robustify.
6453 2004-05-23  Mark Mitchell  <mark@codesourcery.com>
6455         PR c++/15025
6456         * decl.c (xref_tag): Issue errors about redeclaring template
6457         classes as non-template classes.
6459 2004-05-23  Mark Mitchell  <mark@codesourcery.com>
6461         PR c++/14821
6462         * name-lookup.c (supplement_binding): Allow redefinitions of
6463         namespace aliases.
6465         PR c++/14883
6466         * parser.c (cp_parser_template_argument): Robustify.
6468 2004-05-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6470         * class.c (alter_access): Use %E format specifier to print an
6471         identifier node.  Avoid looking at the IDENTIFIER_POINTER.
6472         (push_lang_context): Likewise.
6473         * decl.c (lookup_label): Likewise.
6474         (grokdeclarator): Likewise.
6475         * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
6476         * pt.c (do_type_instantiation): Likewise.
6477         * tree.c (handle_java_interface_attribute): Likewise.
6478         (handle_com_interface_attribute): Likewise.
6479         (handle_init_priority_attribute): Likewise.
6481 2004-05-22  Mark Mitchell  <mark@codesourcery.com>
6483         PR c++/15285
6484         PR c++/15299
6485         * pt.c (build_non_dependent_expr): Expand the set of tree nodes
6486         recognized as overloaded functions.
6488 2004-05-22  Mark Mitchell  <mark@codesourcery.com>
6490         PR c++/15507
6491         * class.c (layout_nonempty_base_or_field): Do not try to avoid
6492         layout conflicts for unions.
6494         PR c++/15542
6495         * typeck.c (build_x_unary_op): Instantiate template class
6496         specializations before looking for "operator &".
6498         PR c++/15427
6499         * typeck.c (complete_type): Layout non-dependent array types, even
6500         in templates.
6502         PR c++/15287
6503         * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
6504         template.
6506 2004-05-22  Roger Sayle  <roger@eyesopen.com>
6508         * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
6509         returning when TREE_TYPE is error_mark_node.
6510         * typeck.c (require_complete_type): Return error_mark_node if
6511         value's type is an error_mark_node.
6513 2004-05-20  Andrew Pinski  <pinskia@physics.uc.edu>
6515         * optimize.c (calls_setjmp_r): Remove.
6516         (calls_setjmp_p): Remove.
6517         * cp-tree.c (calls_setjmp_p): Remove.
6518         * decl.c (finish_function): Do not call calls_setjmp_p.
6520 2004-05-18  Zack Weinberg  <zack@codesourcery.com>
6522         * decl.c (cp_finish_decl): Use mark_decl_referenced.
6523         * decl2.c (maybe_make_one_only): Likewise.
6524         * method.c (use_thunk): Likewise.
6526 2004-05-18  Jason Merrill  <jason@redhat.com>
6528         * class.c (build_base_path): Tidy a bit.
6530 2004-05-14  Geoffrey Keating  <geoffk@apple.com>
6532         * name-lookup.c (struct scope_binding): New.
6533         (EMPTY_SCOPE_BINDING): New.
6534         (lookup_using_namespace): Take a scope_binding instead of a
6535         cxx_binding.
6536         (qualified_lookup_using_namespace): Likewise.
6537         (cxx_binding_clear): Delete.
6538         (do_nonmember_using_decl): Use a scope_binding instead of a
6539         cxx_binding.
6540         (lookup_tag): Don't call select_decl.
6541         (ambiguous_decl): Don't return anything (and change callers to match).
6542         Take a scope_binding as the second parameter.
6543         (lookup_namespace_name): Use a scope_binding instead of a
6544         cxx_binding.
6545         (unqualified_namespace_lookup): Likewise.
6546         (lookup_qualified_name): Likewise.
6547         (select_decl): Take a scope_binding instead of a cxx_binding.
6548         Use macros rather than hand-coding tests for type-ness.
6550 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
6552         * cp-gimplify.c: Rename from cp-simplify.c.
6553         * Make-lang.in, optimize.c: Update.
6555 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
6557         Merge from tree-ssa-20020619-branch.  See
6558         ChangeLog.tree-ssa for details.
6560         * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
6561         cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
6562         expr.c, init.c, name-lookup.h, optimize.c, parser.c,
6563         pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
6564         Merged.
6565         * cp-mudflap.c: New file.
6566         * cp-simplify.c:: New file.
6568 2004-05-03  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6570         PR c++/14389
6571         * decl2.c (check_classfn): For member templates, compare also the
6572         template parameters to match the declaration.
6573         * cp-tree.h: Adjust declaration of check_classfn.
6574         * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
6575         * friend.c (do_friend): Likewise.
6576         * pt.c (tsubst_friend_function): Likewise.
6578 2004-05-01  Zack Weinberg  <zack@codesourcery.com>
6580         * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
6581         Instead, dig into the representation type to find the array bound.
6583 2004-04-30  Jason Merrill  <jason@redhat.com>
6585         Refer to base members using COMPONENT_REFs where possible.
6586         * class.c (build_simple_base_path): New fn.
6587         (build_base_path): Use it for non-virtual base references.
6588         (layout_class_type): Change base fields to their real type
6589         after layout is done.
6590         * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
6591         * cp-lang.c (cxx_get_alias_set): Use it.
6593 2004-04-30  Kazu Hirata  <kazu@cs.umass.edu>
6595         * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
6596         comment typos.
6598 2004-04-23  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6600         PR c++/15064
6601         * parser.c (cp_parser_postfix_expression): typeid operator cannot be
6602         used in integral constant expressions.
6604 2004-04-22  Mark Mitchell  <mark@codesourcery.com>
6606         * init.c (build_aggr_init): Fix accidental use of C99 construct in
6607         previous change.
6609         * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
6610         braced initializer.
6611         * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
6612         * decl.c (reshape_init): Use it.
6613         * init.c (perform_member_init): Remove redundant condition.
6614         (build_aggr_init): Adjust to handle brace-enclosed initializers
6615         correctly.
6616         (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
6618         * parser.c (cp_parser_initializer_clause): Do not set
6619         TREE_HAS_CONSTRUCTOR on the initializer.
6620         * rtti.c (tinfo_base_init): Likewise.
6621         (generic_initializer): Likewise.
6622         (ptr_initializer): Likewise.
6623         (ptm_initializer): Likewise.
6624         (class_initializer): Likewise.
6625         (get_pseudo_ti_init): Likewise.
6626         * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
6628 2004-04-22  Alan Modra  <amodra@bigpond.net.au>
6630         * name-lookup.c (anonymous_namespace_name): Make static.
6632 2004-04-19  Roger Sayle  <roger@eyesopen.com>
6634         PR middle-end/14531
6635         * class.c (build_base_path): Call fold whilst building the NULL
6636         pointer check expression trees.
6638 2004-04-15  Bryce McKinlay  <mckinlay@redhat.com>
6640         * init.c (build_new_1): Don't use type size argument for Java
6641         _Jv_AllocObject call.
6643 2004-04-09  Danny Smith  <dannysmith@users.sourceforge.net>
6645         * method.c (make_alias_for_thunk): Remove preprocessor guard on
6646         declaration and definition.
6648 2004-04-08  Danny Smith  <dannysmith@users.sourceforge.net>
6650         PR c++/14808
6651         * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
6652         than ASM_OUTPUT_DEF.
6654 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
6656         * decl2.c (mark_used): Don't segfault if cfun != NULL but
6657         current_function_decl == NULL.
6659 2004-04-05  Nathan Sidwell  <nathan@codesourcery.com>
6661         PR c++/3518
6662         * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
6663         level.
6665 2004-04-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6667         * init.c (decl_constant_value): Don't look at DECL_INITIAL
6668         of PARM_DECL.
6669         * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
6670         or TREE_SIDE_EFFECTS of a type.
6672 2004-04-02  Nathan Sidwell  <nathan@codesourcery.com>
6674         PR c++/14007
6675         * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
6676         cv-qualifier unification.
6677         * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
6679 2004-04-02  Jan Hubicka  <jh@suse.cz>
6681         * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
6682         * cp-tree.h (cp_update_decl_after_saving): Declare.
6683         * tree.c (cp_update_decl_after_saving): Define.
6685 2004-04-01  Mark Mitchell  <mark@codesourcery.com>
6687         PR c++/14803
6688         * typeck.c (get_delta_difference): Call fold before returning the
6689         value.
6691 2004-04-01  Richard Henderson  <rth@redhat.com>
6693         PR c++/14804
6694         * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
6695         * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
6697 2004-04-01  Mark Mitchell  <mark@codesourcery.com>
6699         PR c++/14810
6700         * name-lookup.c (maybe_push_cleanup_level): Robustify.
6702 2004-04-01  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6704         * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
6706 2004-03-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6708         * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
6709         * class.c (check_bitfield_decl): Likewise.
6710         * cvt.c (type_promotes_to): Likewise.
6711         * decl.c (finish_enum): Likewise.
6712         * mangle.c (write_builtin_type): Likewise.
6713         * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
6714         * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
6715         (build_binary_op): Likewise.
6717 2004-03-31  Jan Hubicka  <jh@suse.cz>
6719         * tree.h (optimize_function): Kill prototype.
6720         * optimize.c (dump_function, optimize_function, dump_finction): Kill.
6721         * semantics.c (expand_body): Kill.
6723 2004-03-30  Mark Mitchell  <mark@codesourcery.com>
6725         PR c++/14724
6726         * decl.c (start_decl_1): Do not decide whether or not to create a
6727         new cleanup level until after the type has been completed.
6729         PR c++/14763
6730         * pt.c (tsubst_default_argument): Clear current_function_decl.
6732 2004-03-30  Zack Weinberg  <zack@codesourcery.com>
6734         * name-lookup.c, parser.c: Use new shorter form of GTY markers.
6736 2004-03-29  Zack Weinberg  <zack@codesourcery.com>
6738         * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
6739         is null, just print the literal name and return.
6741 2004-03-25  Kazu Hirata  <kazu@cs.umass.edu>
6743         * cxx-pretty-print.c: Fix comment typos.
6745 2004-03-24  Kazu Hirata  <kazu@cs.umass.edu>
6747         * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
6748         Update copyright.
6750 2004-03-23  Ziemowit Laski  <zlaski@apple.com>
6752         * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
6753         * mangle.c (write_type): Add call to 'mangle_fundamental_type'
6754         target hook.
6756 2004-03-23  Zack Weinberg  <zack@codesourcery.com>
6758         PR 12267, 12391, 12560, 13129, 14114, 14133
6759         * cp-lang.c (c_reset_state): Delete.
6760         (push_file_scope, pop_file_scope): New stubs.
6761         * parser.c (c_parse_file): Call sorry() here if called more than once.
6763 2004-03-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6765         * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
6766         for INTEGER_CST.
6768 2004-03-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6770         * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
6772 2004-03-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6774         * error.c (enum pad): Remove.
6775         (dump_qualifiers): Likewise.
6776         (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
6777         (dump_aggr_type): Likewise.
6778         (dump_type_suffix): Likewise.
6779         (dump_simple_decl): Likewise.
6780         (dump_function_decl): Likewise.
6781         (cv_to_string): Likewise.
6782         (dump_type_prefix): Likewise.  Adjust return void.
6783         * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
6784         cxx_pretty_print.h.
6785         (pp_cxx_template_keyword_if_needed): Document.
6786         (pp_cxx_qualified_id): Document case FUNCTION_DECL.  Tidy.
6787         (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
6788         MUST_NOT_THROW_EXPR.
6790 2004-03-21  Mark Mitchell  <mark@codesourcery.com>
6792         PR c++/14616
6793         * decl.c (cp_finish_decl): Compute the size of arrays declared in
6794         templates, if their type is non-dependent.
6796 2004-03-19  Mark Mitchell  <mark@codesourcery.com>
6798         * call.c (build_op_delete_call): Do not forget the placement
6799         arguments when iterating through mutiple delete operators.
6801         * cp-tree.h (svaed_scope): Remove last_parms.
6802         (NEW_DELETE_OPNAME_P): New macro.
6803         (last_function_parms): Remove.
6804         (do_friend): Adjust prototype.
6805         * decl.c (grokparms): Return the PARM_DECLs directly, rather than
6806         using last_function_parms.
6807         (grokfndecl): Take the PARM_DECLs as an argument, rather than
6808         using last_function_parms.
6809         (grokdeclarator): Adjust accordingly.  Do not form METHOD_TYPEs
6810         for class-specific operator new and operator delete.
6811         (grok_op_properties): Do not look for allocation functions with
6812         METHOD_TYPEs.
6813         (start_function): Use DECL_ARGUMENTS instead of
6814         last_function_parms.
6815         * decl.h (last_function_parms): Do not declare.
6816         * decl2.c (grokclassfn): Do not use last_function_parms.
6817         * friend.c (do_friend): Remove parmdecls parameter.
6818         * name-lookup.c (push_to_top_level): Do not save last_function_parms.
6819         (pop_from_top_level): Do not restore it.
6820         * pt.c (check_explicit_specialization): Do not adjust
6821         last_function_parms.
6823         * name-lookup.c (do_local_using_decl): Create a local binding for
6824         types brought in via using declarations.
6826         * name-lookup.c (lookup_arg_dependent): Handle block-scope
6827         function declarations correctly.
6829         * semantics.c (finish_id_expression): Correct handling of
6830         conversion operators to dependent types.
6832         * typeck.c (lookup_destructor): Allow the use of destructors from
6833         base classes.
6835 2004-03-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6837         * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
6838         TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
6839         * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
6840         the field is named TEMPLATE_TYPE_PARM_INDEX.
6842 2004-03-19  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6844         PR c++/14545
6845         * parser.c (cp_parser_functional_cast): A cast to anything
6846         but integral or enumaration type is not an integral constant
6847         expression.
6848         * pt.c (value_dependent_expression_p): Handle cast expressions
6849         without operands (such as "int()").
6851 2004-03-18  Mark Mitchell  <mark@codesourcery.com>
6853         * semantics.c (finish_pseudo_destructor_expr): Allow differing
6854         cv-qualification between the type named by the
6855         pseudo-destructor-name and the object-type.
6857         * search.c (accessible_base_p): Handle non-proper bases.
6859         * name-lookup.c (do_nonmember_using_decl): If a using declaration
6860         refers to a single overloaded function, set the type of the
6861         function.
6862         * tree.c (lvalue_type): Simplify.
6863         * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
6864         unknown type.
6865         (build_unary_op): Handle OVERLOADs with known types.
6867         * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
6868         function templates.
6870         * parser.c (cp_parser_postfix_expression): Handle the use of
6871         "typename" in non-dependent contexts.  Convert appropriately when
6872         when using a qualified name after "->" or ".".
6874         * call.c (conditional_conversion): Honor the requirement that some
6875         conversions refer to the original object.
6877 2004-03-18  Mark Mitchell  <mark@codesourcery.com>
6879         * call.c (build_conditional_expr): Do not call force_rvalue for
6880         operands of void_type when the conditional expression itself has
6881         void type.
6882         * name-lookup.c (pushdecl): Don't consider a declaration of a
6883         function named "main" to be an overload of a type named "main".
6884         * parser.c (cp_parser_template_name): Perform name lookup when the
6885         template name is proceeded by "template" if the qualifying scope
6886         is non-dependent.
6887         * typeck.c (composite_pointer_type_r): Correctly handle
6888         pointer-to-member types.
6889         (build_const_cast): Likewise.
6891 2004-03-18  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6893         * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
6894         * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
6895         (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
6896         (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
6897         (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
6898         (TYPEOF_TYPE_EXPR): New macro.
6899         * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
6900         * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
6901         * pt.c (tsubst): Likewise.
6902         * semantics.c (finish_typeof): Likewise.
6903         * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
6904         and TEMPLATE_TYPE_PARM.
6905         * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
6906         (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
6908 2004-03-16  Mark Mitchell  <mark@codesourcery.com>
6910         PR c++/14586
6911         * cp-tree.h (build_new_op): Change prototype.
6912         (build_x_binary_op): Likewise.
6913         * call.c (build_new_op): Add overloaded_p parameter.
6914         * decl2.c (grok_array_decl): Adjust call to build_new_op.
6915         * parser.c (cp_parser_binary_expression): Note that uses of
6916         overloaded operators prevents an expression from being considered
6917         an integral constant.
6918         * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
6919         build_x_binary_op.
6920         * semantics.c (finish_call_expr): Likewise.
6921         * typeck.c (rationalize_conditional_expr): Likewise.
6922         (build_x_indirect_ref): Likewise.
6923         (build_x_binary_op): Likewise.
6924         (build_x_unary_op): Likewise.
6925         (build_x_compound_expr): Likewise.
6926         (build_modify_expr): Likewise.
6927         * typeck2.c (build_x_arrow): Likewise.
6929 2004-03-15  Kazu Hirata  <kazu@cs.umass.edu>
6931         * cp-lang.c, ptree.c: Update copyright.
6933 2004-03-13  Mark Mitchell  <mark@codesourcery.com>
6935         PR c++/14550
6936         * parser.c (cp_parser_non_integral_constant_expression): Encode
6937         more of the idiom that surrounded calls to this function within
6938         the function itself
6939         (cp_parser_primary_expression): Adjust accordingly.
6940         (cp_parser_postfix_expression): Likewise.
6941         (cp_parser_unary_expression): Likewise.
6942         (cp_parser_cast_expression): Likewise.
6943         (cp_parser_assignment_expression): Likewise.
6944         (cp_parser_expression): Likewise.
6945         (cp_parser_new_expression): Note that new-expressions are not
6946         allowed in integral constant expressions.
6947         (cp_parser_delete_expression): Likewise.
6949 2004-03-12  Matt Austern  <austern@apple.com>
6951         * decl2.c (maybe_make_one_only): Look at
6952         TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
6953         to make an explicit instantiation weak.
6954         * method.c (use_thunk): Make sure we call comdat_linkage
6955         when appropriate.
6956         * pt.c (do_type_instantiation): On systems where weak symbols
6957         don't go in a static archive's TOC, explicit instantiation of a
6958         class must imply *explicit* instantiation of its memeber.
6960 2004-03-11  Kazu Hirata  <kazu@cs.umass.edu>
6962         * call.c, cp-tree.h, pt.c: Fix comment typos.
6964 2004-03-10  Mark Mitchell  <mark@codesourcery.com>
6966         PR c++/14510
6967         * decl.c (xref_tag): Disregard non-type declarations when
6968         looking up a tagged type.
6970 2004-03-09  Nathan Sidwell  <nathan@codesourcery.com>
6972         PR c++/14397
6973         * call.c (convert_like_real): Build a const qualified temporary,
6974         when testing ctor access.
6976 2004-03-09  Mark Mitchell  <mark@codesourcery.com>
6978         * call.c (initialize_reference): Fix typo.
6980 2004-03-09  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6982         PR c++/14409
6983         * pt.c (determine_specialization): For member templates, match also
6984         constness.
6986         PR c++/14448
6987         * parser.c (cp_parser_initializer_clause): Fold initializer if it is
6988         non-dependent.
6989         * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
6991 2004-03-09  Mark Mitchell  <mark@codesourcery.com>
6993         PR c++/14230
6994         * call.c (initialize_reference): Handle initializers that are
6995         class-member access expressions applies to rvalues.
6997 2004-03-09  Mark Mitchell  <mark@codesourcery.com>
6999         PR c++/14432
7000         * name-lookup.c (supplement_binding): Ignore functions that are
7001         marked DECL_ANTICIPATED.
7003 2004-03-08  Mark Mitchell  <mark@codesourcery.com>
7005         PR c++/14401
7006         * class.c (check_field_decls): Complain about non-static data
7007         members of reference type in unions.  Propagate
7008         CLASSTYPE_REF_FIELDS_NEED_INIT and
7009         CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
7010         data members.
7011         * init.c (perform_member_init): Complain about mbmers with const
7012         type that are not explicitly initialized.
7014 2004-03-08  Mark Mitchell  <mark@codesourcery.com>
7016         * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
7017         * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
7018         (lang_identifier): Remove implicit_decl and error_locus.
7019         (IDENTIFIER_IMPLICIT_DECL): Remove.
7020         (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
7021         (IDENTIFIER_ERROR_LOCUS): Likewise.
7022         (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
7023         (TYPE_ASSEMBLER_NAME_STRING): Likewise.
7024         (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
7025         (implicitly_declare): Remove.
7026         * decl.c (warn_extern_redeclared_static): Remove check of
7027         IDENTIFIER_IMPLICIT_DECL.
7028         (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
7029         (implicitly_declare): Remove.
7030         (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
7031         (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
7032         (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
7033         * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
7034         in the innermost scope, rather than at namespace scope.
7035         * name-lookup.c (push_local_binding): Give it external linkage.
7036         (pushdecl): Remove dead code.
7037         * name-lookup.h (push_local_binding): Declare it.
7038         * ptree.c (cxx_print_identifier): Don't print
7039         IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
7040         * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
7041         not IDENTIFIER_ERROR_LOCUS.
7042         * typeck.c (build_function_call): Remove dead code.
7044 2004-03-08  Jason Merrill  <jason@redhat.com>
7046         PR c++/13170
7047         * decl.c (xref_tag): Remove attribute handling.
7048         * cp-tree.h: Adjust prototype.
7049         * decl.c, parser.c, rtti.c: Adjust callers.
7050         * parser.c (cp_parser_class_head): Pass back attributes in the
7051         class head.
7052         (cp_parser_class_specifier): Adjust.
7054 2004-03-08  Matt Austern  <austern@apple.com>
7056         PR debug/14079
7057         * name-lookup.c (add_decl_to_level): Add extern variables, as well
7058         as static, to static_decls array.
7060 2004-03-05  Jason Merrill  <jason@redhat.com>
7062         * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
7064 2004-03-04  Geoffrey Keating  <geoffk@apple.com>
7066         * decl.c (grokfndecl): Update old incorrect comment.
7067         (grokvardecl): Diagnose C++ variables of type with no linkage.
7069 2004-03-01  Mark Mitchell  <mark@codesourcery.com>
7071         PR c++/14369
7072         * pt.c (build_non_dependent_expr): Do not create a
7073         NON_DEPENDENT_EXPR for a THROW_EXPR.
7075 2004-03-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
7077         PR c++/14369
7078         * error.c (dump_expr): Handle THROW_EXPR.
7080 2004-03-01  Mark Mitchell  <mark@codesourcery.com>
7082         PR c++/14360
7083         * parser.c (cp_parser_postfix_expression): Do not perform Koenig
7084         lookup if ordinary name-lookup finds a non-function.
7085         * pt.c (tsubst_copy_and_build): Likewise.
7087         PR c++/14361
7088         * parser.c (cp_parser_late_parsing_default_args): Check that there
7089         are no extra tokens after the end of the default-argument
7090         expression.
7092 2004-03-01  Mark Mitchell  <mark@codesourcery.com>
7094         PR c++/14324
7095         * lex.c (retrofit_lang_decl): Treat entities with no linkage as
7096         having C++ linkage for name-mangling purposes.
7098         PR c++/14260
7099         * parser.c (cp_parser_direct_declarator): Recognize constructor
7100         declarators that use a template-id to name the class being
7101         constructed.
7103         PR c++/14337
7104         * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
7105         (tsubst_expr): Do not call tsubst_copy, even when
7106         processing_template_decl.
7108 2004-03-01  Jeff Law  <law@redhat.com>
7110         * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
7111         the proper type.
7113 2004-02-29  Mark Mitchell  <mark@codesourcery.com>
7115         PR c++/14138
7116         * name-lookup.h (push_scope): Change prototype.
7117         * name-lookup.c (push_scope): Do not reenter the current class
7118         scope.
7119         * decl.c (grokfndecl): Check return code from push_scope before
7120         calling pop_scope.
7121         * decl2.c (check_classfn): Likewise.
7122         * parser.c (cp_parser_conversion_function_id): Likewise.
7123         (cp_parser_init_declarator): Likewise.
7124         (cp_parser_direct_declarator): Likewise.
7125         (cp_parser_class_specifier): Likewise.
7126         (cp_parser_class_head): Likewise.
7127         (cp_parser_lookup_name): Likewise.
7128         (cp_parser_constructor_declarator_p): Likewise.
7129         * pt.c (instantiate_class_template): Likewise.
7130         (resolve_typename_type): Likewise.
7132 2004-02-29  Mark Mitchell  <mark@codesourcery.com>
7134         PR c++/14267
7135         * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
7136         extension.
7138         PR debug/12103
7139         * class.c (update_vtable_entry_for_fn): Do not go through
7140         covariance machinery if the type returned by an overrider is the
7141         same as the original.
7143 2004-02-29  Kazu Hirata  <kazu@cs.umass.edu>
7145         * call.c: Fix a comment typo.
7147 2004-02-27  Ziemowit Laski  <zlaski@apple.com>
7149         * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
7151 2004-02-26  Mark Mitchell  <mark@codesourcery.com>
7153         PR c++/14278
7154         * parser.c (cp_parser_parameter_declaration_list): Commit
7155         to fewer tentative parses.
7157 2004-02-26  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7159         PR c++/14284
7160         * pt.c (dependent_type_p_r): A template template parameter is a
7161         dependent type.
7163 2004-02-26  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7165         PR c++/14246
7166         * mangle.c (write_template_arg_literal): Don't rely on identity for
7167         boolean constants.
7169 2004-02-24  Jason Merrill  <jason@redhat.com>
7171         * tree.c (build_exception_variant): Use check_qualified_type.
7173 2004-02-23  Zack Weinberg  <zack@codesourcery.com>
7174             Kazu Hirata  <kazu@cs.umass.edu>
7176         * decl.c (cxx_init_decl_processing): Don't check
7177         flag_writable_strings.
7179 2004-02-23  Andrew Pinski  <pinskia@physics.uc.edu>
7181         PR c++/14156
7182         * typeck.c (maybe_warn_about_returning_address_of_location):
7183         Change check for VAR_DECL to use DECL_P instead.
7185 2004-02-23  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7187         PR c++/14250
7188         * cvt.c (build_expr_type_conversion): Type must be complete before
7189         looking up for conversions.
7191 2004-02-23  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7193         PR c++/14143
7194         * name-lookup.c (arg_assoc_class): Don't look into template
7195         arguments if it is not a primary template.
7197 2004-02-20  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
7199         PR c++/12007
7200         * method.c (use_thunk): Always clone function argument tree.
7202 2004-02-20  Mark Mitchell  <mark@codesourcery.com>
7204         PR c++/14199
7205         * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
7207         PR c++/14173
7208         * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
7209         for all type variants.
7211 2004-02-19  Mark Mitchell  <mark@codesourcery.com>
7213         PR c++/13927
7214         * decl.c (duplicate_decls): Return error_mark_node for invalid
7215         redeclarations.
7216         * name-lookup.c (push_namespace): Ignore the return value from
7217         pushdecl.
7218         * pt.c (push_template_decl_real): Robustify.
7220         PR c++/14186
7221         * name-lookup.c (push_class_level_binding): Do not complain about
7222         adding a binding for a member whose name is the same as the
7223         enclosing class if the member is located in a base class of the
7224         current class.
7226 2004-02-19  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7228         PR c++/14181
7229         * parser.c (cp_parser_new_expression): Parse an ill-formed
7230         direct-new-declarator after a parenthesized type-id to emit good
7231         diagnostic.
7233 2004-02-18  Kazu Hirata  <kazu@cs.umass.edu>
7235         * cp-tree.def, cvt.c: Update copyright.
7237 2004-02-17  Mark Mitchell  <mark@codesourcery.com>
7239         PR c++/11326
7240         * cp-tree.h (abi_version_at_least): Remove.
7241         * mangle.c: Include flags.h.
7243 2004-02-15  Mark Mitchell  <mark@codesourcery.com>
7245         PR c++/13971
7246         * call.c (build_conditional_expr): Handle conversions between
7247         class types which result in differently cv-qualified type
7248         variants.
7250         PR c++/14086
7251         * class.c (delete_duplicate_fields_1): Remove.
7252         (delete_duplicate_fields): Likewise.
7253         (finish_struct_anon): Remove check for members with the same name
7254         as their enclosing class.
7255         (check_field_decls): Do not call duplicate_fields.
7256         * decl.c (grokdeclarator): Remove check for static data members
7257         with the same name as their enclosing class.
7258         * name-lookup.c (push_class_level_binding): Check for members with
7259         the same name as their enclosing class.
7261 2004-02-15  Gabriel Dos Reis  <gdr@integrable-solutions.net>
7263         PR c++/14085
7264         * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
7266 2004-02-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7268         PR c++/13635
7269         * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
7270         has full set of arguments.
7272 2004-02-13  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7274         PR c++/13927
7275         * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
7277 2004-02-13  Mark Mitchell  <mark@codesourcery.com>
7279         PR c++/14122
7280         * cp-tree.h (delete_sanity): Change prototype.
7281         * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
7282         Remove dead code.  Adjust code to warn about deleting an array.
7283         * typekc.c (decay_conversion): Use build_address and build_nop.
7285         PR c++/14108
7286         * search.c (accessible_p): Do not check access in thunks.
7288         PR c++/14083
7289         * call.c (build_conditional_expr): Call force_rvalue on the
7290         non-void operand in the case that one result is a throw-expression
7291         and the other is not.
7293 2004-02-13  Ian Lance Taylor  <ian@wasabisystems.com>
7295         PR c++/9851
7296         * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
7297         the type name and look ahead for ::~, and bail out early with a
7298         better error message if the parse is going to fail.
7300 2004-02-12  Mark Mitchell  <mark@codesourcery.com>
7302         * call.c (conversion_kind): New type.
7303         (conversion_rank): Likewise.
7304         (conversion): Likewise.
7305         (CONVERSION_RANK): New macro.
7306         (conversion_obstack): New variable.
7307         (obstack_initialized): Likewise.
7308         (z_candidate): Change type of convs and second_conv.
7309         (candidate_warning): New type.
7310         (IDENTITY_RANK): Remove.
7311         (EXACT_RANK): Likewise.
7312         (PROMO_RANK): Likewise.
7313         (STD_RANK): Likewise.
7314         (PBOOL_RANK): Likewise.
7315         (USER_RANK): Likewise.
7316         (ELLIPSIS_RANK): Likewise.
7317         (BAD_RANK): Likewise.
7318         (ICS_RANK): Likewise.
7319         (ICS_STD_RANK): Likewise.
7320         (ICS_USER_FLAG): Likewise.
7321         (ICS_ELLIPSIS_FLAG): Likewise.
7322         (ICS_THIS_FLAG): Likewise.
7323         (ICS_BAD_FLAG): Likewise.
7324         (NEED_TEMPORARY_P): Likewise.
7325         (CHECK_COPY_CONSTRUCTOR_P): Likewise.
7326         (USER_CONV_CAND): Likewise.
7327         (USER_CONV_FN): Likewise.
7328         (conversion_obstack_alloc): New function.
7329         (alloc_conversion): Likewise.
7330         (validate_conversion_obstack): Likewise.
7331         (alloc_conversions): Likewise.
7332         (build_conv): Adjust to deal with new conversion data structures.
7333         (build_identity_conv): New function.
7334         (build_ambiguous_conv): Likewise.
7335         (standard_conversion): Adjust to deal with new conversion data
7336         structures.
7337         (convert_class_to_reference): Likewise.
7338         (direct_reference_binding): Likewise.
7339         (reference_binding): Likewise.
7340         (implicit_conversion): Likewise.
7341         (add_candidate): Likewise.
7342         (add_function_candidate): Likewise.
7343         (add_conv_candidate): Likewise.
7344         (build_builtin_candidate): Likewise.
7345         (print_z_candidate): Likewise.
7346         (merge_conversion_sequences): Likewise.
7347         (build_user_type_conversion_1): Likewise.
7348         (build_user_type_conversion): Likewise.
7349         (build_new_function_call): Likewise.
7350         (build_object_call): Likewise.
7351         (conditional_conversion): Likewise.
7352         (build_conditional_expr): Likewise.
7353         (build_new_op): Likewise.
7354         (build_op_delete_call): Likewise.
7355         (convert_like_real): Likewise.
7356         (build_over_call): Likewise.
7357         (build_new_method_call): Likewise.
7358         (is_subseq): Likewise.
7359         (maybe_handle_implicit_object): Likewise.
7360         (maybe_handle_ref_bind): Likewise.
7361         (compare_ics): Likewise.
7362         (source_type): Likewise.
7363         (add_warning): Likewise.
7364         (joust): Likewise.
7365         (can_convert_arg): Likewise.
7366         (can_convert_arg_bad): Likewise.
7367         (perform_implicit_conversion): Likewise.
7368         (perform_direct_initialization_if_possible): Likewise.
7369         (initialize_reference): Likewise.
7370         * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
7371         * cp-tree.def (WRAPPER): Likewise.
7372         (IDENTITY_CONV): Remove.
7373         (LVALUE_CONV): Likewise.
7374         (QUAL_CONV): Likewise.
7375         (STD_CONV): Likewise.
7376         (PTR_CONV): Likewise.
7377         (PMEM_CONV): Likewise.
7378         (BASE_CONV): Likewise.
7379         (REF_BIND): Likewise.
7380         (USER_CONV): Likewise.
7381         (AMBIG_CONV): Likewise.
7382         (RVALUE_CONV): Likewise.
7383         * cp-tree.h (tree_wrapper): Remove.
7384         (WRAPPER_ZC): Remove.
7385         (lang_tree_node): Remove wrapper.
7386         (LOOKUP_SPECULATIVELY): Remove.
7387         (build_op_delete_call): Adjust prototype.
7388         (validate_conversion_obstack): Declare.
7389         (build_zc_wrapper): Remove.
7390         * cvt.c (convert_to_reference): Remove dead code.
7391         (ocp_convert): Likewise.
7392         * decl.c (redeclaration_error_message): Correct handling of
7393         templates.
7394         (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
7395         (cp_tree_node_structure): Remove WRAPPER case.
7396         * decl2.c (finish_file): Call validate_conversion_obstack.
7397         * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
7398         (build_op_delete_call): Likewise.
7399         (build_x_delete): Likewise.
7400         (build_delete): Adjust call to build_op_delete_call.
7401         * pt.c (tsubst_friend_declaration): Adjust code to determine
7402         whether or not a friend template is a definition.
7403         (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
7404         * tree.c (build_zc_wrapper): Remove.
7406 2004-02-12  Zack Weinberg  <zack@codesourcery.com>
7408         * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
7409         * cp-tree.h: Don't declare cxx_builtin_type_decls.
7410         * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
7411         (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
7413 2004-02-10  Mark Mitchell  <mark@codesourcery.com>
7415         * typeck.c (lookup_destructor): Fix typo in error message.
7417 2004-02-09  Kazu Hirata  <kazu@cs.umass.edu>
7419         * call.c, parser.c, tree.c: Fix comment typos.
7421 2004-02-07  Zack Weinberg  <zack@codesourcery.com>
7423         Bug 13856
7424         * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
7425         * decl.c (duplicate_decls, start_function): Likewise.
7427 2004-02-07  Zack Weinberg  <zack@codesourcery.com>
7429         * name-lookup.c (pushdecl): Issue shadow warnings directly.
7430         * parser.c (free_parser_stacks): Delete.
7432 2004-02-07  Kazu Hirata  <kazu@cs.umass.edu>
7434         * rtti.c: Update copyright.
7436 2004-02-06  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7438         PR c++/14033
7439         * decl.c (require_complete_types_for_parms): Do not insert
7440         error_mark_node in the parameter list.
7442 2004-02-06  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7444         PR c++/14028
7445         * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
7446         error when terminator can not be found.
7448 2004-02-05  Kelley Cook  <kcook@gcc.gnu.org>
7450         Make-lang.in (po-generated):  Delete.
7452 2004-02-05  Kazu Hirata  <kazu@cs.umass.edu>
7454         * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
7455         targetm.calls.promote_prototypes.
7457 2004-02-05  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
7459         PR middle-end/13750
7460         Revert:
7461         2004-01-15  Geoffrey Keating  <geoffk@apple.com>
7462         PR pch/13361
7463         * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
7464         (handle_pragma_implementation): Likewise.
7466 2004-02-05  Mark Mitchell  <mark@codesourcery.com>
7468         PR c++/13714
7469         * typeck.c (lookup_destructor): Tweak error message.
7471 2004-02-05  Jan Hubicka  <jh@suse.cz>
7473         * tree.c (cp_cannot_inline_tree_fn):  Allow inlining of comdat
7474         functions.
7476 2004-02-05  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7478         PR c++/14008
7479         * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
7480         code, only emits the diagnostic now. Added lookup of the identifier
7481         and support for qualified ids.
7482         (cp_parser_parse_and_diagnose_invalid_type_name): New function.
7483         Parse an (invalid) type name as id-expression within a declarator.
7484         (cp_parser_simple_declaration): Use it.
7485         (cp_parser_member_declaration): Likewise.
7486         (cp_parser_make_typename_type): New function. Handle errors through
7487         cp_parser_diagnose_invalid_typename.
7488         (cp_parser_elaborated_type_specifier): Use it.
7490 2004-02-04  Mark Mitchell  <mark@codesourcery.com>
7492         PR c++/13932
7493         * call.c (convert_like_real): Use "converting" rather than
7494         "argument" as the descriptive keyword to
7495         dubious_conversion_warnings.
7496         * typeck.c (convert_for_assignment): Do not call
7497         dubious_conversion_warnings.
7499 2004-02-04  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7501         PR c++/13086
7502         * init.c (build_delete): Emit a more informative error message in
7503         case of an incomplete type, and on the correct source line.
7505 2004-02-04  Kazu Hirata  <kazu@cs.umass.edu>
7507         * error.c, search.c: Update copyright.
7509 2004-02-04  Mark Mitchell  <mark@codesourcery.com>
7511         PR c++/9941
7512         * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
7513         linkage for the typeinfo name string.
7515 2004-02-04  Mark Mitchell  <mark@codesourcery.com>
7517         PR c++/13969
7518         * cp-tree.h (fold_non_dependent_expr): New function.
7519         * parser.c (cp_parser_fold_non_dependent_expr): Remove.
7520         (cp_parser_template_argument): Use fold_non_dependent_expr.
7521         (cp_parser_direct_declarator): Likewise.
7522         * pt.c (fold_non_dependent_expr): New function.
7523         (convert_nontype_argument): Use it.
7524         (tsubst_qualified_id): Simplify.
7525         (tsubst_copy_and_build): Likewise.
7527 2004-02-04  Mark Mitchell  <mark@codesourcery.com>
7529         * decl.c (cxx_push_function_context): Do not set
7530         current_function_is_thunk.
7531         * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
7532         actual function.
7534 2004-02-04  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7536         PR c++/13997
7537         * pt.c (more_specialized_class): Increase processing_template_decl
7538         while partial ordering.
7540 2004-02-03  Mark Mitchell  <mark@codesourcery.com>
7542         PR c++/13925
7543         * decl.c (start_function): Do not call pushdecl for any
7544         instantiation or specialization of a primary template.
7546 2004-02-03  Mark Mitchell  <mark@codesourcery.com>
7548         PR c++/13950
7549         * parser.c (cp_parser_class_name): Robustify.
7551         PR c++/13970
7552         * parser.c (cp_parser_cache_group): Do not consume the EOF token.
7554         PR c++/14002
7555         * semantics.c (finish_id_expression): Do not return an
7556         IDENTIFIER_NODE when lookup finds a PARM_DECL.
7558 2004-02-03  Mark Mitchell  <mark@codesourcery.com>
7560         PR c++/13978
7561         * pt.c (build_non_dependent_expr): Do not build
7562         NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
7564         PR c++/13968
7565         * semantics.c (finish_id_expression): Do not return an
7566         IDENTIFIER_NODE when lookup finds a VAR_DECL.
7568         PR c++/13975
7569         * parser.c (cp_parser_simple_declaration): When skipping to the
7570         end of the statement swallow the terminating semicolon.
7572 2004-02-02  Mark Mitchell  <mark@codesourcery.com>
7574         PR c++/13113
7575         * init.c (build_offset_ref): Improve error recovery for invalid
7576         uses of non-static member functions.
7578         PR c++/13854
7579         * cp-tree.h (cp_build_type_attribute_variant): New function.
7580         * class.c (build_clone): Use cp_build_type_attribute_variant.
7581         * decl.c (duplicate_decls): Likewise.
7582         * pt.c (copy_default_args_to_explicit_spec): Likewise.
7583         (tsubst_function_type): Likewise.
7584         * tree.c (build_exception_variant): Check attributes before
7585         concluding that two types are the same.
7586         (cp_build_type-attribute_variant): New method.
7587         * typeck.c (merge_types): Use cp_build_type_attribute_variant.
7589         PR c++/13907
7590         * call.c (convert_class_to_reference): Keep better track of
7591         pedantically invalid user-defined conversions.
7593 2004-02-01  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7595         PR c++/13957
7596         * pt.c (tsubst_qualified_id): Improved error message when a type
7597         is expected but not found.
7599 2004-01-31  Kazu Hirata  <kazu@cs.umass.edu>
7601         * class.c: Fix comment typos.
7602         * decl.c: Likewise.
7603         * error.c: Likewise.
7604         * parser.c: Likewise.
7605         * pt.c: Likewise.
7606         * search.c: Likewise.
7607         * typeck.c: Likewise.
7609 2004-01-30  Richard Henderson  <rth@redhat.com>
7611         PR c++/13693
7612         * method.c (use_thunk): Don't force_target_expr for void thunks.
7613         * tree.c (build_target_expr_with_type): Assert non-void type.
7614         (force_target_expr): Likewise.
7616 2004-01-30  Michael Matz  <matz@suse.de>
7618         * parser.c (cp_parser_labeled_statement): Accept case ranges.
7620 2004-01-30  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7622         DR206
7623         PR c++/13813
7624         * decl.c (grokdeclarator): Check immediatly type completeness for
7625         non-dependent types.
7627 2004-01-30  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7629         PR c++/13683
7630         * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
7631         a sizeof expression.block
7633 2004-01-29  Mark Mitchell  <mark@codesourcery.com>
7635         PR c++/13883
7636         * mangle.c (write_encoding): Correct encoding of member template
7637         constructors.
7639 2004-01-28  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7641         * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
7642         template name as it was `<::' (digraph typo).
7643         (cp_parser_nth_token_starts_template_argument_list_p): New function.
7644         (cp_parser_id_expression): Use it.
7645         (cp_parser_nested_name_specifier_opt): Likewise.
7646         (cp_parser_template_name): Likewise.
7647         (cp_parser_class_name): Likewise.
7648         (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
7650 2004-01-28  Mark Mitchell  <mark@codesourcery.com>
7652         PR c++/13791
7653         * typeck.c (merge_types): Do not merge attributes into
7654         TYPENAME_TYPEs.
7656         PR c++/13736
7657         * parser.c (cp_parser_direct_declarator): Do not prevent
7658         backtracking inside a parenthesized declarator.
7659         (cp_parser_parameter_declaration): Fix typo in comment.
7661 2004-01-28  Jan Hubicka  <jh@suse.cz>
7663         * semantics.c (expand_body)  Do emit_associated_thunks before
7664         expansion.
7666 2004-01-27  Devang Patel  <dpatel@apple.com>
7668         * name-lookup.c: Include "debug.h"
7669         (do_namespace_alias): Invoke debug_hooks to emit debug info
7670         for namespace alias.
7671         (do_local_using_decl): Invoke debug_hooks to emit debug info
7672         for using decl.
7673         (do_class_using_decl): Same.
7674         (do_toplevel_using_decl): Same.
7675         (do_using_directive): Same.
7676         (cp_emit_debug_info_for_using): New function.
7677         * Make-lang.in (cp/parser.o): Depend on debug.h
7678         (cp/name-lookup.o): Same.
7680 2004-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7682         * cp-tree.h (language_function, lang_type_header): Use
7683         BOOL_BITFIELD.
7684         * name-lookup.h (cp_binding_level): Likewise.
7686 2004-01-26  Mark Mitchell  <mark@codesourcery.com>
7688         PR c++/13663
7689         * semantics.c (finish_for_expr): Check for unresolved overloaded
7690         functions.
7692         * class.c (add_method): Just check processing_template_decl to
7693         determine whether or not we are within a template.
7694         * decl2.c (maybe_retrofit_in_chrg): Likewise.
7695         * init.c (decl_constant_value): Check the type of the declaration,
7696         not TREE_READONLY.
7697         * name-lookup.c (maybe_push_to_top_level): Rename to ...
7698         (push_to_top_level): ... this.
7699         * name-lookup.h (maybe_push_to_top_level): Do not declare it.
7700         * pt.c (push_template_decl_real): Reorder condition for speed.
7701         (convert_template_argument): Use dependency-checking functions in
7702         place of uses_template_parms.
7703         (lookup_template_class): Avoid calling uses_template_parms more
7704         than once.
7705         (uses_template_parms): Reimplement, using dependency-checking
7706         functions.
7707         (instantiate_class_template): Use push_to_top_level, not
7708         maybe_push_to_top_level.
7709         (type_unification_real): Simplify.
7710         (type_dependent_expression_p): Handle OFFSET_REFs and
7711         TEMPLATE_DECLs.
7712         (any_dependent_template_arguments_p): Handle multiple levels of
7713         template argument.
7714         * semantics.c (expand_or_defer_fn): Do not check
7715         uses_template_parms for template instantiations.
7716         * typeck.c (comptypes): Avoid calling cp_type_quals.
7718 2004-01-25  Mark Mitchell  <mark@codesourcery.com>
7720         PR c++/13833
7721         * call.c (build_over_call): Do not convert arguments when
7722         processing a template.
7723         * pt.c (build_non_dependent_expr): Do not build a
7724         NON_DEPENDENT_EXPR for arithmetic constants.
7726 2004-01-25  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7728         PR c++/13810
7729         * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
7730         returns a TYPE_DECL. no further lookup is required.
7731         * semantics.c (check_template_template_default_arg): A TYPE_DECL
7732         is invalid. Rework to give better diagnostics.
7734 2004-01-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7736         PR c++/13797
7737         * pt.c (instantiate_class_template): Add an error_mark_node
7738         check.
7739         (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
7741 2004-01-23  Andrew Pinski  <pinskia@physics.uc.edu>
7743         PR c++/13701
7744         * decl.c (finish_function): Move the call to
7745         finish_fname_decls below the call to
7746         finish_eh_spec_block.
7748 2004-01-21  Kazu Hirata  <kazu@cs.umass.edu>
7750         * optimize.c, typeck2.c: Update copyright.
7752 2004-01-21  Kazu Hirata  <kazu@cs.umass.edu>
7754         * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
7755         init.c, mangle.c, typeck.c: Update copyright.
7757 2004-01-21  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
7759         * parser.c (cp_parser_class_specifier): Prevent garbage collection.
7761 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
7763         * Make-lang.in: Replace $(docdir) with doc.
7764         (c++.info, c++.srcinfo): Dummy entry.
7765         (c++.man, c++.srcman): New rules.
7766         (c++.install-man): Revamp rule.
7768 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
7770         * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
7771         CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
7772         immediate $(shell) instead of deferred backquote.
7774 2004-01-19  Mark Mitchell  <mark@codesourcery.com>
7776         PR c++/13651
7777         * parser.c (cp_parser_postfix_expression): When encountering
7778         incomplete type on left-hand side of "->" or ".", treat the entire
7779         expression as erroneous.
7781         PR c++/13592
7782         * call.c (build_field_call): Remove.
7783         (n_build_method_call): Likewise.
7784         (build_method_call): Likewise.
7785         (build_new_method_call): Do not call build_field_call.
7786         * class.c (n_build_method_call): Remove.
7787         (print_class_statistics): Do not print it.
7788         * cp-tree.h (build_method_call): Remove declaration.
7789         (finish_object_call_expr): Likewise.
7790         (build_new_1): Do not use build_method_call.
7791         * parser.c (cp_parser_postfix_expression): Use finish_call_expr
7792         when the function appearing on the right-hand-side of "." or "->"
7793         is not actually a function.
7794         * pt.c (tsubst_copy_and_build): Likewise.
7795         * semantics.c (finish_object_call_expr): Remove.
7797 2004-01-18  Mark Mitchell  <mark@codesourcery.com>
7799         PR c++/13710
7800         * pt.c (tsubst): Use finish_typeof.
7802 2004-01-18  Jason Merrill  <jason@redhat.com>
7804         PR c++/11725
7805         * except.c (build_throw): In a template, set
7806         current_function_returns_abnormally.
7808 2004-01-17  Fred Fish  <fnf@intrinsity.com>
7810         PR c++/11895
7811         * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
7812         except don't call array_type_nelts() with a VECTOR_TYPE.
7814 2004-01-16  Jan Hubicka  <jh@suse.cz>
7816         * mangle.c (write_mangled_name): Remove inline modifier.
7818 2004-01-16  Mark Mitchell  <mark@codesourcery.com>
7820         PR c++/13574
7821         * decl.c (compute_array_index_type): Fix grammar in comment.
7822         * init.c (build_zero_init): Handle zero-sized arrays correctly.
7824         PR c++/13178
7825         * call.c (name_as_c_string): Print conversion operator names
7826         correctly.
7828         PR c++/13478
7829         * call.c (initialize_reference): Pass -1 for inner parameter to
7830         convert_like_real.
7832 2004-01-15  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7834         PR c++/13407
7835         * parser.c (cp_parser_base_specifier): Check for an invalid
7836         keyword `typename' and emit an user-friendly error message.
7838 2004-01-15  Geoffrey Keating  <geoffk@apple.com>
7840         PR pch/13361
7841         * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
7842         (handle_pragma_implementation): Likewise.
7844 2004-01-15  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7846         PR c++/9259
7847         * typeck.c (build_class_member_access_expr): Allow to access members
7848         of the currently open class.
7849         (finish_class_member_access_expr): Likewise.
7851 2004-01-15  Alexandre Oliva  <aoliva@redhat.com>
7853         PR c++/13659
7854         * name-lookup.c (validate_nonmember_using_decl): Take scope and
7855         name by value, instead of computing them.
7856         (do_local_using_decl, do_toplevel_using_decl): Add scope and name
7857         arguments.  Pass them to validate_nonmember_using_decl.
7858         * name-lookup.h (do_local_using_decl): Adjust.
7859         (do_toplevel_using_decl): Likewise.
7860         * parser.c (cp_parser_using_declaration): Likewise.
7861         * pt.c (tsubst_expr): Likewise.
7863 2004-01-15  Alexandre Oliva  <aoliva@redhat.com>
7865         PR c++/13594
7866         PR c++/13658
7867         * name-lookup.c (qualified_lookup_using_namespace): Search
7868         strongly-associated namespaces first, and only then try other
7869         namespaces.
7871 2004-01-15  Kelley Cook  <kcook@gcc.gnu.org>
7873         * Make-lang.in (c++.srcextra): Dummy entry.
7875 2004-01-15  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7877         PR c++/8856
7878         * parser.c (cp_parser_template_name): Don't try to parse a
7879         conversion-function-id, as it cannot be a template-name.
7880         (cp_parser_simple_type_specifier): Check for invalid template-ids
7881         even after a built-in type.
7883 2004-01-14  Jan Hubicka  <jh@suse.cz>
7885         PR c++/12850
7886         * pt.c (instantiate_decl):  Do not increase function_depth.
7888 2004-01-14  Danny Smith  <dannysmith@users,sourceforge.net>
7890         PR c++/9021
7891         PR c++/11005
7892         * parser.c (cp_parser_elaborated_type_specifier): Warn about
7893         attributes and discard.
7894         * decl.c (xref_tag): Don't overwite existing attributes with
7895         NULL_TREE.
7897 2004-01-14  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7899         PR c++/12335
7900         * parser.c (cp_parser_lookup_name): Return error_mark_node if there
7901         is no destructor while looking up a BIT_NOT_EXPR.
7903 2004-01-13  Ian Lance Taylor  <ian@wasabisystems.com>
7905         * cxxfilt.c: Remove unused file.
7907 2004-01-14  Jan Hubicka  <jh@suse.cz>
7909         Partial fix to PR c++/12850
7910         * decl2.c (mark_used): Do not proactively instantiate templates
7911         when compiling in unit-at-a-time or not optimizing.
7912         * optimize.c (maybe_clone_body): Do not increase function depth.
7914 2004-01-13  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7916         PR c++/13474
7917         * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
7919 2004-01-12  Steven Bosscher  <stevenb@suse.de>
7921         PR c++/13558
7922         * parser.c (cp_parser_member_declaration): Any non-type is also
7923         not a class or a function.
7925 2004-01-12  Jason Merrill  <jason@redhat.com>
7927         PR c++/12815
7928         * class.c (build_base_path): Do not mark vtable references as
7929         TREE_CONSTANT.
7930         (build_vtbl_ref_1): Likewise.
7932 2004-01-12  Richard Henderson  <rth@redhat.com>
7934         PR opt/10776
7935         * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
7936         (store_init_value): Use it.
7937         * decl.c (check_initializer): Expect full initialization code
7938         from store_init_value.
7939         * init.c (expand_aggr_init_1): Likewise.
7940         * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
7942 2004-01-12  Mark Mitchell  <mark@codesourcery.com>
7944         * class.c (layout_class_type): For non-POD class types, also copy
7945         the DECL_SIZE and DECL_MODE of fields to the base class type.
7947 2004-01-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7949         PR c++/13289
7950         * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
7951         calling regenerate_decl_from_template.
7953 2004-01-12  Scott Brumbaugh  <scottb.lists@verizon.net>
7955         PR c++/4100
7956         * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
7957         decl-specifier occurring along with a class definition.
7959 2004-01-12  Ian Lance Taylor  <ian@wasabisystems.com>
7961         * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
7962         clauses to comments describing declares_class_or_enum.
7963         (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
7964         false.
7966 2004-01-12  Jan Hubicka  <jh@suse.cz>
7968         * pt.c (for_each_template_parm): Do not check for duplicates.
7969         (for_each_template_parm): Use walk_tree duplicate checking code.
7971 2004-01-11  Ian Lance Taylor  <ian@wasabisystems.com>
7973         PR c++/3478
7974         * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
7975         is error_mark_node, don't add any more decl_specs.
7976         (cp_parser_init_declarator): After committing to a declaration, if
7977         the decl_specifiers start with error_mark_node, issue an error and
7978         change the type to "int".
7980 2004-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
7982         PR bootstrap/7817
7983         * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
7985 2004-01-10  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7987         DR 337
7988         PR c++/9256
7989         * pt.c (tsubst): Substitution must fail if we are attempting to
7990         create an array with element type that is an abstract class type.
7991         * decl.c (cp_finish_decl): Strip pointers and array types recursively
7992         before calling abstract_virtuals_error.
7994 2004-01-09  Alexandre Oliva  <aoliva@redhat.com>
7996         * name-lookup.c (qualified_lookup_using_namespace): Consider
7997         strong using directives even if we've already found a binding.
7999 2004-01-09  Mark Mitchell  <mark@codesourcery.com>
8001         * cp-tree.h (cxx_expand_expr): Change prototype.
8002         * expr.c (cxx_expand_expr): Add alt_rtl parameter.
8004 2004-01-08  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
8006         PR c++/12573
8007         * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
8008         looking into them recursively. They can be there because of the
8009         new __offsetof__ extension.
8011 2004-01-07  Zack Weinberg  <zack@codesourcery.com>
8013         * parser.c (cp_parser_save_member_function_body): Mark the
8014         definition static.
8016 2004-01-05  Mark Mitchell  <mark@codesourcery.com>
8018         PR c++/13057
8019         * class.c (build_clone): Copy type attributes from the original
8020         function to the clone.
8022         PR c++/12815
8023         * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
8024         references as constant.
8026         PR c++/12132
8027         * parser.c (cp_parser_explicit_instantiation): Improve error
8028         recovery.
8029         (cp_parser_require): Improve indication of the error location.
8031         PR c++/13451
8032         * parser.c (cp_parser_class_head): Reorder logic to check for
8033         invalid qualification.
8035 2004-01-04  Mark Mitchell  <mark@codesourcery.com>
8037         PR c++/13157
8038         * name-lookup.c (lookup_using_namespace): Remove spacesp
8039         parameter.
8040         (unqualified_namespace_lookup): Likewise.
8041         (lookup_qualified_name): Adjust accordingly.
8042         (lookup_name_real): Likewise.
8043         (lookup_arg_dependent): Do not eliminate the namespace of the
8044         functions found by unqualified name lookup unless that is the
8045         current namespace.
8047 2004-01-04  Andrew Pinski  <pinskia@physics.uc.edu>
8049         * semantics.c (push_deferring_access_checks): Fix format.
8050         (resume_deferring_access_checks): Likewise.
8051         (stop_deferring_access_checks): Likewise.
8052         (pop_deferring_access_checks): Likewise.
8053         (get_deferred_access_checks): Likewise.
8054         (pop_to_parent_deferring_access_checks): Likewise.
8055         (perform_deferred_access_checks): Likewise.
8056         (perform_or_defer_access_check): Likewise.
8058 2004-01-04  Richard Henderson  <rth@redhat.com>
8060         * call.c (build_over_call): Don't create a save_expr of an
8061         aggregate, but rather its address.
8063 2004-01-04  Mark Mitchell  <mark@codesourcery.com>
8065         PR c++/13529
8066         * parser.c (cp_parser_postfix_expression): Allow "." to appear in
8067         an offsetof expression.
8069         * parser.c (cp_parser_parameter_declaration): Fix comment.
8071         PR c++/12226
8072         * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
8073         (reference_binding): Set it when appropriate.
8074         (build_temp): New function, split out from ...
8075         (convert_like_real): ... here.  Honor CHECK_COPY_CONSTRUCTOR_P.
8076         (initialize_reference): Likewise.
8078         PR c++/13536
8079         * parser.c (cp_parser): Add in_type_id_in_expr_p.
8080         (cp_parser_new): Initialize it.
8081         (cp_parser_postfix_expression): Set it.
8082         (cp_parser_sizeof_operand): Likewise.
8083         (cp_parser_parameteR_declaration): Do not commit early to tenative
8084         parsers when in_type_id_in_expr_p is set.
8086 2004-01-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8088         PR c++/13094
8089         * parser.c (cp_parser_template_argument): Don't call
8090         make_unbound_class_template directly.
8091         (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
8092         UNBOUND_CLASS_TEMPLATE tree node.
8094 2004-01-02  Richard Sandiford  <rsandifo@redhat.com>
8096         PR target/12729
8097         * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
8099 2004-01-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8101         PR c++/13520
8102         * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
8103         (DECL_FUNCTION_TEMPLATE_P): Use it.
8104         (DECL_CLASS_TEMPLATE_P): Likewise.
8105         * parser.c (cp_parser_lookup_name): Add is_template parameter.
8106         (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
8107         (cp_parser_template_name): Likewise.
8108         (cp_parser_elaborated_type_specifier): Likewise.
8109         (cp_parser_namespace_name): Likewise.
8110         (cp_parser_class_name): Likewise.
8111         (cp_parser_lookup_name_simple): Likewise.
8113 See ChangeLog.3 for earlier changes.