1 2017-01-23 Nathan Sidwell <nathan@acm.org>
3 PR c++/71406 - ICE with scope-ref'd template id exprs
5 * typeck.c (finish_class_member_access_expr): Break up SCOPE_REF
6 before breaking up TEMPLATE_ID_EXPR.
8 2017-01-20 Nathan Sidwell <nathan@acm.org>
10 PR c++/78495 - wrong code inherited ctor and invisi-ref parm
11 * cp-gimplify.c (cp_generize_r): Don't skip thunks.
13 2017-01-20 David Malcolm <dmalcolm@redhat.com>
17 * cp-tree.h (suggest_alternatives_for): Add bool param.
18 (suggest_alternative_in_explicit_scope): New decl.
19 * error.c (qualified_name_lookup_error): When SCOPE is a namespace
20 that isn't the global one, call new function
21 suggest_alternative_in_explicit_scope, only calling
22 suggest_alternatives_for if it fails, and disabling near match
23 searches fort that case. When SCOPE is the global namespace,
24 pass true for new param to suggest_alternatives_for to allow for
26 * lex.c (unqualified_name_lookup_error): Pass true for new param
27 to suggest_alternatives_for.
28 * name-lookup.c (consider_binding_level): Add forward decl.
29 (suggest_alternatives_for): Add "suggest_misspellings" param,
30 using it to conditionalize the fuzzy name-lookup code.
31 (suggest_alternative_in_explicit_scope): New function.
32 * parser.c (cp_parser_primary_expression): When calling
33 finish_id_expression, pass location of id_expression rather
34 than that of id_expr_token.
35 (cp_parser_id_expression): Convert local "unqualified_id" from
36 tree to cp_expr to avoid implicitly dropping location information.
38 2017-01-20 Marek Polacek <polacek@redhat.com>
41 * call.c (build_conditional_expr_1): Warn about duplicated branches.
42 * semantics.c (finish_expr_stmt): Build statement using the proper
45 2017-01-19 Jason Merrill <jason@redhat.com>
47 US 20 - forwarding references and class template argument deduction
48 * cp-tree.h (TEMPLATE_TYPE_PARM_FOR_CLASS): New.
49 * pt.c (push_template_decl_real): Set it.
50 (maybe_adjust_types_for_deduction): Check it.
51 (rewrite_template_parm): Copy it.
53 US 19 - deduction guides and constructors
54 * call.c (joust): Prefer deduction guides to constructors.
55 * pt.c (build_deduction_guide): Set DECL_ARTIFICIAL.
56 (deduction_guide_p): Check DECL_P.
58 * decl.c (check_initializer): Always use build_aggr_init for array
61 PR c++/79130 - decomposition and direct-initialization
62 * init.c (build_aggr_init): Communicate direct-initialization to
64 (build_vec_init): Check for array copy sooner.
65 * parser.c (cp_parser_decomposition_declaration): Remove call to
66 build_x_compound_expr_from_list.
68 2017-01-18 Jason Merrill <jason@redhat.com>
70 PR c++/68666 - member variable template-id
71 * typeck.c (finish_class_member_access_expr): Handle variable
73 * pt.c (lookup_and_finish_template_variable): No longer static.
74 * cp-tree.h: Declare it.
76 2017-01-18 Nathan Sidwell <nathan@acm.org>
79 * call.c (build_over_call): When checking ellipsis conversions for
80 an inherited ctor, make sure there is at least one conversion.
82 2017-01-18 Jason Merrill <jason@redhat.com>
84 PR c++/78894 - ICE with class deduction and default arg
85 * pt.c (build_deduction_guide): Set DECL_PRIMARY_TEMPLATE.
87 2017-01-18 Markus Trippelsdorf <markus@trippelsdorf.de>
90 * mangle.c (write_discriminator): Reorganize abi warning check.
92 2017-01-18 Nathan Sidwell <nathan@acm.org>
94 * cp-tree.h: Clarify exception spec node comment.
95 * except.c (nothrow_spec_p): Simplify by checking node-equality.
98 * mangle.c (write_exception_spec): Check nothrow explicitly.
99 (write_encoding): Don't increment processing_template_decl around
102 2017-01-18 Markus Trippelsdorf <markus@trippelsdorf.de>
105 * mangle.c (write_template_args): Add "on" for operator names.
107 2017-01-18 Markus Trippelsdorf <markus@trippelsdorf.de>
110 * mangle.c (write_discriminator): Handle discriminator >= 10.
112 2017-01-17 Nathan Sidwell <nathan@acm.org>
115 * cp-tree.h (maybe_generic_this_capture): Declare.
116 * lambda.c (resolvable_dummy_lambda): New, broken out of ...
117 (maybe_resolve_dummy): ... here. Call it.
118 (maybe_generic_this_capture): New.
119 * parser.c (cp_parser_postfix_expression): Speculatively capture
120 this in generic lambda in unresolved member function call.
121 * pt.c (tsubst_copy_and_build): Force hard error from failed
122 member function lookup in generic lambda.
124 2017-01-17 Aldy Hernandez <aldyh@redhat.com>
127 * cp-array-notation.c (expand_array_notation_exprs): Handle
130 2017-01-11 Jason Merrill <jason@redhat.com>
132 PR c++/78337 - ICE on invalid with generic lambda
133 * semantics.c (process_outer_var_ref): Check if containing_function
134 is null. Move inform call under complain test.
136 2017-01-11 Nathan Sidwell <nathan@acm.org>
139 * name-lookup.c (set_namespace_binding_1): An overload of 1 decl
142 2017-01-11 Nathan Sidwell <nathan@acm.org>
144 * name-lookup.c (push_overloaded_decl_1): Refactor OVERLOAD creation.
146 2017-01-11 Jakub Jelinek <jakub@redhat.com>
149 * parser.c (cp_parser_std_attribute_spec): Remove over-eager
150 assertion. Formatting fix.
153 * decl2.c (c_parse_final_cleanups): Set flag_syntax_only to 1 after
156 2017-01-10 David Malcolm <dmalcolm@redhat.com>
159 * parser.c (cp_parser_class_specifier_1): Only suggest inserting
160 a missing semicolon if we have a valid insertion location for
163 2017-01-10 Jason Merrill <jason@redhat.com>
165 FI 20, decomposition declaration with parenthesized initializer.
166 * parser.c (cp_parser_decomposition_declaration): Use
167 cp_parser_initializer.
169 2017-01-09 Jason Merrill <jason@redhat.com>
171 Implement P0195R2, C++17 variadic using.
172 * parser.c (cp_parser_using_declaration): Handle ellipsis and comma.
173 * pt.c (tsubst_decl): Handle pack expansion in USING_DECL_SCOPE.
174 * error.c (dump_decl): Likewise.
176 2017-01-09 Jakub Jelinek <jakub@redhat.com>
180 * semantics.c (finish_omp_clauses): Add missing whitespace to
181 translatable strings.
182 * cp-cilkplus.c (cpp_validate_cilk_plus_loop_aux): Fix comment typo.
184 2017-01-07 Jason Merrill <jason@redhat.com>
186 PR c++/78948 - instantiation from discarded statement
187 * parser.h (struct cp_parser): Remove in_discarded_stmt field.
188 * cp-tree.h (in_discarded_stmt): Declare it.
189 (struct saved_scope): Add discarded_stmt bitfield.
190 (in_discarded_stmt): New macro.
191 * decl2.c (mark_used): Check it.
192 * parser.c (cp_parser_selection_statement): Adjust.
193 (cp_parser_jump_statement): Adjust.
195 2017-01-05 Jakub Jelinek <jakub@redhat.com>
198 * decl.c (cp_finish_decomp): Remove probe variable, if tt is
199 REFERENCE_REF_P, set tt to its operand.
202 * class.c (check_field_decls): Diagnose REFERENCE_TYPE fields in
203 unions even for C++11 and later.
205 2017-01-05 Nathan Sidwell <nathan@acm.org>
208 * pt.c (convert_nontype_argument): Don't try and see if integral
209 or enum expressions are constants prematurely.
211 2017-01-04 Marek Polacek <polacek@redhat.com>
214 * typeck.c (cp_build_binary_op): Warn when a pointer is compared with
215 a zero character literal.
217 2017-01-04 Jakub Jelinek <jakub@redhat.com>
220 * typeck.c (cp_build_unary_op): Call mark_rvalue_use on arg if it has
224 * parser.c (cp_parser_simple_declaration): Only complain about
225 inconsistent auto deduction if auto_result doesn't use auto.
227 * parser.c (cp_parser_simple_declaration): Diagnose function
228 declaration among more than one init-declarators with auto
232 * parser.c (cp_lexer_previous_token): Use vec_safe_address in the
233 assertion, as lexer->buffer may be NULL.
235 2017-01-04 Marek Polacek <polacek@redhat.com>
239 * constexpr.c (potential_constant_expression_1): Handle CLEANUP_STMT.
241 2017-01-04 Nathan Sidwell <nathan@acm.org>
244 * cp-tree.h (DECLTYPE_FOR_REF_CAPTURE): New.
245 (lambda_capture_field_type): Update prototype.
246 * lambda.c (lambda_capture_field_type): Add is_reference parm.
247 Add referenceness here.
248 (add_capture): Adjust lambda_capture_field_type call, refactor
250 * pt.c (tsubst): Adjust lambda_capture_field_type call.
252 2017-01-01 Jakub Jelinek <jakub@redhat.com>
254 Update copyright years.
256 Copyright (C) 2017 Free Software Foundation, Inc.
258 Copying and distribution of this file, with or without modification,
259 are permitted in any medium without royalty provided the copyright
260 notice and this notice are preserved.