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