OSDN Git Service

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