OSDN Git Service

2005-07-08 Daniel Berlin <dberlin@dberlin.org>
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2005-07-08  Daniel Berlin  <dberlin@dberlin.org>
2         
3         * Make-lang.in: Add gt-cp-lang.h.
4         (cp-lang.o): Ditto.     
5         * class.c (create_vtable_ptr): Stop setting DECL_ASSEMBLER_NAME on
6         the field.
7         * config-lang.in: Add cp-lang.c to gtfiles.
8         * cp-lang.c: Include hashtab.h.
9         (cp_init_ts): New function.
10         (LANG_HOOK_INIT_TS): Use macro.
11         (decl_shadowed_for_var_lookup): New function.
12         (decl_shadowed_for_var_insert): Ditto.
13         * cp-tree.h (THUNK_FUNCTION_CHECK): Use decl_common.
14         (NON_THUNK_FUNCTION_CHECK): Ditto.
15         (DECL_NAMESPACE_ASSOCIATIONS): Use decl_non_common.
16         (DECL_INIT_PRIORITY): Ditto.
17         (DECL_HAS_SHADOWED_FOR_VAR_P): Ditto.
18         (DECL_SHADOWED_FOR_VAR): Use hashtable.
19         (SET_DECL_SHADOWED_FOR_VAR): Ditto.
20         * decl.c (duplicate_decls): Update for new/updated structures.
21         (poplevel): Use SET_DECL_SHADOWED_FOR_VAR.
22         * decl2.c (start_static_initialization_or_destruction): Deal with
23         priority. 
24         * pt.c (tsubst_decl): Check TS_DECL_WRTL before doing
25         SET_DECL_RTL.
26         * tree.c (handle_init_priority_attribute): Handle priority.
27
28 2005-07-08  Nathan Sidwell  <nathan@codesourcery.com>
29
30         PR c++/21799
31         * pt.c (type_unification_real): Add is_method argument.  Use it
32         for this pointer unification.
33         (fn_type_unification): Adjust type_unification_real call.
34         (unify): Likewise.
35
36 2005-07-07  Nathan Sidwell  <nathan@codesourcery.com>
37
38         * pt.c (type_unification_real): Remove allow_incomplete argument.
39         Remove unreachable code.
40         (fn_type_unification): Adjust call to type_unification_real.
41         (unify): Likewise.
42
43 2005-07-05  Paolo Bonzini  <bonzini@gnu.org>
44
45         * Makefile.in (class.o, decl2.o): Adjust dependencies.
46         * class.c: Include tree-dump.h.
47         * decl2.c: Include tree-dump.h.
48         
49 2005-07-02  Gabriel Dos Reis  <gdr@integrable-solutions.net>
50
51         * dump.c: Use dump_string_field.
52
53 2005-07-03  Joseph S. Myers  <joseph@codesourcery.com>
54
55         * cp-tree.h (GCC_DIAG_STYLE): #undef before defining.  Change
56         minimum GCC version for format checking to 4.1.
57
58 2005-07-02  Kazu Hirata  <kazu@codesourcery.com>
59
60         * Make-lang.in (cc1plus-checksum.c): Use
61         build/genchecksum$(build_exeext), not build/genchecksum$(exeext).
62
63 2005-07-02  Joseph S. Myers  <joseph@codesourcery.com>
64
65         * name-lookup.c, parser.c: Use %q, %< and %> to quote in
66         diagnostics.
67
68 2005-07-02  Zack Weinberg  <zack@codesourcery.com>
69             Joseph S. Myers  <joseph@codesourcery.com>
70
71         * error.c (location_of): Add comment.
72         (locate_error, cp_error_at, cp_warning_at, cp_pedwarn_at): Remove.
73         * cp-tree.h (cp_error_at, cp_warning_at, cp_pedwarn_at): Remove.
74         * call.c, class.c, decl.c, decl2.c, friend.c, init.c,
75         name-lookup.c, parser.c, pt.c, search.c, semantics.c, typeck.c,
76         typeck2.c: Use '+' flag instead of %J, cp_error_at, cp_warning_at
77         or cp_pedwarn_at.  Mark up some diagnostic strings with N_.
78
79 2005-06-30  Daniel Berlin  <dberlin@dberlin.org> 
80         
81         * decl.c (require_complete_types_for_parms): Call relayout_decl
82         instead of layout_decl.
83
84 2005-06-30  Zack Weinberg  <zack@codesourcery.com>
85             Jakub Jelinek  <jakub@redhat.com>
86
87         * cp-lang.c: No need to include cxx-pretty-print.h.
88         * error.c (cp_printer): Update signature.  No need to process
89         flags.
90         (print_instantiation_partial_context): Output last newline
91         with pp_base_newline.
92         * Make-lang.in: Update dependencies.
93
94 2005-06-30  Steven Bosscher  <stevenb@suse.de>
95
96         * decl.c (start_decl): Replace DECL_THREAD_LOCAL with
97         DECL_THREAD_LOCAL_P.
98         (cp_finish_decl): Likewise.
99         (grokvardecl): Set the default DECL_TLS_MODEL here.
100
101 2005-06-28  Joseph S. Myers  <joseph@codesourcery.com>
102
103         * cvt.c (ocp_convert): Use invalid_conversion hook.
104         * typeck.c (build_binary_op): Use invalid_binary_op hook.
105         (build_unary_op): Use invalid_unary_op hook.
106
107 2005-06-28  Paul Brook  <paul@codesourcery.com>
108
109         * Make-lang.in (cp/except.o): Depend on $(TARGET_H)
110         * except.c: Include target.h.
111         (init_exception_processing): Initialize unwind_resume_libfunc.
112         * doc/tm.texi: Document TARGET_ASM_TTYPE
113
114 2005-06-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
115
116         * call.c (build_over_call): Pass in named argument list to
117         `check_function_arguments'.
118         * typeck.c (build_function_call): Likewise.
119
120 2005-06-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
121
122         * cp-tree.h (lang_check_failed): Add noreturn attribute.
123
124 2005-06-25  Kelley Cook  <kcook@gcc.gnu.org>
125
126         * all files: Update FSF address in copyright headers.
127
128 2005-06-23  Jason Merrill  <jason@redhat.com>
129
130         PR c++/19317
131         * semantics.c (simplify_aggr_init_expr): Use
132         CALL_EXPR_RETURN_SLOT_OPT, not CALL_EXPR_HAS_RETURN_SLOT_ADDR.
133
134 2005-06-23  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
135
136         * pt.c (register_specialization): Remove superfluous assertion.
137
138 2005-06-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
139
140         * call.c (convert_like_real): Add format attribute.
141         * typeck.c (check_for_casting_away_constness,
142         build_static_cast_1): Likewise.
143         * typeck2.c (readonly_error, cxx_incomplete_type_diagnostic):
144         Likewise.
145
146 2005-06-17  Geoffrey Keating  <geoffk@apple.com>
147
148         PR c++/17413
149         * pt.c (type_unification_real): Apply template type deduction even
150         to procedure parameters that are not dependent on a template
151         parameter.
152
153 2005-06-16  Nathan Sidwell  <nathan@codesourcery.com>
154
155         * rtti.c (get_tinfo_decl): Avoid caching tinfo_descs when it might
156         change.
157         (create_pseudo_type_info): First parameter is an int.
158
159 2005-06-15  Aldy Hernandez  <aldyh@redhat.com>
160
161         * typeck.c (build_binary_op): Same.
162         * testsuite/g++.dg/conversion/simd3.C: New.
163
164 2005-06-15  Nathan Sidwell  <nathan@codesourcery.com>
165
166         PR c++/20678
167         * error.c (dump_expr) <COMPONENT_REF case>: Check DECL_NAME is not
168         null.
169
170         * Make-lang.in: Reformat some long lines.
171         (gt-cp-rtti.h): New target.
172         (cp/rtti.o): Add dependency.
173         * config-lang.in (gtfiles): Add cp/rtti.c.
174         * cp-tree.h (CPTI_TI_DESC_TYPE, CPTI_BLTN_DESC_TYPE,
175         CPTI_PTR_DESC_TYPE, CPTI_ARY_DESC_TYPE, CPTI_FUNC_DESC_TYPE,
176         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE,
177         CPTI_SI_CLASS_DESC_TYPE, CPTI_VMI_CLASS_DESC_TYPE,
178         CPTI_PTM_DESC_TYPE, CPTI_BASE_DESC_TYPE): Remove.
179         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
180         ary_desc_type_node, func_desc_type_node, enum_desc_type_node,
181         class_desc_type_node, si_class_desc_type_node,
182         vmi_class_desc_type_node, ptm_desc_type_node,
183         base_desc_type_node): Remove.
184         * decl.c: Adjust documentation of global trees.
185         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL,
186         TINFO_REAL_NAME): Remove.
187         (struct tinfo_s): New.
188         (enum tinfo_kind): New.
189         (tinfo_descs): New.
190         (get_tinfo_decl): Adjust use of tinfo descriptor.
191         (tinfo_base_init, generic_initializer, ptr_initializer,
192         ptm_initializer, class_initializer): Likewise.
193         (get_pseudo_ti_init): Take descriptor index. Adjust.
194         (create_pseudo_type_info): Likewise.
195         (get_pseudo_ti_desc): Return descriptor index. Adjust.
196         (create_tinfo_types): Adjust use of create_pseudo_type_info.
197         (emit_tinfo_decl): Adjust use of tinfo descriptor.
198
199 2005-06-14  Roger Sayle  <roger@eyesopen.com>
200
201         * decl.c (grokdeclarator): Only check TREE_OVERFLOW on INTEGER_CST.
202
203 2005-06-13  Geoffrey Keating  <geoffk@apple.com>
204
205         * Make-lang.in (c++.install-man): Doesn't really depend on installdirs.
206         (rule for installing g++.1 manpage): Does depend on installdirs.
207
208 2005-06-13  Nathan Sidwell  <nathan@codesourcery.com>
209
210         PR c++/20789
211         * decl.c (cp_finish_decl): Clear runtime runtime initialization if
212         in-class decl's initializer is bad.
213
214         PR c++/21929
215         * parser.c (struct cp_parser): Document that scope could be
216         error_mark.
217         (cp_parser_diagnose_invalid_type_name): Cope with error_mark for
218         scope.
219         (cp_parser_nested_name_specifier): Return NULL_TREE on error.
220         (cp_parser_postfix_expression): Deal with null or error_mark
221         scope.
222         (cp_parser_elaborated_type_specifier): Adjust
223         cp_parser_nested_name_specifier call.
224
225         * parser (cp_parser_skip_to_end_of_block_or_statement): Cleanup.
226
227 2005-06-12  Roger Sayle  <roger@eyesopen.com>
228
229         PR c++/21930
230         * error.c (dump_expr): UNARY_PLUS_EXPR need not handle void types.
231         Treat CONVERT_EXPR identically to NOP_EXPR.
232
233 2005-06-10  Aldy Hernandez  <aldyh@redhat.com>
234
235         PR c++/10611
236         * cvt.c (build_expr_type_conversion): Same.
237         * typeck.c (build_binary_op): Handle vectors.
238         (common_type): Same.
239         (type_after_usual_arithmetic_conversions): Same.
240         * testsuite/g++.dg/conversion/simd2.C: New.
241
242 2005-06-08  Nathan Sidwell  <nathan@codesourcery.com>
243
244         PR c++/19497
245         * cp-tree.def (USING_DECL): Update documentation.
246         * cp-tree.h (DECL_DEPENDENT_P): New.
247         (USING_DECL_DECLS, USING_DECL_SCOPE): New.
248         * class.c (handle_using_decl): Move most of the processing to ...
249         * name-lookup.c (do_class_using_decl): ... here.  Make stricter.
250         (push_using_decl): Use USING_DECL_SCOPE.
251         (cp_emit_debug_info_for_using): Make extern.
252         * cxx-pretty-print.c (pp_cxx_statement) <USING_DECL case>: Adjust.
253         * name-lookup.h (cp_emit_debug_info_for_using): Declare.
254         * pt.c (tsubst_decl) <USING_DECL case>: Use do_class_using_decl
255         when tsubsting.
256         (tsubst_expr): Use USING_DECL_SCOPE.
257         * search.c (lookup_field_1): Use DECL_DEPENDENT_P.
258         * semantics.c (finish_member_declaration): Likewise.
259
260 2005-06-08  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
261
262         PR c++/19894
263         * pt.c (tsubst): Reject pointer-to-member of type void.
264
265         PR c++/20563
266         * parser.c (cp_parser_label_declaration): Deal with invalid/missing
267         identifiers.
268
269 2005-06-07  Nathan Sidwell  <nathan@codesourcery.com>
270
271         * cp-tree.def (DEFAULT_ARG): Adjust documentation.
272         * cp-tree.h (DEFARG_INSTANTIATIONS): New.
273         (struct tree_default_arg): Add instantiations member.
274         * parser.c (cp_parser_late_parsing_default_args): Adjust to use a
275         VEC.
276         * pt.c (tsubst_arg_types): Likewise.
277
278         * parser.c (cp_parser_late_parsing_default_args): Fix overeager
279         assert in previous patch.
280
281 2005-06-06  Jakub Jelinek  <jakub@redhat.com>
282
283         * error.c (locate_error): Use gmsgid instead of msgid for argument
284         name.
285         (cp_error_at, cp_warning_at, cp_pedwarn_at): Likewise.
286
287 2005-06-06  Nathan Sidwell  <nathan@codesourcery.com>
288
289         PR 21903
290         * cp-tree.def (DEFAULT_ARG): Document TREE_CHAIN use.
291         * parser.c (cp_parser_late_parsing_default_args): Propagate parsed
292         argument to any early instantiations.
293         * pt.c (tsubst_arg_types): Chain early instantiation of default arg.
294
295         PR c++/20637
296         * cp-tree.h (add_method): Add using_decl parameter.
297         * class.c (add_method): Add using_decl parameter.  Adjust error
298         messages.
299         (handle_using_decl): Pass the using decl to add_method.
300         (clone_function_decl): Adjust add_member calls.
301         * decl2.c (check_classfn): Likewise.
302         * method.c (lazily_declare_fn): Likewise.
303         * semantics.c (finish_member_declaration): Likewise.
304
305         * method.c (synthesize_method): Use inform, not warning.
306
307 2005-06-06  Hans-Peter Nilsson  <hp@axis.se>
308
309         * config-lang.in (target_libs): Remove target-gperf.
310
311 2005-06-05  Mark Mitchell  <mark@codesourcery.com>
312
313         PR c++/21619
314         * cp-tree.h (DECL_IS_BUILTIN_CONSTANT_P): New macro.
315         * parser.c (cp_parser_postfix_expression): Allow non-constant
316         expressions as arguments to __builtin_constant_p.
317         * tree.c (builtin_valid_in_constant_expr_p): Use
318         DECL_IS_BUILTIN_CONSTANT_P.
319
320 2005-06-03  Mark Mitchell  <mark@codesourcery.com>
321
322         PR c++/21853
323         * typeck.c (casts_away_constness_r): Do not drop cv-qualifiers on
324         the pointed-to type for a pointer-to-member.
325
326         PR c++/21336
327         * cp-tree.h (grok_op_properties): Remove friendp parameter.
328         * decl.c (grokfndecl): Adjust call.
329         (grok_op_properties): Determine the class of which the function is
330         a member by looking at its DECL_CONTEXT, not current_class_type.
331         * pt.c (tsubst_decl): Adjust call to grok_op_properties.
332
333 2005-06-02  Nathan Sidwell  <nathan@codesourcery.com>
334
335         * method.c (synthesize_method): Add addtional arg to warning call.
336
337         PR c++/21280
338         * Make-lang.in (method.o): Add diagnostic.h
339         * decl.c (start_preparsed_function): Use decl's location for file
340         info.
341         * decl2.c (cp_finish_file): Set input_location before synthesizing
342         a function.
343         (mark_used): When deferring a synthesized function, save current
344         location.  Do not set function's location when actually
345         synthesizing it.
346         * method.c: #include diagnostic.h.
347         (synthesize_method): Set the functions source location.  Show
348         needed location if errors are emitted.
349
350         * decl.c (start_decl): Simplify specialization handling. Remove
351         unneeded CLASSTYPE_TEMPLATE_INSTANTIATION check.
352         * mangle.c (discriminator_for_local_entity): Use VEC_index.
353
354         PR c++/20350
355         * decl.c (duplicate_decls): Copy all of DECL_USE_TEMPLATE.
356
357         PR c++/21151
358         * name-lookup.c (pushtag): Push local class even in a template.
359
360 2005-05-31  Nathan Sidwell  <nathan@codesourcery.com>
361
362         PR c++/21165
363         * init.c (integral_constant_value): Check the type of the
364         initializer, not the decl.
365
366 2005-05-30  Mark Mitchell  <mark@codesourcery.com>
367
368         PR c++/21784
369         * name-lookup.c (do_nonmember_using_decl): Ignore builtin
370         functions, even when the used name is not a function.
371
372 2005-05-30  Kazu Hirata  <kazu@cs.umass.edu>
373
374         * operators.def, optimize.c: Update copyright.
375
376 2005-05-28  Mark Mitchell  <mark@codesourcery.com>
377
378         PR c++/21210
379         * call.c (standard_conversion): Permit conversions to complex
380         types if conversion to the corresponding scalar type would be
381         permitted.
382
383         PR c++/21340
384         * method.c (implicitly_declare_fn): Clear processing_template_decl
385         when generating implicit declaration.
386
387 2005-05-27  Mark Mitchell  <mark@codesourcery.com>
388
389         PR c++/21614
390         * typeck.c (get_member_function_from_ptrfunc): Do not attempt
391         conversions to base classes of incomplete types.
392
393 2005-05-27  Ian Lance Taylor  <ian@airs.com>
394
395         * semantics.c (add_stmt): Add C++ frontend specific version.
396         * cp-tree.h (STMT_IS_FULL_EXPR_P): Define.
397         (stmts_are_full_exprs_p): Declare.
398
399 2005-05-27  Roger Sayle  <roger@eyesopen.com>
400             Giovanni Bajo  <giovannibajo@gcc.gnu.org>
401
402         * cp-tree.def (UNARY_PLUS_EXPR): New C++ unary tree code.
403         * parser.c (cp_parser_unary_expression): Use UNARY_PLUS_EXPR instead
404         of CONVERT_EXPR.
405         (cp_parser_unary_expression): Likewise.
406         * typeck.c (build_unary_op): Likewise.
407         * call.c (add_builtin_candidate, build_new_op): Likewise.
408         * error.c (dump_expr): Likewise.
409         * pt.c (tsubst_copy, tsubst_copy_and_build): Likewise.
410         * decl.c (ambi_op_p, grok_op_properties): Likewise.
411         * dump.c (dump_op): Likewise.
412         * lex.c (init_operators): Likewise.
413         * operators.def ("+"): Likewise.
414         * cp-gimplify.c (cp_gimplify_expr): Handle UNARY_PLUS_EXPR like a
415         conversion, if the result and argument types differ.
416         * tree.c (fold_if_not_in_template): Fold UNARY_PLUS_EXPR much
417         like a NOP_EXPR when !processing_template_decl.
418
419         * cxx-pretty-print.c (pp_cxx_cast_expression): Prototype.
420         (pp_cxx_unary_expression): Handle new UNARY_PLUS_EXPR tree code.
421
422 2005-05-27  Nathan Sidwell  <nathan@codesourcery.com>
423
424         PR c++/21455
425         * typeck.c (get_delta_difference): Cope with incomplete but equal
426         classes.  Reorder if.
427
428         PR c++/21681
429         * parser.c (cp_parser_late_parsing_for_member): Disable access
430         checking for template functions.
431
432 2005-05-26  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
433
434         PR c++/21768
435         * pt.c (redeclare_class_template): Change error message according
436         to coding conventions.
437
438 2005-05-26  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
439
440         * call.c (build_op_delete_call): Fix quoting in error message.
441
442 2005-05-25  Richard Henderson  <rth@redhat.com>
443
444         PR libgcj/21692
445         * cp-tree.h (make_alias_for): Declare.
446         * decl2.c (build_java_method_aliases): New.
447         (cp_finish_file): Call it.
448         * method.c (make_alias_for): Split out from ...
449         (make_alias_for_thunk): ... here.
450
451 2005-05-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
452
453         PR c++/21686
454         * semantics.c (finish_id_expression): Fix quoting in error message.
455
456 2005-05-25  DJ Delorie  <dj@redhat.com>
457
458         * decl.c (duplicate_decls): Move warning control from if() to
459         warning(OPT_*).
460         * name-lookup.c (parse_using_directive): Likewise.
461         * parser.c (cp_parser_elaborated_type_specifier): Likewise.
462         (cp_parser_init_declarator): Likewise.
463         * tree.c (handle_com_interface_attribute): Likewise.
464
465 2005-05-24  Ziemowit Laski  <zlaski@apple.com>
466
467         * class.c (layout_class_type): Do not issue C++ ABI warnings
468         for ObjC structs.
469         * decl.c (objc_mark_locals_volatile): Streamline by calling
470         objc_volatilize_decl().
471         * parser.c (cp_parser_objc_message_expression): Allow simple
472         type specifiers (instead of merely type names) as message
473         receivers.
474         * pt.c (template_args_equal): Do not call objc_comptypes().
475         * typeck.c (composite_pointer_type): If both pointers are
476         ObjC-esque, arbitrarily choose the first; do not call
477         objc_comptypes().
478         (comptypes): Do not call objc_comptypes().
479         (convert_for_assignment): Call objc_compare_types().
480         (comp_ptr_ttypes_real): Call objc_type_quals_match() before
481         concluding that types do not match.
482
483 2005-05-24  Andrew Pinski  <pinskia@physics.uc.edu>
484
485         PR C++/21645
486         * optimize.c (update_cloned_parm): Copy the TYPE also from the
487         original one.
488
489 2005-05-19  Jakub Jelinek  <jakub@redhat.com>
490
491         PR c++/21495
492         * decl.c (grokdeclarator): Fix "storage class specified for"
493         error reporting.
494
495 2005-05-19  Kazu Hirata  <kazu@cs.umass.edu>
496
497         * parser.c: Fix comment typos.
498
499 2005-05-18  Geoffrey Keating  <geoffk@apple.com>
500
501         * Make-lang.in (cc1plus-dummy): New.
502         (cc1plus-checksum.c): New.
503         (cc1plus-checksum.o): New.
504         (cc1plus): Add cc1plus-checksum.o.
505
506 2005-05-17  H.J. Lu  <hongjiu.lu@intel.com>
507
508         PR C++/19664
509         * decl2.c (determine_visibility): Don't set visibility to
510         hidden if it has been set explicitly by user.
511
512 2005-05-17  Ziemowit Laski  <zlaski@apple.com>
513             Mike Stump  <mrs@apple.com>
514
515         Yet more Objective-C++...
516
517         * cp-objcp-common.h (cxx_get_alias_set): Move from
518         here...
519         (cxx_warn_unused_global_decl): Likewise.
520         (cp_expr_size): Likewise.
521         (cp_tree_size): Likewise.
522         (cp_var_mod_type_p): Likewise.
523         (cxx_initialize_diagnostics): Likewise.
524         (cxx_types_compatible_p): Likewise.
525         * cp-tree.h: to here.
526         (do_poplevel): Add.
527         * lex.c (D_OBJC): Add.
528         (init_reswords): Add.
529         * Make-lang.in (cp/pt.o): Add cp/cp-objcp-common.h.
530         * parser.c: Add c-common.h include.
531         * pt.c: Add c-common.h and cp-objcp-common.h includes.
532         (template_args_equal): Use objc_comptypes as well.
533         (tsubst_copy_and_build): Use objcp_tsubst_copy_and_build as well.
534         * semantics.c (do_poplevel): Remove static.
535
536         * decl.c (objc_mark_locals_volatile): Don't change decls that are
537         already ok.
538         * decl2.c (generate_ctor_or_dtor_function): Add code to initialize
539         Objective C++ early enough.
540         * lex.c (struct resword reswords): Add Objective-C++ support.
541         * parser.c (cp_lexer_get_preprocessor_token): Add Objective-C++.
542         (cp_parser_objc_message_receiver): Add.
543         (cp_parser_objc_message_args): Likewise.
544         (cp_parser_objc_message_expression): Likewise.
545         (cp_parser_objc_encode_expression): Likewise.
546         (cp_parser_objc_defs_expression): Likewise.
547         (cp_parser_objc_protocol_expression): Likewise.
548         (cp_parser_objc_selector_expression): Likewise.
549         (cp_parser_objc_expression): Likewise.
550         (cp_parser_objc_visibility_spec): Likewise.
551         (cp_parser_objc_method_type): Likewise.
552         (cp_parser_objc_protocol_qualifiers): Likewise.
553         (cp_parser_objc_typename): Likewise.
554         (cp_parser_objc_selector_p): Likewise.
555         (cp_parser_objc_selector): Likewise.
556         (cp_parser_objc_method_keyword_params): Likewise.
557         (cp_parser_objc_method_tail_params_opt): Likewise.
558         (cp_parser_objc_interstitial_code): Likewise.
559         (cp_parser_objc_method_signature): Likewise.
560         (cp_parser_objc_method_prototype_list): Likewise.
561         (cp_parser_objc_method_definition_list): Likewise.
562         (cp_parser_objc_class_ivars): Likewise.
563         (cp_parser_objc_identifier_list): Likewise.
564         (cp_parser_objc_alias_declaration): Likewise.
565         (cp_parser_objc_class_declaration): Likewise.
566         (cp_parser_objc_protocol_declaration): Likewise.
567         (cp_parser_objc_protocol_refs_opt): Likewise.
568         (cp_parser_objc_superclass_or_category): Likewise.
569         (cp_parser_objc_class_interface): Likewise.
570         (cp_parser_objc_class_implementation): Likewise.
571         (cp_parser_objc_end_implementation): Likewise.
572         (cp_parser_objc_declaration): Likewise.
573         (cp_parser_objc_try_catch_finally_statement): Likewise.
574         (cp_parser_objc_synchronized_statement): Likewise.
575         (cp_parser_objc_throw_statement): Likewise.
576         (cp_parser_objc_statement): Likewise.
577         (cp_parser_primary_expression): Add Objective-C++.
578         (cp_parser_statement): Likewise.
579         (cp_parser_declaration): Likewise.
580         (cp_parser_simple_type_specifier): Likewise.
581         (cp_parser_type_name): Likewise.
582         (cp_parser_parameter_declaration_list): Likewise.
583         (cp_parser_member_declaration) Likewise.
584         * tree.c: Include debug.h.
585         * typeck.c (composite_pointer_type): Add Objective-C++ support.
586         (finish_class_member_access_expr): Likewise.
587         (build_function_call): Allow objc to rewrite FUNCTION_DECLs.
588         (build_modify_expr): Allow objc to generate write barriers.
589
590         * Make-lang.in (cp/tree.o): Add debug.h.
591         * tree.c (lvalue_p_1, case CONST_DECL): Add.
592
593 2005-05-18  Jan Hubicka  <jh@suse.cz>
594
595         * method.c: Include tree-pass.h
596         (use_thunk): Lower body before expanding.
597
598 2005-05-17  Jakub Jelinek  <jakub@redhat.com>
599
600         PR c++/21454
601         * decl.c (maybe_deduce_size_from_array_init): Call
602         cp_apply_type_quals_to_decl after completing array type.
603
604 2005-05-16  Richard Henderson  <rth@redhat.com>
605
606         * decl.c (build_library_fn_1): Move setting TREE_NOTHROW ...
607         (build_library_fn): ... here.
608
609 2005-05-12  Ian Lance Taylor  <ian@airs.com>
610
611         * cp-tree.h (cp_stmt_codes): Don't define.
612         (statement_code_p): Declare.
613         (STATEMENT_CODE_P): Define.
614         * lex.c (statement_code_p): Define.
615         (cxx_init): Use actual codes in stmt_codes initializer, not
616         cp_stmt_codes macro.  Initialize statement_code_p directly, rather
617         than using INIT_STATEMENT_CODES.
618
619 2005-05-09  Mark Mitchell  <mark@codesourcery.com>
620
621         * typeck.c (build_unary_op): Do not resort to address arithmetic
622         when taking the address of a COMPONENT_REF.
623
624 2005-05-08  Kazu Hirata  <kazu@cs.umass.edu>
625
626         * class.c (vtbl_init_data_s): Change the type of fns to
627         VEC(tree,gc)*.
628         (build_vtbl_initializer, add_vcall_offset, add_vcall_offset):
629         Use VEC instead of VARRAY.
630
631 2005-05-07  Richard Sandiford  <rsandifo@redhat.com>
632
633         * mangle.c: Remove a reference to the MIPS -mint64 option.
634
635 2005-05-07  Kazu Hirata  <kazu@cs.umass.edu>
636
637         * decl.c (wrapup_globals_for_namespace): Use VEC instead of
638         VARRAY.
639         * name-lookup.c (add_decl_to_level, begin_scope): Likewise.
640         * name-lookup.h (cp_binding_level): Change the type of
641         static_decls to VEC(tree,gc)*.
642
643         * mangle.c (globals): Change the type of substitutions to
644         VEC(tree,gc)*.
645         (dump_substitution_candidates, add_substitution,
646         find_substitution, finish_mangling, init_mangle): Use VEC
647         instead of VARRAY.
648
649 2005-05-06  Kazu Hirata  <kazu@cs.umass.edu>
650
651         * decl2.c (spew_debug): Remove.
652
653         * decl2.c (ssdf_decls, start_static_storage_duration_function,
654         generate_ctor_or_dtor_function): Use VEC instead of VARRAY.
655
656         * decl2.c (pending_statics, note_vague_linkage_var,
657         cp_finish_file): Use VEC instead of VARRAY.
658         (pending_statics_used): Remove.
659
660 2005-05-05  Kazu Hirata  <kazu@cs.umass.edu>
661
662         * decl2.c (deferred_fns, note_vague_linkage_fn,
663         cp_finish_file): Use VEC instead of VARRAY.
664
665 2005-05-05  Mark Mitchell  <mark@codesourcery.com>
666
667         PR c++/21352
668         * pt.c (build_non_dependent_expr): Use is_overloaded_fn.
669
670 2005-05-05  Kazu Hirata  <kazu@cs.umass.edu>
671
672         * pt.c: Fix a comment typo.
673
674 2005-05-04  Kazu Hirata  <kazu@cs.umass.edu>
675
676         * cp-tree.h (language_function): Change the type of
677         x_local_names to VEC.
678         * decl.c (push_local_name): Adjust uses of local_names.
679
680 2005-05-03  Kazu Hirata  <kazu@cs.umass.edu>
681
682         * friend.c, lex.c, mangle.c, repo.c: Update copyright.
683
684 2005-05-02  Kazu Hirata  <kazu@cs.umass.edu>
685
686         * class.c (local_classes, init_class_processing): Use VEC
687         instead of VARRAY.
688         * cp-tree.h (local_classes): Likewise.
689         * mangle.c (discriminator_for_local_entity): Likewise.
690         * name-lookup.c (pushtag): Likewise.
691
692         * class.c (current_lang_depth, push_lang_context,
693         pop_lang_context): Use VEC instead of VARRAY.
694         * cp-tree.h (saved_scope): Use VEC for lang_base instead of
695         VARRAY.
696         * name-lookup.c (push_to_top_level): Use VEC instead of
697         VARRAY.
698
699 2005-05-02  Paolo Bonzini  <bonzini@gnu.org>
700
701         * semantics.c (finish_call_expr): Call resolve_overloaded_builtin
702         for BUILT_IN_MD built-ins.
703
704 2005-05-02  Michael Matz  <matz@suse.de>
705
706         PR c++/19542
707         * cp-tree.h (cp_tree_index): Remove CPTI_NULL, to be defined in C
708         common frontend.
709         (null_node): Remove.
710         * lex.c (cxx_init): Move null_node initialisation to C common frontend.
711
712 2005-04-25  Ian Lance Taylor  <ian@airs.com>
713
714         * cp-tree.def: Add EXPR_STMT.
715         * cp-tree.h (cp_stmt_codes): Add EXPR_STMT.
716         (EXPR_STMT_EXPR): Define.
717         * cp-gimplify.c: Include "flags.h".
718         (gimplify_expr_stmt): New static function.
719         (cp_gimplify_expr): Handle EXPR_STMT.
720         * cxx-pretty-print.c (pp_cxx_statement): Use pp_cxx_expression
721         rather than pp_expression.
722         (pp_cxx_statement): Handle EXPR_STMT.
723         * dump.c (cp_dump_tree): Handle EXPR_STMT.
724         * lex.c (cxx_init): Don't use c_common_stmt_codes in stmt_codes
725         initializer.
726
727 2005-04-25  Andrew Pinski  <pinskia@physics.uc.edu>
728
729         PR C++/21188
730         * rtti.c (ifnonnull): Cast the zero comparison operand
731         to the correct type.
732
733 2005-04-24  Jakub Jelinek  <jakub@redhat.com>
734
735         PR middle-end/20991
736         * class.c: Include cgraph.h.
737         (cp_fold_obj_type_ref): Set node->local.vtable_method.
738         * Make-lang.in (cgraph.o): Depend on $(CGRAPH_H).
739
740 2005-04-12  Markus F.X.J. Oberhumer  <markus@oberhumer.com>
741
742         * mangle.c (write_builtin_type): Handle integer types which are
743         not one of the shared integer type nodes and emit a "vendor
744         extended builtin type" with an encoding in the form of "u5int96".
745
746 2005-04-24  Ian Lance Taylor  <ian@airs.com>
747
748         * cp-tree.def (USING_STMT): Change class to tcc_statement.
749         (TRY_BLOCK, EH_SPEC_BLOCK, HANDLER, CLEANUP_STMT): Likewise.
750         (IF_STMT, FOR_STMT, WHILE_STMT, DO_STMT): Likewise.
751         (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
752
753 2005-04-23  DJ Delorie  <dj@redhat.com>
754
755         * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, friend.c,
756         init.c, lex.c, mangle.c, method.c, name-lookup.c, parser.c,
757         repo.c, rtti.c, tree.c, typeck.c, typeck2.c: Adjust warning()
758         callers.
759
760 2005-04-22  Per Bothner  <per@bothner.com>
761
762         * decl.c (make_rtl_for_nonlocal_decl): Don't try get_fileinfo if
763         input_filename is NULL, as it is for (say) __PRETTY_FUNCTION__.
764
765 2005-04-22  Alexandre Oliva  <aoliva@redhat.com>
766
767         PR c++/21087
768         * name-lookup.c (push_overloaded_decl): Do not overload with
769         non-duplicate anticipated built-in.
770
771 2005-04-21  Kazu Hirata  <kazu@cs.umass.edu>
772
773         * cp-tree.h (THROW_NAME, AUTO_VTABLE_NAME, AUTO_TEMP_FORMAT,
774         VTABLE_BASE, VTABLE_NAME_PREFIX, STATIC_NAME_FORMAT): Remove.
775
776 2005-04-21  Nathan Sidwell  <nathan@codesourcery.com>
777
778         * cp-tree.h: Adjust for new VEC API.
779         Define VEC(tree_pair_s,gc).
780         (struct save_scope): Adjust.
781         (struct lang_type_class): Adjust.
782         (unemitted_tinfo_decls): Adjust.
783         * class.c (add_method, resort_type_method_vec,
784         finish_struct_methods, struct find_final_overrider_data,
785         dfs_find_final_overrider_pre, find_final_overrider,
786         get_vcall_index, warn_hidden, walk_subobject_offsets,
787         check_methods, fixup_inline_methods, end_of_class,
788         warn_about_ambiguous_bases, finish_struct, build_vtbl_initializer,
789         add_vcall_offset): Adjust.
790         * decl.c (xref_basetypes, finish_method): Adjust.
791         * decl2.c (check_classfn): Adjust.
792         * init.c (sort_mem_initializers, push_base_cleanups): Adjust.
793         * method.c (do_build_copy_constructor): Adjust.
794         * name-lookup.c (new_class_binding, store_binding,
795         store_bindings, store_class_bindings): Adjust.
796         * name-lookup.h: Define VEC(cxx_saved_binding,gc),
797         VEC(cp_class_binding,gc).
798         (struct cp_binding_level): Adjust.
799         * parser.c: Define VEC(cp_token_position,heap).
800         (struct cp_lexer): Adjust.
801         (cp_lexer_new_main, cp_lexer_new_from_tokens, cp_lexer_destroy,
802         cp_lexer_save_tokens): Adjust.
803         * pt.c (retrieve_specialization,
804         check_explicit_specialization): Adjust.
805         * rtti.c (unemitted_tinfo_decls): Adjust.
806         (init_rtti_processing, get_tinfo_decl, get_pseudo_ti_init,
807         get_pseudo_ti_desc): Adjust.
808         * search.c (dfs_access_in_type, lookup_conversion_operator,
809         lookup_fnfields_1, dfs_walk_once, dfs_walk_once_accessible,
810         dfs_get_pure_virtuals, lookup_conversions_r, binfo_for_vbase): Adjust.
811         * semantics.c: Define VEC(deferred_access,gc).
812         (push_deferring_access_checks): Adjust.
813         * typeck2.c (abstract_virtuals_error): Adjust.
814
815 2005-04-20  Ian Lance Taylor  <ian@airs.com>
816
817         * cp-tree.def: Add STMT_EXPR.
818         * cp-tree.h (STMT_EXPR_NO_SCOPE): Define.
819         (STMT_EXPR_STMT): Define.
820         * cxx-pretty-print.c (pp_cxx_primary_expression): Handle
821         STMT_EXPR.
822         (pp_cxx_expression): Likewise.
823         (pp_cxx_statement): Call pp_cxx_statement, not pp_statement.
824         * dump.c (cp_dump_tree): Handle STMT_EXPR.
825
826 2005-04-18  Kazu Hirata  <kazu@cs.umass.edu>
827
828         * decl.c (expand_static_init): Call build2 and build3 instead
829         of build.
830
831         * cp-tree.h (VPTR_NAME, VPTR_NAME_P): Remove.
832
833 2005-04-17  Ian Lance Taylor  <ian@airs.com>
834
835         * cp-tree.def: Add SIZEOF_EXPR, ARROW_EXPR and ALIGNOF_EXPR.
836         * cxx-pretty-print.c (pp_cxx_postfix_expression): Handle
837         ARROW_EXPR.
838         (pp_cxx_unary_expression): Handle SIZEOF_EXPR and ALIGNOF_EXPR.
839         (pp_cxx_expression): Handle ARROW_EXPR, SIZEOF_EXPR, and
840         ALIGNOF_EXPR.
841         * typeck.c (cxx_sizeof_or_alignof_type): Update call to
842         c_sizeof_or_alignof_type for change in parameter type.
843
844 2005-04-16  Mark Mitchell  <mark@codesourcery.com>
845
846         PR c++/21025
847         * typeck.c (cxx_sizeof_or_alignof_type): Check whether the type to
848         which sizeof/alignof is dependent, rather than just whether we are
849         processing_template_decl.
850
851 2005-04-17  Kazu Hirata  <kazu@cs.umass.edu>
852
853         * cp-tree.h (LOOKUP_GLOBAL): Remove.
854         (LOOKUP_ONLYCONVERTING, DIRECT_BIND, LOOKUP_NO_CONVERSION,
855         LOOKUP_DESTRUCTOR, LOOKUP_NO_TEMP_BIND, LOOKUP_PREFER_TYPES,
856         LOOKUP_PREFER_NAMESPACES, LOOKUP_CONSTRUCTOR_CALLABLE): Adjust
857         their values.
858
859 2005-04-15  Richard Henderson  <rth@redhat.com>
860
861         PR middle-end/14311
862         * semantics.c (finish_call_expr): Call resolve_overloaded_builtin.
863
864 2005-04-15  Kazu Hirata  <kazu@cs.umass.edu>
865
866         * cp-tree.h (lang_type_class): Remove redefined.  Move
867         java_interface into where redefined was.  Increment the width
868         of dummy.
869         (TYPE_REDEFINED): Remove.
870
871 2005-04-14  Kazu Hirata  <kazu@cs.umass.edu>
872
873         * cp-tree.h (SET_TMPL_ARG, ENUM_TI_TEMPLATE, ENUM_TI_ARGS,
874         CLASSTYPE_TEMPLATE_LEVEL): Remove.
875
876 2005-04-11  Mark Mitchell  <mark@codesourcery.com>
877
878         * decl2.c (determine_visibility): Don't use export_class_data.
879         (import_export_decl): Honor TARGET_CXX_CLASS_DATA_ALWAYS_WEAK and
880         TARGET_CXX_DETERMINE_CLASS_DATA_VISIBILITY.
881
882 2005-04-09  Kazu Hirata  <kazu@cs.umass.edu>
883
884         * cp-tree.h (cxx_alignof): Remove.
885
886         * cp-tree.h (DECL_ARRAY_DELETE_OPERATOR_P): Remove.
887
888         * cp-tree.h (EXCEPTION_CLEANUP_NAME, B_SET, B_CLR, B_TST,
889         CONV_STATIC_CAST): Remove.
890
891         * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Remove.
892
893         * cp-tree.h (VF_BINFO_VALUE, VF_BASETYPE_VALUE): Remove.
894
895         * cp-tree.h (cp_deprecated): Remove.
896
897 2005-04-08  Ian Lance Taylor  <ian@airs.com>
898
899         * cp-tree.def: Define FOR_STMT, WHILE_STMT, DO_STMT, BREAK_STMT,
900         CONTINUE_STMT, SWITCH_STMT.
901         * cp-tree.h (cp_stmt_codes): Add FOR_STMT, WHILE_STMT, DO_STMT,
902         BREAK_STMT, CONTINUE_STMT, SWITCH_STMT.
903         (WHILE_COND, WHILE_BODY): Define.
904         (DO_COND, DO_BODY): Define.
905         (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY): Define.
906         (SWITCH_STMT_COND, SWITCH_STMT_BODY, SWITCH_STMT_TYPE): Define.
907         * cp-gimplify.c (enum bc_t): Define.
908         (struct cp_gimplify_ctx, ctxp): Define.
909         (push_context, pop_context): New static functions.
910         (begin_bc_block, finish_bc_block): New static functions.
911         (build_bc_goto): New static function.
912         (gimplify_cp_loop, gimplify_for_stmt): New static functions.
913         (gimplify_while_stmt, gimplify_do_stmt): Likewise.
914         (gimplify_switch_stmt): Likewise.
915         (cp_gimplify_expr): Handle FOR_STMT, WHILE_STMT, DO_STMT,
916         SWITCH_STMT, CONTINUE_STMT, BREAK_STMT.
917         (cp_genericize): Call push_context and pop_context.
918         * semantics.c (finish_break_stmt): Just call build_stmt
919         (BREAK_STMT) rather than build_break_stmt.
920         (finish_continue_stmt): Corresponding change.
921         * decl.c (pop_switch): Update call to c_do_switch_warnings for new
922         parameters.
923         * cxx-pretty-print.c (pp_cxx_statement): Handle SWITCH_STMT,
924         WHILE_STMT, DO_STMT, FOR_STMT, BREAK_STMT, CONTINUE_STMT.
925         * dump.c (cp_dump_tree): Likewise.
926
927 2005-04-08  Mark Mitchell  <mark@codesourcery.com>
928
929         PR c++/20905
930         * parser.c (cp_parser_type_specifier_seq): Add is_condition
931         parameter.
932         (cp_parser_new_type_id): Pass it.
933         (cp_parser_condition): Likewise.
934         (cp_parser_conversion_type_id): Likewise.
935         (cp_parser_type_id): Likewise.
936         (cp_parser_type_specifier_seq): In a condition, do not allow
937         invalid type-specifier combinations.
938         (cp_parser_exception_declaration): Adjust call to
939         cp_parser_type_specifier_seq.
940
941         * cp-tree.def (TINST_LEVEL): Document TINST_IN_SYSTEM_HEADER_P.
942         * cp-tree.h (struct tinst_level): Add in_system_header_p.
943         (TINST_IN_SYSTEM_HEADER_P): New macro.
944         (make_tinst_level): Remove.
945         * pt.c (lookup_template_class): Preserve DECL_IN_SYSTEM_HEADER on
946         the instantiated class.
947         (push_tinst_level): Do not use make_tinst_level.  Set
948         TINST_IN_SYSTEM_HEADER_P.
949         (pop_tinst_level): Likewise.
950         (instantiate_class_template): Set in_system_header.
951         (instantiate_pending_templates): Likewise.
952         * tree.c (make_tinst_level): Remove.
953
954 2005-04-06  Joseph S. Myers  <joseph@codesourcery.com>
955
956         * decl.c (start_decl): Apply pending #pragma weak regardless of
957         scope.
958
959 2005-04-06  Mark Mitchell  <mark@codesourcery.com>
960
961         PR c++/20212
962         * pt.c (regenerate_decl_from_template): Copy attributes for
963         parameters from the pattern to the instantiation.
964
965 2005-04-05  Mark Mitchell  <mark@codesourcery.com>
966
967         PR c++/20734
968         * cp-tree.def (OFFSET_REF): Correct comments.
969         * init.c (build_offset_ref): Remove misleading comment.
970         * typeck.c (build_unary_op): Handle pointer-to-member creation
971         here, rather than ...
972         (unary_complex_lvalue): ... here.
973
974 2005-04-06  Jason Merrill  <jason@redhat.com>
975
976         PR c++/19312
977         * tree.c (stabilize_init): Don't bother trying to stabilize
978         something with no side-effects.
979
980 2005-04-05  Mark Mitchell  <mark@codesourcery.com>
981
982         PR c++/20763
983         * decl.c (grokdeclarator): Correct attribute handling.
984
985 2005-04-05  Mark Mitchell  <mark@codesourcery.com>
986
987         PR c++/19159
988         * decl2.c (import_export_decl): Use non-COMDAT external linkage
989         for virtual tables, typeinfo, etc. that will be emitted in only
990         one translation unit on systems without weak symbols.
991
992 2005-04-04  Mark Mitchell  <mark@codesourcery.com>
993
994         PR c++/20679
995         * parser.c (cp_parser_template_name): Fix thinko.
996
997 2005-04-04  Nathan Sidwell  <nathan@codesourcery.com>
998
999         PR c++/20746
1000         * method.c (use_thunk): Protect covariant pointer return
1001         adjustments from NULL pointers.
1002
1003 2005-04-04  Jan Hubicka  <jh@suse.cz>
1004
1005         * decl2.c (finish_objects): Revert my previous patch.
1006         (cp_finish_file): Likewise.
1007
1008 2005-04-03  Kazu Hirata  <kazu@cs.umass.edu>
1009
1010         * pt.c: Fix comment typos.
1011
1012 2005-04-03  Nathan Sidwell  <nathan@codesourcery.com>
1013
1014         PR c++/20723
1015         * pt.c (more_specialized_fn): Member functions are unordered wrt
1016         non-members.  Conversion operators are unordered wrt other
1017         functions.
1018
1019 2005-04-01  Nathan Sidwell  <nathan@codesourcery.com>
1020
1021         * call.c (add_template_candidates_real): Remove length parameter
1022         from fn_type_unification call.
1023         * class.c (resolve_address_of_overloaded_function): Likewise
1024         * cp-tree.h (fn_type_unification): Remove length parameter.
1025         * pt.c (get_bindings_overload): Remove.
1026         (get_bindings_real): Rename to ...
1027         (get_bindings): ... here.  Remove length and strict
1028         parameters. Change return type flag to boolean.  Remove original
1029         forwarding function.
1030         (determine_specialization): Adjust get_bindings call.
1031         (fn_type_unification): Remove length parameter.  Adjust.
1032         (type_unification_real): Remove length parameter.  Adjust.
1033         (resolve_overloaded_unification): Adjust get_bindings call.
1034         (try_one_overload): Simplify confusing cascaded if control flow.
1035         (unify): Remove length paramter from type_unification_real call.
1036         (most_specialized_instantiation): Adjust get_bindings calls.
1037         (most_specialized): Likewise.
1038
1039 2005-03-31  Nathan Sidwell  <nathan@codesourcery.com>
1040
1041         PR c++/19203, implement DR 214
1042         * call.c (joust): Use more_specialized_fn.
1043         * cp-tree.h (DEDUCE_ORDER): Remove.
1044         (more_specialized): Replace with ...
1045         (more_specialized_fn): ... this.
1046         * pt.c (maybe_adjust_types_for_deduction): Remove DEDUCE_ORDER
1047         case.
1048         (type_unification_real): Remove DEDUCE_ORDER case.
1049         (more_specialized): Replace with ...
1050         (more_specialized_fn): ... this.  Implement DR 214.
1051         (most_specialized_instantiation): Use get_bindings_real directly.
1052
1053 2005-03-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1054
1055         PR c++/18644
1056         * call.c (build_new_op): Remove check for -Wsynth.
1057
1058 2005-03-31  Jan Hubicka  <jh@suse.cz>
1059
1060         * decl2.c (finish_objects): Mark ctor as needed.
1061         (cp_finish_file): Output variables only in nonunit-at-a-time.
1062
1063 2005-03-29  Richard Henderson  <rth@redhat.com>
1064
1065         PR c/20519
1066         * decl.c (cp_complete_array_type): Rename from complete_array_type.
1067         Use the new complete_array_type in c-common.c.  Update all callers.
1068         * cp-tree.h (cp_complete_array_type): Update to match.
1069
1070 2005-03-24  Geoffrey Keating  <geoffk@apple.com>
1071
1072         * typeck.c (build_static_cast_1): Allow scalar_cast between
1073         any integral, floating, or enumeration type.
1074
1075 2005-03-24  Steven Bosscher  <stevenb@suse.de>
1076
1077         * typeck.c (comptypes): First determine if the types are compatible
1078         from a target-independent point of view.  Check target attributes
1079         last.
1080
1081         * class.c (build_base_path):
1082         (build_vbase_offset_vtbl_entries):
1083         (add_vcall_offset): Replace fold (buildN (...)) with fold_buildN.
1084         * error.c (dump_expr): Likewise.
1085         * init.c (build_zero_init, expand_cleanup_for_base,
1086         build_vec_delete_1): Likewise.
1087         * mangle.c (write_integer_cst): Likewise.
1088         * method.c (thunk_adjust): Likewise.
1089         * pt.c (convert_nontype_argument, tsubst, unify): Likewise.
1090         * tree.c (cxx_print_statistics, array_type_nelts_total): Likewise.
1091         * typeck.c (build_ptrmemfunc_access_expr,
1092         (get_member_function_from_ptrfunc): Likewise.
1093
1094 2005-03-23  Joseph S. Myers  <joseph@codesourcery.com>
1095
1096         * cp-objcp-common.h (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
1097
1098 2005-03-23  Joseph S. Myers  <joseph@codesourcery.com>
1099
1100         * cp-tree.h (perform_integral_promotions): Remove.
1101         (default_conversion): Add.
1102
1103 2005-03-22  Mark Mitchell  <mark@codesourcery.com>
1104
1105         * parser.c (cp_parser_warn_min_max): New function.
1106         (cp_parser_binary_expression): Use it.
1107         (cp_parser_assignment_operator_opt): Likewise.
1108         (cp_parser_operator): Likewise.
1109
1110 2005-03-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1111
1112         PR c++/19980
1113         * decl.c (start_preparsed_function): Robustify.
1114
1115 2005-03-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1116
1117         PR c++/20499
1118         * parser.c (cp_parser_class_head): Return NULL_TREE when
1119         encountering a redefinition.
1120
1121 2005-03-22  Nathan Sidwell  <nathan@codesourcery.com>
1122
1123         PR c++/20465
1124         PR c++/20381
1125         * typeck.c (build_ptrmemfunc): Allow OFFSET_REF when processing a
1126         template.
1127
1128 2005-03-21  Paolo Carlini  <pcarlini@suse.de>
1129
1130         PR c++/20461
1131         PR c++/20536
1132         * init.c (emit_mem_initializers): Don't crash on undefined
1133         types.
1134
1135 2005-03-21  Paolo Carlini  <pcarlini@suse.de>
1136
1137         PR c++/20147
1138         * semantics.c (finish_stmt_expr_expr): Return immediately
1139         if error_operand_p (expr).
1140
1141 2005-03-21  Joseph S. Myers  <joseph@codesourcery.com>
1142
1143         * cp-tree.h (lvalue_or_else, lvalue_p): New.
1144         * typeck.c (lvalue_or_else): New.  Call lvalue_error.
1145
1146 2005-03-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1147
1148         PR c++/20240
1149         * decl.c (decls_match): Compare context of VAR_DECL.
1150
1151 2005-03-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1152
1153         PR c++/20333
1154         * parser.c (cp_parser_postfix_expression) <case RID_TYPENAME>:
1155         Check the return value of cp_parser_nested_name_specifier.
1156
1157 2005-03-18  Dale Johannesen <dalej@apple.com>
1158
1159         * cp/tree.c (cp_tree_equal):  Handle SSA_NAME.
1160
1161 2005-03-18  Paolo Carlini  <pcarlini@suse.de>
1162
1163         PR c++/20463
1164         * parser.c (cp_parser_diagnose_invalid_type_name):
1165         Check TYPE_BINFO (current_class_type) before attempting
1166         to emit inform messages.
1167
1168 2005-03-17  Paolo Carlini  <pcarlini@suse.de>
1169
1170         PR c++/19966
1171         * cp-tree.h (grok_op_properties): Change return type to void.
1172         * decl.c (grok_op_properties): Return early - don't check the
1173         arity - in case of a static member or an operator that cannot
1174         be non-member; tidy a bit.
1175
1176 2005-03-17  Nathan Sidwell  <nathan@codesourcery.com>
1177
1178         PR c++/20186
1179         * pt.c (contains_dependent_cast_p): Remove.
1180         (fold_non_dependent_expr): Don't use it.
1181         (value_dependent_expression_p): Use a switch statement.
1182         reference_exprs can be dependent.
1183
1184 2005-03-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1185
1186         PR c++/4403
1187         PR c++/9783, DR433
1188         * name-lookup.c (pushtag): Skip template parameter scope when
1189         scope is ts_global.  Don't push tag into template parameter
1190         scope.
1191         * pt.c (instantiate_class_template): Reorder friend class
1192         template substitution to handle non-dependent friend class
1193         that hasn't been previously declared.
1194
1195 2005-03-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1196
1197         Friend class name lookup 5/n
1198         PR c++/1016
1199         * cp-tree.h (pushtag): Adjust declaration.
1200         * decl.c (lookup_and_check_tag): Call lookup_type_scope if
1201         lookup_name fails.
1202         (xref_tag): Adjust call to pushtag.  Make hidden class visible.
1203         (start_enum): Adjust call to pushtag.
1204         * name-lookup.c (ambiguous_decl): Ignore hidden names.
1205         (qualify_lookup): Change return type to bool.
1206         (hidden_name_p): New function.
1207         (lookup_namespace_name, unqualified_namespace_lookup,
1208         lookup_name_real): Use it.
1209         (lookup_type_scope): Update comments.
1210         (maybe_process_template_type_declaration): Change parameter name
1211         from globalize to is_friend.
1212         (pushtag): Change globalize parameter of type int to tag_scope.
1213         Hide name if introduced by friend declaration.
1214         * name-lookup.h (hidden_name_p): Add declaration.
1215         * parser.c (cp_parser_lookup_name): Don't deal with hidden name
1216         here.
1217         * pt.c (push_template_decl_real): Make hidden class template
1218         visible.
1219         (lookup_template_class, instantiate_class_template): Adjust call
1220         to pushtag.
1221         * semantics.c (begin_class_definition): Likewise.
1222         * rtti.c (init_rtti_processing, build_dynamic_cast_1,
1223         tinfo_base_init, emit_support_tinfos): Use ts_current instead of
1224         ts_global.
1225
1226 2005-03-13  Mark Mitchell  <mark@codesourcery.com>
1227
1228         PR c++/20157
1229         * pt.c (determine_specialization): Reject non-specializations.
1230
1231 2005-03-11  Per Bothner  <per@bothner.com>
1232
1233         * cp-tree.h (struct cp_declarator): New id_loc field.
1234         * cp/parser.c (cp_lexer_get_preprocessor_token): Set cp_token's
1235         location using c_lex_with_flags, instead of input_location.
1236         (cp_parser_direct_declarator): Set declarator's id_loc from
1237         cp_token's id_loc.
1238
1239 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
1240
1241         PR c++/18384, c++/18327
1242         * decl.c (reshape_init_array): Use UHWI type for max_index_cst
1243         and index.  Convert max_index to size_type_node if it isn't
1244         host_integerp (, 1).
1245
1246 2005-03-09  Mark Mitchell  <mark@codesourcery.com>
1247
1248         PR c++/20208
1249         * pt.c (tsubst_decl): Apply array-to-pointer and
1250         function-to-pointer conversions to function arguments.
1251         (regenerate_decl_from_template): Likewise.
1252
1253 2005-03-09  Paolo Carlini  <pcarlini@suse.de>
1254
1255         PR c++/16859
1256         * decl.c (complete_array_type): In pedantic mode, return
1257         3 for an empty initializer list as the initializer for an
1258         array of unknown bound (8.5.1/4).
1259         (maybe_deduce_size_from_array_init): Fix final test to use
1260         the above.
1261
1262 2005-03-08  Nathan Sidwell  <nathan@codesourcery.com>
1263
1264         PR c++/20186
1265         * pt.c (contains_dependent_cast_p): New.
1266         (fold_non_dependent_expr): Call it.
1267
1268 2005-03-08  Mark Mitchell  <mark@codesourcery.com>
1269
1270         PR c++/20142
1271         * cp-tree.h (target_type): Remove.
1272         * decl.c (layout_var_decl): Remove #if 0'd code.
1273         (cp_finish_decl): Remove dead code.
1274         * init.c (build_vec_init): When determining whether or not the
1275         element type has an asignment operator, look through all array
1276         dimensions.
1277         * typeck.c (target_type): Remove.
1278
1279 2005-03-07  Mark Mitchell  <mark@codesourcery.com>
1280
1281         * class.c (finish_struct_1): Do not warn about non-virtual
1282         destructors in Java classes.
1283
1284 2005-03-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1285
1286         PR c++/19311
1287         * init.c (build_offset_ref): Don't build non-dependent SCOPE_REF.
1288         * pt.c (build_non_dependent_expr): Don't build NON_DEPENDENT_EXPR
1289         for OFFSET_TYPE.
1290         * typeck.c (build_x_unary_op): Don't build non-dependent SCOPE_REF.
1291         Also set PTRMEM_OK_P for NON_DEPENDENT_EXPR.
1292         (build_unary_op): Handle building ADDR_EXPR of OFFSET_REF inside
1293         template.
1294
1295 2005-03-02  Alexandre Oliva  <aoliva@redhat.com>
1296
1297         * name-lookup.c (push_overloaded_decl): Don't error if the new
1298         decl matches the old one.
1299         * decl.c (redeclaration_error_message): Likewise.
1300
1301 2005-03-01  Per Bothner  <per@bothner.com>
1302
1303         * decl.c (finish_function): Use SET_EXPR_LOCATION instead of
1304         unavailable annotate_with_file_line, if USE_MAPPED_LOCATION.
1305
1306 2005-03-01  Nathan Sidwell  <nathan@codesourcery.com>
1307
1308         PR c++/20232
1309         * class.c (update_vtable_entry_for_fn): Don't crash on invalid
1310         covariancy.
1311
1312         * cp-tree.g (THUNK_TARGET): Expand comment.
1313         * method.c (use_thunk): Make sure we also use the target, if that
1314         is a thunk.
1315
1316 2005-02-27  Jakub Jelinek  <jakub@redhat.com>
1317
1318         PR c++/20206
1319         * decl.c (cxx_comdat_group): Put thunks for
1320         TARGET_USE_LOCAL_THUNK_ALIAS_P (function) functions into the same
1321         comdat group as the thunk target.
1322
1323 2005-02-24  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1324
1325         * call.c, class.c, cp-tree.h, decl2.c, error.c, init.c, mangle.c,
1326         parser.c: Fix comment typo(s).
1327
1328 2005-02-24  Jakub Jelinek  <jakub@redhat.com>
1329
1330         PR c++/20175
1331         * decl.c (reshape_init): Don't warn about missing braces if STRING_CST
1332         initializes a char/wchar_t array.
1333
1334 2005-02-23  Mark Mitchell  <mark@codesourcery.com>
1335
1336         PR c++/19878
1337         * decl.c (grokvardecl): Set DECL_INTERFACE_KNOWN for declarations
1338         with internal linkage.
1339
1340 2005-02-23  Alexandre Oliva  <aoliva@redhat.com>
1341
1342         * decl.c (grokvardecl): Don't exempt anonymous types from having
1343         linkage for variables that have linkage other than "C".
1344
1345 2005-02-23  Kazu Hirata  <kazu@cs.umass.edu>
1346
1347         * cp-objcp-common.h, error.c: Update copyright.
1348
1349 2005-02-22  Mark Mitchell  <mark@codesourcery.com>
1350
1351         PR c++/20073
1352         * decl.c (start_decl_1): Don't clear TREE_READONLY.
1353         (cp_finish_decl): Likewise.
1354         (complete_vars): Call cp_apply_type_quals_to_decl.
1355         * typeck.c (cp_apply_type_quals): Avoid setting TREE_READONLY in
1356         cases where that's not valid.
1357
1358         PR c++/19991
1359         * init.c (integral_constant_value): Iterate if the value of a decl
1360         is itself a constant.
1361
1362         PR c++/20152
1363         * parser.c (cp_parser_class_head): Check for redefintions here.
1364         * semantics.c (begin_class_definition): Not here.
1365
1366         PR c++/20153
1367         * decl2.c (build_anon_union_vars): Add type parameter.
1368         (finish_anon_union): Pass it.
1369
1370         PR c++/20148
1371         * error.c (dump_expr): Do not print the body of a BIND_EXPR.
1372         Handle STATEMENT_LIST.
1373
1374         PR c++/19883
1375         * parser.c (cp_parser_direct_declarator): Always complain about
1376         non-constant array bounds when in a function scope.
1377         * semantics.c (finish_id_expression): Do not mark dependent names
1378         as non-constant.
1379
1380 2005-02-21  Douglas Gregor  <dgregor@cs.indiana.edu>
1381
1382         PR c++/19076
1383         PR c++/6628
1384         * cp-tree.h (cp_apply_type_quals_to_decl): Declared.
1385         * decl.c (grokdeclarator): Pedwarn about qualifying a function
1386         type.
1387         Add qualifiers when declaring a typedef of a function type.
1388         Member function pointers pick up the qualifiers of the typedef
1389         used to declare them.
1390         Don't complain about creating cv-qualified function types.
1391         Complain about qualified function typedefs that are used to
1392         declare non-static member functions or free functions.
1393         Use cp_apply_type_quals_to_decl.
1394         (start_preparsed_function): Use cp_apply_type_quals_to_decl.
1395         (grokclassfn): Use cp_apply_type_quals_to_decl.
1396         * error.c (dump_type_suffix): Print qualifiers for function
1397         types.
1398         * pt.c (tsubst_decl): Use cp_apply_type_quals_to_decl.
1399         (tsubst): When substituting a function type into a member
1400         pointer type, pass along the qualifiers.
1401         (unify): Unify member pointers to member function pointers.
1402         * tree.c (cp_build_qualified_type_real): Function types may be
1403         qualified. This includes restrict qualifiers.
1404         * typeck.c (cp_apply_type_quals_to_decl): New function to replace
1405         use of c_apply_type_quals_to_decl. Drops qualifiers that are being
1406         added to function types.
1407
1408 2005-02-20  Zack Weinberg  <zack@codesourcery.com>
1409
1410         PR 18785
1411         * cp-objcp-common.h (LANG_HOOKS_TO_TARGET_CHARSET): Set to
1412         c_common_to_target_charset.  Delete bogus comment.
1413
1414 2005-02-18  Richard Henderson  <rth@redhat.com>
1415
1416         PR libstdc++/10606
1417         * except.c (do_get_exception_ptr): New.
1418         (expand_start_catch_block): Use it.
1419
1420 2005-02-19  Jakub Jelinek  <jakub@redhat.com>
1421
1422         * decl.c (start_decl_1): Only check TYPE_NEEDS_CONSTRUCTING
1423         if type is not error_mark_node.
1424
1425 2005-01-20  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1426
1427         PR c++/19508
1428         * decl2.c (grokfield): Do not apply attributes to template parameters
1429         as they are ignored by tsubst anyway.
1430
1431 2005-02-18  Jakub Jelinek  <jakub@redhat.com>
1432
1433         PR c++/19813
1434         * decl.c (start_decl_1): Clear TREE_READONLY flag if
1435         its type has TYPE_NEEDS_CONSTRUCTING.
1436         (complete_vars): Likewise.
1437
1438 2005-02-17  Alexandre Oliva  <aoliva@redhat.com>
1439
1440         PR c++/20028
1441         * class.c (finish_struct): Initialize TYPE_SIZE_UNIT of a
1442         template along with TYPE_SIZE.
1443
1444         PR c++/20022
1445         * semantics.c (perform_deferred_access_checks): Use
1446         get_deferred_access_checks to get the top of the stack.
1447
1448 2005-02-15  Alexandre Oliva  <aoliva@redhat.com>
1449
1450         PR c++/17788
1451         * class.c (add_implicitly_declared_members, check_field_decl)
1452         (check_field_decls, check_bases): Remove arguments, tests and
1453         assignments of cant_have_default_ctor-related variables.
1454
1455 2005-02-15  Alexandre Oliva  <aoliva@redhat.com>
1456
1457         * decl2.c (mark_used): Set the source location of the used decl to
1458         the current input location here...
1459         * method.c (synthesize_method): ... not here.  Set input_location
1460         from the decl instead.
1461
1462 2005-02-14  Nathan Sidwell  <nathan@codesourcery.com>
1463
1464         PR c++/19608
1465         * parser.c (cp_parser_late_parsing_for_member): Use
1466         current_function_decl as scope to push to and from.
1467
1468         PR c++/19884
1469         * pt.c (check_explicit_specialization): Make sure namespace
1470         binding lookup found an overloaded function.
1471         (lookup_template_function): Just assert FNS is an overloaded
1472         function.
1473
1474         PR c++/19895
1475         * decl.c (grokdeclarator): Check for error mark node in ptrmem
1476         construction.
1477
1478 2005-02-14  Alexandre Oliva  <aoliva@redhat.com>
1479
1480         PR c++/17816
1481         * decl.c (redeclaration_error_message): Report redefinition of
1482         pure virtual function.
1483
1484 2005-02-14  Nathan Sidwell  <nathan@codesourcery.com>
1485
1486         PR c++/19891
1487         * class.c (build_simple_base_path): Build the component_ref
1488         directly.
1489         (update_vtable_entry_for_fn): Walk the covariant's binfo chain
1490         rather than using lookup_base.
1491         * search.c (dfs_walk_once): Add non-recursive assert check.
1492         * typeck.c (build_class_member_access_expr): It is possible for
1493         the member type to be both const and volatile.
1494
1495 2005-02-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1496
1497         PR c++/14479
1498         PR c++/19487
1499         * pt.c (maybe_check_template_type): Remove.
1500         * cp-tree.h (maybe_check_template_type): Remove prototype.
1501         * name-lookup.c (maybe_process_template_type_declaration): Don't
1502         use maybe_check_template_type.
1503
1504 2005-02-11  Richard Henderson  <rth@redhat.com>
1505
1506         PR c++/19632
1507         * pt.c (get_mostly_instantiated_function_type): Save and restore
1508         flag_access_control instead of push/pop_access_scope.
1509
1510 2005-02-10  Mark Mitchell  <mark@codesourcery.com>
1511
1512         PR c++/19755
1513         * decl.c (reshape_init): Issue warnings about missing braces.
1514
1515 2005-02-11  Kazu Hirata  <kazu@cs.umass.edu>
1516
1517         * cp-tree.def, except.c, ptree.c: Update copyright.
1518
1519 2005-02-09  Mark Mitchell  <mark@codesourcery.com>
1520
1521         PR c++/19811
1522         * call.c (build_op_delete_call): Check COMPLETE_TYPE_P before
1523         attempting name lookup.
1524
1525         * parser.c (cp_parser_unqualified_id): Initialize type_decl.
1526
1527         PR c++/19787
1528         * call.c (initialize_reference): Robustify.
1529
1530         PR ++/19732
1531         * decl.c (grokdeclarator): Check for invalid use of destructor
1532         names.
1533
1534         PR c++/19762
1535         * parser.c (cp_parser_unqualified_id): Avoid creating destructor
1536         names with invalid types.
1537
1538         PR c++/19826
1539         * parser.c (cp_parser_direct_declarator): Allow type-dependent
1540         expressions as array bounds.
1541
1542         PR c++/19739
1543         * parser.c (cp_parser_attributes_list): Allow empty lists.
1544
1545 2005-02-08  Mark Mitchell  <mark@codesourcery.com>
1546
1547         PR c++/19733
1548         * class.c (add_method): Don't set TYPE_HAS_DESTRUCTOR.
1549         (check_bases): Give warnings about a base class with a
1550         non-virtual destructor, even if it is implicit.
1551         (finish_struct_bits): Don't copy TYPE_HAS_DESTRUCTOR.
1552         (maybe_warn_about_overly_private_class): Don't use
1553         TYPE_HAS_DESTRUCTOR.
1554         (finish_struct_methods): Don't set TYPE_HAS_DESTRUCTOR.
1555         (check_for_override): Give it external linkage.
1556         (add_implicitly_declared_members): Generate destructors lazily.
1557         (check_field_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not
1558         TYPE_HAS_DESTRUCTOR.
1559         (check_bases_and_members): Call check_methods before
1560         check_field_decls.
1561         (check_bases_and_members): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not
1562         TYPE_HAS_DESTRUCTOR.
1563         (finish_struct_1): Do not use TYPE_HAS_DESTRUCTOR.
1564         * cp-tree.def (PSEUDO_DTOR_EXPR): Document.
1565         * cp-tree.h (TYPE_HAS_DESTRUCTOR): Remove.
1566         (lang_type_class): Add lazy_destructor.
1567         (CLASSTYPE_LAZY_DESTRUCTOR): New macro.
1568         (CLASSTYPE_DESTRUCTORS): Robustify.
1569         (TYPE_HAS_DESTRUCTOR): Remove.
1570         (check_for_override): Declare.
1571         (build_vbase_delete): Remove.
1572         * cvt.c (convert_to_void): Issue errors about pseudo-destructor
1573         expressions.
1574         * decl.c (cxx_maybe_build_cleanup): Remove dead code.
1575         * except.c (dtor_nothrow): Lazily create destructors if necessary.
1576         (build_throw): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
1577         * init.c (build_delete): Lazily create destructors, if necessary.
1578         (build_vbase_delete): Remove.
1579         * method.c (locate_dtor): Simplify.
1580         (implicitly_declare_fn): Add support for destructors.
1581         * parser.c (cp_parser_lookup_name): Lazily create destructors, if
1582         necessary.
1583         * pt.c (check_explicit_specialization): Don't use
1584         TYPE_HAS_DESTRUCTOR.
1585         (instantiate_class_template): Likewise.
1586         * ptree.c (cxx_print_type): Don't print TYPE_HAS_DESTRUCTOR.
1587         * rtti.c (emit_support_tinfos): Robustify.
1588         * search.c (lookup_fnfields_1): Lazily create destructors.
1589         * typeck.c (build_class_member_access_expr): Remove
1590         PSEUDO_DTOR_EXPR handling.
1591         (lookup_destructor): Likewise.
1592
1593 2005-02-08  Kazu Hirata  <kazu@cs.umass.edu>
1594
1595         * cxx-pretty-print.c, cxx-pretty-print.h, decl.h: Update
1596         copyright.
1597
1598 2005-02-07  Mark Mitchell  <mark@codesourcery.com>
1599
1600         * parser.c (cp_lexer_start_debugging): Avoid arithmetic operations
1601         on boolean variables.
1602         (cp_lexer_stop_debugging): Likewise.
1603
1604 2005-02-03  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1605
1606         PR c++/17401
1607         * parser.c (cp_parser_pure_specifier): Emit a specific error
1608         message with an invalid pure specifier.
1609         * decl2.c (grok_function_init): Remove.
1610         (grokfield): An initializer for a method is a always a pure
1611         specifier.
1612
1613 2005-02-02  Matt Austern  <austern@apple.com>
1614
1615         PR c++/19628
1616         * cp-tree.h (builtin_valid_in_constant_expr_p): Declare.
1617         * parser.c (cp_parser_postfix_expression): Accept function call in
1618         constant expression if builtin_valid_in_constant_expr_p is true
1619         for that function.
1620         * pt.c (value_dependent_expression_p): Handle CALL_EXPRs properly.
1621         * semantics.c (finish_id_expression): Accept function call in constant
1622         expression if builtin_valid_in_constant_expr_p is true for that
1623         function.
1624         * tree.c (builtin_valid_in_constant_expr_p): New.
1625
1626 2005-02-02  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1627
1628         PR c++/17413
1629         * pt.c (check_instantiated_args): Improve error message.
1630         Fix logic when to print its second part.
1631
1632 2005-02-02  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1633
1634         * cp-tree.h (complete_type_or_else): Remove macro.
1635         (complete_type_or_diagnostic): Rename to complete_type_or_else
1636         and remove last argument.
1637         * typeck.c (complete_type_or_diagnostic): Rename to
1638         complete_type_or_else and remove last argument.
1639
1640 2005-02-02  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1641
1642         * cp-tree.h (commonparms): Remove prototype.
1643         (convert_arguments): Likewise.
1644         (PFN_FROM_PTRMEMFUNC): Remove.
1645         * typeck.c (commonparms): Make static.
1646         (convert_arguments): Add prototype. Make static.
1647         (PFN_FROM_PTRMEMFUNC): Replace by pfn_from_ptrmemfunc.
1648
1649 2005-01-31  Mark Mitchell  <mark@codesourcery.com>
1650
1651         * parser.c (cp_parser_primary_expression): Don't complain about
1652         floating-point literals in integral constant expressions when
1653         !pedantic.
1654
1655 2005-02-01  Alexandre Oliva  <aoliva@redhat.com>
1656
1657         * parser.c (cp_parser_template_id): Revert comment patch too.
1658
1659         PR c++/18757
1660         PR c++/19366
1661         PR c++/19499
1662         * parser.c (cp_parser_template_id): Revert 2004-12-09's patch.
1663         Issue an error when creating the template id.
1664         * pt.c (fn_type_unification): Return early if the explicit
1665         template arg list is an error_mark_node.
1666
1667 2005-01-31  Mark Mitchell  <mark@codesourcery.com>
1668
1669         * decl.c (build_enumerator): Do not issue duplicate error messages
1670         about invalid enumeration constants.
1671         * parser.c (cp_parser_non_integral_constant_expression): Always
1672         set parser->non_integral_constant_expression_p.
1673         (cp_parser_primary_expression): Add cast_p parameter.  Issue
1674         errors about invalid uses of floating-point literals in
1675         cast-expressions.
1676         (cp_parser_postfix_expression): Add cast_p parameter.
1677         (cp_parser_open_square_expression): Pass it.
1678         (cp_parser_parenthesized_expression_list): Add cast_p parameter.
1679         (cp_parser_unary_expression): Likewise.
1680         (cp_parser_new_placement): Pass it.
1681         (cp_parser_direct_new_declarator): Likewise.
1682         (cp_parser_new_initializer): Likewise.
1683         (cp_parser_cast_expression): Add cast_p parameter.
1684         (cp_parser_binary_expression): Likewise.
1685         (cp_parser_question_colon_clause): Likewise.
1686         (cp_parser_assignment_expression): Likewise.
1687         (cp_parser_expression): Likewise.
1688         (cp_parser_constant_expression): If an integral constant
1689         expression is invalid, return error_mark_node.
1690         (cp_parser_expression_statement): Pass cast_p.
1691         (cp_parser_condition): Likewise.
1692         (cp_parser_iteration_statement): Likewise.
1693         (cp_parser_jump_statement): Likewise.
1694         (cp_parser_mem_initializer): Likewise.
1695         (cp_parser_template_argument): Likewise.
1696         (cp_parser_parameter_declaration): Likewise.
1697         (cp_parser_initializer): Likewise.
1698         (cp_parser_throw_expression): Likewise.
1699         (cp_parser_attribute_list): Likewise.
1700         (cp_parser_simple_cast_expression): Likewise.
1701         (cp_parser_functional_cast): Likewise.
1702         (cp_parser_late_parsing_default_args): Likewise.
1703         (cp_parser_sizeof_operand): Save/restore
1704         non_integral_constant_expression_p.
1705
1706 2005-01-31  Mike Stump  <mrs@apple.com>
1707
1708         * parser.c (cp_lexer_new_main): Get the first token, first, before
1709         doing anything.
1710
1711 2005-01-31  Mark Mitchell  <mark@codesourcery.com>
1712
1713         * decl.c (start_decl): Add missing parentheses.
1714
1715 2005-01-30  Mark Mitchell  <mark@codesourcery.com>
1716
1717         PR c++/19555
1718         * cp-tree.h (DECL_USE_TEMPLATE): Expand documentation.
1719         * decl.c (duplicate_decls): Do not discard
1720         DECL_IMPLICIT_INSTANTIATION when merging declarations.
1721         (start_decl): Do not SET_DECL_TEMPLATE_SPECIALIZATION for
1722         variables that do not have DECL_USE_TEMPLATE.
1723
1724         PR c++/19395
1725         * decl.c (grokdeclarator): Refactor code so that qualified names
1726         are never allowed as the declarator in a typedef.
1727
1728         PR c++/19367
1729         * name-lookup.c (do_nonmember_using_decl): Avoid overloading
1730         builtin declarations.
1731
1732         PR c++/19457
1733         * call.c (convert_like_real): Inline call to
1734         dubious_conversion_warnings here.
1735         * cp-tree.h (dubious_conversion_warnings): Remove.
1736         * semantics.c (finish_unary_op_expr): Copy INTEGER_CSTs before
1737         setting TREE_NEGATED_INT.
1738         * typeck.c (dubious_conversion_warnings): Remove.
1739
1740         PR c++/19349
1741         * name-lookup.c (pushdecl_namespace_level): Avoid accessing free'd
1742         memory.
1743
1744 2005-01-28  Mark Mitchell  <mark@codesourcery.com>
1745
1746         PR c++/19253
1747         * parser.c (cp_parser_diagnose_invalid_type_name): Commit to
1748         tentative parses.
1749
1750         PR c++/19667
1751         * pt.c (redeclare_class_template): Robustify.
1752
1753 2005-01-27  Steven Bosscher  <stevenb@suse.de>
1754
1755         * decl.c (finish_case_label): Use SWITCH_STMT accessor macros
1756         instead of SWITCH_EXPR ones.
1757         * pt.c (tsubst_expr): Likewise.
1758         * semantics.c (begin_switch_stmt, finish_switch_cond,
1759         finish_switch_stmt): Likewise.
1760
1761 2005-01-26  J"orn Rennecke <joern.rennecke@st.com>
1762
1763         PR c++/18370
1764         * parser.c (cp_parser_initializer_clause): Initialize *non_constant_p.
1765
1766 2005-01-25  Andrew Pinski  <pinskia@physics.uc.edu>
1767
1768         * class.c (abort_fndecl_addr): New variable.
1769         (build_vtbl_initializer): If we have a pure virtual function
1770         share the abort function's address.
1771         Include gt-cp-class.h at the end.
1772         * config-lang.in (gtfiles): Add cp/class.c.
1773
1774 2005-01-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1775
1776         * cxx-pretty-print.c (pp_cxx_statement): Add prototype. Make static.
1777         (pp_cxx_function_definition): Make static.
1778         * cxx-pretty-print.h (pp_cxx_statement): Remove prototype.
1779         (pp_cxx_function_definition): Likewise.
1780
1781 2005-01-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1782
1783         * name-lookup.c (print_binding_level): Make static.
1784         (constructor_name_full): Make static inline.
1785         (current_decl_namespace): Make static.
1786         * name-lookup.h (constructor_name_full): Remove prototype.
1787         (print_binding_level): Likewise.
1788         (current_decl_namespace): Likewise.
1789
1790 2005-01-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1791
1792         * decl.h (debug_bindings_indentation): Remove.
1793
1794 2005-01-23  Kazu Hirata  <kazu@cs.umass.edu>
1795
1796         * typeck.c: Fix a comment typo.
1797
1798 2005-01-21  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1799
1800         PR c++/19208
1801         * pt.c (fold_decl_constant_value): Always call fold_non_dependent_expr
1802         at least once.
1803         (tsubst): Use fold_decl_constant_value in place of a bare call to
1804         integral_constant_value.
1805
1806 2005-01-20  Kazu Hirata  <kazu@cs.umass.edu>
1807
1808         * typeck.c (more_qualified_p): Remove.
1809         * cp-tree.h: Remove the corresponding prototype.
1810
1811 2005-01-19  Matt Austern  <austern@apple.com>
1812
1813         * typeck.c (comptypes): Handle return code from objc_comptypes
1814         correctly.
1815
1816 2005-01-19  Kazu Hirata  <kazu@cs.umass.edu>
1817
1818         * cp-tree.h, name-lookup.h: Remove unused prototypes.
1819
1820 2005-01-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1821
1822         PR c++/19375
1823         * semantics.c (finish_id_expression): Disable access checking for
1824         already lookuped FIELD_DECL.
1825
1826 2005-01-18  Kazu Hirata  <kazu@cs.umass.edu>
1827
1828         * decl.c (delete_block): Remove.
1829         * cp-tree.h: Remove the corresponding prototype.
1830
1831         * decl.c (vtable_decl_p, vtype_decl_p, walk_globals_data,
1832         walk_vtables_r, walk_vtables, walk_globals_r, walk_globals):
1833         Remove.
1834         * cp-tree.h: Remove the corresponding prototypes.
1835
1836         * tree.c (count_functions, bound_pmf_p, cp_is_overload_p,
1837         cp_update_decl_after_saving, name_p): Remove.
1838         * cp-tree.h: Remove the corresponding prototypes.
1839
1840 2005-01-18  Andrew Pinski  <pinskia@physics.uc.edu>
1841
1842         PR c/19472
1843         * semantics.c (finish_asm_stmt): Strip nops off
1844         input memory operands.
1845
1846 2005-01-18  Kazu Hirata  <kazu@cs.umass.edu>
1847
1848         * Make-lang.in, call.c, cvt.c, init.c, rtti.c, tree.c,
1849         typeck2.c: Update copyright.
1850
1851 2005-01-16  Kazu Hirata  <kazu@cs.umass.edu>
1852
1853         * class.c (get_enclosing_class): Remove.
1854         * cp-tree.h: Remove the corresponding prototypes.
1855
1856         * cvt.c (convert_lvalue): Remove.
1857         * cp-tree.h: Remove the corresponding prototype.
1858
1859         * pt.c (tinst_for_decl): Remove.
1860         * cp-tree.h: Remove the corresponding prototypes.
1861
1862         * tree.c (hash_chainon): Remove.
1863         * cp-tree.h: Remove the corresponding prototypes.
1864
1865 2005-01-15  Jakub Jelinek  <jakub@redhat.com>
1866
1867         PR c++/19263
1868         * typeck2.c (split_nonconstant_init_1) <case VECTOR_TYPE>: Put a copy
1869         of CONSTRUCTOR's node into MODIFY_EXPR, as the original is modified.
1870
1871 2005-01-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1872
1873         * Make-lang.in (cp-warn): Don't append $(WERROR).
1874
1875 2005-01-10  Kazu Hirata  <kazu@cs.umass.edu>
1876
1877         * cp-tree.h: Fix a comment typo.
1878
1879 2005-01-07  Nathan Sidwell  <nathan@codesourcery.com>
1880
1881         PR c++/19298
1882         * pt.c (tsubst_qualified_id): Call convert_from_reference.
1883
1884 2005-01-06  Mark Mitchell  <mark@codesourcery.com>
1885
1886         PR c++/19244
1887         * class.c (add_implicitly_declared_members): Remove dead code.
1888         * decl.c (grokfndecl): Add sfk parameter.  Use it do set
1889         DECL_CONSTRUCTOR_P.
1890         (grokdeclarator): Adjust calls to grokfndecl.
1891         * method.c (implicitly_declare_fn): Improve documentation.
1892         * parser.c (cp_parser_direct_declarator): Do not consider a
1893         function to be a constructor if the containing class was
1894         originally anonymous.
1895
1896 2005-01-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1897
1898         PR c++/17154
1899         * search.c (lookup_field_1): Handle using declaration in
1900         class template partial specialization.
1901
1902 2005-01-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1903
1904         PR c++/19258
1905         * pt.c (push_access_scope): Handle friend defined in class.
1906         (pop_access_scope): Likewise.
1907
1908 2005-01-06  Nathan Sidwell  <nathan@codesourcery.com>
1909
1910         PR c++/19270
1911         * pt.c (tsubst_copy) <ARRAY_REF case>: Handle separately.
1912         (tsubst_copy_and_build) <ARRAY_REF case>: Remove obsolete
1913         array-new handling code.  Use build_x_binary_op.
1914
1915 2005-01-05  Nathan Sidwell  <nathan@codesourcery.com>
1916
1917         PR c++/19030
1918         * cp-tree.h (start_decl): Take pointer to pushed scope, not bool.
1919         * name-lookup.h (push_scope): Return pushed scope, not flag.
1920         * name-lookup.c (push_scope): Return scope that should be popped,
1921         not a flag.
1922         * decl.c (start_decl): Adjust.
1923         (grokfndecl): Adjust scope push and pop.
1924         * decl2.c (check_classfn): Likewise.
1925         * parser.c (cp_parser_condition, cp_parser_conversion_function_id,
1926         cp_parser_init_declarator, cp_parser_direct_declarator,
1927         cp_parser_class_specifier, cp_parser_class_head,
1928         cp_parser_lookup_name,
1929         cp_parser_constructor_declarator_p): Likewise.
1930         * pt.c (instantiate_class_template,
1931         resolve_typename_type): Likewise.
1932
1933 2005-01-03  Volker Reichelt  <reichelt@igpm.rwth-aaachen.de>
1934
1935         PR c++/14136
1936         * parser.c (cp_parser_unqualified_id): Do not issue error message
1937         for typedef-name as destructor declarator when performing an
1938         uncommitted tentative parse.
1939
1940 2005-01-01  Steven Bosscher  <stevenb@suse.de>
1941
1942         PR middle-end/17544
1943         * decl.c (finish_function): Fix comment.  Annotate the compiler
1944         generated return with the current file name and line 0.
1945