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