OSDN Git Service

PR c++/21686
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2005-05-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2
3         PR c++/21686
4         * semantics.c (finish_id_expression): Fix quoting in error message.
5
6 2005-05-25  DJ Delorie  <dj@redhat.com>
7
8         * decl.c (duplicate_decls): Move warning control from if() to
9         warning(OPT_*).
10         * name-lookup.c (parse_using_directive): Likewise.
11         * parser.c (cp_parser_elaborated_type_specifier): Likewise.
12         (cp_parser_init_declarator): Likewise.
13         * tree.c (handle_com_interface_attribute): Likewise.
14
15 2005-05-24  Ziemowit Laski  <zlaski@apple.com>
16
17         * class.c (layout_class_type): Do not issue C++ ABI warnings
18         for ObjC structs.
19         * decl.c (objc_mark_locals_volatile): Streamline by calling
20         objc_volatilize_decl().
21         * parser.c (cp_parser_objc_message_expression): Allow simple
22         type specifiers (instead of merely type names) as message
23         receivers.
24         * pt.c (template_args_equal): Do not call objc_comptypes().
25         * typeck.c (composite_pointer_type): If both pointers are
26         ObjC-esque, arbitrarily choose the first; do not call
27         objc_comptypes().
28         (comptypes): Do not call objc_comptypes().
29         (convert_for_assignment): Call objc_compare_types().
30         (comp_ptr_ttypes_real): Call objc_type_quals_match() before
31         concluding that types do not match.
32
33 2005-05-24  Andrew Pinski  <pinskia@physics.uc.edu>
34
35         PR C++/21645
36         * optimize.c (update_cloned_parm): Copy the TYPE also from the
37         original one.
38
39 2005-05-19  Jakub Jelinek  <jakub@redhat.com>
40
41         PR c++/21495
42         * decl.c (grokdeclarator): Fix "storage class specified for"
43         error reporting.
44
45 2005-05-19  Kazu Hirata  <kazu@cs.umass.edu>
46
47         * parser.c: Fix comment typos.
48
49 2005-05-18  Geoffrey Keating  <geoffk@apple.com>
50
51         * Make-lang.in (cc1plus-dummy): New.
52         (cc1plus-checksum.c): New.
53         (cc1plus-checksum.o): New.
54         (cc1plus): Add cc1plus-checksum.o.
55
56 2005-05-17  H.J. Lu  <hongjiu.lu@intel.com>
57
58         PR C++/19664
59         * decl2.c (determine_visibility): Don't set visibility to
60         hidden if it has been set explicitly by user.
61
62 2005-05-17  Ziemowit Laski  <zlaski@apple.com>
63             Mike Stump  <mrs@apple.com>
64
65         Yet more Objective-C++...
66         
67         * cp-objcp-common.h (cxx_get_alias_set): Move from
68         here...
69         (cxx_warn_unused_global_decl): Likewise.
70         (cp_expr_size): Likewise.
71         (cp_tree_size): Likewise.
72         (cp_var_mod_type_p): Likewise.
73         (cxx_initialize_diagnostics): Likewise.
74         (cxx_types_compatible_p): Likewise.
75         * cp-tree.h: to here.
76         (do_poplevel): Add.
77         * lex.c (D_OBJC): Add.
78         (init_reswords): Add.
79         * Make-lang.in (cp/pt.o): Add cp/cp-objcp-common.h.
80         * parser.c: Add c-common.h include.
81         * pt.c: Add c-common.h and cp-objcp-common.h includes.
82         (template_args_equal): Use objc_comptypes as well.
83         (tsubst_copy_and_build): Use objcp_tsubst_copy_and_build as well.
84         * semantics.c (do_poplevel): Remove static.
85
86         * decl.c (objc_mark_locals_volatile): Don't change decls that are
87         already ok.
88         * decl2.c (generate_ctor_or_dtor_function): Add code to initialize
89         Objective C++ early enough.
90         * lex.c (struct resword reswords): Add Objective-C++ support.
91         * parser.c (cp_lexer_get_preprocessor_token): Add Objective-C++.
92         (cp_parser_objc_message_receiver): Add.
93         (cp_parser_objc_message_args): Likewise.
94         (cp_parser_objc_message_expression): Likewise.
95         (cp_parser_objc_encode_expression): Likewise.
96         (cp_parser_objc_defs_expression): Likewise.
97         (cp_parser_objc_protocol_expression): Likewise.
98         (cp_parser_objc_selector_expression): Likewise.
99         (cp_parser_objc_expression): Likewise.
100         (cp_parser_objc_visibility_spec): Likewise.
101         (cp_parser_objc_method_type): Likewise.
102         (cp_parser_objc_protocol_qualifiers): Likewise.
103         (cp_parser_objc_typename): Likewise.
104         (cp_parser_objc_selector_p): Likewise.
105         (cp_parser_objc_selector): Likewise.
106         (cp_parser_objc_method_keyword_params): Likewise.
107         (cp_parser_objc_method_tail_params_opt): Likewise.
108         (cp_parser_objc_interstitial_code): Likewise.
109         (cp_parser_objc_method_signature): Likewise.
110         (cp_parser_objc_method_prototype_list): Likewise.
111         (cp_parser_objc_method_definition_list): Likewise.
112         (cp_parser_objc_class_ivars): Likewise.
113         (cp_parser_objc_identifier_list): Likewise.
114         (cp_parser_objc_alias_declaration): Likewise.
115         (cp_parser_objc_class_declaration): Likewise.
116         (cp_parser_objc_protocol_declaration): Likewise.
117         (cp_parser_objc_protocol_refs_opt): Likewise.
118         (cp_parser_objc_superclass_or_category): Likewise.
119         (cp_parser_objc_class_interface): Likewise.
120         (cp_parser_objc_class_implementation): Likewise.
121         (cp_parser_objc_end_implementation): Likewise.
122         (cp_parser_objc_declaration): Likewise.
123         (cp_parser_objc_try_catch_finally_statement): Likewise.
124         (cp_parser_objc_synchronized_statement): Likewise.
125         (cp_parser_objc_throw_statement): Likewise.
126         (cp_parser_objc_statement): Likewise.
127         (cp_parser_primary_expression): Add Objective-C++.
128         (cp_parser_statement): Likewise.
129         (cp_parser_declaration): Likewise.
130         (cp_parser_simple_type_specifier): Likewise.
131         (cp_parser_type_name): Likewise.
132         (cp_parser_parameter_declaration_list): Likewise.
133         (cp_parser_member_declaration) Likewise.
134         * tree.c: Include debug.h.
135         * typeck.c (composite_pointer_type): Add Objective-C++ support.
136         (finish_class_member_access_expr): Likewise.
137         (build_function_call): Allow objc to rewrite FUNCTION_DECLs.
138         (build_modify_expr): Allow objc to generate write barriers.
139
140         * Make-lang.in (cp/tree.o): Add debug.h.
141         * tree.c (lvalue_p_1, case CONST_DECL): Add.
142
143 2005-05-18  Jan Hubicka  <jh@suse.cz>
144
145         * method.c: Include tree-pass.h
146         (use_thunk): Lower body before expanding.
147
148 2005-05-17  Jakub Jelinek  <jakub@redhat.com>
149
150         PR c++/21454
151         * decl.c (maybe_deduce_size_from_array_init): Call
152         cp_apply_type_quals_to_decl after completing array type.
153
154 2005-05-16  Richard Henderson  <rth@redhat.com>
155
156         * decl.c (build_library_fn_1): Move setting TREE_NOTHROW ...
157         (build_library_fn): ... here.
158
159 2005-05-12  Ian Lance Taylor  <ian@airs.com>
160
161         * cp-tree.h (cp_stmt_codes): Don't define.
162         (statement_code_p): Declare.
163         (STATEMENT_CODE_P): Define.
164         * lex.c (statement_code_p): Define.
165         (cxx_init): Use actual codes in stmt_codes initializer, not
166         cp_stmt_codes macro.  Initialize statement_code_p directly, rather
167         than using INIT_STATEMENT_CODES.
168
169 2005-05-09  Mark Mitchell  <mark@codesourcery.com>
170
171         * typeck.c (build_unary_op): Do not resort to address arithmetic
172         when taking the address of a COMPONENT_REF.
173         
174 2005-05-08  Kazu Hirata  <kazu@cs.umass.edu>
175
176         * class.c (vtbl_init_data_s): Change the type of fns to
177         VEC(tree,gc)*.
178         (build_vtbl_initializer, add_vcall_offset, add_vcall_offset):
179         Use VEC instead of VARRAY.
180
181 2005-05-07  Richard Sandiford  <rsandifo@redhat.com>
182
183         * mangle.c: Remove a reference to the MIPS -mint64 option.
184
185 2005-05-07  Kazu Hirata  <kazu@cs.umass.edu>
186
187         * decl.c (wrapup_globals_for_namespace): Use VEC instead of
188         VARRAY.
189         * name-lookup.c (add_decl_to_level, begin_scope): Likewise.
190         * name-lookup.h (cp_binding_level): Change the type of
191         static_decls to VEC(tree,gc)*.
192
193         * mangle.c (globals): Change the type of substitutions to
194         VEC(tree,gc)*.
195         (dump_substitution_candidates, add_substitution,
196         find_substitution, finish_mangling, init_mangle): Use VEC
197         instead of VARRAY.
198
199 2005-05-06  Kazu Hirata  <kazu@cs.umass.edu>
200
201         * decl2.c (spew_debug): Remove.
202
203         * decl2.c (ssdf_decls, start_static_storage_duration_function,
204         generate_ctor_or_dtor_function): Use VEC instead of VARRAY.
205
206         * decl2.c (pending_statics, note_vague_linkage_var,
207         cp_finish_file): Use VEC instead of VARRAY.
208         (pending_statics_used): Remove.
209
210 2005-05-05  Kazu Hirata  <kazu@cs.umass.edu>
211
212         * decl2.c (deferred_fns, note_vague_linkage_fn,
213         cp_finish_file): Use VEC instead of VARRAY.
214
215 2005-05-05  Mark Mitchell  <mark@codesourcery.com>
216
217         PR c++/21352
218         * pt.c (build_non_dependent_expr): Use is_overloaded_fn.
219
220 2005-05-05  Kazu Hirata  <kazu@cs.umass.edu>
221
222         * pt.c: Fix a comment typo.
223
224 2005-05-04  Kazu Hirata  <kazu@cs.umass.edu>
225
226         * cp-tree.h (language_function): Change the type of
227         x_local_names to VEC.
228         * decl.c (push_local_name): Adjust uses of local_names.
229
230 2005-05-03  Kazu Hirata  <kazu@cs.umass.edu>
231
232         * friend.c, lex.c, mangle.c, repo.c: Update copyright.
233
234 2005-05-02  Kazu Hirata  <kazu@cs.umass.edu>
235
236         * class.c (local_classes, init_class_processing): Use VEC
237         instead of VARRAY.
238         * cp-tree.h (local_classes): Likewise.
239         * mangle.c (discriminator_for_local_entity): Likewise.
240         * name-lookup.c (pushtag): Likewise.
241
242         * class.c (current_lang_depth, push_lang_context,
243         pop_lang_context): Use VEC instead of VARRAY.
244         * cp-tree.h (saved_scope): Use VEC for lang_base instead of
245         VARRAY.
246         * name-lookup.c (push_to_top_level): Use VEC instead of
247         VARRAY.
248
249 2005-05-02  Paolo Bonzini  <bonzini@gnu.org>
250
251         * semantics.c (finish_call_expr): Call resolve_overloaded_builtin
252         for BUILT_IN_MD built-ins.
253
254 2005-05-02  Michael Matz  <matz@suse.de>
255
256         PR c++/19542
257         * cp-tree.h (cp_tree_index): Remove CPTI_NULL, to be defined in C
258         common frontend.
259         (null_node): Remove.
260         * lex.c (cxx_init): Move null_node initialisation to C common frontend.
261
262 2005-04-25  Ian Lance Taylor  <ian@airs.com>
263
264         * cp-tree.def: Add EXPR_STMT.
265         * cp-tree.h (cp_stmt_codes): Add EXPR_STMT.
266         (EXPR_STMT_EXPR): Define.
267         * cp-gimplify.c: Include "flags.h".
268         (gimplify_expr_stmt): New static function.
269         (cp_gimplify_expr): Handle EXPR_STMT.
270         * cxx-pretty-print.c (pp_cxx_statement): Use pp_cxx_expression
271         rather than pp_expression.
272         (pp_cxx_statement): Handle EXPR_STMT.
273         * dump.c (cp_dump_tree): Handle EXPR_STMT.
274         * lex.c (cxx_init): Don't use c_common_stmt_codes in stmt_codes
275         initializer.
276
277 2005-04-25  Andrew Pinski  <pinskia@physics.uc.edu>
278
279         PR C++/21188
280         * rtti.c (ifnonnull): Cast the zero comparison operand
281         to the correct type.
282
283 2005-04-24  Jakub Jelinek  <jakub@redhat.com>
284
285         PR middle-end/20991
286         * class.c: Include cgraph.h.
287         (cp_fold_obj_type_ref): Set node->local.vtable_method.
288         * Make-lang.in (cgraph.o): Depend on $(CGRAPH_H).
289
290 2005-04-12  Markus F.X.J. Oberhumer  <markus@oberhumer.com>
291
292         * mangle.c (write_builtin_type): Handle integer types which are
293         not one of the shared integer type nodes and emit a "vendor
294         extended builtin type" with an encoding in the form of "u5int96".
295
296 2005-04-24  Ian Lance Taylor  <ian@airs.com>
297
298         * cp-tree.def (USING_STMT): Change class to tcc_statement.
299         (TRY_BLOCK, EH_SPEC_BLOCK, HANDLER, CLEANUP_STMT): Likewise.
300         (IF_STMT, FOR_STMT, WHILE_STMT, DO_STMT): Likewise.
301         (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
302
303 2005-04-23  DJ Delorie  <dj@redhat.com>
304
305         * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, friend.c,
306         init.c, lex.c, mangle.c, method.c, name-lookup.c, parser.c,
307         repo.c, rtti.c, tree.c, typeck.c, typeck2.c: Adjust warning()
308         callers.
309
310 2005-04-22  Per Bothner  <per@bothner.com>
311
312         * decl.c (make_rtl_for_nonlocal_decl): Don't try get_fileinfo if
313         input_filename is NULL, as it is for (say) __PRETTY_FUNCTION__.
314
315 2005-04-22  Alexandre Oliva  <aoliva@redhat.com>
316
317         PR c++/21087
318         * name-lookup.c (push_overloaded_decl): Do not overload with
319         non-duplicate anticipated built-in.
320
321 2005-04-21  Kazu Hirata  <kazu@cs.umass.edu>
322
323         * cp-tree.h (THROW_NAME, AUTO_VTABLE_NAME, AUTO_TEMP_FORMAT,
324         VTABLE_BASE, VTABLE_NAME_PREFIX, STATIC_NAME_FORMAT): Remove.
325
326 2005-04-21  Nathan Sidwell  <nathan@codesourcery.com>
327
328         * cp-tree.h: Adjust for new VEC API.
329         Define VEC(tree_pair_s,gc).
330         (struct save_scope): Adjust.
331         (struct lang_type_class): Adjust.
332         (unemitted_tinfo_decls): Adjust.
333         * class.c (add_method, resort_type_method_vec,
334         finish_struct_methods, struct find_final_overrider_data,
335         dfs_find_final_overrider_pre, find_final_overrider,
336         get_vcall_index, warn_hidden, walk_subobject_offsets,
337         check_methods, fixup_inline_methods, end_of_class,
338         warn_about_ambiguous_bases, finish_struct, build_vtbl_initializer,
339         add_vcall_offset): Adjust.
340         * decl.c (xref_basetypes, finish_method): Adjust.
341         * decl2.c (check_classfn): Adjust.
342         * init.c (sort_mem_initializers, push_base_cleanups): Adjust.
343         * method.c (do_build_copy_constructor): Adjust.
344         * name-lookup.c (new_class_binding, store_binding, 
345         store_bindings, store_class_bindings): Adjust.
346         * name-lookup.h: Define VEC(cxx_saved_binding,gc),
347         VEC(cp_class_binding,gc).
348         (struct cp_binding_level): Adjust.
349         * parser.c: Define VEC(cp_token_position,heap).
350         (struct cp_lexer): Adjust.
351         (cp_lexer_new_main, cp_lexer_new_from_tokens, cp_lexer_destroy,
352         cp_lexer_save_tokens): Adjust.
353         * pt.c (retrieve_specialization,
354         check_explicit_specialization): Adjust.
355         * rtti.c (unemitted_tinfo_decls): Adjust.
356         (init_rtti_processing, get_tinfo_decl, get_pseudo_ti_init,
357         get_pseudo_ti_desc): Adjust.
358         * search.c (dfs_access_in_type, lookup_conversion_operator,
359         lookup_fnfields_1, dfs_walk_once, dfs_walk_once_accessible,
360         dfs_get_pure_virtuals, lookup_conversions_r, binfo_for_vbase): Adjust.
361         * semantics.c: Define VEC(deferred_access,gc).
362         (push_deferring_access_checks): Adjust.
363         * typeck2.c (abstract_virtuals_error): Adjust.
364
365 2005-04-20  Ian Lance Taylor  <ian@airs.com>
366
367         * cp-tree.def: Add STMT_EXPR.
368         * cp-tree.h (STMT_EXPR_NO_SCOPE): Define.
369         (STMT_EXPR_STMT): Define.
370         * cxx-pretty-print.c (pp_cxx_primary_expression): Handle
371         STMT_EXPR.
372         (pp_cxx_expression): Likewise.
373         (pp_cxx_statement): Call pp_cxx_statement, not pp_statement.
374         * dump.c (cp_dump_tree): Handle STMT_EXPR.
375
376 2005-04-18  Kazu Hirata  <kazu@cs.umass.edu>
377
378         * decl.c (expand_static_init): Call build2 and build3 instead
379         of build.
380
381         * cp-tree.h (VPTR_NAME, VPTR_NAME_P): Remove.
382
383 2005-04-17  Ian Lance Taylor  <ian@airs.com>
384
385         * cp-tree.def: Add SIZEOF_EXPR, ARROW_EXPR and ALIGNOF_EXPR.
386         * cxx-pretty-print.c (pp_cxx_postfix_expression): Handle
387         ARROW_EXPR.
388         (pp_cxx_unary_expression): Handle SIZEOF_EXPR and ALIGNOF_EXPR.
389         (pp_cxx_expression): Handle ARROW_EXPR, SIZEOF_EXPR, and
390         ALIGNOF_EXPR.
391         * typeck.c (cxx_sizeof_or_alignof_type): Update call to
392         c_sizeof_or_alignof_type for change in parameter type.
393
394 2005-04-16  Mark Mitchell  <mark@codesourcery.com>
395
396         PR c++/21025
397         * typeck.c (cxx_sizeof_or_alignof_type): Check whether the type to
398         which sizeof/alignof is dependent, rather than just whether we are
399         processing_template_decl.
400         
401 2005-04-17  Kazu Hirata  <kazu@cs.umass.edu>
402
403         * cp-tree.h (LOOKUP_GLOBAL): Remove.
404         (LOOKUP_ONLYCONVERTING, DIRECT_BIND, LOOKUP_NO_CONVERSION,
405         LOOKUP_DESTRUCTOR, LOOKUP_NO_TEMP_BIND, LOOKUP_PREFER_TYPES,
406         LOOKUP_PREFER_NAMESPACES, LOOKUP_CONSTRUCTOR_CALLABLE): Adjust
407         their values.
408
409 2005-04-15  Richard Henderson  <rth@redhat.com>
410
411         PR middle-end/14311
412         * semantics.c (finish_call_expr): Call resolve_overloaded_builtin.
413
414 2005-04-15  Kazu Hirata  <kazu@cs.umass.edu>
415
416         * cp-tree.h (lang_type_class): Remove redefined.  Move
417         java_interface into where redefined was.  Increment the width
418         of dummy.
419         (TYPE_REDEFINED): Remove.
420
421 2005-04-14  Kazu Hirata  <kazu@cs.umass.edu>
422
423         * cp-tree.h (SET_TMPL_ARG, ENUM_TI_TEMPLATE, ENUM_TI_ARGS,
424         CLASSTYPE_TEMPLATE_LEVEL): Remove.
425
426 2005-04-11  Mark Mitchell  <mark@codesourcery.com>
427
428         * decl2.c (determine_visibility): Don't use export_class_data.
429         (import_export_decl): Honor TARGET_CXX_CLASS_DATA_ALWAYS_WEAK and
430         TARGET_CXX_DETERMINE_CLASS_DATA_VISIBILITY. 
431
432 2005-04-09  Kazu Hirata  <kazu@cs.umass.edu>
433
434         * cp-tree.h (cxx_alignof): Remove.
435
436         * cp-tree.h (DECL_ARRAY_DELETE_OPERATOR_P): Remove.
437
438         * cp-tree.h (EXCEPTION_CLEANUP_NAME, B_SET, B_CLR, B_TST,
439         CONV_STATIC_CAST): Remove.
440
441         * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Remove.
442
443         * cp-tree.h (VF_BINFO_VALUE, VF_BASETYPE_VALUE): Remove.
444
445         * cp-tree.h (cp_deprecated): Remove.
446
447 2005-04-08  Ian Lance Taylor  <ian@airs.com>
448
449         * cp-tree.def: Define FOR_STMT, WHILE_STMT, DO_STMT, BREAK_STMT,
450         CONTINUE_STMT, SWITCH_STMT.
451         * cp-tree.h (cp_stmt_codes): Add FOR_STMT, WHILE_STMT, DO_STMT,
452         BREAK_STMT, CONTINUE_STMT, SWITCH_STMT.
453         (WHILE_COND, WHILE_BODY): Define.
454         (DO_COND, DO_BODY): Define.
455         (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY): Define.
456         (SWITCH_STMT_COND, SWITCH_STMT_BODY, SWITCH_STMT_TYPE): Define.
457         * cp-gimplify.c (enum bc_t): Define.
458         (struct cp_gimplify_ctx, ctxp): Define.
459         (push_context, pop_context): New static functions.
460         (begin_bc_block, finish_bc_block): New static functions.
461         (build_bc_goto): New static function.
462         (gimplify_cp_loop, gimplify_for_stmt): New static functions.
463         (gimplify_while_stmt, gimplify_do_stmt): Likewise.
464         (gimplify_switch_stmt): Likewise.
465         (cp_gimplify_expr): Handle FOR_STMT, WHILE_STMT, DO_STMT,
466         SWITCH_STMT, CONTINUE_STMT, BREAK_STMT.
467         (cp_genericize): Call push_context and pop_context.
468         * semantics.c (finish_break_stmt): Just call build_stmt
469         (BREAK_STMT) rather than build_break_stmt.
470         (finish_continue_stmt): Corresponding change.
471         * decl.c (pop_switch): Update call to c_do_switch_warnings for new
472         parameters.
473         * cxx-pretty-print.c (pp_cxx_statement): Handle SWITCH_STMT,
474         WHILE_STMT, DO_STMT, FOR_STMT, BREAK_STMT, CONTINUE_STMT.
475         * dump.c (cp_dump_tree): Likewise.
476
477 2005-04-08  Mark Mitchell  <mark@codesourcery.com>
478
479         PR c++/20905
480         * parser.c (cp_parser_type_specifier_seq): Add is_condition
481         parameter.
482         (cp_parser_new_type_id): Pass it.
483         (cp_parser_condition): Likewise.
484         (cp_parser_conversion_type_id): Likewise.
485         (cp_parser_type_id): Likewise.
486         (cp_parser_type_specifier_seq): In a condition, do not allow
487         invalid type-specifier combinations.
488         (cp_parser_exception_declaration): Adjust call to
489         cp_parser_type_specifier_seq. 
490
491         * cp-tree.def (TINST_LEVEL): Document TINST_IN_SYSTEM_HEADER_P.
492         * cp-tree.h (struct tinst_level): Add in_system_header_p.
493         (TINST_IN_SYSTEM_HEADER_P): New macro.
494         (make_tinst_level): Remove.
495         * pt.c (lookup_template_class): Preserve DECL_IN_SYSTEM_HEADER on
496         the instantiated class.
497         (push_tinst_level): Do not use make_tinst_level.  Set
498         TINST_IN_SYSTEM_HEADER_P.
499         (pop_tinst_level): Likewise.
500         (instantiate_class_template): Set in_system_header.
501         (instantiate_pending_templates): Likewise.
502         * tree.c (make_tinst_level): Remove.
503
504 2005-04-06  Joseph S. Myers  <joseph@codesourcery.com>
505
506         * decl.c (start_decl): Apply pending #pragma weak regardless of
507         scope.
508
509 2005-04-06  Mark Mitchell  <mark@codesourcery.com>
510
511         PR c++/20212
512         * pt.c (regenerate_decl_from_template): Copy attributes for
513         parameters from the pattern to the instantiation.
514
515 2005-04-05  Mark Mitchell  <mark@codesourcery.com>
516
517         PR c++/20734
518         * cp-tree.def (OFFSET_REF): Correct comments.
519         * init.c (build_offset_ref): Remove misleading comment.
520         * typeck.c (build_unary_op): Handle pointer-to-member creation
521         here, rather than ...
522         (unary_complex_lvalue): ... here.
523
524 2005-04-06  Jason Merrill  <jason@redhat.com>
525
526         PR c++/19312
527         * tree.c (stabilize_init): Don't bother trying to stabilize
528         something with no side-effects.
529
530 2005-04-05  Mark Mitchell  <mark@codesourcery.com>
531
532         PR c++/20763
533         * decl.c (grokdeclarator): Correct attribute handling.
534
535 2005-04-05  Mark Mitchell  <mark@codesourcery.com>
536
537         PR c++/19159
538         * decl2.c (import_export_decl): Use non-COMDAT external linkage
539         for virtual tables, typeinfo, etc. that will be emitted in only
540         one translation unit on systems without weak symbols.
541
542 2005-04-04  Mark Mitchell  <mark@codesourcery.com>
543
544         PR c++/20679
545         * parser.c (cp_parser_template_name): Fix thinko.
546
547 2005-04-04  Nathan Sidwell  <nathan@codesourcery.com>
548
549         PR c++/20746
550         * method.c (use_thunk): Protect covariant pointer return
551         adjustments from NULL pointers.
552
553 2005-04-04  Jan Hubicka  <jh@suse.cz>
554
555         * decl2.c (finish_objects): Revert my previous patch.
556         (cp_finish_file): Likewise.
557
558 2005-04-03  Kazu Hirata  <kazu@cs.umass.edu>
559
560         * pt.c: Fix comment typos.
561
562 2005-04-03  Nathan Sidwell  <nathan@codesourcery.com>
563
564         PR c++/20723
565         * pt.c (more_specialized_fn): Member functions are unordered wrt
566         non-members.  Conversion operators are unordered wrt other
567         functions.
568
569 2005-04-01  Nathan Sidwell  <nathan@codesourcery.com>
570
571         * call.c (add_template_candidates_real): Remove length parameter
572         from fn_type_unification call.
573         * class.c (resolve_address_of_overloaded_function): Likewise
574         * cp-tree.h (fn_type_unification): Remove length parameter.
575         * pt.c (get_bindings_overload): Remove.
576         (get_bindings_real): Rename to ...
577         (get_bindings): ... here.  Remove length and strict
578         parameters. Change return type flag to boolean.  Remove original
579         forwarding function.
580         (determine_specialization): Adjust get_bindings call.
581         (fn_type_unification): Remove length parameter.  Adjust.
582         (type_unification_real): Remove length parameter.  Adjust.
583         (resolve_overloaded_unification): Adjust get_bindings call.
584         (try_one_overload): Simplify confusing cascaded if control flow.
585         (unify): Remove length paramter from type_unification_real call.
586         (most_specialized_instantiation): Adjust get_bindings calls.
587         (most_specialized): Likewise.
588
589 2005-03-31  Nathan Sidwell  <nathan@codesourcery.com>
590
591         PR c++/19203, implement DR 214
592         * call.c (joust): Use more_specialized_fn.
593         * cp-tree.h (DEDUCE_ORDER): Remove.
594         (more_specialized): Replace with ...
595         (more_specialized_fn): ... this.
596         * pt.c (maybe_adjust_types_for_deduction): Remove DEDUCE_ORDER
597         case.
598         (type_unification_real): Remove DEDUCE_ORDER case.
599         (more_specialized): Replace with ...
600         (more_specialized_fn): ... this.  Implement DR 214.
601         (most_specialized_instantiation): Use get_bindings_real directly.
602
603 2005-03-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
604
605         PR c++/18644
606         * call.c (build_new_op): Remove check for -Wsynth.
607
608 2005-03-31  Jan Hubicka  <jh@suse.cz>
609
610         * decl2.c (finish_objects): Mark ctor as needed.
611         (cp_finish_file): Output variables only in nonunit-at-a-time.
612
613 2005-03-29  Richard Henderson  <rth@redhat.com>
614
615         PR c/20519
616         * decl.c (cp_complete_array_type): Rename from complete_array_type.
617         Use the new complete_array_type in c-common.c.  Update all callers.
618         * cp-tree.h (cp_complete_array_type): Update to match.
619
620 2005-03-24  Geoffrey Keating  <geoffk@apple.com>
621
622         * typeck.c (build_static_cast_1): Allow scalar_cast between
623         any integral, floating, or enumeration type.
624
625 2005-03-24  Steven Bosscher  <stevenb@suse.de>
626
627         * typeck.c (comptypes): First determine if the types are compatible
628         from a target-independent point of view.  Check target attributes
629         last.
630
631         * class.c (build_base_path):
632         (build_vbase_offset_vtbl_entries):
633         (add_vcall_offset): Replace fold (buildN (...)) with fold_buildN.
634         * error.c (dump_expr): Likewise.
635         * init.c (build_zero_init, expand_cleanup_for_base,
636         build_vec_delete_1): Likewise.
637         * mangle.c (write_integer_cst): Likewise.
638         * method.c (thunk_adjust): Likewise.
639         * pt.c (convert_nontype_argument, tsubst, unify): Likewise.
640         * tree.c (cxx_print_statistics, array_type_nelts_total): Likewise.
641         * typeck.c (build_ptrmemfunc_access_expr,
642         (get_member_function_from_ptrfunc): Likewise.
643
644 2005-03-23  Joseph S. Myers  <joseph@codesourcery.com>
645
646         * cp-objcp-common.h (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
647
648 2005-03-23  Joseph S. Myers  <joseph@codesourcery.com>
649
650         * cp-tree.h (perform_integral_promotions): Remove.
651         (default_conversion): Add.
652
653 2005-03-22  Mark Mitchell  <mark@codesourcery.com>
654
655         * parser.c (cp_parser_warn_min_max): New function.
656         (cp_parser_binary_expression): Use it.
657         (cp_parser_assignment_operator_opt): Likewise.
658         (cp_parser_operator): Likewise.
659
660 2005-03-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
661
662         PR c++/19980
663         * decl.c (start_preparsed_function): Robustify.
664
665 2005-03-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
666
667         PR c++/20499
668         * parser.c (cp_parser_class_head): Return NULL_TREE when
669         encountering a redefinition.
670
671 2005-03-22  Nathan Sidwell  <nathan@codesourcery.com>
672
673         PR c++/20465
674         PR c++/20381
675         * typeck.c (build_ptrmemfunc): Allow OFFSET_REF when processing a
676         template.
677
678 2005-03-21  Paolo Carlini  <pcarlini@suse.de>
679
680         PR c++/20461
681         PR c++/20536
682         * init.c (emit_mem_initializers): Don't crash on undefined
683         types.
684
685 2005-03-21  Paolo Carlini  <pcarlini@suse.de>
686
687         PR c++/20147
688         * semantics.c (finish_stmt_expr_expr): Return immediately
689         if error_operand_p (expr).
690
691 2005-03-21  Joseph S. Myers  <joseph@codesourcery.com>
692
693         * cp-tree.h (lvalue_or_else, lvalue_p): New.
694         * typeck.c (lvalue_or_else): New.  Call lvalue_error.
695
696 2005-03-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
697
698         PR c++/20240
699         * decl.c (decls_match): Compare context of VAR_DECL.
700
701 2005-03-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
702
703         PR c++/20333
704         * parser.c (cp_parser_postfix_expression) <case RID_TYPENAME>:
705         Check the return value of cp_parser_nested_name_specifier.
706
707 2005-03-18  Dale Johannesen <dalej@apple.com>
708
709         * cp/tree.c (cp_tree_equal):  Handle SSA_NAME.
710
711 2005-03-18  Paolo Carlini  <pcarlini@suse.de>
712
713         PR c++/20463
714         * parser.c (cp_parser_diagnose_invalid_type_name):
715         Check TYPE_BINFO (current_class_type) before attempting
716         to emit inform messages.
717
718 2005-03-17  Paolo Carlini  <pcarlini@suse.de>
719
720         PR c++/19966
721         * cp-tree.h (grok_op_properties): Change return type to void.
722         * decl.c (grok_op_properties): Return early - don't check the
723         arity - in case of a static member or an operator that cannot
724         be non-member; tidy a bit.
725
726 2005-03-17  Nathan Sidwell  <nathan@codesourcery.com>
727
728         PR c++/20186
729         * pt.c (contains_dependent_cast_p): Remove.
730         (fold_non_dependent_expr): Don't use it.
731         (value_dependent_expression_p): Use a switch statement.
732         reference_exprs can be dependent.
733
734 2005-03-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
735
736         PR c++/4403
737         PR c++/9783, DR433
738         * name-lookup.c (pushtag): Skip template parameter scope when
739         scope is ts_global.  Don't push tag into template parameter
740         scope.
741         * pt.c (instantiate_class_template): Reorder friend class
742         template substitution to handle non-dependent friend class
743         that hasn't been previously declared.
744
745 2005-03-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
746
747         Friend class name lookup 5/n
748         PR c++/1016
749         * cp-tree.h (pushtag): Adjust declaration.
750         * decl.c (lookup_and_check_tag): Call lookup_type_scope if
751         lookup_name fails.
752         (xref_tag): Adjust call to pushtag.  Make hidden class visible.
753         (start_enum): Adjust call to pushtag.
754         * name-lookup.c (ambiguous_decl): Ignore hidden names.
755         (qualify_lookup): Change return type to bool.
756         (hidden_name_p): New function.
757         (lookup_namespace_name, unqualified_namespace_lookup,
758         lookup_name_real): Use it.
759         (lookup_type_scope): Update comments.
760         (maybe_process_template_type_declaration): Change parameter name
761         from globalize to is_friend.
762         (pushtag): Change globalize parameter of type int to tag_scope.
763         Hide name if introduced by friend declaration.
764         * name-lookup.h (hidden_name_p): Add declaration.
765         * parser.c (cp_parser_lookup_name): Don't deal with hidden name
766         here.
767         * pt.c (push_template_decl_real): Make hidden class template
768         visible.
769         (lookup_template_class, instantiate_class_template): Adjust call
770         to pushtag.
771         * semantics.c (begin_class_definition): Likewise.
772         * rtti.c (init_rtti_processing, build_dynamic_cast_1, 
773         tinfo_base_init, emit_support_tinfos): Use ts_current instead of
774         ts_global.
775
776 2005-03-13  Mark Mitchell  <mark@codesourcery.com>
777
778         PR c++/20157
779         * pt.c (determine_specialization): Reject non-specializations. 
780
781 2005-03-11  Per Bothner  <per@bothner.com>
782
783         * cp-tree.h (struct cp_declarator): New id_loc field.
784         * cp/parser.c (cp_lexer_get_preprocessor_token): Set cp_token's
785         location using c_lex_with_flags, instead of input_location.
786         (cp_parser_direct_declarator): Set declarator's id_loc from
787         cp_token's id_loc.
788
789 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
790
791         PR c++/18384, c++/18327
792         * decl.c (reshape_init_array): Use UHWI type for max_index_cst
793         and index.  Convert max_index to size_type_node if it isn't
794         host_integerp (, 1).
795
796 2005-03-09  Mark Mitchell  <mark@codesourcery.com>
797
798         PR c++/20208
799         * pt.c (tsubst_decl): Apply array-to-pointer and
800         function-to-pointer conversions to function arguments.
801         (regenerate_decl_from_template): Likewise.
802
803 2005-03-09  Paolo Carlini  <pcarlini@suse.de>
804
805         PR c++/16859    
806         * decl.c (complete_array_type): In pedantic mode, return
807         3 for an empty initializer list as the initializer for an
808         array of unknown bound (8.5.1/4).
809         (maybe_deduce_size_from_array_init): Fix final test to use
810         the above.
811
812 2005-03-08  Nathan Sidwell  <nathan@codesourcery.com>
813
814         PR c++/20186
815         * pt.c (contains_dependent_cast_p): New.
816         (fold_non_dependent_expr): Call it.
817
818 2005-03-08  Mark Mitchell  <mark@codesourcery.com>
819
820         PR c++/20142
821         * cp-tree.h (target_type): Remove.
822         * decl.c (layout_var_decl): Remove #if 0'd code.
823         (cp_finish_decl): Remove dead code.
824         * init.c (build_vec_init): When determining whether or not the
825         element type has an asignment operator, look through all array
826         dimensions. 
827         * typeck.c (target_type): Remove.
828
829 2005-03-07  Mark Mitchell  <mark@codesourcery.com>
830
831         * class.c (finish_struct_1): Do not warn about non-virtual
832         destructors in Java classes.
833
834 2005-03-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
835
836         PR c++/19311
837         * init.c (build_offset_ref): Don't build non-dependent SCOPE_REF.
838         * pt.c (build_non_dependent_expr): Don't build NON_DEPENDENT_EXPR
839         for OFFSET_TYPE.
840         * typeck.c (build_x_unary_op): Don't build non-dependent SCOPE_REF.
841         Also set PTRMEM_OK_P for NON_DEPENDENT_EXPR.
842         (build_unary_op): Handle building ADDR_EXPR of OFFSET_REF inside
843         template.
844
845 2005-03-02  Alexandre Oliva  <aoliva@redhat.com>
846
847         * name-lookup.c (push_overloaded_decl): Don't error if the new
848         decl matches the old one.
849         * decl.c (redeclaration_error_message): Likewise.
850
851 2005-03-01  Per Bothner  <per@bothner.com>
852
853         * decl.c (finish_function): Use SET_EXPR_LOCATION instead of
854         unavailable annotate_with_file_line, if USE_MAPPED_LOCATION.
855
856 2005-03-01  Nathan Sidwell  <nathan@codesourcery.com>
857
858         PR c++/20232
859         * class.c (update_vtable_entry_for_fn): Don't crash on invalid
860         covariancy. 
861
862         * cp-tree.g (THUNK_TARGET): Expand comment.
863         * method.c (use_thunk): Make sure we also use the target, if that
864         is a thunk.
865
866 2005-02-27  Jakub Jelinek  <jakub@redhat.com>
867
868         PR c++/20206
869         * decl.c (cxx_comdat_group): Put thunks for
870         TARGET_USE_LOCAL_THUNK_ALIAS_P (function) functions into the same
871         comdat group as the thunk target.
872
873 2005-02-24  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
874
875         * call.c, class.c, cp-tree.h, decl2.c, error.c, init.c, mangle.c,
876         parser.c: Fix comment typo(s).
877
878 2005-02-24  Jakub Jelinek  <jakub@redhat.com>
879
880         PR c++/20175
881         * decl.c (reshape_init): Don't warn about missing braces if STRING_CST
882         initializes a char/wchar_t array.
883
884 2005-02-23  Mark Mitchell  <mark@codesourcery.com>
885
886         PR c++/19878
887         * decl.c (grokvardecl): Set DECL_INTERFACE_KNOWN for declarations
888         with internal linkage.
889
890 2005-02-23  Alexandre Oliva  <aoliva@redhat.com>
891
892         * decl.c (grokvardecl): Don't exempt anonymous types from having
893         linkage for variables that have linkage other than "C".
894
895 2005-02-23  Kazu Hirata  <kazu@cs.umass.edu>
896
897         * cp-objcp-common.h, error.c: Update copyright.
898
899 2005-02-22  Mark Mitchell  <mark@codesourcery.com>
900
901         PR c++/20073
902         * decl.c (start_decl_1): Don't clear TREE_READONLY.
903         (cp_finish_decl): Likewise.
904         (complete_vars): Call cp_apply_type_quals_to_decl.
905         * typeck.c (cp_apply_type_quals): Avoid setting TREE_READONLY in
906         cases where that's not valid.
907
908         PR c++/19991
909         * init.c (integral_constant_value): Iterate if the value of a decl
910         is itself a constant.
911
912         PR c++/20152
913         * parser.c (cp_parser_class_head): Check for redefintions here.
914         * semantics.c (begin_class_definition): Not here.
915         
916         PR c++/20153
917         * decl2.c (build_anon_union_vars): Add type parameter.
918         (finish_anon_union): Pass it.
919
920         PR c++/20148
921         * error.c (dump_expr): Do not print the body of a BIND_EXPR.
922         Handle STATEMENT_LIST.
923
924         PR c++/19883
925         * parser.c (cp_parser_direct_declarator): Always complain about
926         non-constant array bounds when in a function scope.
927         * semantics.c (finish_id_expression): Do not mark dependent names
928         as non-constant. 
929
930 2005-02-21  Douglas Gregor  <dgregor@cs.indiana.edu>
931         
932         PR c++/19076
933         PR c++/6628
934         * cp-tree.h (cp_apply_type_quals_to_decl): Declared.
935         * decl.c (grokdeclarator): Pedwarn about qualifying a function
936         type. 
937         Add qualifiers when declaring a typedef of a function type.
938         Member function pointers pick up the qualifiers of the typedef
939         used to declare them.
940         Don't complain about creating cv-qualified function types.
941         Complain about qualified function typedefs that are used to
942         declare non-static member functions or free functions.
943         Use cp_apply_type_quals_to_decl.
944         (start_preparsed_function): Use cp_apply_type_quals_to_decl.
945         (grokclassfn): Use cp_apply_type_quals_to_decl.
946         * error.c (dump_type_suffix): Print qualifiers for function
947         types. 
948         * pt.c (tsubst_decl): Use cp_apply_type_quals_to_decl.
949         (tsubst): When substituting a function type into a member
950         pointer type, pass along the qualifiers.
951         (unify): Unify member pointers to member function pointers.
952         * tree.c (cp_build_qualified_type_real): Function types may be
953         qualified. This includes restrict qualifiers.
954         * typeck.c (cp_apply_type_quals_to_decl): New function to replace
955         use of c_apply_type_quals_to_decl. Drops qualifiers that are being
956         added to function types.
957
958 2005-02-20  Zack Weinberg  <zack@codesourcery.com>
959
960         PR 18785
961         * cp-objcp-common.h (LANG_HOOKS_TO_TARGET_CHARSET): Set to
962         c_common_to_target_charset.  Delete bogus comment.
963
964 2005-02-18  Richard Henderson  <rth@redhat.com>
965
966         PR libstdc++/10606
967         * except.c (do_get_exception_ptr): New.
968         (expand_start_catch_block): Use it.
969
970 2005-02-19  Jakub Jelinek  <jakub@redhat.com>
971
972         * decl.c (start_decl_1): Only check TYPE_NEEDS_CONSTRUCTING
973         if type is not error_mark_node.
974
975 2005-01-20  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
976
977         PR c++/19508
978         * decl2.c (grokfield): Do not apply attributes to template parameters
979         as they are ignored by tsubst anyway.
980
981 2005-02-18  Jakub Jelinek  <jakub@redhat.com>
982
983         PR c++/19813
984         * decl.c (start_decl_1): Clear TREE_READONLY flag if
985         its type has TYPE_NEEDS_CONSTRUCTING.
986         (complete_vars): Likewise.
987
988 2005-02-17  Alexandre Oliva  <aoliva@redhat.com>
989
990         PR c++/20028
991         * class.c (finish_struct): Initialize TYPE_SIZE_UNIT of a
992         template along with TYPE_SIZE.
993
994         PR c++/20022
995         * semantics.c (perform_deferred_access_checks): Use
996         get_deferred_access_checks to get the top of the stack.
997
998 2005-02-15  Alexandre Oliva  <aoliva@redhat.com>
999
1000         PR c++/17788
1001         * class.c (add_implicitly_declared_members, check_field_decl)
1002         (check_field_decls, check_bases): Remove arguments, tests and
1003         assignments of cant_have_default_ctor-related variables.
1004
1005 2005-02-15  Alexandre Oliva  <aoliva@redhat.com>
1006
1007         * decl2.c (mark_used): Set the source location of the used decl to
1008         the current input location here...
1009         * method.c (synthesize_method): ... not here.  Set input_location
1010         from the decl instead.
1011
1012 2005-02-14  Nathan Sidwell  <nathan@codesourcery.com>
1013
1014         PR c++/19608
1015         * parser.c (cp_parser_late_parsing_for_member): Use
1016         current_function_decl as scope to push to and from.
1017
1018         PR c++/19884
1019         * pt.c (check_explicit_specialization): Make sure namespace
1020         binding lookup found an overloaded function.
1021         (lookup_template_function): Just assert FNS is an overloaded
1022         function.
1023
1024         PR c++/19895
1025         * decl.c (grokdeclarator): Check for error mark node in ptrmem
1026         construction.
1027
1028 2005-02-14  Alexandre Oliva  <aoliva@redhat.com>
1029
1030         PR c++/17816
1031         * decl.c (redeclaration_error_message): Report redefinition of
1032         pure virtual function.
1033
1034 2005-02-14  Nathan Sidwell  <nathan@codesourcery.com>
1035
1036         PR c++/19891
1037         * class.c (build_simple_base_path): Build the component_ref
1038         directly.
1039         (update_vtable_entry_for_fn): Walk the covariant's binfo chain
1040         rather than using lookup_base.
1041         * search.c (dfs_walk_once): Add non-recursive assert check.
1042         * typeck.c (build_class_member_access_expr): It is possible for
1043         the member type to be both const and volatile.
1044
1045 2005-02-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1046
1047         PR c++/14479
1048         PR c++/19487
1049         * pt.c (maybe_check_template_type): Remove.
1050         * cp-tree.h (maybe_check_template_type): Remove prototype.
1051         * name-lookup.c (maybe_process_template_type_declaration): Don't
1052         use maybe_check_template_type.
1053
1054 2005-02-11  Richard Henderson  <rth@redhat.com>
1055
1056         PR c++/19632
1057         * pt.c (get_mostly_instantiated_function_type): Save and restore
1058         flag_access_control instead of push/pop_access_scope.
1059
1060 2005-02-10  Mark Mitchell  <mark@codesourcery.com>
1061
1062         PR c++/19755
1063         * decl.c (reshape_init): Issue warnings about missing braces.
1064
1065 2005-02-11  Kazu Hirata  <kazu@cs.umass.edu>
1066
1067         * cp-tree.def, except.c, ptree.c: Update copyright.
1068
1069 2005-02-09  Mark Mitchell  <mark@codesourcery.com>
1070
1071         PR c++/19811
1072         * call.c (build_op_delete_call): Check COMPLETE_TYPE_P before
1073         attempting name lookup.
1074
1075         * parser.c (cp_parser_unqualified_id): Initialize type_decl.
1076
1077         PR c++/19787
1078         * call.c (initialize_reference): Robustify.
1079
1080         PR ++/19732
1081         * decl.c (grokdeclarator): Check for invalid use of destructor
1082         names.
1083
1084         PR c++/19762
1085         * parser.c (cp_parser_unqualified_id): Avoid creating destructor
1086         names with invalid types.
1087
1088         PR c++/19826
1089         * parser.c (cp_parser_direct_declarator): Allow type-dependent
1090         expressions as array bounds.
1091
1092         PR c++/19739
1093         * parser.c (cp_parser_attributes_list): Allow empty lists.
1094
1095 2005-02-08  Mark Mitchell  <mark@codesourcery.com>
1096
1097         PR c++/19733
1098         * class.c (add_method): Don't set TYPE_HAS_DESTRUCTOR.
1099         (check_bases): Give warnings about a base class with a
1100         non-virtual destructor, even if it is implicit.
1101         (finish_struct_bits): Don't copy TYPE_HAS_DESTRUCTOR.
1102         (maybe_warn_about_overly_private_class): Don't use
1103         TYPE_HAS_DESTRUCTOR.
1104         (finish_struct_methods): Don't set TYPE_HAS_DESTRUCTOR.
1105         (check_for_override): Give it external linkage.
1106         (add_implicitly_declared_members): Generate destructors lazily.
1107         (check_field_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not
1108         TYPE_HAS_DESTRUCTOR.
1109         (check_bases_and_members): Call check_methods before
1110         check_field_decls.
1111         (check_bases_and_members): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not
1112         TYPE_HAS_DESTRUCTOR.
1113         (finish_struct_1): Do not use TYPE_HAS_DESTRUCTOR.
1114         * cp-tree.def (PSEUDO_DTOR_EXPR): Document.
1115         * cp-tree.h (TYPE_HAS_DESTRUCTOR): Remove.
1116         (lang_type_class): Add lazy_destructor.
1117         (CLASSTYPE_LAZY_DESTRUCTOR): New macro.
1118         (CLASSTYPE_DESTRUCTORS): Robustify.
1119         (TYPE_HAS_DESTRUCTOR): Remove.
1120         (check_for_override): Declare.
1121         (build_vbase_delete): Remove.
1122         * cvt.c (convert_to_void): Issue errors about pseudo-destructor
1123         expressions.
1124         * decl.c (cxx_maybe_build_cleanup): Remove dead code.
1125         * except.c (dtor_nothrow): Lazily create destructors if necessary.
1126         (build_throw): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
1127         * init.c (build_delete): Lazily create destructors, if necessary.
1128         (build_vbase_delete): Remove.
1129         * method.c (locate_dtor): Simplify.
1130         (implicitly_declare_fn): Add support for destructors.
1131         * parser.c (cp_parser_lookup_name): Lazily create destructors, if
1132         necessary.
1133         * pt.c (check_explicit_specialization): Don't use
1134         TYPE_HAS_DESTRUCTOR.
1135         (instantiate_class_template): Likewise.
1136         * ptree.c (cxx_print_type): Don't print TYPE_HAS_DESTRUCTOR.
1137         * rtti.c (emit_support_tinfos): Robustify.
1138         * search.c (lookup_fnfields_1): Lazily create destructors.
1139         * typeck.c (build_class_member_access_expr): Remove
1140         PSEUDO_DTOR_EXPR handling.
1141         (lookup_destructor): Likewise.
1142
1143 2005-02-08  Kazu Hirata  <kazu@cs.umass.edu>
1144
1145         * cxx-pretty-print.c, cxx-pretty-print.h, decl.h: Update
1146         copyright.
1147
1148 2005-02-07  Mark Mitchell  <mark@codesourcery.com>
1149
1150         * parser.c (cp_lexer_start_debugging): Avoid arithmetic operations
1151         on boolean variables.
1152         (cp_lexer_stop_debugging): Likewise.
1153
1154 2005-02-03  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1155
1156         PR c++/17401
1157         * parser.c (cp_parser_pure_specifier): Emit a specific error
1158         message with an invalid pure specifier.
1159         * decl2.c (grok_function_init): Remove.
1160         (grokfield): An initializer for a method is a always a pure
1161         specifier.
1162
1163 2005-02-02  Matt Austern  <austern@apple.com>
1164
1165         PR c++/19628
1166         * cp-tree.h (builtin_valid_in_constant_expr_p): Declare.
1167         * parser.c (cp_parser_postfix_expression): Accept function call in
1168         constant expression if builtin_valid_in_constant_expr_p is true
1169         for that function.
1170         * pt.c (value_dependent_expression_p): Handle CALL_EXPRs properly.
1171         * semantics.c (finish_id_expression): Accept function call in constant
1172         expression if builtin_valid_in_constant_expr_p is true for that
1173         function.
1174         * tree.c (builtin_valid_in_constant_expr_p): New.
1175
1176 2005-02-02  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1177
1178         PR c++/17413
1179         * pt.c (check_instantiated_args): Improve error message.
1180         Fix logic when to print its second part.
1181
1182 2005-02-02  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1183
1184         * cp-tree.h (complete_type_or_else): Remove macro.
1185         (complete_type_or_diagnostic): Rename to complete_type_or_else
1186         and remove last argument.
1187         * typeck.c (complete_type_or_diagnostic): Rename to
1188         complete_type_or_else and remove last argument.
1189
1190 2005-02-02  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1191
1192         * cp-tree.h (commonparms): Remove prototype.
1193         (convert_arguments): Likewise.
1194         (PFN_FROM_PTRMEMFUNC): Remove.
1195         * typeck.c (commonparms): Make static.
1196         (convert_arguments): Add prototype. Make static.
1197         (PFN_FROM_PTRMEMFUNC): Replace by pfn_from_ptrmemfunc.
1198
1199 2005-01-31  Mark Mitchell  <mark@codesourcery.com>
1200
1201         * parser.c (cp_parser_primary_expression): Don't complain about
1202         floating-point literals in integral constant expressions when
1203         !pedantic.
1204
1205 2005-02-01  Alexandre Oliva  <aoliva@redhat.com>
1206
1207         * parser.c (cp_parser_template_id): Revert comment patch too.
1208
1209         PR c++/18757
1210         PR c++/19366
1211         PR c++/19499
1212         * parser.c (cp_parser_template_id): Revert 2004-12-09's patch.
1213         Issue an error when creating the template id.
1214         * pt.c (fn_type_unification): Return early if the explicit
1215         template arg list is an error_mark_node.
1216
1217 2005-01-31  Mark Mitchell  <mark@codesourcery.com>
1218
1219         * decl.c (build_enumerator): Do not issue duplicate error messages
1220         about invalid enumeration constants.
1221         * parser.c (cp_parser_non_integral_constant_expression): Always
1222         set parser->non_integral_constant_expression_p.
1223         (cp_parser_primary_expression): Add cast_p parameter.  Issue
1224         errors about invalid uses of floating-point literals in
1225         cast-expressions.
1226         (cp_parser_postfix_expression): Add cast_p parameter.
1227         (cp_parser_open_square_expression): Pass it.
1228         (cp_parser_parenthesized_expression_list): Add cast_p parameter.
1229         (cp_parser_unary_expression): Likewise.
1230         (cp_parser_new_placement): Pass it.
1231         (cp_parser_direct_new_declarator): Likewise.
1232         (cp_parser_new_initializer): Likewise.
1233         (cp_parser_cast_expression): Add cast_p parameter.
1234         (cp_parser_binary_expression): Likewise.
1235         (cp_parser_question_colon_clause): Likewise.
1236         (cp_parser_assignment_expression): Likewise.
1237         (cp_parser_expression): Likewise.
1238         (cp_parser_constant_expression): If an integral constant
1239         expression is invalid, return error_mark_node.
1240         (cp_parser_expression_statement): Pass cast_p.
1241         (cp_parser_condition): Likewise.
1242         (cp_parser_iteration_statement): Likewise.
1243         (cp_parser_jump_statement): Likewise.
1244         (cp_parser_mem_initializer): Likewise.
1245         (cp_parser_template_argument): Likewise.
1246         (cp_parser_parameter_declaration): Likewise.
1247         (cp_parser_initializer): Likewise.
1248         (cp_parser_throw_expression): Likewise.
1249         (cp_parser_attribute_list): Likewise.
1250         (cp_parser_simple_cast_expression): Likewise.
1251         (cp_parser_functional_cast): Likewise.
1252         (cp_parser_late_parsing_default_args): Likewise.
1253         (cp_parser_sizeof_operand): Save/restore
1254         non_integral_constant_expression_p.
1255
1256 2005-01-31  Mike Stump  <mrs@apple.com>
1257
1258         * parser.c (cp_lexer_new_main): Get the first token, first, before
1259         doing anything.
1260
1261 2005-01-31  Mark Mitchell  <mark@codesourcery.com>
1262
1263         * decl.c (start_decl): Add missing parentheses.
1264
1265 2005-01-30  Mark Mitchell  <mark@codesourcery.com>
1266
1267         PR c++/19555
1268         * cp-tree.h (DECL_USE_TEMPLATE): Expand documentation.
1269         * decl.c (duplicate_decls): Do not discard
1270         DECL_IMPLICIT_INSTANTIATION when merging declarations.
1271         (start_decl): Do not SET_DECL_TEMPLATE_SPECIALIZATION for
1272         variables that do not have DECL_USE_TEMPLATE.
1273
1274         PR c++/19395
1275         * decl.c (grokdeclarator): Refactor code so that qualified names
1276         are never allowed as the declarator in a typedef.
1277
1278         PR c++/19367
1279         * name-lookup.c (do_nonmember_using_decl): Avoid overloading
1280         builtin declarations.
1281
1282         PR c++/19457
1283         * call.c (convert_like_real): Inline call to
1284         dubious_conversion_warnings here.
1285         * cp-tree.h (dubious_conversion_warnings): Remove.
1286         * semantics.c (finish_unary_op_expr): Copy INTEGER_CSTs before
1287         setting TREE_NEGATED_INT.
1288         * typeck.c (dubious_conversion_warnings): Remove.
1289
1290         PR c++/19349
1291         * name-lookup.c (pushdecl_namespace_level): Avoid accessing free'd
1292         memory.
1293
1294 2005-01-28  Mark Mitchell  <mark@codesourcery.com>
1295
1296         PR c++/19253
1297         * parser.c (cp_parser_diagnose_invalid_type_name): Commit to
1298         tentative parses.
1299
1300         PR c++/19667
1301         * pt.c (redeclare_class_template): Robustify.
1302
1303 2005-01-27  Steven Bosscher  <stevenb@suse.de>
1304
1305         * decl.c (finish_case_label): Use SWITCH_STMT accessor macros
1306         instead of SWITCH_EXPR ones.
1307         * pt.c (tsubst_expr): Likewise.
1308         * semantics.c (begin_switch_stmt, finish_switch_cond,
1309         finish_switch_stmt): Likewise.
1310
1311 2005-01-26  J"orn Rennecke <joern.rennecke@st.com>
1312
1313         PR c++/18370
1314         * parser.c (cp_parser_initializer_clause): Initialize *non_constant_p.
1315
1316 2005-01-25  Andrew Pinski  <pinskia@physics.uc.edu>
1317
1318         * class.c (abort_fndecl_addr): New variable.
1319         (build_vtbl_initializer): If we have a pure virtual function
1320         share the abort function's address.
1321         Include gt-cp-class.h at the end.
1322         * config-lang.in (gtfiles): Add cp/class.c.
1323
1324 2005-01-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1325
1326         * cxx-pretty-print.c (pp_cxx_statement): Add prototype. Make static.
1327         (pp_cxx_function_definition): Make static.
1328         * cxx-pretty-print.h (pp_cxx_statement): Remove prototype.
1329         (pp_cxx_function_definition): Likewise.
1330
1331 2005-01-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1332
1333         * name-lookup.c (print_binding_level): Make static.
1334         (constructor_name_full): Make static inline.
1335         (current_decl_namespace): Make static.
1336         * name-lookup.h (constructor_name_full): Remove prototype.
1337         (print_binding_level): Likewise.
1338         (current_decl_namespace): Likewise.
1339
1340 2005-01-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1341
1342         * decl.h (debug_bindings_indentation): Remove.
1343
1344 2005-01-23  Kazu Hirata  <kazu@cs.umass.edu>
1345
1346         * typeck.c: Fix a comment typo.
1347
1348 2005-01-21  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1349
1350         PR c++/19208
1351         * pt.c (fold_decl_constant_value): Always call fold_non_dependent_expr
1352         at least once.
1353         (tsubst): Use fold_decl_constant_value in place of a bare call to
1354         integral_constant_value.
1355
1356 2005-01-20  Kazu Hirata  <kazu@cs.umass.edu>
1357
1358         * typeck.c (more_qualified_p): Remove.
1359         * cp-tree.h: Remove the corresponding prototype.
1360
1361 2005-01-19  Matt Austern  <austern@apple.com>
1362
1363         * typeck.c (comptypes): Handle return code from objc_comptypes
1364         correctly.
1365
1366 2005-01-19  Kazu Hirata  <kazu@cs.umass.edu>
1367
1368         * cp-tree.h, name-lookup.h: Remove unused prototypes.
1369
1370 2005-01-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1371
1372         PR c++/19375
1373         * semantics.c (finish_id_expression): Disable access checking for
1374         already lookuped FIELD_DECL.
1375
1376 2005-01-18  Kazu Hirata  <kazu@cs.umass.edu>
1377
1378         * decl.c (delete_block): Remove.
1379         * cp-tree.h: Remove the corresponding prototype.
1380
1381         * decl.c (vtable_decl_p, vtype_decl_p, walk_globals_data,
1382         walk_vtables_r, walk_vtables, walk_globals_r, walk_globals):
1383         Remove.
1384         * cp-tree.h: Remove the corresponding prototypes.
1385
1386         * tree.c (count_functions, bound_pmf_p, cp_is_overload_p,
1387         cp_update_decl_after_saving, name_p): Remove.
1388         * cp-tree.h: Remove the corresponding prototypes.
1389
1390 2005-01-18  Andrew Pinski  <pinskia@physics.uc.edu>
1391
1392         PR c/19472
1393         * semantics.c (finish_asm_stmt): Strip nops off
1394         input memory operands.
1395
1396 2005-01-18  Kazu Hirata  <kazu@cs.umass.edu>
1397
1398         * Make-lang.in, call.c, cvt.c, init.c, rtti.c, tree.c,
1399         typeck2.c: Update copyright.
1400
1401 2005-01-16  Kazu Hirata  <kazu@cs.umass.edu>
1402
1403         * class.c (get_enclosing_class): Remove.
1404         * cp-tree.h: Remove the corresponding prototypes.
1405
1406         * cvt.c (convert_lvalue): Remove.
1407         * cp-tree.h: Remove the corresponding prototype.
1408
1409         * pt.c (tinst_for_decl): Remove.
1410         * cp-tree.h: Remove the corresponding prototypes.
1411
1412         * tree.c (hash_chainon): Remove.
1413         * cp-tree.h: Remove the corresponding prototypes.
1414
1415 2005-01-15  Jakub Jelinek  <jakub@redhat.com>
1416
1417         PR c++/19263
1418         * typeck2.c (split_nonconstant_init_1) <case VECTOR_TYPE>: Put a copy
1419         of CONSTRUCTOR's node into MODIFY_EXPR, as the original is modified.
1420
1421 2005-01-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1422
1423         * Make-lang.in (cp-warn): Don't append $(WERROR).
1424
1425 2005-01-10  Kazu Hirata  <kazu@cs.umass.edu>
1426
1427         * cp-tree.h: Fix a comment typo.
1428
1429 2005-01-07  Nathan Sidwell  <nathan@codesourcery.com>
1430
1431         PR c++/19298
1432         * pt.c (tsubst_qualified_id): Call convert_from_reference.
1433
1434 2005-01-06  Mark Mitchell  <mark@codesourcery.com>
1435
1436         PR c++/19244
1437         * class.c (add_implicitly_declared_members): Remove dead code.
1438         * decl.c (grokfndecl): Add sfk parameter.  Use it do set
1439         DECL_CONSTRUCTOR_P.
1440         (grokdeclarator): Adjust calls to grokfndecl.
1441         * method.c (implicitly_declare_fn): Improve documentation.
1442         * parser.c (cp_parser_direct_declarator): Do not consider a
1443         function to be a constructor if the containing class was
1444         originally anonymous.
1445
1446 2005-01-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1447
1448         PR c++/17154
1449         * search.c (lookup_field_1): Handle using declaration in
1450         class template partial specialization.
1451
1452 2005-01-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1453
1454         PR c++/19258
1455         * pt.c (push_access_scope): Handle friend defined in class.
1456         (pop_access_scope): Likewise.
1457
1458 2005-01-06  Nathan Sidwell  <nathan@codesourcery.com>
1459
1460         PR c++/19270
1461         * pt.c (tsubst_copy) <ARRAY_REF case>: Handle separately.
1462         (tsubst_copy_and_build) <ARRAY_REF case>: Remove obsolete
1463         array-new handling code.  Use build_x_binary_op.
1464
1465 2005-01-05  Nathan Sidwell  <nathan@codesourcery.com>
1466
1467         PR c++/19030
1468         * cp-tree.h (start_decl): Take pointer to pushed scope, not bool.
1469         * name-lookup.h (push_scope): Return pushed scope, not flag.
1470         * name-lookup.c (push_scope): Return scope that should be popped,
1471         not a flag.
1472         * decl.c (start_decl): Adjust.
1473         (grokfndecl): Adjust scope push and pop.
1474         * decl2.c (check_classfn): Likewise.
1475         * parser.c (cp_parser_condition, cp_parser_conversion_function_id,
1476         cp_parser_init_declarator, cp_parser_direct_declarator,
1477         cp_parser_class_specifier, cp_parser_class_head,
1478         cp_parser_lookup_name,
1479         cp_parser_constructor_declarator_p): Likewise.
1480         * pt.c (instantiate_class_template,
1481         resolve_typename_type): Likewise.
1482
1483 2005-01-03  Volker Reichelt  <reichelt@igpm.rwth-aaachen.de>
1484
1485         PR c++/14136
1486         * parser.c (cp_parser_unqualified_id): Do not issue error message
1487         for typedef-name as destructor declarator when performing an
1488         uncommitted tentative parse.
1489
1490 2005-01-01  Steven Bosscher  <stevenb@suse.de>
1491
1492         PR middle-end/17544
1493         * decl.c (finish_function): Fix comment.  Annotate the compiler
1494         generated return with the current file name and line 0.
1495
1496 2004-12-31  Richard Henderson  <rth@redhat.com>
1497
1498         PR middle-end/17799
1499         * call.c (make_temporary_var_for_ref_to_temp): Set DECL_IGNORED_P.
1500         * class.c (build_vtable): Don't conditionallize setting it
1501         based on DWARF2_DEBUG.
1502         (layout_class_type): Set DECL_IGNORED_P.
1503         * decl2.c (get_guard): Likewise.
1504         * rtti.c (get_tinfo_decl, build_lang_decl): Likewise.
1505         * tree.c (build_local_temp): Likewise.
1506
1507 2004-12-30  Mark Mitchell  <mark@codesourcery.com>
1508
1509         * cp-tree.h (cp_declarator): Split "name" field into
1510         qualifying_scope and unqualified_name.
1511         * decl.c (get_scope_of_declarator): Adjust accordingly.
1512         (grokdeclarator): Likewise.
1513         * decl2.c (grokfield): Likewise, and adjust call to
1514         do_class_using_decl.
1515         * name-lookup.c (do_class_using_decl): Split "decl" into
1516         "scope" and "name".  Remove unnecessary code.
1517         * name-lookup.h (do_class_using_decl): Adjust declaration.
1518         * parser.c (make_id_declarator): Split "id" into qualifying_scope
1519         and unqualified_name.
1520         (cp_parser_using_declaration): Adjust call to do_class_using_decl.
1521         (cp_parser_direct_declarator): Adjust to handle the fact that
1522         cp_parser_declarator_id no longer returns a SCOPE_REF.
1523         (cp_parser_direct_declarator): Likewise.
1524         (cp_parser_declarator_id): Do not create a SCOPE_REF for qualified
1525         names.
1526         (cp_parser_member_declaration): Adjust call to make_id_declarator.
1527         (cp_parser_check_declarator_template_parameters): Do not expect a
1528         SCOPE_REF.
1529
1530         * decl.c (duplicate_decls): Call ggc_free on declarations we will
1531         not be needing any longer.
1532
1533         PR c++/19190
1534         * cvt.c (convert_to_void): Do not use STRIP_NOPs.
1535
1536 2004-12-28  Richard Henderson  <rth@redhat.com>
1537
1538         PR inline-asm/15740
1539         * semantics.c (finish_asm_stmt): Resolve asm names.  Validate input
1540         constraints.  Mark memory inputs addressable.
1541
1542 2004-12-27  Jason Merrill  <jason@redhat.com>
1543
1544         * decl.c (expand_static_init): Don't use shortcut if
1545         targetm.relaxed_ordering.
1546
1547 2004-12-27  Mark Mitchell  <mark@codesourcery.com>
1548
1549         PR c++/19149
1550         * decl.c (check_tag_decl): Robustify.
1551
1552 2004-12-23  Mark Mitchell  <mark@codesourcery.com>
1553
1554         PR c++/17595
1555         * parser.c (cp_parser_error): Issue better messages about
1556         #pragma in locations where it is not permitted.
1557
1558         PR c++/17413
1559         * pt.c (check_instantiated_args): Remove bogus SFINAE code.
1560
1561         * cvt.c (convert_to_void): Fix typo in comment.
1562
1563 2004-12-23  Alexandre Oliva  <aoliva@redhat.com>
1564
1565         PR c++/18962
1566         * pt.c (check_explicit_specialization): Use the argument list from
1567         the definition in a template function specialization definition.
1568
1569 2004-12-23  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1570
1571         PR c++/18733
1572         * pt.c (check_explicit_specialization): Use special logic to validate
1573         befriended specializations.
1574
1575 2004-12-22  Mark Mitchell  <mark@codesourcery.com>
1576
1577         * rtti.c (emit_support_tinfos): Avoid using C99 semantics.
1578
1579         PR c++/18464
1580         * call.c (build_this): In templates, do not bother with
1581         build_unary_op.
1582         * typeck.c (unary_complex_lvalue): In a template, always refuse
1583         simplifications.
1584
1585         PR c++/18492
1586         * cp-gimplify.c (cp_genericize): Relax assertion.
1587
1588         PR c++/11224
1589         * cvt.c (convert_to_void): Warn about unused values.
1590
1591         PR c++/18257
1592         * rtti.c (emit_support_tinfos): On systems without weak symbols,
1593         emit the runtime library type-info objects as non-COMDAT.
1594
1595 2004-12-21  Mark Mitchell  <mark@codesourcery.com>
1596
1597         PR c++/18378
1598         * call.c (convert_like_real): Do not permit the use of a copy
1599         constructor to copy a packed field.
1600
1601         PR c++/19063
1602         * decl.c (grokdeclarator): Return error_mark_node, not
1603         void_type_node, to indicate errors.
1604         * parser.c (cp_parser_template_parameter_list): Robustify.
1605         (cp_parser_template_parameter): Likewise.
1606
1607         PR c++/19034
1608         * tree.c (cp_tree_equal): Handle OVERLOAD.
1609
1610 2004-12-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1611
1612         * decl.c (define_label): Use POP_TIMEVAR_AND_RETURN.
1613         * name-lookup.c (pushdecl_class_level): Likewise.
1614
1615 2004-12-21  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1616
1617         * name-lookup.c (pushtag): Add missing POP_TIMEVAR_AND_RETURN.
1618
1619 2004-12-21  Andrew Pinski  <pinskia@physics.uc.edu>
1620
1621         PR c++/18984
1622         * cp-gimplify.c (cp_genericize_r): Don't insert first but instead
1623         check to see if contains the pointer.  Insert the statement before
1624         returning.
1625
1626 2004-12-21  Nathan Sidwell  <nathan@codesourcery.com>
1627
1628         PR c++/14075
1629         * decl.c (check_initializer): Check string initializer of array is
1630         not parenthesized.
1631         * cp-tree.h (PAREN_STRING_LITERAL_P): New.
1632         * semantics.c (finish_parenthesized_expr): Mark a STRING_CST.
1633         * error.c (dump_expr): <STRING_CST case> Add parens, if needed.
1634
1635         * cp-tree.def (TEMPLATE_TYPE_PARM,
1636         BOUND_TEMPLATE_TEMPLATE_PARM, TYPE_OF_TYPE, TYPENAME_TYPE): Reorder
1637         for better code efficiency.
1638         * cp-tree.h (CLASS_TYPE_P): Short circuit IS_AGGR_TYPE check.
1639         (CAN_HAVE_FULL_LANG_DECL_P): Reorder for better optimization.
1640         (INTEGRAL_CODE_P, CP_INTEGRAL_TYPE_P,
1641         INTEGRAL_OR_ENUMERATION_TYPE_P, SCALAR_TYPE_P,
1642         CP_AGGREGATE_TYPE_P, TYPE_PTROB_P, TYPE_REF_OBJ_P,
1643         TYPE_PTROBV_P): Likewise.
1644
1645         PR c++/18975
1646         * method.c (do_build_copy_constructor): Refactor. Don't const
1647         qualify a mutable field.
1648         (do_build_assign_ref): Likewise.
1649
1650 2004-12-20  Matt Austern <austern@apple.com>
1651
1652         PR c++/19044
1653         * decl.c (make_rtl_for_nonlocal_decl): Use
1654         set_builtin_user_assembler_name.
1655
1656 2004-12-19  Mark Mitchell  <mark@codesourcery.com>
1657
1658         * cp-tree.h (note_decl_for_pch): New function.
1659         * class.c (build_clone): Call note_decl_for_pch.
1660         * semantics.c (finish_member_declaration): Likewise.
1661         (note_decl_for_pch): New function.
1662
1663 2004-12-17  Steven Bosscher  <stevenb@suse.de>
1664
1665         * init.c (build_zero_init): max_index is the number of
1666         elements, minus 1.
1667
1668 2004-12-17  Nathan Sidwell  <nathan@codesourcery.com>
1669
1670         PR c++/18721
1671         * class.c (add_method): Do not push conversion operators into a
1672         binding level.
1673
1674         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE_TYPE): Reformat.
1675         * error.c (dump_decl): <TYPE_DECL case> Remove extraneous braces.
1676
1677 2004-12-16  Nathan Sidwell  <nathan@codesourcery.com>
1678
1679         PR c++/18905
1680         * cp-tree.h (integral_constant_value): Declare.
1681         * call.c (null_ptr_cst_p): Use integral_constant_value, not
1682         decl_constant_value.
1683         (convert_like_real): Likewise.
1684         * class.c (check_bitfield_decl): Likewise.
1685         * cvt.c (ocp_convert): Likewise.
1686         (convert): Remove unnecessary decl_constant_value call.
1687         * decl.c (compute_array_index_type): Use integral_constant_value,
1688         not decl_constant_value.
1689         (build_enumerator): Likewise.
1690         * decl2.c (grokfield): Likewise.
1691         * init.c (decl_constant_value): Simplify.
1692         (integral_constant_value): New.
1693         * pt.c (fold_decl_constant_value): Use integral_constant_value,
1694         remove subsequent check.
1695         (tsubst): Use integral_constant_value, not decl_constant_value.
1696         (tsubst_copy, unify): Likewise.
1697         * typeck.c (decay_conversion): Likewise.
1698         (build_compound_expr): Remove unnecessary decl_constant_value
1699         calls.
1700         (build_static_cast_1, build_reinterpret_cast_1):
1701         (convert_for_assignment): Remove comment about not calling
1702         decl_constant_value.
1703
1704 2004-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1705
1706         PR c++/18825
1707         * pt.c (instantiate_class_template): Set input_location for
1708         friend function.
1709         (tsubst_friend_function): Don't set input_location here.
1710         Make sure the context is complete if necessary.
1711
1712 2004-12-15  Nathan Sidwell  <nathan@codesourcery.com>
1713
1714         PR c++/18981
1715         * parser.c (cp_parser_lookup_name): Remove unneeded TYPENAME_TYPE
1716         flag setting.
1717
1718 2004-12-14  Mark Mitchell  <mark@codesourcery.com>
1719
1720         PR c++/18738
1721         * decl.c (make_typename_type): Do not handle namespace-scoped
1722         names here.
1723         (tag_name): Handle typename_type.
1724         (check_elaborated_type_specifier): Handle typenames.
1725         * parser.c (cp_parser_diagnose_invalid_type_name): Improve
1726         comment.
1727         (cp_parser_elaborated_type_specifier): Use
1728         cp_parser_diagnose_invalid_type_name.
1729
1730 2004-12-14  Andrew Pinski  <pinskia@physics.uc.edu>
1731
1732         PR c++/18965
1733         * init.c (build_zero_init): If the max_index is 0, there is no
1734         need to create a RANGE_EXPR.
1735
1736 2004-12-14  Mark Mitchell  <mark@codesourcery.com>
1737
1738         PR c++/18793
1739         * cp-objcp-common.c (cp_expr_size): Loosen assertion.
1740
1741 2004-12-14  Nathan Sidwell  <nathan@codesourcery.com>
1742
1743         PR c++/18949
1744         * pt.c (tsubst_copy_and_build): <INDIRECT_REF case> Check that a
1745         REFERENCE_REF_P is dereferencing a reference type.
1746         * typeck.c (build_static_cast): Convert from reference even in a
1747         template.
1748         (build_reinterpret_cast, build_const_cast, build_c_cast): Likewise.
1749
1750 2004-12-14  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1751
1752         * parser.c (cp_parser_uncommitted_to_tentative_parse_p): New function.
1753         (cp_parser_name_lookup_error): Use it.
1754         (cp_parser_check_for_invalid_template_id): Likewise.
1755         (cp_parser_skip_to_closing_parenthesis): Likewise.
1756         (cp_parser_nested_name_specifier_opt): Likewise.
1757         (cp_parser_simple_declaration, cp_parser_template_id): Likewise.
1758         (cp_parser_parameter_declaration_list): Likewise.
1759         (cp_parser_parameter_declaration): Likewise.
1760         (cp_parser_template_name): Let cp_parser_simulate_error perform
1761         the checking.
1762         (cp_parser_committed_to_tentative_parse): Remove.
1763
1764 2004-12-13  Andrew Pinski  <pinskia@physics.uc.edu>
1765
1766         PR c++/18968
1767         * class.c (build_base_path): Convert the zero constant to the correct
1768         type when comparing.
1769
1770 2004-12-13  Mark Mitchell  <mark@codesourcery.com>
1771
1772         PR c++/18925
1773         * class.c (layout_class_type): Determine the visibility of static
1774         data members.
1775
1776 2004-12-12  Roger Sayle  <roger@eyesopen.com>
1777
1778         PR middle-end/12454
1779         * cp-gimplify.c (gimplify_if_stmt): Optimize the case where the
1780         condition is a constant and the unexecuted clause is empty.
1781
1782 2004-12-10  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1783
1784         PR c++/18731
1785         * parser.c (cp_parser_class_head): Reject typedef-name in class head.
1786
1787 2004-12-09  Matt Austern  <austern@apple.com>
1788
1789         PR c++/18514
1790         * name-lookup.c (do_nonmember_using_decl): A real function
1791         declaration takes precedence over an anticipated declaration.
1792
1793 2004-12-09  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1794
1795         * parser.c (cp_parser_member_declaration): Fix comment typo.
1796
1797 2004-12-09  Alexandre Oliva  <aoliva@redhat.com>
1798
1799         PR c++/18757
1800         * parser.c (cp_parser_template_id): Don't create a CPP_TEMPLATE_ID
1801         if parsing failed.
1802
1803 2004-12-09  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1804
1805         PR c++/18073
1806         * typeck.c (build_reinterpret_cast_1): Allow cast from vector type.
1807
1808 2004-12-09  Nathan Sidwell  <nathan@codesourcery.com>
1809
1810         PR c++/16681
1811         * init.c (build_zero_init): Build a RANGE_EXPR for an array
1812         initializer.
1813
1814 2004-12-08  Kelley Cook  <kcook@gcc.gnu.org>
1815
1816         * typeck.c: Remove DOS line endings.
1817
1818 2004-12-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1819
1820         PR c++/18100
1821         * decl.c (lookup_and_check_tag): Diagnose nested class with
1822         the same name as enclosing class.
1823
1824 2004-12-08  Nathan Sidwell  <nathan@codesourcery.com>
1825
1826         PR c++/18803
1827         * cp-tree.h (REFERENCE_REF_P): New.
1828         (CPTI_TYPE_INFO_TYPE): Rename to ...
1829         (CPTI_CONST_TYPE_INFO_TYPE): ... here.
1830         (CPTI_TYPE_INFO_REF_TYPE): Remove.
1831         (type_info_type_node): Rename to ...
1832         (const_type_info_type_node): ... here.
1833         (type_info_ref_type): Remove.
1834         * call.c (build_user_type_conversion): Reformat.
1835         (resolve_args): Do not convert_from_reference.
1836         (build_object_call): Call convert_from_reference.
1837         (prep_operand): Do not convert_from_reference.
1838         (build_new_method_call): Likewise.
1839         * class.c (build_vfield_ref): Likewise.
1840         * cvt.c (convert_to_reference): Likewise.
1841         (convert_from_reference): Build INDIRECT_REF here, not with
1842         build_indirect_ref.
1843         (convert_force): Do not convert_from_reference.
1844         (build_expr_type_conversion): Likewise.
1845         * decl.c (grok_reference_init): Likewise.
1846         * decl2.c (delete_sanity): Likewise.
1847         * except.c (initialize_handler_parm): Use POINTER_TYPE_P.
1848         * init.c (build_dtor_call): Do not convert_from_reference.
1849         * parser.c (cp_parser_template_argument): Unwrap indirected
1850         reference. Allow TEMPLATE_PARM_INDEX as an object parm.
1851         * pt.c (tsubst_copy_and_build) <case INDIRECT_REF>: Use
1852         convert_from_reference, if indicated.
1853         <case CALL_EXPR>: Do not convert_from_reference.
1854         <case PARM_DECL, VAR_DECL>: Convert_from_reference if needed.
1855         (tsubst_initializer_list): Do not convert_from_reference.
1856         * rtti.c (init_rtti_processing): Adjust node creation.
1857         (throw_bad_typeid): Use const_type_info_type_node.
1858         Do not convert_from_reference.
1859         (typeid_ok_p): Use const_type_info_type_node.
1860         (build_typeid, get_typeid): Always return type_info typed node.
1861         (build_dynamic_cast_1): Dont convert_from_reference. Refactor.
1862         * semantics.c (finish_stmt_expr_expr): Do not
1863         convert_from_reference.
1864         (finish_id_expression): Convert_from_reference as appropriate.
1865         * typeck.c (decay_conversion): Do not convert_from_reference.
1866         (finish_class_member_access_expr): Likewise.
1867         (build_indirect_ref): Use POINTER_TYPE_P.
1868         (convert_arguments): Do not convert_from_reference.
1869         (build_modify_expr): Likewise.
1870         (convert_for_initialization): Likewise.
1871         * typeck2.c (build_x_arrow): Likewise.
1872
1873 2004-12-07  Ziemowit Laski  <zlaski@apple.com>
1874
1875         * cp-tree.h (struct lang_type_class): Rename 'objc_protocols'
1876         field to 'objc_info'.
1877
1878 2004-12-07  Kazu Hirata  <kazu@cs.umass.edu>
1879
1880         * pt.c: Replace a use of first_rtl_op with TREE_CODE_LENGTH.
1881
1882 2004-12-07  Roger Sayle  <roger@eyesopen.com>
1883
1884         * name-lookup.c (leave_scope): We only need to update
1885         class_binding_level when leaving a class scope.
1886
1887 2004-12-06  Ziemowit Laski  <zlaski@apple.com>
1888
1889         * cp-tree.h (struct lang_type_class): Add 'objc_protocols' field.
1890
1891 2004-12-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1892
1893         PR c++/17011, c++/17971
1894         * pt.c (tsubst_copy) <FIELD_DECL case>: Check and diagnose
1895         invalid field.
1896         (tsubst_copy_and_build) <COMPONENT_REF case>: Check
1897         error_mark_node after member substitution.
1898         * semantics.c (finish_id_expression): Call
1899         finish_non_static_data_member for non-dependent FIELD_DECL.
1900
1901 2004-12-03  Nathan Sidwell  <nathan@codesourcery.com>
1902
1903         PR c++/18782
1904         * decl.c (grokdeclarator): Make sure class in pointer to member is
1905         not a namespace.
1906
1907 2004-12-02  Nathan Sidwell  <nathan@codesourcery.com>
1908
1909         PR c++/18318
1910         * parser.c (cp_parser_new_type_id): Move array size expression
1911         checks from here ...
1912         * init.c (build_new): ... to here.
1913
1914 2004-12-02  Nathan Sidwell  <nathan@codesourcery.com>
1915
1916         PR c++/18758
1917         * parser.c (cp_parser_class_head): Return NULL_TREE when
1918         push_template_decl fails.  Update comment.
1919
1920 2004-12-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1921
1922         PR c++/15664, c++/18276
1923         * pt.c (tsubst_decl) <TEMPLATE_DECL case>: Reorganize.  Correctly
1924         tsubst TEMPLATE_DECL that is a TEMPLATE_TEMPLATE_PARM.
1925
1926 2004-12-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1927
1928         PR c++/18123
1929         * parser.c (cp_parser_type_specifier): Catch template declaration
1930         of enum.
1931
1932 2004-12-01  Matt Austern  <austern@apple.com>
1933
1934         * name-lookup.c (namespace_binding): Omit alias check for global
1935         namespace.
1936
1937 2004-12-01  Nathan Sidwell  <nathan@codesourcery.com>
1938
1939         PR c++/18729
1940         * parser.c (cp_parser_class_name): Check decl's type is not
1941         error_mark_node.
1942
1943         PR c++/17431
1944         * call.c (standard_conversion): Add FLAGS parameter. Do not allow
1945         derived to base conversion when checking constructor
1946         accessibility.
1947         (implicit_conversion): Pass FLAGS to standard_conversion.
1948         (check_constructir_callable): Disallow conversion functions.
1949
1950 2004-11-30  Kazu Hirata  <kazu@cs.umass.edu>
1951
1952         * parser.c: Fix comment typos.
1953
1954 2004-11-27  Mark Mitchell  <mark@codesourcery.com>
1955
1956         PR c++/18368
1957         * parser.c (cp_parser_check_for_definition_in_return_type): Take
1958         the defined type as a parameter, and inform the user about the
1959         possibility of a missing semicolon.
1960         (cp_parser_explicit_instantiation): Adjust call to
1961         cp_parser_check_for_definition_in_return_type.
1962         (cp_parser_init_declarator): Likewise.
1963         (cp_parser_member_declaration): Likewise.
1964
1965         PR c++/18674
1966         * cp-tree.def (TYPENAME_TYPE): Remove discussion of implicit
1967         typename from comments.
1968         * cp-tree.h (TYPENAME_IS_ENUM_P): New macro.
1969         (TYPENAME_IS_CLASS_P): Likewise.
1970         (make_typename_type): Change prototype.
1971         * decl.c (struct_typename_info): New type.
1972         (typename_compare): Expect the second argument to be a
1973         typename_info, not a tree.
1974         (build_typename_type): Add tag_type parameter.  Do not create a
1975         new type until necessary.
1976         (make_typename_type): Add tag_type parameter.
1977         * error.c (TYPENAME_TYPE): Print tags other than "typename" if
1978         appropriate.
1979         * friend.c (make_friend_class): Adjust call to make_typename_type.
1980         * parser.c (cp_parser_make_typename_type): Likewise.
1981         (cp_parser_primary_expression): Adjust call to
1982         cp_parser_lookup_name.
1983         (cp_parser_unqualified_id): Adjust calls to cp_parser_class_name.
1984         (cp_parser_class_or_namespace_name): Likewise.
1985         (cp_parser_postfix_expression): Adjust calls to
1986         make_typename_type.
1987         (cp_parser_mem_initializer_id): Adjust calls to
1988         cp_parser_class_name.
1989         (cp_parser_type_parameter): Adjust calls to cp_parser_lookup_name.
1990         (cp_parser_template_name): Likewise.
1991         (cp_parser_template_argument): Likewise.
1992         (cp_parser_type_name): Adjust call to cp_parser_class_name.
1993         (cp_parser_elaborated_type_specifier): Adjust calls to
1994         make_typename_type and cp_parser_lookup_name.
1995         (cp_parser_namespace_name): Likewise.
1996         (cp_parser_class_name): Replace type_p parameter with tag_type.
1997         Adjust calls to make_typename_type and cp_parser_lookup_name.
1998         (cp_parser_class_head): Adjust calls to cp_parser_class_name.
1999         (cp_parser_base_specifier): Likewise.
2000         (cp_parser_lookup_name): Replace is_type parameter with tag_type.
2001         Adjust calls to make_typename_type and lookup_qualified_name.
2002         (cp_parser_lookup_name_simple): Adjust call to
2003         cp_parser_lookup_name.
2004         (cp_parser_constructor_declarator_p): Adjust call to
2005         cp_parser_class_name.
2006         * pt.c (convert_template_argument): Adjust all to
2007         make_typename_type.
2008         (tsubst_decl): Do not pre-substitute the type of the declaration.
2009         (tsubst): Hand off declarations more quickly.  Adjust call to
2010         make_typename_type.
2011
2012         PR c++/18512
2013         * parser.c (cp_parser_postfix_dot_deref_expression): Robustify.
2014
2015 2004-11-29  Daniel Jacobowitz  <dan@codesourcery.com>
2016
2017         PR c/7544
2018         * Make-lang.in (cp/decl2.o): Update dependencies.
2019         * decl2.c (finish_file): Call maybe_apply_pending_pragma_weaks.
2020
2021 2004-11-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2022
2023         PR c++/18652
2024         * name-lookup.c (pushtag): Change return type to tree.
2025         * cp-tree.h (pushtag): Adjust declaration.
2026         * decl.c (xref_tag, start_enum): Use return value of pushtag.
2027         * pt.c (push_template_decl_real): Return immediately if
2028         pushdecl_namespace_level returns error_mark_node.
2029
2030 2004-11-27  Kazu Hirata  <kazu@cs.umass.edu>
2031
2032         * pt.c: Fix a comment typo.
2033
2034 2004-11-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2035
2036         Friend class name lookup 4/n
2037         * class.c (pushclass): Don't call cxx_remember_type_decls.
2038         * cp-tree.h (clear_anon_tags): Remove declaration.
2039         * decl.c (grokdeclarator): Don't call lookup_tag_reverse.
2040         * name-lookup.c (binding_entry_free, binding_table_free): Comment
2041         out functions.
2042         (binding_table_find_anon_type, binding_table_reverse_maybe_remap,
2043         binding_table_remove_anonymous_types, cxx_remember_type_decls,
2044         bt_print_entry, clear_anon_tags, follow_tag_typedef, lookup_tag,
2045         lookup_tag_reverse): Remove
2046         (begin_scope, leave_scope, kept_level_p, print_binding_level):
2047         Don't use type_decls field in cp_binding_level.
2048         (maybe_process_template_type_declaration, pushtag): Set
2049         CLASSTYPE_NESTED_UTDS directly.
2050         * name-lookup.h (binding_table_remove_anonymous_types,
2051         cxx_remember_type_decls, lookup_tag, lookup_tag_reverse): Remove
2052         declaration.
2053         (cp_binding_level): Remove type_decls field.
2054
2055 2004-11-26  Kazu Hirata  <kazu@cs.umass.edu>
2056
2057         * typeck.c: Fix a comment typo.
2058
2059 2004-11-25  Mark Mitchell  <mark@codesourcery.com>
2060
2061         PR c++/18445
2062         * class.c (instantiate_type): Treat NON_DEPENDENT_EXPRs with
2063         unknown_type as non matching.  Tidy up.
2064         * pt.c (build_non_dependent_expr): Do not build a
2065         NON_DEPENDENT_EXPR for a VAR_DECL.
2066
2067         PR c++/18001
2068         * cp-tree.h (lvalue_or_else): Remove declaration.
2069         * tree.c (lvalue_or_else): Remove.
2070         * typeck.c (build_unary_op): Adjust call to lvalue_or_else.
2071         (build_modify_expr): Likewise.
2072
2073         PR c++/18625
2074         * decl.c (duplicate_decls): Return error_mark_node on error, as
2075         specified.
2076
2077         PR c++/18466
2078         * decl.c (grokvardecl): Keep track of whether or not a there was
2079         explicit qualification.
2080         * name-lookup.c (set_decl_namespace): Complain about explicit
2081         qualification of a name within its own namespace.
2082
2083         PR c++/18545
2084         * typeck.c (check_return_expr): Robustify.
2085
2086 2004-11-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2087
2088         Friend class name lookup 3/n, PR c++/3332
2089         * name-lookup.c (push_inner_scope, pop_inner_scope): New functions.
2090         (lookup_type_scope): Don't deal with name from user declaration
2091         specially.
2092         * name-lookup.h (push_inner_scope, pop_inner_scope): Add declarations.
2093         * parser.c (cp_parser_class_specifier): Use push_inner_scope and
2094         pop_inner_scope.
2095
2096 2004-11-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2097
2098         Friend class name lookup 2/n, PR c++/14513, c++/15410
2099         * name-lookup.c (lookup_name_real): Simplify.
2100         (lookup_type_scope): Add SCOPE parameter.  Handle friend class
2101         lookup.
2102         * name-lookup.h (tag_scope): New enum type.
2103         (lookup_type_scope): Adjust declaration.
2104         * decl.c (lookup_and_check_tag, xref_tag, xref_tag_from_type):
2105         Change bool parameter GLOBALIZED to TAG_SCOPE parameter SCOPE.
2106         (start_enum): Likewise.  Add assertion test that NAME is
2107         IDENTIFIER_NODE.  Use anonymous name for dummy ENUMERAL_TYPE in
2108         case of error.
2109         * cp-tree.h (xref_tag, xref_tag_from_type): Adjust declarations.
2110         * parser.c (cp_parser_elaborated_type_specifier,
2111         cp_parser_class_head): Adjust call to xref_tag.
2112         * pt.c (lookup_template_class, instantiate_class_template):
2113         Likewise.
2114         * rtti.c (init_rtti_processing, build_dynamic_cast_1,
2115         tinfo_base_init, emit_support_tinfos): Likewise.
2116
2117 2004-11-25  Joseph S. Myers  <joseph@codesourcery.com>
2118
2119         * g++spec.c, lex.c: Avoid ` as left quote in diagnostics.
2120
2121 2004-11-24  Mark Mitchell  <mark@codesourcery.com>
2122
2123         PR c++/17473
2124         * name-lookup.c (supplement_binding): Do not allow typedefs to be
2125         redefined in class scope.
2126
2127         PR c++/18285
2128         * parser.c (cp_parser_set_decl_type_spec): Do not try to allow
2129         redefinitions of builtin types other that "bool" or "wchar_t".
2130
2131 2004-11-24  Steven Bosscher  <stevenb@suse.de>
2132
2133         * decl.c (cxx_init_decl_processing): Don't clear
2134         flag_inline_functions.
2135
2136 2004-11-24  Mark Mitchell  <mark@codesourcery.com>
2137
2138         * pt.c (tsubst_function_type): Do not permit function types which
2139         return arrays or functions.
2140
2141         PR c++/18586
2142         * parser.c (cp_parser_init_declarator): Do not pop scope twice.
2143
2144         PR c++/18530
2145         * cp-tree.h (CTOR_NAME): Remove.
2146         (DTOR_NAME): Remove.
2147         * decl.c (initialize_predefined_identifiers): Add spaces to the
2148         end of constructor and destructor names.
2149
2150 2004-11-24  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2151
2152         PR c++/8929
2153         * decl.c (start_decl): Check for invalid specialization headers.
2154
2155 2004-11-24  Paolo Bonzini  <bonzini@gnu.org>
2156
2157         PR c++/16882
2158
2159         * call.c (standard_conversion): Move check for conversions between
2160         vector pointers...
2161         * typeck.c (ptr_reasonably_similar): ... here.
2162
2163 2004-11-23  Ben Elliston  <bje@au.ibm.com>
2164
2165         * cp-tree.h (context_as_string): Remove extern.
2166         * error.c (context_as_string): Remove.
2167
2168         * cp-tree.h (cp_type_qual_from_rid): Remove extern.
2169         * lex.c (cp_type_qual_from_rid): Remove.
2170
2171         * cp-tree.h (do_poplevel): Remove extern.
2172         (check_multiple_declarators): Likewise.
2173         * semantics.c (do_poplevel): Make static.
2174         (check_multiple_declarators): Remove.
2175
2176         * cp-tree.h (check_final_overrider): Remove extern.
2177         * search.c (check_final_overrider): Make static.
2178
2179         * cp-tree.h (build_artificial_parm): Remove extern.
2180         * decl2.c (build_artificial_parm): Make static.
2181
2182 2004-11-22  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2183
2184         PR c++/18354
2185         * typeck.c (build_unary_op) <CONVERT_EXPR, NEGATE_EXPR>: Unify code.
2186         Make sure the result is always a rvalue.
2187
2188 2004-11-16  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2189
2190         * decl.c (start_preparsed_function): Call check_function_type even
2191         in templates.
2192         (require_complete_types_for_parms): Skip dependent types.
2193         (check_function_type): Likewise.
2194
2195 2004-11-16  Steven Bosscher  <stevenb@suse.de>
2196
2197         * Make-lang.in (cp/decl.o, cp/search.o): Don't depend on stack.h.
2198         * search.c: Don't include it.
2199
2200 2004-11-15  Andrew Pinski  <pinskia@physics.uc.edu>
2201
2202         * cp-gimplify.c: Include pointer-set.h
2203         (cp_genericize_r): Use pointer_sets instead of a hashtable.
2204         Also instert the new statement for CLEANUP_STMT.
2205         (cp_genericize): Use pointer_sets instead of a hashtable.
2206         * Make-lang.in (cp-gimplify.o): Depend on pointer-set.h.
2207
2208 2004-11-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2209
2210         Friend class name lookup 1/n, PR c++/18471
2211         * decl.c (lookup_and_check_tag): New function.
2212         (xref_tag, start_enum): Use it.
2213         (check_elaborated_type_specifier): Move TEMPLATE_TYPE_PARM check
2214         before !DECL_IMPLICIT_TYPEDEF_P.  Also display previously declared
2215         location.
2216         * name-lookup.c (lookup_name_current_level): Rename to ...
2217         (lookup_name_innermost_nonclass_level): ... this.
2218         (lookup_type_scope): New function.
2219         * name-lookup.h (lookup_name_current_level): Rename to ...
2220         (lookup_name_innermost_nonclass_level): ... this.
2221         (lookup_type_scope): Add declaration.
2222
2223 2004-11-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2224
2225         PR c++/17344
2226         * pt.c (coerce_template_parms): Only emit error message about
2227         invalid template argument when TF_ERROR.
2228
2229 2004-11-12  Mark Mitchell  <mark@codesourcery.com>
2230
2231         PR c++/18389
2232         * decl.c (start_decl): Make sure to set *pop_scope_p.  Return
2233         error_mark_node to indicate errors.
2234
2235         PR c++/18429
2236         * parser.c (cp_parser_direct_declarator): Disallow non-constant
2237         array bounds when not inside a function.
2238
2239         PR c++/18436
2240         * pt.c (tsubst_copy_and_build): Do not do Koenig lookup when an
2241         unqualified name resolves to a member function.
2242
2243         PR c++/18407
2244         * pt.c (tsubst_copy_and_build): Handle qualified names used from a
2245         derived class correctly.
2246
2247         * decl2.c (import_export_decl): Fix typo in comment.
2248         * tree.c (pod_type_p): Likewise.
2249
2250 2004-11-10  Andrew Pinski  <pinskia@physics.uc.edu>
2251
2252         * typeck.c (cxx_mark_addressable): Add braces around the first if.
2253
2254 2004-11-10  Adam Nemet  <anemet@lnxw.com>
2255
2256         PR middle-end/18160
2257         * typeck.c (cxx_mark_addressable): Issue an error if address of an
2258         explicit register variable is requested.
2259
2260 2004-11-10  Nathan Sidwell  <nathan@codesourcery.com>
2261
2262         PR c++/18143
2263         * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK): New.
2264         (struct lang_decl_flags): Add thunk_p flag.
2265         (struct lang_decl): Remove separate fixed_offset. Place
2266         cloned_function and fixed_offset into union.
2267         (DECL_CLONED_FUNCTION_P, DECL_CLONED_FUNCTION): Adjust.
2268         (DECL_THUNK_P, SET_DECL_THUNK_P): Adjust.
2269         (THUNK_FIXED_OFFSET): Adjust.
2270         * method.c (make_thunk): Adjust.
2271
2272 2004-11-09  Mark Mitchell  <mark@codesourcery.com>
2273
2274         PR c++/18369
2275         * init.c (build_new_1): Handle parenthesized type-ids that name an
2276         array type.  Tidy.
2277
2278 2004-11-09  Joseph S. Myers  <joseph@codesourcery.com>
2279
2280         * call.c, class.c, decl.c, decl2.c, error.c, mangle.c, parser.c,
2281         pt.c, search.c, semantics.c, typeck.c: Use %q, %< and %> for
2282         quoting in diagnostics.
2283         * parser.c (cp_parser_sizeof_operand): Use '' instead of `' for
2284         quoting in printf format.
2285         * decl.c (duplicate_decls, start_decl): Use %qD instead of
2286         unquoted %D.
2287
2288 2004-11-08  Kazu Hirata  <kazu@cs.umass.edu>
2289
2290         * class.c, decl.c, lex.c, name-lookup.c, parser.c, pt.c,
2291         search.c, typeck2.c: Fix comment formatting.
2292
2293 2004-11-04  Ulrich Weigand  <uweigand@de.ibm.com>
2294
2295         PR tree-optimization/18184
2296         * cp-objcp-common.c (cxx_types_compatible_p): Do not treat pointers
2297         of different modes or alias-all flags as equivalent.
2298         * typeck.c (comptypes): Likewise.
2299
2300 2004-11-04  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2301
2302         DR 49, 100
2303         * cp-tree.h (TYPE_REF_OBJ_P): New macro.
2304         (TYPE_PTR_P, TYPE_PTROB_P, TYPE_PTROBV_P, TYPE_PTRFN_P,
2305         TYPE_REFFN_P): Document.
2306         (fold_decl_constant_value): New prototype.
2307         * pt.c (convert_nontype_argument_function): Rewrite and extract
2308         parts into...
2309         (fold_decl_constant_value, convert_nontype_argument_function): New.
2310         (lookup_template_class): Add comment about useless double call.
2311         * mangle.c (write_expression): Strip conversions before lowering
2312         pointer to members.
2313         * cvt.c (ocp_convert): Check LOOKUP_COMPLAIN for a pedwarn. Disallow
2314         enum to enum conversion.
2315
2316 2004-11-02  Mark Mitchell  <mark@codesourcery.com>
2317
2318         PR c++/18124
2319         * parser.c (cp_parser_type_parameter): Robustify.
2320
2321         PR c++/18155
2322         * parser.c (cp_parser_single_declaration): Disallow template
2323         typedefs.
2324
2325         PR c++/18177
2326         * typeck.c (build_const_cast): Use error_operand_p.
2327
2328 2004-11-02  Ziemowit Laski  <zlaski@apple.com>
2329
2330         * cp-lang.c (cxx_types_compatible_p): Remove prototype and definition.
2331         (LANG_HOOKS_TYPES_COMPATIBLE_P): Move to cp-objcp-common.h.
2332         * cp-objcp-common.c (cxx_types_compatible_p): Moved definition here
2333         from cp-lang.c.
2334         * cp-objcp-common.h (cxx_types_compatible_p): Moved prototype here
2335         from cp-lang.c.
2336         (LANG_HOOKS_TYPES_COMPATIBLE_P): Moved here from cp-lang.c.
2337
2338 2004-11-01  Nathan Sidwell  <nathan@codesourcery.com>
2339
2340         PR c++/18064
2341         * search.c (check_final_overrider): Deprecate gnu covariant extension.
2342
2343 2004-10-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2344
2345         Convert diagnostics to use quoting flag q 9/n
2346         * typeck.c (build_x_unary_op, convert_member_func_to_ptr,
2347         get_delta_difference):  Use new quotation style.
2348         * repo.c (reopen_repo_file_for_write): Likewise.
2349         * pt.c (do_type_instantiation): Likewise.
2350         * parser.c (cp_parser_diagnose_invalid_type_name):
2351         * name-lookup.c (push_overloaded_decl, set_decl_namespace):
2352         * error.c (cp_print_error_function,
2353         print_instantiation_full_context): Likewise.
2354         * decl.c (define_label, grok_reference_init,
2355         maybe_deduce_size_from_array_init, revert_static_member_fn):
2356         * decl2.c (check_classfn): Likewise.
2357         * class.c (add_method, check_field_decls, layout_class_type,
2358         resolve_address_of_overloaded_function): Likewise.
2359         * call.c (build_x_va_arg, build_over_call): Likewise.
2360
2361 2004-10-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2362
2363         Convert diagnostics to use quoting flag q 8/n
2364         * cvt.c (cp_convert_to_pointer, warn_ref_binding,
2365         convert_to_reference, ocp_convert, convert_to_void
2366         cp_convert_to_pointer): Use new quotation style.
2367
2368 2004-10-31  Mark Mitchell  <mark@codesourcery.com>
2369
2370         PR c++/15172
2371         * typeck2.c (store_init_value): Use split_nonconstant_init even
2372         for types that require construction.
2373
2374 1004-10-28  Matt Austern  <austern@apple.com>
2375
2376         PR c++/17542
2377         * cp-tree.h (class_key_or_enum_as_string): Declare.
2378         * error.c (class_key_or_enum): Rename to class_key_or_enum_as_string
2379         and remove static qualifier.
2380         * decl.c (shadow_tag): Warn about ignored attributes in class/struct/
2381         union/enum declaration.
2382
2383 2004-10-29  Kazu Hirata  <kazu@cs.umass.edu>
2384
2385         * pt.c: Fix a comment typo.
2386
2387 2004-10-28  Nathan Sidwell  <nathan@codesourcery.com>
2388
2389         * typeck.c (composite_pointer_type): Remove comment about DR 195.
2390         (build_reinterpret_cast_1): Revert DR195 patch. Only emit a
2391         warning when being pedantic.
2392         (build_reinterpet_cast, build_c_cast): Adjust.
2393
2394 2004-10-29  Mark Mitchell  <mark@codesourcery.com>
2395
2396         PR c++/17695
2397         * decl.c (grokdeclarator): Mark TYPE_DECLs as abstract when they
2398         appear in a constructor/destructor that will be cloned.
2399
2400 1004-10-28  Matt Austern  <austern@apple.com>
2401
2402         PR c++/14124
2403         * decl.c (finish_enum): Handle packed attribute.
2404         * parser.c (cp_parser_enum_specifier): Process trailing attributes.
2405
2406 2004-10-28  Mark Mitchell  <mark@codesourcery.com>
2407
2408         PR c++/17132
2409         * pt.c (instantiate_class_template): Increment
2410         processing_template_decl when substituting into a member class
2411         template.
2412
2413 2004-10-27  Mark Mitchell  <mark@codesourcery.com>
2414
2415         PR c++/17435
2416         * call.c (convert_like_real): Fix formatting.
2417         (initialize_reference): When binding a temporary to a base class,
2418         ensure that the nominal copy made is to the derived class, not the
2419         base class.
2420
2421         PR c++/18140
2422         * parser.c (cp_parser_next_token_ends_template_argument_p): Do not
2423         include ">>".
2424
2425 2004-10-27  Andrew Pinski  <pinskia@physics.uc.edu>
2426
2427         * decl.c (bad_specifiers): Move the q after the %.
2428
2429 2004-10-27  Andrew Pinski  <pinskia@physics.uc.edu>
2430
2431         * parser.c (cp_parser_diagnose_invalid_type_name): Move the q after
2432         the %.
2433
2434 2004-10-26  Mark Mitchell  <mark@codesourcery.com>
2435
2436         * name-lookup.c (do_namespace_alias): Use FROB_CONTEXT.
2437         * search.c (current_scope): Fix prototype.
2438
2439         PR c++/18093
2440         * search.c (current_scope): Return the innermost non-block scope,
2441         not the innermost non-block, non-namespace scope.
2442         (at_namespace_scope_p): Adjust accordingly.
2443         (dfs_accessible_post): Do not pass namespaces to is_friend.
2444         (dfs_walk_once_accessible_r): Likewise.
2445         * decl.c (grokvardecl): Adjust call to current_scope.
2446         (build_enumerator): Likewise.
2447         * parser.c (cp_parser_using_declaration): Likewise.
2448         (cp_parser_direct_declarator): Use at_namespace_scope_p instead of
2449         current_scope.
2450         (cp_parser_class_head): Adjust call to current_scope.
2451         * name-lookup.c (do_namespace_alias): Set the DECL_CONTEXT for the
2452         alias.
2453
2454         PR c++/18020
2455         * pt.c (tusbst_copy_and_build): Resolve enumeration constants to
2456         their underlying values.
2457
2458         PR c++/18161
2459         * typeck.c (build_binary_op): Honor build_type, even when in a
2460         template.
2461
2462 2004-10-26  Nathan Sidwell  <nathan@codesourcery.com>
2463
2464         * parser.c (cp_lexer_get_preprocessor_token): Remove unneeded
2465         padding token checking.
2466
2467 2004-10-25  Andrew Pinski  <pinskia@physics.uc.edu>
2468
2469         PR c++/18121
2470         * decl.c (grokdeclarator) <case cdk_array>: Remove the call
2471         layout_type as it is already done by create_array_type_for_decl.
2472
2473 2004-10-22  Nathan Sidwell  <nathan@codesourcery.com>
2474
2475         PR c++/18095
2476         * parser.c (eof_token): Make const, correctly initialize rid and
2477         location fields.
2478         (struct cp_lexer): Replace buffer_end pointer with buffer_length
2479         count. Adjust.
2480         (cp_lexer_new_main): Directly grow lexer's buffer here.  Don't
2481         zero it out.
2482         (cp_lexer_new_from_tokens): Adjust.
2483         (cp_lexer_grow_buffer): Remove.
2484         (cp_lexer_peek_nth_token, cp_lexer_consume_token,
2485         cp_lexer_purge_token): Add const casts.
2486
2487 2004-10-21  Mark Mitchell  <mark@codesourcery.com>
2488
2489         PR c++/18073
2490         PR c++/10841
2491         * cp-tree.h (convert_to_base): Change prototype.
2492         (build_ptrmemfunc): Likewise.
2493         (convert_ptrmem): New function.
2494         * call.c (struct conversion): Adjust documentation for base_p.
2495         (standard_conversion): Set base_p for ck_pmem conversions as
2496         appropriate.
2497         (convert_like_real): Use convert_to_base for ck_pmem and ck_ptr
2498         conversions.
2499         * class.c (convert_to_base): Handle both pointers and objects.
2500         Add nonnull parameter.
2501         (build_vfield_ref): Adjust call to convert_to_base.
2502         * cvt.c (cp_convert_to_pointer): Adjust call to build_ptrmemfunc.
2503         (convert_force): Likewise.
2504         * typeck.c (build_unary_op): Likewise.
2505         (convert_ptrmem): New function.
2506         (build_static_cast_1): Use it.
2507         (build_reinterpret_cast): Allow conversions to vector types.
2508         (get_delta_difference): Add c_cast_p parameter.
2509         (build_ptrmemfunc): Likewise.  Adjust calls to
2510         get_delta_difference.
2511
2512 2004-10-21  Andrew Pinski  <pinskia@physics.uc.edu>
2513
2514         PR c++/13560
2515         * error.c (cp_error_at): Output the context as it might be
2516         different file as the other location.
2517
2518 2004-10-21  Kazu Hirata  <kazu@cs.umass.edu>
2519
2520         * typeck.c: Fix a comment typo.
2521
2522 2004-10-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2523
2524         PR c++/13495
2525         * decl.c (make_unbound_class_template): Add PARM_LIST parameter.
2526         * cp-tree.h (make_unbound_class_template): Adjust prototype.
2527         * parser.c (cp_parser_lookup_name): Adjust call to
2528         make_unbound_class_template.
2529         (cp_parser_single_declaration): Handle member class of class
2530         template as template friend parsing correctly.
2531         * friend.c (is_friend): Call is_specialization_of_friend for
2532         template friend class.
2533         (make_friend_class): Handle member class of class template as
2534         template friend.
2535         * pt.c (is_specialization_of_friend): Likewise.
2536         (instantiate_class_template): Likewise.
2537         (tsubst): Adjust call to make_unbound_class_template.
2538
2539 2004-10-20  Nathan Sidwell  <nathan@codesourcery.com>
2540
2541         * typeck.c (composite_pointer_type): Add comment about DR 195
2542         (build_reinterpret_cast_1): Add for_reinterpret_cast_p parameter.
2543         Allow function pointer conversions that DR195 suggests.
2544         (build_reinterpret_cast, build_c_cast): Update
2545         build_reinterpret_cast_1 calls.
2546
2547 2004-10-20  Kazu Hirata  <kazu@cs.umass.edu>
2548
2549         * call.c, typeck.c: Fix comment typos.
2550
2551 2004-10-20  Nathan Sidwell  <nathan@codesourcery.com>
2552
2553         * parser.c (cp_token_position): New typedef. Define VEC thereof.
2554         (struct cp_lexer): Allow buffer and buffer_end to be NULL. Make
2555         next_token and last_token cp_token_position. Make saved_tokens a
2556         VEC(cp_token_position).
2557         (eof_token): New static variable.
2558         (CP_SAVED_TOKENS_SIZE): Rename to ...
2559         (CP_SAVED_TOKEN_STACK): ... here.
2560         (cp_lexer_new_main): Adjust main lexer creation and buffer
2561         filling.
2562         (cp_lexer_new_from_tokens): Do not copy the tokens, merely point
2563         to the parent buffer.  Do not append eof token.
2564         (cp_lexer_destroy): Only free buffer if non-NULL. Free token
2565         stack.
2566         (cp_lexer_next_token, cp_lexer_prev_token): Remove.
2567         (cp_lexer_token_position, cp_lexer_token_at): New.
2568         (cp_lexer_saving_tokens): Adjust. Make inline.
2569         (cp_lexer_advance_token, cp_lexer_token_difference): Remove.
2570         (cp_lexer_peek_token_emit_debug_info): Fold into ...
2571         (cp_lexer_peek_token): ... here.
2572         (cp_lexer_peek_nth_token): Don't peek past EOF.
2573         (cp_lexer_consume_token): Set next_token to eof_token, if reaching
2574         EOF.
2575         (cp_lexer_purge_token): Adjust eof setting.
2576         (cp_lexer_purge_tokens_after): Likewise.
2577         (cp_lexer_save_tokens): Push next_token directly.
2578         (cp_lexer_commit_tokens): Adjust.
2579         (cp_lexer_rollback_tokens): Pop next_token directly.
2580         (cp_parser_check_for_invalid_template_id): Adjust token purging.
2581         (cp_parser_translation_unit): Do not consume the EOF.
2582         (cp_parser_nested_name_specifier_opt): Adjust token purging.
2583         (cp_parser_template_id, cp_parser_template_name): Likewise.
2584
2585 2004-10-19  Mark Mitchell  <mark@codesourcery.com>
2586
2587         PR c++/14035
2588         * call.c (struct conversion): Add base_p.
2589         (convert_like): Add c_cast_p argument.
2590         (convert_like_with_conversion): Likewise.
2591         (build_conv): Clear base_p.
2592         (standard_conversion): Set it, for derived-to-base conversions.
2593         (convert_like_real): Add c_cast_p parameter.  Handle pointer
2594         conversions directly rather than relying on ocp_convert.
2595         (perform_direct_initialization_if_possible): Add c_cast_p
2596         parameter.
2597         * cp-tree.h (perform_direct_initialization_if_possible): Change
2598         prototype.
2599         (convert_member_func_to_ptr): New function.
2600         * typeck.c (check_for_casting_away_constness): Add diag_fn
2601         parameter.
2602         (build_static_cast_1): New function, split out from ...
2603         (build_static_cast): ... here.  Use build_static_cast_1.
2604         (build_reinterpret_cast_1): New function, split out from ...
2605         (build_reinterpret_cast): ... here.  Use build_reinterpret_cast_1.
2606         (build_const_cast_1): New function, split out from ...
2607         (build_const_cast): ... here.  Use build_const_cast_1.
2608         (build_c_cast): Rewrite to use build_const_cast_1,
2609         build_static_cast_1, and build_reinterpret_cast_1.
2610         (convert_member_func_to_ptr): New function.
2611
2612 2004-10-19  Paolo Bonzini  <bonzini@gnu.org>
2613
2614         PR c++/18047
2615         * parser.c (enum cp_parser_prec): Give relational expressions
2616         a higher precedence than equality expressions.
2617
2618 2004-10-15  Nathan Sidwell  <nathan@codesourcery.com>
2619
2620         * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Adjust lookup_base call.
2621         (ACCESSIBLY_UNIQUELY_DERIVED_P): Remove.
2622         (PUBLICLY_UNIQUELY_DERIVED_P): Adjust lookup_base call.
2623         (enum base_access): Reorganize.
2624         (accessible_base_p, accessible_p): Add consider_local_p parameter.
2625         * call.c (standard_conversion): Update comment about
2626         DERIVED_FROM_P.
2627         (enforce_access): Adjust accessible_p call.
2628         (build_over_call): Adjust accessible_base_p call.
2629         * class.c (convert_to_base): Adjust lookup_base call.
2630         (build_vtbl_ref_1): Likewise.
2631         (warn_about_ambiguous_bases): Likewise. Add early exit.
2632         * cvt.c (convert_to_pointer_force) Adjust lookup_base call.
2633         * search.c (accessible_base_p): Add consider_local_p parameter.
2634         (lookup_base): Pass consider_local_p to accessible_base_p call.
2635         (friend_accessible_p): Check whether scope is a class member.
2636         Remove unnecessary class template check.
2637         (accessible_p): Add consider_local_p parameter. Use it.
2638         (adjust_result_of_qualified_name_lookup): Adjust lookup_base call.
2639         * tree.c (maybe_dummy_object): Likewise.
2640         * typeck.c (comp_except_type): Use PUBLICLY_UNIQUELY_DERIVED_P.
2641         (build_class_member_access_expr): Adjust lookup_base call.
2642         * typeck2.c (binfo_or_else): Likewise.
2643         * rtti.c (build_dynamic_cast_1): Access can consider friendship
2644         and current scope.
2645
2646 2004-10-17  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2647
2648         PR c++/17743
2649         * decl2.c (grokfield): Apply attributes also to TYPE_DECLs.
2650
2651 2004-10-16  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2652
2653         PR c++/10479
2654         * parser.c (cp_parser_parenthesized_expression_list): Fold
2655         non-dependent expressions in attribute lists.
2656
2657 2004-10-15  Mark Mitchell  <mark@codesourcery.com>
2658
2659         PR c++/17042
2660         * decl.c (declare_global_var): Use the return value from pushdecl.
2661
2662         PR c++/14667
2663         * parser.c (cp_parser_simple_declaration): Do not diagnose invalid
2664         type names if we have already found a valid type.
2665         (cp_parser_member_declaration): Likewise.
2666
2667         PR c++/17916
2668         * parser.c (cp_parser_member_specification_opt): Handle
2669         CPP_PRAGMA.
2670
2671 2004-10-15  Kazu Hirata  <kazu@cs.umass.edu>
2672
2673         * dump.c, g++spec.c, repo.c: Update copyright.
2674
2675 2004-10-15  Kazu Hirata  <kazu@cs.umass.edu>
2676
2677         * decl.c: Fix a comment typo.
2678
2679 2004-10-13  Andrew Pinski  <pinskia@physics.uc.edu>
2680
2681         PR c++/16301
2682         * name-lookup.c (parse_using_directive): If we have a
2683         error_mark_node, do not set the decl namespace associations
2684         on it.
2685
2686 2004-10-14  Mark Mitchell  <mark@codesourcery.com>
2687
2688         PR c++/17976
2689         * decl.c (cp_finish_decl): Do not call expand_static_init more
2690         than once for a single variable.
2691
2692 2004-10-14  Matt Austern  <austern@apple.com>
2693
2694         * Make-lang.in (pt.o): depends on pointer-set.h
2695         * cp-tree.h (cp_walk_subtrees): Last argument is pointer_set_t* now.
2696         * pt.c (struct pair_fn_data): Use pointer_set_t, not htab_t
2697         (for_each_template_parm): Convert from htab_t to pointer_set_t.
2698         * tree.c (cp_walk_subtrees): Last argument is pointer_set_t* now.
2699
2700 2004-10-13  Andrew Pinski  <pinskia@physics.uc.edu>
2701
2702         PR c++/17661
2703         * semantics.c (finish_for_expr): Convert expression to void
2704         so that we don't create temporaries for a?b:c.
2705
2706 2004-10-13  Kazu Hirata  <kazu@cs.umass.edu>
2707
2708         * search.c: Fix a comment typo.
2709
2710 2004-10-12  Nathan Sidwell  <nathan@codesourcery.com>
2711
2712         * class.c (dfs_modify_vtables): Simplify condition. Return
2713         dfs_skip_bases as appropriate.
2714         (modify_all_vtables): Walk in pre-order.
2715         * search.c (dfs_walk_all, dfs_walk_once_r,
2716         dfs_walk_once_accessible_r): Assert post order function never
2717         returns dfs_skip_bases.
2718
2719         * search.c (struct lookup_base_data_s): New.
2720         (lookup_base_r): Replace with ...
2721         (dfs_lookup_base): ... this.
2722         (lookup_base): Use dfs_walk_all.
2723
2724 2004-10-12  Kazu Hirata  <kazu@cs.umass.edu>
2725
2726         * search.c: Fix comment typos.
2727
2728 2004-10-11  Mark Mitchell  <mark@codesourcery.com>
2729
2730         PR c++/15786
2731         * parser.c (cp_parser_declarator): Add member_p parameter.
2732         (cp_parser_condition): Adjust calls to cp_parser_declarator.
2733         (cp_parser_explicit_instantiation): Likewise.
2734         (cp_parser_init_declarator): Likewise.
2735         (cp_parser_direct_declarator): Add member_p parameter.  Do not
2736         parse tentatively when parsing the parameters to a member.
2737         (cp_parser_type_id): Adjust calls to cp_parser_declarator.
2738         (cp_parser_parameter_declaration): Likewise.
2739         (cp_parser_member_declaration): Likewise.
2740         (cp_parser_exception_declaration): Likewise.
2741
2742         PR c++/17936
2743         * cp-tree.h (CLASSTYPE_TEMPLATE_SPECIALIZATION): Add a comment.
2744         * pt.c (optimize_specialization_lookup_p): Do not optimize lookups
2745         for members of partial or explicit specializations.
2746
2747         PR c++/17929
2748         * decl2.c (finish_anon_union): Robustify.
2749
2750 2004-10-11  Nathan Sidwell  <nathan@codesourcery.com>
2751
2752         * cp-tree.h (get_dynamic_cast_base_type): Rename to ...
2753         (dcast_base_hint): ... here.
2754         * rtti.c (build_dynamic_cast_1): Use dcast_base_hint.
2755         * search.c (struct dcast_data_s): New.
2756         (dynamic_cast_base_recurse): Remove. Replace with ...
2757         (dfs_dcast_hint_pre, dfs_dcast_base_post): ... these. New.
2758         (get_dynamic_cast_base_type): Rename to ...
2759         (dcast_base_hint): ... here.  Use dfs_walk_once_accessible.
2760         (accessible_r): Remove.
2761         (dfs_accessible_post): New, broken out of accessible_r.
2762         (accessible_p): Use dfs_walk_once_accessible.
2763         (dfs_walk_once_accessible_r): New. From accessible_r.
2764         (dfs_walk_once_accessible): New. From acessible_p.
2765
2766         * cp-tree.h (SAME_BINFO_TYPE_P): New.
2767         * class.c (build_base_path): Use SAME_BINFO_TYPE_P to compare
2768         binfo types.
2769         (convert_to_base_statically, determine_primary_bases,
2770         update_vtable_entry_for_fn, dfs_modify_vtables, build_vtt_inits,
2771         dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
2772         accumulate_vtbl_inits, dfs_accumulate_vtbl_inits,
2773         build_vtbl_initializer, add_vcall_offset_vtbl_entries_1): Likewise.
2774         * init.c (expand_member_init): Likewise.
2775         * search.c (lookup_base_r, dynamic_cast_base_recurse,
2776         binfo_via_virtual, copied_binfo, binfo_for_vbase,
2777         original_binfo): Likewise.
2778         * tree.c (copy_binfo): Likewise.
2779
2780 2004-10-11  Kazu Hirata  <kazu@cs.umass.edu>
2781
2782         * semantics.c: Fix comment typos.
2783
2784 2004-10-10  Andrew Pinski  <pinskia@physics.uc.edu>
2785
2786         PR c++/17554
2787         part of c++/17657
2788         middle-end/17703
2789         * semantics.c (maybe_cleanup_point_expr): Call
2790         fold_build_cleanup_point_expr.
2791         (maybe_cleanup_point_expr_void): New function.
2792         (add_decl_expr): Call maybe_cleanup_point_expr_void.
2793         (finish_expr_stmt): Likewise.
2794         (finish_return_stmt): Likewise.
2795         (finish_for_expr): Likewise.
2796         (finish_asm_stmt): Likewise.
2797         * typeck.c (condition_conversion): Call
2798         fold_build_cleanup_point_expr.
2799
2800 2004-10-10  Andrew Pinski  <pinskia@physics.uc.edu>
2801
2802         PR c++/17907
2803         * semantics.c (add_decl_expr): If the decl has a size which
2804         has side effects then the decl expression needs a cleanup point.
2805
2806 2004-10-10  Mark Mitchell  <mark@codesourcery.com>
2807
2808         PR c++/17393
2809         * decl.c (grokdeclarator): Robustify error-recovery on invalid
2810         declarations.
2811
2812 2004-10-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2813
2814         Convert diagnostics to use quoting flag q 7/n
2815         * typeck.c (composite_pointer_type_r, composite_pointer_type,
2816         cxx_sizeof_or_alignof_type, cxx_sizeof_or_alignof_expr,
2817         string_conv_p, build_class_member_access_expr,
2818         build_class_member_access_expr, lookup_destructor,
2819         finish_class_member_access_expr, build_indirect_ref,
2820         get_member_function_from_ptrfunc, build_function_call,
2821         convert_arguments, build_binary_op, pointer_diff, build_unary_op,
2822         check_for_casting_away_constness, build_static_cast,
2823         build_reinterpret_cast, build_const_cast, build_c_cast,
2824         build_modify_expr, get_delta_difference, build_ptrmemfunc,
2825         dubious_conversion_warnings, convert_for_assignment,
2826         convert_for_initialization,
2827         maybe_warn_about_returning_address_of_local, check_return_expr):
2828         Use quoting marks.
2829
2830         * typeck2.c (error_not_base_type, readonly_error,
2831         abstract_virtuals_error, cxx_incomplete_type_diagnostic,
2832         store_init_value, digest_init, build_x_arrow,
2833         build_m_component_ref, require_complete_eh_spec_types): Likewise.
2834
2835         * tree.c (cp_build_qualified_type_real,
2836         handle_java_interface_attribute, handle_init_priority_attribute):
2837         Likewise.
2838
2839         * semantics.c (finish_asm_stmt, finish_non_static_data_member,
2840         finish_pseudo_destructor_expr,
2841         check_template_template_default_arg, begin_class_definition,
2842         finish_base_specifier, qualified_name_lookup_error,
2843         finish_id_expression, finish_typeof): Likewise.
2844
2845         * search.c (lookup_base, check_final_overrider,
2846         look_for_overrides_r): Likewise.
2847
2848         * rtti.c (get_tinfo_decl, build_dynamic_cast_1): Likewise.
2849
2850 2004-10-09  Mark Mitchell  <mark@codesourcery.com>
2851
2852         PR c++/17867
2853         * error.c (dump_expr): Correct handling of AGGR_INIT_EXPRs using a
2854         constructor.
2855
2856         PR c++/17670
2857         * init.c (build_new): Correct comments.
2858         * parser.c (cp_parser_new_expression): Use NULL_TREE for nelts in
2859         the non-array case.
2860
2861         PR c++/17821
2862         * parser.c (cp_parser_postfix_dot_deref_expression): If the
2863         pseduo-destructor-name production does not work, fall back to the
2864         ordinary production.
2865
2866         PR c++/17826
2867         * tree.c (cp_tree_equal): Handle a BASELINK.
2868
2869         PR c++/17524
2870         * cp-tree.h (check_var_type): New function.
2871         * decl.c (check_var_type): New function, split out from ...
2872         (grokdeclarator): ... here.
2873         * pt.c (tsubst_decl): Use check_var_type.
2874
2875         PR c++/17685
2876         * decl.c (grokdeclarator): Disallow declarations of operators as
2877         non-functions.
2878
2879 2004-10-08  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2880
2881         PR c++/17868
2882         * error.c (dump_expr): Add missing case for RDIV_EXPR.
2883
2884 2004-10-08  Kazu Hirata  <kazu@cs.umass.edu>
2885
2886         * pt.c, search.c: Fix comment typos.
2887
2888 2004-10-08  Nathan Sidwell  <nathan@codesourcery.com>
2889
2890         * cp-tree.h (dfs_walk, dfs_walk_real, dfs_unmark, markedp,
2891         unmarkedp): Remove.
2892         (dfs_skip_bases, dfs_walk_all, dfs_walk_once): New.
2893         * class.c (struct find_final_overrider_data): Remove most_derived,
2894         vpath_list and vpath fields.  Add path field.
2895         (dfs_find_final_ocerrider_1): Add DEPTH parameter. Adjust.
2896         (dfs_find_final_overrider): Rename to ...
2897         (dfs_find_final_overrider_pre): ... here. Adjust.
2898         (dfs_find_final_overrider_post): Adjust.
2899         (dfs_find_final_overrider_q): Fold into
2900         dfs_find_final_overrider_pre.
2901         (find_final_overrider): Adjust dfs searching.
2902         (dfs_modify_vtables): Don't mark binfo here.
2903         (modify_all_vtables): Use dfs_walk_once.
2904         (build_vtt_inits): Likwise. Use dfs_walk_all.
2905         (dfs_build_secondary_vptr_vtt_inits): Don't mark binfo here.
2906         Return dfs_skip_bases as appropriate.
2907         (dfs_fixup_binfo_vtbls): Return dfs_skip_bases as appropriate.
2908         * init.c (dfs_initialized_vtbl_ptrs): Return dfs_skip_bases as
2909         appropriate. Don't mark binfo here.
2910         (initialize_vtbl_ptrs): Use dfs_walk_once.
2911         * search.c (struct vbase_info): Remove unused struct.
2912         (access_in_type): Use dfs_walk_once.
2913         (dfs_access_in_type): Don't mark binfo here.
2914         (dfs_accessible_queue_p, dfs_accessible_p) Remove.
2915         Fold into ...
2916         (accessible_r): ... here. New. Specialize dfs_walk_once.
2917         (accessible_p): Use accessible_r.
2918         (lookup_field_queue_p): Remove. Fold into ...
2919         (lookup_field_r): ... here. Adjust.
2920         (lookup_member): Use dfs_walk_all.
2921         (dfs_walk_real, dfs_walk): Replace with ...
2922         (dfs_walk_all, dfs_walk_once): ... these.
2923         (dfs_walk_once_r, dfs_unmark_r): Workers for dfs_walk_once.
2924         (dfs_unmark, unmarkedp, markedp): Remove.
2925         (dfs_get_pure_virtuals): Don't mark binfo here.
2926         (get_pure_virtuals): Use dfs_walk_once.
2927         (dfs_debug_unmarked_p): Remove. Fold into ...
2928         (dfs_debug_mark): ... here.
2929         (note_debug_info_needed): Use dfs_walk_all.
2930
2931 2004-10-07  Andrew Pinski  <pinskia@physics.uc.edu>
2932
2933         * pt.c (tsubst_expr) <case ASM_EXPR>: Look passed the
2934         CLEANUP_POINT_EXPR to get the asm expression.
2935
2936 2004-10-07  Mark Mitchell  <mark@codesourcery.com>
2937
2938         * cp-tree.h (ICS_USER_FLAG): Remove comment about obsolete flag.
2939         (DECL_MEMBER_TEMPLATE_P): New macro.
2940         (is_member_template): Remove.
2941         (class_method_index_for_fn): New function.
2942         * pt.c (build_over_call): Use DECL_MEMBER_TEMPLATE_P.
2943         * class.c (finish_struct_methods): Remove out-of-date comment.
2944         * decl.c (copy_fn_p): Use DECL_MBMER_TEMPLATE_P.
2945         * decl2.c (check_classfn): Use DECL_MEMBER_TEMPLATE_P and
2946         class_method_index_for_fn.
2947         * pt.c (is_member_template): Remove.
2948         (is_member_template_class): Likewise.
2949         (optimize_specialization_lookup_p): New function.
2950         (retrieve_specialization): Optimize lookups for members that are
2951         not member templates.
2952         (register_specialization): Adjust accordingly.
2953         (build_template_decl): Add member_template_p parameter.  Set
2954         DECL_MEMBER_TEMPLATE_P.
2955         (process_partial_specialization): Adjust call to
2956         retrieve_specialization.
2957         (push_template_decl_real): Determine whether the template is a
2958         member template.
2959         (lookup_template_class): Use retrieve_specialization.
2960         (tsubst_decl): Adjust call to retrieve_specialization.
2961         (tsubst_exception_specification): New function.
2962         (tsubst): Use it.
2963         (tsubst_copy): Use DECL_MEMBER_TEMPLATE_P.
2964         (instantiate_template): Adjust call to retrieve_specialization.
2965         (regenerate_decl_from_template): Do not actually generate a new
2966         DECL.
2967         (instantiate_decl): Adjust call to retrieve_specialization.
2968         (class_method_index_for_fn): New method.
2969
2970 2004-10-07  Andrew Pinski  <pinskia@physics.uc.edu>
2971
2972         * parser.c (cp_parser_asm_definition): Look passed the
2973         CLEANUP_POINT_EXPR to get the asm expression.
2974
2975 2004-10-06  Andrew Pinski  <pinskia@physics.uc.edu>
2976
2977         PR c++/17368
2978         * semantics.c (finish_asm_stmt): Asm expressions need cleanup
2979         also.
2980
2981 2004-10-05  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2982
2983         Convert diagnostics to use quoting flag q 6/n
2984         * pt.c (finish_member_template_decl, check_specialization_scope,
2985         maybe_process_partial_specialization, determine_specialization,
2986         check_explicit_specialization, maybe_check_template_type,
2987         process_partial_specialization, check_default_tmpl_args,
2988         push_template_decl_real, redeclare_class_template,
2989         convert_nontype_argument, coerce_template_parms,
2990         lookup_template_class, push_tinst_level,
2991         instantiate_class_template, tsubst_arg_types,
2992         tsubst_function_type, tsubst, tsubst_qualified_id,
2993         tsubst_copy_and_build, check_instantiated_args,
2994         do_decl_instantiation, do_type_instantiation,
2995         invalid_nontype_parm_type_p, check_specialization_namespace,
2996         convert_template_argument, determine_specialization,
2997         check_template_shadow, tsubst_decl
2998         instantiate_pending_templates): Use quoting marks.
2999
3000 2004-10-05  Nathan Sidwell  <nathan@codesourcery.com>
3001
3002         PR c++/17829
3003         * parser.c (cp_parser_postfix_expression): Inhibit Koenig when
3004         unqualified lookup finds a member function.
3005
3006 2004-10-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3007
3008         Convert diagnostics to use quoting flag q 5/n
3009         * parser.c (cp_parser_name_lookup_error,
3010         cp_parser_diagnose_invalid_type_name,
3011         cp_parser_primary_expression, cp_parser_unqualified_id,
3012         cp_parser_nested_name_specifier_opt, cp_parser_labeled_statement,
3013         cp_parser_jump_statement, cp_parser_simple_declaration,
3014         cp_parser_decl_specifier_seq, cp_parser_mem_initializer_id,
3015         cp_parser_type_parameter, cp_parser_template_id,
3016         cp_parser_template_name, cp_parser_direct_declarator,
3017         cp_parser_parameter_declaration_list, cp_parser_class_head,
3018         cp_parser_base_specifier, cp_parser_lookup_name,
3019         cp_parser_late_parsing_default_args,
3020         cp_parser_optional_template_keyword
3021         cp_parser_elaborated_type_specifier, cp_parser_check_class_key,
3022         cp_parser_check_access_in_redeclaration): Use quoting marks.
3023
3024         * name-lookup.c (supplement_binding, pushdecl,
3025         check_for_out_of_scope_variable, validate_nonmember_using_decl,
3026         do_nonmember_using_decl, lookup_tag, set_decl_namespace,
3027         push_namespace, do_namespace_alias, do_using_directive,
3028         ambiguous_decl, lookup_namespace_name, add_function): Likewise.
3029
3030         * method.c (use_thunk): Likewise.
3031
3032         * lex.c (unqualified_name_lookup_error,
3033         unqualified_fn_lookup_error): Likewise.
3034
3035 2004-10-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3036
3037         Convert diagnostics to use quoting flag q 4/n
3038         * except.c (decl_is_java_type, build_throw,
3039         is_admissible_throw_operand, check_handlers_1, check_handlers):
3040         Use quoting formats.
3041         * friend.c (add_friend, make_friend_class, do_friend): Likewise.
3042         * init.c (sort_mem_initializers, emit_mem_initializers,
3043         member_init_ok_or_else, expand_member_init, is_aggr_type,
3044         build_offset_ref, build_java_class_ref): Likewise.
3045
3046 2004-10-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3047
3048         Convert diagnostics to use quoting flag q 3/n
3049         * decl.c (pop_label, duplicate_decls, redeclaration_error_message,
3050         redeclaration_error_message, lookup_label, check_goto,
3051         make_typename_type, make_unbound_class_template,
3052         fixup_anonymous_aggr, check_tag_decl, start_decl, start_decl_1,
3053         grok_reference_init, layout_var_decl, maybe_commonize_var,
3054         check_for_uninitialized_const_var, reshape_init_array,
3055         reshape_init, check_initializer, cp_finish_decl,
3056         member_function_or_else, bad_specifiers, grokfndecl, grokvardecl,
3057         check_static_variable_definition, compute_array_index_type,
3058         create_array_type_for_decl, check_special_function_return_type,
3059         grokdeclarator, check_default_argument, grokparms,
3060         grok_ctor_properties, grok_op_properties,
3061         check_elaborated_type_specifier, xref_tag, finish_enum,
3062         build_enumerator, check_function_type, start_preparsed_function,
3063         store_parm_decls): Use quoting formats.
3064         * decl2.c (grok_array_decl, delete_sanity, check_member_template,
3065         check_java_method, check_classfn, finish_static_data_member_decl,
3066         grokfield, grokbitfield, grok_function_init,
3067         build_anon_union_vars, coerce_new_type, coerce_delete_type,
3068         check_default_args): Likewise.
3069         * parser.c (cp_parser_decl_specifier_seq): Likewise.
3070
3071 2004-10-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3072
3073         Convert diagnostics to use quoting flag q 2/n
3074         * class.c (build_base_path, add_method, alter_access,
3075         handle_using_decl, check_bases,
3076         maybe_warn_about_overly_private_class, find_final_overrider,
3077         warn_hidden, finish_struct_anon, add_implicitly_declared_members,
3078         check_bitfield_decl, check_field_decls, layout_empty_base,
3079         build_base_field, check_methods, layout_virtual_bases,
3080         warn_about_ambiguous_bases, layout_class_type, finish_struct_1,
3081         resolve_address_of_overloaded_function, instantiate_type,
3082         note_name_declared_in_class): Use format flag "q" for quoting.
3083
3084 2004-10-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3085
3086         Convert diagnostics to use quoting flag q 1/n
3087         * error.c (locate_error): Ignore quoting flag q.
3088         * call.c (build_user_type_conversion_1, build_operator_new_call,
3089         build_object_call, op_error, build_conditional_expr,
3090         build_new_op, build_op_delete_call, enforce_access,
3091         convert_like_real, convert_arg_to_ellipsis, build_x_va_arg,
3092         convert_default_arg, build_over_call, build_new_method_call,
3093         joust, perform_implicit_conversion, initialize_reference): Use the
3094         quoting flag q.
3095
3096 2004-10-03  Andrew Pinski  <pinskia@physics.uc.edu>
3097
3098         PR c++/17797
3099         * typeck.c (build_reinterpret_cast): Return if the inner type
3100         is error_mark_node.
3101
3102 2004-10-01  Jan Hubicka  <jh@suse.cz>
3103
3104         * semantics.c (expand_body): Update call of tree_rest_of_compilation.
3105
3106 2004-09-30  Nathan Sidwell  <nathan@codesourcery.com>
3107
3108         * cp-tree.h (struct lang_decl): Shrink by reordering fields and
3109         turning operator_code and fixed_offset into bitfields.
3110
3111 2004-09-29  Joseph S. Myers  <jsm@polyomino.org.uk>
3112
3113         * decl.c (duplicate_decls): Merge TREE_DEPRECATED.
3114
3115 2004-09-29  Jason Merrill  <jason@redhat.com>
3116
3117         PR tree-optimization/17697
3118         * decl.c (duplicate_decls): Copy TREE_NOTHROW from newdecl to olddecl.
3119
3120 2004-09-28  Jason Merrill  <jason@redhat.com>
3121
3122         PR middle-end/17525
3123         * class.c (build_base_field): Set TYPE_MODE.
3124
3125 2004-09-28  Roger Sayle  <roger@eyesopen.com>
3126
3127         PR driver/17537
3128         * g++spec.c (lang_specific_driver): Unrecognized libraries, other
3129         than -lc and -lm, may require linking against libstc++.
3130
3131 2004-09-28  Kazu Hirata  <kazu@cs.umass.edu>
3132
3133         * tree.c: Fix a comment typo.
3134
3135 2004-09-28  Nathan Sidwell  <nathan@codesourcery.com>
3136
3137         * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): Remove.
3138         (struct secondary_vptr_vtt_init_data_s): New.
3139         (build_vtt_inits): Adjust dfs_walkers.
3140         (dfs_build_secondary_vptr_vtt_inits): Caller data is a
3141         secondary_vptr_vtt_init_data_s structure. Adjust.
3142         (dfs_ctor_vtable_bases_queue_p): Remove.
3143         (dfs_fixup_binfo_vtbls): No need to clear BINFO_MARKED. Simplify.
3144
3145         * pt.c (struct get_template_base_data_s): Remove.
3146         (get_template_base_r): Fold into get_template_base.
3147         (get_template_base): Walk base binfos directly in inheritance
3148         graph order.
3149
3150 2004-09-27  Mark Mitchell  <mark@codesourcery.com>
3151
3152         PR c++/17642
3153         * cp-tree.h (fold_if_not_in_template): New function.
3154         * call.c (build_conditional_expr): Use fold_if_not_in_template.
3155         (build_cxx_call): Likewise.
3156         * cvt.c (convert_to_complex): Likewise.
3157         (ocp_convert): Likewise.
3158         (convert): Likewise.
3159         (convert_force): Likewise.
3160         * decl.c (compute_array_index_type): Clear
3161         processing_template_decl while folding array bounds.
3162         * pt.c (convert_nontype_argument): Clear
3163         processing_template_decl while processing non-type argument
3164         initialization.
3165         * tree.c (fold_if_not_in_template): New function.
3166         * typeck.c (build_class_member_access_expr): Use
3167         fold_if_not_in_template.
3168         (build_array_ref): Likewise.
3169         (build_binary_op): Likewise.  Do not try to optimize computations
3170         when processing templates.
3171         (cp_pointer_int_sum): Use fold_if_not_in_template.
3172         (pointer_diff): Likewise.
3173         (build_unary_op): Likewise.
3174         (build_reinterpret_cast): Likewise.
3175         (get_delta_difference): Likewise.
3176         (expand_ptrmemfunc_cst): Likewise.
3177         (dubious_conversion_warnings): Likewise.
3178
3179 2004-09-27  Matt Austern  <austern@apple.com>
3180
3181         * cp/parser.c (struct cp_token): New one-bit field , implicit_extern_c
3182         (cp_lexer_get_preprocessor_token): Set implicit_extern_c for
3183         tokens that come from headers that are implicitly extern "C".
3184         (struct cp_parser): new one-bit field, implicit_extern_c.
3185         (cp_parser_new): Set parser's implicit_extern_c to false.
3186         (cp_parser_translation_unit): Pop lang context if we were in a
3187         header that was implicitly extern "C".
3188         (cp_parser_declaration_seq_opt): Push/pop lang context as
3189         required by the token's and parser's implicit_extern_c.
3190
3191 2004-09-27  Mark Mitchell  <mark@codesourcery.com>
3192
3193         PR c++/17585
3194         * cp-tree.h (shared_member_p): Declare.
3195         * search.c (shared_member_p): Give it external linkage.
3196         * semantics.c (finish_qualified_id_expr): Use it.
3197         (finish_id_expression): Likewise.
3198
3199         PR c++/17585
3200         * semantics.c (finish_id_expression): Do not add "this->" to
3201         static member functions.
3202
3203 2004-09-27  Nathan Sidwell  <nathan@codesourcery.com>
3204
3205         PR c++/17681
3206         * error.c (dump_type): Change TREE_VEC case into TREE_BINFO.
3207
3208         * class.c (struct count_depth_data): Remove.
3209         (dfs_depth_post, dfs_depth_q): Remove.
3210         (find_final_overrider): Use number of vbase classes as depth
3211         bound.
3212
3213         * cp-tree.h (types_overlap_p): Remove.
3214         * search.c (struct overlap_info): Remove.
3215         (dfs_check_overlap, dfs_no_overlap_yet, types_overlap_p): Remove.
3216
3217         * pt.c (GTB_VIA_VIRTUAL, GTB_IGNORE_TYPE): Remove.
3218         (get_template_base_recursive): Remove. Replace with ...
3219         (get_template_base_r): ... this.
3220         (struct get_template_base_data_s): New.
3221         (get_template_base): Use get_template_base_r via dfs_walk.  Always
3222         return NULL on failure.
3223         (unify): Remove error_mark_node check from get_template_base result.
3224
3225 2004-09-24  Paolo Bonzini  <bonzini@gnu.org>
3226
3227         * parser.c (cp_parser_expression_stack): Clarify why it is
3228         an array of NUM_PREC_VALUES elements.
3229         (cp_parser_binary_expression): Clarify why we do not need to
3230         handle stack overflow.
3231
3232 2004-09-24  Nathan Sidwell  <nathan@codesourcery.com>
3233
3234         PR c++/16889
3235         * search.c (lookup_field_queue_p): Correct check for hidden base.
3236
3237         * search.c (bfs_walk): Remove.
3238         (lookup_member): Use dfs_walk_real.
3239         (dfs_walk_real): Move and adjust documentation from bfs_walk.
3240
3241 2004-09-23  Zack Weinberg  <zack@codesourcery.com>
3242
3243         * decl.c (grokfndecl): If ::main is found not to return int,
3244         correct it after issuing a diagnostic.
3245         (grokdeclarator): If the incoming type was error_mark_node, do
3246         not complain about declaring something with no type.
3247         (start_function): Change check for ::main not returning int to
3248         an assertion, as grokfndecl now catches this when the user did it.
3249         * init.c (perform_member_init, sort_mem_initializers)
3250         (emit_mem_initializers): Make most diagnostics be issued on
3251         the line of current_function_decl, not whatever the current
3252         input line is.
3253         * parser.c (cp_lexer_peek_token_emit_debug_info): Surround
3254         definition and declaration with #ifdef ENABLE_CHECKING.
3255         Avoid unnecessary use of fprintf.
3256         (cp_lexer_print_token, cp_lexer_debug_stream): Adjust stub
3257         definitions to avoid warnings.
3258         (cp_lexer_new_main): Add assertion that first token is not a
3259         padding token.
3260         (cp_lexer_new_from_token_array): Fold into ...
3261         (cp_lexer_new_from_tokens): ... here.  Add assertion that
3262         first token is not a padding token.
3263         (cp_lexer_set_source_position_from_token): Move nearer to callers.
3264         Remove unused lexer argument.
3265         (cp_lexer_peek_token): Just print debugging report (if enabled)
3266         and return lexer->next_token.
3267         (cp_lexer_skip_purged_tokens): Delete.
3268         (cp_lexer_next_token_is, cp_lexer_next_token_is_not): Make
3269         inline, simplify bodies.
3270         (cp_lexer_peek_nth_token): Add debugging report a la
3271         cp_lexer_peek_token.
3272         (cp_lexer_consume_token): Correct commentary.  Advance over
3273         purged tokens here.  Set current source position here, from
3274         token to be returned.  Avoid unnecessary use of fprintf.
3275         (cp_lexer_purge_token): Advance next_token pointer over this and
3276         subsequent purged tokens.
3277         (cp_parser_error): Adjust source position to that of the
3278         peeked token.
3279         (cp_parser_push_lexer_for_tokens, cp_parser_pop_lexer): New functions.
3280         (cp_parser_string_literal): Remove some excessive cleverness.
3281         (cp_parser_enum_specifier): Call start_enum before consuming
3282         the opening brace.
3283         (cp_parser_member_declaration): Make the "extra semicolon"
3284         diagnostic consistently-worded with the other place this is
3285         diagnosed.  Explicitly set the diagnostic location to the
3286         location of the offending semicolon.
3287         (cp_parser_enclosed_template_argument_list): Use %</%> quoting
3288         in diagnostics.  Do not use cp_parser_require.  Set location
3289         of diagnostics about improper use of '>>' to location of
3290         offending token.
3291         (cp_parser_late_parsing_for_member):
3292         Use cp_parser_push_lexer_for_tokens and cp_parser_pop_lexer.
3293         (cp_parser_late_parsing_default_args): Likewise.  Manually
3294         move some logic outside the loop.
3295
3296 2004-09-23  Andrew Pinski  <pinskia@physics.uc.edu>
3297
3298         PR c++/17618
3299         * cvt.c (cp_convert_to_pointer): Return early when the type is
3300         an error_mark_node.
3301
3302 2004-09-21 Fariborz Jahanian <fjahanian@apple.com>
3303
3304         PR c++/13989
3305         PR c++/9844
3306         * decl.c (grokfndecl): Add new argument "attrlist", use it
3307         to call cplus_decl_attributes.
3308         (start_function): Remove call to cplus_decl_attributes.
3309         * cvt.c (ocp_convert): Add support to use type conversion
3310         function to vector type.
3311         * parser.c (cp_parser_conversion_type_id): Add attributes, if any,
3312         to the parsed type.
3313
3314 2004-09-23  Paolo Bonzini  <bonzini@gnu.org>
3315
3316         PR c++/17596
3317
3318         * parser.c (cp_parser_token_tree_map_node,
3319         cp_parser_pm_expression, cp_parser_additive_expression,
3320         cp_parser_multiplicative_expression, cp_parser_shift_expression,
3321         cp_parser_relational_expression, cp_parser_equality_expression,
3322         cp_parser_and_expression, cp_parser_exclusive_or_expression,
3323         cp_parser_inclusive_or_expression,
3324         cp_parser_logical_and_expression,
3325         cp_parser_logical_or_expression): Removed.
3326         (enum cp_parser_prec, struct cp_parser_token_tree_map_node,
3327         binops, binops_by_token): New.
3328         (cp_parser_assignment_expression): Use cp_parser_binary_expression.
3329         (cp_parser_new): Initialize binops_by_token.
3330         (cp_parser_binary_expression): Rewritten.
3331         (N_CP_TTYPES): New.
3332
3333 2004-09-23  Kazu Hirata  <kazu@cs.umass.edu>
3334
3335         * parser.c: Fix a comment typo.
3336
3337 2004-09-23  Nathan Sidwell  <nathan@codesourcery.com>
3338
3339         PR c++/17620
3340         * decl.c (xref_basetypes): Look through typedefs before checking
3341         for duplicate base.
3342
3343 2004-09-22  Nathan Sidwell  <nathan@codesourcery.com>
3344
3345         * cp-tree.h (unemitted_tinfo_decls): Make a VEC(tree).
3346         * decl2.c (cp_finish_file): Adjust tinfo decl emission loop.
3347         * rtti.c (unemitted_tinfo_decls): Make a VEC(tree).
3348         (init_rtti_processing): Initialize it to something realistic.
3349         (get_tinfo_decl): Adjust pushing the new decl.
3350
3351         * cp-tree.h (struct lang_type_class): Remove marked flags, add
3352         diamond_shaped and repeated_base flags.  Reorder to keep 8-bit blocks.
3353         (TYPE_MARKED_P): New.
3354         (CLASSTYPE_DIAMOND_SHAPED_P, CLASSTYPE_REPEATED_BASE_P): New.
3355         (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
3356         CLEAR_CLASSTYPE_MARKED_N): Remove.
3357         (CLASSTYPE_MARKED_*, SET_CLASSTYPE_MARKED_*,
3358         CLEAR_CLASSTYPE_MARKED_*): Remove.
3359         * decl.c (xref_basetypes): Use TYPE_MARKED_P. Determine diamond
3360         shaped and repeated base properties.
3361         * lex.c (cxx_make_type): Don't clear TYPE_ALIAS_SET.
3362         * rtti.c (dfs_class_hint_mark, dfs_class_hint_unmark,
3363         class_hint_flags): Remove.
3364         (get_pseudo_ti_init): Use CLASSTYPE_REPEATED_BASE_P and
3365         CLASSTYPE_DIAMOND_SHAPED_P.
3366
3367 2004-09-21  Ziemowit Laski  <zlaski@apple.com>
3368
3369         * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved here from
3370         cp-objcp-common.h.
3371         (objcp_tsubst_copy_and_build): Reformat function signature.
3372         * cp-objcp-common.h (objcp_tsubst_copy_and_build): Likewise.
3373         (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved to cp-lang.c.
3374
3375 2004-09-21  Zack Weinberg  <zack@codesourcery.com>
3376
3377         * parser.c (cp_lexer_peek_token, cp_lexer_consume_token):
3378         Don't handle CPP_PRAGMA tokens specially.
3379         (cp_lexer_handle_pragma): Use cp_lexer_consume_token.  Don't
3380         purge the token; do clear token->value after processing.  Add
3381         assertion at beginning that token->value is nonzero.
3382         (cp_parser_statement, cp_parser_declaration_seq_opt): Handle
3383         CPP_PRAGMA as a full statement or declaration in its own right.
3384
3385 2004-09-21  Matt Austern  <austern@apple.com>
3386
3387         PR c++/15049
3388         * decl.c (grokvardecl): Accept declarations of global variables
3389         using anonymous types.
3390
3391 2004-09-21  Roger Sayle  <roger@eyesopen.com>
3392
3393         PR c++/7503
3394         * tree.c (lvalue_p_1):  Disallow MIN_EXPR and MAX_EXPR as lvalues
3395         if either operand has side-effects.
3396         * typeck.c (rationalize_conditional_expr): Assert that neither
3397         operand of MIN_EXPR or MAX_EXPR has side-effects.
3398         (build_modify_expr):  Add support for MIN_EXPR and MAX_EXPR.
3399         Check that the "lhs" is a valid lvalue, i.e. that neither operand
3400         of a MIN_EXPR or MAX_EXPR has a side-effect.
3401
3402 2004-09-21  Nathan Sidwell  <nathan@codesourcery.com>
3403
3404         * cp-tree.h (struct lang_type_header): Remove
3405         uses_multiple_inheritance field.
3406         (TYPE_USES_MULTIPLE_INHERITANCE): Remove.
3407         (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): Remove.
3408         (TYPE_USES_VIRTUAL_BASECLASSES): Remove.
3409         (DECL_NEEDS_VTT_PARM_P): Use CLASSTYPE_VBASECLASSES.
3410         (TYPE_CONTAINS_VPTR_P): Likewise.
3411         * call.c (add_template_candidate_real): Use
3412         CLASSTYPE_VBASECLASSES.
3413         (build_special_member_call): Likewise.
3414         * class.c (finish_struct_bits): Remove
3415         TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P & TYPE_USES_VIRTUAL_BASECLASSES
3416         bookkeeping.
3417         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
3418         (create_vtable_ptr): Remove TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P
3419         bookkeeping.
3420         (build_vtt_inits): Use CLASSTYPE_VBASECLASSES.
3421         (accumulate_vtbl_inits, build_vbase_offset_vtbl_entries):
3422         Likewise.
3423         * decl.c (xref_basetypes): Remove TYPE_USES_MULTIPLE_INHERITANCE,
3424         TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
3425         bookkeeping.
3426         (cxx_maybe_build_cleanup): Use CLASSTYPE_VBASECLASSES.
3427         * decl2.c (maybe_retrofit_in_chrg): Likewise.
3428         * init.c (expand_member, push_base_cleanups): Likewise.
3429         * pt.c (instantiate_class_template): Remove
3430         TYPE_USES_MULTIPLE_INHERITANCE,
3431         TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
3432         bookkeeping.
3433         * ptree.c (cxx_print_type): Remove TYPE_USES_MULTIPLE_INHERITANCE
3434         check.
3435         * typeck2.c (process_init_constructor): Replace some sorrys with
3436         asserts.
3437
3438 2004-09-21  Andreas Tobler  <a.tobler@schweiz.ch>
3439
3440         * decl.c (reshape_init_array): Initialize max_index_cst to fix
3441         bootstrap failure.
3442
3443 2004-09-20  Mark Mitchell  <mark@codesourcery.com>
3444
3445         PR c++/17530
3446         * pt.c (tsubst): Fix parentheses to accomodate emacs.
3447         (tsubst_baselink): If we get a single function, mark it as used.
3448
3449 2004-09-20  Matt Austern <austern@apple.com>
3450             Zack Weinberg  <zack@codesourcery.com>
3451
3452         * decl.c (make_rtl_for_nonlocal_decl, start_preparsed_function):
3453         Apply lbasename to input_filename before passing to get_fileinfo.
3454         * semantics.c (begin_class_definition): Likewise.
3455         * lex.c (handle_pragma_interface): Apply get_fileinfo to the
3456         correct filename.  Rename variables to be less confusing.
3457         (handle_pragma_implementation): Likewise.  Disable "appears
3458         after file is included" diagnostic.
3459
3460         * parser.c (struct cp_token): Add in_system_header fiag.
3461         (CP_TOKEN_BLOCK_NUM_TOKENS, struct cp_token_block)
3462         (CP_TOKEN_BUFFER_SIZE, cp_token_cache_push_token)
3463         (CPP_NONE, cp_lexer_read_token): Delete.
3464         (struct cp_lexer): Remove first_token, string_tokens,
3465         main_lexer_p fields.  Clarify comments.
3466         (struct cp_token_cache): Now just a pair of pointers.
3467         (CP_LEXER_BUFFER_SIZE): New #define.
3468         (CPP_PURGED): New fake token type.
3469         (cp_lexer_new_from_token_array, cp_lexer_destroy)
3470         (cp_lexer_peek_token_emit_debug_info, cp_lexer_skip_purged_tokens)
3471         (cp_lexer_handle_pragma, cp_token_cache_new, cp_parser_string_literal):
3472         New functions.
3473         (cp_lexer_new_from_tokens): Now a simple wrapper around
3474         cp_lexer_new_from_token_array.
3475         (cp_lexer_set_source_position_from_token): Also update
3476         in_system_header.
3477         (cp_lexer_next_token, cp_lexer_prev_token, cp_lexer_advance_token):
3478         Don't wrap round.
3479         (cp_lexer_token_difference): Dont handle wrapping round.
3480         (cp_lexer_new_main): Enable pragma deferral and raw strings,
3481         read the entire translation unit through c_lex_with_flags into
3482         this lexer's buffer, then turn raw strings back off again.
3483         (cp_lexer_grow_buffer): Adjust for buffer no longer being circular.
3484         (cp_lexer_get_preprocessor_token): No need to handle not being
3485         the main lexer.  Set token->in_system_header too.
3486         (cp_lexer_peek_token): Skip purged tokens.  Feed pragma tokens
3487         to cp_lexer_handle_pragma.  No need to call cp_lexer_read_token.
3488         (cp_lexer_peek_nth_token): Likewise.
3489         (cp_lexer_purge_token): Mark the token PURGED, don't shift all
3490         the other tokens down.
3491         (cp_lexer_purge_tokens_after): Likewise.
3492         (cp_lexer_save_tokens, cp_lexer_rollback_tokens): Don't worry
3493         about there being no tokens.
3494         (cp_lexer_print_token): Revise to give useful information on
3495         all tokens.
3496         (struct cp_parser): Add field translate_strings_p.
3497         (cp_parser_new): Initialize it.
3498         (cp_parser_translation_unit): Destroy the lexer when done.
3499         (cp_parser_parameter_declaration): Restructure saving of
3500         default arguments.
3501         (cp_parser_save_member_function_body): Likewise.
3502         (cp_parser_check_for_invalid_template_id)
3503         (cp_parser_nested_name_specifier_opt, cp_parser_template_id):
3504         Adjust calls to cp_lexer_advance_token.
3505         (cp_parser_skip_to_closing_parenthesis, cp_parser_declaration):
3506         No need to fiddle c_lex_string_translate.
3507         (cp_parser_primary_expression, cp_parser_linkage_specification)
3508         (cp_parser_asm_definition, cp_parser_asm_specification_opt)
3509         (cp_parser_asm_operand_list, cp_parser_asm_clobber_list)
3510         Use cp_parser_string_literal.
3511         (cp_parser_attribute_list): Save and restore
3512         parser->translate_strings_p, not c_lex_string_translate.
3513         (cp_parser_cache_group): Delete.
3514         (cp_parser_cache_group_1): Rename cp_parser_cache_group.  Do
3515         not take a cache argument.
3516
3517 2004-09-20  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
3518
3519         PR c++/14179
3520         * decl.c (reshape_init): Extract array handling into...
3521         (reshape_init_array): New function. Use integers instead of trees
3522         for indices. Handle out-of-range designated initializers.
3523
3524 2004-09-20  Steven Bosscher  <stevenb@suse.de>
3525
3526         * lex.c (cxx_init): Don't set the ridpointer for RID_NULL
3527         to null_node.
3528
3529 2004-09-19  Mark Mitchell  <mark@codesourcery.com>
3530
3531         * decl2.c (determine_visibility): Allow class visibility
3532         directives to override targetm.cxx.export_class_data.
3533
3534 2004-09-18  Kazu Hirata  <kazu@cs.umass.edu>
3535
3536         * call.c, semantics.c: Follow spelling conventions.
3537         * class.c: Fix a comment typo.
3538
3539 2004-09-16  Geoffrey Keating  <geoffk@apple.com>
3540
3541         PR pch/13361
3542         * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
3543         (handle_pragma_implementation): Likewise.
3544
3545 2004-09-17  Jeffrey D. Oldham  <oldham@codesourcery.com>
3546             Zack Weinberg  <zack@codesourcery.com>
3547
3548         * cp-tree.def: Use tree_code_class enumeration constants
3549         instead of code letters.
3550         * call.c, class.c, cp-gimplify.c, cp-lang.c, cxx-pretty-print.c
3551         * mangle.c, pt.c, semantics.c, tree.c, typeck.c:
3552         Update for new tree-class enumeration constants.
3553
3554 2004-09-16  Mark Mitchell  <mark@codesourcery.com>
3555
3556         PR c++/16002
3557         * parser.c (cp_parser_simple_declaration): Commit to tentative
3558         parses after seeing a decl-specifier.
3559         (cp_parser_simple_declaration): Eliminate spurious message.
3560         (cp_parser_init_declarator): Adjust error message.
3561
3562         PR c++/16029
3563         * lex.c (unqualified_name_lookup_error): Mark the dummy
3564         declaration as used.
3565
3566         PR c++/17501
3567         * parser.c (cp_parser_nested_name_specifier): Do not resolve
3568         typename types if the user explicitly said "typename".
3569
3570 2004-09-16  Andrew MacLeod  <amacleod@redhat.com>
3571
3572         * error.c (dump_decl): Make sure there is lang_specific info before
3573         checking for DTOR and CTOR decls.
3574
3575 2004-09-16  Nathan Sidwell  <nathan@codesourcery.com>
3576
3577         * class.c (copy_virtuals): Remove.
3578         (build_primary_vtable): Use copy_list directly.
3579         (build_secondary_vtable): Likewise.
3580         (update_vtable_entry_for_fn): Clear BV_CALL_INDEX here.
3581         (create_vtable_ptr): Likewise.
3582
3583 2004-09-16  Kazu Hirata  <kazu@cs.umass.edu>
3584
3585         * search.c: Follow spelling conventions.
3586
3587 2004-09-16  Nathan Sidwell  <nathan@codesourcery.com>
3588
3589         * cp-tree.h (struct lang_type_class): Make pure_virtuals a
3590         VEC(tree).
3591         (CLASSTYPE_INLINE_FRIENDS, CLASSTYPE_PURE_VIRTUALS): Update
3592         comments.
3593         * call.c (build_new_method_call): Don't confirm a pure virtual is
3594         in CLASSTYPE_PURE_VIRTUALS.  Reorder checks. Make it a warning.
3595         * class.c (check_methods): CLASSTYPE_INLINE_FRIENDS is a VEC(tree).
3596         (fixup_inline_methods, finish_struct): Likewise.
3597         * decl.c (finish_method): Likewise.
3598         * search.c (dfs_get_pure_virtuals, get_pure_virtuals):
3599         CLASSTYPE_PURE_VIRTUALS is a VEC(tree).
3600         * typeck2.c (abstract_virtuals_error): Likewise. Truncate the
3601         vector to avoid repeating the list in error messages.
3602
3603 2004-09-15  Mark Mitchell  <mark@codesourcery.com>
3604
3605         * cp-objcp-common.h (LANG_HOOKS_COMDAT_GROUP): Define.
3606         * cp-tree.h (cxx_comdat_group): Declare.
3607         * decl.c (cxx_comdat_group): New function.
3608
3609 2004-09-15  Nathan Sidwell  <nathan@codesourcery.com>
3610
3611         * search.c (get_pure_virtuals): Remove unused variables.
3612
3613         * cp-tree.h (struct lang_decl_flags): Remove
3614         needs_final_overrider.
3615         (DECL_NEEDS_FINAL_OVERRIDER_P): Remove.
3616         * decl.c (duplicate_decls): Do not copy DECL_NEEDS_FINAL_OVERRIDER_P.
3617         * class.c (finish_struct_bits): Correct comment about
3618         CLASSTYPE_PURE_VIRTUALS.
3619         * search.c (get_pure_virtuals): Remove useless loop.
3620
3621 2004-09-14  Mark Mitchell  <mark@codesourcery.com>
3622
3623         PR c++/17324
3624         * mangle.c (partially_mangled_name): New variable.
3625         (partially_mangled_name_len): Likewise.
3626         (save_partially_mangled_name): New function.
3627         (restore_partially_mangled_name): Likewise.
3628         (write_encoding): Save and restore partially mangled names around
3629         calls to get_mostly_instantiated_function_type.
3630         (write_unqualified_name): Likewise.
3631
3632 2004-09-14  Nathan Sidwell  <nathan@codesourcery.com>
3633
3634         * pt.c (unify): Replace gcc_unreachable with gcc_assert.
3635
3636 2004-09-13  Mark Mitchell  <mark@codesourcery.com>
3637
3638         PR c++/16162
3639         * parser.c (cp_parser_id_expression): Correct value for
3640         is_declarator.
3641         (cp_parser_nested_name_specifier_opt): Look through typenames as
3642         necessary.
3643         (cp_parser_template_name): Honor check_dependency_p.
3644
3645         PR c++/16716
3646         * parser.c (cp_parser_parse_and_diagnose_invalid_type_name):
3647         Robustify.
3648
3649         PR c++/17327
3650         * pt.c (unify): Add ENUMERAL_TYPE case.  Replace sorry with
3651         gcc_unreacable.
3652
3653 2004-09-12  Richard Henderson  <rth@redhat.com>
3654
3655         PR c++/16254
3656         * semantics.c (maybe_cleanup_point_expr): Don't call fold.
3657         * typeck.c (condition_conversion): Likewise.
3658
3659 2004-09-11  Richard Henderson  <rth@redhat.com>
3660
3661         PR c++/17404
3662         * pt.c (cur_stmt_expr): Move from tsubst_expr.
3663         (tsubst_expr) <case STMT_EXPR>: Move ...
3664         (tsubst_copy_and_build): ... here.
3665
3666 2004-09-10  Zack Weinberg  <zack@codesourcery.com>
3667
3668         * cp-tree.h (interface_only, interface_unknown): Delete declarations;
3669         comment explaining them moved to c-common.h.
3670         * lex.c (interface_only, interface_unknown, extract_interface_info):
3671         Delete definitions.
3672         (cxx_finish): Don't reset interface_unknown.
3673         (handle_pragma_interface): Don't set interface_only and
3674         interface_unknown; just the like-named fields in finfo.
3675         (handle_pragma_implementation): Adjust comment.
3676         * decl2.c (cp_finish_file): Don't reset interface_only and
3677         interface_unknown.
3678         * method.c (synthesize_method): Don't reset interface_unknown or
3679         call extract_interface_info.
3680         * pt.c (pop_tinst_level): Don't call extract_interface_info.
3681         * decl.c (start_cleanup_fn): Don't save or restore interface_only
3682         and interface_unknown.
3683         (make_rtl_for_nonlocal_decl): Call get_fileinfo on input_filename
3684         and use the result instead of the interface_only/interface_unknown
3685         globals.
3686         (start_preparsed_function): Likewise.
3687         * lex.c (cxx_make_type): Likewise.
3688         * semantics.c (begin_class_definition): Likewise.
3689         (expand_body): Don't call extract_interface_info.
3690
3691 2004-09-10  Ziemowit Laski  <zlaski@apple.com>
3692
3693         * decl.c (objc_mark_locals_volatile): Make description of
3694         routine more descriptive; only mark VAR_DECLs at each
3695         binding level.
3696
3697 2004-09-10  Richard Henderson  <rth@redhat.com>
3698
3699         PR c++/17386
3700         * call.c (build_vfield_ref): Move...
3701         * class.c (build_vfield_ref): ... here.  Convert datum to the
3702         primary base containing the vptr.
3703         (make_new_vtable): Simplify build_primary_vtable arguments.
3704         (finish_struct_1): Do not duplicate TYPE_VFIELD.
3705         * typeck.c (build_class_member_access_expr): Don't warn for
3706         null object access to base fields.
3707
3708 2004-09-10  Ziemowit Laski  <zlaski@apple.com>
3709
3710         * decl.c (objc_get_current_scope, objc_mark_locals_volatile):
3711         New functions, to be called from ObjC++.
3712
3713 2004-09-10  Kazu Hirata  <kazu@cs.umass.edu>
3714
3715         * class.c, cp-tree.h, decl.c, decl2.c, mangle.c,
3716         name-lookup.h, parser.c, search.c, semantics.c, typeck2.c: Fix
3717         comment typos.
3718
3719 2004-09-09  Ziemowit Laski  <zlaski@apple.com>
3720
3721         * typeck.c (build_c_cast): Preserve the cast if casting
3722         to and from an Objective-C type.
3723
3724 2004-09-09  Ziemowit Laski  <zlaski@apple.com>
3725
3726         * Make-lang.in (cp/typeck.o): Depend on c-common.h.
3727         * typeck.c: Include c-common.h.
3728         (comptypes): For RECORD_TYPEs, call objc_comptypes() and
3729         return the result if nonnegative.
3730
3731 2004-09-09  Zack Weinberg  <zack@codesourcery.com>
3732
3733         * decl2.c (import_export_class)
3734         * lex.c (handle_pragma_interface):
3735         Test MULTIPLE_SYMBOL_SPACES with if, not #ifdef.
3736
3737 2004-09-08  Ziemowit Laski  <zlaski@apple.com>
3738
3739         * Make-lang.in (cp/semantics.o): Depend on c-common.h.
3740         * semantics.c: Include c-common.h.
3741         (finish_compound_stmt): Call objc_clear_super_receiver().
3742
3743 2004-09-08  Ziemowit Laski  <zlaski@apple.com>
3744
3745         * cp-tree.h (do_poplevel): New prototype.
3746         * semantics.c (do_poplevel): Make externally visible.
3747
3748 2004-09-08  Nathan Sidwell  <nathan@codesourcery.com>
3749
3750         * cp-tree.h (tree_pair_s): Define a GC'd vector.
3751         * name-lookup.h (cxx_saved_binding, cp_class_binding): Likewise.
3752         * semantics.c (deferred_access): Likewise.
3753
3754 2004-09-06  Daniel Jacobowitz  <dan@debian.org>
3755
3756         * semantics.c (expand_body): Assert that we are not nested.
3757
3758 2004-09-06  Zack Weinberg  <zack@codesourcery.com>
3759
3760         * decl.c (build_enumerator): Use add_double and int_fits_type_p
3761         instead of cp_build_binary_op, to avoid creating short-lived trees.
3762         * parser.c (cp_parse_type_specifier <RID_ENUM>): Use two-token
3763         lookahead instead of backtracking.  Move some code to avoid a
3764         conditional branch.
3765         (cp_parser_enum_specifier): Avoid duplication of effort with caller.
3766         Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
3767         (cp_parser_enumerator_list, cp_parser_enumerator_definition):
3768         Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
3769
3770 2004-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3771
3772         * decl.c (grok_declarator): Remove a redundant semicolon.
3773
3774         * parser.c (cp_parser_decl_specifier_seq, cp_parser_type_specifier):
3775         Correct comments describing function parameters.
3776
3777 2004-09-03  Matt Austern  <austern@apple.com>
3778         Compile speed improvement.
3779         * parser.c (cp_lexer_print_token): Only define if ENABLE_CHECKING set.
3780         Otherwise define a stub macro that expands to nothing.
3781         (cp_lexer_debugging_p): Only define if ENABLE_CHECKING set.  Otherwise
3782         define a stub macro that expands to 0.
3783         (cp_lexer_start_debugging): Only define if ENABLE_CHECKING set.
3784         (cp_lexer_stop_debugging): Likewise.
3785         (cp_lexer_debug_stream): Only define if ENABLE_CHECKING set.  Otherwise
3786         define a stub macro that expands to NULL.
3787         (cp_lexer_new_main): Only set debugging_p if ENABLE_CHECKING set.
3788         (cp_lexer_new_from_tokens): Likewise.
3789
3790 2004-09-03  Jan Hubicka  <jh@suse.cz>
3791
3792         * decl.c (finish_function): Clean out pointers we no longer need.
3793
3794 2004-09-03  Jan Beulich  <jbeulich@novell.com>
3795
3796         * g++spec.c (MATH_LIBRARY_PROFILE): Default to MATH_LIBRARY rather
3797         than "-lm".
3798
3799 2004-09-02  Paul Brook  <paul@codesourcery.com>
3800
3801         * decl2.c (determine_visibility): Only check data visibility
3802         for VAR_DECLS.
3803
3804 2004-08-31  Mark Mitchell  <mark@codesourcery.com>
3805
3806         * cp-tree.h (DECL_CONSTRUCTION_VTABLE_P): New macro.
3807         * class.c (build_ctor_vtbl_group): Set DECL_CONSTRUCTION_VTABLE_P.
3808         * decl2.c (determine_visibility): Honor
3809         TARGET_CXX_EXPORT_CLASS_DATA.
3810
3811         * class.c (key_method): Rename to ...
3812         (determine_key_method): ... this.
3813         (finish_struct_1): Adjust accordingly.
3814         * cp-tree.h (key_method): Declare.
3815         * decl2.c (maybe_emit_vtables): Determine the key method here if
3816         it has not already been done.
3817
3818 2004-08-31  Ziemowit Laski  <zlaski@apple.com>
3819
3820         * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-objcp-common.o.
3821         (cp/cp-lang.o): Depend on debug.h, gtype-cp.h and cp/cp-objcp-common.h.
3822         (cp/cp-decl.c): Do not depend on gtype-cp.h.
3823         (cp/cp-objcp-common.o): New target.
3824         * cp-lang.c: Include debug.h, cp-objcp-common.h and gtype-cp.h.
3825         (cxx_get_alias_set, cxx_warn_unused_global_decl, cp_expr_size,
3826         cp_tree_size, cp_var_mod_type_p, cxx_initialize_diagnostics): Move
3827         prototypes and definitions to cp-objcp-common.h and cp-objcp-common.c,
3828         respectively.
3829         (LANG_HOOKS_TREE_SIZE, LANG_HOOKS_FINISH,
3830         LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_INIT_OPTIONS,
3831         LANG_HOOKS_INITIALIZE_DIAGNOSTICS, LANG_HOOKS_HANDLE_OPTION,
3832         LANG_HOOKS_HANDLE_FILENAME, LANG_HOOKS_MISSING_ARGUMENT,
3833         LANG_HOOKS_POST_OPTIONS, LANG_HOOKS_GET_ALIAS_SET,
3834         LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_EXPAND_EXPR,
3835         LANG_HOOKS_EXPAND_DECL, LANG_HOOKS_PARSE_FILE,
3836         LANG_HOOKS_DUP_LANG_SPECIFIC_DECL, LANG_HOOKS_TRUTHVALUE_CONVERSION,
3837         LANG_HOOKS_SET_DECL_ASSEMBLER_NAME, LANG_HOOKS_MARK_ADDRESSABLE,
3838         LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
3839         LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
3840         LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_PRINT_ERROR_FUNCTION,
3841         LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL, LANG_HOOKS_WRITE_GLOBALS,
3842         LANG_HOOKS_FUNCTION_INIT, LANG_HOOKS_FUNCTION_FINAL,
3843         LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P,
3844         LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE,
3845         LANG_HOOKS_ATTRIBUTE_TABLE, LANG_HOOKS_TREE_INLINING_WALK_SUBTREES,
3846         LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN,
3847         LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS,
3848         LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P,
3849         LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P,
3850         LANG_HOOKS_TREE_INLINING_VAR_MOD_TYPE_P,
3851         LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN,
3852         LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN, LANG_HOOKS_EXPR_SIZE,
3853         LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR,
3854         LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, LANG_HOOKS_MAKE_TYPE,
3855         LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE,
3856         LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
3857         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE, LANG_HOOKS_INCOMPLETE_TYPE_ERROR,
3858         LANG_HOOKS_TYPE_PROMOTES_TO, LANG_HOOKS_REGISTER_BUILTIN_TYPE,
3859         LANG_HOOKS_GIMPLIFY_EXPR, LANG_HOOKS_FOLD_OBJ_TYPE_REF): Move
3860         hooks to cp-objcp-common.h.
3861         (finish_file): New function.
3862         * cp-objcp-common.c: New file.
3863         * cp-objcp-common.h: New file.
3864         * cp-tree.h (cp_finish_file): New prototype.
3865         * decl.c: Do not include gtype-cp.h.
3866         * decl2.c (finish_file): Rename to cp_finish_file.
3867
3868 2004-08-31  Richard Henderson  <rth@redhat.com>
3869
3870         PR c++/17221
3871         * pt.c (tsubst_expr): Move OFFSETOF_EXPR handling ...
3872         (tsubst_copy_and_build): ... here.
3873
3874 2004-08-30  Mark Mitchell  <mark@codesourcery.com>
3875
3876         * cp-tree.h (initialize_artificial_var): Declare.
3877         * decl.c (initialize_artifical_var): New function.
3878         * class.c (initialize_array): Remove.
3879         (initialize_vtable): Use initialize_artificial_var.
3880         (build_vtt): Likewise.
3881         (build_ctor_vtbl_group): Likewise.
3882
3883 2004-08-30  Richard Henderson  <rth@redhat.com>
3884
3885         * class.c (build_base_path): Use build_address directly.
3886         * typeck.c (build_unary_op): Don't lower &a.b to pointer
3887         arithmetic directly.
3888         * typeck2.c (store_init_value): Don't assume !TREE_CONSTANT
3889         means !initializer_constant_valid_p.
3890
3891 2004-08-30  Richard Henderson  <rth@redhat.com>
3892
3893         * class.c (fixed_type_or_null): Use get_base_address before
3894         assuming an ADDR_EXPR is non-null.
3895
3896 2004-08-30  Nathan Sidwell  <nathan@codesourcery.com>
3897
3898         * name-lookup.c (pop_binding, pushdecl,
3899         set_identifier_type_value_with_scope, push_overloaded_decl,
3900         arg_assoc_type): Replace abort with gcc_assert or gcc_unreachable.
3901         * parser.c (cp_parser_diagnose_invalid_type_name,
3902         cp_parser_postfix_expression, cp_parser_unary_expression,
3903         cp_parser_check_declarator_template_para): Likewise.
3904         * pt.c (push_inline_template_parms_recursive,
3905         check_explicit_specialization, convert_nontype_argument,
3906         coerce_template_template_parms, uses_template_parms,
3907         instantiate_class_template, tsubst_decl, tsubst, tsubst_copy,
3908         tsubst_expr, instantiate_template,
3909         maybe_adjust_types_for_deduction, type_unification_real,
3910         resolve_overloaded_unification, template_decl_level,
3911         type_dependent_expression_p): Likewise.
3912         * search.c (lookup_base_r): Likewise.
3913         * semantics.c (finish_stmt_expr, simplify_aggr_init_expr): Likewise.
3914         * tree.c (lvalue_p_1, count_functions, cxx_printable_name,
3915         verify_stmt_tree_r, get_type_decl, stabilize_call): Likewise.
3916         * typeck.c (common_type, get_member_function_from_ptrfunc,
3917         build_binary_op, build_unary_op, expand_ptrmemfunc_cst): Likewise.
3918         * typeck2.c (cxx_incomplete_type_diagnostic,
3919         split_nonconstant_init_1, store_init_value,
3920         process_init_constructor): Likewise.
3921
3922 2004-08-30  Nathan Sidwell  <nathan@codesourcery.com>
3923
3924         * call.c (check_dtor_name): Replace abort with gcc_assert or
3925         gcc_unreachable.
3926         (build_call, add_builtin_candidate, build_new_op,
3927         convert_like_real, build_over_call, in_charge_arg_for_name,
3928         source_type, joust): Likewise.
3929         * class.c (build_simple_base_path, get_vcall_index,
3930         finish_struct_1, instantiate_type, get_enclosing_class,
3931         add_vcall_offset_vtbl_entries_1, cp_fold_obj_type_ref): Likewise.
3932         * cp-gimplify.c (cp_genericize): Likewise.
3933         * cp-lang.c (cp_expr_size, cp_tree_size): Likewise.
3934         * cvt.c (cp_convert_to_pointer, ocp_convert): Likewise.
3935         * decl.c (poplevel, make_unbound_class_template, reshape_init,
3936         check_special_function_return_type, grokdeclarator,
3937         grok_op_properties, tag_name, xref_tag, start_preparsed_function,
3938         finish_function): Likewise.
3939         * decl2.c (grokfield, maybe_emit_vtables):Likewise.
3940         * error.c (dump_global_iord, dump_decl, dump_template_decl,
3941         language_to_string): Likewise.
3942         * except.c (choose_personality_routine): Likewise.
3943         * friend.c (do_friend): Likewise.
3944         * g++spec.c (lang_specific_driver): Likewise.
3945         * init.c (build_zero_init, expand_default_init, build_new_1,
3946         build_vec_delete_1, build_vec_init, build_dtor_call): Likewise.
3947         * lex.c (retrofit_lang_decl, cp_type_qual_from_rid): Likewise.
3948         * mangle.c (add_substitution, write_unscoped_name,
3949         write_template_prefix, write_identifier,
3950         write_special_name_destructor, write_type, write_builtin_type,
3951         write_expression, write_template_param,
3952         write_java_integer_type_codes): Likewise.
3953         * method.c (implicitly_declare_fn): Likewise.
3954
3955 2004-08-30  Nathan Sidwell  <nathan@codesourcery.com>
3956
3957         * cp-tree.h (BINFO_PRIMARY_P): Use a binfo flag.
3958         (BINFO_INDIRECT_PRIMARY_P): Remove.
3959         * class.c (determine_primary_base): Rename to ...
3960         (determine_primary_bases): ... here.  Set all primary bases.
3961         (set_primary_base): Remove.
3962         (mark_primary_bases): Remove.
3963         (build_simple_base_path, walk_subobject_offsets,
3964         propagate_binfo_offsets, end_of_class): Adjust.
3965         (layout_class_type): Rename determine_primary_base call.
3966         (dump_class_hierarchy_r, dump_vtable): Adjust. Don't pass a binfo
3967         to type_as_string.
3968         (dfs_build_secondary_vptr_vtt_inits, dfs_accumulate_vtbl_inits,
3969         build_rtti_vtbl_entries): Adjust.
3970         * init.c (build_vtbl_address): Adjust.
3971
3972         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Use gcc_assert.
3973
3974 2004-08-28  Ziemowit Laski  <zlaski@apple.com>
3975
3976         * Make-lang.in (CXX_OBJS): Split up into CXX_OBJS and
3977         CXX_AND_OBJCXX_OBJS.
3978         (CXX_C_OBJS): Include in CXX_AND_OBJCXX_OBJS instead of listing
3979         separately on the link line.
3980
3981 2004-08-28  Jason Merrill  <jason@redhat.com>
3982
3983         * decl.c (expand_static_init): Avoid bogus warnings.
3984
3985 2004-08-27  Jason Merrill  <jason@redhat.com>
3986
3987         PR c++/16851
3988         * tree.c (stabilize_init): See through a COMPOUND_EXPR.
3989
3990         PR c++/13684
3991         * decl.c (expand_static_init): Use thread-safety API.
3992         (register_dtor_fn): Return the call, don't expand it.
3993         * tree.c (add_stmt_to_compound): New fn.
3994         (stabilize_call): Use it.
3995
3996 2004-08-27  Richard Henderson  <rth@redhat.com>
3997
3998         * cp-tree.def (OFFSETOF_EXPR): New.
3999         * parser.c (cp_parser_builtin_offsetof): Either built an
4000         OFFSETOF_EXPR, or call fold_offsetof immediately.
4001         * pt.c (tsubst_expr): Handle OFFSETOF_EXPR.
4002
4003 2004-08-27  Nathan Sidwell  <nathan@codesourcery.com>
4004
4005         * call.c (validate_conversion_obstack): Replace
4006         my_friendly_assert with gcc_assert or gcc_unreachable.
4007         (direct_reference_binding, merge_conversion_sequences,
4008         build_user_type_conversion_1, perform_overload_resolution,
4009         build_op_delete_call, enforce_access, call_builtin_trap,
4010         build_over_call, build_special_member_call, build_new_method_call,
4011         initialize_reference): Likewise.
4012         * class.c (build_base_path, build_primary_vtable, alter_access,
4013         check_bases, update_vtable_entry_for_fn, layout_empty_base,
4014         clone_function_decl, adjust_clone_args,
4015         type_requires_array_cookie, include_empty_classes,
4016         finish_struct_1, resolve_address_of_overloaded_function,
4017         instantiate_type, get_vtbl_decl_for_binfo, build_vtt_inits,
4018         dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
4019         accumulate_vtbl_inits, build_vtbl_initializer,
4020         build_vbase_offset_vtbl_entries, build_rtti_vtbl_entries): Likewise.
4021         * cvt.c (build_up_reference, convert_to_reference): Likewise.
4022         * decl.c (poplevel, duplicate_decls, make_typename_type,
4023         cxx_init_decl_processing, reshape_init, check_initializer,
4024         make_rtl_for_nonlocal_decl, initialize_local_var, cp_finish_decl,
4025         expand_static_init, grokfndecl, grokvardecl, build_ptrmem_type,
4026         grokdeclarator, copy_fn_p, grok_op_properties, xref_tag,
4027         xref_basetypes, start_preparsed_function, save_function_data,
4028         finish_function, finish_method, maybe_register_incomplete_var,
4029         complete_vars): Likewise.
4030         * decl2.c (grok_array_decl, check_member_template,
4031         check_classfn, finish_static_data_member_decl, coerce_new_type,
4032         coerce_delete_type, import_export_class, decl_needed_p,
4033         determine_visibility, import_export_decl, build_cleanup,
4034         start_static_initialization_or_destructi, do_static_destruction,
4035         prune_vars_needing_no_initialization,
4036         build_offset_ref_call_from_tree): Likewise.
4037         * error.c (dump_decl, dump_expr): Likewise.
4038         * init.c (finish_init_stmts, build_zero_init,
4039         expand_virtual_init, expand_default_init, expand_aggr_init_1,
4040         build_offset_ref, build_new_1, build_delete, build_vbase_delete):
4041         Likewise.
4042         * mangle.c (write_method_parms, write_template_args,
4043         write_expression, write_template_arg): Likewise.
4044         * method.c (make_thunk, finish_thunk, use_thunk): Likewise.
4045         * name-lookup.c (pop_binding, begin_scope, leave_scope,
4046         resume_scope, push_using_decl, validate_nonmember_using_decl,
4047         is_ancestor, poplevel_class, set_inherited_value_binding_p,
4048         push_class_level_binding, do_class_using_decl, push_namespace,
4049         pop_namespace, add_using_namespace, ambiguous_decl,
4050         lookup_namespace_name, lookup_type_current_level,
4051         maybe_process_template_type_declaration): Likewise.
4052         * parser.c (cp_lexer_peek_nth_token,
4053         cp_parser_parse_and_diagnose_invalid_typ,
4054         cp_parser_translation_unit, cp_parser_template_id,
4055         cp_parser_lookup_name, cp_parser_late_parsing_for_member): Likewise.
4056         * pt.c (push_access_scope, finish_member_template_decl,
4057         push_inline_template_parms_recursive, add_outermost_template_args,
4058         get_innermost_template_args, begin_explicit_instantiation,
4059         end_explicit_instantiation, retrieve_specialization,
4060         is_specialization_of, is_specialization_of_friend,
4061         register_specialization, check_explicit_specialization,
4062         comp_template_parms, process_template_parm,
4063         process_partial_specialization, convert_nontype_argument,
4064         coerce_template_template_parms, coerce_template_parms,
4065         mangle_class_name_for_template, lookup_template_function,
4066         lookup_template_class, instantiate_class_template, tsubst_decl,
4067         tsubst_function_type, tsubst, tsubst_qualified_id, tsubst_copy,
4068         instantiate_template, fn_type_unification, type_unification_real,
4069         get_template_base, regenerate_decl_from_template,
4070         template_for_substitution, instantiate_decl,
4071         get_mostly_instantiated_function_type, dependent_scope_ref_p,
4072         value_dependent_expression_p, resolve_typename_type): Likewise.
4073         * repo.c (repo_emit_p): Likewise.
4074         * rtti.c (build_headof, get_tinfo_decl, get_pseudo_ti_init,
4075         create_tinfo_types, emit_tinfo_decl): Likewise.
4076         * search.c (lookup_base_r, lookup_base, lookup_field_1,
4077         dfs_access_in_type, build_baselink, lookup_member,
4078         adjust_result_of_qualified_name_lookup, copied_binfo): Likewise.
4079         * semantics.c (perform_or_defer_access_check,
4080         finish_non_static_data_member, finish_stmt_expr_expr,
4081         finish_stmt_expr, finish_call_expr, finish_pseudo_destructor_expr,
4082         finish_template_template_parm, finish_member_declaration,
4083         emit_associated_thunks): Likewise.
4084         * tree.c (build_target_expr_with_type, force_target_expr,
4085         copy_binfo, get_first_fn, cp_tree_equal): Likewise.
4086         * typeck.c (type_after_usual_arithmetic_conversions, comptypes,
4087         cxx_sizeof_or_alignof_type, perform_integral_promotions,
4088         build_class_member_access_expr, finish_class_member_access_expr,
4089         build_ptrmemfunc_access_expr, build_unary_op,
4090         unary_complex_lvalue, cxx_mark_addressable, build_modify_expr,
4091         build_ptrmemfunc, expand_ptrmemfunc_cst, check_return_expr
4092         * typeck2.c (complete_type_check_abstract,
4093         abstract_virtuals_error, process_init_constructor,
4094         add_exception_specifier): Likewise.
4095
4096 2004-08-27  Nathan Sidwell  <nathan@codesourcery.com>
4097
4098         * class.c (build_vtbl_initializer): Use ssize_int.
4099         * decl.c (complete_array_type): Likewise.
4100         * method.c (finish_thunk): Likewise.
4101         * search.c (get_dynamic_base_type): Likewise.
4102
4103 2004-08-26  Richard Henderson  <rth@redhat.com>
4104
4105         * cp-tree.h (DECL_FIELD_IS_BASE): New.
4106         * class.c (build_base_field): Set it.
4107         (build_simple_base_path): Use it.
4108         (fixed_type_or_null): Don't consider base fields definitive.
4109
4110 2004-08-25  Roger Sayle  <roger@eyesopen.com>
4111
4112         PR middle-end/16693
4113         PR tree-optimization/16372
4114         * decl.c (finish_enum): Make the precision of the enumerated type
4115         the same width as the underlying integer type.
4116
4117 2004-08-25  Mark Mitchell  <mark@codesourcery.com>
4118
4119         PR c++/17155
4120         * lex.c (build_lang_decl): Set DECL_NO_STATIC_CHAIN for all C++
4121         functions.
4122
4123         * mangle.c (get_identifier_nocopy): Add cast.
4124
4125         * cp-tree.h (mangle_type): Remove.
4126         * mangle.c (globals): GTY it.
4127         (mangle_obstack): New variable.
4128         (name_obstack): Likewise.
4129         (name_base): Likewise.
4130         (write_char): Adjust accordingly.
4131         (write_chars): Likewise.
4132         (write_string): Likewise.
4133         (start_mangling): Initialize G.substitutions only one.  Add
4134         ident_p parameter.
4135         (finish_mangling): Use VARRAY_CLEAR to reclaim
4136         storage in G.substitutions.  Use obstack_finish.
4137         (init_mangle): Adjust for changes to variable names above.
4138         Initialize G.substitutions.
4139         (mangle_decl_string): Adjust call to start_mangling.
4140         (get_identifier_nocopy): New function.
4141         (mangle_decl): Use it.
4142         (mangle_type_string): Adjust call to start_mangling.
4143         (mangle_special_for_type): Likewise.
4144         (mangle_vtt_for_type): Likewise.
4145         (mangle_ctor_vtbl_for_type): Likewise.
4146         (mangle_thunk): Likewise.
4147         (mangle_guard_variable): Likewise.
4148         (mangle_ref_init_variable): Likewise.
4149
4150 2004-08-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4151
4152         PR c++/14428
4153         * pt.c (redeclare_class_template): Check the type of non-type and
4154         template template parameter.
4155
4156 2004-08-25  Nathan Sidwell  <nathan@codesourcery.com>
4157
4158         * call.c (convert_class_to_reference): Adjust build_int_cst calls.
4159         (build_user_type_conversion_1, convert_like_real,
4160         build_java_interface_fn_ref, build_special_member_call): Likewise.
4161         * class.c (finish_struct_1, build_vtbl_initializer): Likewise.
4162         * cp-gimplify.c (cp_gimplify_expr): Likewise.
4163         * cvt.c (cp_convert_to_pointer): Likewise.
4164         * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
4165         * decl2.c (start_static_initialization_or_destruction,
4166         generate_ctor_or_dtor_function): Likewise.
4167         * except.c (build_throw): Likewise.
4168         * mangle.c (write_integer_cst): Likewise.
4169         * method.c (finish_thunk): Likewise.
4170         * rtti.c (build_headof, get_tinfo_decl_dynamic,
4171         build_dynamic_cast_1, ptr_initializer, ptm_initializer,
4172         get_pseudo_ti_init): Likewise.
4173         * search.c (get_dynamic_cast_base_type): Likewise.
4174
4175 2004-08-25  Zack Weinberg  <zack@codesourcery.com>
4176
4177         * class.c, search.c: Remove references to DWARF_DEBUG.
4178
4179 2004-08-25  Adam Nemet  <anemet@lnxw.com>
4180
4181         * repo.c (extract_string): Reset backquote after one character.
4182         (get_base_filename): Fix indentation.
4183
4184 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>
4185
4186         * decl.c (cxx_init_decl_processing): Adjust
4187         build_common_tree_nodes call.
4188
4189 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>
4190
4191         PR c++/16889
4192         * (is_subobject_of_p): Resurrect & optimize.
4193         (lookup_field_r): Use it.
4194
4195 2004-08-24  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4196
4197         PR c++/16706
4198         * search.c (friend_accessible_p): Increment processing_template_decl
4199         when deal with TEMPLATE_DECL of SCOPE.
4200
4201 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>
4202
4203         PR c++/17149
4204         * semantics.c (check_accessibility_of_qualified_id): Defer check
4205         if qualifying_type is a template parameter.
4206
4207 2004-08-23  Mark Mitchell  <mark@codesourcery.com>
4208
4209         PR c++/17163
4210         * pt.c (instantiate_decl): Do not try to apply
4211         DECL_DECLARED_INLINED_P to a VAR_DECL.
4212
4213         * search.c (build_baselink): Fix typo in comment.
4214
4215 2004-08-22 Andrew Pinski  <apinski@apple.com>
4216
4217         Revert:
4218         2004-08-22  Andrew Pinski  <apinski@apple.com>
4219         PR c++/14029
4220         * typeck.c (build_unary_op): Use &a.b if the folded lowered
4221         expression is not constant.
4222
4223 2004-08-23  Nathan Sidwell  <nathan@codesourcery.com>
4224
4225         * name-lookup.c (pushdecl): Rename build_type_copy call.
4226         * tree.c (cp_build_qualified_type_real,
4227         build_exception_variant, handle_java_interface_attribute): Likewise.
4228
4229 2004-08-22  Andrew Pinski  <apinski@apple.com>
4230
4231         PR c++/14029
4232         * typeck.c (build_unary_op): Use &a.b if the folded lowered
4233         expression is not constant.
4234
4235 2004-08-20  Mark Mitchell  <mark@codesourcery.com>
4236
4237         PR c++/17121
4238         * decl.c (expand_static_init): Use DECL_FUNCTION_SCOPE_P.
4239
4240 2004-08-21  Joseph S. Myers  <jsm@polyomino.org.uk>
4241
4242         PR c++/17120
4243         * pt.c (tsubst_copy_and_build): Avoid clearing TREE_NO_WARNING for
4244         MODOP_EXPR.
4245
4246 2004-08-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4247
4248         * pt.c (register_specialization): Check DECL_TEMPLATE_SPECIALIZATION
4249         before calling comp_template_args.
4250
4251 2004-08-20  Nathan Sidwell  <nathan@codesourcery.com>
4252
4253         * class.c (build_vtbl_initializer): Use build_int_cst for
4254         negative size types.
4255         * decl.c (complete_array_type): Likewise.
4256         * method.c (finish_thunk): Likewise.
4257
4258 2004-08-20  Andreas Tobler  <a.tobler@schweiz.ch>
4259
4260         * tree.c: Remove unused mark_local_for_remap_r.
4261
4262 2004-08-19  Eric Christopher  <echristo@redhat.com>
4263
4264         * cp-tree.h (cxx_unsave_expr_now): Delete prototype.
4265         * tree.c (cxx_unsave_expr_now): Delete.
4266         (cp_unsave_r): Ditto.
4267
4268 2004-08-19  Mark Mitchell  <mark@codesourcery.com>
4269
4270         PR c++/15890
4271         * pt.c (push_template_decl_real): Disallow template allocation
4272         functions with fewer than two parameters.
4273
4274 2004-08-19  Nathan Sidwell  <nathan@codesourcery.com>
4275
4276         * cp-tree.h (build_shared_int_cst): Remove.
4277         * tree.c (shared_int_cache): Remove.
4278         (build_shared_int_cst): Remove.
4279         * class.c (finish_struct_1): Use build_int_cst.
4280
4281 2004-08-19  Nathan Sidwell  <nathan@codesourcery.com>
4282
4283         * decl.c (finish_enum): Do not copy value node early, copy
4284         later.
4285         * lex.c (cxx_init): Force null_node to be unique.
4286
4287 2004-08-19  Joseph S. Myers  <jsm@polyomino.org.uk>
4288
4289         PR c++/17041
4290         * pt.c (tsubst_copy, tsubst_copy_and_build): Copy TREE_NO_WARNING
4291         from input for MODOP_EXPR.
4292
4293 2004-08-18  Mark Mitchell  <mark@codesourcery.com>
4294
4295         * pt.c (dependent_template_p): Fix typo in commment.
4296
4297         PR c++/17068
4298         * pt.c (dependent_template_p): Treat IDENTIFIER_NODEs as
4299         dependent.
4300
4301 2004-08-17  Mark Mitchell  <mark@codesourcery.com>
4302
4303         PR c++/16246
4304         * pt.c (unify): Tidy ARRAY_TYPE handling.  Make sure that non-type
4305         arguments have the same type as the corresponding parameter.
4306
4307         PR c++/16215
4308         * parser.c (cp_parser_name_lookup_error): If parser->object_scope
4309         is set use it for diagnostic purposes.
4310         (cp_parser_pseudo_destructor_name): Remove special-case error
4311         message.
4312
4313         PR c++/15871
4314         * semantics.c (expand_or_defer_fn): Honor -fkeep-inline-functions.
4315
4316         PR c++/16965
4317         * cp-tree.h (qualified_name_lookup_error): Add parameter.
4318         * name-lookup.c (do_class_using_decl): Restrict set of entities
4319         passed to cp_emit_debug_info_for_using more carefully.
4320         (lookup_qualified_name): Allow lookup_member to return sets of
4321         ambiguous entries.
4322         * parser.c (cp_parser_lookup_name): Add ambiguous_p parameter.
4323         (cp_parser_primary_expression): Handle ambiguous lookups.
4324         (cp_parser_template_name): Adjust use of cp_parser_lookup_name.
4325         (cp_parser_template_argument): Likewise.
4326         (cp_parser_elaborate_type_specifier): Likewise.
4327         (cp_parser_namespace_name): Likewise.
4328         (cp_parser_class_name): Likewise.
4329         (cp_parser_lookup_name_simple): Likewise.
4330         * pt.c (tsubst_qualified_id): Handle ambiguous results.
4331         (tsubst_expr): Likewise.
4332         * semantics.c (qualified_name_lookup_error): Add decl paramter.
4333         For ambiguous lookups, print candidates.
4334
4335 2004-08-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4336
4337         PR c++/6749
4338         * pt.c (instantiate_pending_templates): Add int parameter.  Don't
4339         return anything.
4340         * cp-tree.h (instantiate_pending_templates): Adjust prototype.
4341         * decl2.c (finish_file): Adjust call to
4342         instantiate_pending_templates.
4343
4344 2004-08-15  Roger Sayle  <roger@eyesopen.com>
4345
4346         * call.c (build_vfield_ref, build_call, build_conditional_expr,
4347         convert_arg_to_ellipsis, build_x_va_arg, build_over_call,
4348         build_java_interface_fn_ref, build_special_member_call,
4349         build_new_method_call, initialize_reference): Replace calls to
4350         build with calls to buildN.
4351         * class.c (build_base_path, convert_to_base_statically,
4352         build_vfn_ref, instantiate_type, dfs_accumulate_vtbl_inits,
4353         build_vtbl_initializer): Likewise.
4354         * cp-gimplify.c (genericize_try_block, genericize_catch_block,
4355         gimplify_if_stmt, cp_genericize_r): Likewise.
4356         * cvt.c (convert_to_void): Likewise.
4357         * decl.c (check_initializer, finish_constructor_body,
4358         finish_destructor_body): Likewise.
4359         * error.c (dump_expr): Likewise.
4360         * except.c (build_exc_ptr, expand_start_catch_block, build_throw):
4361         Likewise.
4362         * init.c (perform_member_init, expand_virtual_init,
4363         expand_cleanup_for_base, build_init, expand_default_init,
4364         build_offset_ref, decl_constant_value, build_new, build_new_1,
4365         build_vec_delete_1, build_vec_init, build_delete,
4366         push_base_cleanups, build_vec_delete): Likewise.
4367         * mangle.c (write_integer_cst): Likewise.
4368         * method.c (thunk_adjust, do_build_copy_constructor,
4369         do_build_assign_ref): Likewise.
4370         * pt.c (lookup_template_function, tsubst, tsubst_copy_and_build,
4371         unify, build_non_dependent_expr): Likewise.
4372         * rtti.c (build_headof, build_typeid, ifnonnull,
4373         build_dyanmic_cast_1, tinfo_base_init): Likewise.
4374         * semantics.c (begin_compound_stmt, finish_call_expr,
4375         finish_pseudo_destructor_expr, finish_id_expression,
4376         simplify_aggr_init_expr, finalize_nrv_r): Likewise.
4377         * tree.c (build_target_expr, build_cplus_new, array_type_nelts_top,
4378         array_type_nelts_total, stabilize_call): Likewise.
4379         * typeck.c (decay_conversion, build_class_member_access_expr,
4380         lookup_destructor, build_ptrmemfunc_access_expr, build_array_ref,
4381         get_member_function_from_ptrfunc, build_binary_op, pointer_diff,
4382         build_x_unary_op, build_unary_op, unary_complex_lvalue,
4383         build_compound_expr, build_modify_expr, expand_ptrmemfunc_cst,
4384         check_return_expr): Likewise.
4385         * typeck2.c (split_nonconstant_1, split_nonconstant_init_1,
4386         split_nonconstant_init, store_init_value, build_m_component_ref):
4387         Likewise.
4388
4389 2004-08-15  Nathan Sidwell  <nathan@codesourcery.com>
4390
4391         * call.c (convert_class_to_reference,
4392         build_user_type_conversion_1, convert_like_real,
4393         build_java_interface_fn_ref, build_special_member_call): Use
4394         build_int_cst.
4395         * class.c (build_vtbl_initializer): Likewise.
4396         * cp-gimplify.c (cp_gimplify_expr): Likewise.
4397         * cvt.c (cp_convert_to_pointer): Likewise.
4398         * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
4399         * decl2.c (start_static_initialization_or_destruction,
4400         generate_ctor_or_dtor_function): Likewise.
4401         * except.c (build_throw): Likewise.
4402         * lex.c (cxx_init): Likewise.
4403         * mangle.c (write_integer_cst): Likewise.
4404         * rtti.c (build_headof, get_tinfo_decl_dynamic,
4405         build_dynamic_cast_1, ptr_initializer, ptm_initializer,
4406         get_pseudo_ti_init): Likewise.
4407         * search.c (get_dynamic_cast_base_type): Likewise.
4408         * tree.c (build_shared_int_cst): Likewise.
4409
4410 2004-08-12  Mark Mitchell  <mark@codesourcery.com>
4411
4412         PR c++/16273
4413         * class.c (count_depth_data): New type.
4414         (dfs_depth_post): New function.
4415         (dfs_depth_q): Likewise.
4416         (find_final_overrider_data_s): Change type of vpath.
4417         Add vpath_list.
4418         (dfs_find_final_overrider_1): New function.
4419         (dfs_find_final_overrider): Use it.
4420         (dfs_find_final_overrider_q): Adjust use of vpath.
4421         (dfs_find_final_overrider_post): Likewise.
4422         (find_final_overrider): Use dfs_depth.  Allocate and deallocate
4423         vpath_list.
4424
4425 2004-08-12 Jan Beulich <jbeulich@novell.com>
4426
4427         * parser.c (cp_parser_asm_definition): Properly consume scope operator
4428         tokens preceding the clobbers. Don't check for scope operator
4429         following inputs. Simplify inputs handling to match that now used for
4430         clobbers.
4431
4432 2004-08-11  Mark Mitchell  <mark@codesourcery.com>
4433
4434         PR c++/16698
4435         * except.c (build_throw): Allocate cleanup_type and the function
4436         for __cxa_throw separately.
4437
4438         PR c++/16853
4439         * call.c (standard_conversion): Do not accept conversions between
4440         pointers to members if the class types are unrelated.
4441
4442         PR c++/16618
4443         * parser.c (cp_parser_builtin_offsetof): Cast to "const volatile
4444         char &" instead of just "char &".
4445
4446         PR c++/16870
4447         * pt.c (tsubst): Just return the unknown_type_node.
4448
4449 2004-08-11  Mark Mitchell  <mark@codesourcery.com>
4450
4451         PR c++/16964
4452         * parser.c (cp_parser_class_specifier): Robustify.
4453
4454         PR c++/16904
4455         * pt.c (tsubst_copy_and_build): Complain about invalid
4456         qualification.
4457
4458         PR c++/16929
4459         * pt.c (tsubst_default_argument): Clear out current_class_ptr and
4460         current_class_ref while tsubsting.
4461
4462 2004-08-10  Mark Mitchell  <mark@codesourcery.com>
4463
4464         PR c++/16971
4465         * parser.c (cp_parser_init_declarator): Robustify.
4466
4467 2004-08-06  Richard Sandiford  <rsandifo@redhat.com>
4468
4469         * typeck2.c (process_init_constructor): Guard the missing field warning
4470         with warn_missing_field_initializers rather than extra_warnings.
4471
4472 2004-08-06  Paolo Bonzini  <bonzini@gnu.org>
4473
4474         * class.c (instantiate_type) <ENTRY_VALUE_EXPR>: Do not handle.
4475
4476 2004-08-05  Mark Mitchell  <mark@codesourcery.com>
4477
4478         * decl.c (start_preparsed_function): Move determine_visibility
4479         call.
4480         * decl2.c (determine_visibility): Incorporate dllexport testing.
4481
4482 2004-08-05  Geoffrey Keating  <geoffk@apple.com>
4483
4484         * g++spec.c (lang_specific_driver): An -Xlinker or -Wl, option
4485         means that libstdc++ is needed.
4486
4487 2004-08-05  Nathan Sidwell  <nathan@codesourcery.com>
4488
4489         * cvt.c (cp_convert_to_pointer): Adjust force_fit_type call.
4490
4491 2004-08-04  Geoffrey Keating  <geoffk@apple.com>
4492
4493         * decl.c (make_rtl_for_nonlocal_decl): Set DECL_ASSEMBLER_NAME rather
4494         than passing it as a parameter to rest_of_decl_compilation.
4495         * decl2.c (grokfield): Use set_user_assembler_name.
4496
4497 2004-08-04  Nathan Sidwell  <nathan@codesourcery.com>
4498
4499         * decl.c (complete_array_type): Don't gratuitously copy
4500         maxindex. Its type is always set.
4501
4502 2004-08-04  Paul Brook  <paul@codesourcery.com>
4503
4504         * Make-lang.in (cp/semantics.o, cp/optimize.o): Depend on TARGET_H.
4505         * cp-tree.h (struct language_function): Rename x_dtor_label to
4506         x_cdtor_label.
4507         (dtor_label): Rename ...
4508         (cdtor_label): ... to this.
4509         * decl.c (begin_constructor_body): Remove.
4510         (check_special_function_return_type): Maybe change the return type.
4511         (grokdeclarator): Pass the class type.
4512         (start_preparsed_function): Constructors may need a return label.
4513         (finish_constructor_body, finish_destructor_body): Set the return
4514         value.
4515         (begin_function_body): Don't call begin_constructor_body.
4516         (finish_function): Don't warn for constructors or destructors.
4517         (implicitly_declare_fn): Maybe change the return type.
4518         * optimize.c: Include target.h.
4519         (maybe_clone_body): Remap the function result.
4520         * semantics.c: Include target.h.
4521         (finish_return_stmt): Maybe jump to return label for constructors.
4522
4523 2004-08-03  Mark Mitchell  <mark@codesourcery.com>
4524
4525         * class.c (build_vtable): Do not set DECL_VISIBILITY here.
4526         (check_field_decls): Or here.
4527         (check_methods): Or here.
4528         (initialize_array): Don't mess with DECL_CONTEXT.
4529         * cp-tree.h (start_decl): Adjust prototype.
4530         (determine_visibility): New function.
4531         * decl.c (duplicate_decls): Remove checks for hidden "operator
4532         new".
4533         (build_library_fn_1): Give all library functions default
4534         visibility.
4535         (start_decl): Add pop_scope_p parameter.  Tidy.
4536         (cp_finish_decl): Do not pop scopes here.  Call
4537         determine_visibility for variable definitions.
4538         (start_preparsed_function): Call determine_visibility.
4539         * decl2.c (determine_visibility): New function.
4540         * method.c (use_thunk): Fix formatting.
4541         * parser.c (cp_parser_condition): Adjust calls to start_decl.
4542         (cp_parser_init_declarator): Likewise.
4543         * pt.c (instantiate_decl): Always call pop_nested_class.
4544         * rtti.c (get_tinfo_decl): Do not set DECL_VISIBILITY.
4545         (tinfo_base_init): Likewise.
4546
4547 2004-08-02  Mark Mitchell  <mark@codesourcery.com>
4548
4549         PR c++/16707
4550         * name-lookup.c (validate_nonmember_using_decl): Robustify.
4551
4552 2004-08-01  Mark Mitchell  <mark@codesourcery.com>
4553
4554         PR c++/16224
4555         * name-lookup.c (decl_namespace): Remove.
4556         (current_decl_namespace): Use decl_namespace_context instead of
4557         decl_namespace.
4558         (push_decl_namespace): Likewise.
4559         (arg_assoc_class): Likewise.
4560         (arg_assoc_type): Likewise.
4561         * pt.c (check_specialization_namespace): New function.
4562         (maybe_process_partial_specialization): Use it.
4563         (register_specialization): Likewise.
4564
4565         PR c++/16489
4566         * cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): New macro.
4567         * call.c (null_ptr_cst_p): Handle variables with constant
4568         initializers.
4569         * pt.c (convert_nontype_argument): Use
4570         DECL_INTEGRAL_CONSTANT_VAR_P.
4571         * semantics.c (finish_id_expression): Likewise.
4572
4573         PR c++/16529
4574         * decl.c (duplicate_decls): Reject duplicate namespace
4575         declarations.
4576
4577         PR c++/16810
4578         * typeck.c (build_ptrmemfunc): Loosen assertion.
4579
4580 2004-08-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4581
4582         * call.c (z_candidate::template_decl): Rename from template.
4583         (add_template_candidate_real): Adjust member reference.
4584         (joust): Likewise.
4585
4586 2004-07-29  Mark Mitchell  <mark@codesourcery.com>
4587
4588         * cp-tree.h (IDENTIFIER_REPO_CHOSEN): Define.
4589         (lang_decl_flags): Narrow the width of "languages".  Add
4590         repo_available_p.
4591         (DECL_NEEDED_P): Remove.
4592         (FOR_EACH_CLONE): New macro.
4593         (DECL_REPO_AVAILABLE_P): Likewise.
4594         (DECL_TINFO_P): Likewise.
4595         (set_linkage_according_to_type): Declare.
4596         (import_export_vtable): Remove.
4597         (import_export_tinfo): Likewise.
4598         (mark_needed): New function.
4599         (decl_needed_p): Likewise.
4600         (note_vauge_linkage_fn): Likewise.
4601         (init_repo): Change prototype.
4602         (repo_template_used): Remove.
4603         (repo_template_instantiated): Likewise.
4604         (repo_emit_p): New function.
4605         (repo_export_class_p): Likewise.
4606         (no_linkage_check): Change prototype.
4607         * class.c (set_linkage_according_to_type): New function.
4608         (build_vtable): Use it.  Do not call import_export_vtable.  Set
4609         DECL_IGNORED_P if appropriate.
4610         * decl.c (duplicate_decls): Preserve DECL_REPO_AVAILABLE_P.
4611         (make_rtL_for_nonlocal_decls): Check for template instantiations
4612         explicitly.
4613         (grokfndecl): Adjust call to no_linkage_check.
4614         (set_linkage_for_static_data_member): New function.
4615         (grokvardecl): Use it.  Adjust call to no_linkage_check.
4616         (grokdeclarator): Use set_linkage_for_static_data_member.
4617         * decl2.c (note_vague_linkage_fn): New function.
4618         (note_vague_linkage_var): Likewise.
4619         (finish_static_data_member_decl): Use it.
4620         (import_export_vtable): Remove.
4621         (import_export_class): Use repo_export_class_p.
4622         (var_finalized_p): Simplify.
4623         (maybe_emit_vtables): Simplify.
4624         (mark_needed): New function.
4625         (decl_needed_p): Likewise.
4626         (import_export_decl): Add documentation and consistency checks.
4627         Use repo_emit_p.  Handle virtual tables and RTTI information
4628         here.
4629         (import_export_tinfo): Remove.
4630         (write_out_vars): Call import_export_decl.
4631         (cxx_callgraph_analyze_expr): Ensure that all vtables are emitted
4632         whenever one is.
4633         (finish_file): Use decl_needed_p.  Do not call import_export_decl
4634         for undefined static data members.  Do not warn about undefined
4635         inlines when using a repository.
4636         (mark_used): Use note_vague_linkage_fn.  Always defer template
4637         instantiations.
4638         * lex.c (cxx_init): Adjust call to init_repo.  Always set
4639         flag_unit_at_a-time.
4640         * method.c (synthesize_method): Remove unncessary
4641         import_export_decl call.
4642         (implicitly_declare_fn): Use set_linkage_according_to_type.
4643         * optimize.c (maybe_clone_body): Use FOR_EACH_CLONE.
4644         * pt.c (instantiate_class_template): Don't redundantly add classes
4645         to keyed_classes.  Don't call repo_template_used.
4646         (tsubst_decl): Set DECL_INTERFACE_KNOWN for instantiations of
4647         templates with internal linkage.
4648         (check_instantiated_args): Adjust call to no_linkage_check.
4649         (instantiate_template): Use FOR_EACH_CLONE.
4650         (mark_definable): New function.
4651         (mark_decl_instantiated): Use it.
4652         (do_decl_instantiation): Adjust tests for explicit instantiation
4653         after "extern template".
4654         (instantiate_class_member): Do not use repo_template_instantiated.
4655         (do_type_instantiation): Simplify.
4656         (instantiate_decl): Use mark_definable.  Check repo_emit_p.
4657         Simplify.
4658         * repo.c (repo_get_id): Remove.
4659         (original_repo): Remove.
4660         (IDENTIFIER_REPO_USED): Remove.
4661         (IDENTIFIER_REPO_CHOSEN): Remove.
4662         Remove all #if 0'd code.
4663         (repo_template_used): Remove.
4664         (repo_template_instantiated): Remove.
4665         (temporary_obstack_initialized_p): New variable.
4666         (init_repo): Register with lang_post_pch_load.  Avoid creating
4667         identifiers unnecessarily.  Don't use original_repo.  Close the
4668         file here.
4669         (reopen_repo_file_for_write): Not here.
4670         (finish_repo): Always write out a new repository file.
4671         (repo_emit_p): New function.
4672         (repo_export_class_p): Likewise.
4673         * rtti.c (get_tinfo_decl): Use set_linkage_according_to_type.
4674         (involves_incomplete_p): New function.
4675         (tinfo_base_init): Use it.
4676         (ptr_initializer): Remove non_public_ptr parameter.
4677         (ptm_initializer): Likewise.
4678         (get_pseudo_ti_init): Likewise.
4679         (unemitted_tinfo_decl_p): Remove.
4680         (emit_tinfo_decl): Use import_export_decl.
4681         * semantics.c (expand_body): Move updates of static_ctors and
4682         static_dtors to ...
4683         (expand_or_defer_fn): ... here.
4684         * tree.c (no_linkage_check): Add relaxed_p parameter.
4685
4686 2004-07-28  Eric Christopher  <echristo@redhat.com>
4687
4688         * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
4689
4690 2004-07-28  Nathan Sidwell  <nathan@codesourcery.com>
4691
4692         * cp-tree.h (struct tree_pair_s): New.
4693         (typedef tree_pair_p): New.
4694         (DEF_VEC_O(tree_pair_s)): New.
4695         (struct lang_type_class): Make vcall_indices a VEC(tree_pair_s).
4696         (CLASSTYPE_VCALL_INDICES): Update documentation.
4697         * class.c (get_vcall_index): Adjust.
4698         (add_vcall_offset): Adjust.
4699
4700 2004-07-27  Kelley Cook  <kcook@gcc.gnu.org>
4701
4702         * pt.c, typeck.c: Remove spurious carriage returns.
4703
4704 2004-07-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4705
4706         PR c++/14429
4707         * pt.c (coerce_template_template_parms) <PARM_DECL case>: Only check
4708         when the type of ARG is not dependent.
4709
4710 2004-07-26  Geoffrey Keating  <geoffk@apple.com>
4711
4712         * g++spec.c (LIBSTDCXX_PROFILE): Default to LIBSTDCXX.
4713         (lang_specific_driver): If the C++ or math library options don't
4714         start with '-l', don't count them as added libraries.
4715
4716 2004-07-26  Nathan Sidwell  <nathan@codesourcery.com>
4717
4718         * decl.c (xref_basetypes): Adjust base access vector creation.
4719         * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Adjust base
4720         access accesses.
4721         * search.c (dynamic_cast_base_recurse, dfs_access_in_type): Likewise.
4722
4723 2004-07-26  Niall Douglas  <s_fsfeurope2@nedprod.com>
4724             Brian Ryner  <bryner@brianryner.com>
4725
4726         PR c++/15000
4727         PR c++/9283
4728         * class.c (check_field_decls): Apply hidden visibility if
4729         -fvisibility-inlines-hidden and inlined unless otherwise specified
4730         (build_vtable): Set vtable visibility to class visibility.
4731         (check_field_decls): Default static member visibility to class
4732         visibility.
4733         (check_methods): Default method visibility to class visibility.
4734         * cp-tree.h: Added CLASSTYPE_VISIBILITY and
4735         CLASSTYPE_VISIBILITY_SPECIFIED macro.
4736         * decl.c (duplicate_decls): New logic for merging definition decls
4737         with declaration decls. Added ignore & warning when non default
4738         applied to global operator new or delete.
4739         * method.c, optimize.c, rtti.c: Added setting of VISIBILITY_SPECIFIED
4740         wherever VISIBILITY was changed
4741         * rtti.c (get_tinfo_decl): Set typeinfo visibility to class
4742         visibility.
4743         (tinfo_base_init): Set typeinfo name visibility to class visibility.
4744
4745 2004-07-25  Bernardo Innocenti  <bernie@develer.com>
4746
4747         * decl.c: Rename all identifiers named `class' to `cl'.
4748         * cp-tree.h: Likewise.
4749
4750 2004-07-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4751
4752         * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Use GGC_CNEW.
4753         * typeck2.c (abstract_virtuals_error): Use GGC_NEW.
4754         * name-lookup.c (binding_entry_make): Use GGC_NEW.
4755         (binding_table_construct): Use GGC_CNEWVEC.
4756         (binding_table_new): Use GGC_NEW.
4757         (cxx_binding_make): Likewise.
4758         (begin_scope): Likewise.
4759         (push_to_top_level): Use GCC_CNEW.
4760         * parser.c (cp_token_cache_new): Likewise.
4761         (cp_token_cache_push_token): Likewise.
4762         (cp_lexer_new_main): Likewise.
4763         (cp_lexer_new_from_tokens): Likewise.
4764         (cp_parser_context_new): Likewise.
4765         (cp_parser_new): Likewise.
4766         (cp_lexer_new_from_tokens): Use GGC_NEWVEC.
4767         * lex.c (cxx_make_type): Use GGC_CNEW.
4768         (retrofit_lang_decl): Use GGC_NEWVAR.
4769         (cxx_dup_lang_specific_decl): Likewise.
4770         (copy_lang_type): Likewise.
4771         * decl.c (use_label): Use GGC_NEW instead of ggc_alloc.
4772         (save_function_data): Likewise.
4773         (lookup_label): Use GGC_CNEW instead of ggc_alloc_cleared.
4774         (cxx_push_function_context): Likewise.
4775
4776 2004-07-25  Richard Henderson  <rth@redhat.com>
4777
4778         * decl.c (start_preparsed_function): Set DECL_ARTIFICIAL and
4779         DECL_IGNORED_P on RESULT_DECL.
4780         * semantics.c (finalize_nrv): Copy them too.
4781
4782 2004-07-23  Nathan Sidwell  <nathan@codesourcery.com>
4783
4784         * search.c (lookup_conversion_operator): Avoid two loops.
4785         (add_conversions): Remove.
4786         (check_hidden_convs, split_conversions,
4787         lookup_conversions_r):  New.
4788         (lookup_conversions): Use lookup_conversions_r.
4789
4790 2004-07-22  Nathan Sidwell  <nathan@codesourcery.com>
4791
4792         * pt.c (get_template_base): Check type is completable.
4793
4794 2004-07-21  Eric Christopher  <echristo@redhat.com>
4795
4796         * decl.c (poplevel): Inline unused variable checking.
4797         Change formatting.
4798
4799 2004-07-21  Paolo Bonzini  <bonzini@gnu.org>
4800
4801         * typeck.c (build_binary_op): Do not use RDIV_EXPR for
4802         integer vectors.
4803
4804 2004-07-21  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
4805
4806         PR c++/14497
4807         * pt.c (check_explicit_specialization): Remove extension to accept
4808         specializations without template headers. Fall-through to normal
4809         processing.
4810
4811 2004-07-21  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
4812
4813         PR c++/509
4814         * pt.c (determine_specialization): New parameter template_count.
4815         Disambiguate between member templates and member functions counting
4816         the template headers.
4817         (check_explicit_specialization): Update caller.
4818         (tsubst_friend_function): Likewise.
4819
4820 2004-07-20  Steven Bosscher  <stevenb@suse.de>
4821
4822         * cp-tree.def (TINST_LEVEL): Make it an 'x' node.
4823         * cp-tree.h (tinst_level_t): New tree type.
4824         (union lang_tree_node): Handle it.
4825         (TINST_LOCATION): New accessor macro.
4826         (make_tinst_level): New prototype.
4827         * cp-lang.c (cp_tree_size): Handle TINST_LEVEL.
4828         * decl.c (cp_tree_node_structure): Likewise.
4829         * error.c (print_instantiation_full_context): Use TINST_LOCATION.
4830         (print_instantiation_partial_context): Likewise.
4831         * pt.c (pop_tinst_level): Likewise.
4832          (push_tinst_level): Use make_tinst_level.
4833         * tree.c (make_tinst_level): New function.
4834         (cp_walk_subtrees): Walk TINST_DECL for a TINST_LEVEL node.
4835
4836 2004-07-20  Mark Mitchell  <mark@codesourcery.com>
4837
4838         * parser.c (cp_parser_simple_type_specifier): Fix typo.
4839
4840         PR c++/16637
4841         * parser.c (cp_parser_simple_type_specifier): Do not record usage
4842         of globally-qualified names.
4843
4844 2004-07-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4845
4846         PR c++/16175
4847         * error.c (dump_type) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Output
4848         cv qualifier.
4849
4850 2004-07-19  Mark Mitchell  <mark@codesourcery.com>
4851
4852         PR c++/16623
4853         * cp-tree.h (lang_type_class): Add lazy_assignment_op.
4854         (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
4855         * class.c (add_implicitly_declared_members): Use
4856         CLASSTYPE_LAZY_ASSIGNMENT_OP.
4857         * method.c (lazily_declare_fn): Clear
4858         CLASSTYPE_LAZY_ASSIGNMENT_OP.
4859         * search.c (lookup_fnfields_1): Check it.
4860
4861 2004-07-20  Nathan Sidwell  <nathan@codesourcery.com>
4862
4863         * cp-tree.h (vec_binfo_member): Remove.
4864         * tree.c (vec_binfo_member): Remove.
4865
4866         * cp-tree.h (struct lang_type_class): Remove vfields field.
4867         (CLASSTYPE_VFIELDS): Remove.
4868         (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
4869         * class.c (determine_primary_base): Remove CLASSTYPE_VFIELDS
4870         handling.
4871         (dfs_modify_vtables): Use TYPE_CONTAINS_VPTR_P.
4872         (finish_struct_1): Remove CLASSTYPE_VFIELDS handling.
4873         * init.c (dfs_initialize_vtbl_ptrs): Use TYPE_CONTAINS_VPTR_P.
4874
4875 2004-07-20  Nathan Sidwell  <nathan@codesourcery.com>
4876
4877         * cp-tree.h (DEF_VEC_P(tree)): Remove here.
4878         (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
4879         Moved to common.
4880         (BINFO_LANG_SLOTS): Remove.
4881         * tree.c (copy_binfo): Adjust BINFO creation and accessors.
4882         * decl.c (xref_basetypes): Adjust BINFO creation and accessors.
4883         * class.c (check_bases): Adjust BINFO accessors.
4884         (determine_primary_base, finish_struct_bits,
4885         maybe_warn_about_overly_private_class, warn_hidden,
4886         walk_subobject_offsets, propagate_binfo_offsets, end_of_class,
4887         warn_about_ambiguous_bases, get_vfield_name,
4888         dump_class_hierarchy_r, build_vtt_inits, accumulate_vtbl_inits,
4889         add_vcall_offset_vtbl_entries_r): Likewise.
4890         * dump.c (cp_dump_tree): Likewise.
4891         * init.c (sort_mem_initializers, expand_member_init, build_delete,
4892         push_base_cleanups): Likewise.
4893         * method.c (do_build_copy_constructor, do_build_assign_ref,
4894         synthesize_exception_spec): Likewise.
4895         name-lookup.c (arg_assoc_class): Likewise.
4896         * pt.c (instantiate_class_template,
4897         get_template_base_recursive): Likewise.
4898         * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Likewise.
4899         * typeck2.c (process_init_constructor): Likewise.
4900         * search.c (lookup_base_r, dynamic_cast_base_recurse,
4901         dfs_access_in_type, dfs_walk_real, look_for_overrides,
4902         types_overlap_p, copied_binfo, original_binfo): Likewise.
4903         (binfo_for_vtable): Remove
4904
4905 2004-07-20  Steven Bosscher  <stevenb@suse.de>
4906
4907         * cp-tree.h (struct lang_decl_flags): Unify the template_info and
4908         thunk_alias, and the access and virtual_offset fields.
4909         (THUNK_VIRTUAL_OFFSET, THUNK_ALIAS): Adjust.
4910         * decl.c (finish_case_label): Update c_add_case_node call.
4911
4912 2004-07-19  Mark Mitchell  <mark@codesourcery.com>
4913
4914         Revert patch for PR c++/16623.
4915
4916 2004-07-19  Kelley Cook  <kcook@gcc.gnu.org>
4917
4918         * except.c: Remove two spurious carriage returns.
4919
4920 2004-07-19  Mark Mitchell  <mark@codesourcery.com>
4921
4922         PR c++/16623
4923         * cp-tree.h (lang_type_class): Add lazy_assignment_op.
4924         (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
4925         * class.c (add_implicitly_declared_members): Use
4926         CLASSTYPE_LAZY_ASSIGNMENT_OP.
4927         * method.c (lazily_declare_fn): Clear
4928         CLASSTYPE_LAZY_ASSIGNMENT_OP.
4929         * search.c (lookup_fnfields_1): Check it.
4930
4931 2004-07-19  Nathan Sidwell  <nathan@codesourcery.com>
4932
4933         * class.c (add_method): Delay adding the slot until the end.
4934         (determine_primary_base): Adjust VEC_iterate invokation.
4935         (resort_type_method_vec, finish_struct_methods, warn_hidden,
4936         walk_subobject_offsets, end_of_class, warn_about_ambiguous_bases,
4937         build_vtbl_initializer): Likewise.
4938         * init.c (sort_mem_initializers, build_delete, push_base_cleanups,
4939         build_vbase_delete): Likewise.
4940         * method.c (do_build_copy_constructor): Likewise.
4941         * name-lookup.c (new_class_binding, print_binding_level,
4942         poplevel_class, store_class_bindings, push_to_top_level,
4943         pop_from_top_level): Likewise.
4944         * pt.c (check_explicit_specialization): Likewise.
4945         * search.c (lookup_conversion_operator, lookup_fnfields_1,
4946         get_pure_virtuals, add_conversions, dfs_check_overlap,
4947         binfo_for_vbase): Likewise.
4948
4949 2004-07-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4950
4951         PR c++/12170
4952         * pt.c (unify) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Use only
4953         innermost set of template arguments during deduction.  Simplify.
4954
4955 2004-07-19  Joseph S. Myers  <jsm@polyomino.org.uk>
4956
4957         * typeck.c (build_modify_expr, build_x_modify_expr): Set
4958         TREE_NO_WARNING on assignments with an operator other than '='.
4959
4960 2004-07-10  Steven Bosscher  <stevenb@suse.de>
4961             Joseph S. Myers  <jsm@polyomino.org.uk>
4962
4963         * cp-tree.h (C_SET_EXP_ORIGINAL_CODE): Remove.
4964         * decl2.c (grokfield): Don't check current_class_depth via
4965         unused TREE_COMPLEXITY.
4966         * semantics.c (finish_parenthesized_expr): Set TREE_NO_WARNING
4967         to avoid the missing parentheses warning.
4968         Don't set C_SET_EXP_ORIGINAL_CODE.
4969
4970 2004-07-18  Mark Mitchell  <mark@codesourcery.com>
4971
4972         * tree.c (no_linkage_helper): Remove.
4973         (no_linkage_check): Don't use walk_tree_without_duplicates.
4974
4975         * mangle.c (write_expression): Issue a sorry for zero-operand
4976         functional casts.
4977
4978 2004-07-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4979
4980         PR c++/13092
4981         * init.c (build_offset_ref): Build SCOPE_REF with non-null
4982         TREE_TYPE for non-dependent names.
4983         * typeck.c (build_x_unary_op): Handle non-dependent SCOPE_REF.
4984         * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
4985         unknown_type_node as its TREE_TYPE.
4986         * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
4987         * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
4988         (dump_expr) <SCOPE_REF case>: Likewise.
4989
4990 2004-07-17  Jason Merrill  <jason@redhat.com>
4991
4992         PR c++/16115
4993         * call.c (type_passed_as): Make the invisible reference type
4994         __restrict.
4995         * cp-gimplify.c (gimplify_cleanup_stmt): Rename to
4996         cp_genericize_r.  Handle invisible reference lowering.
4997         (is_invisiref_parm): New fn.
4998         (cp_genericize): Adjust the types of invisible reference parms.
4999         Don't repeat the walk for clones.
5000         * decl.c (store_parm_decls): Don't generate any code for clones.
5001
5002 2004-07-17  Joseph S. Myers  <jsm@polyomino.org.uk>
5003
5004         * cp-tree.h (builtin_function): Declare.
5005
5006 2004-07-16  Mark Mitchell  <mark@codesourcery.com>
5007
5008         * class.c (finish_struct_methods): Remove unncessary code.
5009         (add_implicitly_declared_members): Create declarations for default
5010         constructors and copy constructors lazily.
5011         * cp-tree.h (lang_type_class): Remove lazy_default_ctor and
5012         lazy_copy_ctor.
5013         (CLASSTYPE_LAZY_DEFAULT_CTOR): New macro.
5014         (CLASSTYPE_LAZY_COPY_CTOR): Likewise.
5015         * decl2.c (check_classfn): Robustify.
5016         (locate_dtor): Handle empty CLASSTYPE_METHOD_VEC.
5017         (locate_ctor): Handle lazy default constructors.
5018         (locate_copy): Handle lazy copy constructors.
5019         (implicitly_declare_fn): Make sure we're looking at the
5020         TYPE_MAIN_VARIANT for a class before creating functions.  Don't
5021         set TYPE_HAS_CONSTRUCTOR.
5022         (lazily_declare_fn): New function.
5023         * name-lookup.c (constructor_name_full): Simplify.
5024         * search.c (lookup_fnfields_1): Lazily create methods, as
5025         necessary.
5026         (lookup_for_overrides): Handle empty CLASSTYPE_METHOD_VEC.
5027
5028 2004-07-16  Steven Bosscher  <stevenb@suse.de>
5029
5030         * cp-tree.h (struct lang_type): Don't have three GTY options on a
5031         single bit GTY desc.
5032
5033 2004-07-16  Richard Henderson  <rth@redhat.com>
5034
5035         * cp-lang.c (LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING): Die.
5036         * cp-tree.h (cp_copy_res_decl_for_inlining): Remove.
5037         * tree.c (cp_copy_res_decl_for_inlining): Remove.
5038
5039 2004-07-16  Nathan Sidwell  <nathan@codesourcery.com>
5040
5041         * class.c (finish_struct_bits): Use for loop.
5042         (propagate_binfo_offsets): Do primary binfo outside of loop.
5043
5044         PR c++/16583
5045         * dump.c (cp_dump_tree): Don't dump the bases if there's no
5046         binfo.
5047
5048         * pt.c (tsubst) <TREE_BINFO case>: We should never get here.
5049
5050 2004-07-15  Mark Mitchell  <mark@codesourcery.com>
5051
5052         * cp-tree.h (lang_type_class): Remove has_real_assign_ref and
5053         has_abstract_assign_ref.  Make methods a VEC(tree) *.
5054         (TYPE_HAS_CONST_ASSIGN_REF): Add documentation.
5055         (CLASSTYPE_CONSTRUCTORS): Adjust for changes to CLASSTYPE_METHOD_VEC.
5056         (CLASSTYPE_DESTRUCTORS): Likewise.
5057         (TYPE_HAS_REAL_ASSIGN_REF): Remove.
5058         (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
5059         (add_method): Change prototoype.
5060         * class.c (add_method): Remove error_p parameter.  Adjust for
5061         changes to CLASSTYPE_METHOD_VEC.
5062         (handle_using_decl): Adjust call to add_method.
5063         (maybe_warn_about_overly_private_class): Adjust for
5064         changes to CLASSTYPE_METHOD_VEC.
5065         (resort_type_method_vec): Likewise.
5066         (finish_struct_methods): Likewise.
5067         (check_for_override): Likewise.
5068         (warn_hidden): Likewise.
5069         (add_implicitly_declared_members): Defer creation of assignment
5070         operators.  Adjust call to add_method.
5071         (clone_function_decl): Adjust call to add_method.
5072         (check_bases_and_members): Don't set TYPE_HAS_REAL_ASSIGN_REF.
5073         (finish_struct_1): Use CLASSTYPE_DESTRUCTORS.
5074         * decl.c (grok_special_member_properties): Don't set
5075         TYPE_HAS_ABSTRACT_ASSIGN_REF.
5076         * decl2.c (check_classfn): Adjust for
5077         changes to CLASSTYPE_METHOD_VEC.
5078         * method.c (locate_dtor): Use CLASSTYPE_DESTRUCTORS.
5079         (locate_ctor): Use CLASSTYPE_CONSTRUCTORS.
5080         (locate_copy): Adjust for changes to CLASSTYPE_METHOD_VEC.
5081         (implicitly_declare_fn): Set DECL_SOURCE_LOCATION.  Do not call
5082         cp_finish_decl.
5083         * pt.c (check_explicit_specialization): Adjust for
5084         changes to CLASSTYPE_METHOD_VEC.
5085         (instantiate_class_template): Do not set
5086         TYPE_HAS_ABSTRACT_ASSIGN_REF.
5087         * ptree.c (cxx_print_type): Don't try to print
5088         CLASSTYPE_METHOD_VEC.
5089         * rtti.c (emit_support_tinfos): Use CLASSTYPE_DESTRUCTORS.
5090         * search.c (lookup_field_r): Adjust for
5091         changes to CLASSTYPE_METHOD_VEC.
5092         (lookup_fnfields): Likewise.
5093         (lookup_conversion_operator): Likewise.
5094         (lookup_fnfields_1): Likewise.  Create assignment operators
5095         lazily.
5096         (look_for_overrides_here): Adjust for
5097         changes to CLASSTYPE_METHOD_VEC.
5098         (add_conversions): Likewise.
5099         * semantics.c (finish_member_declaration): Adjust call to add_method.
5100
5101 2004-07-15  Jason Merrill  <jason@redhat.com>
5102
5103         * cp-lang.c (cxx_types_compatible_p): To the middle-end,
5104         references and pointers are compatible.
5105
5106 2004-07-15  Nathan Sidwell  <nathan@codesourcery.com>
5107
5108         * decl.c (xref_basetypes): Refactor.
5109         * tree.c (copy_base_binfos): Replace with ...
5110         (copy_binfo): ... this. Deep copy the given binfo, (not the just
5111         bases of the given base).
5112         * cp-tree.h (copy_base_binfo): Remove.
5113         (copy_binfo): Declare.
5114
5115 2004-07-15  Mark Mitchell  <mark@codesourcery.com>
5116
5117         * name-lookup.c (set_inherited_value_binding_p): Add class_type
5118         parameter.
5119         (get_class_binding): Adjust.
5120         (push_class_level_binding): Don't use set_inherited_value_binding_p.
5121
5122 2004-07-15  Nathan Sidwell  <nathan@codesourcery.com>
5123
5124         * class.c (finish_struct_bits): Don't set TYPE_HAS_CONVERSION here.
5125         * decl.c (xref_basetypes): Set it here.
5126
5127         * class.c (check_bases): Don't set CLASSTYPE_NON_AGGREGATE here.
5128         Don't check for incomplete base.
5129         (get_vfield_name): Simplify while loop.
5130         * decl.c (xref_basetypes): Set CLASSTYPE_NON_AGGREGATE here.
5131
5132 2004-07-14  Mark Mitchell  <mark@codesourcery.com>
5133
5134         * lex.c (cxx_make_type): Remove call to get_pointer_type.
5135
5136         * cp-tree.h (IDENTIFIER_VALUE): Remove.
5137         (BINFO_PUSHDECLS_MARKED): Likewise.
5138         (maybe_inject_for_scope_var): Likewise.
5139         (push_class_decls): Likewise.
5140         * name-lookup.h (push_class_binding): Remove.
5141         (innermost_non_namespace_value): New function.
5142         (outer_binding): Likewise.
5143         * class.c (add_method): Push bindings before adding to
5144         TYPE_METHODS.
5145         (restore_class_cache): Do not restore class_shadowed.
5146         (pushclass): Do not add USING_DECLs.  Do not call
5147         push_class_decls.
5148         * config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c.
5149         * decl.c (pushdecl): Use outer_binding.
5150         (poplevel): Set the scope for an out-of-scope for-loop declaration
5151         appropriately.
5152         (cp_finish_decl): Don't call maybe_inject_for_scope_var.
5153         * name-lookup.c (new_class_binding): New function.
5154         (push_binding): Use it.
5155         (pushdecl): Use innermost_non_namespace_value.
5156         (maybe_inject_for_scope_var): Remove.
5157         (push_class_binding): Remove.
5158         (set_inherited_value_binding_p): New function.
5159         (get_class_binding): New function.
5160         (push_class_level_binding): Assert that the current_class_type is
5161         being defined.
5162         (outer_binding): New function.
5163         (innermost_non_namespace_value): Likewise.
5164         (lookup_name_real): Use outer_binding.
5165         (lookup_name_current_level): Ignore out-of-scope variables.
5166         * pt.c (check_template_shadow): Use innermost_non_namespace_value.
5167         (lookup_template_class): Likewise.
5168         * search.c (dfs_push_type_decls): Remove.
5169         (dfs_push_decls): Likewise.
5170         (setup_class_bindings): Likewise.
5171         (lookup_field_1): Handle USING_DECLs from dependent scopes.
5172         (marked_pushdecls_p): Remove.
5173         (unmarked_pushdecls_p): Remove.
5174         (marked_identifiers): Remove.
5175         (setup_class_bindings): Remove.
5176         (dfs_push_type_decls): Remove.
5177         (dfs_push_decls): Remove.
5178         (push_class_decls): Remove.
5179
5180 2004-07-13  Mark Mitchell  <mark@codesourcery.com>
5181
5182         PR c++/16518
5183         PR c++/16337
5184         * decl.c (grokvardecl): Make declspecs parameter const.
5185         (grokdeclarator): Likewise.  Adjust accordingly.
5186         * decl.h (grokdeclarator): Adjust declaration.
5187         * parser.c (cp_parser_init_declarator): Do not clear
5188         decl_specifiers->attributes.
5189
5190         * cp-tree.h (lang_identifier): Remove class_value.
5191         (IDENTIFIER_CLASS_VALUE): Remove.
5192         (pop_class_decls): Likewise.
5193         (init_search_processing): Likewise.
5194         * class.c (handle_using_decl): Use lookup_member, not
5195         IDENTIFIER_CLASS_VALUE.
5196         (restore_class_cache): New function, split out from ...
5197         (pushclass): ... here.  Do not call clear_identifier_class_values.
5198         (invalidate_class_lookup_cache): Do not clear
5199         IDENTIFIER_CLASS_VALUE.
5200         (popclass): Do not call pop_class_decls.
5201         (maybe_note_name_used_in_class): Do not save names looked up after
5202         the class is complete.  Use lookup_member, not
5203         IDENTIFIER_CLASS_VALUE.
5204         * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
5205         * decl.c (cxx_init_decl_processing): Do not call
5206         init_search_processing.
5207         * method.c (do_build_copy_constructor): Remove unnecessary code.
5208         (do_build_assign_ref): Likewise.
5209         * name-lookup.c (pushdecl): Use lookup_member, not
5210         IDENTIFIER_CLASS_VALUE.
5211         (set_identifier_type_value_with_scope): Set TREE_TYPE on the
5212         type_shadowed list.
5213         (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
5214         (push_class_binding): Do not set it.
5215         (clear_identifier_class_values): Remove.
5216         (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
5217         (store_binding): Do not save it.
5218         (pop_from_top_level): Do not restore it.
5219         * name-lookup.h (cxx_saved_binding): Remove class_value.
5220         (clear_identifier_class_values): Remove.
5221         * ptree.c (cxx_print_identifier): Do not print
5222         IDENTIFIER_CLASS_VALUE.
5223         * search.c (search_obstack): Remove.
5224         (push_stack_level): Remove.
5225         (pop_stack_level): Remove.
5226         (search_level): Remove.
5227         (search_stack): Remove.
5228         (lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
5229         (setup_class_bindings): Use IDENTIFIER_MARKED, not
5230         IDENTIFIER_CLASS_VALUE.
5231         (marked_identifiers): New variable.
5232         (push_class_decls): Clear IDENTIFIER_MARKED.
5233         (pop_class_decls): Don't call pop_search_level.
5234         (init_search_processing): Remove.
5235
5236 2004-07-12  Mark Mitchell  <mark@codesourcery.com>
5237
5238         * cp-tree.h (get_aggr_typedef): Remove.
5239         * init.c (get_aggr_typedef): Likewise.
5240
5241         * name-lookup.c (push_class_level_binding): Simplify.
5242
5243 2004-07-12  Andrew Pinski  <apinski@apple.com>
5244
5245         PR c++/16475
5246         Revert:
5247         2004-07-07  H.J. Lu  <hongjiu.lu@intel.com>
5248                 PR c++/16276
5249                 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
5250                 is not public.
5251
5252 2004-07-12  Eric Christopher  <echristo@redhat.com>
5253
5254         * parser.c (cp_parser_class_head): Remove unused variable.
5255
5256 2004-07-12  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5257
5258         * decl.c (grok_op_properties): Reject [de-]allocation functions
5259         declared in a namespace, or declared as static.
5260
5261 2004-07-12  Nathan Sidwell  <nathan@codesourcery.com>
5262
5263         * cp-tree.h (make_binfo): Remove.
5264         * decl.c (xref_basetypes): Use make_tree_binfo directly.
5265         * tree.h (copy_base_binfos): Likewise.
5266         (make_binfo): Remove.
5267
5268         * call.c (build_user_type_conversion_1, build_new_op,
5269         check_constructor_callable, build_temp,
5270         perform_direct_initialization_of_possible): Pass type directly to
5271         lookup_fnfields & build_special_member_call.
5272         (build_special_member_call): Accept a type, and complete it.
5273         * class.c (finish_stuct_bits): Copy the BINFOs here.
5274         * cvt.c (ocp_convert): Pass type directly to
5275         build_special_member_call.
5276         * decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
5277         (xref_basetypes): Allocate the binfo here. Adjust.
5278         * init.c (build_init, build_new_1): Pass type directly to
5279         build_special_member_call.
5280         * lex.c (cxx_make_type): Do not allocate binfo here.
5281         * name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
5282         * parser.c (cp_parser_class_head): Always call xref_basetypes.
5283         * pt.c (instantiate_class_template): Likewise. Inhibit access
5284         checking for template friends.
5285         * ptree.c (cxx_print_type): Adjust record printing.
5286         * search.c (lookup_base): When taking a type, complete it before
5287         looking for a binfo.
5288         (lookup_member): Delay completing a type.
5289         (push_class_decls): Don't walk an incomplete type.
5290         (lookup_conversions): Likewise.
5291         * semantics.c (finish_stmt_expr_expr): Pass type directly to
5292         build_special_member_call.
5293         * tree.c (copy_base_binfos): Adjust.
5294         (make_binfo): Likewise.
5295         * typeck.c (build_modify_expr): Pass type directly to
5296         build_special_member_call.
5297         * typeck2.c (process_init_constructor): Check a binfo exists.
5298         (build_m_component_ref): Allow accessing an incomplete type.
5299         (build_functional_cast): Pass type directly to
5300         build_special_member_call.
5301
5302 2004-07-12  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5303
5304         PR c++/2204
5305         * config-lang.in (gtfiles): Add typeck2.c.
5306         * Make-lang.in: Tweak typeck2.c dependencies, and add rule for
5307         gt-cp-typeck2.h.
5308         * cp-tree.h: Declare complete_type_check_abstract.
5309         * typeck2.c (pat_calc_hash, pat_compare,
5310         complete_type_check_abstract): New functions.
5311         (abstract_virtuals_error): If the type is abstract, register the
5312         declaration within abstract_pending_vars for further checks.
5313         Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
5314         * decl.c (cp_finish_decl): Do not strip array types.
5315         (create_array_type_for_decl): Check for abstractness of the element
5316         type.
5317         (complete_vars): Call complete_type_check_abstract.
5318         * class.c (finish_struct): Prepare a list of virtual functions for
5319         template types, and call complete_vars on it to check for abstractness.
5320
5321 2004-07-12  Paolo Bonzini  <bonzini@gnu.org>
5322
5323         PR tree-optimization/14107
5324         * decl.c (finish_function): Remove temporary band-aid.
5325
5326 2004-07-11  Mark Mitchell  <mark@codesourcery.com>
5327
5328         * call.c (build_operator_new_call): Avoid using push_to_top_level.
5329         (build_new_op): Adjust call to lookup_function_nonclass.
5330         * name-lookup.c (identifier_type_value): Adjust call to
5331         lookup_name_real.
5332         (lookup_name_real): Add block_p parameter.
5333         (lookup_name_nonclass): Adjust call to lookup_name_real.
5334         (lookup_function_nonclass): Likewise.
5335         (lookup_name): Likewise.
5336         * name-lookup.h (lookup_name_real): Change prototype.
5337         (lookup_name_nonclass): Likewise.
5338         * parser.c (cp_parser_lookup_name): Likewise.
5339
5340         * cp-tree.h (saved_scope): Make old_bindings a vector.
5341         (unuse_fields): Remove.
5342         * name-lookup.h (cxx_saved_binding): Define it.
5343         * class.c (pushclass): Don't use unuse_fields.
5344         * name-lookup.c (cxx_saved_binding_make): Remove.
5345         (store_binding): Add new bindings to a vector, using an
5346         accumulator style, rather than adding them to a list.
5347         (store_bindings): Adjust accordingly.
5348         (store_class_bindings): Likewise.
5349         (push_to_top_level): Likewise.
5350         (pop_from_top_level): Likewise.
5351         * optimize.c (maybe_clone_body): Must push_to_top_level and
5352         pop_from_top_level calls outside of loop.
5353         * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope
5354         calls here from cp_parser_late_parsing_default_args.
5355         (cp_parser_save_default_args): Record the class type in which the
5356         function is declared.
5357         (cp_parser_late_parsing_default_args): Do not call
5358         push_nested_class/pop_nested_class.
5359         * search.c (dfs_unuse_fields): Remove.
5360         (unuse_fields): Remove.
5361
5362 2004-07-11  Joseph S. Myers  <jsm@polyomino.org.uk>
5363
5364         * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
5365         LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
5366         * cp-tree.h (poplevel): Declare.
5367         (set_block): Remove.
5368         * decl.c (set_block): Remove.
5369
5370 2004-07-10  Mike Stump  <mrs@apple.com>
5371
5372         * decl2.c (import_export_class): Never export/import vtables
5373         with inline key functions.
5374
5375 2004-07-09  Steven Bosscher  <stevenb@suse.de>
5376
5377         * typeck.c (c_expand_asm_operands): Remove.
5378
5379 2004-07-09  Mike Stump  <mrs@apple.com>
5380
5381         * typeck.c (build_class_member_access_expr): Skip null deref
5382         warning when we don't dereference it.
5383
5384 2004-07-09  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5385
5386         PR c++/8211
5387         PR c++/16165
5388         * class.c (check_field_decls): Improve -Weffc++ warning: do not
5389         warn for pointers to functions/members, or for classes without
5390         destructors.
5391
5392 2004-07-08  Mark Mitchell  <mark@codesourcery.com>
5393
5394         * name-lookup.h (struct cp_binding_level): Update documentation
5395         for class_shadowed.
5396
5397 2004-07-08  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5398
5399         PR c++/16169
5400         * typeck.c (check_return_expr): Improve -Weffc++ warning: handle
5401         returning CALL_EXPR, and non-reference return type.
5402
5403 2004-07-08  Nathan Sidwell  <nathan@codesourcery.com>
5404
5405         * name-lookup.c (push_binding): Use VEC_reserve.
5406
5407 2004-07-08  Richard Henderson  <rth@redhat.com>
5408
5409         * cp-tree.h (expand_eh_spec_block): Remove.
5410
5411 2004-07-07  Mark Mitchell  <mark@codesourcery.com>
5412
5413         * cp-tree.h (saved_scope): Remove x_previous_class_type and
5414         x_previous_class_values; add x_previous_class_level.
5415         (previous_class_type): Remove.
5416         (previous_class_values): Remove.
5417         (previous_class_level): New macro.
5418         * class.c (pushclass): Restore the identifier cache more
5419         expeditiously.
5420         (invalidate_class_lookup_cache): Use vector for class_shadowed and
5421         previous_class_values.
5422         * decl.c (poplevel): Likewise.
5423         * name-lookup.c (cxx_binding_init): New function.
5424         (cxx_binding_make): Use it.
5425         (push_binding): For a binding in a class level, use a vector of
5426         cp_class_binding nodes.
5427         (push_binding_level): New function.
5428         (begin_scope): Use it.
5429         (leave_scope): Do not put class binding levels on the free list.
5430         (print_binding_level): Adjust for the fact that class_shadowed is
5431         a vector.
5432         (poplevel_class): Likewise.
5433         (clear_identifier_class_values): Likewise.
5434         (push_class_level_binding): Likewise.
5435         (set_class_shadows): Remove.
5436         (store_binding): New function.
5437         (store_class_bindings): New function.
5438         (push_to_top_level): Use store_class_bindings as appropriate.
5439         (pop_from_top_level): Use previous_class_level, not
5440         previous_class_type.
5441         * name-lookup.h (cp_class_binding): New type.
5442         (cp_binding_level): Use a vector object for class_shadowed.
5443         (push_binding_level): Declare.
5444         (set_class_shadows): Remove.
5445
5446 2004-07-07  Andrew Pinski  <apinski@apple.com>
5447
5448         * class.c (instantiate_type): BUFFER_REF is dead.
5449         * lex.c (init_operators): IN_EXPR is dead.
5450
5451 2004-07-07  Jason Merrill  <jason@redhat.com>
5452
5453         PR c++/16334
5454         * call.c (build_new_op): Give overload warnings for built-in
5455         candidates.
5456
5457 2004-07-07  H.J. Lu  <hongjiu.lu@intel.com>
5458
5459         PR c++/16276
5460         * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
5461         is not public.
5462
5463 2004-07-07  Nathan Sidwell  <nathan@codesourcery.com>
5464
5465         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
5466         * class.c (build_primary_vtable, check_bases,
5467         determine_primary_base, finish_struct_bits,
5468         maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
5469         get_basefndecls, warn_hidden, walk_subobject_offsets,
5470         build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
5471         layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
5472         finish_struct_1, get_vfield_name, contains_empty_class_p,
5473         dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
5474         dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
5475         add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
5476         BINFO macros.
5477         * decl.c (xref_basetypes): Likewise.
5478         * dump.c (cp_dump_tree): Likewise.
5479         * error.c (dump_expr): Likewise.
5480         * init.c (sort_mem_initializers, expand_member_init,
5481         push_base_cleanups): Likewise.
5482         * method.c (do_build_copy_constructor, do_build_assign_reg,
5483         synthesize_exception_spec): Likewise.
5484         * name-lookup.c (arg_assoc_class): Likewise.
5485         * pt.c (instantiate_class_template, tsubst,
5486         get_template_base_recursive): Likewise.
5487         * ptree.c (cxx_print_type): Likewise.
5488         * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
5489         * search.c (lookup_base_r, dynamic_cast_base_recurse,
5490         dfs_access_in_type, access_in_type, lookup_field_queue_p,
5491         bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
5492         marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
5493         dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
5494         binfo_for_vtable, copied_binfo, original_binfo): Likewise
5495         * tree.c (copy_base_binfos, make_binfo): Likewise.
5496         * typeck.c (commmon_base_type): Likewise
5497         * typeck2.c (process_init_constructor): Likewise
5498
5499 2004-07-06  Joseph S. Myers  <jsm@polyomino.org.uk>
5500
5501         * decl.c (check_tag_decl): Name redeclared type in diagnostic.
5502
5503 2004-07-06  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5504
5505         PR c++/3671
5506         * pt.c (convert_nontype_argument): Disallow conversions between
5507         different enumeration types.
5508
5509 2004-07-06  Nathan Sidwell  <nathan@codesourcery.com>
5510
5511         * cp-tree.h (BINFO_MARKED): Remove.
5512         (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
5513         BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
5514         BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
5515         (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
5516         * class.c (build_base_path): Use BINFO_VIRTUAL_P.
5517         (mark_primary_bases, determine_primary_base, base_derived_from,
5518         dfs_find_final_overrider, dfs_find_final_overrider_q,
5519         dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
5520         dfs_modify_vtables, walk_subobject_offsets,
5521         layout_nonempty_base_or_field, build_base_field,
5522         build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
5523         end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
5524         finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
5525         build_ctor_vtbl_group, accumulate_vtble_inits,
5526         dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
5527         build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
5528         add_vcall_offset_vtbl_entries_1): Likewise.
5529         * decl.c (xref_basetypes): Incomming virtual base indicated by
5530         TREE_TYPE. Adjust.
5531         * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
5532         * init.c (finish_init_stmts, sort_mem_initializers,
5533         emit_mem_initializers, build_vtble_address, expand_member_init,
5534         push_base_cleanups): Likewise.
5535         * method.c (do_build_copy_constructor): Likewise.
5536         * pt.c (instantiate_class_template,
5537         get_template_base_recursive): Likewise.
5538         * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
5539         get_pseudo_ti_desc): Likewise.
5540         * search.c (lookup_base_r, dynamic_cast_base_recurse,
5541         binfo_from_vbase, binfo_via_virtual, copied_binfo,
5542         original_binfo): Likewise.
5543         * semantics.c (finish_base_specifier): Virtualness is indicated
5544         by TREE_TYPE.
5545         * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
5546
5547 2004-07-06  Mark Mitchell  <mark@codesourcery.com>
5548
5549         Revert:
5550         2004-06-24  Jason Merrill  <jason@redhat.com>
5551         PR c++/16115
5552         * decl.c (grokparms): Give the PARM_DECL reference type if the
5553         parameter is passed by invisible reference.
5554
5555 2004-07-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5556
5557         * cp-lang.c (cp_var_mod_type_p): Add extra arg.
5558         * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
5559         * pt.c (check_instantiated_args, unify): Likewise.
5560
5561 2004-07-05  Phil Edwards  <phil@codesourcery.com>
5562
5563         * Make-lang.in (check-c++, lang_checks):  Add some comments.
5564
5565 2004-07-05  Zack Weinberg  <zack@codesourcery.com>
5566
5567         * cp-mudflap.c: Delete file.
5568         * Makefile.in: Remove all references to cp-mudflap.o.
5569
5570 2004-07-05  Zack Weinberg  <zack@codesourcery.com>
5571
5572         * decl.c (cxx_init_decl_processing): Call
5573         build_common_tree_nodes before creating the global NAMESPACE_DECL.
5574
5575 2004-07-05  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5576
5577         PR c++/2518
5578         * call.c (build_operator_new_call): Look only at global scope.
5579
5580 2004-07-05  Nathan Sidwell  <nathan@codesourcery.com>
5581
5582         * call.c (enforce_access): Expect TREE_BINFO.
5583         * class.c (binfo_ctor_vtable): Check TREE_BINFO.
5584         * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
5585         (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
5586         Adjust.
5587         (BINFO_LANG_ELTS): Remove.
5588         (BINFO_LANG_SLOTS): New.
5589         (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
5590         (CLASSTYPE_TEMPLATE_INFO): Adjust.
5591         * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
5592         * search.c (lookup_member): Check TREE_BINFO.
5593         * semantics.c (perform_or_defer_access_check): Likewise.
5594         (check_accessibility_of_qualified_id): Check
5595         deferred_access_no_check.
5596         * tree.c (make_binfo): Use make_tree_binfo.
5597
5598 2004-07-04  Mark Mitchell  <mark@codesourcery.com>
5599
5600         * method.c (implicitly_declare_fn): Set linkage of generated
5601         functions.
5602
5603 2004-07-04  Richard Henderson  <rth@redhat.com>
5604
5605         * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
5606
5607 2004-07-03  Scott Brumbaugh  <scottb.lists@verizon.net>
5608
5609         PR c++/3761
5610         * name-lookup.c (push_class_level_binding): Don't pass a
5611         TREE_LIST of ambiguous names to check_template_shadow as it
5612         only handles declarations. Instead, pull the declaration
5613         out and pass that.
5614
5615 2004-07-03  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5616
5617         PR c++/14971
5618         * pt.c (check_explicit_specialization): Clarify error message.
5619
5620 2004-07-02  Richard Henderson  <rth@redhat.com>
5621
5622         * tree.c (cp_unsave_r): Update remap_save_expr call.
5623
5624 2004-07-02  Mark Mitchell  <mark@codesourcery.com>
5625
5626         PR c++/16240
5627         * mangle.c (write_template_arg): Correct mangling.
5628
5629         PR c++/16297
5630         * decl.c (grokdeclarator): Robustify.
5631
5632 2004-07-01  Richard Henderson  <rth@redhat.com>
5633
5634         * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
5635         * method.c (synthesize_method): Don't clear_last_expr.
5636         * name-lookup.c (maybe_push_cleanup_level): Likewise.
5637
5638 2004-07-01  Nick Clifton  <nickc@redhat.com>
5639
5640         * decl2.c (import_export_class): Invoke the
5641         import_export_class field in the gcc_target structure if it is not
5642         empty.
5643
5644 2004-06-30  Richard Henderson  (rth@redhat.com>
5645
5646         * decl.c (start_preparsed_function): Don't set immediate_size_expand.
5647         * method.c (use_thunk): Likewise.
5648
5649 2004-06-30  Joseph S. Myers  <jsm@polyomino.org.uk>
5650
5651         * call.c (build_over_call), typeck.c (build_function_call): Call
5652         check_function_arguments instead of check_function_format.
5653
5654 2004-06-30  Joseph S. Myers  <jsm@polyomino.org.uk>
5655
5656         * call.c (build_over_call), typeck.c (build_function_call): Update
5657         calls to check_function_format.
5658
5659 2004-06-30  Richard Henderson  <rth@redhat.com>
5660
5661         * call.c (build_over_call): Use __builtin_memcpy for copying
5662         CLASS_AS_BASE rather than funny casting.
5663
5664 2004-06-30  Richard Henderson  <rth@redhat.com>
5665
5666         * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
5667         TYPE_SIZE_UNIT of full_type.
5668
5669 2004-06-30  Per Bothner  <per@bothner.com>
5670
5671         Conditionally compile support for --enable-mapped_location.
5672         * decl.c (pop_label):  Handle (imperfectly) USE_MAPPED_LOCATION case.
5673         * decl2.c:  If USE_MAPPED_LOCATION, don't do some line number
5674         adjustments - which I don't understand.
5675         * error.c (dump_decl):  Rename "<interrnal>" to "<built-in>".
5676         * error.c:  Use LOCATION_FILE and EXPR_LOCATION macros.
5677         (print_instantiation_partial_context):  Use expand_location.
5678         * decl.c (duplicate_decl):  Use new DECL_IS_BUILTIN macro.
5679         * name-lookup.c:  Likewise.
5680         * lex.c (cxx_init):  Likewise.  Also use BUILTINS_LOCATION.
5681         * name-lookup.c:  Use input_line macro.
5682         * parser.c (cp_lexer_get_preprocessor_token):  Use UNKNOWN_LOCATION.
5683         (cp_parser_statement):  Rename locaal variable statement_locus to
5684         statement_location and use SET_EXPR_LOCATION macro.
5685         * pt.c:  Handle USE_MAPPED_LOCATION case.  Use new macros.
5686         * tree.c (cp_walk_subtrees):  Likewise.
5687
5688 2004-06-29  Per Bothner  <per@bothner.com>
5689
5690         * tree.c (build_min_nt, build_min, build_min_non_dep):
5691         Don't set TREE_COMPLEXITY from input_line.
5692
5693 2004-06-29  Paul Brook  <paul@codesourcery.com>
5694
5695         * init.c: Include target.h.
5696         (get_cookie_size): Remove and replace with target hook.
5697         Update callers.
5698         (build_new_1): Store the element size in the cookie.
5699
5700 2004-06-29  Nathan Sidwell  <nathan@codesourcery.com>
5701
5702         PR c++/16260
5703         * parser.c (cp_parser_template_declaration_after_export): Disable
5704         access checks here ...
5705         (cp_parser_class_specifier): ... not here.
5706
5707 2004-06-28  Nathan Sidwell  <nathan@codesourcery.com>
5708
5709         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
5710         VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
5711         BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
5712         TREE_CHECK macro.
5713
5714 2004-06-28  Nathan Sidwell  <nathan@codesourcery.com>
5715
5716         * cp-tree.h (struct deferred_access): Move to ...
5717         * semantics.c (struct deferred_access): ... here. Adjust.
5718         (deferred_access_stack): Make a VEC(deferred_access),
5719         (deferred_access_free_list): Remove.
5720         (deferred_access_no_check): New.
5721         (push_deferring_access_checks, resume_deferring_access_checks,
5722         stop_deferring_access_checks, pop_deferring_access_checks,
5723         get_deferred_access_checks, pop_to_parent_deferring_access_checks,
5724         perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
5725
5726 2004-06-28  Nathan Sidwell  <nathan@codesourcery.com>
5727
5728         PR c++/16174
5729         * call.c (build_temp): Declare.
5730         (check_constructor_callable): New.
5731         (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
5732         CONSTRUCTOR_CALLABLE.
5733         (convert_like_real, initialize_reference): Use
5734         check_constructor_callable.
5735         * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
5736         (LOOKUP_*): Renumber.
5737
5738 2004-06-28  Nathan Sidwell  <nathan@codesourcery.com>
5739
5740         * friend.c (add_friend): Only perform access checks when context
5741         is a class.
5742         * lex.c (cxx_make_type): Only create a binfo for aggregate types.
5743         * parser.c (cp_parser_class_specifier): Disable access checks here
5744         when parsing the body of a templated class.
5745         * semantics.c (perform_or_defer_access_checks): Reorder to allow
5746         NULL binfos when not checking access.
5747
5748 2004-06-28  Nathan Sidwell  <nathan@codesourcery.com>
5749
5750         Use vector API for vbase list.
5751         * cp-tree.h: Include vec.h
5752         (DEF_VEC_P (tree)): New type.
5753         (struct lang_type_class): Change vbase's member type.
5754         (binfo_for_vbase): Declare.
5755         * class.c (determine_primary_base, base_derived_from,
5756         update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
5757         warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
5758         build_vtbl_initializer): Adjust.
5759         * decl.c (xref_basetypes): Adjust, accumulate upper bound of
5760         vbases.
5761         * init.c (sort_mem_initializers, expand_member_init,
5762         push_base_cleanups): Adjust.
5763         * method.c (do_build_copy_constructor): Adjust.
5764         * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
5765         (binfo_for_vbase): New.
5766         * tree.c (copy_base_binfos): Adjust.
5767
5768 2004-06-28  Mark Mitchell  <mark@codesourcery.com>
5769
5770         * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
5771
5772 2004-06-27  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5773
5774         PR c++/14123
5775         * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
5776         paranthesis in case of pointers to array members.
5777         * error.c (dump_type_prefix): Likewise.
5778         (dump_type_suffix): Maybe issue a whitespace when printing
5779         ARRAY_TYPE.
5780
5781 2004-06-27  Mark Mitchell  <mark@codesourcery.com>
5782
5783         PR c++/16193
5784         * parser.c (cp_parser_set_decl_spec_type): Refine test for
5785         redefinition of built-in types.
5786
5787 2004-06-27  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5788
5789         * error.c (pp_template_argument_list_start): Remove.
5790         (pp_template_argument_list_end): Likewise.
5791         (pp_separate_with_comma): Use pp_cxx_separate_with.
5792         (reinit_global_formatting_buffer): Remove.
5793         (pp_non_consecutive_character): Likewise.
5794         (dump_scope): Use pp_cxx_colon_colon.
5795         (dump_template_parameter): Use pp_cxx_identifier,
5796         pp_cxx_tree_identifier and pp_cxx_whitespace.
5797         (dump_templat_bindings): Replace use of pp_string with sequence
5798         of pp_cxx_whitespace and pp_equal.
5799         (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
5800         pp_cxx_colon_colon, pp_cxx_whitespace throughout.  Don't set
5801         padding here.
5802         (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
5803         (dump_type_prefix): Don't set padding.  Use pp_cxx_whitespace,
5804         pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
5805         (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
5806         pp_cxx_right_bracket, pp_cxx_identifier throughout,
5807         (dump_decl): Likewise.
5808         (dump_template_decl): Likewise.
5809         (dump_function_decl): Likewise.  Set padding as appropriate.
5810         (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
5811         pp_cxx_right_paren.
5812         (dump_exception_spec): Likewise.
5813         (dump_function_name): Use pp_cxx_tree_identifier and
5814         pp_cxx_identifier.
5815         (dump_template_parms): Use pp_cxx_begin_template_argument_list and
5816         pp_cxx_end_template_argument_list.
5817         (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
5818         pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
5819         pp_cxx_whitespace throughout.
5820         (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
5821         pp_cxx_right_paren.
5822         (dump_unary_op): Likewise.
5823         (reinit_cxx_pp): New function.
5824         (type_as_string); Use it.
5825         (expr_as_string): Likewise.
5826         (decl_as_string); Likewise.
5827         (context_as_string): Likewise.
5828         (lang_decl_name): Likewise.
5829         (decl_to_string): Likewise.
5830         (expr_to_string): Likewise.
5831         (parm_to_string): Likewise.
5832         (type_to_string): Likewise.
5833         (args_to_string): Likewise.
5834         (cv_to_string): Likewise.
5835
5836 2004-06-26  Mark Mitchell  <mark@codesourcery.com>
5837
5838         * cp-tree.h (cp_cv_quals): New type.
5839         (cp_declarator): Use it instead of "tree" as appropriate.
5840         (grok_method_quals): Adjust prototype.
5841         (grokclassfn): Likewise.
5842         (do_friend): Likewise.
5843         * decl.c (grokfndecl): Use cp_cv_quals, not tree.
5844         (grokdeclarator): Likewise.
5845         * decl2.c (grok_method_quals): Likewise.
5846         (grokclassfn): Likewise.
5847         * friend.c (do_friend): Likewise.
5848         * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
5849         * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
5850         (make_pointer_declarator): Likewise.
5851         (make_reference_declarator): Likewise.
5852         (make_ptrmem_declarator): Likewise.
5853         (cp_parser_ptr_operator): Likewise.
5854         (cp_parser_cv_qualifier_seq_opt): Likewise.
5855         (cp_parser_cv_qualifier_opt): Remove.
5856         (cp_parser_new_declarator_opt): Adjust call to
5857         cp_parser_ptr_operator.
5858         (cp_parser_conversion_declaration_opt): Likewise.
5859         (cp_parser_declarator): Use cp_cv_quals, not tree.
5860         (cp_parser_direct_declarator): Likewise.
5861
5862 2004-06-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5863
5864         * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
5865         Rename DECL_STMT to DECL_EXPR.
5866         * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
5867         * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
5868         * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
5869
5870 2004-06-26  Jan Hubicka  <jh@suse.cz>
5871
5872         PR C++/14865
5873         * decl2.c (maybe_emit_vtables):  Always import_export_vtable for the
5874         reachability analysis.
5875
5876 2004-06-25  Mark Mitchell  <mark@codesourcery.com>
5877
5878         * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
5879         2004-06-23 change.
5880
5881 2004-06-25  Paul Brook  <paul@codesourcery.com>
5882
5883         * decl2.c (get_guard): Call targetm.cxx.guard_type.
5884         (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
5885
5886 2004-06-24  Mark Mitchell  <mark@codesourcery.com>
5887
5888         * decl.c (grokdeclarator): Restore error messages about __thread.
5889         * parser.c (cp_parser_decl_specifier_seq): Likewise.
5890
5891 2004-06-24  Jason Merrill  <jason@redhat.com>
5892
5893         PR c++/16115
5894         * decl.c (grokparms): Give the PARM_DECL reference type if the
5895         parameter is passed by invisible reference.
5896
5897 2004-06-24  Andreas Schwab  <schwab@suse.de>
5898
5899         * cp-tree.h (enum cp_storage_class): Remove trailing comma.
5900
5901 2004-06-23  Mark Mitchell  <mark@codesourcery.com>
5902
5903         * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
5904         (cp/decl.o): Likewise.
5905         (cp/decl2.o): Likewise.
5906         (cp/pt.o): Likewise.
5907         (cp/semantics.o): Likewise.
5908         * config-lang.in (gtfiles): Do not reference cp/lex.h.
5909         * class.c: Do not include lex.h.
5910         (add_implicitly_declared_members): Do not use
5911         adding_implicit_members.
5912         (check_bases_and_members): Do not talk about grok_x_components.
5913         * cp/cp-tree.h (adding_implicit_members): Remove.
5914         (cp_storage_class): New type.
5915         (cp_decl_spec): Likewise.
5916         (cp_decl_specifier_seq): Likewise.
5917         (cp_parameter_declarator): Use it for the decl_specifiers field.
5918         (check_tag_decl): Adjust prototype.
5919         (shadow_tag): Likewise.
5920         (groktypename): Likewise.
5921         (start_decl): Likewise.
5922         (start_function): Likewise.
5923         (start_method): Likewise.
5924         (grok_x_components): Remove.
5925         (grokfield): Adjust prototype.
5926         (grokbitfield): Likewise.
5927         (finish_member_class_template): Remove.
5928         * decl.c: Do not include lex.h.
5929         (adding_implicit_members): Do not define.
5930         (check_tag_decl): Do not use trees to represent decl-specifiers.
5931         (shadow_tag): Likewise.
5932         (groktypename): Likewise.
5933         (start_decl): Likewise.
5934         (grokvardecl): Likewise.
5935         (grokdeclarator): Likewise.
5936         (grokparms): Likewise.
5937         (start_function): Likewise.
5938         (start_method): Likewise.
5939         * decl.h (grokdeclarator): Adjust prototype.
5940         * decl2.c: Do not include lex.h.
5941         (grok_x_components): Remove.
5942         (grokfield): Do not use trees to represent decl-specifiers.
5943         (grokbitfield): Likewise.
5944         * lex.c: Do not include lex.h.
5945         * lex.h: Remove.
5946         * parser.c: Include target.h.
5947         (clear_decl_specs): New function.
5948         (cp_parser_translation_unit): Do not use trees to represent
5949         decl-specifiers.
5950         (cp_parser_postfix_expression): Likewise.
5951         (cp_parser_new_type_id): Likewise.
5952         (cp_parser_condition): Likewise.
5953         (cp_parser_simple_declaration): Likewise.
5954         (cp_parser_decl_specifier_seq): Likewise.
5955         (cp_parser_function_specifier_opt): Likewise.
5956         (cp_parser_conversion_type_id): Likewise.
5957         (cp_parser_template_parameter): Likewise.
5958         (cp_parser_explicit_instantiation): Likewise.
5959         (cp_parser_type_specifier): Likewise.
5960         (cp_parser_simple_type_specifier): Likewise.
5961         (cp_parser_init_declarator): Likewise.
5962         (cp_parser_type_id): Likewise.
5963         (cp_parser_type_specifier_seq): Likewise.
5964         (cp_parser_parameter_declaration): Likewise.
5965         (cp_parser_member_declaration): Likewise.
5966         (cp_parser_exception_declaration): Likewise.
5967         (cp_parser_function_definition_from_specifiers_and_declarator):
5968         Likewise.
5969         (cp_parser_single_declaration): Likewise.
5970         (cp_parser_save_member_function_body): Likewise.
5971         (cp_parser_friend_p): Likewise.
5972         (cp_parser_set_storage_class): New function.
5973         (cp_parser_set_decl_spec_type): Likewise.
5974         * pt.c: Do not include lex.h.
5975         * semantics.c: Likewise.
5976         (finish_member_class_template): Remove.
5977
5978 2004-06-23  Roger Sayle  <roger@eyesopen.com>
5979
5980         * call.c (build_cxx_call): Don't call expand_tree_builtin.  No
5981         longer take both "args" and "convert_args" as arguments.
5982         (build_op_delete_call): Update call to build_cxx_call.
5983         (build_over_call): Likewise, update call to build_cxx_call.
5984         * cp-tree.h (build_cxx_call): Update funtion prototype.
5985         * typeck.c (build_function_call): Don't call expand_tree_builtin.
5986         * rtti.c (throw_bad_cast): Update call to build_cxx_call.
5987         (throw_bad_typeid): Likewise.
5988         (build_dynamic_cast_1): Likewise.
5989
5990 2004-06-22  Richard Henderson  <rth@redhat.com>
5991
5992         * class.c (build_vfn_ref): Take a pointer not object.  Build
5993         an OBJ_TYPE_REF.
5994         (cp_fold_obj_type_ref): New.
5995         * call.c (build_over_call): Update build_vfn_ref call.
5996         * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
5997         * cp-tree.h (cp_fold_obj_type_ref): Declare.
5998
5999 2004-06-21  Jason Merrill  <jason@redhat.com>
6000
6001         PR c++/16112
6002         * cp-gimplify.c (cp_gimplify_init_expr): Look through
6003         CLEANUP_POINT_EXPR.
6004
6005 2004-06-21  Mark Mitchell  <mark@codesourcery.com>
6006
6007         * cp-tree.def (NEW_EXPR): Add a fourth slot.
6008         * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
6009         (TREE_PARMLIST): Likewise.
6010         (CALL_DECLARATOR_PARMS): Likewise.
6011         (CALL_DECLARATOR_QUALS): Likewise.
6012         (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
6013         (cp_declarator_kind): New type.
6014         (cp_parameter_declarator): Likewise.
6015         (cp_declarator): Likewise.
6016         (cp_error_declarator): Likewise.
6017         (no_parameters): Likewise.
6018         (groktypename): Change prototype.
6019         (start_decl): Likewise.
6020         (start_handler_parms): Likewise.
6021         (get_scope_of_declarator): Likewise.
6022         (start_function): Likewise.
6023         (start_preparsed_function): New function.
6024         (start_function): Change prototype.
6025         (start_method): Likewise.
6026         (grokfield): Likewise.
6027         (grokbitfield): Likewise.
6028         (build_new): Likewise.
6029         (make_pointer_declarator): Remove.
6030         (make_reference_declarator): Likewise.
6031         (make_call_declarator): Likewise.
6032         (set_quals_and_spec): Likewise.
6033         (process_template_parm): Change prototype.
6034         (begin_function_definition): Remove.
6035         (finish_parmlist): Remove.
6036         * decl.c (groktypename): Do not use trees to represent
6037         declarators.
6038         (start_decl): Likewise.
6039         (start_handler_parms): Remove.
6040         (get_scope_of_declarator): Reimplement.
6041         (grokdeclarator): Do not use trees to represent declarators.
6042         (grokparms): Likewise.
6043         (start_function): Likewise.
6044         (start_method): Likewise.
6045         (build_void_list_mode): Do not use TREE_PARMLIST.
6046         * decl.h (grokdeclarator): Change prototype.
6047         * decl2.c (grok_method_quals): Robustify.
6048         (grok_x_components): Do not use trees to represent declarators.
6049         (grokfield): Likewise.
6050         (grokbitfield): Likewise.
6051         (start_objects): Build FUNCTION_DECLs, not declarators.
6052         (start_static_storage_duration_function): Likewise.
6053         * init.c (build_new): Simplify.
6054         * lex.c (make_pointer_declarator): Remove.
6055         (make_reference_declarator): Likewise.
6056         (make_call_declarator): Likewise.
6057         (set_quals_and_spec): Likewise.
6058         * method.c (use_thunk): Use start_preparsed_function.
6059         (synthesize_method): Likewise.
6060         (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
6061         * optimize.c (maybe_clone_body): Use start_preparsed_function.
6062         * parser.c (cp_error_declarator): New variable.
6063         (declarator_obstack): Likewise.
6064         (alloc_declarator): New function.
6065         (make_declarator): Likewise.
6066         (make_id_declarator): Likewise.
6067         (make_pointer_declarator): Likewise.
6068         (make_reference_declarator): Likewise.
6069         (make_ptrmem_declarator): Likewise.
6070         (make_call_declarator): Likewise.
6071         (make_array_declarator): Likewise.
6072         (no_parameters): New variable.
6073         (make_parameter_declarator): Likewise.
6074         (cp_parser_check_for_definition_in_return_type): Do not use trees
6075         to represent declarators.
6076         (cp_parser_translation_unit): Likewise.
6077         (cp_parser_new_expression): Likewise.
6078         (cp_parser_new_type_id): Likewise.
6079         (cp_parser_new_declarator_opt): Likewise.
6080         (cp_parser_direct_new_declarator): Likewise.
6081         (cp_parser_condition): Likewise.
6082         (cp_parser_declaration_statement): Likewise.
6083         (cp_parser_declaration): Likewise.
6084         (cp_parser_conversion_type_id): Likewise.
6085         (cp_parser_conversion_declarator_opt): Likewise.
6086         (cp_parser_template_parameter_list): Likewise.
6087         (cp_parser_template_parameter): Likewise.
6088         (cp_parser_explicit_instantiation): Likewise.
6089         (cp_parser_init_declarator): Likewise.
6090         (cp_parser_declarator): Likewise.
6091         (cp_parser_direct_declarator): Likewise.
6092         (cp_parser_type_id): Likewise.
6093         (cp_parser_parameter_declaration_clause): Likewise.
6094         (cp_parser_parameter_declaration_list): Likewise.
6095         (cp_parser_parameter_declaration): Likewise.
6096         (cp_parser_member_declaration): Likewise.
6097         (cp_parser_exception_declaration): Likewise.
6098         (cp_parser_check_declarator_template_parameters): Likewise.
6099         (cp_parser_function_definition_from_specifiers_and_declarator):
6100         Likewise.
6101         (cp_parser_save_member_function_body): Likewise.
6102         * pt.c (process_template_parm): Add is_non_type parameter.
6103         (convert_template_argument): Adjust call to groktypename.
6104         (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
6105         (tsubst): Do not expect declarators.
6106         (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
6107         argument.
6108         (instantiate_decl): Use start_preparsed_function.
6109         * semantics.c (begin_function_definition): Remove.
6110         (finish_parmlist): Remove.
6111         * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
6112         declarators.
6113
6114 2004-06-21  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6115
6116         * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
6117         (build_new_method_call): Likewise.
6118         * decl.c (local_variable_p_walkfn): Don't walk into types.
6119         * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
6120         (build_anon_union_vars): Add new operand for COMPONENT_REF.
6121         * init.c (buld_new): Add new operand for ARRAY_REF.
6122         * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
6123         (do_build_assign_ref): Likewise.
6124         * parser.c (cp_parser_direct_new_declarator): Add new operands
6125         for ARRAY_REF.
6126         (cp_parser_direct_declarator): Likewise.
6127         * pt.c (tsubst): Likewise.
6128         (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
6129         for COMPONENT_REF.
6130         * semantics.c (finish_non_static_data_member): Add new operand
6131         for COMPONENT_REF.
6132         * typeck.c (build_class_member_access_expr): Likewise.
6133         (build_class_member_access_expr, finish_class_member_access_expr):
6134         Likewise.
6135         (build_ptrmemfunc_access_expr): Likewise.
6136         (build_array_ref): Add new operands for ARRAY_REF.
6137         * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
6138         * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
6139
6140 2004-06-21  Richard Henderson  <rth@redhat.com>
6141
6142         * dump.c (cp_dump_tree): Don't use dump_next_stmt.
6143         * parser.c (cp_parser_jump_statement): Update commentary.
6144         * pt.c (tsubst_expr): Use RETURN_EXPR.
6145         * semantics.c (finish_return_stmt): Likewise.
6146         (finalize_nrv_r): Likewise.
6147         * typeck.c, typeck2.c: Update file start commentary.
6148
6149 2004-06-21  Richard Henderson  <rth@redhat.com>
6150
6151         * semantics.c (finish_expr_stmt): Call verify_sequence_points.
6152
6153 2004-06-20  Richard Henderson  <rth@redhat.com>
6154
6155         * cp-tree.h (add_decl_stmt): Declare.
6156         * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
6157         * semantics.c (maybe_cleanup_point_expr): New.
6158         (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
6159         finish_for_expr, finish_switch_cond): Use it.
6160         (finalize_nrv_r): Don't build an EXPR_STMT.  Don't frob TREE_CHAIN.
6161
6162 2004-06-20  Richard Henderson  <rth@redhat.com>
6163
6164         * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
6165         * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
6166         (cp_gimplify_expr): Call it.
6167         (gimplify_cleanup_stmt): Move from c-gimplify.c.
6168         (cp_genericize): New.
6169         * decl.c (finish_function): Call it.
6170         * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
6171         (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
6172         (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
6173         (cp_genericize): Declare.
6174         * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
6175         * dump.c (cp_dump_tree): Likewise.
6176         * semantics.c (push_cleanup): Move from c-semantics.c.
6177
6178 2004-06-20  Zack Weinberg  <zack@codesourcery.com>
6179
6180         * cp-lang.c (has_c_linkage): Implement.
6181
6182         * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
6183         * decl.c (duplicate_decls): Use COPY_DECL_RTL.
6184         (builtin_function_1): Don't call make_decl_rtl.
6185         (build_cp_library_fn): Don't call set_mangled_name_for_decl.
6186         (grokvardecl): Don't call mangle_decl.
6187         * except.c (nothrow_libfn_p): Look at DECL_NAME, not
6188         DECL_ASSEMBLER_NAME.
6189         * method.c (set_mangled_name_for_decl): Delete.
6190         * name-lookup.c (pushdecl): When a local extern shadows a
6191         file-scope declaration of the same object, give both DECLs the
6192         same DECL_UID.
6193         * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
6194         on DECL_ASSEMBLER_NAME.
6195
6196 2004-06-19  Richard Henderson  <rth@redhat.com>
6197
6198         * cp-gimplify.c: Remove unnecessary prototypes.
6199         (cp_gimplify_stmt): Merge into ...
6200         (cp_gimplify_expr): ... here.  Move to end of file.  Handle
6201         stmts_are_full_exprs_p frobbing.
6202         * cp-tree.h (cp_gimplify_stmt): Remove.
6203         * pt.c (tsubst_expr): Merge prep_stmt and unify.
6204         * tree.c (init_tree): Don't set lang_gimplify_stmt.
6205
6206 2004-06-18  Richard Henderson  <rth@redhat.com>
6207
6208         PR c++/16034
6209         * semantics.c (begin_cond): New.
6210         (finish_cond): Rewrite to handle template DECL_STMTs specially.
6211         Assume that non-template decls go land before the conditional.
6212         (simplify_loop_decl_cond): Likewise.
6213         (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
6214         finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
6215         begin_switch_stmt, finish_switch_cond): Update to match.
6216
6217 2004-06-17  Jason Merrill  <jason@redhat.com>
6218
6219         PR c++/16015
6220         * semantics.c (simplify_aggr_init_expr): Don't return the slot.
6221         (finish_stmt_expr_expr): Update type after conversions.
6222         (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
6223         Handle void initializer.
6224         * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
6225
6226 2004-06-17  Geoffrey Keating  <geoffk@apple.com>
6227
6228         * class.c (build_clone): Don't call defer_fn, let mark_used do it.
6229         * cp-tree.h (defer_fn): Delete.
6230         * decl2.c (defer_fn): Delete.
6231         (finish_file): Simplify deferred_fns loops; check that
6232         only used inline functions get into deferred_fns.
6233         (mark_used): Inline previous contents of defer_fn.
6234
6235 2004-06-16  Richard Henderson  <rth@redhat.com>
6236
6237         * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
6238         (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
6239         * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
6240         of CTOR_INITIALIZER ...
6241         (pp_cxx_statement): ... here.
6242         * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
6243         (finish_function): Use alloc_stmt_list to zap entire function.
6244         * parser.c (cp_parser_compound_statement): Update commentary.
6245         * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
6246         * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
6247         (finish_stmt_expr): Don't look through COMPOUND_STMT.
6248
6249 2004-06-16  Geoffrey Keating  <geoffk@apple.com>
6250
6251         * pt.c (mark_decl_instantiated): Don't call defer_fn.
6252
6253 2004-06-16  Richard Henderson  <rth@redhat.com>
6254
6255         * parser.c (cp_parser_labeled_statement): Update commentary.
6256         * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
6257         * tree.c (mark_local_for_remap_r): Likewise.
6258
6259 2004-06-16  Richard Henderson  <rth@redhat.com>
6260
6261         * parser.c (cp_parser_asm_definition): Update commentary.
6262         * pt.c (tsubst_expr): Use ASM_EXPR.
6263         * semantics.c (finish_asm_stmt): Likewise.
6264
6265 2004-06-16  Richard Henderson  <rth@redhat.com>
6266
6267         * decl.c (finish_destructor_body): Use LABEL_EXPR.
6268         * parser.c (cp_parser_statement): Update commentary.
6269         * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
6270         * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
6271         * tree.c (mark_local_for_remap_r): Likewise.
6272
6273 2004-06-16  Richard Henderson  <rth@redhat.com>
6274
6275         PR c++/16012
6276         * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
6277         statement in FOR_INIT_STMT for templates.
6278
6279 2004-06-15  Richard Henderson  <rth@redhat.com>
6280
6281         * call.c (initialize_reference): Don't build CLEANUP_STMT here.
6282         * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
6283         (genericize_try_block): Use gimplify_stmt.
6284         (genericize_catch_block, genericize_eh_spec_block): Likewise.
6285         (cp_gimplify_init_expr): Remove STMT_EXPR special case.
6286         (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
6287         * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
6288         (cp_tree_chain_matters_p): Remove.
6289         * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
6290         (COMPOUND_STMT_BODY_BLOCK): New.
6291         (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
6292         (EXPR_STMT_STMT_EXPR_RESULT): New.
6293         (building_stmt_tree): Check cur_stmt_list.
6294         (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
6295         (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
6296         * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
6297         (cp_finish_decl): Use push_cleanup.
6298         (start_function, finish_function): Use statement lists.
6299         (finish_stmt): Do nothing.
6300         * except.c (begin_eh_spec_block): Use statement lists.
6301         (check_handlers_1, check_handlers): Likewise.
6302         * init.c (construct_virtual_base): Don't add extra compound stmts.
6303         (build_vec_init): Likewise.
6304         * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
6305         * name-lookup.h (struct cp_binding_level): Add statement_list.
6306         * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
6307         (cp_parser_labeled_statement, cp_parser_expression_statement,
6308         cp_parser_statement_seq_opt): Likewise.
6309         (cp_parser_compound_statement): Likewise.  Take bool for try block.
6310         (cp_parser_selection_statement): Tidy if processing.
6311         (cp_parser_already_scoped_statement): Rewrite to do what it says.
6312         * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
6313         (tsubst_expr): Rewrite STMT_EXPR processing.  Handle STATEMENT_LIST.
6314         Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
6315         * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
6316         (finish_cond): New, rewritten from FINISH_COND.
6317         (simplify_loop_decl_cond): New.
6318         (finish_expr_stmt): Avoid nested EXPR_STMTs.
6319         (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
6320         begin_else_clause, finish_else_clause, finish_if_stmt,
6321         begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
6322         begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
6323         finish_for_cond, finish_for_stmt, begin_switch_stmt,
6324         finish_switch_cond, finish_switch_stmt, begin_try_block,
6325         finish_try_block, finish_cleanup_try_block, finish_function_try_block,
6326         finish_handler_sequence, finish_function_handler_sequence,
6327         begin_handler, finish_handler_parms, finish_handler,
6328         begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
6329         using statement lists.
6330         (begin_compound_stmt): Replace has_no_scope argument with flags.
6331         Update all callers.  Use statement lists.
6332         (finish_compound_stmt): Likewise.
6333         (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
6334         (current_scope_stmt_stack): Remove.
6335         (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
6336         * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
6337         Rewrite with statement lists.
6338
6339 2004-06-15  Alexandre Oliva  <aoliva@redhat.com>
6340
6341         * parser.c: Change all assignments of c_lex_string_translate
6342         to true and false to 1 and 0.
6343         (cp_lexer_read_token): Convert type of the translated string.
6344         (cp_parser_skip_to_closing_parentheses): Preserve original
6345         value of c_lex_string_translate, and set it to -1 while
6346         running.
6347         (cp_parser_cache_group): Likewise.
6348         (cp_parser_cache_group_1): Renamed.
6349         (cp_parser_asm_operand_list): Remove redundant setting of
6350         c_lex_string_translate.
6351         (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
6352         Handle chained strings.
6353
6354 2004-06-12  Andrew Pinski  <apinski@apple.com>
6355
6356         PR c++/14639
6357         Revert:
6358         2004-06-02  Andrew Pinski  <pinskia@physics.uc.edu>
6359
6360                 * cp-tree.h: Fix typo.
6361
6362                 * cp-tree.h: Include cgraph.h
6363                 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
6364                 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
6365
6366 2004-06-12  Jason Merrill  <jason@redhat.com>
6367
6368         PR tree-optimization/14107
6369         * decl.c (finish_function): Warn about no return in all functions.
6370
6371 2004-06-15  Paolo Bonzini  <bonzini@gnu.org>
6372
6373         * cp-tree.h (struct language_function): Remove cannot_inline.
6374         * decl.c (save_function_data): cannot_inline is no more.
6375         (cxx_push_function_context): Likewise.
6376         * decl2.c (start_objects, start_static_storage_duration_function):
6377         Reset DECL_INLINE, set DECL_UNINLINABLE.
6378
6379 2004-06-14  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6380
6381         PR c++/15967
6382         * search.c (lookup_field): Propagate the ambiguity list.
6383         (lookup_fnfields): Likewise.
6384
6385 2004-06-14  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6386
6387         PR c++/15947
6388         * parser.c (cp_parser_template_name): Ctors/dtors never need a
6389         template keyword to disambiguate.
6390
6391 2004-06-14  Mark Mitchell  <mark@codesourcery.com>
6392
6393         PR c++/15096
6394         * decl.c (grokdeclarator): Ignore pointer-to-members when
6395         computing template depth.
6396
6397         PR c++/14930
6398         * name-lookup.c (pushtag): Do not try to put class declarations in
6399         explicit specialization scopes.
6400
6401 2004-06-11  Andrew Pinski  <pinskia@physics.uc.edu>
6402
6403         * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
6404
6405 2004-06-11  Mark Mitchell  <mark@codesourcery.com>
6406
6407         PR c++/15862
6408         * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
6409         bindings for undeclared built-ins.
6410
6411 2004-06-11  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6412
6413         * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
6414         appear at the correct location.
6415
6416 2004-06-10  Jason Merrill  <jason@redhat.com>
6417
6418         PR c++/15875
6419         Revert:
6420         2004-06-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6421         * init.c (build_offset_ref): Build SCOPE_REF with non-null
6422         TREE_TYPE for non-dependent names.
6423         * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
6424         unknown_type_node as its TREE_TYPE.
6425         * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
6426         * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
6427         (dump_expr) <SCOPE_REF case>: Likewise.
6428
6429 2004-06-10  Mark Mitchell  <mark@codesourcery.com>
6430
6431         PR c++/15227
6432         * parser.c (cp_parser_direct_declarator): Robustify.
6433
6434         PR c++/15877
6435         * pt.c (tsubst_copy): Use decl_constant_value on enumeration
6436         constants in non-dependent contexts.
6437
6438         PR c++/14211
6439         PR c++/15076
6440         * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
6441         necessary.
6442
6443 2004-06-10  Jakub Jelinek  <jakub@redhat.com>
6444
6445         PR c++/14791
6446         * decl.c (duplicate_decls): Handle fileptr_type_node arguments
6447         specially.
6448
6449 2004-06-09  Mark Mitchell  <mark@codesourcery.com>
6450
6451         Revert:
6452         PR c++/15815
6453         2004-06-07  Mark Mitchell  <mark@codesourcery.com>
6454         * lex.c (handle_pragma_interface): Deprecate.
6455         (handle_pragma_implementation): Likewise.
6456
6457 2004-06-09  Andrew Pinski  <pinskia@physics.uc.edu>
6458
6459         * g++spec.c (lang_specific_driver): Remove check for -lm
6460         and -lmath when check it see if it was the math library.
6461
6462 2004-06-08  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6463
6464         PR c++/7841
6465         * parser.c (cp_parser_direct_declarator): Reject constructor named
6466         as qualified template-id.
6467
6468 2004-06-07  Mark Mitchell  <mark@codesourcery.com>
6469
6470         PR c++/15815
6471         * lex.c (handle_pragma_interface): Deprecate.
6472         (handle_pragma_implementation): Likewise.
6473
6474 2004-06-07  Mark Mitchell  <mark@codesourcery.com>
6475
6476         PR c++/15766
6477         * parser.c (cp_parser_iteration_statement): Fix typo in error
6478         message.
6479
6480         PR c++/14777
6481         * pt.c (tsubst_default_argument): Do not defer access checks
6482         while substituting into the default argument.
6483
6484         PR c++/15554
6485         * pt.c (tsubst_copy): Do not try to substitute for an enumeration
6486         constant in a non-dependent context.
6487
6488         PR c++/15057
6489         * except.c (build_throw): Ensure that temp_expr has been
6490         initialized.
6491
6492 2004-06-06  Roger Sayle  <roger@eyesopen.com>
6493
6494         * cp/cp-tree.h (lvalue_or_else): Add function prototype.
6495
6496 2004-06-06  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6497
6498         PR c++/15503
6499         * parser.c (cp_parser_mem_initializer_id): Gracefully reject
6500         'typename', and accept 'template'.
6501
6502 2004-06-03  Andrew Pinski  <pinskia@physics.uc.edu>
6503             Jan Hubicka  <jh@suse.cz>
6504
6505         PR c++/14639
6506         * method.c (use_think): Do not mark thunk as referenced.
6507
6508 2004-06-03  Matt Austern  <austern@apple.com>
6509
6510         PR c++/15428
6511         * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
6512         is nonzero, and if we see a noninline definition of a key method,
6513         make the vtables nonweak.
6514
6515 2004-06-02  Matt Austern  <austern@apple.com>
6516
6517         * cp-tree.h (instantiate_decl): new boolean parameter,
6518         undefined_ok. Current behavior is equivalent to its being 0.
6519         * decl2.c (mark_used): Add new argument when calling instantiate_decl
6520         * pt.c (mark_decl_instantiated): Unconditionally make
6521         instantiations explicit unconditionally
6522         (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
6523         since mark_decl_instantiated now does it.
6524         (instantiate_class_member): New.  Instantiate a member of an
6525         explicitly instantiated class template.
6526         (do_type_instantiation): Explicitly instantiate members of an
6527         explicitly instantiated class template.
6528         (instantiate_decl): if undefined_ok is nonzero, and if we're
6529         trying to explicitly instantiated a template with no definition,
6530         change it to an implicit instantiation.
6531         (instantiate_pending_templates): Add new argument to instantiate_decl.
6532         * tree.c (cp_cannot_inline_tree_fn): Likewise.
6533
6534 2004-06-02  Andrew Pinski  <pinskia@physics.uc.edu>
6535
6536         * cp-tree.h: Fix typo.
6537
6538         * cp-tree.h: Include cgraph.h
6539         (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
6540         TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
6541
6542 2004-06-01  Jason Merrill  <jason@redhat.com>
6543
6544         PR c++/15142
6545         * call.c (call_builtin_trap): Remove type parm.
6546         (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
6547         (build_x_va_arg): Dereference a null pointer for a non-POD argument.
6548
6549 2004-06-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6550
6551         PR c++/13092
6552         * init.c (build_offset_ref): Build SCOPE_REF with non-null
6553         TREE_TYPE for non-dependent names.
6554         * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
6555         unknown_type_node as its TREE_TYPE.
6556         * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
6557         * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
6558         (dump_expr) <SCOPE_REF case>: Likewise.
6559
6560 2004-06-01  Richard Henderson  <rth@redhat.com>
6561             Andrew Pinski  <pinskia@physics.uc.edu>
6562
6563         * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
6564         * parser.c (struct cp_parser): Remove in_offsetof.
6565         (cp_parser_new): Don't set it.
6566         (cp_parser_unary_expression): Don't check it.
6567         (cp_parser_postfix_open_square_expression): Split out from ...
6568         (cp_parser_postfix_expression): ... here.
6569         (cp_parser_postfix_dot_deref_expression): Likewise.
6570         (cp_parser_builtin_offsetof): New.
6571         (cp_parser_primary_expression): Use it.
6572
6573 2004-06-01  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6574
6575         PR c++/14932
6576         * parser.c (cp_parser_postfix_expression): Allow subscript
6577         operator in offsetof.
6578
6579 2004-05-31  Mark Mitchell  <mark@codesourcery.com>
6580
6581         PR c++/15701
6582         * friend.c (add_friend): Do not try to perform access checks for
6583         functions from dependent classes.
6584
6585 2004-05-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6586
6587         * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
6588         (pp_cxx_begin_template_argument_list): Turn into a function.
6589         (pp_cxx_end_template_argument_list): Likewise.
6590         (pp_cxx_separate_with): Define.
6591         (pp_cxx_unqualified_id): Tidy.
6592         (pp_cxx_primary_expression): Likewise.
6593         (pp_cxx_postfix_expression): Likewise.
6594         (pp_cxx_expression): Likewise.
6595         (pp_cxx_simple_type_specifier): Likewise.
6596         (pp_cxx_type_specifier_seq): Likewise.
6597         (pp_cxx_parameter_declaration_clause): Likewise.
6598         (pp_cxx_exception_specification): Likewise.
6599         (pp_cxx_direct_declarator): Likewise.
6600         (pp_cxx_type_id): Likewise.
6601         * cxx-pretty-print.h (pp_cxx_whitespace): Export from
6602         cxx-pretty-print.c.
6603         (pp_cxx_left_paren): Likewise.
6604         (pp_cxx_right_paren): Likewise.
6605         (pp_cxx_left_brace): Likewise.
6606         (pp_cxx_right_brace): Likewise.
6607         (pp_cxx_left_bracket): Likewise.
6608         (pp_cxx_right_bracket): Likewise.
6609         (pp_cxx_dot): Likewise.
6610         (pp_cxx_identifier): Likewise.
6611         (pp_cxx_tree_identifier): Likewise.
6612         (pp_cxx_ampersand): New macro.
6613         (pp_cxx_star): Likewise.
6614         (pp_cxx_arrow): Likewise.
6615         (pp_cxx_semicolon): Likewise.
6616         (pp_cxx_complement): Likewise.
6617         (pp_cxx_begin_template_argument_list): Declaree.
6618         (pp_cxx_end_template_argument_list): Likewise.
6619         (pp_cxx_colon_colon): likewise.
6620
6621 2004-05-31  Eric Botcazou  <ebotcazou@libertysurf.fr>
6622
6623         * parser.c (cp_parser_simple_type_specifier): Explicitly test
6624         against NULL_TREE.
6625
6626 2004-05-31  Kazu Hirata  <kazu@cs.umass.edu>
6627
6628         * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
6629         typeck.c: Fix comment formatting.
6630
6631 2004-05-30  Andrew Pinski  <pinskia@physics.uc.edu>
6632
6633         * cp-lang.c (cp_expand_decl): Remove.
6634         (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
6635
6636 2004-05-30  Andreas Jaeger  <aj@suse.de>
6637
6638         * lang-specs.h: Add missing initializers for .ii.
6639
6640 2004-05-28  Aldy Hernandez  <aldyh@redhat.com>
6641
6642         * decl.c (cp_make_fname_decl): Free return value from
6643         fname_as_string.
6644
6645 2004-05-28  Mark Mitchell  <mark@codesourcery.com>
6646
6647         PR c++/15083
6648         * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
6649         even in a templat.e
6650         * init.c (build_new): Likewise.
6651
6652         PR c++/15640
6653         * name-lookup.c (arg_assoc): Robustify.
6654
6655         PR c++/15471
6656         * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
6657         when determining the scope to use for a pointer to member.
6658         (lookup_anon_field): Give it external linkage.
6659         * cp-tree.h (lookup_anon_field): Declare it.
6660         * expr.c (cplus_expand_constant): Use it.
6661
6662 2004-05-28  Mark Mitchell  <mark@codesourcery.com>
6663
6664         PR c++/14668
6665         * parser.c (cp_parser_simple_type_specifier): Call
6666         maybe_note_name_used_in_class.
6667
6668 2004-05-28  Tom Marshall  <tmarshall@real.com>
6669
6670         PR c++/15214
6671         * class.c (finish_struct_1): Warn only if the dtor is non-private or
6672         the class has friends.
6673
6674 2004-05-27  Adam Nemet  <anemet@lnxw.com>
6675
6676         PR c++/12883
6677         * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
6678         TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
6679
6680 2004-05-24  Geoffrey Keating  <geoffk@apple.com>
6681
6682         * method.c (implicitly_declare_fn): Don't call defer_fn; abort
6683         if it might be needed.
6684         * pt.c (mark_decl_instantiated): Only call defer_fn if
6685         the function actually needs processing in finish_file.
6686         * decl2.c (finish_file): Add check that elements in
6687         deferred_fns_used are really needed there.  Remove unnecessary
6688         test of DECL_SAVED_TREE.
6689
6690 2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
6691
6692         * Make-lang.in: No need to specify $(LIBCPP).
6693
6694 2004-05-23  Mark Mitchell  <mark@codesourcery.com>
6695
6696         PR c++/15044
6697         * parser.c (cp_parser_class_head): Robustify.
6698
6699         PR c++/15317
6700         * parser.c (cp_parser_decl_specifier_seq): Correct error in
6701         comment.
6702         (cp_parser_constructor_declarator_p): Treat attributes
6703         as decl-specifiers.
6704
6705         PR c++/15329
6706         * typeck.c (build_unary_op): Do not attempt to resolve casts to
6707         base classes in templates.
6708
6709 2004-05-23  Mark Mitchell  <mark@codesourcery.com>
6710
6711         PR c++/15165
6712         * pt.c (instantiate_template): Robustify.
6713
6714 2004-05-23  Mark Mitchell  <mark@codesourcery.com>
6715
6716         PR c++/15025
6717         * decl.c (xref_tag): Issue errors about redeclaring template
6718         classes as non-template classes.
6719
6720 2004-05-23  Mark Mitchell  <mark@codesourcery.com>
6721
6722         PR c++/14821
6723         * name-lookup.c (supplement_binding): Allow redefinitions of
6724         namespace aliases.
6725
6726         PR c++/14883
6727         * parser.c (cp_parser_template_argument): Robustify.
6728
6729 2004-05-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6730
6731         * class.c (alter_access): Use %E format specifier to print an
6732         identifier node.  Avoid looking at the IDENTIFIER_POINTER.
6733         (push_lang_context): Likewise.
6734         * decl.c (lookup_label): Likewise.
6735         (grokdeclarator): Likewise.
6736         * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
6737         * pt.c (do_type_instantiation): Likewise.
6738         * tree.c (handle_java_interface_attribute): Likewise.
6739         (handle_com_interface_attribute): Likewise.
6740         (handle_init_priority_attribute): Likewise.
6741
6742 2004-05-22  Mark Mitchell  <mark@codesourcery.com>
6743
6744         PR c++/15285
6745         PR c++/15299
6746         * pt.c (build_non_dependent_expr): Expand the set of tree nodes
6747         recognized as overloaded functions.
6748
6749 2004-05-22  Mark Mitchell  <mark@codesourcery.com>
6750
6751         PR c++/15507
6752         * class.c (layout_nonempty_base_or_field): Do not try to avoid
6753         layout conflicts for unions.
6754
6755         PR c++/15542
6756         * typeck.c (build_x_unary_op): Instantiate template class
6757         specializations before looking for "operator &".
6758
6759         PR c++/15427
6760         * typeck.c (complete_type): Layout non-dependent array types, even
6761         in templates.
6762
6763         PR c++/15287
6764         * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
6765         template.
6766
6767 2004-05-22  Roger Sayle  <roger@eyesopen.com>
6768
6769         * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
6770         returning when TREE_TYPE is error_mark_node.
6771         * typeck.c (require_complete_type): Return error_mark_node if
6772         value's type is an error_mark_node.
6773
6774 2004-05-20  Andrew Pinski  <pinskia@physics.uc.edu>
6775
6776         * optimize.c (calls_setjmp_r): Remove.
6777         (calls_setjmp_p): Remove.
6778         * cp-tree.c (calls_setjmp_p): Remove.
6779         * decl.c (finish_function): Do not call calls_setjmp_p.
6780
6781 2004-05-18  Zack Weinberg  <zack@codesourcery.com>
6782
6783         * decl.c (cp_finish_decl): Use mark_decl_referenced.
6784         * decl2.c (maybe_make_one_only): Likewise.
6785         * method.c (use_thunk): Likewise.
6786
6787 2004-05-18  Jason Merrill  <jason@redhat.com>
6788
6789         * class.c (build_base_path): Tidy a bit.
6790
6791 2004-05-14  Geoffrey Keating  <geoffk@apple.com>
6792
6793         * name-lookup.c (struct scope_binding): New.
6794         (EMPTY_SCOPE_BINDING): New.
6795         (lookup_using_namespace): Take a scope_binding instead of a
6796         cxx_binding.
6797         (qualified_lookup_using_namespace): Likewise.
6798         (cxx_binding_clear): Delete.
6799         (do_nonmember_using_decl): Use a scope_binding instead of a
6800         cxx_binding.
6801         (lookup_tag): Don't call select_decl.
6802         (ambiguous_decl): Don't return anything (and change callers to match).
6803         Take a scope_binding as the second parameter.
6804         (lookup_namespace_name): Use a scope_binding instead of a
6805         cxx_binding.
6806         (unqualified_namespace_lookup): Likewise.
6807         (lookup_qualified_name): Likewise.
6808         (select_decl): Take a scope_binding instead of a cxx_binding.
6809         Use macros rather than hand-coding tests for type-ness.
6810
6811 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
6812
6813         * cp-gimplify.c: Rename from cp-simplify.c.
6814         * Make-lang.in, optimize.c: Update.
6815
6816 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
6817
6818         Merge from tree-ssa-20020619-branch.  See
6819         ChangeLog.tree-ssa for details.
6820
6821         * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
6822         cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
6823         expr.c, init.c, name-lookup.h, optimize.c, parser.c,
6824         pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
6825         Merged.
6826         * cp-mudflap.c: New file.
6827         * cp-simplify.c:: New file.
6828
6829 2004-05-03  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6830
6831         PR c++/14389
6832         * decl2.c (check_classfn): For member templates, compare also the
6833         template parameters to match the declaration.
6834         * cp-tree.h: Adjust declaration of check_classfn.
6835         * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
6836         * friend.c (do_friend): Likewise.
6837         * pt.c (tsubst_friend_function): Likewise.
6838
6839 2004-05-01  Zack Weinberg  <zack@codesourcery.com>
6840
6841         * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
6842         Instead, dig into the representation type to find the array bound.
6843
6844 2004-04-30  Jason Merrill  <jason@redhat.com>
6845
6846         Refer to base members using COMPONENT_REFs where possible.
6847         * class.c (build_simple_base_path): New fn.
6848         (build_base_path): Use it for non-virtual base references.
6849         (layout_class_type): Change base fields to their real type
6850         after layout is done.
6851         * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
6852         * cp-lang.c (cxx_get_alias_set): Use it.
6853
6854 2004-04-30  Kazu Hirata  <kazu@cs.umass.edu>
6855
6856         * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
6857         comment typos.
6858
6859 2004-04-23  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6860
6861         PR c++/15064
6862         * parser.c (cp_parser_postfix_expression): typeid operator cannot be
6863         used in integral constant expressions.
6864
6865 2004-04-22  Mark Mitchell  <mark@codesourcery.com>
6866
6867         * init.c (build_aggr_init): Fix accidental use of C99 construct in
6868         previous change.
6869
6870         * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
6871         braced initializer.
6872         * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
6873         * decl.c (reshape_init): Use it.
6874         * init.c (perform_member_init): Remove redundant condition.
6875         (build_aggr_init): Adjust to handle brace-enclosed initializers
6876         correctly.
6877         (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
6878
6879         * parser.c (cp_parser_initializer_clause): Do not set
6880         TREE_HAS_CONSTRUCTOR on the initializer.
6881         * rtti.c (tinfo_base_init): Likewise.
6882         (generic_initializer): Likewise.
6883         (ptr_initializer): Likewise.
6884         (ptm_initializer): Likewise.
6885         (class_initializer): Likewise.
6886         (get_pseudo_ti_init): Likewise.
6887         * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
6888
6889 2004-04-22  Alan Modra  <amodra@bigpond.net.au>
6890
6891         * name-lookup.c (anonymous_namespace_name): Make static.
6892
6893 2004-04-19  Roger Sayle  <roger@eyesopen.com>
6894
6895         PR middle-end/14531
6896         * class.c (build_base_path): Call fold whilst building the NULL
6897         pointer check expression trees.
6898
6899 2004-04-15  Bryce McKinlay  <mckinlay@redhat.com>
6900
6901         * init.c (build_new_1): Don't use type size argument for Java
6902         _Jv_AllocObject call.
6903
6904 2004-04-09  Danny Smith  <dannysmith@users.sourceforge.net>
6905
6906         * method.c (make_alias_for_thunk): Remove preprocessor guard on
6907         declaration and definition.
6908
6909 2004-04-08  Danny Smith  <dannysmith@users.sourceforge.net>
6910
6911         PR c++/14808
6912         * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
6913         than ASM_OUTPUT_DEF.
6914
6915 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
6916
6917         * decl2.c (mark_used): Don't segfault if cfun != NULL but
6918         current_function_decl == NULL.
6919
6920 2004-04-05  Nathan Sidwell  <nathan@codesourcery.com>
6921
6922         PR c++/3518
6923         * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
6924         level.
6925
6926 2004-04-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6927
6928         * init.c (decl_constant_value): Don't look at DECL_INITIAL
6929         of PARM_DECL.
6930         * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
6931         or TREE_SIDE_EFFECTS of a type.
6932
6933 2004-04-02  Nathan Sidwell  <nathan@codesourcery.com>
6934
6935         PR c++/14007
6936         * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
6937         cv-qualifier unification.
6938         * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
6939
6940 2004-04-02  Jan Hubicka  <jh@suse.cz>
6941
6942         * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
6943         * cp-tree.h (cp_update_decl_after_saving): Declare.
6944         * tree.c (cp_update_decl_after_saving): Define.
6945
6946 2004-04-01  Mark Mitchell  <mark@codesourcery.com>
6947
6948         PR c++/14803
6949         * typeck.c (get_delta_difference): Call fold before returning the
6950         value.
6951
6952 2004-04-01  Richard Henderson  <rth@redhat.com>
6953
6954         PR c++/14804
6955         * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
6956         * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
6957
6958 2004-04-01  Mark Mitchell  <mark@codesourcery.com>
6959
6960         PR c++/14810
6961         * name-lookup.c (maybe_push_cleanup_level): Robustify.
6962
6963 2004-04-01  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6964
6965         * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
6966
6967 2004-03-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6968
6969         * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
6970         * class.c (check_bitfield_decl): Likewise.
6971         * cvt.c (type_promotes_to): Likewise.
6972         * decl.c (finish_enum): Likewise.
6973         * mangle.c (write_builtin_type): Likewise.
6974         * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
6975         * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
6976         (build_binary_op): Likewise.
6977
6978 2004-03-31  Jan Hubicka  <jh@suse.cz>
6979
6980         * tree.h (optimize_function): Kill prototype.
6981         * optimize.c (dump_function, optimize_function, dump_finction): Kill.
6982         * semantics.c (expand_body): Kill.
6983
6984 2004-03-30  Mark Mitchell  <mark@codesourcery.com>
6985
6986         PR c++/14724
6987         * decl.c (start_decl_1): Do not decide whether or not to create a
6988         new cleanup level until after the type has been completed.
6989
6990         PR c++/14763
6991         * pt.c (tsubst_default_argument): Clear current_function_decl.
6992
6993 2004-03-30  Zack Weinberg  <zack@codesourcery.com>
6994
6995         * name-lookup.c, parser.c: Use new shorter form of GTY markers.
6996
6997 2004-03-29  Zack Weinberg  <zack@codesourcery.com>
6998
6999         * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
7000         is null, just print the literal name and return.
7001
7002 2004-03-25  Kazu Hirata  <kazu@cs.umass.edu>
7003
7004         * cxx-pretty-print.c: Fix comment typos.
7005
7006 2004-03-24  Kazu Hirata  <kazu@cs.umass.edu>
7007
7008         * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
7009         Update copyright.
7010
7011 2004-03-23  Ziemowit Laski  <zlaski@apple.com>
7012
7013         * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
7014         * mangle.c (write_type): Add call to 'mangle_fundamental_type'
7015         target hook.
7016
7017 2004-03-23  Zack Weinberg  <zack@codesourcery.com>
7018
7019         PR 12267, 12391, 12560, 13129, 14114, 14133
7020         * cp-lang.c (c_reset_state): Delete.
7021         (push_file_scope, pop_file_scope): New stubs.
7022         * parser.c (c_parse_file): Call sorry() here if called more than once.
7023
7024 2004-03-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7025
7026         * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
7027         for INTEGER_CST.
7028
7029 2004-03-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
7030
7031         * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
7032
7033 2004-03-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
7034
7035         * error.c (enum pad): Remove.
7036         (dump_qualifiers): Likewise.
7037         (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
7038         (dump_aggr_type): Likewise.
7039         (dump_type_suffix): Likewise.
7040         (dump_simple_decl): Likewise.
7041         (dump_function_decl): Likewise.
7042         (cv_to_string): Likewise.
7043         (dump_type_prefix): Likewise.  Adjust return void.
7044         * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
7045         cxx_pretty_print.h.
7046         (pp_cxx_template_keyword_if_needed): Document.
7047         (pp_cxx_qualified_id): Document case FUNCTION_DECL.  Tidy.
7048         (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
7049         MUST_NOT_THROW_EXPR.
7050
7051 2004-03-21  Mark Mitchell  <mark@codesourcery.com>
7052
7053         PR c++/14616
7054         * decl.c (cp_finish_decl): Compute the size of arrays declared in
7055         templates, if their type is non-dependent.
7056
7057 2004-03-19  Mark Mitchell  <mark@codesourcery.com>
7058
7059         * call.c (build_op_delete_call): Do not forget the placement
7060         arguments when iterating through mutiple delete operators.
7061
7062         * cp-tree.h (svaed_scope): Remove last_parms.
7063         (NEW_DELETE_OPNAME_P): New macro.
7064         (last_function_parms): Remove.
7065         (do_friend): Adjust prototype.
7066         * decl.c (grokparms): Return the PARM_DECLs directly, rather than
7067         using last_function_parms.
7068         (grokfndecl): Take the PARM_DECLs as an argument, rather than
7069         using last_function_parms.
7070         (grokdeclarator): Adjust accordingly.  Do not form METHOD_TYPEs
7071         for class-specific operator new and operator delete.
7072         (grok_op_properties): Do not look for allocation functions with
7073         METHOD_TYPEs.
7074         (start_function): Use DECL_ARGUMENTS instead of
7075         last_function_parms.
7076         * decl.h (last_function_parms): Do not declare.
7077         * decl2.c (grokclassfn): Do not use last_function_parms.
7078         * friend.c (do_friend): Remove parmdecls parameter.
7079         * name-lookup.c (push_to_top_level): Do not save last_function_parms.
7080         (pop_from_top_level): Do not restore it.
7081         * pt.c (check_explicit_specialization): Do not adjust
7082         last_function_parms.
7083
7084         * name-lookup.c (do_local_using_decl): Create a local binding for
7085         types brought in via using declarations.
7086
7087         * name-lookup.c (lookup_arg_dependent): Handle block-scope
7088         function declarations correctly.
7089
7090         * semantics.c (finish_id_expression): Correct handling of
7091         conversion operators to dependent types.
7092
7093         * typeck.c (lookup_destructor): Allow the use of destructors from
7094         base classes.
7095
7096 2004-03-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7097
7098         * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
7099         TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
7100         * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
7101         the field is named TEMPLATE_TYPE_PARM_INDEX.
7102
7103 2004-03-19  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7104
7105         PR c++/14545
7106         * parser.c (cp_parser_functional_cast): A cast to anything
7107         but integral or enumaration type is not an integral constant
7108         expression.
7109         * pt.c (value_dependent_expression_p): Handle cast expressions
7110         without operands (such as "int()").
7111
7112 2004-03-18  Mark Mitchell  <mark@codesourcery.com>
7113
7114         * semantics.c (finish_pseudo_destructor_expr): Allow differing
7115         cv-qualification between the type named by the
7116         pseudo-destructor-name and the object-type.
7117
7118         * search.c (accessible_base_p): Handle non-proper bases.
7119
7120         * name-lookup.c (do_nonmember_using_decl): If a using declaration
7121         refers to a single overloaded function, set the type of the
7122         function.
7123         * tree.c (lvalue_type): Simplify.
7124         * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
7125         unknown type.
7126         (build_unary_op): Handle OVERLOADs with known types.
7127
7128         * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
7129         function templates.
7130
7131         * parser.c (cp_parser_postfix_expression): Handle the use of
7132         "typename" in non-dependent contexts.  Convert appropriately when
7133         when using a qualified name after "->" or ".".
7134
7135         * call.c (conditional_conversion): Honor the requirement that some
7136         conversions refer to the original object.
7137
7138 2004-03-18  Mark Mitchell  <mark@codesourcery.com>
7139
7140         * call.c (build_conditional_expr): Do not call force_rvalue for
7141         operands of void_type when the conditional expression itself has
7142         void type.
7143         * name-lookup.c (pushdecl): Don't consider a declaration of a
7144         function named "main" to be an overload of a type named "main".
7145         * parser.c (cp_parser_template_name): Perform name lookup when the
7146         template name is proceeded by "template" if the qualifying scope
7147         is non-dependent.
7148         * typeck.c (composite_pointer_type_r): Correctly handle
7149         pointer-to-member types.
7150         (build_const_cast): Likewise.
7151
7152 2004-03-18  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7153
7154         * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
7155         * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
7156         (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
7157         (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
7158         (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
7159         (TYPEOF_TYPE_EXPR): New macro.
7160         * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
7161         * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
7162         * pt.c (tsubst): Likewise.
7163         * semantics.c (finish_typeof): Likewise.
7164         * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
7165         and TEMPLATE_TYPE_PARM.
7166         * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
7167         (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
7168
7169 2004-03-16  Mark Mitchell  <mark@codesourcery.com>
7170
7171         PR c++/14586
7172         * cp-tree.h (build_new_op): Change prototype.
7173         (build_x_binary_op): Likewise.
7174         * call.c (build_new_op): Add overloaded_p parameter.
7175         * decl2.c (grok_array_decl): Adjust call to build_new_op.
7176         * parser.c (cp_parser_binary_expression): Note that uses of
7177         overloaded operators prevents an expression from being considered
7178         an integral constant.
7179         * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
7180         build_x_binary_op.
7181         * semantics.c (finish_call_expr): Likewise.
7182         * typeck.c (rationalize_conditional_expr): Likewise.
7183         (build_x_indirect_ref): Likewise.
7184         (build_x_binary_op): Likewise.
7185         (build_x_unary_op): Likewise.
7186         (build_x_compound_expr): Likewise.
7187         (build_modify_expr): Likewise.
7188         * typeck2.c (build_x_arrow): Likewise.
7189
7190 2004-03-15  Kazu Hirata  <kazu@cs.umass.edu>
7191
7192         * cp-lang.c, ptree.c: Update copyright.
7193
7194 2004-03-13  Mark Mitchell  <mark@codesourcery.com>
7195
7196         PR c++/14550
7197         * parser.c (cp_parser_non_integral_constant_expression): Encode
7198         more of the idiom that surrounded calls to this function within
7199         the function itself
7200         (cp_parser_primary_expression): Adjust accordingly.
7201         (cp_parser_postfix_expression): Likewise.
7202         (cp_parser_unary_expression): Likewise.
7203         (cp_parser_cast_expression): Likewise.
7204         (cp_parser_assignment_expression): Likewise.
7205         (cp_parser_expression): Likewise.
7206         (cp_parser_new_expression): Note that new-expressions are not
7207         allowed in integral constant expressions.
7208         (cp_parser_delete_expression): Likewise.
7209
7210 2004-03-12  Matt Austern  <austern@apple.com>
7211
7212         * decl2.c (maybe_make_one_only): Look at
7213         TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
7214         to make an explicit instantiation weak.
7215         * method.c (use_thunk): Make sure we call comdat_linkage
7216         when appropriate.
7217         * pt.c (do_type_instantiation): On systems where weak symbols
7218         don't go in a static archive's TOC, explicit instantiation of a
7219         class must imply *explicit* instantiation of its memeber.
7220
7221 2004-03-11  Kazu Hirata  <kazu@cs.umass.edu>
7222
7223         * call.c, cp-tree.h, pt.c: Fix comment typos.
7224
7225 2004-03-10  Mark Mitchell  <mark@codesourcery.com>
7226
7227         PR c++/14510
7228         * decl.c (xref_tag): Disregard non-type declarations when
7229         looking up a tagged type.
7230
7231 2004-03-09  Nathan Sidwell  <nathan@codesourcery.com>
7232
7233         PR c++/14397
7234         * call.c (convert_like_real): Build a const qualified temporary,
7235         when testing ctor access.
7236
7237 2004-03-09  Mark Mitchell  <mark@codesourcery.com>
7238
7239         * call.c (initialize_reference): Fix typo.
7240
7241 2004-03-09  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7242
7243         PR c++/14409
7244         * pt.c (determine_specialization): For member templates, match also
7245         constness.
7246
7247         PR c++/14448
7248         * parser.c (cp_parser_initializer_clause): Fold initializer if it is
7249         non-dependent.
7250         * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
7251
7252 2004-03-09  Mark Mitchell  <mark@codesourcery.com>
7253
7254         PR c++/14230
7255         * call.c (initialize_reference): Handle initializers that are
7256         class-member access expressions applies to rvalues.
7257
7258 2004-03-09  Mark Mitchell  <mark@codesourcery.com>
7259
7260         PR c++/14432
7261         * name-lookup.c (supplement_binding): Ignore functions that are
7262         marked DECL_ANTICIPATED.
7263
7264 2004-03-08  Mark Mitchell  <mark@codesourcery.com>
7265
7266         PR c++/14401
7267         * class.c (check_field_decls): Complain about non-static data
7268         members of reference type in unions.  Propagate
7269         CLASSTYPE_REF_FIELDS_NEED_INIT and
7270         CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
7271         data members.
7272         * init.c (perform_member_init): Complain about mbmers with const
7273         type that are not explicitly initialized.
7274
7275 2004-03-08  Mark Mitchell  <mark@codesourcery.com>
7276
7277         * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
7278         * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
7279         (lang_identifier): Remove implicit_decl and error_locus.
7280         (IDENTIFIER_IMPLICIT_DECL): Remove.
7281         (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
7282         (IDENTIFIER_ERROR_LOCUS): Likewise.
7283         (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
7284         (TYPE_ASSEMBLER_NAME_STRING): Likewise.
7285         (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
7286         (implicitly_declare): Remove.
7287         * decl.c (warn_extern_redeclared_static): Remove check of
7288         IDENTIFIER_IMPLICIT_DECL.
7289         (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
7290         (implicitly_declare): Remove.
7291         (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
7292         (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
7293         (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
7294         * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
7295         in the innermost scope, rather than at namespace scope.
7296         * name-lookup.c (push_local_binding): Give it external linkage.
7297         (pushdecl): Remove dead code.
7298         * name-lookup.h (push_local_binding): Declare it.
7299         * ptree.c (cxx_print_identifier): Don't print
7300         IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
7301         * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
7302         not IDENTIFIER_ERROR_LOCUS.
7303         * typeck.c (build_function_call): Remove dead code.
7304
7305 2004-03-08  Jason Merrill  <jason@redhat.com>
7306
7307         PR c++/13170
7308         * decl.c (xref_tag): Remove attribute handling.
7309         * cp-tree.h: Adjust prototype.
7310         * decl.c, parser.c, rtti.c: Adjust callers.
7311         * parser.c (cp_parser_class_head): Pass back attributes in the
7312         class head.
7313         (cp_parser_class_specifier): Adjust.
7314
7315 2004-03-08  Matt Austern  <austern@apple.com>
7316
7317         PR debug/14079
7318         * name-lookup.c (add_decl_to_level): Add extern variables, as well
7319         as static, to static_decls array.
7320
7321 2004-03-05  Jason Merrill  <jason@redhat.com>
7322
7323         * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
7324
7325 2004-03-04  Geoffrey Keating  <geoffk@apple.com>
7326
7327         * decl.c (grokfndecl): Update old incorrect comment.
7328         (grokvardecl): Diagnose C++ variables of type with no linkage.
7329
7330 2004-03-01  Mark Mitchell  <mark@codesourcery.com>
7331
7332         PR c++/14369
7333         * pt.c (build_non_dependent_expr): Do not create a
7334         NON_DEPENDENT_EXPR for a THROW_EXPR.
7335
7336 2004-03-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
7337
7338         PR c++/14369
7339         * error.c (dump_expr): Handle THROW_EXPR.
7340
7341 2004-03-01  Mark Mitchell  <mark@codesourcery.com>
7342
7343         PR c++/14360
7344         * parser.c (cp_parser_postfix_expression): Do not perform Koenig
7345         lookup if ordinary name-lookup finds a non-function.
7346         * pt.c (tsubst_copy_and_build): Likewise.
7347
7348         PR c++/14361
7349         * parser.c (cp_parser_late_parsing_default_args): Check that there
7350         are no extra tokens after the end of the default-argument
7351         expression.
7352
7353 2004-03-01  Mark Mitchell  <mark@codesourcery.com>
7354
7355         PR c++/14324
7356         * lex.c (retrofit_lang_decl): Treat entities with no linkage as
7357         having C++ linkage for name-mangling purposes.
7358
7359         PR c++/14260
7360         * parser.c (cp_parser_direct_declarator): Recognize constructor
7361         declarators that use a template-id to name the class being
7362         constructed.
7363
7364         PR c++/14337
7365         * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
7366         (tsubst_expr): Do not call tsubst_copy, even when
7367         processing_template_decl.
7368
7369 2004-03-01  Jeff Law  <law@redhat.com>
7370
7371         * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
7372         the proper type.
7373
7374 2004-02-29  Mark Mitchell  <mark@codesourcery.com>
7375
7376         PR c++/14138
7377         * name-lookup.h (push_scope): Change prototype.
7378         * name-lookup.c (push_scope): Do not reenter the current class
7379         scope.
7380         * decl.c (grokfndecl): Check return code from push_scope before
7381         calling pop_scope.
7382         * decl2.c (check_classfn): Likewise.
7383         * parser.c (cp_parser_conversion_function_id): Likewise.
7384         (cp_parser_init_declarator): Likewise.
7385         (cp_parser_direct_declarator): Likewise.
7386         (cp_parser_class_specifier): Likewise.
7387         (cp_parser_class_head): Likewise.
7388         (cp_parser_lookup_name): Likewise.
7389         (cp_parser_constructor_declarator_p): Likewise.
7390         * pt.c (instantiate_class_template): Likewise.
7391         (resolve_typename_type): Likewise.
7392
7393 2004-02-29  Mark Mitchell  <mark@codesourcery.com>
7394
7395         PR c++/14267
7396         * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
7397         extension.
7398
7399         PR debug/12103
7400         * class.c (update_vtable_entry_for_fn): Do not go through
7401         covariance machinery if the type returned by an overrider is the
7402         same as the original.
7403
7404 2004-02-29  Kazu Hirata  <kazu@cs.umass.edu>
7405
7406         * call.c: Fix a comment typo.
7407
7408 2004-02-27  Ziemowit Laski  <zlaski@apple.com>
7409
7410         * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
7411
7412 2004-02-26  Mark Mitchell  <mark@codesourcery.com>
7413
7414         PR c++/14278
7415         * parser.c (cp_parser_parameter_declaration_list): Commit
7416         to fewer tentative parses.
7417
7418 2004-02-26  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7419
7420         PR c++/14284
7421         * pt.c (dependent_type_p_r): A template template parameter is a
7422         dependent type.
7423
7424 2004-02-26  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7425
7426         PR c++/14246
7427         * mangle.c (write_template_arg_literal): Don't rely on identity for
7428         boolean constants.
7429
7430 2004-02-24  Jason Merrill  <jason@redhat.com>
7431
7432         * tree.c (build_exception_variant): Use check_qualified_type.
7433
7434 2004-02-23  Zack Weinberg  <zack@codesourcery.com>
7435             Kazu Hirata  <kazu@cs.umass.edu>
7436
7437         * decl.c (cxx_init_decl_processing): Don't check
7438         flag_writable_strings.
7439
7440 2004-02-23  Andrew Pinski  <pinskia@physics.uc.edu>
7441
7442         PR c++/14156
7443         * typeck.c (maybe_warn_about_returning_address_of_location):
7444         Change check for VAR_DECL to use DECL_P instead.
7445
7446 2004-02-23  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7447
7448         PR c++/14250
7449         * cvt.c (build_expr_type_conversion): Type must be complete before
7450         looking up for conversions.
7451
7452 2004-02-23  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7453
7454         PR c++/14143
7455         * name-lookup.c (arg_assoc_class): Don't look into template
7456         arguments if it is not a primary template.
7457
7458 2004-02-20  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
7459
7460         PR c++/12007
7461         * method.c (use_thunk): Always clone function argument tree.
7462
7463 2004-02-20  Mark Mitchell  <mark@codesourcery.com>
7464
7465         PR c++/14199
7466         * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
7467
7468         PR c++/14173
7469         * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
7470         for all type variants.
7471
7472 2004-02-19  Mark Mitchell  <mark@codesourcery.com>
7473
7474         PR c++/13927
7475         * decl.c (duplicate_decls): Return error_mark_node for invalid
7476         redeclarations.
7477         * name-lookup.c (push_namespace): Ignore the return value from
7478         pushdecl.
7479         * pt.c (push_template_decl_real): Robustify.
7480
7481         PR c++/14186
7482         * name-lookup.c (push_class_level_binding): Do not complain about
7483         adding a binding for a member whose name is the same as the
7484         enclosing class if the member is located in a base class of the
7485         current class.
7486
7487 2004-02-19  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7488
7489         PR c++/14181
7490         * parser.c (cp_parser_new_expression): Parse an ill-formed
7491         direct-new-declarator after a parenthesized type-id to emit good
7492         diagnostic.
7493
7494 2004-02-18  Kazu Hirata  <kazu@cs.umass.edu>
7495
7496         * cp-tree.def, cvt.c: Update copyright.
7497
7498 2004-02-17  Mark Mitchell  <mark@codesourcery.com>
7499
7500         PR c++/11326
7501         * cp-tree.h (abi_version_at_least): Remove.
7502         * mangle.c: Include flags.h.
7503
7504 2004-02-15  Mark Mitchell  <mark@codesourcery.com>
7505
7506         PR c++/13971
7507         * call.c (build_conditional_expr): Handle conversions between
7508         class types which result in differently cv-qualified type
7509         variants.
7510
7511         PR c++/14086
7512         * class.c (delete_duplicate_fields_1): Remove.
7513         (delete_duplicate_fields): Likewise.
7514         (finish_struct_anon): Remove check for members with the same name
7515         as their enclosing class.
7516         (check_field_decls): Do not call duplicate_fields.
7517         * decl.c (grokdeclarator): Remove check for static data members
7518         with the same name as their enclosing class.
7519         * name-lookup.c (push_class_level_binding): Check for members with
7520         the same name as their enclosing class.
7521
7522 2004-02-15  Gabriel Dos Reis  <gdr@integrable-solutions.net>
7523
7524         PR c++/14085
7525         * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
7526
7527 2004-02-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7528
7529         PR c++/13635
7530         * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
7531         has full set of arguments.
7532
7533 2004-02-13  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7534
7535         PR c++/13927
7536         * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
7537
7538 2004-02-13  Mark Mitchell  <mark@codesourcery.com>
7539
7540         PR c++/14122
7541         * cp-tree.h (delete_sanity): Change prototype.
7542         * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
7543         Remove dead code.  Adjust code to warn about deleting an array.
7544         * typekc.c (decay_conversion): Use build_address and build_nop.
7545
7546         PR c++/14108
7547         * search.c (accessible_p): Do not check access in thunks.
7548
7549         PR c++/14083
7550         * call.c (build_conditional_expr): Call force_rvalue on the
7551         non-void operand in the case that one result is a throw-expression
7552         and the other is not.
7553
7554 2004-02-13  Ian Lance Taylor  <ian@wasabisystems.com>
7555
7556         PR c++/9851
7557         * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
7558         the type name and look ahead for ::~, and bail out early with a
7559         better error message if the parse is going to fail.
7560
7561 2004-02-12  Mark Mitchell  <mark@codesourcery.com>
7562
7563         * call.c (conversion_kind): New type.
7564         (conversion_rank): Likewise.
7565         (conversion): Likewise.
7566         (CONVERSION_RANK): New macro.
7567         (conversion_obstack): New variable.
7568         (obstack_initialized): Likewise.
7569         (z_candidate): Change type of convs and second_conv.
7570         (candidate_warning): New type.
7571         (IDENTITY_RANK): Remove.
7572         (EXACT_RANK): Likewise.
7573         (PROMO_RANK): Likewise.
7574         (STD_RANK): Likewise.
7575         (PBOOL_RANK): Likewise.
7576         (USER_RANK): Likewise.
7577         (ELLIPSIS_RANK): Likewise.
7578         (BAD_RANK): Likewise.
7579         (ICS_RANK): Likewise.
7580         (ICS_STD_RANK): Likewise.
7581         (ICS_USER_FLAG): Likewise.
7582         (ICS_ELLIPSIS_FLAG): Likewise.
7583         (ICS_THIS_FLAG): Likewise.
7584         (ICS_BAD_FLAG): Likewise.
7585         (NEED_TEMPORARY_P): Likewise.
7586         (CHECK_COPY_CONSTRUCTOR_P): Likewise.
7587         (USER_CONV_CAND): Likewise.
7588         (USER_CONV_FN): Likewise.
7589         (conversion_obstack_alloc): New function.
7590         (alloc_conversion): Likewise.
7591         (validate_conversion_obstack): Likewise.
7592         (alloc_conversions): Likewise.
7593         (build_conv): Adjust to deal with new conversion data structures.
7594         (build_identity_conv): New function.
7595         (build_ambiguous_conv): Likewise.
7596         (standard_conversion): Adjust to deal with new conversion data
7597         structures.
7598         (convert_class_to_reference): Likewise.
7599         (direct_reference_binding): Likewise.
7600         (reference_binding): Likewise.
7601         (implicit_conversion): Likewise.
7602         (add_candidate): Likewise.
7603         (add_function_candidate): Likewise.
7604         (add_conv_candidate): Likewise.
7605         (build_builtin_candidate): Likewise.
7606         (print_z_candidate): Likewise.
7607         (merge_conversion_sequences): Likewise.
7608         (build_user_type_conversion_1): Likewise.
7609         (build_user_type_conversion): Likewise.
7610         (build_new_function_call): Likewise.
7611         (build_object_call): Likewise.
7612         (conditional_conversion): Likewise.
7613         (build_conditional_expr): Likewise.
7614         (build_new_op): Likewise.
7615         (build_op_delete_call): Likewise.
7616         (convert_like_real): Likewise.
7617         (build_over_call): Likewise.
7618         (build_new_method_call): Likewise.
7619         (is_subseq): Likewise.
7620         (maybe_handle_implicit_object): Likewise.
7621         (maybe_handle_ref_bind): Likewise.
7622         (compare_ics): Likewise.
7623         (source_type): Likewise.
7624         (add_warning): Likewise.
7625         (joust): Likewise.
7626         (can_convert_arg): Likewise.
7627         (can_convert_arg_bad): Likewise.
7628         (perform_implicit_conversion): Likewise.
7629         (perform_direct_initialization_if_possible): Likewise.
7630         (initialize_reference): Likewise.
7631         * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
7632         * cp-tree.def (WRAPPER): Likewise.
7633         (IDENTITY_CONV): Remove.
7634         (LVALUE_CONV): Likewise.
7635         (QUAL_CONV): Likewise.
7636         (STD_CONV): Likewise.
7637         (PTR_CONV): Likewise.
7638         (PMEM_CONV): Likewise.
7639         (BASE_CONV): Likewise.
7640         (REF_BIND): Likewise.
7641         (USER_CONV): Likewise.
7642         (AMBIG_CONV): Likewise.
7643         (RVALUE_CONV): Likewise.
7644         * cp-tree.h (tree_wrapper): Remove.
7645         (WRAPPER_ZC): Remove.
7646         (lang_tree_node): Remove wrapper.
7647         (LOOKUP_SPECULATIVELY): Remove.
7648         (build_op_delete_call): Adjust prototype.
7649         (validate_conversion_obstack): Declare.
7650         (build_zc_wrapper): Remove.
7651         * cvt.c (convert_to_reference): Remove dead code.
7652         (ocp_convert): Likewise.
7653         * decl.c (redeclaration_error_message): Correct handling of
7654         templates.
7655         (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
7656         (cp_tree_node_structure): Remove WRAPPER case.
7657         * decl2.c (finish_file): Call validate_conversion_obstack.
7658         * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
7659         (build_op_delete_call): Likewise.
7660         (build_x_delete): Likewise.
7661         (build_delete): Adjust call to build_op_delete_call.
7662         * pt.c (tsubst_friend_declaration): Adjust code to determine
7663         whether or not a friend template is a definition.
7664         (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
7665         * tree.c (build_zc_wrapper): Remove.
7666
7667 2004-02-12  Zack Weinberg  <zack@codesourcery.com>
7668
7669         * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
7670         * cp-tree.h: Don't declare cxx_builtin_type_decls.
7671         * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
7672         (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
7673
7674 2004-02-10  Mark Mitchell  <mark@codesourcery.com>
7675
7676         * typeck.c (lookup_destructor): Fix typo in error message.
7677
7678 2004-02-09  Kazu Hirata  <kazu@cs.umass.edu>
7679
7680         * call.c, parser.c, tree.c: Fix comment typos.
7681
7682 2004-02-07  Zack Weinberg  <zack@codesourcery.com>
7683
7684         Bug 13856
7685         * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
7686         * decl.c (duplicate_decls, start_function): Likewise.
7687
7688 2004-02-07  Zack Weinberg  <zack@codesourcery.com>
7689
7690         * name-lookup.c (pushdecl): Issue shadow warnings directly.
7691         * parser.c (free_parser_stacks): Delete.
7692
7693 2004-02-07  Kazu Hirata  <kazu@cs.umass.edu>
7694
7695         * rtti.c: Update copyright.
7696
7697 2004-02-06  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7698
7699         PR c++/14033
7700         * decl.c (require_complete_types_for_parms): Do not insert
7701         error_mark_node in the parameter list.
7702
7703 2004-02-06  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7704
7705         PR c++/14028
7706         * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
7707         error when terminator can not be found.
7708
7709 2004-02-05  Kelley Cook  <kcook@gcc.gnu.org>
7710
7711         Make-lang.in (po-generated):  Delete.
7712
7713 2004-02-05  Kazu Hirata  <kazu@cs.umass.edu>
7714
7715         * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
7716         targetm.calls.promote_prototypes.
7717
7718 2004-02-05  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
7719
7720         PR middle-end/13750
7721         Revert:
7722         2004-01-15  Geoffrey Keating  <geoffk@apple.com>
7723         PR pch/13361
7724         * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
7725         (handle_pragma_implementation): Likewise.
7726
7727 2004-02-05  Mark Mitchell  <mark@codesourcery.com>
7728
7729         PR c++/13714
7730         * typeck.c (lookup_destructor): Tweak error message.
7731
7732 2004-02-05  Jan Hubicka  <jh@suse.cz>
7733
7734         * tree.c (cp_cannot_inline_tree_fn):  Allow inlining of comdat
7735         functions.
7736
7737 2004-02-05  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7738
7739         PR c++/14008
7740         * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
7741         code, only emits the diagnostic now. Added lookup of the identifier
7742         and support for qualified ids.
7743         (cp_parser_parse_and_diagnose_invalid_type_name): New function.
7744         Parse an (invalid) type name as id-expression within a declarator.
7745         (cp_parser_simple_declaration): Use it.
7746         (cp_parser_member_declaration): Likewise.
7747         (cp_parser_make_typename_type): New function. Handle errors through
7748         cp_parser_diagnose_invalid_typename.
7749         (cp_parser_elaborated_type_specifier): Use it.
7750
7751 2004-02-04  Mark Mitchell  <mark@codesourcery.com>
7752
7753         PR c++/13932
7754         * call.c (convert_like_real): Use "converting" rather than
7755         "argument" as the descriptive keyword to
7756         dubious_conversion_warnings.
7757         * typeck.c (convert_for_assignment): Do not call
7758         dubious_conversion_warnings.
7759
7760 2004-02-04  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7761
7762         PR c++/13086
7763         * init.c (build_delete): Emit a more informative error message in
7764         case of an incomplete type, and on the correct source line.
7765
7766 2004-02-04  Kazu Hirata  <kazu@cs.umass.edu>
7767
7768         * error.c, search.c: Update copyright.
7769
7770 2004-02-04  Mark Mitchell  <mark@codesourcery.com>
7771
7772         PR c++/9941
7773         * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
7774         linkage for the typeinfo name string.
7775
7776 2004-02-04  Mark Mitchell  <mark@codesourcery.com>
7777
7778         PR c++/13969
7779         * cp-tree.h (fold_non_dependent_expr): New function.
7780         * parser.c (cp_parser_fold_non_dependent_expr): Remove.
7781         (cp_parser_template_argument): Use fold_non_dependent_expr.
7782         (cp_parser_direct_declarator): Likewise.
7783         * pt.c (fold_non_dependent_expr): New function.
7784         (convert_nontype_argument): Use it.
7785         (tsubst_qualified_id): Simplify.
7786         (tsubst_copy_and_build): Likewise.
7787
7788 2004-02-04  Mark Mitchell  <mark@codesourcery.com>
7789
7790         * decl.c (cxx_push_function_context): Do not set
7791         current_function_is_thunk.
7792         * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
7793         actual function.
7794
7795 2004-02-04  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7796
7797         PR c++/13997
7798         * pt.c (more_specialized_class): Increase processing_template_decl
7799         while partial ordering.
7800
7801 2004-02-03  Mark Mitchell  <mark@codesourcery.com>
7802
7803         PR c++/13925
7804         * decl.c (start_function): Do not call pushdecl for any
7805         instantiation or specialization of a primary template.
7806
7807 2004-02-03  Mark Mitchell  <mark@codesourcery.com>
7808
7809         PR c++/13950
7810         * parser.c (cp_parser_class_name): Robustify.
7811
7812         PR c++/13970
7813         * parser.c (cp_parser_cache_group): Do not consume the EOF token.
7814
7815         PR c++/14002
7816         * semantics.c (finish_id_expression): Do not return an
7817         IDENTIFIER_NODE when lookup finds a PARM_DECL.
7818
7819 2004-02-03  Mark Mitchell  <mark@codesourcery.com>
7820
7821         PR c++/13978
7822         * pt.c (build_non_dependent_expr): Do not build
7823         NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
7824
7825         PR c++/13968
7826         * semantics.c (finish_id_expression): Do not return an
7827         IDENTIFIER_NODE when lookup finds a VAR_DECL.
7828
7829         PR c++/13975
7830         * parser.c (cp_parser_simple_declaration): When skipping to the
7831         end of the statement swallow the terminating semicolon.
7832
7833 2004-02-02  Mark Mitchell  <mark@codesourcery.com>
7834
7835         PR c++/13113
7836         * init.c (build_offset_ref): Improve error recovery for invalid
7837         uses of non-static member functions.
7838
7839         PR c++/13854
7840         * cp-tree.h (cp_build_type_attribute_variant): New function.
7841         * class.c (build_clone): Use cp_build_type_attribute_variant.
7842         * decl.c (duplicate_decls): Likewise.
7843         * pt.c (copy_default_args_to_explicit_spec): Likewise.
7844         (tsubst_function_type): Likewise.
7845         * tree.c (build_exception_variant): Check attributes before
7846         concluding that two types are the same.
7847         (cp_build_type-attribute_variant): New method.
7848         * typeck.c (merge_types): Use cp_build_type_attribute_variant.
7849
7850         PR c++/13907
7851         * call.c (convert_class_to_reference): Keep better track of
7852         pedantically invalid user-defined conversions.
7853
7854 2004-02-01  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7855
7856         PR c++/13957
7857         * pt.c (tsubst_qualified_id): Improved error message when a type
7858         is expected but not found.
7859
7860 2004-01-31  Kazu Hirata  <kazu@cs.umass.edu>
7861
7862         * class.c: Fix comment typos.
7863         * decl.c: Likewise.
7864         * error.c: Likewise.
7865         * parser.c: Likewise.
7866         * pt.c: Likewise.
7867         * search.c: Likewise.
7868         * typeck.c: Likewise.
7869
7870 2004-01-30  Richard Henderson  <rth@redhat.com>
7871
7872         PR c++/13693
7873         * method.c (use_thunk): Don't force_target_expr for void thunks.
7874         * tree.c (build_target_expr_with_type): Assert non-void type.
7875         (force_target_expr): Likewise.
7876
7877 2004-01-30  Michael Matz  <matz@suse.de>
7878
7879         * parser.c (cp_parser_labeled_statement): Accept case ranges.
7880
7881 2004-01-30  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7882
7883         DR206
7884         PR c++/13813
7885         * decl.c (grokdeclarator): Check immediatly type completeness for
7886         non-dependent types.
7887
7888 2004-01-30  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7889
7890         PR c++/13683
7891         * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
7892         a sizeof expression.block
7893
7894 2004-01-29  Mark Mitchell  <mark@codesourcery.com>
7895
7896         PR c++/13883
7897         * mangle.c (write_encoding): Correct encoding of member template
7898         constructors.
7899
7900 2004-01-28  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7901
7902         * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
7903         template name as it was `<::' (digraph typo).
7904         (cp_parser_nth_token_starts_template_argument_list_p): New function.
7905         (cp_parser_id_expression): Use it.
7906         (cp_parser_nested_name_specifier_opt): Likewise.
7907         (cp_parser_template_name): Likewise.
7908         (cp_parser_class_name): Likewise.
7909         (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
7910
7911 2004-01-28  Mark Mitchell  <mark@codesourcery.com>
7912
7913         PR c++/13791
7914         * typeck.c (merge_types): Do not merge attributes into
7915         TYPENAME_TYPEs.
7916
7917         PR c++/13736
7918         * parser.c (cp_parser_direct_declarator): Do not prevent
7919         backtracking inside a parenthesized declarator.
7920         (cp_parser_parameter_declaration): Fix typo in comment.
7921
7922 2004-01-28  Jan Hubicka  <jh@suse.cz>
7923
7924         * semantics.c (expand_body)  Do emit_associated_thunks before
7925         expansion.
7926
7927 2004-01-27  Devang Patel  <dpatel@apple.com>
7928
7929         * name-lookup.c: Include "debug.h"
7930         (do_namespace_alias): Invoke debug_hooks to emit debug info
7931         for namespace alias.
7932         (do_local_using_decl): Invoke debug_hooks to emit debug info
7933         for using decl.
7934         (do_class_using_decl): Same.
7935         (do_toplevel_using_decl): Same.
7936         (do_using_directive): Same.
7937         (cp_emit_debug_info_for_using): New function.
7938         * Make-lang.in (cp/parser.o): Depend on debug.h
7939         (cp/name-lookup.o): Same.
7940
7941 2004-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7942
7943         * cp-tree.h (language_function, lang_type_header): Use
7944         BOOL_BITFIELD.
7945         * name-lookup.h (cp_binding_level): Likewise.
7946
7947 2004-01-26  Mark Mitchell  <mark@codesourcery.com>
7948
7949         PR c++/13663
7950         * semantics.c (finish_for_expr): Check for unresolved overloaded
7951         functions.
7952
7953         * class.c (add_method): Just check processing_template_decl to
7954         determine whether or not we are within a template.
7955         * decl2.c (maybe_retrofit_in_chrg): Likewise.
7956         * init.c (decl_constant_value): Check the type of the declaration,
7957         not TREE_READONLY.
7958         * name-lookup.c (maybe_push_to_top_level): Rename to ...
7959         (push_to_top_level): ... this.
7960         * name-lookup.h (maybe_push_to_top_level): Do not declare it.
7961         * pt.c (push_template_decl_real): Reorder condition for speed.
7962         (convert_template_argument): Use dependency-checking functions in
7963         place of uses_template_parms.
7964         (lookup_template_class): Avoid calling uses_template_parms more
7965         than once.
7966         (uses_template_parms): Reimplement, using dependency-checking
7967         functions.
7968         (instantiate_class_template): Use push_to_top_level, not
7969         maybe_push_to_top_level.
7970         (type_unification_real): Simplify.
7971         (type_dependent_expression_p): Handle OFFSET_REFs and
7972         TEMPLATE_DECLs.
7973         (any_dependent_template_arguments_p): Handle multiple levels of
7974         template argument.
7975         * semantics.c (expand_or_defer_fn): Do not check
7976         uses_template_parms for template instantiations.
7977         * typeck.c (comptypes): Avoid calling cp_type_quals.
7978
7979 2004-01-25  Mark Mitchell  <mark@codesourcery.com>
7980
7981         PR c++/13833
7982         * call.c (build_over_call): Do not convert arguments when
7983         processing a template.
7984         * pt.c (build_non_dependent_expr): Do not build a
7985         NON_DEPENDENT_EXPR for arithmetic constants.
7986
7987 2004-01-25  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7988
7989         PR c++/13810
7990         * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
7991         returns a TYPE_DECL. no further lookup is required.
7992         * semantics.c (check_template_template_default_arg): A TYPE_DECL
7993         is invalid. Rework to give better diagnostics.
7994
7995 2004-01-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7996
7997         PR c++/13797
7998         * pt.c (instantiate_class_template): Add an error_mark_node
7999         check.
8000         (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
8001
8002 2004-01-23  Andrew Pinski  <pinskia@physics.uc.edu>
8003
8004         PR c++/13701
8005         * decl.c (finish_function): Move the call to
8006         finish_fname_decls below the call to
8007         finish_eh_spec_block.
8008
8009 2004-01-21  Kazu Hirata  <kazu@cs.umass.edu>
8010
8011         * optimize.c, typeck2.c: Update copyright.
8012
8013 2004-01-21  Kazu Hirata  <kazu@cs.umass.edu>
8014
8015         * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
8016         init.c, mangle.c, typeck.c: Update copyright.
8017
8018 2004-01-21  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
8019
8020         * parser.c (cp_parser_class_specifier): Prevent garbage collection.
8021
8022 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
8023
8024         * Make-lang.in: Replace $(docdir) with doc.
8025         (c++.info, c++.srcinfo): Dummy entry.
8026         (c++.man, c++.srcman): New rules.
8027         (c++.install-man): Revamp rule.
8028
8029 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
8030
8031         * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
8032         CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
8033         immediate $(shell) instead of deferred backquote.
8034
8035 2004-01-19  Mark Mitchell  <mark@codesourcery.com>
8036
8037         PR c++/13651
8038         * parser.c (cp_parser_postfix_expression): When encountering
8039         incomplete type on left-hand side of "->" or ".", treat the entire
8040         expression as erroneous.
8041
8042         PR c++/13592
8043         * call.c (build_field_call): Remove.
8044         (n_build_method_call): Likewise.
8045         (build_method_call): Likewise.
8046         (build_new_method_call): Do not call build_field_call.
8047         * class.c (n_build_method_call): Remove.
8048         (print_class_statistics): Do not print it.
8049         * cp-tree.h (build_method_call): Remove declaration.
8050         (finish_object_call_expr): Likewise.
8051         (build_new_1): Do not use build_method_call.
8052         * parser.c (cp_parser_postfix_expression): Use finish_call_expr
8053         when the function appearing on the right-hand-side of "." or "->"
8054         is not actually a function.
8055         * pt.c (tsubst_copy_and_build): Likewise.
8056         * semantics.c (finish_object_call_expr): Remove.
8057
8058 2004-01-18  Mark Mitchell  <mark@codesourcery.com>
8059
8060         PR c++/13710
8061         * pt.c (tsubst): Use finish_typeof.
8062
8063 2004-01-18  Jason Merrill  <jason@redhat.com>
8064
8065         PR c++/11725
8066         * except.c (build_throw): In a template, set
8067         current_function_returns_abnormally.
8068
8069 2004-01-17  Fred Fish  <fnf@intrinsity.com>
8070
8071         PR c++/11895
8072         * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
8073         except don't call array_type_nelts() with a VECTOR_TYPE.
8074
8075 2004-01-16  Jan Hubicka  <jh@suse.cz>
8076
8077         * mangle.c (write_mangled_name): Remove inline modifier.
8078
8079 2004-01-16  Mark Mitchell  <mark@codesourcery.com>
8080
8081         PR c++/13574
8082         * decl.c (compute_array_index_type): Fix grammar in comment.
8083         * init.c (build_zero_init): Handle zero-sized arrays correctly.
8084
8085         PR c++/13178
8086         * call.c (name_as_c_string): Print conversion operator names
8087         correctly.
8088
8089         PR c++/13478
8090         * call.c (initialize_reference): Pass -1 for inner parameter to
8091         convert_like_real.
8092
8093 2004-01-15  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
8094
8095         PR c++/13407
8096         * parser.c (cp_parser_base_specifier): Check for an invalid
8097         keyword `typename' and emit an user-friendly error message.
8098
8099 2004-01-15  Geoffrey Keating  <geoffk@apple.com>
8100
8101         PR pch/13361
8102         * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
8103         (handle_pragma_implementation): Likewise.
8104
8105 2004-01-15  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
8106
8107         PR c++/9259
8108         * typeck.c (build_class_member_access_expr): Allow to access members
8109         of the currently open class.
8110         (finish_class_member_access_expr): Likewise.
8111
8112 2004-01-15  Alexandre Oliva  <aoliva@redhat.com>
8113
8114         PR c++/13659
8115         * name-lookup.c (validate_nonmember_using_decl): Take scope and
8116         name by value, instead of computing them.
8117         (do_local_using_decl, do_toplevel_using_decl): Add scope and name
8118         arguments.  Pass them to validate_nonmember_using_decl.
8119         * name-lookup.h (do_local_using_decl): Adjust.
8120         (do_toplevel_using_decl): Likewise.
8121         * parser.c (cp_parser_using_declaration): Likewise.
8122         * pt.c (tsubst_expr): Likewise.
8123
8124 2004-01-15  Alexandre Oliva  <aoliva@redhat.com>
8125
8126         PR c++/13594
8127         PR c++/13658
8128         * name-lookup.c (qualified_lookup_using_namespace): Search
8129         strongly-associated namespaces first, and only then try other
8130         namespaces.
8131
8132 2004-01-15  Kelley Cook  <kcook@gcc.gnu.org>
8133
8134         * Make-lang.in (c++.srcextra): Dummy entry.
8135
8136 2004-01-15  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
8137
8138         PR c++/8856
8139         * parser.c (cp_parser_template_name): Don't try to parse a
8140         conversion-function-id, as it cannot be a template-name.
8141         (cp_parser_simple_type_specifier): Check for invalid template-ids
8142         even after a built-in type.
8143
8144 2004-01-14  Jan Hubicka  <jh@suse.cz>
8145
8146         PR c++/12850
8147         * pt.c (instantiate_decl):  Do not increase function_depth.
8148
8149 2004-01-14  Danny Smith  <dannysmith@users,sourceforge.net>
8150
8151         PR c++/9021
8152         PR c++/11005
8153         * parser.c (cp_parser_elaborated_type_specifier): Warn about
8154         attributes and discard.
8155         * decl.c (xref_tag): Don't overwite existing attributes with
8156         NULL_TREE.
8157
8158 2004-01-14  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
8159
8160         PR c++/12335
8161         * parser.c (cp_parser_lookup_name): Return error_mark_node if there
8162         is no destructor while looking up a BIT_NOT_EXPR.
8163
8164 2004-01-13  Ian Lance Taylor  <ian@wasabisystems.com>
8165
8166         * cxxfilt.c: Remove unused file.
8167
8168 2004-01-14  Jan Hubicka  <jh@suse.cz>
8169
8170         Partial fix to PR c++/12850
8171         * decl2.c (mark_used): Do not proactively instantiate templates
8172         when compiling in unit-at-a-time or not optimizing.
8173         * optimize.c (maybe_clone_body): Do not increase function depth.
8174
8175 2004-01-13  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
8176
8177         PR c++/13474
8178         * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
8179
8180 2004-01-12  Steven Bosscher  <stevenb@suse.de>
8181
8182         PR c++/13558
8183         * parser.c (cp_parser_member_declaration): Any non-type is also
8184         not a class or a function.
8185
8186 2004-01-12  Jason Merrill  <jason@redhat.com>
8187
8188         PR c++/12815
8189         * class.c (build_base_path): Do not mark vtable references as
8190         TREE_CONSTANT.
8191         (build_vtbl_ref_1): Likewise.
8192
8193 2004-01-12  Richard Henderson  <rth@redhat.com>
8194
8195         PR opt/10776
8196         * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
8197         (store_init_value): Use it.
8198         * decl.c (check_initializer): Expect full initialization code
8199         from store_init_value.
8200         * init.c (expand_aggr_init_1): Likewise.
8201         * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
8202
8203 2004-01-12  Mark Mitchell  <mark@codesourcery.com>
8204
8205         * class.c (layout_class_type): For non-POD class types, also copy
8206         the DECL_SIZE and DECL_MODE of fields to the base class type.
8207
8208 2004-01-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8209
8210         PR c++/13289
8211         * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
8212         calling regenerate_decl_from_template.
8213
8214 2004-01-12  Scott Brumbaugh  <scottb.lists@verizon.net>
8215
8216         PR c++/4100
8217         * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
8218         decl-specifier occurring along with a class definition.
8219
8220 2004-01-12  Ian Lance Taylor  <ian@wasabisystems.com>
8221
8222         * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
8223         clauses to comments describing declares_class_or_enum.
8224         (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
8225         false.
8226
8227 2004-01-12  Jan Hubicka  <jh@suse.cz>
8228
8229         * pt.c (for_each_template_parm): Do not check for duplicates.
8230         (for_each_template_parm): Use walk_tree duplicate checking code.
8231
8232 2004-01-11  Ian Lance Taylor  <ian@wasabisystems.com>
8233
8234         PR c++/3478
8235         * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
8236         is error_mark_node, don't add any more decl_specs.
8237         (cp_parser_init_declarator): After committing to a declaration, if
8238         the decl_specifiers start with error_mark_node, issue an error and
8239         change the type to "int".
8240
8241 2004-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
8242
8243         PR bootstrap/7817
8244         * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
8245
8246 2004-01-10  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
8247
8248         DR 337
8249         PR c++/9256
8250         * pt.c (tsubst): Substitution must fail if we are attempting to
8251         create an array with element type that is an abstract class type.
8252         * decl.c (cp_finish_decl): Strip pointers and array types recursively
8253         before calling abstract_virtuals_error.
8254
8255 2004-01-09  Alexandre Oliva  <aoliva@redhat.com>
8256
8257         * name-lookup.c (qualified_lookup_using_namespace): Consider
8258         strong using directives even if we've already found a binding.
8259
8260 2004-01-09  Mark Mitchell  <mark@codesourcery.com>
8261
8262         * cp-tree.h (cxx_expand_expr): Change prototype.
8263         * expr.c (cxx_expand_expr): Add alt_rtl parameter.
8264
8265 2004-01-08  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
8266
8267         PR c++/12573
8268         * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
8269         looking into them recursively. They can be there because of the
8270         new __offsetof__ extension.
8271
8272 2004-01-07  Zack Weinberg  <zack@codesourcery.com>
8273
8274         * parser.c (cp_parser_save_member_function_body): Mark the
8275         definition static.
8276
8277 2004-01-05  Mark Mitchell  <mark@codesourcery.com>
8278
8279         PR c++/13057
8280         * class.c (build_clone): Copy type attributes from the original
8281         function to the clone.
8282
8283         PR c++/12815
8284         * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
8285         references as constant.
8286
8287         PR c++/12132
8288         * parser.c (cp_parser_explicit_instantiation): Improve error
8289         recovery.
8290         (cp_parser_require): Improve indication of the error location.
8291
8292         PR c++/13451
8293         * parser.c (cp_parser_class_head): Reorder logic to check for
8294         invalid qualification.
8295
8296 2004-01-04  Mark Mitchell  <mark@codesourcery.com>
8297
8298         PR c++/13157
8299         * name-lookup.c (lookup_using_namespace): Remove spacesp
8300         parameter.
8301         (unqualified_namespace_lookup): Likewise.
8302         (lookup_qualified_name): Adjust accordingly.
8303         (lookup_name_real): Likewise.
8304         (lookup_arg_dependent): Do not eliminate the namespace of the
8305         functions found by unqualified name lookup unless that is the
8306         current namespace.
8307
8308 2004-01-04  Andrew Pinski  <pinskia@physics.uc.edu>
8309
8310         * semantics.c (push_deferring_access_checks): Fix format.
8311         (resume_deferring_access_checks): Likewise.
8312         (stop_deferring_access_checks): Likewise.
8313         (pop_deferring_access_checks): Likewise.
8314         (get_deferred_access_checks): Likewise.
8315         (pop_to_parent_deferring_access_checks): Likewise.
8316         (perform_deferred_access_checks): Likewise.
8317         (perform_or_defer_access_check): Likewise.
8318
8319 2004-01-04  Richard Henderson  <rth@redhat.com>
8320
8321         * call.c (build_over_call): Don't create a save_expr of an
8322         aggregate, but rather its address.
8323
8324 2004-01-04  Mark Mitchell  <mark@codesourcery.com>
8325
8326         PR c++/13529
8327         * parser.c (cp_parser_postfix_expression): Allow "." to appear in
8328         an offsetof expression.
8329
8330         * parser.c (cp_parser_parameter_declaration): Fix comment.
8331
8332         PR c++/12226
8333         * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
8334         (reference_binding): Set it when appropriate.
8335         (build_temp): New function, split out from ...
8336         (convert_like_real): ... here.  Honor CHECK_COPY_CONSTRUCTOR_P.
8337         (initialize_reference): Likewise.
8338
8339         PR c++/13536
8340         * parser.c (cp_parser): Add in_type_id_in_expr_p.
8341         (cp_parser_new): Initialize it.
8342         (cp_parser_postfix_expression): Set it.
8343         (cp_parser_sizeof_operand): Likewise.
8344         (cp_parser_parameteR_declaration): Do not commit early to tenative
8345         parsers when in_type_id_in_expr_p is set.
8346
8347 2004-01-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8348
8349         PR c++/13094
8350         * parser.c (cp_parser_template_argument): Don't call
8351         make_unbound_class_template directly.
8352         (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
8353         UNBOUND_CLASS_TEMPLATE tree node.
8354
8355 2004-01-02  Richard Sandiford  <rsandifo@redhat.com>
8356
8357         PR target/12729
8358         * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
8359
8360 2004-01-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8361
8362         PR c++/13520
8363         * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
8364         (DECL_FUNCTION_TEMPLATE_P): Use it.
8365         (DECL_CLASS_TEMPLATE_P): Likewise.
8366         * parser.c (cp_parser_lookup_name): Add is_template parameter.
8367         (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
8368         (cp_parser_template_name): Likewise.
8369         (cp_parser_elaborated_type_specifier): Likewise.
8370         (cp_parser_namespace_name): Likewise.
8371         (cp_parser_class_name): Likewise.
8372         (cp_parser_lookup_name_simple): Likewise.
8373
8374 See ChangeLog.3 for earlier changes.