OSDN Git Service

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