OSDN Git Service

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