OSDN Git Service

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