PR c++/71406 - ICE with scope-ref'd template id exprs
[gcc.git] / gcc / cp / ChangeLog
1 2017-01-23 Nathan Sidwell <nathan@acm.org>
2
3 PR c++/71406 - ICE with scope-ref'd template id exprs
4 PR c++/77508
5 * typeck.c (finish_class_member_access_expr): Break up SCOPE_REF
6 before breaking up TEMPLATE_ID_EXPR.
7
8 2017-01-20 Nathan Sidwell <nathan@acm.org>
9
10 PR c++/78495 - wrong code inherited ctor and invisi-ref parm
11 * cp-gimplify.c (cp_generize_r): Don't skip thunks.
12
13 2017-01-20 David Malcolm <dmalcolm@redhat.com>
14
15 PR c++/77829
16 PR c++/78656
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
25 fuzzy name lookups.
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.
37
38 2017-01-20 Marek Polacek <polacek@redhat.com>
39
40 PR c/64279
41 * call.c (build_conditional_expr_1): Warn about duplicated branches.
42 * semantics.c (finish_expr_stmt): Build statement using the proper
43 location.
44
45 2017-01-19 Jason Merrill <jason@redhat.com>
46
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.
52
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.
57
58 * decl.c (check_initializer): Always use build_aggr_init for array
59 decomposition.
60
61 PR c++/79130 - decomposition and direct-initialization
62 * init.c (build_aggr_init): Communicate direct-initialization to
63 build_vec_init.
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.
67
68 2017-01-18 Jason Merrill <jason@redhat.com>
69
70 PR c++/68666 - member variable template-id
71 * typeck.c (finish_class_member_access_expr): Handle variable
72 template-id.
73 * pt.c (lookup_and_finish_template_variable): No longer static.
74 * cp-tree.h: Declare it.
75
76 2017-01-18 Nathan Sidwell <nathan@acm.org>
77
78 PR c++/78488
79 * call.c (build_over_call): When checking ellipsis conversions for
80 an inherited ctor, make sure there is at least one conversion.
81
82 2017-01-18 Jason Merrill <jason@redhat.com>
83
84 PR c++/78894 - ICE with class deduction and default arg
85 * pt.c (build_deduction_guide): Set DECL_PRIMARY_TEMPLATE.
86
87 2017-01-18 Markus Trippelsdorf <markus@trippelsdorf.de>
88
89 PR c++/77489
90 * mangle.c (write_discriminator): Reorganize abi warning check.
91
92 2017-01-18 Nathan Sidwell <nathan@acm.org>
93
94 * cp-tree.h: Clarify exception spec node comment.
95 * except.c (nothrow_spec_p): Simplify by checking node-equality.
96
97 PR c++/79091
98 * mangle.c (write_exception_spec): Check nothrow explicitly.
99 (write_encoding): Don't increment processing_template_decl around
100 encoding.
101
102 2017-01-18 Markus Trippelsdorf <markus@trippelsdorf.de>
103
104 PR c++/70182
105 * mangle.c (write_template_args): Add "on" for operator names.
106
107 2017-01-18 Markus Trippelsdorf <markus@trippelsdorf.de>
108
109 PR c++/77489
110 * mangle.c (write_discriminator): Handle discriminator >= 10.
111
112 2017-01-17 Nathan Sidwell <nathan@acm.org>
113
114 PR c++/61636
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.
123
124 2017-01-17 Aldy Hernandez <aldyh@redhat.com>
125
126 PR c++/70565
127 * cp-array-notation.c (expand_array_notation_exprs): Handle
128 OMP_PARALLEL.
129
130 2017-01-11 Jason Merrill <jason@redhat.com>
131
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.
135
136 2017-01-11 Nathan Sidwell <nathan@acm.org>
137
138 PR c++/77812
139 * name-lookup.c (set_namespace_binding_1): An overload of 1 decl
140 is a new overload.
141
142 2017-01-11 Nathan Sidwell <nathan@acm.org>
143
144 * name-lookup.c (push_overloaded_decl_1): Refactor OVERLOAD creation.
145
146 2017-01-11 Jakub Jelinek <jakub@redhat.com>
147
148 PR c++/78341
149 * parser.c (cp_parser_std_attribute_spec): Remove over-eager
150 assertion. Formatting fix.
151
152 PR c++/72813
153 * decl2.c (c_parse_final_cleanups): Set flag_syntax_only to 1 after
154 writing PCH file.
155
156 2017-01-10 David Malcolm <dmalcolm@redhat.com>
157
158 PR c++/77949
159 * parser.c (cp_parser_class_specifier_1): Only suggest inserting
160 a missing semicolon if we have a valid insertion location for
161 the fix-it hint.
162
163 2017-01-10 Jason Merrill <jason@redhat.com>
164
165 FI 20, decomposition declaration with parenthesized initializer.
166 * parser.c (cp_parser_decomposition_declaration): Use
167 cp_parser_initializer.
168
169 2017-01-09 Jason Merrill <jason@redhat.com>
170
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.
175
176 2017-01-09 Jakub Jelinek <jakub@redhat.com>
177
178 PR translation/79019
179 PR translation/79020
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.
183
184 2017-01-07 Jason Merrill <jason@redhat.com>
185
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.
194
195 2017-01-05 Jakub Jelinek <jakub@redhat.com>
196
197 PR c++/78931
198 * decl.c (cp_finish_decomp): Remove probe variable, if tt is
199 REFERENCE_REF_P, set tt to its operand.
200
201 PR c++/78890
202 * class.c (check_field_decls): Diagnose REFERENCE_TYPE fields in
203 unions even for C++11 and later.
204
205 2017-01-05 Nathan Sidwell <nathan@acm.org>
206
207 PR c++/78765
208 * pt.c (convert_nontype_argument): Don't try and see if integral
209 or enum expressions are constants prematurely.
210
211 2017-01-04 Marek Polacek <polacek@redhat.com>
212
213 PR c++/64767
214 * typeck.c (cp_build_binary_op): Warn when a pointer is compared with
215 a zero character literal.
216
217 2017-01-04 Jakub Jelinek <jakub@redhat.com>
218
219 PR c++/78949
220 * typeck.c (cp_build_unary_op): Call mark_rvalue_use on arg if it has
221 vector type.
222
223 PR c++/78693
224 * parser.c (cp_parser_simple_declaration): Only complain about
225 inconsistent auto deduction if auto_result doesn't use auto.
226
227 * parser.c (cp_parser_simple_declaration): Diagnose function
228 declaration among more than one init-declarators with auto
229 specifier.
230
231 PR c++/71182
232 * parser.c (cp_lexer_previous_token): Use vec_safe_address in the
233 assertion, as lexer->buffer may be NULL.
234
235 2017-01-04 Marek Polacek <polacek@redhat.com>
236
237 PR c++/77545
238 PR c++/77284
239 * constexpr.c (potential_constant_expression_1): Handle CLEANUP_STMT.
240
241 2017-01-04 Nathan Sidwell <nathan@acm.org>
242
243 PR c++/66735
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
249 error checking.
250 * pt.c (tsubst): Adjust lambda_capture_field_type call.
251
252 2017-01-01 Jakub Jelinek <jakub@redhat.com>
253
254 Update copyright years.
255 \f
256 Copyright (C) 2017 Free Software Foundation, Inc.
257
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.