Daily bump.
[official-gcc.git] / gcc / cp / ChangeLog
bloba11a52009b70bd4f8b3527c8498f1bcee52a455d
1 2014-09-25  Marek Polacek  <polacek@redhat.com>
3         PR c++/61945
4         * class.c (warn_hidden): Check for FUNCTION_DECL.
6 2014-09-25  Jakub Jelinek  <jakub@redhat.com>
8         PR c++/63249
9         * semantics.c (handle_omp_array_sections_1): Call mark_rvalue_use
10         on low_bound and length.
12 2014-09-24  Aldy Hernandez  <aldyh@redhat.com>
14         * class.c, decl.c, optimize.c: Rename all instances of
15         DECL_ABSTRACT to DECL_ABSTRACT_P.
17 2014-09-24  Marek Polacek  <polacek@redhat.com>
19         PR c/61405
20         PR c/53874
21         * semantics.c (finish_switch_cond): Call unlowered_expr_type.
22         * tree.c (bot_manip): Add default case.
23         * parser.c (cp_parser_primary_expression): Cast the controlling
24         expression of a switch to an int.
25         (cp_parser_unqualified_id): Likewise.
27 2014-09-23  Paolo Carlini  <paolo.carlini@oracle.com>
29         PR c++/61857
30         * parser.c (cp_parser_skip_to_closing_square_bracket,
31         cp_parser_array_designator_p): New.
32         (cp_parser_initializer_list): Use the latter.
34 2014-09-22  Jason Merrill  <jason@redhat.com>
36         * semantics.c (finish_non_static_data_member): In diagnostic, give
37         error at point of use and note at point of declaration.
39         PR c++/63320
40         PR c++/60463
41         PR c++/60755
42         * lambda.c (maybe_resolve_dummy, lambda_expr_this_capture): Handle
43         not finding 'this'.
45 2014-09-22  Paolo Carlini  <paolo.carlini@oracle.com>
47         PR c++/62219
48         * pt.c (check_default_tmpl_args): Check LAMBDA_FUNCTION_P.
50 2014-09-22  Jason Merrill  <jason@redhat.com>
52         * decl.c (poplevel): Don't warn about unused vars in template scope.
53         * error.c (dump_decl): Handle variable templates.
55 2014-09-20  Jason Merrill  <jason@redhat.com>
57         PR c++/62017
58         * decl.c (begin_destructor_body): Only clobber the as-base part of
59         *this.
61 2014-09-19  Jason Merrill  <jason@redhat.com>
63         PR c++/61392
64         * mangle.c (write_expression): Use unresolved-name mangling for
65         DR850 case.
67         PR c++/61465
68         * call.c (convert_like_real) [ck_identity]: Call mark_rvalue_use
69         after pulling out an element from a CONSTRUCTOR.
71 2014-09-18  Jakub Jelinek  <jakub@redhat.com>
73         PR c++/63248
74         * semantics.c (finish_omp_clauses): Don't call cp_omp_mappable_type
75         on type of type dependent expressions, and don't call it if
76         handle_omp_array_sections has kept TREE_LIST because something
77         was type dependent.
78         * pt.c (tsubst_expr) <case OMP_TARGET, case OMP_TARGET_DATA>:
79         Use keep_next_level, begin_omp_structured_block and
80         finish_omp_structured_block instead of push_stmt_list and
81         pop_stmt_list.
83 2014-09-18  Paolo Carlini  <paolo.carlini@oracle.com>
85         PR c++/62232
86         * class.c (finish_struct_1): Do not -Wnon-virtual-dtor warn
87         for final class types.
89 2014-09-15  Jason Merrill  <jason@redhat.com>
91         * pt.c (lookup_template_class_1): Splice out abi_tag attribute if
92         necessary.  Call inherit_targ_abi_tags here.
93         * class.c (check_bases_and_members): Not here.
94         (inherit_targ_abi_tags): Check CLASS_TYPE_P.
95         * cp-tree.h: Declare inherit_targ_abi_tags.
97 2014-09-15  Ville Voutilainen  <ville.voutilainen@gmail.com>
99         Do not diagnose lambda default arguments in c++14 modes.
100         * parser.c (cp_parser_lambda_declarator_opt): Make the pedwarn
101         conditional.
103 2014-09-15  Jakub Jelinek  <jakub@redhat.com>
105         * Make-lang.in (check_g++_parallelize): Change to just an upper bound
106         number.
108 2014-09-13  Marek Polacek  <polacek@redhat.com>
110         PR c++/60862
111         * parser.c (cp_parser_postfix_expression) <case CPP_OPEN_PAREN>: Set
112         location of a call expression.
114 2014-09-11  Jason Merrill  <jason@redhat.com>
116         PR c++/63201
117         * decl.c (start_decl): Handle specialization of member variable
118         template.
119         * pt.c (check_explicit_specialization): Adjust error.
121 2014-09-11  Paolo Carlini  <paolo.carlini@oracle.com>
123         PR c++/61489
124         * typeck2.c (process_init_constructor_record): Do not warn about
125         missing field initializer if EMPTY_CONSTRUCTOR_P (init).
127 2014-09-11  Jason Merrill  <jason@redhat.com>
129         PR c++/63139
130         * pt.c (tsubst_pack_expansion): Simplify substitution into T....
131         (tsubst): Don't throw away PACK_EXPANSION_EXTRA_ARGS.
133 2014-09-10  Jason Merrill  <jason@redhat.com>
135         PR c++/61659
136         * decl.c (grokfndecl): Don't set DECL_COMDAT on static inlines.
137         (duplicate_decls, start_decl): Likewise.
138         * pt.c (check_explicit_specialization): Likewise.
139         (push_template_decl_real): Or static templates.
141 2014-09-08  Jason Merrill  <jason@redhat.com>
143         * typeck.c (build_class_member_access_expr): Move
144         -Winvalid-offsetof code...
145         * semantics.c (finish_offsetof): ...here.
146         * parser.c (cp_parser_builtin_offsetof): Remember the location of
147         the type argument.
148         * pt.c (tsubst_copy_and_build) [OFFSETOF_EXPR]: Preserve it.
150         PR c++/62255
151         * pt.c (instantiate_decl): Handle recursive instantiation of
152         static data member.
154 2014-09-05  Jason Merrill  <jason@redhat.com>
156         PR c++/62659
157         * semantics.c (potential_constant_expression_1): Handle un-folded
158         pointer to member constants.
160 2014-09-04  Markus Trippelsdorf  <markus@trippelsdorf.de>
162         PR ipa/61659
163         * decl.c (duplicate_decls): Check DECL_DECLARED_INLINE_P on
164         newdecl, not olddecl.
166 2014-09-02  Paolo Carlini  <paolo.carlini@oracle.com>
168         DR 1453
169         * class.c (check_field_decls): A class of literal type cannot have
170         volatile non-static data members and base classes.
171         (explain_non_literal_class): Update.
173 2014-09-02  Jakub Jelinek  <jakub@redhat.com>
174             Balaji V. Iyer  <balaji.v.iyer@intel.com>
175             Igor Zamyatin  <igor.zamyatin@intel.com>
177         * cp-cilkplus.c (cpp_validate_cilk_plus_loop_aux): Loc definition
178         simplified.
179         * parser.c (cp_parser_cilk_for): New function.
180         (cp_parser_cilk_grainsize): Likewise.
181         (cp_parser_statement): Added RID_CILK_FOR case.
182         (cp_parser_omp_for_cond): Added CILK_FOR check.
183         (cp_parser_omp_for_loop_init): Change function argument to accept
184         tree_code instead just a bool flag; change the check to use that
185         tree_code; check for initialization declaration in case of Cilk_for.
186         (cp_parser_omp_for_loop): Added checks for CILK_FOR and RID_CILK_FOR;
187         changed call to cp_parser_omp_for_loop_init according new arguments'
188         list.
189         (cp_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
190         * pt.c (tsubst_expr): Added CILK_FOR case.
191         * semantics.c: Include convert.h.
192         (finish_omp_clauses): Properly handle OMP_CLAUSE_SCHEDULE_CILKFOR
193         case; added OMP_CLAUSE__CILK_FOR_COUNT_.
194         (handle_omp_for_class_iterator): New argument lastp and its usage;
195         added NE_EXPR case.
196         (finish_omp_for): Changed call to handle_omp_for_class_iterator
197         according new arguments' list; in case of Cilk_for save very first
198         decl and create empty stmt_list block; use block to build correct
199         statement tree.
201 2014-08-31  Jason Merrill  <jason@redhat.com>
203         PR c++/62302
204         * optimize.c (cdtor_comdat_group): Just look at the
205         DECL_ASSEMBLER_NAME of the 'tors.
207 2014-08-27  Paolo Carlini  <paolo.carlini@oracle.com>
209         PR c++/52892
210         * semantics.c (cxx_eval_call_expression): Use STRIP_NOPS on the
211         result of cxx_eval_constant_expression.
213 2014-08-26  Jason Merrill  <jason@redhat.com>
215         PR c++/58624
216         * pt.c (tsubst_decl) [VAR_DECL]: Copy TLS model.
217         (tsubst_copy_and_build) [VAR_DECL]: Use TLS wrapper.
218         * semantics.c (finish_id_expression): Don't call TLS wrapper in a
219         template.
221 2014-08-25  Jason Merrill  <jason@redhat.com>
223         * pt.c (check_explicit_specialization): Don't complain about
224         non-template variable.
225         (template_for_substitution): Allow variable templates.
226         (check_template_variable): Fix logic for member var template.
227         * decl.c (start_decl): Don't complain about extra template header
228         here.
230         * decl.c (start_decl): Look through member variable template.
231         * pt.c (tsubst_decl) [VAR_DECL]: Handle member variable templates.
232         * decl2.c (grokfield): Set DECL_CONTEXT earlier on
233         variables.
235 2014-08-25  Paolo Carlini  <paolo.carlini@oracle.com>
237         PR c++/34938
238         * cp-tree.h (TFF_POINTER): Add.
239         * cxx-pretty-print.h (pp_cxx_cv_qualifiers): Forward the third
240         argument too.
241         * error.c (dump_type_suffix): Actually print the const and noreturn
242         attribute when appropriate.
244 2014-08-23  Edward Smith-Rowland  <3dw4rd@verizon.net>
246         * decl.c (compute_array_index_type, grokdeclarator,
247         undeduced_auto_decl): Change from cxx1y to cxx14.
248         *lambda.c(add_capture()): Change error message from C++1y to C++14.
249         * parser.c (cp_parser_unqualified_id, cp_parser_pseudo_destructor_name,
250         cp_parser_lambda_introducer, cp_parser_lambda_declarator_opt,
251         cp_parser_decltype, cp_parser_conversion_type_id,
252         cp_parser_simple_type_specifier, cp_parser_type_id_1,
253         cp_parser_template_type_arg, cp_parser_std_attribute,
254         cp_parser_template_declaration_after_export): Ditto.
255         * pt.c (tsubst): Ditto.
256         * semantics.c (force_paren_expr, finish_decltype_type): Ditto.
257         * tree.c: Change comment.
258         * typeck.c (comp_template_parms_position, cxx_sizeof_or_alignof_type,
259         cp_build_addr_expr_1, maybe_warn_about_useless_cast): Ditto.
261 2014-08-23  Jason Merrill  <jason@redhat.com>
263         Allow non-constexpr variable templates.
264         * decl2.c (note_variable_template_instantiation): New.
265         * cp-tree.h: Declare it.
266         * pt.c (instantiate_decl): Call it.
267         (push_template_decl_real): Allow non-constexpr variable templates.
268         * semantics.c (finish_id_expression): Mark the variable template
269         instantiation as used.
270         * mangle.c (write_mangled_name): Variable template instantiations
271         are mangled.
272         * parser.c (cp_parser_init_declarator): Complain about
273         non-function implicit templates.
275 2014-08-22  Marek Polacek  <polacek@redhat.com>
277         PR c++/62199
278         * parser.c (cp_parser_binary_expression): Check each LHS if it's
279         preceded with logical not.  Adjust call to
280         warn_logical_not_parentheses.
282 2014-08-22  Manuel López-Ibáñez  <manu@gcc.gnu.org>
284         PR c++/57709
285         * name-lookup.c (pushdecl_maybe_friend_1): Do not warn if a
286         declaration shadows a function declaration, unless the former
287         declares a function, pointer to function or pointer to member
288         function, because this is a common and valid case in real-world
289         code.
290         * cp-tree.h (TYPE_PTRFN_P,TYPE_REFFN_P,TYPE_PTRMEMFUNC_P):
291         Improve description.
293 2014-08-22  Jason Merrill  <jason@redhat.com>
295         PR c++/62129
296         * class.c (outermost_open_class): Fix logic.
297         * decl.c (complete_vars): Fix logic.
299 2014-08-22  Jason Merrill  <jason@redhat.com>
301         PR c++/62129
302         * class.c (outermost_open_class): New.
303         * cp-tree.h: Declare it.
304         * decl.c (maybe_register_incomplete_var): Use it.
305         (complete_vars): Handle any constant variable.
306         * expr.c (cplus_expand_constant): Handle CONSTRUCTOR.
308 2014-08-22  Igor Zamyatin  <igor.zamyatin@intel.com>
310         PR other/62008
311         * cp-array-notation.c (build_array_notation_ref): Added correct
312         handling of case with incorrect array.
314 2014-08-21  Manuel López-Ibáñez  <manu@gcc.gnu.org>
316         PR fortran/44054
317         * error.c (cp_diagnostic_finalizer): Delete.
318         (init_error): Do not set diagnostic_finalizer here.
320 2014-08-19  Marek Polacek  <polacek@redhat.com>
322         PR c++/62153
323         * call.c (build_new_op_1): Remember the type of arguments for
324         a comparison.  If either operand of a comparison is a boolean
325         expression, call maybe_warn_bool_compare.
327 2014-08-19  Jason Merrill  <jason@redhat.com>
329         PR tree-optimization/62091
330         * decl2.c (decl_needed_p): Return true for virtual functions when
331         devirtualizing.
333         PR lto/53808
334         PR c++/61659
335         * decl.c (maybe_commonize_var): Don't use DECL_COMDAT to trigger
336         comdat_linkage.
338 2014-08-19  Gerald Pfeifer  <gerald@pfeifer.com>
340         * class.c (contains_empty_class_p): Remove.
342 2014-08-18  Paolo Carlini  <paolo.carlini@oracle.com>
344         * parser.c (cp_parser_expression): Add default arguments.
345         (cp_parser_primary_expression, cp_parser_postfix_expression,
346         cp_parser_array_notation, cp_parser_postfix_open_square_expression,
347         cp_parser_unary_expression, cp_parser_direct_new_declarator,
348         cp_parser_question_colon_clause, cp_parser_assignment_operator_opt,
349         cp_parser_lambda_body, cp_parser_expression_statement,
350         cp_parser_condition, cp_parser_c_for, cp_parser_range_for,
351         cp_parser_iteration_statement, cp_parser_jump_statement,
352         cp_parser_decltype_expr, cp_parser_noexcept_specification_opt,
353         cp_parser_asm_operand_list, cp_parser_objc_message_receiver,
354         cp_parser_objc_synchronized_statement, cp_parser_objc_throw_statement,
355         cp_parser_omp_var_list_no_open, cp_parser_omp_clause_num_threads,
356         cp_parser_omp_clause_num_teams, cp_parser_omp_clause_thread_limit,
357         cp_parser_omp_clause_linear, cp_parser_omp_clause_device,
358         cp_parser_omp_atomic, cp_parser_omp_for_loop_init,
359         cp_parser_omp_for_loop, cp_parser_omp_declare_reduction_exprs,
360         cp_parser_transaction_expression): Adjust.
362 2014-08-15  Jason Merrill  <jason@redhat.com>
364         PR c++/61566
365         * pt.c (lookup_template_class_1): Revert recent change.
366         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Revert recent change.
368         PR c++/61566
369         * pt.c (instantiate_class_template_1): Ignore lambda on
370         CLASSTYPE_DECL_LIST.
371         (push_template_decl_real): A lambda is not primary.
372         (lookup_template_class_1): Don't look for a lambda partial
373         instantiation.
374         * lambda.c (maybe_add_lambda_conv_op): Distinguish between being
375         currently in a function and the lambda living in a function.
376         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): False for lambda.
378 2014-08-15  Richard Biener  <rguenther@suse.de>
379             Jason Merrill  <jason@redhat.com>
381         PR bootstrap/62077
382         * tree.c (build_min_array_type, set_array_type_canon): Split out...
383         (build_cplus_array_type): ...from here.  Only call build_array_type
384         for main variants.
386 2014-08-15  Paolo Carlini  <paolo.carlini@oracle.com>
388         PR c++/62072
389         Revert:
390         2014-07-09  Paolo Carlini  <paolo.carlini@oracle.com>
392         DR 1584
393         PR c++/57466
394         * pt.c (check_cv_quals_for_unify): Implement resolution, disregard
395         cv-qualifiers of function types.
397 2014-08-15  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
399         * call.c (build_conditional_expr_1): Use OPT_Wextra in warning.
401 2014-08-14  Paolo Carlini  <paolo.carlini@oracle.com>
403         * typeck.c (composite_pointer_type, cxx_sizeof_or_alignof_type,
404         cp_build_array_ref, cp_build_function_call_vec): When a
405         pedwarn is suppressed under SFINAE, return error_mark_node.
407         * typeck.c (cxx_sizeof_or_alignof_type): Fix complain &
408         tf_warning_or_error, where complain is a bool, glitch.
410 2014-08-14  Ville Voutilainen  <ville.voutilainen@gmail.com>
412         PR c++/62101
413         * decl.c (grokdeclarator): Move the check for friend initializers..
414         * decl2.c (grokfield) ..here. Postpone early return for friends
415         until after the initializer check.
417 2014-08-14  Paolo Carlini  <paolo.carlini@oracle.com>
419         PR c++/54377
420         * pt.c (coerce_template_parms): Improve error message vs default
421         arguments.
423 2014-08-14  Paolo Carlini  <paolo.carlini@oracle.com>
425         * parser.c (cp_parser_init_declarator): Remove redundant check of
426         decl_specifiers->type.
428 2014-08-13  Jason Merrill  <jason@redhat.com>
430         * call.c (build_x_va_arg): Support passing non-POD through ....
431         (convert_arg_to_ellipsis): Likewise.
433 2014-08-13  Andrew Sutton  <andrew.n.sutton@gmail.com>
435         * pt.c (lookup_template_variable): Make dependent variable templates
436         have unknown type.
438 2014-08-13  Paolo Carlini  <paolo.carlini@oracle.com>
440         * parser.c (cp_parser_elaborated_type_specifier): Handle
441         specially cp_parser_template_id returning a BASELINK.
443 2014-08-13  Paolo Carlini  <paolo.carlini@oracle.com>
445         * parser.c (cp_parser_diagnose_invalid_type_name,
446         cp_parser_make_typename_type): Remove scope parameter.
447         (cp_parser_parse_and_diagnose_invalid_type_name,
448         cp_parser_elaborated_type_specifier): Adjust calls.
450 2014-08-12  Ville Voutilainen  <ville.voutilainen@gmail.com>
452         Reject virt-specifiers on friends and member templates
453         * friend.c (do_friend): Diagnose virt-specifiers.
454         * pt.c (push_template_decl_real): Diagnose virt-specifiers.
456 2014-08-09  Paolo Carlini  <paolo.carlini@oracle.com>
458         * typeck2.c (check_narrowing): Add tsubst_flags_t parameter, change
459         return type to bool; in C++11 for constants give errors, not pedwarns.
460         * cp-tree.h (check_narrowing): Adjust declaration.
461         * call.c (convert_like_real): Update calls.
462         * semantics.c (finish_compound_literal): Likewise.
464 2014-08-08  Jason Merrill  <jason@redhat.com>
466         * pt.c (lookup_template_class_1): Copy abi_tag.
468 2014-08-08  Kai Tietz  <ktietz@redhat.com>
470         * semantics.c (expand_or_defer_fn_1): Check for keep-inline-dllexport
471         that we operate on a true inline.
473 2014-08-07  Trevor Saunders  <tsaunders@mozilla.com>
475         * class.c, cp-gimplify.c, decl.c, decl2.c, error.c, method.c,
476         optimize.c, pt.c, semantics.c: Remove includes of pointer-set.h.
478 2014-08-07  Paolo Carlini  <paolo.carlini@oracle.com>
480         PR c++/51312
481         * decl.c (build_enumerator): Handle class types with conversion
482         operators via perform_implicit_conversion_flags and
483         build_expr_type_conversion.
485         * cvt.c (build_expr_type_conversion): Replace pair of errors
486         with error + inform.
488 2014-08-07  Jason Merrill  <jason@redhat.com>
490         PR c++/62043
491         * parser.c (c_parse_file): Change sorry to fatal_error.
493         PR c++/61959
494         * semantics.c (cxx_eval_bare_aggregate): Handle POINTER_PLUS_EXPR.
496 2014-08-07  Trevor Saunders  <tsaunders@mozilla.com>
498         * cp-tree.h, pt.c: Use hash_map instead of pointer_map.
500 2014-08-06  Jason Merrill  <jason@redhat.com>
502         * init.c (build_vec_init): Fix constant initialization of
503         trailing elements.
504         (build_value_init_noctor): Call maybe_constant_init.
505         * semantics.c (maybe_constant_init): See through EXPR_STMT and
506         conversion to void.
508         PR c++/60417
509         * init.c (build_vec_init): Reorganize earlier change a bit.
511         PR c++/61994
512         * init.c (build_vec_init): Leave atype an ARRAY_TYPE
513         if we're just returning an INIT_EXPR.
515 2014-08-06  Jason Merrill  <jason@redhat.com>
516             Braden Obrzut  <admin@maniacsvault.net>
518         * pt.c (check_explicit_specialization): Don't test
519         DECL_DECLARED_INLINE_P for a variable template.
521 2014-08-06  Paolo Carlini  <paolo.carlini@oracle.com>
523         PR c++/43906
524         * typeck.c (cp_build_binary_op): Extend to more cases the
525         -Waddress warning.
527 2014-08-01  Braden Obrzut  <admin@maniacsvault.net>
529         Implement constexpr variable templates
530         * decl.c (grokvardecl): Handle specializations of variable templates.
531         (grokdeclarator): Handle variable template id expressions and NULL_TREE
532         return from grokvardecl.
533         * decl2.c (check_member_template): Allow declaration of template member
534         variables.
535         * parser.c (cp_parser_template_id): Build a TEMPLATE_ID_EXPR for
536         variable templates.
537         * pt.c (check_template_variable): Accept variable temploids at
538         non-class scope.
539         (push_template_decl_real): The current instantiation of a template
540         can be a VAR_DECL.
541         (determine_specialization): Accept variable templates.
542         (check_explicit_specialization): Handle and check for malformed
543         variable template specializations.
544         (lookup_template_variable): New.
545         (tsubst_decl): Handle variable template specializations.
546         (do_decl_instantiation): Handle template variables.
547         (instantiate_decl): Handle template variables.
548         * semantics.c (finish_template_variable): New.
549         (finish_id_expression): Instantiate variable templates.
550         * cp-tree.h (variable_template_p): New.
552 2014-08-02  Paolo Carlini  <paolo.carlini@oracle.com>
554         PR c++/15339
555         * decl.c (check_redeclaration_no_default_args): New.
556         (duplicate_decls): Use it, handle default arguments
557         in redeclarations of function templates.
559 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
561         * optimize.c, semantics.c: Use hash_map instead of pointer_map.
563 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
565         * class.c, cp-gimplify.c, cp-tree.h, decl.c, decl2.c, error.c,
566         method.c, name-lookup.c, pt.c, semantics.c, tree.c: Use hash_set
567         instead of pointer_set.
569 2014-08-01  Jason Merrill  <jason@redhat.com>
571         PR c++/60417
572         * init.c (build_vec_init): Set CONSTRUCTOR_IS_DIRECT_INIT on
573         init-list for trailing elements.
574         * typeck2.c (process_init_constructor_array): Likewise.
576 2014-08-01  Paolo Carlini  <paolo.carlini@oracle.com>
578         DR 217 again
579         * decl.c (duplicate_decls): Handle static member functions too.
581 2014-08-01  Igor Zamyatin  <igor.zamyatin@intel.com>
583         * cp-array-notation.c (expand_an_in_modify_expr): Fix the misprint
584         in error output.
586 2014-08-01  Igor Zamyatin  <igor.zamyatin@intel.com>
588         PR other/61963
589         * parser.c (cp_parser_array_notation): Added check for array_type.
591 2014-08-01  Igor Zamyatin  <igor.zamyatin@intel.com>
593         PR middle-end/61455
594         * cp-array-notation.c (expand_array_notation_exprs): Handling of
595         DECL_EXPR improved. Changed handling for INIT_EXPR.
597 2014-08-01  Paolo Carlini  <paolo.carlini@oracle.com>
599         * pt.c (lookup_template_class_1): Use DECL_TYPE_TEMPLATE_P.
601 2014-08-01  Jakub Jelinek  <jakub@redhat.com>
603         * cp-gimplify.c (cp_genericize_r): For -fsanitize=null and/or
604         -fsanitize=alignment call ubsan_maybe_instrument_reference
605         for casts to REFERENCE_TYPE and ubsan_maybe_instrument_member_call
606         for calls to member functions.
608 2014-07-31  Marc Glisse  <marc.glisse@inria.fr>
610         PR c++/60517
611         * typeck.c (maybe_warn_about_returning_address_of_local): Return
612         whether it is returning the address of a local variable.
613         (check_return_expr): Return 0 instead of the address of a local
614         variable.
616 2014-07-30  Jason Merrill  <jason@redhat.com>
618         PR lto/53808
619         PR c++/61659
620         * pt.c (push_template_decl_real): Don't set DECL_COMDAT on friends.
622 2014-07-30  Paolo Carlini  <paolo.carlini@oracle.com>
624         PR c++/57397
625         * pt.c (unify_arity): Add boolean parameter.
626         (unify_too_few_arguments): Likewise.
627         (type_unification_real): Diagnose correctly insufficient
628         arguments in the presence of trailing variadic parameters;
629         deducing multiple trailing packs as empty is fine.
631 2014-07-30  Jason Merrill  <jason@redhat.com>
633         PR c++/61659
634         PR c++/61687
635         Revert:
636         * decl2.c (mark_all_virtuals): New variable.
637         (maybe_emit_vtables): Check it instead of flag_devirtualize.
638         (cp_write_global_declarations): Set it and give helpful diagnostic
639         if it introduces errors.
640         * class.c (finish_struct_1): Check it.
642         PR lto/53808
643         PR c++/61659
644         * pt.c (push_template_decl_real): Set DECL_COMDAT on templates.
645         (check_explicit_specialization): Clear it on specializations.
646         * decl.c (duplicate_decls, start_decl): Likewise.
647         (grokmethod, grokfndecl): Set DECL_COMDAT on inlines.
648         * method.c (implicitly_declare_fn): Set DECL_COMDAT.  Determine
649         linkage after setting the appropriate flags.
650         * tree.c (decl_linkage): Don't check DECL_COMDAT.
651         * decl2.c (mark_needed): Mark clones.
652         (import_export_decl): Not here.
654 2014-07-25  Edward Smith-Rowland  <3dw4rd@verizon.net>
656         Implement N4051 - Allow typename in a template template parameter
657         * parser.c (cp_parser_type_parameter_key): New funtion;
658         (cp_parser_token_is_type_parameter_key): Ditto;
659         (cp_parser_type_parameter): Look for type-parameter-key for all versions
660         but pedwarn for less than cxx1z.
662 2014-07-17  Paolo Carlini  <paolo.carlini@oracle.com>
664         PR c++/50961
665         * call.c (standard_conversion): Use resolve_nondeduced_context
666         for type_unknown_p (EXPR) && TREE_CODE (TO) == BOOLEAN_TYPE.
668 2014-07-17  Paolo Carlini  <paolo.carlini@oracle.com>
670         PR c++/61804
671         * parser.c (cp_parser_tokens_start_cast_expression): Return -1
672         for '++' and '--'.
674 2014-07-15  Jason Merrill  <jason@redhat.com>
676         PR c++/61811
677         * decl2.c (maybe_emit_vtables): Return true for -fuse-all-virtuals.
679         PR c++/60848
680         PR c++/61723
681         * call.c (is_std_init_list): Don't check CLASSTYPE_TEMPLATE_INFO.
682         * class.c (finish_struct): Reject invalid definition of
683         std::initializer_list.
685 2014-07-15  Paolo Carlini  <paolo.carlini@oracle.com>
687         * call.c (convert_like_real): Call print_z_candidate and inform only
688         if permerror returns true.
690 2014-07-14  Jan Hubicka  <hubicka@ucw.cz>
692         * class.c (build_clone): Do not clear assembler names of
693         templates.
694         * decl.c (cp_tree_node_structure): Add TEMPLATE_DECL.
695         * cp-objcp-common.c (cp_tree_size): Add TEMPLATE_DECL
696         as a special case return sizeof (struct tree_decl_non_common)
697         for other decls.
698         (cp_common_init_ts): Do not initialize NAMESPACE_DECL;
699         initialize TEMPLATE_DECL as MARK_TS_DECL_COMMON.
700         * cp/cp-tree.h (tree_template_decl): New structure.
701         (cp_tree_node_structure_enum): Add TS_CP_TEMPLATE_DECL.
702         (union cp_lang_tree_node): Add template_decl.
703         (DECL_TEMPLATE_PARMS, DECL_TEMPLATE_RESULT): Update.
705 2014-07-14  Jason Merrill  <jason@redhat.com>
707         PR c++/61445
708         PR c++/56947
709         * pt.c (instantiate_decl): Don't check defer_ok for local class
710         members.
712 2014-07-14  Jakub Jelinek  <jakub@redhat.com>
714         PR middle-end/61294
715         * cp-tree.h (LITERAL_ZERO_P): Define.
716         * parser.c (cp_parser_parenthesized_expression_list): Add
717         want_literal_zero_p argument, if true, for literal zeros
718         insert INTEGER_CSTs with LITERAL_ZERO_P flag set.
719         (cp_parser_postfix_expression): Adjust
720         cp_parser_parenthesized_expression_list caller, handle
721         -Wmemset-transposed-args.
722         (literal_zeros): New variable.
724 2014-07-13  Jason Merrill  <jason@redhat.com>
726         PR c++/58511
727         * semantics.c (is_instantiation_of_constexpr): Return true for
728         defaulted functions, too.
729         (explain_invalid_constexpr_fn): Only use
730         explain_implicit_non_constexpr if !DECL_DECLARED_CONSTEXPR_P.
731         * method.c (explain_implicit_non_constexpr): Pass
732         DECL_INHERITED_CTOR_BASE to explain_implicit_non_constexpr.
734         PR c++/58611
735         * decl.c (check_initializer): Don't finish_compound_literal
736         on erroneous constexpr init.
738         PR c++/58612
739         * tree.c (bot_replace): Only replace a dummy 'this' parm.
741         PR c++/60628
742         * decl.c (create_array_type_for_decl): Only check for auto once.
744         PR c++/58636
745         * call.c (build_list_conv): Don't try to build a list of references.
747 2014-07-13  Edward Smith-Rowland  <3dw4rd@verizon.net>
749         PR C++/60209 - Declaration of user-defined literal operator cause error
750         * parser.c (cp_parser_operator): Fold treatment of strings
751         and user-defined string literals.  Use the full string parser.
752         (cp_parser_string_literal): Add flag to not look for literal operator.
754 2014-07-11  Jason Merrill  <jason@redhat.com>
756         PR c++/22434
757         PR c++/61288
758         * call.c (build_conditional_expr_1): Avoid reading freed memory.
760 2014-07-11  Paolo Carlini  <paolo.carlini@oracle.com>
762         PR c++/53159
763         * call.c (build_user_type_conversion_1): Copy LOOKUP_NO_NARROWING
764         into convflags.
765         * decl.c (check_initializer): Don't call check_narrowing here,
766         set LOOKUP_NO_NARROWING.
767         * typeck2.c (digest_init_r): Likewise.
769 2014-07-10  Jason Merrill  <jason@redhat.com>
771         PR c++/61661
772         * semantics.c (reduced_constant_expression_p): Handle CONSTRUCTOR.
774         PR c++/61659
775         PR c++/61687
776         * decl2.c (mark_all_virtuals): New variable.
777         (maybe_emit_vtables): Check it instead of flag_devirtualize.
778         (cp_write_global_declarations): Set it and give helpful diagnostic
779         if it introduces errors.
780         * class.c (finish_struct_1): Check it.
781         * decl.c (grokdeclarator): Clear virtualp after 'virtual auto' error.
783 2014-07-09  Paolo Carlini  <paolo.carlini@oracle.com>
785         PR c++/60686
786         * decl.c (grokdeclarator): Adjust error messages about 'explicit'
787         outside class declaration, in friend declaration, and neither on
788         constructor nor conversion operator.
790 2014-07-09  Paolo Carlini  <paolo.carlini@oracle.com>
792         DR 1584
793         PR c++/57466
794         * pt.c (check_cv_quals_for_unify): Implement resolution, disregard
795         cv-qualifiers of function types.
797 2014-07-09  Andrew Sutton  <andrew.n.sutton@gmail.com>
798             Paolo Carlini  <paolo.carlini@oracle.com>
800         PR c++/59361
801         * parser.c (cp_parser_tokens_start_cast_expression): Return 0 for
802         CPP_ELLIPSIS too.
804 2014-07-07  Paolo Carlini  <paolo.carlini@oracle.com>
806         * class.c (check_for_override): Wrap the 'final' and 'override'
807         keywords in %< and %>.
809 2014-07-06  Marek Polacek  <polacek@redhat.com>
811         PR c/6940
812         * cp-tree.h (DECL_ARRAY_PARAMETER_P): Define.
813         * decl.c (grokdeclarator): Set DECL_ARRAY_PARAMETER_P.
814         * typeck.c (cxx_sizeof_expr): Warn when using sizeof on an array
815         function parameter.
817 2014-07-02  Paolo Carlini  <paolo.carlini@oracle.com>
819         * pt.c (convert_template_argument): Use inform instead of error in
820         three places.
822 2014-06-30  Edward Smith-Rowland  <3dw4rd@verizon.net>
824         PR c++/58781
825         PR c++/60249
826         PR c++/59867
827         * parser.c (cp_parser_userdef_string_literal): Take a tree
828         not a cp_token*.
829         (cp_parser_string_literal): Don't hack the token stream.
831 2014-06-30  Jason Merrill  <jason@redhat.com>
833         PR c++/61659
834         PR lto/53808
835         * decl2.c (maybe_emit_vtables): Mark all vtable entries if
836         devirtualizing.
837         * init.c (build_vtbl_address): Don't mark destructor.
838         * class.c (finish_struct_1): Add all classes to keyed_classes
839         if devirtualizing.
841         PR c++/61647
842         * pt.c (type_dependent_expression_p): Check BASELINK_OPTYPE.
844         PR c++/61566
845         * mangle.c (decl_mangling_context): Look through a TEMPLATE_DECL.
847         * decl.c (build_ptrmemfunc_type): Don't give a PMF RECORD_TYPE
848         TYPE_BINFO or TYPE_LANG_SPECIFIC.
849         * cp-tree.h (TYPE_PTRMEMFUNC_FLAG): Use TYPE_LANG_FLAG_2.
850         (TYPE_PTRMEMFUNC_P): Don't expect TYPE_LANG_SPECIFIC.
851         * typeck.c (build_ptrmemfunc_access_expr): Don't use lookup_member.
852         * pt.c (unify): Also check whether the argument is a PMF.
854 2014-06-30  Paolo Carlini  <paolo.carlini@oracle.com>
856         PR c++/54891
857         * parser.c (cp_parser_tokens_start_cast_expression): In C++11
858         a '[' can also start a primary-expression.
859         (cp_parser_cast_expression): Parse a cast-expression only tentatively
860         when cp_parser_tokens_start_cast_expression returns -1.
862 2014-06-30  Jason Merrill  <jason@redhat.com>
864         PR c++/61539
865         * pt.c (unify_one_argument): Type/expression mismatch just causes
866         deduction failure.
868         * semantics.c (simplify_aggr_init_expr): Remove remnants of
869         2014-04-11 change.
871 2014-06-30  Marek Polacek  <polacek@redhat.com>
873         * cp-gimplify.c (cp_genericize): Don't instrument returns if the
874         function has no_sanitize_undefined attribute.
875         * decl.c (compute_array_index_type): Don't instrument VLAs if the
876         function has no_sanitize_undefined attribute.
878 2014-06-30  Igor Zamyatin  <igor.zamyatin@intel.com>
880         PR middle-end/57541
881         * cp-array-notation.c (expand_sec_reduce_builtin):
882         Check that bultin argument is correct.
883         * call.c (build_cxx_call): Check for 0 arguments in builtin call.
885 2014-06-28  Jonathan Wakely  <jwakely@redhat.com>
887         DR 1579
888         PR c++/58051
889         * typeck.c (check_return_expr): Lookup as an rvalue even when the
890         types aren't the same.
892 2014-06-27  Jason Merrill  <jason@redhat.com>
894         PR c++/61433
895         * error.c (dump_template_bindings): Don't tsubst in a clone.
897 2014-06-27  Paolo Carlini  <paolo.carlini@oracle.com>
899         PR c++/61614
900         * semantics.c (finish_compound_literal): Revert r204228.
902 2014-06-27  Paolo Carlini  <paolo.carlini@oracle.com>
904         * parser.c (cp_parser_compound_literal_p): New.
905         (cp_parser_postfix_expression, cp_parser_sizeof_operand): Use it.
907 2014-06-26  Jason Merrill  <jason@redhat.com>
909         * parser.c (cp_parser_for_init_statement): Change range-for error
910         to pedwarn.
912         N3994 Ranged-based for-loops: The Next Generation
913         * parser.c (cp_lexer_nth_token_is): New.
914         (cp_parser_for_init_statement): Allow "for (id : init)".
916 2014-06-26  Teresa Johnson  <tejohnson@google.com>
918         * class.c (dump_class_hierarchy): Use saved dump files.
919         (dump_vtable): Ditto.
920         (dump_vtt): Ditto.
922 2014-06-26  Adam Butcher  <adam@jessamine.co.uk>
924         PR c++/61537
925         * parser.c (cp_parser_elaborated_type_specifier): Only consider template
926         parameter lists outside of function parameter scope.
928 2014-06-25  Paolo Carlini  <paolo.carlini@oracle.com>
930         DR 178
931         PR c++/49132
932         * typeck2.c (process_init_constructor_record): Do not complain about
933         uninitialized const members, because within aggregate-initialization,
934         members without explicit initializers are value-initialized.
936 2014-06-25  Jakub Jelinek  <jakub@redhat.com>
938         * semantics.c (finish_omp_clauses): Make sure
939         OMP_CLAUSE_LINEAR_STEP has correct type.
941 2014-06-24  Jan Hubicka  <hubicka@ucw.cz>
943         * class.c (check_methods, create_vtable_ptr, determine_key_method,
944         add_vcall_offset_vtbl_entries_1): Guard VINDEX checks by
945         FUNCTION_DECL check.
946         * cp-tree.h (lang_decl_ns): Add ns_using and ns_users.
947         (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): Use lang_decl_ns.
948         (DECL_NAMESPACE_ASSOCIATIONS): Use DECL_INITIAL.
949         (DECL_TEMPLATE_INSTANTIATIONS): Use DECL_SIZE_UNIT.
951 2014-06-24  Paolo Carlini  <paolo.carlini@oracle.com>
953         PR c++/33972
954         * decl.c (grokdeclarator): Do not early check for operator-function-id
955         as non-function.
957 2014-06-24  Trevor Saunders  <tsaunders@mozilla.com>
959         * class.c, semantics.c, tree.c, vtable-class-hierarchy.c:
960         Adjust.
962 2014-06-24  Jakub Jelinek  <jakub@redhat.com>
964         * parser.c (cp_parser_omp_for_loop): For
965         #pragma omp parallel for simd move lastprivate clause from parallel
966         to for rather than simd.
968 2014-06-23  Paolo Carlini  <paolo.carlini@oracle.com>
970         DR 577
971         PR c++/33101
972         * decl.c (grokparms): Accept a single parameter of type 'void'.
974 2014-06-20  Jason Merrill  <jason@redhat.com>
976         PR c++/59296
977         * call.c (add_function_candidate): Avoid special 'this' handling
978         if we have a ref-qualifier.
980         PR c++/61556
981         * call.c (build_over_call): Call build_this in template path.
983 2014-06-19  Jason Merrill  <jason@redhat.com>
985         PR c++/59296
986         * call.c (add_function_candidate): Also set LOOKUP_NO_TEMP_BIND.
988 2014-06-18  Jason Merrill  <jason@redhat.com>
990         PR c++/59296
991         * call.c (add_function_candidate): Set LOOKUP_NO_RVAL_BIND for
992         ref-qualifier handling.
994         PR c++/61507
995         * pt.c (resolve_overloaded_unification): Preserve
996         ARGUMENT_PACK_EXPLICIT_ARGS.
998 2014-06-18  Jakub Jelinek  <jakub@redhat.com>
1000         * cp-gimplify.c (cxx_omp_finish_clause): Add a gimple_seq *
1001         argument.
1002         * cp-tree.h (cxx_omp_finish_clause): Adjust prototype.
1004 2014-06-17  Jason Merrill  <jason@redhat.com>
1006         PR c++/60605
1007         * pt.c (check_default_tmpl_args): Check DECL_LOCAL_FUNCTION_P.
1009 2014-06-15  Jason Merrill  <jason@redhat.com>
1011         PR c++/61488
1012         * pt.c (check_valid_ptrmem_cst_expr): Fix for template context.
1014         PR c++/61500
1015         * tree.c (lvalue_kind): Handle MEMBER_REF and DOTSTAR_EXPR.
1017 2014-06-15  Jan Hubicka  <hubicka@ucw.cz>
1019         * decl.c (grokvardecl): Fix pasto in previous patch.
1021 2014-06-15  Jan Hubicka  <hubicka@ucw.cz>
1023         * decl.c (duplicate_decls): Use set_decl_tls_model.
1024         (grokdeclarator): Likewise.
1025         * semantics.c (finish_id_expression): Check TLS only for
1026         static variables.
1027         (finish_omp_threadprivate): Use decl_default_tls_model.
1028         * decl2.c (get_guard): Likewise.
1029         * call.c (make_temporary_var_for_ref_to_temp): Likewise.
1031 2014-06-14  Paolo Carlini  <paolo.carlini@oracle.com>
1033         PR c++/33101
1034         * decl.c (grokparms): Improve error message about void parameters.
1035         * error.c (type_to_string): Fix aka cut off code.
1037 2014-06-12  Jason Merrill  <jason@redhat.com>
1039         * call.c (convert_arg_to_ellipsis): Use abi_version_crosses.
1040         * cvt.c (type_promotes_to): Likewise.
1041         * mangle.c (write_type, write_expression): Likewise.
1042         (write_name, write_template_arg): Likewise.
1043         (mangle_decl): Make alias based on flag_abi_compat_version.
1044         Emit -Wabi warning here.
1045         (finish_mangling_internal): Not here.  Drop warn parm.
1046         (finish_mangling_get_identifier, finish_mangling): Adjust.
1047         (mangle_type_string, mangle_special_for_type): Adjust.
1048         (mangle_ctor_vtbl_for_type, mangle_thunk): Adjust.
1049         (mangle_guard_variable, mangle_tls_init_fn): Adjust.
1050         (mangle_tls_wrapper_fn, mangle_ref_init_variable): Adjust.
1052         * call.c (build_operator_new_call): Remove -fabi-version=1 support.
1053         * class.c (walk_subobject_offsets, include_empty_classes): Likewise.
1054         (layout_nonempty_base_or_field, end_of_class): Likewise.
1055         (layout_empty_base, build_base_field, layout_class_type): Likewise.
1056         (is_empty_class, add_vcall_offset_vtbl_entries_1): Likewise.
1057         (layout_virtual_bases): Likewise.
1058         * decl.c (compute_array_index_type): Likewise.
1059         * mangle.c (write_mangled_name, write_prefix): Likewise.
1060         (write_template_prefix, write_integer_cst, write_expression): Likewise.
1061         (write_template_arg, write_array_type): Likewise.
1062         * method.c (lazily_declare_fn): Likewise.
1063         * rtti.c (get_pseudo_ti_index): Likewise.
1064         * typeck.c (comp_array_types): Likewise.
1066 2014-06-11  Jan Hubicka  <hubicka@ucw.cz>
1068         * vtable-class-hierarchy.c: Update handling for section names
1069         that are no longer trees.
1070         * decl.c (duplicate_decls): Likewise.
1072 2014-06-11  Paolo Carlini  <paolo.carlini@oracle.com>
1074         PR c++/19200
1075         * parser.c (cp_parser_init_declarator): Actually pass friend_p
1076         to cp_parser_declarator.
1078 2014-06-11  Paolo Carlini  <paolo.carlini@oracle.com>
1080         PR c++/60265
1081         * parser.c (cp_parser_using_declaration): Handle unscoped enums.
1082         * name-lookup.c (validate_nonmember_using_decl): Adjust error
1083         message.
1085 2014-06-11  Paolo Carlini  <paolo.carlini@oracle.com>
1087         PR c++/19200
1088         * parser.c (cp_parser_declarator): Add bool parameter.
1089         (cp_parser_direct_declarator): Likewise, use it.
1090         (cp_parser_member_declaration): Pass friend_p to cp_parser_declarator.
1091         (cp_parser_condition, cp_parser_explicit_instantiation,
1092         cp_parser_init_declarator, cp_parser_type_id_1,
1093         cp_parser_parameter_declaration, cp_parser_exception_declaration,
1094         cp_parser_cache_defarg, cp_parser_objc_class_ivars,
1095         cp_parser_objc_struct_declaration, cp_parser_omp_for_loop_init):
1096         Adjust.
1097         * decl.c (grokdeclarator): Fix handling of friend declared in
1098         namespace scope (g++.dg/parse/friend10.C).
1100 2014-06-10  Jan Hubicka  <hubicka@ucw.cz>
1102         * vtable-class-hierarchy.c: Use symtab_get_node (var_decl)
1103         ->implicit_section.
1104         * optimize.c (cdtor_comdat_group): Fix handling of aliases.
1105         (maybe_clone_body): Move symbol across comdat groups.
1106         * method.c (use_thunk): Copy implicit section flag.
1108 2014-06-09  Paolo Carlini  <paolo.carlini@oracle.com>
1110         PR c++/22556
1111         * name-lookup.c (pushdecl_maybe_friend_1): Use comptypes.
1113 2014-06-07  Jan Hubicka  <hubicka@ucw.cz>
1115         * method.c (use_thunk): Use set_decl_section_name.
1116         * optimize.c (maybe_clone_body): Use set_decl_section_name.
1117         * decl.c (duplicate_decls): Likewise.
1118         * vtable-class-hierarchy.c: Likewise.
1120 2014-06-06  Paolo Carlini  <paolo.carlini@oracle.com>
1122         PR c++/60184
1123         * class.c (check_field_decls): In C++11 mode do not reject
1124         static data members and reference-type members in unions.
1126 2014-06-05  Jason Merrill  <jason@redhat.com>
1128         PR c++/43453
1129         * decl.c (check_initializer): Collapse a TREE_LIST here.
1130         * typeck2.c (store_init_value): Not here.
1132 2014-06-05  Richard Biener  <rguenther@suse.de>
1133             Paolo Carlini  <paolo.carlini@oracle.com>
1135         PR c++/56961
1136         * cp-gimplify.c (cp_gimplify_expr, [MODIFY_EXPR]): Rework
1137         handling of empty classes.
1139 2014-06-04  Jason Merrill  <jason@redhat.com>
1141         * parser.c (cp_parser_diagnose_invalid_type_name): Give helpful note
1142         for noexcept and thread_local, too.
1144         PR c++/61343
1145         * decl.c (check_initializer): Maybe clear
1146         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
1148 2014-06-05  Richard Biener  <rguenther@suse.de>
1150         PR c++/61004
1151         * typeck.c (cp_build_indirect_ref): Do not emit strict-aliasing
1152         warnings for accessing empty classes.
1154 2014-06-05  Marek Polacek  <polacek@redhat.com>
1156         PR c/49706
1157         * parser.c (cp_parser_binary_expression): Warn when logical not is
1158         used on the left hand side operand of a comparison.
1160 2014-06-04  Paolo Carlini  <paolo.carlini@oracle.com>
1162         PR c++/43453
1163         * typeck.c (cp_build_modify_expr): Handle array of characters
1164         initialized by a string literal.
1165         * decl.c (check_initializer): Handle parenthesized string literal
1166         as initializer.
1167         * typeck2.c (store_init_value): Remove redundant check.
1169 2014-06-04  Jason Merrill  <jason@redhat.com>
1171         PR c++/51253
1172         PR c++/61382
1173         * cp-gimplify.c (cp_gimplify_expr): Handle CALL_EXPR_LIST_INIT_P here.
1174         * semantics.c (simplify_aggr_init_expr): Not here, just copy it.
1176 2014-06-04  Igor Zamyatin  <igor.zamyatin@intel.com>
1178         PR c/58942
1179         * cp-array-notation.c (expand_sec_reduce_builtin): Handle the case
1180         with a pointer.
1182 2014-06-03  Paolo Carlini  <paolo.carlini@oracle.com>
1184         DR 1423
1185         PR c++/52174
1186         * call.c (standard_conversion): Convert nullptr to bool only
1187         in case of direct-initialization.
1188         (convert_like_real): Provide informative error message.
1190 2014-06-03  Marek Polacek  <polacek@redhat.com>
1192         PR c/60439
1193         * semantics.c (finish_switch_cond): Warn if switch condition has
1194         boolean value.
1196 2014-06-03  Jason Merrill  <jason@redhat.com>
1198         PR c++/60992
1199         * pt.c (tsubst_copy) [VAR_DECL]: Try lookup first.  Add a new
1200         variable to local_specializations.
1202         PR c++/60848
1203         * call.c (is_std_init_list): Check CLASSTYPE_TEMPLATE_INFO.
1205 2014-06-02  Jason Merrill  <jason@redhat.com>
1207         PR c++/61046
1208         * decl.c (reshape_init_class): Handle un-folded
1209         constant-expressions.
1211         PR c++/61134
1212         * pt.c (pack_deducible_p): Handle canonicalization.
1214 2014-06-02  Paolo Carlini  <paolo.carlini@oracle.com>
1216         * pt.c (tsubst_function_type): Initialize arg_types.
1218 2014-06-02  Siva Chandra Reddy  <sivachandra@google.com>
1220         PR debug/57519
1221         * class.c (handle_using_decl): Pass the correct scope to
1222         cp_emit_debug_info_for_using.
1224 2014-06-02  Ville Voutilainen  <ville.voutilainen@gmail.com>
1226         PR c++/59483
1227         PR c++/61148
1228         * search.c (accessible_p): Use current_nonlambda_class_type.
1229         * semantics.c (check_accessibility_of_qualified_id): Likewise.
1231 2014-06-02  Andrew MacLeod  <amacleod@redhat.com>
1233         * decl.c: Include builtins.h.
1234         * semantics.c: Likewise.
1236 2014-05-31  Paolo Carlini  <paolo.carlini@oracle.com>
1238         DR 1227
1239         PR c++/57543
1240         * cp-tree.h (TYPE_HAS_LATE_RETURN_TYPE): Add.
1241         * pt.c (tsubst_function_type): Inject the this parameter; do the
1242         substitutions in the order mandated by the DR.
1243         (copy_default_args_to_explicit_spec): Copy TYPE_HAS_LATE_RETURN_TYPE.
1244         * decl.c (grokdeclarator): Maybe set TYPE_HAS_LATE_RETURN_TYPE.
1245         (static_fn_type): Copy it.
1246         * decl2.c (build_memfn_type, change_return_type,
1247         cp_reconstruct_complex_type): Likewise.
1248         * parser.c (cp_parser_lambda_declarator_opt): Likewise.
1249         * tree.c (strip_typedefs): Likewise.
1250         * typeck.c (merge_types): Likewise.
1252 2014-05-30  Jason Merrill  <jason@redhat.com>
1254         PR c++/56947
1255         * pt.c (instantiate_decl): Check that defer_ok is not set for
1256         local class members.
1258         PR c++/60992
1259         * pt.c (tsubst_init): Split out from...
1260         (tsubst_expr) [DECL_EXPR]: Here.
1261         (tsubst_copy) [VAR_DECL]: Use it.
1262         * semantics.c (finish_id_expression): Return the decl for static/const.
1264 2014-05-28  Jason Merrill  <jason@redhat.com>
1266         PR c++/47202
1267         * decl.c (cxx_comdat_group): Return a decl.
1268         * optimize.c (cdtor_comdat_group): Get its DECL_ASSEMBLER_NAME.
1270         * pt.c (tsubst) [ARRAY_TYPE]: Check for array of array of unknown
1271         bound.
1273         PR c++/61242
1274         * call.c (build_aggr_conv): Ignore passed in flags.
1275         (build_array_conv, build_complex_conv): Likewise.
1277 2014-05-23  Jan Hubicka  <hubicka@ucw.cz>
1279         * optimize.c (maybe_thunk_body): Use set_comdat_group.
1280         (maybe_clone_body): Likewise.
1281         * decl.c (duplicate_decls): Update code duplicating comdat group;
1282         do not copy symtab pointer; before freeing newdecl remove it
1283         from symtab.
1284         * decl2.c (constrain_visibility): Use set_comdat_group.
1286 2014-05-23  Jan Hubicka  <hubicka@ucw.cz>
1288         * rtti.c: Include tm_p.h
1289         (emit_tinfo_decl): Force RTTI data to be aligned to required
1290         ABI alignment only.
1292 2014-05-23  Jan Hubicka  <hubicka@ucw.cz>
1294         * class.c (build_vtable): Align vtables to TARGET_VTABLE_ENTRY_ALIGN
1295         ignoring other target adjustments.
1297 2014-05-23  Thomas Schwinge  <thomas@codesourcery.com>
1299         * semantics.c (finish_omp_clauses): Remove duplicated variable
1300         initialization.
1302         * parser.c (cp_parser_omp_target): Return bool values.
1304 2014-05-22  Paolo Carlini  <paolo.carlini@oracle.com>
1306         PR c++/61088
1307         * lambda.c (add_capture): Enforce that capture by value requires
1308         complete type.
1309         * typeck2.c (cxx_incomplete_type_inform): Early return if
1310         TYPE_MAIN_DECL is null.
1312 2014-05-21  Jonathan Wakely  <jwakely@redhat.com>
1314         PR c/61271
1315         * cp-array-notation.c (cilkplus_an_triplet_types_ok_p): Fix condition.
1317 2014-05-21  Ville Voutilainen  <ville.voutilainen@gmail.com>
1319         PR c++/61133
1320         * lambda.c (build_capture_proxy, add_capture): Treat normal
1321         captures and init-captures identically.
1323 2014-05-21  Mark Wielaard  <mjw@redhat.com>
1325         PR debug/16063
1326         * cp-lang.c (cxx_enum_underlying_base_type): New function.
1327         (LANG_HOOKS_ENUM_UNDERLYING_BASE_TYPE): Define.
1329 2014-05-21  Richard Sandiford  <rsandifo@linux.vnet.ibm.com>
1331         * cvt.c (convert_to_void): Use void_node instead of void_zero_node.
1332         * cp-array-notation.c (replace_invariant_exprs): Likewise.
1333         (expand_array_notation): Handle VOID_CST.
1334         * error.c (dump_expr): Likewise.
1335         * cxx-pretty-print.c (cxx_pretty_printer::primary_expression)
1336         (cxx_pretty_printer::expression): Likewise.
1337         (pp_cxx_new_expression): Use void_node instead of void_zero_node.
1338         * decl.c (register_dtor_fn): Likewise.
1339         * init.c (build_raw_new_expr, build_new_1, build_vec_init)
1340         (build_delete, push_base_cleanups): Likewise.
1341         * mangle.c (write_expression): Likewise.
1342         * semantics.c (finish_break_stmt, empty_expr_stmt_p): Likewise.
1343         * pt.c (tsubst_decl, tsubst_copy_and_build): Likewise.
1344         (tsubst, tsubst_copy, build_non_dependent_expr): Handle VOID_CST.
1345         * tree.c (cp_tree_equal): Likewise.
1346         (build_dummy_object, is_dummy_object, stabilize_expr): Use void_node
1347         instead of void_zero_node.
1348         * typeck.c (check_return_expr): Likewise.
1349         * typeck2.c (build_functional_cast): Likewise.
1351 2014-05-21  Igor Zamyatin  <igor.zamyatin@intel.com>
1353         PR c/60189
1354         * parser.c (cp_parser_postfix_expression): Move handling of cilk_sync
1355         from here to...
1356         (cp_parser_statement): ...here. Make sure only semicolon can go after
1357         Cilk_sync.
1359 2014-05-20  Paolo Carlini  <paolo.carlini@oracle.com>
1361         PR c++/58753
1362         PR c++/58930
1363         PR c++/58704
1364         * typeck2.c (digest_nsdmi_init): New.
1365         * parser.c (cp_parser_late_parse_one_default_arg): Use it.
1366         * init.c (get_nsdmi): Likewise.
1367         * cp-tree.h (digest_nsdmi_init): Declare.
1369 2014-05-20  Jason Merrill  <jason@redhat.com>
1371         * typeck.c (get_member_function_from_ptrfunc): Don't try to look
1372         up a virtual function in a dummy object.
1374 2014-05-20  Paolo Carlini  <paolo.carlini@oracle.com>
1376         PR c++/60373
1377         * decl.c (duplicate_decls): Replace pair of warning_at with
1378         warning_at + inform.
1379         (maybe_commonize_var): Likewise.
1381 2014-05-20  Richard Sandiford  <rsandifo@linux.vnet.ibm.com>
1383         PR bootstrap/61210
1384         * pt.c (tsubst_copy, tsubst_omp_for_iterator, tsubst_expr)
1385         (tsubst_copy_and_build): Perform recursive substitutions in a
1386         deterministic order.
1388 2014-05-20  Paolo Carlini  <paolo.carlini@oracle.com>
1390         PR c++/58664
1391         * typeck2.c (cxx_incomplete_type_inform): New.
1392         (cxx_incomplete_type_diagnostic): Use it.
1393         * decl.c (grokdeclarator): Check the element type of an
1394         incomplete array type; call the above.
1395         * cp-tree.h (cxx_incomplete_type_inform): Declare.
1397 2014-05-19  Jason Merrill  <jason@redhat.com>
1399         PR c++/58761
1400         * pt.c (tsubst_copy): Don't check at_function_scope_p.
1401         (instantiate_class_template_1): Don't push_to_top_level in an nsdmi.
1403 2014-05-19  Paolo Carlini  <paolo.carlini@oracle.com>
1405         * typeck2.c (cxx_incomplete_type_diagnostic): Use inform.
1406         * parser.c (cp_parser_enum_specifier): Likewise.
1408 2014-05-17  Trevor Saunders  <tsaunders@mozilla.com>
1410         * class.c (sorted_fields_type_new): Adjust.
1411         * cp-cilkplus.c (cilk_install_body_with_frame_cleanup): Likewise.
1412         * cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise.
1413         * cp-tree.h: Remove usage of variable_size gty attribute.
1414         * decl.c (make_label_decl): Adjust.
1415         (check_goto): Likewise.
1416         (start_preparsed_function): Likewise.
1417         (save_function_data): Likewise.
1418         * lex.c (init_reswords): Likewise.
1419         (retrofit_lang_decl): Likewise.
1420         (cxx_dup_lang_specific_decl): Likewise.
1421         (copy_lang_type): Likewise.
1422         (cxx_make_type): Likewise.
1423         * name-lookup.c (binding_entry_make): Likewise.
1424         (binding_table_construct): Likewise.
1425         (binding_table_new): Likewise.
1426         (cxx_binding_make): Likewise.
1427         (pushdecl_maybe_friend_1): Likewise.
1428         (begin_scope): Likewise.
1429         (push_to_top_level): Likewise.
1430         * parser.c (cp_lexer_alloc): Likewise.
1431         (cp_lexer_new_from_tokens): Likewise.
1432         (cp_token_cache_new): Likewise.
1433         (cp_parser_context_new): Likewise.
1434         (cp_parser_new): Likewise.
1435         (cp_parser_nested_name_specifier_opt): Likewise.
1436         (cp_parser_template_id): Likewise.
1437         * pt.c (maybe_process_partial_specialization): Likewise.
1438         (register_specialization): Likewise.
1439         (add_pending_template): Likewise.
1440         (lookup_template_class_1): Likewise.
1441         (push_tinst_level): Likewise.
1442         * semantics.c (register_constexpr_fundef): Likewise.
1443         (cxx_eval_call_expression): Likewise.
1444         * typeck2.c (abstract_virtuals_error_sfinae): Likewise.
1446 2014-05-16  Paolo Carlini  <paolo.carlini@oracle.com>
1448         PR c++/51640
1449         * parser.c (cp_parser_diagnose_invalid_type_name): Early return
1450         when cp_parser_lookup_name sets ambiguous_decls.
1452 2014-05-15  Jason Merrill  <jason@redhat.com>
1454         * call.c (print_conversion_rejection): Use loc consistently.
1456 2014-05-14  Paolo Carlini  <paolo.carlini@oracle.com>
1458         * cp-tree.h (DIRECT_LIST_INIT_P): Add.
1459         * call.c (convert_like_real, build_new_method_call_1): Use it.
1460         * decl2.c (grokfield): Likewise.
1461         * init.c (perform_member_init, build_aggr_init, expand_default_init,
1462         build_new_1): Likewise.
1463         * mangle.c (write_expression): Likewise.
1464         * parser.c (cp_parser_late_parse_one_default_arg): Likewise.
1466 2014-05-14  Jason Merrill  <jason@redhat.com>
1468         PR c++/20332
1469         PR c++/21631
1470         * call.c (reference_binding): Treat lvalue/rvalue mismatch and
1471         dropped cv-quals as a bad conversion.
1472         (convert_like_real) [ck_ref_bind]: Explain them.
1473         (compare_ics): Check badness before stripping reference
1474         bindings.  Handle comparing bad reference bindings.
1475         * typeck.c (comp_cv_qualification): Add overload that just takes
1476         integers.
1477         * cp-tree.h: Declare it.
1479         * call.c (struct conversion_info): Rename 'from_type' to 'from'.
1480         (arg_conversion_rejection, bad_arg_conversion_rejection)
1481         (explicit_conversion_rejection, template_conversion_rejection): Adjust.
1482         (add_function_candidate): Pass actual argument, rather than type, to
1483         bad_arg_conversion_rejection.
1484         (print_conversion_rejection): Explain what's wrong with the conversion.
1485         (print_z_candidates): Say "candidate:" before each candidate.
1486         (splice_viable): Be strict if we see a viable or template candidate.
1487         (build_user_type_conversion_1): Pass false to strict parameter.
1488         (perform_overload_resolution, build_conditional_expr_1): Likewise.
1489         (build_new_op_1, build_new_method_call_1): Likewise.
1490         (build_op_call_1): Pass true to strict parameter.
1492 2014-05-13  Jason Merrill  <jason@redhat.com>
1494         * call.c (print_error_for_call_failure): Say "no match" rather
1495         than "ambiguous" if there were no strict matches.
1496         (build_new_method_call_1): Likewise.
1498         PR c++/61151
1499         * semantics.c (is_this_parameter): Allow capture proxies too.
1501 2014-05-12  Jason Merrill  <jason@redhat.com>
1503         * call.c (maybe_print_user_conv_context): New.
1504         (convert_like_real): Use it.  Print call context for bad
1505         user-defined conversion.
1506         (build_over_call): Print call context for bad 'this' conversion.
1508         * call.c (convert_like_real): Use inform for identifying the
1509         declaration point.
1511 2014-05-12  Paolo Carlini  <paolo.carlini@oracle.com>
1513         * cvt.c (cp_convert_to_pointer): Don't call error_at if
1514         complain & tf_error is false.
1516         * decl.c (make_unbound_class_template): Prefer inform for
1517         "declared here"-type message.
1519 2014-05-09  Momchil Velikov  <momchil.velikov@gmail.com>
1521         PR c++/60463
1522         PR c++/60755
1523         * lambda.c (lambda_expr_this_capture): Add new parameter
1524         add_capture_p controlling whether the functions will try to
1525         capture 'this' via the default capture.
1526         (maybe_resolve_dummy): Likewise.
1527         * cp-tree.h: Adjust prototypes.
1528         * call.c, semantics.c: Change callers of these functions.
1529         * call.c (build_new_method_call_1): Use the actual 'this' that
1530         would be potentially captured for the overload resolution, instead
1531         of the dummy object.
1533 2014-05-09  Paolo Carlini  <paolo.carlini@oracle.com>
1535         * pt.c (convert_nontype_argument_function): Add tsubst_flags_t
1536         parameter.
1537         (convert_nontype_argument): Adjust calls.
1538         (coerce_template_parameter_pack): Add missing complain & tf_error
1539         check.
1541 2014-05-09  Jason Merrill  <jason@redhat.com>
1543         DR 587
1544         PR c++/51317
1545         * call.c (build_conditional_expr_1, conditional_conversion): Handle
1546         non-class lvalues and xvalues that differ only in cv-qualifiers.
1548         DR 5
1549         PR c++/60019
1550         * call.c (build_user_type_conversion_1): The copy-init temporary
1551         is cv-unqualified.
1553         PR c++/58714
1554         * tree.c (stabilize_expr): A stabilized prvalue is an xvalue.
1556         PR c++/54348
1557         * call.c (build_conditional_expr_1): If overload resolution finds
1558         no match, just say "different types".
1560         PR c++/32019
1561         * call.c (build_conditional_expr_1): Improve ambiguity diagnostic.
1563         PR c++/22434
1564         * call.c (build_conditional_expr_1): Don't try to pool cv-quals
1565         if we didn't find a conversion.
1566         Don't accept a bad conversion too early.
1568 2014-05-08  Paolo Carlini  <paolo.carlini@oracle.com>
1570         PR c++/13981
1571         * typeck.c (convert_for_assignment): Provide an inform for pointers
1572         to incomplete class types.
1574 2014-05-07  Paolo Carlini  <paolo.carlini@oracle.com>
1576         PR c++/61083
1577         * pt.c (convert_nontype_argument): Protect all the error calls
1578         with complain & tf_error.
1580 2014-05-07  Paolo Carlini  <paolo.carlini@oracle.com>
1582         PR c++/61080
1583         * pt.c (instantiate_decl): Avoid generating the body of a
1584         deleted function.
1586 2014-05-06  Paolo Carlini  <paolo.carlini@oracle.com>
1588         PR c++/60999
1589         * pt.c (maybe_begin_member_template_processing): Use
1590         uses_template_parms.
1592 2014-05-06  Kenneth Zadeck  <zadeck@naturalbridge.com>
1593             Mike Stump  <mikestump@comcast.net>
1594             Richard Sandiford  <rdsandiford@googlemail.com>
1596         * call.c: Include wide-int.h.
1597         (type_passed_as): Use tree_int_cst_lt instead of INT_CST_LT_UNSIGNED.
1598         (convert_for_arg_passing): Likewise.
1599         * class.c: Include wide-int.h.
1600         (walk_subobject_offsets): Use tree_int_cst_lt instead of INT_CST_LT.
1601         (end_of_class): Use tree_int_cst_lt instead of INT_CST_LT_UNSIGNED.
1602         (include_empty_classes): Likewise
1603         (layout_class_type): Use tree_int_cst_lt instead of INT_CST_LT.
1604         * cvt.c: Include wide-int.h.
1605         (ignore_overflows): Use wide_int_to_tree.
1606         * decl.c: Include wide-int.h.
1607         (check_array_designated_initializer): Use wide-int interfaces.
1608         (compute_array_index_type): Use tree_int_cst_lt instead of INT_CST_LT.
1609         (finish_enum_value_list): Use signop.
1610         (build_enumerator): Use wide-int interfaces.
1611         * init.c: Include wide-int.h.
1612         (build_new_1): Use wide-int interfaces.
1613         * mangle.c: Include wide-int.h.
1614         (write_integer_cst): Use wide-int interfaces.
1615         (write_array_type): Likewise.
1616         * tree.c: Include wide-int.h.
1617         (cp_tree_equal): Use tree_int_cst_equal.
1618         * typeck2.c: Include wide-int.h.
1619         (process_init_constructor_array): Use wide-int interfaces.
1621 2014-05-03  Paolo Carlini  <paolo.carlini@oracle.com>
1623         PR c++/58582
1624         * decl.c (grokfndecl): Check duplicate_decls return value for
1625         error_mark_node.
1626         * pt.c (instantiate_decl): A deleted function is defined.
1628 2014-05-02  Jason Merrill  <jason@redhat.com>
1630         * decl2.c (vague_linkage_p): Local statics have vague linkage.
1632         PR c++/60992
1633         * lambda.c (lambda_capture_field_type): Wrap anything dependent
1634         other than 'this'.
1635         (add_capture): Check for VLA before calling it.
1636         * semantics.c (is_this_parameter): Accept any 'this' parameter, not
1637         just the current one.  Make non-static.
1638         * cp-tree.h: Declare it.
1639         * pt.c (tsubst_copy) [VAR_DECL]: Also build a new VAR_DECL if
1640         the operand was static or constant.
1642 2014-05-02  Marek Polacek  <polacek@redhat.com>
1644         * typeck.c (maybe_warn_about_returning_address_of_local): Separate
1645         warning_at calls.
1647 2014-05-01  Marek Polacek  <polacek@redhat.com>
1649         PR c/43395
1650         * typeck.c (maybe_warn_about_returning_address_of_local): Distinguish
1651         between label and variable when warning about returning local address.
1653 2014-04-30  Jason Merrill  <jason@redhat.com>
1655         PR c++/60980
1656         * init.c (build_value_init): Don't try to call an array constructor.
1658         PR c++/60951
1659         * typeck2.c (massage_init_elt): Use maybe_constant_init.
1661 2014-04-30  Marek Polacek  <polacek@redhat.com>
1663         * typeck.c (cp_build_binary_op): Call ubsan_instrument_division
1664         even when SANITIZE_FLOAT_DIVIDE is on.  Set doing_div_or_mod even
1665         for non-integer types.
1667 2014-04-29  Jason Merrill  <jason@redhat.com>
1669         DR 1351
1670         Represent the unevaluated exception specification of an implicitly
1671         declared or deleted function with a simple placeholder, not a list
1672         of functions.
1673         * cp-tree.h (UNEVALUATED_NOEXCEPT_SPEC_P): New.
1674         * except.c (unevaluated_noexcept_spec): New.
1675         * class.c (deduce_noexcept_on_destructor): Use it.
1676         * decl.c (check_redeclaration_exception_specification): Call
1677         maybe_instantiate_noexcept.
1678         (duplicate_decls): Call it before merge_types.
1679         (start_preparsed_function): Call maybe_instantiate_noexcept.
1680         * decl2.c (mark_used): Call maybe_instantiate_noexcept earlier.
1681         * init.c (get_nsdmi): Factor out of perform_member_init.
1682         * method.c (process_subob_fn): Call maybe_instantiate_noexcept.
1683         (walk_field_subobs): Consider NSDMI for EH spec.
1684         (get_defaulted_eh_spec): New.
1685         (implicitly_declare_fn): Use unevaluated_noexcept_spec.
1686         (defaulted_late_check): Defer EH checking in non-template classes.
1687         (after_nsdmi_defaulted_late_checks): New.
1688         * parser.c (cp_parser_class_specifier_1): Use it.
1689         (unparsed_classes): New macro.
1690         * parser.h (cp_unparsed_functions_entry_d): Add classes field.
1691         * pt.c (maybe_instantiate_noexcept): Use get_defaulted_eh_spec.
1692         Remove list-of-functions handling.
1693         * typeck2.c (merge_exception_specifiers): Remove list-of-functions
1694         handling and FN parameter.
1695         * typeck.c (merge_types): Adjust.
1697 2014-04-28  Paolo Carlini  <paolo.carlini@oracle.com>
1699         PR c++/59120
1700         * parser.c (cp_parser_alias_declaration): Check return value of
1701         cp_parser_require.
1703 2014-04-24  Jakub Jelinek  <jakub@redhat.com>
1705         * parser.c (cp_parser_omp_atomic): Allow seq_cst before
1706         atomic-clause, allow comma in between atomic-clause and
1707         seq_cst.
1709 2014-04-24  Marc Glisse  <marc.glisse@inria.fr>
1711         PR libstdc++/43622
1712         * rtti.c (emit_support_tinfos): Do not iterate on
1713         registered_builtin_types (partial revert).
1715 2014-04-23 Dinar Temirbulatov  <dtemirbulatov@gmail.com>
1717         PR c++/57958
1718         * semantics.c (apply_deduced_return_type): Complete non-void type
1719         before estimating whether the type is aggregate.
1721 2014-04-22  Marc Glisse  <marc.glisse@inria.fr>
1723         PR libstdc++/43622
1724         * rtti.c (emit_support_tinfo_1): New function, extracted from
1725         emit_support_tinfos.
1726         (emit_support_tinfos): Call it and iterate on registered_builtin_types.
1728 2014-04-22  Jakub Jelinek  <jakub@redhat.com>
1730         PR c/59073
1731         * parser.c (cp_parser_omp_parallel): If cp_parser_omp_for
1732         fails, don't set OM_PARALLEL_COMBINED and return NULL.
1734 2014-04-18  Jason Merrill  <jason@redhat.com>
1736         DR 1571
1737         * call.c (reference_binding): Recurse on user-defined conversion.
1739         PR c++/60872
1740         * call.c (standard_conversion): Don't try to apply restrict to void.
1742 2014-04-16  Marc Glisse  <marc.glisse@inria.fr>
1744         * decl.c (reshape_init_r): Handle a single element of vector type.
1746 2014-04-16  Patrick Palka  <patrick@parcs.ath.cx>
1748         PR c++/60765
1749         * decl2.c (cplus_decl_attributes): Handle
1750         pointer-to-member-function declarations.
1752 2014-04-16  Patrick Palka  <patrick@parcs.ath.cx>
1754         PR c++/60764
1755         * call.c (build_user_type_coversion): Use build_dummy_object
1756         to create the placeholder object for a constructor method call.
1757         (build_special_member_call): Likewise.
1758         (build_over_call): Check for the placeholder object with
1759         is_dummy_object.
1760         (build_new_method_call_1): Likewise.  Don't attempt to resolve
1761         a dummy object for a constructor method call.
1763 2014-04-16  Paul Pluzhnikov  <ppluzhnikov@google.com>
1765         PR c++/59295
1766         * friend.c (add_friend, make_friend_class): Move repeated friend
1767         warning under Wredundant_decls.
1769 2014-04-15  Paolo Carlini  <paolo.carlini@oracle.com>
1771         * decl.c (duplicate_decls): Remove redundant TYPE_NAME use.
1772         * name-lookup.c (pushdecl_maybe_friend_1): Likewise.
1773         (do_class_using_decl): Likewise.
1774         * mangle.c (dump_substitution_candidates): Use TYPE_NAME_STRING.
1776 2014-04-15  Jakub Jelinek  <jakub@redhat.com>
1778         PR plugins/59335
1779         * Make-lang.h (CP_PLUGIN_HEADERS): Add type-utils.h.
1781 2014-04-14  Paolo Carlini  <paolo.carlini@oracle.com>
1783         * cp-tree.h (TYPE_IDENTIFIER): Remove declaration.
1785 2014-04-14  Paolo Carlini  <paolo.carlini@oracle.com>
1787         * pt.c (mark_template_parm): Use template_parm_level_and_index.
1789 2014-04-11  Jason Merrill  <jason@redhat.com>
1791         * parser.h (struct cp_token): Rename ambiguous_p to error_reported.
1792         * parser.c: Adjust.
1793         (cp_lexer_get_preprocessor_token): Always clear it.
1794         (cp_parser_lambda_expression): Use it to avoid duplicate diagnostics.
1796         DR 1467
1797         PR c++/51747
1798         * decl.c (reshape_init_r): Handle a single element of class type.
1800         DR 1338
1801         * decl.c (cxx_init_decl_processing): Set DECL_IS_MALLOC on
1802         built-in operator new.
1804 2014-04-11  Paolo Carlini  <paolo.carlini@oracle.com>
1806         PR c++/58600
1807         * name-lookup.c (parse_using_directive): Return early if the
1808         attribs argument is error_mark_node; use get_attribute_name.
1810 2014-04-11  Jason Merrill  <jason@redhat.com>
1812         DR 1030
1813         PR c++/51253
1814         * cp-tree.h (CALL_EXPR_LIST_INIT_P): New.
1815         * call.c (struct z_candidate): Add flags field.
1816         (add_candidate): Add flags parm.
1817         (add_function_candidate, add_conv_candidate, build_builtin_candidate)
1818         (add_template_candidate_real): Pass it.
1819         (build_over_call): Set CALL_EXPR_LIST_INIT_P.
1820         * tree.c (build_aggr_init_expr): Copy it.
1821         * semantics.c (simplify_aggr_init_expr): Preevaluate args if it's set.
1823 2014-04-10  Richard Biener  <rguenther@suse.de>
1824             Jakub Jelinek  <jakub@redhat.com>
1826         PR ipa/60761
1827         * error.c (dump_decl) <case FUNCTION_DECL>: If
1828         DECL_LANG_SPECIFIC is NULL, but DECL_ABSTRACT_ORIGIN is not,
1829         recurse on DECL_ABSTRACT_ORIGIN instead of printing
1830         <built-in>.
1832 2014-04-09  Fabien Chêne  <fabien@gcc.gnu.org>
1834         * pt.c (check_template_variable): Check for the return of pedwarn
1835         before emitting a note.
1836         * parser.c (cp_parser_lambda_introducer): Likewise.
1838 2014-04-08  Paolo Carlini  <paolo.carlini@oracle.com>
1840         PR c++/59115
1841         * pt.c (process_template_parm): For an invalid non-type parameter
1842         only set TREE_TYPE to error_mark_node.
1843         (push_inline_template_parms_recursive, comp_template_parms,
1844         redeclare_class_template, coerce_template_template_parm,
1845         coerce_template_template_parms, unify): Use error_operand_p.
1847 2014-04-08  Nathan Sidwell  <nathan@codesourcery.com>
1849         * class.c (check_bases_and_members): Warn about non-virtual dtors
1850         in public bases only.  Check warn_ecpp before complaining about
1851         non-polymorphic bases.
1853 2014-04-04  Fabien Chêne  <fabien@gcc.gnu.org>
1855         * decl.c (duplicate_decls): Check for the return of warning_at
1856         before emitting a note.
1857         (warn_misplaced_attr_for_class_type): Likewise.
1858         (check_tag_decl): Likewise.
1860 2014-04-04  Paolo Carlini  <paolo.carlini@oracle.com>
1862         PR c++/58207
1863         * semantics.c (sort_constexpr_mem_initializers): Robustify loop.
1865 2014-04-04  Patrick Palka  <patrick@parcs.ath.cx>
1867         PR c++/44613
1868         * semantics.c (add_stmt): Set STATEMENT_LIST_HAS_LABEL.
1869         * decl.c (cp_finish_decl): Create a new BIND_EXPR before
1870         instantiating a variable-sized type.
1872         PR c++/21113
1873         * decl.c (decl_jump_unsafe): Consider variably-modified decls.
1875 2014-04-04  Fabien Chêne  <fabien@gcc.gnu.org>
1877         * class.c (find_abi_tags_r): Check for the return of warning
1878         before emitting a note.
1879         (one_inherited_ctor): Likewise.
1881 2014-04-04  Fabien Chêne  <fabien@gcc.gnu.org>
1883         * decl.c (duplicate_decls): Check for the return of permerror
1884         before emitting a note.
1886 2014-04-03  Nathan Sidwell  <nathan@codesourcery.com>
1888         * class.c (accessible_nvdtor_p): New.
1889         (check_bases): Don't check base destructor here ...
1890         (check_bases_and_members): ... check them here.  Trigger on
1891         Wnon-virtual-dtor flag.
1892         (finish_struct_1): Use accessible_nvdtor_p.
1894 2014-04-01  Jason Merrill  <jason@redhat.com>
1896         * pt.c (process_partial_specialization): Say "not deducible"
1897         rather than "not used".  Use inform.
1899         PR c++/60374
1900         * pt.c (coerce_template_parms): Check that the pack expansion
1901         pattern works with the first matching parameter.
1903 2014-04-01  Fabien Chêne  <fabien@gcc.gnu.org>
1905         * init.c (perform_member_init): Homogenize uninitialized
1906         diagnostics.
1908 2014-04-01  Jason Merrill  <jason@redhat.com>
1910         PR c++/60708
1911         * call.c (build_array_conv): Call complete_type.
1913         PR c++/60713
1914         * typeck2.c (PICFLAG_SIDE_EFFECTS): New.
1915         (picflag_from_initializer): Return it.
1916         (process_init_constructor): Handle it.
1918         PR c++/60642
1919         * decl2.c (is_late_template_attribute): Don't defer abi_tag.
1920         * mangle.c (write_unqualified_name): Fix abi_tag on templates.
1921         * pt.c (get_template_info): Handle NAMESPACE_DECL.
1922         (most_general_template): Handle more kinds of template.
1923         * tree.c (handle_abi_tag_attribute): Ignore abi_tag on template
1924         instantiations and specializations.
1926 2014-03-31  Patrick Palka  <patrick@parcs.ath.cx>
1928         PR c++/44859
1929         * typeck.c (maybe_warn_about_returning_address_of_local): Unwrap
1930         COMPONENT_REFs and ARRAY_REFs sooner.
1932 2014-03-29  Adam Butcher  <adam@jessamine.co.uk>
1934         PR c++/60626
1935         * parser.c (cp_parser_init_declarator): Handle erroneous generic type
1936         usage in non-functions with pushed scope.
1938 2014-03-28  Adam Butcher  <adam@jessamine.co.uk>
1940         PR c++/60573
1941         * name-lookup.h (cp_binding_level): New transient field defining_class_p
1942         to indicate whether a scope is in the process of defining a class.
1943         * semantics.c (begin_class_definition): Set defining_class_p.
1944         * name-lookup.c (leave_scope): Reset defining_class_p.
1945         * parser.c (synthesize_implicit_template_parm): Use cp_binding_level::
1946         defining_class_p rather than TYPE_BEING_DEFINED as the predicate for
1947         unwinding to class-defining scope to handle the erroneous definition of
1948         a generic function of an arbitrarily nested class within an enclosing
1949         class.
1951 2014-03-26  Fabien Chêne  <fabien@gcc.gnu.org>
1953         PR c++/52369
1954         * method.c (walk_field_subobs): Improve the diagnostic
1955         locations for both REFERENCE_TYPEs and non-static const members.
1956         * init.c (diagnose_uninitialized_cst_or_ref_member): Use %q#D
1957         instead of %qD to be consistent with the c++11 diagnostic.
1959 2014-03-25  Jason Merrill  <jason@redhat.com>
1961         PR c++/60566
1962         PR c++/58678
1963         * class.c (build_vtbl_initializer): Handle abstract dtors here.
1964         * search.c (get_pure_virtuals): Not here.
1966         PR c++/60375
1967         * parser.c (cp_parser_lambda_expression): Don't parse the body of
1968         a lambda in unevaluated context.
1970         PR c++/60628
1971         * decl.c (create_array_type_for_decl): Complain about array of auto.
1973 2014-03-25  Jakub Jelinek  <jakub@redhat.com>
1975         PR c++/60331
1976         * semantics.c (potential_constant_expression_1): Handle
1977         DECL_EXPR.
1979 2014-03-24  Adam Butcher  <adam@jessamine.co.uk>
1981         PR c++/60627
1982         * parser.c (cp_parser_parameter_declaration_clause): Prevent 'auto' from
1983         introducing an implicit function template parameter within an explicit
1984         instantiation.
1986 2014-03-22  Jason Merrill  <jason@redhat.com>
1988         PR c++/60574
1989         * decl.c (grokdeclarator): Change permerror about 'virtual auto'
1990         to error.
1992 2014-03-21  Paolo Carlini  <paolo.carlini@oracle.com>
1994         PR c++/60384
1995         * name-lookup.c (push_class_level_binding_1): Check identifier_p
1996         on the name argument.
1998 2014-03-20  Jakub Jelinek  <jakub@redhat.com>
2000         PR c++/60572
2001         * init.c (build_zero_init_1): Ignore fields with error_mark_node
2002         type.
2004 2014-03-19  Paolo Carlini  <paolo.carlini@oracle.com>
2006         PR c++/51474
2007         * call.c (build_new_method_call_1): Handle pure virtuals called by
2008         NSDMIs too.
2010 2014-03-17  Adam Butcher  <adam@jessamine.co.uk>
2012         PR c++/60390
2013         * parser.c (cp_parser_member_declaration): Don't allow
2014         finish_fully_implicit_template to consider friend declarations to be
2015         class member templates.
2016         (synthesize_implicit_template_parm): Handling winding back through class
2017         scope to the class being defined in order to inject a template argument
2018         list.
2020         PR c++/60391
2021         * parser.c (cp_parser_skip_to_end_of_block_or_statement): Unwind generic
2022         function scope as per cp_parser_skip_to_end_of_statement.
2024 2014-03-17  Paolo Carlini  <paolo.carlini@oracle.com>
2026         PR c++/59571
2027         * typeck2.c (check_narrowing): Use fold_non_dependent_expr_sfinae.
2029 2014-03-14  Jason Merrill  <jason@redhat.com>
2031         PR c++/60532
2032         PR c++/58678
2033         * search.c (get_pure_virtuals): Handle abstract dtor here.
2034         (dfs_get_pure_virtuals): Not here.
2036         PR c++/58678
2037         * search.c (dfs_get_pure_virtuals): Treat the destructor of an
2038         abstract class as pure.
2040 2014-03-13  Paolo Carlini  <paolo.carlini@oracle.com>
2042         PR c++/60383
2043         * pt.c (maybe_process_partial_specialization): Check return value
2044         of check_specialization_namespace.
2046 2014-03-13  Paolo Carlini  <paolo.carlini@oracle.com>
2048         PR c++/60254
2049         * semantics.c (finish_static_assert): Call cxx_constant_value only
2050         if require_potential_rvalue_constant_expression returns true.
2052 2014-03-11  Paolo Carlini  <paolo.carlini@oracle.com>
2054         PR c++/60389
2055         * method.c (get_inherited_ctor): New.
2056         * cp-tree.h (get_inherited_ctor): Declare it.
2057         * semantics.c (is_valid_constexpr_fn): Use it.
2059 2014-03-10  Jason Merrill  <jason@redhat.com>
2061         PR c++/60367
2062         * call.c (convert_default_arg): Remove special handling for
2063         CONSTRUCTOR.
2065         PR c++/53492
2066         * parser.c (cp_parser_class_head): Also check PRIMARY_TEMPLATE_P
2067         when deciding whether to call push_template_decl for a member class.
2068         * pt.c (push_template_decl_real): Return after wrong levels error.
2070 2014-03-08  Adam Butcher  <adam@jessamine.co.uk>
2072         PR c++/60033
2073         * pt.c (tsubst_copy): When retrieving a capture pack from a generic
2074         lambda, remove the lambda's own template argument list prior to fetching
2075         the specialization.
2077         PR c++/60393
2078         * parser.c (cp_parser_parameter_declaration_clause): Move generic
2079         function template unwinding on error into a more general location, ...
2080         (cp_parser_skip_to_end_of_statement): ... here.
2082 2014-03-07  Jason Merrill  <jason@redhat.com>
2084         * Make-lang.in (check_g++_parallelize): Split dg.exp.
2086         * parser.c (cp_parser_type_id_1): Only allow 'auto' in C++1y if
2087         we're in a trailing return type.
2089         * typeck.c (comp_template_parms_position): 'auto' and
2090         'decltype(auto)' are different from real template parms.
2092         * parser.c (cp_parser_using_declaration): Consume the semicolon
2093         after bare parameter pack error.
2095         * cp-tree.h (REF_PARENTHESIZED_P): New.
2096         * semantics.c (force_paren_expr): Set it.
2097         * pt.c (do_auto_deduction): Check it.
2098         (tsubst) [COMPONENT_REF]: Copy it.
2099         * typeck.c (maybe_warn_about_useless_cast): Don't strip dereference.
2101         * decl.c (create_array_type_for_decl): Only warn about invalid
2102         C++1y VLA if flag_iso or warn_vla>0.
2103         (grokdeclarator): Likewise.
2104         * pt.c (tsubst): Likewise.
2105         * semantics.c (finish_decltype_type): Likewise.
2106         * typeck.c (cxx_sizeof_or_alignof_type): Likewise.
2107         (cp_build_addr_expr_1): Likewise.
2108         * init.c (build_new_1): Improve diagnostics.
2110 2014-03-07  Paolo Carlini  <paolo.carlini@oracle.com>
2112         PR c++/58609
2113         * decl.c (check_initializer): Return NULL_TREE after error;
2114         consistently use inform.
2116 2014-03-07  Paolo Carlini  <paolo.carlini@oracle.com>
2118         * decl.c (check_initializer): Remove dead code.
2120 2014-03-06  Marek Polacek  <polacek@redhat.com>
2122         PR c/60197
2123         * typeck.c (check_return_expr): Call contains_cilk_spawn_stmt instead
2124         of checking tree code.
2126 2014-03-06  Paolo Carlini  <paolo.carlini@oracle.com>
2128         * parser.c (cp_lexer_set_source_position): New.
2129         (cp_parser_mem_initializer): Use it.
2130         (cp_parser_postfix_open_square_expression): Likewise.
2131         (cp_parser_parenthesized_expression_list): Likewise.
2132         (cp_parser_new_initializer): Likewise.
2133         (cp_parser_jump_statement): Likewise.
2134         (cp_parser_initializer): Likewise.
2135         (cp_parser_functional_cast): Likewise.
2137 2014-03-05  Jason Merrill  <jason@redhat.com>
2139         PR c++/60409
2140         * semantics.c (force_paren_expr): Only add a PAREN_EXPR to a
2141         dependent expression.
2143         PR c++/60361
2144         * parser.c (cp_parser_template_id): Don't set up a CPP_TEMPLATE_ID
2145         if re-parsing might succeed.
2146         * semantics.c (finish_id_expression): Use of a parameter outside
2147         the function body is a parse error.
2149         * parser.c (cp_parser_mem_initializer): Set input_location
2150         properly for init-list warning.
2151         (cp_parser_postfix_open_square_expression): Likewise.
2152         (cp_parser_parenthesized_expression_list): Likewise.
2153         (cp_parser_new_initializer): Likewise.
2154         (cp_parser_jump_statement): Likewise.
2155         (cp_parser_initializer): Likewise.
2156         (cp_parser_functional_cast): Likewise.
2158 2014-03-04  Jason Merrill  <jason@redhat.com>
2160         PR c++/60417
2161         * typeck2.c (process_init_constructor_record): Set
2162         CONSTRUCTOR_IS_DIRECT_INIT on {} for omitted initializers.
2164         PR c++/60415
2165         PR c++/54359
2166         * parser.c (cp_parser_direct_declarator): Set declarator to
2167         cp_error_declarator on invalid qualified-id.
2169 2014-03-04  Paolo Carlini  <paolo.carlini@oracle.com>
2171         PR c++/60376
2172         * parser.c (cp_parser_using_declaration): Early return when
2173         cp_parser_nested_name_specifier errors out.
2175 2014-03-01  Adam Butcher  <adam@jessamine.co.uk>
2177         PR c++/60377
2178         * parser.c (cp_parser_parameter_declaration_clause): Unwind generic
2179         function scope on parse error in function parameter list.
2181 2014-03-01  Paolo Carlini  <paolo.carlini@oracle.com>
2183         * method.c (implicitly_declare_fn): Remove redundant
2184         DECL_TEMPLATE_RESULT and STRIP_TEMPLATE uses.
2185         * semantics.c (is_instantiation_of_constexpr): Likewise.
2186         * error.c (dump_function_decl): Likewise.
2188 2014-03-01  Jason Merrill  <jason@redhat.com>
2190         PR c++/60379
2191         * semantics.c (begin_maybe_infinite_loop): Use
2192         fold_non_dependent_expr_sfinae.
2194 2014-02-28  Jason Merrill  <jason@redhat.com>
2196         PR c++/58845
2197         * typeck.c (cp_build_binary_op): Sorry on vector&&vector.
2199 2014-02-28  Paolo Carlini  <paolo.carlini@oracle.com>
2201         PR c++/58610
2202         * cp-tree.h (DECL_DELETED_FN): Use LANG_DECL_FN_CHECK.
2203         * call.c (print_z_candidate): Remove STRIP_TEMPLATE use.
2204         * lambda.c (maybe_add_lambda_conv_op): Likewise.
2206 2014-02-27  Paolo Carlini  <paolo.carlini@oracle.com>
2208         PR c++/60253
2209         * call.c (convert_arg_to_ellipsis): Return error_mark_node after
2210         error_at.
2212 2014-02-27  Jason Merrill  <jason@redhat.com>
2214         PR c++/60353
2215         PR c++/55877
2216         * decl2.c (tentative_decl_linkage): Don't mess with functions that
2217         are not yet defined.
2219 2014-02-26  Jason Merrill  <jason@redhat.com>
2221         PR c++/60347
2222         PR lto/53808
2223         * class.c (clone_function_decl): Don't note_vague_linkage_fn.
2224         * init.c (build_vtbl_address): Do it here.
2226         PR c++/59231
2227         PR c++/11586
2228         PR c++/14710
2229         PR c++/57132
2230         * pt.c (struct warning_sentinel): New.
2231         (tsubst_copy_and_build): Use it instead of
2232         c_inhibit_evaluation_warnings.
2233         * typeck.c (maybe_warn_about_useless_cast): Remove
2234         c_inhibit_evaluation_warnings check.
2236         PR c++/54440
2237         * pt.c (get_template_parm_index): New.
2238         (fixed_parameter_pack_p_1, fixed_parameter_pack_p): New.
2239         (process_template_parm): Allow bare packs in template template
2240         parm template parms.
2241         (coerce_template_parameter_pack): Handle fixed template template
2242         parm packs and fixed packs not at the end of the parm list.
2243         (coerce_template_parms): Handle template parm packs not at the end
2244         of the parm list.
2245         (gen_elem_of_pack_expansion_instantiation): Handle a decl expansion.
2247         PR c++/60182
2248         * pt.c (unify): Ignore alias templates when deducing a template
2249         template parameter.
2251         PR c++/60345
2252         Revert:
2253         DR 1571
2254         * call.c (reference_binding): Recurse on user-defined conversion.
2255         (convert_like_real) [ck_ref_bind]: Explain cv-qual mismatch.
2257 2014-02-25  Jason Merrill  <jason@redhat.com>
2259         DR 1571
2260         * call.c (reference_binding): Recurse on user-defined conversion.
2261         (convert_like_real) [ck_ref_bind]: Explain cv-qual mismatch.
2263         * call.c (print_conversion_rejection): Handle n_arg of -2.
2264         (build_user_type_conversion_1): Pass it.
2266         PR c++/55877
2267         * decl2.c (no_linkage_error): Handle C++98 semantics.
2268         (reset_type_linkage): Move from decl.c.
2269         (reset_type_linkage_1, reset_type_linkage_2, bt_reset_linkage_1)
2270         (bt_reset_linkage_2, reset_decl_linkage): New.
2271         (tentative_decl_linkage): Factor out of expand_or_defer_fn_1.
2272         (cp_write_global_declarations): Move condition into no_linkage_error.
2273         * decl.c (grokfndecl, grokvardecl): Use no_linkage_error.
2274         * semantics.c (expand_or_defer_fn_1): Factor out
2275         tentative_decl_linkage.
2276         * cp-tree.h: Adjust.
2278         * decl2.c (finish_static_data_member_decl): Diagnose static data
2279         member in unnamed class.
2280         * class.c (finish_struct_anon_r): Avoid redundant diagnostic.
2282         PR lto/53808
2283         * class.c (clone_function_decl): Call note_vague_linkage_fn for
2284         defaulted virtual dtor.
2286         DR 1286
2287         PR c++/60328
2288         * pt.c (get_underlying_template): Fix equivalence calculation.
2290 2014-02-25  Adam Butcher  <adam@jessamine.co.uk>
2292         PR c++/60311
2293         * parser.c (function_being_declared_is_template_p): Return false when
2294         processing a template parameter list.
2295         (cp_parser_parameter_declaration_clause): Don't set
2296         auto_is_implicit_function_template_parm_p when processing a
2297         template parameter list.
2299         * parser.c (synthesize_implicit_template_parm): Inject new template
2300         argument list appropriately when a generic member function
2301         of a class template is declared out-of-line.
2303         PR c++/60065
2304         * parser.c (cp_parser_direct_declarator): Don't save and
2305         restore num_template_parameter_lists around call to
2306         cp_parser_parameter_declaration_list.
2307         (function_being_declared_is_template_p): New predicate.
2308         (cp_parser_parameter_declaration_list): Use
2309         function_being_declared_is_template_p as predicate for
2310         inspecting current function template parameter list length
2311         rather than num_template_parameter_lists.
2313 2014-02-24  Jason Merrill  <jason@redhat.com>
2315         PR c++/60146
2316         * pt.c (tsubst_omp_for_iterator): Don't let substitution of the
2317         DECL_EXPR initialize a non-class iterator.
2319         PR c++/60312
2320         * parser.c (cp_parser_template_type_arg): Check for invalid 'auto'.
2322 2014-02-21  Jason Merrill  <jason@redhat.com>
2324         PR c++/58170
2325         * parser.c (cp_parser_type_name): Always check dependency.
2326         (cp_parser_type_specifier_seq): Call
2327         cp_parser_parse_and_diagnose_invalid_type_name.
2329         PR c++/60108
2330         * semantics.c (expand_or_defer_fn_1): Check DECL_DEFAULTED_FN.
2332         PR c++/60185
2333         * parser.c (cp_parser_default_argument): Clear
2334         current_class_ptr/current_class_ref like tsubst_default_argument.
2336         PR c++/60252
2337         * lambda.c (maybe_resolve_dummy): Check lambda_function rather
2338         than current_binding_level.
2340         PR c++/60186
2341         * typeck2.c (massage_init_elt): Call fold_non_dependent_expr_sfinae.
2343         PR c++/60187
2344         * parser.c (cp_parser_enum_specifier): Call
2345         check_for_bare_parameter_packs.
2347         PR c++/59347
2348         * pt.c (tsubst_decl) [TYPE_DECL]: Don't try to instantiate an
2349         erroneous typedef.
2351         PR c++/60241
2352         * pt.c (lookup_template_class_1): Update DECL_TEMPLATE_INSTANTIATIONS
2353         of the partial instantiation, not the most general template.
2354         (maybe_process_partial_specialization): Reassign everything on
2355         that list.
2357         PR c++/60216
2358         * pt.c (register_specialization): Copy DECL_DELETED_FN to clones.
2359         (check_explicit_specialization): Don't clone.
2361         PR c++/60219
2362         * pt.c (coerce_template_parms): Bail if argument packing fails.
2364         PR c++/60224
2365         * decl.c (cp_complete_array_type, maybe_deduce_size_from_array_init):
2366         Don't get confused by a CONSTRUCTOR that already has a type.
2368         PR c++/60227
2369         * call.c (build_array_conv): Don't crash on VLA.
2371         PR c++/60248
2372         * mangle.c (mangle_decl): Don't make an alias for a TYPE_DECL.
2374         PR c++/60252
2375         * lambda.c (maybe_resolve_dummy): Don't try to capture this
2376         in declaration context.
2378         DR 1591
2379         PR c++/60051
2380         * pt.c (unify): Only unify if deducible.  Handle 0-length list.
2382         PR c++/60250
2383         * parser.c (cp_parser_direct_declarator): Don't wrap a
2384         type-dependent expression in a NOP_EXPR.
2386         PR c++/60251
2387         * lambda.c (is_normal_capture_proxy): Handle VLA capture.
2389         PR c++/60167
2390         PR c++/60222
2391         PR c++/58606
2392         * parser.c (cp_parser_template_argument): Restore dereference.
2393         * pt.c (template_parm_to_arg): Dereference non-pack expansions too.
2394         (process_partial_specialization): Handle deref.
2395         (unify): Likewise.
2397 2014-02-21  Adam Butcher  <adam@jessamine.co.uk>
2399         PR c++/60052
2400         PR c++/60053
2401         * parser.c (cp_parser_parameter_declaration_list): Correctly reset
2402         implicit_template_scope upon leaving an out-of-line generic member
2403         function definition.
2405 2014-02-20  Kai Tietz  <ktietz@redhat.com>
2407         PR c++/58873
2408         * parser.c (cp_parser_functional_cast): Treat NULL_TREE
2409         valued type argument as error_mark_node.
2411         PR c++/58835
2412         * semantics.c (finish_fname): Handle error_mark_node.
2414 2014-02-19  Jason Merrill  <jason@redhat.com>
2416         PR c++/60046
2417         * pt.c (maybe_instantiate_noexcept): Don't instantiate exception
2418         spec from template context.
2420 2014-02-19  Jakub Jelinek  <jakub@redhat.com>
2422         PR debug/56563
2423         * cp-objcp-common.c (cp_function_decl_explicit_p): Remove
2424         FUNCTION_FIRST_USER_PARMTYPE (decl) != void_list_node check.
2426         PR c++/60267
2427         * pt.c (tsubst_expr): Handle ANNOTATE_EXPR.
2429 2014-02-18  Paolo Carlini  <paolo.carlini@oracle.com>
2431         PR c++/60225
2432         * semantics.c (ensure_literal_type_for_constexpr_object): Use
2433         strip_array_types.
2435 2014-02-18  Paolo Carlini  <paolo.carlini@oracle.com>
2437         PR c++/60215
2438         * semantics.c (cxx_eval_constant_expression, [COMPONENT_REF]):
2439         During error recovery allow_non_constant may be false.
2441 2014-02-18  Adam Butcher  <adam@jessamine.co.uk>
2443         PR c++/60190
2444         * parser.c (cp_parser_lambda_declarator_opt): Pop template parameter
2445         scope whenever a template parameter list has been started, independent
2446         of whether the function call operator was well-formed or not.
2448         PR c++/60064
2449         * parser.c (cp_parser_member_declaration): Pop fully implicit template
2450         scope for generic friend declarations as well as for non-friends.
2452 2014-02-12  Paolo Carlini  <paolo.carlini@oracle.com>
2454         PR c++/60047
2455         * method.c (implicitly_declare_fn): A constructor of a class with
2456         virtual base classes isn't constexpr (7.1.5p4).
2458 2014-02-05  Jan Hubicka  <hubicka@ucw.cz
2460         * parser.c (synthesize_implicit_template_parm): Use grow_tree_vec.
2462 2014-02-05  Jakub Jelinek  <jakub@redhat.com>
2464         PR c++/58703
2465         * parser.c (cp_parser_omp_declare_reduction): Save and free
2466         declarator_obstack.
2468 2014-02-03  Marc Glisse  <marc.glisse@inria.fr>
2470         PR c++/53017
2471         PR c++/59211
2472         * tree.c (handle_init_priority_attribute): Call default_conversion on
2473         the attribute argument.
2475 2014-02-03  Paolo Carlini  <paolo.carlini@oracle.com>
2477         PR c++/58871
2478         * method.c (synthesized_method_walk): If vbases is non-null but
2479         is_empty is true, likewise don't worry about the virtual bases.
2481 2014-02-01  Paolo Carlini  <paolo.carlini@oracle.com>
2483         PR c++/51219
2484         * typeck2.c (process_init_constructor_record): Just skip unnamed
2485         bit-fields.
2487 2014-01-31  Jason Merrill  <jason@redhat.com>
2489         PR c++/59469
2490         * pt.c (mark_decl_instantiated): Call mark_needed.
2492         PR c++/58672
2493         * decl2.c (handle_tls_init): Handle null init fn.
2495         PR c++/55800
2496         * decl2.c (get_tls_init_fn): Copy DECL_EXTERNAL from the variable.
2498 2014-01-31  Paolo Carlini  <paolo.carlini@oracle.com>
2500         PR c++/59082
2501         * class.c (build_vfield_ref): Early return error_mark_node if
2502         TYPE_VFIELD (type) is null.
2503         (build_base_path): Check return value of build_vfield_ref.
2505 2014-01-31  Jason Merrill  <jason@redhat.com>
2507         PR c++/59646
2508         * call.c (convert_like_real) [ck_aggr]: Set TARGET_EXPR_LIST_INIT_P.
2509         [ck_list]: Check for error_mark_node.
2510         (build_aggr_conv): Set LOOKUP_NO_NARROWING and check_narrowing.
2512         PR c++/57043
2513         * pt.c (fn_type_unification): Don't do DEDUCE_EXACT check
2514         during partial ordering.
2516 2014-01-31  Marek Polacek  <polacek@redhat.com>
2518         PR c/59963
2519         * typeck.c (build_function_call_vec): Add dummy arg_loc parameter.
2521 2014-01-30  Jason Merrill  <jason@redhat.com>
2523         PR c++/57899
2524         * cp-tree.h (struct saved_scope): Add x_local_specializations.
2525         (local_specializations): New macro.
2526         * pt.c (local_specializations): Remove variable.
2528 2014-01-30  Richard Sandiford  <rdsandiford@googlemail.com>
2530         PR c++/58708
2531         * parser.c (make_string_pack): Use double_int::from_buffer.
2533 2014-01-30  Marek Polacek  <polacek@redhat.com>
2535         PR c/59940
2536         * typeck.c (build_ptrmemfunc1): Call convert_and_check with
2537         input_location.
2538         * cvt.c (cp_convert_and_check): Call warnings_for_convert_and_check
2539         with input_location.
2540         * call.c (build_conditional_expr_1): Call unsafe_conversion_p with
2541         loc parameter.
2543 2014-01-30  Paolo Carlini  <paolo.carlini@oracle.com>
2545         PR c++/58843
2546         * typeck.c (lookup_destructor): Check dtor_type for error_mark_node.
2548 2014-01-30  Paolo Carlini  <paolo.carlini@oracle.com>
2550         PR c++/58649
2551         * pt.c (lookup_template_class_1): Check start_enum return value
2552         for error_mark_node.
2554 2014-01-30  Paolo Carlini  <paolo.carlini@oracle.com>
2556         * decl.c (duplicate_decls, typename_hash, typename_compare):
2557         Use TYPE_IDENTIFIER.
2558         * error.c (dump_type): Likewise.
2559         * mangle.c (dump_substitution_candidates): Likewise.
2561 2014-01-30  Jason Merrill  <jason@redhat.com>
2563         PR c++/59633
2564         * decl2.c (attributes_naming_typedef_ok): New.
2565         * cp-tree.h: Declare it.
2566         * decl.c (grokdeclarator): Check it.
2567         * tree.c (no_linkage_check): Handle VECTOR_TYPE.
2569 2014-01-29  Jason Merrill  <jason@redhat.com>
2571         PR c++/59707
2572         * call.c (add_builtin_candidate): Catch dependent types.
2574         PR c++/59989
2575         * pt.c (expand_template_argument_pack): Correct
2576         non_default_args_count calculation.
2578         PR c++/58466
2579         * pt.c (unify_pack_expansion): Call expand_template_argument_pack.
2581         PR c++/59956
2582         * friend.c (do_friend): Pass the TEMPLATE_DECL to add_friend if we
2583         have a friend template in a class template.
2584         * pt.c (tsubst_friend_function): Look through it.
2585         (push_template_decl_real): A friend member template is
2586         primary.
2588 2014-01-29  Paolo Carlini  <paolo.carlini@oracle.com>
2590         PR c++/58846
2591         * decl.c (get_dso_handle_node): Don't crash if dso_handle_node
2592         == error_mark_node.
2594 2014-01-29  Paolo Carlini  <paolo.carlini@oracle.com>
2596         PR c++/58674
2597         * pt.c (instantiate_template_1): Check for error_mark_node the second
2598         argument too.
2600 2014-01-29  Jason Merrill  <jason@redhat.com>
2602         PR c++/59916
2603         * optimize.c (maybe_thunk_body): Build a RETURN_EXPR for
2604         cdtor_returns_this case.
2606         PR c++/59315
2607         * decl.c (cxx_maybe_build_cleanup): Call mark_used.
2609 2014-01-29  Paolo Carlini  <paolo.carlini@oracle.com>
2611         PR c++/58702
2612         * semantics.c (finish_omp_reduction_clause): Check type for
2613         error_mark_node.
2615 2014-01-28  Jason Merrill  <jason@redhat.com>
2617         PR c++/59791
2618         * pt.c (tsubst_decl) [VAR_DECL]: Allow in unevaluated context.
2619         (tsubst_copy): Use it if lookup fails.
2621         PR c++/59818
2622         * pt.c (tsubst_function_type): Make sure we keep the same function
2623         quals.
2625         PR c++/58701
2626         * semantics.c (build_anon_member_initialization): Stop walking
2627         when we run out of COMPONENT_REFs.
2629         PR c++/58632
2630         * decl.c (lookup_and_check_tag): Ignore template parameters if
2631         scope == ts_current.
2632         * pt.c (check_template_shadow): Don't complain about the injected
2633         class name.
2635         * decl.c (duplicate_decls): Tweak.
2637         PR c++/53756
2638         * mangle.c (write_unqualified_name): Handle operator auto.
2640 2014-01-27  Jason Merrill  <jason@redhat.com>
2642         PR c++/59823
2643         Core DR 1138
2644         * call.c (reference_binding): Pass LOOKUP_NO_TEMP_BIND for
2645         list-initialization.  A conversion to rvalue ref that involves
2646         an lvalue-rvalue conversion is bad.
2647         (convert_like_real): Give helpful error message.
2649         PR c++/54652
2650         * decl.c (duplicate_decls): Always use oldtype for TYPE_DECL.
2652         PR c++/58504
2653         * pt.c (tsubst_copy_and_build) [TRAIT_EXPR]: Use tsubst for
2654         types.
2656         PR c++/58606
2657         * pt.c (template_parm_to_arg): Call convert_from_reference.
2658         (tsubst_template_arg): Don't strip reference refs.
2660         PR c++/58639
2661         * call.c (build_aggr_conv): Reject value-initialization of reference.
2663         PR c++/58812
2664         PR c++/58651
2665         * call.c (convert_like_real): Give helpful error about excess braces
2666         for ck_rvalue of scalar type.
2668         Core DR 1288
2669         * call.c (reference_binding): Only elide braces if the single
2670         element is reference-related.
2672         PR c++/58814
2673         * typeck.c (cp_build_modify_expr): Make the RHS an rvalue before
2674         stabilizing.
2676         PR c++/58837
2677         * typeck.c (cp_truthvalue_conversion): Use explicit comparison for
2678         FUNCTION_DECL.
2680         PR c++/59097
2681         * decl.c (compute_array_index_type): Don't call
2682         maybe_constant_value for a non-integral expression.
2684 2014-01-24  Balaji V. Iyer  <balaji.v.iyer@intel.com>
2686         * call.c (magic_varargs_p): Replaced flag_enable_cilkplus with
2687         flag_cilkplus.
2688         * cp-gimplify.c (cp_genericize): Likewise.
2689         * decl.c (grokfndecl): Likewise.
2690         * parser.c (cp_parser_postfix_expression): Likewise.
2691         (cp_parser_postfix_open_square_expression): Likewise.
2692         (cp_parser_direct_declarator): Likewise.
2693         (is_cilkplus_vector_p): Likewise.
2694         (cp_parser_omp_clause_name): Likewise.
2695         (cp_parser_omp_all_clauses): Likewise.
2696         * pt.c (apply_late_template_attributes): Likewise.
2697         * typeck.c (cp_build_array_ref): Likewise.
2698         (cp_build_compound_expr): Likewise.
2699         (check_return_expr): Likewise.
2701 2014-01-24  Jason Merrill  <jason@redhat.com>
2703         PR c++/58550
2704         * decl.c (grokdeclarator): Turn pedwarn about auto return type in
2705         c++11 into error.
2707         PR c++/59886
2708         PR c++/59659
2709         * typeck2.c (process_init_constructor_array): Don't create
2710         RANGE_EXPR yet.
2712 2014-01-24  Jakub Jelinek  <jakub@redhat.com>
2714         * typeck2.c (split_nonconstant_init_1): Fix num_split_elts
2715         handling for RANGE_ARRAY case.
2717 2014-01-24  Paolo Carlini  <paolo.carlini@oracle.com>
2719         PR c++/57524
2720         * name-lookup.c (push_using_directive): Use timevar_cond_start.
2722 2014-01-23  Marek Polacek  <polacek@redhat.com>
2724         PR c/59846
2725         * typeck.c (cp_build_binary_op): Pass location to shorten_compare.
2727 2014-01-23  Marek Polacek  <polacek@redhat.com>
2729         PR c/58346
2730         * typeck.c (pointer_diff): Give an error on arithmetic on pointer to
2731         an empty aggregate.
2733 2014-01-23  Jason Merrill  <jason@redhat.com>
2735         PR c++/55189
2736         * cp-tree.h (struct language_function): Add infinite_loop and
2737         infinite_loops.
2738         (current_function_infinite_loop): New.
2739         * semantics.c (begin_maybe_infinite_loop, end_maybe_infinite_loop)
2740         (break_maybe_infinite_loop): New.
2741         (finish_while_stmt_cond, finish_while_stmt, begin_do_stmt)
2742         (finish_do_stmt, finish_for_cond, finish_for_stmt)
2743         (begin_range_for_stmt): Use them.
2744         * decl.c (finish_function): Don't warn about missing return
2745         if current_function_infinite_loop.
2746         * pt.c (instantiate_decl): Copy current_function_infinite_loop.
2747         * parser.c (cp_parser_jump_statement): Call break_maybe_infinite_loop.
2749         * call.c (build_op_delete_call): Use make_tree_vector and
2750         release_tree_vector.
2752 2014-01-23  Paolo Carlini  <paolo.carlini@oracle.com>
2754         PR c++/58980
2755         * parser.c (cp_parser_enum_specifier): Handle TYPENAME_TYPE as
2756         nested_name_specifier.
2758 2014-01-23  Balaji V. Iyer  <balaji.v.iyer@intel.com>
2760         * parser.c (cp_parser_direct_declarator): When Cilk Plus is enabled
2761         see if there is an attribute after function decl.  If so, then
2762         parse them now.
2763         (cp_parser_late_return_type_opt): Handle parsing of Cilk Plus SIMD
2764         enabled function late parsing.
2765         (cp_parser_gnu_attribute_list): Parse all the tokens for the vector
2766         attribute for a SIMD-enabled function.
2767         (cp_parser_omp_all_clauses): Skip parsing to the end of pragma when
2768         the function is used by SIMD-enabled function (indicated by NULL
2769         pragma token).   Added 3 new clauses: PRAGMA_CILK_CLAUSE_MASK,
2770         PRAGMA_CILK_CLAUSE_NOMASK and PRAGMA_CILK_CLAUSE_VECTORLENGTH
2771         (cp_parser_cilk_simd_vectorlength): Modified this function to handle
2772         vectorlength clause in SIMD-enabled function and #pragma SIMD's
2773         vectorlength clause.  Added a new bool parameter to differentiate
2774         between the two.
2775         (cp_parser_cilk_simd_fn_vector_attrs): New function.
2776         (is_cilkplus_vector_p): Likewise.
2777         (cp_parser_late_parsing_elem_fn_info): Likewise.
2778         (cp_parser_omp_clause_name): Added a check for "mask", "nomask"
2779         and "vectorlength" clauses when Cilk Plus is enabled.
2780         (cp_parser_omp_clause_linear): Added a new parameter of type bool
2781         and emit a sorry message when step size is a parameter.
2782         * parser.h (cp_parser::cilk_simd_fn_info): New field.
2783         * decl.c (grokfndecl): Added flag_enable_cilkplus along with
2784         flag_openmp.
2785         * pt.c (apply_late_template_attributes): Likewise.
2787 2014-01-23  Jakub Jelinek  <jakub@redhat.com>
2789         PR middle-end/58809
2790         * semantics.c (finish_omp_reduction_clause): Reject
2791         BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
2793 2014-01-22  Ville Voutilainen  <ville.voutilainen@gmail.com>
2795         PR c++/59482
2796         * parser.c (cp_parser_class_head): Push the class before parsing
2797         the base-clause, pop after it.
2799 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
2801         * decl2.c (cpp_check): Revert prototype change.
2803 2014-01-17  Paolo Carlini  <paolo.carlini@oracle.com>
2805         PR c++/59270
2806         PR c++/58811
2807         * init.c (build_value_init_noctor): Don't pass error_mark_node to
2808         build_value_init.
2810 2014-01-17  Paolo Carlini  <paolo.carlini@oracle.com>
2812         PR c++/59269
2813         * init.c (build_value_init_noctor): Assert !TYPE_HAS_COMPLEX_DFLT
2814         only when errorcount == 0.
2816 2014-01-17  Marek Polacek  <polacek@redhat.com>
2818         PR c++/59838
2819         * cvt.c (ocp_convert): Don't segfault on non-existing
2820         ENUM_UNDERLYING_TYPE.
2822 2014-01-16  Jason Merrill  <jason@redhat.com>
2824         PR c++/59821
2825         * tree.c (bot_manip): Update the location of builtin_LINE and
2826         builtin_FILE calls.
2828 2014-01-14  Jason Merrill  <jason@redhat.com>
2830         PR c++/59659
2831         * typeck2.c (massage_init_elt): New.
2832         (process_init_constructor_record)
2833         (process_init_constructor_union): Use it.
2834         (process_init_constructor_array): Use it.  Use RANGE_EXPR.
2835         (split_nonconstant_init_1): Handle it.
2836         * semantics.c (cxx_eval_vec_init_1): Use force_rvalue.
2838 2014-01-09  Balaji V. Iyer  <balaji.v.iyer@intel.com>
2840         PR c++/59631
2841         * parser.c (cp_parser_postfix_expression): Added a new if-statement
2842         and replaced an existing if-statement with else-if statement.
2843         Changed an existing error message wording to match the one from the C
2844         parser.
2846 2014-01-08  Jason Merrill  <jason@redhat.com>
2848         PR c++/59614
2849         * class.c (abi_tag_data): Add tags field.
2850         (check_abi_tags): Initialize it.
2851         (find_abi_tags_r): Support collecting missing tags.
2852         (mark_type_abi_tags): Don't look at template args.
2853         (inherit_targ_abi_tags): New.
2854         (check_bases_and_members): Use it.
2855         * cp-tree.h (ABI_TAG_IMPLICIT): New.
2856         * mangle.c (write_abi_tags): Check it.
2858 2014-01-07  Jason Merrill  <jason@redhat.com>
2860         PR c++/58856
2861         * pt.c (num_innermost_template_parms): New.
2862         (get_underlying_template): Use it.
2864         PR c++/58965
2865         * mangle.c (write_guarded_var_name): Handle null DECL_NAME.
2867 2014-01-07  Paolo Carlini  <paolo.carlini@oracle.com>
2869         * semantics.c (trait_expr_value, [CPTK_IS_BASE_OF]): Implement
2870         the letter of 20.11.6 about Base and Derived naming the same
2871         class type modulo cv-qualifiers.
2873 2014-01-06  Adam Butcher  <adam@jessamine.co.uk>
2875         PR c++/59635
2876         * lambda.c (maybe_add_lambda_conv_op): Handle marking conversion
2877         function as unimplemented for generic lambdas with varargs.
2879         PR c++/59636
2880         * parser.c (cp_parser_template_parameter): Early out with
2881         error_mark_node if parameter declaration was not parsed.
2883         PR c++/59629
2884         * parser.c (cp_parser_lambda_expression): Save/reset/restore
2885         auto_is_implicit_function_template_parm_p around lambda body.
2887         PR c++/59638
2888         * parser.c (cp_parser_init_declarator): Undo fully implicit
2889         template parameter list when declarator is not a function.
2891 2014-01-03  Marc Glisse  <marc.glisse@inria.fr>
2893         PR c++/58950
2894         * cvt.c (convert_to_void): Handle VEC_PERM_EXPR and VEC_COND_EXPR.
2896 2014-01-03  Tobias Burnus  <burnus@net-b.de>
2898         PR c++/58567
2899         * pt.c (tsubst_omp_for_iterator): Early return for error_mark_node.
2901 2014-01-03  Paolo Carlini  <paolo.carlini@oracle.com>
2903         Core DR 1442
2904         PR c++/59165
2905         * parser.c (cp_parser_perform_range_for_lookup): Don't pass true
2906         as include_std to perform_koenig_lookup.
2907         (cp_parser_postfix_expression): Adjust.
2908         * pt.c (tsubst_copy_and_build): Likewise.
2909         * semantics.c (perform_koenig_lookup): Remove bool parameter.
2910         (omp_reduction_lookup): Adjust.
2911         * name-lookup.c (lookup_arg_dependent_1): Remove bool parameter.
2912         (lookup_arg_dependent): Likewise.
2913         (lookup_function_nonclass): Adjust.
2914         * name-lookup.h: Adjust declaration.
2915         * cp-tree.h: Likewise.
2917 2014-01-02  Marc Glisse  <marc.glisse@inria.fr>
2919         PR c++/59087
2920         * parser.c (cp_parser_userdef_numeric_literal): Mention
2921         -fext-numeric-literals in the message.
2923 2014-01-02  Marc Glisse  <marc.glisse@inria.fr>
2925         PR c++/59641
2926         * call.c (build_conditional_expr_1): Check the return value of
2927         force_rvalue.
2929 2014-01-02  Marc Glisse  <marc.glisse@inria.fr>
2931         * call.c (convert_like_real): Check complain.
2933 2014-01-02  Marc Glisse  <marc.glisse@inria.fr>
2935         PR c++/59378
2936         * typeck.c (build_x_vec_perm_expr): Handle non-dependent arguments
2937         in templates.
2939 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
2941         Update copyright years
2943 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
2945         * cp-array-notation.c, cp-cilkplus.c, vtable-class-hierarchy.c: Use
2946         the standard form for the copyright notice.
2948 Copyright (C) 2014 Free Software Foundation, Inc.
2950 Copying and distribution of this file, with or without modification,
2951 are permitted in any medium without royalty provided the copyright
2952 notice and this notice are preserved.