OSDN Git Service

* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Tidy
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2009-09-03  Jason Merrill  <jason@redhat.com>
2
3         * class.c (currently_open_class): Make sure we're dealing with the
4         main variant.
5
6         * cp-tree.h (enum overload_flags): Remove OP_FLAG.
7         * method.c (lazily_declare_fn): Check for dtorness in ABI warning.
8
9         * name-lookup.c (is_class_level): Remove.
10         (push_binding_level, leave_scope, resume_scope): Adjust.
11         (pushlevel_class): Adjust.
12         (poplevel_class): Make sure we're on class_binding_level.
13
14         * decl.c (grokmethod): Rename from start_method.
15         (finish_method): Remove.
16         * cp-tree.h: Adjust.
17         * parser.c (cp_parser_save_member_function_body): Adjust.
18
19 2009-09-03  Doug Kwan  <dougkwan@google.com>
20
21         * tree.c (cp_fix_function_decl_p): New.
22         (cp_free_lang_data): New.
23
24 2009-09-03  Diego Novillo  <dnovillo@google.com>
25
26         * Make-lang.in (decl2.o): Add dependency on $(POINTER_SET_H).
27         * decl2.c: Include pointer-set.h.
28         (collect_candidates_for_java_method_aliases): New.
29         (cp_write_global_declarations): Call it.
30         Add local variable CANDIDATES.  If set, call
31         build_java_method_aliases.
32         (build_java_method_aliases): Add argument CANDIDATES.
33         Use it to determine if FNDECL should get a hidden alias.
34         * cp-objcp-common.h (LANG_HOOKS_FREE_LANG_DATA): Define.
35         * cp-tree.h (cp_free_lang_data): Declare.
36
37 2009-09-03  Richard Guenther  <rguenther@suse.de>
38
39         * method.c (use_thunk): Use cgraph_finalize_function to hand
40         off thunks to the cgraph.
41         * semantics.c (emit_associated_thunks): Do not emit thunks
42         for really extern functions.
43
44 2009-09-03  Diego Novillo  <dnovillo@google.com>
45
46         * cp-lang.c (lang_hooks): Remove const qualifier.
47
48 2009-09-02  Jason Merrill  <jason@redhat.com>
49
50         * semantics.c (describable_type): Don't pretend to be in a template.
51
52         * ptree.c (cxx_print_type) [DECLTYPE_TYPE]: Print the expression.
53
54 2009-09-01  Alexandre Oliva  <aoliva@redhat.com>
55
56         * cp-tree.h (TFF_NO_OMIT_DEFAULT_TEMPLATE_ARGUMENTS): New.
57         * cp-lang.c (cxx_dwarf_name): Pass it.
58         * error.c (count_non_default_template_args): Take flags as
59         argument.  Adjust all callers.  Skip counting of default
60         arguments if the new flag is given.
61
62 2009-09-01  Dodji Seketeli  <dodji@redhat.com>
63
64         PR bootstrap/41205
65         * pt.c (make_ith_pack_parameter_name): Don't use strnlen that is a
66         GNU extension.
67
68 2009-09-01  Richard Guenther  <rguenther@suse.de>
69
70         * cp-objcp-common.c (cp_expr_size): Use tree_expr_size.
71         * cp-objcp-common.h (LANG_HOOKS_EXPR_SIZE): Do not define.
72
73 2009-09-01  Richard Guenther  <rguenther@suse.de>
74
75         * cp-objcp-common.h (LANG_HOOKS_MARK_ADDRESSABLE): Remove.
76
77 2009-08-31  Dodji Seketeli  <dodji@redhat.com>
78
79         PR debug/30161
80         * cp-tree.h (get_template_info): Parameter should be const.
81         (CLASSTYPE_SPECIALIZATION_OF_PRIMARY_TEMPLATE_P): Fix typo.
82         (get_template_argument_pack_elems,
83         get_primary_template_innermost_parameters,
84         get_template_innermost_arguments, template_template_parameter_p):
85         Declare ...
86         * pt.c (get_template_argument_pack_elems,
87         get_template_innermost_parameters, get_template_innermost_arguments,
88         template_template_parameter_p):
89         ... New C++ front end implementation of new language hooks.
90         (primary_template_instantiation_p): New private helper.
91         (make_ith_pack_parameter_name): Use snprintf and strnlen instead of
92         printf and strlen.
93         (get_template_info): Const-ify parameter.
94         * cp-lang.c (LANG_HOOKS_GET_INNERMOST_GENERIC_PARMS,
95         LANG_HOOKS_GET_INNERMOST_GENERIC_ARGS,
96         LANG_HOOKS_GET_ARGUMENT_PACK_ELEMS,
97         LANG_HOOKS_GENERIC_TYPE_PARAMETER_DECL_P): Initialize these
98         interfaces for the C++ front-end.
99
100 2009-08-31  Jason Merrill  <jason@redhat.com>
101
102         PR c++/41127
103         * parser.c (cp_parser_enum_specifier): Make sure the : is followed by a
104         type-specifier-seq before we commit.
105
106 2009-08-28  Richard Guenther  <rguenther@suse.de>
107
108         PR lto/41058
109         * cp-gimplify.c (cp_genericize_r): Do not leak zero-sized stores
110         into the generic IL.
111
112 2009-08-27  Richard Guenther  <rguenther@suse.de>
113
114         * class.c (build_vtbl_ref_1): Remove excess vertical space.
115         * Make-lang.in (CXX_TREE_H): Remove c-common.def dependency
116         tracked by $(TREE_H).
117         * semantics.c (expand_or_defer_fn): Zero DECL_SAVED_TREE.
118
119 2009-08-26  Jason Merrill  <jason@redhat.com>
120
121         * call.c (build_builtin_candidate): Don't set LOOKUP_ONLYCONVERTING
122         if we're contextually converting to bool.
123         (build_conditional_expr): Likewise.
124         * typeck.c (condition_conversion): Likewise.
125
126         * call.c (build_conditional_expr): Fix logic errors.
127         (build_new_op): Remove dead COND_EXPR handling.
128
129 2009-08-24  Jason Merrill  <jason@redhat.com>
130
131         * cp-tree.h (DECL_DEFERRED_FN): Remove.
132         (struct lang_decl_fn): Remove deferred flag.
133         * class.c (build_clone): Don't set it.
134         * decl2.c (note_vague_linkage_fn): Don't check or set it.
135         (mark_used): Don't check it.
136         * method.c (make_thunk, make_alias_for): Don't set it.
137
138         * decl2.c (mark_used): Streamline logic.
139
140         PR c++/41109
141         PR c++/41110
142         PR c++/41134
143         * cp-tree.h (DECL_ODR_USED): New macro.
144         (struct lang_decl_base): Add odr_used flag.
145         * decl.c (duplicate_decls): Propagate it.  Use it for error.
146         * pt.c (register_specialization): Use it for error.
147         * decl2.c (mark_used): Use it as gating flag rather than TREE_USED.
148         (cp_write_global_declarations): Use it for error.
149         (tree_used_ok): Remove.
150         * cp-tree.h: Remove tree_used_ok.
151         * call.c (build_call_a): Don't call it.
152         * init.c (build_offset_ref): Likewise.
153
154 2009-08-21  Jakub Jelinek  <jakub@redhat.com>
155
156         PR c++/41131
157         * tree.c (lvalue_p_1) <case CONST_DECL>: Return clk_none if
158         not TREE_STATIC.
159
160 2009-08-19  Jason Merrill  <jason@redhat.com>
161
162         PR c++/41119
163         PR c++/41120
164         * decl2.c (mark_used): Increment function_depth during synthesis.
165         * parser.c (cp_parser_default_argument): Not here.
166
167 2009-08-19  Jakub Jelinek  <jakub@redhat.com>
168
169         * method.c (use_thunk): Call free_after_compilation after
170         assemble_end_function.
171
172 2009-08-17  Richard Guenther  <rguenther@suse.de>
173
174         * decl.c (build_ptrmemfunc_type): Keep variant chain intact.
175         Avoid useless copy.
176         (finish_enum): Keep variant chain intact.
177         * tree.c (cp_build_reference_type): Likewise.
178
179 2009-08-16  Jason Merrill  <jason@redhat.com>
180
181         Make TREE_USED match the [basic.def.odr] concept for FUNCTION_DECL
182         and VAR_DECL, so mark_used only has effect the first time.
183         * decl2.c (mark_used): Just return if TREE_USED is already set.
184         Don't set TREE_USED if cp_unevaluated_operand is set.
185         (tree_used_ok): New fn.
186         * init.c (build_offset_ref): Check it instead of TREE_USED.
187         * call.c (build_call_a): Likewise.
188         * cp-tree.h: Declare it.
189         (DECL_NO_LINKAGE_CHECKED): No longer needed.
190         (struct lang_decl_base): Remove no_linkage_checked bitfield.
191
192         * decl2.c (finish_static_data_member_decl): Don't set TREE_USED.
193
194         * decl2.c (mark_used): It's ok to synthesize for default args now.
195
196 2009-08-10  Jason Merrill  <jason@redhat.com>
197
198         Implement DR 757: It's OK for a decl to use a type without linkage
199         so long as the decl is defined in the current translation unit.
200         * decl2.c (no_linkage_decls): New vector.
201         (mark_used): Add decls that use types with no linkage.
202         (cp_write_global_declarations): Check that they are defined.
203         (decl_defined_p, no_linkage_error): New fns.
204         * cp-tree.h (DECL_NO_LINKAGE_CHECKED): New macro.
205         (struct lang_decl_base): Add flag.
206         * decl.c (grokfndecl): Don't check type linkage.
207         (grokvardecl): If the type has no linkage, just make sure
208         DECL_LANG_SPECIFIC is set.
209         * pt.c (check_instantiated_arg): Don't check type linkage.
210         * name-lookup.c (is_local_extern): New fn.
211         * name-lookup.h: Declare it.
212
213 2009-08-05  Jason Merrill  <jason@redhat.com>
214
215         PR c++/40948
216         * init.c (build_vec_init): Evaluate the initializer before
217         starting the initialization try block.
218
219 2009-08-05  Manuel López-Ibáñez  <manu@gcc.gnu.org>
220
221         PR c++/36069
222         * typeck.c (convert_for_assignment): Do not warn for any boolean
223         variant. Use explicit location.
224
225 2009-08-04  Dodji Seketeli  <dodji@redhat.com>
226
227         PR c++/39987
228         * pt.c (tsubst_default_argument): Let access checks of the
229         default argument happen in the context of the current function.
230
231 2009-08-04  Manuel López-Ibáñez  <manu@gcc.gnu.org>
232
233         PR c++/16696
234         * call.c (build_new_op): Only try prefix operator if -fpermissive,
235         otherwise just error.
236
237 2009-08-04  Dodji Seketeli  <dodji@redhat.com>
238
239         PR debug/39706
240         * error.c (lang_decl_name): Print qualified names for decls
241         in  namespace scope.
242
243 2009-08-03  Jason Merrill  <jason@redhat.com>
244             Jakub Jelinek  <jakub@redhat.com>
245
246         PR c++/40948
247         * init.c (build_vec_init): Look through a TARGET_EXPR around a
248         CONSTRUCTOR.
249
250 2009-07-31  Jason Merrill  <jason@redhat.com>
251             Douglas Gregor  <doug.gregor@gmail.com>
252
253         Remove implicit binding of lvalues to rvalue references (N2831)
254         * call.c (convert_class_to_reference): Binding an lvalue to an
255         rvalue reference is bad.  If the user-defined conversion is bad,
256         set bad_p before merging conversions.
257         (maybe_handle_ref_bind): Don't push down bad_p.
258         (reference_binding): Binding an lvalue to an rvalue reference is bad.
259         (convert_like_real): Give a helpful error about binding lvalue
260         to rvalue reference.
261         (reference_related_p): No longer static.
262         * typeck.c (build_typed_address): New.
263         (build_static_cast_1): Add static_cast from lvalue to &&.
264         * cp-tree.h: Adjust.
265
266 2009-07-31  Jason Merrill  <jason@redhat.com>
267
268         * call.c (reference_binding): Rename lvalue_p to is_lvalue.
269         Do direct binding of "rvalues" in memory to rvalue references.
270         * tree.c (lvalue_p_1): Can't be both non-addressable lvalue and
271         "rvalue" in memory.
272         * typeck.c (build_static_cast_1): Do direct binding of memory
273         "rvalues" to rvalue references.
274         * cvt.c (cp_fold_convert): New.
275         * cp-tree.h: Declare it.
276
277 2009-07-31  Jason Merrill  <jason@redhat.com>
278
279         * typeck.c (build_address): Do fold away ADDR_EXPR of INDIRECT_REF.
280         * tree.c (rvalue): Use cp_build_qualified_type, not TYPE_MAIN_VARIANT.
281
282 2009-07-29  Jason Merrill  <jason@redhat.com>
283
284         PR c++/14912
285         * cp-tree.h (enum tsubst_flags): Add tf_no_class_instantiations.
286         * error.c (count_non_default_template_args): Pass it.
287         * pt.c (tsubst) [TYPENAME_TYPE]: Don't complete type if it's set.
288
289 2009-07-29  Richard Guenther  <rguenther@suse.de>
290
291         PR c++/40834
292         * cp-gimplify.c (cp_genericize_r): Properly walk the BIND_EXPR
293         vars.
294
295 2009-07-26  Simon Martin  <simartin@users.sourceforge.net>
296
297         PR c++/40749
298         * decl.c (grokdeclarator): Do not set TREE_NO_WARNING for functions
299         with a qualified return type.
300
301 2009-07-24  Jason Merrill  <jason@redhat.com>
302
303         Core issue 901
304         * call.c (build_op_delete_call): If this is for a new-expression
305         and the op delete is deleted, do nothing.
306
307         Core issue 702
308         * call.c (compare_ics): Give list-initialization of std::init_list
309         priority over conversion to scalar, too.
310
311 2009-07-22  Jason Merrill  <jason@redhat.com>
312
313         * mangle.c (mangle_type_string_for_rtti): Rename to be clearer.
314         (needs_fake_anon): New.
315         (write_name): Check it.
316         (write_nested_name): Add a fake anonymous namespace scope if true.
317         * name-lookup.c (get_anonymous_namespace_name): No longer static.
318         * rtti.c, cp-tree.h: Adjust.
319
320 2009-07-22  Richard Guenther  <rguenther@suse.de>
321
322         PR c++/40799
323         * cp-gimplify.c (cp_gimplify_expr): Move handling of using
324         related exprs to ...
325         (cp_genericize_r): ... genericization stage.
326         (cp_genericize): Adjust.
327
328 2009-07-21  Jason Merrill  <jason@redhat.com>
329
330         Core issue 934
331         * call.c (reference_binding): Implement binding to { }.
332         (initialize_reference): Binding temporary to non-const && is fine.
333         * decl.c (grok_reference_init): Remove error for CONSTRUCTOR.
334
335         * decl.c (reshape_init_r): { T } is not an aggregate initializer
336         for class T.
337
338 2009-07-17  Richard Guenther  <rguenther@suse.de>
339
340         PR c/40401
341         * decl.c (finish_function): Do not emit unused result warnings
342         from here.
343         * cp-objcp-common.h (LANG_HOOKS_POST_GIMPLIFY_PASS): Use
344         c_warn_unused_result_pass.
345         * semantics.c (expand_or_defer_fn): Adjust assertion about IL status.
346         * optimize.c (clone_body): Clone in GENERIC.
347         (maybe_clone_body): Do not clear DECL_SAVED_TREE.
348         * decl2.c (cp_write_global_declarations): Fix body test.
349         Do not call cgraph_optimize.
350         * Make-lang.in (optimize.o): Add tree-iterator.h dependency.
351         * method.c (use_thunk): Register thunk with
352         cgraph_finalize_function.
353         * error.c (function_category): Guard access of DECL_LANG_SPECIFIC.
354
355 2009-07-17  Richard Guenther  <rguenther@suse.de>
356
357         * init.c (build_vec_delete_1): Do not set DECL_REGISTER on the
358         temporary pointer.
359
360 2009-07-17  Aldy Hernandez  <aldyh@redhat.com>
361             Manuel López-Ibáñez  <manu@gcc.gnu.org>
362
363         PR 40435 
364         * typeck.c, init.c, class.c, method.c, rtti.c, except.c, error.c,
365         tree.c, cp-gimplify.c, cxx-pretty-print.c, pt.c, semantics.c,
366         call.c, cvt.c, mangle.c: Add location argument to
367         fold_{unary,binary,ternary}, fold_build[123], build_call_expr,
368         build_size_arg, build_fold_addr_expr, build_call_array,
369         non_lvalue, size_diffop, fold_build1_initializer,
370         fold_build2_initializer, fold_build3_initializer,
371         fold_build_call_array, fold_build_call_array_initializer,
372         fold_single_bit_test, omit_one_operand, omit_two_operands,
373         invert_truthvalue, fold_truth_not_expr, build_fold_indirect_ref,
374         fold_indirect_ref, combine_comparisons, fold_builtin_*,
375         fold_call_expr, build_range_check, maybe_fold_offset_to_address,
376         round_up, round_down.
377
378 2009-07-16  Jason Merrill  <jason@redhat.com>
379
380         PR libstdc++/37907
381         Split POD into "standard-layout" and "trivial" as per N2230,
382         Support std::is_standard_layout and std::is_trivial traits.
383         * cp-tree.h (enum cp_trait_kind): Add CPTK_IS_STD_LAYOUT,
384         CPTK_IS_TRIVIAL.
385         (struct lang_type_class): Add non_std_layout.
386         (CLASSTYPE_NON_STD_LAYOUT): New.
387         * class.c (check_bases): Set it.
388         (check_field_decls): Likewise.
389         (check_bases_and_members): Likewise.
390         * parser.c (cp_parser_primary_expression): Handle RID_IS_STD_LAYOUT,
391         RID_IS_TRIVIAL.
392         (cp_parser_trait_expr): Likewise.
393         * semantics.c (trait_expr_value): Handle CPTK_IS_STD_LAYOUT,
394         CPTK_IS_TRIVIAL.
395         (finish_trait_expr): Likewise.
396         * tree.c (scalarish_type_p, trivial_type_p, std_layout_type_p): New.
397         (pod_type_p): Use them.
398         (type_has_nontrivial_copy_init, type_has_nontrivial_default_init): New.
399
400         Adjust bits of the language that no longer refer to POD types.
401         * call.c (convert_arg_to_ellipsis): Use type_has_nontrivial_copy_init
402         and TYPE_HAS_NONTRIVIAL_DESTRUCTOR rather than pod_type_p.
403         (build_x_va_arg): Likewise.
404         (call_builtin_trap): Remove.
405         * decl.c (declare_local_label): Use type_has_nontrivial_default_init
406         and TYPE_HAS_NONTRIVIAL_DESTRUCTOR rather than pod_type_p.
407         (cp_finish_decl): Likewise.
408         (check_previous_goto_1, check_goto): Adjust error.
409         * typeck.c (build_class_member_access_expr): Check
410         CLASSTYPE_NON_STD_LAYOUT rather than CLASSTYPE_NON_POD_P.
411
412 2009-07-14  Taras Glek  <tglek@mozilla.com>
413             Rafael Espindola  <espindola@google.com>
414
415         * Make-lang.in: Added CP_PLUGIN_HEADERS and
416         c.install-target to export cp-tree.h cxx-pretty-print.h
417         name-lookup.h headers for plugins.
418
419 2009-07-14  Jason Merrill  <jason@redhat.com>
420
421         PR c++/37276
422         * decl.c (decls_match): A non-extern-C declaration doesn't match
423         a builtin extern-C declaration.
424
425         PR c++/40746
426         * name-lookup.c (qualified_lookup_using_namespace): Don't stop
427         looking in used namespaces just because we found something on
428         another branch.
429
430         PR c++/40740
431         * semantics.c (perform_koenig_lookup): Handle empty template args.
432
433         * call.c (build_over_call): Use can_trust_pointer_alignment.
434
435 2009-07-14  Dodji Seketeli  <dodji@redhat.com>
436
437         PR debug/40705
438         PR c++/403057
439         * decl2.c (grokfield): Don't call set_underlying_type on typedef
440         decls that are type names.
441
442 2009-07-13  Andrew Pinski  <andrew_pinski@playstation.sony.com>
443
444         PR C++/22154
445         * parser.c (cp_parser_elaborated_type_specifier): Accept typename in
446         front of qualified names.
447
448 2009-07-12  Jason Merrill  <jason@redhat.com>
449
450         PR c++/36628
451         * tree.c (rvalue): Use lvalue_or_rvalue_with_address_p.
452
453         PR c++/37206
454         * cp-tree.h (enum cp_lvalue_kind_flags): Add clk_rvalueref.
455         * tree.c (lvalue_p_1): Return it.  Remove
456         treat_class_rvalues_as_lvalues parm.
457         (real_lvalue_p): Disallow pseudo-lvalues here.
458         (lvalue_or_rvalue_with_address_p): New fn.
459         * call.c (initialize_reference): Use it instead of real_lvalue_p.
460
461         PR c++/40689
462         * init.c (build_new_1): Handle initializer list as array initializer.
463         (build_vec_init): Likewise.
464         * typeck.c (cp_build_modify_expr): Likewise.
465         * typeck2.c (process_init_constructor_array): Error rather than abort
466         if too many initializers.
467
468 2009-07-10  Jakub Jelinek  <jakub@redhat.com>
469
470         PR c++/40502
471         * error.c (cp_print_error_function): Check for NULL block.
472
473 2008-07-09  Simon Martin  <simartin@users.sourceforge.net>
474             Jason Merrill  <jason@redhat.com>
475
476         * pt.c (perform_typedefs_access_check, get_types_needing_access_check,
477         append_type_to_template_for_access_check_1): Use CLASS_TYPE_P.
478
479 2009-07-09  Dodji Seketeli  <dodji@redhat.com>
480
481         PR c++/40684
482         * pt.c (type_unification_real): Use tsubst_template_arg instead
483         of tsubst to substitute default template arguments.
484
485 2009-07-08  Manuel López-Ibáñez  <manu@gcc.gnu.org>
486
487         PR c++/31246
488         * init.c (build_new_1): Set TREE_NO_WARNING for compiler-generated
489         code.
490         * cp-gimplify.c (genericize_eh_spec_block): Likewise.
491         
492
493 2009-07-07  Jason Merrill  <jason@redhat.com>
494
495         PR c++/35828
496         * pt.c (tsubst_decl): Don't abort if we didn't change anything
497         in a TEMPLATE_DECL's args.
498
499 2009-07-07  Manuel López-Ibáñez  <manu@gcc.gnu.org>
500
501         * semantics.c (finalize_nrv_r): Replace EXPR_LOCUS by
502         EXPR_LOCATION.
503         
504 2009-07-07  Jason Merrill  <jason@redhat.com>
505
506         PR c++/37816
507         * decl.c (build_enumerator): Don't add enumerators for a
508         scoped enum to the enclosing class.
509
510         PR c++/40639
511         * decl.c (start_enum): Allow dependent underlying type.
512
513         PR c++/40633
514         * decl.c (finish_enum): Finish scope even in a template.
515
516 2009-07-07  Manuel López-Ibáñez  <manu@gcc.gnu.org>
517
518         * init.c: Replace %J by an explicit location. Update all calls.
519         * decl.c: Likewise.
520         * typeck2.c: Likewise.
521         * pt.c: Likewise.
522         * name-lookup.c: Likewise.
523         
524 2009-07-06  Manuel López-Ibáñez  <manu@gcc.gnu.org>
525
526         * decl.c: Replace %H by an explicit location. Update all calls.
527         * except.c: Likewise.
528         * semantics.c: Likewise.
529         * parser.c: Likewise.
530
531 2009-07-06  Simon Martin  <simartin@users.sourceforge.net>
532
533         PR c++/40557
534         * pt.c (perform_typedefs_access_check, get_types_needing_access_check,
535         append_type_to_template_for_access_check_1): Use
536         RECORD_OR_UNION_CODE_P.
537
538 2009-07-04  Jason Merrill  <jason@redhat.com>
539
540         * pt.c (retrieve_specialization): Don't get confused by a
541         using-declaration that brings in another instance of this template
542         from a base class.
543
544         * ptree.c (cxx_print_type): Fix logic.
545
546         * cp-tree.h (LANG_DECL_FN_CHECK): Fix non-checking version.
547
548         PR c++/40619
549         * cp-tree.h (struct lang_decl_parm): New.
550         (struct lang_decl): Add it.
551         (LANG_DECL_PARM_CHECK): New.
552         (DECL_PARM_INDEX): New.
553         * decl2.c (parm_index): Remove.
554         * lex.c (retrofit_lang_decl): Handle parms.
555         (cxx_dup_lang_specific_decl): Likewise.
556         * mangle.c (write_expression): Adjust.
557         * tree.c (cp_tree_equal): Adjust.
558         (decl_linkage): Only check DECL_COMDAT for functions and variables.
559         * parser.c (cp_parser_parameter_declaration_list): Set
560         DECL_PARM_INDEX.
561         * pt.c (iterative_hash_template_arg): Hash it.
562
563 2009-07-03  Jason Merrill  <jason@redhat.com>
564
565         * cp-tree.h (struct lang_decl): Overhaul.
566         (struct lang_decl_flags): Remove.
567         (struct lang_decl_base): New.
568         (struct lang_decl_min): New.
569         (struct lang_decl_fn): New.
570         (struct lang_decl_ns): New.
571         (CAN_HAVE_FULL_LANG_DECL_P): Replace with LANG_DECL_HAS_MIN.
572         (LANG_DECL_MIN_CHECK): New.
573         (LANG_DECL_FN_CHECK): New.
574         (LANG_DECL_NS_CHECK): New.
575         (STRIP_TEMPLATE): New.
576         (NON_THUNK_FUNCTION_CHECK): Remove.
577         (DECL_DECLARES_FUNCTION_P): New.
578         (lots): Adjust.
579         * lex.c (retrofit_lang_decl, cxx_dup_lang_specific_decl): Adjust.
580         * decl.c (push_local_name, duplicate_decls): Adjust.
581         * decl2.c (start_objects): Don't set u2sel.
582         * semantics.c (finish_omp_threadprivate): Adjust.
583         * class.c (build_clone): Don't do much on TEMPLATE_DECLs.
584         (decl_cloned_function_p): Out-of-line implementation of macros.
585         (clone_function_decl, adjust_clone_args): Use DECL_CLONED_FUNCTION_P.
586         * mangle.c (write_unqualified_name): Don't check function flags
587         on non-functions.
588         * method.c (make_alias_for): Don't set DECL_CLONED_FUNCTION.
589         * pt.c (build_template_decl): Don't set function flags.
590         (check_default_tmpl_args): Check that it's a function.
591         (instantiate_template): Use DECL_ABSTRACT_ORIGIN to find the
592         cloned template.
593
594         * pt.c (tsubst_decl) [FUNCTION_DECL]: Don't tsubst
595         DECL_CLONED_FUNCTION.
596
597         * cp-tree.h (struct lang_type_class): Move sorted_fields here.
598         * class.c (finish_struct_1): Adjust.
599         * ptree.c (cxx_print_decl, cxx_print_type): Adjust.
600         * search.c (lookup_field_1): Adjust.
601
602         * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Remove.
603         * decl.c (finish_method): Don't add to it.
604         * class.c (fixup_pending_inline): Remove.
605         (fixup_inline_methods): Remove.
606         (finish_struct_1): Don't call it.
607
608         * error.c (dump_function_name): Handle null name.
609
610 2009-07-02  Mark Mitchell  <mark@codesourcery.com>
611
612         * typeck.c (cp_build_binary_op): Move warnings about use of NULL
613         in arithmetic earlier and allow comparisions of NULL with
614         pointers-to-members.
615
616 2009-07-02  Jason Merrill  <jason@redhat.com>
617
618         Use hash tables for template specialization lookup.
619         * pt.c (struct spec_entry): New type.
620         (decl_specializations, type_specializations): New hash tables.
621         (register_specialization, retrieve_specialization): Use them.
622         (reregister_specialization, lookup_template_class): Use them.
623         (eq_specializations, hash_tmpl_and_args, hash_specialization): New.
624         (iterative_hash_template_arg): New.
625         (init_template_processing): New
626         (process_partial_specialization): Don't look to see if we already
627         have this partial specialization.
628         (maybe_process_partial_specialization): Handle reassigning
629         full specializations when we get an explicit specialization
630         of the partial instantiation.
631         (tsubst_friend_function): Adjust specialization reassignment code.
632         (instantiate_template): Only do one lookup.
633         (instantiate_decl): Don't do any lookup.
634         * cp-tree.h: Declare init_template_processing.
635         * decl.c (duplicate_decls): Pass args to reregister_specialization.
636
637 2009-07-01  Jason Merrill  <jason@redhat.com>
638
639         * cp-tree.h (DECL_CLASS_TEMPLATE_P): Use DECL_IMPLICIT_TYPEDEF_P.
640
641         * pt.c (register_specialization): Use duplicate_decls to merge
642         the argument with a previous specialization.
643         (check_explicit_specialization): Call register_specialization to
644         merge the TEMPLATE_DECL with a previous version.
645         (determine_specialization): Return the args even if fn is a template.
646
647 2009-07-01  Ian Lance Taylor  <iant@google.com>
648
649         * g++spec.c (lang_specific_driver): Bump num_args by 1.
650
651 2009-06-30  Jason Merrill  <jason@redhat.com>
652
653         PR c++/40595
654         * pt.c (tsubst_pack_expansion): Handle unexpanded packs in an
655         EXPR_PACK_EXPANSION.
656
657 2009-06-29  Jason Merrill  <jason@redhat.com>
658
659         PR c++/40274
660         * error.c (dump_template_parms): Pass all args to
661         count_non_default_template_args.
662         (count_non_default_template_args): Pull out the inner ones.
663
664 2009-06-26  H.J. Lu  <hongjiu.lu@intel.com>
665
666         * decl.c (duplicate_decls): Re-indent.
667
668 2009-06-25  Ian Lance Taylor  <iant@google.com>
669
670         * call.c (avoid_sign_compare_warnings): New static function.
671         (build_new_op): Call it.
672         * typeck.c (cp_build_binary_op): Don't call warn_sign_compare if
673         TREE_NO_WARNING is set on either operand.
674
675 2009-06-25  Ian Lance Taylor  <iant@google.com>
676
677         * g++spec.c (SKIPOPT): define.
678         (lang_specific_driver): Handle -static-libstdc++.  Only add
679         LIBSTDCXX_STATIC if we add LIBSTDCXX.
680
681 2009-06-25  Ian Lance Taylor  <iant@google.com>
682
683         * cvt.c (convert_to_void): Only warn about COND_EXPR if neither
684         the second nor third operand has side effects.
685
686 2009-06-25  Ian Lance Taylor  <iant@google.com>
687
688         * parser.c (cp_parser_binary_expression): Increment
689         c_inhibit_evaluation_warnings while parsing the right hand side of
690         "true || x" or "false && x".
691         * typeck.c (cp_build_binary_op): Only call warn_for_sign_compare
692         if c_inhibit_evaluation_warnings is zero.
693
694 2009-06-24  Jason Merrill  <jason@redhat.com>
695
696         * error.c (dump_decl): Do say "typedef" for the injected class name.
697
698         * pt.c (lookup_template_class): Use currently_open_class,
699         compare template args later.
700
701         PR c++/40342
702         * decl.c (decls_match): Check DECL_TI_TEMPLATE too.
703         * class.c (resolve_address_of_overloaded_function): Fix typo.
704
705 2009-06-18  Aldy Hernandez  <aldyh@redhat.com>
706
707         * class.c (get_vtable_decl): Replace finish_decl with cp_finish_decl.
708         * decl.c (finish_decl): Remove.
709         (declare_global_var): Replace finish_decl with cp_finish_decl.
710         (start_method): Same.
711         * rtti.c (emit_tinfo_decl): Same.
712         * pt.c (tsubst_expr): Same.
713         (instantiate_decl): Same.
714         * decl2.c (grokbitfield): Same.
715         * name-lookup.c (pushdecl_top_level_1): Same.
716         * cp-tree.h: Remove finish_decl.
717
718 2009-06-16  David Edelsohn  <edelsohn@gnu.org>
719
720         * g++-spec.c (LIBSTDCXX_STATIC): Default to NULL.
721         (lang_specific_driver): Always allocate extra argument.
722         Add LIBSTDCXX_STATIC to arglist if defined and linking
723         statically.
724
725 2009-06-16  Ian Lance Taylor  <iant@google.com>
726
727         * Make-lang.in (cp/class.o): Depend upon gt-cp-class.h.
728         (cp/semantics.o): Depend upon gt-cp-semantics.h.
729
730 2009-06-16  Ian Lance Taylor  <iant@google.com>
731
732         * parser.c (cp_unevaluated_operand): Define global variable.
733         (cp_parser_question_colon_clause): Increment
734         c_inhibit_evaluation_warnings when evaluating an expression which
735         will never be executed.
736         (cp_parser_decltype): Increment cp_unevaluated_operand and
737         c_inhibit_evaluation_warnings, not skip_evaluation.
738         (cp_parser_sizeof_operand): Likewise.
739         (cp_parser_enclosed_template_argument_list): Save
740         cp_unevaluated_operand and c_inhibit_evaluation_warnings, not
741         skip_evaluation.
742         * cp-tree.h (struct saved_scope): Remove skip_evaluation field.
743         Add unevaluated_operand and inhibit_evaluation_warnings fields.
744         (cp_unevaluated_operand): Declare.
745         * name-lookup.c (push_to_top_level): Save cp_unevaluated_operand
746         and c_inhibit_evaluation_warnings rather than skip_evaluation.
747         (pop_from_top_level): Restore cp_unevaluated_operand and
748         c_inhibit_evaluation_warnings rather than skip_evaluation.
749         * class.c (build_base_path): Check cp_unevaluated_operand rather
750         than skip_evaluation.
751         * typeck.c (build_class_member_access_expr): Likewise.
752         (cp_build_binary_op): Don't warn about bad shift counts if
753         c_inhibit_evaluation_warnings is non-zero.
754         * pt.c (coerce_template_parms): Save state of
755         cp_unevaluated_operand and c_inhibit_evaluation_warnings, not
756         skip_evaluation.
757         (tsubst_aggr_type): Likewise.
758         (tsubst_pack_expansion): Check cp_unevaluated_operand rather than
759         skip_evaluation.
760         (tsubst_copy): Likewise.
761         (tsubst): Set cp_unevaluated_operand and
762         c_inhibit_evaluation_warnings, not skip_evaluation.
763         (tsubst_copy_and_build): Likewise.
764         * call.c (convert_arg_to_ellipsis): Check cp_unevaluated_operand
765         rather than skip_evaluation.
766         * decl2.c (mark_used): Likewise.
767         * semantics.c (finish_non_static_data_member): Likewise.
768         * cvt.c (cp_convert_and_check): Check
769         c_inhibit_evaluation_warnings rather than skip_evaluation.
770         * mangle.c (write_type): Set cp_unevaluated_operand rather than
771         skip_evaluation.
772
773 2009-06-15  Ian Lance Taylor  <iant@google.com>
774
775         * parser.c (cp_parser_direct_declarator): Add braces around
776         variables declared before label.
777
778 2009-06-15  Rafael Avila de Espindola  <espindola@google.com>
779
780         * cp-objcp-common.h (LANG_HOOKS_COMDAT_GROUP): Remove.
781         * cp-tree.h (cxx_comdat_group): Change signature.
782         * decl.c (duplicate_decls): Use DECL_COMDAT_GROUP.
783         (cxx_comdat_group): Change signature.
784         * decl2.c (comdat_linkage, maybe_make_one_only): Update call to
785         make_decl_one_only.
786         (constrain_visibility, get_guard): Use DECL_COMDAT_GROUP.
787         * method.c (use_thunk): Update call to make_decl_one_only.
788         * optimize.c (maybe_clone_body): Use DECL_COMDAT_GROUP
789
790 2009-06-12  Aldy Hernandez  <aldyh@redhat.com>
791
792         * typeck.c (cp_build_binary_op): Pass location to overflow_warning.
793         (build_modify_expr): New arg.
794         * semantics.c (finish_unary_op_expr): Pass location to
795         overflow_warning.
796         (handle_omp_for_class_iterator): Pass location to build_modify_expr.
797         * typeck.c (cxx_sizeof_or_alignof_type): Pass location to
798         c_sizeof_or_alignof_type.
799         (build_array_ref): New argument.
800         (build_compound_expr): Same.
801         (build_const_cast): Same.
802         (build_ptrmemfunc): Pass location to build_c_cast.
803         * init.c (avoid_placement_new_aliasing): Pass location to
804         build_stmt.
805         (build_vec_delete_1): Pass location to cp_build_modify_expr,
806         build_compound_expr.
807         * class.c (build_vtbl_ref_1): Pass location to build_array_ref.
808         * decl.c (poplevel): Pass location to c_build_bind_expr.
809         (finish_case_label): Pass location to build_case_label.
810         (finish_constructor_body): Same.
811         (finish_destructor_body): Pass location to build_stmt.
812         (cxx_maybe_build_cleanup): Same, but to build_compound_expr.
813         * call.c (build_new_op): Pass location to build_array_ref.
814         (build_x_va_arg): Pass location to build_va_arg.
815         * except.c (expand_end_catch_block): Pass location to
816         build_stmt.
817         * cp-tree.h (build_array_ref): New argument.
818         (build_compound_expr): Same.
819         (build_c_cast): Same.
820         * cp-gimplify.c (gimplify_if_stmt): Pass location on down.
821         (gimplify_switch_stmt): Same.
822         * typeck2.c (split_nonconstant_init_1): Same.
823         * pt.c (tsubst_copy): Same.
824         * semantics.c (add_decl_expr): Same.
825         (do_poplevel): Same.
826         (push_cleanup): Same.
827         (finish_goto_stmt): Same.
828         (finish_expr_stmt): Same.
829         (begin_if_stmt): Same.
830         (begin_while_stmt): Same.
831         (begin_do_stmt): Same.
832         (finish_return_stmt): Same.
833         (begin_for_stmt): Same.
834         (finish_break_stmt): Same.
835         (finish_continue_stmt): Same.
836         (begin_switch_stmt): Same.
837         (begin_try_block): Same.
838         (begin_handler): Same.
839         (finish_asm_stmt): Same.
840         (finish_label_stmt): Same.
841         (finish_stmt_expr_expr): Same.
842         (finalize_nrv_r): Same.
843         (finish_omp_atomic): Same.
844         * name-lookup.c (do_using_directive): Same.
845         * decl2.c (grok_array_decl): Same.
846         * parser.c (cp_parser_cast_expression): Same.
847         (cp_parser_selection_statement): Same.
848         (cp_parser_implicitly_scoped_statement): Same.
849         (cp_parser_objc_selector_expression): Same.
850         (cp_parser_objc_synchronized_statement): Same.
851         (cp_parser_objc_throw_statement): Same.
852         (cp_parser_omp_critical): Same.
853         (cp_parser_omp_master): Same.
854         * typeck.c (build_function_call): Add location argument.
855         * init.c: Add location argument to all build_decl calls.
856         * class.c: Same.
857         * method.c: Same.
858         * rtti.c: Same.
859         * tree.c: Same.
860         * pt.c: Same.
861         * semantics.c: Same.
862         * lex.c: Same.
863         * decl2.c: Same.
864         * cp-gimplify.c: Same.
865         * decl.c: Same.
866         (cp_make_fname_decl): Add location argument.  Pass location ot
867         build_decl.
868         (finish_case_label): Same.
869         * cp-tree.h (finish_case_label): Add location argument.
870         * parser.c (cp_parser_label_for_labeled_statement): Pass location to
871         finish_case_label.
872         
873 2009-06-09  Jason Merrill  <jason@redhat.com>
874
875         PR c++/40381
876         * decl2.c (mark_used): Return after complaining about deleted fn.
877
878 2009-06-08  Jason Merrill  <jason@redhat.com>
879
880         * parser.c (cp_parser_type_id_1): 'auto' type is ok with a
881         late-specified return type.
882
883 2009-06-08  Jakub Jelinek  <jakub@redhat.com>
884
885         PR c++/40373
886         * call.c (check_dtor_name): Return false even if
887         get_type_value (name) is error_mark_node.
888
889         PR c++/40370
890         PR c++/40372
891         * parser.c (cp_parser_direct_declarator): Don't set TREE_SIDE_EFFECTS
892         on error_mark_node.  Check for VLAs outside of function context
893         before check whether to wrap bounds into a NOP_EXPR with
894         TREE_SIDE_EFFECTS.
895
896 2009-06-08  Alexandre Oliva  <aoliva@redhat.com>
897
898         * repo.c (get_base_filename): Use aux_base_name rather than
899         alternate temporary file during second compare debug compilation.
900         (finish_repo): Skip during -fcompare-debug-second.
901
902 2009-06-06  Ian Lance Taylor  <iant@google.com>
903
904         * parser.c (cp_parser_label_for_labeled_statement): Support
905         attribute on labels if immediately followed by semicolon.
906         * semantics.c (finish_label_stmt): Return new label.
907         * pt.c (tsubst_expr): Handle attributes for LABEL_EXPR.
908
909 2009-06-03  Ian Lance Taylor  <iant@google.com>
910
911         * Make-lang.in (cc1plus-checksum.o): Depend upon $(CONFIG_H) and
912         $(SYSTEM_H).
913
914 2009-06-02  Mark Mitchell  <mark@codesourcery.com>
915
916         * decl.c (maybe_deduce_size_from_array_init): Use relayout_decl.
917
918 2009-06-02  Jason Merrill  <jason@redhat.com>
919
920         PR c++/40308
921         PR c++/40311
922         * typeck.c (cp_build_modify_expr): Always pass init-lists to the
923         conversion code.
924         * call.c (implicit_conversion): Allow init-list conversion to scalar
925         during direct-initialization, too.  Mark the conversion bad if it
926         has too many levels of braces.
927         (convert_like_real): And give a helpful error.
928
929         PR c++/40306
930         PR c++/40307
931         * decl.c (cp_finish_decl): Handle auto deduction from ().
932         * typeck.c (build_x_indirect_ref): Handle dereferencing an operand
933         with dependent type that is known to be a pointer.
934
935 2009-06-02  Simon Martin  <simartin@users.sourceforge.net>
936
937         PR c++/38089
938         * pt.c (register_specialization): Properly setup DECL_CONTEXT for
939         specializations in an invalid namespace.
940
941 2009-06-01  Aldy Hernandez  <aldyh@redhat.com>
942
943         * error.c (print_instantiation_partial_context): Print column
944         numbers.
945
946 2009-05-29  Ian Lance Taylor  <iant@google.com>
947
948         * error.c (cp_printer): Don't use va_arg with enum type.
949
950 2009-05-28  Dodji Seketeli  <dodji@redhat.com>
951
952         PR c++/39754
953         * cp-tree.h (canonical_type_variant): Remove this function declaration.
954         (strip_typedefs): New function declaration.
955         * tree.c (strip_typedefs): New function definition.
956         (canonical_type_variant): Remove function definition.
957         * cvt.c (convert_from_reference): No need to use
958         canonical_type_variant.
959         * typeck.c (cp_build_indirect_ref): Likewise.
960         * error.c (dump_template_bindings): Use strip_typedefs instead of
961         canonical_type_variant.
962         * pt.c (convert_template_argument, unify): Likewise.
963         * mangle.c (canonicalize_for_substitution): Don't use
964         canonical_type_variant.
965
966 2009-05-27  Jason Merrill  <jason@redhat.com>
967
968         * call.c (implicit_conversion): Handle conversion from
969         initializer-list to scalar.
970         (convert_like_real): Likewise.  Avoid crashing on list
971         initialization with bad conversions.
972         (can_convert): Use LOOKUP_EXPLICIT.
973         (can_convert_arg_bad): Add flags parm.
974         * cp-tree.h: Adjust.
975         * typeck.c (convert_for_assignment): Pass flags.
976
977 2009-05-27  Ian Lance Taylor  <iant@google.com>
978
979         * Make-lang.in (g++$(exeext)): Change $(COMPILER) to $(LINKER).
980         (cc1plus-dummy$(exeext), cc1plus$(exeext)): Likewise.
981
982 2009-05-26  Ian Lance Taylor  <iant@google.com>
983
984         * Make-lang.in (g++spec.o): Use $(COMPILER).
985         (g++$(exeext), cc1plus-dummy$(exeext)): Likewise.
986         (cc1plus$(exeext)): Likewise.
987
988 2009-05-26  Dodji Seketeli  <dodji@redhat.com>
989
990         PR c++/40007
991         * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): Remove this accessor.
992         (TI_TYPEDEFS_NEEDING_ACCESS_CHECKING): New accessor.
993         (get_types_needing_access_check): Declare new entry point.
994         * pt.c (append_type_to_template_for_access_check_1,
995         get_types_needing_access_check): New functions.
996         (perform_typedefs_access_check): Accept FUNCTION_DECLs and
997         RECORD_TYPEs rather than TEMPLATE_DECLs. Use the new
998         get_types_needing_access_check, no more
999         MEMBER_TYPES_NEEDING_ACCESS_CHECK.
1000         (instantiate_class_template): Set input_location to the source
1001         location of the most specialized template definition.
1002         Perform access check using the RECORD_TYPE of the template, not its
1003         associated most generic TEMPLATE_DECL.
1004         (append_type_to_template_for_access_check): Augment function
1005         comments. Use the new get_types_needing_access_check, not
1006         MEMBER_TYPE_NEEDING_ACCESS_CHECK. Use the new
1007         append_type_to_template_for_access_check_1 subroutine.
1008
1009 2009-05-22  Jason Merrill  <jason@redhat.com>
1010
1011         PR c++/38064
1012         * typeck.c (cp_build_binary_op): Allow ENUMERAL_TYPE in
1013         arithmetic comparisons.
1014         (cp_common_type): Handle scoped enums.
1015
1016         * call.c (promoted_arithmetic_type_p): Don't use INTEGRAL_TYPE_P.
1017         (add_builtin_candidate, add_builtin_candidates): Likewise.
1018         (convert_like_real): Likewise.
1019         * class.c (check_bitfield_decl): Likewise.
1020         * decl.c (check_static_variable_definition): Likewise.
1021         (compute_array_index_type): Likewise.
1022         * decl2.c (grokbitfield): Likewise.
1023         * init.c (build_new_1): Likewise.
1024         * pt.c (convert_nontype_argument): Likewise.
1025         (current_instantiation): Likewise.
1026         * tree.c (pod_type_p): Likewise.
1027         * typeck.c (build_static_cast_1): Likewise.
1028         (build_reinterpret_cast_1): Likewise.
1029
1030 2009-05-22  Richard Guenther  <rguenther@suse.de>
1031
1032         PR middle-end/38964
1033         * init.c (avoid_placement_new_aliasing): Remove.
1034         (build_new_1): Do not call it.
1035
1036 2009-05-22  Mark Mitchell  <mark@codesourcery.com>
1037
1038         * decl2.c (decl_needed_p): Consider dllexport'd functions needed.
1039         * semantics.c (expand_or_defer_fn): Similarly.
1040
1041 2009-05-20  Ian Lance Taylor  <iant@google.com>
1042
1043         * parser.c (cp_parser_postfix_expression): Change args to a vec.
1044         Release it when done.
1045         (tree_vector): Define typedef.  Define VEC functions.
1046         (cp_parser_parenthesized_expression_list): Change return type to
1047         vec.  Change all callers.
1048         (cp_parser_new_expression): Change placement and initializer to
1049         vecs.  Release them when done.
1050         (cp_parser_new_placement): Change return type to vec.  Change all
1051         callers.
1052         (cp_parser_new_initializer): Likewise.
1053         * typeck.c (build_function_call_vec): Just call
1054         cp_build_function_call_vec.
1055         (cp_build_function_call): Just build a vec and call
1056         cp_build_function_call_vec.
1057         (cp_build_function_call_vec): New function based on old
1058         cp_build_function_call.
1059         (convert_arguments): Remove nargs and argarray parameters.  Change
1060         values to a vec.  Change caller.
1061         (build_x_compound_expr_from_vec): New function.
1062         (cp_build_modify_expr): Build vec to pass to
1063         build_special_member_call.
1064         * call.c (struct z_candidate): Add first_arg field.  Change args
1065         field to vec.
1066         (convert_class_to_reference): Handle first argument separately.
1067         (add_candidate): Add first_arg parameter.  Change args parameter
1068         to vec.  Change all callers.
1069         (add_function_candidate, add_conv_candidate): Likewise.
1070         (add_template_candidate_real, add_template_candidate): Likewise.
1071         (add_template_conv_candidate): Likewise.
1072         (build_user_type_conversion_1): Handle first argument separately.
1073         (resolve_args): Change return type and parameter type to vecs.
1074         Change all callers.
1075         (perform_overload_resolution): Change args parameter to vec.
1076         Change all callers.
1077         (build_new_function_call, build_operator_new_call): Likewise.
1078         (add_candidates): Likewise.
1079         (build_op_call): New globally visible function, built from and
1080         replacing static function build_object_call.
1081         (build_new_op): Don't handle CALL_EXPR.  Build vec, not tree_list,
1082         of arguments.
1083         (build_op_delete_call): Build vec to pass to
1084         cp_build_function_call_vec.
1085         (build_temp): Build vec to pass to build_special_member_call.
1086         (convert_like_real): Likewise.
1087         (perform_direct_initialization_if_possible): Likewise.
1088         (build_over_call): Handle first_arg field.  Use build_call_array
1089         rather than build_call_list.
1090         (build_special_member_call): Change args parameter to vec.  Change
1091         all callers.
1092         (build_new_method_call): Likewise.
1093         * init.c (expand_default_init): Change parms to vec.
1094         (build_raw_new_expr): Change placement and init to vecs.  Change
1095         all callers.
1096         (build_new_1, build_new): Likewise.
1097         * class.c (resolve_address_of_overloaded_function): Build array to
1098         pass to fn_type_unification.
1099         * pt.c (tsubst_copy_and_build): For NEW_EXPR build vecs to pass to
1100         build_new.  For CALL_EXPR create a vec rather than a tree_list;
1101         expand a pack if necessary.
1102         (fn_type_unification): Change args parameter to const tree *.  Add
1103         nargs parameter.  Change all callers.
1104         (type_unification_real): Likewise.
1105         (unify): Build array to pass to type_unification_real.
1106         (get_bindings): Build array to pass to fn_type_unification.
1107         (any_type_dependent_arguments_p): Change args parameter to a vec.
1108         Change all callers.
1109         (make_args_non_dependent): Renamed from build_non_dependent_args.
1110         Change return type to void.  Change parameter type to vec.  Change
1111         all callers.
1112         (do_auto_deduction): Pass an array to type_unification_real.
1113         * semantics.c (perform_koenig_lookup): Change args to vec.  Change
1114         all callers.
1115         (finish_call_expr): Change args to vec.  Change all callers.  Call
1116         build_op_call instead of passing CALL_EXPR to build_new_op.
1117         (cxx_omp_create_clause_info): Allocate vec to pass to
1118         build_special_member_call.
1119         * decl2.c (build_offset_ref_call_from_tree): Change args parameter
1120         to vec.  Change all callers.
1121         * name-lookup.c (lookup_function_nonclass): Likewise.
1122         (struct arg_lookup): Change args to vec.
1123         (arg_assoc_namespace): Handle args as a vec.
1124         (arg_assoc_args_vec): New static function.
1125         (lookup_arg_dependent): Change args parameter to vec.  Change all
1126         callers.
1127         * method.c (do_build_assign_ref): Allocate vec to pass to
1128         build_special_member_call.
1129         * except.c (build_throw): Likewise.
1130         * typeck2.c (build_functional_cast): Likewise.
1131         * cvt.c (ocp_convert): Likewise.
1132         * tree.c (build_min_non_dep_call_vec): Change last parameter to
1133         vec.  Change all callers.
1134         * cp-tree.h: Update declarations.
1135         * name-lookup.h: Update declarations.
1136
1137 2009-05-20  Sandra Loosemore  <sandra@codesourcery.com>
1138
1139         * typeck.c (default_conversion): Check targetm.promoted_type.
1140         * decl.c (grokdeclarator): Check targetm.invalid_return_type.
1141         (grokparms): Check targetm.invalid_parameter_type.
1142         * cvt.c (ocp_convert): Check targetm.convert_to_type.
1143         (build_expr_type_conversion): Check targetm.promoted_type.
1144
1145 2009-05-19  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1146
1147         * typeck.c (build_binary_op): Allow % on integal vectors.
1148
1149 2009-05-18  Jason Merrill  <jason@redhat.com>
1150
1151         Implement explicit conversions ops as specified in N2437.
1152         * decl.c (grokdeclarator): Handle explicit conversion ops.
1153         (check_initializer): Pass flags to store_init_value.
1154         * decl2.c (maybe_emit_vtables): Likewise.
1155         * init.c (expand_aggr_init_1): Likewise.
1156         * call.c (convert_class_to_reference): Take flags parm,
1157         check DECL_NONCONVERTING_P.
1158         (build_user_type_conversion_1): Check DECL_NONCONVERTING_P.
1159         (add_builtin_candidates): Simplify getting type of conversion.
1160         (build_object_call): Likewise.  Check DECL_NONCONVERTING_P.
1161         (implicit_conversion): Pass through LOOKUP_ONLYCONVERTING.
1162         (reference_binding): Take flags parm.  Direct-initialize copy parm.
1163         (add_function_candidate): Direct-initialize the copy parm.
1164         (add_conv_candidate): Use LOOKUP_IMPLICIT, not LOOKUP_NORMAL.
1165         (build_builtin_candidate): Add LOOKUP_ONLYCONVERTING.
1166         (conditional_conversion): Likewise.
1167         (convert_like_real): Only complain about DECL_NONCONVERTING_P
1168         constructors.
1169         (perform_implicit_conversion_flags): Add flags parm to
1170         perform_implicit_conversion.  Improve diagnostics.
1171         * cp-tree.h (LOOKUP_IMPLICIT): New macro.
1172         (LOOKUP_COPY_PARM): New bit macro.
1173         * cvt.c (build_expr_type_conversion): Check DECL_NONCONVERTING_P.
1174         * typeck.c (convert_for_assignment): Take flags parm, pass it to
1175         perform_implicit_conversion_flags.
1176         (cp_build_modify_expr): Pass flags to convert_for_assignment.
1177         (convert_for_initialization): Likewise.
1178         * typeck2.c (store_init_value): Take flags parm, pass to
1179         digest_init_flags.
1180         (digest_init_flags): Add flags parm to digest_init.
1181         (digest_init_r): Take flags parm, pass to convert_for_initialization.
1182         (process_init_constructor_array): Pass it.
1183         (process_init_constructor_record): Likewise.
1184         (process_init_constructor_union): Likewise.
1185
1186 2009-05-16  Jason Merrill  <jason@redhat.com>
1187
1188         PR c++/40139
1189         * pt.c (tsubst_qualified_id): Retain the type if we aren't dealing
1190         with a dependent type.  Actually look up the destructor.
1191         * semantics.c (finish_id_expression): Fix logic.
1192         (finish_qualified_id_expr): Don't try to use 'this' if we aren't in
1193         a function.
1194         * typeck.c (build_x_unary_op): Diagnose taking the address of a
1195         constructor or destructor.
1196         * tree.c (get_first_fn): Handle OFFSET_REF.
1197
1198 2009-05-17  Joseph Myers  <joseph@codesourcery.com>
1199
1200         * tree.c (cxx_printable_name_internal): Allow consecutive
1201         translated and untranslated cached copies of the name of the
1202         current function.
1203
1204 2009-05-15  Ian Lance Taylor  <iant@google.com>
1205
1206         * cp-tree.h (enum cp_lvalue_kind_flags): Rename from
1207         cp_lvalue_kind.  Change all uses.
1208         (enum base_access_flags): Rename from enum base_access.  Change
1209         all uses.
1210         * parser.c (enum cp_parser_flags): Remove enum tag.
1211
1212 2009-05-15  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1213
1214         PR 16302
1215         * call.c (build_new_op): Update calls to warn_logical_operator.
1216
1217 2009-05-14  Ian Lance Taylor  <iant@google.com>
1218
1219         * class.c (layout_class_type): Change itk to unsigned int.
1220         * decl.c (finish_enum): Change itk to unsigned int.
1221         * parser.c (cp_parser_check_decl_spec): Change ds to int.  Remove
1222         casts.
1223
1224 2009-05-13  David Mandelin <dmandelin@mozilla.com>:
1225
1226         * decl.c (duplicate_decls): Preserve parameter attributes.
1227
1228 2009-05-10  Jan Hubicka  <jh@suse.cz>
1229
1230         * decl2.c (cxx_callgraph_analyze_expr): Use
1231         cgraph_mark_address_taken.
1232
1233 2009-05-10  Joseph Myers  <joseph@codesourcery.com>
1234
1235         * call.c (name_as_c_string): Call type_as_string_translate.
1236         Translate identifiers to locale character set.
1237         * cp-tree.h (lang_decl_name): Update prototype.
1238         (type_as_string_translate, decl_as_string_translate,
1239         cxx_printable_name_translate): Declare.
1240         * cxx-pretty-print.c (M_): Define.
1241         (pp_cxx_unqualified_id, pp_cxx_canonical_template_parameter): Mark
1242         English fragments for conditional translation with M_.
1243         * decl.c (grokdeclarator): Translate identifiers to locale
1244         character set for diagnostics.
1245         * error.c (M_): Define.
1246         (dump_template_bindings, dump_type, dump_aggr_type,
1247         dump_type_prefix, dump_global_iord, dump_simple_decl, dump_decl,
1248         dump_function_decl, dump_template_parms, dump_expr,
1249         dump_binary_op, op_to_string, assop_to_string): Mark English
1250         fragments for conditional translation with M_.
1251         (type_as_string): Disable translation of identifiers.
1252         (type_as_string_translate): New.
1253         (expr_as_string): Disable translation of identifiers.
1254         (decl_as_string): Disable translation of identifiers.
1255         (decl_as_string_translate): New.
1256         (lang_decl_name): Add parameter translate.
1257         (args_to_string): Call type_as_string_translate.
1258         (cp_print_error_function): Call cxx_printable_name_translate.
1259         (print_instantiation_full_context,
1260         print_instantiation_partial_context): Call
1261         decl_as_string_translate.
1262         * parser.c (cp_lexer_get_preprocessor_token): Use %qE for
1263         identifier in diagnostic.
1264         * tree.c (cxx_printable_name): Change to
1265         cxx_printable_name_internal.  Add parameter translate.
1266         (cxx_printable_name, cxx_printable_name_translate): New wrappers
1267         round cxx_printable_name_internal.
1268
1269 2009-05-08  H.J. Lu  <hongjiu.lu@intel.com>
1270
1271         PR c/36892
1272         * call.c (build_call_a): Updated warn_deprecated_use call.
1273         (build_over_call): Likewise.
1274         * decl.c (grokdeclarator): Likewise.
1275         (grokparms): Likewise.
1276         * semantics.c (finish_id_expression): Likewise.
1277         * typeck.c (build_class_member_access_expr): Likewise.
1278         (finish_class_member_access_expr): Likewise.
1279
1280 2009-05-06  Dodji Seketeli  <dodji@redhat.com>
1281
1282         PR c++/17395
1283         * pt.c (tsubst_copy) <case PARM_DECL>: We don't want to tsubst the
1284         whole list of PARM_DECLs, just the current one.
1285
1286 2009-05-05  Shujing Zhao  <pearly.zhao@oracle.com>
1287
1288         * cp-tree.h:
1289         (opname_tab, assignop_tab, update_member_visibility, yyerror, yyhook,
1290         mangle_compound_literal): Remove unused declarations.
1291         (build_vfield_ref, cxx_print_statistics, clone_function_decl,
1292         adjust_clone_args, maybe_push_cleanup_level, pushtag, make_anon_name,
1293         pushdecl_top_level_maybe_friend, pushdecl_top_level_and_finish,
1294         check_for_out_of_scope_variable, print_other_binding_stack,
1295         maybe_push_decl, cxx_mark_addressable, force_target_expr,
1296         build_target_expr_with_type, finish_case_label,
1297         cxx_maybe_build_cleanup, begin_eh_spec_block, finish_eh_spec_block,
1298         check_template_keyword, cxx_omp_predetermined_sharing,
1299         cxx_omp_clause_default_ctor, cxx_omp_clause_copy_ctor,
1300         cxx_omp_clause_assign_op, cxx_omp_clause_dtor, cxx_omp_finish_clause,
1301         cxx_omp_privatize_by_reference): Rearrange the declarations line to
1302         match the comment that indicates the .c file which the functions are
1303         defined.
1304         (cxx_print_xnode, cxx_print_decl, cxx_print_type,
1305         cxx_print_identifier, cxx_print_error_function, pushdecl): Add comment.
1306
1307 2009-05-05  Nathan Sidwell  <nathan@codesourcery.com>
1308
1309         * typeck.c (cp_build_compound_expr): Require RHS to have a known
1310         type.
1311         * class.c (resolve_address_of_overloaded_function): Use
1312         OVL_CURRENT for error message.
1313         (instantiate_type): Forbid COMPOUND_EXPRs and remove code dealing
1314         with them.  Do not copy the node.
1315
1316 2009-05-05  Jakub Jelinek  <jakub@redhat.com>
1317
1318         PR c++/40013
1319         * pt.c (tsubst): If magic NOP_EXPR with side-effects has no type,
1320         set it from its operand's type after tsubst_expr.
1321
1322 2009-05-04  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1323
1324         PR c++/28152
1325         * parser.c (cp_lexer_get_preprocessor_token):  Do not store the
1326         canonical spelling for keywords.
1327         (cp_parser_attribute_list): Use the canonical spelling for
1328         keywords in attributes.
1329
1330 2009-05-01  Joseph Myers  <joseph@codesourcery.com>
1331
1332         * cxx-pretty-print.c (is_destructor_name, pp_cxx_unqualified_id,
1333         pp_cxx_template_keyword_if_needed, pp_cxx_postfix_expression,
1334         pp_cxx_new_expression, pp_cxx_delete_expression,
1335         pp_cxx_unary_expression, pp_cxx_assignment_operator,
1336         pp_cxx_assignment_expression, pp_cxx_expression,
1337         pp_cxx_function_specifier, pp_cxx_decl_specifier_seq,
1338         pp_cxx_simple_type_specifier, pp_cxx_type_specifier_seq,
1339         pp_cxx_exception_specification, pp_cxx_direct_declarator,
1340         pp_cxx_ctor_initializer, pp_cxx_type_id, pp_cxx_statement,
1341         pp_cxx_namespace_alias_definition, pp_cxx_template_parameter,
1342         pp_cxx_canonical_template_parameter, pp_cxx_template_declaration,
1343         pp_cxx_declaration, pp_cxx_typeid_expression,
1344         pp_cxx_va_arg_expression, pp_cxx_offsetof_expression,
1345         pp_cxx_trait_expression): Mostly use pp_string and
1346         pp_cxx_ws_string in place of pp_identifier and pp_cxx_identifier
1347         for non-identifiers.  Mark English strings for translation.
1348         * cxx-pretty-print.h (pp_cxx_ws_string): Define.
1349         * error.c (dump_template_parameter, dump_template_bindings,
1350         dump_type, dump_aggr_type, dump_type_prefix, dump_simple_decl,
1351         dump_decl, dump_template_decl, dump_function_decl,
1352         dump_parameters, dump_exception_spec, dump_template_parms,
1353         dump_expr, dump_binary_op, dump_unary_op, op_to_string,
1354         assop_to_string, args_to_string, cp_print_error_function,
1355         print_instantiation_full_context,
1356         print_instantiation_partial_context): Mostly use pp_string and
1357         pp_cxx_ws_string in place of pp_identifier and pp_cxx_identifier
1358         for non-identifiers.  Mark English strings for translation.
1359         (dump_global_iord): Mark strings for translation; use longer
1360         strings instead of substituting single words.
1361         (function_category): Return a format string marked for
1362         translation, not a single word or phrase to substitute in a longer
1363         phrase.
1364
1365 2009-04-28  Ben Elliston  <bje@au.ibm.com>
1366
1367         PR c++/35652
1368         Revert:
1369
1370         2009-03-27  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1371
1372         * typeck.c (cp_pointer_sum): Adjust call to pointer_int_sum.
1373
1374 2009-04-27  Ian Lance Taylor  <iant@google.com>
1375
1376         * semantics.c (finish_omp_clauses): Change type of c_kind to enum
1377         omp_clause_code.
1378
1379 2009-04-27  Jakub Jelinek  <jakub@redhat.com>
1380
1381         PR c++/39875
1382         * cvt.c (convert_to_void) <case INDIRECT_REF>: Only warn about
1383         -Wunused-value if implicit.
1384
1385 2009-04-24  Ian Lance Taylor  <iant@google.com>
1386
1387         * call.c (build_temp): Change 0 to enum constant.
1388         * cp-tree.h (cp_lvalue_kind): Typedef to int rather than enum
1389         type.
1390         * cp-gimplify.c (cp_gimplify_expr): Add cast to enum type.
1391         * decl2.c (constrain_visibility): Likewise.
1392         * parser.c (cp_lexer_get_preprocessor_token): Likewise.
1393         (cp_parser_flags): Typedef to int rather than enum type.
1394         (cp_parser_expression_stack_entry): Change prec field to enum
1395         cp_parser_prec.
1396
1397         * typeck.c (build_modify_expr): Add lhs_origtype parameter.
1398         Change all callers.
1399
1400 2009-04-22  Dodji Seketeli  <dodji@redhat.com>
1401
1402         PR c++/39639
1403         * parser.c (cp_parser_template_argument_list): Display an error
1404         when an ellipsis is not preceded by a parameter pack. Also, warn
1405         about variadic templates usage without -std=c++0x.
1406
1407 2009-04-21  Taras Glek <tglek@mozilla.com>
1408
1409         * cp-tree.h: Update GTY annotations to new syntax.
1410         * decl.c: Likewise.
1411         * mangle.c: Likewise.
1412         * name-lookup.c: Likewise.
1413         * name-lookup.h: Likewise.
1414         * parser.c: Likewise.
1415         * pt.c: Likewise.
1416         * rtti.c: Likewise.
1417         * semantics.c: Likewise.
1418         * typeck2.c: Likewise.
1419
1420 2009-04-22  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1421
1422         PR c++/14875
1423         * parser.c (cp_parser_error): Pass token->flags to c_parse_error.
1424
1425 2009-04-21  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1426
1427         PR c++/35711
1428         * typeck.c (check_for_casting_away_constness): We diagnose casting
1429         away any qualifiers not just constness.
1430         (casts_away_constness): Mention that it handles more than just
1431         constness.
1432         
1433 2009-04-21  Joseph Myers  <joseph@codesourcery.com>
1434
1435         * ChangeLog, ChangeLog-1993, ChangeLog-1994, ChangeLog-1995,
1436         ChangeLog-1996, ChangeLog-1997, ChangeLog-1998, ChangeLog-1999,
1437         ChangeLog-2000, ChangeLog-2001, ChangeLog-2002, ChangeLog-2003,
1438         ChangeLog-2004, ChangeLog-2005, ChangeLog-2006, ChangeLog-2007,
1439         ChangeLog-2008, ChangeLog.ptr, ChangeLog.tree-ssa, NEWS,
1440         cfns.gperf: Add copyright and license notices.
1441         * cfns.h: Regenerate.
1442         * ChangeLog, ChangeLog-2004: Correct dates.
1443
1444 2009-04-21  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1445
1446         PR 16202
1447         * tree.c (lvalue_p_1): Use const_tree.
1448         Use CONST_CAST_TREE to avoid warning.
1449         (lvalue_p): Returns bool, receives const_tree.
1450
1451 2009-04-21  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1452
1453         PR c++/13358
1454         * parser.c (cp_parser_check_decl_spec): Drop redundant flags.
1455         * error.c (pedwarn_cxx98): New.
1456         * cp-tree.h (pedwarn_cxx98): Declare.
1457
1458 2009-04-20  Le-Chun Wu  <lcwu@google.com>
1459
1460         PR c++/39803
1461         * init.c (build_vec_init): Set TREE_NO_WARNING on the
1462         compiler-generated INDIRECT_REF expression.
1463
1464 2009-04-20  Ian Lance Taylor  <iant@google.com>
1465
1466         * typeck.c (build_function_call_vec): New function.
1467         (cp_build_function_call): Only pass first parameter to
1468         objc_rewrite_function_call.
1469         (build_modify_expr): Add rhs_origtype parameter.  Change all
1470         callers.
1471         * decl.c (finish_decl): Add origtype parameter.  Change all
1472         callers.
1473         * semantics.c (finish_call_expr): Pass VEC to
1474         resolve_overloaded_builtin.
1475
1476 2009-04-20  Ian Lance Taylor  <iant@google.com>
1477
1478         * cp-tree.h (base_access): Change typedef to int.
1479         * parser.c (cp_parser_omp_flush): Change 0 to OMP_CLAUSE_ERROR.
1480         (cp_parser_omp_threadprivate): Likewise.
1481         * pt.c (unify_pack_expansion): Add casts to enum type.
1482
1483 2009-04-19  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1484
1485         PR c/32061
1486         PR c++/36954
1487         * call.c (build_new_op): Save the original codes of operands
1488         before folding.
1489
1490 2009-04-18  Kazu Hirata  <kazu@codesourcery.com>
1491
1492         * cp-tree.h: Remove the prototype for insert_block.
1493         * decl.c (insert_block): Remove.
1494
1495 2009-04-16  Ian Lance Taylor  <iant@google.com>
1496
1497         * cp-tree.h (enum tsubst_flags): Rename from enum tsubst_flags_t.
1498         (tsubst_flags_t): Change typedef from enum type to int.
1499
1500 2009-04-16  Paolo Bonzini  <bonzini@gnu.org>
1501
1502         * decl.c (check_initializer): Use TYPE_VECTOR_OPAQUE
1503         instead of targetm.vector_opaque_p.
1504
1505 2009-04-15  Le-Chun Wu  <lcwu@google.com>
1506
1507         PR c++/39551
1508         * call.c (build_over_call): Set TREE_NO_WARNING on the
1509         compiler-generated INDIRECT_REF expression.
1510         * cvt.c (convert_to_void): Emit warning when stripping off
1511         INDIRECT_REF.
1512
1513 2009-04-14  Diego Novillo  <dnovillo@google.com>
1514
1515         * parser.c (cp_parser_type_specifier_seq): Move call to
1516         invoke_plugin_callbacks ...
1517         (cp_parser_type_specifier_seq): ... here.
1518
1519 2009-04-14  Le-Chun Wu  <lcwu@google.com>
1520
1521         * Make-lang.in: Modify dependencies of files including plugin.h.
1522         * decl.c (finish_function): Call invoke_plugin_callbacks.
1523         * parser.c (cp_parser_type_specifier): Call invoke_plugin_callbacks.
1524
1525 2009-04-14  Jason Merrill  <jason@redhat.com>
1526
1527         PR c++/39763
1528         * name-lookup.c (pushdecl_maybe_friend): Avoid all warnings
1529         about shadowing by tentative parms.
1530
1531 2009-04-13  Jason Merrill  <jason@redhat.com>
1532
1533         PR c++/39480
1534         * call.c (build_over_call): Don't call memcpy if the target is
1535         the same as the source.
1536
1537 2009-04-13  Jason Merrill  <jason@redhat.com>
1538
1539         PR c++/39750
1540         * pt.c (uses_template_parms): Handle CONSTRUCTOR.
1541
1542 2009-04-12  Jason Merrill  <jason@redhat.com>
1543
1544         PR c++/39742
1545         * call.c (joust): Don't crash on variadic fn.
1546
1547 2009-04-10  Jason Merrill  <jason@redhat.com>
1548
1549         PR c++/28301
1550         * parser.c (cp_parser_skip_to_end_of_block_or_statement): Return
1551         if we see a close brace without an open brace.
1552
1553 2009-04-10  H.J. Lu  <hongjiu.lu@intel.com>
1554
1555         * parser.c (cp_parser_class_specifier): Remove the unused
1556         has_trailing_semicolon.
1557
1558 2009-04-10  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1559
1560         PR  c++/20118
1561         * parser.c (cp_parser_check_template_parameters): Take a
1562         cp_declarator parameter.
1563         (cp_parser_elaborated_type_specifier): Update to
1564         cp_parser_check_template_parameters.
1565         (cp_parser_class_head): Likewise.
1566         (cp_parser_check_declarator_template_parameters): Likewise.
1567         (cp_parser_check_template_parameters): Handle first the non-error
1568         conditions. Give more accurate diagnostics if a declarator is
1569         given. 
1570
1571 2009-04-08  Jason Merrill  <jason@redhat.com>
1572
1573         PR c++/25185
1574         * error.c (dump_aggr_type): Chase template typedefs if
1575         -fno-pretty-templates.
1576
1577 2009-04-08  Dodji Seketeli  <dodji@redhat.com>
1578
1579         PR c++/39637
1580         * parser.c (cp_parser_enumerator_definition): Make sure the
1581         initializer of the enumerator doesn't contain any bare parameter pack.
1582
1583 2009-04-07  Jason Merrill  <jason@redhat.com>
1584
1585         PR c++/34691
1586         * name-lookup.c (merge_functions): Keep multiple extern "C" functions.
1587         * call.c (joust): Complain about mismatched default arguments
1588         in extern "C" functions.
1589         * class.c (resolve_address_of_overloaded_function): Handle multiple
1590         extern "C" functions.
1591         * pt.c (resolve_overloaded_unification): Likewise.
1592
1593 2009-04-07  Jason Merrill  <jason@redhat.com>
1594
1595         PR c++/25185
1596         * error.c (dump_function_decl): Don't pretty-print templates
1597         if -fno-pretty-templates.
1598         (count_non_default_template_args): Print all args if
1599         -fno-pretty-templates.
1600
1601 2009-04-06  Jason Merrill  <jason@redhat.com>
1602
1603         PR c++/35146
1604         * pt.c (fn_type_unification): For DEDUCE_EXACT check that
1605         the deduced template arguments give us the parameter types
1606         we're looking for.
1607
1608 2009-04-05  Giovanni Bajo <giovannibajo@libero.it>
1609             Jason Merrill  <jason@redhat.com>
1610
1611         PR c++/14912
1612         * error.c (count_non_default_template_args): New fn.
1613         (dump_template_parms): Call it.
1614         (dump_template_argument_list): Call it.  Add parms parm.
1615         (dump_template_argument): Adjust call to dump_template_argument_list.
1616         (dump_type, dump_decl): Likewise.
1617         (dump_template_bindings): Refactor logic.
1618
1619 2009-04-03  Jason Merrill  <jason@redhat.com>
1620
1621         PR c++/25185
1622         * error.c (dump_template_bindings): Look through typedefs in
1623         typename results.
1624         (dump_type) [TYPENAME_TYPE]: Print the typedef name if any.
1625         (find_typenames_r): Also collect typedefs.
1626         * pt.c (unify): Strip typedefs.
1627
1628         PR c++/39608
1629         * semantics.c (finish_id_expression): Don't assume a dependent
1630         member of the current instantiation isn't a valid integral
1631         constant expression.  Check dependent_scope_p.
1632         * pt.c (dependent_scope_p): Check TYPE_P.
1633         (tsubst_copy): If args is null, just return.
1634
1635 2009-04-02  Jason Merrill  <jason@redhat.com>
1636
1637         PR c++/25185
1638         * error.c (find_typenames, find_typenames_r): New fns.
1639         (dump_function_decl): Call find_typenames.
1640         (dump_template_bindings): Print typenames as well.
1641         * pt.c (tsubst): Non-static.
1642         * cp-tree.h: Declare it.
1643
1644 2009-04-02  Dodji Seketeli  <dodji@redhat.com>
1645
1646         PR c++/26693
1647         * decl2.c (grokfield): when a typedef appears in a
1648         class, create the typedef variant type node for it.
1649         (save_template_attributes): Creating typedef variant type node
1650          here is now useless.
1651         * decl.c (grokdeclarator): If the typedef'ed struct/class was
1652         anonymous, set the proper type name to all its type variants.
1653         (xref_basetypes) : Fixup the variant types after setting
1654         TYPE_BINFO on REF.
1655         * name-lookup.c (pushdecl_maybe_friend): Reuse the
1656         set_underlying_type function to install typedef variant types.
1657         * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
1658         macro.
1659         (append_type_to_template_for_access_check): New entry points.
1660         * semantics.c (check_accessibility_of_qualified_id):
1661         When a typedef that is a member of a class appears in a template,
1662         add it to the template. It will be ...
1663         * class.c (finish_struct_bits): Split type variant fixup into ...
1664         (fixup_type_variants): A new entry point.
1665         * pt.c (instantiate_class_template, instantiate_template ): ... access
1666         checked at template instantiation time.
1667         (resolve_type_name_type): The type name should be the name of the
1668         main type variant.
1669         (retrieve_specialization): Specializations of template typedefs aren't
1670         to looked up in DECL_TEMPLATE_INSTANTIATIONS (tmpl).
1671         (append_type_to_template_for_access_check): New entry point.
1672         (tsubst_decl): For typedefs, build the variant type from the correct
1673         original type.
1674         (get_class_bindings): Fix function comment.
1675         (perform_typedefs_access_check): New entry point.
1676
1677 2009-03-31  Jason Merrill  <jason@redhat.com>
1678
1679         PR c++/34691
1680         * name-lookup.c (pushdecl_maybe_friend): Diagnose mismatched
1681         extern "C" declarations.
1682
1683         C++ DR 613
1684         * semantics.c (finish_non_static_data_member): Allow such references
1685         without an associated object in sizeof/decltype/alignof.
1686
1687         * ptree.c (cxx_print_decl): Pretty-print full name of
1688         function/template.
1689         (cxx_print_type): Pretty-print full name of class.
1690
1691         * decl.c (grokdeclarator): Reject pointer to qualified function
1692         type.
1693
1694         PR c++/37806, core issue 547
1695         * typeck.c (cp_apply_type_quals_to_decl): Don't apply any quals
1696         to a typedef.
1697         * tree.c (cp_build_qualified_type_real): Don't apply restrict to a 
1698         function type.
1699         * decl.h (enum decl_context): Add TEMPLATE_TYPE_ARG.
1700         * decl.c (groktypename): Add is_template_arg parameter.
1701         (grokdeclarator): Allow function cv-quals on a template type arg.
1702         * parser.c (cp_parser_new_type_id, cp_parser_type_id): Add
1703         is_template_arg argument in calls to groktypename.
1704         * cp-tree.h: Adjust prototype.
1705         * error.c (dump_type_prefix, dump_type_suffix): Fix plain 
1706         FUNCTION_TYPE printing.
1707         
1708         * mangle.c (write_expression): Mangle dependent name as
1709         source-name.
1710
1711         PR c++/38030, 38850, 39070
1712         * pt.c (type_dependent_expression_p_push): New fn.
1713         (tsubst_copy_and_build) [CALL_EXPR]: Only do arg-dep lookup when the
1714         substitution makes the call non-dependent.  Preserve koenig_p.
1715         * parser.c (cp_parser_postfix_expression): Only do arg-dep lookup
1716         for non-dependent calls.
1717         * semantics.c (finish_call_expr): Revert earlier changes.
1718         * cp-tree.h: Revert change to finish_call_expr prototype.
1719
1720 2009-03-29  Joseph Myers  <joseph@codesourcery.com>
1721
1722         PR preprocessor/34695
1723         * cp-tree.h (cp_cpp_error): Remove.
1724         * error.c (cp_cpp_error): Remove.
1725         * parser.c (cp_lexer_new_main): Set done_lexing instead of
1726         client_diagnostic and error callback.
1727
1728 2009-03-28  Paolo Bonzini  <bonzini@gnu.org>
1729
1730         * cp/cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
1731         * cp/cp-objcp-common.c (cxx_staticp): Remove.
1732         * cp/cp-tree.h (cxx_staticp): Remove.
1733
1734 2009-03-28  Jakub Jelinek  <jakub@redhat.com>
1735
1736         PR c++/39554
1737         * parser.c (cp_parser_postfix_expression): Don't call
1738         warning_if_disallowed_function_p.
1739
1740 2009-03-27  Jan Hubicka  <jh@suse.cz>
1741
1742         * except.c (choose_personality_routine): Set terminate_node to abort
1743         for java exceptions.
1744
1745 2009-03-27  Dodji Seketeli  <dodji@redhat.com>
1746             Jakub Jelinek  <jakub@redhat.com>
1747
1748         PR debug/37959
1749         * cp-objcp-common.h (LANG_HOOKS_FUNCTION_DECL_EXPLICIT_P): Define.
1750         (cp_function_decl_explicit_p): New prototype.
1751         * cp-objcp-common.c (cp_function_decl_explicit_p): New function.
1752
1753 2009-03-27  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1754
1755         PR c++/38638
1756         * parser.c (cp_parser_elaborated_type_specifier): If we have a
1757         typename tag and don't have either a TYPE_DECL or a
1758         TEMPLATE_ID_EXPR, set the type to NULL.
1759
1760 2009-03-27  Simon Martin  <simartin@users.sourceforge.net>
1761
1762         PR c++/37647
1763         * decl.c (grokdeclarator): Reject [con|de]stuctors in a non-class
1764         scope.
1765
1766 2009-03-27  Simon Martin  <simartin@users.sourceforge.net>
1767
1768         PR c++/29727
1769         * decl.c (check_array_designated_initializer): Handle error_mark_node.
1770
1771 2009-03-27  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1772
1773         PR c++/35652
1774         * typeck.c (cp_pointer_sum): Adjust call to pointer_int_sum.
1775
1776 2009-03-26  Andrew Haley  <aph@redhat.com>
1777
1778         PR C++/39380
1779         * decl2.c (possibly_inlined_p): If java exceptions are in use
1780         don't inline a decl unless it is explicitly marked inline.
1781         * lex.c: (pragma_java_exceptions): New variable.
1782         (handle_pragma_java_exceptions): Set pragma_java_exceptions.
1783         * cp-tree.h (pragma_java_exceptions): Declare new variable.
1784
1785 2009-03-24  Jason Merrill  <jason@redhat.com>
1786
1787         PR c++/28274
1788         * name-lookup.c (pushdecl_maybe_friend): Check default args later.
1789
1790 2009-03-23  Jakub Jelinek  <jakub@redhat.com>
1791
1792         PR c/39495
1793         * semantics.c (handle_omp_for_class_iterator): Swap cond operands and
1794         code if iter is the second operand.
1795         * parser.c (cp_parser_binary_expression): Add no_toplevel_fold_p
1796         argument.  If it is set, don't build the toplevel expression with
1797         build_x_binary_op, but build2.
1798         (cp_parser_assignment_expression,  cp_parser_omp_for_incr): Adjust
1799         callers.
1800         (cp_parser_omp_for_cond): Don't assume the first operand of the
1801         comparison must be decl.
1802
1803 2009-03-23  Jason Merrill  <jason@redhat.com>
1804
1805         PR c++/37729
1806         * pt.c (make_fnparm_pack): Split out from...
1807         (instantiate_decl): ...here.
1808         (tsubst_pack_expansion): Handle being called in a late-specified
1809         return type.
1810
1811         PR c++/39526
1812         * name-lookup.c (pushdecl_maybe_friend): Don't warn about shadowing
1813         a parm with a parm.
1814
1815 2009-03-20  Jason Merrill  <jason@redhat.com>
1816
1817         PR c++/28879
1818         * parser.c (cp_parser_direct_declarator): In a template, wrap 
1819         non-constant expression in NOP_EXPR with TREE_SIDE_EFFECTS set.
1820         * pt.c (tsubst): Preserve it in a partial instantiation.
1821         (dependent_type_p_r): Don't check value_dependent_expression_p.
1822         * decl.c (compute_array_index_type): Don't check
1823         value_dependent_expression_p if TREE_SIDE_EFFECTS.
1824
1825         C++ core issue 703
1826         * typeck2.c (check_narrowing): Don't complain about loss of 
1827         precision when converting a floating-point constant.
1828
1829 2009-03-19  Jakub Jelinek  <jakub@redhat.com>
1830
1831         PR c/39495
1832         * parser.c (cp_parser_omp_for_cond): Don't check lhs if decl is NULL.
1833         (cp_parser_omp_for_loop): Always use cp_parser_omp_for_cond.
1834
1835 2009-03-18  Jakub Jelinek  <jakub@redhat.com>
1836
1837         * parser.c (struct cp_token): Reorder fields for 64-bit hosts.
1838         (eof_token): Adjust.
1839
1840 2009-03-18  H.J. Lu  <hongjiu.lu@intel.com>
1841
1842         PR c++/39425
1843         * parser.c (cp_parser_explicit_specialization): Don't skip the
1844         rest of the specialization when begin_specialization returns
1845         false.
1846
1847 2009-03-17  Jason Merrill  <jason@redhat.com>
1848
1849         * decl.c (grokfndecl): Set DECL_CONTEXT on parms.
1850         (duplicate_decls): Adjust DECL_CONTEXT of newdecl's parms.
1851         * pt.c (check_explicit_specialization): Likewise.
1852         (tsubst_copy) [PARM_DECL]: Return a dummy parm if we don't have a
1853         local specialization.
1854         * tree.c (cp_tree_equal) [PARM_DECL]: Check type and index, not name.
1855         * decl2.c (parm_index): New fn.
1856         * semantics.c (finish_decltype_type): Don't use describable_type.
1857         * mangle.c (write_expression): Likewise.  Mangle ALIGNOF_EXPR.
1858         Give a sorry for unsupported codes rather than crash.  Mangle
1859         conversions with other than 1 operand.  New mangling for PARM_DECL.
1860         * operators.def (ALIGNOF_EXPR): Mangle as "az".
1861
1862 2009-03-17  Jing Yu  <jingyu@google.com>
1863
1864         PR middle-end/39378
1865         * method.c (use_thunk): Change is_thunk from crtl to cfun.
1866
1867 2009-03-17  Paolo Carlini  <paolo.carlini@oracle.com>
1868
1869         PR c++/39475
1870         * semantics.c (check_trait_type): New.
1871         (finish_trait_expr): Use it.
1872
1873 2009-03-17  Jakub Jelinek  <jakub@redhat.com>
1874
1875         * name-lookup.c (cp_emit_debug_info_for_using): Emit USING_STMTs
1876         instead of calling imported_module_or_decl debug hook if
1877         building_stmt_tree ().
1878         * cp-gimplify.c (cp_gimplify_expr): Don't assert the first operand
1879         is a NAMESPACE_DECL.
1880
1881         PR debug/37890
1882         * name-lookup.c (do_namespace_alias): Don't call global_decl debug
1883         hook at function scope.
1884
1885         PR debug/39471
1886         * cp-gimplify.c (cp_gimplify_expr): Don't set DECL_NAME
1887         on IMPORTED_DECL.
1888
1889 2009-03-09  Jakub Jelinek  <jakub@redhat.com>
1890
1891         PR c++/39371
1892         * semantics.c (finish_switch_cond): Don't call get_unwidened.
1893         * decl.c (finish_case_label): Pass SWITCH_STMT_TYPE as 3rd argument
1894         instead of TREE_TYPE (cond).
1895
1896 2009-03-08  H.J. Lu  <hongjiu.lu@intel.com>
1897
1898         PR c++/39060
1899         * parser.c (cp_parser_late_parsing_default_args): Continue
1900         the loop when cp_parser_assignment_expression returns
1901         error_mark_node.
1902
1903 2009-03-07  Jason Merrill  <jason@redhat.com>
1904
1905         PR c++/39367
1906         * init.c (build_new_1): Don't use a VLA type.
1907         (build_vec_init): Handle getting a pointer for BASE.
1908
1909 2009-03-06  H.J. Lu  <hongjiu.lu@intel.com>
1910
1911         PR c++/37520
1912         * cp-tree.h: Check NO_DOT_IN_LABEL before NO_DOLLAR_IN_LABEL
1913         when mangling symbols.
1914
1915 2009-03-06  Paolo Carlini  <paolo.carlini@oracle.com>
1916
1917         PR c++/33492
1918         * error.c (dump_expr): Don't try to print THROW_EXPRs in full.
1919
1920 2009-03-06  Alexandre Oliva  <aoliva@redhat.com>
1921
1922         * decl.c (record_builtin_java_type): Use canonicalized integer
1923         types.
1924
1925 2009-03-04  Jason Merrill  <jason@redhat.com>
1926
1927         PR c++/38908
1928         * class.c (is_really_empty_class): New fn.
1929         * cp-tree.h: Declare it.
1930         * cp-objcp-common.c (cp_expr_size): Use it.
1931
1932         PR c++/13549
1933         * semantics.c (perform_koenig_lookup): Handle TEMPLATE_ID_EXPR.
1934         * parser.c (cp_parser_postfix_expression): Call it for 
1935         TEMPLATE_ID_EXPR.
1936         * tree.c (is_overloaded_fn): Look through TEMPLATE_ID_EXPR.
1937         (get_first_fn): Likewise.
1938
1939         PR c++/9634
1940         PR c++/29469
1941         PR c++/29607
1942         Implement DR 224.
1943         * decl.c (make_typename_type): Do look inside currently open classes.
1944         * parser.c (cp_parser_lookup_name): Likewise.
1945         (cp_parser_template_name): Likewise.
1946         * pt.c (dependent_scope_p): New function.
1947         * cp-tree.h: Declare it.
1948         * class.c (currently_open_class): Return fast if T isn't a class.
1949
1950 2009-02-26  H.J. Lu  <hongjiu.lu@intel.com>
1951
1952         PR c++/37789
1953         * parser.c (cp_parser_mem_initializer): Return error_mark_node
1954         if cp_parser_mem_initializer_id returns error_mark_node.
1955
1956 2009-02-24  Richard Guenther  <rguenther@suse.de>
1957
1958         PR c++/39242
1959         * pt.c (instantiate_decl): Do not instantiate extern, non-inline
1960         declared functions.
1961
1962 2009-02-23  H.J. Lu  <hongjiu.lu@intel.com>
1963
1964         PR c++/36411
1965         * pt.c (coerce_template_template_parms): Return 0 if parameter
1966         is error_mark_node.
1967
1968 2009-02-23  Jason Merrill  <jason@redhat.com>
1969
1970         * pt.c (unify): Call maybe_adjust_types_for_deduction when
1971         deducing from an initializer list.
1972
1973 2009-02-20  Jason Merrill  <jason@redhat.com>
1974
1975         PR c++/39225
1976         * decl.c (grokdeclarator): Handle ~identifier.
1977
1978 2009-02-19  Jakub Jelinek  <jakub@redhat.com>
1979
1980         PR target/39175
1981         * decl2.c (determine_visibility): If visibility changed and
1982         DECL_RTL has been already set, call make_decl_rtl to update symbol
1983         flags.
1984
1985 2009-02-19  H.J. Lu  <hongjiu.lu@intel.com>
1986
1987         PR c++/39188
1988         * cp-tree.h (maybe_commonize_var): New.
1989
1990         * decl.c (maybe_commonize_var): Make it extern.
1991
1992         * decl2.c (finish_anon_union): Call maybe_commonize_var.
1993
1994 2009-02-18  H.J. Lu  <hongjiu.lu@intel.com>
1995
1996         PR c++/39219
1997         * parser.c (cp_parser_enum_specifier): Apply all attributes.
1998
1999 2009-02-18  Jason Merrill  <jason@redhat.com>
2000
2001         * cfns.h: Tweak pathname for cfns.gperf.
2002
2003 2009-02-13  Jason Merrill  <jason@redhat.com>
2004
2005         PR c++/39070
2006         * semantics.c (finish_call_expr): Change koenig_p parm to int.
2007         If -1, don't set KOENIG_LOOKUP_P but do keep hidden candidates.
2008         * cp-tree.h: Adjust prototype.
2009         * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Pass -1.
2010
2011 2009-02-12  Jason Merrill  <jason@redhat.com>
2012
2013         PR c++/38950
2014         * pt.c (unify)[TEMPLATE_PARM_INDEX]: Convert to the tsubsted type.
2015
2016 2009-02-11  Jason Merrill  <jason@redhat.com>
2017
2018         PR c++/39153
2019         * decl2.c (cp_write_global_declarations): 
2020         Check DECL_DEFAULTED_FN, not DECL_ARTIFICIAL.
2021
2022         PR c++/30111
2023         * init.c (build_value_init_noctor): Split out from...
2024         (build_value_init): ...here.
2025         (expand_aggr_init_1): Handle value-initialization.
2026         * cp-tree.h: Add declaration.
2027         * class.c (type_has_user_provided_constructor): 
2028         Handle non-class arguments.
2029
2030 2009-02-10  Jason Merrill  <jason@redhat.com>
2031
2032         PR c++/38649
2033         * class.c (defaultable_fn_p): Handle ... properly.
2034
2035         PR c++/36744
2036         * tree.c (lvalue_p_1): Condition rvalue ref handling on
2037         treat_class_rvalues_as_lvalues, too.
2038
2039 2009-02-10  Paolo Carlini  <paolo.carlini@oracle.com>
2040
2041         PR c++/34397
2042         * typeck.c (build_x_array_ref): New.
2043         * cp-tree.h: Declare it.
2044         * pt.c (tsubst_copy_and_build): Use it for case ARRAY_REF.
2045
2046 2009-02-09  Jason Merrill  <jason@redhat.com>
2047
2048         PR c++/39109
2049         * semantics.c (simplify_aggr_init_expr): Do zero-initialization here.
2050         * init.c (build_value_init): Not here. Don't build a TARGET_EXPR.
2051         * tree.c (get_target_expr): Handle AGGR_INIT_EXPR.
2052         * cp-gimplify.c (cp_gimplify_init_expr): Remove special handling
2053         for build_value_init TARGET_EXPR.
2054         * cp-tree.h (AGGR_INIT_ZERO_FIRST): New macro.
2055
2056 2009-02-06  Paolo Carlini  <paolo.carlini@oracle.com>
2057
2058         PR c++/35147
2059         PR c++/37737
2060         * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Check TREE_VEC_LENGTH.
2061
2062 2009-02-04  Jakub Jelinek  <jakub@redhat.com>
2063
2064         PR c++/39095
2065         * operators.def: Use COMPONENT_REF code for ->/pt operator again,
2066         remove ./dt operator.
2067         * mangle.c (write_expression): Handle COMPONENT_REF after handling
2068         ADDR_EXPR, for COMPONENT_REF without ARROW_EXPR inside of it
2069         write_string ("dt") instead of using operators.def.
2070
2071 2009-02-03  Jason Merrill  <jason@redhat.com>
2072
2073         * typeck.c (cp_build_unary_op): Only complain about taking address
2074         of main if pedantic.
2075
2076 2009-02-03  Jakub Jelinek  <jakub@redhat.com>
2077
2078         PR inline-asm/39059
2079         * parser.c (cp_parser_primary_expression): Reject FIXED_CSTs.
2080
2081         PR c++/39056
2082         * typeck2.c (digest_init_r): Don't call process_init_constructor
2083         for COMPLEX_TYPE.
2084
2085 2009-02-03  Paolo Bonzini  <bonzini@gnu.org>
2086
2087         PR c++/36897
2088         * pt.c (convert_nontype_argument_function): Expect expr to be an
2089         ADDR_EXPR.
2090
2091         PR c++/37314
2092         * typeck.c (merge_types): Call resolve_typename_type if only
2093         one type is a typename.
2094
2095 2009-02-02  Jason Merrill  <jason@redhat.com>
2096
2097         PR c++/39054
2098         * parser.c (cp_parser_unqualified_id): Don't wrap error_mark_node 
2099         in BIT_NOT_EXPR.
2100
2101 2009-02-01  Paolo Carlini  <paolo.carlini@oracle.com>
2102
2103         PR c++/39053
2104         * parser.c (cp_parser_pure_specifier): If there are no tokens left
2105         do not call cp_lexer_consume_token.
2106
2107 2009-01-30  Jakub Jelinek  <jakub@redhat.com>
2108
2109         PR c++/39028
2110         * parser.c (cp_parser_already_scoped_statement): Handle __label__
2111         declarations.
2112
2113 2009-01-30  Paolo Carlini  <paolo.carlini@oracle.com>
2114
2115         PR c++/33465
2116         * error.c (dump_expr): Handle FIX_TRUNC_EXPR and FLOAT_EXPR.
2117
2118 2009-01-30  Paolo Carlini  <paolo.carlini@oracle.com>
2119
2120         PR c++/38655
2121         * error.c (dump_type_prefix, dump_type_suffix): Handle FIXED_POINT_TYPE.
2122
2123 2009-01-29  Paolo Carlini  <paolo.carlini@oracle.com>
2124
2125         * typeck.c (invalid_nonstatic_memfn_p): Use
2126         DECL_NONSTATIC_MEMBER_FUNCTION_P.
2127
2128 2009-01-27  Paolo Carlini  <paolo.carlini@oracle.com>
2129
2130         PR c++/37554
2131         * call.c (build_over_call): If convert_for_arg_passing returns
2132         error_mark_node unconditionally return it.
2133
2134 2009-01-22  Adam Nemet  <anemet@caviumnetworks.com>
2135
2136         * class.c (check_field_decls): Also inherit packed for bitfields
2137         regardless of their type.
2138
2139 2009-01-22  Dodji Seketeli  <dodji@redhat.com>
2140
2141         PR c++/38930
2142         * decl2.c (grokfield): Reverting changes of PR c++/26693
2143         (save_template_attributes): Likewise.
2144         * decl.c (grokdeclarator): Likewise.
2145         * name-lookup.c (pushdecl_maybe_friend): Likewise.
2146         * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): Likewise.
2147         (append_type_to_template_for_access_check): Likewise.
2148         * semantics.c (check_accessibility_of_qualified_id): Likewise.
2149         * pt.c (instantiate_class_template, instantiate_template ): Likewise.
2150         (tsubst): Likewise.
2151         (resolve_type_name_type): Likewise.
2152         (append_type_to_template_for_access_check): Likewise.
2153
2154 2009-01-21  Dodji Seketeli  <dodji@redhat.com>
2155
2156         PR c++/26693
2157         * decl2.c (grokfield): when a typedef appears in a
2158         class, create the typedef variant type node for it.
2159         (save_template_attributes): Creating typedef variant type node
2160          here is now useless.
2161         * decl.c (grokdeclarator): If the typedef'ed struct/class was
2162         anonymous, set the proper type name to all its type variants.
2163         * name-lookup.c (pushdecl_maybe_friend): Reuse the
2164         set_underlying_type function to install typedef variant types.
2165         * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
2166         macro.
2167         (append_type_to_template_for_access_check): New entry points.
2168         * semantics.c (check_accessibility_of_qualified_id):
2169         When a typedef that is a member of a class appears in a template,
2170         add it to the template. It will be ...
2171         * pt.c (instantiate_class_template, instantiate_template ): ... access
2172         checked at template instantiation time.
2173         (tsubst): Handle the case of being called with NULL args.
2174         (resolve_type_name_type): The type name should be the name of the
2175         main type variant.
2176         (append_type_to_template_for_access_check): New entry point.
2177
2178 2009-01-19  Jason Merrill  <jason@redhat.com>
2179
2180         PR c++/23287
2181         * parser.c (cp_parser_unqualified_id): In a template,
2182         accept ~identifier.
2183         * typeck.c (lookup_destructor): Handle IDENTIFIER_NODE.
2184
2185 2009-01-16  Jason Merrill  <jason@redhat.com>
2186
2187         PR c++/38877
2188         * tree.c (lvalue_p_1): Allow non-fields in COMPONENT_REF.
2189         * init.c (build_new): Don't call describable_type unless we
2190         have an auto.
2191
2192         PR c++/29470
2193         * pt.c (tsubst_decl) [USING_DECL]: Propagate access flags.
2194
2195         PR c++/38579
2196         * search.c (protected_accessible_p): N doesn't vary.
2197
2198 2009-01-15  Jason Merrill  <jason@redhat.com>
2199
2200         PR c++/38850
2201         * pt.c (tsubst_copy_and_build): Tell finish_call_expr to
2202         accept hidden friends.
2203
2204 2009-01-15  Andrew Pinski  <andrew_pinski@playstation.sony.com>
2205
2206         PR C++/29388
2207         * decl.c (grokdeclarator): Check for a non namespace/class context.
2208
2209 2009-01-15  Jason Merrill  <jason@redhat.com>
2210
2211         PR c++/36334
2212         PR c++/37646
2213         * tree.c (lvalue_p_1): Handle BASELINK.  A COMPONENT_REF to
2214         a function isn't necessarily an lvalue. Take tree, not const_tree.
2215         (lvalue_p, real_lvalue_p): Take tree, not const_tree.
2216         * typeck.c (lvalue_or_else): Likewise.
2217         * cp-tree.h: Adjust prototypes.
2218
2219 2009-01-15  Steve Ellcey  <sje@cup.hp.com>
2220
2221         PR c++/38357
2222         * pt.c (tsubst): Check for NULL args.
2223
2224 2009-01-15  Dodji Seketeli  <dodji@redhat.com>
2225
2226         PR c++/38636
2227         * name-lookup.c (pushtag): Don't create members to types that are not
2228         being created.
2229
2230 2009-01-14  Nick Clifton  <nickc@redhat.com>
2231
2232         PR c++/37862
2233         * parser.c: Pass cp_id_kind computed in
2234         cp_parser_postfix_dot_deref_expression to
2235         cp_parser_primary_expression.
2236
2237 2009-01-13  Jakub Jelinek  <jakub@redhat.com>
2238
2239         PR c++/38795
2240         * tree.c (cp_walk_subtrees): Handle REINTERPRET_CAST_EXPR,
2241         STATIC_CAST_EXPR, CONST_CAST_EXPR and DYNAMIC_CAST_EXPR the same
2242         as CAST_EXPR.
2243
2244 2009-01-12  Jason Merrill  <jason@redhat.com>
2245             Steve Ellcey  <sje@cup.hp.com>
2246
2247         PR c++/35109
2248         * name-lookup.c (lookup_name_real): Keep looking past a hidden 
2249         binding.
2250
2251 2009-01-12  Dodji Seketeli  <dodji@redhat.com>
2252
2253         PR c++/36019
2254         * pt.c (parameter_of_template_p): New function.
2255         * cp-tree.h: Declare it.
2256         * name-lookup.c (binding_to_template_parms_of_scope_p): New
2257         function.
2258         (outer_binding): Take template parameters in account when looking for
2259         a name binding.
2260
2261 2009-01-12  Jason Merrill  <jason@redhat.com>
2262
2263         PR c++/31488
2264         * tree.c (pod_type_p): Return 1 for structs created by the back end.
2265
2266 2009-01-12  Jakub Jelinek  <jakub@redhat.com>
2267
2268         PR c/32041
2269         * parser.c (cp_parser_builtin_offsetof): Allow `->' in
2270         offsetof member-designator, handle it as `[0].'.
2271
2272         PR c++/38794
2273         * decl.c (start_function): If grokdeclarator hasn't returned
2274         FUNCTION_DECL nor error_mark_node, issue diagnostics.
2275
2276 2009-01-11  Jakub Jelinek  <jakub@redhat.com>
2277
2278         PR c++/36254
2279         * cp-gimplify.c (genericize_if_stmt): Renamed from ...
2280         (gimplify_if_stmt): ... this.
2281         (cp_gimplify_expr): Don't handle IF_STMT here.
2282         (cp_genericize_r): Call genericize_if_stmt for IF_STMT.
2283
2284 2009-01-10  Andrew Pinski  <pinskia@gmail.com>
2285
2286         PR c++/38648
2287         * typeck.c (cp_build_modify_expr): Check for NULL current_function_decl.
2288
2289         PR c++/36695
2290         * typeck2.c (build_functional_cast): Check for reference type and NULL
2291         PARMS.
2292
2293 2009-01-09  Steve Ellcey  <sje@cup.hp.com>
2294
2295         * typeck.c (cp_build_unary_op): Check for ERROR_MARK.
2296
2297 2009-01-09  Jakub Jelinek  <jakub@redhat.com>
2298
2299         PR c++/35335
2300         * error.c (dump_expr): Handle EXPR_STMT like BIND_EXPR.
2301
2302 2009-01-09  John F. Carr  <jfc@mit.edu>
2303
2304         PR c++/37877
2305         * parser.c (cp_parser_class_specifier): Clear
2306         parser->in_unbraced_linkage_specification_p while parsing class
2307         specifiers.
2308
2309 2009-01-07  Jakub Jelinek  <jakub@redhat.com>
2310
2311         PR c++/38725
2312         * semantics.c (finish_goto_stmt): Convert destination to
2313         void *.
2314
2315 2009-01-06  Jason Merrill  <jason@redhat.com>
2316
2317         PR c++/35297
2318         PR c++/35477
2319         PR c++/35784
2320         PR c++/36846
2321         PR c++/38276
2322         * pt.c (check_default_tmpl_args): Don't complain about
2323         out-of-order parameter packs in the enclosing class
2324         or parameter packs after default args.
2325         (coerce_template_parms): If we have more than one
2326         parameter pack, don't flatten argument packs.
2327         (template_args_equal): Handle argument packs.
2328         (comp_template_args): Don't flatten argument packs.
2329         (check_instantiated_arg): Split out from...
2330         (check_instantiated_args): Here.  Handle arg packs.
2331         (convert_template_argument): Just check that nontype argument
2332         packs have the right type.
2333
2334 2009-01-05  Dodji Seketeli  <dodji@redhat.com>
2335
2336         PR c++/38472
2337         * typeck.c (type_after_usual_arithmetic_conversions): Fix a typo.
2338
2339 2009-01-05  Jason Merrill  <jason@redhat.com>
2340
2341         PR c++/38698
2342         * typeck2.c (process_init_constructor_union): Handle union with
2343         no fields.
2344
2345         * mangle.c (write_expression): Remove mangling for zero-operand
2346         casts.
2347
2348         PR c++/38701
2349         * decl.c (cp_finish_decl): Clear DECL_INITIAL for invalid
2350         defaulting.
2351
2352         PR c++/38702
2353         * class.c (defaultable_fn_p): Only operator== can be a copy
2354         assignment operator.
2355
2356 2009-01-02  Jason Merrill  <jason@redhat.com>
2357
2358         PR c++/38698
2359         * typeck2.c (process_init_constructor_union): Handle excess
2360         initializers.
2361         (process_init_constructor_record): Likewise.
2362
2363         PR c++/38684
2364         * typeck2.c (digest_init_r): Don't use process_init_constructor
2365         for non-aggregate classes.
2366
2367 \f
2368 Copyright (C) 2009 Free Software Foundation, Inc.
2369
2370 Copying and distribution of this file, with or without modification,
2371 are permitted in any medium without royalty provided the copyright
2372 notice and this notice are preserved.