OSDN Git Service

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