OSDN Git Service

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