OSDN Git Service

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