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