OSDN Git Service

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