2004-10-05 Andrew Pinski <pinskia@physics.uc.edu>
[official-gcc.git] / gcc / cp / ChangeLog
blob20a6a2de72c5f9e8b19021e6a7a728646dfdf166
1 2004-10-05  Andrew Pinski  <pinskia@physics.uc.edu>
3         PR c++/17368
4         * semantics.c (finish_asm_stmt): Asm expressions need cleanup
5         also.
7 2004-10-05  Gabriel Dos Reis  <gdr@integrable-solutions.net>
9         Convert diagnostics to use quoting flag q 6/n
10         * pt.c (finish_member_template_decl, check_specialization_scope, 
11         maybe_process_partial_specialization, determine_specialization, 
12         check_explicit_specialization, maybe_check_template_type, 
13         process_partial_specialization, check_default_tmpl_args, 
14         push_template_decl_real, redeclare_class_template, 
15         convert_nontype_argument, coerce_template_parms, 
16         lookup_template_class, push_tinst_level, 
17         instantiate_class_template, tsubst_arg_types, 
18         tsubst_function_type, tsubst, tsubst_qualified_id, 
19         tsubst_copy_and_build, check_instantiated_args, 
20         do_decl_instantiation, do_type_instantiation, 
21         invalid_nontype_parm_type_p, check_specialization_namespace, 
22         convert_template_argument, determine_specialization, 
23         check_template_shadow, tsubst_decl 
24         instantiate_pending_templates): Use quoting marks.
26 2004-10-05  Nathan Sidwell  <nathan@codesourcery.com>
28         PR c++/17829
29         * parser.c (cp_parser_postfix_expression): Inhibit Koenig when
30         unqualified lookup finds a member function.
32 2004-10-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
34         Convert diagnostics to use quoting flag q 5/n
35         * parser.c (cp_parser_name_lookup_error, 
36         cp_parser_diagnose_invalid_type_name, 
37         cp_parser_primary_expression, cp_parser_unqualified_id, 
38         cp_parser_nested_name_specifier_opt, cp_parser_labeled_statement, 
39         cp_parser_jump_statement, cp_parser_simple_declaration, 
40         cp_parser_decl_specifier_seq, cp_parser_mem_initializer_id, 
41         cp_parser_type_parameter, cp_parser_template_id, 
42         cp_parser_template_name, cp_parser_direct_declarator, 
43         cp_parser_parameter_declaration_list, cp_parser_class_head, 
44         cp_parser_base_specifier, cp_parser_lookup_name, 
45         cp_parser_late_parsing_default_args, 
46         cp_parser_optional_template_keyword 
47         cp_parser_elaborated_type_specifier, cp_parser_check_class_key, 
48         cp_parser_check_access_in_redeclaration): Use quoting marks.
50         * name-lookup.c (supplement_binding, pushdecl, 
51         check_for_out_of_scope_variable, validate_nonmember_using_decl, 
52         do_nonmember_using_decl, lookup_tag, set_decl_namespace, 
53         push_namespace, do_namespace_alias, do_using_directive, 
54         ambiguous_decl, lookup_namespace_name, add_function): Likewise.
56         * method.c (use_thunk): Likewise.
58         * lex.c (unqualified_name_lookup_error, 
59         unqualified_fn_lookup_error): Likewise.
61 2004-10-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
63         Convert diagnostics to use quoting flag q 4/n
64         * except.c (decl_is_java_type, build_throw, 
65         is_admissible_throw_operand, check_handlers_1, check_handlers): 
66         Use quoting formats.
67         * friend.c (add_friend, make_friend_class, do_friend): Likewise.
68         * init.c (sort_mem_initializers, emit_mem_initializers, 
69         member_init_ok_or_else, expand_member_init, is_aggr_type, 
70         build_offset_ref, build_java_class_ref): Likewise.
72 2004-10-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
74         Convert diagnostics to use quoting flag q 3/n
75         * decl.c (pop_label, duplicate_decls, redeclaration_error_message,
76         redeclaration_error_message, lookup_label, check_goto,
77         make_typename_type, make_unbound_class_template,
78         fixup_anonymous_aggr, check_tag_decl, start_decl, start_decl_1, 
79         grok_reference_init, layout_var_decl, maybe_commonize_var, 
80         check_for_uninitialized_const_var, reshape_init_array, 
81         reshape_init, check_initializer, cp_finish_decl,
82         member_function_or_else, bad_specifiers, grokfndecl, grokvardecl, 
83         check_static_variable_definition, compute_array_index_type, 
84         create_array_type_for_decl, check_special_function_return_type, 
85         grokdeclarator, check_default_argument, grokparms, 
86         grok_ctor_properties, grok_op_properties, 
87         check_elaborated_type_specifier, xref_tag, finish_enum, 
88         build_enumerator, check_function_type, start_preparsed_function, 
89         store_parm_decls): Use quoting formats.
90         * decl2.c (grok_array_decl, delete_sanity, check_member_template, 
91         check_java_method, check_classfn, finish_static_data_member_decl, 
92         grokfield, grokbitfield, grok_function_init,
93         build_anon_union_vars, coerce_new_type, coerce_delete_type,
94         check_default_args): Likewise.
95         * parser.c (cp_parser_decl_specifier_seq): Likewise.
97 2004-10-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
99         Convert diagnostics to use quoting flag q 2/n
100         * class.c (build_base_path, add_method, alter_access,
101         handle_using_decl, check_bases,
102         maybe_warn_about_overly_private_class, find_final_overrider,
103         warn_hidden, finish_struct_anon, add_implicitly_declared_members,
104         check_bitfield_decl, check_field_decls, layout_empty_base,
105         build_base_field, check_methods, layout_virtual_bases,
106         warn_about_ambiguous_bases, layout_class_type, finish_struct_1,
107         resolve_address_of_overloaded_function, instantiate_type,
108         note_name_declared_in_class): Use format flag "q" for quoting.
110 2004-10-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
112         Convert diagnostics to use quoting flag q 1/n
113         * error.c (locate_error): Ignore quoting flag q.
114         * call.c (build_user_type_conversion_1, build_operator_new_call,
115         build_object_call, op_error, build_conditional_expr,
116         build_new_op, build_op_delete_call, enforce_access,
117         convert_like_real, convert_arg_to_ellipsis, build_x_va_arg,
118         convert_default_arg, build_over_call, build_new_method_call,
119         joust, perform_implicit_conversion, initialize_reference): Use the
120         quoting flag q.
122 2004-10-03  Andrew Pinski  <pinskia@physics.uc.edu>
124         PR c++/17797
125         * typeck.c (build_reinterpret_cast): Return if the inner type
126         is error_mark_node.
128 2004-10-01  Jan Hubicka  <jh@suse.cz>
130         * semantics.c (expand_body): Update call of tree_rest_of_compilation.
132 2004-09-30  Nathan Sidwell  <nathan@codesourcery.com>
134         * cp-tree.h (struct lang_decl): Shrink by reordering fields and
135         turning operator_code and fixed_offset into bitfields.
137 2004-09-29  Joseph S. Myers  <jsm@polyomino.org.uk>
139         * decl.c (duplicate_decls): Merge TREE_DEPRECATED.
141 2004-09-29  Jason Merrill  <jason@redhat.com>
143         PR tree-optimization/17697
144         * decl.c (duplicate_decls): Copy TREE_NOTHROW from newdecl to olddecl.
146 2004-09-28  Jason Merrill  <jason@redhat.com>
148         PR middle-end/17525
149         * class.c (build_base_field): Set TYPE_MODE.
151 2004-09-28  Roger Sayle  <roger@eyesopen.com>
153         PR driver/17537
154         * g++spec.c (lang_specific_driver): Unrecognized libraries, other
155         than -lc and -lm, may require linking against libstc++.
157 2004-09-28  Kazu Hirata  <kazu@cs.umass.edu>
159         * tree.c: Fix a comment typo.
161 2004-09-28  Nathan Sidwell  <nathan@codesourcery.com>
163         * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): Remove.
164         (struct secondary_vptr_vtt_init_data_s): New.
165         (build_vtt_inits): Adjust dfs_walkers.
166         (dfs_build_secondary_vptr_vtt_inits): Caller data is a
167         secondary_vptr_vtt_init_data_s structure. Adjust.
168         (dfs_ctor_vtable_bases_queue_p): Remove.
169         (dfs_fixup_binfo_vtbls): No need to clear BINFO_MARKED. Simplify.
171         * pt.c (struct get_template_base_data_s): Remove.
172         (get_template_base_r): Fold into get_template_base.
173         (get_template_base): Walk base binfos directly in inheritance
174         graph order.
176 2004-09-27  Mark Mitchell  <mark@codesourcery.com>
178         PR c++/17642
179         * cp-tree.h (fold_if_not_in_template): New function.
180         * call.c (build_conditional_expr): Use fold_if_not_in_template.
181         (build_cxx_call): Likewise.
182         * cvt.c (convert_to_complex): Likewise.
183         (ocp_convert): Likewise.
184         (convert): Likewise.
185         (convert_force): Likewise.
186         * decl.c (compute_array_index_type): Clear
187         processing_template_decl while folding array bounds.
188         * pt.c (convert_nontype_argument): Clear
189         processing_template_decl while processing non-type argument
190         initialization.
191         * tree.c (fold_if_not_in_template): New function.
192         * typeck.c (build_class_member_access_expr): Use
193         fold_if_not_in_template.
194         (build_array_ref): Likewise.
195         (build_binary_op): Likewise.  Do not try to optimize computations
196         when processing templates.
197         (cp_pointer_int_sum): Use fold_if_not_in_template.
198         (pointer_diff): Likewise.
199         (build_unary_op): Likewise.
200         (build_reinterpret_cast): Likewise.
201         (get_delta_difference): Likewise.
202         (expand_ptrmemfunc_cst): Likewise.
203         (dubious_conversion_warnings): Likewise.
205 2004-09-27  Matt Austern  <austern@apple.com>
207         * cp/parser.c (struct cp_token): New one-bit field , implicit_extern_c
208         (cp_lexer_get_preprocessor_token): Set implicit_extern_c for
209         tokens that come from headers that are implicitly extern "C".
210         (struct cp_parser): new one-bit field, implicit_extern_c.
211         (cp_parser_new): Set parser's implicit_extern_c to false.
212         (cp_parser_translation_unit): Pop lang context if we were in a
213         header that was implicitly extern "C".
214         (cp_parser_declaration_seq_opt): Push/pop lang context as
215         required by the token's and parser's implicit_extern_c.
216         
217 2004-09-27  Mark Mitchell  <mark@codesourcery.com>
219         PR c++/17585
220         * cp-tree.h (shared_member_p): Declare.
221         * search.c (shared_member_p): Give it external linkage.
222         * semantics.c (finish_qualified_id_expr): Use it.
223         (finish_id_expression): Likewise.
225         PR c++/17585
226         * semantics.c (finish_id_expression): Do not add "this->" to
227         static member functions.
229 2004-09-27  Nathan Sidwell  <nathan@codesourcery.com>
231         PR c++/17681
232         * error.c (dump_type): Change TREE_VEC case into TREE_BINFO.
234         * class.c (struct count_depth_data): Remove.
235         (dfs_depth_post, dfs_depth_q): Remove.
236         (find_final_overrider): Use number of vbase classes as depth
237         bound.
238         
239         * cp-tree.h (types_overlap_p): Remove.
240         * search.c (struct overlap_info): Remove.
241         (dfs_check_overlap, dfs_no_overlap_yet, types_overlap_p): Remove.
242         
243         * pt.c (GTB_VIA_VIRTUAL, GTB_IGNORE_TYPE): Remove.
244         (get_template_base_recursive): Remove. Replace with ...
245         (get_template_base_r): ... this.
246         (struct get_template_base_data_s): New.
247         (get_template_base): Use get_template_base_r via dfs_walk.  Always
248         return NULL on failure.
249         (unify): Remove error_mark_node check from get_template_base result.
251 2004-09-24  Paolo Bonzini  <bonzini@gnu.org>
253         * parser.c (cp_parser_expression_stack): Clarify why it is
254         an array of NUM_PREC_VALUES elements.
255         (cp_parser_binary_expression): Clarify why we do not need to
256         handle stack overflow.
258 2004-09-24  Nathan Sidwell  <nathan@codesourcery.com>
260         PR c++/16889
261         * search.c (lookup_field_queue_p): Correct check for hidden base.
263         * search.c (bfs_walk): Remove.
264         (lookup_member): Use dfs_walk_real.
265         (dfs_walk_real): Move and adjust documentation from bfs_walk.
267 2004-09-23  Zack Weinberg  <zack@codesourcery.com>
269         * decl.c (grokfndecl): If ::main is found not to return int,
270         correct it after issuing a diagnostic.
271         (grokdeclarator): If the incoming type was error_mark_node, do
272         not complain about declaring something with no type.
273         (start_function): Change check for ::main not returning int to
274         an assertion, as grokfndecl now catches this when the user did it.
275         * init.c (perform_member_init, sort_mem_initializers)
276         (emit_mem_initializers): Make most diagnostics be issued on
277         the line of current_function_decl, not whatever the current
278         input line is.
279         * parser.c (cp_lexer_peek_token_emit_debug_info): Surround
280         definition and declaration with #ifdef ENABLE_CHECKING.
281         Avoid unnecessary use of fprintf.
282         (cp_lexer_print_token, cp_lexer_debug_stream): Adjust stub
283         definitions to avoid warnings.
284         (cp_lexer_new_main): Add assertion that first token is not a
285         padding token.
286         (cp_lexer_new_from_token_array): Fold into ...
287         (cp_lexer_new_from_tokens): ... here.  Add assertion that
288         first token is not a padding token.
289         (cp_lexer_set_source_position_from_token): Move nearer to callers.
290         Remove unused lexer argument.
291         (cp_lexer_peek_token): Just print debugging report (if enabled)
292         and return lexer->next_token.
293         (cp_lexer_skip_purged_tokens): Delete.
294         (cp_lexer_next_token_is, cp_lexer_next_token_is_not): Make
295         inline, simplify bodies.
296         (cp_lexer_peek_nth_token): Add debugging report a la
297         cp_lexer_peek_token.
298         (cp_lexer_consume_token): Correct commentary.  Advance over
299         purged tokens here.  Set current source position here, from
300         token to be returned.  Avoid unnecessary use of fprintf.
301         (cp_lexer_purge_token): Advance next_token pointer over this and
302         subsequent purged tokens.
303         (cp_parser_error): Adjust source position to that of the
304         peeked token.
305         (cp_parser_push_lexer_for_tokens, cp_parser_pop_lexer): New functions.
306         (cp_parser_string_literal): Remove some excessive cleverness.
307         (cp_parser_enum_specifier): Call start_enum before consuming
308         the opening brace.
309         (cp_parser_member_declaration): Make the "extra semicolon"
310         diagnostic consistently-worded with the other place this is
311         diagnosed.  Explicitly set the diagnostic location to the
312         location of the offending semicolon.
313         (cp_parser_enclosed_template_argument_list): Use %</%> quoting
314         in diagnostics.  Do not use cp_parser_require.  Set location
315         of diagnostics about improper use of '>>' to location of
316         offending token.
317         (cp_parser_late_parsing_for_member):
318         Use cp_parser_push_lexer_for_tokens and cp_parser_pop_lexer.
319         (cp_parser_late_parsing_default_args): Likewise.  Manually
320         move some logic outside the loop.
322 2004-09-23  Andrew Pinski  <pinskia@physics.uc.edu>
324         PR c++/17618
325         * cvt.c (cp_convert_to_pointer): Return early when the type is
326         an error_mark_node.
328 2004-09-21 Fariborz Jahanian <fjahanian@apple.com>
330         PR c++/13989
331         PR c++/9844
332         * decl.c (grokfndecl): Add new argument "attrlist", use it
333         to call cplus_decl_attributes.
334         (start_function): Remove call to cplus_decl_attributes.
335         * cvt.c (ocp_convert): Add support to use type conversion
336         function to vector type.
337         * parser.c (cp_parser_conversion_type_id): Add attributes, if any,
338         to the parsed type.
340 2004-09-23  Paolo Bonzini  <bonzini@gnu.org>
342         PR c++/17596
344         * parser.c (cp_parser_token_tree_map_node,
345         cp_parser_pm_expression, cp_parser_additive_expression,
346         cp_parser_multiplicative_expression, cp_parser_shift_expression,
347         cp_parser_relational_expression, cp_parser_equality_expression,
348         cp_parser_and_expression, cp_parser_exclusive_or_expression,
349         cp_parser_inclusive_or_expression,
350         cp_parser_logical_and_expression,
351         cp_parser_logical_or_expression): Removed.
352         (enum cp_parser_prec, struct cp_parser_token_tree_map_node,
353         binops, binops_by_token): New.
354         (cp_parser_assignment_expression): Use cp_parser_binary_expression.
355         (cp_parser_new): Initialize binops_by_token.
356         (cp_parser_binary_expression): Rewritten.
357         (N_CP_TTYPES): New.
359 2004-09-23  Kazu Hirata  <kazu@cs.umass.edu>
361         * parser.c: Fix a comment typo.
363 2004-09-23  Nathan Sidwell  <nathan@codesourcery.com>
365         PR c++/17620
366         * decl.c (xref_basetypes): Look through typedefs before checking
367         for duplicate base.
369 2004-09-22  Nathan Sidwell  <nathan@codesourcery.com>
371         * cp-tree.h (unemitted_tinfo_decls): Make a VEC(tree).
372         * decl2.c (cp_finish_file): Adjust tinfo decl emission loop.
373         * rtti.c (unemitted_tinfo_decls): Make a VEC(tree).
374         (init_rtti_processing): Initialize it to something realistic.
375         (get_tinfo_decl): Adjust pushing the new decl.
377         * cp-tree.h (struct lang_type_class): Remove marked flags, add
378         diamond_shaped and repeated_base flags.  Reorder to keep 8-bit blocks.
379         (TYPE_MARKED_P): New.
380         (CLASSTYPE_DIAMOND_SHAPED_P, CLASSTYPE_REPEATED_BASE_P): New.
381         (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
382         CLEAR_CLASSTYPE_MARKED_N): Remove.
383         (CLASSTYPE_MARKED_*, SET_CLASSTYPE_MARKED_*,
384         CLEAR_CLASSTYPE_MARKED_*): Remove.
385         * decl.c (xref_basetypes): Use TYPE_MARKED_P. Determine diamond
386         shaped and repeated base properties.
387         * lex.c (cxx_make_type): Don't clear TYPE_ALIAS_SET.
388         * rtti.c (dfs_class_hint_mark, dfs_class_hint_unmark,
389         class_hint_flags): Remove.
390         (get_pseudo_ti_init): Use CLASSTYPE_REPEATED_BASE_P and
391         CLASSTYPE_DIAMOND_SHAPED_P.
393 2004-09-21  Ziemowit Laski  <zlaski@apple.com>
395         * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved here from
396         cp-objcp-common.h.
397         (objcp_tsubst_copy_and_build): Reformat function signature.
398         * cp-objcp-common.h (objcp_tsubst_copy_and_build): Likewise.
399         (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved to cp-lang.c.
401 2004-09-21  Zack Weinberg  <zack@codesourcery.com>
403         * parser.c (cp_lexer_peek_token, cp_lexer_consume_token):
404         Don't handle CPP_PRAGMA tokens specially.
405         (cp_lexer_handle_pragma): Use cp_lexer_consume_token.  Don't
406         purge the token; do clear token->value after processing.  Add
407         assertion at beginning that token->value is nonzero.
408         (cp_parser_statement, cp_parser_declaration_seq_opt): Handle
409         CPP_PRAGMA as a full statement or declaration in its own right.
411 2004-09-21  Matt Austern  <austern@apple.com>
413         PR c++/15049
414         * decl.c (grokvardecl): Accept declarations of global variables
415         using anonymous types.
417 2004-09-21  Roger Sayle  <roger@eyesopen.com>
419         PR c++/7503
420         * tree.c (lvalue_p_1):  Disallow MIN_EXPR and MAX_EXPR as lvalues
421         if either operand has side-effects.
422         * typeck.c (rationalize_conditional_expr): Assert that neither
423         operand of MIN_EXPR or MAX_EXPR has side-effects.
424         (build_modify_expr):  Add support for MIN_EXPR and MAX_EXPR.
425         Check that the "lhs" is a valid lvalue, i.e. that neither operand
426         of a MIN_EXPR or MAX_EXPR has a side-effect.
428 2004-09-21  Nathan Sidwell  <nathan@codesourcery.com>
430         * cp-tree.h (struct lang_type_header): Remove
431         uses_multiple_inheritance field.
432         (TYPE_USES_MULTIPLE_INHERITANCE): Remove.
433         (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): Remove.
434         (TYPE_USES_VIRTUAL_BASECLASSES): Remove.
435         (DECL_NEEDS_VTT_PARM_P): Use CLASSTYPE_VBASECLASSES.
436         (TYPE_CONTAINS_VPTR_P): Likewise.
437         * call.c (add_template_candidate_real): Use
438         CLASSTYPE_VBASECLASSES.
439         (build_special_member_call): Likewise.
440         * class.c (finish_struct_bits): Remove
441         TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P & TYPE_USES_VIRTUAL_BASECLASSES
442         bookkeeping.
443         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
444         (create_vtable_ptr): Remove TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P
445         bookkeeping.
446         (build_vtt_inits): Use CLASSTYPE_VBASECLASSES.
447         (accumulate_vtbl_inits, build_vbase_offset_vtbl_entries):
448         Likewise.
449         * decl.c (xref_basetypes): Remove TYPE_USES_MULTIPLE_INHERITANCE,
450         TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
451         bookkeeping.
452         (cxx_maybe_build_cleanup): Use CLASSTYPE_VBASECLASSES.
453         * decl2.c (maybe_retrofit_in_chrg): Likewise.
454         * init.c (expand_member, push_base_cleanups): Likewise.
455         * pt.c (instantiate_class_template): Remove
456         TYPE_USES_MULTIPLE_INHERITANCE,
457         TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
458         bookkeeping.
459         * ptree.c (cxx_print_type): Remove TYPE_USES_MULTIPLE_INHERITANCE
460         check.
461         * typeck2.c (process_init_constructor): Replace some sorrys with
462         asserts.
464 2004-09-21  Andreas Tobler  <a.tobler@schweiz.ch>
466         * decl.c (reshape_init_array): Initialize max_index_cst to fix
467         bootstrap failure.
469 2004-09-20  Mark Mitchell  <mark@codesourcery.com>
471         PR c++/17530
472         * pt.c (tsubst): Fix parentheses to accomodate emacs.
473         (tsubst_baselink): If we get a single function, mark it as used.
475 2004-09-20  Matt Austern <austern@apple.com>
476             Zack Weinberg  <zack@codesourcery.com>
478         * decl.c (make_rtl_for_nonlocal_decl, start_preparsed_function):
479         Apply lbasename to input_filename before passing to get_fileinfo.
480         * semantics.c (begin_class_definition): Likewise.
481         * lex.c (handle_pragma_interface): Apply get_fileinfo to the
482         correct filename.  Rename variables to be less confusing.
483         (handle_pragma_implementation): Likewise.  Disable "appears
484         after file is included" diagnostic.
486         * parser.c (struct cp_token): Add in_system_header fiag.
487         (CP_TOKEN_BLOCK_NUM_TOKENS, struct cp_token_block)
488         (CP_TOKEN_BUFFER_SIZE, cp_token_cache_push_token)
489         (CPP_NONE, cp_lexer_read_token): Delete.
490         (struct cp_lexer): Remove first_token, string_tokens,
491         main_lexer_p fields.  Clarify comments.
492         (struct cp_token_cache): Now just a pair of pointers.
493         (CP_LEXER_BUFFER_SIZE): New #define.
494         (CPP_PURGED): New fake token type.
495         (cp_lexer_new_from_token_array, cp_lexer_destroy)
496         (cp_lexer_peek_token_emit_debug_info, cp_lexer_skip_purged_tokens)
497         (cp_lexer_handle_pragma, cp_token_cache_new, cp_parser_string_literal):
498         New functions.
499         (cp_lexer_new_from_tokens): Now a simple wrapper around
500         cp_lexer_new_from_token_array.
501         (cp_lexer_set_source_position_from_token): Also update
502         in_system_header.
503         (cp_lexer_next_token, cp_lexer_prev_token, cp_lexer_advance_token):
504         Don't wrap round.
505         (cp_lexer_token_difference): Dont handle wrapping round.
506         (cp_lexer_new_main): Enable pragma deferral and raw strings,
507         read the entire translation unit through c_lex_with_flags into
508         this lexer's buffer, then turn raw strings back off again.
509         (cp_lexer_grow_buffer): Adjust for buffer no longer being circular.
510         (cp_lexer_get_preprocessor_token): No need to handle not being
511         the main lexer.  Set token->in_system_header too.
512         (cp_lexer_peek_token): Skip purged tokens.  Feed pragma tokens
513         to cp_lexer_handle_pragma.  No need to call cp_lexer_read_token.
514         (cp_lexer_peek_nth_token): Likewise.
515         (cp_lexer_purge_token): Mark the token PURGED, don't shift all
516         the other tokens down.
517         (cp_lexer_purge_tokens_after): Likewise.
518         (cp_lexer_save_tokens, cp_lexer_rollback_tokens): Don't worry
519         about there being no tokens.
520         (cp_lexer_print_token): Revise to give useful information on
521         all tokens.
522         (struct cp_parser): Add field translate_strings_p.
523         (cp_parser_new): Initialize it.
524         (cp_parser_translation_unit): Destroy the lexer when done.
525         (cp_parser_parameter_declaration): Restructure saving of
526         default arguments.
527         (cp_parser_save_member_function_body): Likewise.
528         (cp_parser_check_for_invalid_template_id)
529         (cp_parser_nested_name_specifier_opt, cp_parser_template_id):
530         Adjust calls to cp_lexer_advance_token.
531         (cp_parser_skip_to_closing_parenthesis, cp_parser_declaration):
532         No need to fiddle c_lex_string_translate.
533         (cp_parser_primary_expression, cp_parser_linkage_specification)
534         (cp_parser_asm_definition, cp_parser_asm_specification_opt)
535         (cp_parser_asm_operand_list, cp_parser_asm_clobber_list)
536         Use cp_parser_string_literal.
537         (cp_parser_attribute_list): Save and restore
538         parser->translate_strings_p, not c_lex_string_translate.
539         (cp_parser_cache_group): Delete.
540         (cp_parser_cache_group_1): Rename cp_parser_cache_group.  Do
541         not take a cache argument.
543 2004-09-20  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
545         PR c++/14179
546         * decl.c (reshape_init): Extract array handling into...
547         (reshape_init_array): New function. Use integers instead of trees
548         for indices. Handle out-of-range designated initializers.
550 2004-09-20  Steven Bosscher  <stevenb@suse.de>
552         * lex.c (cxx_init): Don't set the ridpointer for RID_NULL
553         to null_node.
555 2004-09-19  Mark Mitchell  <mark@codesourcery.com>
557         * decl2.c (determine_visibility): Allow class visibility
558         directives to override targetm.cxx.export_class_data.
560 2004-09-18  Kazu Hirata  <kazu@cs.umass.edu>
562         * call.c, semantics.c: Follow spelling conventions.
563         * class.c: Fix a comment typo.
565 2004-09-16  Geoffrey Keating  <geoffk@apple.com>
567         PR pch/13361
568         * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
569         (handle_pragma_implementation): Likewise.
571 2004-09-17  Jeffrey D. Oldham  <oldham@codesourcery.com>
572             Zack Weinberg  <zack@codesourcery.com>
574         * cp-tree.def: Use tree_code_class enumeration constants
575         instead of code letters.
576         * call.c, class.c, cp-gimplify.c, cp-lang.c, cxx-pretty-print.c
577         * mangle.c, pt.c, semantics.c, tree.c, typeck.c:
578         Update for new tree-class enumeration constants.
580 2004-09-16  Mark Mitchell  <mark@codesourcery.com>
582         PR c++/16002
583         * parser.c (cp_parser_simple_declaration): Commit to tentative
584         parses after seeing a decl-specifier.
585         (cp_parser_simple_declaration): Eliminate spurious message.
586         (cp_parser_init_declarator): Adjust error message.
588         PR c++/16029
589         * lex.c (unqualified_name_lookup_error): Mark the dummy
590         declaration as used.
592         PR c++/17501
593         * parser.c (cp_parser_nested_name_specifier): Do not resolve
594         typename types if the user explicitly said "typename".
596 2004-09-16  Andrew MacLeod  <amacleod@redhat.com>
598         * error.c (dump_decl): Make sure there is lang_specific info before
599         checking for DTOR and CTOR decls.
601 2004-09-16  Nathan Sidwell  <nathan@codesourcery.com>
603         * class.c (copy_virtuals): Remove.
604         (build_primary_vtable): Use copy_list directly.
605         (build_secondary_vtable): Likewise.
606         (update_vtable_entry_for_fn): Clear BV_CALL_INDEX here.
607         (create_vtable_ptr): Likewise.
609 2004-09-16  Kazu Hirata  <kazu@cs.umass.edu>
611         * search.c: Follow spelling conventions.
613 2004-09-16  Nathan Sidwell  <nathan@codesourcery.com>
615         * cp-tree.h (struct lang_type_class): Make pure_virtuals a
616         VEC(tree).
617         (CLASSTYPE_INLINE_FRIENDS, CLASSTYPE_PURE_VIRTUALS): Update
618         comments.
619         * call.c (build_new_method_call): Don't confirm a pure virtual is
620         in CLASSTYPE_PURE_VIRTUALS.  Reorder checks. Make it a warning.
621         * class.c (check_methods): CLASSTYPE_INLINE_FRIENDS is a VEC(tree).
622         (fixup_inline_methods, finish_struct): Likewise.
623         * decl.c (finish_method): Likewise.
624         * search.c (dfs_get_pure_virtuals, get_pure_virtuals):
625         CLASSTYPE_PURE_VIRTUALS is a VEC(tree).
626         * typeck2.c (abstract_virtuals_error): Likewise. Truncate the
627         vector to avoid repeating the list in error messages.
629 2004-09-15  Mark Mitchell  <mark@codesourcery.com>
631         * cp-objcp-common.h (LANG_HOOKS_COMDAT_GROUP): Define.
632         * cp-tree.h (cxx_comdat_group): Declare.
633         * decl.c (cxx_comdat_group): New function.
635 2004-09-15  Nathan Sidwell  <nathan@codesourcery.com>
637         * search.c (get_pure_virtuals): Remove unused variables.
639         * cp-tree.h (struct lang_decl_flags): Remove
640         needs_final_overrider.
641         (DECL_NEEDS_FINAL_OVERRIDER_P): Remove.
642         * decl.c (duplicate_decls): Do not copy DECL_NEEDS_FINAL_OVERRIDER_P.
643         * class.c (finish_struct_bits): Correct comment about
644         CLASSTYPE_PURE_VIRTUALS.
645         * search.c (get_pure_virtuals): Remove useless loop.
647 2004-09-14  Mark Mitchell  <mark@codesourcery.com>
649         PR c++/17324
650         * mangle.c (partially_mangled_name): New variable.
651         (partially_mangled_name_len): Likewise.
652         (save_partially_mangled_name): New function.
653         (restore_partially_mangled_name): Likewise.
654         (write_encoding): Save and restore partially mangled names around
655         calls to get_mostly_instantiated_function_type.
656         (write_unqualified_name): Likewise.
658 2004-09-14  Nathan Sidwell  <nathan@codesourcery.com>
660         * pt.c (unify): Replace gcc_unreachable with gcc_assert.
662 2004-09-13  Mark Mitchell  <mark@codesourcery.com>
664         PR c++/16162
665         * parser.c (cp_parser_id_expression): Correct value for
666         is_declarator.
667         (cp_parser_nested_name_specifier_opt): Look through typenames as
668         necessary.
669         (cp_parser_template_name): Honor check_dependency_p.
671         PR c++/16716
672         * parser.c (cp_parser_parse_and_diagnose_invalid_type_name):
673         Robustify.
675         PR c++/17327
676         * pt.c (unify): Add ENUMERAL_TYPE case.  Replace sorry with
677         gcc_unreacable.
679 2004-09-12  Richard Henderson  <rth@redhat.com>
681         PR c++/16254
682         * semantics.c (maybe_cleanup_point_expr): Don't call fold.
683         * typeck.c (condition_conversion): Likewise.
685 2004-09-11  Richard Henderson  <rth@redhat.com>
687         PR c++/17404
688         * pt.c (cur_stmt_expr): Move from tsubst_expr.
689         (tsubst_expr) <case STMT_EXPR>: Move ...
690         (tsubst_copy_and_build): ... here.
692 2004-09-10  Zack Weinberg  <zack@codesourcery.com>
694         * cp-tree.h (interface_only, interface_unknown): Delete declarations;
695         comment explaining them moved to c-common.h.
696         * lex.c (interface_only, interface_unknown, extract_interface_info):
697         Delete definitions.
698         (cxx_finish): Don't reset interface_unknown.
699         (handle_pragma_interface): Don't set interface_only and
700         interface_unknown; just the like-named fields in finfo.
701         (handle_pragma_implementation): Adjust comment.
702         * decl2.c (cp_finish_file): Don't reset interface_only and
703         interface_unknown.
704         * method.c (synthesize_method): Don't reset interface_unknown or
705         call extract_interface_info.
706         * pt.c (pop_tinst_level): Don't call extract_interface_info.
707         * decl.c (start_cleanup_fn): Don't save or restore interface_only
708         and interface_unknown.
709         (make_rtl_for_nonlocal_decl): Call get_fileinfo on input_filename
710         and use the result instead of the interface_only/interface_unknown
711         globals.
712         (start_preparsed_function): Likewise.
713         * lex.c (cxx_make_type): Likewise.
714         * semantics.c (begin_class_definition): Likewise.
715         (expand_body): Don't call extract_interface_info.
717 2004-09-10  Ziemowit Laski  <zlaski@apple.com>
719         * decl.c (objc_mark_locals_volatile): Make description of
720         routine more descriptive; only mark VAR_DECLs at each
721         binding level.
723 2004-09-10  Richard Henderson  <rth@redhat.com>
725         PR c++/17386
726         * call.c (build_vfield_ref): Move...
727         * class.c (build_vfield_ref): ... here.  Convert datum to the
728         primary base containing the vptr.
729         (make_new_vtable): Simplify build_primary_vtable arguments.
730         (finish_struct_1): Do not duplicate TYPE_VFIELD.
731         * typeck.c (build_class_member_access_expr): Don't warn for
732         null object access to base fields.
734 2004-09-10  Ziemowit Laski  <zlaski@apple.com>
736         * decl.c (objc_get_current_scope, objc_mark_locals_volatile):
737         New functions, to be called from ObjC++.
739 2004-09-10  Kazu Hirata  <kazu@cs.umass.edu>
741         * class.c, cp-tree.h, decl.c, decl2.c, mangle.c,
742         name-lookup.h, parser.c, search.c, semantics.c, typeck2.c: Fix
743         comment typos.
745 2004-09-09  Ziemowit Laski  <zlaski@apple.com>
747         * typeck.c (build_c_cast): Preserve the cast if casting
748         to and from an Objective-C type.
750 2004-09-09  Ziemowit Laski  <zlaski@apple.com>
752         * Make-lang.in (cp/typeck.o): Depend on c-common.h.
753         * typeck.c: Include c-common.h.
754         (comptypes): For RECORD_TYPEs, call objc_comptypes() and
755         return the result if nonnegative.
757 2004-09-09  Zack Weinberg  <zack@codesourcery.com>
759         * decl2.c (import_export_class)
760         * lex.c (handle_pragma_interface):
761         Test MULTIPLE_SYMBOL_SPACES with if, not #ifdef.
763 2004-09-08  Ziemowit Laski  <zlaski@apple.com>
765         * Make-lang.in (cp/semantics.o): Depend on c-common.h.
766         * semantics.c: Include c-common.h.
767         (finish_compound_stmt): Call objc_clear_super_receiver().
769 2004-09-08  Ziemowit Laski  <zlaski@apple.com>
771         * cp-tree.h (do_poplevel): New prototype.
772         * semantics.c (do_poplevel): Make externally visible.
774 2004-09-08  Nathan Sidwell  <nathan@codesourcery.com>
776         * cp-tree.h (tree_pair_s): Define a GC'd vector.
777         * name-lookup.h (cxx_saved_binding, cp_class_binding): Likewise.
778         * semantics.c (deferred_access): Likewise.
780 2004-09-06  Daniel Jacobowitz  <dan@debian.org>
782         * semantics.c (expand_body): Assert that we are not nested.
784 2004-09-06  Zack Weinberg  <zack@codesourcery.com>
786         * decl.c (build_enumerator): Use add_double and int_fits_type_p
787         instead of cp_build_binary_op, to avoid creating short-lived trees.
788         * parser.c (cp_parse_type_specifier <RID_ENUM>): Use two-token
789         lookahead instead of backtracking.  Move some code to avoid a
790         conditional branch.
791         (cp_parser_enum_specifier): Avoid duplication of effort with caller.
792         Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
793         (cp_parser_enumerator_list, cp_parser_enumerator_definition):
794         Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
796 2004-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
798         * decl.c (grok_declarator): Remove a redundant semicolon.
800         * parser.c (cp_parser_decl_specifier_seq, cp_parser_type_specifier):
801         Correct comments describing function parameters.
803 2004-09-03  Matt Austern  <austern@apple.com>
804         Compile speed improvement.
805         * parser.c (cp_lexer_print_token): Only define if ENABLE_CHECKING set.
806         Otherwise define a stub macro that expands to nothing.
807         (cp_lexer_debugging_p): Only define if ENABLE_CHECKING set.  Otherwise
808         define a stub macro that expands to 0.
809         (cp_lexer_start_debugging): Only define if ENABLE_CHECKING set.
810         (cp_lexer_stop_debugging): Likewise.
811         (cp_lexer_debug_stream): Only define if ENABLE_CHECKING set.  Otherwise
812         define a stub macro that expands to NULL.
813         (cp_lexer_new_main): Only set debugging_p if ENABLE_CHECKING set.
814         (cp_lexer_new_from_tokens): Likewise.
816 2004-09-03  Jan Hubicka  <jh@suse.cz>
818         * decl.c (finish_function): Clean out pointers we no longer need.
820 2004-09-03  Jan Beulich  <jbeulich@novell.com>
822         * g++spec.c (MATH_LIBRARY_PROFILE): Default to MATH_LIBRARY rather
823         than "-lm".
825 2004-09-02  Paul Brook  <paul@codesourcery.com>
827         * decl2.c (determine_visibility): Only check data visibility
828         for VAR_DECLS.
830 2004-08-31  Mark Mitchell  <mark@codesourcery.com>
832         * cp-tree.h (DECL_CONSTRUCTION_VTABLE_P): New macro.
833         * class.c (build_ctor_vtbl_group): Set DECL_CONSTRUCTION_VTABLE_P.
834         * decl2.c (determine_visibility): Honor
835         TARGET_CXX_EXPORT_CLASS_DATA.
837         * class.c (key_method): Rename to ...
838         (determine_key_method): ... this.
839         (finish_struct_1): Adjust accordingly.
840         * cp-tree.h (key_method): Declare.
841         * decl2.c (maybe_emit_vtables): Determine the key method here if
842         it has not already been done.
844 2004-08-31  Ziemowit Laski  <zlaski@apple.com>
846         * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-objcp-common.o.
847         (cp/cp-lang.o): Depend on debug.h, gtype-cp.h and cp/cp-objcp-common.h.
848         (cp/cp-decl.c): Do not depend on gtype-cp.h.
849         (cp/cp-objcp-common.o): New target.
850         * cp-lang.c: Include debug.h, cp-objcp-common.h and gtype-cp.h.
851         (cxx_get_alias_set, cxx_warn_unused_global_decl, cp_expr_size,
852         cp_tree_size, cp_var_mod_type_p, cxx_initialize_diagnostics): Move
853         prototypes and definitions to cp-objcp-common.h and cp-objcp-common.c,
854         respectively.
855         (LANG_HOOKS_TREE_SIZE, LANG_HOOKS_FINISH,
856         LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_INIT_OPTIONS,
857         LANG_HOOKS_INITIALIZE_DIAGNOSTICS, LANG_HOOKS_HANDLE_OPTION,
858         LANG_HOOKS_HANDLE_FILENAME, LANG_HOOKS_MISSING_ARGUMENT,
859         LANG_HOOKS_POST_OPTIONS, LANG_HOOKS_GET_ALIAS_SET,
860         LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_EXPAND_EXPR,
861         LANG_HOOKS_EXPAND_DECL, LANG_HOOKS_PARSE_FILE,
862         LANG_HOOKS_DUP_LANG_SPECIFIC_DECL, LANG_HOOKS_TRUTHVALUE_CONVERSION,
863         LANG_HOOKS_SET_DECL_ASSEMBLER_NAME, LANG_HOOKS_MARK_ADDRESSABLE,
864         LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
865         LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
866         LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_PRINT_ERROR_FUNCTION,
867         LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL, LANG_HOOKS_WRITE_GLOBALS,
868         LANG_HOOKS_FUNCTION_INIT, LANG_HOOKS_FUNCTION_FINAL,
869         LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P,
870         LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE,
871         LANG_HOOKS_ATTRIBUTE_TABLE, LANG_HOOKS_TREE_INLINING_WALK_SUBTREES,
872         LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN,
873         LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS,
874         LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P,
875         LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P,
876         LANG_HOOKS_TREE_INLINING_VAR_MOD_TYPE_P,
877         LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN,
878         LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN, LANG_HOOKS_EXPR_SIZE,
879         LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR,
880         LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, LANG_HOOKS_MAKE_TYPE,
881         LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE,
882         LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
883         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE, LANG_HOOKS_INCOMPLETE_TYPE_ERROR,
884         LANG_HOOKS_TYPE_PROMOTES_TO, LANG_HOOKS_REGISTER_BUILTIN_TYPE,
885         LANG_HOOKS_GIMPLIFY_EXPR, LANG_HOOKS_FOLD_OBJ_TYPE_REF): Move
886         hooks to cp-objcp-common.h.
887         (finish_file): New function.
888         * cp-objcp-common.c: New file.
889         * cp-objcp-common.h: New file.
890         * cp-tree.h (cp_finish_file): New prototype.
891         * decl.c: Do not include gtype-cp.h.
892         * decl2.c (finish_file): Rename to cp_finish_file.
894 2004-08-31  Richard Henderson  <rth@redhat.com>
896         PR c++/17221
897         * pt.c (tsubst_expr): Move OFFSETOF_EXPR handling ...
898         (tsubst_copy_and_build): ... here.
900 2004-08-30  Mark Mitchell  <mark@codesourcery.com>
902         * cp-tree.h (initialize_artificial_var): Declare.
903         * decl.c (initialize_artifical_var): New function.
904         * class.c (initialize_array): Remove.
905         (initialize_vtable): Use initialize_artificial_var.
906         (build_vtt): Likewise.
907         (build_ctor_vtbl_group): Likewise.
909 2004-08-30  Richard Henderson  <rth@redhat.com>
911         * class.c (build_base_path): Use build_address directly.
912         * typeck.c (build_unary_op): Don't lower &a.b to pointer
913         arithmetic directly.
914         * typeck2.c (store_init_value): Don't assume !TREE_CONSTANT
915         means !initializer_constant_valid_p.
917 2004-08-30  Richard Henderson  <rth@redhat.com>
919         * class.c (fixed_type_or_null): Use get_base_address before
920         assuming an ADDR_EXPR is non-null.
922 2004-08-30  Nathan Sidwell  <nathan@codesourcery.com>
924         * name-lookup.c (pop_binding, pushdecl,
925         set_identifier_type_value_with_scope, push_overloaded_decl,
926         arg_assoc_type): Replace abort with gcc_assert or gcc_unreachable.
927         * parser.c (cp_parser_diagnose_invalid_type_name,
928         cp_parser_postfix_expression, cp_parser_unary_expression,
929         cp_parser_check_declarator_template_para): Likewise.
930         * pt.c (push_inline_template_parms_recursive,
931         check_explicit_specialization, convert_nontype_argument,
932         coerce_template_template_parms, uses_template_parms,
933         instantiate_class_template, tsubst_decl, tsubst, tsubst_copy,
934         tsubst_expr, instantiate_template,
935         maybe_adjust_types_for_deduction, type_unification_real,
936         resolve_overloaded_unification, template_decl_level,
937         type_dependent_expression_p): Likewise.
938         * search.c (lookup_base_r): Likewise.
939         * semantics.c (finish_stmt_expr, simplify_aggr_init_expr): Likewise.
940         * tree.c (lvalue_p_1, count_functions, cxx_printable_name,
941         verify_stmt_tree_r, get_type_decl, stabilize_call): Likewise.
942         * typeck.c (common_type, get_member_function_from_ptrfunc,
943         build_binary_op, build_unary_op, expand_ptrmemfunc_cst): Likewise.
944         * typeck2.c (cxx_incomplete_type_diagnostic,
945         split_nonconstant_init_1, store_init_value,
946         process_init_constructor): Likewise.
948 2004-08-30  Nathan Sidwell  <nathan@codesourcery.com>
950         * call.c (check_dtor_name): Replace abort with gcc_assert or
951         gcc_unreachable.
952         (build_call, add_builtin_candidate, build_new_op,
953         convert_like_real, build_over_call, in_charge_arg_for_name,
954         source_type, joust): Likewise.
955         * class.c (build_simple_base_path, get_vcall_index,
956         finish_struct_1, instantiate_type, get_enclosing_class,
957         add_vcall_offset_vtbl_entries_1, cp_fold_obj_type_ref): Likewise.
958         * cp-gimplify.c (cp_genericize): Likewise.
959         * cp-lang.c (cp_expr_size, cp_tree_size): Likewise.
960         * cvt.c (cp_convert_to_pointer, ocp_convert): Likewise.
961         * decl.c (poplevel, make_unbound_class_template, reshape_init,
962         check_special_function_return_type, grokdeclarator,
963         grok_op_properties, tag_name, xref_tag, start_preparsed_function,
964         finish_function): Likewise.
965         * decl2.c (grokfield, maybe_emit_vtables):Likewise.
966         * error.c (dump_global_iord, dump_decl, dump_template_decl,
967         language_to_string): Likewise.
968         * except.c (choose_personality_routine): Likewise.
969         * friend.c (do_friend): Likewise.
970         * g++spec.c (lang_specific_driver): Likewise.
971         * init.c (build_zero_init, expand_default_init, build_new_1,
972         build_vec_delete_1, build_vec_init, build_dtor_call): Likewise.
973         * lex.c (retrofit_lang_decl, cp_type_qual_from_rid): Likewise.
974         * mangle.c (add_substitution, write_unscoped_name,
975         write_template_prefix, write_identifier,
976         write_special_name_destructor, write_type, write_builtin_type,
977         write_expression, write_template_param,
978         write_java_integer_type_codes): Likewise.
979         * method.c (implicitly_declare_fn): Likewise.
981 2004-08-30  Nathan Sidwell  <nathan@codesourcery.com>
983         * cp-tree.h (BINFO_PRIMARY_P): Use a binfo flag.
984         (BINFO_INDIRECT_PRIMARY_P): Remove.
985         * class.c (determine_primary_base): Rename to ...
986         (determine_primary_bases): ... here.  Set all primary bases.
987         (set_primary_base): Remove.
988         (mark_primary_bases): Remove.
989         (build_simple_base_path, walk_subobject_offsets,
990         propagate_binfo_offsets, end_of_class): Adjust.
991         (layout_class_type): Rename determine_primary_base call.
992         (dump_class_hierarchy_r, dump_vtable): Adjust. Don't pass a binfo
993         to type_as_string.
994         (dfs_build_secondary_vptr_vtt_inits, dfs_accumulate_vtbl_inits,
995         build_rtti_vtbl_entries): Adjust.
996         * init.c (build_vtbl_address): Adjust.
998         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Use gcc_assert.
1000 2004-08-28  Ziemowit Laski  <zlaski@apple.com>
1002         * Make-lang.in (CXX_OBJS): Split up into CXX_OBJS and
1003         CXX_AND_OBJCXX_OBJS.
1004         (CXX_C_OBJS): Include in CXX_AND_OBJCXX_OBJS instead of listing
1005         separately on the link line.
1007 2004-08-28  Jason Merrill  <jason@redhat.com>
1009         * decl.c (expand_static_init): Avoid bogus warnings.
1011 2004-08-27  Jason Merrill  <jason@redhat.com>
1013         PR c++/16851
1014         * tree.c (stabilize_init): See through a COMPOUND_EXPR.
1016         PR c++/13684
1017         * decl.c (expand_static_init): Use thread-safety API.
1018         (register_dtor_fn): Return the call, don't expand it.
1019         * tree.c (add_stmt_to_compound): New fn.
1020         (stabilize_call): Use it.
1022 2004-08-27  Richard Henderson  <rth@redhat.com>
1024         * cp-tree.def (OFFSETOF_EXPR): New.
1025         * parser.c (cp_parser_builtin_offsetof): Either built an
1026         OFFSETOF_EXPR, or call fold_offsetof immediately.
1027         * pt.c (tsubst_expr): Handle OFFSETOF_EXPR.
1029 2004-08-27  Nathan Sidwell  <nathan@codesourcery.com>
1031         * call.c (validate_conversion_obstack): Replace
1032         my_friendly_assert with gcc_assert or gcc_unreachable.
1033         (direct_reference_binding, merge_conversion_sequences,
1034         build_user_type_conversion_1, perform_overload_resolution,
1035         build_op_delete_call, enforce_access, call_builtin_trap,
1036         build_over_call, build_special_member_call, build_new_method_call,
1037         initialize_reference): Likewise.
1038         * class.c (build_base_path, build_primary_vtable, alter_access,
1039         check_bases, update_vtable_entry_for_fn, layout_empty_base,
1040         clone_function_decl, adjust_clone_args,
1041         type_requires_array_cookie, include_empty_classes,
1042         finish_struct_1, resolve_address_of_overloaded_function,
1043         instantiate_type, get_vtbl_decl_for_binfo, build_vtt_inits,
1044         dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
1045         accumulate_vtbl_inits, build_vtbl_initializer,
1046         build_vbase_offset_vtbl_entries, build_rtti_vtbl_entries): Likewise.
1047         * cvt.c (build_up_reference, convert_to_reference): Likewise.
1048         * decl.c (poplevel, duplicate_decls, make_typename_type,
1049         cxx_init_decl_processing, reshape_init, check_initializer,
1050         make_rtl_for_nonlocal_decl, initialize_local_var, cp_finish_decl,
1051         expand_static_init, grokfndecl, grokvardecl, build_ptrmem_type,
1052         grokdeclarator, copy_fn_p, grok_op_properties, xref_tag,
1053         xref_basetypes, start_preparsed_function, save_function_data,
1054         finish_function, finish_method, maybe_register_incomplete_var,
1055         complete_vars): Likewise.
1056         * decl2.c (grok_array_decl, check_member_template,
1057         check_classfn, finish_static_data_member_decl, coerce_new_type,
1058         coerce_delete_type, import_export_class, decl_needed_p,
1059         determine_visibility, import_export_decl, build_cleanup,
1060         start_static_initialization_or_destructi, do_static_destruction,
1061         prune_vars_needing_no_initialization,
1062         build_offset_ref_call_from_tree): Likewise.
1063         * error.c (dump_decl, dump_expr): Likewise.
1064         * init.c (finish_init_stmts, build_zero_init,
1065         expand_virtual_init, expand_default_init, expand_aggr_init_1,
1066         build_offset_ref, build_new_1, build_delete, build_vbase_delete):
1067         Likewise.
1068         * mangle.c (write_method_parms, write_template_args,
1069         write_expression, write_template_arg): Likewise.
1070         * method.c (make_thunk, finish_thunk, use_thunk): Likewise.
1071         * name-lookup.c (pop_binding, begin_scope, leave_scope,
1072         resume_scope, push_using_decl, validate_nonmember_using_decl,
1073         is_ancestor, poplevel_class, set_inherited_value_binding_p,
1074         push_class_level_binding, do_class_using_decl, push_namespace,
1075         pop_namespace, add_using_namespace, ambiguous_decl,
1076         lookup_namespace_name, lookup_type_current_level,
1077         maybe_process_template_type_declaration): Likewise.
1078         * parser.c (cp_lexer_peek_nth_token,
1079         cp_parser_parse_and_diagnose_invalid_typ,
1080         cp_parser_translation_unit, cp_parser_template_id,
1081         cp_parser_lookup_name, cp_parser_late_parsing_for_member): Likewise.
1082         * pt.c (push_access_scope, finish_member_template_decl,
1083         push_inline_template_parms_recursive, add_outermost_template_args,
1084         get_innermost_template_args, begin_explicit_instantiation,
1085         end_explicit_instantiation, retrieve_specialization,
1086         is_specialization_of, is_specialization_of_friend,
1087         register_specialization, check_explicit_specialization,
1088         comp_template_parms, process_template_parm,
1089         process_partial_specialization, convert_nontype_argument,
1090         coerce_template_template_parms, coerce_template_parms,
1091         mangle_class_name_for_template, lookup_template_function,
1092         lookup_template_class, instantiate_class_template, tsubst_decl,
1093         tsubst_function_type, tsubst, tsubst_qualified_id, tsubst_copy,
1094         instantiate_template, fn_type_unification, type_unification_real,
1095         get_template_base, regenerate_decl_from_template,
1096         template_for_substitution, instantiate_decl,
1097         get_mostly_instantiated_function_type, dependent_scope_ref_p,
1098         value_dependent_expression_p, resolve_typename_type): Likewise.
1099         * repo.c (repo_emit_p): Likewise.
1100         * rtti.c (build_headof, get_tinfo_decl, get_pseudo_ti_init,
1101         create_tinfo_types, emit_tinfo_decl): Likewise.
1102         * search.c (lookup_base_r, lookup_base, lookup_field_1,
1103         dfs_access_in_type, build_baselink, lookup_member,
1104         adjust_result_of_qualified_name_lookup, copied_binfo): Likewise.
1105         * semantics.c (perform_or_defer_access_check,
1106         finish_non_static_data_member, finish_stmt_expr_expr,
1107         finish_stmt_expr, finish_call_expr, finish_pseudo_destructor_expr,
1108         finish_template_template_parm, finish_member_declaration,
1109         emit_associated_thunks): Likewise.
1110         * tree.c (build_target_expr_with_type, force_target_expr,
1111         copy_binfo, get_first_fn, cp_tree_equal): Likewise.
1112         * typeck.c (type_after_usual_arithmetic_conversions, comptypes,
1113         cxx_sizeof_or_alignof_type, perform_integral_promotions,
1114         build_class_member_access_expr, finish_class_member_access_expr,
1115         build_ptrmemfunc_access_expr, build_unary_op,
1116         unary_complex_lvalue, cxx_mark_addressable, build_modify_expr,
1117         build_ptrmemfunc, expand_ptrmemfunc_cst, check_return_expr
1118         * typeck2.c (complete_type_check_abstract,
1119         abstract_virtuals_error, process_init_constructor,
1120         add_exception_specifier): Likewise.
1122 2004-08-27  Nathan Sidwell  <nathan@codesourcery.com>
1124         * class.c (build_vtbl_initializer): Use ssize_int.
1125         * decl.c (complete_array_type): Likewise.
1126         * method.c (finish_thunk): Likewise.
1127         * search.c (get_dynamic_base_type): Likewise.
1129 2004-08-26  Richard Henderson  <rth@redhat.com>
1131         * cp-tree.h (DECL_FIELD_IS_BASE): New.
1132         * class.c (build_base_field): Set it.
1133         (build_simple_base_path): Use it.
1134         (fixed_type_or_null): Don't consider base fields definitive.
1136 2004-08-25  Roger Sayle  <roger@eyesopen.com>
1138         PR middle-end/16693
1139         PR tree-optimization/16372
1140         * decl.c (finish_enum): Make the precision of the enumerated type
1141         the same width as the underlying integer type.
1143 2004-08-25  Mark Mitchell  <mark@codesourcery.com>
1145         PR c++/17155
1146         * lex.c (build_lang_decl): Set DECL_NO_STATIC_CHAIN for all C++
1147         functions.
1149         * mangle.c (get_identifier_nocopy): Add cast.
1151         * cp-tree.h (mangle_type): Remove.
1152         * mangle.c (globals): GTY it.
1153         (mangle_obstack): New variable.
1154         (name_obstack): Likewise.
1155         (name_base): Likewise.
1156         (write_char): Adjust accordingly.
1157         (write_chars): Likewise.
1158         (write_string): Likewise.
1159         (start_mangling): Initialize G.substitutions only one.  Add
1160         ident_p parameter.
1161         (finish_mangling): Use VARRAY_CLEAR to reclaim
1162         storage in G.substitutions.  Use obstack_finish.
1163         (init_mangle): Adjust for changes to variable names above.
1164         Initialize G.substitutions.
1165         (mangle_decl_string): Adjust call to start_mangling.
1166         (get_identifier_nocopy): New function.
1167         (mangle_decl): Use it.
1168         (mangle_type_string): Adjust call to start_mangling.
1169         (mangle_special_for_type): Likewise.
1170         (mangle_vtt_for_type): Likewise.
1171         (mangle_ctor_vtbl_for_type): Likewise.
1172         (mangle_thunk): Likewise.
1173         (mangle_guard_variable): Likewise.
1174         (mangle_ref_init_variable): Likewise.
1176 2004-08-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1178         PR c++/14428
1179         * pt.c (redeclare_class_template): Check the type of non-type and
1180         template template parameter.
1182 2004-08-25  Nathan Sidwell  <nathan@codesourcery.com>
1184         * call.c (convert_class_to_reference): Adjust build_int_cst calls.
1185         (build_user_type_conversion_1, convert_like_real,
1186         build_java_interface_fn_ref, build_special_member_call): Likewise.
1187         * class.c (finish_struct_1, build_vtbl_initializer): Likewise.
1188         * cp-gimplify.c (cp_gimplify_expr): Likewise.
1189         * cvt.c (cp_convert_to_pointer): Likewise.
1190         * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
1191         * decl2.c (start_static_initialization_or_destruction,
1192         generate_ctor_or_dtor_function): Likewise.
1193         * except.c (build_throw): Likewise.
1194         * mangle.c (write_integer_cst): Likewise.
1195         * method.c (finish_thunk): Likewise.
1196         * rtti.c (build_headof, get_tinfo_decl_dynamic,
1197         build_dynamic_cast_1, ptr_initializer, ptm_initializer,
1198         get_pseudo_ti_init): Likewise.
1199         * search.c (get_dynamic_cast_base_type): Likewise.
1201 2004-08-25  Zack Weinberg  <zack@codesourcery.com>
1203         * class.c, search.c: Remove references to DWARF_DEBUG.
1205 2004-08-25  Adam Nemet  <anemet@lnxw.com>
1207         * repo.c (extract_string): Reset backquote after one character.
1208         (get_base_filename): Fix indentation.
1210 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>
1212         * decl.c (cxx_init_decl_processing): Adjust
1213         build_common_tree_nodes call.
1215 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>
1217         PR c++/16889
1218         * (is_subobject_of_p): Resurrect & optimize.
1219         (lookup_field_r): Use it.
1221 2004-08-24  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1223         PR c++/16706
1224         * search.c (friend_accessible_p): Increment processing_template_decl
1225         when deal with TEMPLATE_DECL of SCOPE.
1227 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>
1229         PR c++/17149
1230         * semantics.c (check_accessibility_of_qualified_id): Defer check
1231         if qualifying_type is a template parameter.
1233 2004-08-23  Mark Mitchell  <mark@codesourcery.com>
1235         PR c++/17163
1236         * pt.c (instantiate_decl): Do not try to apply
1237         DECL_DECLARED_INLINED_P to a VAR_DECL.
1239         * search.c (build_baselink): Fix typo in comment.
1241 2004-08-22 Andrew Pinski  <apinski@apple.com>
1243         Revert:
1244         2004-08-22  Andrew Pinski  <apinski@apple.com>
1245         PR c++/14029
1246         * typeck.c (build_unary_op): Use &a.b if the folded lowered
1247         expression is not constant.
1249 2004-08-23  Nathan Sidwell  <nathan@codesourcery.com>
1251         * name-lookup.c (pushdecl): Rename build_type_copy call.
1252         * tree.c (cp_build_qualified_type_real,
1253         build_exception_variant, handle_java_interface_attribute): Likewise.
1255 2004-08-22  Andrew Pinski  <apinski@apple.com>
1257         PR c++/14029
1258         * typeck.c (build_unary_op): Use &a.b if the folded lowered
1259         expression is not constant.
1261 2004-08-20  Mark Mitchell  <mark@codesourcery.com>
1263         PR c++/17121
1264         * decl.c (expand_static_init): Use DECL_FUNCTION_SCOPE_P.
1266 2004-08-21  Joseph S. Myers  <jsm@polyomino.org.uk>
1268         PR c++/17120
1269         * pt.c (tsubst_copy_and_build): Avoid clearing TREE_NO_WARNING for
1270         MODOP_EXPR.
1272 2004-08-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1274         * pt.c (register_specialization): Check DECL_TEMPLATE_SPECIALIZATION
1275         before calling comp_template_args.
1277 2004-08-20  Nathan Sidwell  <nathan@codesourcery.com>
1279         * class.c (build_vtbl_initializer): Use build_int_cst for
1280         negative size types.
1281         * decl.c (complete_array_type): Likewise.
1282         * method.c (finish_thunk): Likewise.
1284 2004-08-20  Andreas Tobler  <a.tobler@schweiz.ch>
1286         * tree.c: Remove unused mark_local_for_remap_r.
1288 2004-08-19  Eric Christopher  <echristo@redhat.com>
1290         * cp-tree.h (cxx_unsave_expr_now): Delete prototype.
1291         * tree.c (cxx_unsave_expr_now): Delete.
1292         (cp_unsave_r): Ditto.
1294 2004-08-19  Mark Mitchell  <mark@codesourcery.com>
1296         PR c++/15890
1297         * pt.c (push_template_decl_real): Disallow template allocation
1298         functions with fewer than two parameters.
1300 2004-08-19  Nathan Sidwell  <nathan@codesourcery.com>
1302         * cp-tree.h (build_shared_int_cst): Remove.
1303         * tree.c (shared_int_cache): Remove.
1304         (build_shared_int_cst): Remove.
1305         * class.c (finish_struct_1): Use build_int_cst.
1307 2004-08-19  Nathan Sidwell  <nathan@codesourcery.com>
1309         * decl.c (finish_enum): Do not copy value node early, copy
1310         later.
1311         * lex.c (cxx_init): Force null_node to be unique.
1313 2004-08-19  Joseph S. Myers  <jsm@polyomino.org.uk>
1315         PR c++/17041
1316         * pt.c (tsubst_copy, tsubst_copy_and_build): Copy TREE_NO_WARNING
1317         from input for MODOP_EXPR.
1319 2004-08-18  Mark Mitchell  <mark@codesourcery.com>
1321         * pt.c (dependent_template_p): Fix typo in commment.
1323         PR c++/17068
1324         * pt.c (dependent_template_p): Treat IDENTIFIER_NODEs as
1325         dependent.
1327 2004-08-17  Mark Mitchell  <mark@codesourcery.com>
1329         PR c++/16246
1330         * pt.c (unify): Tidy ARRAY_TYPE handling.  Make sure that non-type
1331         arguments have the same type as the corresponding parameter.
1333         PR c++/16215
1334         * parser.c (cp_parser_name_lookup_error): If parser->object_scope
1335         is set use it for diagnostic purposes.
1336         (cp_parser_pseudo_destructor_name): Remove special-case error
1337         message.
1339         PR c++/15871
1340         * semantics.c (expand_or_defer_fn): Honor -fkeep-inline-functions.
1342         PR c++/16965
1343         * cp-tree.h (qualified_name_lookup_error): Add parameter.
1344         * name-lookup.c (do_class_using_decl): Restrict set of entities
1345         passed to cp_emit_debug_info_for_using more carefully.
1346         (lookup_qualified_name): Allow lookup_member to return sets of
1347         ambiguous entries.
1348         * parser.c (cp_parser_lookup_name): Add ambiguous_p parameter.
1349         (cp_parser_primary_expression): Handle ambiguous lookups.
1350         (cp_parser_template_name): Adjust use of cp_parser_lookup_name.
1351         (cp_parser_template_argument): Likewise.
1352         (cp_parser_elaborate_type_specifier): Likewise.
1353         (cp_parser_namespace_name): Likewise.
1354         (cp_parser_class_name): Likewise.
1355         (cp_parser_lookup_name_simple): Likewise.
1356         * pt.c (tsubst_qualified_id): Handle ambiguous results.
1357         (tsubst_expr): Likewise.
1358         * semantics.c (qualified_name_lookup_error): Add decl paramter.
1359         For ambiguous lookups, print candidates.
1361 2004-08-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1363         PR c++/6749
1364         * pt.c (instantiate_pending_templates): Add int parameter.  Don't
1365         return anything.
1366         * cp-tree.h (instantiate_pending_templates): Adjust prototype.
1367         * decl2.c (finish_file): Adjust call to
1368         instantiate_pending_templates.
1370 2004-08-15  Roger Sayle  <roger@eyesopen.com>
1372         * call.c (build_vfield_ref, build_call, build_conditional_expr,
1373         convert_arg_to_ellipsis, build_x_va_arg, build_over_call,
1374         build_java_interface_fn_ref, build_special_member_call,
1375         build_new_method_call, initialize_reference): Replace calls to
1376         build with calls to buildN.
1377         * class.c (build_base_path, convert_to_base_statically,
1378         build_vfn_ref, instantiate_type, dfs_accumulate_vtbl_inits,
1379         build_vtbl_initializer): Likewise.
1380         * cp-gimplify.c (genericize_try_block, genericize_catch_block,
1381         gimplify_if_stmt, cp_genericize_r): Likewise.
1382         * cvt.c (convert_to_void): Likewise.
1383         * decl.c (check_initializer, finish_constructor_body,
1384         finish_destructor_body): Likewise.
1385         * error.c (dump_expr): Likewise.
1386         * except.c (build_exc_ptr, expand_start_catch_block, build_throw):
1387         Likewise.
1388         * init.c (perform_member_init, expand_virtual_init,
1389         expand_cleanup_for_base, build_init, expand_default_init,
1390         build_offset_ref, decl_constant_value, build_new, build_new_1,
1391         build_vec_delete_1, build_vec_init, build_delete,
1392         push_base_cleanups, build_vec_delete): Likewise.
1393         * mangle.c (write_integer_cst): Likewise.
1394         * method.c (thunk_adjust, do_build_copy_constructor,
1395         do_build_assign_ref): Likewise.
1396         * pt.c (lookup_template_function, tsubst, tsubst_copy_and_build,
1397         unify, build_non_dependent_expr): Likewise.
1398         * rtti.c (build_headof, build_typeid, ifnonnull,
1399         build_dyanmic_cast_1, tinfo_base_init): Likewise.
1400         * semantics.c (begin_compound_stmt, finish_call_expr,
1401         finish_pseudo_destructor_expr, finish_id_expression,
1402         simplify_aggr_init_expr, finalize_nrv_r): Likewise.
1403         * tree.c (build_target_expr, build_cplus_new, array_type_nelts_top,
1404         array_type_nelts_total, stabilize_call): Likewise.
1405         * typeck.c (decay_conversion, build_class_member_access_expr,
1406         lookup_destructor, build_ptrmemfunc_access_expr, build_array_ref,
1407         get_member_function_from_ptrfunc, build_binary_op, pointer_diff,
1408         build_x_unary_op, build_unary_op, unary_complex_lvalue,
1409         build_compound_expr, build_modify_expr, expand_ptrmemfunc_cst,
1410         check_return_expr): Likewise.
1411         * typeck2.c (split_nonconstant_1, split_nonconstant_init_1,
1412         split_nonconstant_init, store_init_value, build_m_component_ref):
1413         Likewise.
1415 2004-08-15  Nathan Sidwell  <nathan@codesourcery.com>
1417         * call.c (convert_class_to_reference,
1418         build_user_type_conversion_1, convert_like_real,
1419         build_java_interface_fn_ref, build_special_member_call): Use
1420         build_int_cst.
1421         * class.c (build_vtbl_initializer): Likewise.
1422         * cp-gimplify.c (cp_gimplify_expr): Likewise.
1423         * cvt.c (cp_convert_to_pointer): Likewise.
1424         * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
1425         * decl2.c (start_static_initialization_or_destruction,
1426         generate_ctor_or_dtor_function): Likewise.
1427         * except.c (build_throw): Likewise.
1428         * lex.c (cxx_init): Likewise.
1429         * mangle.c (write_integer_cst): Likewise.
1430         * rtti.c (build_headof, get_tinfo_decl_dynamic,
1431         build_dynamic_cast_1, ptr_initializer, ptm_initializer,
1432         get_pseudo_ti_init): Likewise.
1433         * search.c (get_dynamic_cast_base_type): Likewise.
1434         * tree.c (build_shared_int_cst): Likewise.
1436 2004-08-12  Mark Mitchell  <mark@codesourcery.com>
1438         PR c++/16273
1439         * class.c (count_depth_data): New type.
1440         (dfs_depth_post): New function.
1441         (dfs_depth_q): Likewise.
1442         (find_final_overrider_data_s): Change type of vpath.
1443         Add vpath_list.
1444         (dfs_find_final_overrider_1): New function.
1445         (dfs_find_final_overrider): Use it.
1446         (dfs_find_final_overrider_q): Adjust use of vpath.
1447         (dfs_find_final_overrider_post): Likewise.
1448         (find_final_overrider): Use dfs_depth.  Allocate and deallocate
1449         vpath_list.
1451 2004-08-12 Jan Beulich <jbeulich@novell.com>
1453         * parser.c (cp_parser_asm_definition): Properly consume scope operator
1454         tokens preceding the clobbers. Don't check for scope operator
1455         following inputs. Simplify inputs handling to match that now used for
1456         clobbers.
1458 2004-08-11  Mark Mitchell  <mark@codesourcery.com>
1460         PR c++/16698
1461         * except.c (build_throw): Allocate cleanup_type and the function
1462         for __cxa_throw separately.
1464         PR c++/16853
1465         * call.c (standard_conversion): Do not accept conversions between
1466         pointers to members if the class types are unrelated.
1468         PR c++/16618
1469         * parser.c (cp_parser_builtin_offsetof): Cast to "const volatile
1470         char &" instead of just "char &".
1472         PR c++/16870
1473         * pt.c (tsubst): Just return the unknown_type_node.
1475 2004-08-11  Mark Mitchell  <mark@codesourcery.com>
1477         PR c++/16964
1478         * parser.c (cp_parser_class_specifier): Robustify.
1480         PR c++/16904
1481         * pt.c (tsubst_copy_and_build): Complain about invalid
1482         qualification.
1484         PR c++/16929
1485         * pt.c (tsubst_default_argument): Clear out current_class_ptr and
1486         current_class_ref while tsubsting.
1488 2004-08-10  Mark Mitchell  <mark@codesourcery.com>
1490         PR c++/16971
1491         * parser.c (cp_parser_init_declarator): Robustify.
1493 2004-08-06  Richard Sandiford  <rsandifo@redhat.com>
1495         * typeck2.c (process_init_constructor): Guard the missing field warning
1496         with warn_missing_field_initializers rather than extra_warnings.
1498 2004-08-06  Paolo Bonzini  <bonzini@gnu.org>
1500         * class.c (instantiate_type) <ENTRY_VALUE_EXPR>: Do not handle.
1502 2004-08-05  Mark Mitchell  <mark@codesourcery.com>
1504         * decl.c (start_preparsed_function): Move determine_visibility
1505         call.
1506         * decl2.c (determine_visibility): Incorporate dllexport testing.
1508 2004-08-05  Geoffrey Keating  <geoffk@apple.com>
1510         * g++spec.c (lang_specific_driver): An -Xlinker or -Wl, option
1511         means that libstdc++ is needed.
1513 2004-08-05  Nathan Sidwell  <nathan@codesourcery.com>
1515         * cvt.c (cp_convert_to_pointer): Adjust force_fit_type call.
1517 2004-08-04  Geoffrey Keating  <geoffk@apple.com>
1519         * decl.c (make_rtl_for_nonlocal_decl): Set DECL_ASSEMBLER_NAME rather
1520         than passing it as a parameter to rest_of_decl_compilation.
1521         * decl2.c (grokfield): Use set_user_assembler_name.
1523 2004-08-04  Nathan Sidwell  <nathan@codesourcery.com>
1525         * decl.c (complete_array_type): Don't gratuitously copy
1526         maxindex. Its type is always set.
1528 2004-08-04  Paul Brook  <paul@codesourcery.com>
1530         * Make-lang.in (cp/semantics.o, cp/optimize.o): Depend on TARGET_H.
1531         * cp-tree.h (struct language_function): Rename x_dtor_label to
1532         x_cdtor_label.
1533         (dtor_label): Rename ...
1534         (cdtor_label): ... to this.
1535         * decl.c (begin_constructor_body): Remove.
1536         (check_special_function_return_type): Maybe change the return type.
1537         (grokdeclarator): Pass the class type.
1538         (start_preparsed_function): Constructors may need a return label.
1539         (finish_constructor_body, finish_destructor_body): Set the return
1540         value.
1541         (begin_function_body): Don't call begin_constructor_body.
1542         (finish_function): Don't warn for constructors or destructors.
1543         (implicitly_declare_fn): Maybe change the return type.
1544         * optimize.c: Include target.h.
1545         (maybe_clone_body): Remap the function result.
1546         * semantics.c: Include target.h.
1547         (finish_return_stmt): Maybe jump to return label for constructors.
1549 2004-08-03  Mark Mitchell  <mark@codesourcery.com>
1551         * class.c (build_vtable): Do not set DECL_VISIBILITY here.
1552         (check_field_decls): Or here.
1553         (check_methods): Or here.
1554         (initialize_array): Don't mess with DECL_CONTEXT.
1555         * cp-tree.h (start_decl): Adjust prototype.
1556         (determine_visibility): New function.
1557         * decl.c (duplicate_decls): Remove checks for hidden "operator
1558         new".
1559         (build_library_fn_1): Give all library functions default
1560         visibility.
1561         (start_decl): Add pop_scope_p parameter.  Tidy.
1562         (cp_finish_decl): Do not pop scopes here.  Call
1563         determine_visibility for variable definitions.
1564         (start_preparsed_function): Call determine_visibility.
1565         * decl2.c (determine_visibility): New function.
1566         * method.c (use_thunk): Fix formatting.
1567         * parser.c (cp_parser_condition): Adjust calls to start_decl.
1568         (cp_parser_init_declarator): Likewise.
1569         * pt.c (instantiate_decl): Always call pop_nested_class.
1570         * rtti.c (get_tinfo_decl): Do not set DECL_VISIBILITY.
1571         (tinfo_base_init): Likewise.
1573 2004-08-02  Mark Mitchell  <mark@codesourcery.com>
1575         PR c++/16707
1576         * name-lookup.c (validate_nonmember_using_decl): Robustify.
1578 2004-08-01  Mark Mitchell  <mark@codesourcery.com>
1580         PR c++/16224
1581         * name-lookup.c (decl_namespace): Remove.
1582         (current_decl_namespace): Use decl_namespace_context instead of
1583         decl_namespace.
1584         (push_decl_namespace): Likewise.
1585         (arg_assoc_class): Likewise.
1586         (arg_assoc_type): Likewise.
1587         * pt.c (check_specialization_namespace): New function.
1588         (maybe_process_partial_specialization): Use it.
1589         (register_specialization): Likewise.
1591         PR c++/16489
1592         * cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): New macro.
1593         * call.c (null_ptr_cst_p): Handle variables with constant
1594         initializers.
1595         * pt.c (convert_nontype_argument): Use
1596         DECL_INTEGRAL_CONSTANT_VAR_P.
1597         * semantics.c (finish_id_expression): Likewise.
1599         PR c++/16529
1600         * decl.c (duplicate_decls): Reject duplicate namespace
1601         declarations.
1603         PR c++/16810
1604         * typeck.c (build_ptrmemfunc): Loosen assertion.
1606 2004-08-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1608         * call.c (z_candidate::template_decl): Rename from template.
1609         (add_template_candidate_real): Adjust member reference.
1610         (joust): Likewise.
1612 2004-07-29  Mark Mitchell  <mark@codesourcery.com>
1614         * cp-tree.h (IDENTIFIER_REPO_CHOSEN): Define.
1615         (lang_decl_flags): Narrow the width of "languages".  Add
1616         repo_available_p.
1617         (DECL_NEEDED_P): Remove.
1618         (FOR_EACH_CLONE): New macro.
1619         (DECL_REPO_AVAILABLE_P): Likewise.
1620         (DECL_TINFO_P): Likewise.
1621         (set_linkage_according_to_type): Declare.
1622         (import_export_vtable): Remove.
1623         (import_export_tinfo): Likewise.
1624         (mark_needed): New function.
1625         (decl_needed_p): Likewise.
1626         (note_vauge_linkage_fn): Likewise.
1627         (init_repo): Change prototype.
1628         (repo_template_used): Remove.
1629         (repo_template_instantiated): Likewise.
1630         (repo_emit_p): New function.
1631         (repo_export_class_p): Likewise.
1632         (no_linkage_check): Change prototype.
1633         * class.c (set_linkage_according_to_type): New function.
1634         (build_vtable): Use it.  Do not call import_export_vtable.  Set
1635         DECL_IGNORED_P if appropriate.
1636         * decl.c (duplicate_decls): Preserve DECL_REPO_AVAILABLE_P.
1637         (make_rtL_for_nonlocal_decls): Check for template instantiations
1638         explicitly.
1639         (grokfndecl): Adjust call to no_linkage_check.
1640         (set_linkage_for_static_data_member): New function.
1641         (grokvardecl): Use it.  Adjust call to no_linkage_check.
1642         (grokdeclarator): Use set_linkage_for_static_data_member.
1643         * decl2.c (note_vague_linkage_fn): New function.
1644         (note_vague_linkage_var): Likewise.
1645         (finish_static_data_member_decl): Use it.
1646         (import_export_vtable): Remove.
1647         (import_export_class): Use repo_export_class_p.
1648         (var_finalized_p): Simplify.
1649         (maybe_emit_vtables): Simplify.
1650         (mark_needed): New function.
1651         (decl_needed_p): Likewise.
1652         (import_export_decl): Add documentation and consistency checks.
1653         Use repo_emit_p.  Handle virtual tables and RTTI information
1654         here.
1655         (import_export_tinfo): Remove.
1656         (write_out_vars): Call import_export_decl.
1657         (cxx_callgraph_analyze_expr): Ensure that all vtables are emitted
1658         whenever one is.
1659         (finish_file): Use decl_needed_p.  Do not call import_export_decl
1660         for undefined static data members.  Do not warn about undefined
1661         inlines when using a repository.
1662         (mark_used): Use note_vague_linkage_fn.  Always defer template
1663         instantiations.
1664         * lex.c (cxx_init): Adjust call to init_repo.  Always set
1665         flag_unit_at_a-time.
1666         * method.c (synthesize_method): Remove unncessary
1667         import_export_decl call.
1668         (implicitly_declare_fn): Use set_linkage_according_to_type.
1669         * optimize.c (maybe_clone_body): Use FOR_EACH_CLONE.
1670         * pt.c (instantiate_class_template): Don't redundantly add classes
1671         to keyed_classes.  Don't call repo_template_used.
1672         (tsubst_decl): Set DECL_INTERFACE_KNOWN for instantiations of
1673         templates with internal linkage.
1674         (check_instantiated_args): Adjust call to no_linkage_check.
1675         (instantiate_template): Use FOR_EACH_CLONE.
1676         (mark_definable): New function.
1677         (mark_decl_instantiated): Use it.
1678         (do_decl_instantiation): Adjust tests for explicit instantiation
1679         after "extern template".
1680         (instantiate_class_member): Do not use repo_template_instantiated.
1681         (do_type_instantiation): Simplify.
1682         (instantiate_decl): Use mark_definable.  Check repo_emit_p.
1683         Simplify.
1684         * repo.c (repo_get_id): Remove.
1685         (original_repo): Remove.
1686         (IDENTIFIER_REPO_USED): Remove.
1687         (IDENTIFIER_REPO_CHOSEN): Remove.
1688         Remove all #if 0'd code.
1689         (repo_template_used): Remove.
1690         (repo_template_instantiated): Remove.
1691         (temporary_obstack_initialized_p): New variable.
1692         (init_repo): Register with lang_post_pch_load.  Avoid creating
1693         identifiers unnecessarily.  Don't use original_repo.  Close the
1694         file here.
1695         (reopen_repo_file_for_write): Not here.
1696         (finish_repo): Always write out a new repository file.
1697         (repo_emit_p): New function.
1698         (repo_export_class_p): Likewise.
1699         * rtti.c (get_tinfo_decl): Use set_linkage_according_to_type.
1700         (involves_incomplete_p): New function.
1701         (tinfo_base_init): Use it.
1702         (ptr_initializer): Remove non_public_ptr parameter.
1703         (ptm_initializer): Likewise.
1704         (get_pseudo_ti_init): Likewise.
1705         (unemitted_tinfo_decl_p): Remove.
1706         (emit_tinfo_decl): Use import_export_decl.
1707         * semantics.c (expand_body): Move updates of static_ctors and
1708         static_dtors to ...
1709         (expand_or_defer_fn): ... here.
1710         * tree.c (no_linkage_check): Add relaxed_p parameter.
1712 2004-07-28  Eric Christopher  <echristo@redhat.com>
1714         * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
1716 2004-07-28  Nathan Sidwell  <nathan@codesourcery.com>
1718         * cp-tree.h (struct tree_pair_s): New.
1719         (typedef tree_pair_p): New.
1720         (DEF_VEC_O(tree_pair_s)): New.
1721         (struct lang_type_class): Make vcall_indices a VEC(tree_pair_s).
1722         (CLASSTYPE_VCALL_INDICES): Update documentation.
1723         * class.c (get_vcall_index): Adjust.
1724         (add_vcall_offset): Adjust.
1726 2004-07-27  Kelley Cook  <kcook@gcc.gnu.org>
1728         * pt.c, typeck.c: Remove spurious carriage returns.
1730 2004-07-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1732         PR c++/14429
1733         * pt.c (coerce_template_template_parms) <PARM_DECL case>: Only check
1734         when the type of ARG is not dependent.
1736 2004-07-26  Geoffrey Keating  <geoffk@apple.com>
1738         * g++spec.c (LIBSTDCXX_PROFILE): Default to LIBSTDCXX.
1739         (lang_specific_driver): If the C++ or math library options don't
1740         start with '-l', don't count them as added libraries.
1742 2004-07-26  Nathan Sidwell  <nathan@codesourcery.com>
1744         * decl.c (xref_basetypes): Adjust base access vector creation.
1745         * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Adjust base
1746         access accesses.
1747         * search.c (dynamic_cast_base_recurse, dfs_access_in_type): Likewise.
1749 2004-07-26  Niall Douglas  <s_fsfeurope2@nedprod.com>
1750             Brian Ryner  <bryner@brianryner.com>
1752         PR c++/15000
1753         PR c++/9283
1754         * class.c (check_field_decls): Apply hidden visibility if
1755         -fvisibility-inlines-hidden and inlined unless otherwise specified
1756         (build_vtable): Set vtable visibility to class visibility.
1757         (check_field_decls): Default static member visibility to class
1758         visibility.
1759         (check_methods): Default method visibility to class visibility.
1760         * cp-tree.h: Added CLASSTYPE_VISIBILITY and
1761         CLASSTYPE_VISIBILITY_SPECIFIED macro.
1762         * decl.c (duplicate_decls): New logic for merging definition decls
1763         with declaration decls. Added ignore & warning when non default
1764         applied to global operator new or delete.
1765         * method.c, optimize.c, rtti.c: Added setting of VISIBILITY_SPECIFIED
1766         wherever VISIBILITY was changed
1767         * rtti.c (get_tinfo_decl): Set typeinfo visibility to class
1768         visibility.
1769         (tinfo_base_init): Set typeinfo name visibility to class visibility.
1771 2004-07-25  Bernardo Innocenti  <bernie@develer.com>
1773         * decl.c: Rename all identifiers named `class' to `cl'.
1774         * cp-tree.h: Likewise.
1776 2004-07-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1778         * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Use GGC_CNEW.
1779         * typeck2.c (abstract_virtuals_error): Use GGC_NEW.
1780         * name-lookup.c (binding_entry_make): Use GGC_NEW.
1781         (binding_table_construct): Use GGC_CNEWVEC.
1782         (binding_table_new): Use GGC_NEW.
1783         (cxx_binding_make): Likewise.
1784         (begin_scope): Likewise.
1785         (push_to_top_level): Use GCC_CNEW.
1786         * parser.c (cp_token_cache_new): Likewise.
1787         (cp_token_cache_push_token): Likewise.
1788         (cp_lexer_new_main): Likewise.
1789         (cp_lexer_new_from_tokens): Likewise.
1790         (cp_parser_context_new): Likewise.
1791         (cp_parser_new): Likewise.
1792         (cp_lexer_new_from_tokens): Use GGC_NEWVEC.
1793         * lex.c (cxx_make_type): Use GGC_CNEW.
1794         (retrofit_lang_decl): Use GGC_NEWVAR.
1795         (cxx_dup_lang_specific_decl): Likewise.
1796         (copy_lang_type): Likewise.
1797         * decl.c (use_label): Use GGC_NEW instead of ggc_alloc.
1798         (save_function_data): Likewise.
1799         (lookup_label): Use GGC_CNEW instead of ggc_alloc_cleared.
1800         (cxx_push_function_context): Likewise.
1802 2004-07-25  Richard Henderson  <rth@redhat.com>
1804         * decl.c (start_preparsed_function): Set DECL_ARTIFICIAL and
1805         DECL_IGNORED_P on RESULT_DECL.
1806         * semantics.c (finalize_nrv): Copy them too.
1808 2004-07-23  Nathan Sidwell  <nathan@codesourcery.com>
1810         * search.c (lookup_conversion_operator): Avoid two loops.
1811         (add_conversions): Remove.
1812         (check_hidden_convs, split_conversions,
1813         lookup_conversions_r):  New.
1814         (lookup_conversions): Use lookup_conversions_r.
1816 2004-07-22  Nathan Sidwell  <nathan@codesourcery.com>
1818         * pt.c (get_template_base): Check type is completable.
1820 2004-07-21  Eric Christopher  <echristo@redhat.com>
1822         * decl.c (poplevel): Inline unused variable checking.
1823         Change formatting.
1825 2004-07-21  Paolo Bonzini  <bonzini@gnu.org>
1827         * typeck.c (build_binary_op): Do not use RDIV_EXPR for
1828         integer vectors.
1830 2004-07-21  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1832         PR c++/14497
1833         * pt.c (check_explicit_specialization): Remove extension to accept
1834         specializations without template headers. Fall-through to normal
1835         processing.
1837 2004-07-21  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1839         PR c++/509
1840         * pt.c (determine_specialization): New parameter template_count.
1841         Disambiguate between member templates and member functions counting
1842         the template headers.
1843         (check_explicit_specialization): Update caller.
1844         (tsubst_friend_function): Likewise.
1846 2004-07-20  Steven Bosscher  <stevenb@suse.de>
1848         * cp-tree.def (TINST_LEVEL): Make it an 'x' node.
1849         * cp-tree.h (tinst_level_t): New tree type.
1850         (union lang_tree_node): Handle it.
1851         (TINST_LOCATION): New accessor macro.
1852         (make_tinst_level): New prototype.
1853         * cp-lang.c (cp_tree_size): Handle TINST_LEVEL.
1854         * decl.c (cp_tree_node_structure): Likewise.
1855         * error.c (print_instantiation_full_context): Use TINST_LOCATION.
1856         (print_instantiation_partial_context): Likewise.
1857         * pt.c (pop_tinst_level): Likewise.
1858          (push_tinst_level): Use make_tinst_level.
1859         * tree.c (make_tinst_level): New function.
1860         (cp_walk_subtrees): Walk TINST_DECL for a TINST_LEVEL node.
1862 2004-07-20  Mark Mitchell  <mark@codesourcery.com>
1864         * parser.c (cp_parser_simple_type_specifier): Fix typo.
1866         PR c++/16637
1867         * parser.c (cp_parser_simple_type_specifier): Do not record usage
1868         of globally-qualified names.
1870 2004-07-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1872         PR c++/16175
1873         * error.c (dump_type) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Output
1874         cv qualifier.
1876 2004-07-19  Mark Mitchell  <mark@codesourcery.com>
1878         PR c++/16623
1879         * cp-tree.h (lang_type_class): Add lazy_assignment_op.
1880         (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
1881         * class.c (add_implicitly_declared_members): Use
1882         CLASSTYPE_LAZY_ASSIGNMENT_OP.
1883         * method.c (lazily_declare_fn): Clear
1884         CLASSTYPE_LAZY_ASSIGNMENT_OP.
1885         * search.c (lookup_fnfields_1): Check it.
1887 2004-07-20  Nathan Sidwell  <nathan@codesourcery.com>
1889         * cp-tree.h (vec_binfo_member): Remove.
1890         * tree.c (vec_binfo_member): Remove.
1892         * cp-tree.h (struct lang_type_class): Remove vfields field.
1893         (CLASSTYPE_VFIELDS): Remove.
1894         (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
1895         * class.c (determine_primary_base): Remove CLASSTYPE_VFIELDS
1896         handling.
1897         (dfs_modify_vtables): Use TYPE_CONTAINS_VPTR_P.
1898         (finish_struct_1): Remove CLASSTYPE_VFIELDS handling.
1899         * init.c (dfs_initialize_vtbl_ptrs): Use TYPE_CONTAINS_VPTR_P.
1901 2004-07-20  Nathan Sidwell  <nathan@codesourcery.com>
1903         * cp-tree.h (DEF_VEC_P(tree)): Remove here.
1904         (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
1905         Moved to common.
1906         (BINFO_LANG_SLOTS): Remove.
1907         * tree.c (copy_binfo): Adjust BINFO creation and accessors.
1908         * decl.c (xref_basetypes): Adjust BINFO creation and accessors.
1909         * class.c (check_bases): Adjust BINFO accessors.
1910         (determine_primary_base, finish_struct_bits,
1911         maybe_warn_about_overly_private_class, warn_hidden,
1912         walk_subobject_offsets, propagate_binfo_offsets, end_of_class,
1913         warn_about_ambiguous_bases, get_vfield_name,
1914         dump_class_hierarchy_r, build_vtt_inits, accumulate_vtbl_inits,
1915         add_vcall_offset_vtbl_entries_r): Likewise.
1916         * dump.c (cp_dump_tree): Likewise.
1917         * init.c (sort_mem_initializers, expand_member_init, build_delete,
1918         push_base_cleanups): Likewise.
1919         * method.c (do_build_copy_constructor, do_build_assign_ref,
1920         synthesize_exception_spec): Likewise.
1921         name-lookup.c (arg_assoc_class): Likewise.
1922         * pt.c (instantiate_class_template,
1923         get_template_base_recursive): Likewise.
1924         * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Likewise.
1925         * typeck2.c (process_init_constructor): Likewise.
1926         * search.c (lookup_base_r, dynamic_cast_base_recurse,
1927         dfs_access_in_type, dfs_walk_real, look_for_overrides,
1928         types_overlap_p, copied_binfo, original_binfo): Likewise.
1929         (binfo_for_vtable): Remove
1931 2004-07-20  Steven Bosscher  <stevenb@suse.de>
1933         * cp-tree.h (struct lang_decl_flags): Unify the template_info and
1934         thunk_alias, and the access and virtual_offset fields.
1935         (THUNK_VIRTUAL_OFFSET, THUNK_ALIAS): Adjust.
1936         * decl.c (finish_case_label): Update c_add_case_node call.
1938 2004-07-19  Mark Mitchell  <mark@codesourcery.com>
1940         Revert patch for PR c++/16623.
1942 2004-07-19  Kelley Cook  <kcook@gcc.gnu.org>
1944         * except.c: Remove two spurious carriage returns.
1946 2004-07-19  Mark Mitchell  <mark@codesourcery.com>
1948         PR c++/16623
1949         * cp-tree.h (lang_type_class): Add lazy_assignment_op.
1950         (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
1951         * class.c (add_implicitly_declared_members): Use
1952         CLASSTYPE_LAZY_ASSIGNMENT_OP.
1953         * method.c (lazily_declare_fn): Clear
1954         CLASSTYPE_LAZY_ASSIGNMENT_OP.
1955         * search.c (lookup_fnfields_1): Check it.
1957 2004-07-19  Nathan Sidwell  <nathan@codesourcery.com>
1959         * class.c (add_method): Delay adding the slot until the end.
1960         (determine_primary_base): Adjust VEC_iterate invokation.
1961         (resort_type_method_vec, finish_struct_methods, warn_hidden,
1962         walk_subobject_offsets, end_of_class, warn_about_ambiguous_bases,
1963         build_vtbl_initializer): Likewise.
1964         * init.c (sort_mem_initializers, build_delete, push_base_cleanups,
1965         build_vbase_delete): Likewise.
1966         * method.c (do_build_copy_constructor): Likewise.
1967         * name-lookup.c (new_class_binding, print_binding_level,
1968         poplevel_class, store_class_bindings, push_to_top_level,
1969         pop_from_top_level): Likewise.
1970         * pt.c (check_explicit_specialization): Likewise.
1971         * search.c (lookup_conversion_operator, lookup_fnfields_1,
1972         get_pure_virtuals, add_conversions, dfs_check_overlap,
1973         binfo_for_vbase): Likewise.
1975 2004-07-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1977         PR c++/12170
1978         * pt.c (unify) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Use only
1979         innermost set of template arguments during deduction.  Simplify.
1981 2004-07-19  Joseph S. Myers  <jsm@polyomino.org.uk>
1983         * typeck.c (build_modify_expr, build_x_modify_expr): Set
1984         TREE_NO_WARNING on assignments with an operator other than '='.
1986 2004-07-10  Steven Bosscher  <stevenb@suse.de>
1987             Joseph S. Myers  <jsm@polyomino.org.uk>
1989         * cp-tree.h (C_SET_EXP_ORIGINAL_CODE): Remove.
1990         * decl2.c (grokfield): Don't check current_class_depth via
1991         unused TREE_COMPLEXITY.
1992         * semantics.c (finish_parenthesized_expr): Set TREE_NO_WARNING
1993         to avoid the missing parentheses warning.
1994         Don't set C_SET_EXP_ORIGINAL_CODE.
1996 2004-07-18  Mark Mitchell  <mark@codesourcery.com>
1998         * tree.c (no_linkage_helper): Remove.
1999         (no_linkage_check): Don't use walk_tree_without_duplicates.
2001         * mangle.c (write_expression): Issue a sorry for zero-operand
2002         functional casts.
2004 2004-07-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2006         PR c++/13092
2007         * init.c (build_offset_ref): Build SCOPE_REF with non-null
2008         TREE_TYPE for non-dependent names.
2009         * typeck.c (build_x_unary_op): Handle non-dependent SCOPE_REF.
2010         * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
2011         unknown_type_node as its TREE_TYPE.
2012         * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
2013         * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
2014         (dump_expr) <SCOPE_REF case>: Likewise.
2016 2004-07-17  Jason Merrill  <jason@redhat.com>
2018         PR c++/16115
2019         * call.c (type_passed_as): Make the invisible reference type
2020         __restrict.
2021         * cp-gimplify.c (gimplify_cleanup_stmt): Rename to
2022         cp_genericize_r.  Handle invisible reference lowering.
2023         (is_invisiref_parm): New fn.
2024         (cp_genericize): Adjust the types of invisible reference parms.
2025         Don't repeat the walk for clones.
2026         * decl.c (store_parm_decls): Don't generate any code for clones.
2028 2004-07-17  Joseph S. Myers  <jsm@polyomino.org.uk>
2030         * cp-tree.h (builtin_function): Declare.
2032 2004-07-16  Mark Mitchell  <mark@codesourcery.com>
2034         * class.c (finish_struct_methods): Remove unncessary code.
2035         (add_implicitly_declared_members): Create declarations for default
2036         constructors and copy constructors lazily.
2037         * cp-tree.h (lang_type_class): Remove lazy_default_ctor and
2038         lazy_copy_ctor.
2039         (CLASSTYPE_LAZY_DEFAULT_CTOR): New macro.
2040         (CLASSTYPE_LAZY_COPY_CTOR): Likewise.
2041         * decl2.c (check_classfn): Robustify.
2042         (locate_dtor): Handle empty CLASSTYPE_METHOD_VEC.
2043         (locate_ctor): Handle lazy default constructors.
2044         (locate_copy): Handle lazy copy constructors.
2045         (implicitly_declare_fn): Make sure we're looking at the
2046         TYPE_MAIN_VARIANT for a class before creating functions.  Don't
2047         set TYPE_HAS_CONSTRUCTOR.
2048         (lazily_declare_fn): New function.
2049         * name-lookup.c (constructor_name_full): Simplify.
2050         * search.c (lookup_fnfields_1): Lazily create methods, as
2051         necessary.
2052         (lookup_for_overrides): Handle empty CLASSTYPE_METHOD_VEC.
2054 2004-07-16  Steven Bosscher  <stevenb@suse.de>
2056         * cp-tree.h (struct lang_type): Don't have three GTY options on a
2057         single bit GTY desc.
2059 2004-07-16  Richard Henderson  <rth@redhat.com>
2061         * cp-lang.c (LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING): Die.
2062         * cp-tree.h (cp_copy_res_decl_for_inlining): Remove.
2063         * tree.c (cp_copy_res_decl_for_inlining): Remove.
2065 2004-07-16  Nathan Sidwell  <nathan@codesourcery.com>
2067         * class.c (finish_struct_bits): Use for loop.
2068         (propagate_binfo_offsets): Do primary binfo outside of loop.
2070         PR c++/16583
2071         * dump.c (cp_dump_tree): Don't dump the bases if there's no
2072         binfo.
2074         * pt.c (tsubst) <TREE_BINFO case>: We should never get here.
2076 2004-07-15  Mark Mitchell  <mark@codesourcery.com>
2078         * cp-tree.h (lang_type_class): Remove has_real_assign_ref and
2079         has_abstract_assign_ref.  Make methods a VEC(tree) *.
2080         (TYPE_HAS_CONST_ASSIGN_REF): Add documentation.
2081         (CLASSTYPE_CONSTRUCTORS): Adjust for changes to CLASSTYPE_METHOD_VEC.
2082         (CLASSTYPE_DESTRUCTORS): Likewise.
2083         (TYPE_HAS_REAL_ASSIGN_REF): Remove.
2084         (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
2085         (add_method): Change prototoype.
2086         * class.c (add_method): Remove error_p parameter.  Adjust for
2087         changes to CLASSTYPE_METHOD_VEC.
2088         (handle_using_decl): Adjust call to add_method.
2089         (maybe_warn_about_overly_private_class): Adjust for
2090         changes to CLASSTYPE_METHOD_VEC.
2091         (resort_type_method_vec): Likewise.
2092         (finish_struct_methods): Likewise.
2093         (check_for_override): Likewise.
2094         (warn_hidden): Likewise.
2095         (add_implicitly_declared_members): Defer creation of assignment
2096         operators.  Adjust call to add_method.
2097         (clone_function_decl): Adjust call to add_method.
2098         (check_bases_and_members): Don't set TYPE_HAS_REAL_ASSIGN_REF.
2099         (finish_struct_1): Use CLASSTYPE_DESTRUCTORS.
2100         * decl.c (grok_special_member_properties): Don't set
2101         TYPE_HAS_ABSTRACT_ASSIGN_REF.
2102         * decl2.c (check_classfn): Adjust for
2103         changes to CLASSTYPE_METHOD_VEC.
2104         * method.c (locate_dtor): Use CLASSTYPE_DESTRUCTORS.
2105         (locate_ctor): Use CLASSTYPE_CONSTRUCTORS.
2106         (locate_copy): Adjust for changes to CLASSTYPE_METHOD_VEC.
2107         (implicitly_declare_fn): Set DECL_SOURCE_LOCATION.  Do not call
2108         cp_finish_decl.
2109         * pt.c (check_explicit_specialization): Adjust for
2110         changes to CLASSTYPE_METHOD_VEC.
2111         (instantiate_class_template): Do not set
2112         TYPE_HAS_ABSTRACT_ASSIGN_REF.
2113         * ptree.c (cxx_print_type): Don't try to print
2114         CLASSTYPE_METHOD_VEC.
2115         * rtti.c (emit_support_tinfos): Use CLASSTYPE_DESTRUCTORS.
2116         * search.c (lookup_field_r): Adjust for
2117         changes to CLASSTYPE_METHOD_VEC.
2118         (lookup_fnfields): Likewise.
2119         (lookup_conversion_operator): Likewise.
2120         (lookup_fnfields_1): Likewise.  Create assignment operators
2121         lazily.
2122         (look_for_overrides_here): Adjust for
2123         changes to CLASSTYPE_METHOD_VEC.
2124         (add_conversions): Likewise.
2125         * semantics.c (finish_member_declaration): Adjust call to add_method.
2127 2004-07-15  Jason Merrill  <jason@redhat.com>
2129         * cp-lang.c (cxx_types_compatible_p): To the middle-end,
2130         references and pointers are compatible.
2132 2004-07-15  Nathan Sidwell  <nathan@codesourcery.com>
2134         * decl.c (xref_basetypes): Refactor.
2135         * tree.c (copy_base_binfos): Replace with ...
2136         (copy_binfo): ... this. Deep copy the given binfo, (not the just
2137         bases of the given base).
2138         * cp-tree.h (copy_base_binfo): Remove.
2139         (copy_binfo): Declare.
2141 2004-07-15  Mark Mitchell  <mark@codesourcery.com>
2143         * name-lookup.c (set_inherited_value_binding_p): Add class_type
2144         parameter.
2145         (get_class_binding): Adjust.
2146         (push_class_level_binding): Don't use set_inherited_value_binding_p.
2148 2004-07-15  Nathan Sidwell  <nathan@codesourcery.com>
2150         * class.c (finish_struct_bits): Don't set TYPE_HAS_CONVERSION here.
2151         * decl.c (xref_basetypes): Set it here.
2153         * class.c (check_bases): Don't set CLASSTYPE_NON_AGGREGATE here.
2154         Don't check for incomplete base.
2155         (get_vfield_name): Simplify while loop.
2156         * decl.c (xref_basetypes): Set CLASSTYPE_NON_AGGREGATE here.
2158 2004-07-14  Mark Mitchell  <mark@codesourcery.com>
2160         * lex.c (cxx_make_type): Remove call to get_pointer_type.
2162         * cp-tree.h (IDENTIFIER_VALUE): Remove.
2163         (BINFO_PUSHDECLS_MARKED): Likewise.
2164         (maybe_inject_for_scope_var): Likewise.
2165         (push_class_decls): Likewise.
2166         * name-lookup.h (push_class_binding): Remove.
2167         (innermost_non_namespace_value): New function.
2168         (outer_binding): Likewise.
2169         * class.c (add_method): Push bindings before adding to
2170         TYPE_METHODS.
2171         (restore_class_cache): Do not restore class_shadowed.
2172         (pushclass): Do not add USING_DECLs.  Do not call
2173         push_class_decls.
2174         * config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c.
2175         * decl.c (pushdecl): Use outer_binding.
2176         (poplevel): Set the scope for an out-of-scope for-loop declaration
2177         appropriately.
2178         (cp_finish_decl): Don't call maybe_inject_for_scope_var.
2179         * name-lookup.c (new_class_binding): New function.
2180         (push_binding): Use it.
2181         (pushdecl): Use innermost_non_namespace_value.
2182         (maybe_inject_for_scope_var): Remove.
2183         (push_class_binding): Remove.
2184         (set_inherited_value_binding_p): New function.
2185         (get_class_binding): New function.
2186         (push_class_level_binding): Assert that the current_class_type is
2187         being defined.
2188         (outer_binding): New function.
2189         (innermost_non_namespace_value): Likewise.
2190         (lookup_name_real): Use outer_binding.
2191         (lookup_name_current_level): Ignore out-of-scope variables.
2192         * pt.c (check_template_shadow): Use innermost_non_namespace_value.
2193         (lookup_template_class): Likewise.
2194         * search.c (dfs_push_type_decls): Remove.
2195         (dfs_push_decls): Likewise.
2196         (setup_class_bindings): Likewise.
2197         (lookup_field_1): Handle USING_DECLs from dependent scopes.
2198         (marked_pushdecls_p): Remove.
2199         (unmarked_pushdecls_p): Remove.
2200         (marked_identifiers): Remove.
2201         (setup_class_bindings): Remove.
2202         (dfs_push_type_decls): Remove.
2203         (dfs_push_decls): Remove.
2204         (push_class_decls): Remove.
2206 2004-07-13  Mark Mitchell  <mark@codesourcery.com>
2208         PR c++/16518
2209         PR c++/16337
2210         * decl.c (grokvardecl): Make declspecs parameter const.
2211         (grokdeclarator): Likewise.  Adjust accordingly.
2212         * decl.h (grokdeclarator): Adjust declaration.
2213         * parser.c (cp_parser_init_declarator): Do not clear
2214         decl_specifiers->attributes.
2216         * cp-tree.h (lang_identifier): Remove class_value.
2217         (IDENTIFIER_CLASS_VALUE): Remove.
2218         (pop_class_decls): Likewise.
2219         (init_search_processing): Likewise.
2220         * class.c (handle_using_decl): Use lookup_member, not
2221         IDENTIFIER_CLASS_VALUE.
2222         (restore_class_cache): New function, split out from ...
2223         (pushclass): ... here.  Do not call clear_identifier_class_values.
2224         (invalidate_class_lookup_cache): Do not clear
2225         IDENTIFIER_CLASS_VALUE.
2226         (popclass): Do not call pop_class_decls.
2227         (maybe_note_name_used_in_class): Do not save names looked up after
2228         the class is complete.  Use lookup_member, not
2229         IDENTIFIER_CLASS_VALUE.
2230         * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
2231         * decl.c (cxx_init_decl_processing): Do not call
2232         init_search_processing.
2233         * method.c (do_build_copy_constructor): Remove unnecessary code.
2234         (do_build_assign_ref): Likewise.
2235         * name-lookup.c (pushdecl): Use lookup_member, not
2236         IDENTIFIER_CLASS_VALUE.
2237         (set_identifier_type_value_with_scope): Set TREE_TYPE on the
2238         type_shadowed list.
2239         (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
2240         (push_class_binding): Do not set it.
2241         (clear_identifier_class_values): Remove.
2242         (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
2243         (store_binding): Do not save it.
2244         (pop_from_top_level): Do not restore it.
2245         * name-lookup.h (cxx_saved_binding): Remove class_value.
2246         (clear_identifier_class_values): Remove.
2247         * ptree.c (cxx_print_identifier): Do not print
2248         IDENTIFIER_CLASS_VALUE.
2249         * search.c (search_obstack): Remove.
2250         (push_stack_level): Remove.
2251         (pop_stack_level): Remove.
2252         (search_level): Remove.
2253         (search_stack): Remove.
2254         (lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
2255         (setup_class_bindings): Use IDENTIFIER_MARKED, not
2256         IDENTIFIER_CLASS_VALUE.
2257         (marked_identifiers): New variable.
2258         (push_class_decls): Clear IDENTIFIER_MARKED.
2259         (pop_class_decls): Don't call pop_search_level.
2260         (init_search_processing): Remove.
2262 2004-07-12  Mark Mitchell  <mark@codesourcery.com>
2264         * cp-tree.h (get_aggr_typedef): Remove.
2265         * init.c (get_aggr_typedef): Likewise.
2267         * name-lookup.c (push_class_level_binding): Simplify.
2269 2004-07-12  Andrew Pinski  <apinski@apple.com>
2271         PR c++/16475
2272         Revert:
2273         2004-07-07  H.J. Lu  <hongjiu.lu@intel.com>
2274                 PR c++/16276
2275                 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
2276                 is not public.
2278 2004-07-12  Eric Christopher  <echristo@redhat.com>
2280         * parser.c (cp_parser_class_head): Remove unused variable.
2282 2004-07-12  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2284         * decl.c (grok_op_properties): Reject [de-]allocation functions
2285         declared in a namespace, or declared as static.
2287 2004-07-12  Nathan Sidwell  <nathan@codesourcery.com>
2289         * cp-tree.h (make_binfo): Remove.
2290         * decl.c (xref_basetypes): Use make_tree_binfo directly.
2291         * tree.h (copy_base_binfos): Likewise.
2292         (make_binfo): Remove.
2294         * call.c (build_user_type_conversion_1, build_new_op,
2295         check_constructor_callable, build_temp,
2296         perform_direct_initialization_of_possible): Pass type directly to
2297         lookup_fnfields & build_special_member_call.
2298         (build_special_member_call): Accept a type, and complete it.
2299         * class.c (finish_stuct_bits): Copy the BINFOs here.
2300         * cvt.c (ocp_convert): Pass type directly to
2301         build_special_member_call.
2302         * decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
2303         (xref_basetypes): Allocate the binfo here. Adjust.
2304         * init.c (build_init, build_new_1): Pass type directly to
2305         build_special_member_call.
2306         * lex.c (cxx_make_type): Do not allocate binfo here.
2307         * name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
2308         * parser.c (cp_parser_class_head): Always call xref_basetypes.
2309         * pt.c (instantiate_class_template): Likewise. Inhibit access
2310         checking for template friends.
2311         * ptree.c (cxx_print_type): Adjust record printing.
2312         * search.c (lookup_base): When taking a type, complete it before
2313         looking for a binfo.
2314         (lookup_member): Delay completing a type.
2315         (push_class_decls): Don't walk an incomplete type.
2316         (lookup_conversions): Likewise.
2317         * semantics.c (finish_stmt_expr_expr): Pass type directly to
2318         build_special_member_call.
2319         * tree.c (copy_base_binfos): Adjust.
2320         (make_binfo): Likewise.
2321         * typeck.c (build_modify_expr): Pass type directly to
2322         build_special_member_call.
2323         * typeck2.c (process_init_constructor): Check a binfo exists.
2324         (build_m_component_ref): Allow accessing an incomplete type.
2325         (build_functional_cast): Pass type directly to
2326         build_special_member_call.
2328 2004-07-12  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2330         PR c++/2204
2331         * config-lang.in (gtfiles): Add typeck2.c.
2332         * Make-lang.in: Tweak typeck2.c dependencies, and add rule for
2333         gt-cp-typeck2.h.
2334         * cp-tree.h: Declare complete_type_check_abstract.
2335         * typeck2.c (pat_calc_hash, pat_compare,
2336         complete_type_check_abstract): New functions.
2337         (abstract_virtuals_error): If the type is abstract, register the
2338         declaration within abstract_pending_vars for further checks.
2339         Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
2340         * decl.c (cp_finish_decl): Do not strip array types.
2341         (create_array_type_for_decl): Check for abstractness of the element
2342         type.
2343         (complete_vars): Call complete_type_check_abstract.
2344         * class.c (finish_struct): Prepare a list of virtual functions for
2345         template types, and call complete_vars on it to check for abstractness.
2347 2004-07-12  Paolo Bonzini  <bonzini@gnu.org>
2349         PR tree-optimization/14107
2350         * decl.c (finish_function): Remove temporary band-aid.
2352 2004-07-11  Mark Mitchell  <mark@codesourcery.com>
2354         * call.c (build_operator_new_call): Avoid using push_to_top_level.
2355         (build_new_op): Adjust call to lookup_function_nonclass.
2356         * name-lookup.c (identifier_type_value): Adjust call to
2357         lookup_name_real.
2358         (lookup_name_real): Add block_p parameter.
2359         (lookup_name_nonclass): Adjust call to lookup_name_real.
2360         (lookup_function_nonclass): Likewise.
2361         (lookup_name): Likewise.
2362         * name-lookup.h (lookup_name_real): Change prototype.
2363         (lookup_name_nonclass): Likewise.
2364         * parser.c (cp_parser_lookup_name): Likewise.
2366         * cp-tree.h (saved_scope): Make old_bindings a vector.
2367         (unuse_fields): Remove.
2368         * name-lookup.h (cxx_saved_binding): Define it.
2369         * class.c (pushclass): Don't use unuse_fields.
2370         * name-lookup.c (cxx_saved_binding_make): Remove.
2371         (store_binding): Add new bindings to a vector, using an
2372         accumulator style, rather than adding them to a list.
2373         (store_bindings): Adjust accordingly.
2374         (store_class_bindings): Likewise.
2375         (push_to_top_level): Likewise.
2376         (pop_from_top_level): Likewise.
2377         * optimize.c (maybe_clone_body): Must push_to_top_level and
2378         pop_from_top_level calls outside of loop.
2379         * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope
2380         calls here from cp_parser_late_parsing_default_args.
2381         (cp_parser_save_default_args): Record the class type in which the
2382         function is declared.
2383         (cp_parser_late_parsing_default_args): Do not call
2384         push_nested_class/pop_nested_class.
2385         * search.c (dfs_unuse_fields): Remove.
2386         (unuse_fields): Remove.
2388 2004-07-11  Joseph S. Myers  <jsm@polyomino.org.uk>
2390         * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
2391         LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
2392         * cp-tree.h (poplevel): Declare.
2393         (set_block): Remove.
2394         * decl.c (set_block): Remove.
2396 2004-07-10  Mike Stump  <mrs@apple.com>
2398         * decl2.c (import_export_class): Never export/import vtables
2399         with inline key functions.
2401 2004-07-09  Steven Bosscher  <stevenb@suse.de>
2403         * typeck.c (c_expand_asm_operands): Remove.
2405 2004-07-09  Mike Stump  <mrs@apple.com>
2407         * typeck.c (build_class_member_access_expr): Skip null deref
2408         warning when we don't dereference it.
2410 2004-07-09  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2412         PR c++/8211
2413         PR c++/16165
2414         * class.c (check_field_decls): Improve -Weffc++ warning: do not
2415         warn for pointers to functions/members, or for classes without
2416         destructors.
2418 2004-07-08  Mark Mitchell  <mark@codesourcery.com>
2420         * name-lookup.h (struct cp_binding_level): Update documentation
2421         for class_shadowed.
2423 2004-07-08  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2425         PR c++/16169
2426         * typeck.c (check_return_expr): Improve -Weffc++ warning: handle
2427         returning CALL_EXPR, and non-reference return type.
2429 2004-07-08  Nathan Sidwell  <nathan@codesourcery.com>
2431         * name-lookup.c (push_binding): Use VEC_reserve.
2433 2004-07-08  Richard Henderson  <rth@redhat.com>
2435         * cp-tree.h (expand_eh_spec_block): Remove.
2437 2004-07-07  Mark Mitchell  <mark@codesourcery.com>
2439         * cp-tree.h (saved_scope): Remove x_previous_class_type and
2440         x_previous_class_values; add x_previous_class_level.
2441         (previous_class_type): Remove.
2442         (previous_class_values): Remove.
2443         (previous_class_level): New macro.
2444         * class.c (pushclass): Restore the identifier cache more
2445         expeditiously.
2446         (invalidate_class_lookup_cache): Use vector for class_shadowed and
2447         previous_class_values.
2448         * decl.c (poplevel): Likewise.
2449         * name-lookup.c (cxx_binding_init): New function.
2450         (cxx_binding_make): Use it.
2451         (push_binding): For a binding in a class level, use a vector of
2452         cp_class_binding nodes.
2453         (push_binding_level): New function.
2454         (begin_scope): Use it.
2455         (leave_scope): Do not put class binding levels on the free list.
2456         (print_binding_level): Adjust for the fact that class_shadowed is
2457         a vector.
2458         (poplevel_class): Likewise.
2459         (clear_identifier_class_values): Likewise.
2460         (push_class_level_binding): Likewise.
2461         (set_class_shadows): Remove.
2462         (store_binding): New function.
2463         (store_class_bindings): New function.
2464         (push_to_top_level): Use store_class_bindings as appropriate.
2465         (pop_from_top_level): Use previous_class_level, not
2466         previous_class_type.
2467         * name-lookup.h (cp_class_binding): New type.
2468         (cp_binding_level): Use a vector object for class_shadowed.
2469         (push_binding_level): Declare.
2470         (set_class_shadows): Remove.
2472 2004-07-07  Andrew Pinski  <apinski@apple.com>
2474         * class.c (instantiate_type): BUFFER_REF is dead.
2475         * lex.c (init_operators): IN_EXPR is dead.
2477 2004-07-07  Jason Merrill  <jason@redhat.com>
2479         PR c++/16334
2480         * call.c (build_new_op): Give overload warnings for built-in
2481         candidates.
2483 2004-07-07  H.J. Lu  <hongjiu.lu@intel.com>
2485         PR c++/16276
2486         * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
2487         is not public.
2489 2004-07-07  Nathan Sidwell  <nathan@codesourcery.com>
2491         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
2492         * class.c (build_primary_vtable, check_bases,
2493         determine_primary_base, finish_struct_bits,
2494         maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
2495         get_basefndecls, warn_hidden, walk_subobject_offsets,
2496         build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
2497         layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
2498         finish_struct_1, get_vfield_name, contains_empty_class_p,
2499         dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
2500         dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
2501         add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
2502         BINFO macros.
2503         * decl.c (xref_basetypes): Likewise.
2504         * dump.c (cp_dump_tree): Likewise.
2505         * error.c (dump_expr): Likewise.
2506         * init.c (sort_mem_initializers, expand_member_init,
2507         push_base_cleanups): Likewise.
2508         * method.c (do_build_copy_constructor, do_build_assign_reg,
2509         synthesize_exception_spec): Likewise.
2510         * name-lookup.c (arg_assoc_class): Likewise.
2511         * pt.c (instantiate_class_template, tsubst,
2512         get_template_base_recursive): Likewise.
2513         * ptree.c (cxx_print_type): Likewise.
2514         * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
2515         * search.c (lookup_base_r, dynamic_cast_base_recurse,
2516         dfs_access_in_type, access_in_type, lookup_field_queue_p,
2517         bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
2518         marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
2519         dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
2520         binfo_for_vtable, copied_binfo, original_binfo): Likewise
2521         * tree.c (copy_base_binfos, make_binfo): Likewise.
2522         * typeck.c (commmon_base_type): Likewise
2523         * typeck2.c (process_init_constructor): Likewise
2525 2004-07-06  Joseph S. Myers  <jsm@polyomino.org.uk>
2527         * decl.c (check_tag_decl): Name redeclared type in diagnostic.
2529 2004-07-06  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2531         PR c++/3671
2532         * pt.c (convert_nontype_argument): Disallow conversions between
2533         different enumeration types.
2535 2004-07-06  Nathan Sidwell  <nathan@codesourcery.com>
2537         * cp-tree.h (BINFO_MARKED): Remove.
2538         (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
2539         BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
2540         BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
2541         (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
2542         * class.c (build_base_path): Use BINFO_VIRTUAL_P.
2543         (mark_primary_bases, determine_primary_base, base_derived_from,
2544         dfs_find_final_overrider, dfs_find_final_overrider_q,
2545         dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
2546         dfs_modify_vtables, walk_subobject_offsets,
2547         layout_nonempty_base_or_field, build_base_field,
2548         build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
2549         end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
2550         finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
2551         build_ctor_vtbl_group, accumulate_vtble_inits,
2552         dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
2553         build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
2554         add_vcall_offset_vtbl_entries_1): Likewise.
2555         * decl.c (xref_basetypes): Incomming virtual base indicated by
2556         TREE_TYPE. Adjust.
2557         * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
2558         * init.c (finish_init_stmts, sort_mem_initializers,
2559         emit_mem_initializers, build_vtble_address, expand_member_init,
2560         push_base_cleanups): Likewise.
2561         * method.c (do_build_copy_constructor): Likewise.
2562         * pt.c (instantiate_class_template,
2563         get_template_base_recursive): Likewise.
2564         * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
2565         get_pseudo_ti_desc): Likewise.
2566         * search.c (lookup_base_r, dynamic_cast_base_recurse,
2567         binfo_from_vbase, binfo_via_virtual, copied_binfo,
2568         original_binfo): Likewise.
2569         * semantics.c (finish_base_specifier): Virtualness is indicated
2570         by TREE_TYPE.
2571         * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
2573 2004-07-06  Mark Mitchell  <mark@codesourcery.com>
2575         Revert:
2576         2004-06-24  Jason Merrill  <jason@redhat.com>
2577         PR c++/16115
2578         * decl.c (grokparms): Give the PARM_DECL reference type if the
2579         parameter is passed by invisible reference.
2581 2004-07-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2583         * cp-lang.c (cp_var_mod_type_p): Add extra arg.
2584         * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
2585         * pt.c (check_instantiated_args, unify): Likewise.
2587 2004-07-05  Phil Edwards  <phil@codesourcery.com>
2589         * Make-lang.in (check-c++, lang_checks):  Add some comments.
2591 2004-07-05  Zack Weinberg  <zack@codesourcery.com>
2593         * cp-mudflap.c: Delete file.
2594         * Makefile.in: Remove all references to cp-mudflap.o.
2596 2004-07-05  Zack Weinberg  <zack@codesourcery.com>
2598         * decl.c (cxx_init_decl_processing): Call
2599         build_common_tree_nodes before creating the global NAMESPACE_DECL.
2601 2004-07-05  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2603         PR c++/2518
2604         * call.c (build_operator_new_call): Look only at global scope.
2606 2004-07-05  Nathan Sidwell  <nathan@codesourcery.com>
2608         * call.c (enforce_access): Expect TREE_BINFO.
2609         * class.c (binfo_ctor_vtable): Check TREE_BINFO.
2610         * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
2611         (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
2612         Adjust.
2613         (BINFO_LANG_ELTS): Remove.
2614         (BINFO_LANG_SLOTS): New.
2615         (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
2616         (CLASSTYPE_TEMPLATE_INFO): Adjust.
2617         * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
2618         * search.c (lookup_member): Check TREE_BINFO.
2619         * semantics.c (perform_or_defer_access_check): Likewise.
2620         (check_accessibility_of_qualified_id): Check
2621         deferred_access_no_check.
2622         * tree.c (make_binfo): Use make_tree_binfo.
2624 2004-07-04  Mark Mitchell  <mark@codesourcery.com>
2626         * method.c (implicitly_declare_fn): Set linkage of generated
2627         functions.
2629 2004-07-04  Richard Henderson  <rth@redhat.com>
2631         * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
2633 2004-07-03  Scott Brumbaugh  <scottb.lists@verizon.net>
2635         PR c++/3761
2636         * name-lookup.c (push_class_level_binding): Don't pass a
2637         TREE_LIST of ambiguous names to check_template_shadow as it
2638         only handles declarations. Instead, pull the declaration
2639         out and pass that.
2641 2004-07-03  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2643         PR c++/14971
2644         * pt.c (check_explicit_specialization): Clarify error message.
2646 2004-07-02  Richard Henderson  <rth@redhat.com>
2648         * tree.c (cp_unsave_r): Update remap_save_expr call.
2650 2004-07-02  Mark Mitchell  <mark@codesourcery.com>
2652         PR c++/16240
2653         * mangle.c (write_template_arg): Correct mangling.
2655         PR c++/16297
2656         * decl.c (grokdeclarator): Robustify.
2658 2004-07-01  Richard Henderson  <rth@redhat.com>
2660         * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
2661         * method.c (synthesize_method): Don't clear_last_expr.
2662         * name-lookup.c (maybe_push_cleanup_level): Likewise.
2664 2004-07-01  Nick Clifton  <nickc@redhat.com>
2666         * decl2.c (import_export_class): Invoke the
2667         import_export_class field in the gcc_target structure if it is not
2668         empty.
2670 2004-06-30  Richard Henderson  (rth@redhat.com>
2672         * decl.c (start_preparsed_function): Don't set immediate_size_expand.
2673         * method.c (use_thunk): Likewise.
2675 2004-06-30  Joseph S. Myers  <jsm@polyomino.org.uk>
2677         * call.c (build_over_call), typeck.c (build_function_call): Call
2678         check_function_arguments instead of check_function_format.
2680 2004-06-30  Joseph S. Myers  <jsm@polyomino.org.uk>
2682         * call.c (build_over_call), typeck.c (build_function_call): Update
2683         calls to check_function_format.
2685 2004-06-30  Richard Henderson  <rth@redhat.com>
2687         * call.c (build_over_call): Use __builtin_memcpy for copying
2688         CLASS_AS_BASE rather than funny casting.
2690 2004-06-30  Richard Henderson  <rth@redhat.com>
2692         * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
2693         TYPE_SIZE_UNIT of full_type.
2695 2004-06-30  Per Bothner  <per@bothner.com>
2697         Conditionally compile support for --enable-mapped_location.
2698         * decl.c (pop_label):  Handle (imperfectly) USE_MAPPED_LOCATION case.
2699         * decl2.c:  If USE_MAPPED_LOCATION, don't do some line number
2700         adjustments - which I don't understand.
2701         * error.c (dump_decl):  Rename "<interrnal>" to "<built-in>".
2702         * error.c:  Use LOCATION_FILE and EXPR_LOCATION macros.
2703         (print_instantiation_partial_context):  Use expand_location.
2704         * decl.c (duplicate_decl):  Use new DECL_IS_BUILTIN macro.
2705         * name-lookup.c:  Likewise.
2706         * lex.c (cxx_init):  Likewise.  Also use BUILTINS_LOCATION.
2707         * name-lookup.c:  Use input_line macro.
2708         * parser.c (cp_lexer_get_preprocessor_token):  Use UNKNOWN_LOCATION.
2709         (cp_parser_statement):  Rename locaal variable statement_locus to
2710         statement_location and use SET_EXPR_LOCATION macro.
2711         * pt.c:  Handle USE_MAPPED_LOCATION case.  Use new macros.
2712         * tree.c (cp_walk_subtrees):  Likewise.
2714 2004-06-29  Per Bothner  <per@bothner.com>
2716         * tree.c (build_min_nt, build_min, build_min_non_dep):
2717         Don't set TREE_COMPLEXITY from input_line.
2719 2004-06-29  Paul Brook  <paul@codesourcery.com>
2721         * init.c: Include target.h.
2722         (get_cookie_size): Remove and replace with target hook.
2723         Update callers.
2724         (build_new_1): Store the element size in the cookie.
2726 2004-06-29  Nathan Sidwell  <nathan@codesourcery.com>
2728         PR c++/16260
2729         * parser.c (cp_parser_template_declaration_after_export): Disable
2730         access checks here ...
2731         (cp_parser_class_specifier): ... not here.
2733 2004-06-28  Nathan Sidwell  <nathan@codesourcery.com>
2735         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
2736         VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
2737         BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
2738         TREE_CHECK macro.
2740 2004-06-28  Nathan Sidwell  <nathan@codesourcery.com>
2742         * cp-tree.h (struct deferred_access): Move to ...
2743         * semantics.c (struct deferred_access): ... here. Adjust.
2744         (deferred_access_stack): Make a VEC(deferred_access),
2745         (deferred_access_free_list): Remove.
2746         (deferred_access_no_check): New.
2747         (push_deferring_access_checks, resume_deferring_access_checks,
2748         stop_deferring_access_checks, pop_deferring_access_checks,
2749         get_deferred_access_checks, pop_to_parent_deferring_access_checks,
2750         perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
2752 2004-06-28  Nathan Sidwell  <nathan@codesourcery.com>
2754         PR c++/16174
2755         * call.c (build_temp): Declare.
2756         (check_constructor_callable): New.
2757         (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
2758         CONSTRUCTOR_CALLABLE.
2759         (convert_like_real, initialize_reference): Use
2760         check_constructor_callable.
2761         * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
2762         (LOOKUP_*): Renumber.
2764 2004-06-28  Nathan Sidwell  <nathan@codesourcery.com>
2766         * friend.c (add_friend): Only perform access checks when context
2767         is a class.
2768         * lex.c (cxx_make_type): Only create a binfo for aggregate types.
2769         * parser.c (cp_parser_class_specifier): Disable access checks here
2770         when parsing the body of a templated class.
2771         * semantics.c (perform_or_defer_access_checks): Reorder to allow
2772         NULL binfos when not checking access.
2774 2004-06-28  Nathan Sidwell  <nathan@codesourcery.com>
2776         Use vector API for vbase list.
2777         * cp-tree.h: Include vec.h
2778         (DEF_VEC_P (tree)): New type.
2779         (struct lang_type_class): Change vbase's member type.
2780         (binfo_for_vbase): Declare.
2781         * class.c (determine_primary_base, base_derived_from,
2782         update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
2783         warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
2784         build_vtbl_initializer): Adjust.
2785         * decl.c (xref_basetypes): Adjust, accumulate upper bound of
2786         vbases.
2787         * init.c (sort_mem_initializers, expand_member_init,
2788         push_base_cleanups): Adjust.
2789         * method.c (do_build_copy_constructor): Adjust.
2790         * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
2791         (binfo_for_vbase): New.
2792         * tree.c (copy_base_binfos): Adjust.
2794 2004-06-28  Mark Mitchell  <mark@codesourcery.com>
2796         * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
2798 2004-06-27  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2800         PR c++/14123
2801         * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
2802         paranthesis in case of pointers to array members.
2803         * error.c (dump_type_prefix): Likewise.
2804         (dump_type_suffix): Maybe issue a whitespace when printing
2805         ARRAY_TYPE.
2807 2004-06-27  Mark Mitchell  <mark@codesourcery.com>
2809         PR c++/16193
2810         * parser.c (cp_parser_set_decl_spec_type): Refine test for
2811         redefinition of built-in types.
2813 2004-06-27  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2815         * error.c (pp_template_argument_list_start): Remove.
2816         (pp_template_argument_list_end): Likewise.
2817         (pp_separate_with_comma): Use pp_cxx_separate_with.
2818         (reinit_global_formatting_buffer): Remove.
2819         (pp_non_consecutive_character): Likewise.
2820         (dump_scope): Use pp_cxx_colon_colon.
2821         (dump_template_parameter): Use pp_cxx_identifier,
2822         pp_cxx_tree_identifier and pp_cxx_whitespace.
2823         (dump_templat_bindings): Replace use of pp_string with sequence
2824         of pp_cxx_whitespace and pp_equal.
2825         (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
2826         pp_cxx_colon_colon, pp_cxx_whitespace throughout.  Don't set
2827         padding here.
2828         (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
2829         (dump_type_prefix): Don't set padding.  Use pp_cxx_whitespace,
2830         pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
2831         (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
2832         pp_cxx_right_bracket, pp_cxx_identifier throughout,
2833         (dump_decl): Likewise.
2834         (dump_template_decl): Likewise.
2835         (dump_function_decl): Likewise.  Set padding as appropriate.
2836         (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
2837         pp_cxx_right_paren.
2838         (dump_exception_spec): Likewise.
2839         (dump_function_name): Use pp_cxx_tree_identifier and
2840         pp_cxx_identifier.
2841         (dump_template_parms): Use pp_cxx_begin_template_argument_list and
2842         pp_cxx_end_template_argument_list.
2843         (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
2844         pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
2845         pp_cxx_whitespace throughout.
2846         (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
2847         pp_cxx_right_paren.
2848         (dump_unary_op): Likewise.
2849         (reinit_cxx_pp): New function.
2850         (type_as_string); Use it.
2851         (expr_as_string): Likewise.
2852         (decl_as_string); Likewise.
2853         (context_as_string): Likewise.
2854         (lang_decl_name): Likewise.
2855         (decl_to_string): Likewise.
2856         (expr_to_string): Likewise.
2857         (parm_to_string): Likewise.
2858         (type_to_string): Likewise.
2859         (args_to_string): Likewise.
2860         (cv_to_string): Likewise.
2862 2004-06-26  Mark Mitchell  <mark@codesourcery.com>
2864         * cp-tree.h (cp_cv_quals): New type.
2865         (cp_declarator): Use it instead of "tree" as appropriate.
2866         (grok_method_quals): Adjust prototype.
2867         (grokclassfn): Likewise.
2868         (do_friend): Likewise.
2869         * decl.c (grokfndecl): Use cp_cv_quals, not tree.
2870         (grokdeclarator): Likewise.
2871         * decl2.c (grok_method_quals): Likewise.
2872         (grokclassfn): Likewise.
2873         * friend.c (do_friend): Likewise.
2874         * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
2875         * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
2876         (make_pointer_declarator): Likewise.
2877         (make_reference_declarator): Likewise.
2878         (make_ptrmem_declarator): Likewise.
2879         (cp_parser_ptr_operator): Likewise.
2880         (cp_parser_cv_qualifier_seq_opt): Likewise.
2881         (cp_parser_cv_qualifier_opt): Remove.
2882         (cp_parser_new_declarator_opt): Adjust call to
2883         cp_parser_ptr_operator.
2884         (cp_parser_conversion_declaration_opt): Likewise.
2885         (cp_parser_declarator): Use cp_cv_quals, not tree.
2886         (cp_parser_direct_declarator): Likewise.
2888 2004-06-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2890         * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
2891         Rename DECL_STMT to DECL_EXPR.
2892         * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
2893         * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
2894         * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
2896 2004-06-26  Jan Hubicka  <jh@suse.cz>
2898         PR C++/14865
2899         * decl2.c (maybe_emit_vtables):  Always import_export_vtable for the
2900         reachability analysis.
2902 2004-06-25  Mark Mitchell  <mark@codesourcery.com>
2904         * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
2905         2004-06-23 change.
2907 2004-06-25  Paul Brook  <paul@codesourcery.com>
2909         * decl2.c (get_guard): Call targetm.cxx.guard_type.
2910         (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
2912 2004-06-24  Mark Mitchell  <mark@codesourcery.com>
2914         * decl.c (grokdeclarator): Restore error messages about __thread.
2915         * parser.c (cp_parser_decl_specifier_seq): Likewise.
2917 2004-06-24  Jason Merrill  <jason@redhat.com>
2919         PR c++/16115
2920         * decl.c (grokparms): Give the PARM_DECL reference type if the
2921         parameter is passed by invisible reference.
2923 2004-06-24  Andreas Schwab  <schwab@suse.de>
2925         * cp-tree.h (enum cp_storage_class): Remove trailing comma.
2927 2004-06-23  Mark Mitchell  <mark@codesourcery.com>
2929         * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
2930         (cp/decl.o): Likewise.
2931         (cp/decl2.o): Likewise.
2932         (cp/pt.o): Likewise.
2933         (cp/semantics.o): Likewise.
2934         * config-lang.in (gtfiles): Do not reference cp/lex.h.
2935         * class.c: Do not include lex.h.
2936         (add_implicitly_declared_members): Do not use
2937         adding_implicit_members.
2938         (check_bases_and_members): Do not talk about grok_x_components.
2939         * cp/cp-tree.h (adding_implicit_members): Remove.
2940         (cp_storage_class): New type.
2941         (cp_decl_spec): Likewise.
2942         (cp_decl_specifier_seq): Likewise.
2943         (cp_parameter_declarator): Use it for the decl_specifiers field.
2944         (check_tag_decl): Adjust prototype.
2945         (shadow_tag): Likewise.
2946         (groktypename): Likewise.
2947         (start_decl): Likewise.
2948         (start_function): Likewise.
2949         (start_method): Likewise.
2950         (grok_x_components): Remove.
2951         (grokfield): Adjust prototype.
2952         (grokbitfield): Likewise.
2953         (finish_member_class_template): Remove.
2954         * decl.c: Do not include lex.h.
2955         (adding_implicit_members): Do not define.
2956         (check_tag_decl): Do not use trees to represent decl-specifiers.
2957         (shadow_tag): Likewise.
2958         (groktypename): Likewise.
2959         (start_decl): Likewise.
2960         (grokvardecl): Likewise.
2961         (grokdeclarator): Likewise.
2962         (grokparms): Likewise.
2963         (start_function): Likewise.
2964         (start_method): Likewise.
2965         * decl.h (grokdeclarator): Adjust prototype.
2966         * decl2.c: Do not include lex.h.
2967         (grok_x_components): Remove.
2968         (grokfield): Do not use trees to represent decl-specifiers.
2969         (grokbitfield): Likewise.
2970         * lex.c: Do not include lex.h.
2971         * lex.h: Remove.
2972         * parser.c: Include target.h.
2973         (clear_decl_specs): New function.
2974         (cp_parser_translation_unit): Do not use trees to represent
2975         decl-specifiers.
2976         (cp_parser_postfix_expression): Likewise.
2977         (cp_parser_new_type_id): Likewise.
2978         (cp_parser_condition): Likewise.
2979         (cp_parser_simple_declaration): Likewise.
2980         (cp_parser_decl_specifier_seq): Likewise.
2981         (cp_parser_function_specifier_opt): Likewise.
2982         (cp_parser_conversion_type_id): Likewise.
2983         (cp_parser_template_parameter): Likewise.
2984         (cp_parser_explicit_instantiation): Likewise.
2985         (cp_parser_type_specifier): Likewise.
2986         (cp_parser_simple_type_specifier): Likewise.
2987         (cp_parser_init_declarator): Likewise.
2988         (cp_parser_type_id): Likewise.
2989         (cp_parser_type_specifier_seq): Likewise.
2990         (cp_parser_parameter_declaration): Likewise.
2991         (cp_parser_member_declaration): Likewise.
2992         (cp_parser_exception_declaration): Likewise.
2993         (cp_parser_function_definition_from_specifiers_and_declarator):
2994         Likewise.
2995         (cp_parser_single_declaration): Likewise.
2996         (cp_parser_save_member_function_body): Likewise.
2997         (cp_parser_friend_p): Likewise.
2998         (cp_parser_set_storage_class): New function.
2999         (cp_parser_set_decl_spec_type): Likewise.
3000         * pt.c: Do not include lex.h.
3001         * semantics.c: Likewise.
3002         (finish_member_class_template): Remove.
3004 2004-06-23  Roger Sayle  <roger@eyesopen.com>
3006         * call.c (build_cxx_call): Don't call expand_tree_builtin.  No
3007         longer take both "args" and "convert_args" as arguments.
3008         (build_op_delete_call): Update call to build_cxx_call.
3009         (build_over_call): Likewise, update call to build_cxx_call.
3010         * cp-tree.h (build_cxx_call): Update funtion prototype.
3011         * typeck.c (build_function_call): Don't call expand_tree_builtin.
3012         * rtti.c (throw_bad_cast): Update call to build_cxx_call.
3013         (throw_bad_typeid): Likewise.
3014         (build_dynamic_cast_1): Likewise.
3016 2004-06-22  Richard Henderson  <rth@redhat.com>
3018         * class.c (build_vfn_ref): Take a pointer not object.  Build
3019         an OBJ_TYPE_REF.
3020         (cp_fold_obj_type_ref): New.
3021         * call.c (build_over_call): Update build_vfn_ref call.
3022         * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
3023         * cp-tree.h (cp_fold_obj_type_ref): Declare.
3025 2004-06-21  Jason Merrill  <jason@redhat.com>
3027         PR c++/16112
3028         * cp-gimplify.c (cp_gimplify_init_expr): Look through
3029         CLEANUP_POINT_EXPR.
3031 2004-06-21  Mark Mitchell  <mark@codesourcery.com>
3033         * cp-tree.def (NEW_EXPR): Add a fourth slot.
3034         * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
3035         (TREE_PARMLIST): Likewise.
3036         (CALL_DECLARATOR_PARMS): Likewise.
3037         (CALL_DECLARATOR_QUALS): Likewise.
3038         (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
3039         (cp_declarator_kind): New type.
3040         (cp_parameter_declarator): Likewise.
3041         (cp_declarator): Likewise.
3042         (cp_error_declarator): Likewise.
3043         (no_parameters): Likewise.
3044         (groktypename): Change prototype.
3045         (start_decl): Likewise.
3046         (start_handler_parms): Likewise.
3047         (get_scope_of_declarator): Likewise.
3048         (start_function): Likewise.
3049         (start_preparsed_function): New function.
3050         (start_function): Change prototype.
3051         (start_method): Likewise.
3052         (grokfield): Likewise.
3053         (grokbitfield): Likewise.
3054         (build_new): Likewise.
3055         (make_pointer_declarator): Remove.
3056         (make_reference_declarator): Likewise.
3057         (make_call_declarator): Likewise.
3058         (set_quals_and_spec): Likewise.
3059         (process_template_parm): Change prototype.
3060         (begin_function_definition): Remove.
3061         (finish_parmlist): Remove.
3062         * decl.c (groktypename): Do not use trees to represent
3063         declarators.
3064         (start_decl): Likewise.
3065         (start_handler_parms): Remove.
3066         (get_scope_of_declarator): Reimplement.
3067         (grokdeclarator): Do not use trees to represent declarators.
3068         (grokparms): Likewise.
3069         (start_function): Likewise.
3070         (start_method): Likewise.
3071         (build_void_list_mode): Do not use TREE_PARMLIST.
3072         * decl.h (grokdeclarator): Change prototype.
3073         * decl2.c (grok_method_quals): Robustify.
3074         (grok_x_components): Do not use trees to represent declarators.
3075         (grokfield): Likewise.
3076         (grokbitfield): Likewise.
3077         (start_objects): Build FUNCTION_DECLs, not declarators.
3078         (start_static_storage_duration_function): Likewise.
3079         * init.c (build_new): Simplify.
3080         * lex.c (make_pointer_declarator): Remove.
3081         (make_reference_declarator): Likewise.
3082         (make_call_declarator): Likewise.
3083         (set_quals_and_spec): Likewise.
3084         * method.c (use_thunk): Use start_preparsed_function.
3085         (synthesize_method): Likewise.
3086         (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
3087         * optimize.c (maybe_clone_body): Use start_preparsed_function.
3088         * parser.c (cp_error_declarator): New variable.
3089         (declarator_obstack): Likewise.
3090         (alloc_declarator): New function.
3091         (make_declarator): Likewise.
3092         (make_id_declarator): Likewise.
3093         (make_pointer_declarator): Likewise.
3094         (make_reference_declarator): Likewise.
3095         (make_ptrmem_declarator): Likewise.
3096         (make_call_declarator): Likewise.
3097         (make_array_declarator): Likewise.
3098         (no_parameters): New variable.
3099         (make_parameter_declarator): Likewise.
3100         (cp_parser_check_for_definition_in_return_type): Do not use trees
3101         to represent declarators.
3102         (cp_parser_translation_unit): Likewise.
3103         (cp_parser_new_expression): Likewise.
3104         (cp_parser_new_type_id): Likewise.
3105         (cp_parser_new_declarator_opt): Likewise.
3106         (cp_parser_direct_new_declarator): Likewise.
3107         (cp_parser_condition): Likewise.
3108         (cp_parser_declaration_statement): Likewise.
3109         (cp_parser_declaration): Likewise.
3110         (cp_parser_conversion_type_id): Likewise.
3111         (cp_parser_conversion_declarator_opt): Likewise.
3112         (cp_parser_template_parameter_list): Likewise.
3113         (cp_parser_template_parameter): Likewise.
3114         (cp_parser_explicit_instantiation): Likewise.
3115         (cp_parser_init_declarator): Likewise.
3116         (cp_parser_declarator): Likewise.
3117         (cp_parser_direct_declarator): Likewise.
3118         (cp_parser_type_id): Likewise.
3119         (cp_parser_parameter_declaration_clause): Likewise.
3120         (cp_parser_parameter_declaration_list): Likewise.
3121         (cp_parser_parameter_declaration): Likewise.
3122         (cp_parser_member_declaration): Likewise.
3123         (cp_parser_exception_declaration): Likewise.
3124         (cp_parser_check_declarator_template_parameters): Likewise.
3125         (cp_parser_function_definition_from_specifiers_and_declarator):
3126         Likewise.
3127         (cp_parser_save_member_function_body): Likewise.
3128         * pt.c (process_template_parm): Add is_non_type parameter.
3129         (convert_template_argument): Adjust call to groktypename.
3130         (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
3131         (tsubst): Do not expect declarators.
3132         (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
3133         argument.
3134         (instantiate_decl): Use start_preparsed_function.
3135         * semantics.c (begin_function_definition): Remove.
3136         (finish_parmlist): Remove.
3137         * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
3138         declarators.
3140 2004-06-21  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
3142         * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
3143         (build_new_method_call): Likewise.
3144         * decl.c (local_variable_p_walkfn): Don't walk into types.
3145         * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
3146         (build_anon_union_vars): Add new operand for COMPONENT_REF.
3147         * init.c (buld_new): Add new operand for ARRAY_REF.
3148         * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
3149         (do_build_assign_ref): Likewise.
3150         * parser.c (cp_parser_direct_new_declarator): Add new operands
3151         for ARRAY_REF.
3152         (cp_parser_direct_declarator): Likewise.
3153         * pt.c (tsubst): Likewise.
3154         (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
3155         for COMPONENT_REF.
3156         * semantics.c (finish_non_static_data_member): Add new operand
3157         for COMPONENT_REF.
3158         * typeck.c (build_class_member_access_expr): Likewise.
3159         (build_class_member_access_expr, finish_class_member_access_expr):
3160         Likewise.
3161         (build_ptrmemfunc_access_expr): Likewise.
3162         (build_array_ref): Add new operands for ARRAY_REF.
3163         * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
3164         * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
3166 2004-06-21  Richard Henderson  <rth@redhat.com>
3168         * dump.c (cp_dump_tree): Don't use dump_next_stmt.
3169         * parser.c (cp_parser_jump_statement): Update commentary.
3170         * pt.c (tsubst_expr): Use RETURN_EXPR.
3171         * semantics.c (finish_return_stmt): Likewise.
3172         (finalize_nrv_r): Likewise.
3173         * typeck.c, typeck2.c: Update file start commentary.
3175 2004-06-21  Richard Henderson  <rth@redhat.com>
3177         * semantics.c (finish_expr_stmt): Call verify_sequence_points.
3179 2004-06-20  Richard Henderson  <rth@redhat.com>
3181         * cp-tree.h (add_decl_stmt): Declare.
3182         * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
3183         * semantics.c (maybe_cleanup_point_expr): New.
3184         (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
3185         finish_for_expr, finish_switch_cond): Use it.
3186         (finalize_nrv_r): Don't build an EXPR_STMT.  Don't frob TREE_CHAIN.
3188 2004-06-20  Richard Henderson  <rth@redhat.com>
3190         * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
3191         * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
3192         (cp_gimplify_expr): Call it.
3193         (gimplify_cleanup_stmt): Move from c-gimplify.c.
3194         (cp_genericize): New.
3195         * decl.c (finish_function): Call it.
3196         * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
3197         (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
3198         (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
3199         (cp_genericize): Declare.
3200         * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
3201         * dump.c (cp_dump_tree): Likewise.
3202         * semantics.c (push_cleanup): Move from c-semantics.c.
3204 2004-06-20  Zack Weinberg  <zack@codesourcery.com>
3206         * cp-lang.c (has_c_linkage): Implement.
3208         * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
3209         * decl.c (duplicate_decls): Use COPY_DECL_RTL.
3210         (builtin_function_1): Don't call make_decl_rtl.
3211         (build_cp_library_fn): Don't call set_mangled_name_for_decl.
3212         (grokvardecl): Don't call mangle_decl.
3213         * except.c (nothrow_libfn_p): Look at DECL_NAME, not
3214         DECL_ASSEMBLER_NAME.
3215         * method.c (set_mangled_name_for_decl): Delete.
3216         * name-lookup.c (pushdecl): When a local extern shadows a
3217         file-scope declaration of the same object, give both DECLs the
3218         same DECL_UID.
3219         * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
3220         on DECL_ASSEMBLER_NAME.
3222 2004-06-19  Richard Henderson  <rth@redhat.com>
3224         * cp-gimplify.c: Remove unnecessary prototypes.
3225         (cp_gimplify_stmt): Merge into ...
3226         (cp_gimplify_expr): ... here.  Move to end of file.  Handle
3227         stmts_are_full_exprs_p frobbing.
3228         * cp-tree.h (cp_gimplify_stmt): Remove.
3229         * pt.c (tsubst_expr): Merge prep_stmt and unify.
3230         * tree.c (init_tree): Don't set lang_gimplify_stmt.
3232 2004-06-18  Richard Henderson  <rth@redhat.com>
3234         PR c++/16034
3235         * semantics.c (begin_cond): New.
3236         (finish_cond): Rewrite to handle template DECL_STMTs specially.
3237         Assume that non-template decls go land before the conditional.
3238         (simplify_loop_decl_cond): Likewise.
3239         (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
3240         finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
3241         begin_switch_stmt, finish_switch_cond): Update to match.
3243 2004-06-17  Jason Merrill  <jason@redhat.com>
3245         PR c++/16015
3246         * semantics.c (simplify_aggr_init_expr): Don't return the slot.
3247         (finish_stmt_expr_expr): Update type after conversions.
3248         (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
3249         Handle void initializer.
3250         * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
3252 2004-06-17  Geoffrey Keating  <geoffk@apple.com>
3254         * class.c (build_clone): Don't call defer_fn, let mark_used do it.
3255         * cp-tree.h (defer_fn): Delete.
3256         * decl2.c (defer_fn): Delete.
3257         (finish_file): Simplify deferred_fns loops; check that
3258         only used inline functions get into deferred_fns.
3259         (mark_used): Inline previous contents of defer_fn.
3261 2004-06-16  Richard Henderson  <rth@redhat.com>
3263         * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
3264         (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
3265         * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
3266         of CTOR_INITIALIZER ...
3267         (pp_cxx_statement): ... here.
3268         * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
3269         (finish_function): Use alloc_stmt_list to zap entire function.
3270         * parser.c (cp_parser_compound_statement): Update commentary.
3271         * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
3272         * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
3273         (finish_stmt_expr): Don't look through COMPOUND_STMT.
3275 2004-06-16  Geoffrey Keating  <geoffk@apple.com>
3277         * pt.c (mark_decl_instantiated): Don't call defer_fn.
3279 2004-06-16  Richard Henderson  <rth@redhat.com>
3281         * parser.c (cp_parser_labeled_statement): Update commentary.
3282         * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
3283         * tree.c (mark_local_for_remap_r): Likewise.
3285 2004-06-16  Richard Henderson  <rth@redhat.com>
3287         * parser.c (cp_parser_asm_definition): Update commentary.
3288         * pt.c (tsubst_expr): Use ASM_EXPR.
3289         * semantics.c (finish_asm_stmt): Likewise.
3291 2004-06-16  Richard Henderson  <rth@redhat.com>
3293         * decl.c (finish_destructor_body): Use LABEL_EXPR.
3294         * parser.c (cp_parser_statement): Update commentary.
3295         * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
3296         * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
3297         * tree.c (mark_local_for_remap_r): Likewise.
3299 2004-06-16  Richard Henderson  <rth@redhat.com>
3301         PR c++/16012
3302         * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
3303         statement in FOR_INIT_STMT for templates.
3305 2004-06-15  Richard Henderson  <rth@redhat.com>
3307         * call.c (initialize_reference): Don't build CLEANUP_STMT here.
3308         * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
3309         (genericize_try_block): Use gimplify_stmt.
3310         (genericize_catch_block, genericize_eh_spec_block): Likewise.
3311         (cp_gimplify_init_expr): Remove STMT_EXPR special case.
3312         (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
3313         * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
3314         (cp_tree_chain_matters_p): Remove.
3315         * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
3316         (COMPOUND_STMT_BODY_BLOCK): New.
3317         (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
3318         (EXPR_STMT_STMT_EXPR_RESULT): New.
3319         (building_stmt_tree): Check cur_stmt_list.
3320         (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
3321         (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
3322         * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
3323         (cp_finish_decl): Use push_cleanup.
3324         (start_function, finish_function): Use statement lists.
3325         (finish_stmt): Do nothing.
3326         * except.c (begin_eh_spec_block): Use statement lists.
3327         (check_handlers_1, check_handlers): Likewise.
3328         * init.c (construct_virtual_base): Don't add extra compound stmts.
3329         (build_vec_init): Likewise.
3330         * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
3331         * name-lookup.h (struct cp_binding_level): Add statement_list.
3332         * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
3333         (cp_parser_labeled_statement, cp_parser_expression_statement,
3334         cp_parser_statement_seq_opt): Likewise.
3335         (cp_parser_compound_statement): Likewise.  Take bool for try block.
3336         (cp_parser_selection_statement): Tidy if processing.
3337         (cp_parser_already_scoped_statement): Rewrite to do what it says.
3338         * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
3339         (tsubst_expr): Rewrite STMT_EXPR processing.  Handle STATEMENT_LIST.
3340         Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
3341         * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
3342         (finish_cond): New, rewritten from FINISH_COND.
3343         (simplify_loop_decl_cond): New.
3344         (finish_expr_stmt): Avoid nested EXPR_STMTs.
3345         (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
3346         begin_else_clause, finish_else_clause, finish_if_stmt,
3347         begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
3348         begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
3349         finish_for_cond, finish_for_stmt, begin_switch_stmt,
3350         finish_switch_cond, finish_switch_stmt, begin_try_block,
3351         finish_try_block, finish_cleanup_try_block, finish_function_try_block,
3352         finish_handler_sequence, finish_function_handler_sequence,
3353         begin_handler, finish_handler_parms, finish_handler,
3354         begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
3355         using statement lists.
3356         (begin_compound_stmt): Replace has_no_scope argument with flags.
3357         Update all callers.  Use statement lists.
3358         (finish_compound_stmt): Likewise.
3359         (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
3360         (current_scope_stmt_stack): Remove.
3361         (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
3362         * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
3363         Rewrite with statement lists.
3365 2004-06-15  Alexandre Oliva  <aoliva@redhat.com>
3367         * parser.c: Change all assignments of c_lex_string_translate
3368         to true and false to 1 and 0.
3369         (cp_lexer_read_token): Convert type of the translated string.
3370         (cp_parser_skip_to_closing_parentheses): Preserve original
3371         value of c_lex_string_translate, and set it to -1 while
3372         running.
3373         (cp_parser_cache_group): Likewise.
3374         (cp_parser_cache_group_1): Renamed.
3375         (cp_parser_asm_operand_list): Remove redundant setting of
3376         c_lex_string_translate.
3377         (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
3378         Handle chained strings.
3380 2004-06-12  Andrew Pinski  <apinski@apple.com>
3382         PR c++/14639
3383         Revert:
3384         2004-06-02  Andrew Pinski  <pinskia@physics.uc.edu>
3386                 * cp-tree.h: Fix typo.
3388                 * cp-tree.h: Include cgraph.h
3389                 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
3390                 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
3392 2004-06-12  Jason Merrill  <jason@redhat.com>
3394         PR tree-optimization/14107
3395         * decl.c (finish_function): Warn about no return in all functions.
3397 2004-06-15  Paolo Bonzini  <bonzini@gnu.org>
3399         * cp-tree.h (struct language_function): Remove cannot_inline.
3400         * decl.c (save_function_data): cannot_inline is no more.
3401         (cxx_push_function_context): Likewise.
3402         * decl2.c (start_objects, start_static_storage_duration_function):
3403         Reset DECL_INLINE, set DECL_UNINLINABLE.
3405 2004-06-14  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
3407         PR c++/15967
3408         * search.c (lookup_field): Propagate the ambiguity list.
3409         (lookup_fnfields): Likewise.
3411 2004-06-14  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
3413         PR c++/15947
3414         * parser.c (cp_parser_template_name): Ctors/dtors never need a
3415         template keyword to disambiguate.
3417 2004-06-14  Mark Mitchell  <mark@codesourcery.com>
3419         PR c++/15096
3420         * decl.c (grokdeclarator): Ignore pointer-to-members when
3421         computing template depth.
3423         PR c++/14930
3424         * name-lookup.c (pushtag): Do not try to put class declarations in
3425         explicit specialization scopes.
3427 2004-06-11  Andrew Pinski  <pinskia@physics.uc.edu>
3429         * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
3431 2004-06-11  Mark Mitchell  <mark@codesourcery.com>
3433         PR c++/15862
3434         * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
3435         bindings for undeclared built-ins.
3437 2004-06-11  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
3439         * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
3440         appear at the correct location.
3442 2004-06-10  Jason Merrill  <jason@redhat.com>
3444         PR c++/15875
3445         Revert:
3446         2004-06-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3447         * init.c (build_offset_ref): Build SCOPE_REF with non-null
3448         TREE_TYPE for non-dependent names.
3449         * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
3450         unknown_type_node as its TREE_TYPE.
3451         * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
3452         * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
3453         (dump_expr) <SCOPE_REF case>: Likewise.
3455 2004-06-10  Mark Mitchell  <mark@codesourcery.com>
3457         PR c++/15227
3458         * parser.c (cp_parser_direct_declarator): Robustify.
3460         PR c++/15877
3461         * pt.c (tsubst_copy): Use decl_constant_value on enumeration
3462         constants in non-dependent contexts.
3464         PR c++/14211
3465         PR c++/15076
3466         * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
3467         necessary.
3469 2004-06-10  Jakub Jelinek  <jakub@redhat.com>
3471         PR c++/14791
3472         * decl.c (duplicate_decls): Handle fileptr_type_node arguments
3473         specially.
3475 2004-06-09  Mark Mitchell  <mark@codesourcery.com>
3477         Revert:
3478         PR c++/15815
3479         2004-06-07  Mark Mitchell  <mark@codesourcery.com>
3480         * lex.c (handle_pragma_interface): Deprecate.
3481         (handle_pragma_implementation): Likewise.
3483 2004-06-09  Andrew Pinski  <pinskia@physics.uc.edu>
3485         * g++spec.c (lang_specific_driver): Remove check for -lm
3486         and -lmath when check it see if it was the math library.
3488 2004-06-08  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
3490         PR c++/7841
3491         * parser.c (cp_parser_direct_declarator): Reject constructor named
3492         as qualified template-id.
3494 2004-06-07  Mark Mitchell  <mark@codesourcery.com>
3496         PR c++/15815
3497         * lex.c (handle_pragma_interface): Deprecate.
3498         (handle_pragma_implementation): Likewise.
3500 2004-06-07  Mark Mitchell  <mark@codesourcery.com>
3502         PR c++/15766
3503         * parser.c (cp_parser_iteration_statement): Fix typo in error
3504         message.
3506         PR c++/14777
3507         * pt.c (tsubst_default_argument): Do not defer access checks
3508         while substituting into the default argument.
3510         PR c++/15554
3511         * pt.c (tsubst_copy): Do not try to substitute for an enumeration
3512         constant in a non-dependent context.
3514         PR c++/15057
3515         * except.c (build_throw): Ensure that temp_expr has been
3516         initialized.
3518 2004-06-06  Roger Sayle  <roger@eyesopen.com>
3520         * cp/cp-tree.h (lvalue_or_else): Add function prototype.
3522 2004-06-06  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
3524         PR c++/15503
3525         * parser.c (cp_parser_mem_initializer_id): Gracefully reject
3526         'typename', and accept 'template'.
3528 2004-06-03  Andrew Pinski  <pinskia@physics.uc.edu>
3529             Jan Hubicka  <jh@suse.cz>
3531         PR c++/14639
3532         * method.c (use_think): Do not mark thunk as referenced.
3534 2004-06-03  Matt Austern  <austern@apple.com>
3536         PR c++/15428
3537         * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
3538         is nonzero, and if we see a noninline definition of a key method,
3539         make the vtables nonweak.
3541 2004-06-02  Matt Austern  <austern@apple.com>
3543         * cp-tree.h (instantiate_decl): new boolean parameter,
3544         undefined_ok. Current behavior is equivalent to its being 0.
3545         * decl2.c (mark_used): Add new argument when calling instantiate_decl
3546         * pt.c (mark_decl_instantiated): Unconditionally make
3547         instantiations explicit unconditionally
3548         (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
3549         since mark_decl_instantiated now does it.
3550         (instantiate_class_member): New.  Instantiate a member of an
3551         explicitly instantiated class template.
3552         (do_type_instantiation): Explicitly instantiate members of an
3553         explicitly instantiated class template.
3554         (instantiate_decl): if undefined_ok is nonzero, and if we're
3555         trying to explicitly instantiated a template with no definition,
3556         change it to an implicit instantiation.
3557         (instantiate_pending_templates): Add new argument to instantiate_decl.
3558         * tree.c (cp_cannot_inline_tree_fn): Likewise.
3560 2004-06-02  Andrew Pinski  <pinskia@physics.uc.edu>
3562         * cp-tree.h: Fix typo.
3564         * cp-tree.h: Include cgraph.h
3565         (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
3566         TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
3568 2004-06-01  Jason Merrill  <jason@redhat.com>
3570         PR c++/15142
3571         * call.c (call_builtin_trap): Remove type parm.
3572         (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
3573         (build_x_va_arg): Dereference a null pointer for a non-POD argument.
3575 2004-06-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3577         PR c++/13092
3578         * init.c (build_offset_ref): Build SCOPE_REF with non-null
3579         TREE_TYPE for non-dependent names.
3580         * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
3581         unknown_type_node as its TREE_TYPE.
3582         * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
3583         * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
3584         (dump_expr) <SCOPE_REF case>: Likewise.
3586 2004-06-01  Richard Henderson  <rth@redhat.com>
3587             Andrew Pinski  <pinskia@physics.uc.edu>
3589         * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
3590         * parser.c (struct cp_parser): Remove in_offsetof.
3591         (cp_parser_new): Don't set it.
3592         (cp_parser_unary_expression): Don't check it.
3593         (cp_parser_postfix_open_square_expression): Split out from ...
3594         (cp_parser_postfix_expression): ... here.
3595         (cp_parser_postfix_dot_deref_expression): Likewise.
3596         (cp_parser_builtin_offsetof): New.
3597         (cp_parser_primary_expression): Use it.
3599 2004-06-01  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
3601         PR c++/14932
3602         * parser.c (cp_parser_postfix_expression): Allow subscript
3603         operator in offsetof.
3605 2004-05-31  Mark Mitchell  <mark@codesourcery.com>
3607         PR c++/15701
3608         * friend.c (add_friend): Do not try to perform access checks for
3609         functions from dependent classes.
3611 2004-05-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3613         * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
3614         (pp_cxx_begin_template_argument_list): Turn into a function.
3615         (pp_cxx_end_template_argument_list): Likewise.
3616         (pp_cxx_separate_with): Define.
3617         (pp_cxx_unqualified_id): Tidy.
3618         (pp_cxx_primary_expression): Likewise.
3619         (pp_cxx_postfix_expression): Likewise.
3620         (pp_cxx_expression): Likewise.
3621         (pp_cxx_simple_type_specifier): Likewise.
3622         (pp_cxx_type_specifier_seq): Likewise.
3623         (pp_cxx_parameter_declaration_clause): Likewise.
3624         (pp_cxx_exception_specification): Likewise.
3625         (pp_cxx_direct_declarator): Likewise.
3626         (pp_cxx_type_id): Likewise.
3627         * cxx-pretty-print.h (pp_cxx_whitespace): Export from
3628         cxx-pretty-print.c.
3629         (pp_cxx_left_paren): Likewise.
3630         (pp_cxx_right_paren): Likewise.
3631         (pp_cxx_left_brace): Likewise.
3632         (pp_cxx_right_brace): Likewise.
3633         (pp_cxx_left_bracket): Likewise.
3634         (pp_cxx_right_bracket): Likewise.
3635         (pp_cxx_dot): Likewise.
3636         (pp_cxx_identifier): Likewise.
3637         (pp_cxx_tree_identifier): Likewise.
3638         (pp_cxx_ampersand): New macro.
3639         (pp_cxx_star): Likewise.
3640         (pp_cxx_arrow): Likewise.
3641         (pp_cxx_semicolon): Likewise.
3642         (pp_cxx_complement): Likewise.
3643         (pp_cxx_begin_template_argument_list): Declaree.
3644         (pp_cxx_end_template_argument_list): Likewise.
3645         (pp_cxx_colon_colon): likewise.
3647 2004-05-31  Eric Botcazou  <ebotcazou@libertysurf.fr>
3649         * parser.c (cp_parser_simple_type_specifier): Explicitly test
3650         against NULL_TREE.
3652 2004-05-31  Kazu Hirata  <kazu@cs.umass.edu>
3654         * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
3655         typeck.c: Fix comment formatting.
3657 2004-05-30  Andrew Pinski  <pinskia@physics.uc.edu>
3659         * cp-lang.c (cp_expand_decl): Remove.
3660         (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
3662 2004-05-30  Andreas Jaeger  <aj@suse.de>
3664         * lang-specs.h: Add missing initializers for .ii.
3666 2004-05-28  Aldy Hernandez  <aldyh@redhat.com>
3668         * decl.c (cp_make_fname_decl): Free return value from
3669         fname_as_string.
3671 2004-05-28  Mark Mitchell  <mark@codesourcery.com>
3673         PR c++/15083
3674         * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
3675         even in a templat.e
3676         * init.c (build_new): Likewise.
3678         PR c++/15640
3679         * name-lookup.c (arg_assoc): Robustify.
3681         PR c++/15471
3682         * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
3683         when determining the scope to use for a pointer to member.
3684         (lookup_anon_field): Give it external linkage.
3685         * cp-tree.h (lookup_anon_field): Declare it.
3686         * expr.c (cplus_expand_constant): Use it.
3688 2004-05-28  Mark Mitchell  <mark@codesourcery.com>
3690         PR c++/14668
3691         * parser.c (cp_parser_simple_type_specifier): Call
3692         maybe_note_name_used_in_class.
3694 2004-05-28  Tom Marshall  <tmarshall@real.com>
3696         PR c++/15214
3697         * class.c (finish_struct_1): Warn only if the dtor is non-private or
3698         the class has friends.
3700 2004-05-27  Adam Nemet  <anemet@lnxw.com>
3702         PR c++/12883
3703         * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
3704         TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
3706 2004-05-24  Geoffrey Keating  <geoffk@apple.com>
3708         * method.c (implicitly_declare_fn): Don't call defer_fn; abort
3709         if it might be needed.
3710         * pt.c (mark_decl_instantiated): Only call defer_fn if
3711         the function actually needs processing in finish_file.
3712         * decl2.c (finish_file): Add check that elements in
3713         deferred_fns_used are really needed there.  Remove unnecessary
3714         test of DECL_SAVED_TREE.
3716 2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
3718         * Make-lang.in: No need to specify $(LIBCPP).
3720 2004-05-23  Mark Mitchell  <mark@codesourcery.com>
3722         PR c++/15044
3723         * parser.c (cp_parser_class_head): Robustify.
3725         PR c++/15317
3726         * parser.c (cp_parser_decl_specifier_seq): Correct error in
3727         comment.
3728         (cp_parser_constructor_declarator_p): Treat attributes
3729         as decl-specifiers.
3731         PR c++/15329
3732         * typeck.c (build_unary_op): Do not attempt to resolve casts to
3733         base classes in templates.
3735 2004-05-23  Mark Mitchell  <mark@codesourcery.com>
3737         PR c++/15165
3738         * pt.c (instantiate_template): Robustify.
3740 2004-05-23  Mark Mitchell  <mark@codesourcery.com>
3742         PR c++/15025
3743         * decl.c (xref_tag): Issue errors about redeclaring template
3744         classes as non-template classes.
3746 2004-05-23  Mark Mitchell  <mark@codesourcery.com>
3748         PR c++/14821
3749         * name-lookup.c (supplement_binding): Allow redefinitions of
3750         namespace aliases.
3752         PR c++/14883
3753         * parser.c (cp_parser_template_argument): Robustify.
3755 2004-05-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3757         * class.c (alter_access): Use %E format specifier to print an
3758         identifier node.  Avoid looking at the IDENTIFIER_POINTER.
3759         (push_lang_context): Likewise.
3760         * decl.c (lookup_label): Likewise.
3761         (grokdeclarator): Likewise.
3762         * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
3763         * pt.c (do_type_instantiation): Likewise.
3764         * tree.c (handle_java_interface_attribute): Likewise.
3765         (handle_com_interface_attribute): Likewise.
3766         (handle_init_priority_attribute): Likewise.
3768 2004-05-22  Mark Mitchell  <mark@codesourcery.com>
3770         PR c++/15285
3771         PR c++/15299
3772         * pt.c (build_non_dependent_expr): Expand the set of tree nodes
3773         recognized as overloaded functions.
3775 2004-05-22  Mark Mitchell  <mark@codesourcery.com>
3777         PR c++/15507
3778         * class.c (layout_nonempty_base_or_field): Do not try to avoid
3779         layout conflicts for unions.
3781         PR c++/15542
3782         * typeck.c (build_x_unary_op): Instantiate template class
3783         specializations before looking for "operator &".
3785         PR c++/15427
3786         * typeck.c (complete_type): Layout non-dependent array types, even
3787         in templates.
3789         PR c++/15287
3790         * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
3791         template.
3793 2004-05-22  Roger Sayle  <roger@eyesopen.com>
3795         * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
3796         returning when TREE_TYPE is error_mark_node.
3797         * typeck.c (require_complete_type): Return error_mark_node if
3798         value's type is an error_mark_node.
3800 2004-05-20  Andrew Pinski  <pinskia@physics.uc.edu>
3802         * optimize.c (calls_setjmp_r): Remove.
3803         (calls_setjmp_p): Remove.
3804         * cp-tree.c (calls_setjmp_p): Remove.
3805         * decl.c (finish_function): Do not call calls_setjmp_p.
3807 2004-05-18  Zack Weinberg  <zack@codesourcery.com>
3809         * decl.c (cp_finish_decl): Use mark_decl_referenced.
3810         * decl2.c (maybe_make_one_only): Likewise.
3811         * method.c (use_thunk): Likewise.
3813 2004-05-18  Jason Merrill  <jason@redhat.com>
3815         * class.c (build_base_path): Tidy a bit.
3817 2004-05-14  Geoffrey Keating  <geoffk@apple.com>
3819         * name-lookup.c (struct scope_binding): New.
3820         (EMPTY_SCOPE_BINDING): New.
3821         (lookup_using_namespace): Take a scope_binding instead of a
3822         cxx_binding.
3823         (qualified_lookup_using_namespace): Likewise.
3824         (cxx_binding_clear): Delete.
3825         (do_nonmember_using_decl): Use a scope_binding instead of a
3826         cxx_binding.
3827         (lookup_tag): Don't call select_decl.
3828         (ambiguous_decl): Don't return anything (and change callers to match).
3829         Take a scope_binding as the second parameter.
3830         (lookup_namespace_name): Use a scope_binding instead of a
3831         cxx_binding.
3832         (unqualified_namespace_lookup): Likewise.
3833         (lookup_qualified_name): Likewise.
3834         (select_decl): Take a scope_binding instead of a cxx_binding.
3835         Use macros rather than hand-coding tests for type-ness.
3837 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
3839         * cp-gimplify.c: Rename from cp-simplify.c.
3840         * Make-lang.in, optimize.c: Update.
3842 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
3844         Merge from tree-ssa-20020619-branch.  See
3845         ChangeLog.tree-ssa for details.
3847         * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
3848         cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
3849         expr.c, init.c, name-lookup.h, optimize.c, parser.c,
3850         pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
3851         Merged.
3852         * cp-mudflap.c: New file.
3853         * cp-simplify.c:: New file.
3855 2004-05-03  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
3857         PR c++/14389
3858         * decl2.c (check_classfn): For member templates, compare also the
3859         template parameters to match the declaration.
3860         * cp-tree.h: Adjust declaration of check_classfn.
3861         * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
3862         * friend.c (do_friend): Likewise.
3863         * pt.c (tsubst_friend_function): Likewise.
3865 2004-05-01  Zack Weinberg  <zack@codesourcery.com>
3867         * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
3868         Instead, dig into the representation type to find the array bound.
3870 2004-04-30  Jason Merrill  <jason@redhat.com>
3872         Refer to base members using COMPONENT_REFs where possible.
3873         * class.c (build_simple_base_path): New fn.
3874         (build_base_path): Use it for non-virtual base references.
3875         (layout_class_type): Change base fields to their real type
3876         after layout is done.
3877         * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
3878         * cp-lang.c (cxx_get_alias_set): Use it.
3880 2004-04-30  Kazu Hirata  <kazu@cs.umass.edu>
3882         * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
3883         comment typos.
3885 2004-04-23  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
3887         PR c++/15064
3888         * parser.c (cp_parser_postfix_expression): typeid operator cannot be
3889         used in integral constant expressions.
3891 2004-04-22  Mark Mitchell  <mark@codesourcery.com>
3893         * init.c (build_aggr_init): Fix accidental use of C99 construct in
3894         previous change.
3896         * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
3897         braced initializer.
3898         * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
3899         * decl.c (reshape_init): Use it.
3900         * init.c (perform_member_init): Remove redundant condition.
3901         (build_aggr_init): Adjust to handle brace-enclosed initializers
3902         correctly.
3903         (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
3905         * parser.c (cp_parser_initializer_clause): Do not set
3906         TREE_HAS_CONSTRUCTOR on the initializer.
3907         * rtti.c (tinfo_base_init): Likewise.
3908         (generic_initializer): Likewise.
3909         (ptr_initializer): Likewise.
3910         (ptm_initializer): Likewise.
3911         (class_initializer): Likewise.
3912         (get_pseudo_ti_init): Likewise.
3913         * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
3915 2004-04-22  Alan Modra  <amodra@bigpond.net.au>
3917         * name-lookup.c (anonymous_namespace_name): Make static.
3919 2004-04-19  Roger Sayle  <roger@eyesopen.com>
3921         PR middle-end/14531
3922         * class.c (build_base_path): Call fold whilst building the NULL
3923         pointer check expression trees.
3925 2004-04-15  Bryce McKinlay  <mckinlay@redhat.com>
3927         * init.c (build_new_1): Don't use type size argument for Java
3928         _Jv_AllocObject call.
3930 2004-04-09  Danny Smith  <dannysmith@users.sourceforge.net>
3932         * method.c (make_alias_for_thunk): Remove preprocessor guard on
3933         declaration and definition.
3935 2004-04-08  Danny Smith  <dannysmith@users.sourceforge.net>
3937         PR c++/14808
3938         * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
3939         than ASM_OUTPUT_DEF.
3941 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
3943         * decl2.c (mark_used): Don't segfault if cfun != NULL but
3944         current_function_decl == NULL.
3946 2004-04-05  Nathan Sidwell  <nathan@codesourcery.com>
3948         PR c++/3518
3949         * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
3950         level.
3952 2004-04-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
3954         * init.c (decl_constant_value): Don't look at DECL_INITIAL
3955         of PARM_DECL.
3956         * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
3957         or TREE_SIDE_EFFECTS of a type.
3959 2004-04-02  Nathan Sidwell  <nathan@codesourcery.com>
3961         PR c++/14007
3962         * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
3963         cv-qualifier unification.
3964         * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
3966 2004-04-02  Jan Hubicka  <jh@suse.cz>
3968         * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
3969         * cp-tree.h (cp_update_decl_after_saving): Declare.
3970         * tree.c (cp_update_decl_after_saving): Define.
3972 2004-04-01  Mark Mitchell  <mark@codesourcery.com>
3974         PR c++/14803
3975         * typeck.c (get_delta_difference): Call fold before returning the
3976         value.
3978 2004-04-01  Richard Henderson  <rth@redhat.com>
3980         PR c++/14804
3981         * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
3982         * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
3984 2004-04-01  Mark Mitchell  <mark@codesourcery.com>
3986         PR c++/14810
3987         * name-lookup.c (maybe_push_cleanup_level): Robustify.
3989 2004-04-01  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
3991         * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
3993 2004-03-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
3995         * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
3996         * class.c (check_bitfield_decl): Likewise.
3997         * cvt.c (type_promotes_to): Likewise.
3998         * decl.c (finish_enum): Likewise.
3999         * mangle.c (write_builtin_type): Likewise.
4000         * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
4001         * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
4002         (build_binary_op): Likewise.
4004 2004-03-31  Jan Hubicka  <jh@suse.cz>
4006         * tree.h (optimize_function): Kill prototype.
4007         * optimize.c (dump_function, optimize_function, dump_finction): Kill.
4008         * semantics.c (expand_body): Kill.
4010 2004-03-30  Mark Mitchell  <mark@codesourcery.com>
4012         PR c++/14724
4013         * decl.c (start_decl_1): Do not decide whether or not to create a
4014         new cleanup level until after the type has been completed.
4016         PR c++/14763
4017         * pt.c (tsubst_default_argument): Clear current_function_decl.
4019 2004-03-30  Zack Weinberg  <zack@codesourcery.com>
4021         * name-lookup.c, parser.c: Use new shorter form of GTY markers.
4023 2004-03-29  Zack Weinberg  <zack@codesourcery.com>
4025         * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
4026         is null, just print the literal name and return.
4028 2004-03-25  Kazu Hirata  <kazu@cs.umass.edu>
4030         * cxx-pretty-print.c: Fix comment typos.
4032 2004-03-24  Kazu Hirata  <kazu@cs.umass.edu>
4034         * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
4035         Update copyright.
4037 2004-03-23  Ziemowit Laski  <zlaski@apple.com>
4039         * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
4040         * mangle.c (write_type): Add call to 'mangle_fundamental_type'
4041         target hook.
4043 2004-03-23  Zack Weinberg  <zack@codesourcery.com>
4045         PR 12267, 12391, 12560, 13129, 14114, 14133
4046         * cp-lang.c (c_reset_state): Delete.
4047         (push_file_scope, pop_file_scope): New stubs.
4048         * parser.c (c_parse_file): Call sorry() here if called more than once.
4050 2004-03-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4052         * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
4053         for INTEGER_CST.
4055 2004-03-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4057         * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
4059 2004-03-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4061         * error.c (enum pad): Remove.
4062         (dump_qualifiers): Likewise.
4063         (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
4064         (dump_aggr_type): Likewise.
4065         (dump_type_suffix): Likewise.
4066         (dump_simple_decl): Likewise.
4067         (dump_function_decl): Likewise.
4068         (cv_to_string): Likewise.
4069         (dump_type_prefix): Likewise.  Adjust return void.
4070         * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
4071         cxx_pretty_print.h.
4072         (pp_cxx_template_keyword_if_needed): Document.
4073         (pp_cxx_qualified_id): Document case FUNCTION_DECL.  Tidy.
4074         (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
4075         MUST_NOT_THROW_EXPR.
4077 2004-03-21  Mark Mitchell  <mark@codesourcery.com>
4079         PR c++/14616
4080         * decl.c (cp_finish_decl): Compute the size of arrays declared in
4081         templates, if their type is non-dependent.
4083 2004-03-19  Mark Mitchell  <mark@codesourcery.com>
4085         * call.c (build_op_delete_call): Do not forget the placement
4086         arguments when iterating through mutiple delete operators.
4088         * cp-tree.h (svaed_scope): Remove last_parms.
4089         (NEW_DELETE_OPNAME_P): New macro.
4090         (last_function_parms): Remove.
4091         (do_friend): Adjust prototype.
4092         * decl.c (grokparms): Return the PARM_DECLs directly, rather than
4093         using last_function_parms.
4094         (grokfndecl): Take the PARM_DECLs as an argument, rather than
4095         using last_function_parms.
4096         (grokdeclarator): Adjust accordingly.  Do not form METHOD_TYPEs
4097         for class-specific operator new and operator delete.
4098         (grok_op_properties): Do not look for allocation functions with
4099         METHOD_TYPEs.
4100         (start_function): Use DECL_ARGUMENTS instead of
4101         last_function_parms.
4102         * decl.h (last_function_parms): Do not declare.
4103         * decl2.c (grokclassfn): Do not use last_function_parms.
4104         * friend.c (do_friend): Remove parmdecls parameter.
4105         * name-lookup.c (push_to_top_level): Do not save last_function_parms.
4106         (pop_from_top_level): Do not restore it.
4107         * pt.c (check_explicit_specialization): Do not adjust
4108         last_function_parms.
4110         * name-lookup.c (do_local_using_decl): Create a local binding for
4111         types brought in via using declarations.
4113         * name-lookup.c (lookup_arg_dependent): Handle block-scope
4114         function declarations correctly.
4116         * semantics.c (finish_id_expression): Correct handling of
4117         conversion operators to dependent types.
4119         * typeck.c (lookup_destructor): Allow the use of destructors from
4120         base classes.
4122 2004-03-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4124         * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
4125         TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
4126         * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
4127         the field is named TEMPLATE_TYPE_PARM_INDEX.
4129 2004-03-19  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
4131         PR c++/14545
4132         * parser.c (cp_parser_functional_cast): A cast to anything
4133         but integral or enumaration type is not an integral constant
4134         expression.
4135         * pt.c (value_dependent_expression_p): Handle cast expressions
4136         without operands (such as "int()").
4138 2004-03-18  Mark Mitchell  <mark@codesourcery.com>
4140         * semantics.c (finish_pseudo_destructor_expr): Allow differing
4141         cv-qualification between the type named by the
4142         pseudo-destructor-name and the object-type.
4144         * search.c (accessible_base_p): Handle non-proper bases.
4146         * name-lookup.c (do_nonmember_using_decl): If a using declaration
4147         refers to a single overloaded function, set the type of the
4148         function.
4149         * tree.c (lvalue_type): Simplify.
4150         * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
4151         unknown type.
4152         (build_unary_op): Handle OVERLOADs with known types.
4154         * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
4155         function templates.
4157         * parser.c (cp_parser_postfix_expression): Handle the use of
4158         "typename" in non-dependent contexts.  Convert appropriately when
4159         when using a qualified name after "->" or ".".
4161         * call.c (conditional_conversion): Honor the requirement that some
4162         conversions refer to the original object.
4164 2004-03-18  Mark Mitchell  <mark@codesourcery.com>
4166         * call.c (build_conditional_expr): Do not call force_rvalue for
4167         operands of void_type when the conditional expression itself has
4168         void type.
4169         * name-lookup.c (pushdecl): Don't consider a declaration of a
4170         function named "main" to be an overload of a type named "main".
4171         * parser.c (cp_parser_template_name): Perform name lookup when the
4172         template name is proceeded by "template" if the qualifying scope
4173         is non-dependent.
4174         * typeck.c (composite_pointer_type_r): Correctly handle
4175         pointer-to-member types.
4176         (build_const_cast): Likewise.
4178 2004-03-18  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4180         * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
4181         * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
4182         (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
4183         (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
4184         (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
4185         (TYPEOF_TYPE_EXPR): New macro.
4186         * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
4187         * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
4188         * pt.c (tsubst): Likewise.
4189         * semantics.c (finish_typeof): Likewise.
4190         * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
4191         and TEMPLATE_TYPE_PARM.
4192         * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
4193         (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
4195 2004-03-16  Mark Mitchell  <mark@codesourcery.com>
4197         PR c++/14586
4198         * cp-tree.h (build_new_op): Change prototype.
4199         (build_x_binary_op): Likewise.
4200         * call.c (build_new_op): Add overloaded_p parameter.
4201         * decl2.c (grok_array_decl): Adjust call to build_new_op.
4202         * parser.c (cp_parser_binary_expression): Note that uses of
4203         overloaded operators prevents an expression from being considered
4204         an integral constant.
4205         * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
4206         build_x_binary_op.
4207         * semantics.c (finish_call_expr): Likewise.
4208         * typeck.c (rationalize_conditional_expr): Likewise.
4209         (build_x_indirect_ref): Likewise.
4210         (build_x_binary_op): Likewise.
4211         (build_x_unary_op): Likewise.
4212         (build_x_compound_expr): Likewise.
4213         (build_modify_expr): Likewise.
4214         * typeck2.c (build_x_arrow): Likewise.
4216 2004-03-15  Kazu Hirata  <kazu@cs.umass.edu>
4218         * cp-lang.c, ptree.c: Update copyright.
4220 2004-03-13  Mark Mitchell  <mark@codesourcery.com>
4222         PR c++/14550
4223         * parser.c (cp_parser_non_integral_constant_expression): Encode
4224         more of the idiom that surrounded calls to this function within
4225         the function itself
4226         (cp_parser_primary_expression): Adjust accordingly.
4227         (cp_parser_postfix_expression): Likewise.
4228         (cp_parser_unary_expression): Likewise.
4229         (cp_parser_cast_expression): Likewise.
4230         (cp_parser_assignment_expression): Likewise.
4231         (cp_parser_expression): Likewise.
4232         (cp_parser_new_expression): Note that new-expressions are not
4233         allowed in integral constant expressions.
4234         (cp_parser_delete_expression): Likewise.
4236 2004-03-12  Matt Austern  <austern@apple.com>
4238         * decl2.c (maybe_make_one_only): Look at
4239         TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
4240         to make an explicit instantiation weak.
4241         * method.c (use_thunk): Make sure we call comdat_linkage
4242         when appropriate.
4243         * pt.c (do_type_instantiation): On systems where weak symbols
4244         don't go in a static archive's TOC, explicit instantiation of a
4245         class must imply *explicit* instantiation of its memeber.
4247 2004-03-11  Kazu Hirata  <kazu@cs.umass.edu>
4249         * call.c, cp-tree.h, pt.c: Fix comment typos.
4251 2004-03-10  Mark Mitchell  <mark@codesourcery.com>
4253         PR c++/14510
4254         * decl.c (xref_tag): Disregard non-type declarations when
4255         looking up a tagged type.
4257 2004-03-09  Nathan Sidwell  <nathan@codesourcery.com>
4259         PR c++/14397
4260         * call.c (convert_like_real): Build a const qualified temporary,
4261         when testing ctor access.
4263 2004-03-09  Mark Mitchell  <mark@codesourcery.com>
4265         * call.c (initialize_reference): Fix typo.
4267 2004-03-09  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
4269         PR c++/14409
4270         * pt.c (determine_specialization): For member templates, match also
4271         constness.
4273         PR c++/14448
4274         * parser.c (cp_parser_initializer_clause): Fold initializer if it is
4275         non-dependent.
4276         * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
4278 2004-03-09  Mark Mitchell  <mark@codesourcery.com>
4280         PR c++/14230
4281         * call.c (initialize_reference): Handle initializers that are
4282         class-member access expressions applies to rvalues.
4284 2004-03-09  Mark Mitchell  <mark@codesourcery.com>
4286         PR c++/14432
4287         * name-lookup.c (supplement_binding): Ignore functions that are
4288         marked DECL_ANTICIPATED.
4290 2004-03-08  Mark Mitchell  <mark@codesourcery.com>
4292         PR c++/14401
4293         * class.c (check_field_decls): Complain about non-static data
4294         members of reference type in unions.  Propagate
4295         CLASSTYPE_REF_FIELDS_NEED_INIT and
4296         CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
4297         data members.
4298         * init.c (perform_member_init): Complain about mbmers with const
4299         type that are not explicitly initialized.
4301 2004-03-08  Mark Mitchell  <mark@codesourcery.com>
4303         * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
4304         * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
4305         (lang_identifier): Remove implicit_decl and error_locus.
4306         (IDENTIFIER_IMPLICIT_DECL): Remove.
4307         (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
4308         (IDENTIFIER_ERROR_LOCUS): Likewise.
4309         (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
4310         (TYPE_ASSEMBLER_NAME_STRING): Likewise.
4311         (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
4312         (implicitly_declare): Remove.
4313         * decl.c (warn_extern_redeclared_static): Remove check of
4314         IDENTIFIER_IMPLICIT_DECL.
4315         (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
4316         (implicitly_declare): Remove.
4317         (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
4318         (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
4319         (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
4320         * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
4321         in the innermost scope, rather than at namespace scope.
4322         * name-lookup.c (push_local_binding): Give it external linkage.
4323         (pushdecl): Remove dead code.
4324         * name-lookup.h (push_local_binding): Declare it.
4325         * ptree.c (cxx_print_identifier): Don't print
4326         IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
4327         * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
4328         not IDENTIFIER_ERROR_LOCUS.
4329         * typeck.c (build_function_call): Remove dead code.
4331 2004-03-08  Jason Merrill  <jason@redhat.com>
4333         PR c++/13170
4334         * decl.c (xref_tag): Remove attribute handling.
4335         * cp-tree.h: Adjust prototype.
4336         * decl.c, parser.c, rtti.c: Adjust callers.
4337         * parser.c (cp_parser_class_head): Pass back attributes in the
4338         class head.
4339         (cp_parser_class_specifier): Adjust.
4341 2004-03-08  Matt Austern  <austern@apple.com>
4343         PR debug/14079
4344         * name-lookup.c (add_decl_to_level): Add extern variables, as well
4345         as static, to static_decls array.
4347 2004-03-05  Jason Merrill  <jason@redhat.com>
4349         * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
4351 2004-03-04  Geoffrey Keating  <geoffk@apple.com>
4353         * decl.c (grokfndecl): Update old incorrect comment.
4354         (grokvardecl): Diagnose C++ variables of type with no linkage.
4356 2004-03-01  Mark Mitchell  <mark@codesourcery.com>
4358         PR c++/14369
4359         * pt.c (build_non_dependent_expr): Do not create a
4360         NON_DEPENDENT_EXPR for a THROW_EXPR.
4362 2004-03-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4364         PR c++/14369
4365         * error.c (dump_expr): Handle THROW_EXPR.
4367 2004-03-01  Mark Mitchell  <mark@codesourcery.com>
4369         PR c++/14360
4370         * parser.c (cp_parser_postfix_expression): Do not perform Koenig
4371         lookup if ordinary name-lookup finds a non-function.
4372         * pt.c (tsubst_copy_and_build): Likewise.
4374         PR c++/14361
4375         * parser.c (cp_parser_late_parsing_default_args): Check that there
4376         are no extra tokens after the end of the default-argument
4377         expression.
4379 2004-03-01  Mark Mitchell  <mark@codesourcery.com>
4381         PR c++/14324
4382         * lex.c (retrofit_lang_decl): Treat entities with no linkage as
4383         having C++ linkage for name-mangling purposes.
4385         PR c++/14260
4386         * parser.c (cp_parser_direct_declarator): Recognize constructor
4387         declarators that use a template-id to name the class being
4388         constructed.
4390         PR c++/14337
4391         * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
4392         (tsubst_expr): Do not call tsubst_copy, even when
4393         processing_template_decl.
4395 2004-03-01  Jeff Law  <law@redhat.com>
4397         * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
4398         the proper type.
4400 2004-02-29  Mark Mitchell  <mark@codesourcery.com>
4402         PR c++/14138
4403         * name-lookup.h (push_scope): Change prototype.
4404         * name-lookup.c (push_scope): Do not reenter the current class
4405         scope.
4406         * decl.c (grokfndecl): Check return code from push_scope before
4407         calling pop_scope.
4408         * decl2.c (check_classfn): Likewise.
4409         * parser.c (cp_parser_conversion_function_id): Likewise.
4410         (cp_parser_init_declarator): Likewise.
4411         (cp_parser_direct_declarator): Likewise.
4412         (cp_parser_class_specifier): Likewise.
4413         (cp_parser_class_head): Likewise.
4414         (cp_parser_lookup_name): Likewise.
4415         (cp_parser_constructor_declarator_p): Likewise.
4416         * pt.c (instantiate_class_template): Likewise.
4417         (resolve_typename_type): Likewise.
4419 2004-02-29  Mark Mitchell  <mark@codesourcery.com>
4421         PR c++/14267
4422         * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
4423         extension.
4425         PR debug/12103
4426         * class.c (update_vtable_entry_for_fn): Do not go through
4427         covariance machinery if the type returned by an overrider is the
4428         same as the original.
4430 2004-02-29  Kazu Hirata  <kazu@cs.umass.edu>
4432         * call.c: Fix a comment typo.
4434 2004-02-27  Ziemowit Laski  <zlaski@apple.com>
4436         * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
4438 2004-02-26  Mark Mitchell  <mark@codesourcery.com>
4440         PR c++/14278
4441         * parser.c (cp_parser_parameter_declaration_list): Commit
4442         to fewer tentative parses.
4444 2004-02-26  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
4446         PR c++/14284
4447         * pt.c (dependent_type_p_r): A template template parameter is a
4448         dependent type.
4450 2004-02-26  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
4452         PR c++/14246
4453         * mangle.c (write_template_arg_literal): Don't rely on identity for
4454         boolean constants.
4456 2004-02-24  Jason Merrill  <jason@redhat.com>
4458         * tree.c (build_exception_variant): Use check_qualified_type.
4460 2004-02-23  Zack Weinberg  <zack@codesourcery.com>
4461             Kazu Hirata  <kazu@cs.umass.edu>
4463         * decl.c (cxx_init_decl_processing): Don't check
4464         flag_writable_strings.
4466 2004-02-23  Andrew Pinski  <pinskia@physics.uc.edu>
4468         PR c++/14156
4469         * typeck.c (maybe_warn_about_returning_address_of_location):
4470         Change check for VAR_DECL to use DECL_P instead.
4472 2004-02-23  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
4474         PR c++/14250
4475         * cvt.c (build_expr_type_conversion): Type must be complete before
4476         looking up for conversions.
4478 2004-02-23  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
4480         PR c++/14143
4481         * name-lookup.c (arg_assoc_class): Don't look into template
4482         arguments if it is not a primary template.
4484 2004-02-20  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
4486         PR c++/12007
4487         * method.c (use_thunk): Always clone function argument tree.
4489 2004-02-20  Mark Mitchell  <mark@codesourcery.com>
4491         PR c++/14199
4492         * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
4494         PR c++/14173
4495         * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
4496         for all type variants.
4498 2004-02-19  Mark Mitchell  <mark@codesourcery.com>
4500         PR c++/13927
4501         * decl.c (duplicate_decls): Return error_mark_node for invalid
4502         redeclarations.
4503         * name-lookup.c (push_namespace): Ignore the return value from
4504         pushdecl.
4505         * pt.c (push_template_decl_real): Robustify.
4507         PR c++/14186
4508         * name-lookup.c (push_class_level_binding): Do not complain about
4509         adding a binding for a member whose name is the same as the
4510         enclosing class if the member is located in a base class of the
4511         current class.
4513 2004-02-19  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
4515         PR c++/14181
4516         * parser.c (cp_parser_new_expression): Parse an ill-formed
4517         direct-new-declarator after a parenthesized type-id to emit good
4518         diagnostic.
4520 2004-02-18  Kazu Hirata  <kazu@cs.umass.edu>
4522         * cp-tree.def, cvt.c: Update copyright.
4524 2004-02-17  Mark Mitchell  <mark@codesourcery.com>
4526         PR c++/11326
4527         * cp-tree.h (abi_version_at_least): Remove.
4528         * mangle.c: Include flags.h.
4530 2004-02-15  Mark Mitchell  <mark@codesourcery.com>
4532         PR c++/13971
4533         * call.c (build_conditional_expr): Handle conversions between
4534         class types which result in differently cv-qualified type
4535         variants.
4537         PR c++/14086
4538         * class.c (delete_duplicate_fields_1): Remove.
4539         (delete_duplicate_fields): Likewise.
4540         (finish_struct_anon): Remove check for members with the same name
4541         as their enclosing class.
4542         (check_field_decls): Do not call duplicate_fields.
4543         * decl.c (grokdeclarator): Remove check for static data members
4544         with the same name as their enclosing class.
4545         * name-lookup.c (push_class_level_binding): Check for members with
4546         the same name as their enclosing class.
4548 2004-02-15  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4550         PR c++/14085
4551         * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
4553 2004-02-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4555         PR c++/13635
4556         * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
4557         has full set of arguments.
4559 2004-02-13  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
4561         PR c++/13927
4562         * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
4564 2004-02-13  Mark Mitchell  <mark@codesourcery.com>
4566         PR c++/14122
4567         * cp-tree.h (delete_sanity): Change prototype.
4568         * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
4569         Remove dead code.  Adjust code to warn about deleting an array.
4570         * typekc.c (decay_conversion): Use build_address and build_nop.
4572         PR c++/14108
4573         * search.c (accessible_p): Do not check access in thunks.
4575         PR c++/14083
4576         * call.c (build_conditional_expr): Call force_rvalue on the
4577         non-void operand in the case that one result is a throw-expression
4578         and the other is not.
4580 2004-02-13  Ian Lance Taylor  <ian@wasabisystems.com>
4582         PR c++/9851
4583         * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
4584         the type name and look ahead for ::~, and bail out early with a
4585         better error message if the parse is going to fail.
4587 2004-02-12  Mark Mitchell  <mark@codesourcery.com>
4589         * call.c (conversion_kind): New type.
4590         (conversion_rank): Likewise.
4591         (conversion): Likewise.
4592         (CONVERSION_RANK): New macro.
4593         (conversion_obstack): New variable.
4594         (obstack_initialized): Likewise.
4595         (z_candidate): Change type of convs and second_conv.
4596         (candidate_warning): New type.
4597         (IDENTITY_RANK): Remove.
4598         (EXACT_RANK): Likewise.
4599         (PROMO_RANK): Likewise.
4600         (STD_RANK): Likewise.
4601         (PBOOL_RANK): Likewise.
4602         (USER_RANK): Likewise.
4603         (ELLIPSIS_RANK): Likewise.
4604         (BAD_RANK): Likewise.
4605         (ICS_RANK): Likewise.
4606         (ICS_STD_RANK): Likewise.
4607         (ICS_USER_FLAG): Likewise.
4608         (ICS_ELLIPSIS_FLAG): Likewise.
4609         (ICS_THIS_FLAG): Likewise.
4610         (ICS_BAD_FLAG): Likewise.
4611         (NEED_TEMPORARY_P): Likewise.
4612         (CHECK_COPY_CONSTRUCTOR_P): Likewise.
4613         (USER_CONV_CAND): Likewise.
4614         (USER_CONV_FN): Likewise.
4615         (conversion_obstack_alloc): New function.
4616         (alloc_conversion): Likewise.
4617         (validate_conversion_obstack): Likewise.
4618         (alloc_conversions): Likewise.
4619         (build_conv): Adjust to deal with new conversion data structures.
4620         (build_identity_conv): New function.
4621         (build_ambiguous_conv): Likewise.
4622         (standard_conversion): Adjust to deal with new conversion data
4623         structures.
4624         (convert_class_to_reference): Likewise.
4625         (direct_reference_binding): Likewise.
4626         (reference_binding): Likewise.
4627         (implicit_conversion): Likewise.
4628         (add_candidate): Likewise.
4629         (add_function_candidate): Likewise.
4630         (add_conv_candidate): Likewise.
4631         (build_builtin_candidate): Likewise.
4632         (print_z_candidate): Likewise.
4633         (merge_conversion_sequences): Likewise.
4634         (build_user_type_conversion_1): Likewise.
4635         (build_user_type_conversion): Likewise.
4636         (build_new_function_call): Likewise.
4637         (build_object_call): Likewise.
4638         (conditional_conversion): Likewise.
4639         (build_conditional_expr): Likewise.
4640         (build_new_op): Likewise.
4641         (build_op_delete_call): Likewise.
4642         (convert_like_real): Likewise.
4643         (build_over_call): Likewise.
4644         (build_new_method_call): Likewise.
4645         (is_subseq): Likewise.
4646         (maybe_handle_implicit_object): Likewise.
4647         (maybe_handle_ref_bind): Likewise.
4648         (compare_ics): Likewise.
4649         (source_type): Likewise.
4650         (add_warning): Likewise.
4651         (joust): Likewise.
4652         (can_convert_arg): Likewise.
4653         (can_convert_arg_bad): Likewise.
4654         (perform_implicit_conversion): Likewise.
4655         (perform_direct_initialization_if_possible): Likewise.
4656         (initialize_reference): Likewise.
4657         * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
4658         * cp-tree.def (WRAPPER): Likewise.
4659         (IDENTITY_CONV): Remove.
4660         (LVALUE_CONV): Likewise.
4661         (QUAL_CONV): Likewise.
4662         (STD_CONV): Likewise.
4663         (PTR_CONV): Likewise.
4664         (PMEM_CONV): Likewise.
4665         (BASE_CONV): Likewise.
4666         (REF_BIND): Likewise.
4667         (USER_CONV): Likewise.
4668         (AMBIG_CONV): Likewise.
4669         (RVALUE_CONV): Likewise.
4670         * cp-tree.h (tree_wrapper): Remove.
4671         (WRAPPER_ZC): Remove.
4672         (lang_tree_node): Remove wrapper.
4673         (LOOKUP_SPECULATIVELY): Remove.
4674         (build_op_delete_call): Adjust prototype.
4675         (validate_conversion_obstack): Declare.
4676         (build_zc_wrapper): Remove.
4677         * cvt.c (convert_to_reference): Remove dead code.
4678         (ocp_convert): Likewise.
4679         * decl.c (redeclaration_error_message): Correct handling of
4680         templates.
4681         (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
4682         (cp_tree_node_structure): Remove WRAPPER case.
4683         * decl2.c (finish_file): Call validate_conversion_obstack.
4684         * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
4685         (build_op_delete_call): Likewise.
4686         (build_x_delete): Likewise.
4687         (build_delete): Adjust call to build_op_delete_call.
4688         * pt.c (tsubst_friend_declaration): Adjust code to determine
4689         whether or not a friend template is a definition.
4690         (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
4691         * tree.c (build_zc_wrapper): Remove.
4693 2004-02-12  Zack Weinberg  <zack@codesourcery.com>
4695         * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
4696         * cp-tree.h: Don't declare cxx_builtin_type_decls.
4697         * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
4698         (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
4700 2004-02-10  Mark Mitchell  <mark@codesourcery.com>
4702         * typeck.c (lookup_destructor): Fix typo in error message.
4704 2004-02-09  Kazu Hirata  <kazu@cs.umass.edu>
4706         * call.c, parser.c, tree.c: Fix comment typos.
4708 2004-02-07  Zack Weinberg  <zack@codesourcery.com>
4710         Bug 13856
4711         * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
4712         * decl.c (duplicate_decls, start_function): Likewise.
4714 2004-02-07  Zack Weinberg  <zack@codesourcery.com>
4716         * name-lookup.c (pushdecl): Issue shadow warnings directly.
4717         * parser.c (free_parser_stacks): Delete.
4719 2004-02-07  Kazu Hirata  <kazu@cs.umass.edu>
4721         * rtti.c: Update copyright.
4723 2004-02-06  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
4725         PR c++/14033
4726         * decl.c (require_complete_types_for_parms): Do not insert
4727         error_mark_node in the parameter list.
4729 2004-02-06  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
4731         PR c++/14028
4732         * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
4733         error when terminator can not be found.
4735 2004-02-05  Kelley Cook  <kcook@gcc.gnu.org>
4737         Make-lang.in (po-generated):  Delete.
4739 2004-02-05  Kazu Hirata  <kazu@cs.umass.edu>
4741         * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
4742         targetm.calls.promote_prototypes.
4744 2004-02-05  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
4746         PR middle-end/13750
4747         Revert:
4748         2004-01-15  Geoffrey Keating  <geoffk@apple.com>
4749         PR pch/13361
4750         * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
4751         (handle_pragma_implementation): Likewise.
4753 2004-02-05  Mark Mitchell  <mark@codesourcery.com>
4755         PR c++/13714
4756         * typeck.c (lookup_destructor): Tweak error message.
4758 2004-02-05  Jan Hubicka  <jh@suse.cz>
4760         * tree.c (cp_cannot_inline_tree_fn):  Allow inlining of comdat
4761         functions.
4763 2004-02-05  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
4765         PR c++/14008
4766         * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
4767         code, only emits the diagnostic now. Added lookup of the identifier
4768         and support for qualified ids.
4769         (cp_parser_parse_and_diagnose_invalid_type_name): New function.
4770         Parse an (invalid) type name as id-expression within a declarator.
4771         (cp_parser_simple_declaration): Use it.
4772         (cp_parser_member_declaration): Likewise.
4773         (cp_parser_make_typename_type): New function. Handle errors through
4774         cp_parser_diagnose_invalid_typename.
4775         (cp_parser_elaborated_type_specifier): Use it.
4777 2004-02-04  Mark Mitchell  <mark@codesourcery.com>
4779         PR c++/13932
4780         * call.c (convert_like_real): Use "converting" rather than
4781         "argument" as the descriptive keyword to
4782         dubious_conversion_warnings.
4783         * typeck.c (convert_for_assignment): Do not call
4784         dubious_conversion_warnings.
4786 2004-02-04  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
4788         PR c++/13086
4789         * init.c (build_delete): Emit a more informative error message in
4790         case of an incomplete type, and on the correct source line.
4792 2004-02-04  Kazu Hirata  <kazu@cs.umass.edu>
4794         * error.c, search.c: Update copyright.
4796 2004-02-04  Mark Mitchell  <mark@codesourcery.com>
4798         PR c++/9941
4799         * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
4800         linkage for the typeinfo name string.
4802 2004-02-04  Mark Mitchell  <mark@codesourcery.com>
4804         PR c++/13969
4805         * cp-tree.h (fold_non_dependent_expr): New function.
4806         * parser.c (cp_parser_fold_non_dependent_expr): Remove.
4807         (cp_parser_template_argument): Use fold_non_dependent_expr.
4808         (cp_parser_direct_declarator): Likewise.
4809         * pt.c (fold_non_dependent_expr): New function.
4810         (convert_nontype_argument): Use it.
4811         (tsubst_qualified_id): Simplify.
4812         (tsubst_copy_and_build): Likewise.
4814 2004-02-04  Mark Mitchell  <mark@codesourcery.com>
4816         * decl.c (cxx_push_function_context): Do not set
4817         current_function_is_thunk.
4818         * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
4819         actual function.
4821 2004-02-04  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
4823         PR c++/13997
4824         * pt.c (more_specialized_class): Increase processing_template_decl
4825         while partial ordering.
4827 2004-02-03  Mark Mitchell  <mark@codesourcery.com>
4829         PR c++/13925
4830         * decl.c (start_function): Do not call pushdecl for any
4831         instantiation or specialization of a primary template.
4833 2004-02-03  Mark Mitchell  <mark@codesourcery.com>
4835         PR c++/13950
4836         * parser.c (cp_parser_class_name): Robustify.
4838         PR c++/13970
4839         * parser.c (cp_parser_cache_group): Do not consume the EOF token.
4841         PR c++/14002
4842         * semantics.c (finish_id_expression): Do not return an
4843         IDENTIFIER_NODE when lookup finds a PARM_DECL.
4845 2004-02-03  Mark Mitchell  <mark@codesourcery.com>
4847         PR c++/13978
4848         * pt.c (build_non_dependent_expr): Do not build
4849         NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
4851         PR c++/13968
4852         * semantics.c (finish_id_expression): Do not return an
4853         IDENTIFIER_NODE when lookup finds a VAR_DECL.
4855         PR c++/13975
4856         * parser.c (cp_parser_simple_declaration): When skipping to the
4857         end of the statement swallow the terminating semicolon.
4859 2004-02-02  Mark Mitchell  <mark@codesourcery.com>
4861         PR c++/13113
4862         * init.c (build_offset_ref): Improve error recovery for invalid
4863         uses of non-static member functions.
4865         PR c++/13854
4866         * cp-tree.h (cp_build_type_attribute_variant): New function.
4867         * class.c (build_clone): Use cp_build_type_attribute_variant.
4868         * decl.c (duplicate_decls): Likewise.
4869         * pt.c (copy_default_args_to_explicit_spec): Likewise.
4870         (tsubst_function_type): Likewise.
4871         * tree.c (build_exception_variant): Check attributes before
4872         concluding that two types are the same.
4873         (cp_build_type-attribute_variant): New method.
4874         * typeck.c (merge_types): Use cp_build_type_attribute_variant.
4876         PR c++/13907
4877         * call.c (convert_class_to_reference): Keep better track of
4878         pedantically invalid user-defined conversions.
4880 2004-02-01  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
4882         PR c++/13957
4883         * pt.c (tsubst_qualified_id): Improved error message when a type
4884         is expected but not found.
4886 2004-01-31  Kazu Hirata  <kazu@cs.umass.edu>
4888         * class.c: Fix comment typos.
4889         * decl.c: Likewise.
4890         * error.c: Likewise.
4891         * parser.c: Likewise.
4892         * pt.c: Likewise.
4893         * search.c: Likewise.
4894         * typeck.c: Likewise.
4896 2004-01-30  Richard Henderson  <rth@redhat.com>
4898         PR c++/13693
4899         * method.c (use_thunk): Don't force_target_expr for void thunks.
4900         * tree.c (build_target_expr_with_type): Assert non-void type.
4901         (force_target_expr): Likewise.
4903 2004-01-30  Michael Matz  <matz@suse.de>
4905         * parser.c (cp_parser_labeled_statement): Accept case ranges.
4907 2004-01-30  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
4909         DR206
4910         PR c++/13813
4911         * decl.c (grokdeclarator): Check immediatly type completeness for
4912         non-dependent types.
4914 2004-01-30  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
4916         PR c++/13683
4917         * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
4918         a sizeof expression.block
4920 2004-01-29  Mark Mitchell  <mark@codesourcery.com>
4922         PR c++/13883
4923         * mangle.c (write_encoding): Correct encoding of member template
4924         constructors.
4926 2004-01-28  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
4928         * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
4929         template name as it was `<::' (digraph typo).
4930         (cp_parser_nth_token_starts_template_argument_list_p): New function.
4931         (cp_parser_id_expression): Use it.
4932         (cp_parser_nested_name_specifier_opt): Likewise.
4933         (cp_parser_template_name): Likewise.
4934         (cp_parser_class_name): Likewise.
4935         (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
4937 2004-01-28  Mark Mitchell  <mark@codesourcery.com>
4939         PR c++/13791
4940         * typeck.c (merge_types): Do not merge attributes into
4941         TYPENAME_TYPEs.
4943         PR c++/13736
4944         * parser.c (cp_parser_direct_declarator): Do not prevent
4945         backtracking inside a parenthesized declarator.
4946         (cp_parser_parameter_declaration): Fix typo in comment.
4948 2004-01-28  Jan Hubicka  <jh@suse.cz>
4950         * semantics.c (expand_body)  Do emit_associated_thunks before
4951         expansion.
4953 2004-01-27  Devang Patel  <dpatel@apple.com>
4955         * name-lookup.c: Include "debug.h"
4956         (do_namespace_alias): Invoke debug_hooks to emit debug info
4957         for namespace alias.
4958         (do_local_using_decl): Invoke debug_hooks to emit debug info
4959         for using decl.
4960         (do_class_using_decl): Same.
4961         (do_toplevel_using_decl): Same.
4962         (do_using_directive): Same.
4963         (cp_emit_debug_info_for_using): New function.
4964         * Make-lang.in (cp/parser.o): Depend on debug.h
4965         (cp/name-lookup.o): Same.
4967 2004-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4969         * cp-tree.h (language_function, lang_type_header): Use
4970         BOOL_BITFIELD.
4971         * name-lookup.h (cp_binding_level): Likewise.
4973 2004-01-26  Mark Mitchell  <mark@codesourcery.com>
4975         PR c++/13663
4976         * semantics.c (finish_for_expr): Check for unresolved overloaded
4977         functions.
4979         * class.c (add_method): Just check processing_template_decl to
4980         determine whether or not we are within a template.
4981         * decl2.c (maybe_retrofit_in_chrg): Likewise.
4982         * init.c (decl_constant_value): Check the type of the declaration,
4983         not TREE_READONLY.
4984         * name-lookup.c (maybe_push_to_top_level): Rename to ...
4985         (push_to_top_level): ... this.
4986         * name-lookup.h (maybe_push_to_top_level): Do not declare it.
4987         * pt.c (push_template_decl_real): Reorder condition for speed.
4988         (convert_template_argument): Use dependency-checking functions in
4989         place of uses_template_parms.
4990         (lookup_template_class): Avoid calling uses_template_parms more
4991         than once.
4992         (uses_template_parms): Reimplement, using dependency-checking
4993         functions.
4994         (instantiate_class_template): Use push_to_top_level, not
4995         maybe_push_to_top_level.
4996         (type_unification_real): Simplify.
4997         (type_dependent_expression_p): Handle OFFSET_REFs and
4998         TEMPLATE_DECLs.
4999         (any_dependent_template_arguments_p): Handle multiple levels of
5000         template argument.
5001         * semantics.c (expand_or_defer_fn): Do not check
5002         uses_template_parms for template instantiations.
5003         * typeck.c (comptypes): Avoid calling cp_type_quals.
5005 2004-01-25  Mark Mitchell  <mark@codesourcery.com>
5007         PR c++/13833
5008         * call.c (build_over_call): Do not convert arguments when
5009         processing a template.
5010         * pt.c (build_non_dependent_expr): Do not build a
5011         NON_DEPENDENT_EXPR for arithmetic constants.
5013 2004-01-25  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5015         PR c++/13810
5016         * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
5017         returns a TYPE_DECL. no further lookup is required.
5018         * semantics.c (check_template_template_default_arg): A TYPE_DECL
5019         is invalid. Rework to give better diagnostics.
5021 2004-01-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5023         PR c++/13797
5024         * pt.c (instantiate_class_template): Add an error_mark_node
5025         check.
5026         (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
5028 2004-01-23  Andrew Pinski  <pinskia@physics.uc.edu>
5030         PR c++/13701
5031         * decl.c (finish_function): Move the call to
5032         finish_fname_decls below the call to
5033         finish_eh_spec_block.
5035 2004-01-21  Kazu Hirata  <kazu@cs.umass.edu>
5037         * optimize.c, typeck2.c: Update copyright.
5039 2004-01-21  Kazu Hirata  <kazu@cs.umass.edu>
5041         * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
5042         init.c, mangle.c, typeck.c: Update copyright.
5044 2004-01-21  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
5046         * parser.c (cp_parser_class_specifier): Prevent garbage collection.
5048 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
5050         * Make-lang.in: Replace $(docdir) with doc.
5051         (c++.info, c++.srcinfo): Dummy entry.
5052         (c++.man, c++.srcman): New rules.
5053         (c++.install-man): Revamp rule.
5055 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
5057         * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
5058         CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
5059         immediate $(shell) instead of deferred backquote.
5061 2004-01-19  Mark Mitchell  <mark@codesourcery.com>
5063         PR c++/13651
5064         * parser.c (cp_parser_postfix_expression): When encountering
5065         incomplete type on left-hand side of "->" or ".", treat the entire
5066         expression as erroneous.
5068         PR c++/13592
5069         * call.c (build_field_call): Remove.
5070         (n_build_method_call): Likewise.
5071         (build_method_call): Likewise.
5072         (build_new_method_call): Do not call build_field_call.
5073         * class.c (n_build_method_call): Remove.
5074         (print_class_statistics): Do not print it.
5075         * cp-tree.h (build_method_call): Remove declaration.
5076         (finish_object_call_expr): Likewise.
5077         (build_new_1): Do not use build_method_call.
5078         * parser.c (cp_parser_postfix_expression): Use finish_call_expr
5079         when the function appearing on the right-hand-side of "." or "->"
5080         is not actually a function.
5081         * pt.c (tsubst_copy_and_build): Likewise.
5082         * semantics.c (finish_object_call_expr): Remove.
5084 2004-01-18  Mark Mitchell  <mark@codesourcery.com>
5086         PR c++/13710
5087         * pt.c (tsubst): Use finish_typeof.
5089 2004-01-18  Jason Merrill  <jason@redhat.com>
5091         PR c++/11725
5092         * except.c (build_throw): In a template, set
5093         current_function_returns_abnormally.
5095 2004-01-17  Fred Fish  <fnf@intrinsity.com>
5097         PR c++/11895
5098         * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
5099         except don't call array_type_nelts() with a VECTOR_TYPE.
5101 2004-01-16  Jan Hubicka  <jh@suse.cz>
5103         * mangle.c (write_mangled_name): Remove inline modifier.
5105 2004-01-16  Mark Mitchell  <mark@codesourcery.com>
5107         PR c++/13574
5108         * decl.c (compute_array_index_type): Fix grammar in comment.
5109         * init.c (build_zero_init): Handle zero-sized arrays correctly.
5111         PR c++/13178
5112         * call.c (name_as_c_string): Print conversion operator names
5113         correctly.
5115         PR c++/13478
5116         * call.c (initialize_reference): Pass -1 for inner parameter to
5117         convert_like_real.
5119 2004-01-15  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5121         PR c++/13407
5122         * parser.c (cp_parser_base_specifier): Check for an invalid
5123         keyword `typename' and emit an user-friendly error message.
5125 2004-01-15  Geoffrey Keating  <geoffk@apple.com>
5127         PR pch/13361
5128         * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
5129         (handle_pragma_implementation): Likewise.
5131 2004-01-15  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5133         PR c++/9259
5134         * typeck.c (build_class_member_access_expr): Allow to access members
5135         of the currently open class.
5136         (finish_class_member_access_expr): Likewise.
5138 2004-01-15  Alexandre Oliva  <aoliva@redhat.com>
5140         PR c++/13659
5141         * name-lookup.c (validate_nonmember_using_decl): Take scope and
5142         name by value, instead of computing them.
5143         (do_local_using_decl, do_toplevel_using_decl): Add scope and name
5144         arguments.  Pass them to validate_nonmember_using_decl.
5145         * name-lookup.h (do_local_using_decl): Adjust.
5146         (do_toplevel_using_decl): Likewise.
5147         * parser.c (cp_parser_using_declaration): Likewise.
5148         * pt.c (tsubst_expr): Likewise.
5150 2004-01-15  Alexandre Oliva  <aoliva@redhat.com>
5152         PR c++/13594
5153         PR c++/13658
5154         * name-lookup.c (qualified_lookup_using_namespace): Search
5155         strongly-associated namespaces first, and only then try other
5156         namespaces.
5158 2004-01-15  Kelley Cook  <kcook@gcc.gnu.org>
5160         * Make-lang.in (c++.srcextra): Dummy entry.
5162 2004-01-15  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5164         PR c++/8856
5165         * parser.c (cp_parser_template_name): Don't try to parse a
5166         conversion-function-id, as it cannot be a template-name.
5167         (cp_parser_simple_type_specifier): Check for invalid template-ids
5168         even after a built-in type.
5170 2004-01-14  Jan Hubicka  <jh@suse.cz>
5172         PR c++/12850
5173         * pt.c (instantiate_decl):  Do not increase function_depth.
5175 2004-01-14  Danny Smith  <dannysmith@users,sourceforge.net>
5177         PR c++/9021
5178         PR c++/11005
5179         * parser.c (cp_parser_elaborated_type_specifier): Warn about
5180         attributes and discard.
5181         * decl.c (xref_tag): Don't overwite existing attributes with
5182         NULL_TREE.
5184 2004-01-14  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5186         PR c++/12335
5187         * parser.c (cp_parser_lookup_name): Return error_mark_node if there
5188         is no destructor while looking up a BIT_NOT_EXPR.
5190 2004-01-13  Ian Lance Taylor  <ian@wasabisystems.com>
5192         * cxxfilt.c: Remove unused file.
5194 2004-01-14  Jan Hubicka  <jh@suse.cz>
5196         Partial fix to PR c++/12850
5197         * decl2.c (mark_used): Do not proactively instantiate templates
5198         when compiling in unit-at-a-time or not optimizing.
5199         * optimize.c (maybe_clone_body): Do not increase function depth.
5201 2004-01-13  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5203         PR c++/13474
5204         * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
5206 2004-01-12  Steven Bosscher  <stevenb@suse.de>
5208         PR c++/13558
5209         * parser.c (cp_parser_member_declaration): Any non-type is also
5210         not a class or a function.
5212 2004-01-12  Jason Merrill  <jason@redhat.com>
5214         PR c++/12815
5215         * class.c (build_base_path): Do not mark vtable references as
5216         TREE_CONSTANT.
5217         (build_vtbl_ref_1): Likewise.
5219 2004-01-12  Richard Henderson  <rth@redhat.com>
5221         PR opt/10776
5222         * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
5223         (store_init_value): Use it.
5224         * decl.c (check_initializer): Expect full initialization code
5225         from store_init_value.
5226         * init.c (expand_aggr_init_1): Likewise.
5227         * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
5229 2004-01-12  Mark Mitchell  <mark@codesourcery.com>
5231         * class.c (layout_class_type): For non-POD class types, also copy
5232         the DECL_SIZE and DECL_MODE of fields to the base class type.
5234 2004-01-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5236         PR c++/13289
5237         * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
5238         calling regenerate_decl_from_template.
5240 2004-01-12  Scott Brumbaugh  <scottb.lists@verizon.net>
5242         PR c++/4100
5243         * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
5244         decl-specifier occurring along with a class definition.
5246 2004-01-12  Ian Lance Taylor  <ian@wasabisystems.com>
5248         * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
5249         clauses to comments describing declares_class_or_enum.
5250         (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
5251         false.
5253 2004-01-12  Jan Hubicka  <jh@suse.cz>
5255         * pt.c (for_each_template_parm): Do not check for duplicates.
5256         (for_each_template_parm): Use walk_tree duplicate checking code.
5258 2004-01-11  Ian Lance Taylor  <ian@wasabisystems.com>
5260         PR c++/3478
5261         * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
5262         is error_mark_node, don't add any more decl_specs.
5263         (cp_parser_init_declarator): After committing to a declaration, if
5264         the decl_specifiers start with error_mark_node, issue an error and
5265         change the type to "int".
5267 2004-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
5269         PR bootstrap/7817
5270         * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
5272 2004-01-10  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5274         DR 337
5275         PR c++/9256
5276         * pt.c (tsubst): Substitution must fail if we are attempting to
5277         create an array with element type that is an abstract class type.
5278         * decl.c (cp_finish_decl): Strip pointers and array types recursively
5279         before calling abstract_virtuals_error.
5281 2004-01-09  Alexandre Oliva  <aoliva@redhat.com>
5283         * name-lookup.c (qualified_lookup_using_namespace): Consider
5284         strong using directives even if we've already found a binding.
5286 2004-01-09  Mark Mitchell  <mark@codesourcery.com>
5288         * cp-tree.h (cxx_expand_expr): Change prototype.
5289         * expr.c (cxx_expand_expr): Add alt_rtl parameter.
5291 2004-01-08  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5293         PR c++/12573
5294         * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
5295         looking into them recursively. They can be there because of the
5296         new __offsetof__ extension.
5298 2004-01-07  Zack Weinberg  <zack@codesourcery.com>
5300         * parser.c (cp_parser_save_member_function_body): Mark the
5301         definition static.
5303 2004-01-05  Mark Mitchell  <mark@codesourcery.com>
5305         PR c++/13057
5306         * class.c (build_clone): Copy type attributes from the original
5307         function to the clone.
5309         PR c++/12815
5310         * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
5311         references as constant.
5313         PR c++/12132
5314         * parser.c (cp_parser_explicit_instantiation): Improve error
5315         recovery.
5316         (cp_parser_require): Improve indication of the error location.
5318         PR c++/13451
5319         * parser.c (cp_parser_class_head): Reorder logic to check for
5320         invalid qualification.
5322 2004-01-04  Mark Mitchell  <mark@codesourcery.com>
5324         PR c++/13157
5325         * name-lookup.c (lookup_using_namespace): Remove spacesp
5326         parameter.
5327         (unqualified_namespace_lookup): Likewise.
5328         (lookup_qualified_name): Adjust accordingly.
5329         (lookup_name_real): Likewise.
5330         (lookup_arg_dependent): Do not eliminate the namespace of the
5331         functions found by unqualified name lookup unless that is the
5332         current namespace.
5334 2004-01-04  Andrew Pinski  <pinskia@physics.uc.edu>
5336         * semantics.c (push_deferring_access_checks): Fix format.
5337         (resume_deferring_access_checks): Likewise.
5338         (stop_deferring_access_checks): Likewise.
5339         (pop_deferring_access_checks): Likewise.
5340         (get_deferred_access_checks): Likewise.
5341         (pop_to_parent_deferring_access_checks): Likewise.
5342         (perform_deferred_access_checks): Likewise.
5343         (perform_or_defer_access_check): Likewise.
5345 2004-01-04  Richard Henderson  <rth@redhat.com>
5347         * call.c (build_over_call): Don't create a save_expr of an
5348         aggregate, but rather its address.
5350 2004-01-04  Mark Mitchell  <mark@codesourcery.com>
5352         PR c++/13529
5353         * parser.c (cp_parser_postfix_expression): Allow "." to appear in
5354         an offsetof expression.
5356         * parser.c (cp_parser_parameter_declaration): Fix comment.
5358         PR c++/12226
5359         * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
5360         (reference_binding): Set it when appropriate.
5361         (build_temp): New function, split out from ...
5362         (convert_like_real): ... here.  Honor CHECK_COPY_CONSTRUCTOR_P.
5363         (initialize_reference): Likewise.
5365         PR c++/13536
5366         * parser.c (cp_parser): Add in_type_id_in_expr_p.
5367         (cp_parser_new): Initialize it.
5368         (cp_parser_postfix_expression): Set it.
5369         (cp_parser_sizeof_operand): Likewise.
5370         (cp_parser_parameteR_declaration): Do not commit early to tenative
5371         parsers when in_type_id_in_expr_p is set.
5373 2004-01-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5375         PR c++/13094
5376         * parser.c (cp_parser_template_argument): Don't call
5377         make_unbound_class_template directly.
5378         (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
5379         UNBOUND_CLASS_TEMPLATE tree node.
5381 2004-01-02  Richard Sandiford  <rsandifo@redhat.com>
5383         PR target/12729
5384         * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
5386 2004-01-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5388         PR c++/13520
5389         * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
5390         (DECL_FUNCTION_TEMPLATE_P): Use it.
5391         (DECL_CLASS_TEMPLATE_P): Likewise.
5392         * parser.c (cp_parser_lookup_name): Add is_template parameter.
5393         (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
5394         (cp_parser_template_name): Likewise.
5395         (cp_parser_elaborated_type_specifier): Likewise.
5396         (cp_parser_namespace_name): Likewise.
5397         (cp_parser_class_name): Likewise.
5398         (cp_parser_lookup_name_simple): Likewise.
5400 See ChangeLog.3 for earlier changes.