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