OSDN Git Service

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