PR c++/53209
[official-gcc.git] / gcc / cp / ChangeLog
bloba36aaf6508d6c00370573e988aaa57d910bb8e25
1 2012-05-11  Alexandre Oliva  <aoliva@redhat.com>
3         PR c++/53209
4         * pt.c (tsubst_decl): Bail out if argvec is error_mark_node.
6 2012-05-11  Paolo Carlini  <paolo.carlini@oracle.com>
8         PR c++/53305
9         * pt.c (tsubst_copy: case PARM_DECL): Return error_mark_node if
10         tsubst_decl returns NULL_TREE.
11         * cxx-pretty-print.c (pp_cxx_simple_type_specifier): Handle
12         BOUND_TEMPLATE_TEMPLATE_PARM.
14 2012-05-10  Paolo Carlini  <paolo.carlini@oracle.com>
16         PR c++/53158
17         * cvt.c (ocp_convert): Error out early for void -> bool conversions.
18         * typeck.c (decay_conversion): Use error_at.
19         * call.c (build_integral_nontype_arg_conv, convert_like_real,
20         convert_arg_to_ellipsis, perform_implicit_conversion_flags,
21         initialize_reference): Likewise.
22         * cvt.c (warn_ref_binding): Add location_t parameter.
23         (cp_convert_to_pointer, convert_to_reference, ocp_convert,
24         convert_to_void, ): Use error_at and warning_at.
26 2012-05-10  Paolo Carlini  <paolo.carlini@oracle.com>
28         PR c++/53301
29         * decl.c (check_default_argument): Fix typo (POINTER_TYPE_P
30         instead of TYPE_PTR_P) in zero-as-null-pointer-constant warning.
32 2012-05-06  Paolo Carlini  <paolo.carlini@oracle.com>
34         PR c++/53152
35         * call.c (op_error, build_new_op_1, build_new_op): Add location_t
36         parameter.
37         (build_conditional_expr_1): Adjust.
38         * typeck.c (build_x_indirect_ref, build_x_binary_op,
39         build_x_unary_op): Add location_t parameter.
40         (rationalize_conditional_expr, build_x_array_ref,
41         build_x_compound_expr, cp_build_modify_expr, build_x_modify_expr):
42         Adjust.
43         * typeck2.c (build_x_arrow): Add location_t parameter.
44         * semantics.c (finish_unary_op_expr): Likewise.
45         (finish_increment_expr, handle_omp_for_class_iterator): Adjust.
46         * decl2.c (grok_array_decl): Add location_t parameter.
47         * parser.c (cp_parser_postfix_open_square_expression,
48         cp_parser_postfix_dot_deref_expression, cp_parser_unary_expression,
49         cp_parser_binary_expression, cp_parser_builtin_offsetof,
50         do_range_for_auto_deduction, cp_convert_range_for,
51         cp_parser_template_argument, cp_parser_omp_for_cond): Pass the
52         location, adjust.
53         * pt.c (tsubst_copy_and_build): Adjust.
54         * tree.c (maybe_dummy_object): Likewise.
55         * cp-tree.h: Update declarations.
57 2012-05-04  Paolo Carlini  <paolo.carlini@oracle.com>
59         * semantics.c (cxx_eval_constant_expression, case CONVERT_EXPR): Tidy.
61 2012-05-04  Paolo Carlini  <paolo.carlini@oracle.com>
63         PR c++/53166
64         * pt.c (instantiate_class_template_1): Increase / decrease
65         c_inhibit_evaluation_warnings around the tsubst_expr call
66         for STATIC_ASSERT_CONDITION.
67         (tsubst_expr, case STATIC_ASSERT): Likewise.
68         * typeck.c (cp_build_binary_op, case EQ_EXPR/NE_EXPR): Check
69         c_inhibit_evaluation_warnings in the OPT_Waddress warnings.
71 2012-05-03  Paolo Carlini  <paolo.carlini@oracle.com>
73         PR c++/53186
74         * call.c (build_over_call): Handle final member functions
75         and class types.
76         (build_new_method_call_1): Do not handle here.
78 2012-05-02  Richard Guenther  <rguenther@suse.de>
80         * decl.c (grokdeclarator): Properly check for sizes that
81         cover more than half of the address-space.
83 2012-04-30  Marc Glisse  <marc.glisse@inria.fr>
85         PR c++/51033
86         * typeck.c (cp_build_array_ref): Handle VECTOR_TYPE.
87         * decl2.c (grok_array_decl): Likewise.
89         PR c++/51314
90         * parser.c (cp_parser_sizeof_operand): Require parentheses for
91         sizeof...
93 2012-04-30  Dodji Seketeli  <dodji@redhat.com>
95         Fix location for static class members
96         * decl.c (grokdeclarator): Use the location carried by the
97         declarator for the DECL of the static class member.
99         Fix va_arg type location
100         * cp-tree.h (build_x_va_arg): Take an additional location
101         parameter.
102         * call.c (build_x_va_arg): Take a loc parameter for the location
103         of the type of the va_arg expression.
104         * parser.c (cp_parser_primary_expression): Pass the type of the
105         type in the va_arg expression to build_x_va_arg.
106         * pt.c (tsubst_copy): Adjust calls to build_x_va_arg.
108         Make conversion warnings work on NULL with -ftrack-macro-expansion
109         * call.c (conversion_null_warnings): Use the new
110         expansion_point_location_if_in_system_header.
111         * cvt.c (build_expr_type_conversion): Likewise.
112         * typeck.c (cp_build_binary_op): Likewise.
114 2012-04-30  Manuel López-Ibáñez  <manu@gcc.gnu.org>
116         * typeck.c (convert_for_assignment):  Replace
117         Wmissing-format-attribute with Wsuggest-attribute=format.
118         * call.c (convert_for_arg_passing): Likewise.
120 2012-04-26  Paolo Carlini  <paolo.carlini@oracle.com>
122         PR c++/53096
123         * class.c (check_bases_and_members): Implement core/1333, do not
124         disallow defaulted in the class body non-const ref special members.
126 2012-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
128         PR c++/52363
129         * call.c (tourney, perform_overload_resolution,
130         build_operator_new_call, build_user_type_conversion_1,
131         build_user_type_conversion, perform_overload_resolution,
132         add_template_candidate, add_template_candidate_real,
133         add_template_conv_candidate, add_builtin_candidates,
134         add_builtin_candidate, build_builtin_candidate,
135         add_conv_candidate, add_function_candidate, implicit_conversion,
136         reference_binding, build_list_conv, conditional_conversion,
137         add_candidates, can_convert_array, build_aggr_conv,
138         build_array_conv, build_complex_conv, conditional_conversion):
139         Add tsubst_flags_t parameter.
140         (joust): Likewise, use it to handle SFINAE as if pedantic.
141         (add_list_candidates, build_integral_nontype_arg_conv,
142         perform_overload_resolution, build_new_function_call,
143         build_operator_new_call, build_op_call_1,
144         build_conditional_expr_1, build_new_op_1, convert_like_real,
145         convert_arg_to_ellipsis, convert_default_arg,
146         convert_for_arg_passing, build_over_call,
147         build_new_method_call_1, can_convert_arg, can_convert_arg_bad,
148         perform_implicit_conversion_flags,
149         perform_direct_initialization_if_possible,
150         initialize_reference): Adjust.
151         * typeck.c (casts_away_constness, casts_away_constness_r):
152         Add tsubst_flags_t parameter.
153         (convert_arguments, check_for_casting_away_constness,
154         build_static_cast_1, build_ptrmemfunc, convert_for_assignment):
155         Adjust.
156         * decl.c (reshape_init_r, check_default_argument): Likewise.
157         * cp-gimplify.c (cxx_omp_clause_apply_fn): Likewise.
158         * pt.c (convert_nontype_argument, check_non_deducible_conversion):
159         Likewise.
160         * init.c (build_new_1): Likewise.
161         * cvt.c (convert_to_reference, ocp_convert, build_type_conversion,
162         build_expr_type_conversion, ): Likewise.
163         * search.c (check_final_overrider): Likewise.
164         * cp-tree.h (build_user_type_conversion,
165         build_operator_new_call, can_convert, can_convert_arg,
166         can_convert_arg_bad, convert_default_arg,
167         convert_arg_to_ellipsis, convert_for_arg_passing):
168         Adjust declaration.
170 2012-04-22  Jan Hubicka  <jh@suse.cz>
172         * decl2.c (maybe_make_one_only): Mark keyed COMDATs as USED so they
173         gets finalized.
175 2012-04-22  Manuel López-Ibáñez  <manu@gcc.gnu.org>
177         PR c/44774
178         * typeck.c (composite_pointer_type): Likewise.
179         (cxx_sizeof_or_alignof_type): Likewise.
180         (cp_build_array_ref): Likewise.
181         (cp_build_function_call_vec): Likewise.
182         (cp_build_addr_expr_1): Likewise.
183         (convert_member_func_to_ptr): Likewise.
184         * decl.c (check_tag_decl): Likewise.
185         (check_static_variable_definition): Likewise.
186         (compute_array_index_type): Likewise.
187         (create_array_type_for_decl): Likewise.
188         (grokdeclarator): Likewise.
189         (grok_op_properties): Likewise.
190         * error.c (maybe_warn_cpp0x): Likewise.
191         * pt.c (maybe_process_partial_specialization): Likewise.
192         (convert_template_argument): Likewise.
193         (do_decl_instantiation): Likewise.
194         (do_type_instantiation): Likewise.
195         * parser.c (cp_parser_primary_expression): Likewise.
196         (cp_parser_postfix_expression): Likewise.
197         (cp_parser_unary_expression): Likewise.
198         (cp_parser_question_colon_clause): Likewise.
199         (cp_parser_lambda_introducer): Likewise.
200         (cp_parser_lambda_declarator_opt): Likewise.
201         (cp_parser_compound_statement): Likewise.
202         (cp_parser_jump_statement): Likewise.
203         (cp_parser_declaration_seq_opt): Likewise.
204         (cp_parser_enum_specifier): Likewise.
205         (cp_parser_enumerator_list): Likewise.
206         (cp_parser_initializer_list): Likewise.
207         (cp_parser_member_declaration): Likewise.
208         * call.c (build_conditional_expr_1): Likewise.
209         * friend.c (make_friend_class): Likewise.
210         * name-lookup.c (pushdecl_maybe_friend_1): Likewise.
212 2012-04-21  Jan Hubicka  <jh@suse.cz>
214         * method.c (make_alias_for): Do not set TREE_SYMBOL_REFERENCED.
215         * decl2.c (mark_needed): Likewise.
216         (decl_needed_p): Do not test TREE_SYMBOL_REFERENCED.
218         * decl2.c (cxx_callgraph_analyze_expr): Remove.
219         * cp-objcp-common.h (LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR): Remove.
220         * cp-tree.h (cxx_callgraph_analyze_expr): Remove.
222 2012-04-21  Manuel López-Ibáñez  <manu@gcc.gnu.org>
224         PR 35441
225         * typeck.c (cp_build_function_call_vec): Do not pretty-print
226         expressions when caret is enabled.
228 2012-04-20  Jan Hubicka  <jh@suse.cz>
230         PR target/53042
231         * decl2.c (maybe_emit_vtables): Do not initialize same_comdat_group
232         list when target has no support for it.
234 2012-04-20  Michael Matz  <matz@suse.de>
236         * error.c (pedwarn_cxx98): Move va_end call after user
237         of the va_list.
239 2012-04-18  Paolo Carlini  <paolo.carlini@oracle.com>
241         PR c++/52422
242         * cp-tree.h (build_addr_func, decay_conversion,
243         get_member_function_from_ptrfunc,
244         build_m_component_ref, convert_member_func_to_ptr):
245         Add tsubst_flags_t parameter.
246         * typeck.c (cp_default_conversion): Add.
247         (decay_conversion, default_conversion,
248         get_member_function_from_ptrfunc, convert_member_func_to_ptr):
249         Add tsubst_flags_t parameter and use it throughout.
250         (cp_build_indirect_ref, cp_build_array_ref,
251         cp_build_function_call_vec, convert_arguments, build_x_binary_op,
252         cp_build_binary_op, cp_build_unary_op, build_reinterpret_cast_1,
253         build_const_cast_1, expand_ptrmemfunc_cst,
254         convert_for_initialization): Adjust.
255         * init.c (build_vec_init): Adjust.
256         * decl.c (grok_reference_init, get_atexit_node): Likewise.
257         * rtti.c (build_dynamic_cast_1, tinfo_base_init): Likewise.
258         * except.c (build_throw): Likewise.
259         * typeck2.c (build_x_arrow): Likewise.
260         (build_m_component_ref): Add tsubst_flags_t parameter and
261         use it throughout.
262         * pt.c (convert_nontype_argument): Adjust.
263         * semantics.c (finish_asm_stmt, maybe_add_lambda_conv_op): Likewise.
264         * decl2.c (build_offset_ref_call_from_tree): Likewise.
265         * call.c (build_addr_func): Add tsubst_flags_t parameter and
266         use it throughout.
267         (build_call_a, build_conditional_expr_1, build_new_op_1,
268         convert_like_real, convert_arg_to_ellipsis, build_over_call,
269         build_special_member_call): Adjust.
270         * cvt.c (cp_convert_to_pointer, force_rvalue,
271         build_expr_type_conversion): Likewise.
273 2012-04-17  Tom de Vries  <tom@codesourcery.com>
275         * cp-gimplify.c (begin_bc_block): Add location parameter and use as
276         location argument to create_artificial_label.
277         (finish_bc_block): Change return type to void.  Remove body_seq
278         parameter, and add block parameter.  Append label to STMT_LIST and
279         return in block.
280         (gimplify_cp_loop, gimplify_for_stmt, gimplify_while_stmt)
281         (gimplify_do_stmt, gimplify_switch_stmt): Remove function.
282         (genericize_cp_loop, genericize_for_stmt, genericize_while_stmt)
283         (genericize_do_stmt, genericize_switch_stmt, genericize_continue_stmt)
284         (genericize_break_stmt, genericize_omp_for_stmt): New function.
285         (cp_gimplify_omp_for): Remove bc_continue processing.
286         (cp_gimplify_expr): Genericize VEC_INIT_EXPR.
287         (cp_gimplify_expr): Mark FOR_STMT, WHILE_STMT, DO_STMT, SWITCH_STMT,
288         CONTINUE_STMT, and BREAK_STMT as unreachable.
289         (cp_genericize_r): Genericize FOR_STMT, WHILE_STMT, DO_STMT,
290         SWITCH_STMT, CONTINUE_STMT, BREAK_STMT and OMP_FOR.
291         (cp_genericize_tree): New function, factored out of ...
292         (cp_genericize): ... this function.
294 2012-04-17  Paolo Carlini  <paolo.carlini@oracle.com>
296         PR c++/52599
297         * semantics.c (build_constexpr_constructor_member_initializers):
298         Check for function-try-block as function-body.
300 2012-04-17  Paolo Carlini  <paolo.carlini@oracle.com>
302         PR c++/53003
303         * parser.c (cp_parser_member_declaration): Check that
304         initializer_token_start is non null before dereferencing it.
306 2012-04-16  Jason Merrill  <jason@redhat.com>
308         PR c++/38543
309         * pt.c (determine_specialization): Instead of comparing the number
310         of parms, check that tsubst gives the right answer.
312         PR c++/52008
313         * pt.c (process_partial_specialization): Complain about a partial
314         specialization with fewer args than primary template parms.
316         PR c++/50830
317         * pt.c (convert_template_argument): Handle template template
318         argument packs.
320         PR c++/50303
321         * pt.c (tsubst_pack_expansion): Use tsubst_expr for template
322         template parameters.
324 2012-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
326         PR c++/49152
327         * call.c (op_error): Print types; when flag_diagnostics_show_caret
328         is false print expressions too.
329         (op_error_string): Add.
331 2012-04-16  Jason Merrill  <jason@redhat.com>
333         PR c++/51148
334         * friend.c (make_friend_class): Call check_for_bare_parameter_packs.
336 2012-04-16  Jan Hubicka  <jh@suse.cz>
338         * decl2.c (collect_candidates_for_java_method_alias): Use FOR_EACH
339         walkers to walk cgraph and varpool.
341 2012-04-15  Jason Merrill  <jason@redhat.com>
343         PR c++/47220
344         * pt.c (coerce_template_parameter_pack): Check for error_mark_node.
346         PR c++/52292
347         PR c++/52380
348         * pt.c (coerce_template_parms): Even if we aren't converting we
349         want to expand argument packs.
351         PR c++/52706
352         * mangle.c (write_type): nullptr_t is a builtin type.
354 2012-04-14  Jan Hubicka  <jh@suse.cz>
356         * tree.c: Update field referenced for new cgraph/varpool layout.
357         * decl2.c: Likewise.
359 2012-04-13  Jason Merrill  <jason@redhat.com>
361         PR c++/52824
362         * pt.c (any_pack_expanson_args_p): New.
363         (coerce_template_parms): Use it.
365         PR c++/52905
366         * call.c (joust): Handle comparing list and non-list ctors.
368         PR c++/52915
369         * decl2.c (finish_anon_union): Use cp_finish_decl.
370         * error.c (dump_function_name): Avoid showing anonymous "name".
372 2012-04-11  Fabien Chêne  <fabien@gcc.gnu.org>
374         PR c++/52465
375         * parser.c (cp_parser_class_name): Call strip_using_decl and
376         return the target decl.
377         * name-lookup.c (strip_using_decl): Returns NULL_TREE if the decl
378         to be stripped is NULL_TREE.
379         (qualify_lookup): Call strip_using_decl and perform some checks on
380         the target decl.
382 2012-04-11  Jason Merrill  <jason@redhat.com>
384         PR debug/45088
385         * decl.c (grokdeclarator): Strip the injected-class-name typedef
386         if we are building a declaration or compound type.
388         PR c++/52906
389         * decl.c (check_tag_decl): Don't complain about attributes if we
390         don't even have a type.
392 2012-04-10  Manuel López-Ibáñez  <manu@gcc.gnu.org>
394         * cvt.c (convert_to_void): Update comment.
396 2012-04-05  Jason Merrill  <jason@redhat.com>
398         PR c++/52596
399         * semantics.c (finish_non_static_data_member): In templates, pass
400         the decl to build_qualified_name.
401         * tree.c (lvalue_kind) [SCOPE_REF]: Handle FIELD_DECL.
403 2012-04-04  Jason Merrill  <jason@redhat.com>
405         PR c++/52845
406         * decl.c (finish_function): Update fntype after deducing return type.
408 2012-04-03  Jason Merrill  <jason@redhat.com>
410         PR c++/52796
411         * pt.c (tsubst_initializer_list): A pack expansion with no elements
412         means value-initialization.
414 2012-04-01  Paolo Carlini  <paolo.carlini@oracle.com>
416         PR c++/50043
417         * class.c (deduce_noexcept_on_destructor,
418         deduce_noexcept_on_destructors): New.
419         (check_bases_and_members): Call the latter.
420         * decl.c (grokfndecl): Call the former.
421         * method.c (implicitly_declare_fn): Not static.
422         * cp-tree.h (deduce_noexcept_on_destructor, implicitly_declare_fn):
423         Declare
425 2012-03-29  Paolo Carlini  <paolo.carlini@oracle.com>
427         PR c++/52718
428         * decl.c (check_default_argument): With -Wzero-as-null-pointer-constant
429         warn for a zero as null pointer constant default argument.
431 2012-03-29  Jason Merrill  <jason@redhat.com>
433         PR c++/52685
434         * tree.c (copy_binfo): Handle BINFO_DEPENDENT_BASE_P.
436 2012-03-29  Jakub Jelinek  <jakub@redhat.com>
438         PR c++/52759
439         * decl.c (start_decl): Don't call maybe_apply_pragma_weak
440         if processing_template_decl.
442 2012-03-29  Jason Merrill  <jason@redhat.com>
444         PR c++/52743
445         * call.c (compare_ics): Handle ck_aggr like ck_list.
447 2012-03-28  Jason Merrill  <jason@redhat.com>
449         PR c++/52746
450         * typeck.c (lookup_destructor): Clear BASELINK_QUALIFIED_P if
451         we didn't get an explicit scope.
452         * pt.c (tsubst_baselink): Likewise.
454 2012-03-28  Richard Guenther  <rguenther@suse.de>
456         * typeck2.c (process_init_constructor_array): Use the proper
457         type for computing the array length.
459 2012-03-27  Meador Inge  <meadori@codesourcery.com>
461         PR c++/52672
462         * semantics.c (cxx_fold_indirect_ref): Don't attempt to fold
463         stripped child trees that are not pointer types.
465 2012-03-21  Jason Merrill  <jason@redhat.com>
467         Implement return type deduction for normal functions with -std=c++1y.
468         * cp-tree.h (FNDECL_USED_AUTO): New macro.
469         (LAMBDA_EXPR_DEDUCE_RETURN_TYPE_P): Remove.
470         (dependent_lambda_return_type_node): Remove.
471         (CPTI_DEPENDENT_LAMBDA_RETURN_TYPE): Remove.
472         (struct language_function): Add x_auto_return_pattern field.
473         (current_function_auto_return_pattern): New.
474         (enum tsubst_flags): Add tf_partial.
475         * decl.c (decls_match): Handle auto return comparison.
476         (duplicate_decls): Adjust error message for auto return.
477         (cxx_init_decl_processing): Remove dependent_lambda_return_type_node.
478         (cp_finish_decl): Don't do auto deduction for functions.
479         (grokdeclarator): Allow auto return without trailing return type in
480         C++1y mode.
481         (check_function_type): Defer checking of deduced return type.
482         (start_preparsed_function): Set current_function_auto_return_pattern.
483         (finish_function): Set deduced return type to void if not previously
484         deduced.
485         * decl2.c (change_return_type): Handle error_mark_node.
486         (mark_used): Always instantiate functions with deduced return type.
487         Complain about use if deduction isn't done.
488         * parser.c (cp_parser_lambda_declarator_opt): Use 'auto' for
489         initial return type.
490         (cp_parser_lambda_body): Don't deduce return type in a template.
491         (cp_parser_conversion_type_id): Allow auto in C++1y.
492         * pt.c (instantiate_class_template_1): Don't mess with
493         LAMBDA_EXPR_DEDUCE_RETURN_TYPE_P.
494         (tsubst_copy_and_build): Likewise.
495         (fn_type_unification, tsubst): Don't reduce the template parm level
496         of 'auto' during deduction.
497         (unify): Compare 'auto' specially.
498         (get_bindings): Change test.
499         (always_instantiate_p): Always instantiate functions with deduced
500         return type.
501         (do_auto_deduction): Handle error_mark_node and lambda context.
502         Don't check for use in initializer.
503         (contains_auto_r): Remove.
504         * search.c (lookup_conversions_r): Handle auto conversion function.
505         * semantics.c (lambda_return_type): Handle null return.  Don't mess
506         with dependent_lambda_return_type_node.
507         (apply_deduced_return_type): Rename from apply_lambda_return_type.
508         * typeck.c (merge_types): Handle auto.
509         (check_return_expr): Do auto deduction.
510         * typeck2.c (add_exception_specifier): Fix complain check.
512 2012-03-22  Paolo Carlini  <paolo.carlini@oracle.com>
514         PR c++/52487
515         * class.c (check_field_decls): Call literal_type_p only
516         on complete types.
518 2012-03-22  Jakub Jelinek  <jakub@redhat.com>
520         PR c++/52671
521         * decl.c (check_tag_decl): Only use CLASSTYPE_TEMPLATE_INSTANTIATION
522         on CLASS_TYPE_P types.
524 2012-03-20  Jason Merrill  <jason@redhat.com>
526         * lex.c (init_reswords): Use >= for cxx_dialect test.
527         * parser.c (cp_parser_exception_specification_opt): Likewise.
529         * mangle.c (write_type): Handle 'auto'.
530         * init.c (build_new): Don't do auto deduction where it might
531         affect template mangling.
533         PR c++/52510
534         * decl.c (reshape_init_class): Handle repeated reshaping.
535         * search.c (lookup_field_1): Add sanity check.
537 2012-03-19  Paolo Carlini  <paolo.carlini@oracle.com>
539         PR c++/14710
540         * cp-tree.h (xvalue_p, maybe_warn_about_useless_cast): Declare.
541         * tree.c (xvalue_p): Define.
542         * typeck.c (maybe_warn_about_useless_cast): Define.
543         (build_reinterpret_cast, build_const_cast,
544         build_static_cast, cp_build_c_cast): Use maybe_warn_about_useless_cast.
545         * rtti.c (build_dynamic_cast): Likewise.
546         * pt.c (tsubst_copy_and_build, case CAST_EXPR): Increment/decrement
547         c_inhibit_evaluation_warnings before/after the build_* calls.
549 2012-03-15  Jason Merrill  <jason@redhat.com>
551         PR c++/52582
552         * method.c (implicitly_declare_fn): Set DECL_EXTERNAL.
554 2012-03-15  Manuel López-Ibáñez  <manu@gcc.gnu.org>
556         PR c++/44783
557         * error.c (print_instantiation_partial_context): Use
558         template_backtrace_limit.
560 2012-03-14  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
562         * Make-lang.in (doc/g++.1): Remove IRIX 6.5 reference.
564 2012-03-14  Jakub Jelinek  <jakub@redhat.com>
566         PR c++/52521
567         * parser.c (lookup_literal_operator): Return fn only if
568         processed all arguments from args vector and argtypes is
569         void_list_node.
571 2012-01-30  Dodji Seketeli  <dodji@redhat.com>
573         PR c++/51641
574         * cp-tree.h (template_type_parameter_p): Declare new function.
575         (parameter_of_template_p): Remove.
576         * pt.c (template_type_parameter_p): Define new function.
577         (parameter_of_template_p): Remove.
578         * name-lookup.c (binding_to_template_parms_of_scope_p): Don't rely
579         on parameter_of_template_p anymore.  Compare the level of the
580         template parameter to the depth of the template.
582 2011-12-15  Dodji Seketeli  <dodji@redhat.com>
584         * call.c (standard_conversion, build_integral_nontype_arg_conv)
585         (build_new_op_1, convert_like_real, is_subseq)
586         (maybe_handle_implicit_object, maybe_handle_ref_bind, compare_ics)
587         (joust): Use next_conversion instead of accessing fields of struct
588         conversion directly.
590 2012-03-12  Paolo Carlini  <paolo.carlini@oracle.com>
592         PR c++/52299
593         * pt.c (tsubst_copy_and_build, case COND_EXPR): Avoid bogus
594         division by zero warnings.
596 2012-03-08  Paolo Carlini  <paolo.carlini@oracle.com>
598         * typeck.c (build_array_ref, cp_build_addr_expr_1, convert_ptrmem,
599         build_ptrmemfunc): Consistently forward the tsubst_flags_t
600         parameter.
601         * call.c (resolve_args): Likewise.
603 2012-03-07  Jason Merrill  <jason@redhat.com>
605         PR c++/52521
606         * mangle.c (write_literal_operator_name): The length comes after the
607         operator prefix.
609 2012-03-05  Jakub Jelinek  <jakub@redhat.com>
611         * pt.c (local_specializations): Change from htab_t into
612         struct pointer_map_t *.
613         (retrieve_local_specializations, register_local_specialization,
614         tsubst_pack_expansion, instantiate_decl): Adjust users.
615         (eq_local_specializations, hash_local_specialization): Remove.
617 2012-03-05  Jason Merrill  <jason@redhat.com>
619         PR c++/51930
620         * decl2.c (determine_visibility): Correct calculation of class
621         args depth.
622         * decl.c (check_tag_decl): Adjust warning.
624         * method.c (synthesized_method_walk): Cleanups don't affect the EH
625         spec either.
627 2012-03-03  Jason Merrill  <jason@redhat.com>
629         * init.c (perform_member_init): Cope with uninstantiated NSDMI.
631         Core 1270
632         * call.c (build_aggr_conv): Call reshape_init.
633         (convert_like_real): Likewise.
634         * typeck2.c (process_init_constructor): Clear TREE_CONSTANT if
635         not all constant.
637         * mangle.c (write_nested_name): Use decl_mangling_context.
638         (write_prefix, write_template_prefix): Likewise.
640         PR c++/36797
641         * mangle.c (write_expression): Improve diagnostic for TRAIT_EXPR.
643         * class.c (add_method): Always build an OVERLOAD for using-decls.
644         * search.c (lookup_member): Handle getting an OVERLOAD for a
645         single function.
647 2012-03-02  Paolo Carlini  <paolo.carlini@oracle.com>
649         PR c++/51989
650         * typeck2.c (build_x_arrow): Take a tsubst_flags_t argument and
651         propagate it.
652         * cp-tree.h (build_x_arrow): Adjust prototype.
653         * pt.c (tsubst_copy_and_build): Adjust call.
654         * parser.c (cp_parser_postfix_dot_deref_expression): Likewise.
656 2012-03-02  Paolo Carlini  <paolo.carlini@oracle.com>
658         * name-lookup.c (binding_to_template_parms_of_scope_p): Clean up.
660 2012-02-29  Jason Merrill  <jason@redhat.com>
662         PR c++/51930
663         * decl.c (check_tag_decl): Move warning for misplaced attributes here.
664         (shadow_tag): From here.
665         * parser.c (cp_parser_explicit_instantiation): Don't warn here.
667 2012-02-21  Jakub Jelinek  <jakub@redhat.com>
669         PR c++/52312
670         * typeck.c (check_literal_operator_args): Initialize *long_double_p
671         and *long_long_unsigned_p even if processing_template_decl.
673 2012-02-16  Jason Merrill  <jason@redhat.com>
675         PR c++/52248
676         * decl.c (define_label): Use timevar_cond_start/stop.
678 2012-02-16  Fabien Chêne  <fabien@gcc.gnu.org>
680         PR c++/52126
681         * decl.c (xref_basetypes): call dependent_scope_p instead of
682         dependent_type_p.
684 2012-02-16  Jason Merrill  <jason@redhat.com>
686         PR c++/51415
687         * error.c (dump_expr): Handle lambda closures specifically.
689 2012-02-14  Jason Merrill  <jason@redhat.com>
691         * parser.c (cp_parser_explicit_instantiation): Give a warning
692         for ignored attributes on explicit class instantiation.
694 2012-02-14  Jakub Jelinek  <jakub@redhat.com>
696         PR c++/52247
697         * pt.c (tsubst_copy_asm_operands): For LABEL_DECL values call
698         lookup_label on label's name and set TREE_USED.
700 2012-02-14  Jason Merrill  <jason@redhat.com>
702         PR c++/39055
703         * decl.c (local_variable_p_walkfn): Don't check DECL_ARTIFICIAL.
705 2012-02-14  Jakub Jelinek  <jakub@redhat.com>
707         PR c/52181
708         * decl.c (duplicate_decls): If olddecl has bigger DECL_ALIGN than
709         newdecl, copy DECL_ALIGN to newdecl and or DECL_USER_ALIGN bits.
711 2012-02-07  Jason Merrill  <jason@redhat.com>
713         PR c++/51675
714         * semantics.c (cx_check_missing_mem_inits): Handle unions.
715         Fix constexpr default constructor logic.
717         PR c++/52035
718         * pt.c (tsubst): Strip uninstantiated typedef.
720 2012-02-06  Jason Merrill  <jason@redhat.com>
722         PR c++/52088
723         * cvt.c (build_expr_type_conversion): Check for template conversion.
725 2012-01-31  Jason Merrill  <jason@redhat.com>
727         PR c++/52043
728         * cp-tree.h (PACK_EXPANSION_LOCAL_P): New.
729         * pt.c (make_pack_expansion, tsubst_initializer_list): Set it.
730         (tsubst_pack_expansion): Check it.
732 2012-01-29  Paolo Carlini  <paolo.carlini@oracle.com>
734         PR c++/51327
735         * class.c (explain_non_literal_class): Correctly handle implicitly
736         deleted constructors.
738 2012-01-27  Jakub Jelinek  <jakub@redhat.com>
740         PR c++/51852
741         * pt.c (tsubst_pack_expansion): Delete and restore
742         local_specialization whenever need_local_specialization, not just
743         when saved_local_specializations is non-NULL.
745 2012-01-26  Paolo Carlini  <paolo.carlini@oracle.com>
747         PR c++/51370
748         * error.c (dump_decl, [TEMPLATE_ID_EXPR]): Handle error_mark_node
749         as TREE_OPERAND (t, 1).
751 2012-01-24  Jason Merrill  <jason@redhat.com>
753         PR c++/51917
754         * decl.c (xref_basetypes): Check VEC_length instead of VEC_space.
756         PR c++/51973
757         * tree.c (called_fns_equal): Check template args.
758         (cp_tree_equal): Call it.
760 2012-01-24  Aldy Hernandez  <aldyh@redhat.com>
761             Patrick Marlier  <patrick.marlier@gmail.com>
763         PR c++/51928
764         * class.c (set_method_tm_attributes): Use TARGET_THUNK instead of
765         thunk for set_one_vmethod_tm_attributes.
767 2012-01-24  Paolo Carlini  <paolo.carlini@oracle.com>
769         PR c++/51223
770         * call.c (build_over_call): Check for error_mark_node as
771         TREE_VALUE when default arguments are processed.
773 2012-01-23  Jason Merrill  <jason@redhat.com>
775         PR c++/51930
776         * decl2.c (determine_visibility): Check for visibility attribute
777         on template specialization.
779 2012-01-23  Paolo Carlini  <paolo.carlini@oracle.com>
781         PR c++/51398
782         * pt.c (parameter_of_template_p): Skip error_mark_node parameters.
784 2012-01-23  Jason Merrill  <jason@redhat.com>
786         PR c++/51925
787         * class.c (add_method): Set OVL_USED for using-decls.
788         * tree.c (ovl_scope): New.
789         * cp-tree.h: Declare it.
790         * parser.c (cp_parser_template_name): Use it.
791         * semantics.c (baselink_for_fns): Likewise.
792         * name-lookup.c (set_inherited_value_binding_p): Likewise.
794 2012-01-20  Paolo Carlini  <paolo.carlini@oracle.com>
796         PR c++/51402
797         * pt.c (lookup_template_class_1): Check context returned by
798         tsubst for error_mark_node.
800 2012-01-19  Kai Tietz  <ktietz@redhat.com>
802         PR c++/51344
803         * decl2.c (save_template_attributes): Use merge_attributes
804         instead of chaining up via TREE_CHAIN.
806 2012-01-19  Jason Merrill  <jason@redhat.com>
808         PR c++/51889
809         * class.c (finish_struct): Call add_method here for function usings.
810         * semantics.c (finish_member_declaration): Not here.
812 2012-01-18  Paolo Carlini  <paolo.carlini@oracle.com>
814         PR c++/51225
815         * typeck2.c (store_init_value): Within a template guard
816         cxx_constant_value with require_potential_constant_expression.
817         * pt.c (convert_nontype_argument): Likewise.
819 2012-01-16  Jakub Jelinek  <jakub@redhat.com>
821         PR c++/51854
822         * mangle.c (write_template_arg_literal): Handle complex.
824 2012-01-16  Jason Merrill  <jason@redhat.com>
826         PR c++/51827
827         * mangle.c (mangle_decl): Don't mangle uninstantiated templates.
829         PR c++/51868
830         * typeck.c (build_static_cast_1): Handle bit-fields properly.
832 2012-01-13  Ian Lance Taylor  <iant@google.com>
834         PR c++/50012
835         * typeck.c (enum_cast_to_int): New static function.
836         (cp_build_binary_op): When handling warn_sign_compare, don't test
837         for TREE_NO_WARNING.  Do call enum_cast_to_int.
838         * call.c (avoid_sign_compare_warnings): Remove static function.
839         (build_new_op_1): Don't call avoid_sign_compare_warnings.
841 2012-01-13  Steven Bosscher  <steven@gcc.gnu.org>
843         * decl2.c: Do not include tree-mudflap.h
844         * semantics.c: Likewise.
846 2012-01-13  Jason Merrill  <jason@redhat.com>
848         PR c++/20681
849         * semantics.c (finish_break_stmt): Avoid adding an unreachable
850         BREAK_STMT.
852         PR c++/51813
853         * decl2.c (constrain_visibility): Clear DECL_VISIBILITY_SPECIFIED
854         when reducing the visibility.
856         PR c++/51620
857         * class.c (build_vtbl_initializer): Use __cxa_deleted_virtual.
859 2012-01-12  Jason Merrill  <jason@redhat.com>
861         PR c++/51714
862         * pt.c (value_dependent_expression_p): Treat STMT_EXPR as
863         value-dependent.
865 2012-01-13  Dodji Seketeli  <dodji@redhat.com>
867         PR c++/51633
868         * semantics.c (cp_parser_ctor_initializer_opt_and_function_body):
869         Set the pointer to the last block of the constructor to the
870         current statement.
871         (build_constexpr_constructor_member_initializers): Get
872         build_data_member_initialization a chance to deal with more
873         statements before we choke.
875 2012-01-12  Jason Merrill  <jason@redhat.com>
877         PR c++/48051
878         * mangle.c (write_expression): Mangle BASELINK scope if
879         BASELINK_QUALIFIED_P.
880         * search.c (adjust_result_of_qualified_name_lookup): Set
881         BASELINK_QUALIFIED_P.
882         * tree.c (cp_tree_equal) [BASELINK]: Compare BASELINK_QUALIFIED_P.
883         * parser.c (cp_parser_postfix_dot_deref_expression): Don't call
884         adjust_result_of_qualified_name_lookup for non-qualified names.
886         PR c++/51403
887         * pt.c (unify): Handle error_mark_node.
889 2012-01-11  Jason Merrill  <jason@redhat.com>
891         PR c++/51565
892         * call.c (standard_conversion): For ptrmemfuncs, compare the
893         static_fn_types.
895         PR c++/51818
896         * mangle.c (find_substitution): A type is only a substitution
897         match if we're looking for a type.
898         (write_nested_name): Use decl_mangling_context.
900         * decl.c (decls_match): Assert that the arguments are decls.
902         PR c++/51613
903         * pt.c (resolve_overloaded_unification): Compare types with
904         same_type_p, not decls_match.
906 2012-01-10  Jason Merrill  <jason@redhat.com>
908         PR c++/51614
909         * class.c (build_base_path): Diagnose ambiguous base.
911         PR c++/51433
912         * semantics.c (cxx_eval_call_expression): Always retry previously
913         non-constant expressions.
915 2012-01-06  Jason Merrill  <jason@redhat.com>
917         DR 686
918         PR c++/47450
919         * parser.c (cp_parser_new_expression): Set
920         type_definition_forbidden_message.
922         PR c++/6057
923         PR c++/48051
924         PR c++/50855
925         PR c++/51322
926         * mangle.c (write_expression): Support NEW_EXPR, DELETE_EXPR,
927         THROW_EXPR, CONSTRUCTOR, OVERLOAD.  Fix PREINCREMENT_EXPR and
928         PREDECREMENT_EXPR.
929         (write_template_arg): Fix mangling of class-scope functions and
930         argument packs.
931         (mangle_decl): Update suggested -fabi-version argument.
932         * operators.def: Add DOTSTAR_EXPR, REINTERPRET_CAST_EXPR,
933         DYNAMIC_CAST_EXPR; correct CONST_CAST_EXPR, STATIC_CAST_EXPR.
934         * tree.c (dependent_name): No longer static.
935         * cp-tree.h: Declare it.
936         * pt.c (unify): Defer handling of unconverted functions.
938         * mangle.c (mangle_decl): Don't generate mangling aliases
939         for maybe-in-charge [cd]tors.
941         * error.c (dump_expr): Print type of CONSTRUCTOR.
943 2012-01-05  Dodji Seketeli  <dodji@redhat.com>
945         PR c++/51541
946         * parser.c (cp_parser_alias_declaration): Get out early upon
947         errors in the identifier or the attributes.
949 2012-01-04  Paolo Carlini  <paolo.carlini@oracle.com>
951         PR c++/51064
952         * pt.c (tsubst_copy_and_build): Maybe set TREE_NO_WARNING on
953         the tree returned by build_x_binary_op.
955 2012-01-03  Paolo Carlini  <paolo.carlini@oracle.com>
957         PR c++/51738
958         * parser.c (cp_parser_postfix_open_square_expression): Handle
959         postfix-expression [ braced-init-list ].
961 2012-01-03  Paolo Carlini  <paolo.carlini@oracle.com>
963         PR c++/29273
964         * rtti.c (build_dynamic_cast_1): In case of T a pointer type,
965         call decay_conversion on v.
967 2012-01-03  Paolo Carlini  <paolo.carlini@oracle.com>
969         PR c++/15867
970         * decl.c (duplicate_decls): With -Wredundant-decls don't warn for
971         declaration followed by specialization.
973 2012-01-03  Jakub Jelinek  <jakub@redhat.com>
975         PR c++/51669
976         * semantics.c (finish_omp_clauses): Call fold_build_cleanup_point_expr
977         on OMP_CLAUSE_{IF,FINAL,NUM_THREADS,SCHEDULE_CHUNK}_EXPR.
979 2012-01-02  Jason Merrill  <jason@redhat.com>
981         DR 1359
982         PR c++/51675
983         * method.c (walk_field_subobs): Don't check for uninitialized
984         fields in a union.
985         (synthesized_method_walk): Check here.
987         DR 325
988         PR c++/51666
989         * parser.c (cp_parser_cache_defarg): Split out...
990         (cp_parser_parameter_declaration): ...from here.
991         (cp_parser_save_nsdmi): Use it.
992         (cp_parser_cache_group): Remove CPP_COMMA support.
994 2012-01-02  Dodji Seketeli  <dodji@redhat.com>
996         PR c++/51462
997         * semantics.c (cx_check_missing_mem_inits): Don't assert in case
998         of error.
1000 2012-01-02  Paolo Carlini  <paolo.carlini@oracle.com>
1002         PR c++/20140
1003         * typeck2.c (digest_init_r): Use copy_init when initializing
1004         an array of chars.
1006 2012-01-01  Paolo Carlini  <paolo.carlini@oracle.com>
1008         PR c++/16603
1009         * decl.c (build_enumerator): Don't call perform_integral_promotions
1010         on the value.
1012 2012-01-01  Paolo Carlini  <paolo.carlini@oracle.com>
1014         PR c++/51379
1015         * typeck.c (build_reinterpret_cast_1): Implement resolution of
1016         DR 799.
1018 2012-01-01  Fabien Chêne  <fabien@gcc.gnu.org>
1020         * parser.c (cp_parser_using_declaration): Add a warning about
1021         deprecated access declarations when no errors were encountered
1022         while parsing the access declaration. Save the first token in
1023         order to emit the warning at the right place.
1025 Copyright (C) 2012 Free Software Foundation, Inc.
1027 Copying and distribution of this file, with or without modification,
1028 are permitted in any medium without royalty provided the copyright
1029 notice and this notice are preserved.