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