1 2017-01-27 Jason Merrill <jason@redhat.com>
3 PR c++/78771 - ICE with inherited constructor.
4 * call.c (build_over_call): Call deduce_inheriting_ctor here.
5 * pt.c (tsubst_decl): Not here.
6 * class.c (add_method): Or here.
7 * method.c (deduce_inheriting_ctor): Handle clones.
8 (implicitly_declare_fn): Don't deduce inheriting ctors yet.
10 2017-01-27 Adam Butcher <adam@jessamine.co.uk>
13 * cp/parser.c (parsing_default_capturing_generic_lambda_in_template):
15 * cp/cp-tree.h: Declare it.
16 * cp/semantics.c (finish_id_expression): Resolve names within a default
17 capturing generic lambda defined within a template prior to
18 instantiation to allow for captures to be added to the closure type.
20 2017-01-26 Jakub Jelinek <jakub@redhat.com>
23 * cp-tree.def (OFFSETOF_EXPR): Bump number of operands to 2.
24 * cp-tree.h (finish_offsetof): Add OBJECT_PTR argument.
25 * parser.c (cp_parser_builtin_offsetof): Pass result of
26 build_static_cast of null_pointer_node to finish_offsetof.
27 * semantics.c (finish_offsetof): Add OBJECT_PTR argument, use
28 it for -Winvalid-offsetof pedwarn instead of trying to guess
29 original offsetof type from EXPR. Save OBJECT_PTR as a new
30 second operand to OFFSETOF_EXPR.
31 * pt.c (tsubst_copy_and_build) <case OFFSETOF_EXPR>: Adjust
32 finish_offsetof caller, pass the second operand of OFFSETOF_EXPR
35 2017-01-26 Jason Merrill <jason@redhat.com>
37 * name-lookup.c (parse_using_directive): Deprecate strong using.
39 PR c++/79176 - lambda ICE with -flto -Os
40 * decl2.c (vague_linkage_p): Handle decloned 'tors.
41 * tree.c (decl_linkage): Likewise.
43 2017-01-25 Martin Sebor <msebor@redhat.com>
45 * decl.c (grokdeclarator): Fix a typo in a comment.
47 2017-01-25 Jakub Jelinek <jakub@redhat.com>
50 * decl.c (cp_finish_decomp): Disallow memberwise decomposition of
54 * parser.c (cp_parser_lambda_declarator_opt): Pedwarn with
55 OPT_Wpedantic on lambda templates for -std=c++14 and higher.
57 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
60 * decl.c (cxx_init_decl_processing): Pass main_input_filename
61 to build_translation_unit_decl.
63 2017-01-24 Jakub Jelinek <jakub@redhat.com>
66 * cp-gimplify.c (cp_genericize_r): Add result of
67 convert_from_reference on invisiref parm to p_set.
69 2017-01-24 Nathan Sidwell <nathan@acm.org>
71 PR c++/78469 - defaulted ctor and inaccessible dtor
72 * cp-tree.h (tsubst_flags): Add tf_no_cleanup.
73 * init.c (build_new_1): Pass tf_no_cleanup to build_value_init.
74 * tree.c (build_target_expr): Check tf_no_cleanup.
76 PR c++/79118 - anon-members and constexpr
77 * constexpr.c (cx_check_missing_mem_inits): Caller passes type not
78 ctor decl. Recursively check anonymous members.
79 (register_constexpr_fundef): Adjust cx_check_missing_mem_inits
81 (explain_invalid_constexpr_fn): Likewise.
83 2017-01-23 Nathan Sidwell <nathan@acm.org>
85 PR c++/71710 - template using directive of field
86 * pt.c (tsubst_copy_and_build [COMPONENT_REF]): Move FIELD_DECL
89 PR c++/71406 - ICE with scope-ref'd template id exprs
91 * typeck.c (finish_class_member_access_expr): Break up SCOPE_REF
92 before breaking up TEMPLATE_ID_EXPR.
94 2017-01-20 Nathan Sidwell <nathan@acm.org>
96 PR c++/78495 - wrong code inherited ctor and invisi-ref parm
97 * cp-gimplify.c (cp_generize_r): Don't skip thunks.
99 2017-01-20 David Malcolm <dmalcolm@redhat.com>
103 * cp-tree.h (suggest_alternatives_for): Add bool param.
104 (suggest_alternative_in_explicit_scope): New decl.
105 * error.c (qualified_name_lookup_error): When SCOPE is a namespace
106 that isn't the global one, call new function
107 suggest_alternative_in_explicit_scope, only calling
108 suggest_alternatives_for if it fails, and disabling near match
109 searches fort that case. When SCOPE is the global namespace,
110 pass true for new param to suggest_alternatives_for to allow for
112 * lex.c (unqualified_name_lookup_error): Pass true for new param
113 to suggest_alternatives_for.
114 * name-lookup.c (consider_binding_level): Add forward decl.
115 (suggest_alternatives_for): Add "suggest_misspellings" param,
116 using it to conditionalize the fuzzy name-lookup code.
117 (suggest_alternative_in_explicit_scope): New function.
118 * parser.c (cp_parser_primary_expression): When calling
119 finish_id_expression, pass location of id_expression rather
120 than that of id_expr_token.
121 (cp_parser_id_expression): Convert local "unqualified_id" from
122 tree to cp_expr to avoid implicitly dropping location information.
124 2017-01-20 Marek Polacek <polacek@redhat.com>
127 * call.c (build_conditional_expr_1): Warn about duplicated branches.
128 * semantics.c (finish_expr_stmt): Build statement using the proper
131 2017-01-19 Jason Merrill <jason@redhat.com>
133 US 20 - forwarding references and class template argument deduction
134 * cp-tree.h (TEMPLATE_TYPE_PARM_FOR_CLASS): New.
135 * pt.c (push_template_decl_real): Set it.
136 (maybe_adjust_types_for_deduction): Check it.
137 (rewrite_template_parm): Copy it.
139 US 19 - deduction guides and constructors
140 * call.c (joust): Prefer deduction guides to constructors.
141 * pt.c (build_deduction_guide): Set DECL_ARTIFICIAL.
142 (deduction_guide_p): Check DECL_P.
144 * decl.c (check_initializer): Always use build_aggr_init for array
147 PR c++/79130 - decomposition and direct-initialization
148 * init.c (build_aggr_init): Communicate direct-initialization to
150 (build_vec_init): Check for array copy sooner.
151 * parser.c (cp_parser_decomposition_declaration): Remove call to
152 build_x_compound_expr_from_list.
154 2017-01-18 Jason Merrill <jason@redhat.com>
156 PR c++/68666 - member variable template-id
157 * typeck.c (finish_class_member_access_expr): Handle variable
159 * pt.c (lookup_and_finish_template_variable): No longer static.
160 * cp-tree.h: Declare it.
162 2017-01-18 Nathan Sidwell <nathan@acm.org>
165 * call.c (build_over_call): When checking ellipsis conversions for
166 an inherited ctor, make sure there is at least one conversion.
168 2017-01-18 Jason Merrill <jason@redhat.com>
170 PR c++/78894 - ICE with class deduction and default arg
171 * pt.c (build_deduction_guide): Set DECL_PRIMARY_TEMPLATE.
173 2017-01-18 Markus Trippelsdorf <markus@trippelsdorf.de>
176 * mangle.c (write_discriminator): Reorganize abi warning check.
178 2017-01-18 Nathan Sidwell <nathan@acm.org>
180 * cp-tree.h: Clarify exception spec node comment.
181 * except.c (nothrow_spec_p): Simplify by checking node-equality.
184 * mangle.c (write_exception_spec): Check nothrow explicitly.
185 (write_encoding): Don't increment processing_template_decl around
188 2017-01-18 Markus Trippelsdorf <markus@trippelsdorf.de>
191 * mangle.c (write_template_args): Add "on" for operator names.
193 2017-01-18 Markus Trippelsdorf <markus@trippelsdorf.de>
196 * mangle.c (write_discriminator): Handle discriminator >= 10.
198 2017-01-17 Nathan Sidwell <nathan@acm.org>
201 * cp-tree.h (maybe_generic_this_capture): Declare.
202 * lambda.c (resolvable_dummy_lambda): New, broken out of ...
203 (maybe_resolve_dummy): ... here. Call it.
204 (maybe_generic_this_capture): New.
205 * parser.c (cp_parser_postfix_expression): Speculatively capture
206 this in generic lambda in unresolved member function call.
207 * pt.c (tsubst_copy_and_build): Force hard error from failed
208 member function lookup in generic lambda.
210 2017-01-17 Aldy Hernandez <aldyh@redhat.com>
213 * cp-array-notation.c (expand_array_notation_exprs): Handle
216 2017-01-11 Jason Merrill <jason@redhat.com>
218 PR c++/78337 - ICE on invalid with generic lambda
219 * semantics.c (process_outer_var_ref): Check if containing_function
220 is null. Move inform call under complain test.
222 2017-01-11 Nathan Sidwell <nathan@acm.org>
225 * name-lookup.c (set_namespace_binding_1): An overload of 1 decl
228 2017-01-11 Nathan Sidwell <nathan@acm.org>
230 * name-lookup.c (push_overloaded_decl_1): Refactor OVERLOAD creation.
232 2017-01-11 Jakub Jelinek <jakub@redhat.com>
235 * parser.c (cp_parser_std_attribute_spec): Remove over-eager
236 assertion. Formatting fix.
239 * decl2.c (c_parse_final_cleanups): Set flag_syntax_only to 1 after
242 2017-01-10 David Malcolm <dmalcolm@redhat.com>
245 * parser.c (cp_parser_class_specifier_1): Only suggest inserting
246 a missing semicolon if we have a valid insertion location for
249 2017-01-10 Jason Merrill <jason@redhat.com>
251 FI 20, decomposition declaration with parenthesized initializer.
252 * parser.c (cp_parser_decomposition_declaration): Use
253 cp_parser_initializer.
255 2017-01-09 Jason Merrill <jason@redhat.com>
257 Implement P0195R2, C++17 variadic using.
258 * parser.c (cp_parser_using_declaration): Handle ellipsis and comma.
259 * pt.c (tsubst_decl): Handle pack expansion in USING_DECL_SCOPE.
260 * error.c (dump_decl): Likewise.
262 2017-01-09 Jakub Jelinek <jakub@redhat.com>
266 * semantics.c (finish_omp_clauses): Add missing whitespace to
267 translatable strings.
268 * cp-cilkplus.c (cpp_validate_cilk_plus_loop_aux): Fix comment typo.
270 2017-01-07 Jason Merrill <jason@redhat.com>
272 PR c++/78948 - instantiation from discarded statement
273 * parser.h (struct cp_parser): Remove in_discarded_stmt field.
274 * cp-tree.h (in_discarded_stmt): Declare it.
275 (struct saved_scope): Add discarded_stmt bitfield.
276 (in_discarded_stmt): New macro.
277 * decl2.c (mark_used): Check it.
278 * parser.c (cp_parser_selection_statement): Adjust.
279 (cp_parser_jump_statement): Adjust.
281 2017-01-05 Jakub Jelinek <jakub@redhat.com>
284 * decl.c (cp_finish_decomp): Remove probe variable, if tt is
285 REFERENCE_REF_P, set tt to its operand.
288 * class.c (check_field_decls): Diagnose REFERENCE_TYPE fields in
289 unions even for C++11 and later.
291 2017-01-05 Nathan Sidwell <nathan@acm.org>
294 * pt.c (convert_nontype_argument): Don't try and see if integral
295 or enum expressions are constants prematurely.
297 2017-01-04 Marek Polacek <polacek@redhat.com>
300 * typeck.c (cp_build_binary_op): Warn when a pointer is compared with
301 a zero character literal.
303 2017-01-04 Jakub Jelinek <jakub@redhat.com>
306 * typeck.c (cp_build_unary_op): Call mark_rvalue_use on arg if it has
310 * parser.c (cp_parser_simple_declaration): Only complain about
311 inconsistent auto deduction if auto_result doesn't use auto.
313 * parser.c (cp_parser_simple_declaration): Diagnose function
314 declaration among more than one init-declarators with auto
318 * parser.c (cp_lexer_previous_token): Use vec_safe_address in the
319 assertion, as lexer->buffer may be NULL.
321 2017-01-04 Marek Polacek <polacek@redhat.com>
325 * constexpr.c (potential_constant_expression_1): Handle CLEANUP_STMT.
327 2017-01-04 Nathan Sidwell <nathan@acm.org>
330 * cp-tree.h (DECLTYPE_FOR_REF_CAPTURE): New.
331 (lambda_capture_field_type): Update prototype.
332 * lambda.c (lambda_capture_field_type): Add is_reference parm.
333 Add referenceness here.
334 (add_capture): Adjust lambda_capture_field_type call, refactor
336 * pt.c (tsubst): Adjust lambda_capture_field_type call.
338 2017-01-01 Jakub Jelinek <jakub@redhat.com>
340 Update copyright years.
342 Copyright (C) 2017 Free Software Foundation, Inc.
344 Copying and distribution of this file, with or without modification,
345 are permitted in any medium without royalty provided the copyright
346 notice and this notice are preserved.