]>
Commit | Line | Data |
---|---|---|
2ed13d1a | 1 | 2018-04-26 Paolo Carlini <paolo.carlini@oracle.com> |
2 | ||
3 | * decl.c (grokdeclarator): Fix value assigned to typespec_loc, use | |
4 | min_location. | |
5 | ||
c7bf17cd | 6 | 2019-04-24 Jason Merrill <jason@redhat.com> |
7 | ||
8 | PR c++/90227 - error with template parameter packs. | |
9 | * pt.c (coerce_template_parms): Do add empty pack when | |
10 | require_all_args. | |
11 | ||
7b7f6a07 | 12 | 2019-04-24 Richard Biener <rguenther@suse.de> |
13 | ||
14 | * call.c (null_ptr_cst_p): Order checks according to expensiveness. | |
15 | (conversion_null_warnings): Likewise. | |
16 | * typeck.c (same_type_ignoring_top_level_qualifiers_p): Return | |
17 | early if type1 == type2. | |
18 | ||
80068851 | 19 | 2019-04-22 Jason Merrill <jason@redhat.com> |
20 | ||
21 | PR c++/87366 - wrong error with alias template. | |
22 | * typeck.c (structural_comptypes): When comparing_specializations, | |
23 | aliases are unequal. | |
24 | (comptypes): When comparing_specializations, do structural | |
25 | comparison. | |
26 | ||
0b496006 | 27 | 2019-04-19 Jason Merrill <jason@redhat.com> |
28 | ||
ffa547ef | 29 | PR c++/90190 - CTAD with list-constructor. |
30 | * pt.c (do_class_deduction): Don't try the single element deduction | |
31 | if the single element is also a braced list. | |
32 | ||
0b496006 | 33 | PR c++/90171 - ICE with destroying delete with size_t parm. |
34 | * call.c (sized_deallocation_fn_p): New. Use it instead of | |
35 | second_parm_is_size_t in most cases. | |
36 | (second_parm_is_size_t): Don't check for aligned. | |
37 | ||
1e9afbb0 | 38 | 2019-04-19 Paolo Carlini <paolo.carlini@oracle.com> |
39 | ||
40 | PR c++/89900 | |
41 | * pt.c (fn_type_unification): When handling null explicit | |
42 | arguments do not special case non-parameter packs. | |
43 | ||
b7c7bc83 | 44 | 2019-04-19 Jakub Jelinek <jakub@redhat.com> |
45 | ||
dc097d0a | 46 | PR c++/90138 |
47 | * pt.c (process_template_parm): Set decl to pushdecl result. If | |
48 | !is_non_type, also set parm to that. | |
49 | ||
45cf699c | 50 | PR c/89888 |
51 | * decl.c (struct cp_switch): Remove outside_range_p member. | |
52 | (push_switch): Don't clear it. | |
53 | (pop_switch): Adjust c_do_switch_warnings caller. | |
54 | (finish_case_label): Adjust c_add_case_label caller. | |
55 | ||
b7c7bc83 | 56 | PR c++/90108 |
57 | * decl.c (duplicate_decls): If remove is main variant and | |
58 | DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE | |
59 | variant that has newdecl as TYPE_NAME if any. | |
60 | ||
849a7926 | 61 | 2019-04-18 Jason Merrill <jason@redhat.com> |
62 | ||
63 | PR c++/87554 - ICE with extern template and reference member. | |
64 | * decl.c (cp_finish_decl): Don't set DECL_INITIAL of external vars. | |
65 | ||
a9b768f8 | 66 | 2019-04-17 Jason Merrill <jason@redhat.com> |
67 | ||
68 | PR c++/90047 - ICE with enable_if alias template. | |
69 | * pt.c (tsubst_decl) [TYPE_DECL]: Don't put an erroneous decl in the | |
70 | hash table when we're in SFINAE context. | |
71 | ||
f1d497bc | 72 | 2019-04-17 Marek Polacek <polacek@redhat.com> |
73 | ||
74 | PR c++/90124 - bogus error with incomplete type in decltype. | |
75 | * typeck.c (build_class_member_access_expr): Check | |
76 | cp_unevaluated_operand. | |
77 | ||
81e61a19 | 78 | 2019-04-12 Jakub Jelinek <jakub@redhat.com> |
79 | ||
80 | PR c/89933 | |
81 | * decl.c (duplicate_decls): When newdecl's type is its main variant, | |
82 | don't try to remove it from the variant list, but instead assert | |
83 | it has no variants. | |
84 | ||
e7136105 | 85 | 2019-04-12 Martin Sebor <msebor@redhat.com> |
86 | ||
87 | PR c/88383 | |
88 | PR c/89288 | |
89 | * parser.c (cp_parser_has_attribute_expression): Handle assignment | |
90 | expressions. | |
91 | ||
b7a39acf | 92 | 2019-04-12 Jason Merrill <jason@redhat.com> |
93 | ||
94 | * call.c (null_member_pointer_value_p): Handle an empty CONSTRUCTOR | |
95 | of PMF type. | |
96 | ||
1fdc37a3 | 97 | 2019-04-12 Marek Polacek <polacek@redhat.com> |
98 | ||
99 | * except.c (build_noexcept_spec): Use build_converted_constant_bool_expr | |
100 | instead of perform_implicit_conversion_flags. | |
101 | ||
01e345e0 | 102 | PR c++/87603 - constexpr functions are no longer noexcept. |
103 | * constexpr.c (is_sub_constant_expr): Remove unused function. | |
104 | * cp-tree.h (is_sub_constant_expr): Remove declaration. | |
105 | * except.c (check_noexcept_r): Don't consider a call to a constexpr | |
106 | function noexcept. | |
107 | ||
f0121163 | 108 | 2019-04-11 Jakub Jelinek <jakub@redhat.com> |
109 | ||
110 | PR translation/90035 | |
111 | * parser.h (struct cp_parser): Add | |
112 | type_definition_forbidden_message_arg member. | |
113 | * parser.c (cp_debug_parser): Print it. | |
114 | (cp_parser_check_type_definition): Pass | |
115 | parser->type_definition_forbidden_message_arg as second argument to | |
116 | error. | |
117 | (cp_parser_has_attribute_expression, cp_parser_sizeof_operand): Set | |
118 | parser->type_definition_forbidden_message_arg and use G_() with | |
119 | %qs for parser->type_definition_forbidden_message instead of | |
120 | building untranslatable message using concat. | |
121 | ||
a9c7b78d | 122 | 2019-04-09 Jakub Jelinek <jakub@redhat.com> |
123 | ||
124 | PR translation/90011 | |
125 | * typeck2.c (check_narrowing): Remove trailing space from diagnostics. | |
126 | ||
67ecd3ae | 127 | 2019-04-08 Marek Polacek <polacek@redhat.com> |
128 | ||
129 | * typeck2.c (digest_init_r): Don't condition the object slicing warning | |
130 | on flag_checking. | |
131 | ||
7651759b | 132 | 2019-04-08 Paolo Carlini <paolo.carlini@oracle.com> |
133 | ||
134 | PR c++/89914 | |
135 | * semantics.c (trait_expr_value): Don't use TYPE_NOTHROW_P | |
136 | when maybe_instantiate_noexcept fails. | |
137 | (classtype_has_nothrow_assign_or_copy_p): Likewise. | |
138 | * method.c (implicitly_declare_fn): Avoid passing error_mark_node | |
139 | to build_exception_variant. | |
140 | ||
168afa9b | 141 | 2019-04-05 Marek Polacek <polacek@redhat.com> |
142 | ||
143 | PR c++/87145 - bogus error converting class type in template arg list. | |
144 | * pt.c (convert_nontype_argument): Don't call | |
145 | build_converted_constant_expr if it could involve calling a conversion | |
146 | function with a instantiation-dependent constructor as its argument. | |
147 | ||
49666f40 | 148 | 2019-04-05 Martin Sebor <msebor@redhat.com> |
149 | ||
150 | PR bootstrap/89980 | |
151 | * decl.c (reshape_init_array_1): Avoid treating empty strings | |
152 | as zeros in array initializers. | |
153 | Use trivial_type_p () instead of TYPE_HAS_TRIVIAL_DFLT(). | |
154 | ||
071a07da | 155 | 2019-04-04 Jason Merrill <jason@redhat.com> |
156 | ||
157 | PR c++/89948 - ICE with break in statement-expr. | |
158 | * constexpr.c (cxx_eval_statement_list): Jumping out of a | |
159 | statement-expr is non-constant. | |
160 | ||
1a08779b | 161 | 2019-04-04 Jason Merrill <jason@redhat.com> |
162 | ||
163 | PR c++/89966 - error with non-type auto tparm. | |
164 | * pt.c (do_auto_deduction): Clear tf_partial. | |
165 | ||
80d04049 | 166 | 2019-04-04 Jason Merrill <jason@redhat.com> |
167 | ||
168 | PR c++/86986 - ICE with TTP with parameter pack. | |
169 | * pt.c (coerce_template_parameter_pack): Only look at the type of a | |
170 | non-type parameter pack. | |
171 | (fixed_parameter_pack_p_1): Don't recurse into the type of a | |
172 | non-type parameter pack. | |
173 | (coerce_template_template_parms): Call add_outermost_template_args. | |
174 | ||
b11751dc | 175 | 2019-04-04 Martin Sebor <msebor@redhat.com> |
176 | ||
177 | PR c++/89974 | |
178 | PR c++/89878 | |
179 | PR c++/89833 | |
180 | PR c++/47488 | |
181 | * decl.c (reshape_init_array_1): Strip trailing zero-initializers | |
182 | from arrays of trivial type and known size. | |
183 | * mangle.c (write_expression): Convert braced initializer lists | |
184 | to STRING_CSTs. | |
185 | (write_expression): Trim trailing zero-initializers from arrays | |
186 | of trivial type. | |
187 | (write_template_arg_literal): Mangle strings the same as braced | |
188 | initializer lists. | |
189 | ||
589c66eb | 190 | 2019-04-03 Jason Merrill <jason@redhat.com> |
191 | ||
b1d61c0e | 192 | PR c++/81866 - ICE with member template and default targ. |
193 | * pt.c (tsubst_template_decl): Handle getting a type from | |
194 | retrieve_specialization. | |
195 | ||
b3902d2e | 196 | PR c++/86586 - -fcompare-debug=-Wsign-compare. |
197 | * typeck.c (cp_build_binary_op): Don't fold for -Wsign-compare. | |
198 | ||
4c246688 | 199 | PR c++/89331 - ICE with offsetof in incomplete class. |
200 | * semantics.c (finish_offsetof): Handle error_mark_node. | |
201 | * typeck.c (build_class_member_access_expr): Call | |
202 | complete_type_or_maybe_complain before converting to base. | |
203 | ||
589c66eb | 204 | PR c++/89917 - ICE with lambda in variadic mem-init. |
205 | * pt.c (make_pack_expansion): Change type_pack_expansion_p to false. | |
206 | ||
0ccdb705 | 207 | 2019-04-01 Jason Merrill <jason@redhat.com> |
208 | ||
209 | PR c++/86946 - ICE with function call in template argument. | |
210 | DR 1321 | |
211 | * pt.c (iterative_hash_template_arg) [CALL_EXPR]: Use | |
212 | dependent_name. | |
213 | ||
00bc562a | 214 | 2019-04-01 Paolo Carlini <paolo.carlini@oracle.com> |
215 | ||
216 | PR c++/62207 | |
217 | * pt.c (tsubst_copy): Deal with lookup_name not returing a variable. | |
218 | ||
cf13db0c | 219 | 2019-03-31 Marek Polacek <polacek@redhat.com> |
220 | ||
221 | PR c++/89852 - ICE with C++11 functional cast with { }. | |
222 | * constexpr.c (fold_non_dependent_expr_template): New static function | |
223 | broken out of... | |
224 | (fold_non_dependent_expr): ...here. | |
225 | (fold_non_dependent_init): New function. | |
226 | * cp-tree.h (fold_non_dependent_init): Declare. | |
227 | * typeck2.c (massage_init_elt): Call fold_non_dependent_init instead | |
228 | of fold_non_dependent_expr. Don't call maybe_constant_init. | |
229 | ||
439021c1 | 230 | 2019-03-30 Jason Merrill <jason@redhat.com> |
231 | ||
232 | PR c++/89744 - ICE with specialization of member class template. | |
233 | * pt.c (lookup_template_class_1): If the partial instantiation is | |
234 | explicitly specialized, adjust. | |
235 | (maybe_process_partial_specialization): Also adjust | |
236 | CLASSTYPE_TI_ARGS. | |
237 | ||
9a6cce24 | 238 | 2019-03-29 Jakub Jelinek <jakub@redhat.com> |
239 | ||
240 | PR sanitizer/89869 | |
241 | * typeck.c: Include gimplify.h. | |
242 | (cp_build_modify_expr) <case COND_EXPR>: Unshare rhs before using it | |
243 | for second time. Formatting fixes. | |
244 | ||
8e98407e | 245 | 2019-03-29 Marek Polacek <polacek@redhat.com> |
246 | ||
247 | PR c++/89876 - ICE with deprecated conversion. | |
248 | * call.c (convert_like_real): Only give warnings with tf_warning. | |
249 | ||
fcec39e1 | 250 | 2019-03-28 Marek Polacek <polacek@redhat.com> |
251 | ||
facf139f | 252 | PR c++/89612 - ICE with member friend template with noexcept. |
253 | * pt.c (maybe_instantiate_noexcept): For function templates, use their | |
254 | template result (function decl). Don't set up local specializations. | |
255 | Temporarily turn on processing_template_decl. Update the template type | |
256 | too. | |
257 | ||
fcec39e1 | 258 | PR c++/89836 - bool constant expression and explicit conversions. |
259 | * call.c (build_converted_constant_expr_internal): New function, | |
260 | renamed from... | |
261 | (build_converted_constant_expr): ...this. New. | |
262 | (build_converted_constant_bool_expr): New. | |
263 | * cp-tree.h (build_converted_constant_bool_expr): Declare. | |
264 | * decl.c (build_explicit_specifier): Call | |
265 | build_converted_constant_bool_expr. | |
266 | ||
ad6978a6 | 267 | 2019-03-28 Jakub Jelinek <jakub@redhat.com> |
268 | ||
269 | PR c++/89785 | |
270 | * constexpr.c (struct check_for_return_continue_data): New type. | |
271 | (check_for_return_continue): New function. | |
272 | (potential_constant_expression_1) <case SWITCH_STMT>: Walk | |
273 | SWITCH_STMT_BODY to find RETURN_EXPRs or CONTINUE_STMTs not nested | |
274 | in loop bodies and set *jump_target to that if found. | |
275 | ||
64e9a5e0 | 276 | 2019-03-27 Jason Merrill <jason@redhat.com> |
277 | ||
7fe010eb | 278 | PR c++/89831 - error with qualified-id in const member function. |
279 | * semantics.c (finish_non_static_data_member): Use object cv-quals | |
280 | in scoped case, too. | |
281 | ||
8d96c4f0 | 282 | PR c++/89421 - ICE with lambda in template parameter list. |
64e9a5e0 | 283 | * parser.c (cp_parser_lambda_expression): Also reject a lambda in a |
284 | template parameter list before C++20. | |
285 | * pt.c (type_dependent_expression_p): True for LAMBDA_EXPR. | |
286 | * semantics.c (begin_class_definition): Restore error about defining | |
287 | non-lambda class in template parm list. | |
288 | ||
460e6a8c | 289 | 2019-03-26 Jason Merrill <jason@redhat.com> |
290 | ||
a6cd883f | 291 | PR c++/86932 - missed SFINAE with empty pack. |
292 | * pt.c (coerce_template_parms): Don't add an empty pack if | |
293 | tf_partial. | |
294 | (fn_type_unification): Pass tf_partial to coerce_template_parms. | |
295 | ||
460e6a8c | 296 | PR c++/86429 - constexpr variable in lambda. |
297 | PR c++/82643 | |
298 | PR c++/87327 | |
299 | * constexpr.c (cxx_eval_constant_expression): In a lambda function, | |
300 | try evaluating the captured variable directly. | |
301 | ||
024a645d | 302 | 2019-03-26 Jakub Jelinek <jakub@redhat.com> |
303 | ||
304 | PR c++/89796 | |
305 | * semantics.c (finish_omp_atomic): Add warning_sentinel for | |
306 | -Wunused-value around finish_expr_stmt call. | |
307 | ||
ac557922 | 308 | 2019-03-25 Paolo Carlini <paolo.carlini@oracle.com> |
309 | ||
310 | PR c++/84661 | |
311 | PR c++/85013 | |
312 | * parser.c (cp_parser_binary_expression): Don't call cp_fully_fold | |
313 | to undo the disabling of warnings. | |
314 | ||
93877af7 | 315 | 2019-03-25 Jason Merrill <jason@redhat.com> |
316 | ||
317 | PR c++/87748 - substitution failure error with decltype. | |
318 | * pt.c (most_specialized_partial_spec): Clear | |
319 | processing_template_decl. | |
320 | ||
1de8eb3e | 321 | 2019-03-25 Marek Polacek <polacek@redhat.com> |
322 | ||
751baf9c | 323 | PR c++/89214 - ICE when initializing aggregates with bases. |
324 | * typeck2.c (digest_init_r): Warn about object slicing instead of | |
325 | crashing. | |
326 | ||
1de8eb3e | 327 | PR c++/89705 - ICE with reference binding with conversion function. |
328 | * call.c (reference_binding): If the result of the conversion function | |
329 | is a prvalue of non-class type, use the cv-unqualified type. | |
330 | ||
37682124 | 331 | 2019-03-25 Nathan Sidwell <nathan@acm.org> |
332 | ||
333 | * lambda.c (maybe_add_lambda_conv_op): Don't add to comdat group. | |
334 | ||
84f13b2f | 335 | 2019-03-22 Jakub Jelinek <jakub@redhat.com> |
336 | ||
8815602b | 337 | PR c++/60702 |
338 | * cp-tree.h (get_tls_wrapper_fn): Remove declaration. | |
339 | (maybe_get_tls_wrapper_call): Declare. | |
340 | * decl2.c (get_tls_wrapper_fn): Make static. | |
341 | (maybe_get_tls_wrapper_call): New function. | |
342 | * typeck.c (build_class_member_access_expr): Handle accesses to TLS | |
343 | variables. | |
344 | * semantics.c (finish_qualified_id_expr): Likewise. | |
345 | (finish_id_expression_1): Use maybe_get_tls_wrapper_call. | |
346 | * pt.c (tsubst_copy_and_build): Likewise. | |
347 | ||
84f13b2f | 348 | PR c++/87481 |
349 | * constexpr.c (struct constexpr_ctx): Add constexpr_ops_count member. | |
350 | (cxx_eval_constant_expression): When not skipping, not constant class | |
351 | or location wrapper, increment *ctx->constexpr_ops_count and if it is | |
352 | above constexpr_loop_nest_limit, diagnose failure. | |
353 | (cxx_eval_outermost_constant_expr): Add constexpr_ops_count and | |
354 | initialize ctx.constexpr_ops_count to its address. | |
355 | (is_sub_constant_expr): Likewise. | |
356 | ||
654b4632 | 357 | 2019-03-21 Jakub Jelinek <jakub@redhat.com> |
358 | ||
f03d9a13 | 359 | PR c++/71446 |
360 | * call.c (filed_in_pset): Change pset from hash_set<tree> * to | |
361 | hash_set<tree, true> &, adjust uses accordingly. | |
362 | (build_aggr_conv): Change pset from hash_set<tree> * | |
363 | to hash_set<tree, true>. Replace goto fail; with return NULL;, | |
364 | adjust pset uses. | |
365 | ||
654b4632 | 366 | PR c++/89767 |
367 | * parser.c (cp_parser_lambda_introducer): Add ids and first_capture_id | |
368 | variables, check for duplicates in this function. | |
369 | * lambda.c (add_capture): Don't check for duplicates nor use | |
370 | IDENTIFIER_MARKED. | |
371 | (register_capture_members): Don't clear IDENTIFIER_MARKED here. | |
372 | ||
e6c0a0e8 | 373 | 2019-03-21 Paolo Carlini <paolo.carlini@oracle.com> |
374 | ||
375 | PR c++/89571 | |
376 | * method.c (after_nsdmi_defaulted_late_checks): Avoid passing | |
377 | error_mark_node to comp_except_specs. | |
378 | ||
0f86e901 | 379 | 2019-03-20 Jason Merrill <jason@redhat.com> |
380 | ||
381 | PR c++/87480 - decltype of member access in default template arg | |
382 | * pt.c (type_unification_real): Accept a dependent result in | |
383 | template context. | |
384 | ||
dc0cf270 | 385 | 2019-03-19 Martin Sebor <msebor@redhat.com> |
386 | ||
387 | PR tree-optimization/89688 | |
388 | * typeck2.c (store_init_value): Call braced_lists_to_string for more | |
389 | kinds of initializers. | |
390 | ||
640c769f | 391 | 2019-03-18 Jason Merrill <jason@redhat.com> |
392 | ||
56c3aeaa | 393 | PR c++/89630 - ICE with dependent using-decl as template arg. |
394 | * tree.c (cp_tree_equal): Always return false for USING_DECL. | |
395 | ||
c821b0ef | 396 | PR c++/89761 - ICE with sizeof... in pack expansion. |
397 | * pt.c (argument_pack_element_is_expansion_p): Handle | |
398 | ARGUMENT_PACK_SELECT. | |
399 | ||
4273f124 | 400 | PR c++/89640 - GNU attributes on lambda. |
401 | * parser.c (cp_parser_lambda_declarator_opt): Allow GNU attributes. | |
402 | ||
640c769f | 403 | PR c++/89682 - wrong access error in default argument. |
404 | * pt.c (tsubst_default_argument): Don't defer access checks. | |
405 | ||
24c67877 | 406 | 2019-03-18 Paolo Carlini <paolo.carlini@oracle.com> |
407 | ||
408 | PR c++/85014 | |
409 | * semantics.c (finish_non_static_data_member): Check return value | |
410 | of context_for_name_lookup and immediately return error_mark_node | |
411 | if isn't a type. | |
412 | ||
ce139b21 | 413 | 2019-03-17 Jason Merrill <jason@redhat.com> |
414 | ||
415 | PR c++/89571 - ICE with ill-formed noexcept on constructor. | |
416 | * pt.c (maybe_instantiate_noexcept): Only return false if defaulted. | |
417 | (regenerate_decl_from_template): Use it for noexcept-specs. | |
418 | ||
773c8785 | 419 | 2019-03-14 Jason Merrill <jason@redhat.com> |
420 | ||
421 | * parser.c (cp_parser_decl_specifier_seq): Support C++20 | |
422 | concept-definition syntax without 'bool'. | |
423 | ||
d0782a7e | 424 | 2019-03-14 Jakub Jelinek <jakub@redhat.com> |
425 | ||
c17b0b28 | 426 | PR c++/89512 |
427 | * semantics.c (finish_qualified_id_expr): Reject variable templates. | |
428 | ||
d0782a7e | 429 | PR c++/89652 |
430 | * constexpr.c (struct constexpr_ctx): Change save_exprs type from | |
431 | hash_set<tree> to vec<tree>. | |
432 | (cxx_eval_call_expression): Adjust for save_exprs being a vec instead | |
433 | of hash_set. | |
434 | (cxx_eval_loop_expr): Likewise. Truncate the vector after each | |
435 | removal of SAVE_EXPRs from values. | |
436 | (cxx_eval_constant_expression) <case SAVE_EXPR>: Call safe_push | |
437 | method on save_exprs instead of add. | |
438 | ||
d28a979f | 439 | 2019-03-13 Jason Merrill <jason@redhat.com> |
440 | ||
441 | PR c++/86521 - C++17 copy elision in initialization by constructor. | |
442 | * call.c (joust_maybe_elide_copy): New. | |
443 | (joust): Call it. | |
444 | ||
e214ee76 | 445 | 2019-03-13 Marek Polacek <polacek@redhat.com> |
446 | ||
447 | PR c++/88979 - further P0634 fix for constructors. | |
448 | * parser.c (cp_parser_decl_specifier_seq): Pass flags to | |
449 | cp_parser_constructor_declarator_p. | |
450 | (cp_parser_direct_declarator): Allow missing typename for constructor | |
451 | parameters. | |
452 | (cp_parser_constructor_declarator_p): Add FLAGS parameter. Pass it to | |
453 | cp_parser_type_specifier. | |
454 | ||
3c78ad42 | 455 | PR c++/89686 - mixing init-capture and simple-capture in lambda. |
456 | * parser.c (cp_parser_lambda_introducer): Give error when combining | |
457 | init-capture and simple-capture. | |
458 | ||
8b953246 | 459 | PR c++/89660 - bogus error with -Wredundant-move. |
460 | * typeck.c (maybe_warn_pessimizing_move): Only accept (T &) &arg | |
461 | as the std::move's argument. Don't call convert_for_initialization | |
462 | when warn_redundant_move isn't on. | |
463 | ||
4ca87658 | 464 | 2019-03-11 Jason Merrill <jason@redhat.com> |
465 | ||
466 | PR c++/86521 - wrong overload resolution with ref-qualifiers. | |
467 | * call.c (build_user_type_conversion_1): Don't use a conversion to a | |
468 | reference of the wrong rvalueness for direct binding. | |
469 | ||
f2a60d44 | 470 | 2019-03-11 Martin Liska <mliska@suse.cz> |
471 | ||
472 | * cvt.c (build_expr_type_conversion): Wrap apostrophes | |
473 | in gcc internal format with %'. | |
474 | * decl.c (check_no_redeclaration_friend_default_args): Likewise. | |
475 | (grokfndecl): Likewise. | |
476 | * name-lookup.c (do_pushtag): Likewise. | |
477 | * pt.c (unify_parameter_deduction_failure): Likewise. | |
478 | (unify_template_deduction_failure): Likewise. | |
479 | ||
2f6d557f | 480 | 2019-03-11 Martin Liska <mliska@suse.cz> |
481 | ||
482 | * call.c (convert_arg_to_ellipsis): Wrap an option name | |
483 | in a string format message and fix GNU coding style. | |
484 | (build_over_call): Likewise. | |
485 | * class.c (check_field_decl): Likewise. | |
486 | (layout_nonempty_base_or_field): Likewise. | |
487 | * constexpr.c (cxx_eval_loop_expr): Likewise. | |
488 | * cvt.c (type_promotes_to): Likewise. | |
489 | * decl.c (cxx_init_decl_processing): Likewise. | |
490 | (mark_inline_variable): Likewise. | |
491 | (grokdeclarator): Likewise. | |
492 | * decl2.c (record_mangling): Likewise. | |
493 | * error.c (maybe_warn_cpp0x): Likewise. | |
494 | * except.c (doing_eh): Likewise. | |
495 | * mangle.c (maybe_check_abi_tags): Likewise. | |
496 | * parser.c (cp_parser_diagnose_invalid_type_name): Likewise. | |
497 | (cp_parser_userdef_numeric_literal): Likewise. | |
498 | (cp_parser_primary_expression): Likewise. | |
499 | (cp_parser_unqualified_id): Likewise. | |
500 | (cp_parser_pseudo_destructor_name): Likewise. | |
501 | (cp_parser_builtin_offsetof): Likewise. | |
502 | (cp_parser_lambda_expression): Likewise. | |
503 | (cp_parser_lambda_introducer): Likewise. | |
504 | (cp_parser_lambda_declarator_opt): Likewise. | |
505 | (cp_parser_selection_statement): Likewise. | |
506 | (cp_parser_init_statement): Likewise. | |
507 | (cp_parser_decomposition_declaration): Likewise. | |
508 | (cp_parser_function_specifier_opt): Likewise. | |
509 | (cp_parser_static_assert): Likewise. | |
510 | (cp_parser_simple_type_specifier): Likewise. | |
511 | (cp_parser_namespace_definition): Likewise. | |
512 | (cp_parser_using_declaration): Likewise. | |
513 | (cp_parser_ctor_initializer_opt_and_function_body): Likewise. | |
514 | (cp_parser_initializer_list): Likewise. | |
515 | (cp_parser_type_parameter_key): Likewise. | |
516 | (cp_parser_member_declaration): Likewise. | |
517 | (cp_parser_try_block): Likewise. | |
518 | (cp_parser_std_attribute_spec): Likewise. | |
519 | (cp_parser_requires_clause_opt): Likewise. | |
520 | * pt.c (check_template_variable): Likewise. | |
521 | (check_default_tmpl_args): Likewise. | |
522 | (push_tinst_level_loc): Likewise. | |
523 | (instantiate_pending_templates): Likewise. | |
524 | (invalid_nontype_parm_type_p): Likewise. | |
525 | * repo.c (get_base_filename): Likewise. | |
526 | * rtti.c (typeid_ok_p): Likewise. | |
527 | (build_dynamic_cast_1): Likewise. | |
528 | * tree.c (maybe_warn_parm_abi): Likewise. | |
529 | ||
29005d9c | 530 | 2019-03-08 Jakub Jelinek <jakub@redhat.com> |
531 | ||
000969f9 | 532 | PR other/80058 |
533 | * parser.c (cp_parser_template_declaration_after_parameters): Avoid | |
534 | one space before " at the end of line and another after " on another | |
535 | line in a string literal. | |
536 | ||
94a62c5a | 537 | PR tree-optimization/89550 |
538 | * semantics.c (maybe_convert_cond): Only set TREE_NO_WARNING if | |
539 | warning_at returned true. | |
540 | * decl2.c (c_parse_final_cleanups): Likewise. | |
541 | * typeck.c (convert_for_assignment): Likewise. | |
542 | * decl.c (finish_function): Likewise. | |
543 | ||
222c113b | 544 | PR c++/89585 |
545 | * parser.c (cp_parser_asm_definition): Just warn instead of error | |
546 | on volatile qualifier outside of function body. | |
547 | ||
92651efb | 548 | PR c++/89599 |
549 | * constexpr.c (potential_constant_expression_1): Reject | |
550 | REINTERPRET_CAST_P NOP_EXPRs. | |
551 | ||
29005d9c | 552 | PR c++/89622 |
553 | * call.c (joust): Call print_z_candidate only if pedwarn returned | |
554 | true. | |
555 | ||
bddb19c4 | 556 | 2019-03-07 Jason Merrill <jason@redhat.com> |
557 | ||
84982f0e | 558 | PR c++/88123 - lambda and using-directive. |
559 | * name-lookup.c (op_unqualified_lookup) | |
560 | (maybe_save_operator_binding, discard_operator_bindings) | |
561 | (push_operator_bindings): New. | |
562 | * typeck.c (build_x_binary_op, build_x_unary_op): Call | |
563 | maybe_save_operator_binding. | |
564 | * decl.c (start_preparsed_function): Call push_operator_bindings. | |
565 | * tree.c (cp_free_lang_data): Call discard_operator_bindings. | |
566 | ||
bddb19c4 | 567 | PR c++/88820 - ICE with CTAD and member template used in DMI. |
568 | * pt.c (do_class_deduction): Handle parm used as its own arg. | |
569 | ||
02a7fc59 | 570 | 2019-03-07 Jakub Jelinek <jakub@redhat.com> |
571 | ||
572 | PR c++/89585 | |
573 | * parser.c (cp_parser_asm_definition): Parse asm qualifiers even | |
574 | at toplevel, but diagnose them. | |
575 | ||
bc17f5fd | 576 | 2019-03-06 Jason Merrill <jason@redhat.com> |
577 | ||
578 | PR c++/89381 - implicit copy and using-declaration. | |
579 | * class.c (classtype_has_move_assign_or_move_ctor_p): Don't consider | |
580 | op= brought in by a using-declaration. | |
581 | ||
aa49bda0 | 582 | 2019-03-06 Jakub Jelinek <jakub@redhat.com> |
583 | ||
584 | PR c++/87148 | |
585 | * init.c (build_value_init_noctor): Ignore flexible array members. | |
586 | ||
02daf5d2 | 587 | 2019-03-06 Jason Merrill <jason@redhat.com> |
588 | ||
589 | PR c++/89576 - if constexpr of lambda capture. | |
590 | * semantics.c (maybe_convert_cond): Do convert a non-dependent | |
591 | condition in a template. | |
592 | * typeck.c (condition_conversion): Handle being called in a | |
593 | template. | |
594 | ||
55d0cc00 | 595 | 2019-03-06 Marek Polacek <polacek@redhat.com> |
596 | ||
597 | PR c++/87378 - bogus -Wredundant-move warning. | |
598 | * typeck.c (maybe_warn_pessimizing_move): See if the maybe-rvalue | |
599 | overload resolution would actually succeed. | |
600 | ||
cd5a9ed1 | 601 | 2019-03-05 Jason Merrill <jason@redhat.com> |
602 | ||
603 | * class.c (is_really_empty_class): Add ignore_vptr parm. | |
604 | (trivial_default_constructor_is_constexpr): Pass it. | |
605 | * call.c (build_over_call): Pass it. | |
606 | * constexpr.c (cxx_eval_constant_expression): Pass it instead of | |
607 | checking TYPE_POLYMORPHIC_P. | |
608 | (cxx_eval_component_reference, potential_constant_expression_1): | |
609 | Pass it. | |
610 | * cp-gimplify.c (simple_empty_class_p): Pass it. | |
611 | * init.c (expand_aggr_init_1): Pass it. | |
612 | ||
1751c288 | 613 | 2019-03-04 Paolo Carlini <paolo.carlini@oracle.com> |
614 | ||
615 | PR c++/84605 | |
616 | * parser.c (cp_parser_class_head): Reject TYPE_BEING_DEFINED too. | |
617 | ||
10599713 | 618 | 2019-03-04 Jakub Jelinek <jakub@redhat.com> |
619 | ||
620 | PR c++/71446 | |
621 | * call.c (field_in_pset): New function. | |
622 | (build_aggr_conv): Handle CONSTRUCTOR_IS_DESIGNATED_INIT correctly. | |
623 | ||
73e3d2ee | 624 | 2019-03-02 Jakub Jelinek <jakub@redhat.com> |
625 | ||
626 | PR c++/71446 | |
627 | * cp-tree.h (CONSTRUCTOR_IS_DESIGNATED_INIT): Define. | |
628 | * parser.c (cp_parser_braced_list): Adjust cp_parser_initializer_list | |
629 | caller, set CONSTRUCTOR_IS_DESIGNATED_INIT. | |
630 | (cp_parser_initializer_list): Add designated parameter, set *designated | |
631 | to a bool whether any designators were parsed. | |
632 | * decl.c (reshape_init): Copy over CONSTRUCTOR_IS_DESIGNATED_INIT if | |
633 | needed. | |
634 | * pt.c (tsubst_copy_and_build): Likewise. | |
635 | * call.c (implicit_conversion): If CONSTRUCTOR_IS_DESIGNATED_INIT, | |
636 | don't call build_list_conv, nor build_complex_conv, nor attempt to | |
637 | convert a single element initializer to scalar. | |
638 | ||
f409a882 | 639 | 2019-03-01 Marek Polacek <polacek@redhat.com> |
640 | ||
ae8e3cb6 | 641 | PR c++/89537 - missing location for error with non-static member fn. |
642 | * call.c (resolve_args): Use EXPR_LOCATION. | |
643 | * typeck.c (build_class_member_access_expr): Use input_location. | |
644 | ||
f409a882 | 645 | PR c++/89532 - ICE with incomplete type in decltype. |
646 | * semantics.c (finish_compound_literal): Return error_mark_node | |
647 | if digest_init_flags returns error_mark_node. | |
648 | ||
b279a142 | 649 | 2019-03-01 Jakub Jelinek <jakub@redhat.com> |
650 | ||
651 | Implement P1002R1, Try-catch blocks in constexpr functions | |
652 | PR c++/89513 | |
653 | * parser.c (cp_parser_ctor_initializer_opt_and_function_body): | |
654 | Diagnose constexpr ctor or function with function-try-block with | |
655 | pedwarn for c++17 and earlier. Formatting fix. | |
656 | (cp_parser_try_block): Use pedwarn instead of error and only for | |
657 | c++17 and earlier when try block appears in constexpr function. | |
658 | * constexpr.c (build_constexpr_constructor_member_initializers): | |
659 | Handle TRY_BLOCK here instead of erroring on it. | |
660 | ||
c7110ca7 | 661 | 2019-02-28 Jason Merrill <jason@redhat.com> |
662 | ||
bb019931 | 663 | PR c++/88183 - ICE with .* fold-expression. |
664 | * pt.c (fold_expression) [DOTSTAR_EXPR]: Remove special handling. | |
665 | ||
9b4cf3ba | 666 | PR c++/86969 - ICE with constexpr if and recursive generic lambdas. |
667 | * class.c, lambda.c, pt.c: Revert earlier change. | |
668 | * lambda.c (add_capture): Don't special-case capture of dependent | |
669 | VLA. | |
670 | ||
c7110ca7 | 671 | * name-lookup.c (print_binding_level): Print this_entity. |
672 | ||
90c2137c | 673 | 2019-02-27 Marek Polacek <polacek@redhat.com> |
674 | ||
675 | PR c++/88857 - ICE with value-initialization of argument in template. | |
676 | * call.c (convert_like_real): Don't call build_value_init in template. | |
677 | ||
9ecd4044 | 678 | 2019-02-27 Jason Merrill <jason@redhat.com> |
679 | ||
680 | PR c++/86969 - ICE with constexpr if and recursive generic lambdas. | |
681 | * semantics.c (process_outer_var_ref): Do capture dependent vars. | |
682 | * class.c (finish_struct): Only add TAG_DEFN if T is in | |
683 | current_function_decl. | |
684 | * lambda.c (vla_capture_type): Force the capture type out into the | |
685 | lambda's enclosing function. | |
686 | (add_capture): Pass in the lambda. | |
687 | * pt.c (tsubst_lambda_expr): complete_type a VLA capture type. | |
688 | ||
7304edd1 | 689 | 2019-02-27 Marek Polacek <polacek@redhat.com> |
690 | ||
691 | PR c++/89511 - ICE with using-declaration and unscoped enumerator. | |
692 | * parser.c (cp_parser_using_declaration): For an unscoped enum | |
693 | only use its context if it's not a function declaration. | |
694 | ||
c9f30cbb | 695 | 2019-02-27 Paolo Carlini <paolo.carlini@oracle.com> |
696 | ||
697 | PR c++/89488 | |
698 | * method.c (process_subob_fn): When maybe_instantiate_noexcept | |
699 | returns false don't call merge_exception_specifiers. | |
700 | ||
701 | 2019-02-27 Paolo Carlini <paolo.carlini@oracle.com> | |
702 | ||
703 | PR c++/88987 | |
704 | * parser.c (cp_parser_noexcept_specification_opt): Return NULL_TREE | |
705 | for a non-constant parsed expression. | |
706 | ||
a165fd90 | 707 | 2019-02-26 Jakub Jelinek <jakub@redhat.com> |
708 | ||
709 | PR c++/89481 | |
710 | * constexpr.c (cxx_eval_store_expression): When changing active union | |
711 | member, set no_zero_init. | |
712 | ||
c005651d | 713 | 2019-02-23 Marek Polacek <polacek@redhat.com> |
714 | ||
715 | PR c++/88294 - ICE with non-constant noexcept-specifier. | |
716 | * pt.c (maybe_instantiate_noexcept): Set up the list of local | |
717 | specializations. Set current_class_{ptr,ref}. | |
718 | ||
689cc9b6 | 719 | 2019-02-22 David Malcolm <dmalcolm@redhat.com> |
720 | ||
721 | PR c++/89390 | |
722 | * parser.c (cp_parser_unqualified_id): Capture and use locations | |
723 | for destructors. | |
724 | ||
e7652833 | 725 | 2019-02-22 Marek Polacek <polacek@redhat.com> |
726 | ||
727 | PR c++/89420 - ICE with CAST_EXPR in explicit-specifier. | |
728 | * decl.c (build_explicit_specifier): Don't check | |
729 | processing_template_decl. Call instantiation_dependent_expression_p | |
730 | instead of value_dependent_expression_p. Call | |
731 | instantiate_non_dependent_expr_sfinae before | |
732 | build_converted_constant_expr instead of calling | |
733 | instantiate_non_dependent_expr after it. Add | |
734 | processing_template_decl_sentinel. | |
735 | ||
51391c1d | 736 | 2019-02-22 Thomas Schwinge <thomas@codesourcery.com> |
737 | ||
738 | * parser.c (cp_parser_oacc_simple_clause): Remove parser formal | |
739 | parameter, move loc formal parameter to the front. Adjust all | |
740 | users. | |
741 | (cp_parser_oacc_shape_clause): Add loc formal parameter. Adjust | |
742 | all users. | |
743 | ||
b6700c1a | 744 | 2019-02-21 Jason Merrill <jason@redhat.com> |
745 | ||
532cca3f | 746 | PR c++/87685 - generic lambda 'this' capture error. |
747 | * lambda.c (lambda_expr_this_capture): Change add_capture_p to int. | |
748 | (maybe_generic_this_capture): Pass -1. | |
749 | ||
a7ea8f96 | 750 | PR c++/88394 - ICE with VLA init-capture. |
751 | * lambda.c (is_normal_capture_proxy): Check DECL_CAPTURED_VARIABLE. | |
752 | ||
e2d4b8be | 753 | PR c++/88869 - C++17 ICE with CTAD and explicit specialization. |
754 | * pt.c (do_class_deduction): Don't include explicit specialization | |
755 | args in outer_args. | |
756 | ||
b6700c1a | 757 | PR c++/89422 - ICE with -g and lambda in default arg in template. |
758 | * pt.c (tsubst_function_decl): SET_DECL_FRIEND_CONTEXT sooner. | |
759 | ||
147a31b6 | 760 | 2019-02-21 Jason Merrill <jason@redhat.com> |
761 | ||
762 | PR c++/88419 - C++17 ICE with class template arg deduction. | |
763 | * pt.c (make_template_placeholder): Set TYPE_CANONICAL after | |
764 | CLASS_PLACEHOLDER_TEMPLATE. | |
765 | ||
02d7a132 | 766 | 2019-02-21 Jakub Jelinek <jakub@redhat.com> |
767 | ||
768 | PR c++/89285 | |
769 | * constexpr.c (struct constexpr_fundef): Add parms and result members. | |
770 | (retrieve_constexpr_fundef): Adjust for the above change. | |
771 | (register_constexpr_fundef): Save constexpr body with copy_fn, | |
772 | temporarily set DECL_CONTEXT on DECL_RESULT before that. | |
773 | (get_fundef_copy): Change FUN argument to FUNDEF with | |
774 | constexpr_fundef * type, grab body and parms/result out of | |
775 | constexpr_fundef struct and temporarily change it for copy_fn calls | |
776 | too. | |
777 | (cxx_eval_builtin_function_call): For __builtin_FUNCTION temporarily | |
778 | adjust current_function_decl from ctx->call context. Test | |
779 | !potential_constant_expression instead of !is_constant_expression. | |
780 | (cxx_bind_parameters_in_call): Grab parameters from new_call. Undo | |
781 | convert_for_arg_passing changes for TREE_ADDRESSABLE type passing. | |
782 | (cxx_eval_call_expression): Adjust get_fundef_copy caller. | |
783 | (cxx_eval_conditional_expression): For IF_STMT, allow then or else | |
784 | operands to be NULL. | |
785 | (label_matches): Handle BREAK_STMT and CONTINUE_STMT. | |
786 | (cxx_eval_loop_expr): Add support for FOR_STMT, WHILE_STMT and DO_STMT. | |
787 | (cxx_eval_switch_expr): Add support for SWITCH_STMT. | |
788 | (cxx_eval_constant_expression): Handle IF_STMT, FOR_STMT, WHILE_STMT, | |
789 | DO_STMT, CONTINUE_STMT, SWITCH_STMT, BREAK_STMT and CONTINUE_STMT. | |
790 | For SIZEOF_EXPR, recurse on the result of fold_sizeof_expr. Ignore | |
791 | DECL_EXPR with USING_DECL operand. | |
792 | * lambda.c (maybe_add_lambda_conv_op): Build thisarg using | |
793 | build_int_cst to make it a valid constant expression. | |
794 | ||
dcd8f919 | 795 | 2019-02-20 Jason Merrill <jason@redhat.com> |
796 | ||
797 | PR c++/88690 - C++17 ICE with empty base in aggregate. | |
798 | * typeck2.c (process_init_constructor_record): Skip trivial | |
799 | initialization of an empty base. | |
800 | ||
309e5f71 | 801 | 2019-02-21 Richard Biener <rguenther@suse.de> |
802 | ||
803 | PR middle-end/89392 | |
804 | * vtable-class-hierarchy.c (vtv_generate_init_routine): Do not | |
805 | make symtab process new functions here. | |
806 | ||
4e60ed29 | 807 | 2019-02-20 Jason Merrill <jason@redhat.com> |
808 | ||
809 | PR c++/87921 - wrong error with inline static data member. | |
810 | * decl2.c (finish_static_data_member_decl): Don't set DECL_IN_AGGR_P | |
811 | for a non-template inline variable. Do nothing for an | |
812 | already-instantiated variable. | |
813 | (c_parse_final_cleanups): Check DECL_IN_AGGR_P without | |
814 | DECL_INLINE_VAR_P. | |
815 | * decl.c (check_initializer): Likewise. | |
816 | (make_rtl_for_nonlocal_decl): Likewise. | |
817 | * pt.c (instantiate_decl): Likewise. | |
818 | * typeck2.c (store_init_value): Likewise. | |
819 | ||
b47245f1 | 820 | 2019-02-20 Jakub Jelinek <jakub@redhat.com> |
821 | ||
0c3f2aa9 | 822 | PR c++/89403 |
823 | * decl2.c (c_parse_final_cleanups): Move TREE_ASM_WRITTEN setting | |
824 | for flag_syntax_only from here... | |
825 | * semantics.c (expand_or_defer_fn_1): ... here. | |
826 | ||
02dc6028 | 827 | PR c++/89405 |
828 | * decl.c (maybe_commonize_var): When clearing TREE_PUBLIC and | |
829 | DECL_COMMON, set DECL_INTERFACE_KNOWN. | |
830 | ||
b47245f1 | 831 | PR c++/89336 |
832 | * constexpr.c (cxx_eval_store_expression): Diagnose changing of active | |
833 | union member for -std=c++17 and earlier. | |
834 | ||
af48cea2 | 835 | 2019-02-19 Jason Merrill <jason@redhat.com> |
836 | ||
837 | PR c++/87513 - 'sorry' mangling PMF template-id. | |
838 | * mangle.c (write_expression): Handle SCOPE_REF to BASELINK. | |
839 | ||
fd8a4665 | 840 | 2019-02-19 Jason Merrill <jason@redhat.com> |
841 | ||
842 | PR c++/88380 - wrong-code with flexible array and NSDMI. | |
843 | * typeck2.c (process_init_constructor_record): Skip flexarrays. | |
844 | ||
53ceddc9 | 845 | 2019-02-20 will wray <wjwray@gmail.com> |
846 | ||
847 | PR c++/88572 - wrong handling of braces on scalar init. | |
848 | * decl.c (reshape_init_r): Allow braces around scalar initializer | |
849 | within aggregate init. Reject double braced-init of scalar | |
850 | variable. | |
851 | ||
ab0fbe16 | 852 | 2019-02-20 Paolo Carlini <paolo.carlini@oracle.com> |
853 | ||
854 | PR c++/84536 | |
855 | * pt.c (tsubst_init): Diagnose an initializer expanding to an | |
856 | empty list of expressions; tweak wrt dependent types. | |
857 | (regenerate_decl_from_template): For VAR_DECLs call tsubst_init | |
858 | instead of tsubst_expr. | |
859 | ||
ce7f22f1 | 860 | 2019-02-19 Jason Merrill <jason@redhat.com> |
861 | ||
862 | PR c++/88368 - wrong 'use of deleted function' | |
863 | * method.c (walk_field_subobs): Remember errors from get_nsdmi. | |
864 | (get_defaulted_eh_spec): Call push_tinst_level. | |
865 | * pt.c (maybe_instantiate_noexcept): Keep error_mark_node. | |
866 | * typeck2.c (merge_exception_specifiers): Handle error_mark_node. | |
867 | ||
d572a4c3 | 868 | 2019-02-19 Chung-Lin Tang <cltang@codesourcery.com> |
869 | ||
870 | PR c/87924 | |
871 | * parser.c (cp_parser_oacc_clause_wait): Add representation of wait | |
872 | clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments. | |
873 | ||
31358ed0 | 874 | 2019-02-19 Jakub Jelinek <jakub@redhat.com> |
875 | ||
5ebe5c44 | 876 | PR c++/89387 |
877 | * lambda.c (maybe_generic_this_capture): Don't check | |
878 | DECL_NONSTATIC_MEMBER_FUNCTION_P on USING_DECLs. | |
879 | ||
fcea8c4d | 880 | PR c++/89391 |
881 | * typeck.c (build_reinterpret_cast_1): Don't handle void to | |
882 | && conversion go through build_target_expr_with_type. | |
883 | ||
31358ed0 | 884 | PR c++/89390 |
885 | * error.c (qualified_name_lookup_error): Only call | |
886 | suggest_alternative_in_scoped_enum if name is IDENTIFIER_NODE. | |
887 | ||
25694c85 | 888 | 2019-02-19 Tom Honermann <tom@honermann.net> |
889 | ||
890 | * name-lookup.c (get_std_name_hint): Added u8string as a name hint. | |
891 | ||
a1e1b603 | 892 | 2019-02-18 Jason Merrill <jason@redhat.com> |
893 | ||
6aaacaf1 | 894 | PR c++/89336 - multiple stores in constexpr stmt. |
895 | * constexpr.c (cxx_eval_store_expression): Preevaluate scalar or | |
896 | assigned value. | |
897 | ||
f6347d1a | 898 | * pt.c (check_explicit_specialization): If the declarator is a |
899 | template-id, only check whether the arguments are dependent. | |
900 | ||
a1e1b603 | 901 | Improve duplicate [[likely]] diagnostic. |
902 | * parser.c (cp_parser_statement): Make attrs_loc a range. Pass it | |
903 | to process_stmt_hotness_attribute. | |
904 | * cp-gimplify.c (process_stmt_hotness_attribute): Take attrs_loc. | |
905 | (genericize_if_stmt): Use likely/unlikely instead of predictor_name. | |
906 | ||
33e6651d | 907 | 2019-02-17 Marek Polacek <polacek@redhat.com> |
908 | ||
909 | PR c++/89217 - ICE with list-initialization in range-based for loop. | |
910 | * constexpr.c (unshare_constructor): No longer static. | |
911 | * cp-tree.h (unshare_constructor): Declare. | |
912 | * semantics.c (finish_compound_literal): When dealing with a | |
913 | non-dependent expression in a template, return the original | |
914 | expression. Pass LOOKUP_NO_NARROWING to digest_init_flags. | |
915 | ||
3a860627 | 916 | 2019-02-13 Marek Polacek <polacek@redhat.com> |
917 | ||
918 | PR c++/89297 - ICE with OVERLOAD in template. | |
919 | * semantics.c (finish_compound_literal): Call | |
920 | instantiate_non_dependent_expr_sfinae. | |
921 | ||
601c59dd | 922 | 2019-02-13 Alexandre Oliva <aoliva@redhat.com> |
923 | ||
40563cf7 | 924 | PR c++/86379 |
925 | * cp-tree.h (USING_DECL_SCOPE): Use result rather than type. | |
926 | * name-lookup.c (strip_using_decl): Use USING_DECL_SCOPE. | |
927 | * search.c (protected_accessible_p): Follow USING_DECL_DECLS. | |
928 | (shared_member_p): Likewise. | |
929 | (lookup_member): Likewise. | |
930 | * decl.c (grok_special_member_properties): Skip USING_DECLs. | |
931 | * semantics.c (finish_omp_declare_simd_methods): Likewise. | |
932 | (finish_qualified_id_expr): Do not call shared_member_p with | |
933 | a dependent expr. | |
934 | ||
601c59dd | 935 | PR c++/87322 |
936 | * pt.c (tsubst_lambda_expr): Avoid duplicate tsubsting. | |
937 | Move cp_evaluated resetting before signature tsubsting. | |
938 | (gen_elem_of_pack_expansion_instantiation): Separate local | |
939 | specializations per index. | |
940 | ||
f2da1a76 | 941 | 2019-02-13 David Malcolm <dmalcolm@redhat.com> |
942 | ||
943 | PR c++/89036 | |
944 | * class.c (add_method): Drop destructor assertion. | |
945 | ||
64bd49fa | 946 | 2019-02-13 Paolo Carlini <paolo.carlini@oracle.com> |
947 | ||
948 | PR c++/88986 | |
949 | * decl.c (make_typename_type): Allow for TYPE_PACK_EXPANSION as | |
950 | context (the first argument). | |
951 | * pt.c (tsubst, case TYPENAME_TYPE): Handle TYPE_PACK_EXPANSION | |
952 | as context. | |
953 | ||
c8e19553 | 954 | 2019-02-12 Jason Merrill <jason@redhat.com> |
955 | ||
956 | PR c++/89144 - link error with constexpr initializer_list. | |
957 | * call.c (convert_like_real) [ck_list]: Don't allocate a temporary | |
958 | array for an empty list. | |
959 | * typeck2.c (store_init_value): Don't use cxx_constant_init in a | |
960 | template. | |
961 | ||
33fe677e | 962 | 2019-02-11 Jason Merrill <jason@redhat.com> |
963 | ||
964 | PR c++/89241 - ICE with __func__ in lambda in template. | |
965 | * pt.c (enclosing_instantiation_of): Also check | |
966 | instantiated_lambda_fn_p for the template context. | |
967 | ||
44263306 | 968 | 2019-02-11 Marek Polacek <polacek@redhat.com> |
969 | ||
970 | PR c++/89212 - ICE converting nullptr to pointer-to-member-function. | |
971 | * pt.c (tsubst_copy_and_build) <case CONSTRUCTOR>: Return early for | |
972 | null member pointer value. | |
973 | ||
61b94553 | 974 | 2019-02-11 Jakub Jelinek <jakub@redhat.com> |
975 | ||
976 | PR c++/88977 | |
977 | * pt.c (convert_nontype_argument): Pass true as manifestly_const_eval | |
978 | to maybe_constant_value calls. | |
979 | ||
b10193f4 | 980 | 2019-02-11 Marek Polacek <polacek@redhat.com> |
981 | ||
982 | * typeck2.c (digest_init_r): Remove commented code. | |
983 | ||
08acf739 | 984 | 2019-02-11 Martin Sebor <msebor@redhat.com> |
985 | ||
986 | PR c++/87996 | |
987 | * decl.c (compute_array_index_type_loc): Preserve signed sizes | |
988 | for diagnostics. Call valid_array_size_p instead of error. | |
989 | * init.c (build_new_1): Compute size for diagnostic. Call | |
990 | invalid_array_size_error | |
991 | (build_new): Call valid_array_size_p instead of error. | |
992 | ||
939d44f3 | 993 | 2019-02-07 Alexandre Oliva <aoliva@redhat.com> |
994 | ||
995 | PR c++/86218 | |
996 | * call.c (compare_ics): Deal with ck_aggr in either cs. | |
997 | ||
c92ab8d4 | 998 | 2019-02-06 David Malcolm <dmalcolm@redhat.com> |
999 | ||
1000 | PR c++/71302 | |
1001 | * call.c (get_location_for_expr_unwinding_for_system_header): New | |
1002 | function. | |
1003 | (conversion_null_warnings): Use it when getting locations for | |
1004 | EXPR, effectively adding a call to | |
1005 | get_location_for_expr_unwinding_for_system_header for | |
1006 | -Wconversion-null and making use of EXPR_LOCATION for | |
1007 | -Wzero-as-null-pointer-constant. | |
1008 | ||
b5a6b127 | 1009 | 2019-02-05 Jakub Jelinek <jakub@redhat.com> |
1010 | ||
1011 | PR c++/89187 | |
1012 | * optimize.c (maybe_thunk_body): Clear TREE_ADDRESSABLE on | |
1013 | PARM_DECLs of the thunk. | |
1014 | * lambda.c (maybe_add_lambda_conv_op): Likewise. | |
1015 | ||
74ce2ebb | 1016 | 2019-02-05 Marek Polacek <polacek@redhat.com> |
1017 | ||
1018 | PR c++/89158 - by-value capture of constexpr variable broken. | |
1019 | * call.c (convert_like_real) <case ck_user>: Call mark_exp_read | |
1020 | instead of mark_rvalue_use. | |
1021 | ||
9ca54fa1 | 1022 | 2019-02-05 Alexandre Oliva <aoliva@redhat.com> |
1023 | ||
1024 | PR c++/87770 | |
1025 | * pt.c (instantiates_primary_template_p): New. | |
1026 | (type_dependent_expression_p): Use it. | |
1027 | ||
c758dd5a | 1028 | 2019-02-01 Jason Merrill <jason@redhat.com> |
1029 | ||
1030 | PR c++/88761 - ICE with reference capture of constant. | |
1031 | * lambda.c (mark_const_cap_r): Do walk subtrees of DECL_EXPR for | |
1032 | non-proxy decls. | |
1033 | ||
bdb43276 | 1034 | 2019-02-01 Marek Polacek <polacek@redhat.com> |
1035 | ||
1036 | PR c++/88325 - ICE with invalid out-of-line template member definition. | |
1037 | * parser.c (cp_parser_class_name): Don't call make_typename_type | |
1038 | for overloads. | |
1039 | ||
5ab8180e | 1040 | 2019-02-01 Jakub Jelinek <jakub@redhat.com> |
1041 | ||
1042 | PR c++/87175 | |
1043 | * parser.c (cp_parser_gnu_attributes_opt): Set ok to false | |
1044 | if require_open failed. | |
1045 | ||
c8f861a0 | 1046 | 2019-01-31 Marek Polacek <polacek@redhat.com> |
1047 | ||
1048 | PR c++/89083, c++/80864 - ICE with list initialization in template. | |
1049 | * constexpr.c (adjust_temp_type): Use copy_node and change the type | |
1050 | instead of using build_constructor. | |
1051 | * decl.c (reshape_init_r): Don't reshape a digested initializer. | |
1052 | Return the initializer for COMPOUND_LITERAL_P. | |
1053 | ||
f1329be6 | 1054 | PR c++/88983 - ICE with switch in constexpr function. |
1055 | * constexpr.c (cxx_eval_switch_expr): Use SWITCH_COND and SWITCH_BODY. | |
1056 | (cxx_eval_constant_expression) <case COND_EXPR>: Don't look for the | |
1057 | label in the else branch if we found it in the then branch. | |
1058 | ||
8c28f0ef | 1059 | 2019-01-30 Jason Merrill <jason@redhat.com> |
1060 | ||
1061 | PR c++/88752 - ICE with lambda and constexpr if. | |
1062 | * cp-tree.h (LAMBDA_EXPR_INSTANTIATED): New. | |
1063 | * pt.c (tsubst_lambda_expr): Set it. | |
1064 | (instantiated_lambda_fn_p): Check it. | |
1065 | (enclosing_instantiation_of): Use it. | |
1066 | ||
abb9ae66 | 1067 | 2019-01-31 Jakub Jelinek <jakub@redhat.com> |
1068 | ||
1069 | PR libstdc++/88170 | |
1070 | * cxx-pretty-print.c (pp_cxx_enumeration_constant): Print always as | |
1071 | a C cast in pp_c_flag_gnu_v3 mode. | |
1072 | ||
9b0e9786 | 1073 | 2019-01-30 Jakub Jelinek <jakub@redhat.com> |
1074 | ||
1075 | PR c++/88988 | |
1076 | * lambda.c (is_capture_proxy): Don't return true for | |
1077 | DECL_OMP_PRIVATIZED_MEMBER artificial vars. | |
1078 | ||
7066144a | 1079 | 2019-01-30 Marek Polacek <polacek@redhat.com> |
1080 | ||
1081 | PR c++/89119 - ICE with value-initialization in template. | |
1082 | * pt.c (tsubst_copy_and_build): Handle RANGE_EXPR. | |
1083 | ||
64e3499e | 1084 | 2019-01-29 Jason Merrill <jason@redhat.com> |
1085 | ||
1086 | PR c++/86943 - wrong code converting lambda to function pointer. | |
1087 | * lambda.c (maybe_add_lambda_conv_op): Use a template-id in the | |
1088 | call. Only forward parms for decltype. | |
1089 | * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Handle CALL_FROM_THUNK_P | |
1090 | specially. | |
1091 | * typeck.c (check_return_expr): Don't mess with a thunk call. | |
1092 | ||
107cba11 | 1093 | 2019-01-28 Jason Merrill <jason@redhat.com> |
1094 | ||
1095 | PR c++/89089 - ICE with [[no_unique_address]]. | |
1096 | PR c++/88865 - wrong layout with [[no_unique_address]]. | |
1097 | * class.c (check_field_decls): A potentially-overlapping field makes | |
1098 | the class non-layout-POD, but not non-empty. | |
1099 | (end_of_class): Always consider empty data members. | |
1100 | (layout_class_type): Set DECL_SIZE for empty fields. | |
1101 | ||
44da2a17 | 1102 | 2019-01-28 Marek Polacek <polacek@redhat.com> |
1103 | ||
1104 | PR c++/88358 - name wrongly treated as type. | |
1105 | * parser.c (cp_parser_direct_declarator): Don't assume a qualified-id | |
1106 | in parameter-list is a type if the function's declarator-id is not | |
1107 | qualified. | |
1108 | ||
1d41b42f | 1109 | 2019-01-27 Marek Polacek <polacek@redhat.com> |
1110 | ||
b7feeace | 1111 | PR c++/88815 - narrowing conversion lost in decltype. |
1112 | PR c++/78244 - narrowing conversion in template not detected. | |
1113 | * cp-tree.h (CONSTRUCTOR_IS_DEPENDENT): New. | |
1114 | * pt.c (instantiation_dependent_r): Consider a CONSTRUCTOR with | |
1115 | CONSTRUCTOR_IS_DEPENDENT instantiation-dependent. | |
1116 | * semantics.c (finish_compound_literal): When the compound literal | |
1117 | isn't instantiation-dependent and the type isn't type-dependent, | |
1118 | fall back to the normal processing. Set CONSTRUCTOR_IS_DEPENDENT. | |
1119 | ||
1d41b42f | 1120 | PR c++/89024 - ICE with incomplete enum type. |
1121 | * call.c (standard_conversion): When converting an | |
1122 | ARITHMETIC_TYPE_P to an incomplete type, return NULL. | |
1123 | ||
837ddebd | 1124 | 2019-01-25 Paolo Carlini <paolo.carlini@oracle.com> |
1125 | ||
1126 | PR c++/88969 | |
1127 | * call.c (build_op_delete_call): Implement 7.6.2.5/(10.1). | |
1128 | * decl2.c (coerce_delete_type): Use build_pointer_type instead | |
1129 | of TYPE_POINTER_TO. | |
1130 | ||
8c89c5fc | 1131 | 2019-01-24 Jason Merrill <jason@redhat.com> |
1132 | ||
1133 | PR c++/89001 - mangling of reference temporaries | |
1134 | * cp-tree.h (struct saved_scope): Add ref_temp_count. | |
1135 | (current_ref_temp_count): New macro. | |
1136 | * mangle.c (mangle_ref_init_variable): Use it. | |
1137 | * typeck2.c (store_init_value): Clear it. | |
1138 | * call.c (make_temporary_var_for_ref_to_temp): Copy public and | |
1139 | comdat. | |
1140 | ||
b5e76680 | 1141 | 2019-01-24 Jakub Jelinek <jakub@redhat.com> |
1142 | ||
1143 | PR c++/88976 | |
1144 | * semantics.c (finish_omp_cancel): Diagnose more than one if | |
1145 | on #pragma omp cancel with different modifiers. Use | |
1146 | maybe_convert_cond when not in template or build_x_binary_op | |
1147 | otherwise. | |
1148 | ||
dffbcba8 | 1149 | 2019-01-23 Marek Polacek <polacek@redhat.com> |
1150 | ||
1151 | PR c++/88757 - qualified name treated wrongly as type. | |
1152 | * parser.c (cp_parser_direct_declarator): Don't treat qualified-ids | |
1153 | in parameter-list as types if name lookup for declarator-id didn't | |
1154 | find one or more function templates. | |
1155 | ||
1f03c410 | 1156 | 2019-01-23 Jakub Jelinek <jakub@redhat.com> |
1157 | ||
8090d51c | 1158 | PR c/44715 |
1159 | * cp-gimplify.c (genericize_cp_loop): Call begin_bc_block only | |
1160 | after genericizing cond and incr expressions. | |
1161 | ||
1f03c410 | 1162 | PR c++/88984 |
1163 | * cp-gimplify.c (genericize_switch_stmt): Move cond genericization | |
1164 | before the begin_bc_block call. | |
1165 | ||
48c03f15 | 1166 | 2019-01-21 Jason Merrill <jason@redhat.com> |
1167 | ||
1168 | PR c++/87893 - constexpr ctor ICE on ARM. | |
1169 | PR c++/88293 - ICE with comma expression. | |
1170 | * constexpr.c (initialized_type): Don't shortcut non-void type. | |
1171 | Handle COMPOUND_EXPR. | |
1172 | (cxx_eval_outermost_constant_expr): Return early for void type. | |
1173 | ||
99bf4b63 | 1174 | 2019-01-21 Jakub Jelinek <jakub@redhat.com> |
1175 | ||
77fe9474 | 1176 | PR c++/88949 |
1177 | * optimize.c (cxx_copy_decl): New function. | |
1178 | (clone_body): Use it instead of copy_decl_no_change. | |
1179 | ||
99bf4b63 | 1180 | PR sanitizer/88901 |
1181 | * typeck.c (cp_build_binary_op): Don't instrument | |
1182 | SANITIZE_POINTER_COMPARE if processing_template_decl. | |
1183 | (pointer_diff): Similarly for SANITIZE_POINTER_SUBTRACT. | |
1184 | ||
ecd2d842 | 1185 | 2019-01-18 Jason Merrill <jason@redhat.com> |
1186 | ||
1187 | PR c++/88875 - error with explicit list constructor. | |
1188 | * call.c (reference_binding): Don't modify EXPR. Set | |
1189 | need_temporary_p on the ck_user conversion for a temporary. | |
1190 | (convert_like_real): Check it. | |
1191 | ||
6d4e8a95 | 1192 | 2019-01-18 H.J. Lu <hongjiu.lu@intel.com> |
1193 | ||
1194 | PR c/51628 | |
1195 | PR c/88664 | |
1196 | * call.c (convert_for_arg_passing): Upate the | |
1197 | warn_for_address_or_pointer_of_packed_member call. | |
1198 | * typeck.c (convert_for_assignment): Likewise. | |
1199 | ||
9d3c4130 | 1200 | 2019-01-17 Jason Merrill <jason@redhat.com> |
1201 | ||
bc9c0483 | 1202 | PR c++/86205 - ICE with ?: of throw and template-id. |
1203 | * pt.c (resolve_nondeduced_context_or_error): Split out from... | |
1204 | * typeck.c (decay_conversion): ...here. | |
1205 | * call.c (build_conditional_expr_1): Use it. | |
1206 | ||
9d3c4130 | 1207 | PR c++/86740, ICE with constexpr if and nested generic lambdas. |
1208 | * tree.c (cp_walk_subtrees): Handle LAMBDA_EXPR. | |
1209 | ||
0f910e62 | 1210 | 2019-01-17 Paolo Carlini <paolo.carlini@oracle.com> |
1211 | ||
1212 | * decl.c (grokdeclarator): Use typespec_loc in error messages | |
1213 | about 'auto' and trailing return type. | |
1214 | ||
098cc8f0 | 1215 | 2019-01-17 David Malcolm <dmalcolm@redhat.com> |
1216 | ||
1217 | PR c++/88699 | |
1218 | * class.c (add_method): Don't use DECL_DESTRUCTOR_P on | |
1219 | USING_DECLs. | |
1220 | ||
a395125a | 1221 | 2019-01-17 Nathan Sidwell <nathan@acm.org> |
1222 | ||
1223 | PR c++/86610 | |
1224 | * semantics.c (process_outer_var_ref): Only skip dependent types | |
1225 | in templates. | |
1226 | ||
5461905d | 1227 | 2019-01-17 Alexandre Oliva <aoliva@redhat.com> |
1228 | ||
c5f929a4 | 1229 | PR c++/87768 |
1230 | * cp-tree.h (saved_scope): Add suppress_location_wrappers. | |
1231 | * name-lookup.c (do_push_to_top_level): Save and reset it. | |
1232 | (do_pop_from_top_level): Restore it. | |
1233 | ||
f97941b7 | 1234 | PR c++/86648 |
1235 | * pt.c (make_template_placeholder): Use auto_identifier. | |
1236 | (is_auto): Drop CLASS_PLACEHOLDER_TEMPLATE test. | |
1237 | * error.c (dump_type): Handle template placeholders. | |
1238 | * cxx-pretty-print.c (pp_cx_unqualified_id): Likewise. | |
1239 | ||
5461905d | 1240 | PR c++/88146 |
1241 | * cvt.c (convert_to_void): Handle all cdtor calls as if | |
1242 | returning void. | |
1243 | ||
b92cc3ed | 1244 | 2019-01-16 Paolo Carlini <paolo.carlini@oracle.com> |
1245 | ||
1246 | * decl.c (grokdeclarator): Use locations[ds_storage_class] in | |
1247 | error messages about ill-formed uses of mutable. | |
1248 | ||
9fc2172c | 1249 | 2019-01-16 Marek Polacek <polacek@redhat.com> |
1250 | ||
1251 | PR c++/78244 - narrowing conversion in template not detected. | |
1252 | * call.c (perform_implicit_conversion_flags): Set | |
1253 | IMPLICIT_CONV_EXPR_BRACED_INIT. | |
1254 | * cp-tree.h (IMPLICIT_CONV_EXPR_BRACED_INIT): New. | |
1255 | * pt.c (tsubst_copy_and_build): Use it. | |
1256 | ||
727d210b | 1257 | 2019-01-15 David Malcolm <dmalcolm@redhat.com> |
1258 | ||
1259 | PR c++/88795 | |
1260 | * pt.c (build_deduction_guide): Bail out if tsubst_arg_types | |
1261 | fails. | |
1262 | ||
39a51021 | 1263 | 2019-01-15 Paolo Carlini <paolo.carlini@oracle.com> |
1264 | ||
1265 | * decl.c (start_decl): Improve error location. | |
1266 | * decl2.c (grokfield): Likewise. | |
1267 | ||
1268 | 2019-01-15 Paolo Carlini <paolo.carlini@oracle.com> | |
1269 | ||
1270 | * decl.c (grokdeclarator): Move further up the location_t loc | |
1271 | declaration and use the location when building a TYPE_DECL for | |
1272 | a typedef name. | |
1273 | * decl2.c (grokbitfield): Use DECL_SOURCE_LOCATION in the error | |
1274 | about an ill-formed bit-field as typedef. | |
1275 | ||
affca1c8 | 1276 | 2019-01-14 Marek Polacek <polacek@redhat.com> |
1277 | ||
1278 | PR c++/88830 - ICE with abstract class. | |
1279 | * decl2.c (maybe_emit_vtables): Check CLASSTYPE_LAZY_DESTRUCTOR. | |
1280 | Fix formatting. | |
1281 | ||
9f8a8956 | 1282 | PR c++/88825 - ICE with bogus function return type deduction. |
1283 | * typeck.c (can_do_nrvo_p): Check error_mark_node. | |
1284 | ||
82362779 | 1285 | 2019-01-14 Tom Honermann <tom@honermann.net> |
1286 | ||
1287 | Implement P0482R5, char8_t: A type for UTF-8 characters and strings | |
1288 | * cvt.c (type_promotes_to): Handle char8_t promotion. | |
1289 | * decl.c (grokdeclarator): Handle invalid type specifier | |
1290 | combinations involving char8_t. | |
1291 | * lex.c (init_reswords): Add char8_t as a reserved word. | |
1292 | * mangle.c (write_builtin_type): Add name mangling for char8_t (Du). | |
1293 | * parser.c (cp_keyword_starts_decl_specifier_p) | |
1294 | (cp_parser_simple_type_specifier): Recognize char8_t as a simple | |
1295 | type specifier. | |
1296 | (cp_parser_string_literal): Use char8_array_type_node for the type | |
1297 | of CPP_UTF8STRING. | |
1298 | (cp_parser_set_decl_spec_type): Tolerate char8_t typedefs in system | |
1299 | headers. | |
1300 | * rtti.c (emit_support_tinfos): type_info support for char8_t. | |
1301 | * tree.c (char_type_p): Recognize char8_t as a character type. | |
1302 | * typeck.c (string_conv_p): Handle conversions of u8 string | |
1303 | literals of char8_t type. | |
1304 | (check_literal_operator_args): Handle UDLs with u8 string literals | |
1305 | of char8_t type. | |
1306 | * typeck2.c (ordinary_char_type_p): New. | |
1307 | (digest_init_r): Disallow initializing a char array with a u8 string | |
1308 | literal. | |
1309 | ||
bf4eb32b | 1310 | 2019-01-14 Martin Liska <mliska@suse.cz> |
1311 | ||
1312 | PR gcov-profile/88263 | |
1313 | * decl2.c (get_tls_wrapper_fn): Use DECL_SOURCE_LOCATION | |
1314 | as location of the TLS wrapper. | |
1315 | ||
2fa582a9 | 1316 | 2019-01-12 Paolo Carlini <paolo.carlini@oracle.com> |
1317 | ||
1318 | * decl.c (cp_finish_decl): Improve error location. | |
1319 | * decl2.c (grokfield): Likewise, improve two locations. | |
1320 | ||
0b5957b9 | 1321 | 2019-01-11 Marek Polacek <polacek@redhat.com> |
1322 | ||
1323 | PR c++/88692, c++/87882 - -Wredundant-move false positive with *this. | |
1324 | * typeck.c (maybe_warn_pessimizing_move): Return if ARG isn't | |
1325 | ADDR_EXPR. | |
1326 | ||
d07c152b | 1327 | 2019-01-11 Jason Merrill <jason@redhat.com> |
1328 | ||
1329 | PR c++/88312 - pack expansion of decltype. | |
1330 | * pt.c (instantiation_dependent_r): A template non-type parameter | |
1331 | pack is instantiation-dependent. | |
1332 | ||
0c2ebbc4 | 1333 | 2019-01-11 Jason Merrill <jason@redhat.com> |
1334 | ||
1335 | PR c++/88613 - ICE with use of const var in lambda. | |
1336 | * expr.c (mark_use): Fix location wrapper handling. | |
1337 | * cp-gimplify.c (cp_fold_maybe_rvalue): Call mark_rvalue_use. | |
1338 | ||
1b2f170e | 1339 | 2019-01-11 Tobias Burnus <burnus@net-b.de> |
1340 | ||
1341 | PR C++/88114 | |
1342 | * decl2.c (maybe_emit_vtables): If needed, generate code for | |
1343 | the destructor of an abstract class. | |
1344 | (mark_used): Update comment for older function-name change. | |
1345 | ||
b385e516 | 1346 | 2019-01-11 Paolo Carlini <paolo.carlini@oracle.com> |
1347 | ||
1348 | * decl.c (start_decl): Improve error location. | |
1349 | (grokdeclarator): Likewise, improve two locations. | |
1350 | ||
f4d3c071 | 1351 | 2019-01-09 Sandra Loosemore <sandra@codesourcery.com> |
1352 | ||
1353 | PR other/16615 | |
1354 | ||
1355 | * cp-tree.h: Mechanically replace "can not" with "cannot". | |
1356 | * parser.c: Likewise. | |
1357 | * pt.c: Likewise. | |
1358 | ||
7cc45975 | 1359 | 2019-01-08 Paolo Carlini <paolo.carlini@oracle.com> |
1360 | ||
1361 | * decl.c (grok_reference_init): Improve error location. | |
1362 | (grokdeclarator): Likewise, improve two locations. | |
1363 | ||
90e20c9c | 1364 | 2019-01-08 Marek Polacek <polacek@redhat.com> |
1365 | ||
91902bb4 | 1366 | PR c++/88538 - braced-init-list in template-argument-list. |
1367 | * parser.c (cp_parser_template_argument): Handle braced-init-list when | |
1368 | in C++20. | |
1369 | ||
90e20c9c | 1370 | PR c++/88548 - this accepted in static member functions. |
1371 | * parser.c (cp_debug_parser): Adjust printing of | |
1372 | local_variables_forbidden_p. | |
1373 | (cp_parser_new): Set local_variables_forbidden_p to 0 rather than false. | |
1374 | (cp_parser_primary_expression): When checking | |
1375 | local_variables_forbidden_p, use THIS_FORBIDDEN or | |
1376 | LOCAL_VARS_FORBIDDEN. | |
1377 | (cp_parser_lambda_body): Update the type of | |
1378 | local_variables_forbidden_p. Set it to 0 rather than false. | |
1379 | (cp_parser_condition): Adjust call to cp_parser_declarator. | |
1380 | (cp_parser_explicit_instantiation): Likewise. | |
1381 | (cp_parser_init_declarator): Likewise. | |
1382 | (cp_parser_declarator): New parameter. Use it. | |
1383 | (cp_parser_direct_declarator): New parameter. Use it to set | |
1384 | local_variables_forbidden_p. Adjust call to cp_parser_declarator. | |
1385 | (cp_parser_type_id_1): Adjust call to cp_parser_declarator. | |
1386 | (cp_parser_parameter_declaration): Likewise. | |
1387 | (cp_parser_default_argument): Update the type of | |
1388 | local_variables_forbidden_p. Set it to LOCAL_VARS_AND_THIS_FORBIDDEN | |
1389 | rather than true. | |
1390 | (cp_parser_member_declaration): Tell cp_parser_declarator if we saw | |
1391 | 'static' or 'friend'. | |
1392 | (cp_parser_exception_declaration): Adjust call to cp_parser_declarator. | |
1393 | (cp_parser_late_parsing_default_args): Update the type of | |
1394 | local_variables_forbidden_p. Set it to LOCAL_VARS_AND_THIS_FORBIDDEN | |
1395 | rather than true. | |
1396 | (cp_parser_cache_defarg): Adjust call to cp_parser_declarator. | |
1397 | (cp_parser_objc_class_ivars): Likewise. | |
1398 | (cp_parser_objc_struct_declaration): Likewise. | |
1399 | (cp_parser_omp_for_loop_init): Likewise. | |
1400 | * parser.h (cp_parser): Change the type of local_variables_forbidden_p | |
1401 | to unsigned char. | |
1402 | (LOCAL_VARS_FORBIDDEN, LOCAL_VARS_AND_THIS_FORBIDDEN, THIS_FORBIDDEN): | |
1403 | Define. | |
1404 | ||
8f7d5246 | 1405 | 2019-01-08 Paolo Carlini <paolo.carlini@oracle.com> |
1406 | ||
1407 | * decl.c (start_decl): Improve permerror location. | |
1408 | ||
6e5908c9 | 1409 | 2019-01-08 Jonathan Wakely <jwakely@redhat.com> |
1410 | Jakub Jelinek <jakub@redhat.com> | |
1411 | ||
1412 | PR c++/88554 | |
1413 | * decl.c (finish_function): For -Wreturn-type don't add a return *this; | |
1414 | fixit hint if current_class_ref is NULL. Use a single if instead of | |
1415 | two nested ones. | |
1416 | ||
2318c037 | 1417 | 2019-01-07 Paolo Carlini <paolo.carlini@oracle.com> |
1418 | ||
1419 | * decl.c (start_decl): Improve two error_at locations. | |
1420 | (expand_static_init): Likewise. | |
1421 | ||
677576f7 | 1422 | 2019-01-07 Marek Polacek <polacek@redhat.com> |
1423 | ||
1424 | PR c++/88741 - wrong error with initializer-string. | |
1425 | * decl.c (cp_complete_array_type): Strip any location wrappers. | |
1426 | ||
c38103e8 | 1427 | 2019-01-07 Bernd Edlinger <bernd.edlinger@hotmail.de> |
1428 | ||
1429 | PR c++/88261 | |
1430 | PR c++/69338 | |
1431 | PR c++/69696 | |
1432 | PR c++/69697 | |
1433 | * cp-tree.h (LOOKUP_ALLOW_FLEXARRAY_INIT): New flag value. | |
1434 | * typeck2.c (digest_init_r): Raise an error for non-static | |
1435 | initialization of a flexible array member. | |
1436 | (process_init_constructor, massage_init_elt, | |
1437 | process_init_constructor_array, process_init_constructor_record, | |
1438 | process_init_constructor_union, process_init_constructor): Add the | |
1439 | flags parameter and pass it thru. | |
1440 | (store_init_value): Pass LOOKUP_ALLOW_FLEXARRAY_INIT parameter to | |
1441 | digest_init_flags for static decls. | |
1442 | ||
59409f09 | 1443 | 2019-01-07 Jakub Jelinek <jakub@redhat.com> |
1444 | ||
1445 | PR c++/85052 | |
1446 | * cp-tree.h (cp_build_vec_convert): Declare. | |
1447 | * parser.c (cp_parser_postfix_expression): Parse | |
1448 | __builtin_convertvector. | |
1449 | * constexpr.c: Include fold-const-call.h. | |
1450 | (cxx_eval_internal_function): Handle IFN_VEC_CONVERT. | |
1451 | (potential_constant_expression_1): Likewise. | |
1452 | * semantics.c (cp_build_vec_convert): New function. | |
1453 | * pt.c (tsubst_copy_and_build): Handle CALL_EXPR to | |
1454 | IFN_VEC_CONVERT. | |
1455 | ||
0627c5c9 | 1456 | 2019-01-03 Jakub Jelinek <jakub@redhat.com> |
1457 | ||
1458 | PR c++/88636 | |
1459 | * decl.c (builtin_function_1): Return result of pushdecl_top_level | |
1460 | or pushdecl rather than decl. | |
1461 | ||
f9f7d90c | 1462 | 2019-01-03 Paolo Carlini <paolo.carlini@oracle.com> |
1463 | ||
1464 | * tree.c (handle_nodiscard_attribute): Improve warning location. | |
1465 | ||
37fb9cf6 | 1466 | 2019-01-02 Marek Polacek <polacek@redhat.com> |
1467 | ||
1468 | PR c++/88612 - ICE with -Waddress-of-packed-member. | |
1469 | * call.c (convert_for_arg_passing): Only give warnings with tf_warning. | |
1470 | * typeck.c (convert_for_assignment): Likewise. | |
1471 | ||
6080dd2f | 1472 | PR c++/88631 - CTAD failing for value-initialization. |
1473 | * typeck2.c (build_functional_cast): Try deducing the template | |
1474 | arguments even if there are no arguments to deduce from. | |
1475 | ||
fbd26352 | 1476 | 2019-01-01 Jakub Jelinek <jakub@redhat.com> |
ca29c574 | 1477 | |
8e8f6434 | 1478 | Update copyright years. |
7dfbd804 | 1479 | \f |
fbd26352 | 1480 | Copyright (C) 2019 Free Software Foundation, Inc. |
7dfbd804 | 1481 | |
1482 | Copying and distribution of this file, with or without modification, | |
1483 | are permitted in any medium without royalty provided the copyright | |
1484 | notice and this notice are preserved. |