2012-06-06 Fabien Chene <fabien@gcc.gnu.org>
[official-gcc.git] / gcc / cp / ChangeLog
blobcd983fac3ac0611b3bd19191694c223cbbb40f3a
1 2012-06-06  Fabien ChĂȘne  <fabien@gcc.gnu.org>
3         PR c++/52841
4         * parser.c (cp_parser_alias_declaration): Return earlier
5         if an error occured.
7 2012-06-04  Paolo Carlini  <paolo.carlini@oracle.com>
9         PR c++/53524
10         * call.c (build_conditional_expr_1): Use OPT_Wenum_compare
11         to control enumeral mismatch in conditional expression too.
13 2012-06-04  Steven Bosscher  <steven@gcc.gnu.org>
15         * semantics.c: Do not include output.h.
16         * decl2.c: Likewise.
17         * friend.c: Likewise.
18         * typeck.c: Likewise.
19         * typeck2.c: Likewise.
20         * Make-lang.in: Fix dependencies.
22 2012-06-01  Jason Merrill  <jason@redhat.com>
24         PR c++/52973
25         * parser.c (cp_parser_class_head): Apply attributes here.
26         * semantics.c (begin_class_definition): Not here.
27         * cp-tree.h: Adjust.
29         PR c++/52725
30         * parser.c (cp_parser_binary_expression): Bail early if we're parsing
31         tentatively and the LHS has a parse error.
33         PR c++/53137
34         * pt.c (instantiate_class_template_1): Set LAMBDA_EXPR_THIS_CAPTURE.
35         (instantiate_decl): Don't push_to_top_level for local class methods.
36         (instantiate_class_template_1): Or for local classes.
38         PR c++/53484
39         * pt.c (do_auto_deduction): Don't try to deduce from a
40         type-dependent initializer.
42 2012-06-01  Paolo Carlini  <paolo.carlini@oracle.com>
44         PR c++/26155
45         * name-lookup.c (push_namespace): When error recovery is
46         impossible just error out in duplicate_decls.
48 2012-05-31  Steven Bosscher  <steven@gcc.gnu.org>
50         * call.c: Do not include output.h.
51         * class.c: Likewise.
52         * except.c: Likewise.
53         * friend.c: Likewise.
54         * init.c: Likewise.
55         * lex.c: Likewise.
56         * method.c: Likewise.
57         * parser.c: Likewise.
58         * pt.c: Likewise.
59         * rtti.c: Likewise.
60         * search.c: Likewise.
62 2012-05-30  Jason Merrill  <jason@redhat.com>
64         PR c++/53356
65         * tree.c (stabilize_init): Handle stabilizing a TARGET_EXPR
66         representing a bitwise copy of a glvalue.
68         * tree.c (stabilize_expr): Tweak logic.
70         PR c++/53356
71         * tree.c (stabilize_init): Side effects make the init unstable.
73 2012-05-28  Paolo Carlini  <paolo.carlini@oracle.com>
75         PR c++/53503
76         * semantics.c (potential_constant_expression_1): Handle LTGT_EXPR.
78 2012-05-26  Paolo Carlini  <paolo.carlini@oracle.com>
80         PR c++/53491
81         * tree.c (stabilize_expr): Handle exp of void type.
83 2012-05-26  Jason Merrill  <jason@redhat.com>
85         PR c++/53220
86         * call.c (convert_like_real) [ck_list]: Take array address directly.
87         * typeck.c (decay_conversion): Reject decay of an array compound
88         literal.
90 2012-05-25  Paolo Carlini  <paolo.carlini@oracle.com>
92         PR c++/32054
93         * parser.c (cp_parser_member_declaration): A storage class is not
94         allowed in a declaration of an anonymous aggregate in a class scope.
96 2012-05-24  Uros Bizjak  <ubizjak@gmail.com>
98         PR obj-c++/53441
99         * decl.c (grokdeclarator): Check that current_class_type is non-NULL
100         before calling constructor_name_p.
102 2012-05-24  Paolo Carlini  <paolo.carlini@oracle.com>
104         PR c++/32080
105         * parser.c (cp_parser_ctor_initializer_opt_and_function_body,
106         cp_parser_function_body): Add a bool parameter, true when parsing
107         a function-try-block.
108         (cp_parser_function_try_block): Pass true to the above.
109         (cp_parser_function_definition_after_declarator,
110         cp_parser_function_transaction): Adjust.
112 2012-05-23  Paolo Carlini  <paolo.carlini@oracle.com>
114         PR c++/29185
115         * decl2.c (delete_sanity): Extend 'deleting array' warning to
116         any array type.
118 2012-05-21  Paolo Carlini  <paolo.carlini@oracle.com>
120         PR c++/51184
121         * decl.c (grokdeclarator): Diagnose functions returning abstract
122         class types as TYPENAME.
123         * cp-tree.h (ABSTRACT_CLASS_TYPE_P): Add.
124         * except.c (is_admissible_throw_operand_or_catch_parameter): Use it.
125         * pt.c (tsubst): Likewise.
126         * semantics.c (trait_expr_value): Likewise.
128 2012-05-21  Paolo Carlini  <paolo.carlini@oracle.com>
130         PR c++/40821
131         * parser.c (cp_parser_attributes_opt): Enforce error checking of
132         unbalanced parentheses in the presence of tentative parsing.
134 2012-05-17  Paolo Carlini  <paolo.carlini@oracle.com>
136         PR c++/39681
137         * parser.c (cp_parser_new_type_id): Early return error_mark_node
138         if the cp_parser_type_specifier_seq call has type_specifier_seq.type
139         error_mark_node; tidy.
140         (cp_parser_new_expression): Always initialize nelts to NULL_TREE to
141         avoid uninitialized warnings.
142         (cp_parser_init_declarator, cp_parser_late_parse_one_default_arg):
143         Call cp_parser_skip_to_end_of_statement if cp_parser_initializer
144         returns error_mark_node.
146 2012-05-17  Paolo Carlini  <paolo.carlini@oracle.com>
148         PR c++/53371
149         * except.c (is_admissible_throw_operand): Rename to
150         is_admissible_throw_operand_or_catch_parameter and handle
151         catch parameter too.
152         (expand_start_catch_block): Use it.
153         (build_throw): Adjust.
155 2012-05-17  Paolo Carlini  <paolo.carlini@oracle.com>
157         PR c++/44516
158         * typeck.c (build_x_array_ref, build_x_conditional_expr,
159         build_x_compound_expr, build_x_modify_expr): Add location_t parameter.
160         (finish_class_member_access_expr, build_x_indirect_ref,
161         build_x_binary_op, build_x_compound_expr_from_list,
162         build_x_compound_expr_from_vec): Adjust callers.
163         * tree.c (build_min_nt_loc): New.
164         (build_min_nt): Remove.
165         * typeck2.c (build_x_arrow): Adjust callers.
166         * pt.c (tsubst_qualified_id, tsubst_omp_for_iterator,
167         tsubst_copy_and_build): Likewise.
168         * semantics.c (finish_mem_initializers, handle_omp_for_class_iterator,
169          finish_omp_atomic): Likewise.
170         * decl2.c (grok_array_decl, build_anon_union_vars): Adjust.
171         * parser.c (cp_parser_question_colon_clause,
172         cp_parser_assignment_expression, cp_parser_expression,
173         cp_parser_template_id, cp_parser_omp_for_loop): Likewise.
174         * cp-tree.h: Update.
176 2012-05-16  Dodji Seketeli  <dodji@redhat.com>
178         PR preprocessor/7263
179         * cp-tree.h (enum cp_decl_spec): Add new enumerators to cover all
180         the possible declarator specifiers so far.
181         (struct cp_decl_specifier_seq::locations): Declare new member.
182         (cp_decl_specifier_seq::{specs, type_location}): Remove.
183         (decl_spec_seq_has_spec_p): Declare new function.
184         * parser.c (cp_parser_check_decl_spec): Remove.
185         (set_and_check_decl_spec_loc): Define new static function.
186         (decl_spec_seq_has_spec_p): Define new public function.
187         (cp_parser_decl_specifier_seq, cp_parser_function_specifier_opt)
188         (cp_parser_type_specifier, cp_parser_simple_type_specifier)
189         (cp_parser_set_storage_class, cp_parser_set_decl_spec_type)
190         (cp_parser_alias_declaration): Set the locations for each
191         declspec, using set_and_check_decl_spec_loc.
192         (cp_parser_explicit_instantiation, cp_parser_init_declarator)
193         (cp_parser_member_declaration, cp_parser_init_declarator): Use the
194         new declspec location for specifiers.  Use the new
195         decl_spec_seq_has_spec_p.
196         (cp_parser_type_specifier_seq): Use the new
197         set_and_check_decl_spec_loc.  Stop using
198         cp_parser_check_decl_spec.  Use the new decl_spec_seq_has_spec_p.
199         (, cp_parser_init_declarator): Use the new
200         set_and_check_decl_spec_loc.
201         (cp_parser_single_declaration, cp_parser_friend_p)
202         (cp_parser_objc_class_ivars, cp_parser_objc_struct_declaration):
203         Use the new decl_spec_seq_has_spec_p.
204         * decl.c (check_tag_decl): Use new decl_spec_seq_has_spec_p.  Use
205         the more precise ds_redefined_builtin_type_spec location for
206         diagnostics about re-declaring C++ built-in types.
207         (start_decl, grokvardecl, grokdeclarator): Use the new
208         decl_spec_seq_has_spec_p.
210 2012-05-15  Paolo Carlini  <paolo.carlini@oracle.com>
212         PR c++/11856
213         * pt.c (tsubst_copy_and_build): Increase / decrease
214         c_inhibit_evaluation_warnings around build_x_binary_op call.
216 2012-05-12  Paolo Carlini  <paolo.carlini@oracle.com>
218         * cp-tree.h (TYPE_PTRMEM_P): Rename to TYPE_PTRDATAMEM_P.
219         (TYPE_PTR_TO_MEMBER_P): Rename to TYPE_PTRMEM_P.
220         (TYPE_PTR_OR_PTRMEM_P): Add.
221         * typeck.c (composite_pointer_type_r, composite_pointer_type,
222         common_pointer_type, cp_build_indirect_ref, cp_build_binary_op,
223         cp_truthvalue_conversion, convert_ptrmem, build_static_cast_1,
224         build_reinterpret_cast_1, build_const_cast_1, comp_ptr_ttypes_real,
225         casts_away_constness_r, casts_away_constness): Adjust.
226         * init.c (build_zero_init_1): Adjust.
227         * class.c (check_field_decls): Likewise.
228         * decl.c (check_default_argument): Likewise.
229         * rtti.c (target_incomplete_p): Likewise.
230         * tree.c (zero_init_p): Likewise.
231         * cxx-pretty-print.c (pp_cxx_ptr_operator,
232         pp_cxx_abstract_declarator): Likewise.
233         * typeck2.c (build_m_component_ref): Likewise.
234         * pt.c (convert_nontype_argument, invalid_nontype_parm_type_p,
235         dependent_type_p_r): Likewise.
236         * call.c (null_member_pointer_value_p, standard_conversion,
237         add_builtin_candidate, build_conditional_expr_1, compare_ics):
238         Likewise.
239         * cp-objcp-common.c (cp_var_mod_type_p): Likewise.
240         * cvt.c (cp_convert_to_pointer, ocp_convert,
241         perform_qualification_conversions): Likewise.
242         * mangle.c (write_type): Likewise.
243         * name-lookup.c (arg_assoc_type): Likewise.
245 2012-05-12  Paolo Carlini  <paolo.carlini@oracle.com>
247         * parser.c (struct cp_parser_expression_stack_entry): Add location_t
248         field.
249         (cp_parser_binary_expression): Rework to always update at the same
250         time tree_type and loc.
251         * call.c (print_z_candidate): Add location_t parameter.
252         (print_z_candidates, convert_like_real, joust): Adjust.
254 2012-05-11  Alexandre Oliva  <aoliva@redhat.com>
256         PR c++/53209
257         * pt.c (tsubst_decl): Bail out if argvec is error_mark_node.
259 2012-05-11  Paolo Carlini  <paolo.carlini@oracle.com>
261         PR c++/53305
262         * pt.c (tsubst_copy: case PARM_DECL): Return error_mark_node if
263         tsubst_decl returns NULL_TREE.
264         * cxx-pretty-print.c (pp_cxx_simple_type_specifier): Handle
265         BOUND_TEMPLATE_TEMPLATE_PARM.
267 2012-05-10  Paolo Carlini  <paolo.carlini@oracle.com>
269         PR c++/53158
270         * cvt.c (ocp_convert): Error out early for void -> bool conversions.
271         * typeck.c (decay_conversion): Use error_at.
272         * call.c (build_integral_nontype_arg_conv, convert_like_real,
273         convert_arg_to_ellipsis, perform_implicit_conversion_flags,
274         initialize_reference): Likewise.
275         * cvt.c (warn_ref_binding): Add location_t parameter.
276         (cp_convert_to_pointer, convert_to_reference, ocp_convert,
277         convert_to_void, ): Use error_at and warning_at.
279 2012-05-10  Paolo Carlini  <paolo.carlini@oracle.com>
281         PR c++/53301
282         * decl.c (check_default_argument): Fix typo (POINTER_TYPE_P
283         instead of TYPE_PTR_P) in zero-as-null-pointer-constant warning.
285 2012-05-06  Paolo Carlini  <paolo.carlini@oracle.com>
287         PR c++/53152
288         * call.c (op_error, build_new_op_1, build_new_op): Add location_t
289         parameter.
290         (build_conditional_expr_1): Adjust.
291         * typeck.c (build_x_indirect_ref, build_x_binary_op,
292         build_x_unary_op): Add location_t parameter.
293         (rationalize_conditional_expr, build_x_array_ref,
294         build_x_compound_expr, cp_build_modify_expr, build_x_modify_expr):
295         Adjust.
296         * typeck2.c (build_x_arrow): Add location_t parameter.
297         * semantics.c (finish_unary_op_expr): Likewise.
298         (finish_increment_expr, handle_omp_for_class_iterator): Adjust.
299         * decl2.c (grok_array_decl): Add location_t parameter.
300         * parser.c (cp_parser_postfix_open_square_expression,
301         cp_parser_postfix_dot_deref_expression, cp_parser_unary_expression,
302         cp_parser_binary_expression, cp_parser_builtin_offsetof,
303         do_range_for_auto_deduction, cp_convert_range_for,
304         cp_parser_template_argument, cp_parser_omp_for_cond): Pass the
305         location, adjust.
306         * pt.c (tsubst_copy_and_build): Adjust.
307         * tree.c (maybe_dummy_object): Likewise.
308         * cp-tree.h: Update declarations.
310 2012-05-04  Paolo Carlini  <paolo.carlini@oracle.com>
312         * semantics.c (cxx_eval_constant_expression, case CONVERT_EXPR): Tidy.
314 2012-05-04  Paolo Carlini  <paolo.carlini@oracle.com>
316         PR c++/53166
317         * pt.c (instantiate_class_template_1): Increase / decrease
318         c_inhibit_evaluation_warnings around the tsubst_expr call
319         for STATIC_ASSERT_CONDITION.
320         (tsubst_expr, case STATIC_ASSERT): Likewise.
321         * typeck.c (cp_build_binary_op, case EQ_EXPR/NE_EXPR): Check
322         c_inhibit_evaluation_warnings in the OPT_Waddress warnings.
324 2012-05-03  Paolo Carlini  <paolo.carlini@oracle.com>
326         PR c++/53186
327         * call.c (build_over_call): Handle final member functions
328         and class types.
329         (build_new_method_call_1): Do not handle here.
331 2012-05-02  Richard Guenther  <rguenther@suse.de>
333         * decl.c (grokdeclarator): Properly check for sizes that
334         cover more than half of the address-space.
336 2012-04-30  Marc Glisse  <marc.glisse@inria.fr>
338         PR c++/51033
339         * typeck.c (cp_build_array_ref): Handle VECTOR_TYPE.
340         * decl2.c (grok_array_decl): Likewise.
342         PR c++/51314
343         * parser.c (cp_parser_sizeof_operand): Require parentheses for
344         sizeof...
346 2012-04-30  Dodji Seketeli  <dodji@redhat.com>
348         Fix location for static class members
349         * decl.c (grokdeclarator): Use the location carried by the
350         declarator for the DECL of the static class member.
352         Fix va_arg type location
353         * cp-tree.h (build_x_va_arg): Take an additional location
354         parameter.
355         * call.c (build_x_va_arg): Take a loc parameter for the location
356         of the type of the va_arg expression.
357         * parser.c (cp_parser_primary_expression): Pass the type of the
358         type in the va_arg expression to build_x_va_arg.
359         * pt.c (tsubst_copy): Adjust calls to build_x_va_arg.
361         Make conversion warnings work on NULL with -ftrack-macro-expansion
362         * call.c (conversion_null_warnings): Use the new
363         expansion_point_location_if_in_system_header.
364         * cvt.c (build_expr_type_conversion): Likewise.
365         * typeck.c (cp_build_binary_op): Likewise.
367 2012-04-30  Manuel LĂłpez-Ibåñez  <manu@gcc.gnu.org>
369         * typeck.c (convert_for_assignment):  Replace
370         Wmissing-format-attribute with Wsuggest-attribute=format.
371         * call.c (convert_for_arg_passing): Likewise.
373 2012-04-26  Paolo Carlini  <paolo.carlini@oracle.com>
375         PR c++/53096
376         * class.c (check_bases_and_members): Implement core/1333, do not
377         disallow defaulted in the class body non-const ref special members.
379 2012-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
381         PR c++/52363
382         * call.c (tourney, perform_overload_resolution,
383         build_operator_new_call, build_user_type_conversion_1,
384         build_user_type_conversion, perform_overload_resolution,
385         add_template_candidate, add_template_candidate_real,
386         add_template_conv_candidate, add_builtin_candidates,
387         add_builtin_candidate, build_builtin_candidate,
388         add_conv_candidate, add_function_candidate, implicit_conversion,
389         reference_binding, build_list_conv, conditional_conversion,
390         add_candidates, can_convert_array, build_aggr_conv,
391         build_array_conv, build_complex_conv, conditional_conversion):
392         Add tsubst_flags_t parameter.
393         (joust): Likewise, use it to handle SFINAE as if pedantic.
394         (add_list_candidates, build_integral_nontype_arg_conv,
395         perform_overload_resolution, build_new_function_call,
396         build_operator_new_call, build_op_call_1,
397         build_conditional_expr_1, build_new_op_1, convert_like_real,
398         convert_arg_to_ellipsis, convert_default_arg,
399         convert_for_arg_passing, build_over_call,
400         build_new_method_call_1, can_convert_arg, can_convert_arg_bad,
401         perform_implicit_conversion_flags,
402         perform_direct_initialization_if_possible,
403         initialize_reference): Adjust.
404         * typeck.c (casts_away_constness, casts_away_constness_r):
405         Add tsubst_flags_t parameter.
406         (convert_arguments, check_for_casting_away_constness,
407         build_static_cast_1, build_ptrmemfunc, convert_for_assignment):
408         Adjust.
409         * decl.c (reshape_init_r, check_default_argument): Likewise.
410         * cp-gimplify.c (cxx_omp_clause_apply_fn): Likewise.
411         * pt.c (convert_nontype_argument, check_non_deducible_conversion):
412         Likewise.
413         * init.c (build_new_1): Likewise.
414         * cvt.c (convert_to_reference, ocp_convert, build_type_conversion,
415         build_expr_type_conversion, ): Likewise.
416         * search.c (check_final_overrider): Likewise.
417         * cp-tree.h (build_user_type_conversion,
418         build_operator_new_call, can_convert, can_convert_arg,
419         can_convert_arg_bad, convert_default_arg,
420         convert_arg_to_ellipsis, convert_for_arg_passing):
421         Adjust declaration.
423 2012-04-22  Jan Hubicka  <jh@suse.cz>
425         * decl2.c (maybe_make_one_only): Mark keyed COMDATs as USED so they
426         gets finalized.
428 2012-04-22  Manuel LĂłpez-Ibåñez  <manu@gcc.gnu.org>
430         PR c/44774
431         * typeck.c (composite_pointer_type): Likewise.
432         (cxx_sizeof_or_alignof_type): Likewise.
433         (cp_build_array_ref): Likewise.
434         (cp_build_function_call_vec): Likewise.
435         (cp_build_addr_expr_1): Likewise.
436         (convert_member_func_to_ptr): Likewise.
437         * decl.c (check_tag_decl): Likewise.
438         (check_static_variable_definition): Likewise.
439         (compute_array_index_type): Likewise.
440         (create_array_type_for_decl): Likewise.
441         (grokdeclarator): Likewise.
442         (grok_op_properties): Likewise.
443         * error.c (maybe_warn_cpp0x): Likewise.
444         * pt.c (maybe_process_partial_specialization): Likewise.
445         (convert_template_argument): Likewise.
446         (do_decl_instantiation): Likewise.
447         (do_type_instantiation): Likewise.
448         * parser.c (cp_parser_primary_expression): Likewise.
449         (cp_parser_postfix_expression): Likewise.
450         (cp_parser_unary_expression): Likewise.
451         (cp_parser_question_colon_clause): Likewise.
452         (cp_parser_lambda_introducer): Likewise.
453         (cp_parser_lambda_declarator_opt): Likewise.
454         (cp_parser_compound_statement): Likewise.
455         (cp_parser_jump_statement): Likewise.
456         (cp_parser_declaration_seq_opt): Likewise.
457         (cp_parser_enum_specifier): Likewise.
458         (cp_parser_enumerator_list): Likewise.
459         (cp_parser_initializer_list): Likewise.
460         (cp_parser_member_declaration): Likewise.
461         * call.c (build_conditional_expr_1): Likewise.
462         * friend.c (make_friend_class): Likewise.
463         * name-lookup.c (pushdecl_maybe_friend_1): Likewise.
465 2012-04-21  Jan Hubicka  <jh@suse.cz>
467         * method.c (make_alias_for): Do not set TREE_SYMBOL_REFERENCED.
468         * decl2.c (mark_needed): Likewise.
469         (decl_needed_p): Do not test TREE_SYMBOL_REFERENCED.
471         * decl2.c (cxx_callgraph_analyze_expr): Remove.
472         * cp-objcp-common.h (LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR): Remove.
473         * cp-tree.h (cxx_callgraph_analyze_expr): Remove.
475 2012-04-21  Manuel LĂłpez-Ibåñez  <manu@gcc.gnu.org>
477         PR 35441
478         * typeck.c (cp_build_function_call_vec): Do not pretty-print
479         expressions when caret is enabled.
481 2012-04-20  Jan Hubicka  <jh@suse.cz>
483         PR target/53042
484         * decl2.c (maybe_emit_vtables): Do not initialize same_comdat_group
485         list when target has no support for it.
487 2012-04-20  Michael Matz  <matz@suse.de>
489         * error.c (pedwarn_cxx98): Move va_end call after user
490         of the va_list.
492 2012-04-18  Paolo Carlini  <paolo.carlini@oracle.com>
494         PR c++/52422
495         * cp-tree.h (build_addr_func, decay_conversion,
496         get_member_function_from_ptrfunc,
497         build_m_component_ref, convert_member_func_to_ptr):
498         Add tsubst_flags_t parameter.
499         * typeck.c (cp_default_conversion): Add.
500         (decay_conversion, default_conversion,
501         get_member_function_from_ptrfunc, convert_member_func_to_ptr):
502         Add tsubst_flags_t parameter and use it throughout.
503         (cp_build_indirect_ref, cp_build_array_ref,
504         cp_build_function_call_vec, convert_arguments, build_x_binary_op,
505         cp_build_binary_op, cp_build_unary_op, build_reinterpret_cast_1,
506         build_const_cast_1, expand_ptrmemfunc_cst,
507         convert_for_initialization): Adjust.
508         * init.c (build_vec_init): Adjust.
509         * decl.c (grok_reference_init, get_atexit_node): Likewise.
510         * rtti.c (build_dynamic_cast_1, tinfo_base_init): Likewise.
511         * except.c (build_throw): Likewise.
512         * typeck2.c (build_x_arrow): Likewise.
513         (build_m_component_ref): Add tsubst_flags_t parameter and
514         use it throughout.
515         * pt.c (convert_nontype_argument): Adjust.
516         * semantics.c (finish_asm_stmt, maybe_add_lambda_conv_op): Likewise.
517         * decl2.c (build_offset_ref_call_from_tree): Likewise.
518         * call.c (build_addr_func): Add tsubst_flags_t parameter and
519         use it throughout.
520         (build_call_a, build_conditional_expr_1, build_new_op_1,
521         convert_like_real, convert_arg_to_ellipsis, build_over_call,
522         build_special_member_call): Adjust.
523         * cvt.c (cp_convert_to_pointer, force_rvalue,
524         build_expr_type_conversion): Likewise.
526 2012-04-17  Tom de Vries  <tom@codesourcery.com>
528         * cp-gimplify.c (begin_bc_block): Add location parameter and use as
529         location argument to create_artificial_label.
530         (finish_bc_block): Change return type to void.  Remove body_seq
531         parameter, and add block parameter.  Append label to STMT_LIST and
532         return in block.
533         (gimplify_cp_loop, gimplify_for_stmt, gimplify_while_stmt)
534         (gimplify_do_stmt, gimplify_switch_stmt): Remove function.
535         (genericize_cp_loop, genericize_for_stmt, genericize_while_stmt)
536         (genericize_do_stmt, genericize_switch_stmt, genericize_continue_stmt)
537         (genericize_break_stmt, genericize_omp_for_stmt): New function.
538         (cp_gimplify_omp_for): Remove bc_continue processing.
539         (cp_gimplify_expr): Genericize VEC_INIT_EXPR.
540         (cp_gimplify_expr): Mark FOR_STMT, WHILE_STMT, DO_STMT, SWITCH_STMT,
541         CONTINUE_STMT, and BREAK_STMT as unreachable.
542         (cp_genericize_r): Genericize FOR_STMT, WHILE_STMT, DO_STMT,
543         SWITCH_STMT, CONTINUE_STMT, BREAK_STMT and OMP_FOR.
544         (cp_genericize_tree): New function, factored out of ...
545         (cp_genericize): ... this function.
547 2012-04-17  Paolo Carlini  <paolo.carlini@oracle.com>
549         PR c++/52599
550         * semantics.c (build_constexpr_constructor_member_initializers):
551         Check for function-try-block as function-body.
553 2012-04-17  Paolo Carlini  <paolo.carlini@oracle.com>
555         PR c++/53003
556         * parser.c (cp_parser_member_declaration): Check that
557         initializer_token_start is non null before dereferencing it.
559 2012-04-16  Jason Merrill  <jason@redhat.com>
561         PR c++/38543
562         * pt.c (determine_specialization): Instead of comparing the number
563         of parms, check that tsubst gives the right answer.
565         PR c++/52008
566         * pt.c (process_partial_specialization): Complain about a partial
567         specialization with fewer args than primary template parms.
569         PR c++/50830
570         * pt.c (convert_template_argument): Handle template template
571         argument packs.
573         PR c++/50303
574         * pt.c (tsubst_pack_expansion): Use tsubst_expr for template
575         template parameters.
577 2012-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
579         PR c++/49152
580         * call.c (op_error): Print types; when flag_diagnostics_show_caret
581         is false print expressions too.
582         (op_error_string): Add.
584 2012-04-16  Jason Merrill  <jason@redhat.com>
586         PR c++/51148
587         * friend.c (make_friend_class): Call check_for_bare_parameter_packs.
589 2012-04-16  Jan Hubicka  <jh@suse.cz>
591         * decl2.c (collect_candidates_for_java_method_alias): Use FOR_EACH
592         walkers to walk cgraph and varpool.
594 2012-04-15  Jason Merrill  <jason@redhat.com>
596         PR c++/47220
597         * pt.c (coerce_template_parameter_pack): Check for error_mark_node.
599         PR c++/52292
600         PR c++/52380
601         * pt.c (coerce_template_parms): Even if we aren't converting we
602         want to expand argument packs.
604         PR c++/52706
605         * mangle.c (write_type): nullptr_t is a builtin type.
607 2012-04-14  Jan Hubicka  <jh@suse.cz>
609         * tree.c: Update field referenced for new cgraph/varpool layout.
610         * decl2.c: Likewise.
612 2012-04-13  Jason Merrill  <jason@redhat.com>
614         PR c++/52824
615         * pt.c (any_pack_expanson_args_p): New.
616         (coerce_template_parms): Use it.
618         PR c++/52905
619         * call.c (joust): Handle comparing list and non-list ctors.
621         PR c++/52915
622         * decl2.c (finish_anon_union): Use cp_finish_decl.
623         * error.c (dump_function_name): Avoid showing anonymous "name".
625 2012-04-11  Fabien ChĂȘne  <fabien@gcc.gnu.org>
627         PR c++/52465
628         * parser.c (cp_parser_class_name): Call strip_using_decl and
629         return the target decl.
630         * name-lookup.c (strip_using_decl): Returns NULL_TREE if the decl
631         to be stripped is NULL_TREE.
632         (qualify_lookup): Call strip_using_decl and perform some checks on
633         the target decl.
635 2012-04-11  Jason Merrill  <jason@redhat.com>
637         PR debug/45088
638         * decl.c (grokdeclarator): Strip the injected-class-name typedef
639         if we are building a declaration or compound type.
641         PR c++/52906
642         * decl.c (check_tag_decl): Don't complain about attributes if we
643         don't even have a type.
645 2012-04-10  Manuel LĂłpez-Ibåñez  <manu@gcc.gnu.org>
647         * cvt.c (convert_to_void): Update comment.
649 2012-04-05  Jason Merrill  <jason@redhat.com>
651         PR c++/52596
652         * semantics.c (finish_non_static_data_member): In templates, pass
653         the decl to build_qualified_name.
654         * tree.c (lvalue_kind) [SCOPE_REF]: Handle FIELD_DECL.
656 2012-04-04  Jason Merrill  <jason@redhat.com>
658         PR c++/52845
659         * decl.c (finish_function): Update fntype after deducing return type.
661 2012-04-03  Jason Merrill  <jason@redhat.com>
663         PR c++/52796
664         * pt.c (tsubst_initializer_list): A pack expansion with no elements
665         means value-initialization.
667 2012-04-01  Paolo Carlini  <paolo.carlini@oracle.com>
669         PR c++/50043
670         * class.c (deduce_noexcept_on_destructor,
671         deduce_noexcept_on_destructors): New.
672         (check_bases_and_members): Call the latter.
673         * decl.c (grokfndecl): Call the former.
674         * method.c (implicitly_declare_fn): Not static.
675         * cp-tree.h (deduce_noexcept_on_destructor, implicitly_declare_fn):
676         Declare
678 2012-03-29  Paolo Carlini  <paolo.carlini@oracle.com>
680         PR c++/52718
681         * decl.c (check_default_argument): With -Wzero-as-null-pointer-constant
682         warn for a zero as null pointer constant default argument.
684 2012-03-29  Jason Merrill  <jason@redhat.com>
686         PR c++/52685
687         * tree.c (copy_binfo): Handle BINFO_DEPENDENT_BASE_P.
689 2012-03-29  Jakub Jelinek  <jakub@redhat.com>
691         PR c++/52759
692         * decl.c (start_decl): Don't call maybe_apply_pragma_weak
693         if processing_template_decl.
695 2012-03-29  Jason Merrill  <jason@redhat.com>
697         PR c++/52743
698         * call.c (compare_ics): Handle ck_aggr like ck_list.
700 2012-03-28  Jason Merrill  <jason@redhat.com>
702         PR c++/52746
703         * typeck.c (lookup_destructor): Clear BASELINK_QUALIFIED_P if
704         we didn't get an explicit scope.
705         * pt.c (tsubst_baselink): Likewise.
707 2012-03-28  Richard Guenther  <rguenther@suse.de>
709         * typeck2.c (process_init_constructor_array): Use the proper
710         type for computing the array length.
712 2012-03-27  Meador Inge  <meadori@codesourcery.com>
714         PR c++/52672
715         * semantics.c (cxx_fold_indirect_ref): Don't attempt to fold
716         stripped child trees that are not pointer types.
718 2012-03-21  Jason Merrill  <jason@redhat.com>
720         Implement return type deduction for normal functions with -std=c++1y.
721         * cp-tree.h (FNDECL_USED_AUTO): New macro.
722         (LAMBDA_EXPR_DEDUCE_RETURN_TYPE_P): Remove.
723         (dependent_lambda_return_type_node): Remove.
724         (CPTI_DEPENDENT_LAMBDA_RETURN_TYPE): Remove.
725         (struct language_function): Add x_auto_return_pattern field.
726         (current_function_auto_return_pattern): New.
727         (enum tsubst_flags): Add tf_partial.
728         * decl.c (decls_match): Handle auto return comparison.
729         (duplicate_decls): Adjust error message for auto return.
730         (cxx_init_decl_processing): Remove dependent_lambda_return_type_node.
731         (cp_finish_decl): Don't do auto deduction for functions.
732         (grokdeclarator): Allow auto return without trailing return type in
733         C++1y mode.
734         (check_function_type): Defer checking of deduced return type.
735         (start_preparsed_function): Set current_function_auto_return_pattern.
736         (finish_function): Set deduced return type to void if not previously
737         deduced.
738         * decl2.c (change_return_type): Handle error_mark_node.
739         (mark_used): Always instantiate functions with deduced return type.
740         Complain about use if deduction isn't done.
741         * parser.c (cp_parser_lambda_declarator_opt): Use 'auto' for
742         initial return type.
743         (cp_parser_lambda_body): Don't deduce return type in a template.
744         (cp_parser_conversion_type_id): Allow auto in C++1y.
745         * pt.c (instantiate_class_template_1): Don't mess with
746         LAMBDA_EXPR_DEDUCE_RETURN_TYPE_P.
747         (tsubst_copy_and_build): Likewise.
748         (fn_type_unification, tsubst): Don't reduce the template parm level
749         of 'auto' during deduction.
750         (unify): Compare 'auto' specially.
751         (get_bindings): Change test.
752         (always_instantiate_p): Always instantiate functions with deduced
753         return type.
754         (do_auto_deduction): Handle error_mark_node and lambda context.
755         Don't check for use in initializer.
756         (contains_auto_r): Remove.
757         * search.c (lookup_conversions_r): Handle auto conversion function.
758         * semantics.c (lambda_return_type): Handle null return.  Don't mess
759         with dependent_lambda_return_type_node.
760         (apply_deduced_return_type): Rename from apply_lambda_return_type.
761         * typeck.c (merge_types): Handle auto.
762         (check_return_expr): Do auto deduction.
763         * typeck2.c (add_exception_specifier): Fix complain check.
765 2012-03-22  Paolo Carlini  <paolo.carlini@oracle.com>
767         PR c++/52487
768         * class.c (check_field_decls): Call literal_type_p only
769         on complete types.
771 2012-03-22  Jakub Jelinek  <jakub@redhat.com>
773         PR c++/52671
774         * decl.c (check_tag_decl): Only use CLASSTYPE_TEMPLATE_INSTANTIATION
775         on CLASS_TYPE_P types.
777 2012-03-20  Jason Merrill  <jason@redhat.com>
779         * lex.c (init_reswords): Use >= for cxx_dialect test.
780         * parser.c (cp_parser_exception_specification_opt): Likewise.
782         * mangle.c (write_type): Handle 'auto'.
783         * init.c (build_new): Don't do auto deduction where it might
784         affect template mangling.
786         PR c++/52510
787         * decl.c (reshape_init_class): Handle repeated reshaping.
788         * search.c (lookup_field_1): Add sanity check.
790 2012-03-19  Paolo Carlini  <paolo.carlini@oracle.com>
792         PR c++/14710
793         * cp-tree.h (xvalue_p, maybe_warn_about_useless_cast): Declare.
794         * tree.c (xvalue_p): Define.
795         * typeck.c (maybe_warn_about_useless_cast): Define.
796         (build_reinterpret_cast, build_const_cast,
797         build_static_cast, cp_build_c_cast): Use maybe_warn_about_useless_cast.
798         * rtti.c (build_dynamic_cast): Likewise.
799         * pt.c (tsubst_copy_and_build, case CAST_EXPR): Increment/decrement
800         c_inhibit_evaluation_warnings before/after the build_* calls.
802 2012-03-15  Jason Merrill  <jason@redhat.com>
804         PR c++/52582
805         * method.c (implicitly_declare_fn): Set DECL_EXTERNAL.
807 2012-03-15  Manuel LĂłpez-Ibåñez  <manu@gcc.gnu.org>
809         PR c++/44783
810         * error.c (print_instantiation_partial_context): Use
811         template_backtrace_limit.
813 2012-03-14  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
815         * Make-lang.in (doc/g++.1): Remove IRIX 6.5 reference.
817 2012-03-14  Jakub Jelinek  <jakub@redhat.com>
819         PR c++/52521
820         * parser.c (lookup_literal_operator): Return fn only if
821         processed all arguments from args vector and argtypes is
822         void_list_node.
824 2012-01-30  Dodji Seketeli  <dodji@redhat.com>
826         PR c++/51641
827         * cp-tree.h (template_type_parameter_p): Declare new function.
828         (parameter_of_template_p): Remove.
829         * pt.c (template_type_parameter_p): Define new function.
830         (parameter_of_template_p): Remove.
831         * name-lookup.c (binding_to_template_parms_of_scope_p): Don't rely
832         on parameter_of_template_p anymore.  Compare the level of the
833         template parameter to the depth of the template.
835 2011-12-15  Dodji Seketeli  <dodji@redhat.com>
837         * call.c (standard_conversion, build_integral_nontype_arg_conv)
838         (build_new_op_1, convert_like_real, is_subseq)
839         (maybe_handle_implicit_object, maybe_handle_ref_bind, compare_ics)
840         (joust): Use next_conversion instead of accessing fields of struct
841         conversion directly.
843 2012-03-12  Paolo Carlini  <paolo.carlini@oracle.com>
845         PR c++/52299
846         * pt.c (tsubst_copy_and_build, case COND_EXPR): Avoid bogus
847         division by zero warnings.
849 2012-03-08  Paolo Carlini  <paolo.carlini@oracle.com>
851         * typeck.c (build_array_ref, cp_build_addr_expr_1, convert_ptrmem,
852         build_ptrmemfunc): Consistently forward the tsubst_flags_t
853         parameter.
854         * call.c (resolve_args): Likewise.
856 2012-03-07  Jason Merrill  <jason@redhat.com>
858         PR c++/52521
859         * mangle.c (write_literal_operator_name): The length comes after the
860         operator prefix.
862 2012-03-05  Jakub Jelinek  <jakub@redhat.com>
864         * pt.c (local_specializations): Change from htab_t into
865         struct pointer_map_t *.
866         (retrieve_local_specializations, register_local_specialization,
867         tsubst_pack_expansion, instantiate_decl): Adjust users.
868         (eq_local_specializations, hash_local_specialization): Remove.
870 2012-03-05  Jason Merrill  <jason@redhat.com>
872         PR c++/51930
873         * decl2.c (determine_visibility): Correct calculation of class
874         args depth.
875         * decl.c (check_tag_decl): Adjust warning.
877         * method.c (synthesized_method_walk): Cleanups don't affect the EH
878         spec either.
880 2012-03-03  Jason Merrill  <jason@redhat.com>
882         * init.c (perform_member_init): Cope with uninstantiated NSDMI.
884         Core 1270
885         * call.c (build_aggr_conv): Call reshape_init.
886         (convert_like_real): Likewise.
887         * typeck2.c (process_init_constructor): Clear TREE_CONSTANT if
888         not all constant.
890         * mangle.c (write_nested_name): Use decl_mangling_context.
891         (write_prefix, write_template_prefix): Likewise.
893         PR c++/36797
894         * mangle.c (write_expression): Improve diagnostic for TRAIT_EXPR.
896         * class.c (add_method): Always build an OVERLOAD for using-decls.
897         * search.c (lookup_member): Handle getting an OVERLOAD for a
898         single function.
900 2012-03-02  Paolo Carlini  <paolo.carlini@oracle.com>
902         PR c++/51989
903         * typeck2.c (build_x_arrow): Take a tsubst_flags_t argument and
904         propagate it.
905         * cp-tree.h (build_x_arrow): Adjust prototype.
906         * pt.c (tsubst_copy_and_build): Adjust call.
907         * parser.c (cp_parser_postfix_dot_deref_expression): Likewise.
909 2012-03-02  Paolo Carlini  <paolo.carlini@oracle.com>
911         * name-lookup.c (binding_to_template_parms_of_scope_p): Clean up.
913 2012-02-29  Jason Merrill  <jason@redhat.com>
915         PR c++/51930
916         * decl.c (check_tag_decl): Move warning for misplaced attributes here.
917         (shadow_tag): From here.
918         * parser.c (cp_parser_explicit_instantiation): Don't warn here.
920 2012-02-21  Jakub Jelinek  <jakub@redhat.com>
922         PR c++/52312
923         * typeck.c (check_literal_operator_args): Initialize *long_double_p
924         and *long_long_unsigned_p even if processing_template_decl.
926 2012-02-16  Jason Merrill  <jason@redhat.com>
928         PR c++/52248
929         * decl.c (define_label): Use timevar_cond_start/stop.
931 2012-02-16  Fabien ChĂȘne  <fabien@gcc.gnu.org>
933         PR c++/52126
934         * decl.c (xref_basetypes): call dependent_scope_p instead of
935         dependent_type_p.
937 2012-02-16  Jason Merrill  <jason@redhat.com>
939         PR c++/51415
940         * error.c (dump_expr): Handle lambda closures specifically.
942 2012-02-14  Jason Merrill  <jason@redhat.com>
944         * parser.c (cp_parser_explicit_instantiation): Give a warning
945         for ignored attributes on explicit class instantiation.
947 2012-02-14  Jakub Jelinek  <jakub@redhat.com>
949         PR c++/52247
950         * pt.c (tsubst_copy_asm_operands): For LABEL_DECL values call
951         lookup_label on label's name and set TREE_USED.
953 2012-02-14  Jason Merrill  <jason@redhat.com>
955         PR c++/39055
956         * decl.c (local_variable_p_walkfn): Don't check DECL_ARTIFICIAL.
958 2012-02-14  Jakub Jelinek  <jakub@redhat.com>
960         PR c/52181
961         * decl.c (duplicate_decls): If olddecl has bigger DECL_ALIGN than
962         newdecl, copy DECL_ALIGN to newdecl and or DECL_USER_ALIGN bits.
964 2012-02-07  Jason Merrill  <jason@redhat.com>
966         PR c++/51675
967         * semantics.c (cx_check_missing_mem_inits): Handle unions.
968         Fix constexpr default constructor logic.
970         PR c++/52035
971         * pt.c (tsubst): Strip uninstantiated typedef.
973 2012-02-06  Jason Merrill  <jason@redhat.com>
975         PR c++/52088
976         * cvt.c (build_expr_type_conversion): Check for template conversion.
978 2012-01-31  Jason Merrill  <jason@redhat.com>
980         PR c++/52043
981         * cp-tree.h (PACK_EXPANSION_LOCAL_P): New.
982         * pt.c (make_pack_expansion, tsubst_initializer_list): Set it.
983         (tsubst_pack_expansion): Check it.
985 2012-01-29  Paolo Carlini  <paolo.carlini@oracle.com>
987         PR c++/51327
988         * class.c (explain_non_literal_class): Correctly handle implicitly
989         deleted constructors.
991 2012-01-27  Jakub Jelinek  <jakub@redhat.com>
993         PR c++/51852
994         * pt.c (tsubst_pack_expansion): Delete and restore
995         local_specialization whenever need_local_specialization, not just
996         when saved_local_specializations is non-NULL.
998 2012-01-26  Paolo Carlini  <paolo.carlini@oracle.com>
1000         PR c++/51370
1001         * error.c (dump_decl, [TEMPLATE_ID_EXPR]): Handle error_mark_node
1002         as TREE_OPERAND (t, 1).
1004 2012-01-24  Jason Merrill  <jason@redhat.com>
1006         PR c++/51917
1007         * decl.c (xref_basetypes): Check VEC_length instead of VEC_space.
1009         PR c++/51973
1010         * tree.c (called_fns_equal): Check template args.
1011         (cp_tree_equal): Call it.
1013 2012-01-24  Aldy Hernandez  <aldyh@redhat.com>
1014             Patrick Marlier  <patrick.marlier@gmail.com>
1016         PR c++/51928
1017         * class.c (set_method_tm_attributes): Use TARGET_THUNK instead of
1018         thunk for set_one_vmethod_tm_attributes.
1020 2012-01-24  Paolo Carlini  <paolo.carlini@oracle.com>
1022         PR c++/51223
1023         * call.c (build_over_call): Check for error_mark_node as
1024         TREE_VALUE when default arguments are processed.
1026 2012-01-23  Jason Merrill  <jason@redhat.com>
1028         PR c++/51930
1029         * decl2.c (determine_visibility): Check for visibility attribute
1030         on template specialization.
1032 2012-01-23  Paolo Carlini  <paolo.carlini@oracle.com>
1034         PR c++/51398
1035         * pt.c (parameter_of_template_p): Skip error_mark_node parameters.
1037 2012-01-23  Jason Merrill  <jason@redhat.com>
1039         PR c++/51925
1040         * class.c (add_method): Set OVL_USED for using-decls.
1041         * tree.c (ovl_scope): New.
1042         * cp-tree.h: Declare it.
1043         * parser.c (cp_parser_template_name): Use it.
1044         * semantics.c (baselink_for_fns): Likewise.
1045         * name-lookup.c (set_inherited_value_binding_p): Likewise.
1047 2012-01-20  Paolo Carlini  <paolo.carlini@oracle.com>
1049         PR c++/51402
1050         * pt.c (lookup_template_class_1): Check context returned by
1051         tsubst for error_mark_node.
1053 2012-01-19  Kai Tietz  <ktietz@redhat.com>
1055         PR c++/51344
1056         * decl2.c (save_template_attributes): Use merge_attributes
1057         instead of chaining up via TREE_CHAIN.
1059 2012-01-19  Jason Merrill  <jason@redhat.com>
1061         PR c++/51889
1062         * class.c (finish_struct): Call add_method here for function usings.
1063         * semantics.c (finish_member_declaration): Not here.
1065 2012-01-18  Paolo Carlini  <paolo.carlini@oracle.com>
1067         PR c++/51225
1068         * typeck2.c (store_init_value): Within a template guard
1069         cxx_constant_value with require_potential_constant_expression.
1070         * pt.c (convert_nontype_argument): Likewise.
1072 2012-01-16  Jakub Jelinek  <jakub@redhat.com>
1074         PR c++/51854
1075         * mangle.c (write_template_arg_literal): Handle complex.
1077 2012-01-16  Jason Merrill  <jason@redhat.com>
1079         PR c++/51827
1080         * mangle.c (mangle_decl): Don't mangle uninstantiated templates.
1082         PR c++/51868
1083         * typeck.c (build_static_cast_1): Handle bit-fields properly.
1085 2012-01-13  Ian Lance Taylor  <iant@google.com>
1087         PR c++/50012
1088         * typeck.c (enum_cast_to_int): New static function.
1089         (cp_build_binary_op): When handling warn_sign_compare, don't test
1090         for TREE_NO_WARNING.  Do call enum_cast_to_int.
1091         * call.c (avoid_sign_compare_warnings): Remove static function.
1092         (build_new_op_1): Don't call avoid_sign_compare_warnings.
1094 2012-01-13  Steven Bosscher  <steven@gcc.gnu.org>
1096         * decl2.c: Do not include tree-mudflap.h
1097         * semantics.c: Likewise.
1099 2012-01-13  Jason Merrill  <jason@redhat.com>
1101         PR c++/20681
1102         * semantics.c (finish_break_stmt): Avoid adding an unreachable
1103         BREAK_STMT.
1105         PR c++/51813
1106         * decl2.c (constrain_visibility): Clear DECL_VISIBILITY_SPECIFIED
1107         when reducing the visibility.
1109         PR c++/51620
1110         * class.c (build_vtbl_initializer): Use __cxa_deleted_virtual.
1112 2012-01-12  Jason Merrill  <jason@redhat.com>
1114         PR c++/51714
1115         * pt.c (value_dependent_expression_p): Treat STMT_EXPR as
1116         value-dependent.
1118 2012-01-13  Dodji Seketeli  <dodji@redhat.com>
1120         PR c++/51633
1121         * semantics.c (cp_parser_ctor_initializer_opt_and_function_body):
1122         Set the pointer to the last block of the constructor to the
1123         current statement.
1124         (build_constexpr_constructor_member_initializers): Get
1125         build_data_member_initialization a chance to deal with more
1126         statements before we choke.
1128 2012-01-12  Jason Merrill  <jason@redhat.com>
1130         PR c++/48051
1131         * mangle.c (write_expression): Mangle BASELINK scope if
1132         BASELINK_QUALIFIED_P.
1133         * search.c (adjust_result_of_qualified_name_lookup): Set
1134         BASELINK_QUALIFIED_P.
1135         * tree.c (cp_tree_equal) [BASELINK]: Compare BASELINK_QUALIFIED_P.
1136         * parser.c (cp_parser_postfix_dot_deref_expression): Don't call
1137         adjust_result_of_qualified_name_lookup for non-qualified names.
1139         PR c++/51403
1140         * pt.c (unify): Handle error_mark_node.
1142 2012-01-11  Jason Merrill  <jason@redhat.com>
1144         PR c++/51565
1145         * call.c (standard_conversion): For ptrmemfuncs, compare the
1146         static_fn_types.
1148         PR c++/51818
1149         * mangle.c (find_substitution): A type is only a substitution
1150         match if we're looking for a type.
1151         (write_nested_name): Use decl_mangling_context.
1153         * decl.c (decls_match): Assert that the arguments are decls.
1155         PR c++/51613
1156         * pt.c (resolve_overloaded_unification): Compare types with
1157         same_type_p, not decls_match.
1159 2012-01-10  Jason Merrill  <jason@redhat.com>
1161         PR c++/51614
1162         * class.c (build_base_path): Diagnose ambiguous base.
1164         PR c++/51433
1165         * semantics.c (cxx_eval_call_expression): Always retry previously
1166         non-constant expressions.
1168 2012-01-06  Jason Merrill  <jason@redhat.com>
1170         DR 686
1171         PR c++/47450
1172         * parser.c (cp_parser_new_expression): Set
1173         type_definition_forbidden_message.
1175         PR c++/6057
1176         PR c++/48051
1177         PR c++/50855
1178         PR c++/51322
1179         * mangle.c (write_expression): Support NEW_EXPR, DELETE_EXPR,
1180         THROW_EXPR, CONSTRUCTOR, OVERLOAD.  Fix PREINCREMENT_EXPR and
1181         PREDECREMENT_EXPR.
1182         (write_template_arg): Fix mangling of class-scope functions and
1183         argument packs.
1184         (mangle_decl): Update suggested -fabi-version argument.
1185         * operators.def: Add DOTSTAR_EXPR, REINTERPRET_CAST_EXPR,
1186         DYNAMIC_CAST_EXPR; correct CONST_CAST_EXPR, STATIC_CAST_EXPR.
1187         * tree.c (dependent_name): No longer static.
1188         * cp-tree.h: Declare it.
1189         * pt.c (unify): Defer handling of unconverted functions.
1191         * mangle.c (mangle_decl): Don't generate mangling aliases
1192         for maybe-in-charge [cd]tors.
1194         * error.c (dump_expr): Print type of CONSTRUCTOR.
1196 2012-01-05  Dodji Seketeli  <dodji@redhat.com>
1198         PR c++/51541
1199         * parser.c (cp_parser_alias_declaration): Get out early upon
1200         errors in the identifier or the attributes.
1202 2012-01-04  Paolo Carlini  <paolo.carlini@oracle.com>
1204         PR c++/51064
1205         * pt.c (tsubst_copy_and_build): Maybe set TREE_NO_WARNING on
1206         the tree returned by build_x_binary_op.
1208 2012-01-03  Paolo Carlini  <paolo.carlini@oracle.com>
1210         PR c++/51738
1211         * parser.c (cp_parser_postfix_open_square_expression): Handle
1212         postfix-expression [ braced-init-list ].
1214 2012-01-03  Paolo Carlini  <paolo.carlini@oracle.com>
1216         PR c++/29273
1217         * rtti.c (build_dynamic_cast_1): In case of T a pointer type,
1218         call decay_conversion on v.
1220 2012-01-03  Paolo Carlini  <paolo.carlini@oracle.com>
1222         PR c++/15867
1223         * decl.c (duplicate_decls): With -Wredundant-decls don't warn for
1224         declaration followed by specialization.
1226 2012-01-03  Jakub Jelinek  <jakub@redhat.com>
1228         PR c++/51669
1229         * semantics.c (finish_omp_clauses): Call fold_build_cleanup_point_expr
1230         on OMP_CLAUSE_{IF,FINAL,NUM_THREADS,SCHEDULE_CHUNK}_EXPR.
1232 2012-01-02  Jason Merrill  <jason@redhat.com>
1234         DR 1359
1235         PR c++/51675
1236         * method.c (walk_field_subobs): Don't check for uninitialized
1237         fields in a union.
1238         (synthesized_method_walk): Check here.
1240         DR 325
1241         PR c++/51666
1242         * parser.c (cp_parser_cache_defarg): Split out...
1243         (cp_parser_parameter_declaration): ...from here.
1244         (cp_parser_save_nsdmi): Use it.
1245         (cp_parser_cache_group): Remove CPP_COMMA support.
1247 2012-01-02  Dodji Seketeli  <dodji@redhat.com>
1249         PR c++/51462
1250         * semantics.c (cx_check_missing_mem_inits): Don't assert in case
1251         of error.
1253 2012-01-02  Paolo Carlini  <paolo.carlini@oracle.com>
1255         PR c++/20140
1256         * typeck2.c (digest_init_r): Use copy_init when initializing
1257         an array of chars.
1259 2012-01-01  Paolo Carlini  <paolo.carlini@oracle.com>
1261         PR c++/16603
1262         * decl.c (build_enumerator): Don't call perform_integral_promotions
1263         on the value.
1265 2012-01-01  Paolo Carlini  <paolo.carlini@oracle.com>
1267         PR c++/51379
1268         * typeck.c (build_reinterpret_cast_1): Implement resolution of
1269         DR 799.
1271 2012-01-01  Fabien ChĂȘne  <fabien@gcc.gnu.org>
1273         * parser.c (cp_parser_using_declaration): Add a warning about
1274         deprecated access declarations when no errors were encountered
1275         while parsing the access declaration. Save the first token in
1276         order to emit the warning at the right place.
1278 Copyright (C) 2012 Free Software Foundation, Inc.
1280 Copying and distribution of this file, with or without modification,
1281 are permitted in any medium without royalty provided the copyright
1282 notice and this notice are preserved.