OSDN Git Service

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