914f80c777dc9b2eeb56a301fadf16c766d0732e
[platform/upstream/gcc.git] / gcc / cp / ChangeLog
1 2017-02-21  Jakub Jelinek  <jakub@redhat.com>
2
3         PR c++/79655
4         * constexpr.c (cxx_eval_array_reference): Diagnose negative subscript.
5
6         PR c++/79639
7         * constexpr.c (cxx_eval_store_expression): If *valp is a PTRMEM_CST,
8         call cplus_expand_constant on it first.
9
10 2017-02-19  Jason Merrill  <jason@redhat.com>
11
12         PR c++/78139 - destructor needed by new-expression
13         * call.c (build_special_member_call): Use tf_no_cleanup.
14
15         PR c++/78282 - auto template and pack expansion
16         * pt.c (find_parameter_packs_r): Don't walk into the type of
17         templates other than template template-parameters.
18
19         PR c++/79606 - ICE with this->base_member in NSDMI
20         * class.c (build_base_path): Check processing_template_decl.
21
22         PR c++/79607 - ICE with T{} initializer
23         * decl.c (type_dependent_init_p): Check the type of a CONSTRUCTOR.
24
25         PR c++/79566 - elaborated-type-specifier in range for
26         * parser.c (cp_parser_simple_declaration): Fix check for type
27         definition.
28
29         PR c++/79400 - confusing suggestion of 'noexcept'
30         * parser.c (cp_parser_exception_specification_opt): Remove
31         suggestion for deprecated dynamic exception-specification.
32
33         PR c++/79470 - partial ordering with reference parameters
34         * pt.c (unify) [INDIRECT_REF]: Handle pack expansions.
35
36         PR c++/79500 - ICE with non-template deduction guide
37         * pt.c (do_class_deduction): Use STRIP_TEMPLATE rather than
38         DECL_TEMPLATE_RESULT.
39
40         PR c++/79580 - ICE with compound literal
41         * parser.c (cp_parser_class_head): If we're in the middle of an
42         expression, use ts_within_enclosing_non_class.
43
44         PR c++/79503 - inherited ctor taking base class
45         * call.c (add_function_candidate): Also check that
46         DECL_INHERITED_CTOR_BASE is reference-related to the parameter type.
47
48 2017-02-19  Paolo Carlini  <paolo.carlini@oracle.com>
49
50         PR c++/79380
51         * typeck.c (cxx_alignas_expr): Reject a non-integral alignas
52         argument.
53
54 2017-02-19  Eric Fiselier  <eric@efcs.ca>
55             Jonathan Wakely  <jwakely@redhat.com>
56
57         PR c++/69523
58         * parser.c (cp_parser_unqualified_id): Use OPT_Wliteral_suffix to
59         control warning about literal suffix identifiers without a leading
60         underscore.
61
62 2017-02-17  Jason Merrill  <jason@redhat.com>
63
64         PR c++/79508 - lookup error with member template
65         * parser.c (cp_parser_template_name): Clear
66         parser->context->object_type if we aren't doing lookup.
67
68         PR c++/78690 - ICE with using and global type with same name
69         * pt.c (type_dependent_object_expression_p): True for
70         IDENTIFIER_NODE.
71
72         PR c++/79549 - C++17 ICE with non-type auto template parameter pack
73         * pt.c (convert_template_argument): Just return an auto arg pack.
74         (tsubst_template_args): Don't tsubst an auto pack type.
75
76         PR c++/79556 - C++17 ICE with non-type auto
77         * pt.c (do_auto_deduction): Don't try to deduce from null type.
78
79         PR c++/79533 - C++17 ICE with temporary cast to reference
80         * call.c (build_over_call): Conversion to a reference prevents copy
81         elision.
82
83 2017-02-16  Jakub Jelinek  <jakub@redhat.com>
84             Jason Merrill  <jason@redhat.com>
85
86         PR c++/79502 - lost nodiscard attribute
87         * pt.c (apply_late_template_attributes): Do apply non-dependent
88         attributes to types.
89
90 2017-02-16  Jason Merrill  <jason@redhat.com>
91
92         PR c++/78572 - ICE with self-modifying array initializer
93         * constexpr.c (cxx_eval_store_expression): The object we're
94         initializing is outside the constant-expression.
95         (cxx_eval_call_expression): Set ctx->call.
96
97         PR c++/79050 - ICE with undeduced auto and LTO
98         * decl.c (poplevel): Remove undeduced auto decls.
99
100 2017-02-16  Jakub Jelinek  <jakub@redhat.com>
101
102         PR c++/79512
103         * parser.c (cp_parser_omp_target): For -fopenmp-simd
104         ignore #pragma omp target even when not followed by identifier.
105
106 2017-02-15  Jason Merrill  <jason@redhat.com>
107             Jakub Jelinek  <jakub@redhat.com>
108
109         PR c++/79464 - ICE in IPA with omitted constructor parms
110         * class.c (build_clone): Also omit parms from TYPE_ARG_TYPES.
111         (adjust_clone_args): Adjust.
112         (add_method): Remember omitted parms.
113         * call.c (add_function_candidate): Likewise.
114         * mangle.c (write_method_parms): Likewise.
115         * method.c (ctor_omit_inherited_parms): Return false if there are no
116         parms to omit.
117
118 2017-02-15  Martin Sebor  <msebor@redhat.com>
119
120         PR c++/79363
121         * init.c (maybe_reject_flexarray_init): New function.
122         (perform_member_init): Call it.
123
124 2017-02-15  Jakub Jelinek  <jakub@redhat.com>
125
126         PR c++/79301
127         * parser.c (cp_parser_std_attribute): Don't pedwarn about
128         [[deprecated]] with -std=c++11 and [[fallthrough]] with
129         -std=c++11 and -std=c++14.
130
131         PR c++/79288
132         * decl.c (grokdeclarator): For static data members, handle thread_p
133         only after handling inline.
134
135 2017-02-14  Marek Polacek  <polacek@redhat.com>
136
137         PR c++/79420
138         PR c++/79463
139         * parser.c (cp_parser_postfix_dot_deref_expression): Avoid
140         clobbering if the postfix expression isn't an EXPR_P.
141
142 2017-02-13  Jason Merrill  <jason@redhat.com>
143
144         PR c++/79461 - ICE with lambda in constexpr constructor
145         * constexpr.c (build_data_member_initialization): Ignore
146         initialization of a local variable.
147
148 2017-02-13  Jakub Jelinek  <jakub@redhat.com>
149
150         * init.c (warn_placement_new_too_small): Add missing space in
151         diagnostics.
152         * parser.c (cp_parser_oacc_declare): Likewise.
153         * mangle.c (maybe_check_abi_tags): Likewise.
154
155         PR c++/79232
156         * typeck.c (cp_build_modify_expr): Handle properly COMPOUND_EXPRs
157         on lhs that have {PRE{DEC,INC}REMENT,MODIFY,MIN,MAX,COND}_EXPR
158         in the rightmost operand.
159
160 2017-02-13  Nathan Sidwell  <nathan@acm.org>
161
162         PR c++/79296 - ICE mangling localized template instantiation
163         * decl2.c (determine_visibility): Use template fn context for
164         local class instantiations.
165
166 2017-02-11  Jason Merrill  <jason@redhat.com>
167
168         PR c++/77659 - ICE with new and C++14 aggregate NSDMI
169         * init.c (build_new): Make backups of any CONSTRUCTORs in init.
170         (build_new_1): Use replace_placeholders.
171         * tree.c (replace_placeholders_t): Also track whether we've seen a
172         placeholder.
173         (replace_placeholders, replace_placeholders_r): Adjust.
174         * cp-tree.h: Adjust.
175
176         PR c++/77790 - ICE with auto function in C++11 mode
177         * decl.c (undeduced_auto_decl): Remove C++14 limitation.
178         (require_deduced_type): Add complain parm, return bool.
179         * cp-tree.h: Adjust.
180         * decl2.c (mark_used): Use require_deduced_type.
181
182 2017-02-10  Jason Merrill  <jason@redhat.com>
183
184         PR c++/78908 - template ops and bitfields
185         * tree.c (build_min_non_dep): Use unlowered_expr_type.
186
187         PR c++/78897 - constexpr union
188         * constexpr.c (cxx_eval_store_expression): A store to a union member
189         erases a previous store to another member.
190
191         PR c++/71285 - member of fold-expression
192         * semantics.c (finish_unary_fold_expr)
193         (finish_binary_fold_expr): Use null type for fold-expressions.
194
195         PR c++/79401 - protected inherited constructor
196         * call.c (enforce_access): For inheriting constructor, find a base
197         binfo in the path we already have.
198
199 2017-02-10  Marek Polacek  <polacek@redhat.com>
200
201         PR c++/79435
202         * pt.c (type_dependent_expression_p): Check if the expression type
203         is null.
204
205         PR c++/79184
206         * cvt.c (ocp_convert): Add a sentinel against -Wint-in-bool-context
207         if warnings shouldn't be given.
208
209 2017-02-10  Paolo Carlini  <paolo.carlini@oracle.com>
210
211         PR c++/71737
212         * pt.c (tsubst_decl): Don't try to preserve a typedef that names
213         an error_mark_node as type.
214
215 2017-02-09  Jakub Jelinek  <jakub@redhat.com>
216             Jason Merrill  <jason@redhat.com>
217
218         PR c++/79143
219         * pt.c (instantiate_class_template_1): Copy CLASSTYPE_NON_AGGREGATE
220         from pattern to type.
221
222 2017-02-09  Jason Merrill  <jason@redhat.com>
223
224         PR c++/79316 - default argument in deduction guide
225         PR c++/79350 - explicit deduction guide
226         * parser.c (cp_parser_constructor_declarator_p)
227         (cp_parser_direct_declarator): Parse deduction guides more like
228         constructors.
229         * cp-tree.h (enum special_function_kind): Add sfk_deduction_guide.
230         * tree.c (special_function_p): Return it.
231         * decl.c (check_special_function_return_type): Handle it.
232         (grokdeclarator, grokfndecl): Adjust.
233         (cp_finish_decl): Pass flags to do_auto_deduction.
234         * error.c (dump_decl_name): Use TFF_UNQUALIFIED_NAME.
235         * pt.c (dguide_name_p): Take a const_tree.
236         (do_class_deduction): Handle explicit.
237         (do_auto_deduction): Pass flags through.
238         (build_deduction_guide): Copy explicit flag.
239
240 2017-02-09  Jakub Jelinek  <jakub@redhat.com>
241
242         PR c++/79429
243         * parser.c (cp_parser_omp_ordered): Don't check for non-pragma_stmt
244         non-pragma_compound context here.
245         (cp_parser_omp_target): Likewise.
246         (cp_parser_pragma): Don't call push_omp_privatization_clauses and
247         parsing for ordered and target omp pragmas in non-pragma_stmt
248         non-pragma_compound contexts.
249
250         PR c/79431
251         * parser.c (cp_parser_oacc_declare): Formatting fix.
252         (cp_parser_omp_declare_target): Don't invoke symtab_node::get on
253         automatic variables.
254
255 2016-02-09  Nathan Sidwell  <nathan@codesourcery.com>
256             Chung-Lin Tang  <cltang@codesourcery.com>
257
258         * parser.c (cp_parser_oacc_clause_tile): Disallow collapse.  Fix
259         parsing.  Parse constant expression. Remove semantic checking.
260         (cp_parser_omp_clause_collapse): Disallow tile.
261         (cp_parser_omp_for_loop): Deal with tile clause.  Don't emit a parse
262         error about missing for after already emitting one.  Use more
263         conventional for idiom for unbounded loop.
264         * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_TILE.
265         * semantics.c (finish_omp_clauses): Correct TILE semantic check.
266         (finish_omp_for): Deal with tile clause.
267
268 2017-02-07  Nathan Sidwell  <nathan@acm.org>
269
270         * method.c (synthesized_method_base_walk): New.  Broken out of ...
271         (synthesized_method_walk): ... here.  Call it.  Cleanup
272         initializations.
273
274 2017-02-07  Patrick Palka  <ppalka@gcc.gnu.org>
275
276         PR c++/79360
277         * typeck2.c (process_init_constructor_union): Consider only
278         FIELD_DECLs when looking for an NSDMI.
279
280 2017-02-06  Jason Merrill  <jason@redhat.com>
281
282         PR c++/71193 - incomplete types in templates
283         * parser.c (cp_parser_postfix_dot_deref_expression): In a template
284         handle incomplete type by pedwarning and then treating as dependent.
285
286 2017-02-06  Jakub Jelinek  <jakub@redhat.com>
287
288         PR c++/79379
289         * constexpr.c (cxx_eval_constant_expression): Handle ANNOTATE_EXPR.
290         (potential_constant_expression_1): Likewise.
291
292         PR c++/79377
293         * tree.c (build_min_non_dep_op_overload): For POST{INC,DEC}REMENT_EXPR
294         allow one fewer than expected arguments if flag_permissive.
295
296         PR c++/79372
297         * decl.c (cp_finish_decomp): On error set decl type to error_mark_node.
298         * pt.c (tsubst_expr): Don't call tsubst_decomp_names on decompositions
299         with error_mark_node type.
300
301 2017-02-03  Jason Merrill  <jason@redhat.com>
302
303         PR c++/78689 - ICE on constructor with label
304         * optimize.c (maybe_clone_body): Replace omitted parameters with
305         null lvalues.
306         * class.c (build_clone): Fix logic for omitting inherited parms.
307
308         PR c++/12245 - excessive memory use
309         * constexpr.c (maybe_constant_value): Fold maybe_constant_value_1
310         back in.  Don't cache constants.
311         (maybe_constant_init): Don't cache constants.
312
313         PR c++/79294 - ICE with invalid template argument
314         * pt.c (convert_nontype_argument_function): Check value-dependence.
315         (convert_nontype_argument): Don't check it here for function ptrs.
316
317 2017-02-02  Richard Biener  <rguenther@suse.de>
318
319         PR cp/14179
320         * cp-gimplify.c (cp_fold): When folding a CONSTRUCTOR copy
321         it lazily on the first changed element only and copy it
322         fully upfront, only storing changed elements.
323
324 2017-02-02  Paolo Carlini  <paolo.carlini@oracle.com>
325
326         PR c++/69637
327         * decl2.c (grokbitfield): In case of error don't set-up DECL_INITIAL
328         to the width.
329
330 2017-01-31  Jakub Jelinek  <jakub@redhat.com>
331
332         PR c++/79304
333         * error.c (dump_expr) <case COMPONENT_REF>: Don't print .
334         after ARROW_EXPR.
335
336 2017-01-31  David Malcolm  <dmalcolm@redhat.com>
337
338         PR c++/79298
339         * name-lookup.c (suggest_alternative_in_explicit_scope): Resolve
340         any namespace aliases.
341
342 2017-01-31  Nathan Sidwell  <nathan@acm.org>
343
344         PR c++/79290
345         * typeck.c (build_ptrmemfunc_access_expr): Set TREE_NO_WARNING.
346
347         PR c++/67273
348         PR c++/79253
349         * pt.c: (instantiate_decl): Push to top level when current
350         function scope doesn't match.  Only push lmabda scope stack when
351         pushing to top.
352
353         * cp-tree.h (instantiate_decl): Make defer_ok bool.
354         * pt.c: Fix instantiate_decl calls to pass true/false not 0/1
355         (instantiate_decl): Simplify and reorder state saving and restoration.
356
357         PR c++/79264
358         * lambda.c (maybe_generic_this_capture): Deal with template-id-exprs.
359         * semantics.c (finish_member_declaration): Assert class is being
360         defined.
361
362 2017-01-30  Alexandre Oliva <aoliva@redhat.com>
363
364         Introduce C++ support in libcc1.
365         * cp-tree.h (struct lang_identifier): Add oracle_looked_up.
366         (ansi_opname): Rename to...
367         (cp_operator_id): ... this.  Adjust all callers.
368         (ansi_assopname): Rename to...
369         (cp_assignment_operator_id): ... this.  Adjust all callers.
370         (cp_literal_operator_id): Declare.
371         (set_global_friend): Declare.
372         (is_global_friend): Declare.
373         (enum cp_oracle_request): New type.
374         (cp_binding_oracle_function): New type.
375         (cp_binding_oracle): Declare.
376         (cp_finish_injected_record_type): Declare.
377         * friend.c (global_friend): New var.
378         (set_global_friend): New fn.
379         (is_global_friend): New fn.
380         (is_friend): Call is_global_friend.
381         * name-lookup.c (cp_binding_oracle): New var.
382         (query_oracle): New fn.
383         (qualified_lookup_using_namespace): Call query_oracle.
384         (lookup_name_real_1): Likewise.
385         * parser.c (cp_literal_operator_id): Drop static.
386         * search.c (friend_accessible_p): Call is_global_friend.
387         * semantics.c (is_this_parameter): Accept a variable if the
388         binding oracle is enabled.
389
390 2017-01-27  Jason Merrill  <jason@redhat.com>
391
392         PR c++/78771 - ICE with inherited constructor.
393         * call.c (build_over_call): Call deduce_inheriting_ctor here.
394         * pt.c (tsubst_decl): Not here.
395         * class.c (add_method): Or here.
396         * method.c (deduce_inheriting_ctor): Handle clones.
397         (implicitly_declare_fn): Don't deduce inheriting ctors yet.
398
399 2017-01-27  Adam Butcher  <adam@jessamine.co.uk>
400
401         PR c++/64382
402         * cp/parser.c (parsing_default_capturing_generic_lambda_in_template):
403         New function.
404         * cp/cp-tree.h: Declare it.
405         * cp/semantics.c (finish_id_expression): Resolve names within a default
406         capturing generic lambda defined within a template prior to
407         instantiation to allow for captures to be added to the closure type.
408
409 2017-01-26  Jakub Jelinek  <jakub@redhat.com>
410
411         PR c++/68727
412         * cp-tree.def (OFFSETOF_EXPR): Bump number of operands to 2.
413         * cp-tree.h (finish_offsetof): Add OBJECT_PTR argument.
414         * parser.c (cp_parser_builtin_offsetof): Pass result of
415         build_static_cast of null_pointer_node to finish_offsetof.
416         * semantics.c (finish_offsetof): Add OBJECT_PTR argument, use
417         it for -Winvalid-offsetof pedwarn instead of trying to guess
418         original offsetof type from EXPR.  Save OBJECT_PTR as a new
419         second operand to OFFSETOF_EXPR.
420         * pt.c (tsubst_copy_and_build) <case OFFSETOF_EXPR>: Adjust
421         finish_offsetof caller, pass the second operand of OFFSETOF_EXPR
422         as OBJECT_PTR.
423
424 2017-01-26  Jason Merrill  <jason@redhat.com>
425
426         * name-lookup.c (parse_using_directive): Deprecate strong using.
427
428         PR c++/79176 - lambda ICE with -flto -Os
429         * decl2.c (vague_linkage_p): Handle decloned 'tors.
430         * tree.c (decl_linkage): Likewise.
431
432 2017-01-25  Martin Sebor  <msebor@redhat.com>
433
434         * decl.c (grokdeclarator): Fix a typo in a comment.
435
436 2017-01-25  Jakub Jelinek  <jakub@redhat.com>
437
438         PR c++/78896
439         * decl.c (cp_finish_decomp): Disallow memberwise decomposition of
440         lambda expressions.
441
442         PR c++/77914
443         * parser.c (cp_parser_lambda_declarator_opt): Pedwarn with
444         OPT_Wpedantic on lambda templates for -std=c++14 and higher.
445
446 2017-01-25  Maxim Ostapenko  <m.ostapenko@samsung.com>
447
448         PR lto/79061
449         * decl.c (cxx_init_decl_processing): Pass main_input_filename
450         to build_translation_unit_decl.
451
452 2017-01-24  Jakub Jelinek  <jakub@redhat.com>
453
454         PR c++/79205
455         * cp-gimplify.c (cp_genericize_r): Add result of
456         convert_from_reference on invisiref parm to p_set.
457
458 2017-01-24  Nathan Sidwell  <nathan@acm.org>
459
460         PR c++/78469 - defaulted ctor and inaccessible dtor
461         * cp-tree.h (tsubst_flags): Add tf_no_cleanup.
462         * init.c (build_new_1): Pass tf_no_cleanup to build_value_init.
463         * tree.c (build_target_expr): Check tf_no_cleanup.
464
465         PR c++/79118 - anon-members and constexpr
466         * constexpr.c (cx_check_missing_mem_inits): Caller passes type not
467         ctor decl.  Recursively check anonymous members.
468         (register_constexpr_fundef): Adjust cx_check_missing_mem_inits
469         call.
470         (explain_invalid_constexpr_fn): Likewise.
471
472 2017-01-23  Nathan Sidwell  <nathan@acm.org>
473
474         PR c++/71710 - template using directive of field
475         * pt.c (tsubst_copy_and_build [COMPONENT_REF]): Move FIELD_DECL
476         check earlier.
477
478         PR c++/71406 - ICE with scope-ref'd template id exprs
479         PR c++/77508
480         * typeck.c (finish_class_member_access_expr): Break up SCOPE_REF
481         before breaking up TEMPLATE_ID_EXPR.
482
483 2017-01-20  Nathan Sidwell  <nathan@acm.org>
484
485         PR c++/78495 - wrong code inherited ctor and invisi-ref parm
486         * cp-gimplify.c (cp_generize_r): Don't skip thunks.
487
488 2017-01-20  David Malcolm  <dmalcolm@redhat.com>
489
490         PR c++/77829
491         PR c++/78656
492         * cp-tree.h (suggest_alternatives_for): Add bool param.
493         (suggest_alternative_in_explicit_scope): New decl.
494         * error.c (qualified_name_lookup_error): When SCOPE is a namespace
495         that isn't the global one, call new function
496         suggest_alternative_in_explicit_scope, only calling
497         suggest_alternatives_for if it fails, and disabling near match
498         searches fort that case.  When SCOPE is the global namespace,
499         pass true for new param to suggest_alternatives_for to allow for
500         fuzzy name lookups.
501         * lex.c (unqualified_name_lookup_error): Pass true for new param
502         to suggest_alternatives_for.
503         * name-lookup.c (consider_binding_level): Add forward decl.
504         (suggest_alternatives_for): Add "suggest_misspellings" param,
505         using it to conditionalize the fuzzy name-lookup code.
506         (suggest_alternative_in_explicit_scope): New function.
507         * parser.c (cp_parser_primary_expression): When calling
508         finish_id_expression, pass location of id_expression rather
509         than that of id_expr_token.
510         (cp_parser_id_expression): Convert local "unqualified_id" from
511         tree to cp_expr to avoid implicitly dropping location information.
512
513 2017-01-20  Marek Polacek  <polacek@redhat.com>
514
515         PR c/64279
516         * call.c (build_conditional_expr_1): Warn about duplicated branches.
517         * semantics.c (finish_expr_stmt): Build statement using the proper
518         location.
519
520 2017-01-19  Jason Merrill  <jason@redhat.com>
521
522         US 20 - forwarding references and class template argument deduction
523         * cp-tree.h (TEMPLATE_TYPE_PARM_FOR_CLASS): New.
524         * pt.c (push_template_decl_real): Set it.
525         (maybe_adjust_types_for_deduction): Check it.
526         (rewrite_template_parm): Copy it.
527
528         US 19 - deduction guides and constructors
529         * call.c (joust): Prefer deduction guides to constructors.
530         * pt.c (build_deduction_guide): Set DECL_ARTIFICIAL.
531         (deduction_guide_p): Check DECL_P.
532
533         * decl.c (check_initializer): Always use build_aggr_init for array
534         decomposition.
535
536         PR c++/79130 - decomposition and direct-initialization
537         * init.c (build_aggr_init): Communicate direct-initialization to
538         build_vec_init.
539         (build_vec_init): Check for array copy sooner.
540         * parser.c (cp_parser_decomposition_declaration): Remove call to
541         build_x_compound_expr_from_list.
542
543 2017-01-18  Jason Merrill  <jason@redhat.com>
544
545         PR c++/68666 - member variable template-id
546         * typeck.c (finish_class_member_access_expr): Handle variable
547         template-id.
548         * pt.c (lookup_and_finish_template_variable): No longer static.
549         * cp-tree.h: Declare it.
550
551 2017-01-18  Nathan Sidwell  <nathan@acm.org>
552
553         PR c++/78488
554         * call.c (build_over_call): When checking ellipsis conversions for
555         an inherited ctor, make sure there is at least one conversion.
556
557 2017-01-18  Jason Merrill  <jason@redhat.com>
558
559         PR c++/78894 - ICE with class deduction and default arg
560         * pt.c (build_deduction_guide): Set DECL_PRIMARY_TEMPLATE.
561
562 2017-01-18  Markus Trippelsdorf  <markus@trippelsdorf.de>
563
564         PR c++/77489
565         * mangle.c (write_discriminator): Reorganize abi warning check.
566
567 2017-01-18  Nathan Sidwell  <nathan@acm.org>
568
569         * cp-tree.h: Clarify exception spec node comment.
570         * except.c (nothrow_spec_p): Simplify by checking node-equality.
571
572         PR c++/79091
573         * mangle.c (write_exception_spec): Check nothrow explicitly.
574         (write_encoding): Don't increment processing_template_decl around
575         encoding.
576
577 2017-01-18  Markus Trippelsdorf  <markus@trippelsdorf.de>
578
579         PR c++/70182
580         * mangle.c (write_template_args): Add "on" for operator names.
581
582 2017-01-18  Markus Trippelsdorf  <markus@trippelsdorf.de>
583
584         PR c++/77489
585         * mangle.c (write_discriminator): Handle discriminator >= 10.
586
587 2017-01-17  Nathan Sidwell  <nathan@acm.org>
588
589         PR c++/61636
590         * cp-tree.h (maybe_generic_this_capture): Declare.
591         * lambda.c (resolvable_dummy_lambda): New, broken out of ...
592         (maybe_resolve_dummy): ... here.  Call it.
593         (maybe_generic_this_capture): New.
594         * parser.c (cp_parser_postfix_expression): Speculatively capture
595         this in generic lambda in unresolved member function call.
596         * pt.c (tsubst_copy_and_build): Force hard error from failed
597         member function lookup in generic lambda.
598
599 2017-01-17  Aldy Hernandez  <aldyh@redhat.com>
600
601         PR c++/70565
602         * cp-array-notation.c (expand_array_notation_exprs): Handle
603         OMP_PARALLEL.
604
605 2017-01-11  Jason Merrill  <jason@redhat.com>
606
607         PR c++/78337 - ICE on invalid with generic lambda
608         * semantics.c (process_outer_var_ref): Check if containing_function
609         is null.  Move inform call under complain test.
610
611 2017-01-11  Nathan Sidwell  <nathan@acm.org>
612
613         PR c++/77812
614         * name-lookup.c (set_namespace_binding_1): An overload of 1 decl
615         is a new overload.
616
617 2017-01-11  Nathan Sidwell  <nathan@acm.org>
618
619         * name-lookup.c (push_overloaded_decl_1): Refactor OVERLOAD creation.
620
621 2017-01-11  Jakub Jelinek  <jakub@redhat.com>
622
623         PR c++/78341
624         * parser.c (cp_parser_std_attribute_spec): Remove over-eager
625         assertion.  Formatting fix.
626
627         PR c++/72813
628         * decl2.c (c_parse_final_cleanups): Set flag_syntax_only to 1 after
629         writing PCH file.
630
631 2017-01-10  David Malcolm  <dmalcolm@redhat.com>
632
633         PR c++/77949
634         * parser.c (cp_parser_class_specifier_1): Only suggest inserting
635         a missing semicolon if we have a valid insertion location for
636         the fix-it hint.
637
638 2017-01-10  Jason Merrill  <jason@redhat.com>
639
640         FI 20, decomposition declaration with parenthesized initializer.
641         * parser.c (cp_parser_decomposition_declaration): Use
642         cp_parser_initializer.
643
644 2017-01-09  Jason Merrill  <jason@redhat.com>
645
646         Implement P0195R2, C++17 variadic using.
647         * parser.c (cp_parser_using_declaration): Handle ellipsis and comma.
648         * pt.c (tsubst_decl): Handle pack expansion in USING_DECL_SCOPE.
649         * error.c (dump_decl): Likewise.
650
651 2017-01-09  Jakub Jelinek  <jakub@redhat.com>
652
653         PR translation/79019
654         PR translation/79020
655         * semantics.c (finish_omp_clauses): Add missing whitespace to
656         translatable strings.
657         * cp-cilkplus.c (cpp_validate_cilk_plus_loop_aux): Fix comment typo.
658
659 2017-01-07  Jason Merrill  <jason@redhat.com>
660
661         PR c++/78948 - instantiation from discarded statement
662         * parser.h (struct cp_parser): Remove in_discarded_stmt field.
663         * cp-tree.h (in_discarded_stmt): Declare it.
664         (struct saved_scope): Add discarded_stmt bitfield.
665         (in_discarded_stmt): New macro.
666         * decl2.c (mark_used): Check it.
667         * parser.c (cp_parser_selection_statement): Adjust.
668         (cp_parser_jump_statement): Adjust.
669
670 2017-01-05  Jakub Jelinek  <jakub@redhat.com>
671
672         PR c++/78931
673         * decl.c (cp_finish_decomp): Remove probe variable, if tt is
674         REFERENCE_REF_P, set tt to its operand.
675
676         PR c++/78890
677         * class.c (check_field_decls): Diagnose REFERENCE_TYPE fields in
678         unions even for C++11 and later.
679
680 2017-01-05  Nathan Sidwell  <nathan@acm.org>
681
682         PR c++/78765
683         * pt.c (convert_nontype_argument): Don't try and see if integral
684         or enum expressions are constants prematurely.
685
686 2017-01-04  Marek Polacek  <polacek@redhat.com>
687
688         PR c++/64767
689         * typeck.c (cp_build_binary_op): Warn when a pointer is compared with
690         a zero character literal.
691
692 2017-01-04  Jakub Jelinek  <jakub@redhat.com>
693
694         PR c++/78949
695         * typeck.c (cp_build_unary_op): Call mark_rvalue_use on arg if it has
696         vector type.
697
698         PR c++/78693
699         * parser.c (cp_parser_simple_declaration): Only complain about
700         inconsistent auto deduction if auto_result doesn't use auto.
701
702         * parser.c (cp_parser_simple_declaration): Diagnose function
703         declaration among more than one init-declarators with auto
704         specifier.
705
706         PR c++/71182
707         * parser.c (cp_lexer_previous_token): Use vec_safe_address in the
708         assertion, as lexer->buffer may be NULL.
709
710 2017-01-04  Marek Polacek  <polacek@redhat.com>
711
712         PR c++/77545
713         PR c++/77284
714         * constexpr.c (potential_constant_expression_1): Handle CLEANUP_STMT.
715
716 2017-01-04  Nathan Sidwell  <nathan@acm.org>
717
718         PR c++/66735
719         * cp-tree.h (DECLTYPE_FOR_REF_CAPTURE): New.
720         (lambda_capture_field_type): Update prototype.
721         * lambda.c (lambda_capture_field_type): Add is_reference parm.
722         Add referenceness here.
723         (add_capture): Adjust lambda_capture_field_type call, refactor
724         error checking.
725         * pt.c (tsubst): Adjust lambda_capture_field_type call.
726
727 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
728
729         Update copyright years.
730 \f
731 Copyright (C) 2017 Free Software Foundation, Inc.
732
733 Copying and distribution of this file, with or without modification,
734 are permitted in any medium without royalty provided the copyright
735 notice and this notice are preserved.