OSDN Git Service

1f2eda9b6a08976bc535551fc47f91df410d8ff7
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2004-06-21  Jason Merrill  <jason@redhat.com>
2
3         PR c++/16112
4         * cp-gimplify.c (cp_gimplify_init_expr): Look through
5         CLEANUP_POINT_EXPR.
6
7 2004-06-21  Mark Mitchell  <mark@codesourcery.com>
8
9         * cp-tree.def (NEW_EXPR): Add a fourth slot.
10         * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
11         (TREE_PARMLIST): Likewise.
12         (CALL_DECLARATOR_PARMS): Likewise.
13         (CALL_DECLARATOR_QUALS): Likewise.
14         (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
15         (cp_declarator_kind): New type.
16         (cp_parameter_declarator): Likewise.
17         (cp_declarator): Likewise.
18         (cp_error_declarator): Likewise.
19         (no_parameters): Likewise.
20         (groktypename): Change prototype.
21         (start_decl): Likewise.
22         (start_handler_parms): Likewise.
23         (get_scope_of_declarator): Likewise.
24         (start_function): Likewise.
25         (start_preparsed_function): New function.
26         (start_function): Change prototype.
27         (start_method): Likewise.
28         (grokfield): Likewise.
29         (grokbitfield): Likewise.
30         (build_new): Likewise.
31         (make_pointer_declarator): Remove.
32         (make_reference_declarator): Likewise.
33         (make_call_declarator): Likewise.
34         (set_quals_and_spec): Likewise.
35         (process_template_parm): Change prototype.
36         (begin_function_definition): Remove.
37         (finish_parmlist): Remove.
38         * decl.c (groktypename): Do not use trees to represent
39         declarators.
40         (start_decl): Likewise.
41         (start_handler_parms): Remove.
42         (get_scope_of_declarator): Reimplement.
43         (grokdeclarator): Do not use trees to represent declarators.
44         (grokparms): Likewise.
45         (start_function): Likewise.
46         (start_method): Likewise.
47         (build_void_list_mode): Do not use TREE_PARMLIST.
48         * decl.h (grokdeclarator): Change prototype.
49         * decl2.c (grok_method_quals): Robustify.
50         (grok_x_components): Do not use trees to represent declarators.
51         (grokfield): Likewise.
52         (grokbitfield): Likewise.
53         (start_objects): Build FUNCTION_DECLs, not declarators.
54         (start_static_storage_duration_function): Likewise.
55         * init.c (build_new): Simplify.
56         * lex.c (make_pointer_declarator): Remove.
57         (make_reference_declarator): Likewise.
58         (make_call_declarator): Likewise.
59         (set_quals_and_spec): Likewise.
60         * method.c (use_thunk): Use start_preparsed_function.
61         (synthesize_method): Likewise.
62         (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
63         * optimize.c (maybe_clone_body): Use start_preparsed_function.
64         * parser.c (cp_error_declarator): New variable.
65         (declarator_obstack): Likewise.
66         (alloc_declarator): New function.
67         (make_declarator): Likewise.
68         (make_id_declarator): Likewise.
69         (make_pointer_declarator): Likewise.
70         (make_reference_declarator): Likewise.
71         (make_ptrmem_declarator): Likewise.
72         (make_call_declarator): Likewise.
73         (make_array_declarator): Likewise.
74         (no_parameters): New variable.
75         (make_parameter_declarator): Likewise.
76         (cp_parser_check_for_definition_in_return_type): Do not use trees
77         to represent declarators.
78         (cp_parser_translation_unit): Likewise.
79         (cp_parser_new_expression): Likewise.
80         (cp_parser_new_type_id): Likewise.
81         (cp_parser_new_declarator_opt): Likewise.
82         (cp_parser_direct_new_declarator): Likewise.
83         (cp_parser_condition): Likewise.
84         (cp_parser_declaration_statement): Likewise.
85         (cp_parser_declaration): Likewise.
86         (cp_parser_conversion_type_id): Likewise.
87         (cp_parser_conversion_declarator_opt): Likewise.
88         (cp_parser_template_parameter_list): Likewise.
89         (cp_parser_template_parameter): Likewise.
90         (cp_parser_explicit_instantiation): Likewise.
91         (cp_parser_init_declarator): Likewise.
92         (cp_parser_declarator): Likewise.
93         (cp_parser_direct_declarator): Likewise.
94         (cp_parser_type_id): Likewise.
95         (cp_parser_parameter_declaration_clause): Likewise.
96         (cp_parser_parameter_declaration_list): Likewise.
97         (cp_parser_parameter_declaration): Likewise.
98         (cp_parser_member_declaration): Likewise.
99         (cp_parser_exception_declaration): Likewise.
100         (cp_parser_check_declarator_template_parameters): Likewise.
101         (cp_parser_function_definition_from_specifiers_and_declarator):
102         Likewise.
103         (cp_parser_save_member_function_body): Likewise.
104         * pt.c (process_template_parm): Add is_non_type parameter.
105         (convert_template_argument): Adjust call to groktypename.
106         (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
107         (tsubst): Do not expect declarators.
108         (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
109         argument.
110         (instantiate_decl): Use start_preparsed_function.
111         * semantics.c (begin_function_definition): Remove.
112         (finish_parmlist): Remove.
113         * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
114         declarators.
115
116 2004-06-21  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
117
118         * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
119         (build_new_method_call): Likewise.
120         * decl.c (local_variable_p_walkfn): Don't walk into types.
121         * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
122         (build_anon_union_vars): Add new operand for COMPONENT_REF.
123         * init.c (buld_new): Add new operand for ARRAY_REF.
124         * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
125         (do_build_assign_ref): Likewise.
126         * parser.c (cp_parser_direct_new_declarator): Add new operands
127         for ARRAY_REF.
128         (cp_parser_direct_declarator): Likewise.
129         * pt.c (tsubst): Likewise.
130         (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
131         for COMPONENT_REF.
132         * semantics.c (finish_non_static_data_member): Add new operand
133         for COMPONENT_REF.
134         * typeck.c (build_class_member_access_expr): Likewise.
135         (build_class_member_access_expr, finish_class_member_access_expr):
136         Likewise.
137         (build_ptrmemfunc_access_expr): Likewise.
138         (build_array_ref): Add new operands for ARRAY_REF.
139         * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
140         * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
141
142 2004-06-21  Richard Henderson  <rth@redhat.com>
143
144         * dump.c (cp_dump_tree): Don't use dump_next_stmt.
145         * parser.c (cp_parser_jump_statement): Update commentary.
146         * pt.c (tsubst_expr): Use RETURN_EXPR.
147         * semantics.c (finish_return_stmt): Likewise.
148         (finalize_nrv_r): Likewise.
149         * typeck.c, typeck2.c: Update file start commentary.
150
151 2004-06-21  Richard Henderson  <rth@redhat.com>
152
153         * semantics.c (finish_expr_stmt): Call verify_sequence_points.
154
155 2004-06-20  Richard Henderson  <rth@redhat.com>
156
157         * cp-tree.h (add_decl_stmt): Declare.
158         * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
159         * semantics.c (maybe_cleanup_point_expr): New.
160         (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
161         finish_for_expr, finish_switch_cond): Use it.
162         (finalize_nrv_r): Don't build an EXPR_STMT.  Don't frob TREE_CHAIN.
163
164 2004-06-20  Richard Henderson  <rth@redhat.com>
165
166         * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
167         * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
168         (cp_gimplify_expr): Call it.
169         (gimplify_cleanup_stmt): Move from c-gimplify.c.
170         (cp_genericize): New.
171         * decl.c (finish_function): Call it.
172         * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
173         (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
174         (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
175         (cp_genericize): Declare.
176         * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
177         * dump.c (cp_dump_tree): Likewise.
178         * semantics.c (push_cleanup): Move from c-semantics.c.
179
180 2004-06-20  Zack Weinberg  <zack@codesourcery.com>
181
182         * cp-lang.c (has_c_linkage): Implement.
183
184         * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
185         * decl.c (duplicate_decls): Use COPY_DECL_RTL.
186         (builtin_function_1): Don't call make_decl_rtl.
187         (build_cp_library_fn): Don't call set_mangled_name_for_decl.
188         (grokvardecl): Don't call mangle_decl.
189         * except.c (nothrow_libfn_p): Look at DECL_NAME, not
190         DECL_ASSEMBLER_NAME.
191         * method.c (set_mangled_name_for_decl): Delete.
192         * name-lookup.c (pushdecl): When a local extern shadows a
193         file-scope declaration of the same object, give both DECLs the
194         same DECL_UID.
195         * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
196         on DECL_ASSEMBLER_NAME.
197
198 2004-06-19  Richard Henderson  <rth@redhat.com>
199
200         * cp-gimplify.c: Remove unnecessary prototypes.
201         (cp_gimplify_stmt): Merge into ...
202         (cp_gimplify_expr): ... here.  Move to end of file.  Handle
203         stmts_are_full_exprs_p frobbing.
204         * cp-tree.h (cp_gimplify_stmt): Remove.
205         * pt.c (tsubst_expr): Merge prep_stmt and unify.
206         * tree.c (init_tree): Don't set lang_gimplify_stmt.
207
208 2004-06-18  Richard Henderson  <rth@redhat.com>
209
210         PR c++/16034
211         * semantics.c (begin_cond): New.
212         (finish_cond): Rewrite to handle template DECL_STMTs specially.
213         Assume that non-template decls go land before the conditional.
214         (simplify_loop_decl_cond): Likewise.
215         (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
216         finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
217         begin_switch_stmt, finish_switch_cond): Update to match.
218
219 2004-06-17  Jason Merrill  <jason@redhat.com>
220
221         PR c++/16015
222         * semantics.c (simplify_aggr_init_expr): Don't return the slot.
223         (finish_stmt_expr_expr): Update type after conversions.
224         (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
225         Handle void initializer.
226         * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
227
228 2004-06-17  Geoffrey Keating  <geoffk@apple.com>
229
230         * class.c (build_clone): Don't call defer_fn, let mark_used do it.
231         * cp-tree.h (defer_fn): Delete.
232         * decl2.c (defer_fn): Delete.
233         (finish_file): Simplify deferred_fns loops; check that
234         only used inline functions get into deferred_fns.
235         (mark_used): Inline previous contents of defer_fn.
236
237 2004-06-16  Richard Henderson  <rth@redhat.com>
238
239         * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
240         (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
241         * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
242         of CTOR_INITIALIZER ...
243         (pp_cxx_statement): ... here.
244         * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
245         (finish_function): Use alloc_stmt_list to zap entire function.
246         * parser.c (cp_parser_compound_statement): Update commentary.
247         * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
248         * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
249         (finish_stmt_expr): Don't look through COMPOUND_STMT.
250
251 2004-06-16  Geoffrey Keating  <geoffk@apple.com>
252
253         * pt.c (mark_decl_instantiated): Don't call defer_fn.
254
255 2004-06-16  Richard Henderson  <rth@redhat.com>
256
257         * parser.c (cp_parser_labeled_statement): Update commentary.
258         * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
259         * tree.c (mark_local_for_remap_r): Likewise.
260
261 2004-06-16  Richard Henderson  <rth@redhat.com>
262
263         * parser.c (cp_parser_asm_definition): Update commentary.
264         * pt.c (tsubst_expr): Use ASM_EXPR.
265         * semantics.c (finish_asm_stmt): Likewise.
266
267 2004-06-16  Richard Henderson  <rth@redhat.com>
268
269         * decl.c (finish_destructor_body): Use LABEL_EXPR.
270         * parser.c (cp_parser_statement): Update commentary.
271         * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
272         * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
273         * tree.c (mark_local_for_remap_r): Likewise.
274
275 2004-06-16  Richard Henderson  <rth@redhat.com>
276
277         PR c++/16012
278         * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
279         statement in FOR_INIT_STMT for templates.
280
281 2004-06-15  Richard Henderson  <rth@redhat.com>
282
283         * call.c (initialize_reference): Don't build CLEANUP_STMT here.
284         * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
285         (genericize_try_block): Use gimplify_stmt.
286         (genericize_catch_block, genericize_eh_spec_block): Likewise.
287         (cp_gimplify_init_expr): Remove STMT_EXPR special case.
288         (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
289         * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
290         (cp_tree_chain_matters_p): Remove.
291         * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
292         (COMPOUND_STMT_BODY_BLOCK): New.
293         (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
294         (EXPR_STMT_STMT_EXPR_RESULT): New.
295         (building_stmt_tree): Check cur_stmt_list.
296         (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
297         (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
298         * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
299         (cp_finish_decl): Use push_cleanup.
300         (start_function, finish_function): Use statement lists.
301         (finish_stmt): Do nothing.
302         * except.c (begin_eh_spec_block): Use statement lists.
303         (check_handlers_1, check_handlers): Likewise.
304         * init.c (construct_virtual_base): Don't add extra compound stmts.
305         (build_vec_init): Likewise.
306         * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
307         * name-lookup.h (struct cp_binding_level): Add statement_list.
308         * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
309         (cp_parser_labeled_statement, cp_parser_expression_statement,
310         cp_parser_statement_seq_opt): Likewise.
311         (cp_parser_compound_statement): Likewise.  Take bool for try block.
312         (cp_parser_selection_statement): Tidy if processing.
313         (cp_parser_already_scoped_statement): Rewrite to do what it says.
314         * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
315         (tsubst_expr): Rewrite STMT_EXPR processing.  Handle STATEMENT_LIST.
316         Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
317         * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
318         (finish_cond): New, rewritten from FINISH_COND.
319         (simplify_loop_decl_cond): New.
320         (finish_expr_stmt): Avoid nested EXPR_STMTs.
321         (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
322         begin_else_clause, finish_else_clause, finish_if_stmt,
323         begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
324         begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
325         finish_for_cond, finish_for_stmt, begin_switch_stmt,
326         finish_switch_cond, finish_switch_stmt, begin_try_block,
327         finish_try_block, finish_cleanup_try_block, finish_function_try_block,
328         finish_handler_sequence, finish_function_handler_sequence,
329         begin_handler, finish_handler_parms, finish_handler,
330         begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
331         using statement lists.
332         (begin_compound_stmt): Replace has_no_scope argument with flags.
333         Update all callers.  Use statement lists.
334         (finish_compound_stmt): Likewise.
335         (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
336         (current_scope_stmt_stack): Remove.
337         (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
338         * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
339         Rewrite with statement lists.
340
341 2004-06-15  Alexandre Oliva  <aoliva@redhat.com>
342
343         * parser.c: Change all assignments of c_lex_string_translate
344         to true and false to 1 and 0.
345         (cp_lexer_read_token): Convert type of the translated string.
346         (cp_parser_skip_to_closing_parentheses): Preserve original
347         value of c_lex_string_translate, and set it to -1 while
348         running.
349         (cp_parser_cache_group): Likewise.
350         (cp_parser_cache_group_1): Renamed.
351         (cp_parser_asm_operand_list): Remove redundant setting of
352         c_lex_string_translate.
353         (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
354         Handle chained strings.
355
356 2004-06-12  Andrew Pinski  <apinski@apple.com>
357
358         PR c++/14639
359         Revert:
360         2004-06-02  Andrew Pinski  <pinskia@physics.uc.edu>
361
362                 * cp-tree.h: Fix typo.
363
364                 * cp-tree.h: Include cgraph.h
365                 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
366                 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
367
368 2004-06-12  Jason Merrill  <jason@redhat.com>
369
370         PR tree-optimization/14107
371         * decl.c (finish_function): Warn about no return in all functions.
372
373 2004-06-15  Paolo Bonzini  <bonzini@gnu.org>
374
375         * cp-tree.h (struct language_function): Remove cannot_inline.
376         * decl.c (save_function_data): cannot_inline is no more.
377         (cxx_push_function_context): Likewise.
378         * decl2.c (start_objects, start_static_storage_duration_function):
379         Reset DECL_INLINE, set DECL_UNINLINABLE.
380
381 2004-06-14  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
382
383         PR c++/15967
384         * search.c (lookup_field): Propagate the ambiguity list.
385         (lookup_fnfields): Likewise.
386
387 2004-06-14  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
388
389         PR c++/15947
390         * parser.c (cp_parser_template_name): Ctors/dtors never need a
391         template keyword to disambiguate.
392
393 2004-06-14  Mark Mitchell  <mark@codesourcery.com>
394
395         PR c++/15096
396         * decl.c (grokdeclarator): Ignore pointer-to-members when
397         computing template depth.
398
399         PR c++/14930
400         * name-lookup.c (pushtag): Do not try to put class declarations in
401         explicit specialization scopes.
402
403 2004-06-11  Andrew Pinski  <pinskia@physics.uc.edu>
404
405         * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
406
407 2004-06-11  Mark Mitchell  <mark@codesourcery.com>
408
409         PR c++/15862
410         * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
411         bindings for undeclared built-ins.
412
413 2004-06-11  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
414
415         * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
416         appear at the correct location.
417
418 2004-06-10  Jason Merrill  <jason@redhat.com>
419
420         PR c++/15875
421         Revert:
422         2004-06-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
423         * init.c (build_offset_ref): Build SCOPE_REF with non-null
424         TREE_TYPE for non-dependent names.
425         * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
426         unknown_type_node as its TREE_TYPE.
427         * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
428         * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
429         (dump_expr) <SCOPE_REF case>: Likewise.
430
431 2004-06-10  Mark Mitchell  <mark@codesourcery.com>
432
433         PR c++/15227
434         * parser.c (cp_parser_direct_declarator): Robustify.
435
436         PR c++/15877
437         * pt.c (tsubst_copy): Use decl_constant_value on enumeration
438         constants in non-dependent contexts.
439
440         PR c++/14211
441         PR c++/15076
442         * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
443         necessary.
444
445 2004-06-10  Jakub Jelinek  <jakub@redhat.com>
446
447         PR c++/14791
448         * decl.c (duplicate_decls): Handle fileptr_type_node arguments
449         specially.
450
451 2004-06-09  Mark Mitchell  <mark@codesourcery.com>
452
453         Revert:
454         PR c++/15815
455         2004-06-07  Mark Mitchell  <mark@codesourcery.com>
456         * lex.c (handle_pragma_interface): Deprecate.
457         (handle_pragma_implementation): Likewise.
458
459 2004-06-09  Andrew Pinski  <pinskia@physics.uc.edu>
460
461         * g++spec.c (lang_specific_driver): Remove check for -lm
462         and -lmath when check it see if it was the math library.
463
464 2004-06-08  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
465
466         PR c++/7841
467         * parser.c (cp_parser_direct_declarator): Reject constructor named
468         as qualified template-id.
469
470 2004-06-07  Mark Mitchell  <mark@codesourcery.com>
471
472         PR c++/15815
473         * lex.c (handle_pragma_interface): Deprecate.
474         (handle_pragma_implementation): Likewise.
475
476 2004-06-07  Mark Mitchell  <mark@codesourcery.com>
477
478         PR c++/15766
479         * parser.c (cp_parser_iteration_statement): Fix typo in error
480         message.
481
482         PR c++/14777
483         * pt.c (tsubst_default_argument): Do not defer access checks
484         while substituting into the default argument.
485
486         PR c++/15554
487         * pt.c (tsubst_copy): Do not try to substitute for an enumeration
488         constant in a non-dependent context.
489
490         PR c++/15057
491         * except.c (build_throw): Ensure that temp_expr has been
492         initialized.
493
494 2004-06-06  Roger Sayle  <roger@eyesopen.com>
495
496         * cp/cp-tree.h (lvalue_or_else): Add function prototype.
497
498 2004-06-06  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
499
500         PR c++/15503
501         * parser.c (cp_parser_mem_initializer_id): Gracefully reject
502         'typename', and accept 'template'.
503
504 2004-06-03  Andrew Pinski  <pinskia@physics.uc.edu>
505             Jan Hubicka  <jh@suse.cz>
506
507         PR c++/14639
508         * method.c (use_think): Do not mark thunk as referenced.
509
510 2004-06-03  Matt Austern  <austern@apple.com>
511
512         PR c++/15428
513         * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
514         is nonzero, and if we see a noninline definition of a key method,
515         make the vtables nonweak.
516
517 2004-06-02  Matt Austern  <austern@apple.com>
518
519         * cp-tree.h (instantiate_decl): new boolean parameter,
520         undefined_ok. Current behavior is equivalent to its being 0.
521         * decl2.c (mark_used): Add new argument when calling instantiate_decl
522         * pt.c (mark_decl_instantiated): Unconditionally make
523         instantiations explicit unconditionally
524         (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
525         since mark_decl_instantiated now does it.
526         (instantiate_class_member): New.  Instantiate a member of an
527         explicitly instantiated class template.
528         (do_type_instantiation): Explicitly instantiate members of an
529         explicitly instantiated class template.
530         (instantiate_decl): if undefined_ok is nonzero, and if we're
531         trying to explicitly instantiated a template with no definition,
532         change it to an implicit instantiation.
533         (instantiate_pending_templates): Add new argument to instantiate_decl.
534         * tree.c (cp_cannot_inline_tree_fn): Likewise.
535
536 2004-06-02  Andrew Pinski  <pinskia@physics.uc.edu>
537
538         * cp-tree.h: Fix typo.
539
540         * cp-tree.h: Include cgraph.h
541         (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
542         TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
543
544 2004-06-01  Jason Merrill  <jason@redhat.com>
545
546         PR c++/15142
547         * call.c (call_builtin_trap): Remove type parm.
548         (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
549         (build_x_va_arg): Dereference a null pointer for a non-POD argument.
550
551 2004-06-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
552
553         PR c++/13092
554         * init.c (build_offset_ref): Build SCOPE_REF with non-null
555         TREE_TYPE for non-dependent names.
556         * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
557         unknown_type_node as its TREE_TYPE.
558         * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
559         * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
560         (dump_expr) <SCOPE_REF case>: Likewise.
561
562 2004-06-01  Richard Henderson  <rth@redhat.com>
563             Andrew Pinski  <pinskia@physics.uc.edu>
564
565         * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
566         * parser.c (struct cp_parser): Remove in_offsetof.
567         (cp_parser_new): Don't set it.
568         (cp_parser_unary_expression): Don't check it.
569         (cp_parser_postfix_open_square_expression): Split out from ...
570         (cp_parser_postfix_expression): ... here.
571         (cp_parser_postfix_dot_deref_expression): Likewise.
572         (cp_parser_builtin_offsetof): New.
573         (cp_parser_primary_expression): Use it.
574
575 2004-06-01  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
576
577         PR c++/14932
578         * parser.c (cp_parser_postfix_expression): Allow subscript
579         operator in offsetof.
580
581 2004-05-31  Mark Mitchell  <mark@codesourcery.com>
582
583         PR c++/15701
584         * friend.c (add_friend): Do not try to perform access checks for
585         functions from dependent classes.
586
587 2004-05-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
588
589         * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
590         (pp_cxx_begin_template_argument_list): Turn into a function.
591         (pp_cxx_end_template_argument_list): Likewise.
592         (pp_cxx_separate_with): Define.
593         (pp_cxx_unqualified_id): Tidy.
594         (pp_cxx_primary_expression): Likewise.
595         (pp_cxx_postfix_expression): Likewise.
596         (pp_cxx_expression): Likewise.
597         (pp_cxx_simple_type_specifier): Likewise.
598         (pp_cxx_type_specifier_seq): Likewise.
599         (pp_cxx_parameter_declaration_clause): Likewise.
600         (pp_cxx_exception_specification): Likewise.
601         (pp_cxx_direct_declarator): Likewise.
602         (pp_cxx_type_id): Likewise.
603         * cxx-pretty-print.h (pp_cxx_whitespace): Export from
604         cxx-pretty-print.c.
605         (pp_cxx_left_paren): Likewise.
606         (pp_cxx_right_paren): Likewise.
607         (pp_cxx_left_brace): Likewise.
608         (pp_cxx_right_brace): Likewise.
609         (pp_cxx_left_bracket): Likewise.
610         (pp_cxx_right_bracket): Likewise.
611         (pp_cxx_dot): Likewise.
612         (pp_cxx_identifier): Likewise.
613         (pp_cxx_tree_identifier): Likewise.
614         (pp_cxx_ampersand): New macro.
615         (pp_cxx_star): Likewise.
616         (pp_cxx_arrow): Likewise.
617         (pp_cxx_semicolon): Likewise.
618         (pp_cxx_complement): Likewise.
619         (pp_cxx_begin_template_argument_list): Declaree.
620         (pp_cxx_end_template_argument_list): Likewise.
621         (pp_cxx_colon_colon): likewise.
622
623 2004-05-31  Eric Botcazou  <ebotcazou@libertysurf.fr>
624
625         * parser.c (cp_parser_simple_type_specifier): Explicitly test
626         against NULL_TREE.
627
628 2004-05-31  Kazu Hirata  <kazu@cs.umass.edu>
629
630         * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
631         typeck.c: Fix comment formatting.
632
633 2004-05-30  Andrew Pinski  <pinskia@physics.uc.edu>
634
635         * cp-lang.c (cp_expand_decl): Remove.
636         (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
637
638 2004-05-30  Andreas Jaeger  <aj@suse.de>
639
640         * lang-specs.h: Add missing initializers for .ii.
641
642 2004-05-28  Aldy Hernandez  <aldyh@redhat.com>
643
644         * decl.c (cp_make_fname_decl): Free return value from
645         fname_as_string.
646
647 2004-05-28  Mark Mitchell  <mark@codesourcery.com>
648
649         PR c++/15083
650         * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
651         even in a templat.e
652         * init.c (build_new): Likewise.
653
654         PR c++/15640
655         * name-lookup.c (arg_assoc): Robustify.
656
657         PR c++/15471
658         * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
659         when determining the scope to use for a pointer to member.
660         (lookup_anon_field): Give it external linkage.
661         * cp-tree.h (lookup_anon_field): Declare it.
662         * expr.c (cplus_expand_constant): Use it.
663
664 2004-05-28  Mark Mitchell  <mark@codesourcery.com>
665
666         PR c++/14668
667         * parser.c (cp_parser_simple_type_specifier): Call
668         maybe_note_name_used_in_class.
669
670 2004-05-28  Tom Marshall  <tmarshall@real.com>
671
672         PR c++/15214
673         * class.c (finish_struct_1): Warn only if the dtor is non-private or
674         the class has friends.
675
676 2004-05-27  Adam Nemet  <anemet@lnxw.com>
677
678         PR c++/12883
679         * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
680         TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
681
682 2004-05-24  Geoffrey Keating  <geoffk@apple.com>
683
684         * method.c (implicitly_declare_fn): Don't call defer_fn; abort
685         if it might be needed.
686         * pt.c (mark_decl_instantiated): Only call defer_fn if
687         the function actually needs processing in finish_file.
688         * decl2.c (finish_file): Add check that elements in
689         deferred_fns_used are really needed there.  Remove unnecessary
690         test of DECL_SAVED_TREE.
691
692 2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
693
694         * Make-lang.in: No need to specify $(LIBCPP).
695
696 2004-05-23  Mark Mitchell  <mark@codesourcery.com>
697
698         PR c++/15044
699         * parser.c (cp_parser_class_head): Robustify.
700
701         PR c++/15317
702         * parser.c (cp_parser_decl_specifier_seq): Correct error in
703         comment.
704         (cp_parser_constructor_declarator_p): Treat attributes
705         as decl-specifiers.
706
707         PR c++/15329
708         * typeck.c (build_unary_op): Do not attempt to resolve casts to
709         base classes in templates.
710
711 2004-05-23  Mark Mitchell  <mark@codesourcery.com>
712
713         PR c++/15165
714         * pt.c (instantiate_template): Robustify.
715
716 2004-05-23  Mark Mitchell  <mark@codesourcery.com>
717
718         PR c++/15025
719         * decl.c (xref_tag): Issue errors about redeclaring template
720         classes as non-template classes.
721
722 2004-05-23  Mark Mitchell  <mark@codesourcery.com>
723
724         PR c++/14821
725         * name-lookup.c (supplement_binding): Allow redefinitions of
726         namespace aliases.
727
728         PR c++/14883
729         * parser.c (cp_parser_template_argument): Robustify.
730
731 2004-05-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
732
733         * class.c (alter_access): Use %E format specifier to print an
734         identifier node.  Avoid looking at the IDENTIFIER_POINTER.
735         (push_lang_context): Likewise.
736         * decl.c (lookup_label): Likewise.
737         (grokdeclarator): Likewise.
738         * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
739         * pt.c (do_type_instantiation): Likewise.
740         * tree.c (handle_java_interface_attribute): Likewise.
741         (handle_com_interface_attribute): Likewise.
742         (handle_init_priority_attribute): Likewise.
743
744 2004-05-22  Mark Mitchell  <mark@codesourcery.com>
745
746         PR c++/15285
747         PR c++/15299
748         * pt.c (build_non_dependent_expr): Expand the set of tree nodes
749         recognized as overloaded functions.
750
751 2004-05-22  Mark Mitchell  <mark@codesourcery.com>
752
753         PR c++/15507
754         * class.c (layout_nonempty_base_or_field): Do not try to avoid
755         layout conflicts for unions.
756
757         PR c++/15542
758         * typeck.c (build_x_unary_op): Instantiate template class
759         specializations before looking for "operator &".
760
761         PR c++/15427
762         * typeck.c (complete_type): Layout non-dependent array types, even
763         in templates.
764
765         PR c++/15287
766         * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
767         template.
768
769 2004-05-22  Roger Sayle  <roger@eyesopen.com>
770
771         * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
772         returning when TREE_TYPE is error_mark_node.
773         * typeck.c (require_complete_type): Return error_mark_node if
774         value's type is an error_mark_node.
775
776 2004-05-20  Andrew Pinski  <pinskia@physics.uc.edu>
777
778         * optimize.c (calls_setjmp_r): Remove.
779         (calls_setjmp_p): Remove.
780         * cp-tree.c (calls_setjmp_p): Remove.
781         * decl.c (finish_function): Do not call calls_setjmp_p.
782
783 2004-05-18  Zack Weinberg  <zack@codesourcery.com>
784
785         * decl.c (cp_finish_decl): Use mark_decl_referenced.
786         * decl2.c (maybe_make_one_only): Likewise.
787         * method.c (use_thunk): Likewise.
788
789 2004-05-18  Jason Merrill  <jason@redhat.com>
790
791         * class.c (build_base_path): Tidy a bit.
792
793 2004-05-14  Geoffrey Keating  <geoffk@apple.com>
794
795         * name-lookup.c (struct scope_binding): New.
796         (EMPTY_SCOPE_BINDING): New.
797         (lookup_using_namespace): Take a scope_binding instead of a
798         cxx_binding.
799         (qualified_lookup_using_namespace): Likewise.
800         (cxx_binding_clear): Delete.
801         (do_nonmember_using_decl): Use a scope_binding instead of a
802         cxx_binding.
803         (lookup_tag): Don't call select_decl.
804         (ambiguous_decl): Don't return anything (and change callers to match).
805         Take a scope_binding as the second parameter.
806         (lookup_namespace_name): Use a scope_binding instead of a
807         cxx_binding.
808         (unqualified_namespace_lookup): Likewise.
809         (lookup_qualified_name): Likewise.
810         (select_decl): Take a scope_binding instead of a cxx_binding.
811         Use macros rather than hand-coding tests for type-ness.
812
813 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
814
815         * cp-gimplify.c: Rename from cp-simplify.c.
816         * Make-lang.in, optimize.c: Update.
817
818 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
819
820         Merge from tree-ssa-20020619-branch.  See
821         ChangeLog.tree-ssa for details.
822
823         * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
824         cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
825         expr.c, init.c, name-lookup.h, optimize.c, parser.c,
826         pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
827         Merged.
828         * cp-mudflap.c: New file.
829         * cp-simplify.c:: New file.
830
831 2004-05-03  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
832
833         PR c++/14389
834         * decl2.c (check_classfn): For member templates, compare also the
835         template parameters to match the declaration.
836         * cp-tree.h: Adjust declaration of check_classfn.
837         * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
838         * friend.c (do_friend): Likewise.
839         * pt.c (tsubst_friend_function): Likewise.
840
841 2004-05-01  Zack Weinberg  <zack@codesourcery.com>
842
843         * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
844         Instead, dig into the representation type to find the array bound.
845
846 2004-04-30  Jason Merrill  <jason@redhat.com>
847
848         Refer to base members using COMPONENT_REFs where possible.
849         * class.c (build_simple_base_path): New fn.
850         (build_base_path): Use it for non-virtual base references.
851         (layout_class_type): Change base fields to their real type
852         after layout is done.
853         * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
854         * cp-lang.c (cxx_get_alias_set): Use it.
855
856 2004-04-30  Kazu Hirata  <kazu@cs.umass.edu>
857
858         * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
859         comment typos.
860
861 2004-04-23  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
862
863         PR c++/15064
864         * parser.c (cp_parser_postfix_expression): typeid operator cannot be
865         used in integral constant expressions.
866
867 2004-04-22  Mark Mitchell  <mark@codesourcery.com>
868
869         * init.c (build_aggr_init): Fix accidental use of C99 construct in
870         previous change.
871
872         * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
873         braced initializer.
874         * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
875         * decl.c (reshape_init): Use it.
876         * init.c (perform_member_init): Remove redundant condition.
877         (build_aggr_init): Adjust to handle brace-enclosed initializers
878         correctly.
879         (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
880
881         * parser.c (cp_parser_initializer_clause): Do not set
882         TREE_HAS_CONSTRUCTOR on the initializer.
883         * rtti.c (tinfo_base_init): Likewise.
884         (generic_initializer): Likewise.
885         (ptr_initializer): Likewise.
886         (ptm_initializer): Likewise.
887         (class_initializer): Likewise.
888         (get_pseudo_ti_init): Likewise.
889         * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
890
891 2004-04-22  Alan Modra  <amodra@bigpond.net.au>
892
893         * name-lookup.c (anonymous_namespace_name): Make static.
894
895 2004-04-19  Roger Sayle  <roger@eyesopen.com>
896
897         PR middle-end/14531
898         * class.c (build_base_path): Call fold whilst building the NULL
899         pointer check expression trees.
900
901 2004-04-15  Bryce McKinlay  <mckinlay@redhat.com>
902
903         * init.c (build_new_1): Don't use type size argument for Java
904         _Jv_AllocObject call.
905
906 2004-04-09  Danny Smith  <dannysmith@users.sourceforge.net>
907
908         * method.c (make_alias_for_thunk): Remove preprocessor guard on
909         declaration and definition.
910
911 2004-04-08  Danny Smith  <dannysmith@users.sourceforge.net>
912
913         PR c++/14808
914         * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
915         than ASM_OUTPUT_DEF.
916
917 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
918
919         * decl2.c (mark_used): Don't segfault if cfun != NULL but
920         current_function_decl == NULL.
921
922 2004-04-05  Nathan Sidwell  <nathan@codesourcery.com>
923
924         PR c++/3518
925         * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
926         level.
927
928 2004-04-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
929
930         * init.c (decl_constant_value): Don't look at DECL_INITIAL
931         of PARM_DECL.
932         * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
933         or TREE_SIDE_EFFECTS of a type.
934
935 2004-04-02  Nathan Sidwell  <nathan@codesourcery.com>
936
937         PR c++/14007
938         * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
939         cv-qualifier unification.
940         * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
941
942 2004-04-02  Jan Hubicka  <jh@suse.cz>
943
944         * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
945         * cp-tree.h (cp_update_decl_after_saving): Declare.
946         * tree.c (cp_update_decl_after_saving): Define.
947
948 2004-04-01  Mark Mitchell  <mark@codesourcery.com>
949
950         PR c++/14803
951         * typeck.c (get_delta_difference): Call fold before returning the
952         value.
953
954 2004-04-01  Richard Henderson  <rth@redhat.com>
955
956         PR c++/14804
957         * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
958         * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
959
960 2004-04-01  Mark Mitchell  <mark@codesourcery.com>
961
962         PR c++/14810
963         * name-lookup.c (maybe_push_cleanup_level): Robustify.
964
965 2004-04-01  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
966
967         * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
968
969 2004-03-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
970
971         * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
972         * class.c (check_bitfield_decl): Likewise.
973         * cvt.c (type_promotes_to): Likewise.
974         * decl.c (finish_enum): Likewise.
975         * mangle.c (write_builtin_type): Likewise.
976         * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
977         * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
978         (build_binary_op): Likewise.
979
980 2004-03-31  Jan Hubicka  <jh@suse.cz>
981
982         * tree.h (optimize_function): Kill prototype.
983         * optimize.c (dump_function, optimize_function, dump_finction): Kill.
984         * semantics.c (expand_body): Kill.
985
986 2004-03-30  Mark Mitchell  <mark@codesourcery.com>
987
988         PR c++/14724
989         * decl.c (start_decl_1): Do not decide whether or not to create a
990         new cleanup level until after the type has been completed.
991
992         PR c++/14763
993         * pt.c (tsubst_default_argument): Clear current_function_decl.
994
995 2004-03-30  Zack Weinberg  <zack@codesourcery.com>
996
997         * name-lookup.c, parser.c: Use new shorter form of GTY markers.
998
999 2004-03-29  Zack Weinberg  <zack@codesourcery.com>
1000
1001         * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
1002         is null, just print the literal name and return.
1003
1004 2004-03-25  Kazu Hirata  <kazu@cs.umass.edu>
1005
1006         * cxx-pretty-print.c: Fix comment typos.
1007
1008 2004-03-24  Kazu Hirata  <kazu@cs.umass.edu>
1009
1010         * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
1011         Update copyright.
1012
1013 2004-03-23  Ziemowit Laski  <zlaski@apple.com>
1014
1015         * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
1016         * mangle.c (write_type): Add call to 'mangle_fundamental_type'
1017         target hook.
1018
1019 2004-03-23  Zack Weinberg  <zack@codesourcery.com>
1020
1021         PR 12267, 12391, 12560, 13129, 14114, 14133
1022         * cp-lang.c (c_reset_state): Delete.
1023         (push_file_scope, pop_file_scope): New stubs.
1024         * parser.c (c_parse_file): Call sorry() here if called more than once.
1025
1026 2004-03-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1027
1028         * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
1029         for INTEGER_CST.
1030
1031 2004-03-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1032
1033         * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
1034
1035 2004-03-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1036
1037         * error.c (enum pad): Remove.
1038         (dump_qualifiers): Likewise.
1039         (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
1040         (dump_aggr_type): Likewise.
1041         (dump_type_suffix): Likewise.
1042         (dump_simple_decl): Likewise.
1043         (dump_function_decl): Likewise.
1044         (cv_to_string): Likewise.
1045         (dump_type_prefix): Likewise.  Adjust return void.
1046         * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
1047         cxx_pretty_print.h.
1048         (pp_cxx_template_keyword_if_needed): Document.
1049         (pp_cxx_qualified_id): Document case FUNCTION_DECL.  Tidy.
1050         (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
1051         MUST_NOT_THROW_EXPR.
1052
1053 2004-03-21  Mark Mitchell  <mark@codesourcery.com>
1054
1055         PR c++/14616
1056         * decl.c (cp_finish_decl): Compute the size of arrays declared in
1057         templates, if their type is non-dependent.
1058
1059 2004-03-19  Mark Mitchell  <mark@codesourcery.com>
1060
1061         * call.c (build_op_delete_call): Do not forget the placement
1062         arguments when iterating through mutiple delete operators.
1063
1064         * cp-tree.h (svaed_scope): Remove last_parms.
1065         (NEW_DELETE_OPNAME_P): New macro.
1066         (last_function_parms): Remove.
1067         (do_friend): Adjust prototype.
1068         * decl.c (grokparms): Return the PARM_DECLs directly, rather than
1069         using last_function_parms.
1070         (grokfndecl): Take the PARM_DECLs as an argument, rather than
1071         using last_function_parms.
1072         (grokdeclarator): Adjust accordingly.  Do not form METHOD_TYPEs
1073         for class-specific operator new and operator delete.
1074         (grok_op_properties): Do not look for allocation functions with
1075         METHOD_TYPEs.
1076         (start_function): Use DECL_ARGUMENTS instead of
1077         last_function_parms.
1078         * decl.h (last_function_parms): Do not declare.
1079         * decl2.c (grokclassfn): Do not use last_function_parms.
1080         * friend.c (do_friend): Remove parmdecls parameter.
1081         * name-lookup.c (push_to_top_level): Do not save last_function_parms.
1082         (pop_from_top_level): Do not restore it.
1083         * pt.c (check_explicit_specialization): Do not adjust
1084         last_function_parms.
1085
1086         * name-lookup.c (do_local_using_decl): Create a local binding for
1087         types brought in via using declarations.
1088
1089         * name-lookup.c (lookup_arg_dependent): Handle block-scope
1090         function declarations correctly.
1091
1092         * semantics.c (finish_id_expression): Correct handling of
1093         conversion operators to dependent types.
1094
1095         * typeck.c (lookup_destructor): Allow the use of destructors from
1096         base classes.
1097
1098 2004-03-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1099
1100         * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
1101         TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
1102         * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
1103         the field is named TEMPLATE_TYPE_PARM_INDEX.
1104
1105 2004-03-19  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1106
1107         PR c++/14545
1108         * parser.c (cp_parser_functional_cast): A cast to anything
1109         but integral or enumaration type is not an integral constant
1110         expression.
1111         * pt.c (value_dependent_expression_p): Handle cast expressions
1112         without operands (such as "int()").
1113
1114 2004-03-18  Mark Mitchell  <mark@codesourcery.com>
1115
1116         * semantics.c (finish_pseudo_destructor_expr): Allow differing
1117         cv-qualification between the type named by the
1118         pseudo-destructor-name and the object-type.
1119
1120         * search.c (accessible_base_p): Handle non-proper bases.
1121
1122         * name-lookup.c (do_nonmember_using_decl): If a using declaration
1123         refers to a single overloaded function, set the type of the
1124         function.
1125         * tree.c (lvalue_type): Simplify.
1126         * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
1127         unknown type.
1128         (build_unary_op): Handle OVERLOADs with known types.
1129
1130         * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
1131         function templates.
1132
1133         * parser.c (cp_parser_postfix_expression): Handle the use of
1134         "typename" in non-dependent contexts.  Convert appropriately when
1135         when using a qualified name after "->" or ".".
1136
1137         * call.c (conditional_conversion): Honor the requirement that some
1138         conversions refer to the original object.
1139
1140 2004-03-18  Mark Mitchell  <mark@codesourcery.com>
1141
1142         * call.c (build_conditional_expr): Do not call force_rvalue for
1143         operands of void_type when the conditional expression itself has
1144         void type.
1145         * name-lookup.c (pushdecl): Don't consider a declaration of a
1146         function named "main" to be an overload of a type named "main".
1147         * parser.c (cp_parser_template_name): Perform name lookup when the
1148         template name is proceeded by "template" if the qualifying scope
1149         is non-dependent.
1150         * typeck.c (composite_pointer_type_r): Correctly handle
1151         pointer-to-member types.
1152         (build_const_cast): Likewise.
1153
1154 2004-03-18  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1155
1156         * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
1157         * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
1158         (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
1159         (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
1160         (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
1161         (TYPEOF_TYPE_EXPR): New macro.
1162         * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
1163         * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
1164         * pt.c (tsubst): Likewise.
1165         * semantics.c (finish_typeof): Likewise.
1166         * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
1167         and TEMPLATE_TYPE_PARM.
1168         * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
1169         (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
1170
1171 2004-03-16  Mark Mitchell  <mark@codesourcery.com>
1172
1173         PR c++/14586
1174         * cp-tree.h (build_new_op): Change prototype.
1175         (build_x_binary_op): Likewise.
1176         * call.c (build_new_op): Add overloaded_p parameter.
1177         * decl2.c (grok_array_decl): Adjust call to build_new_op.
1178         * parser.c (cp_parser_binary_expression): Note that uses of
1179         overloaded operators prevents an expression from being considered
1180         an integral constant.
1181         * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
1182         build_x_binary_op.
1183         * semantics.c (finish_call_expr): Likewise.
1184         * typeck.c (rationalize_conditional_expr): Likewise.
1185         (build_x_indirect_ref): Likewise.
1186         (build_x_binary_op): Likewise.
1187         (build_x_unary_op): Likewise.
1188         (build_x_compound_expr): Likewise.
1189         (build_modify_expr): Likewise.
1190         * typeck2.c (build_x_arrow): Likewise.
1191
1192 2004-03-15  Kazu Hirata  <kazu@cs.umass.edu>
1193
1194         * cp-lang.c, ptree.c: Update copyright.
1195
1196 2004-03-13  Mark Mitchell  <mark@codesourcery.com>
1197
1198         PR c++/14550
1199         * parser.c (cp_parser_non_integral_constant_expression): Encode
1200         more of the idiom that surrounded calls to this function within
1201         the function itself
1202         (cp_parser_primary_expression): Adjust accordingly.
1203         (cp_parser_postfix_expression): Likewise.
1204         (cp_parser_unary_expression): Likewise.
1205         (cp_parser_cast_expression): Likewise.
1206         (cp_parser_assignment_expression): Likewise.
1207         (cp_parser_expression): Likewise.
1208         (cp_parser_new_expression): Note that new-expressions are not
1209         allowed in integral constant expressions.
1210         (cp_parser_delete_expression): Likewise.
1211
1212 2004-03-12  Matt Austern  <austern@apple.com>
1213
1214         * decl2.c (maybe_make_one_only): Look at
1215         TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
1216         to make an explicit instantiation weak.
1217         * method.c (use_thunk): Make sure we call comdat_linkage
1218         when appropriate.
1219         * pt.c (do_type_instantiation): On systems where weak symbols
1220         don't go in a static archive's TOC, explicit instantiation of a
1221         class must imply *explicit* instantiation of its memeber.
1222
1223 2004-03-11  Kazu Hirata  <kazu@cs.umass.edu>
1224
1225         * call.c, cp-tree.h, pt.c: Fix comment typos.
1226
1227 2004-03-10  Mark Mitchell  <mark@codesourcery.com>
1228
1229         PR c++/14510
1230         * decl.c (xref_tag): Disregard non-type declarations when
1231         looking up a tagged type.
1232
1233 2004-03-09  Nathan Sidwell  <nathan@codesourcery.com>
1234
1235         PR c++/14397
1236         * call.c (convert_like_real): Build a const qualified temporary,
1237         when testing ctor access.
1238
1239 2004-03-09  Mark Mitchell  <mark@codesourcery.com>
1240
1241         * call.c (initialize_reference): Fix typo.
1242
1243 2004-03-09  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1244
1245         PR c++/14409
1246         * pt.c (determine_specialization): For member templates, match also
1247         constness.
1248
1249         PR c++/14448
1250         * parser.c (cp_parser_initializer_clause): Fold initializer if it is
1251         non-dependent.
1252         * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
1253
1254 2004-03-09  Mark Mitchell  <mark@codesourcery.com>
1255
1256         PR c++/14230
1257         * call.c (initialize_reference): Handle initializers that are
1258         class-member access expressions applies to rvalues.
1259
1260 2004-03-09  Mark Mitchell  <mark@codesourcery.com>
1261
1262         PR c++/14432
1263         * name-lookup.c (supplement_binding): Ignore functions that are
1264         marked DECL_ANTICIPATED.
1265
1266 2004-03-08  Mark Mitchell  <mark@codesourcery.com>
1267
1268         PR c++/14401
1269         * class.c (check_field_decls): Complain about non-static data
1270         members of reference type in unions.  Propagate
1271         CLASSTYPE_REF_FIELDS_NEED_INIT and
1272         CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
1273         data members.
1274         * init.c (perform_member_init): Complain about mbmers with const
1275         type that are not explicitly initialized.
1276
1277 2004-03-08  Mark Mitchell  <mark@codesourcery.com>
1278
1279         * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
1280         * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
1281         (lang_identifier): Remove implicit_decl and error_locus.
1282         (IDENTIFIER_IMPLICIT_DECL): Remove.
1283         (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
1284         (IDENTIFIER_ERROR_LOCUS): Likewise.
1285         (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
1286         (TYPE_ASSEMBLER_NAME_STRING): Likewise.
1287         (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
1288         (implicitly_declare): Remove.
1289         * decl.c (warn_extern_redeclared_static): Remove check of
1290         IDENTIFIER_IMPLICIT_DECL.
1291         (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
1292         (implicitly_declare): Remove.
1293         (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
1294         (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
1295         (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
1296         * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
1297         in the innermost scope, rather than at namespace scope.
1298         * name-lookup.c (push_local_binding): Give it external linkage.
1299         (pushdecl): Remove dead code.
1300         * name-lookup.h (push_local_binding): Declare it.
1301         * ptree.c (cxx_print_identifier): Don't print
1302         IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
1303         * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
1304         not IDENTIFIER_ERROR_LOCUS.
1305         * typeck.c (build_function_call): Remove dead code.
1306
1307 2004-03-08  Jason Merrill  <jason@redhat.com>
1308
1309         PR c++/13170
1310         * decl.c (xref_tag): Remove attribute handling.
1311         * cp-tree.h: Adjust prototype.
1312         * decl.c, parser.c, rtti.c: Adjust callers.
1313         * parser.c (cp_parser_class_head): Pass back attributes in the
1314         class head.
1315         (cp_parser_class_specifier): Adjust.
1316
1317 2004-03-08  Matt Austern  <austern@apple.com>
1318
1319         PR debug/14079
1320         * name-lookup.c (add_decl_to_level): Add extern variables, as well
1321         as static, to static_decls array.
1322
1323 2004-03-05  Jason Merrill  <jason@redhat.com>
1324
1325         * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
1326
1327 2004-03-04  Geoffrey Keating  <geoffk@apple.com>
1328
1329         * decl.c (grokfndecl): Update old incorrect comment.
1330         (grokvardecl): Diagnose C++ variables of type with no linkage.
1331
1332 2004-03-01  Mark Mitchell  <mark@codesourcery.com>
1333
1334         PR c++/14369
1335         * pt.c (build_non_dependent_expr): Do not create a
1336         NON_DEPENDENT_EXPR for a THROW_EXPR.
1337
1338 2004-03-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1339
1340         PR c++/14369
1341         * error.c (dump_expr): Handle THROW_EXPR.
1342
1343 2004-03-01  Mark Mitchell  <mark@codesourcery.com>
1344
1345         PR c++/14360
1346         * parser.c (cp_parser_postfix_expression): Do not perform Koenig
1347         lookup if ordinary name-lookup finds a non-function.
1348         * pt.c (tsubst_copy_and_build): Likewise.
1349
1350         PR c++/14361
1351         * parser.c (cp_parser_late_parsing_default_args): Check that there
1352         are no extra tokens after the end of the default-argument
1353         expression.
1354
1355 2004-03-01  Mark Mitchell  <mark@codesourcery.com>
1356
1357         PR c++/14324
1358         * lex.c (retrofit_lang_decl): Treat entities with no linkage as
1359         having C++ linkage for name-mangling purposes.
1360
1361         PR c++/14260
1362         * parser.c (cp_parser_direct_declarator): Recognize constructor
1363         declarators that use a template-id to name the class being
1364         constructed.
1365
1366         PR c++/14337
1367         * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
1368         (tsubst_expr): Do not call tsubst_copy, even when
1369         processing_template_decl.
1370
1371 2004-03-01  Jeff Law  <law@redhat.com>
1372
1373         * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
1374         the proper type.
1375
1376 2004-02-29  Mark Mitchell  <mark@codesourcery.com>
1377
1378         PR c++/14138
1379         * name-lookup.h (push_scope): Change prototype.
1380         * name-lookup.c (push_scope): Do not reenter the current class
1381         scope.
1382         * decl.c (grokfndecl): Check return code from push_scope before
1383         calling pop_scope.
1384         * decl2.c (check_classfn): Likewise.
1385         * parser.c (cp_parser_conversion_function_id): Likewise.
1386         (cp_parser_init_declarator): Likewise.
1387         (cp_parser_direct_declarator): Likewise.
1388         (cp_parser_class_specifier): Likewise.
1389         (cp_parser_class_head): Likewise.
1390         (cp_parser_lookup_name): Likewise.
1391         (cp_parser_constructor_declarator_p): Likewise.
1392         * pt.c (instantiate_class_template): Likewise.
1393         (resolve_typename_type): Likewise.
1394
1395 2004-02-29  Mark Mitchell  <mark@codesourcery.com>
1396
1397         PR c++/14267
1398         * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
1399         extension.
1400
1401         PR debug/12103
1402         * class.c (update_vtable_entry_for_fn): Do not go through
1403         covariance machinery if the type returned by an overrider is the
1404         same as the original.
1405
1406 2004-02-29  Kazu Hirata  <kazu@cs.umass.edu>
1407
1408         * call.c: Fix a comment typo.
1409
1410 2004-02-27  Ziemowit Laski  <zlaski@apple.com>
1411
1412         * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
1413
1414 2004-02-26  Mark Mitchell  <mark@codesourcery.com>
1415
1416         PR c++/14278
1417         * parser.c (cp_parser_parameter_declaration_list): Commit
1418         to fewer tentative parses.
1419
1420 2004-02-26  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1421
1422         PR c++/14284
1423         * pt.c (dependent_type_p_r): A template template parameter is a
1424         dependent type.
1425
1426 2004-02-26  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1427
1428         PR c++/14246
1429         * mangle.c (write_template_arg_literal): Don't rely on identity for
1430         boolean constants.
1431
1432 2004-02-24  Jason Merrill  <jason@redhat.com>
1433
1434         * tree.c (build_exception_variant): Use check_qualified_type.
1435
1436 2004-02-23  Zack Weinberg  <zack@codesourcery.com>
1437             Kazu Hirata  <kazu@cs.umass.edu>
1438
1439         * decl.c (cxx_init_decl_processing): Don't check
1440         flag_writable_strings.
1441
1442 2004-02-23  Andrew Pinski  <pinskia@physics.uc.edu>
1443
1444         PR c++/14156
1445         * typeck.c (maybe_warn_about_returning_address_of_location):
1446         Change check for VAR_DECL to use DECL_P instead.
1447
1448 2004-02-23  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1449
1450         PR c++/14250
1451         * cvt.c (build_expr_type_conversion): Type must be complete before
1452         looking up for conversions.
1453
1454 2004-02-23  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1455
1456         PR c++/14143
1457         * name-lookup.c (arg_assoc_class): Don't look into template
1458         arguments if it is not a primary template.
1459
1460 2004-02-20  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
1461
1462         PR c++/12007
1463         * method.c (use_thunk): Always clone function argument tree.
1464
1465 2004-02-20  Mark Mitchell  <mark@codesourcery.com>
1466
1467         PR c++/14199
1468         * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
1469
1470         PR c++/14173
1471         * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
1472         for all type variants.
1473
1474 2004-02-19  Mark Mitchell  <mark@codesourcery.com>
1475
1476         PR c++/13927
1477         * decl.c (duplicate_decls): Return error_mark_node for invalid
1478         redeclarations.
1479         * name-lookup.c (push_namespace): Ignore the return value from
1480         pushdecl.
1481         * pt.c (push_template_decl_real): Robustify.
1482
1483         PR c++/14186
1484         * name-lookup.c (push_class_level_binding): Do not complain about
1485         adding a binding for a member whose name is the same as the
1486         enclosing class if the member is located in a base class of the
1487         current class.
1488
1489 2004-02-19  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1490
1491         PR c++/14181
1492         * parser.c (cp_parser_new_expression): Parse an ill-formed
1493         direct-new-declarator after a parenthesized type-id to emit good
1494         diagnostic.
1495
1496 2004-02-18  Kazu Hirata  <kazu@cs.umass.edu>
1497
1498         * cp-tree.def, cvt.c: Update copyright.
1499
1500 2004-02-17  Mark Mitchell  <mark@codesourcery.com>
1501
1502         PR c++/11326
1503         * cp-tree.h (abi_version_at_least): Remove.
1504         * mangle.c: Include flags.h.
1505
1506 2004-02-15  Mark Mitchell  <mark@codesourcery.com>
1507
1508         PR c++/13971
1509         * call.c (build_conditional_expr): Handle conversions between
1510         class types which result in differently cv-qualified type
1511         variants.
1512
1513         PR c++/14086
1514         * class.c (delete_duplicate_fields_1): Remove.
1515         (delete_duplicate_fields): Likewise.
1516         (finish_struct_anon): Remove check for members with the same name
1517         as their enclosing class.
1518         (check_field_decls): Do not call duplicate_fields.
1519         * decl.c (grokdeclarator): Remove check for static data members
1520         with the same name as their enclosing class.
1521         * name-lookup.c (push_class_level_binding): Check for members with
1522         the same name as their enclosing class.
1523
1524 2004-02-15  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1525
1526         PR c++/14085
1527         * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
1528
1529 2004-02-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1530
1531         PR c++/13635
1532         * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
1533         has full set of arguments.
1534
1535 2004-02-13  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1536
1537         PR c++/13927
1538         * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
1539
1540 2004-02-13  Mark Mitchell  <mark@codesourcery.com>
1541
1542         PR c++/14122
1543         * cp-tree.h (delete_sanity): Change prototype.
1544         * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
1545         Remove dead code.  Adjust code to warn about deleting an array.
1546         * typekc.c (decay_conversion): Use build_address and build_nop.
1547
1548         PR c++/14108
1549         * search.c (accessible_p): Do not check access in thunks.
1550
1551         PR c++/14083
1552         * call.c (build_conditional_expr): Call force_rvalue on the
1553         non-void operand in the case that one result is a throw-expression
1554         and the other is not.
1555
1556 2004-02-13  Ian Lance Taylor  <ian@wasabisystems.com>
1557
1558         PR c++/9851
1559         * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
1560         the type name and look ahead for ::~, and bail out early with a
1561         better error message if the parse is going to fail.
1562
1563 2004-02-12  Mark Mitchell  <mark@codesourcery.com>
1564
1565         * call.c (conversion_kind): New type.
1566         (conversion_rank): Likewise.
1567         (conversion): Likewise.
1568         (CONVERSION_RANK): New macro.
1569         (conversion_obstack): New variable.
1570         (obstack_initialized): Likewise.
1571         (z_candidate): Change type of convs and second_conv.
1572         (candidate_warning): New type.
1573         (IDENTITY_RANK): Remove.
1574         (EXACT_RANK): Likewise.
1575         (PROMO_RANK): Likewise.
1576         (STD_RANK): Likewise.
1577         (PBOOL_RANK): Likewise.
1578         (USER_RANK): Likewise.
1579         (ELLIPSIS_RANK): Likewise.
1580         (BAD_RANK): Likewise.
1581         (ICS_RANK): Likewise.
1582         (ICS_STD_RANK): Likewise.
1583         (ICS_USER_FLAG): Likewise.
1584         (ICS_ELLIPSIS_FLAG): Likewise.
1585         (ICS_THIS_FLAG): Likewise.
1586         (ICS_BAD_FLAG): Likewise.
1587         (NEED_TEMPORARY_P): Likewise.
1588         (CHECK_COPY_CONSTRUCTOR_P): Likewise.
1589         (USER_CONV_CAND): Likewise.
1590         (USER_CONV_FN): Likewise.
1591         (conversion_obstack_alloc): New function.
1592         (alloc_conversion): Likewise.
1593         (validate_conversion_obstack): Likewise.
1594         (alloc_conversions): Likewise.
1595         (build_conv): Adjust to deal with new conversion data structures.
1596         (build_identity_conv): New function.
1597         (build_ambiguous_conv): Likewise.
1598         (standard_conversion): Adjust to deal with new conversion data
1599         structures.
1600         (convert_class_to_reference): Likewise.
1601         (direct_reference_binding): Likewise.
1602         (reference_binding): Likewise.
1603         (implicit_conversion): Likewise.
1604         (add_candidate): Likewise.
1605         (add_function_candidate): Likewise.
1606         (add_conv_candidate): Likewise.
1607         (build_builtin_candidate): Likewise.
1608         (print_z_candidate): Likewise.
1609         (merge_conversion_sequences): Likewise.
1610         (build_user_type_conversion_1): Likewise.
1611         (build_user_type_conversion): Likewise.
1612         (build_new_function_call): Likewise.
1613         (build_object_call): Likewise.
1614         (conditional_conversion): Likewise.
1615         (build_conditional_expr): Likewise.
1616         (build_new_op): Likewise.
1617         (build_op_delete_call): Likewise.
1618         (convert_like_real): Likewise.
1619         (build_over_call): Likewise.
1620         (build_new_method_call): Likewise.
1621         (is_subseq): Likewise.
1622         (maybe_handle_implicit_object): Likewise.
1623         (maybe_handle_ref_bind): Likewise.
1624         (compare_ics): Likewise.
1625         (source_type): Likewise.
1626         (add_warning): Likewise.
1627         (joust): Likewise.
1628         (can_convert_arg): Likewise.
1629         (can_convert_arg_bad): Likewise.
1630         (perform_implicit_conversion): Likewise.
1631         (perform_direct_initialization_if_possible): Likewise.
1632         (initialize_reference): Likewise.
1633         * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
1634         * cp-tree.def (WRAPPER): Likewise.
1635         (IDENTITY_CONV): Remove.
1636         (LVALUE_CONV): Likewise.
1637         (QUAL_CONV): Likewise.
1638         (STD_CONV): Likewise.
1639         (PTR_CONV): Likewise.
1640         (PMEM_CONV): Likewise.
1641         (BASE_CONV): Likewise.
1642         (REF_BIND): Likewise.
1643         (USER_CONV): Likewise.
1644         (AMBIG_CONV): Likewise.
1645         (RVALUE_CONV): Likewise.
1646         * cp-tree.h (tree_wrapper): Remove.
1647         (WRAPPER_ZC): Remove.
1648         (lang_tree_node): Remove wrapper.
1649         (LOOKUP_SPECULATIVELY): Remove.
1650         (build_op_delete_call): Adjust prototype.
1651         (validate_conversion_obstack): Declare.
1652         (build_zc_wrapper): Remove.
1653         * cvt.c (convert_to_reference): Remove dead code.
1654         (ocp_convert): Likewise.
1655         * decl.c (redeclaration_error_message): Correct handling of
1656         templates.
1657         (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
1658         (cp_tree_node_structure): Remove WRAPPER case.
1659         * decl2.c (finish_file): Call validate_conversion_obstack.
1660         * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
1661         (build_op_delete_call): Likewise.
1662         (build_x_delete): Likewise.
1663         (build_delete): Adjust call to build_op_delete_call.
1664         * pt.c (tsubst_friend_declaration): Adjust code to determine
1665         whether or not a friend template is a definition.
1666         (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
1667         * tree.c (build_zc_wrapper): Remove.
1668
1669 2004-02-12  Zack Weinberg  <zack@codesourcery.com>
1670
1671         * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
1672         * cp-tree.h: Don't declare cxx_builtin_type_decls.
1673         * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
1674         (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
1675
1676 2004-02-10  Mark Mitchell  <mark@codesourcery.com>
1677
1678         * typeck.c (lookup_destructor): Fix typo in error message.
1679
1680 2004-02-09  Kazu Hirata  <kazu@cs.umass.edu>
1681
1682         * call.c, parser.c, tree.c: Fix comment typos.
1683
1684 2004-02-07  Zack Weinberg  <zack@codesourcery.com>
1685
1686         Bug 13856
1687         * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
1688         * decl.c (duplicate_decls, start_function): Likewise.
1689
1690 2004-02-07  Zack Weinberg  <zack@codesourcery.com>
1691
1692         * name-lookup.c (pushdecl): Issue shadow warnings directly.
1693         * parser.c (free_parser_stacks): Delete.
1694
1695 2004-02-07  Kazu Hirata  <kazu@cs.umass.edu>
1696
1697         * rtti.c: Update copyright.
1698
1699 2004-02-06  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1700
1701         PR c++/14033
1702         * decl.c (require_complete_types_for_parms): Do not insert
1703         error_mark_node in the parameter list.
1704
1705 2004-02-06  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1706
1707         PR c++/14028
1708         * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
1709         error when terminator can not be found.
1710
1711 2004-02-05  Kelley Cook  <kcook@gcc.gnu.org>
1712
1713         Make-lang.in (po-generated):  Delete.
1714
1715 2004-02-05  Kazu Hirata  <kazu@cs.umass.edu>
1716
1717         * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
1718         targetm.calls.promote_prototypes.
1719
1720 2004-02-05  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
1721
1722         PR middle-end/13750
1723         Revert:
1724         2004-01-15  Geoffrey Keating  <geoffk@apple.com>
1725         PR pch/13361
1726         * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
1727         (handle_pragma_implementation): Likewise.
1728
1729 2004-02-05  Mark Mitchell  <mark@codesourcery.com>
1730
1731         PR c++/13714
1732         * typeck.c (lookup_destructor): Tweak error message.
1733
1734 2004-02-05  Jan Hubicka  <jh@suse.cz>
1735
1736         * tree.c (cp_cannot_inline_tree_fn):  Allow inlining of comdat
1737         functions.
1738
1739 2004-02-05  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1740
1741         PR c++/14008
1742         * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
1743         code, only emits the diagnostic now. Added lookup of the identifier
1744         and support for qualified ids.
1745         (cp_parser_parse_and_diagnose_invalid_type_name): New function.
1746         Parse an (invalid) type name as id-expression within a declarator.
1747         (cp_parser_simple_declaration): Use it.
1748         (cp_parser_member_declaration): Likewise.
1749         (cp_parser_make_typename_type): New function. Handle errors through
1750         cp_parser_diagnose_invalid_typename.
1751         (cp_parser_elaborated_type_specifier): Use it.
1752
1753 2004-02-04  Mark Mitchell  <mark@codesourcery.com>
1754
1755         PR c++/13932
1756         * call.c (convert_like_real): Use "converting" rather than
1757         "argument" as the descriptive keyword to
1758         dubious_conversion_warnings.
1759         * typeck.c (convert_for_assignment): Do not call
1760         dubious_conversion_warnings.
1761
1762 2004-02-04  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1763
1764         PR c++/13086
1765         * init.c (build_delete): Emit a more informative error message in
1766         case of an incomplete type, and on the correct source line.
1767
1768 2004-02-04  Kazu Hirata  <kazu@cs.umass.edu>
1769
1770         * error.c, search.c: Update copyright.
1771
1772 2004-02-04  Mark Mitchell  <mark@codesourcery.com>
1773
1774         PR c++/9941
1775         * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
1776         linkage for the typeinfo name string.
1777
1778 2004-02-04  Mark Mitchell  <mark@codesourcery.com>
1779
1780         PR c++/13969
1781         * cp-tree.h (fold_non_dependent_expr): New function.
1782         * parser.c (cp_parser_fold_non_dependent_expr): Remove.
1783         (cp_parser_template_argument): Use fold_non_dependent_expr.
1784         (cp_parser_direct_declarator): Likewise.
1785         * pt.c (fold_non_dependent_expr): New function.
1786         (convert_nontype_argument): Use it.
1787         (tsubst_qualified_id): Simplify.
1788         (tsubst_copy_and_build): Likewise.
1789
1790 2004-02-04  Mark Mitchell  <mark@codesourcery.com>
1791
1792         * decl.c (cxx_push_function_context): Do not set
1793         current_function_is_thunk.
1794         * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
1795         actual function.
1796
1797 2004-02-04  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1798
1799         PR c++/13997
1800         * pt.c (more_specialized_class): Increase processing_template_decl
1801         while partial ordering.
1802
1803 2004-02-03  Mark Mitchell  <mark@codesourcery.com>
1804
1805         PR c++/13925
1806         * decl.c (start_function): Do not call pushdecl for any
1807         instantiation or specialization of a primary template.
1808
1809 2004-02-03  Mark Mitchell  <mark@codesourcery.com>
1810
1811         PR c++/13950
1812         * parser.c (cp_parser_class_name): Robustify.
1813
1814         PR c++/13970
1815         * parser.c (cp_parser_cache_group): Do not consume the EOF token.
1816
1817         PR c++/14002
1818         * semantics.c (finish_id_expression): Do not return an
1819         IDENTIFIER_NODE when lookup finds a PARM_DECL.
1820
1821 2004-02-03  Mark Mitchell  <mark@codesourcery.com>
1822
1823         PR c++/13978
1824         * pt.c (build_non_dependent_expr): Do not build
1825         NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
1826
1827         PR c++/13968
1828         * semantics.c (finish_id_expression): Do not return an
1829         IDENTIFIER_NODE when lookup finds a VAR_DECL.
1830
1831         PR c++/13975
1832         * parser.c (cp_parser_simple_declaration): When skipping to the
1833         end of the statement swallow the terminating semicolon.
1834
1835 2004-02-02  Mark Mitchell  <mark@codesourcery.com>
1836
1837         PR c++/13113
1838         * init.c (build_offset_ref): Improve error recovery for invalid
1839         uses of non-static member functions.
1840
1841         PR c++/13854
1842         * cp-tree.h (cp_build_type_attribute_variant): New function.
1843         * class.c (build_clone): Use cp_build_type_attribute_variant.
1844         * decl.c (duplicate_decls): Likewise.
1845         * pt.c (copy_default_args_to_explicit_spec): Likewise.
1846         (tsubst_function_type): Likewise.
1847         * tree.c (build_exception_variant): Check attributes before
1848         concluding that two types are the same.
1849         (cp_build_type-attribute_variant): New method.
1850         * typeck.c (merge_types): Use cp_build_type_attribute_variant.
1851
1852         PR c++/13907
1853         * call.c (convert_class_to_reference): Keep better track of
1854         pedantically invalid user-defined conversions.
1855
1856 2004-02-01  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1857
1858         PR c++/13957
1859         * pt.c (tsubst_qualified_id): Improved error message when a type
1860         is expected but not found.
1861
1862 2004-01-31  Kazu Hirata  <kazu@cs.umass.edu>
1863
1864         * class.c: Fix comment typos.
1865         * decl.c: Likewise.
1866         * error.c: Likewise.
1867         * parser.c: Likewise.
1868         * pt.c: Likewise.
1869         * search.c: Likewise.
1870         * typeck.c: Likewise.
1871
1872 2004-01-30  Richard Henderson  <rth@redhat.com>
1873
1874         PR c++/13693
1875         * method.c (use_thunk): Don't force_target_expr for void thunks.
1876         * tree.c (build_target_expr_with_type): Assert non-void type.
1877         (force_target_expr): Likewise.
1878
1879 2004-01-30  Michael Matz  <matz@suse.de>
1880
1881         * parser.c (cp_parser_labeled_statement): Accept case ranges.
1882
1883 2004-01-30  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1884
1885         DR206
1886         PR c++/13813
1887         * decl.c (grokdeclarator): Check immediatly type completeness for
1888         non-dependent types.
1889
1890 2004-01-30  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1891
1892         PR c++/13683
1893         * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
1894         a sizeof expression.block
1895
1896 2004-01-29  Mark Mitchell  <mark@codesourcery.com>
1897
1898         PR c++/13883
1899         * mangle.c (write_encoding): Correct encoding of member template
1900         constructors.
1901
1902 2004-01-28  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1903
1904         * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
1905         template name as it was `<::' (digraph typo).
1906         (cp_parser_nth_token_starts_template_argument_list_p): New function.
1907         (cp_parser_id_expression): Use it.
1908         (cp_parser_nested_name_specifier_opt): Likewise.
1909         (cp_parser_template_name): Likewise.
1910         (cp_parser_class_name): Likewise.
1911         (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
1912
1913 2004-01-28  Mark Mitchell  <mark@codesourcery.com>
1914
1915         PR c++/13791
1916         * typeck.c (merge_types): Do not merge attributes into
1917         TYPENAME_TYPEs.
1918
1919         PR c++/13736
1920         * parser.c (cp_parser_direct_declarator): Do not prevent
1921         backtracking inside a parenthesized declarator.
1922         (cp_parser_parameter_declaration): Fix typo in comment.
1923
1924 2004-01-28  Jan Hubicka  <jh@suse.cz>
1925
1926         * semantics.c (expand_body)  Do emit_associated_thunks before
1927         expansion.
1928
1929 2004-01-27  Devang Patel  <dpatel@apple.com>
1930
1931         * name-lookup.c: Include "debug.h"
1932         (do_namespace_alias): Invoke debug_hooks to emit debug info
1933         for namespace alias.
1934         (do_local_using_decl): Invoke debug_hooks to emit debug info
1935         for using decl.
1936         (do_class_using_decl): Same.
1937         (do_toplevel_using_decl): Same.
1938         (do_using_directive): Same.
1939         (cp_emit_debug_info_for_using): New function.
1940         * Make-lang.in (cp/parser.o): Depend on debug.h
1941         (cp/name-lookup.o): Same.
1942
1943 2004-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1944
1945         * cp-tree.h (language_function, lang_type_header): Use
1946         BOOL_BITFIELD.
1947         * name-lookup.h (cp_binding_level): Likewise.
1948
1949 2004-01-26  Mark Mitchell  <mark@codesourcery.com>
1950
1951         PR c++/13663
1952         * semantics.c (finish_for_expr): Check for unresolved overloaded
1953         functions.
1954
1955         * class.c (add_method): Just check processing_template_decl to
1956         determine whether or not we are within a template.
1957         * decl2.c (maybe_retrofit_in_chrg): Likewise.
1958         * init.c (decl_constant_value): Check the type of the declaration,
1959         not TREE_READONLY.
1960         * name-lookup.c (maybe_push_to_top_level): Rename to ...
1961         (push_to_top_level): ... this.
1962         * name-lookup.h (maybe_push_to_top_level): Do not declare it.
1963         * pt.c (push_template_decl_real): Reorder condition for speed.
1964         (convert_template_argument): Use dependency-checking functions in
1965         place of uses_template_parms.
1966         (lookup_template_class): Avoid calling uses_template_parms more
1967         than once.
1968         (uses_template_parms): Reimplement, using dependency-checking
1969         functions.
1970         (instantiate_class_template): Use push_to_top_level, not
1971         maybe_push_to_top_level.
1972         (type_unification_real): Simplify.
1973         (type_dependent_expression_p): Handle OFFSET_REFs and
1974         TEMPLATE_DECLs.
1975         (any_dependent_template_arguments_p): Handle multiple levels of
1976         template argument.
1977         * semantics.c (expand_or_defer_fn): Do not check
1978         uses_template_parms for template instantiations.
1979         * typeck.c (comptypes): Avoid calling cp_type_quals.
1980
1981 2004-01-25  Mark Mitchell  <mark@codesourcery.com>
1982
1983         PR c++/13833
1984         * call.c (build_over_call): Do not convert arguments when
1985         processing a template.
1986         * pt.c (build_non_dependent_expr): Do not build a
1987         NON_DEPENDENT_EXPR for arithmetic constants.
1988
1989 2004-01-25  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1990
1991         PR c++/13810
1992         * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
1993         returns a TYPE_DECL. no further lookup is required.
1994         * semantics.c (check_template_template_default_arg): A TYPE_DECL
1995         is invalid. Rework to give better diagnostics.
1996
1997 2004-01-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1998
1999         PR c++/13797
2000         * pt.c (instantiate_class_template): Add an error_mark_node
2001         check.
2002         (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
2003
2004 2004-01-23  Andrew Pinski  <pinskia@physics.uc.edu>
2005
2006         PR c++/13701
2007         * decl.c (finish_function): Move the call to
2008         finish_fname_decls below the call to
2009         finish_eh_spec_block.
2010
2011 2004-01-21  Kazu Hirata  <kazu@cs.umass.edu>
2012
2013         * optimize.c, typeck2.c: Update copyright.
2014
2015 2004-01-21  Kazu Hirata  <kazu@cs.umass.edu>
2016
2017         * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
2018         init.c, mangle.c, typeck.c: Update copyright.
2019
2020 2004-01-21  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
2021
2022         * parser.c (cp_parser_class_specifier): Prevent garbage collection.
2023
2024 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
2025
2026         * Make-lang.in: Replace $(docdir) with doc.
2027         (c++.info, c++.srcinfo): Dummy entry.
2028         (c++.man, c++.srcman): New rules.
2029         (c++.install-man): Revamp rule.
2030
2031 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
2032
2033         * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
2034         CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
2035         immediate $(shell) instead of deferred backquote.
2036
2037 2004-01-19  Mark Mitchell  <mark@codesourcery.com>
2038
2039         PR c++/13651
2040         * parser.c (cp_parser_postfix_expression): When encountering
2041         incomplete type on left-hand side of "->" or ".", treat the entire
2042         expression as erroneous.
2043
2044         PR c++/13592
2045         * call.c (build_field_call): Remove.
2046         (n_build_method_call): Likewise.
2047         (build_method_call): Likewise.
2048         (build_new_method_call): Do not call build_field_call.
2049         * class.c (n_build_method_call): Remove.
2050         (print_class_statistics): Do not print it.
2051         * cp-tree.h (build_method_call): Remove declaration.
2052         (finish_object_call_expr): Likewise.
2053         (build_new_1): Do not use build_method_call.
2054         * parser.c (cp_parser_postfix_expression): Use finish_call_expr
2055         when the function appearing on the right-hand-side of "." or "->"
2056         is not actually a function.
2057         * pt.c (tsubst_copy_and_build): Likewise.
2058         * semantics.c (finish_object_call_expr): Remove.
2059
2060 2004-01-18  Mark Mitchell  <mark@codesourcery.com>
2061
2062         PR c++/13710
2063         * pt.c (tsubst): Use finish_typeof.
2064
2065 2004-01-18  Jason Merrill  <jason@redhat.com>
2066
2067         PR c++/11725
2068         * except.c (build_throw): In a template, set
2069         current_function_returns_abnormally.
2070
2071 2004-01-17  Fred Fish  <fnf@intrinsity.com>
2072
2073         PR c++/11895
2074         * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
2075         except don't call array_type_nelts() with a VECTOR_TYPE.
2076
2077 2004-01-16  Jan Hubicka  <jh@suse.cz>
2078
2079         * mangle.c (write_mangled_name): Remove inline modifier.
2080
2081 2004-01-16  Mark Mitchell  <mark@codesourcery.com>
2082
2083         PR c++/13574
2084         * decl.c (compute_array_index_type): Fix grammar in comment.
2085         * init.c (build_zero_init): Handle zero-sized arrays correctly.
2086
2087         PR c++/13178
2088         * call.c (name_as_c_string): Print conversion operator names
2089         correctly.
2090
2091         PR c++/13478
2092         * call.c (initialize_reference): Pass -1 for inner parameter to
2093         convert_like_real.
2094
2095 2004-01-15  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2096
2097         PR c++/13407
2098         * parser.c (cp_parser_base_specifier): Check for an invalid
2099         keyword `typename' and emit an user-friendly error message.
2100
2101 2004-01-15  Geoffrey Keating  <geoffk@apple.com>
2102
2103         PR pch/13361
2104         * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
2105         (handle_pragma_implementation): Likewise.
2106
2107 2004-01-15  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2108
2109         PR c++/9259
2110         * typeck.c (build_class_member_access_expr): Allow to access members
2111         of the currently open class.
2112         (finish_class_member_access_expr): Likewise.
2113
2114 2004-01-15  Alexandre Oliva  <aoliva@redhat.com>
2115
2116         PR c++/13659
2117         * name-lookup.c (validate_nonmember_using_decl): Take scope and
2118         name by value, instead of computing them.
2119         (do_local_using_decl, do_toplevel_using_decl): Add scope and name
2120         arguments.  Pass them to validate_nonmember_using_decl.
2121         * name-lookup.h (do_local_using_decl): Adjust.
2122         (do_toplevel_using_decl): Likewise.
2123         * parser.c (cp_parser_using_declaration): Likewise.
2124         * pt.c (tsubst_expr): Likewise.
2125
2126 2004-01-15  Alexandre Oliva  <aoliva@redhat.com>
2127
2128         PR c++/13594
2129         PR c++/13658
2130         * name-lookup.c (qualified_lookup_using_namespace): Search
2131         strongly-associated namespaces first, and only then try other
2132         namespaces.
2133
2134 2004-01-15  Kelley Cook  <kcook@gcc.gnu.org>
2135
2136         * Make-lang.in (c++.srcextra): Dummy entry.
2137
2138 2004-01-15  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2139
2140         PR c++/8856
2141         * parser.c (cp_parser_template_name): Don't try to parse a
2142         conversion-function-id, as it cannot be a template-name.
2143         (cp_parser_simple_type_specifier): Check for invalid template-ids
2144         even after a built-in type.
2145
2146 2004-01-14  Jan Hubicka  <jh@suse.cz>
2147
2148         PR c++/12850
2149         * pt.c (instantiate_decl):  Do not increase function_depth.
2150
2151 2004-01-14  Danny Smith  <dannysmith@users,sourceforge.net>
2152
2153         PR c++/9021
2154         PR c++/11005
2155         * parser.c (cp_parser_elaborated_type_specifier): Warn about
2156         attributes and discard.
2157         * decl.c (xref_tag): Don't overwite existing attributes with
2158         NULL_TREE.
2159
2160 2004-01-14  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2161
2162         PR c++/12335
2163         * parser.c (cp_parser_lookup_name): Return error_mark_node if there
2164         is no destructor while looking up a BIT_NOT_EXPR.
2165
2166 2004-01-13  Ian Lance Taylor  <ian@wasabisystems.com>
2167
2168         * cxxfilt.c: Remove unused file.
2169
2170 2004-01-14  Jan Hubicka  <jh@suse.cz>
2171
2172         Partial fix to PR c++/12850
2173         * decl2.c (mark_used): Do not proactively instantiate templates
2174         when compiling in unit-at-a-time or not optimizing.
2175         * optimize.c (maybe_clone_body): Do not increase function depth.
2176
2177 2004-01-13  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2178
2179         PR c++/13474
2180         * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
2181
2182 2004-01-12  Steven Bosscher  <stevenb@suse.de>
2183
2184         PR c++/13558
2185         * parser.c (cp_parser_member_declaration): Any non-type is also
2186         not a class or a function.
2187
2188 2004-01-12  Jason Merrill  <jason@redhat.com>
2189
2190         PR c++/12815
2191         * class.c (build_base_path): Do not mark vtable references as
2192         TREE_CONSTANT.
2193         (build_vtbl_ref_1): Likewise.
2194
2195 2004-01-12  Richard Henderson  <rth@redhat.com>
2196
2197         PR opt/10776
2198         * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
2199         (store_init_value): Use it.
2200         * decl.c (check_initializer): Expect full initialization code
2201         from store_init_value.
2202         * init.c (expand_aggr_init_1): Likewise.
2203         * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
2204
2205 2004-01-12  Mark Mitchell  <mark@codesourcery.com>
2206
2207         * class.c (layout_class_type): For non-POD class types, also copy
2208         the DECL_SIZE and DECL_MODE of fields to the base class type.
2209
2210 2004-01-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2211
2212         PR c++/13289
2213         * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
2214         calling regenerate_decl_from_template.
2215
2216 2004-01-12  Scott Brumbaugh  <scottb.lists@verizon.net>
2217
2218         PR c++/4100
2219         * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
2220         decl-specifier occurring along with a class definition.
2221
2222 2004-01-12  Ian Lance Taylor  <ian@wasabisystems.com>
2223
2224         * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
2225         clauses to comments describing declares_class_or_enum.
2226         (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
2227         false.
2228
2229 2004-01-12  Jan Hubicka  <jh@suse.cz>
2230
2231         * pt.c (for_each_template_parm): Do not check for duplicates.
2232         (for_each_template_parm): Use walk_tree duplicate checking code.
2233
2234 2004-01-11  Ian Lance Taylor  <ian@wasabisystems.com>
2235
2236         PR c++/3478
2237         * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
2238         is error_mark_node, don't add any more decl_specs.
2239         (cp_parser_init_declarator): After committing to a declaration, if
2240         the decl_specifiers start with error_mark_node, issue an error and
2241         change the type to "int".
2242
2243 2004-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
2244
2245         PR bootstrap/7817
2246         * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
2247
2248 2004-01-10  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2249
2250         DR 337
2251         PR c++/9256
2252         * pt.c (tsubst): Substitution must fail if we are attempting to
2253         create an array with element type that is an abstract class type.
2254         * decl.c (cp_finish_decl): Strip pointers and array types recursively
2255         before calling abstract_virtuals_error.
2256
2257 2004-01-09  Alexandre Oliva  <aoliva@redhat.com>
2258
2259         * name-lookup.c (qualified_lookup_using_namespace): Consider
2260         strong using directives even if we've already found a binding.
2261
2262 2004-01-09  Mark Mitchell  <mark@codesourcery.com>
2263
2264         * cp-tree.h (cxx_expand_expr): Change prototype.
2265         * expr.c (cxx_expand_expr): Add alt_rtl parameter.
2266
2267 2004-01-08  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2268
2269         PR c++/12573
2270         * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
2271         looking into them recursively. They can be there because of the
2272         new __offsetof__ extension.
2273
2274 2004-01-07  Zack Weinberg  <zack@codesourcery.com>
2275
2276         * parser.c (cp_parser_save_member_function_body): Mark the
2277         definition static.
2278
2279 2004-01-05  Mark Mitchell  <mark@codesourcery.com>
2280
2281         PR c++/13057
2282         * class.c (build_clone): Copy type attributes from the original
2283         function to the clone.
2284
2285         PR c++/12815
2286         * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
2287         references as constant.
2288
2289         PR c++/12132
2290         * parser.c (cp_parser_explicit_instantiation): Improve error
2291         recovery.
2292         (cp_parser_require): Improve indication of the error location.
2293
2294         PR c++/13451
2295         * parser.c (cp_parser_class_head): Reorder logic to check for
2296         invalid qualification.
2297
2298 2004-01-04  Mark Mitchell  <mark@codesourcery.com>
2299
2300         PR c++/13157
2301         * name-lookup.c (lookup_using_namespace): Remove spacesp
2302         parameter.
2303         (unqualified_namespace_lookup): Likewise.
2304         (lookup_qualified_name): Adjust accordingly.
2305         (lookup_name_real): Likewise.
2306         (lookup_arg_dependent): Do not eliminate the namespace of the
2307         functions found by unqualified name lookup unless that is the
2308         current namespace.
2309
2310 2004-01-04  Andrew Pinski  <pinskia@physics.uc.edu>
2311
2312         * semantics.c (push_deferring_access_checks): Fix format.
2313         (resume_deferring_access_checks): Likewise.
2314         (stop_deferring_access_checks): Likewise.
2315         (pop_deferring_access_checks): Likewise.
2316         (get_deferred_access_checks): Likewise.
2317         (pop_to_parent_deferring_access_checks): Likewise.
2318         (perform_deferred_access_checks): Likewise.
2319         (perform_or_defer_access_check): Likewise.
2320
2321 2004-01-04  Richard Henderson  <rth@redhat.com>
2322
2323         * call.c (build_over_call): Don't create a save_expr of an
2324         aggregate, but rather its address.
2325
2326 2004-01-04  Mark Mitchell  <mark@codesourcery.com>
2327
2328         PR c++/13529
2329         * parser.c (cp_parser_postfix_expression): Allow "." to appear in
2330         an offsetof expression.
2331
2332         * parser.c (cp_parser_parameter_declaration): Fix comment.
2333
2334         PR c++/12226
2335         * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
2336         (reference_binding): Set it when appropriate.
2337         (build_temp): New function, split out from ...
2338         (convert_like_real): ... here.  Honor CHECK_COPY_CONSTRUCTOR_P.
2339         (initialize_reference): Likewise.
2340
2341         PR c++/13536
2342         * parser.c (cp_parser): Add in_type_id_in_expr_p.
2343         (cp_parser_new): Initialize it.
2344         (cp_parser_postfix_expression): Set it.
2345         (cp_parser_sizeof_operand): Likewise.
2346         (cp_parser_parameteR_declaration): Do not commit early to tenative
2347         parsers when in_type_id_in_expr_p is set.
2348
2349 2004-01-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2350
2351         PR c++/13094
2352         * parser.c (cp_parser_template_argument): Don't call
2353         make_unbound_class_template directly.
2354         (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
2355         UNBOUND_CLASS_TEMPLATE tree node.
2356
2357 2004-01-02  Richard Sandiford  <rsandifo@redhat.com>
2358
2359         PR target/12729
2360         * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
2361
2362 2004-01-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2363
2364         PR c++/13520
2365         * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
2366         (DECL_FUNCTION_TEMPLATE_P): Use it.
2367         (DECL_CLASS_TEMPLATE_P): Likewise.
2368         * parser.c (cp_parser_lookup_name): Add is_template parameter.
2369         (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
2370         (cp_parser_template_name): Likewise.
2371         (cp_parser_elaborated_type_specifier): Likewise.
2372         (cp_parser_namespace_name): Likewise.
2373         (cp_parser_class_name): Likewise.
2374         (cp_parser_lookup_name_simple): Likewise.
2375
2376 See ChangeLog.3 for earlier changes.