63ed0473f2dabf44369e3c4c9fa644bba0965e23
[platform/upstream/gcc.git] / gcc / cp / ChangeLog
1 2015-10-05  Paolo Carlini  <paolo.carlini@oracle.com>
2
3         PR c++/53856
4         * pt.c (check_default_tmpl_args): Per [temp.param]/9, do not
5         reject default template arguments in out of class definitions
6         of members of non-template classes.
7
8 2015-10-05  Richard Sandiford  <richard.sandiford@arm.com>
9
10         * tree.c (cp_tree_equal): Use real_equal instead of
11         REAL_VALUES_EQUAL.
12
13 2015-10-04  Jason Merrill  <jason@redhat.com>
14
15         Implement N4514, C++ Extensions for Transactional Memory.
16         * cp-tree.h (struct cp_declarator): Add tx_qualifier field.
17         (BCS_NORMAL, BCS_TRANSACTION): New enumerators.
18         * lex.c (init_reswords): Limit TM kewords to -fgnu-tm.
19         * parser.c (cp_lexer_get_preprocessor_token): Fix @synchronized.
20         (make_call_declarator): Take tx_qualifier.
21         (cp_parser_tx_qualifier_opt): New.
22         (cp_parser_lambda_declarator_opt): Use it.
23         (cp_parser_direct_declarator): Likewise.
24         (cp_parser_statement): Handle atomic_noexcept, atomic_cancel.
25         (cp_parser_compound_statement): Change in_try parameter to bcs_flags.
26         (cp_parser_std_attribute): Map optimize_for_synchronized to
27         transaction_callable.
28         (cp_parser_transaction): Take the token.  Handle atomic_noexcept.
29         * lambda.c (maybe_add_lambda_conv_op): Handle transaction-safety.
30         * call.c (enum conversion_kind): Add ck_tsafe.
31         (standard_conversion): Handle transaction-safety conversion.
32         (convert_like_real, resolve_address_of_overloaded_function): Likewise.
33         (check_methods): Diagnose transaction_safe_dynamic on non-virtual
34         function.
35         (look_for_tm_attr_overrides): Don't inherit transaction_safe_dynamic.
36         * cvt.c (tx_safe_fn_type_p, tx_unsafe_fn_variant)
37         (can_convert_tx_safety): New.
38         * typeck.c (composite_pointer_type): Handle transaction-safety.
39         * name-lookup.h (enum scope_kind): Add sk_transaction.
40         * name-lookup.c (begin_scope): Handle it.
41         * semantics.c (begin_compound_stmt): Pass it.
42         * decl.c (check_previous_goto_1): Check it.
43         (struct named_label_entry): Add in_transaction_scope.
44         (poplevel_named_label_1): Set it.
45         (check_goto): Check it.
46         (duplicate_decls): A specialization can be transaction_safe
47         independently of its template.
48         (grokdeclarator): Handle tx-qualifier.
49         * rtti.c (ptr_initializer): Handle transaction-safe.
50         * search.c (check_final_overrider): Check transaction_safe_dynamic.
51         Don't check transaction_safe.
52         * mangle.c (write_function_type): Mangle transaction_safe here.
53         (write_CV_qualifiers_for_type): Not here.
54         (write_type): Preserve transaction_safe when stripping attributes.
55         * error.c (dump_type_suffix): Print transaction_safe.
56
57 2015-10-02  Marek Polacek  <polacek@redhat.com>
58
59         PR c/64249
60         * parser.c (cp_parser_statement): Add CHAIN parameter and pass it
61         down to cp_parser_selection_statement.
62         (cp_parser_selection_statement): Add CHAIN parameter.  Add code to
63         warn about duplicated if-else-if conditions.
64         (cp_parser_implicitly_scoped_statement): Add CHAIN parameter and pass
65         it down to cp_parser_statement.
66
67 2015-10-01  Ville Voutilainen  <ville.voutilainen@gmail.com>
68
69         PR c++/54430
70         * name-lookup.c (push_binding): Make non-static.
71         * name-lookup.h (push_binding): Declare it.
72         * parser.c (cp_parser_range_for): Use it, get the range
73         declaration away from the scope until the range expression
74         has been parsed, then restore the declaration.
75
76 2015-09-23  Ville Voutilainen  <ville.voutilainen@gmail.com>
77
78         Fix small typos in the coding rule enforcement warnings.
79         * parser.c (cp_parser_namespace_definition): Replace 'namepace'
80         with 'namespace'.
81
82 2015-09-22  Nathan Sidwell  <nathan@codesourcery.com>
83
84         * decl.c (xref_basetypes): Check virtual and/or multiple
85         inheritance warning.
86         * parser.c (cp_parser_namespace_definition): Check namespaces
87         warning.
88         * pt.c (push_template_decl_real): Check templates warning.
89
90 2015-09-22  Jason Merrill  <jason@redhat.com>
91
92         * mangle.c (abi_warn_or_compat_version_crosses): New.
93         Use it instead of abi_version_crosses.
94         (mangle_decl): Deal with -fabi-compat-version and -Wabi separately.
95
96 2015-09-21  Ville Voutilainen  <ville.voutilainen@gmail.com>
97
98         Complete the implementation of N4230, Nested namespace definition.
99         * parser.c (cp_parser_namespace_definition): Support namespace
100         attributes both before and after the namespace identifier.
101
102 2015-09-19  Trevor Saunders  <tbsaunde@tbsaunde.org>
103
104         * cp-gimplify.c (gimplify_must_not_throw_expr): Adjust.
105
106 2015-09-18  Ville Voutilainen  <ville.voutilainen@gmail.com>
107
108         Implement nested namespace definitions.
109         * parser.c (cp_parser_namespace_definition): Grok nested namespace
110         definitions.
111
112 2015-09-18  Manuel López-Ibáñez  <manu@gcc.gnu.org>
113
114         * parser.c (pragma_lex): Add loc argument. Rearrange the code to
115         make it more similar to the C version.
116
117 2015-09-17  Andrew Sutton  <andrew.n.sutton@gmail.com>
118             Jason Merrill  <jason@redhat.com>
119
120         Implement N4295 fold-expressions.
121         * cp-tree.def: Add UNARY_LEFT_FOLD_EXPR, UNARY_RIGHT_FOLD_EXPR,
122         BINARY_LEFT_FOLD_EXPR, BINARY_RIGHT_FOLD_EXPR.
123         * cp-objcp-common.c (cp_common_init_ts): Handle them.
124         * cp-tree.h (FOLD_EXPR_CHECK, BINARY_FOLD_EXPR_CHECK, FOLD_EXPR_P)
125         (FOLD_EXPR_MODIFY_P, FOLD_EXPR_OP, FOLD_EXPR_PACK, FOLD_EXPR_INIT): New.
126         * parser.c (cp_parser_skip_to_closing_parenthesis): Split out...
127         (cp_parser_skip_to_closing_parenthesis_1): This function.  Change
128         or_comma parameter to or_ttype.
129         (cp_parser_fold_operator, cp_parser_fold_expr_p)
130         (cp_parser_fold_expression): New.
131         (cp_parser_primary_expression): Use them.
132         * pt.c (expand_empty_fold, fold_expression, tsubst_fold_expr_pack)
133         (tsubst_fold_expr_init, expand_left_fold, tsubst_unary_left_fold)
134         (tsubst_binary_left_fold, expand_right_fold)
135         (tsubst_unary_right_fold, tsubst_binary_right_fold): New.
136         (tsubst_copy): Use them.
137         (type_dependent_expression_p): Handle fold-expressions.
138         * semantics.c (finish_unary_fold_expr)
139         (finish_left_unary_fold_expr, finish_right_unary_fold_expr)
140         (finish_binary_fold_expr): New.
141
142 2015-09-17  Richard Biener  <rguenther@suse.de>
143
144         * cp-tree.h (note_decl_for_pch): Remove.
145         * class.c (build_clone): Do not call note_decl_for_pch.
146         * semantics.c (finish_member_declaration): Likewise.
147         (note_decl_for_pch): Remove.
148         * decl2.c (c_parse_final_cleanups): Mangle all globals before
149         writing the PCH.
150
151 2015-09-14  Jason Merrill  <jason@redhat.com>
152
153         PR c++/44282
154         * mangle.c (write_CV_qualifiers_for_type): Also warn about regparm
155         mangling with lower -fabi-version.
156
157 2015-09-14  Paolo Carlini  <paolo.carlini@oracle.com>
158
159         PR c++/51911
160         * parser.c (cp_parser_new_expression): Enforce 5.3.4/2 (as amended
161         per the spirit of DR 1467).
162
163 2015-09-11  Mark Wielaard  <mjw@redhat.com>
164
165         PR c/28901
166         * cp-objcp-common.c (cxx_warn_unused_global_decl): Remove hard-coded
167         VAR_P TREE_READONLY override.
168
169 2015-09-10  Paolo Carlini  <paolo.carlini@oracle.com>
170
171         PR c++/67318
172         * parser.c (cp_parser_parameter_declaration): Consume the ellipsis
173         and set template_parameter_pack_p also when the type is null.
174
175 2015-09-09  Mark Wielaard  <mjw@redhat.com>
176
177         * typeck.c (cp_build_binary_op): Check and warn when nonnull arg
178         parm against NULL.
179
180 2015-09-10  Jakub Jelinek  <jakub@redhat.com>
181
182         PR c++/67522
183         * semantics.c (handle_omp_array_sections_1): Only run
184         type_dependent_expression_p on VAR_DECL/PARM_DECLs.
185         (finish_omp_clauses) <case OMP_CLAUSE_LINEAR>: Likewise.
186         Don't adjust OMP_CLAUSE_LINEAR_STEP if OMP_CLAUSE_DECL
187         is not a VAR_DECL/PARM_DECL.
188
189         PR c++/67511
190         * semantics.c (handle_omp_for_class_iterator): Don't wrap
191         error_mark_node into a NOP_EXPR to void_type_node.
192
193 2015-09-09  Paolo Carlini  <paolo.carlini@oracle.com>
194
195         PR c++/53184
196         * decl2.c (constrain_class_visibility): Use Wsubobject-linkage.
197
198 2015-09-09  Jakub Jelinek  <jakub@redhat.com>
199
200         PR c++/67504
201         * parser.c (cp_parser_omp_clause_collapse): Test tree_fits_shwi_p
202         before INTEGRAL_TYPE_P test.
203
204 2015-09-08  Jason Merrill  <jason@redhat.com>
205
206         PR c++/67041
207         * pt.c (tsubst_copy_and_build): Handle variables like functions.
208
209 2015-09-08  Paolo Carlini  <paolo.carlini@oracle.com>
210
211         PR c++/67369
212         * pt.c (tsubst_copy, [case FUNCTION_DECL]): Do not call tsubst
213         if the first argument isn't a template.
214
215 2015-09-03  Martin Sebor  <msebor@redhat.com>
216
217         PR c/66516
218         * cp-tree.h (mark_rvalue_use, decay_conversion): Add new
219         argument(s).
220         * expr.c (mark_rvalue_use): Use new argument.
221         * call.c (build_addr_func): Call decay_conversion with new
222         argument.
223         * pt.c (convert_template_argument): Call reject_gcc_builtin.
224         * typeck.c (decay_conversion): Use new argument.
225         (c_decl_implicit): Define.
226
227 2015-09-02  Balaji V. Iyer  <balaji.v.iyer@intel.com>
228
229         PR middle-end/60586
230         * cp-gimplify.c (cilk_cp_gimplify_call_params_in_spawned_fn): New
231         function.
232         (cp_gimplify_expr): Added a call to the function
233         cilk_cp_gimplify_call_params_in_spawned_fn.
234
235 2015-09-01  Paolo Carlini  <paolo.carlini@oracle.com>
236
237         PR c++/61753
238         * decl.c (smallest_type_quals_location): New.
239         (check_special_function_return_type): Use the latter; add int and
240         const location_t* parameters.
241         (grokdeclarator): Adjust check_special_function_return_type call.
242
243 2015-08-29  Markus Trippelsdorf  <markus@trippelsdorf.de>
244
245         PR c++/67371
246         * constexpr.c (potential_constant_expression_1): Remove IF_STMT
247         case. Move label to COND_EXPR case. Remove checking of
248         SWITCH_STMT_BODY.
249
250 2015-08-22  Paolo Carlini  <paolo.carlini@oracle.com>
251
252         PR c++/63693
253         * pt.c (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE_TYPE
254         only on class types.
255
256 2015-08-21  Jason Merrill  <jason@redhat.com>
257
258         PR c++/67240
259         * constraint.cc (satisfy_implicit_conversion_constraint): Also
260         check for NULL_TREE.
261
262 2015-08-21  Paolo Carlini  <paolo.carlini@oracle.com>
263
264         * decl.c (grokvardecl): Simplify the latter.
265
266 2015-08-21  Paolo Carlini  <paolo.carlini@oracle.com>
267
268         * decl.c (grokvardecl): Complete check added for c++/67065.
269
270 2015-08-20  Jason Merrill  <jason@redhat.com>
271
272         * name-lookup.c (hidden_name_p): Handle OVERLOAD.
273
274 2015-08-20  Paolo Carlini  <paolo.carlini@oracle.com>
275
276         PR c++/67065
277         * decl.c (grokvardecl): Reject 'main' as global variable.
278
279 2015-08-19  Jason Merrill  <jason@redhat.com>
280
281         PR c++/66957
282         * search.c (protected_accessible_p): Remove redundant access_in_type.
283         Add otype parm instead of walking binfo.
284         (friend_accessible_p): Check SCOPE itself.  Handle class
285         templates.  Pass through otype.
286         (dfs_accessible_post): Handle all accessibility cases.
287         (dfs_accessible_pre): New.
288         (accessible_p): Use it.  Don't check protected access here.  Pass
289         decl and otype to dfs_walk.
290         (member_declared_in_type, dfs_access_in_type_pre): New.
291         (access_in_type): Use dfs_access_in_type_pre.
292         * friend.c (add_friend): Fix multiple friends with the same name.
293
294         * lambda.c (current_nonlambda_scope): New.
295
296 2015-08-18  Trevor Saunders  <tbsaunde@tbsaunde.org>
297
298         * call.c, class.c, cp-tree.h, decl.c, except.c, mangle.c,
299         method.c, name-lookup.h, parser.c, parser.h, rtti.c,
300         semantics.c, typeck2.c: Remove useless typedefs.
301
302 2015-08-18  Jason Merrill  <jason@redhat.com>
303
304         DR 1155
305         * pt.c (convert_nontype_argument): Allow internal linkage in C++11
306         and up.
307
308 2015-08-17  Paolo Carlini  <paolo.carlini@oracle.com>
309
310         PR c++/67216
311         * call.c (null_ptr_cst_p): In C++11 return 'false' for 'false'.
312
313 2015-08-17  Jason Merrill  <jason@redhat.com>
314
315         PR c++/67244
316         * pt.c (tsubst_copy_and_build): Call insert_pending_capture_proxies.
317
318         PR c++/67104
319         * constexpr.c (array_index_cmp, find_array_ctor_elt): New.
320         (cxx_eval_array_reference, cxx_eval_store_expression): Use them.
321
322         * constexpr.c (cxx_eval_store_expression): Don't set
323         CONSTRUCTOR_NO_IMPLICIT_ZERO if we have an enclosing CONSTRUCTOR
324         without it.
325         (cxx_eval_array_reference): Check it.
326
327         * except.c (check_noexcept_r): Assert that fn is POINTER_TYPE_P.
328
329 2015-08-14  Jason Merrill  <jason@redhat.com>
330
331         PR c++/65974
332         * decl2.c (mark_vtable_entries): Suppress -Wdeprecated.
333
334 2015-08-12  Jason Merrill  <jason@redhat.com>
335
336         PR c++/67104
337         * constexpr.c (cxx_eval_array_reference): Fix typo.
338
339         PR c++/67104
340         * constexpr.c (cxx_eval_array_reference): Handle sparse
341         CONSTRUCTORs.
342
343         PR c++/67108
344         * decl2.c (c_parse_final_cleanups): Set at_eof to 2 at end.
345         * error.c (dump_template_bindings): Don't tsubst in that case.
346
347         PR c++/67161
348         * error.c (dump_decl) [TEMPLATE_ID_EXPR]: Pass
349         TFF_NO_OMIT_DEFAULT_TEMPLATE_ARGUMENTS.
350
351 2015-08-08  Jason Merrill  <jason@redhat.com>
352
353         PR c++/67152
354         * pt.c (process_partial_specialization): Call
355         associate_classtype_constraints.
356
357         PR c++/67159
358         * constraint.cc (finish_template_introduction):
359         SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT.
360
361         PR c++/67142
362         * pt.c (equal): Make sure tmpl is actually a template.
363
364         PR c++/67144
365         * call.c (joust): Only call more_constrained on decls.
366
367 2015-08-06  Andrew Sutton  <andrew.n.sutton@gmail.com>
368             Braden Obrzut  <admin@maniacsvault.net>
369             Jason Merrill  <jason@redhat.com>
370             Ville Voutilainen  <ville.voutilainen@gmail.com>
371
372         Add C++ Concepts TS support.
373         * constraint.cc, logic.cc: New files.
374         * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add constraint.o and logic.o.
375         (c++.tags): Also process .cc files.
376         * call.c (enum rejection_reason_code): Add rr_constraint_failure.
377         (print_z_candidate): Handle it.
378         (constraint_failure): New.
379         (add_function_candidate): Check constraints.
380         (build_new_function_call): Handle evaluating concepts.
381         (joust): Check more_constrained.
382         * class.c (add_method): Check equivalently_constrained.
383         (build_clone): Copy constraints.
384         (currently_open_class): Return tree.
385         (resolve_address_of_overloaded_function): Check constraints.
386         * constexpr.c (cxx_eval_constant_expression): Handle REQUIRES_EXPR.
387         (potential_constant_expression_1): Likewise.
388         * cp-objcp-common.c (cp_tree_size): Handle CONSTRAINT_INFO.
389         (cp_common_init_ts): Handle WILDCARD_DECL and REQUIRES_EXPR.
390         * cp-tree.def: Add CONSTRAINT_INFO, WILDCARD_DECL, REQUIRES_EXPR,
391         SIMPLE_REQ, TYPE_REQ, COMPOUND_REQ, NESTED_REQ, PRED_CONSTR,
392         EXPR_CONSTR, TYPE_CONSTR, ICONV_CONSTR, DEDUCT_CONSTR,
393         EXCEPT_CONSTR, PARM_CONSTR, CONJ_CONSTR, DISJ_CONSTR.
394         * cp-tree.h (struct tree_constraint_info, check_nonnull)
395         (check_constraint_info, CI_TEMPLATE_REQS, CI_DECLARATOR_REQS)
396         (CI_ASSOCIATED_CONSTRAINTS, CI_NORMALIZED_CONSTRAINTS)
397         (CI_ASSUMPTIONS, TEMPLATE_PARMS_CONSTRAINTS)
398         (TEMPLATE_PARM_CONSTRAINTS, COMPOUND_REQ_NOEXCEPT_P)
399         (PLACEHOLDER_TYPE_CONSTRAINTS, PRED_CONSTR_EXPR, EXPR_CONSTR_EXPR)
400         (TYPE_CONSTR_TYPE, ICONV_CONSTR_EXPR, ICONV_CONSTR_TYPE)
401         (DEDUCT_CONSTR_EXPR, DEDUCT_CONSTR_PATTERN)
402         (DEDUCT_CONSTR_PLACEHOLDER, EXCEPT_CONSTR_EXPR, PARM_CONSTR_PARMS)
403         (PARM_CONSTR_OPERAND, CONSTRAINT_VAR_P, CONSTRAINED_PARM_CONCEPT)
404         (CONSTRAINED_PARM_EXTRA_ARGS, CONSTRAINED_PARM_PROTOTYPE)
405         (DECL_DECLARED_CONCEPT_P, WILDCARD_PACK_P, struct cp_unevaluated)
406         (struct local_specialization_stack, enum auto_deduction_context)
407         (variable_concept_p, concept_template_p)
408         (struct deferring_access_check_sentinel): New.
409         (enum cp_tree_node_structure_enum): Add TS_CP_CONSTRAINT_INFO.
410         (union lang_tree_node): Add constraint_info field.
411         (struct lang_decl_base): Add concept_p flag.
412         (enum cp_decl_spec): Add ds_concept.
413         (struct cp_declarator): Add requires_clause.
414         * cxx-pretty-print.c (cxx_pretty_printer::primary_expression)
415         (cxx_pretty_printer::expression): Handle REQUIRES_EXPR,
416         TRAIT_EXPR, *_CONSTR.
417         (pp_cxx_parameter_declaration_clause): Accept a chain of
418         PARM_DECLs.
419         (cxx_pretty_printer::declarator): Print requires-clause.
420         (pp_cxx_template_declaration): Likewise.
421         (pp_cxx_trait_expression): Handle CPTK_IS_SAME_AS.
422         (pp_cxx_requires_clause, pp_cxx_requirement)
423         (pp_cxx_requirement_list, pp_cxx_requirement_body)
424         (pp_cxx_requires_expr, pp_cxx_simple_requirement)
425         (pp_cxx_type_requirement, pp_cxx_compound_requirement)
426         (pp_cxx_nested_requirement, pp_cxx_predicate_constraint)
427         (pp_cxx_expression_constraint, pp_cxx_type_constraint)
428         (pp_cxx_implicit_conversion_constraint)
429         (pp_cxx_argument_deduction_constraint)
430         (pp_cxx_exception_constraint, pp_cxx_parameterized_constraint)
431         (pp_cxx_conjunction, pp_cxx_disjunction, pp_cxx_constraint): New.
432         * cxx-pretty-print.h: Declare them.
433         * decl.c (decls_match): Compare constraints.
434         (duplicate_decls): Likewise.  Remove constraints before freeing.
435         (cxx_init_decl_processing): Call init_constraint_processing.
436         (cp_finish_decl): Diagnose concept without initializer.
437         (grokfndecl, grokvardecl): Handle concepts and constraints.
438         (grokdeclarator): Handle concept, requires-clause.
439         (grokparms): No longer static.
440         (xref_tag_1): Check constraints.
441         (finish_function): Call check_function_concept.
442         (cp_tree_node_structure): Handle CONSTRAINT_INFO.
443         (check_concept_refinement, is_concept_var, check_concept_fn): New.
444         * decl2.c (check_classfn): Compare constraints.
445         (mark_used): Don't instantiate concepts.
446         * error.c (dump_template_decl): Print constraints.
447         (dump_function_decl): Likewise.
448         (dump_expr): Handle REQUIRES_EXPR, *_REQ, *_CONSTR.
449         * lex.c (init_reswords): Set D_CXX_CONCEPTS.
450         * method.c (implicitly_declare_fn): Copy constraints from
451         inherited ctor.
452         * parser.h (struct cp_parser): Add in_result_type_constraint_p and
453         prevent_constrained_type_specifiers fields.
454         * parser.c (make_call_declarator): Add requires_clause parm.
455         (cp_parser_new): Clear prevent_constrained_type_specifiers.
456         (cp_parser_primary_expression): Handle RID_IS_SAME_AS, RID_REQUIRES.
457         (cp_parser_postfix_expression): Set prevent_constrained_type_specifiers.
458         (cp_parser_trait_expr): Handle RID_IS_SAME_AS.
459         (cp_parser_declaration): Handle concept introduction.
460         (cp_parser_member_declaration): Likewise.
461         (cp_parser_template_parameter): Handle constrained parameter.
462         (cp_parser_type_parameter): Handle constraints.
463         (cp_parser_decl_specifier_seq): Handle RID_CONCEPT.
464         (cp_parser_template_id): Handle partial concept id.
465         (cp_parser_type_name): Add overload that takes typename_keyword_p.
466         Handle constrained parameter.
467         (cp_parser_nonclass_name): Handle concept names.
468         (cp_parser_alias_declaration): Handle constraints.
469         (cp_parser_late_return_type_opt): Also handle requires-clause.
470         (cp_parser_type_id_1): Handle deduction constraint.
471         (cp_parser_parameter_declaration): Handle constrained parameters.
472         (cp_parser_class_specifier_1): Handle constraints.
473         (cp_parser_template_declaration_after_parameters): Split out from
474         cp_parser_template_declaration_after_export.
475         (cp_parser_single_declaration): Handle constraints.
476         (synthesize_implicit_template_parm): Handle constraints.
477         (cp_parser_maybe_concept_name, cp_parser_maybe_partial_concept_id)
478         (cp_parser_introduction_list, get_id_declarator)
479         (get_unqualified_id, is_constrained_parameter)
480         (cp_parser_check_constrained_type_parm)
481         (cp_parser_constrained_type_template_parm)
482         (cp_parser_constrained_template_template_parm)
483         (constrained_non_type_template_parm, finish_constrained_parameter)
484         (declares_constrained_type_template_parameter)
485         (declares_constrained_template_template_parameter)
486         (check_type_concept, cp_parser_maybe_constrained_type_specifier)
487         (cp_parser_maybe_concept_name, cp_parser_maybe_partial_concept_id)
488         (cp_parser_requires_clause, cp_parser_requires_clause_opt)
489         (cp_parser_requires_expression)
490         (cp_parser_requirement_parameter_list, cp_parser_requirement_body)
491         (cp_parser_requirement_list, cp_parser_requirement)
492         (cp_parser_simple_requirement, cp_parser_type_requirement)
493         (cp_parser_compound_requirement, cp_parser_nested_requirement)
494         (cp_parser_template_introduction)
495         (cp_parser_explicit_template_declaration)
496         (get_concept_from_constraint): New.
497         * pt.c (local_specialization_stack): Implement.
498         (maybe_new_partial_specialization): New.
499         (maybe_process_partial_specialization): Use it.
500         (retrieve_local_specialization, register_local_specialization)
501         (template_parm_to_arg, build_template_decl, extract_fnparm_pack)
502         (tsubst_expr): No longer static.
503         (spec_hasher::equal): Compare constraints.
504         (determine_specialization): Handle constraints.
505         (check_explicit_specialization): Handle concepts.
506         (process_template_parm): Handle constraints.
507         (end_template_parm_list): Add overload taking no arguments.
508         (process_partial_specialization): Handle concepts and constraints.
509         Register partial specializations of variable templates.
510         (redeclare_class_template): Handle constraints.
511         (convert_template_argument): Handle WILDCARD_DECL.  Check
512         is_compatible_template_arg.
513         (coerce_template_parameter_pack): Handle wildcard packs.
514         (coerce_template_parms): DR 1430 also applies to concepts.  Add
515         overloads taking fewer parameters.
516         (lookup_template_class_1): Handle constraints.
517         (lookup_template_variable): Concepts are always bool.
518         (finish_template_variable): Handle concepts and constraints.
519         (tsubst_friend_class): Handle constraints.
520         (gen_elem_of_pack_expansion_instantiation): Handle constraints.
521         (tsubst_pack_expansion): Handle local parameters.
522         (tsubst_decl) [FUNCTION_DECL]: Handle constraints.
523         (tsubst) [TEMPLATE_TYPE_PARM]: Handle deduction constraints.
524         (tsubst_copy_and_build): Handle REQUIRES_EXPR.
525         (more_specialized_fn, more_specialized_partial_spec): Check constraints.
526         (more_specialized_inst): Split out from most_specialized_instantiation.
527         (most_specialized_partial_spec): Check constraints.
528         (instantiate_decl): Never instantiate a concept.
529         (value_dependent_expression_p): Handle REQUIRES_EXPR, TYPE_REQ,
530         variable concepts.
531         (type_dependent_expression_p): Handle WILDCARD_DECL, REQUIRES_EXPR.
532         (instantiation_dependent_r): Handle REQUIRES_EXPR and concepts.
533         (do_auto_deduction): Add overload taking tsubst flags and context enum.
534         Handle constraints.
535         (get_template_for_ordering, most_constrained_function)
536         (is_compatible_template_arg, convert_wildcard_argument)
537         (struct constr_entry, struct constr_hasher, decl_constraints)
538         (valid_constraints_p, get_constraints, set_constraints)
539         (remove_constraints, init_constraint_processing): New.
540         * ptree.c (cxx_print_xnode): Handle CONSTRAINT_INFO.
541         * search.c (lookup_member): Do lookup in the open partial
542         instantiation.
543         * semantics.c (finish_template_template_parm): Handle constraints.
544         (fixup_template_type): New.
545         (finish_template_type): Call it.
546         (trait_expr_value, finish_trait_expr): Handle CPTK_IS_SAME_AS.
547         * tree.c (cp_tree_equal): Handle local parameters, CONSTRAINT_INFO.
548         (cp_walk_subtrees): Handle REQUIRES_EXPR.
549         * typeck.c (cp_build_function_call_vec): Check constraints.
550
551 2015-08-06  Jason Merrill  <jason@redhat.com>
552
553         PR c++/66533
554         * parser.c (cp_parser_primary_expression): Don't skip to the end
555         of the statement if we're parsing tentatively.
556
557         PR c++/67130
558         PR c++/67131
559         PR c++/66260
560         * mangle.c (write_expression) [TEMPLATE_ID_EXPR]: Handle variable
561         templates.
562         * pt.c (tsubst_copy_and_build): Check for argument substitution
563         failure.
564
565 2015-08-05  Jason Merrill  <jason@redhat.com>
566
567         * pt.c (determine_specialization): Print candidates after 'no
568         match' error.
569
570         * decl.c (cp_finish_decl): Tidy.
571         * typeck.c (finish_class_member_access_expr): Use
572         type_dependent_expression_p.
573         * semantics.c (finish_id_expression): Use
574         type_dependent_expression_p.  Don't build_qualified_name for a
575         decl in non-dependent scope.
576         * pt.c (type_dependent_expression_p): A TEMPLATE_ID_EXPR of an
577         identifier is dependent.  Remove variable_template_p check.
578
579         PR c++/66260
580         PR c++/66596
581         PR c++/66649
582         PR c++/66923
583         * pt.c (lookup_template_variable): Use NULL_TREE for type.
584         (instantiate_template_1): Also set DECL_TI_ARGS based on
585         the immediate parent.
586         (tsubst_copy_and_build) [TEMPLATE_ID_EXPR]: Handle variable templates.
587         (finish_template_variable): Add complain parm.
588         * cp-tree.h: Adjust.
589
590         PR c++/65195
591         PR c++/66619
592         * semantics.c (finish_id_expression): Call convert_from_reference
593         for variable template.
594
595 2015-08-04  Jason Merrill  <jason@redhat.com>
596
597         * pt.c (lookup_template_class_1): Clear elt.spec.
598
599         * tree.c (build_target_expr): Copy the location from value.
600
601 2015-08-02  Patrick Palka  <ppalka@gcc.gnu.org>
602
603         * parser.c (cp_parser_selection_statement): Move handling of
604         semicolon body to ...
605         (cp_parser_implicitly_scoped_statement): .. here.  Call
606         warn_for_misleading_indentation even when the body is a
607         semicolon.  Extract token_indent_infos corresponding to the
608         guard, body and next tokens.  Adjust call to
609         warn_for_misleading_indentation accordingly.  Take
610         token_indent_info argument.
611         (cp_parser_already_scoped_statement): Likewise.
612         (cp_parser_selection_statement, cp_parser_iteration_statement):
613         Extract a token_indent_info corresponding to the guard token.
614
615 2015-08-01  Caroline Tice  <cmtice@google.com>
616
617         PR 66521
618         * mangle.c : Add vtable-verify.h to include files.
619         (get_mangled_vtable_map_var_name):  If the DECL_ASSEMBLER_NAME
620         is "<anon>" get the real mangled name for the class instead, and
621         also store the real mangled name in a vector for use later.
622
623 2015-07-31  Marek Polacek  <polacek@redhat.com>
624
625         PR sanitizer/66977
626         * typeck.c (get_member_function_from_ptrfunc): Don't sanitize
627         RSHIFT_EXPR.
628
629 2015-07-30  Paolo Carlini  <paolo.carlini@oracle.com>
630
631         * class.c (check_for_override): Use DECL_SOURCE_LOCATION and "%qD"
632         in warning_at instead of "%q+D" in warning.
633         (warn_hidden): Likewise but use location_of.
634         (finish_struct_anon_r): Likewise use DECL_SOURCE_LOCATION in permerror.
635         (check_bitfield_decl, check_field_decls): Likewise in warning_at.
636         (check_field_decls): Likewise for permerror.
637         (explain_non_literal_class): Likewise for inform.
638         (check_bases_and_members, layout_class_type): Likewise for warning_at.
639         (note_name_declared_in_class): Use location_of in permerror.
640         * name-lookup.c (diagnose_name_conflict): Use location_of in inform.
641         (pushdecl_maybe_friend_1): Use DECL_SOURCE_LOCATION in pedwarn,
642         inform, and warning_at.
643         (check_for_out_of_scope_variable): Likewise for warning_at and
644         permerror.
645
646 2015-07-30  Jason Merrill  <jason@redhat.com>
647
648         DR 1558
649         PR c++/67021
650         * pt.c (tsubst_decl) [TYPE_DECL]: Clear TYPE_DEPENDENT_P_VALID.
651
652 2015-07-28  Paolo Carlini  <paolo.carlini@oracle.com>
653
654         * call.c (build_op_delete_call, convert_like_real, build_over_call):
655         Use Use DECL_SOURCE_LOCATION and "%qD" in inform and pedwarn instead
656         of "%q+D".
657         * constexpr.c (explain_invalid_constexpr_fn): Likewise.
658         * decl.c (duplicate_decls): Likewise for warning/warning_at.
659         * except.c (maybe_noexcept_warning): Likewise.
660         * friend.c (make_friend_class): Likewise for inform.
661         * mangle.c (mangle_decl): Likewise for warning/warning_at.
662         * method.c (process_subob_fn, walk_field_subobs,
663         maybe_explain_implicit_delete): Likewise for inform.
664         * parser.c (cp_parser_lambda_introducer): Likewise.
665         * pt.c (check_specialization_namespace,
666         maybe_process_partial_specialization): Likewise for permerror.
667         (redeclare_class_template): Likewise for inform_n.
668         (coerce_template_parms, tsubst_copy_and_build): Likewise for inform.
669         * search.c (check_final_overrider): Likewise.
670         * semantics.c (process_outer_var_ref): Likewise.
671
672 2015-07-27  Jason Merrill  <jason@redhat.com>
673
674         * constexpr.c (cxx_eval_call_expression): Don't add this call to
675         the hash table if !depth_ok.
676
677 2015-07-27  Marek Polacek  <polacek@redhat.com>
678
679         PR c++/66555
680         PR c/54979
681         * call.c (build_new_op_1): Call warn_tautological_cmp.
682         * pt.c (tsubst_copy_and_build): Use sentinel to suppress tautological
683         compare warnings.
684
685 2015-07-26  Patrick Palka  <ppalka@gcc.gnu.org>
686
687         PR c++/18969
688         * typeck.c (check_return_expr): Also do the basic return-value
689         validity checking if processing_template_decl and yet types are
690         not dependent.  Remove obsolete code.
691
692 2015-07-26  Paolo Carlini  <paolo.carlini@oracle.com>
693
694         * decl.c (poplevel): Use Use DECL_SOURCE_LOCATION and "%qD"
695         in warning_at instead of "%q+D" in warning.
696         (warn_extern_redeclared_static): Likewise for inform.
697         (check_redeclaration_no_default_args): Likewise for permerror.
698         (duplicate_decls): Likewise.
699         (check_previous_goto_1): Likewise for inform.
700         (check_goto, start_decl, check_for_uninitialized_const_var,
701         start_preparsed_function, finish_function§): Likewise.
702         * decl2.c (build_anon_union_vars, c_parse_final_cleanups): Likewise.
703         * init.c (sort_mem_initializers): Likewise.
704         * typeck.c (convert_for_initialization): Likewise for inform.
705         (maybe_warn_about_returning_address_of_local): Likewise.
706         * typeck2.c (abstract_virtuals_error_sfinae): Likewise for inform.
707         (cxx_incomplete_type_diagnostic): Likewise for emit_diagnostic.
708
709 2015-07-25  Patrick Palka  <ppalka@gcc.gnu.org>
710
711         PR c++/66857
712         * cvt.c (ocp_convert): Don't call scalar_constant_value when
713         converting to a class type.
714
715 2015-07-24  Jason Merrill  <jason@redhat.com>
716
717         PR c++/64969
718         * pt.c (splice_late_return_type): Correct deduced return type for
719         abbreviated function template.
720
721 2015-07-24  Richard Biener  <rguenther@suse.de>
722
723         * init.c (build_vec_init): Build iterator bound in the same
724         type as the iterator.
725
726 2015-07-23  Marek Polacek  <polacek@redhat.com>
727
728         PR c++/66572
729         * pt.c (tsubst_copy_and_build): Add warn_logical_op sentinel.
730
731 2015-07-23  Paolo Carlini  <paolo.carlini@oracle.com>
732
733         PR c++/52987
734         * parser.c (cp_parser_simple_declaration): Robustify check avoiding
735         redundant error messages.
736
737 2015-07-21  Paolo Carlini  <paolo.carlini@oracle.com>
738
739         * decl.c (grokdeclarator): For an erroneous template parameter
740         propagate error_mark_node as type.
741
742 2015-07-20  Marek Polacek  <polacek@redhat.com>
743
744         PR c++/55095
745         * typeck.c (cp_build_binary_op): Warn about left shift overflows.
746
747 2015-07-15  Jason Merrill  <jason@redhat.com>
748
749         PR c++/65091
750         * parser.c (cp_parser_unqualified_id): Don't accept ~x in a
751         template if there is no type x in scope.
752
753 2015-07-14  Patrick Palka  <ppalka@gcc.gnu.org>
754
755         PR c++/66850
756         * pt.c (redeclare_class_template): Set the DECL_CONTEXTs of each
757         template template parm in the redeclaration.
758         (lookup_template_class_1): Peel off irrelevant template levels
759         from current_template_parms before augmenting the argument
760         list.
761
762 2015-07-14  Andrea Azzarone  <azzaronea@gmail.com>
763
764         PR c++/65071
765         * parser.c (cp_parser_sizeof_pack): Also consider template template
766         parameters.
767
768 2015-07-14  Jason Merrill  <jason@redhat.com>
769
770         * call.c (build_new_method_call_1): Call reshape_init.
771
772 2015-07-14  Paolo Carlini  <paolo.carlini@oracle.com>
773
774         * pt.c (check_template_shadow): Emit error + inform instead of
775         two errors.
776
777 2015-07-13  Patrick Palka  <ppalka@gcc.gnu.org>
778
779         PR c++/65186
780         * pt.c (invalid_nontype_parm_type_p): Accept a bound template
781         template parm type under C++11 and later.
782
783 2015-07-12  Aldy Hernandez  <aldyh@redhat.com>
784
785         * call.c: Fix double word typos.
786         * cp-array-notation.c: Same.
787         * cp-tree.h: Same.
788         * init.c: Same.
789         * name-lookup.c: Same.
790         * parser.c: Same.
791
792 2015-07-10  Patrick Palka  <ppalka@gcc.gnu.org>
793
794         PR c++/30044
795         * pt.c (begin_template_parm_list): Add a dummy parameter level
796         to current_template_parms.
797         (end_template_parm_list): Remove the dummy parameter level
798         before adding the real one.
799         (tsubst): Don't attempt to substitute for template parameters
800         corresponding to a dummy argument level.
801         (template_parms_to_args): Remove obsolete hack for
802         giving template template arguments the proper level.
803         (splite_late_return_type): Remove obsolete hack for giving
804         template template arguments the proper level.
805         * error.c (dump_template_decl): Don't print dummy template
806         levels.
807
808 2015-07-10  Paolo Carlini  <paolo.carlini@oracle.com>
809
810         PR c++/54521
811         * call.c (convert_like_real): Do not set LOOKUP_ONLYCONVERTING for
812         the second step of copy-initialization.
813
814 2015-07-10  Jason Merrill  <jason@redhat.com>
815
816         * pt.c (find_parameter_packs_r): Handle variable templates.
817         (variable_template_specialization_p): New.
818         * cp-tree.h: Declare it.
819
820         * parser.c (cp_parser_template_id): SET_EXPR_LOCATION.
821
822 2015-07-10  Eric Botcazou  <ebotcazou@adacore.com>
823
824         * decl2.c (cpp_check): Revert latest change.
825
826 2015-07-09  Jason Merrill  <jason@redhat.com>
827
828         * pt.c (instantiation_dependent_r) [TRAIT_EXPR]: Call
829         value_dependent_expression_p.
830
831         * cp-tree.h (struct cp_parameter_declarator): Rename ellipsis_p to
832         template_parameter_pack_p.
833         * parser.c (declarator_can_be_parameter_pack): False if
834         parameter_pack_p is set.
835         (make_parameter_declarator): Add template_parameter_pack_p parm.
836         (cp_parser_template_parameter): Remove parameter pack parsing.
837         (cp_parser_parameter_declaration): Handle all parameter packs.
838         Tweak default argument permerror.
839
840 2015-07-09  Andrew Sutton  <andrew.n.sutton@gmail.com>
841
842         * parser.c (cp_parser_default_type_template_argument)
843         (cp_parser_default_template_template_argument): Factor out from
844         cp_parser_type_parameter.
845
846 2015-07-09  Paolo Carlini  <paolo.carlini@oracle.com>
847
848         * typeck.c (warn_args_num): Rename to error_args_num.
849         (convert_arguments): Adjust calls.
850
851 2015-07-09  Andrew MacLeod  <amacleod@redhat.com>
852
853         * cp-ubsan.c: Don't include alloc-pool.h or lto-streamer.h.
854
855 2015-07-08  Eric Botcazou  <ebotcazou@adacore.com>
856
857         * decl2.c (cpp_check): Deal with IS_CONSTEXPR.
858
859 2015-07-08  Jakub Jelinek  <jakub@redhat.com>
860
861         * decl.c (grokfndecl): Handle flag_openmp_simd like flag_openmp.
862         * pt.c (apply_late_template_attributes): Likewise.
863
864 2015-07-08  Marek Polacek  <polacek@redhat.com>
865
866         PR c++/66748
867         * tree.c (handle_abi_tag_attribute): Check for CLASS_TYPE_P before
868         accessing TYPE_LANG_SPECIFIC node.
869
870 2015-07-07  Andrew MacLeod  <amacleod@redhat.com>
871
872         * call.c: Adjust includes.
873         * class.c: Likewise.
874         * constexpr.c: Likewise.
875         * cp-array-notation.c: Likewise.
876         * cp-gimplify.c: Likewise.
877         * cp-lang.c: Likewise.
878         * cp-objcp-common.c: Likewise.
879         * cp-ubsan.c: Likewise.
880         * cvt.c: Likewise.
881         * decl.c: Likewise.
882         * decl2.c: Likewise.
883         * dump.c: Likewise.
884         * error.c: Likewise.
885         * except.c: Likewise.
886         * expr.c: Likewise.
887         * friend.c: Likewise.
888         * init.c: Likewise.
889         * lambda.c: Likewise.
890         * lex.c: Likewise.
891         * mangle.c: Likewise.
892         * method.c: Likewise.
893         * name-lookup.c: Likewise.
894         * optimize.c: Likewise.
895         * parser.c: Likewise.
896         * pt.c: Likewise.
897         * ptree.c: Likewise.
898         * repo.c: Likewise.
899         * rtti.c: Likewise.
900         * search.c: Likewise.
901         * semantics.c: Likewise.
902         * tree.c: Likewise.
903         * typeck.c: Likewise.
904         * typeck2.c: Likewise.
905
906 2015-07-07  Eric Botcazou  <ebotcazou@adacore.com>
907
908         * decl2.c (cpp_check): Deal with IS_MOVE_CONSTRUCTOR.
909
910 2015-07-06  Jason Merrill  <jason@redhat.com>
911
912         * pt.c (reduce_template_parm_level): Also build the TYPE_DECL
913         for a template template parameter.
914         (tsubst_decl) [TEMPLATE_DECL]: Use the TEMPLATE_DECL built
915         by reduce_template_parm_level.
916
917         * pt.c (argument_pack_element_is_expansion_p): A decl pack is an
918         expansion.
919
920 2015-07-02  Jason Merrill  <jason@redhat.com>
921
922         PR c++/66743
923         * pt.c (for_each_template_parm_r) [UNDERLYING_TYPE]: Use
924         TYPE_VALUES_RAW rather than TYPE_FIELDS.
925
926 2015-07-02  Andrew Sutton  <andrew.n.sutton@gmail.com>
927
928         * pt.c (type_dependent_expression_p): Handle expressions
929         that refer to variable templates.
930
931 2015-07-01  Jason Merrill  <jason@redhat.com>
932
933         * lex.c (init_reswords): s/CXX0X/CXX11/.
934         * parser.c (cp_lexer_get_preprocessor_token): Likewise.
935
936         * mangle.c (write_CV_qualifiers_for_type, write_nested_name):
937         Attribute mangling is now -fabi-version=10.
938
939         PR c++/65945
940         * decl.c (cxx_init_decl_processing): Set TYPE_ALIGN of nullptr_t.
941         * class.c (layout_nonempty_base_or_field): Warn if that affects
942         the offset of a field.
943
944 2015-07-01  Paolo Carlini  <paolo.carlini@oracle.com>
945
946         PR c++/60365
947         * parser.c (cp_parser_check_std_attribute): New.
948         (cp_parser_std_attribute_list): Call it.
949
950 2015-07-01  Patrick Palka  <ppalka@gcc.gnu.org>
951
952         PR c++/66686
953         * pt.c (coerce_template_template_parm) [PARM_DECL]: Don't
954         return 0 if tsubst returns a dependent type.
955
956 2015-06-30  Jason Merrill  <jason@redhat.com>
957
958         PR debug/66653
959         * decl2.c (is_late_template_attribute): True for tls_model.
960
961         PR debug/66653
962         * cp-tree.h (CP_DECL_THREAD_LOCAL_P): New.
963         (DECL_GNU_TLS_P): Use DECL_LANG_SPECIFIC field.
964         (SET_DECL_GNU_TLS_P): New.
965         * call.c (make_temporary_var_for_ref_to_temp): Use
966         CP_DECL_THREAD_LOCAL_P.
967         (set_up_extended_ref_temp): Likewise.
968         * decl.c (duplicate_decls, expand_static_init): Likewise.
969         (redeclaration_error_message, grokvardecl): Likewise.
970         (start_decl, register_dtor_fn, grokdeclarator): Likewise.
971         * decl2.c (get_guard, var_needs_tls_wrapper): Likewise.
972         (handle_tls_init): Likewise.
973         * pt.c (tsubst_decl, tsubst_copy_and_build): Likewise.
974         * semantics.c (finish_id_expression): Likewise.
975         (handle_omp_array_sections_1, finish_omp_clauses): Likewise.
976         (finish_omp_threadprivate): Likewise.
977         * tree.c (decl_storage_duration): Likewise.
978         * cp-gimplify.c (omp_var_to_track): Likewise.
979         (cp_genericize_r): Check that it matches DECL_THREAD_LOCAL_P.
980         * lex.c (retrofit_lang_decl): Return if DECL_LANG_SPECIFIC is
981         already set.
982
983 2015-06-30  Edward Smith-Rowland  <3dw4rd@verizon.net>
984
985         Implement N4197 - Adding u8 character literals
986         * parser.c (cp_parser_primary_expression()): Treat CPP_UTF8CHAR
987         and CPP_UTF8CHAR_USERDEF tokens;
988         (cp_parser_parenthesized_expression_list()): Treat CPP_UTF8CHAR token.
989
990 2015-06-29  Paolo Carlini  <paolo.carlini@oracle.com>
991
992         PR c++/65977
993         * decl.c (grokfndecl): Allow constexpr declarations of friend
994         template specializations.
995
996 2015-06-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
997
998         PR fortran/66605
999         * decl.c (finish_function): Call do_warn_unused_parameter.
1000
1001 2015-06-29  Marek Polacek  <polacek@redhat.com>
1002
1003         PR c/66322
1004         * decl.c (struct cp_switch): Add OUTSIDE_RANGE_P.
1005         (push_switch): Set OUTSIDE_RANGE_P.
1006         (pop_switch): Update c_do_switch_warnings call.
1007         (finish_case_label): Update c_add_case_label call.
1008         * semantics.c (finish_switch_cond): Don't warn about -Wswitch-bool
1009         here.
1010
1011 2015-06-27  Marek Polacek  <polacek@redhat.com>
1012
1013         * call.c: Use VECTOR_TYPE_P.
1014         * constexpr.c: Likewise.
1015         * cvt.c: Likewise.
1016         * decl.c: Likewise.
1017         * decl2.c: Likewise.
1018         * init.c: Likewise.
1019         * semantics.c: Likewise.
1020         * tree.c: Likewise.
1021         * typeck.c: Likewise.
1022         * typeck2.c: Likewise.
1023
1024 2015-06-27  Marek Polacek  <polacek@redhat.com>
1025
1026         * call.c (set_up_extended_ref_temp): Use VAR_P.
1027         * class.c: Use VAR_P throughout.
1028         * constexpr.c (cxx_eval_constant_expression): Use VAR_P.
1029         * cp-array-notation.c (make_triplet_val_inv): Likewise.
1030         * decl.c: Use VAR_OR_FUNCTION_DECL_P or VAR_P
1031         throughout.
1032         * decl2.c: Likewise.
1033         * error.c (dump_decl): Use VAR_P.
1034         * mangle.c (decl_implicit_alias_p): Likewise.
1035         * parser.c: Use VAR_P throughout.
1036         * pt.c: Likewise.
1037         * semantics.c: Likewise.
1038         * vtable-class-hierarchy.c: Likewise.
1039         * tree.c (handle_abi_tag_attribute): Use VAR_OR_FUNCTION_DECL_P.
1040
1041 2015-06-27  Andreas Schwab  <schwab@linux-m68k.org>
1042
1043         * pt.c (check_unstripped_args): Mark parameter as unused.
1044
1045 2015-06-26  Jason Merrill  <jason@redhat.com>
1046
1047         PR c++/66216
1048         * class.c (finish_struct): Call fixup_attribute_variants.
1049
1050         PR c++/66684
1051         * typeck2.c (merge_exception_specifiers): Allow different
1052         noexcept-specifiers if we've had errors.
1053
1054         PR c++/66255
1055         * pt.c (check_unstripped_args): Split out from...
1056         (retrieve_specialization): ...here.  Allow typedefs in the type of
1057         a non-type argument.
1058
1059         PR c++/66067
1060         * mangle.c (write_nested_name): Limit TYPENAME_TYPE handling to
1061         TYPE_DECLs.
1062         * mangle.c (write_template_args): Handle 0 length TREE_VEC.
1063
1064         PR c++/66654
1065         * typeck2.c (digest_init_r): Only expect reshaping if the class is
1066         aggregate.
1067
1068 2015-06-26  Marek Polacek  <polacek@redhat.com>
1069
1070         * cp-array-notation.c (expand_sec_reduce_builtin): Use INDIRECT_REF_P.
1071         * cp-ubsan.c (cp_ubsan_check_member_access_r): Likewise.
1072
1073 2015-06-25  Andrew MacLeod  <amacleod@redhat.com>
1074
1075         * call.c: Remove ipa-ref.h and plugin-api.h from include list.
1076         * class.c: Likewise.
1077         * cp-ubsan.c: Likewise.
1078         * decl.c: Likewise.
1079         * decl2.c: Likewise.
1080         * lambda.c: Likewise.
1081         * mangle.c: Likewise.
1082         * method.c: Likewise.
1083         * optimize.c: Likewise.
1084         * parser.c: Likewise.
1085         * semantics.c: Likewise.
1086         * tree.c: Likewise.
1087         * vtable-class-hierarchy.c: Likewise.
1088
1089 2015-06-25  Richard Sandiford  <richard.sandiford@arm.com>
1090
1091         * constexpr.c (constexpr_fundef_hasher): Inherit from ggc_ptr_hash
1092         rather than ggc_hasher.
1093         (constexpr_call_hasher): Likewise.
1094         * cp-tree.h (cxx_int_tree_map_hasher, named_label_hasher): Likewise.
1095         * decl.c (typename_hasher): Likewise.
1096         * mangle.c (conv_type_hasher): Likewise.
1097         * pt.c (spec_hasher): Likewise.
1098         * tree.c (cplus_array_hasher, list_hasher): Likewise.
1099         * typeck2.c (abstract_type_hasher): Likewise.
1100
1101 2015-06-25  Richard Sandiford  <richard.sandiford@arm.com>
1102
1103         * class.c (fixed_type_or_null_ref_ht): Inherit from nofree_ptr_hash
1104         rather than pointer_hash.
1105         (fixed_type_or_null): Use nofree_ptr_hash instead of pointer_hash.
1106         * semantics.c (nrv_data): Likewise.
1107         * tree.c (verify_stmt_tree_r, verify_stmt_tree): Likewise.
1108
1109 2015-06-24  Jason Merrill  <jason@redhat.com>
1110
1111         PR c++/66647
1112         * pt.c (dependent_type_p_r): Check for dependent alias template
1113         specialization sooner.
1114
1115         PR c++/66501
1116         * class.c (type_has_nontrivial_assignment): Remove.
1117         * cp-tree.h: Remove declaration.
1118         * init.c (vec_copy_assign_is_trivial): New.
1119         (build_vec_init): Use it.
1120
1121 2015-06-24  Edward Smith-Rowland  <3dw4rd@verizon.net>
1122
1123         Implement N3928 - Extending static_assert
1124         * parser.c (cp_parser_static_assert): Support static_assert with
1125         no message string.  Supply an empty string in this case.
1126         * semantics.c (finish_static_assert): Don't try to print a message if
1127         the message strnig is empty.
1128
1129 2015-06-24  Adam Butcher  <adam@jessamine.co.uk>
1130
1131         PR c++/65750
1132         * parser.c (cp_parser_simple_type_specifier): Don't synthesize
1133         implicit template parm if 'auto' is a placeholder for trailing
1134         return type.
1135
1136 2015-06-24  Patrick Palka  <ppalka@gcc.gnu.org>
1137
1138         Revert:
1139         2015-06-23  Patrick Palka  <ppalka@gcc.gnu.org>
1140
1141         PR c++/30044
1142         * parser.c (cp_parser_template_parameter_list): Update
1143         current_template_parms right after processing a paramater.
1144         * pt.c (template_parms_to_args): Remove obsolete hack for
1145         giving template template arguments the proper level.
1146         (check_default_tmpl_args): Account for tested template
1147         parameter_lists.
1148         (splite_late_return_type): Remove obsolete hack for giving
1149         template template arguments the proper level.
1150
1151 2015-06-24  Paolo Carlini  <paolo.carlini@oracle.com>
1152
1153         PR c++/65811
1154         * decl.c (duplicate_decls): Adjust DECL_COMDAT of newdecl.
1155
1156 2015-06-23  Patrick Palka  <ppalka@gcc.gnu.org>
1157
1158         PR c++/30044
1159         * parser.c (cp_parser_template_parameter_list): Update
1160         current_template_parms right after processing a paramater.
1161         * pt.c (template_parms_to_args): Remove obsolete hack for
1162         giving template template arguments the proper level.
1163         (check_default_tmpl_args): Account for tested template
1164         parameter_lists.
1165         (splite_late_return_type): Remove obsolete hack for giving
1166         template template arguments the proper level.
1167
1168 2015-06-23  Jason Merrill  <jason@redhat.com>
1169
1170         PR c++/65879
1171         * decl.c (grokfndecl): Check the linkage of ctype, not just
1172         TYPE_ANONYMOUS_P.
1173         * tree.c (no_linkage_check): Skip the 'this' pointer.
1174
1175         PR c++/66501
1176         * class.c (type_has_nontrivial_assignment): New.
1177         * init.c (build_vec_init): Use it.
1178         * cp-tree.h: Declare it.
1179         * method.c (trivial_fn_p): Templates aren't trivial.
1180
1181         PR c++/66542
1182         * decl.c (expand_static_init): Make sure the destructor is callable
1183         here even if we have an initializer.
1184
1185 2015-06-04  Pierre-Marie de Rodat  <derodat@adacore.com>
1186
1187         * lang-specs.h: Pass "-o %g.s" to cc1plus for headers even if
1188         -fdump-ada-spec is passed.
1189
1190 2015-06-22  Pierre-Marie de Rodat  <derodat@adacore.com>
1191
1192         * decl2.c (cpp_check): Deal with HAS_DEPENDENT_TEMPLATE_ARGS.
1193
1194 2015-06-22  Paolo Carlini  <paolo.carlini@oracle.com>
1195
1196         * decl.c (grokdeclarator): Use declspecs->locations[ds_virtual].
1197
1198 2015-06-22  Paolo Carlini  <paolo.carlini@oracle.com>
1199
1200         * decl.c (grokdeclarator): Remove pointless code.
1201
1202 2015-06-22  Jason Merrill  <jason@redhat.com>
1203
1204         PR c++/66515
1205         * call.c (implicit_conversion): Only reshape for classes.
1206
1207 2015-06-22  Mikhail Maltsev  <maltsevm@gmail.com>
1208
1209         * pt.c (maybe_adjust_types_for_deduction): Use std::swap instead of
1210         manually swapping.
1211         * semantics.c (finish_omp_atomic): Likewise.
1212         * typeck.c (cp_build_array_ref): Likewise.
1213
1214 2015-06-20  Mikhail Maltsev  <maltsevm@gmail.com>
1215
1216         PR c++/65882
1217         * call.c (build_new_op_1): Check tf_warning flag in all cases.
1218
1219 2015-06-19  Jason Merrill  <jason@redhat.com>
1220
1221         PR c++/66585
1222         * pt.c (instantiate_class_template_1): Clear
1223         cp_unevaluated_operand and c_inhibit_evaluation_warnings.
1224
1225         PR c++/65880
1226         * decl.c (build_ptrmemfunc_type): Check TYPE_GET_PTRMEMFUNC_TYPE after
1227         cv-qualifiers.
1228         * typeck.c (merge_types): build_ptrmemfunc_type before applying
1229         quals and attributes.
1230
1231         PR c++/65973
1232         * constexpr.c (build_constexpr_constructor_member_initializers):
1233         Handle an empty STATEMENT_LIST.
1234
1235         PR c++/65843
1236         * pt.c (tsubst_copy_and_build): Register a capture proxy in
1237         local_specializations.
1238
1239 2015-06-17  Jason Merrill  <jason@redhat.com>
1240
1241         PR c++/66001
1242         * constexpr.c (cxx_eval_constant_expression): Handle TRY_BLOCK and
1243         TRY_FINALLY_EXPR.
1244         (potential_constant_expression_1): Likewise.
1245
1246 2015-06-17  Jason Merrill  <jason@redhat.com>
1247
1248         PR c++/66515
1249         * call.c (implicit_conversion): Call reshape_init here, early.
1250         (build_aggr_conv): Not here.
1251
1252 2015-06-17  Jakub Jelinek  <jakub@redhat.com>
1253
1254         PR c++/66571
1255         * pt.c (tsubst_omp_clause_decl): New function.
1256         (tsubst_omp_clauses): Use it or tsubst_copy instead of
1257         tsubst_expr on OMP_CLAUSE_DECL.
1258
1259 2015-06-17  Andrew MacLeod  <amacleod@redhat.com>
1260
1261         * cp-lang.c (cxx_dwarf_name): Use anon_aggrname_p.
1262         * cp-tree.h (TYPE_ANONYMOUS_P): Likewise.
1263         * decl.c (grokdeclarator, xref_tag_1): Likewise.
1264         * error.c (dump_aggr_type): likewise.
1265         * pt.c (push_template_decl_real): Likewise.
1266         * name-lookup.c (make_anon_name): Use anon_aggrname_format.
1267
1268 2015-06-17  Andrew MacLeod  <amacleod@redhat.com>
1269
1270         * call.c: Do not include input.h, line-map.h or is-a.h.
1271         * class.c: Likewise.
1272         * constexpr.c: Likewise.
1273         * cp-array-notation.c: Likewise.
1274         * cp-gimplify.c: Likewise.
1275         * cp-lang.c: Likewise.
1276         * cp-objcp-common.c: Likewise.
1277         * cp-tree.h: Likewise.
1278         * cp-ubsan.c: Likewise.
1279         * cvt.c: Likewise.
1280         * decl.c: Likewise.
1281         * decl2.c: Likewise.
1282         * dump.c: Likewise.
1283         * error.c: Likewise.
1284         * except.c: Likewise.
1285         * expr.c: Likewise.
1286         * friend.c: Likewise.
1287         * init.c: Likewise.
1288         * lambda.c: Likewise.
1289         * lex.c: Likewise.
1290         * mangle.c: Likewise.
1291         * method.c: Likewise.
1292         * name-lookup.c: Likewise.
1293         * optimize.c: Likewise.
1294         * parser.c: Likewise.
1295         * pt.c: Likewise.
1296         * ptree.c: Likewise.
1297         * repo.c: Likewise.
1298         * rtti.c: Likewise.
1299         * search.c: Likewise.
1300         * semantics.c: Likewise.
1301         * tree.c: Likewise.
1302         * typeck.c: Likewise.
1303         * typeck2.c: Likewise.
1304         * vtable-class-hierarchy.c: Likewise.
1305
1306 2015-06-16  Paolo Carlini  <paolo.carlini@oracle.com>
1307
1308         PR c++/59682
1309         * parser.c (cp_parser_new_placement): Reject an empty expression-list.
1310
1311 2015-06-16  Jason Merrill  <jason@redhat.com>
1312
1313         PR c++/66536
1314         * tree.c (replace_placeholders_r) [CONSTRUCTOR]: Handle type
1315         mismatch.
1316
1317         PR c++/58063
1318         * tree.c (bot_manip): Remap SAVE_EXPR.
1319
1320         PR c++/66387
1321         * pt.c (tsubst_copy) [VAR_DECL]: Use process_outer_var_ref.
1322
1323 2015-06-15  Nathan Sidwell  <nathan@acm.org>
1324
1325         PR c++/58583
1326         * cp-tree.h (DECL_INSTANTIATING_NSDMI_P): New.
1327         * init.c (get_nsdmi): Check for DEFAULT_ARG in template case and
1328         protect it from recursive instantiation.
1329
1330 2015-06-15  Paolo Carlini  <paolo.carlini@oracle.com>
1331
1332         PR c++/51048
1333         * decl2.c (no_linkage_error): Do not issue a permerror if the DECL
1334         using a local type is pure virtual.
1335
1336 2015-06-13  Patrick Palka  <ppalka@gcc.gnu.org>
1337
1338         * call.c: Remove comment documenting the long-deleted
1339         function build_method_call.
1340
1341 2015-06-13  Patrick Palka  <ppalka@gcc.gnu.org>
1342
1343         PR c++/65168
1344         * typeck.c (cp_build_binary_op): Warn when comparing an address
1345         of a reference against NULL.
1346
1347 2015-06-12  Jason Merrill  <jason@redhat.com>
1348
1349         PR c++/65719
1350         * pt.c (tsubst_decl) [VAR_DECL]: Mark namespace-scope
1351         variables as DECL_NOT_REALLY_EXTERN.
1352
1353 2015-06-11  Jason Merrill  <jason@redhat.com>
1354
1355         PR c++/66445
1356         * constexpr.c (potential_constant_expression_1): Handle a
1357         DECL_EXPR of TYPE_DECL.
1358
1359         PR c++/66450
1360         * constexpr.c (cxx_eval_store_expression): Avoid messing up outer
1361         ctx->ctor.
1362
1363 2015-06-11  Pierre-Marie de Rodat  <derodat@adacore.com>
1364
1365         * decl.c (cxx_init_decl_processing): Register the main
1366         translation unit through the new debug hook.
1367
1368 2015-06-10  Jason Merrill  <jason@redhat.com>
1369
1370         PR c++/66289
1371         * cp-tree.h (TEMPLATE_DECL_COMPLEX_ALIAS_P): New.
1372         * pt.c (push_template_decl_real): Set it.
1373         (dependent_alias_template_spec_p): Use it.
1374         (dependent_type_p_r): Use dependent_alias_template_spec_p.
1375         (uses_all_template_parms_data, uses_all_template_parms_r)
1376         (complex_alias_template_p): New.
1377         (get_template_parm_index): Handle BOUND_TEMPLATE_TEMPLATE_PARM.
1378
1379 2015-06-09  Jason Merrill  <jason@redhat.com>
1380
1381         DR 1467
1382         PR c++/51747
1383         * typeck2.c (digest_init_r): Replace previous change with
1384         gcc_unreachable.
1385
1386         PR c++/66387
1387         * semantics.c (process_outer_var_ref): Make sure the value is
1388         actually constant before returning it.
1389         * typeck.c (cp_build_array_ref): Allow subscripting non-lvalue
1390         array.
1391
1392 2015-06-09  Paolo Carlini  <paolo.carlini@oracle.com>
1393
1394         PR c++/65815
1395         * typeck2.c (digest_nsdmi_init): On aggregates use reshape_init.
1396         * init.c (expand_default_init): Likewise.
1397
1398 2015-06-09  Jason Merrill  <jason@redhat.com>
1399
1400         PR c++/66383
1401         * tree.c (replace_placeholders_r): Handle placeholders for an
1402         outer object.
1403         * typeck2.c (store_init_value): Only replace_placeholders for
1404         objects of class type.
1405
1406 2015-06-08  Andrew MacLeod  <amacleod@redhat.com>
1407
1408         * call.c : Adjust include files.
1409         * class.c : Likewise.
1410         * constexpr.c : Likewise.
1411         * cp-array-notation.c : Likewise.
1412         * cp-cilkplus.c : Likewise.
1413         * cp-gimplify.c : Likewise.
1414         * cp-lang.c : Likewise.
1415         * cp-objcp-common.c : Likewise.
1416         * cp-tree.h : Likewise.
1417         * cp-ubsan.c : Likewise.
1418         * cvt.c : Likewise.
1419         * decl.c : Likewise.
1420         * decl2.c : Likewise.
1421         * dump.c : Likewise.
1422         * error.c : Likewise.
1423         * except.c : Likewise.
1424         * expr.c : Likewise.
1425         * friend.c : Likewise.
1426         * init.c : Likewise.
1427         * lambda.c : Likewise.
1428         * lex.c : Likewise.
1429         * mangle.c : Likewise.
1430         * method.c : Likewise.
1431         * name-lookup.c : Likewise.
1432         * optimize.c : Likewise.
1433         * parser.c : Likewise.
1434         * pt.c : Likewise.
1435         * ptree.c : Likewise.
1436         * repo.c : Likewise.
1437         * rtti.c : Likewise.
1438         * search.c : Likewise.
1439         * semantics.c : Likewise.
1440         * tree.c : Likewise.
1441         * typeck.c : Likewise.
1442         * typeck2.c : Likewise.
1443         * vtable-class-hierarchy.c : Likewise.
1444
1445 2015-06-05  Jason Merrill  <jason@redhat.com>
1446
1447         PR c++/66405
1448         * pt.c (argument_pack_element_is_expansion_p): Return 2 if
1449         the expansion has extra args.
1450         (use_pack_expansion_extra_args_p): Return true in that case.
1451
1452         PR c++/66405
1453         * pt.c (type_dependent_expression_p): EXPR_PACK_EXPANSION is
1454         dependent even if it has a type.
1455
1456 2015-06-05  Aldy Hernandez  <aldyh@redhat.com>
1457
1458         * cp-objcp-common.c: Adjust comment for
1459         cxx_warn_unused_global_decl.
1460         * cp-objcp-common.h (LANG_HOOKS_WRITE_GLOBALS): Remove
1461         (LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): New.
1462         * cp-tree.h (note_mangling_alias): Protoize.
1463         (cp_write_global_declarations): Remove.
1464         (cxx_post_compilation_parsing_cleanups): Protoize.
1465         * decl.c (wrapup_globals_for_namespace): Remove use of DATA
1466         argument.
1467         * decl2.c (mangling_aliases): New global.
1468         (build_java_method_aliases): New.  Adapted from
1469         collect_candidates_for_java_method_aliases.
1470         (collect_candidates_for_java_method_aliases): Remove.
1471         (build_java_method_aliases): Remove.
1472         (generate_mangling_aliases): New.
1473         (note_mangling_alias): New.  Moved from mangle_decl.
1474         (locus_at_end_of_parsing): New global.
1475         (c_parse_final_cleanups): Rename from
1476         cp_write_global_declarations.
1477         Use locus_at_end_of_parsing.
1478         Call generate_mangling_aliases.
1479         Rename call to collect_candidates_for_java_method_aliases into
1480         build_java_method_aliases.
1481         Remove call to finalize_compilation_unit.
1482         Move vtable handling into cxx_post_compilation_parsing_cleanups.
1483         Do not call check_global_declarations or
1484         emit_debug_global_declarations.
1485         (cxx_post_compilation_parsing_cleanups): New.
1486         * mangle.c (mangle_decl): Move code to note_mangling_alias.
1487         * name-lookup.c (do_namespace_alias): Call early_global_decl.
1488
1489 2015-06-05  Nathan Sidwell  <nathan@acm.org>
1490
1491         PR c++/52595
1492         * parser.c (cp_parser_cache_defarg): Continue looking for
1493         declarators when scanning a potential template argument list of an
1494         NSDMI.
1495
1496 2015-06-04  Andrew MacLeod  <amacleod@redhat.com>
1497
1498         * call.c: Adjust includes for restructured coretypes.h.
1499         * class.c: Likewise.
1500         * constexpr.c: Likewise.
1501         * cp-array-notation.c: Likewise.
1502         * cp-gimplify.c: Likewise.
1503         * cp-lang.c: Likewise.
1504         * cp-objcp-common.c: Likewise.
1505         * cp-tree.h: Likewise.
1506         * cp-ubsan.c: Likewise.
1507         * cvt.c: Likewise.
1508         * decl.c: Likewise.
1509         * decl2.c: Likewise.
1510         * dump.c: Likewise.
1511         * error.c: Likewise.
1512         * except.c: Likewise.
1513         * expr.c: Likewise.
1514         * friend.c: Likewise.
1515         * init.c: Likewise.
1516         * lambda.c: Likewise.
1517         * lex.c: Likewise.
1518         * mangle.c: Likewise.
1519         * method.c: Likewise.
1520         * name-lookup.c: Likewise.
1521         * optimize.c: Likewise.
1522         * parser.c: Likewise.
1523         * pt.c: Likewise.
1524         * ptree.c: Likewise.
1525         * repo.c: Likewise.
1526         * rtti.c: Likewise.
1527         * search.c: Likewise.
1528         * semantics.c: Likewise.
1529         * tree.c: Likewise.
1530         * typeck.c: Likewise.
1531         * typeck2.c: Likewise.
1532         * vtable-class-hierarchy.c: Likewise.
1533
1534 2015-06-04  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
1535
1536         PR c++/66192
1537         PR target/66200
1538         * cp-tree.h (get_guard_cond): Adjust declaration
1539         * decl.c (expand_static_init): Use atomic load acquire
1540         and adjust call to get_guard_cond.
1541         * decl2.c (build_atomic_load_byte): New function.
1542         (get_guard_cond): Handle thread_safety.
1543         (one_static_initialization_or_destruction): Adjust call to
1544         get_guard_cond.
1545
1546 2015-06-03  Jason Merrill  <jason@redhat.com>
1547
1548         PR c++/44282
1549         * mangle.c (mangle_decl): Always SET_IDENTIFIER_GLOBAL_VALUE.
1550         (write_CV_qualifiers_for_type): Set G.need_abi_warning.
1551         (decl_implicit_alias_p): Split out from maybe_remove_implicit_alias.
1552         * cp-tree.h (DECL_REALLY_EXTERN): Handle null DECL_LANG_SPECIFIC.
1553
1554 2015-06-03  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1555             Paolo Carlini  <paolo.carlini@oracle.com>
1556
1557         PR c++/66130
1558         * typeck.c (invalid_nonstatic_memfn_p): Add location_t parameter and
1559         use it in the diagnostic.
1560         (decay_conversion): Adjust call.
1561         * semantics.c (finish_decltype_type): Likewise.
1562         * call.c (resolve_args, build_new_op_1,
1563         perform_implicit_conversion_flags): Adjust calls.
1564         * cvt.c (ocp_convert, convert_to_void): Likewise.
1565         * cp-tree.h (invalid_nonstatic_memfn_p): Update declaration.
1566
1567 2015-06-03  Paolo Carlini  <paolo.carlini@oracle.com>
1568
1569         * decl.c (check_tag_decl): Use declspecs->locations as locations in
1570         error_at and warning_at calls.
1571
1572 2015-06-03  Marek Polacek  <polacek@redhat.com>
1573
1574         PR sanitizer/66190
1575         * cp-gimplify.c (struct cp_genericize_data): Add no_sanitize_p.
1576         (cp_genericize_r): Don't instrument static initializers.
1577         (cp_genericize_tree): Initialize wtd.no_sanitize_p.
1578
1579 2015-06-02  Andres Tiraboschi  <andres.tiraboschi@tallertechnologies.com>
1580
1581         * decl.c (start_function): Call plugin before parsing.
1582         (finish_function): Call plugin after parsing.
1583
1584 2015-06-02  Patrick Palka <patrick@parcs.ath.cx>
1585
1586         * cp-tree.h (init_error): Remove declaration.
1587         * error.c (scratch_pretty_printer): Rename to ...
1588         (actual_pretty_printer): ... this.
1589         (cxx_pp): Constify and update accordingly.
1590         (init_error): Remove definition.
1591         * lex.c (cxx_init): Do not call init_error.
1592
1593 2015-06-02  Paolo Carlini  <paolo.carlini@oracle.com>
1594
1595         PR c++/61683
1596         * parser.c (cp_parser_mem_initializer): Allow for decltype-specifier.
1597
1598 2015-06-01  Jason Merrill  <jason@redhat.com>
1599
1600         PR c++/65942
1601         * decl2.c (mark_used): Don't always instantiate constexpr fns.
1602         * constexpr.c (cxx_eval_call_expression): Instantiate them here.
1603
1604         PR c++/44282
1605         * mangle.c (attr_strcmp): New.
1606         (write_CV_qualifiers_for_type): Also write out attributes that
1607         affect type identity.
1608         (write_type): Strip all attributes after writing qualifiers.
1609
1610 2015-05-31  Jason Merrill  <jason@redhat.com>
1611
1612         * constexpr.c (cxx_eval_indirect_ref): Try folding first.
1613
1614         PR c++/66320
1615         * constexpr.c (cxx_eval_constant_expression): Treat a placeholder
1616         with the wrong type as non-constant.
1617
1618 2015-05-27  Jason Merrill  <jason@redhat.com>
1619
1620         * decl.c (check_redeclaration_exception_specification): Depend on
1621         -Wsystem-headers rather than -pedantic.
1622
1623         * decl.c (warn_extern_redeclared_static): Use the location of
1624         newdecl in diagnostics, not input_location.
1625         (validate_constexpr_redeclaration): Likewise.
1626         (check_redeclaration_no_default_args): Likewise.
1627         (duplicate_decls): Likewise.
1628         (check_redeclaration_exception_specification): Likewise.
1629         Change second diagnostic to inform.
1630
1631 2015-05-24  Nathan Sidwell  <nathan@acm.org>
1632
1633         PR c++/66243
1634         * decl.c (build_enumerator): Don't silently convert scoped enums.
1635
1636 2015-05-24  Jan Hubicka  <hubicka@ucw.cz>
1637
1638         PR lto/66180
1639         * mangle.c (mangle_decl): Mangle anonymous namespace types as
1640         "<anon>".
1641
1642 2015-05-23  Nathan Sidwell  <nathan@acm.org>
1643
1644         PR c++/65936
1645         * pt.c (lookup_template_class_1): Copy may_alias attribute too.
1646
1647 2015-05-22  Jim Wilson  <jim.wilson@linaro.org>
1648
1649         * Make-lang.in (check_g++_parallelize): Update comment.
1650
1651 2015-05-22  Paolo Carlini  <paolo.carlini@oracle.com>
1652
1653         PR c++/65598
1654         * decl.c (grokdeclarator): Use the correct location in error
1655         messages about 'explicit'.
1656
1657 2015-05-22  Marek Polacek  <polacek@redhat.com>
1658             Edward Smith-Rowland  <3dw4rd@verizon.net>
1659
1660         PR c/47043
1661         * cp-tree.h (build_enumerator): Update declaration.
1662         * decl.c (build_enumerator): Add attributes parameter.  Call
1663         cplus_decl_attributes.
1664         * init.c (constant_value_1): Pass tf_none to mark_used.
1665         * parser.c (cp_parser_enumerator_definition): Parse attributes and
1666         pass them down to build_enumerator.
1667         * pt.c (tsubst_enum): Pass decl attributes to build_enumerator.
1668         * semantics.c (finish_id_expression): Don't warn_deprecated_use here.
1669
1670 2015-05-21  Nathan Sidwell  <nathan@acm.org>
1671
1672         PR c++/60943
1673         * decl2.c (change_return_type): Propagate FUNCTION_REF_QUALIFIED.
1674
1675 2015-05-21  Marek Polacek  <polacek@redhat.com>
1676
1677         * typeck.c (warn_args_num): Don't print "declare here" for builtins.
1678
1679 2015-05-20  Jason Merrill  <jason@redhat.com>
1680
1681         * pt.c (tsubst_decl) [VAR_DECL]: SET_DECL_IMPLICIT_INSTANTIATION
1682         before register_specialization.
1683
1684         * decl.c (grok_op_properties): Don't complain about size_t
1685         placement delete here.
1686         * call.c (second_parm_is_size_t): Split out from...
1687         (non_placement_deallocation_fn_p): ...here.
1688         (build_op_delete_call): Warn about size_t placement delete with
1689         -Wc++14-compat.
1690
1691 2015-05-19  Nathan Sidwell  <nathan@acm.org>
1692
1693         PR c++/65954
1694         * typeck.c (finish_class_member_access_expr): Diagnose failed
1695         lookup of enum class member.
1696
1697 2015-05-19  Jakub Jelinek  <jakub@redhat.com>
1698
1699         PR middle-end/66199
1700         * parser.c (cp_parser_omp_for_loop): Don't add
1701         OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
1702         OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
1703         (cp_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
1704         constructs.
1705
1706 2015-05-19  Mikhail Maltsev  <maltsevm@gmail.com>
1707
1708         * typeck.c (composite_pointer_type): Use std::swap instead of explicit
1709         swaps.
1710
1711 2015-05-18  Jason Merrill  <jason@redhat.com>
1712
1713         * pt.c (retrieve_specialization): Make sure our arguments have
1714         gone through strip_typedefs.
1715
1716         * pt.c (tsubst_decl) [VAR_DECL]: Call coerce_innermost_template_parms.
1717         (determine_specialization): Call coerce_template_parms.
1718
1719         DR 1391
1720         * pt.c (type_unification_real): Check convertibility here.
1721         (unify_one_argument): Not here.
1722
1723         * tree.c (strip_typedefs_expr) [TRAIT_EXPR]: Fix typo.
1724         (strip_typedefs) [DECLTYPE_TYPE]: Fix typedef of decltype.
1725         [TREE_LIST]: Fix no-change case.
1726
1727         * ptree.c (cxx_print_xnode): Handle TRAIT_EXPR.
1728
1729 2015-05-16  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1730
1731         PR fortran/44054
1732         * error.c (cp_diagnostic_starter): Use diagnostic_location
1733         function.
1734         (cp_print_error_function): Likewise.
1735         (cp_printer): Replace locus pointer with accessor function.
1736
1737 2015-05-12  David Malcolm  <dmalcolm@redhat.com>
1738
1739         * parser.c (cp_parser_selection_statement): Add location and
1740         guard_kind arguments to calls to
1741         cp_parser_implicitly_scoped_statement.
1742         (cp_parser_iteration_statement): Likewise for calls to
1743         cp_parser_already_scoped_statement.
1744         (cp_parser_implicitly_scoped_statement): Add "guard_loc" and
1745         "guard_kind" params; use them to warn for misleading
1746         indentation.
1747         (cp_parser_already_scoped_statement): Likewise.
1748
1749 2015-05-11  Jan Hubicka  <hubicka@ucw.cz>
1750
1751         * class.c (fixup_type_variants): Do not copy TYPE_METHODS
1752         (one_inheriting_sig): Assert tat we always set TYPE_METHODS of main variant.
1753         * semantics.c (finish_member_declaration): Likewise.
1754         * method.c (lazily_declare_fn): Allways add method to main variant list.
1755
1756 2015-05-09  Aldy Hernandez  <aldyh@redhat.com>
1757
1758         PR bootstrap/66085
1759         * decl2.c (note_mangling_alias): Declare arguments as unused.
1760
1761 2015-05-08  Jason Merrill  <jason@redhat.com>
1762
1763         * cp-gimplify.c, parser.c: Adjust to -Wc++11-compat replacing
1764         -Wc++0x-compat.
1765
1766 2015-05-08  Jason Merrill  <jason@redhat.com>
1767
1768         * decl2.c (mangling_aliases): New variable.
1769         (note_mangling_alias, generate_mangling_aliases): New.
1770         (cp_write_global_declarations): Call generate_mangling_aliases.
1771         (generate_mangling_alias): Split out from...
1772         * mangle.c (mangle_decl): ...here.
1773         * cp-tree.h: Declare note_mangling_alias.
1774
1775 2015-05-08  Aldy Hernandez  <aldyh@redhat.com>
1776
1777         * decl2.c (collect_candidates_for_java_method_aliases): Remove.
1778         (build_java_method_aliases): Adapt to use create_same_body_alias
1779         instead of assemble_alias.  Move variable declarations to
1780         definition and tidy up.
1781         (cp_write_global_declarations): Call build_java_method_aliases
1782         instead of collecting candidates first.
1783
1784 2015-05-07  Jason Merrill  <jason@redhat.com>
1785
1786         PR c++/59012
1787         * parser.c (cp_parser_std_attribute_list): Handle attribute expansion.
1788         (cp_parser_std_attribute_spec): Handle alignas pack expansion.
1789         * decl2.c (is_late_template_attribute): An attribute exp is dependent.
1790         * pt.c (make_pack_expansion): Allow TREE_LIST for attribute expansion.
1791         (apply_late_template_attributes): Handle attribute pack expansion.
1792
1793 2015-05-07  Marek Polacek  <polacek@redhat.com>
1794
1795         PR c/65179
1796         * typeck.c (cp_build_binary_op): Warn when left shifting a negative
1797         value.
1798
1799 2015-05-07  Jason Merrill  <jason@redhat.com>
1800
1801         DR 1467
1802         PR c++/51747
1803         * typeck2.c (digest_init_r): Fix single element list.
1804
1805 2015-05-05  Jason Merrill  <jason@redhat.com>
1806
1807         * cp-gimplify.c (cp_genericize_r): Track TRY_BLOCK and
1808         MUST_NOT_THROW_EXPR, warn about a THROW_EXPR directly within a
1809         MUST_NOT_THROW_EXPR.
1810         (cp_genericize_data): Add try_block field.
1811         (cp_genericize_tree): Initialize it.
1812         * except.c (expand_end_catch_block): Set TREE_NO_WARNING on
1813         implicit rethrow.
1814
1815         * constexpr.c (potential_constant_expression_1) [AT_ENCODE_EXPR]:
1816         Return false.
1817
1818         * semantics.c (finish_call_expr): Check complain.
1819
1820         * decl2.c (reset_type_linkage_2): Update the DECL_NAME of a
1821         maybe-in-charge constructor.
1822
1823         * decl.c (start_decl): Don't push the plain VAR_DECL for a
1824         variable template.
1825
1826         DR 1518
1827         DR 1630
1828         PR c++/54835
1829         PR c++/60417
1830         * call.c (convert_like_real): Check value-initialization before
1831         explicit.
1832         * typeck2.c (process_init_constructor_record): Don't set
1833         CONSTRUCTOR_IS_DIRECT_INIT.
1834         (process_init_constructor_array): Likewise.
1835         * init.c (build_vec_init): Likewise.
1836
1837 2015-05-05  David Malcolm  <dmalcolm@redhat.com>
1838
1839         * parser.c (cp_parser_asm_definition): Only test for
1840         error_mark_node if "outputs" was just set.  Likewise for "inputs".
1841
1842 2015-05-04  Paolo Carlini  <paolo.carlini@oracle.com>
1843             Jakub Jelinek  <jakub@redhat.com>
1844
1845         PR c++/66007
1846         * typeck2.c (check_narrowing): Check by-hand that the pedwarn didn't
1847         result in an actual error.
1848
1849 2015-05-01  Paolo Carlini  <paolo.carlini@oracle.com>
1850             Prathamesh Kulharni  <prathamesh.kulkarni@linaro.org>
1851
1852         PR c++/65858
1853         * typeck2.c (check_narrowing): Set ok = true when pedwarn returns
1854         false.
1855
1856 2015-04-30  David Malcolm  <dmalcolm@redhat.com>
1857
1858         * cp-tree.h (ARGUMENT_PACK_SELECT_ARG): Remove spurious
1859         trailing semicolon.
1860
1861 2015-04-29  Jason Merrill  <jason@redhat.com>
1862
1863         PR c++/50800
1864         * tree.c (apply_identity_attributes): Fix handling of classes.
1865
1866 2015-04-29  Thomas Schwinge  <thomas@codesourcery.com>
1867
1868         * parser.c (cp_parser_oacc_enter_exit_data): Use
1869         OMP_STANDALONE_CLAUSES.
1870
1871 2015-04-29  Paolo Carlini  <paolo.carlini@oracle.com>
1872
1873         PR c++/64667
1874         * init.c (perform_member_init): Handle references for -Winit-self.
1875
1876 2015-04-29  Thomas Schwinge  <thomas@codesourcery.com>
1877
1878         * pt.c (tsubst_expr) <OMP_TARGET_UPDATE>: Use
1879         OMP_TARGET_UPDATE_CLAUSES instead of OMP_CLAUSES.
1880
1881 2015-04-28  Jason Merrill  <jason@redhat.com>
1882
1883         PR c++/65896
1884         * constexpr.c (cxx_eval_store_expression): Don't try to actually
1885         store an empty class.
1886
1887         PR c++/65656
1888         * constexpr.c (cxx_eval_builtin_function_call): Fix
1889         __builtin_constant_p.
1890
1891         PR c++/50800
1892         * tree.c (strip_typedefs): Add remove_attributes parm.
1893         (strip_typedefs_expr): Likewise.
1894         (apply_identity_attributes): New subroutine of strip_typedefs.
1895         * pt.c (canonicalize_type_argument): Let strip_typedefs handle attrs.
1896         (convert_nontype_argument, unify): Likewise.
1897         * cp-tree.h: Adjust.
1898
1899         PR c++/65734
1900         * class.c (fixup_attribute_variants): Respect TYPE_USER_ALIGN.
1901
1902 2015-04-27  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
1903
1904         * class.c (layout_class_type): Remove check if
1905         PCC_BITFIELD_TYPE_MATTERS is defined.
1906
1907 2015-04-27  Jim Wilson  <jim.wilson@linaro.org>
1908
1909         * Make-lang.in (c++.mostlyclean): Remove xg++, g++-cross, and cc1plus.
1910
1911 2015-04-24  Jason Merrill  <jason@redhat.com>
1912
1913         PR c++/50800
1914         * typeck.c (structural_comptypes): Don't check TYPE_REF_CAN_ALIAS_ALL.
1915
1916         * constexpr.c (potential_constant_expression_1) [MINUS_EXPR]:
1917         Remove obsolete code.
1918         [NE_EXPR]: Likewise.
1919
1920 2015-04-23  Jason Merrill  <jason@redhat.com>
1921
1922         PR c++/65646
1923         * pt.c (check_explicit_specialization): Don't
1924         SET_DECL_TEMPLATE_SPECIALIZATION for a variable with no template
1925         headers.
1926         * decl.c (grokvardecl): Revert earlier fix.
1927
1928 2015-04-20  Paolo Carlini  <paolo.carlini@oracle.com>
1929
1930         PR c++/65801
1931         * typeck2.c (check_narrowing): In C++11 mode too, -Wno-narrowing
1932         suppresses the diagnostic.
1933
1934 2015-04-20  Ville Voutilainen  <ville.voutilainen@gmail.com>
1935
1936         Reject trailing return type for an operator auto().
1937         * decl.c (grokdeclarator): Reject trailing return types for
1938         all conversion operators, don't handle conversion operators
1939         in the previous checks that deal with auto.
1940
1941 2015-04-20  Ilya Verbin  <ilya.verbin@intel.com>
1942
1943         * parser.c (cp_parser_omp_target_update): Add missed %> to error_at ().
1944
1945 2015-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
1946
1947         * class.c (resolve_address_of_overloaded_function, instantiate_type):
1948         Rename tsubst_flags_t parameter flags -> complain.
1949
1950 2015-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
1951
1952         * call.c (build_op_delete_call, build_over_call): Check mark_used
1953         return value.
1954         * class.c (resolve_address_of_overloaded_function): Likewise.
1955         * decl.c (cxx_maybe_build_cleanup): Likewise.
1956         * pt.c (gen_elem_of_pack_expansion_instantiation, tsubst_baselink,
1957         tsubst_qualified_id, tsubst_copy, tsubst_copy_and_build): Likewise.
1958         * rtti.c (build_dynamic_cast_1): Likewise.
1959         * semantics.c (process_outer_var_ref): Likewise.
1960         * typeck.c (build_class_member_access_expr,
1961         cp_build_function_call_vec, cp_build_addr_expr_1): Likewise.
1962
1963 2015-04-15  Jason Merrill  <jason@redhat.com>
1964
1965         * constexpr.c (cxx_eval_store_expression): Ignore clobbers.
1966         (build_constexpr_constructor_member_initializers): Loop to find
1967         the BIND_EXPR.
1968         * decl.c (start_preparsed_function): Clobber the object at the
1969         beginning of a constructor.
1970
1971         * decl.c (grokmethod): Only set DECL_COMDAT if TREE_PUBLIC is set.
1972         * method.c (implicitly_declare_fn): Likewise.
1973         * decl2.c (vague_linkage_p): Check TREE_PUBLIC first.
1974
1975         * decl2.c (determine_visibility): Use get_template_info.
1976
1977 2015-04-15  Jason Merrill  <jason@redhat.com>
1978             Marek Polacek  <polacek@redhat.com>
1979
1980         PR c++/65727
1981         * lambda.c (lambda_expr_this_capture): In unevaluated context go
1982         through the normal loop, just don't capture.
1983         (maybe_resolve_dummy): Handle null return.
1984
1985 2015-04-15  Paolo Carlini  <paolo.carlini@oracle.com>
1986
1987         * call.c (enforce_access): Emit error + inform.
1988
1989 2015-04-15  Marek Polacek  <polacek@redhat.com>
1990
1991         * constexpr.c (use_new_call): Remove #define.
1992         (lookup_parameter_binding): Remove function.
1993         (cxx_bind_parameters_in_call): Remove unused code.
1994         (cxx_eval_call_expression): Likewise.
1995         (cxx_eval_constant_expression): Likewise.
1996
1997 2015-04-14  Mikhail Maltsev  <maltsevm@gmail.com>
1998
1999         * tree.c (replace_placeholders_t): Remove unused type.
2000         (replace_placeholders): Remove unused pset.
2001
2002 2015-04-14  Jason Merrill  <jason@redhat.com>
2003
2004         * pt.c (lookup_template_class_1): Use coerce_innermost_template_parms.
2005
2006         PR c++/65695
2007         * cvt.c (cp_fold_convert): Avoid wrapping PTRMEM_CST in NOP_EXPR.
2008
2009         PR c++/65721
2010         * name-lookup.c (do_class_using_decl): Complain about specifying
2011         the current class even if there are dependent bases.
2012
2013 2015-04-14  David Krauss  <david_work@me.com>
2014
2015         PR c++/59766
2016         * decl.c (grokdeclarator): Do not flag friends with deduced return.
2017
2018 2015-04-14  Momchil Velikov  <momchil.velikov@gmail.com>
2019             Jason Merrill  <jason@redhat.com>
2020
2021         PR c++/60994
2022         * parser.c (cp_parser_class_name): Add enum_ok parameter.
2023         (cp_parser_qualifying_entity): Use it instead of cp_parser_type_name.
2024         (cp_parser_diagnose_invalid_type_name): Don't assume a template is
2025         a class template.
2026
2027 2015-04-12  Jakub Jelinek  <jakub@redhat.com>
2028
2029         PR c++/65736
2030         * constexpr.c (cxx_eval_pointer_plus_expression): Don't fold for VLAs,
2031         don't fold if op01 isn't divisible by TYPE_SIZE_UNIT.  Convert
2032         the expression to the original type at the end.
2033
2034 2015-04-09  Jakub Jelinek  <jakub@redhat.com>
2035
2036         PR c++/65690
2037         * tree.c (cp_build_qualified_type_real): Copy TYPE_ALIGN and
2038         TYPE_USER_ALIGN.
2039
2040         PR c++/65690
2041         * tree.c (build_cplus_array_type): Layout type before variants are
2042         set, but copy over TYPE_SIZE and TYPE_SIZE_UNIT from the main
2043         variant.
2044
2045 2015-04-03  Paolo Carlini  <paolo.carlini@oracle.com>
2046
2047         PR c++/64085
2048         * lambda.c (add_capture): Use dependent_type_p for capture by
2049         reference too.
2050
2051 2015-04-02  Marek Polacek  <polacek@redhat.com>
2052
2053         PR c++/65642
2054         * constexpr.c (cxx_eval_pointer_plus_expression): Call
2055         cxx_eval_constant_expression on the first operand.
2056
2057 2015-04-01  Jason Merrill  <jason@redhat.com>
2058
2059         PR c++/65625
2060         * decl.c (make_typename_type): Handle seeing a variable template.
2061
2062 2015-04-01  Paolo Carlini  <paolo.carlini@oracle.com>
2063
2064         PR c++/56100
2065         * pt.c (instantiating_current_function_p): New.
2066         * name-lookup.c (pushdecl_maybe_friend_1): Use it.
2067         * cp-tree.h (instantiating_current_function_p): Declare.
2068
2069 2015-04-01  Jason Merrill  <jason@redhat.com>
2070
2071         PR c++/65646
2072         * decl.c (grokvardecl): Don't call check_explicit_specialization
2073         for non-template members of a class template.
2074
2075 2015-04-01  Marek Polacek  <polacek@redhat.com>
2076
2077         PR c++/65554
2078         * class.c (finish_struct): Require that the second field of a
2079         user-defined initializer_list be of size type.
2080
2081 2015-03-31  Marek Polacek  <polacek@redhat.com>
2082
2083         PR c++/65390
2084         * tree.c (build_cplus_array_type): Use dependent_type_p rather than
2085         checking for constness.
2086
2087 2015-03-30  Marek Polacek  <polacek@redhat.com>
2088
2089         PR c++/65398
2090         * constexpr.c (cxx_fold_indirect_ref): Don't perform the
2091          *(&A[i] p+ j) => A[i + j] transformation here.
2092         (cxx_eval_pointer_plus_expression): New function.
2093         (cxx_eval_constant_expression): Use it here.
2094
2095 2015-03-27  Tobias Burnus  <burnus@net-b.de>
2096
2097         PR c/65586
2098         * parser.c (cp_parser_omp_for, cp_parser_omp_parallel,
2099         cp_parser_omp_distribute, cp_parser_omp_teams, cp_parser_omp_target,
2100         cp_parser_omp_declare): Don't show error for skipped omp pragmas with
2101         -fopenmp-simd.
2102
2103 2015-03-27  Marek Polacek  <polacek@redhat.com>
2104
2105         PR c++/65556
2106         * semantics.c (finish_switch_cond): If the unlowered type is not an
2107         enum, use the type of the condition.
2108
2109 2015-03-27  Jason Merrill  <jason@redhat.com>
2110
2111         PR c++/65509
2112         * decl.c (make_rtl_for_nonlocal_decl): Don't defer static
2113         constants.
2114
2115 2015-03-26  Mikhail Maltsev  <maltsevm@gmail.com>
2116
2117         PR c++/65154
2118         * init.c (build_vec_init): Fix initializing aggregates
2119         with empty init list.
2120
2121 2015-03-26  Jason Merrill  <jason@redhat.com>
2122
2123         PR c++/65525
2124         * constexpr.c (potential_constant_expression_1): Handle MEM_REF.
2125
2126 2015-03-25  Marek Polacek  <polacek@redhat.com>
2127
2128         PR c++/65558
2129         * name-lookup.c (handle_namespace_attrs): Ignore abi_tag attribute
2130         on an anonymous namespace.
2131
2132 2015-03-25  Marek Polacek  <polacek@redhat.com>
2133
2134         PR c++/61670
2135         * class.c (remove_zero_width_bit_fields): Check for null DECL_SIZE.
2136
2137 2015-03-24  Jason Merrill  <jason@redhat.com>
2138
2139         PR c++/65046
2140         * cp-tree.h (NAMESPACE_IS_INLINE): Remove.
2141         * parser.c (cp_parser_namespace_definition): Don't set it.
2142         * name-lookup.c (handle_namespace_attrs): Check
2143         DECL_NAMESPACE_ASSOCIATIONS instead.
2144
2145         PR c++/65498
2146         * pt.c (get_mostly_instantiated_function_type): Just return the
2147         type of the partially instantiated template in DECL_TI_TEMPLATE.
2148
2149 2015-03-20  Marek Polacek  <polacek@redhat.com>
2150
2151         PR c++/65398
2152         * constexpr.c (cxx_fold_indirect_ref): Transform *(&A[i] p+ j) into
2153         A[i + j].
2154
2155 2015-03-20  Marek Polacek  <polacek@redhat.com>
2156
2157         PR c++/65072
2158         * typeck.c (lookup_anon_field): Make sure we're dealing with the main
2159         variant.
2160
2161 2015-03-19  Jason Merrill  <jason@redhat.com>
2162
2163         PR c++/65046
2164         Automatically propagate ABI tags to variables and functions
2165         from their (return) type.
2166         * class.c (check_tag): Handle variables and functions.
2167         (mark_or_check_attr_tags): Split out from find_abi_tags_r.
2168         (mark_or_check_tags): Likewise.
2169         (mark_abi_tags): Use it.  Rename from mark_type_abi_tags.
2170         (check_abi_tags): Add single argument overload for decls.
2171         Handle inheriting tags for decls.
2172         * mangle.c (write_mangled_name): Call it.
2173         (mangle_return_type_p): Split out from write_encoding.
2174         (unmangled_name_p): Split out from write_mangled_name.
2175         (write_mangled_name): Ignore abi_tag on namespace.
2176         * cp-tree.h (NAMESPACE_IS_INLINE): Replace NAMESPACE_ABI_TAG.
2177         * parser.c (cp_parser_namespace_definition): Set it.
2178         * name-lookup.c (handle_namespace_attrs): Use arguments. Warn
2179         about abi_tag attribute on non-inline namespace.
2180         * tree.c (check_abi_tag_args): Split out from handle_abi_tag_attribute.
2181         (handle_abi_tag_attribute): Allow tags on variables.
2182
2183 2015-03-19  Jakub Jelinek  <jakub@redhat.com>
2184
2185         * decl2.c (cplus_decl_attributes): Also add "omp declare target"
2186         attribute for DECL_EXTERNAL VAR_DECLs.
2187
2188 2015-03-18  Paolo Carlini  <paolo.carlini@oracle.com>
2189
2190         PR c++/65340
2191         * call.c (build_over_call): Pass the tsubst_flags_t argument to
2192         mark_used.
2193         * decl2.c (mark_used): Inline the require_deduced_type call and
2194         guard the error call.
2195
2196 2015-03-16  Jason Merrill  <jason@redhat.com>
2197
2198         PR c++/65061
2199         * parser.c (cp_parser_template_name): Call strip_using_decl.
2200
2201 2015-03-16  Marek Polacek  <polacek@redhat.com>
2202
2203         DR 1688
2204         PR c++/65327
2205         * decl.c (grokdeclarator): Allow volatile and constexpr together.
2206
2207 2015-03-12  Paolo Carlini  <paolo.carlini@oracle.com>
2208
2209         PR c++/65323
2210         * decl.c (check_default_argument): Don't call
2211         maybe_warn_zero_as_null_pointer_constant.
2212
2213 2015-03-11  Aldy Hernandez  <aldyh@redhat.com>
2214
2215         * cp-gimplify.c (simple_empty_class_p): New.
2216         * cp-gimplify.c (cp_gimplify_expr): Handle RETURN_EXPR.  Abstract
2217         the code for empty class copies into simple_empty_class_p, and
2218         adapt it to handle COMPOUND_EXPRs.
2219
2220 2015-03-10  Paolo Carlini  <paolo.carlini@oracle.com>
2221
2222         PR c++/65370
2223         * decl.c (duplicate_decls): Call check_redeclaration_no_default_args
2224         only if the location of newdecl doesn't match the location of olddecl.
2225
2226 2015-03-10  Jakub Jelinek  <jakub@redhat.com>
2227
2228         PR c++/65127
2229         * parser.c (parsing_nsdmi): Don't return true if current_class_ptr
2230         is not a PARM_DECL.
2231
2232 2015-03-10  Jason Merrill  <jason@redhat.com>
2233
2234         PR c++/65333
2235         DR 1558
2236         * pt.c (dependent_type_p_r): Check both class and alias template args.
2237
2238 2015-03-10  Jakub Jelinek  <jakub@redhat.com>
2239
2240         PR c/65120
2241         * parser.c (cp_parser_binary_expression): Check for tcc_comparison
2242         before preparing arguments to warn_logical_not_parentheses.
2243         Use maybe_constant_value on rhs.
2244
2245 2015-03-09  Jason Merrill  <jason@redhat.com>
2246
2247         PR c++/65339
2248         * call.c: Don't call maybe_resolve_dummy when calling a constructor.
2249
2250 2015-03-09  Jakub Jelinek  <jakub@redhat.com>
2251
2252         PR c/65120
2253         * parser.c (cp_parser_binary_expression): Don't warn for
2254         !!x == y or !b == y where b is bool.
2255
2256 2015-03-06  Aldy Hernandez  <aldyh@redhat.com>
2257
2258         * ptree.c (cxx_print_lambda_node): New.
2259         (cxx_print_xnode): Handle LAMBDA_EXPR.
2260
2261 2015-03-03  Aldy Hernandez  <aldyh@redhat.com>
2262
2263         PR c++/65295
2264         * constexpr.c (cxx_eval_constant_expression): Remove assert in
2265         RESULT_DECL handling.
2266
2267 2015-02-26  Marek Polacek  <polacek@redhat.com>
2268
2269         PR c++/65202
2270         * constexpr.c (cxx_eval_constant_expression): Don't evaluate
2271         a RETURN_EXPR if its operand is null.
2272
2273 2015-02-25  Jason Merrill  <jason@redhat.com>
2274
2275         PR c++/65209
2276         * decl2.c (constrain_visibility) [VISIBILITY_ANON]: Clear
2277         DECL_COMDAT.
2278         (constrain_visibility_for_template): Handle reference arguments.
2279
2280         PR debug/58315
2281         * decl.c (start_preparsed_function): Use create_artificial_label
2282         for cdtor_label.
2283
2284 2015-02-17  Paolo Carlini  <paolo.carlini@oracle.com>
2285             Jakub Jelinek  <jakub@redhat.com>
2286
2287         PR c++/65075
2288         * constexpr.c (check_constexpr_bind_expr_vars): Allow
2289         implicit typedefs for lambda types.
2290
2291 2015-02-13  Paolo Carlini  <paolo.carlini@oracle.com>
2292
2293         PR c++/60894
2294         * decl.c (lookup_and_check_tag): Use strip_using_decl.
2295
2296 2015-02-13  Jason Merrill  <jason@redhat.com>
2297
2298         PR c++/65054
2299         * pt.c (template_args_equal): Look through conversions here.
2300         * tree.c (cp_tree_equal): Not here.
2301
2302 2015-02-13  Paolo Carlini  <paolo.carlini@oracle.com>
2303
2304         PR c++/60211
2305         * parser.c (cp_parser_pragma): Diagnose PRAGMA_IVDEP at
2306         pragma_external context.
2307
2308 2015-02-13  Jason Merrill  <jason@redhat.com>
2309
2310         PR c++/65051
2311         * call.c (reference_binding): Don't look for bad conversion
2312         if TO is incomplete.
2313
2314 2015-02-13  Paolo Carlini  <paolo.carlini@oracle.com>
2315
2316         PR c++/64970
2317         * decl.c (make_typename_type): Pass tsubst_flags_t argument
2318         to lookup_template_class.
2319
2320 2015-02-13  Jakub Jelinek  <jakub@redhat.com>
2321
2322         PR ipa/65034
2323         * decl.c (start_preparsed_function): Use void_type_node instead
2324         of NULL_TREE as LABEL_DECL type.
2325
2326 2015-02-12  Jason Merrill  <jason@redhat.com>
2327
2328         PR c++/64898
2329         * mangle.c (write_mangled_name): Fix test for variable template
2330         instantiation.
2331
2332         * decl.c (begin_destructor_body): Condition clobber on
2333         -flifetime-dse.
2334
2335 2015-02-12 Andrea Azzarone <azzaronea@gmail.com>
2336
2337         PR c++/64959
2338         * parser.c (lookup_literal_operator): Return all candidates.
2339         (cp_parser_userdef_char_literal): Simplify error handling.
2340         (cp_parser_userdef_numeric_literal):  Pass tf_warning_or_error.
2341         (cp_parser_userdef_string_literal): Pass tf_warning_or_error.
2342         Also give higher priority to standard string UDL operator.
2343
2344 2015-02-12  Jakub Jelinek  <jakub@redhat.com>
2345
2346         PR debug/55541
2347         * cp-tree.h (BLOCK_OUTER_CURLY_BRACE_P): Define.
2348         * decl.c (poplevel): If functionbody, try not to create an extra
2349         BLOCK for function body and use subblocks as that, if it is non-NULL
2350         and doesn't have siblings.  Set BLOCK_OUTER_CURLY_BRACE_P flag.
2351         (outer_curly_brace_block): Use BLOCK_OUTER_CURLY_BRACE_P flag.
2352
2353         PR sanitizer/64984
2354         * except.c (check_noexcept_r): Return NULL for internal
2355         calls.
2356
2357 2015-02-10  Jason Merrill  <jason@redhat.com>
2358
2359         PR c++/64994
2360         * constexpr.c (cxx_eval_call_expression): Walk the clone list.
2361
2362 2015-02-10  Jan Hubicka  <hubicka@ucw.cz>
2363
2364         PR ipa/64982
2365         * method.c (use_thunk): Do not check for stdarg thunks.
2366
2367 2015-02-06  Jason Merrill  <jason@redhat.com>
2368
2369         PR c++/64899
2370         * init.c (build_vec_init): Handle default-initialized array with
2371         constexpr default constructor.
2372
2373 2015-02-04  Jakub Jelinek  <jakub@redhat.com>
2374
2375         PR c/64824
2376         PR c/64868
2377         * parser.c (cp_parser_omp_atomic): Handle RDIV_EXPR.
2378
2379 2015-02-03  Paolo Carlini  <paolo.carlini@oracle.com>
2380
2381         PR c++/64877
2382         * typeck.c (cp_build_binary_op): Avoid spurious -Waddress warnings
2383         for generated expressions.
2384
2385 2015-02-02  Ville Voutilainen  <ville.voutilainen@gmail.com>
2386
2387         PR c++/64901
2388         * decl.c (duplicate_decls): Also duplicate DECL_FINAL_P and
2389         DECL_OVERRIDE_P.
2390
2391 2015-02-02  Jason Merrill  <jason@redhat.com>
2392
2393         * tree.c (handle_abi_tag_attribute): Diagnose invalid arguments.
2394
2395 2015-01-30  Joseph Myers  <joseph@codesourcery.com>
2396
2397         * class.c, except.c, parser.c, pt.c: All callers of fatal_error
2398         changed to pass input_location as first argument.
2399
2400 2015-01-29  Jakub Jelinek  <jakub@redhat.com>
2401
2402         PR c++/64717
2403         * cp-ubsan.c (cp_ubsan_instrument_vptr): Don't wrap vptr
2404         into SAVE_EXPR.
2405
2406 2015-01-29  Jason Merrill  <jason@redhat.com>
2407
2408         PR c++/49508
2409         * semantics.c (finish_return_stmt): Suppress -Wreturn-type on
2410         erroneous return statement.
2411
2412         PR c++/64521
2413         * repo.c (repo_emit_p): It's OK for a clone to be extern at this
2414         point.
2415
2416 2015-01-27  Caroline Tice  <cmtice@google.com>
2417
2418         Committing VTV Cywin/Ming patch for Patrick Wollgast
2419         * vtable-class-hierarchy.cc (vtv_generate_init_routine): Add
2420         check for not TARGET_PECOFF at the VTV_PREINIT_PRIORITY checks.
2421
2422 2015-01-27  Jason Merrill  <jason@redhat.com>
2423
2424         PR c++/58597
2425         * lambda.c (maybe_add_lambda_conv_op): Check cfun rather than
2426         current_function_decl.
2427
2428         PR c++/63889
2429         * pt.c (finish_template_variable): Move from semantics.c.
2430         Handle multiple template arg levels.  Handle coercion here.
2431         (lookup_template_variable): Not here.
2432
2433 2015-01-23  Jason Merrill  <jason@redhat.com>
2434
2435         PR c++/64314
2436         PR c++/57510
2437         * typeck2.c (split_nonconstant_init_1): Remove a sub-CONSTRUCTOR
2438         that has been completely split out.
2439
2440         PR c++/64701
2441         * constexpr.c (cxx_eval_constant_expression): Don't crash on C++
2442         statement codes.
2443
2444         PR c++/64727
2445         * constexpr.c (cxx_eval_constant_expression): Allow for lvalue use
2446         of CONST_DECL.
2447
2448 2015-01-21  Jason Merrill  <jason@redhat.com>
2449
2450         PR c++/64603
2451         * constexpr.c (cxx_eval_constant_expression): Only shortcut
2452         constant CONSTRUCTORs.
2453
2454         PR c++/64647
2455         * constexpr.c (ensure_literal_type_for_constexpr_object): Don't
2456         give a hard error in a template instantiation.
2457
2458 2015-01-21  Richard Biener  <rguenther@suse.de>
2459
2460         PR middle-end/64313
2461         * decl.c (duplicate_decls): Call set_builtin_decl_declared_p
2462         for builtins the user declared correctly.
2463
2464 2015-01-16  Paolo Carlini  <paolo.carlini@oracle.com>
2465
2466         PR c++/58614
2467         * pt.c (unify): When BRACE_ENCLOSED_INITIALIZER_P (arg), handle
2468         TREE_TYPE (elt) == error_mark_node.
2469
2470 2015-01-15  Jan Hubicka  <hubicka@ucw.cz>
2471
2472         PR tree-optimization/62053
2473         * tree.c (build_cplus_array_type): Layout type after variants are set.
2474
2475 2015-01-15  Jakub Jelinek  <jakub@redhat.com>
2476
2477         * cp-gimplify.c (cp_genericize_r): Call
2478         cp_ubsan_maybe_instrument_member_call for member calls.
2479         (cp_ubsan_check_member_access_r): New function.
2480         (cp_genericize_tree): Call cp_ubsan_instrument_member_accesses.
2481         * cp-tree.h (cp_ubsan_maybe_instrument_member_call,
2482         cp_ubsan_instrument_member_accesses,
2483         cp_ubsan_maybe_instrument_downcast,
2484         cp_ubsan_maybe_instrument_cast_to_vbase): New prototypes.
2485         * cp-ubsan.c: New file.
2486         * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-ubsan.o.
2487         * constexpr.c (cxx_eval_call_expression): Return void_node
2488         for IFN_UBSAN_VPTR.
2489         (potential_constant_expression_1): Return true for
2490         UBSAN_NULL, UBSAN_BOUNDS and UBSAN_VPTR internal calls.
2491         * typeck.c (build_class_member_access_expr): Provide locus
2492         for COMPONENT_REFs.
2493         (build_static_cast_1): Instrument downcasts.
2494         * class.c (build_base_path): For -fsanitize=vptr and !fixed_type_p
2495         add ubsan instrumentation for virtual_access.
2496         * call.c: Include internal-fn.h.
2497         (set_flags_from_callee): Handle internal calls.
2498
2499 2015-01-15  Momchil Velikov  <momchil.velikov@gmail.com>
2500
2501         PR c++/59366
2502         * name-lookup.c (pushdecl_maybe_friend_1): Hide friend functions
2503         and function templates, declared only in the class.
2504         * decl.c (duplicate_decls): Reveal hidden friend functions or
2505         function templates, if they are redeclared outside the class.
2506
2507 2015-01-15  Jason Merrill  <jason@redhat.com>
2508
2509         PR c++/64356
2510         * constexpr.c (cxx_eval_binary_expression): Fix pasto.
2511
2512         PR c++/63283
2513         * constexpr.c (potential_constant_expression_1): Handle reference
2514         args in templates.
2515
2516 2015-01-15  Thomas Schwinge  <thomas@codesourcery.com>
2517             James Norris  <jnorris@codesourcery.com>
2518             Cesar Philippidis  <cesar@codesourcery.com>
2519             Ilmir Usmanov  <i.usmanov@samsung.com>
2520             Jakub Jelinek  <jakub@redhat.com>
2521
2522         * parser.c: Include "gomp-constants.h".
2523         (cp_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
2524         omp_clause_map_kind.  Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
2525         Use OMP_CLAUSE_SET_MAP_KIND.
2526         (cp_parser_omp_construct, cp_parser_pragma): Handle
2527         PRAGMA_OACC_CACHE, PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA,
2528         PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_PARALLEL,
2529         PRAGMA_OACC_LOOP, PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
2530         (cp_parser_omp_clause_name): Handle "async", "copy", "copyout",
2531         "create", "delete", "deviceptr", "host", "num_gangs",
2532         "num_workers", "present", "present_or_copy", "pcopy",
2533         "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
2534         "present_or_create", "pcreate", "vector_length", "wait".
2535         (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK)
2536         (OACC_EXIT_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
2537         (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
2538         (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
2539         (cp_parser_omp_var_list_no_open): Handle OMP_CLAUSE__CACHE_.
2540         (cp_parser_oacc_data_clause, cp_parser_oacc_data_clause_deviceptr)
2541         (cp_parser_oacc_clause_vector_length, cp_parser_oacc_wait_list)
2542         (cp_parser_oacc_clause_wait, cp_parser_omp_clause_num_gangs)
2543         (cp_parser_omp_clause_num_workers, cp_parser_oacc_clause_async)
2544         (cp_parser_oacc_all_clauses, cp_parser_oacc_cache)
2545         (cp_parser_oacc_data, cp_parser_oacc_enter_exit_data)
2546         (cp_parser_oacc_kernels, cp_parser_oacc_loop)
2547         (cp_parser_oacc_parallel, cp_parser_oacc_update)
2548         (cp_parser_oacc_wait): New functions.
2549         * cp-tree.h (finish_oacc_data, finish_oacc_kernels)
2550         (finish_oacc_parallel): New prototypes.
2551         * semantics.c: Include "gomp-constants.h".
2552         (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR.  Use
2553         GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.  Use
2554         OMP_CLAUSE_SET_MAP_KIND.
2555         (finish_omp_clauses): Handle OMP_CLAUSE_ASYNC,
2556         OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_WAIT, OMP_CLAUSE__CACHE_.
2557         Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
2558         (finish_oacc_data, finish_oacc_kernels, finish_oacc_parallel): New
2559         functions.
2560
2561 2015-01-14  Paolo Carlini  <paolo.carlini@oracle.com>
2562
2563         PR c++/58671
2564         * decl2.c (var_defined_without_dynamic_init): Handle gracefully
2565         self-initialization.
2566
2567 2015-01-13  Jason Merrill  <jason@redhat.com>
2568
2569         PR c++/64356
2570         PR libstdc++/58777
2571         * constexpr.c (cxx_eval_binary_expression): Don't VERIFY_CONSTANT
2572         pointer expressions.
2573         (cxx_eval_increment_expression): Likewise.
2574
2575         PR c++/64514
2576         * pt.c (coerce_template_parameter_pack): Return NULL for a
2577         zero-length fixed parameter pack with a pack expansion arg.
2578
2579         PR c++/64520
2580         * pt.c (unify): Don't try to deduce to std::initializer_list<T...>.
2581
2582 2015-01-12  Jason Merrill  <jason@redhat.com>
2583
2584         PR c++/64547
2585         * constexpr.c (cxx_eval_call_expression): A call to a void
2586         function doesn't need to return a value.
2587
2588 2015-01-09  Michael Collison  <michael.collison@linaro.org>
2589
2590         * call.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
2591         input.h, alias.h, symtab.h, options.h, fold-const.h,
2592         wide-int.h, and inchash.h due to flattening of tree.h.
2593         * class.c: Ditto.
2594         * constexpr.c: Ditto.
2595         * cp-array-notation.c: Ditto.
2596         * cp-gimplify.c: Ditto.
2597         * cp-lang.c: Ditto.
2598         * cp-objcp-common.c: Ditto.
2599         * cvt.c: Ditto.
2600         * decl2.c: Ditto.
2601         * decl.c: Ditto.
2602         * dump.c: Ditto.
2603         * error.c: Ditto.
2604         * except.c: Ditto.
2605         * expr.c: Ditto.
2606         * friend.c: Ditto.
2607         * init.c: Ditto.
2608         * lambda.c: Ditto.
2609         * lex.c: Ditto.
2610         * mangle.c: Ditto.
2611         * name-lookup.c: Ditto.
2612         * optimize.c: Ditto.
2613         * parser.c: Ditto.
2614         * pt.c: Ditto.
2615         * ptree.c: Ditto.
2616         * repo.c: Ditto.
2617         * rtti.c: Ditto.
2618         * search.c: Ditto.
2619         * semantics.c: Ditto.
2620         * tree.c: Ditto.
2621         * typeck2.c: Ditto.
2622         * typeck.c: Ditto.
2623
2624 2015-01-08  Jason Merrill  <jason@redhat.com>
2625
2626         * cp-gimplify.c (cp_genericize): Use do_ubsan_in_current_function.
2627         * decl.c (compute_array_index_type): Likewise.
2628         * init.c (build_vec_init): Likewise.
2629         * typeck.c (cp_build_binary_op): Likewise.
2630
2631 2015-01-08  Jason Merrill  <jason@redhat.com>
2632
2633         * init.c (build_vec_init): Call ubsan_instrument_bounds to check
2634         whether an initializer-list is too big for a VLA.
2635         (throw_bad_array_length): Remove.
2636         * cp-tree.h: Remove prototype.
2637
2638 2015-01-08  Paolo Carlini  <paolo.carlini@oracle.com>
2639
2640         PR c++/60753
2641         * decl.c (grokfndecl): Add bool parameter.
2642         (grokdeclarator): Adjust calls.
2643         (start_decl): Don't set DECL_DELETED_FN here.
2644
2645 2015-01-06  Jason Merrill  <jason@redhat.com>
2646
2647         * parser.c (cp_parser_nested_name_specifier_opt): Diagnose invalid
2648         template-ids.
2649
2650         PR c++/64455
2651         * pt.c (type_dependent_expression_p): Handle variable templates.
2652         * constexpr.c (potential_constant_expression_1): Use it.
2653
2654         PR c++/64487
2655         * semantics.c (finish_offsetof): Handle templates here.
2656         * parser.c (cp_parser_builtin_offsetof): Not here.
2657
2658         PR c++/64496
2659         * semantics.c (process_outer_var_ref): Diagnose lambda in local
2660         class NSDMI.
2661
2662 2015-01-06  Ville Voutilainen  <ville.voutilainen@gmail.com>
2663
2664         PR c++/64489
2665         * class.c (check_field_decls): Make copy assignment operators
2666         complex only in c++98 mode.
2667
2668 2015-01-05  Trevor Saunders  <tsaunders@mozilla.com>
2669
2670         PR c++/31397
2671         * class.c (check_for_override): Warn when a virtual function is an
2672         override not marked override.
2673
2674 2015-01-05  Trevor Saunders  <tsaunders@mozilla.com>
2675
2676         * class.c (warn_hidden): Use auto_vec<tree> instead of tree_list to
2677         hold base_fndecls.
2678         (get_basefndecls): Adjust.
2679
2680 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
2681
2682         Update copyright years.
2683
2684 2015-01-05  Marek Polacek  <polacek@redhat.com>
2685
2686         PR c/64423
2687         * typeck.c (cp_build_array_ref): Pass loc down to
2688         warn_array_subscript_with_type_char.
2689
2690 \f
2691 Copyright (C) 2015 Free Software Foundation, Inc.
2692
2693 Copying and distribution of this file, with or without modification,
2694 are permitted in any medium without royalty provided the copyright
2695 notice and this notice are preserved.