]>
Commit | Line | Data |
---|---|---|
af63ba4b JM |
1 | 2016-09-09 Jason Merrill <jason@redhat.com> |
2 | ||
3 | Implement P0035R4, C++17 new of over-aligned types. | |
4 | * cp-tree.h (enum cp_tree_index): Add CPTI_ALIGN_TYPE. | |
5 | (align_type_node): New macro. | |
6 | * call.c (build_operator_new_call): Handle C++17 aligned new. | |
7 | (second_parm_is_size_t, build_op_delete_call): Likewise. | |
8 | (non_placement_deallocation_fn_p): Likewise. Rename to | |
9 | usual_deallocation_fn_p. | |
10 | (aligned_allocation_fn_p, aligned_deallocation_fn_p): New. | |
11 | * decl.c (cxx_init_decl_processing): Add aligned new support. | |
12 | * init.c (type_has_new_extended_alignment): New. | |
13 | (build_new_1): Handle aligned new. | |
14 | * tree.c (vec_copy_and_insert): New. | |
15 | ||
94087e88 JJ |
16 | 2016-09-02 Jakub Jelinek <jakub@redhat.com> |
17 | ||
18 | PR sanitizer/77396 | |
19 | * decl2.c (do_static_initialization_or_destruction): Only | |
20 | call asan_dynamic_init_call if INITP is true. | |
21 | ||
22 | 2016-09-01 Martin Sebor <msebor@redhat.com> | |
3d7b83b6 MS |
23 | |
24 | * mangle.c: Increase buffer size to guarantee it fits the output | |
25 | of the formatted function regardless of its arguments. | |
26 | ||
295844f6 MP |
27 | 2016-09-01 Marek Polacek <polacek@redhat.com> |
28 | ||
29 | PR c/7652 | |
30 | * error.c (dump_type): Fix falls through comment. | |
31 | (dump_decl): Likewise. | |
32 | (dump_expr): Likewise. | |
33 | ||
71b30891 DM |
34 | 2016-08-30 David Malcolm <dmalcolm@redhat.com> |
35 | ||
36 | * parser.c (cp_parser_enclosed_template_argument_list): Add fix-it | |
37 | hint to ">>" within nested template argument list error. | |
38 | ||
f9087798 DM |
39 | 2016-08-30 David Malcolm <dmalcolm@redhat.com> |
40 | ||
41 | * name-lookup.c (suggest_alternatives_for): Use add_fixit_replace | |
42 | rather than add_fixit_misspelled_id. | |
43 | * parser.c (cp_parser_diagnose_invalid_type_name): Likewise. | |
44 | ||
328eae1c JM |
45 | 2016-08-29 Jason Merrill <jason@redhat.com> |
46 | ||
47 | PR c++/77379 | |
48 | * mangle.c (maybe_check_abi_tags): Add version parm, handle thunks. | |
49 | (mangle_thunk): Add thunk parameter. | |
50 | * method.c (finish_thunk): Pass it. | |
51 | * cp-tree.h: Declare it. | |
52 | ||
9729a5d5 JM |
53 | 2016-08-15 Jason Merrill <jason@redhat.com> |
54 | ||
d0b0fbd9 JM |
55 | Avoid calling a trivial default constructor. |
56 | * class.c (default_ctor_p): New. | |
57 | (in_class_defaulted_default_constructor): Use it. | |
58 | (type_has_non_user_provided_default_constructor): Use it. | |
59 | * call.c (build_over_call): Handle trivial default constructor. | |
60 | * cp-tree.h: Declare default_ctor_p. | |
61 | ||
9729a5d5 JM |
62 | PR c++/57728 |
63 | * pt.c (do_type_instantiation): Don't mess with non-user-provided | |
64 | member functions. | |
65 | ||
ebef225f MP |
66 | 2016-08-25 Marek Polacek <polacek@redhat.com> |
67 | ||
68 | * parser.c (cp_parser_binary_expression): Pass LHS to | |
69 | warn_logical_not_parentheses. | |
70 | ||
9c62c873 MP |
71 | 2016-08-18 Marek Polacek <polacek@redhat.com> |
72 | ||
73 | PR c/7652 | |
74 | * call.c (add_builtin_candidate): Add gcc_fallthrough. | |
75 | * cxx-pretty-print.c (pp_cxx_unqualified_id): Likewise. | |
76 | * parser.c (cp_parser_skip_to_end_of_statement): Likewise. | |
77 | (cp_parser_cache_defarg): Likewise. | |
78 | ||
191816a3 MP |
79 | 2016-08-12 Marek Polacek <polacek@redhat.com> |
80 | ||
81 | PR c/7652 | |
82 | * call.c (add_builtin_candidate): Add FALLTHRU. | |
83 | (build_integral_nontype_arg_conv): Adjust fall through comment. | |
84 | (build_new_op_1): Add FALLTHRU. | |
85 | (convert_like_real): Adjust fall through comment. | |
86 | * class.c (fixed_type_or_null): Likewise. | |
87 | * constexpr.c (cxx_eval_constant_expression): Likewise. | |
88 | (potential_constant_expression_1): Likewise. Add FALLTHRU. | |
89 | * cp-gimplify.c (cp_gimplify_expr): Adjust fall through comment. | |
90 | (cp_fold): Add FALLTHRU. | |
91 | * cvt.c (build_expr_type_conversion): Adjust fall through comment. | |
92 | * cxx-pretty-print.c (pp_cxx_unqualified_id): Add FALLTHRU. | |
93 | (pp_cxx_qualified_id): Likewise. | |
94 | (cxx_pretty_printer::constant): Adjust fall through comment. | |
95 | (cxx_pretty_printer::primary_expression): Add FALLTHRU. | |
96 | (pp_cxx_pm_expression): Adjust fall through comment. | |
97 | (cxx_pretty_printer::expression): Add FALLTHRU. | |
98 | (cxx_pretty_printer::declaration_specifiers): Reformat code. | |
99 | (pp_cxx_type_specifier_seq): Adjust fall through comment. | |
100 | (pp_cxx_ptr_operator): Likewise. Add FALLTHRU. | |
101 | * error.c (dump_type): Adjust fall through comment. | |
102 | (dump_decl): Likewise. | |
103 | * mangle.c (write_type): Likewise. | |
104 | * method.c (synthesized_method_walk): Add FALLTHRU. | |
105 | * name-lookup.c (arg_assoc_type): Likewise. | |
106 | * parser.c (cp_lexer_print_token): Adjust fall through comment. | |
107 | (cp_parser_primary_expression): Add FALLTHRU. | |
108 | (cp_parser_operator): Likewise. | |
109 | * pt.c (find_parameter_packs_r): Likewise. | |
110 | (tsubst_aggr_type): Adjust fall through comment. | |
111 | * semantics.c (finish_omp_clauses): Add FALLTHRU. | |
112 | * tree.c (lvalue_kind): Likewise. | |
113 | ||
3f8257db | 114 | 2016-08-12 Alexandre Oliva <aoliva@redhat.com> |
e366d7d8 AO |
115 | |
116 | PR debug/63240 | |
117 | * cp-objcp-common.c (cp_function_decl_defaulted): New. | |
118 | (cp_function_decl_explicit_p): Const_tree-ify. | |
119 | (cp_function_decl_deleted_p): Likewise. | |
120 | * cp-objcp-common.h (cp_function_decl_defaulted): Declare. | |
121 | (cp_function_decl_explicit_p): Const_tree-ify. | |
122 | (cp_function_decl_deleted_p): Likewise. | |
123 | (LANG_HOOKS_FUNCTION_DECL_DEFAULTED): Redefine. | |
124 | ||
385ed708 JJ |
125 | 2016-08-11 Jakub Jelinek <jakub@redhat.com> |
126 | ||
127 | PR c++/72868 | |
128 | * constexpr.c (label_matches): Handle case range expressions. | |
129 | ||
4200a723 JM |
130 | 2016-08-11 Jason Merrill <jason@redhat.com> |
131 | ||
132 | PR c++/73456 | |
133 | * logic.cc (non_atomic_constraint_p): Handle EXPR_PACK_EXPANSION. | |
134 | ||
99f9d4b1 JM |
135 | 2016-08-10 Jason Merrill <jason@redhat.com> |
136 | ||
137 | Implement C++17 constexpr if. | |
138 | * cp-tree.h (IF_STMT_CONSTEXPR_P): New. | |
139 | * name-lookup.c (push_to_top_level, pop_from_top_level_1): Handle it. | |
140 | * parser.h (struct cp_parser): Add in_discarded_stmt field. | |
141 | * parser.c (cp_parser_selection_statement): Handle 'if constexpr'. | |
142 | (cp_parser_jump_statement): Avoid deducing from a discarded return. | |
143 | * pt.c (tsubst_expr): Only instantiate taken branch of constexpr if. | |
144 | * semantics.c (begin_if_stmt): Set the binding level this_entity. | |
145 | (finish_if_stmt_cond): Require the condition of a | |
146 | constexpr if to be constant. | |
147 | * decl.c (level_for_constexpr_if): New. | |
148 | (named_label_entry): Add in_constexpr_if field. | |
149 | (poplevel_named_label_1): Set it. | |
150 | (check_goto): Check it. | |
151 | (check_previous_goto_1): Check level_for_constexpr_if. | |
152 | ||
23f4e590 JM |
153 | 2016-08-09 Jason Merrill <jason@redhat.com> |
154 | ||
f3365c12 JM |
155 | PR c++/68703 |
156 | * decl2.c (any_dependent_type_attributes_p): New. | |
157 | * pt.c (dependent_type_p_r, type_dependent_expression_p): Check it. | |
158 | * semantics.c (finish_id_expression): Check it. | |
159 | * typeck.c (finish_class_member_access_expr): Check it. | |
160 | ||
d676d623 JM |
161 | PR c++/71712 |
162 | * class.c (check_abi_tags): Don't duplicate tags for conversion ops. | |
163 | ||
7ab8c647 JM |
164 | Adjust mangling of ABI tags on class template member functions. |
165 | * class.c (missing_abi_tags): New. | |
166 | (check_abi_tags): Don't check template. Add just_checking mode. | |
167 | * mangle.c (abi_flag_at_least, any_abi_below, equal_abi_tags): New. | |
168 | (sorted_abi_tags): Split out from write_abi_tags. | |
169 | (struct releasing_vec): New. | |
170 | (write_unqualified_name): Only look for the primary | |
171 | template for types. Implement backward compatibility. | |
172 | ||
f4fce183 JM |
173 | PR c++/72849 |
174 | * constexpr.c (cxx_eval_constant_expression): Check | |
175 | COMPLETE_TYPE_P before calling is_really_empty_class. | |
176 | * class.c (is_really_empty_class): Don't call complete_type. | |
177 | ||
23f4e590 JM |
178 | PR c++/56701 |
179 | * typeck.c (cp_build_addr_expr_1): Remove special *this handling. | |
180 | ||
cadec7ca JJ |
181 | 2016-08-09 Jakub Jelinek <jakub@redhat.com> |
182 | ||
183 | PR c++/72809 | |
184 | * rtti.c (get_pseudo_ti_index): Return TK_CLASS_TYPE for | |
185 | builtin aggregate types without TYPE_BINFO. | |
186 | ||
98e5a19a JM |
187 | 2016-08-08 Jason Merrill <jason@redhat.com> |
188 | ||
189 | Implement C++17 constexpr lambda. | |
190 | * class.c (finalize_literal_type_property): Handle lambdas. | |
191 | * constexpr.c (is_valid_constexpr_fn): Likewise. No longer static. | |
192 | (explain_invalid_constexpr_fn, cxx_eval_call_expression): Handle | |
193 | lambdas. | |
194 | (cxx_eval_constant_expression): Handle capture proxy. | |
195 | (var_in_constexpr_fn): Don't check for C++14. | |
196 | (var_in_maybe_constexpr_fn): New. | |
197 | (potential_constant_expression_1): Use it. Check DECL_EXPR for | |
198 | declarations not allowed in constexpr function. Handle | |
199 | STATIC_ASSERT, RANGE_FOR_STMT. | |
200 | * decl.c (make_rtl_for_nonlocal_decl): Use var_in_maybe_constexpr_fn. | |
201 | (finish_function): Set DECL_DECLARED_CONSTEXPR_P on lambda members. | |
202 | * lambda.c (begin_lambda_type): Set CLASSTYPE_LITERAL_P. | |
203 | (maybe_add_lambda_conv_op): Clear thunk CALL_EXPR location. | |
204 | (lambda_static_thunk_p): New. | |
205 | * parser.c (cp_keyword_starts_decl_specifier_p): Add RID_CONSTEXPR. | |
206 | (CP_PARSER_FLAGS_ONLY_MUTABLE_OR_CONSTEXPR): New enumerator. | |
207 | (cp_parser_decl_specifier_seq): Handle it. | |
208 | (cp_parser_lambda_declarator_opt): Use cp_parser_decl_specifier_seq. | |
209 | * pt.c (instantiate_class_template_1): Set CLASSTYPE_LITERAL_P. | |
210 | (tsubst_copy_and_build) [CALL_EXPR]: Propagate CALL_FROM_THUNK_P. | |
211 | * error.c (dump_function_decl): Check TFF_NO_TEMPLATE_BINDINGS. | |
212 | (dump_expr) [FUNCTION_DECL]: Pass it. | |
213 | ||
7dc2b4a2 JM |
214 | 2016-08-08 Jason Merrill <jason@redhat.com> |
215 | ||
216 | PR c++/67131 | |
217 | * class.c (is_really_empty_class): Call complete_type. | |
218 | * constexpr.c (cxx_eval_constant_expression): Check | |
219 | is_really_empty_class. | |
220 | (potential_constant_expression_1): Likewise. Check for error type. | |
221 | ||
5c934396 JJ |
222 | 2016-08-08 Jakub Jelinek <jakub@redhat.com> |
223 | ||
224 | PR c++/58706 | |
225 | * parser.c: Include tree-iterator.h. | |
226 | (cp_parser_omp_for_loop_init): Move lambda DECL_EXPRs from init | |
227 | to FOR_BLOCK. | |
228 | (cp_parser_omp_for_loop): Handle non-STATEMENT_LIST FOR_BLOCK | |
229 | entries. | |
230 | ||
fa76f2c6 JW |
231 | 2016-08-06 Jonathan Wakely <jwakely@redhat.com> |
232 | ||
233 | * call.c (convert_like_real): Harmonize diagnostics for invalid | |
234 | reference binding. | |
235 | ||
5c934396 | 236 | 2016-08-05 Martin Sebor <msebor@redhat.com> |
64d6d399 MS |
237 | |
238 | * constexpr.c (cxx_eval_store_expression): Remove hyphen from | |
239 | the spelling of "constant-expression" in diagnostic messages | |
240 | for consistency. | |
241 | (cxx_eval_constant_expression): Same. | |
242 | (cxx_eval_outermost_constant_expr): Same. | |
243 | (potential_constant_expression_1): Same. | |
244 | ||
4228ca19 NS |
245 | 2016-08-05 Nathan Sidwell <nathan@acm.org> |
246 | ||
247 | PR c++/68724 | |
248 | * pt.c (unify): TRAIT_EXPR is an expr. | |
249 | ||
4473482d PC |
250 | 2016-08-04 Paolo Carlini <paolo.carlini@oracle.com> |
251 | ||
252 | PR c++/72800 | |
253 | * lambda.c (add_capture): Check lambda_capture_field_type return | |
254 | value for error_mark_node. | |
255 | ||
08156df5 PP |
256 | 2016-08-04 Patrick Palka <ppalka@gcc.gnu.org> |
257 | ||
258 | PR c++/72759 | |
259 | * pt.c (tsubst_qualified_id): Return error_mark_node if | |
260 | template_args is error_mark_node. | |
261 | ||
99676625 JM |
262 | 2016-08-04 Jason Merrill <jason@redhat.com> |
263 | ||
b9dc9ef6 JM |
264 | PR c++/72415 |
265 | * pt.c (tsubst_pack_expansion): Pull a single pack expansion out | |
266 | of the TREE_VEC. | |
267 | ||
6a7b9203 JM |
268 | * cp-tree.h (TYPE_UNNAMED_P): Rename from TYPE_ANONYMOUS_P. |
269 | (TYPE_WAS_UNNAMED): Rename from TYPE_WAS_ANONYMOUS. | |
270 | * class.c, decl.c, decl2.c, error.c, lambda.c, mangle.c, | |
271 | name-lookup.c, parser.c, pt.c, semantics.c, tree.c: Adjust. | |
272 | ||
99676625 JM |
273 | PR c++/72796 |
274 | * typeck.c (finish_class_member_access_expr): Avoid stripping | |
275 | SCOPE_REF to dependent base. | |
276 | ||
0b212d8c TS |
277 | 2016-08-04 Thomas Schwinge <thomas@codesourcery.com> |
278 | ||
ae9281fc TS |
279 | * parser.c (cp_ensure_no_oacc_routine): Improve diagnostics. |
280 | (cp_parser_late_parsing_cilk_simd_fn_info): Fix diagnostics. | |
281 | (cp_parser_late_parsing_oacc_routine, cp_finalize_oacc_routine): | |
282 | Simplify code, and improve diagnostics. | |
283 | (cp_parser_oacc_routine): Likewise. Move pragma context | |
284 | checking... | |
285 | (cp_parser_pragma): ... here. | |
286 | ||
0b212d8c TS |
287 | * parser.h (struct cp_omp_declare_simd_data): New. |
288 | (struct cp_parser): Use it for oacc_routine member. | |
289 | * parser.c (cp_ensure_no_oacc_routine, cp_parser_oacc_routine) | |
290 | (cp_parser_late_parsing_oacc_routine, cp_finalize_oacc_routine): | |
291 | Use it. Simplify code. | |
292 | (cp_parser_new): Initialize all members pointing to special | |
293 | parsing data structures. | |
294 | (cp_parser_cilk_simd_fn_vector_attrs): Initialize | |
295 | parser->cilk_simd_fn_info->clauses. | |
296 | (cp_parser_omp_declare_simd): Initialize | |
297 | parser->omp_declare_simd->clauses. | |
298 | (cp_parser_late_parsing_omp_declare_simd): Simplify code. | |
299 | ||
a0008434 MP |
300 | 2016-08-04 Marek Polacek <polacek@redhat.com> |
301 | ||
302 | PR c++/70229 | |
303 | * constexpr.c (check_constexpr_ctor_body_1): Allow typedef | |
304 | declarations. | |
305 | ||
1108a485 JM |
306 | 2016-08-01 Jason Merrill <jason@redhat.com> |
307 | ||
72a30e45 JM |
308 | * mangle.c (mangle_decl): Warn about mangled name change even if |
309 | DECL_REALLY_EXTERN. | |
310 | ||
884929e2 JM |
311 | * mangle.c (get_abi_tags): New. |
312 | (find_substitution, write_unqualified_name, write_abi_tags) | |
313 | (maybe_check_abi_tags): Use it. | |
314 | ||
352b8bab JM |
315 | * mangle.c (mangle_decl): Fix mangled name change warning. |
316 | ||
1108a485 JM |
317 | PR c++/72766 |
318 | * constexpr.c (cxx_eval_pointer_plus_expression): Check constancy | |
319 | of nelts. | |
320 | * cp-gimplify.c (cp_fully_fold): Only maybe_constant_value in | |
321 | C++11 and up. | |
322 | ||
94087e88 | 323 | 2016-07-30 Martin Sebor <msebor@redhat.com> |
8bada5cd MS |
324 | |
325 | PR c++/60760 | |
326 | PR c++/71091 | |
327 | * constexpr.c (cxx_eval_binary_expression): Reject invalid expressions | |
328 | involving null pointers. | |
329 | (cxx_eval_component_reference): Reject null pointer dereferences. | |
330 | (cxx_eval_indirect_ref): Reject indirecting through null pointers. | |
331 | (cxx_eval_constant_expression): Reject invalid expressions involving | |
332 | null pointers. | |
333 | ||
638fc14f MP |
334 | 2016-07-29 Marek Polacek <polacek@redhat.com> |
335 | ||
336 | PR c/71926 | |
337 | * semantics.c (maybe_convert_cond): Use the location of COND for the | |
338 | parentheses warning. | |
339 | ||
49b5925f JM |
340 | 2016-07-29 Jason Merrill <jason@redhat.com> |
341 | ||
201e6861 JM |
342 | * decl.c (build_enumerator): Tweak diagnostic. |
343 | ||
49b5925f JM |
344 | PR c++/72457 |
345 | * init.c (expand_aggr_init_1): Only handle value-init of bases. | |
346 | * constexpr.c (build_data_member_initialization): Handle multiple | |
347 | initializers for the same field. | |
348 | ||
f064da6a PC |
349 | 2016-07-28 Paolo Carlini <paolo.carlini@oracle.com> |
350 | ||
351 | PR c++/71665 | |
352 | * decl.c (build_enumerator): Check the type of the enumerator before | |
353 | calling cxx_constant_value. | |
354 | ||
270430ff JM |
355 | 2016-07-27 Jason Merrill <jason@redhat.com> |
356 | ||
357 | PR c++/71747 | |
358 | * pt.c (get_partial_spec_bindings): Replace tparms and spec_args | |
359 | parameters with spec_tmpl. Call push_tinst_level. | |
360 | (most_specialized_partial_spec): Adjust. | |
361 | (more_specialized_partial_spec): Adjust. | |
362 | ||
fd2bfee5 JM |
363 | 2016-07-25 Jason Merrill <jason@redhat.com> |
364 | ||
1509db23 JM |
365 | PR c++/65970 |
366 | * cp-gimplify.c (genericize_cp_loop): Revert location change. | |
367 | ||
47265942 JM |
368 | PR c++/71837 |
369 | * lambda.c (add_capture): Leave a pack expansion in a TREE_LIST. | |
370 | (build_lambda_object): Call build_x_compound_expr_from_list. | |
371 | * pt.c (tsubst) [DECLTYPE_TYPE]: Likewise. | |
372 | ||
fd8b207a JM |
373 | PR c++/71833 |
374 | PR c++/54440 | |
375 | * pt.c (coerce_template_parameter_pack): Fix logic for | |
376 | pack index. | |
377 | ||
5ec2cd9f JM |
378 | PR c++/65970 |
379 | * constexpr.c (cxx_eval_loop_expr): Count iterations. | |
380 | * cp-gimplify.c (genericize_cp_loop): Use start_locus even for | |
381 | infinite loops. | |
382 | ||
fd2bfee5 JM |
383 | PR c++/71972 |
384 | * constexpr.c (cxx_eval_array_reference): Handle looking for the | |
385 | value of an element we're currently modifying. | |
386 | ||
8a61db89 JM |
387 | 2016-07-24 Jason Merrill <jason@redhat.com> |
388 | ||
389 | PR c++/71515 | |
390 | * pt.c (resolve_typename_type): Try to avoid calling | |
391 | currently_open_class. | |
392 | ||
a6c690f4 JM |
393 | 2016-07-23 Jason Merrill <jason@redhat.com> |
394 | ||
bd84e560 JM |
395 | PR c++/66617 |
396 | * call.c (add_list_candidates): Handle VTT parm. | |
397 | (build_new_method_call_1): Likewise. | |
398 | ||
f388b7be JM |
399 | PR c++/55922 |
400 | PR c++/63151 | |
401 | * init.c (expand_aggr_init_1): Handle list-initialization from {}. | |
402 | ||
2dac37c0 JM |
403 | PR c++/70709 |
404 | * class.c (walk_subobject_offsets): Handle 0-length array. | |
405 | ||
71b3723a JM |
406 | PR c++/70778 |
407 | * pt.c (tsubst): Also substitute into the template of a | |
408 | BOUND_TEMPLATE_TEMPLATE_PARM. | |
409 | ||
6970223f JM |
410 | PR c++/71738 |
411 | * pt.c (lookup_template_class_1): Handle getting template from tsubst. | |
412 | ||
a6c690f4 JM |
413 | PR c++/71350 |
414 | * decl.c (reshape_init_r): Check complain for missing braces warning. | |
415 | ||
76178f67 JM |
416 | 2016-07-22 Jason Merrill <jason@redhat.com> |
417 | ||
478ed1fa JM |
418 | PR c++/71576 |
419 | * call.c (convert_like_real): Use lvalue_kind. | |
420 | ||
76178f67 JM |
421 | PR c++/71748 |
422 | PR c++/52746 | |
423 | * pt.c (tsubst_baselink): Call | |
424 | adjust_result_of_qualified_name_lookup for unqualified | |
425 | destructors. | |
426 | ||
d5ec842c JM |
427 | 2016-07-21 Jason Merrill <jason@redhat.com> |
428 | ||
6781e2af JM |
429 | PR c++/69223 |
430 | * semantics.c (apply_deduced_return_type): Call | |
431 | complete_type_or_else before building the new RESULT_DECL. | |
432 | ||
94ced5b4 JM |
433 | PR c++/71274 |
434 | * decl2.c (maybe_instantiate_decl): Split out from mark_used. | |
435 | (decl_constant_var_p): Use it instead. | |
436 | ||
44ed4754 JM |
437 | PR c++/71630 |
438 | * pt.c (instantiate_decl): Fix pattern_defined for namespace scope | |
439 | variable templates. | |
440 | ||
a93f3513 JM |
441 | PR c++/71913 |
442 | * call.c (unsafe_copy_elision_p): It's OK to elide when | |
443 | initializing an unknown object. | |
444 | ||
d5ec842c JM |
445 | * call.c (build_over_call): Check unsafe_copy_elision_p even for |
446 | trivial constructors. | |
447 | * method.c (do_build_copy_constructor): Don't copy tail padding | |
448 | even in a trivial constructor. | |
449 | ||
ab3af181 JJ |
450 | 2016-07-21 Jakub Jelinek <jakub@redhat.com> |
451 | ||
452 | PR c++/71728 | |
453 | * constexpr.c (potential_constant_expression_1) <case GOTO_EXPR>: | |
454 | Replace assert with test, return false if the goto isn't break | |
455 | or continue. Formatting fix. | |
456 | ||
01771d43 RB |
457 | 2016-07-21 Richard Biener <rguenther@suse.de> |
458 | ||
459 | * vtable-class-hierarchy.c (vtv_generate_init_routine): Set | |
460 | DECL_IGNORED_P. | |
461 | ||
ee78cbaa JJ |
462 | 2016-07-21 Jakub Jelinek <jakub@redhat.com> |
463 | ||
464 | PR c++/71941 | |
465 | * cp-gimplify.c (cp_genericize): For nested cp_genericize calls | |
466 | save/restore bc_label array. | |
467 | ||
e96fe88c JM |
468 | 2016-07-21 Jason Merrill <jason@redhat.com> |
469 | ||
172f0e13 JM |
470 | PR c++/70781 |
471 | * parser.c (cp_parser_lambda_expression): Unset OK if there was an | |
472 | error parsing the lambda-declarator. | |
473 | ||
dd5dda56 JM |
474 | PR c++/71896 |
475 | * constexpr.c (cxx_eval_binary_expression): Handle comparison | |
476 | between lowered and unlowered PTRMEM_CST. | |
477 | ||
451dcc66 JM |
478 | PR c++/65168 |
479 | * typeck.c (cp_truthvalue_conversion): Compare pointers to nullptr. | |
480 | Don't set c_inhibit_evaluation_warnings. | |
481 | ||
e96fe88c JM |
482 | PR c++/71121 |
483 | * cp-gimplify.c (cp_fully_fold): First call maybe_constant_value. | |
484 | ||
f078dc7d AS |
485 | 2016-07-21 Andrew Sutton <andrew.n.sutton@gmail.com> |
486 | Jason Merrill <jason@redhat.com> | |
487 | ||
488 | Improving concepts performance and diagnostics. | |
489 | PR c++/67565 | |
490 | PR c++/67579 | |
491 | PR c++/71843 | |
492 | * cp-tree.def (CHECK_CONSTR): New. | |
493 | * cp-tree.h (CHECK_CONSTR_CONCEPT): New. | |
494 | (CHECK_CONSTR_ARGS): New. | |
495 | * constraint.cc (make_predicate_constraint): Remove in favor of | |
496 | normalize_expression. | |
497 | (resolve_constraint_check): Actually return error_mark_node when | |
498 | resolution fails. | |
499 | (resolve_variable_concept_check): Perform coercion as if processing | |
500 | a template. Also return errors on resolution failure. | |
501 | (lift_*): Remove all of these functions. Don't unnecessarily inline | |
502 | concepts. | |
503 | (learn_*): Add facilities to memoize implications for subsumption | |
504 | during normalization. | |
505 | (expanding_concept): New. | |
506 | (expand_concept): New. Return the inlined and normalized definition | |
507 | of a concept when needed. | |
508 | (transform_*, xform_*): Rename to normalize_* to better reflect the | |
509 | responsibility of those functions. | |
510 | (normalize_template_id_expression): Check for non-boolean operands | |
511 | when possible. Generate check constraints instead of normal variable | |
512 | references. | |
513 | (normalize_call_expression): Report errors when resolution fails. | |
514 | (check_for_logical_overloads): Rewrite this check to more accurately | |
515 | report the error. | |
516 | (normalize_atom): Check for overloaded calls and invalid types before | |
517 | determining if the expression refers to a concept. | |
518 | (build_constraints): Don't cache normalized constraints or decomposed | |
519 | assumptions. | |
520 | (finish_shorthand_constraint): Return a normalized expression instead | |
521 | of a predicate constraint. | |
522 | (finish_template_introduction): Same. | |
523 | (placeholder_extract_concept_and_args): Rewrite this since we only | |
524 | ever get check constraints here. | |
525 | (equivalent_placeholder_constraints): Rewrite in terms of check | |
526 | constraints, and handle error_mark_nodes correctly. | |
527 | (tsubst_check_constraint, tsubst_expr_constr, tsubst_type_constr) | |
528 | (tsubst_implicit_conversion_constr) | |
529 | (tsubst_argument_deduction_constr, tsubst_exception_constr) | |
530 | (tsubst_parameterized_constraint, tsubst_constraint): New. | |
531 | (tsbust_conjunection): Replace with tsubst_logical_operator and | |
532 | actually generate the right kind of constraint. | |
533 | (tsubst_requirement_body): Reverse the order of substituted arguments | |
534 | so that they appear in the order written (helps diagnostics). | |
535 | (satisfy_check_constraint): New. | |
536 | (satisfy_conjunction): Simplify. | |
537 | (satisfy_disjunction): Same. | |
538 | (satisfy_constraint_1): Handle check constraints. | |
539 | (eval_constr): New (private) global state. | |
540 | (evaluating_constraints_sentinel): New. Manages eval_constr. | |
541 | (satisfy_constraint): Add timing variables. | |
542 | (satisfy_associated_constraints): Add hooks for memoization. | |
543 | (evaluate_function_concept): Build a check constraint instead of | |
544 | normalizing its definition. | |
545 | (evaluate_variable_concept): Same. | |
546 | (evaluate_constraint_expression): Normalize, but in the current | |
547 | declaration processing context. | |
548 | (evaluating_constraints_p): New. | |
549 | (elide_constraint_failure_p): Actually emit constraint_thresh errors. | |
550 | (diagnose_*): Remove artificial indentation. Add a new parameter to | |
551 | each that tracks the current (complete) constraint prior to any | |
552 | substitutions. | |
553 | (diagnose_expression): Removed. | |
554 | (diagnose_call_expression): Same. | |
555 | (diagnose_template_id): Same. | |
556 | (diagnose_template_id): New. | |
557 | (diagnose_logical_constraint): New. | |
558 | (diagnose_expression_constraint): Show the original expression. | |
559 | (diagnose_type_constraint): Show the original type. | |
560 | (diagnose_implicit_conversion_constraint): Be specific about | |
561 | failures, don't re-diagnose a known-to-be-failed substitutions, | |
562 | and manage elisions properly. | |
563 | (diagnose_argument_deduction_constraint): Same. | |
564 | (diagnose_exception_constraint): Same. | |
565 | (diagnose_parameterized_constraint): Same. | |
566 | (constraint_p): Allow EXPR_PACK_EXPANSION. | |
567 | * logic.cc (next_by_distance): Removed. No longer used. | |
568 | (any_p): Renamed from any_of. | |
569 | (term_entry, term_hasher): New. | |
570 | (term_list): Rewrite to include a hash table for quick lookup. | |
571 | Also, make less stateful. | |
572 | (proof_state): Extend to allow goals to be discharged once | |
573 | satisfied. | |
574 | (non_atomic_constraint_p): New. | |
575 | (any_non_atomic_constraints_p): New. | |
576 | (...rest...): Previous implementation completely replaced with an | |
577 | iterative algorithm that opportunistically prunes the search space | |
578 | before committing to using more memory. | |
579 | * parser.c: (cp_parser_type_parameter): Normalize constraints. | |
580 | (cp_parser_explicit_template_declaration): Same. | |
581 | * pt.c: (finish_template_variable): Be less redundant with this error | |
582 | message. | |
583 | (template_args_equal): No longer static. | |
584 | (tsubst_decl): Don't try to find specializations of variables that | |
585 | have already been instantiated. | |
586 | (build_non_dependent_expr): Avoid infinite recursion during concept | |
587 | expansion. | |
588 | (make_constrained_auto): Normalize constraints. | |
589 | (do_auto_deduction): When doing auto deduction from a | |
590 | partial-concept-id, be sure to include the explicit args checking | |
591 | the constraints. | |
592 | (constraint_sat_*): New. Memoize satisfied constraints. | |
593 | (concept_spec_*): New. Memoize expressions associated with a concept | |
594 | specialization. | |
595 | (constraint_memos, concept_memos): New. | |
596 | (lookup_constraint_satisfaction, memoize_constraint_satisfaction): New. | |
597 | (lookup_concept_satisfaction, memoize_concept_satisfaction): New. | |
598 | (get_concept_expansion, save_concept_expansion): New. | |
599 | (hash_subsumption_args): New. | |
600 | (comp_subsumption_args): New. | |
601 | (subsumption_*): New. Memoize parts of the subsumption relation. | |
602 | (lookup_subsumption_result, save_subsumption_result): New. | |
603 | (init_constraint_processing): Initialize memo tables. | |
604 | (get_constraints): Shortcut if !flag_concepts. | |
605 | * decl.c (grokfndecl): Normalize constraints. | |
606 | * error.c (dump_simple_decl): Print "concept" when appropriate. | |
607 | (dump_function_decl): Same. | |
608 | (dump_template_decl): Don't write requirements when we're not | |
609 | printing the header. | |
610 | (dump_expr): Handle fold expressions. | |
611 | * cxx-pretty-print.c (cxx_pretty_printer::expression): Handle | |
612 | fold expressions. | |
613 | (get_fold_operator): New. | |
614 | (pp_cxx_unary_left_fold_expression): New. | |
615 | (pp_cxx_unary_right_fold_expression): New. | |
616 | (pp_cxx_binary_fold_expression): New. | |
617 | (pp_cxx_check_constraint): New. | |
618 | (pp_cxx_*_constraint): Rewrite the grammar of internal constraints | |
619 | to make them easier to read when debugging. | |
620 | * search.c (accessible_p): Don't shortcut when evaluating constraints. | |
621 | * tree.c (cp_tree_equal): Handle CHECK_CONSTR. | |
622 | ||
52ed68f7 DM |
623 | 2016-07-20 David Malcolm <dmalcolm@redhat.com> |
624 | ||
625 | PR c/70339 | |
626 | PR c/71858 | |
627 | * name-lookup.c: Include gcc-rich-location.h, spellcheck-tree.h, | |
628 | and parser.h. | |
629 | (suggest_alternatives_for): If no candidates are found, try | |
630 | lookup_name_fuzzy and report if if finds a suggestion. | |
631 | (consider_binding_level): New function. | |
632 | (lookup_name_fuzzy) New function. | |
633 | * parser.c: Include gcc-rich-location.h. | |
634 | (cp_lexer_next_token_is_decl_specifier_keyword): Move most of | |
635 | logic into... | |
636 | (cp_keyword_starts_decl_specifier_p): ...this new function. | |
637 | (cp_parser_diagnose_invalid_type_name): When issuing | |
638 | "does not name a type" errors, attempt to make a suggestion using | |
639 | lookup_name_fuzzy. | |
640 | * parser.h (cp_keyword_starts_decl_specifier_p): New prototype. | |
641 | * search.c (lookup_field_fuzzy_info::fuzzy_lookup_field): Reject | |
642 | types that are not CLASS_TYPE_P, rather than rejecting individual | |
643 | tree codes. | |
644 | ||
109d2197 JJ |
645 | 2016-07-20 Jakub Jelinek <jakub@redhat.com> |
646 | ||
7419f441 JJ |
647 | PR c++/71909 |
648 | * parser.c (cp_parser_save_member_function_body): Consume | |
649 | __transaction_relaxed or __transaction_atomic with optional | |
650 | attribute. Only skip catch with block if try keyword is seen. | |
651 | ||
109d2197 JJ |
652 | PR c++/50060 |
653 | * constexpr.c (cxx_eval_builtin_function_call): Pass false as lval | |
654 | when evaluating call arguments. Use fold_builtin_call_array instead | |
655 | of fold_build_call_array_loc, return t if it returns NULL. Otherwise | |
656 | check the result with potential_constant_expression and call | |
657 | cxx_eval_constant_expression on it. | |
658 | ||
43694e8b JM |
659 | 2016-07-19 Jason Merrill <jason@redhat.com> |
660 | ||
661 | PR c++/67164 | |
662 | * pt.c (iterative_hash_template_arg, template_args_equal): Don't | |
663 | handle ARGUMENT_PACK_SELECT. | |
664 | ||
f2111a36 JJ |
665 | 2016-07-18 Jakub Jelinek <jakub@redhat.com> |
666 | ||
e43ebb12 JJ |
667 | PR c++/70869 |
668 | PR c++/71054 | |
669 | * cp-gimplify.c (cp_genericize_r): Revert the 2016-07-07 change. | |
670 | * tree.c (cp_walk_subtrees): For DECL_EXPR on DECL_ARTIFICIAL | |
671 | non-static VAR_DECL, walk the decl's DECL_INITIAL, DECL_SIZE and | |
672 | DECL_SIZE_UNIT. | |
673 | ||
99516432 JJ |
674 | PR c++/71835 |
675 | * call.c (build_op_call_1): Use convert_like_with_context only | |
676 | if cand->fn is a decl. | |
677 | ||
87713c6a JJ |
678 | PR c++/71828 |
679 | * constexpr.c (cxx_eval_constant_expression) <case REALPART_EXPR>: | |
680 | For lval don't use cxx_eval_unary_expression and instead recurse | |
681 | and if needed rebuild the reference. | |
682 | ||
7a7f16ca JJ |
683 | PR c++/71826 |
684 | * pt.c (tsubst_baselink): Only set BASELINK_OPTYPE for BASELINK_P. | |
685 | ||
f4d90295 JJ |
686 | PR c++/71822 |
687 | * cp-gimplify.c (cp_gimplify_expr) <case VEC_INIT_EXPR>: Recursively | |
688 | fold *expr_p before genericizing it. | |
689 | ||
f2111a36 JJ |
690 | PR c++/71871 |
691 | * typeck.c (build_x_conditional_expr): Revert the 2012-10-25 change. | |
692 | ||
d1dfa20d JM |
693 | 2016-07-15 Jason Merrill <jason@redhat.com> |
694 | ||
37a80bf9 JM |
695 | PR c++/71495 |
696 | * call.c (convert_like_real): Mask complain. | |
697 | * semantics.c (perform_koenig_lookup): Likewise. | |
698 | ||
de54de93 JM |
699 | PR c++/71092 |
700 | * constexpr.c (cxx_eval_call_expression): Fail quietly when cgraph | |
701 | threw away DECL_SAVED_TREE. | |
702 | ||
4d031550 JM |
703 | PR c++/71117 |
704 | Core 2189 | |
705 | * call.c (add_template_conv_candidate): Disable if there are | |
706 | viable candidates. | |
707 | ||
2a54351b JM |
708 | PR c++/71511 |
709 | * typeck2.c (cxx_incomplete_type_diagnostic): Handle DECLTYPE_TYPE. | |
710 | ||
1019d191 JM |
711 | PR c++/71513 |
712 | * pt.c (tsubst_attributes): Fix loop logic. | |
713 | ||
37a92c0c JM |
714 | PR c++/71604 |
715 | PR c++/54430 | |
716 | * parser.c (cp_parser_range_for): Modify IDENTIFIER_BINDING directly. | |
717 | (cp_parser_simple_declaration): Diagnose type definition in | |
718 | for-range-declaration. | |
719 | ||
aa30dfad JM |
720 | PR c++/71711 |
721 | * operators.def: Add *_FOLD_EXPR. | |
722 | * cp-tree.h (FOLD_EXPR_P): Parenthesize. | |
723 | * mangle.c (write_expression): Handle fold-expressions. | |
724 | * pt.c (tsubst_unary_left_fold, tsubst_binary_left_fold) | |
725 | (tsubst_unary_right_fold, tsubst_binary_right_fold): Handle | |
726 | partial instantiation. | |
727 | ||
34bbc4c5 JM |
728 | PR c++/71814 |
729 | * mangle.c (write_expression): Handle sizeof... an argument pack. | |
730 | ||
9ee2cecc JM |
731 | PR c++/71718 |
732 | * pt.c (push_tinst_level_loc): Set at_eof before fatal_error. | |
733 | ||
d1dfa20d JM |
734 | PR c++/70824 |
735 | * init.c (constant_value_1): Don't instantiated DECL_INITIAL of | |
736 | artificial variables. | |
737 | ||
b1c9c068 CP |
738 | 2016-07-15 Cesar Philippidis <cesar@codesourcery.com> |
739 | ||
740 | * parser.c (cp_parser_oacc_declare): Don't scan for | |
741 | GOMP_MAP_POINTER. | |
742 | * semantics.c (handle_omp_array_sections): Mark data clauses with | |
743 | GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having | |
744 | zero-length subarrays. | |
745 | ||
9a54f10d JM |
746 | 2016-07-11 Jason Merrill <jason@redhat.com> |
747 | ||
748 | * decl.c (store_parm_decls): Remove check for void parm. | |
749 | ||
d0cf395a JM |
750 | 2016-07-08 Jason Merrill <jason@redhat.com> |
751 | ||
72b3e203 JM |
752 | * cp-tree.h: Unpoison lvalue_p. |
753 | * call.c, class.c, constexpr.c, cvt.c, init.c, lambda.c, pt.c, | |
754 | tree.c, typeck.c, typeck2.c: Use lvalue_p instead of | |
755 | real_lvalue_p. | |
756 | ||
bb19d4af JM |
757 | * tree.c (obvalue_p): Rename from lvalue_p. |
758 | (lvalue_p): Define for c-common. | |
759 | * call.c, cp-tree.h, cvt.c, init.c: Adjust. | |
760 | * typeck.c: Adjust. | |
761 | (cp_build_addr_expr_1): Remove obsolete code. | |
762 | ||
c3edc633 JM |
763 | * tree.c (glvalue_p): Rename from lvalue_or_rvalue_with_address_p. |
764 | * call.c, cp-tree.h, typeck.c: Adjust. | |
765 | ||
0596c448 JM |
766 | * lambda.c (maybe_add_lambda_conv_op): Fix null object argument. |
767 | ||
d0cf395a | 768 | P0145R2: Refining Expression Order for C++. |
65a550b4 JM |
769 | * cp-gimplify.c (lvalue_has_side_effects): New. |
770 | (cp_gimplify_expr): Implement assignment ordering. | |
d0cf395a JM |
771 | * call.c (op_is_ordered, build_over_call): Adjust for |
772 | -fargs-in-order renaming to -fstrong-eval-order. | |
773 | * cp-gimplify.c (cp_gimplify_expr): Likewise. | |
774 | ||
842dc2e6 JJ |
775 | 2016-07-07 Jakub Jelinek <jakub@redhat.com> |
776 | Kai Tietz <ktietz70@googlemail.com> | |
777 | ||
778 | PR c++/70869 | |
779 | PR c++/71054 | |
780 | * cp-gimplify.c (cp_genericize_r): For DECL_EXPR for non-static | |
781 | artificial vars, genericize their initializers. | |
782 | ||
84ca3893 DM |
783 | 2016-07-05 David Malcolm <dmalcolm@redhat.com> |
784 | ||
785 | PR c++/62314 | |
786 | * parser.c (cp_parser_class_specifier_1): When reporting | |
787 | missing semicolons, use a fixit-hint to suggest insertion | |
788 | of a semicolon immediately after the closing brace, | |
789 | offsetting the reported column accordingly. | |
790 | ||
79335075 JB |
791 | 2016-07-04 Jan Beulich <jbeulich@suse.com> |
792 | ||
793 | * lang-specs.h ("@c++-header"): Conditionalize "-o". | |
794 | ||
54d19c3b TS |
795 | 2016-06-29 Thomas Schwinge <thomas@codesourcery.com> |
796 | ||
797 | * parser.c (cp_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>: | |
798 | Move pragma context checking into... | |
799 | (cp_parser_omp_cancellation_point): ... here, and improve | |
800 | diagnostic messages. | |
801 | * semantics.c (finish_omp_cancel, finish_omp_cancellation_point): | |
802 | Improve diagnostic messages. | |
803 | ||
e9ac1f86 JJ |
804 | 2016-06-28 Jakub Jelinek <jakub@redhat.com> |
805 | ||
806 | * Make-lang.in: Don't cat ../stage_current if it does not exist. | |
807 | ||
6e085858 JM |
808 | 2016-06-24 Jason Merrill <jason@redhat.com> |
809 | ||
a25bd9e6 JM |
810 | P0145R2: Refining Expression Order for C++. |
811 | * typeck.c (cp_build_modify_expr): Leave COMPOUND_EXPR on LHS. | |
812 | ||
6e085858 JM |
813 | * tree.c (get_target_expr_sfinae): Handle bit-fields. |
814 | (build_target_expr): Call mark_rvalue_use. | |
815 | ||
00085092 JJ |
816 | 2016-06-24 Jakub Jelinek <jakub@redhat.com> |
817 | ||
818 | * call.c (magic_varargs_p): Return 3 for __builtin_*_overflow_p. | |
819 | (build_over_call): For magic == 3, do no conversion only on 3rd | |
820 | argument. | |
821 | ||
277d7ee0 AK |
822 | 2016-06-23 Andi Kleen <ak@linux.intel.com> |
823 | ||
824 | * Make-lang.in: Add support for autofdo. | |
825 | ||
e547455b JM |
826 | 2016-06-21 Jason Merrill <jason@redhat.com> |
827 | ||
2befd3f7 JM |
828 | * constraint.cc (constraints_satisfied_p): Keep as many levels of |
829 | args as our template has levels of parms. | |
830 | ||
e547455b JM |
831 | * pt.c (template_parm_outer_level, uses_outer_template_parms): New. |
832 | (type_dependent_expression_p): Use uses_outer_template_parms. | |
833 | ||
842107e4 DM |
834 | 2016-06-20 David Malcolm <dmalcolm@redhat.com> |
835 | ||
836 | * parser.c (cp_parser_string_literal): Convert non-standard | |
837 | concatenation error to directly use a rich_location, and | |
838 | use that to add the location of the first literal to the | |
839 | diagnostic. | |
840 | ||
c561b091 PC |
841 | 2016-06-17 Paolo Carlini <paolo.carlini@oracle.com> |
842 | ||
843 | * decl.c (validate_constexpr_redeclaration): Change pair of errors | |
844 | to error + inform. | |
845 | * error.c (dump_function_decl): Save the constexpr specifier too. | |
846 | ||
ce209777 JJ |
847 | 2016-06-17 Jakub Jelinek <jakub@redhat.com> |
848 | ||
849 | * tree.c (builtin_valid_in_constant_expr_p): Test for | |
850 | DECL_BUILT_IN_CLASS equal to BUILT_IN_NORMAL instead of just | |
851 | DECL_BUILT_IN. | |
852 | (bot_manip): Likewise. | |
853 | * call.c (magic_varargs_p): Likewise. | |
854 | ||
bf54f123 PC |
855 | 2016-06-17 Paolo Carlini <paolo.carlini@oracle.com> |
856 | ||
857 | * decl.c (grokfndecl): Change pair of errors to error + inform. | |
858 | ||
92354dc7 JM |
859 | 2016-06-17 Jason Merrill <jason@redhat.com> |
860 | ||
861 | PR c++/71209 | |
862 | * typeck.c (finish_class_member_access_expr): Avoid "not a base" | |
863 | warning when there are dependent bases. | |
864 | ||
9b6a8d0f JJ |
865 | 2016-06-17 Jakub Jelinek <jakub@redhat.com> |
866 | ||
867 | * semantics.c (handle_omp_array_sections_1): Don't ICE when | |
868 | processing_template_decl when checking for bitfields and unions. | |
869 | Look through REFERENCE_REF_P as base of COMPONENT_REF. | |
870 | (finish_omp_clauses): Look through REFERENCE_REF_P even for | |
871 | array sections with COMPONENT_REF bases. | |
872 | ||
283635f9 JJ |
873 | 2016-06-16 Jakub Jelinek <jakub@redhat.com> |
874 | ||
875 | * parser.c (cp_parser_omp_var_list_no_open): Call | |
876 | convert_from_reference before cp_parser_postfix_dot_deref_expression. | |
877 | * semantics.c (finish_omp_clauses): Don't ICE when | |
878 | processing_template_decl when checking for bitfields and unions. | |
879 | Look through REFERENCE_REF_P as base of COMPONENT_REF. | |
880 | ||
c5f914a3 PC |
881 | 2016-06-15 Paolo Carlini <paolo.carlini@oracle.com> |
882 | ||
883 | * decl.c (wrapup_globals_for_namespace): Use DECL_SOURCE_LOCATION and | |
884 | "%qF" in warning_at instead of "%q+F" in warning. | |
885 | (check_redeclaration_exception_specification): Likewise in pedwarn | |
886 | (and error, inform, for consistency). | |
887 | * call.c (joust): Likewise. | |
888 | ||
b8911cb8 PC |
889 | 2016-06-15 Paolo Carlini <paolo.carlini@oracle.com> |
890 | ||
891 | PR c++/70202 | |
892 | * decl.c (xref_basetypes): Revert r117839 changes; add fix-up | |
893 | code at the end of the for loop; also revert r159637 changes, | |
894 | add back the gcc_assert. | |
895 | * cp-tree.h (xref_basetypes): Adjust declaration. | |
896 | * parser.c (cp_parser_class_head): Adjust xref_basetypes call. | |
897 | ||
6a3f203c DM |
898 | 2016-06-14 David Malcolm <dmalcolm@redhat.com> |
899 | ||
900 | * search.c: Include spellcheck-tree.h rather than spellcheck.h. | |
901 | ||
264757fb DM |
902 | 2016-06-14 David Malcolm <dmalcolm@redhat.com> |
903 | ||
904 | * typeck.c: Include "gcc-rich-location.h". | |
905 | (finish_class_member_access_expr): Simplify fixit code by | |
906 | using gcc_rich_location::add_fixit_misspelled_id. | |
907 | ||
4eb24e01 JM |
908 | 2016-06-14 Jason Merrill <jason@redhat.com> |
909 | ||
910 | P0145R2: Refining Expression Order for C++. | |
911 | * cp-tree.h (CALL_EXPR_OPERATOR_SYNTAX, CALL_EXPR_ORDERED_ARGS) | |
912 | (CALL_EXPR_REVERSE_ARGS): New. | |
913 | * call.c (build_new_op_1): Set them. | |
914 | (extract_call_expr, op_is_ordered): New. | |
915 | (build_over_call): Set CALL_EXPR_ORDERED_ARGS. | |
916 | * cp-gimplify.c (cp_gimplify_expr) [CALL_EXPR]: Handle new flags. | |
917 | * pt.c (tsubst_copy_and_build): Copy new flags. | |
918 | * semantics.c (simplify_aggr_init_expr): Likewise. | |
919 | * tree.c (build_aggr_init_expr): Likewise. | |
920 | (build_min_non_dep_op_overload): Likewise. | |
921 | ||
abe7f828 JJ |
922 | 2016-06-14 Jakub Jelinek <jakub@redhat.com> |
923 | ||
a09c81b4 JJ |
924 | PR c++/71528 |
925 | * decl.c (duplicate_decls): For DECL_INITIALIZED_P non-external | |
926 | olddecl vars, preserve their TREE_READONLY bit. | |
927 | ||
abe7f828 JJ |
928 | PR c++/71516 |
929 | * decl.c (complete_vars): Handle gracefully type == error_mark_node. | |
930 | ||
acfadf06 PC |
931 | 2016-06-14 Paolo Carlini <paolo.carlini@oracle.com> |
932 | ||
933 | * typeck2.c (digest_init_r): Use EXPR_LOC_OR_LOC on init. | |
934 | ||
f423253b PC |
935 | 2016-06-13 Paolo Carlini <paolo.carlini@oracle.com> |
936 | ||
937 | * decl.c (grokdeclarator): Fix typo in pedwarn text. | |
938 | ||
4b1ffdb1 TS |
939 | 2016-06-10 Thomas Schwinge <thomas@codesourcery.com> |
940 | ||
941 | PR c/71381 | |
942 | * parser.c (cp_parser_omp_var_list_no_open) <OMP_CLAUSE__CACHE_>: | |
943 | Loosen checking. | |
944 | ||
392a81b9 PC |
945 | 2016-06-09 Paolo Carlini <paolo.carlini@oracle.com> |
946 | ||
947 | PR c++/71465 | |
948 | Revert: | |
949 | 2016-06-04 Paolo Carlini <paolo.carlini@oracle.com> | |
950 | ||
951 | PR c++/70202 | |
952 | * parser.c (cp_parser_class_head): When xref_basetypes fails and | |
953 | emits an error do not zero the type. | |
954 | ||
c8a71589 PC |
955 | 2016-06-08 Paolo Carlini <paolo.carlini@oracle.com> |
956 | ||
957 | * decl.c (maybe_deduce_size_from_array_init): Use | |
958 | DECL_SOURCE_LOCATION in error_at. | |
959 | (layout_var_decl): Likewise. | |
960 | (check_array_initializer): Likewise. | |
961 | (check_initializer): Likewise. | |
962 | (duplicate_decls, check_elaborated_type_specifier): Tidy. | |
963 | ||
44a845ca MS |
964 | 2016-06-08 Martin Sebor <msebor@redhat.com> |
965 | Jakub Jelinek <jakub@redhat.com> | |
966 | ||
967 | PR c++/70507 | |
968 | PR c/68120 | |
969 | * constexpr.c: Include gimple-fold.h. | |
970 | (cxx_eval_internal_function): New function. | |
971 | (cxx_eval_call_expression): Call it. | |
972 | (potential_constant_expression_1): Handle integer arithmetic | |
973 | overflow built-ins. | |
974 | * tree.c (builtin_valid_in_constant_expr_p): Handle | |
975 | BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P. | |
976 | ||
f07063cc PC |
977 | 2016-06-08 Paolo Carlini <paolo.carlini@oracle.com> |
978 | ||
979 | * pt.c (tsubst, case TYPENAME_TYPE): Don't delay checking the | |
980 | return value of tsubst_aggr_type for error_mark_node. | |
981 | ||
2ef16b6e JJ |
982 | 2016-06-08 Jakub Jelinek <jakub@redhat.com> |
983 | ||
984 | PR c++/71442 | |
985 | * pt.c (tsubst_copy): Only set TREE_USED on DECLs. | |
986 | ||
6f5bcd24 JJ |
987 | 2016-06-06 Jakub Jelinek <jakub@redhat.com> |
988 | Patrick Palka <ppalka@gcc.gnu.org> | |
989 | ||
990 | PR c++/70847 | |
991 | PR c++/71330 | |
992 | PR c++/71393 | |
993 | * cp-gimplify.c (cp_fold_r): Set *walk_subtrees = 0 and return NULL | |
994 | right after cp_fold call if cp_fold has returned the same stmt | |
995 | already in some earlier cp_fold_r call. | |
996 | (cp_fold_function): Add pset automatic variable, pass its address | |
997 | to cp_walk_tree. | |
998 | ||
909a11ad PC |
999 | 2016-06-04 Paolo Carlini <paolo.carlini@oracle.com> |
1000 | ||
1001 | PR c++/70202 | |
1002 | * parser.c (cp_parser_class_head): When xref_basetypes fails and | |
1003 | emits an error do not zero the type. | |
1004 | ||
c8572dd6 PP |
1005 | 2016-06-03 Patrick Palka <ppalka@gcc.gnu.org> |
1006 | ||
1007 | PR c++/27100 | |
1008 | * decl.c (duplicate_decls): Properly copy the | |
1009 | DECL_PENDING_INLINE_P, DECL_PENDING_INLINE_INFO and | |
1010 | DECL_SAVED_FUNCTION_DATA fields from OLDDECL to NEWDECL. | |
1011 | ||
b605f663 CLT |
1012 | 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com> |
1013 | ||
1014 | * semantics.c (finish_omp_clauses): Mark OpenACC reduction | |
1015 | arguments as addressable when async clause exists. | |
1016 | ||
bfeee8ac JH |
1017 | 2016-06-02 Jan Hubicka <jh@suse.cz> |
1018 | ||
1019 | * cp-gimplify.c (genericize_continue_stmt): Force addition of | |
1020 | predict stmt. | |
1021 | ||
b872d729 PC |
1022 | 2016-06-02 Paolo Carlini <paolo.carlini@oracle.com> |
1023 | ||
1024 | * decl.c (xref_tag_1): Change pairs of errors to error + inform. | |
1025 | (start_enum): Likewise. | |
1026 | * parser.c (cp_parser_class_head): Likewise. | |
1027 | ||
0633ee10 JJ |
1028 | 2016-06-02 Jakub Jelinek <jakub@redhat.com> |
1029 | ||
1030 | PR c++/71372 | |
1031 | * cp-gimplify.c (cp_fold): For INDIRECT_REF, if the folded expression | |
1032 | is INDIRECT_REF or MEM_REF, copy over TREE_READONLY, TREE_SIDE_EFFECTS | |
1033 | and TREE_THIS_VOLATILE flags. For ARRAY_REF and ARRAY_RANGE_REF, copy | |
1034 | over TREE_READONLY, TREE_SIDE_EFFECTS and TREE_THIS_VOLATILE flags | |
1035 | to the newly built tree. | |
1036 | ||
f795360d JM |
1037 | 2016-05-31 Jason Merrill <jason@redhat.com> |
1038 | ||
8d857afc JM |
1039 | * pt.c (instantiate_decl): Avoid recalculation. |
1040 | ||
1f032c53 JM |
1041 | PR c++/60095 |
1042 | PR c++/69515 | |
1043 | PR c++/69009 | |
1044 | * pt.c (instantiate_template_1): Don't put the partial | |
1045 | specialization in DECL_TI_TEMPLATE. | |
1046 | (partial_specialization_p, impartial_args): Remove. | |
1047 | (regenerate_decl_from_template): Add args parm. | |
1048 | (instantiate_decl): Look up the partial specialization again. | |
1049 | ||
f795360d JM |
1050 | PR c++/71227 |
1051 | * pt.c (check_explicit_specialization): Give better diagnostic about | |
1052 | specializing a hidden friend. | |
1053 | ||
c642d919 PC |
1054 | 2016-05-31 Paolo Carlini <paolo.carlini@oracle.com> |
1055 | ||
1056 | PR c++/71248 | |
1057 | * decl.c (check_static_variable_definition): Use DECL_SOURCE_LOCATION | |
1058 | to obtain correct locations; avoid redundant diagnostics on | |
1059 | out-of-class definitions. | |
1060 | ||
1061 | 2016-05-30 Martin Sebor <msebor@redhat.com> | |
265149a6 MS |
1062 | |
1063 | PR c++/71306 | |
1064 | * init.c (warn_placement_new_too_small): Handle placement new arguments | |
1065 | that are elements of arrays more carefully. Remove a pointless loop. | |
1066 | ||
00631022 JJ |
1067 | 2016-05-30 Jakub Jelinek <jakub@redhat.com> |
1068 | ||
1069 | PR c++/71349 | |
1070 | * parser.c (cp_parser_omp_for): Don't disallow nowait clause | |
1071 | when combined with target construct. | |
1072 | (cp_parser_omp_parallel): Pass cclauses == NULL as last argument | |
1073 | to cp_parser_omp_all_clauses. | |
1074 | ||
b2f6675b PC |
1075 | 2016-05-30 Paolo Carlini <paolo.carlini@oracle.com> |
1076 | ||
1077 | PR c++/71238 | |
1078 | * lex.c (unqualified_name_lookup_error): Take a location too. | |
1079 | (unqualified_fn_lookup_error): Take a cp_expr. | |
1080 | * cp-tree.h (unqualified_name_lookup_error, | |
1081 | unqualified_fn_lookup_error): Adjust declarations. | |
1082 | * semantics.c (perform_koenig_lookup): Adjust | |
1083 | unqualified_fn_lookup_error call, pass the location of | |
1084 | the identifier too as part of a cp_expr. | |
1085 | ||
a59775a1 PC |
1086 | 2016-05-30 Paolo Carlini <paolo.carlini@oracle.com> |
1087 | ||
1088 | PR c++/71099 | |
1089 | * parser.c (cp_parser_function_specifier_opt): Use current_class_type | |
1090 | to improve the diagnostic about wrong uses of 'virtual'. | |
1091 | ||
036dc0a0 PC |
1092 | 2016-05-29 Paolo Carlini <paolo.carlini@oracle.com> |
1093 | ||
1094 | PR c++/71105 | |
1095 | * lambda.c (maybe_add_lambda_conv_op): Early return also when | |
1096 | LAMBDA_EXPR_DEFAULT_CAPTURE_MODE != CPLD_NONE. | |
1097 | ||
c8419aca VV |
1098 | 2016-05-28 Ville Voutilainen <ville.voutilainen@gmail.com> |
1099 | ||
1100 | Revert: | |
1101 | PR c++/69855 | |
1102 | * name-lookup.c (pushdecl_maybe_friend_1): Push local function | |
1103 | decls into the global scope after stripping template bits | |
1104 | and setting DECL_ANTICIPATED. | |
1105 | ||
8008c4d2 PC |
1106 | 2016-05-27 Paolo Carlini <paolo.carlini@oracle.com> |
1107 | ||
1108 | PR c++/60385 | |
1109 | * name-lookup.c (push_namespace): Return bool, false when pushdecl | |
1110 | fails. | |
1111 | * name-lookup.h (push_namespace): Adjust declaration. | |
1112 | * parser.c (cp_parser_namespace_definition): Check push_namespace | |
1113 | return value. | |
1114 | ||
7d67159b VV |
1115 | 2016-05-27 Ville Voutilainen <ville.voutilainen@gmail.com> |
1116 | ||
1117 | PR c++/69855 | |
1118 | * name-lookup.c (pushdecl_maybe_friend_1): Push local function | |
1119 | decls into the global scope after stripping template bits | |
1120 | and setting DECL_ANTICIPATED. | |
1121 | ||
7211a097 JJ |
1122 | 2016-05-26 Jakub Jelinek <jakub@redhat.com> |
1123 | ||
1124 | * semantics.c (finish_omp_clauses) <case OMP_CLAUSE_SCHEDULE>: Warn | |
1125 | if OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive. | |
1126 | ||
cac177cf PP |
1127 | 2016-05-26 Patrick Palka <ppalka@gcc.gnu.org> |
1128 | ||
1129 | PR c++/70822 | |
1130 | PR c++/70106 | |
1131 | * cp-tree.h (REF_PARENTHESIZED_P): Make this flag apply to | |
1132 | SCOPE_REFs too. | |
1133 | * pt.c (tsubst_qualified_id): If REF_PARENTHESIZED_P is set | |
1134 | on the qualified_id then propagate it to the resulting | |
1135 | expression. | |
1136 | (do_auto_deduction): Check REF_PARENTHESIZED_P on SCOPE_REFs | |
1137 | too. | |
1138 | * semantics.c (force_paren_expr): If given a SCOPE_REF, just set | |
1139 | its REF_PARENTHESIZED_P flag. | |
1140 | ||
1b22fc54 JM |
1141 | 2016-05-25 Jason Merrill <jason@redhat.com> |
1142 | ||
1143 | PR c++/71173 | |
1144 | PR c++/70522 | |
1145 | * cp-tree.h (enum tag_types): Add scope_type. | |
1146 | * parser.c (cp_parser_class_name): Use scope_type. | |
1147 | (prefer_type_arg): Handle scope_type. | |
1148 | (cp_parser_lookup_name): Use prefer_type_arg. | |
1149 | * name-lookup.c (lookup_qualified_name): Change bool is_type_p to | |
1150 | int prefer_type, use lookup_flags. | |
1151 | * name-lookup.h: Adjust. | |
1152 | ||
e46c7770 CP |
1153 | 2016-05-24 Cesar Philippidis <cesar@codesourcery.com> |
1154 | ||
1155 | * parser.c (cp_parser_oacc_declare): Add support for | |
1156 | GOMP_MAP_FIRSTPRIVATE_POINTER. | |
1157 | * semantics.c (handle_omp_array_sections_1): Replace bool is_omp | |
1158 | argument with enum c_omp_region_type ort. Don't privatize OpenACC | |
1159 | non-static members. | |
1160 | (handle_omp_array_sections): Replace bool is_omp argument with enum | |
1161 | c_omp_region_type ort. Update call to handle_omp_array_sections_1. | |
1162 | (finish_omp_clauses): Add specific errors and warning messages for | |
1163 | OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update | |
1164 | call to handle_omp_array_sections. | |
1165 | ||
66f90a17 JM |
1166 | 2016-05-24 Jason Merrill <jason@redhat.com> |
1167 | ||
1168 | PR c++/70584 | |
1169 | * cp-gimplify.c (cp_fold_maybe_rvalue): Loop in case cp_fold | |
1170 | returns a decl. | |
1171 | (cp_fold) [INDIRECT_REF]: Don't fold to an rvalue. | |
1172 | ||
f65e97fd MS |
1173 | 2016-05-24 Martin Sebor <msebor@redhat.com> |
1174 | ||
1175 | PR c++/71147 | |
1176 | * decl.c (layout_var_decl, grokdeclarator): Use complete_or_array_type_p. | |
1177 | * pt.c (instantiate_class_template_1): Try to complete the element | |
1178 | type of a flexible array member. | |
1179 | (can_complete_type_without_circularity): Handle arrays of unknown bound. | |
1180 | * typeck.c (complete_type): Also complete the type of the elements of | |
1181 | arrays with an unspecified bound. | |
1182 | ||
72f382fb PC |
1183 | 2016-05-24 Paolo Carlini <paolo.carlini@oracle.com> |
1184 | ||
1185 | PR c++/69872 | |
1186 | * typeck2.c (check_narrowing): Check pedwarn return value. | |
1187 | ||
7adb26f2 JJ |
1188 | 2016-05-24 Jakub Jelinek <jakub@redhat.com> |
1189 | ||
1190 | PR c++/71257 | |
1191 | * semantics.c (finish_omp_clauses) <case OMP_CLAUSE_LINEAR>: | |
1192 | For OMP_CLAUSE_LINEAR_REF don't require type to be | |
1193 | integral or pointer. | |
1194 | ||
f17a223d RB |
1195 | 2016-05-24 Richard Biener <rguenther@suse.de> |
1196 | ||
1197 | PR middle-end/70434 | |
1198 | PR c/69504 | |
1199 | * expr.c (mark_exp_read): Handle VIEW_CONVERT_EXPR. | |
1200 | * constexpr.c (cxx_eval_array_reference): Handle indexed | |
1201 | vectors. | |
1202 | * typeck.c (cp_build_array_ref): Adjust. | |
1203 | ||
9c62c1f3 JM |
1204 | 2016-05-23 Jason Merrill <jason@redhat.com> |
1205 | ||
4ddcdbf9 JM |
1206 | PR c++/70344 |
1207 | * constexpr.c (cxx_eval_call_expression): Check for | |
1208 | fun == current_function_decl again. | |
1209 | ||
290279c4 JM |
1210 | PR c++/70584 |
1211 | * cp-gimplify.c (cp_fold) [INDIRECT_REF]: Call | |
1212 | maybe_undo_parenthesized_ref. | |
1213 | ||
9c62c1f3 JM |
1214 | PR c++/70735 |
1215 | * pt.c (tsubst_copy): Just return a local variable from | |
1216 | non-template context. Don't call rest_of_decl_compilation for | |
1217 | duplicated static locals. | |
1218 | (tsubst_decl): Set DECL_CONTEXT of local static from another | |
1219 | function. | |
1220 | ||
26d6ae55 PC |
1221 | 2016-05-23 Paolo Carlini <paolo.carlini@oracle.com> |
1222 | ||
1223 | PR c++/70972 | |
1224 | * method.c (forward_parm): Use cp_build_reference_type. | |
1225 | ||
d6c9a06f PC |
1226 | 2016-05-23 Paolo Carlini <paolo.carlini@oracle.com> |
1227 | ||
1228 | PR c++/69095 | |
1229 | * parser.c (cp_parser_initializer): Use check_for_bare_parameter_packs. | |
1230 | ||
396a1d10 PC |
1231 | 2016-05-23 Paolo Carlini <paolo.carlini@oracle.com> |
1232 | ||
1233 | * pt.c (check_for_bare_parameter_packs): Improve error message | |
1234 | location for expressions. | |
1235 | ||
4727d4c6 NS |
1236 | 2016-05-20 Nathan Sidwell <nathan@acm.org> |
1237 | ||
1238 | * constexpr.c (cxx_bind_parameters_in_call): Avoid gratuitous if | |
1239 | ... goto. | |
1240 | (cxx_eval_call_expression): Fix comment grammar. | |
1241 | ||
ef98d365 PC |
1242 | 2016-05-20 Paolo Carlini <paolo.carlini@oracle.com> |
1243 | ||
1244 | PR c++/70572 | |
1245 | * decl.c (cp_finish_decl): Check do_auto_deduction return value | |
1246 | and return immediately in case of erroneous code. | |
1247 | ||
2a5569fa MP |
1248 | 2016-05-19 Marek Polacek <polacek@redhat.com> |
1249 | ||
1250 | PR c++/71075 | |
1251 | * pt.c (unify_template_argument_mismatch): Use %qE instead of %qD. | |
1252 | ||
a7dd5069 JM |
1253 | 2016-05-19 Jason Merrill <jason@redhat.com> |
1254 | ||
1255 | PR c++/10200 | |
1256 | * pt.c (fn_type_unification): Add outer template args if needed. | |
1257 | (type_unification_real): Handle getting full args. | |
1258 | ||
5e9a5385 DM |
1259 | 2016-05-19 David Malcolm <dmalcolm@redhat.com> |
1260 | ||
1261 | PR c++/71184 | |
1262 | * parser.c (cp_parser_operator): For array new/delete, check that | |
1263 | cp_parser_require returned a non-NULL token before dereferencing | |
1264 | it. | |
1265 | ||
4bf8dbe1 BE |
1266 | 2016-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de> |
1267 | ||
1268 | * decl.c (finish_enum_value_list): Use the specified mode. | |
1269 | ||
8f74423d JM |
1270 | 2016-05-18 Jason Merrill <jason@redhat.com> |
1271 | ||
1272 | * pt.c (value_dependent_expression_p): Tweak new cases to better | |
1273 | match the wording in the standard. | |
1274 | ||
c584aca6 PC |
1275 | 2016-05-18 Paolo Carlini <paolo.carlini@oracle.com> |
1276 | ||
1277 | PR c++/69793 | |
1278 | * parser.c (cp_parser_template_id): Don't call cp_lexer_peek_nth_token | |
1279 | when the previous cp_lexer_peek_token returns CPP_EOF. | |
1280 | ||
20309c6e PC |
1281 | 2016-05-18 Paolo Carlini <paolo.carlini@oracle.com> |
1282 | ||
1283 | PR c++/70466 | |
1284 | * call.c (convert_like_real): Check that we are actually converting | |
1285 | from an init list. | |
1286 | ||
8fad45f5 MW |
1287 | 2016-05-16 Matthew Wahab <matthew.wahab@arm.com> |
1288 | ||
1289 | * decl.c (grokdeclarator): Remove errmsg and use of | |
1290 | targetm.invalid_return_type. | |
1291 | (grokparms): Remove errmsg and use of | |
1292 | targetm.invalid_parameter_type. | |
1293 | ||
827e5d3f JM |
1294 | 2016-05-13 Jason Merrill <jason@redhat.com> |
1295 | ||
23cb7266 JM |
1296 | PR c++/10200 |
1297 | PR c++/69753 | |
1298 | * pt.c (tsubst_decl): Use uses_template_parms. | |
1299 | (instantiate_template_1): Handle non-dependent calls in templates. | |
1300 | (value_dependent_expression_p): Handle BASELINK, FUNCTION_DECL. | |
1301 | (type_dependent_expression_p): Only consider innermost template args. | |
1302 | (dependent_template_arg_p): Check enclosing class of a template here. | |
1303 | (dependent_template_p): Not here. | |
1304 | (type_dependent_object_expression_p): New. | |
1305 | * typeck.c (finish_class_member_access_expr): Use it. | |
1306 | * parser.c (cp_parser_postfix_expression): Use it. | |
1307 | (cp_parser_postfix_dot_deref_expression): Use it. Use comptypes | |
1308 | to detect the current instantiation. | |
1309 | (cp_parser_lookup_name): Really implement DR 141. | |
1310 | * search.c (lookup_field_r): Prefer a dependent using-declaration. | |
1311 | (any_dependent_bases_p): Split out from... | |
1312 | * name-lookup.c (do_class_using_decl): ...here. | |
1313 | * call.c (build_new_method_call_1): Use it. | |
1314 | * semantics.c (finish_call_expr): 'this' doesn't make a call dependent. | |
1315 | * tree.c (non_static_member_function_p): Remove. | |
1316 | * typeck2.c (build_x_arrow): Use dependent_scope_p. | |
1317 | ||
827e5d3f JM |
1318 | * parser.c (cp_parser_postfix_dot_deref_expression): Use |
1319 | complete_type_or_else for unknown_type_node, too. | |
1320 | ||
4f2e1536 MP |
1321 | 2016-05-12 Marek Polacek <polacek@redhat.com> |
1322 | ||
1323 | PR c/70756 | |
1324 | * call.c (build_new_op_1): Pass LOC to cp_build_modify_expr. | |
1325 | * cp-tree.h (cp_build_modify_expr): Update declaration. | |
1326 | (cxx_incomplete_type_error, cxx_incomplete_type_diagnostic): New inline | |
1327 | overloads. | |
1328 | * cp-ubsan.c (cp_ubsan_dfs_initialize_vtbl_ptrs): Pass INPUT_LOCATION to | |
1329 | cp_build_modify_expr. | |
1330 | * decl2.c (set_guard): Likewise. | |
1331 | (handle_tls_init): Likewise. | |
1332 | * init.c (perform_member_init): Likewise. | |
1333 | (expand_virtual_init): Likewise. | |
1334 | (build_new_1): Likewise. | |
1335 | (build_vec_delete_1): Likewise. | |
1336 | (get_temp_regvar): Likewise. | |
1337 | (build_vec_init): Likewise. | |
1338 | * method.c (do_build_copy_assign): Likewise. | |
1339 | (assignable_expr): Likewise. | |
1340 | * semantics.c (finish_omp_for): Likewise. | |
1341 | * typeck.c (cp_build_binary_op): Pass LOCATION to pointer_diff and | |
1342 | cp_pointer_int_sum. | |
1343 | (cp_pointer_int_sum): Add location parameter. Pass it down to | |
1344 | pointer_int_sum. | |
1345 | (pointer_diff): Add location parameter. Use it. | |
1346 | (build_modify_expr): Pass location down to cp_build_modify_expr. | |
1347 | (cp_build_modify_expr): Add location parameter. Use it. | |
1348 | (build_x_modify_expr): Pass location down to cp_build_modify_expr. | |
1349 | * typeck2.c (cxx_incomplete_type_diagnostic, | |
1350 | cxx_incomplete_type_error): Add location parameter. | |
1351 | ||
5c3a10fb MP |
1352 | 2016-05-11 Marek Polacek <polacek@redhat.com> |
1353 | ||
1354 | PR c++/71024 | |
1355 | * decl.c (duplicate_decls): Call diagnose_mismatched_decls. | |
1356 | ||
351f85c5 JJ |
1357 | 2016-05-05 Jakub Jelinek <jakub@redhat.com> |
1358 | ||
1359 | * parser.c (cp_parser_selection_statement): For RID_SWITCH, | |
1360 | pass if_p instead of NULL to cp_parser_implicitly_scoped_statement. | |
1361 | ||
deef7113 MP |
1362 | 2016-05-04 Marek Polacek <polacek@redhat.com> |
1363 | ||
1364 | * parser.c (cp_parser_selection_statement): Replace OPT_Wparentheses | |
1365 | with OPT_Wdangling_else. | |
1366 | ||
b25aad5f MS |
1367 | 2016-05-03 Martin Sebor <msebor@redhat.com> |
1368 | ||
1369 | PR c++/66561 | |
1370 | * tree.c (builtin_valid_in_constant_expr_p): Treat BUILT_IN_FILE, | |
1371 | BUILT_IN_FUNCTION, and BUILT_IN_LINE as constant expressions. | |
1372 | ||
79ce98bc MP |
1373 | 2016-05-03 Marek Polacek <polacek@redhat.com> |
1374 | ||
1375 | PR c/70859 | |
1376 | * call.c (build_cxx_call): Pass location and vNULL down to | |
1377 | check_builtin_function_arguments. | |
1378 | ||
fb2647aa RB |
1379 | 2016-05-03 Richard Biener <rguenther@suse.de> |
1380 | ||
1381 | * Make-lang.in (cc1plus-checksum.c): For stage-final re-use | |
1382 | the checksum from the previous stage. | |
1383 | ||
bc1aee87 DM |
1384 | 2016-05-02 David Malcolm <dmalcolm@redhat.com> |
1385 | ||
1386 | PR c++/62314 | |
1387 | * typeck.c (finish_class_member_access_expr): When | |
1388 | giving a hint about a possibly-misspelled member name, | |
1389 | add a fix-it replacement hint. | |
1390 | ||
77886428 CP |
1391 | 2016-05-02 Cesar Philippidis <cesar@codesourcery.com> |
1392 | ||
1393 | * cp-tree.h (finish_omp_clauses): Update prototype. | |
1394 | * parser.c (cp_parser_oacc_all_clauses): Update call to | |
1395 | finish_omp_clauses. | |
1396 | (cp_parser_omp_all_clauses): Likewise. | |
1397 | (cp_parser_omp_for_loop): Likewise. | |
1398 | (cp_omp_split_clauses): Likewise. | |
1399 | (cp_parser_oacc_cache): Likewise. | |
1400 | (cp_parser_oacc_loop): Likewise. | |
1401 | (cp_parser_omp_declare_target): | |
1402 | (cp_parser_cilk_simd_all_clauses): Likewise. | |
1403 | (cp_parser_cilk_for): Likewise. | |
1404 | * pt.c (tsubst_omp_clauses): Replace allow_fields and declare_simd | |
1405 | arguments with enum c_omp_region_type ort. | |
1406 | (tsubst_omp_clauses): Update calls to finish_omp_clauses. | |
1407 | (tsubst_omp_attribute): Update calls to tsubst_omp_clauses. | |
1408 | (tsubst_omp_for_iterator): Update calls to finish_omp_clauses. | |
1409 | (tsubst_expr): Update calls to tsubst_omp_clauses. | |
1410 | * semantics.c (finish_omp_clauses): Replace bool arguments | |
1411 | allow_fields, declare_simd, and is_cilk with bitmask ort. | |
1412 | (finish_omp_for): Update call to finish_omp_clauses. | |
1413 | ||
474e0129 DM |
1414 | 2016-05-02 David Malcolm <dmalcolm@redhat.com> |
1415 | ||
1416 | PR c++/62314 | |
1417 | * parser.c (cp_parser_class_head): Capture the start location; | |
1418 | use it to emit a fix-it insertion hint when complaining | |
1419 | about missing "template <> " in explicit specializations. | |
1420 | ||
8de73453 RS |
1421 | 2016-05-02 Richard Sandiford <richard.sandiford@arm.com> |
1422 | ||
1423 | * init.c (build_new_1): Use shift operators instead of wi:: shifts. | |
1424 | ||
02673c66 RB |
1425 | 2016-05-02 Richard Biener <rguenther@suse.de> |
1426 | ||
1427 | * decl.c (grokdeclarator): Properly insert a DECL_EXPR for | |
1428 | anonymous VLAs. | |
1429 | ||
411e5c67 PC |
1430 | 2016-04-29 Paolo Carlini <paolo.carlini@oracle.com> |
1431 | ||
1432 | PR c++/66644 | |
1433 | * class.c (check_field_decl): Remove final int* parameter, change | |
1434 | the return type to bool; fix logic in order not to reject multiple | |
1435 | initialized fields in anonymous struct. | |
1436 | (check_field_decls): Adjust call. | |
1437 | ||
e7ff0319 CP |
1438 | 2016-04-29 Cesar Philippidis <cesar@codesourcery.com> |
1439 | ||
1440 | PR middle-end/70626 | |
1441 | * parser.c (cp_parser_oacc_loop): Don't augment mask with | |
1442 | OACC_LOOP_CLAUSE_MASK. | |
1443 | (cp_parser_oacc_kernels_parallel): Update call to | |
1444 | c_oacc_split_loop_clauses. | |
1445 | ||
babaa9df JM |
1446 | 2016-04-28 Jason Merrill <jason@redhat.com> |
1447 | ||
b632761d JM |
1448 | Implement C++17 [[nodiscard]] attribute. |
1449 | PR c++/38172 | |
1450 | PR c++/54379 | |
1451 | * parser.c (cp_parser_std_attribute): Handle [[nodiscard]]. | |
1452 | * tree.c (handle_nodiscard_attribute): New. | |
1453 | (cxx_attribute_table): Add [[nodiscard]]. | |
1454 | * cvt.c (cp_get_fndecl_from_callee, cp_get_callee_fndecl): New. | |
1455 | (maybe_warn_nodiscard): New. | |
1456 | (convert_to_void): Call it. | |
1457 | ||
babaa9df JM |
1458 | * cvt.c (cp_get_callee): New. |
1459 | * constexpr.c (get_function_named_in_call): Use it. | |
1460 | * cxx-pretty-print.c (postfix_expression): Use it. | |
1461 | * except.c (check_noexcept_r): Use it. | |
1462 | * method.c (check_nontriv): Use it. | |
1463 | * tree.c (build_aggr_init_expr): Use it. | |
1464 | * cp-tree.h: Declare it. | |
1465 | ||
6bc2bb18 RB |
1466 | 2015-04-27 Ryan Burn <contact@rnburn.com> |
1467 | Jeff Law <law@redhat.com> | |
1468 | ||
1469 | PR c++/69024 | |
1470 | PR c++/68997 | |
1471 | * cp-gimplify.c (cp_gimplify_expr): Call cilk_cp_detect_spawn_and_unwrap | |
1472 | instead of cilk_detect_spawn_and_unwrap. | |
1473 | * cp-cilkplus.c (is_conversion_operator_function_decl_p): New. | |
1474 | (find_spawn): New. | |
1475 | (cilk_cp_detect_spawn_and_unwrap): New. | |
1476 | * lambda.c: Include cp-cilkplus.h. | |
1477 | * parser.c: Include cp-cilkplus.h. | |
1478 | * cp-tree.h (cpp_validate_cilk_plus_loop): Move prototype into... | |
1479 | * cp-cilkpus.h: New file. | |
1480 | ||
3c98ff9b NS |
1481 | 2016-04-27 Nathan Sidwell <nathan@acm.org> |
1482 | ||
1483 | * constexpr.c (get_fundef_copy): Use the original function for | |
1484 | non-recursive evaluations. | |
1485 | (save_fundef_copy): Always expect a slot to be available. | |
1486 | ||
c1e1f433 BS |
1487 | 2016-04-27 Bernd Schmidt <bschmidt@redhat.com> |
1488 | ||
1489 | * parser.c (cp_parser_postfix_expression): Call | |
1490 | warn_for_memset instead of warning directly here. | |
1491 | ||
843ce8ab PP |
1492 | 2016-04-26 Patrick Palka <ppalka@gcc.gnu.org> |
1493 | ||
1494 | PR c++/70241 | |
1495 | * decl.c (build_enumerator): Set current_access_specifier when | |
1496 | declaring an enumerator belonging to an in-class enumeration. | |
1497 | * parser.c (cp_parser_check_access_in_redecleration): Also | |
1498 | consider in-class enumerations. | |
1499 | ||
5a0802ea MP |
1500 | 2016-04-26 Marek Polacek <polacek@redhat.com> |
1501 | ||
1502 | PR c++/70744 | |
1503 | * call.c (build_conditional_expr_1): Call cp_stabilize_reference | |
1504 | instead of stabilize_reference. | |
1505 | (build_over_call): Likewise. | |
1506 | * cp-tree.h (cp_stabilize_reference): Declare. | |
1507 | * tree.c (cp_stabilize_reference): New function. | |
1508 | * typeck.c (cp_build_unary_op): Call cp_stabilize_reference instead of | |
1509 | stabilize_reference. | |
1510 | (unary_complex_lvalue): Likewise. | |
1511 | (cp_build_modify_expr): Likewise. | |
1512 | ||
7db11a5a JJ |
1513 | 2016-04-26 Jakub Jelinek <jakub@redhat.com> |
1514 | ||
1515 | PR bootstrap/70704 | |
1516 | * pt.c (build_non_dependent_expr): Use flag_checking > 1 instead of | |
1517 | just flag_checking. | |
1518 | ||
d067e05f JM |
1519 | 2016-04-25 Jason Merrill <jason@redhat.com> |
1520 | ||
1521 | * tree.c (std_attribute_table): New. | |
1522 | (init_tree): Register it. | |
1523 | ||
76f9244e JM |
1524 | 2016-04-22 Jason Merrill <jason@redhat.com> |
1525 | ||
1526 | * parser.c (cp_parser_perform_range_for_lookup): Decay the array. | |
1527 | ||
5c712250 PP |
1528 | 2016-04-21 Patrick Palka <ppalka@gcc.gnu.org> |
1529 | ||
1530 | * name-lookup.c (free_saved_scope): New free list of saved_scope | |
1531 | structures. | |
1532 | (push_to_top_level): Attempt to reuse a saved_scope struct | |
1533 | from free_saved_scope instead of allocating a new one each time. | |
1534 | (pop_from_top_level_1): Chain the now-unused saved_scope structure | |
1535 | onto free_saved_scope. | |
1536 | ||
20700098 PC |
1537 | 2016-04-21 Paolo Carlini <paolo.carlini@oracle.com> |
1538 | ||
1539 | PR c++/70540 | |
1540 | * semantics.c (process_outer_var_ref): Unconditionally return | |
1541 | error_mark_node when mark_used returns false. | |
1542 | ||
aedf4e12 MP |
1543 | 2016-04-21 Marek Polacek <polacek@redhat.com> |
1544 | ||
1545 | PR c++/70513 | |
1546 | * parser.c (cp_parser_enum_specifier): Check and possibly error for | |
1547 | extra qualification. | |
1548 | ||
ee392fc2 NS |
1549 | 2016-04-20 Nathan Sidwell <nathan@acm.org> |
1550 | ||
1551 | PR c++/55635 | |
1552 | * init.c (build_vec_delete_1): Protect operator delete call in try | |
1553 | finally. | |
1554 | (build_delete): Likewise. | |
1555 | * optimize.c (build_delete_destructor_body): Likewise. | |
1556 | ||
477d4906 IV |
1557 | 2016-04-20 Ilya Verbin <ilya.verbin@intel.com> |
1558 | ||
1559 | PR c++/69363 | |
1560 | * cp-tree.h (finish_omp_clauses): Add new default argument. | |
1561 | * parser.c (cp_parser_cilk_simd_all_clauses): Use finish_omp_clauses | |
1562 | instead of c_finish_cilk_clauses. | |
1563 | * semantics.c (finish_omp_clauses): Add new argument. Allow | |
1564 | floating-point variables in the linear clause for Cilk Plus. | |
1565 | ||
323af7cf NS |
1566 | 2016-04-20 Nathan Sidwell <nathan@acm.org> |
1567 | ||
1568 | * semantics.c (finish_compound_lteral): Don't wrap VECTOR_TYPEs in a | |
1569 | TARGET_EXPR. | |
1570 | ||
3ba065e8 JM |
1571 | 2016-04-19 Jason Merrill <jason@redhat.com> |
1572 | ||
76f39440 JM |
1573 | PR c++/66543 |
1574 | * expr.c (mark_exp_read): Handle NON_DEPENDENT_EXPR. | |
1575 | * pt.c (make_pack_expansion): Call mark_exp_read. | |
1576 | * semantics.c (finish_id_expression): Call mark_type_use in | |
1577 | unevaluated context. | |
1578 | ||
218e9dde JM |
1579 | DR 2137 |
1580 | * call.c (implicit_conversion): If we choose a copy constructor | |
1581 | for list-initialization from the same type, the conversion is an | |
1582 | exact match. | |
1583 | ||
06ec22b7 JM |
1584 | * constexpr.c (breaks): Handle EXIT_EXPR. |
1585 | (cxx_eval_loop_expr): Handle COMPOUND_EXPR body. | |
1586 | (cxx_eval_constant_expression): Handle EXIT_EXPR, improve handling | |
1587 | of COMPOUND_EXPR. | |
1588 | ||
f937929e JM |
1589 | PR c++/68206 |
1590 | PR c++/68530 | |
1591 | * constexpr.c (potential_constant_expression_1): Handle LOOP_EXPR | |
1592 | and GOTO_EXPR. | |
1593 | ||
b1e47084 JM |
1594 | * pt.c (tsubst_expr): Remove shadowing declaration. |
1595 | (tsubst_pack_expansion): Add assert. | |
1596 | ||
1597 | * semantics.c (add_decl_expr): Use DECL_SOURCE_LOCATION. | |
1598 | ||
3ba065e8 JM |
1599 | PR c++/70522 |
1600 | * name-lookup.c (qualified_lookup_using_namespace): Look through | |
1601 | hidden names. | |
1602 | ||
fe37c7af MM |
1603 | 2016-04-18 Michael Matz <matz@suse.de> |
1604 | ||
1605 | * class.c (build_vtable): Use SET_DECL_ALIGN and SET_TYPE_ALIGN. | |
1606 | (layout_class_type): Ditto. | |
1607 | (build_base_field): Use SET_DECL_ALIGN. | |
1608 | (fixup_attribute_variants): Use SET_TYPE_ALIGN. | |
1609 | * decl.c (duplicate_decls): Use SET_DECL_ALIGN. | |
1610 | (record_unknown_type): Use SET_TYPE_ALIGN. | |
1611 | (cxx_init_decl_processing): Ditto. | |
1612 | (copy_type_enum): Ditto. | |
1613 | (grokfndecl): Use SET_DECL_ALIGN. | |
1614 | (copy_type_enum): Use SET_TYPE_ALIGN. | |
1615 | * pt.c (instantiate_class_template_1): Use SET_TYPE_ALIGN. | |
1616 | (tsubst): Ditto. | |
1617 | * tree.c (cp_build_qualified_type_real): Use SET_TYPE_ALIGN. | |
1618 | * lambda.c (maybe_add_lambda_conv_op): Use SET_DECL_ALIGN. | |
1619 | * method.c (implicitly_declare_fn): Use SET_DECL_ALIGN. | |
1620 | * rtti.c (emit_tinfo_decl): Ditto. | |
1621 | ||
81c160c6 JM |
1622 | 2016-04-18 Jason Merrill <jason@redhat.com> |
1623 | ||
1624 | PR c++/70690 | |
1625 | PR c++/70528 | |
1626 | * class.c (type_maybe_constexpr_default_constructor): New. | |
1627 | (type_has_constexpr_default_constructor): Revert. | |
1628 | ||
a4186552 SL |
1629 | 2016-04-16 Sandra Loosemore <sandra@codesourcery.com> |
1630 | ||
1631 | PR target/1078 | |
1632 | ||
1633 | * tree.c (cxx_attribute_table): Remove "com_interface" entry. | |
1634 | (handle_com_interface_attribute): Delete. | |
1635 | ||
a7b12f1f JM |
1636 | 2016-04-15 Jason Merrill <jason@redhat.com> |
1637 | ||
3d8dfcb4 JM |
1638 | PR c++/70685 |
1639 | * constexpr.c (get_fundef_copy): Handle null *slot. | |
1640 | ||
a7b12f1f JM |
1641 | PR c++/70505 |
1642 | * pt.c (tsubst_baselink): Give the new TEMPLATE_ID_EXPR | |
1643 | unknown_type_node, too. | |
1644 | ||
70f4fdeb JJ |
1645 | 2016-04-15 Jason Merrill <jason@redhat.com> |
1646 | Nathan Sidwell <nathan@acm.org> | |
1647 | ||
1648 | PR c++/70594 | |
1649 | * constexpr.c (constexpr_call_table): Preserve in GC. | |
1650 | (struct fundef_copy, struct fundef_copies_table_t): Delete. | |
1651 | (fundef_copies_table): Preserve in GC. Change to pointer to | |
1652 | tree->tree hash. | |
1653 | (maybe_initialize_fundef_copies_table): Adjust. | |
1654 | (get_fundef_copy): Return a TREE_LIST. Use non-inserting search. | |
1655 | (save_fundef_copy): Adjust for a TREE_LIST. | |
1656 | (cxx_eval_call_expression): Adjust for a fundef_copy TREE_LIST. | |
1657 | (fini_constexpr): New. | |
1658 | * cp-tree.h (fini_constexpr): Declare. | |
1659 | * decl2.c (c_parse_final_cleanups): Call fini_constexpr. | |
1660 | ||
dda1bf61 JJ |
1661 | 2016-04-15 Jakub Jelinek <jakub@redhat.com> |
1662 | ||
1663 | PR c/70436 | |
1664 | * parser.c (cp_parser_pragma): Add IF_P argument, pass it down | |
1665 | where needed. | |
1666 | (cp_parser_declaration_seq_opt, cp_parser_member_specification_opt, | |
1667 | cp_parser_objc_interstitial_code, cp_parser_omp_declare_simd, | |
1668 | cp_parser_oacc_routine): Adjust cp_parser_pragma callers. | |
1669 | (cp_parser_statement): Likewise. Adjust cp_parser_cilk_for caller. | |
1670 | (cp_parser_omp_structured_block): Add IF_P argument, pass it down to | |
1671 | cp_parser_statement. | |
1672 | (cp_parser_oacc_data, cp_parser_oacc_host_data, cp_parser_oacc_loop, | |
1673 | cp_parser_oacc_kernels_parallel, cp_parser_omp_critical, | |
1674 | cp_parser_omp_simd, cp_parser_omp_for, cp_parser_omp_master, | |
1675 | cp_parser_omp_ordered, cp_parser_omp_parallel, cp_parser_omp_single, | |
1676 | cp_parser_omp_task, cp_parser_omp_taskgroup, cp_parser_omp_distribute, | |
1677 | cp_parser_omp_teams, cp_parser_omp_target_data, cp_parser_omp_target, | |
1678 | cp_parser_omp_taskloop, cp_parser_omp_construct, | |
1679 | cp_parser_cilk_grainsize, cp_parser_cilk_simd, cp_parser_cilk_for): | |
1680 | Add IF_P argument, pass it down where needed. | |
1681 | (cp_parser_omp_for_loop): Likewise. Clear IF_P if nbraces. | |
1682 | (cp_parser_omp_sections_scope): Adjust cp_parser_omp_structured_block | |
1683 | calls. | |
1684 | ||
3ae9a8b7 JM |
1685 | 2016-04-14 Jason Merrill <jason@redhat.com> |
1686 | ||
8e718ecb JM |
1687 | PR c++/70494 |
1688 | * decl.c (cxx_maybe_build_cleanup): Handle non-decls. | |
1689 | * typeck2.c (split_nonconstant_init_1): Use it. | |
1690 | ||
26144dde JM |
1691 | PR c++/70528 |
1692 | * class.c (type_has_constexpr_default_constructor): Return true | |
1693 | for an implicitly declared constructor. | |
1694 | ||
65bddf28 JM |
1695 | PR c++/70622 |
1696 | * parser.c (cp_parser_init_declarator): Add auto_result parm. | |
1697 | (cp_parser_simple_declaration): Pass it. | |
1698 | (strip_declarator_types): New. | |
1699 | ||
d25a101f JM |
1700 | PR c++/70543 |
1701 | * pt.c (value_dependent_expression_p) [VAR_DECL]: A type-dependent | |
1702 | initializer also makes the variable value-dependent. | |
1703 | ||
3ae9a8b7 JM |
1704 | PR c++/70648 |
1705 | * constexpr.c (cxx_eval_store_expression): Also copy | |
1706 | CONSTRUCTOR_NO_IMPLICIT_ZERO. | |
1707 | ||
d8747845 MS |
1708 | 2016-04-14 Martin Sebor <msebor@redhat.com> |
1709 | ||
1710 | PR c++/69517 | |
1711 | PR c++/70019 | |
1712 | PR c++/70588 | |
1713 | * cp-tree.h, decl.c, init.c, typeck2.c: Revert. | |
1714 | ||
9f285ccb JM |
1715 | 2016-04-14 Jason Merrill <jason@redhat.com> |
1716 | ||
1717 | * call.c, decl.c, error.c, cp-tree.h, decl.c: Revert empty | |
1718 | parameter ABI change. | |
1719 | ||
342fac95 MS |
1720 | 2016-04-13 Martin Sebor <msebor@redhat.com> |
1721 | ||
1722 | PR c++/69517 | |
1723 | PR c++/70019 | |
1724 | PR c++/70588 | |
1725 | * cp-tree.h (throw_bad_array_length, build_vla_check): Declare new | |
1726 | functions. | |
1727 | * decl.c (check_initializer, cp_finish_decl): Call them. | |
1728 | (reshape_init_r): Reject incompletely braced intializer-lists | |
1729 | for VLAs. | |
1730 | * init.c (throw_bad_array_length, build_vla_check) | |
1731 | (build_vla_size_check, build_vla_init_check): Define new functions. | |
1732 | * typeck2.c (split_nonconstant_init_1): Use variably_modified_type_p() | |
1733 | to detect a VLA. | |
1734 | (store_init_value): Same. | |
1735 | ||
5655267c JM |
1736 | 2016-04-13 Jason Merrill <jason@redhat.com> |
1737 | ||
2ee35bea JM |
1738 | Warn about empty parameter ABI with -Wabi=9. |
1739 | * call.c (empty_class_msg, mark_for_abi_warning) | |
1740 | (warn_empty_class_abi): New. | |
1741 | (build_call_a): Use them. | |
1742 | * decl.c (store_parm_decls): Use mark_for_abi_warning. | |
1743 | * error.c (pp_format_to_string): New. | |
1744 | ||
5655267c JM |
1745 | Pass empty class parameters like C. |
1746 | * call.c (pass_as_empty_struct, empty_class_arg): New. | |
1747 | (type_passed_as, build_x_va_arg): Use pass_as_empty_struct. | |
1748 | (build_call_a): Use empty_class_arg. | |
1749 | * cp-tree.h (CPTI_EMPTY_STRUCT, empty_struct_type): New. | |
1750 | * decl.c (cxx_init_decl_processing): Create empty_struct_type. | |
1751 | ||
0d9cdbdd JM |
1752 | 2016-04-13 Jason Merrill <jason@redhat.com> |
1753 | ||
1754 | PR c++/70627 | |
1755 | * decl.c (start_enum): Don't change an existing ENUM_UNDERLYING_TYPE. | |
1756 | ||
545a4139 PC |
1757 | 2016-04-13 Paolo Carlini <paolo.carlini@oracle.com> |
1758 | ||
1759 | PR c++/70635 | |
1760 | * pt.c (resolve_typename_type): Fix typos in infinite recursion | |
1761 | avoidance mechanism. | |
1762 | ||
eb07f187 JM |
1763 | 2016-04-13 Jason Merrill <jason@redhat.com> |
1764 | ||
463d91c6 JM |
1765 | PR c++/70634 |
1766 | * pt.c (instantiation_dependent_uneval_expression_p): Split out | |
1767 | from instantiation_dependent_expression_p. | |
1768 | (value_dependent_expression_p): Use it for unevaluated operands. | |
1769 | (instantiation_dependent_r): Don't check value-dependence. | |
1770 | (instantiation_dependent_expression_p): Check | |
1771 | value-dependence of the expression as a whole. | |
1772 | * cp-tree.h: Declare instantiation_dependent_uneval_expression_p. | |
1773 | * semantics.c (finish_decltype_type): Use it. | |
1774 | ||
eb07f187 JM |
1775 | * constexpr.c (potential_nondependent_constant_expression): New. |
1776 | (potential_nondependent_static_init_expression): New. | |
1777 | (maybe_constant_value_1, fold_non_dependent_expr) | |
1778 | (maybe_constant_init): Use them. | |
1779 | * pt.c (instantiate_non_dependent_expr_sfinae) | |
1780 | (instantiate_non_dependent_or_null, convert_nontype_argument): Use | |
1781 | them. | |
1782 | * cp-tree.h: Declare them. | |
1783 | ||
3eddc1c9 JJ |
1784 | 2016-04-13 Jakub Jelinek <jakub@redhat.com> |
1785 | ||
1786 | PR c++/70594 | |
1787 | * decl.c (pop_labels_1): Removed. | |
1788 | (note_label, sort_labels): New functions. | |
1789 | (pop_labels): During named_labels traversal, just push the slot | |
1790 | pointers into a vector, then qsort it by DECL_UID and only then | |
1791 | call pop_label and chain it into BLOCK_VARS. | |
1792 | ||
9d409934 JM |
1793 | 2016-04-13 Jason Merrill <jason@redhat.com> |
1794 | ||
1795 | PR c++/70615 | |
1796 | * cp-gimplify.c (cp_genericize_r): Expand PTRMEM_CST here. | |
1797 | (cp_gimplify_expr): Not here. | |
1798 | ||
92886d3e PP |
1799 | 2016-04-12 Patrick Palka <ppalka@gcc.gnu.org> |
1800 | ||
1801 | PR c++/70610 | |
1802 | * tree.c (lvalue_kind) [NON_DEPENDENT_EXPR]: Unconditionally | |
1803 | recurse into it. | |
1804 | * typeck.c (build_x_conditional_expr): Unconditionally remember | |
1805 | that the result is an lvalue or xvalue. | |
1806 | ||
08d6d8bb JM |
1807 | 2016-04-12 Jason Merrill <jason@redhat.com> |
1808 | ||
1809 | * class.c (is_really_empty_class): A zero-length array is empty. | |
1810 | An unnamed bit-field doesn't make a class non-empty. | |
1811 | ||
2b2f52bc PC |
1812 | 2016-04-12 Paolo Carlini <paolo.carlini@oracle.com> |
1813 | ||
1814 | PR c++/68722 | |
1815 | * parser.c (cp_parser_cache_defarg): When file ends in default | |
1816 | argument simply return error_mark_node. | |
1817 | ||
d4619dc1 NS |
1818 | 2016-04-12 Nathan Sidwell <nathan@acm.org> |
1819 | ||
1820 | PR c++/70501 | |
1821 | * constexpr.c (cxx_eval_bare_aggregate): Handle VECTOR_TYPE | |
1822 | similarly to PMF. | |
1823 | ||
a9c2f3d9 JM |
1824 | 2016-04-11 Jason Merrill <jason@redhat.com> |
1825 | ||
1826 | * mangle.c (decl_is_template_id): The template itself counts as a | |
1827 | template-id. | |
1828 | ||
56cfb596 PP |
1829 | 2016-04-08 Patrick Palka <ppalka@gcc.gnu.org> |
1830 | ||
1831 | PR c++/70590 | |
1832 | PR c++/70452 | |
1833 | * constexpr.c (cxx_eval_outermost_expression): Call unshare_expr | |
1834 | on the result if it's not a CONSTRUCTOR. | |
1835 | ||
0146e25f PP |
1836 | 2016-04-07 Patrick Palka <ppalka@gcc.gnu.org> |
1837 | ||
1838 | PR c++/70452 | |
1839 | * constexpr.c (find_constructor): New function. | |
1840 | (unshare_constructor): New function. | |
1841 | (cxx_eval_call_expression): Use unshare_constructor instead of | |
1842 | unshare_expr. | |
1843 | (find_array_ctor_elt): Likewise. | |
1844 | (cxx_eval_vec_init_1): Likewise. | |
1845 | (cxx_eval_store_expression): Likewise. | |
1846 | (cxx_eval_constant_expression): Likewise. | |
1847 | ||
6b37bdaf PP |
1848 | 2016-04-06 Patrick Palka <ppalka@gcc.gnu.org> |
1849 | ||
1850 | PR c/70436 | |
1851 | * cp-tree.h (FOR_EACH_CLONE): Restructure macro to avoid | |
1852 | potentially generating a future -Wparentheses warning in its | |
1853 | callers. | |
1854 | ||
469abfd2 JM |
1855 | 2016-04-06 Jason Merrill <jason@redhat.com> |
1856 | ||
1857 | * class.c (check_abi_tags): Fix function template handling. | |
1858 | ||
c08d28ac NS |
1859 | 2016-04-05 Nathan Sidwell <nathan@acm.org> |
1860 | ||
1861 | PR c++/70512 | |
1862 | * class.c (fixup_may_alias): New. | |
1863 | (fixup_attribute_variants): Call it. | |
1864 | ||
c0daf32d PP |
1865 | 2016-04-05 Patrick Palka <ppalka@gcc.gnu.org> |
1866 | ||
1867 | PR c++/70452 | |
1868 | * constexpr.c (struct fundef_copy): New struct. | |
1869 | (struct fundef_copies_table_t): New struct. | |
1870 | (fundef_copies_table): New static variable. | |
1871 | (maybe_initialize_fundef_copies_table): New static function. | |
1872 | (get_fundef_copy): New static function. | |
1873 | (save_fundef_copy): New static function. | |
1874 | (cxx_eval_call_expression): Use get_fundef_copy, and | |
1875 | save_fundef_copy. | |
1876 | (constexpr_call_table): Add "deletable" GTY marker. | |
1877 | ||
7a7ac32a PP |
1878 | 2016-04-05 Patrick Palka <ppalka@gcc.gnu.org> |
1879 | ||
1880 | PR c++/70452 | |
1881 | * cp-tree.h (class cache_map): Remove. | |
1882 | * constexpr.c (cv_cache): Change type to | |
1883 | GTY((deletable)) hash_map<tree, tree> *. | |
1884 | (maybe_constant_value): Adjust following the change to cv_cache. | |
1885 | (clear_cv_cache): New static function. | |
1886 | (clear_cv_and_fold_caches): Use it. | |
1887 | * cp-gimplify.c (fold_cache): Change type to | |
1888 | GTY((deletable)) hash_map<tree, tree> *. | |
1889 | (clear_fold_cache): Adjust following the change to fold_cache. | |
1890 | (cp_fold): Likewise. | |
1891 | ||
abdc16c8 MS |
1892 | 2016-04-02 Martin Sebor <msebor@redhat.com> |
1893 | ||
1894 | PR c++/67376 | |
1895 | PR c++/70170 | |
1896 | PR c++/70172 | |
1897 | PR c++/70228 | |
1898 | * constexpr.c (diag_array_subscript): New function. | |
1899 | (cxx_eval_array_reference): Detect out of bounds array indices. | |
1900 | ||
ddd6d421 JM |
1901 | 2016-04-01 Jason Merrill <jason@redhat.com> |
1902 | ||
1903 | PR c++/70449 | |
1904 | PR c++/70344 | |
1905 | * pt.c (instantiate_decl): A function isn't fully defined if | |
1906 | DECL_INITIAL is error_mark_node. | |
1907 | * constexpr.c (cxx_eval_call_expression): Likewise. | |
1908 | ||
0f875435 JJ |
1909 | 2016-04-01 Jakub Jelinek <jakub@redhat.com> |
1910 | Marek Polacek <polacek@redhat.com> | |
1911 | ||
1912 | PR c++/70488 | |
1913 | * init.c (warn_placement_new_too_small): Test whether | |
1914 | DECL_SIZE_UNIT or TYPE_SIZE_UNIT are integers that fit into uhwi. | |
1915 | ||
f9bf89bb NS |
1916 | 2016-04-01 Nathan Sidwell <nathan@acm.org> |
1917 | ||
1918 | PR c++/68475 | |
1919 | * decl.c (check_redeclaration_exception_specification): Check | |
1920 | regardless of -fno-exceptions. | |
1921 | * typeck2.c (merge_exception_specifiers): Relax assert by checking | |
1922 | flag_exceptions too. | |
1923 | ||
8f80cbdb NS |
1924 | 2016-03-31 Nathan Sidwell <nathan@acm.org> |
1925 | ||
1926 | * decl.c (start_preparsed_function): Remove unnecessary bracing. | |
1927 | (finish_destructor_body): Don't emit operator delete here. | |
1928 | ||
88504f34 NS |
1929 | 2016-03-31 Nathan Sidwell <nathan@acm.org> |
1930 | ||
1931 | PR c++/70393 | |
1932 | * constexpr.c (cxx_eval_store_expression): Keep CONSTRUCTOR | |
1933 | elements in field order. | |
1934 | ||
5fde6a45 MP |
1935 | 2016-03-31 Marek Polacek <polacek@redhat.com> |
1936 | ||
1937 | PR c/70297 | |
1938 | * decl.c (duplicate_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN. | |
1939 | ||
efc3536f RB |
1940 | 2016-03-31 Richard Biener <rguenther@suse.de> |
1941 | ||
1942 | PR c++/70430 | |
1943 | * typeck.c (cp_build_binary_op): Fix operand order of vector | |
1944 | conditional in truth op handling. | |
1945 | ||
e0bffbbb JM |
1946 | 2016-03-29 Jason Merrill <jason@redhat.com> |
1947 | ||
1948 | PR c++/70353 | |
1949 | * decl.c (make_rtl_for_nonlocal_decl): Don't defer local statics | |
1950 | in constexpr functions. | |
1951 | ||
bfec0b4d JM |
1952 | 2016-03-28 Jason Merrill <jason@redhat.com> |
1953 | ||
1954 | PR c++/70422 | |
1955 | PR c++/64266 | |
1956 | PR c++/70353 | |
1957 | * decl.c, pt.c, constexpr.c: Revert last patch. | |
1958 | ||
d7796e23 JM |
1959 | 2016-03-25 Jason Merrill <jason@redhat.com> |
1960 | Martin Liška <mliska@suse.cz> | |
1961 | ||
1962 | PR c++/64266 | |
1963 | PR c++/70353 | |
1964 | Core issue 1962 | |
1965 | * decl.c (cp_fname_init): Decay the initializer to pointer. | |
1966 | (cp_make_fname_decl): Set DECL_DECLARED_CONSTEXPR_P, | |
1967 | DECL_VALUE_EXPR, DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P. | |
1968 | Don't call cp_finish_decl. | |
1969 | * pt.c (tsubst_expr) [DECL_EXPR]: Set DECL_VALUE_EXPR, | |
1970 | DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P. Don't call cp_finish_decl. | |
1971 | * constexpr.c (cxx_eval_constant_expression) [VAR_DECL]: | |
1972 | Handle DECL_VALUE_EXPR. | |
1973 | ||
52228180 JM |
1974 | 2016-03-24 Jason Merrill <jason@redhat.com> |
1975 | ||
8a29084d JM |
1976 | PR c++/70386 |
1977 | * constexpr.c (cxx_eval_bare_aggregate): Handle PMFs. | |
1978 | ||
52228180 JM |
1979 | PR c++/70323 |
1980 | * constexpr.c (cxx_eval_call_expression): Don't cache result if | |
1981 | *overflow_p. | |
1982 | ||
887ab4e5 PP |
1983 | 2016-03-24 Patrick Palka <ppalka@gcc.gnu.org> |
1984 | ||
1985 | PR c++/62212 | |
1986 | * tree.c (build_cplus_array_type): Determine type-dependentess | |
1987 | with uses_template_parms instead of with dependent_type_p. | |
1988 | ||
426b9428 PP |
1989 | 2016-03-23 Patrick Palka <ppalka@gcc.gnu.org> |
1990 | ||
1991 | PR c++/70347 | |
1992 | * typeck.c (process_init_constructor_union): If the initializer | |
1993 | is empty, use the union's NSDMI if it has one. | |
1994 | ||
cd1588c4 PP |
1995 | 2016-03-23 Patrick Palka <ppalka@gcc.gnu.org> |
1996 | ||
1997 | PR c++/70332 | |
1998 | * pt.c (tsubst_copy) [PARM_DECL]: Handle the use of 'this' in an | |
1999 | NSDMI that's part of an aggregrate initialization. | |
2000 | ||
04833609 JJ |
2001 | 2016-03-23 Jakub Jelinek <jakub@redhat.com> |
2002 | ||
928af3bf JJ |
2003 | PR c++/70001 |
2004 | * constexpr.c (cxx_eval_vec_init_1): Reuse CONSTRUCTOR initializers | |
2005 | for 1..max even for multi-dimensional arrays. Call unshare_expr | |
2006 | on it. | |
2007 | ||
61637db3 JJ |
2008 | PR c++/70323 |
2009 | * constexpr.c (cxx_eval_constant_expression): Diagnose overflow | |
2010 | on TREE_OVERFLOW constants. | |
2011 | ||
04833609 JJ |
2012 | PR c++/70376 |
2013 | * cp-gimplify.c (genericize_omp_for_stmt): Don't walk OMP_FOR_CLAUSES | |
2014 | for OMP_TASKLOOP here. | |
2015 | (cp_genericize_r): Handle OMP_TASKLOOP like OMP_TASK, except do call | |
2016 | genericize_omp_for_stmt instead of cp_walk_tree on OMP_BODY. | |
2017 | ||
05aca4e7 AO |
2018 | 2016-03-23 Alexandre Oliva <aoliva@redhat.com> |
2019 | Jason Merrill <jason@redhat.com> | |
2020 | Jakub Jelinek <jakub@redhat.com> | |
2021 | ||
2022 | PR c++/69315 | |
2023 | * cp-tree.h (defer_mark_used_calls, deferred_mark_used_calls): Remove. | |
2024 | * decl.c (defer_mark_used_calls, deferred_mark_used_calls): Remove. | |
2025 | (finish_function): Don't set or test them. | |
2026 | * decl2.c (mark_used): Don't handle defer_mark_used_calls. | |
2027 | ||
96a4ef9d JM |
2028 | 2016-03-23 Jason Merrill <jason@redhat.com> |
2029 | ||
2030 | PR c++/70344 | |
2031 | * constexpr.c (cxx_eval_call_expression): Catch invalid recursion. | |
2032 | ||
fbdb6baf MP |
2033 | 2016-03-23 Marek Polacek <polacek@redhat.com> |
2034 | ||
2035 | PR c++/69884 | |
2036 | * pt.c (canonicalize_type_argument): Use OPT_Wignored_attributes. | |
2037 | ||
6cedf922 IE |
2038 | 2016-03-22 Ilya Enkovich <enkovich.gnu@gmail.com> |
2039 | ||
2040 | * call.c (build_conditional_expr_1): Always use original | |
2041 | condition type for vector type checks and build. | |
2042 | ||
16f6d7dc PP |
2043 | 2016-03-22 Patrick Palka <ppalka@gcc.gnu.org> |
2044 | ||
2045 | PR c++/70096 | |
2046 | * pt.c (tsubst_decl): Clear the DECL_MODE of the new decl. | |
2047 | ||
a3e2b438 PP |
2048 | 2016-03-22 Patrick Palka <ppalka@gcc.gnu.org> |
2049 | ||
2050 | PR c++/70204 | |
2051 | * constexpr.c (non_const_var_error): Check | |
2052 | DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P. | |
2053 | ||
ad779205 RH |
2054 | 2016-03-21 Richard Henderson <rth@redhat.com> |
2055 | ||
2056 | PR c++/70273 | |
2057 | * decl.c (notice_forced_label_r): New. | |
2058 | (cp_finish_decl): Use it. | |
2059 | ||
683b8101 JM |
2060 | 2016-03-21 Jason Merrill <jason@redhat.com> |
2061 | ||
2062 | PR c++/70285 | |
2063 | * cp-gimplify.c (cp_fold) [COND_EXPR]: Handle bit-fields. | |
2064 | ||
eb0dbdc7 JM |
2065 | 2016-03-18 Jason Merrill <jason@redhat.com> |
2066 | ||
86461cad JM |
2067 | PR c++/70139 |
2068 | * constexpr.c (cxx_eval_call_expression): Fix trivial copy. | |
2069 | ||
b5a28d80 JM |
2070 | PR c++/70147 |
2071 | * class.c (vptr_via_virtual_p): New. | |
2072 | (most_primary_binfo): Factor out of build_rtti_vtbl_entries. | |
2073 | * cp-ubsan.c (cp_ubsan_dfs_initialize_vtbl_ptrs): Don't clear | |
2074 | a vptr from any virtual base in a not-in-charge 'structor. | |
2075 | ||
bf08acda JM |
2076 | * decl.c (build_clobber_this): Factor out of |
2077 | start_preparsed_function and begin_destructor_body. Handle | |
2078 | virtual bases better. | |
2079 | ||
eb0dbdc7 JM |
2080 | * class.c (build_if_in_charge): Split out from build_base_path. |
2081 | * init.c (expand_virtual_init, expand_default_init): Use it. | |
2082 | * call.c (build_special_member_call): Use it. | |
2083 | ||
dd125026 JJ |
2084 | 2016-03-18 Jakub Jelinek <jakub@redhat.com> |
2085 | ||
2086 | PR c++/70267 | |
2087 | * init.c (build_new_1): Complain and return error_mark_node | |
2088 | if alloc_fn is not _Jv_AllocObject function returning pointer. | |
2089 | ||
91914f0a PP |
2090 | 2016-03-18 Patrick Palka <ppalka@gcc.gnu.org> |
2091 | ||
2092 | PR c++/70205 | |
2093 | * search.c (adjust_result_of_qualified_name_lookup): Don't | |
2094 | update the BASELINK_BINFO of DECL if the second call | |
2095 | to lookup_base fails. | |
2096 | ||
753a8910 PP |
2097 | 2016-03-18 Patrick Palka <ppalka@gcc.gnu.org> |
2098 | ||
2099 | PR c++/70218 | |
2100 | * parser.c (cp_parser_lambda_expression): Move call to | |
2101 | pop_deferring_access_checks ahead of the call to | |
2102 | cp_parser_end_tentative_firewall. | |
2103 | ||
a3aad0e6 JJ |
2104 | 2016-03-17 Jakub Jelinek <jakub@redhat.com> |
2105 | ||
17366700 JJ |
2106 | PR c++/70144 |
2107 | * cp-tree.h (magic_varargs_p): Return int instead of bool. | |
2108 | * call.c (magic_varargs_p): Return int instead of bool, return 2 for | |
2109 | Cilk+ reductions, otherwise 1 for magic varargs and 0 for normal | |
2110 | varargs. | |
2111 | (build_over_call): If magic_varargs_p == 2, call reject_gcc_builtin, | |
2112 | if magic_varargs_p == 1, call decay_conversion | |
2113 | instead of mark_type_use. Don't store error_mark_node arguments to | |
2114 | argarray, instead return error_mark_node. | |
2115 | ||
a3aad0e6 JJ |
2116 | PR c++/70272 |
2117 | * decl.c (begin_destructor_body): Don't insert clobber if | |
2118 | is_empty_class (current_class_type). | |
2119 | ||
b1970801 MP |
2120 | 2016-03-17 Marek Polacek <polacek@redhat.com> |
2121 | ||
2122 | PR c++/70194 | |
2123 | * typeck.c (warn_for_null_address): New function. | |
2124 | (cp_build_binary_op): Call it. | |
2125 | ||
c5e003cf JM |
2126 | 2016-03-16 Jason Merrill <jason@redhat.com> |
2127 | ||
2128 | PR c++/70259 | |
2129 | * decl.c (start_preparsed_function): Don't clobber an empty base. | |
2130 | ||
1935f250 JJ |
2131 | 2016-03-16 Jakub Jelinek <jakub@redhat.com> |
2132 | ||
6651c93e JJ |
2133 | PR c++/70147 |
2134 | * cp-ubsan.c (cp_ubsan_dfs_initialize_vtbl_ptrs): Conditionalize | |
2135 | BINFO_VIRTUAL_P vtable clearing on current_in_charge_parm. | |
2136 | ||
1935f250 JJ |
2137 | PR c++/70147 |
2138 | * cp-ubsan.c (cp_ubsan_maybe_initialize_vtbl_ptrs): Temporarily | |
2139 | set in_base_initializer. | |
2140 | ||
42c729c5 MP |
2141 | 2016-03-15 Marek Polacek <polacek@redhat.com> |
2142 | ||
2143 | PR c++/70209 | |
2144 | * tree.c (strip_typedefs): Call strip_typedefs again on the | |
2145 | DECL_ORIGINAL_TYPE result. | |
2146 | ||
3f91db69 JM |
2147 | 2016-03-15 Jason Merrill <jason@redhat.com> |
2148 | ||
d1ccf407 JM |
2149 | PR c++/70095 |
2150 | * pt.c (instantiate_decl): Fix call to variable_template_p. | |
2151 | ||
3f91db69 JM |
2152 | PR c++/70141 |
2153 | * pt.c (for_each_template_parm_r): Always walk into TYPENAME_TYPE. | |
2154 | ||
598a208c CC |
2155 | 2016-03-14 Casey Carter <casey@carter.net> |
2156 | Jason Merrill <jason@redhat.com> | |
2157 | ||
08a1cadc | 2158 | P0184R0: Generalizing the Range-Based For Loop |
598a208c CC |
2159 | * parser.c (cp_convert_range_for): Set the type of __end separately. |
2160 | (cp_parser_perform_range_for_lookup): Allow different begin/end | |
2161 | types if they are comparable. | |
2162 | ||
3f1e5d3a PP |
2163 | 2016-03-12 Patrick Palka <ppalka@gcc.gnu.org> |
2164 | ||
2165 | PR c++/70106 | |
2166 | * semantics.c (force_paren_expr): Just build a PAREN_EXPR when | |
2167 | processing_template_decl and EXPR is a SCOPE_REF. | |
2168 | ||
b87a8d7d PP |
2169 | 2016-03-10 Patrick Palka <ppalka@gcc.gnu.org> |
2170 | Jakub Jelinek <jakub@redhat.com> | |
2171 | ||
2172 | PR c++/70001 | |
2173 | * constexpr.c (cxx_eval_vec_init_1): For pre_init case, reuse | |
2174 | return value from cxx_eval_constant_expression from earlier | |
2175 | elements if it is valid constant initializer requiring no | |
2176 | relocations. | |
2177 | ||
d49b0aa0 MP |
2178 | 2016-03-10 Marek Polacek <polacek@redhat.com> |
2179 | ||
2180 | PR c++/70153 | |
2181 | * cp-gimplify.c (cp_fold): Handle UNARY_PLUS_EXPR. | |
2182 | ||
96b3c82d CP |
2183 | 2016-03-09 Cesar Philippidis <cesar@codesourcery.com> |
2184 | ||
2185 | * parser.c (cp_parser_oacc_loop): Update cclauses and clauses | |
2186 | when calling c_finish_omp_clauses. | |
2187 | ||
1e546b68 JM |
2188 | 2016-03-08 Jason Merrill <jason@redhat.com> |
2189 | ||
80aac5c8 JM |
2190 | * parser.c (cp_parser_diagnose_invalid_type_name): Give helpful |
2191 | diagnostic for use of "concept". | |
2192 | (cp_parser_requires_clause_opt): And "requires". | |
2193 | (cp_parser_type_parameter, cp_parser_late_return_type_opt) | |
2194 | (cp_parser_explicit_template_declaration): Adjust. | |
2195 | * Make-lang.in (check-c++-all): Add "concepts" to std list. | |
2196 | ||
1e546b68 JM |
2197 | P0036R0: Unary Folds and Empty Parameter Packs |
2198 | * pt.c (expand_empty_fold): Remove special cases for *,+,&,|. | |
2199 | ||
56aae4b7 JJ |
2200 | 2016-03-08 Jakub Jelinek <jakub@redhat.com> |
2201 | ||
d259b234 JJ |
2202 | PR c++/70135 |
2203 | * constexpr.c (cxx_eval_loop_expr): Forget saved values of SAVE_EXPRs | |
2204 | even after the last iteration of the loop. | |
2205 | ||
56aae4b7 JJ |
2206 | * decl.c (duplicate_decls): Fix spelling - becuase -> because. |
2207 | ||
dbb23418 PP |
2208 | 2016-03-07 Patrick Palka <ppalka@gcc.gnu.org> |
2209 | ||
2210 | PR c++/66786 | |
2211 | * pt.c (get_template_info): Handle PARM_DECL. | |
2212 | (template_class_depth): Check DECL_P instead of | |
2213 | VAR_OR_FUNCTION_DECL_P. | |
2214 | ||
d96e8407 JM |
2215 | 2016-03-05 Jason Merrill <jason@redhat.com> |
2216 | ||
2217 | PR c++/67364 | |
2218 | * constexpr.c (cxx_eval_store_expression): Replace | |
2219 | CONSTRUCTOR_ELTS in nested CONSTRUCTORs, too. | |
2220 | ||
7a3a3fad PP |
2221 | 2016-03-05 Patrick Palka <ppalka@gcc.gnu.org> |
2222 | ||
2223 | PR c++/66786 | |
2224 | * pt.c (template_class_depth): Given a lambda type, iterate | |
2225 | into its LAMBDA_TYPE_EXTRA_SCOPE field instead of its | |
2226 | TYPE_CONTEXT. Given a VAR_DECL, iterate into its | |
2227 | CP_DECL_CONTEXT. | |
2228 | ||
d5bcd6d4 JM |
2229 | 2016-03-04 Jason Merrill <jason@redhat.com> |
2230 | ||
2231 | PR c++/69203 | |
2232 | * cp-tree.h (COND_EXPR_IS_VEC_DELETE): New. | |
2233 | * init.c (build_vec_delete_1): Set it. | |
2234 | * constexpr.c (potential_constant_expression_1) [COND_EXPR]: Check it. | |
2235 | ||
0c8825de JJ |
2236 | 2016-03-04 Jakub Jelinek <jakub@redhat.com> |
2237 | ||
411d61c4 JJ |
2238 | * decl.c (start_preparsed_function): Don't emit start clobber at the |
2239 | start of constructor clones. | |
2240 | ||
0c8825de JJ |
2241 | PR c++/70035 |
2242 | * cp-tree.h (cp_ubsan_maybe_initialize_vtbl_ptrs): New prototype. | |
2243 | * decl.c (start_preparsed_function): Call | |
2244 | cp_ubsan_maybe_initialize_vtbl_ptrs if needed. | |
2245 | * cp-ubsan.c (cp_ubsan_dfs_initialize_vtbl_ptrs, | |
2246 | cp_ubsan_maybe_initialize_vtbl_ptrs): New functions. | |
2247 | ||
b54eff8b JM |
2248 | 2016-03-04 Jason Merrill <jason@redhat.com> |
2249 | ||
188e53bd JM |
2250 | PR c++/67364 |
2251 | * constexpr.c (cxx_eval_component_reference): Further tweak. | |
2252 | ||
39dce2b7 JM |
2253 | * constexpr.c (struct constexpr_ctx): Add save_exprs field. |
2254 | (cxx_eval_loop_expr): Discard SAVE_EXPR values before looping. | |
2255 | (cxx_eval_constant_expression) [SAVE_EXPR]: Add it to the set. | |
2256 | (cxx_eval_outermost_constant_expr, is_sub_constant_expr): Initialize. | |
2257 | ||
b54eff8b JM |
2258 | PR c++/70067 |
2259 | * tree.c (strip_typedefs): Handle TYPENAME_TYPE lookup finding the | |
2260 | same type. | |
2261 | ||
639475f0 JM |
2262 | 2016-03-03 Jason Merrill <jason@redhat.com> |
2263 | ||
b47d1d90 JM |
2264 | * method.c (synthesized_method_walk): operator= can also be constexpr. |
2265 | ||
a0a6a8c9 JM |
2266 | * pt.c (tsubst_copy_and_build) [LAMBDA_EXPR]: Get |
2267 | LAMBDA_EXPR_RETURN_TYPE from the instantiated closure. | |
2268 | ||
264fd142 JM |
2269 | PR c++/67164 |
2270 | * pt.c (copy_template_args): New. | |
2271 | (tsubst_pack_expansion): Use it. | |
2272 | ||
45c3e69b JM |
2273 | * call.c (build_aggr_conv): Use get_nsdmi. |
2274 | ||
16dc6b17 JM |
2275 | PR c++/51406 |
2276 | * typeck.c (build_static_cast_1): Avoid folding back to lvalue. | |
2277 | ||
639475f0 JM |
2278 | PR c++/67364 |
2279 | * constexpr.c (cxx_eval_component_reference): Just return an empty | |
2280 | CONSTRUCTOR for an empty class. | |
2281 | ||
7f0e23e9 JM |
2282 | 2016-03-01 Jason Merrill <jason@redhat.com> |
2283 | ||
5c969cb8 JM |
2284 | PR c++/70036 |
2285 | * parser.c (cp_parser_requires_clause): Call | |
2286 | check_for_bare_parameter_packs. | |
2287 | ||
c8a66fc9 JM |
2288 | PR c++/51489 |
2289 | * constexpr.c (cxx_eval_binary_expression): Don't VERIFY_CONSTANT | |
2290 | the operands. | |
2291 | ||
7f0e23e9 JM |
2292 | PR c++/69995 |
2293 | * constexpr.c (cxx_eval_call_expression): Unshare arg. | |
2294 | (cxx_eval_constant_expression) [DECL_EXPR]: Unshare init. | |
2295 | [TARGET_EXPR]: Unshare init. | |
2296 | ||
76d881bf PP |
2297 | 2016-03-01 Patrick Palka <ppalka@gcc.gnu.org> |
2298 | ||
2299 | PR c++/68948 | |
2300 | PR c++/69961 | |
2301 | * pt.c (tsubst_baselink): Reinstate the check for an invalid | |
2302 | constructor call. | |
2303 | ||
7574c916 JM |
2304 | 2016-02-28 Jason Merrill <jason@redhat.com> |
2305 | ||
2306 | PR c++/69995 | |
2307 | * constexpr.c (cxx_eval_store_expression): Unshare init. | |
2308 | ||
56cde077 JM |
2309 | 2016-02-26 Jason Merrill <jason@redhat.com> |
2310 | ||
2311 | PR c++/69958 | |
2312 | * pt.c (make_argument_pack): New. | |
2313 | (tsubst_copy) [SIZEOF_EXPR]: Handle partial expansion. | |
2314 | (tsubst_copy_and_build): Likewise. | |
2315 | ||
6284a979 JM |
2316 | 2016-02-25 Jason Merrill <jason@redhat.com> |
2317 | ||
8ba8c375 JM |
2318 | PR c++/69889 |
2319 | * cp-tree.h (AGGR_INIT_FROM_THUNK_P): New. | |
2320 | * tree.c (build_aggr_init_expr): Set it. | |
2321 | * semantics.c (simplify_aggr_init_expr): Check it. | |
2322 | * cp-gimplify.c (cp_genericize_r): Don't walk into | |
2323 | a call/aggr_init from a thunk. | |
2324 | ||
bd28a34f JM |
2325 | PR c++/69842 |
2326 | * method.c (forward_parm): Handle parameter packs. | |
2327 | * lambda.c (maybe_add_lambda_conv_op): Use it for them. | |
2328 | ||
6a0cc1cd JM |
2329 | PR c++/67364 |
2330 | * constexpr.c (cxx_eval_component_reference): Don't complain about | |
2331 | unevaluated empty classes. | |
2332 | ||
6284a979 JM |
2333 | PR c++/68049 |
2334 | * tree.c (strip_typedefs): Use DECL_ORIGINAL_TYPE. | |
2335 | ||
1137001c PP |
2336 | 2016-02-25 Patrick Palka <ppalka@gcc.gnu.org> |
2337 | ||
2338 | PR c++/69736 | |
2339 | * cp-tree.h (REF_PARENTHESIZED_P): Adjust documentation. | |
2340 | (maybe_undo_parenthesized_ref): Declare. | |
2341 | * semantics.c (maybe_undo_parenthesized_ref): Split out from | |
2342 | check_return_expr. | |
2343 | (finish_call_expr): Use it. | |
2344 | * typeck.c (check_return_expr): Use it. | |
2345 | * pt.c (tsubst_copy_and_build) [INDIRECT_REF]: Retain the | |
2346 | REF_PARENTHESIZED_P flag. | |
2347 | ||
03ca8fb3 JJ |
2348 | 2016-02-24 Jakub Jelinek <jakub@redhat.com> |
2349 | ||
2350 | PR c++/69922 | |
2351 | * class.c (build_base_path): Set TREE_NO_WARNING on the null_test. | |
2352 | Avoid folding it. | |
2353 | * init.c (build_vec_delete_1, build_delete): Don't fold the non-NULL | |
2354 | tests. | |
2355 | * cp-gimplify.c (cp_fold): For TREE_NO_WARNING comparisons with NULL, | |
2356 | unless they are folded into INTEGER_CST, error_mark_node or some | |
2357 | comparison with NULL, avoid folding them and use either the original | |
2358 | comparison or non-folded comparison of folded arguments. | |
2359 | * cp-ubsan.c (cp_ubsan_instrument_vptr): Set TREE_NO_WARNING on the | |
2360 | comparison, don't fold the comparison right away. | |
2361 | ||
944e9f5f JM |
2362 | 2016-02-24 Jason Merrill <jason@redhat.com> |
2363 | ||
2364 | PR c++/69323 | |
2365 | * friend.c (make_friend_class): Likewise. | |
2366 | * decl.c (lookup_and_check_tag): Diagnose invalid dependent friend. | |
2367 | ||
b8599b68 JM |
2368 | 2016-02-24 Jason Merrill <jason@redhat.com> |
2369 | ||
2370 | PR c++/69323 | |
2371 | * pt.c (instantiate_class_template_1): Set | |
2372 | processing_template_decl before substituting friend_type. | |
2373 | ||
3b96b93a MS |
2374 | 016-02-24 Martin Sebor <msebor@redhat.com> |
2375 | ||
2376 | PR c++/69912 | |
2377 | * tree.c (build_ctor_subob_ref): Compare types' main variants | |
2378 | instead of the types as they are. | |
2379 | ||
28577b86 JM |
2380 | 2016-02-24 Jason Merrill <jason@redhat.com> |
2381 | ||
a021961c JM |
2382 | * decl.c (start_preparsed_function): Condition ctor clobber on |
2383 | flag_lifetime_dse > 1. | |
2384 | ||
28577b86 JM |
2385 | * cp-gimplify.c (cp_fold): Don't fold constexpr calls if -fno-inline. |
2386 | ||
2207c599 JM |
2387 | 2016-02-19 Jason Merrill <jason@redhat.com> |
2388 | ||
2389 | PR c++/69743 | |
2390 | * call.c (remaining_arguments): No longer static. | |
2391 | * cp-tree.h: Declare it. | |
2392 | * pt.c (more_specialized_fn): Use it. | |
2393 | ||
3a27b4db JJ |
2394 | 2016-02-19 Jakub Jelinek <jakub@redhat.com> |
2395 | Bernd Edlinger <bernd.edlinger@hotmail.de> | |
2396 | ||
2397 | * Make-lang.in: Invoke gperf with -L C++. | |
2398 | * cfns.gperf: Remove prototypes for hash and libc_name_p | |
2399 | inlines. | |
2400 | * cfns.h: Regenerated. | |
2401 | * except.c (nothrow_libfn_p): Adjust. | |
2402 | ||
7a965d51 JJ |
2403 | 2016-02-19 Jakub Jelinek <jakub@redhat.com> |
2404 | ||
2405 | PR c++/69850 | |
2406 | * rtti.c (ifnonnull): Set TREE_NO_WARNING on the condition, use | |
2407 | NE_EXPR instead of EQ_EXPR and swap last two arguments on COND_EXPR. | |
2408 | ||
200e869c PP |
2409 | 2016-02-19 Patrick Palka <ppalka@gcc.gnu.org> |
2410 | ||
2411 | PR c++/68948 | |
2412 | * pt.c (tsubst_baselink): Don't diagnose an invalid constructor | |
2413 | call here. | |
2414 | * semantics.c (finish_call_expr): Don't assume a constructor | |
2415 | call is dependent if only the "this" pointer is dependent. When | |
2416 | building a constructor call, always use a dummy object. | |
2417 | ||
19e21586 JJ |
2418 | 2016-02-19 Jakub Jelinek <jakub@redhat.com> |
2419 | ||
03a616ac JJ |
2420 | PR c++/69850 |
2421 | * init.c (build_vec_delete_1): Set TREE_NO_WARNING on the NE_EXPR | |
2422 | condition. | |
2423 | * cp-gimplify.c (cp_fold): Propagate TREE_NO_WARNING from binary | |
2424 | operators if folding preserved the binop, just with different | |
2425 | arguments. | |
2426 | ||
19e21586 JJ |
2427 | PR c++/67767 |
2428 | * parser.c (cp_parser_std_attribute_spec_seq): Don't assume | |
2429 | attr_spec is always single element chain, chain all the attributes | |
2430 | properly together in the right order. | |
2431 | ||
747b61fc JM |
2432 | 2016-02-18 Jason Merrill <jason@redhat.com> |
2433 | ||
2434 | * mangle.c (maybe_check_abi_tags): Add for_decl parm. Call | |
2435 | mangle_decl. | |
2436 | (mangle_decl): Call maybe_check_abi_tags for function scope. | |
2437 | (mangle_guard_variable): Call maybe_check_abi_tags here. | |
2438 | (write_guarded_var_name): Not here. | |
2439 | ||
50ccdf5b JM |
2440 | 2016-02-17 Jason Merrill <jason@redhat.com> |
2441 | ||
fa837fb6 JM |
2442 | PR c++/65985 |
2443 | * constexpr.c (build_constexpr_constructor_member_initializers): | |
2444 | Handle an additional STATEMENT_LIST. | |
2445 | ||
bcb5f3c9 JM |
2446 | PR c++/68585 |
2447 | * constexpr.c (cxx_eval_bare_aggregate): Fix 'changed' detection. | |
2448 | ||
50ccdf5b JM |
2449 | PR c++/68679 |
2450 | * decl2.c (reset_type_linkage_2): Look through member templates. | |
2451 | ||
932c0da4 JJ |
2452 | 2016-02-17 Jakub Jelinek <jakub@redhat.com> |
2453 | ||
2454 | PR c++/69850 | |
2455 | * init.c (build_delete): Set TREE_NO_WARNING on ifexp. | |
2456 | ||
0f02dd56 JM |
2457 | 2016-02-17 Jason Merrill <jason@redhat.com> |
2458 | ||
2459 | PR c++/69842 | |
2460 | * method.c (forward_parm): Split out from... | |
2461 | (add_one_base_init): ...here. | |
2462 | * lambda.c (maybe_add_lambda_conv_op): Use it. | |
2463 | ||
6bab4c63 JM |
2464 | 2016-02-16 Jason Merrill <jason@redhat.com> |
2465 | ||
2466 | PR c++/10200 | |
2467 | PR c++/69753 | |
2468 | * call.c, cp-tree.h, name-lookup.c, pt.c, search.c, semantics.c, | |
2469 | tree.c, typeck2.c: Revert earlier changes. | |
2470 | * parser.c (cp_parser_lookup_name): Ignore namespace-scope | |
2471 | non-type templates after -> or . | |
2472 | ||
bf14eba2 JJ |
2473 | 2016-02-16 Jakub Jelinek <jakub@redhat.com> |
2474 | ||
2475 | PR c/69835 | |
2476 | * typeck.c (cp_build_binary_op): Revert 2015-09-09 change. | |
2477 | ||
7128d6ab JM |
2478 | 2016-02-16 Jason Merrill <jason@redhat.com> |
2479 | ||
2480 | PR c++/69657 | |
2481 | * name-lookup.c (lookup_qualified_name): Add find_hidden parm. | |
2482 | (set_decl_namespace): Pass it. Complain about finding a hidden friend. | |
2483 | * name-lookup.h: Adjust. | |
2484 | ||
ba539195 JN |
2485 | 2016-02-16 James Norris <jnorris@codesourcery.com> |
2486 | ||
2487 | * parser.c (cp_parser_oacc_data_clause_deviceptr): Remove checking. | |
2488 | * semantics.c (finish_omp_clauses): Add deviceptr checking. | |
2489 | ||
f0516ca4 JJ |
2490 | 2016-02-15 Jakub Jelinek <jakub@redhat.com> |
2491 | ||
2492 | PR c++/69658 | |
2493 | * init.c (expand_default_init): Only call reshape_init | |
2494 | in the direct-initialization from an initializer list case. | |
2495 | ||
fe69277d JM |
2496 | 2016-02-15 Jason Merrill <jason@redhat.com> |
2497 | ||
2bd0a2d6 JM |
2498 | PR c++/69753 |
2499 | * semantics.c (finish_call_expr): Implicit 'this' does not make | |
2500 | the call dependent. | |
2501 | * search.c (any_dependent_bases_p): Split out... | |
2502 | * name-lookup.c (do_class_using_decl): ...from here. | |
2503 | * call.c (build_new_method_call_1): Don't complain about missing object | |
2504 | if there are dependent bases. Tweak error. | |
2505 | * tree.c (non_static_member_function_p): Remove. | |
2506 | * pt.c (type_dependent_expression_p): A member template of a | |
2507 | dependent type is dependent. | |
2508 | * cp-tree.h: Adjust. | |
2509 | ||
fe69277d JM |
2510 | PR c++/68890 |
2511 | * constexpr.c (verify_ctor_sanity): Remove CONSTRUCTOR_NELTS check. | |
2512 | ||
38d795d2 PP |
2513 | 2016-02-12 Patrick Palka <ppalka@gcc.gnu.org> |
2514 | ||
2515 | PR c++/69098 | |
2516 | * pt.c (lookup_and_finish_template_variable): New function, | |
2517 | extracted from ... | |
2518 | (tsubst_copy_and_build) [TEMPLATE_ID_EXPR]: ... here. Use it. | |
2519 | (tsubst_qualified_id): Consider that EXPR might be a variable | |
2520 | template. | |
2521 | * typeck.c (check_template_keyword): Don't emit an error | |
2522 | if DECL is a variable template. | |
2523 | ||
9c582551 JJ |
2524 | 2016-02-12 Jakub Jelinek <jakub@redhat.com> |
2525 | ||
2526 | * error.c: Spelling fixes - behaviour -> behavior and | |
2527 | neighbour -> neighbor. | |
2528 | * decl.c: Likewise. | |
2529 | * typeck.c (cp_build_binary_op): Fix up behavior spelling in | |
2530 | diagnostics. | |
2531 | * init.c (build_delete): Likewise. | |
2532 | ||
66756373 JJ |
2533 | 2016-02-11 Jakub Jelinek <jakub@redhat.com> |
2534 | ||
2535 | PR c/69768 | |
2536 | * typeck.c (cp_build_binary_op): cp_fully_fold integer_zerop | |
2537 | arguments for -Waddress warning. Fix up formatting. | |
2538 | ||
0d7d9458 PC |
2539 | 2016-02-11 Paolo Carlini <paolo.carlini@oracle.com> |
2540 | ||
2541 | PR c++/68726 | |
2542 | * pt.c (lookup_template_class_1): Check tsubst return value for | |
2543 | error_mark_node. | |
2544 | ||
3a4219ca JM |
2545 | 2016-02-10 Jason Merrill <jason@redhat.com> |
2546 | ||
46f0d909 JM |
2547 | PR c++/68926 |
2548 | * pt.c (resolve_nondeduced_context): Add complain parm. | |
2549 | (do_auto_deduction): Pass it. | |
2550 | * cvt.c (convert_to_void): Likewise. | |
2551 | * decl.c (cp_finish_decl): Likewise. | |
2552 | * init.c (build_new): Likewise. | |
2553 | * rtti.c (get_tinfo_decl_dynamic): Likewise. | |
2554 | * semantics.c (finish_decltype_type): Likewise. | |
2555 | * typeck.c (decay_conversion): Likewise. | |
2556 | * cp-tree.h: Adjust declaration. | |
2557 | * call.c (standard_conversion): Add complain parm, pass it along. | |
2558 | (implicit_conversion): Pass it. | |
2559 | ||
89908c8f JM |
2560 | PR c++/69657 |
2561 | * name-lookup.c (ambiguous_decl): Call remove_hidden_names. | |
2562 | (lookup_name_real_1): Likewise. | |
2563 | (remove_hidden_names): Handle non-functions too. | |
2564 | ||
ff2faafc JM |
2565 | PR c++/10200 |
2566 | * parser.c (cp_parser_lookup_name): When looking for a template | |
2567 | after . or ->, only consider class templates. | |
2568 | (cp_parser_postfix_dot_deref_expression): Handle the current | |
2569 | instantiation. Remember a dependent object expression. | |
2570 | * typeck2.c (build_x_arrow): Handle the current instantiation. | |
2571 | ||
3a4219ca JM |
2572 | * ptree.c (debug_tree): Implement for cp_expr. |
2573 | ||
efb45a9f PP |
2574 | 2016-02-08 Patrick Palka <ppalka@gcc.gnu.org> |
2575 | ||
2576 | PR c++/69139 | |
2577 | * parser.c (cp_parser_simple_type_specifier): Make the check | |
2578 | for disambiguating between an 'auto' placeholder and an implicit | |
2579 | template parameter more robust. | |
2580 | ||
20a0c6f9 PP |
2581 | 2016-02-08 Patrick Palka <ppalka@gcc.gnu.org> |
2582 | ||
2583 | PR c++/69283 | |
2584 | PR c++/67835 | |
2585 | * decl2.c (mark_used): When given a TEMPLATE_DECL, return after | |
2586 | setting its TREE_USED flag. | |
2587 | ||
1374a761 JM |
2588 | 2016-02-08 Jason Merrill <jason@redhat.com> |
2589 | ||
2590 | PR c++/69657 | |
2591 | * name-lookup.c (do_nonmember_using_decl): Leave anticipated | |
2592 | built-ins alone. | |
2593 | ||
f68bc23f JJ |
2594 | 2016-02-08 Jakub Jelinek <jakub@redhat.com> |
2595 | ||
2596 | PR c++/59627 | |
2597 | * parser.c (cp_parser_omp_declare_reduction): Set assembler name | |
2598 | of the DECL_OMP_DECLARE_REDUCTION_P decls. | |
2599 | ||
eba9e839 MP |
2600 | 2016-02-08 Marek Polacek <polacek@redhat.com> |
2601 | ||
2602 | PR c++/69688 | |
2603 | * constexpr.c (clear_cv_and_fold_caches): Renamed from clear_cv_cache. | |
2604 | Call clear_fold_cache. | |
2605 | * cp-tree.h: Adjust declaration. | |
2606 | * decl.c (finish_enum_value_list): Call clear_cv_and_fold_caches | |
2607 | rather than clear_cv_cache and clear_fold_cache. | |
2608 | * typeck2.c (store_init_value): Call clear_cv_and_fold_caches. | |
2609 | ||
415594bb JM |
2610 | 2016-02-08 Jason Merrill <jason@redhat.com> |
2611 | ||
2612 | * cp-tree.h (CONV_FOLD, CONV_BACKEND_CONVERT): New. | |
2613 | * cvt.c (convert): Pass CONV_BACKEND_CONVERT. | |
2614 | (ocp_convert): Use *_maybe_fold. | |
2615 | (cp_convert_to_pointer): Add dofold parameter. | |
2616 | * cp-gimplify.c (cp_fold) [CONVERT_EXPR]: Call convert. | |
2617 | ||
46cb9332 MS |
2618 | 2016-02-05 Martin Sebor <msebor@redhat.com> |
2619 | ||
2620 | PR c++/69662 | |
2621 | * init.c (find_field_init): New function. | |
2622 | (warn_placement_new_too_small): Call it. Handle one-element arrays | |
2623 | at ends of structures special. | |
2624 | ||
0fd9d492 JM |
2625 | 2016-02-05 Jason Merrill <jason@redhat.com> |
2626 | ||
2627 | PR c++/68948 | |
2628 | * semantics.c (finish_expr_stmt): If expr is error_mark_node, | |
2629 | make sure we've seen_error(). | |
2630 | ||
76c85fbb PP |
2631 | 2016-02-05 Patrick Palka <ppalka@gcc.gnu.org> |
2632 | ||
2633 | PR c++/68948 | |
2634 | * pt.c (tsubst_baselink): Diagnose an invalid constructor call | |
2635 | if lookup_fnfields returns NULL_TREE and the name being looked | |
2636 | up has the form A::A. | |
2637 | ||
618d6c1c PP |
2638 | 2016-02-04 Patrick Palka <ppalka@gcc.gnu.org> |
2639 | ||
2640 | * constexpr.c (cxx_eval_binary_expression): Fold equality | |
2641 | comparisons involving PTRMEM_CSTs. | |
2642 | ||
d1243d27 JJ |
2643 | 2016-02-04 Jakub Jelinek <jakub@redhat.com> |
2644 | ||
2645 | * class.c (find_flexarrays): Don't declare dom variable. | |
2646 | (diagnose_flexarray): Likewise. | |
2647 | ||
05dd97db MS |
2648 | 2016-02-02 Martain Sebor <msebor@redhat.com> |
2649 | ||
2650 | PR c++/69251 | |
2651 | PR c++/69253 | |
2652 | PR c++/69290 | |
2653 | PR c++/69277 | |
2654 | PR c++/69349 | |
2655 | * class.c (walk_subobject_offsets): Avoid testing the upper bound | |
2656 | of a flexible array member for equality to null. | |
2657 | (find_flexarrays): Remove spurious whitespace introduced in r231665. | |
2658 | (diagnose_flexarrays): Avoid checking the upper bound of arrays. | |
2659 | (check_flexarrays): Same. | |
2660 | * decl.c (compute_array_index_type): Avoid special case for flexible | |
2661 | array members. | |
2662 | (grokdeclarator): Avoid calling compute_array_index_type for flexible | |
2663 | array members. | |
2664 | * error.c (dump_type_suffix): Revert changes introduced in r231665 | |
2665 | and rendered unnecessary by the changes above. | |
2666 | * pt.c (tsubst): Same. | |
2667 | * tree.c (build_ctor_subob_ref): Handle flexible array members. | |
2668 | * typeck2.c (digest_init_r): Revert changes introduced in r231665. | |
2669 | (process_init_constructor_array): Same. | |
2670 | (process_init_constructor_record): Same. | |
2671 | ||
ab4bae0c PP |
2672 | 2016-02-03 Patrick Palka <ppalka@gcc.gnu.org> |
2673 | ||
2674 | PR c++/69056 | |
2675 | * pt.c (try_one_overload): Handle comparing argument packs so | |
2676 | that there is no conflict if we deduced more arguments of an | |
2677 | argument pack than were explicitly specified. | |
2678 | ||
75a27d35 JJ |
2679 | 2016-01-31 Jakub Jelinek <jakub@redhat.com> |
2680 | Jason Merrill <jason@redhat.com> | |
2681 | ||
2682 | PR c++/68763 | |
2683 | * tree.c (strip_typedefs) [FUNCTION_TYPE]: Avoid building a new | |
2684 | function type if nothing is changing. | |
2685 | ||
b676a079 JM |
2686 | 2016-01-31 Jason Merrill <jason@redhat.com> |
2687 | ||
6978c505 JM |
2688 | PR c++/69009 |
2689 | * pt.c (partial_specialization_p, impartial_args): New. | |
2690 | (instantiate_decl): Call impartial_args. | |
2691 | ||
b1568582 JM |
2692 | * mangle.c (maybe_check_abi_tags): New. |
2693 | (write_guarded_var_name): Call it. | |
2694 | (mangle_ref_init_variable): Call check_abi_tags. | |
2695 | ||
b676a079 JM |
2696 | * pt.c (lookup_template_class_1): Don't share TYPE_ATTRIBUTES |
2697 | between template and instantiation. | |
2698 | ||
16b77b32 JJ |
2699 | 2016-01-29 Jakub Jelinek <jakub@redhat.com> |
2700 | ||
2701 | PR debug/66869 | |
2702 | * decl.c (wrapup_globals_for_namespace): Warn about unused static | |
2703 | function declarations. | |
2704 | ||
5453bfed MP |
2705 | 2016-01-29 Marek Polacek <polacek@redhat.com> |
2706 | ||
2707 | PR c++/69509 | |
2708 | PR c++/69516 | |
2709 | * constexpr.c (cxx_eval_array_reference): Give the "array subscript | |
2710 | out of bound" error earlier. | |
2711 | * init.c (build_vec_init): Change NE_EXPR into GT_EXPR. Update the | |
2712 | commentary. | |
2713 | ||
e9f69069 PP |
2714 | 2016-01-29 Patrick Palka <ppalka@gcc.gnu.org> |
2715 | ||
2716 | * name-lookup.c (begin_scope): After reusing a cp_binding_level | |
2717 | structure, update free_binding_level before the structure's | |
2718 | level_chain field gets cleared, not after. | |
2719 | ||
e448880c JM |
2720 | 2016-01-28 Jason Merrill <jason@redhat.com> |
2721 | ||
2722 | PR c++/67407 | |
2723 | * search.c (dfs_walk_once, dfs_walk_once_r) | |
2724 | (dfs_walk_once_accessible_r, dfs_walk_once_accessible): Use | |
2725 | hash_set instead of BINFO_MARKED. | |
2726 | (dfs_unmark_r): Remove. | |
2727 | ||
2b4f7b94 PP |
2728 | 2016-01-28 Patrick Palka <ppalka@gcc.gnu.org> |
2729 | ||
2730 | PR c++/24208 | |
2731 | * parser.c (LEXER_DEBUGGING_ENABLED_P): New macro. | |
2732 | (cp_lexer_debugging_p): Use it. | |
2733 | (cp_lexer_start_debugging): Likewise. | |
2734 | (cp_lexer_stop_debugging): Likewise. | |
2735 | ||
fa74a4bc MP |
2736 | 2016-01-27 Marek Polacek <polacek@redhat.com> |
2737 | ||
2738 | PR c/68062 | |
2739 | * typeck.c (cp_build_binary_op): Promote operand to unsigned, if | |
2740 | needed. Add -Wsign-compare warning. | |
2741 | ||
5d70666e RB |
2742 | 2016-01-27 Ryan Burn <contact@rnburn.com> |
2743 | ||
2744 | PR cilkplus/69267 | |
2745 | * cp-gimplify.c (cilk_cp_gimplify_call_params_in_spawned_fn): Removed | |
2746 | superfluous post_p argument in call to | |
2747 | cilk_gimplify_call_params_in_spawned_fn. | |
2748 | ||
05bf54c3 MP |
2749 | 2016-01-27 Marek Polacek <polacek@redhat.com> |
2750 | ||
2751 | PR c++/69379 | |
2752 | * constexpr.c (cxx_eval_constant_expression): Handle PTRMEM_CSTs | |
2753 | wrapped in NOP_EXPRs. | |
2754 | ||
60214d0d MS |
2755 | 2016-01-27 Martin Sebor <msebor@redhat.com> |
2756 | ||
2757 | PR c++/69317 | |
2758 | * mangle.c (mangle_decl): Reference the correct (saved) version | |
2759 | of the ABI in -Wabi diagnostics. | |
2760 | ||
95e3030c MP |
2761 | 2016-01-27 Marek Polacek <polacek@redhat.com> |
2762 | ||
2763 | PR c++/69496 | |
2764 | * constexpr.c (cxx_eval_array_reference): Evaluate the number of | |
2765 | elements of the array. | |
2766 | ||
ca30abcd JM |
2767 | 2016-01-26 Jason Merrill <jason@redhat.com> |
2768 | ||
2769 | PR c++/68949 | |
2770 | * constexpr.c (register_constexpr_fundef): Keep the un-massaged body. | |
2771 | (cxx_eval_call_expression): Don't look through clones. | |
2772 | * optimize.c (maybe_clone_body): Clear DECL_SAVED_TREE of the alias. | |
2773 | * semantics.c (expand_or_defer_fn_1): Keep DECL_SAVED_TREE of | |
2774 | maybe-in-charge *tor. | |
2775 | ||
2d63bc39 JM |
2776 | 2016-01-26 Jason Merrill <jason@redhat.com> |
2777 | ||
2778 | PR c++/68782 | |
2779 | * constexpr.c (cxx_eval_bare_aggregate): Update TREE_CONSTANT | |
2780 | and TREE_SIDE_EFFECTS. | |
2781 | (cxx_eval_constant_expression) [CONSTRUCTOR]: Call | |
2782 | verify_constructor_flags. | |
2783 | ||
476805ae JJ |
2784 | 2016-01-26 Jakub Jelinek <jakub@redhat.com> |
2785 | ||
2786 | PR c++/68357 | |
2787 | * cp-gimplify.c (cp_fold): If some operand folds to error_mark_node, | |
2788 | return error_mark_node instead of building trees with error_mark_node | |
2789 | operands. | |
2790 | ||
01e1dea3 DM |
2791 | 2016-01-26 David Malcolm <dmalcolm@redhat.com> |
2792 | ||
2793 | PR other/69006 | |
2794 | * error.c (print_instantiation_partial_context_line): Add missing | |
2795 | newlines from output for the t == NULL case. | |
2796 | (print_instantiation_partial_context): Remove call to pp_newline. | |
2797 | ||
a59b92b0 PP |
2798 | 2016-01-24 Patrick Palka <ppalka@gcc.gnu.org> |
2799 | ||
2800 | Revert: | |
2801 | 2016-01-18 Patrick Palka <ppalka@gcc.gnu.org> | |
2802 | ||
2803 | PR c++/11858 | |
2804 | PR c++/24663 | |
2805 | PR c++/24664 | |
2806 | * decl.c (grokdeclarator): Don't decay array parameter type to | |
2807 | a pointer type if it's dependent. | |
2808 | (grokparms): Invoke strip_top_quals instead of directly invoking | |
2809 | cp_build_qualified_type. | |
2810 | * pt.c (decay_dependent_array_parm_type): New static function. | |
2811 | (type_unification_real): Call decay_dependent_array_parm_type | |
2812 | to decay a dependent array parameter type to its corresponding | |
2813 | pointer type before unification. | |
2814 | (more_specialized_fn): Likewise. | |
2815 | (get_bindings): Likewise. | |
2816 | * tree.c (cp_build_qualified_type): Trivial typofix in | |
2817 | documentation. | |
2818 | ||
69da7802 MS |
2819 | 2016-01-23 Martin Sebor <msebor@redhat.com> |
2820 | ||
2821 | PR c++/58109 | |
2822 | PR c++/69022 | |
2823 | * decl2.c (is_late_template_attribute): Handle dependent argument | |
2824 | to attribute align and attribute vector_size. | |
2825 | ||
97ca3d0d JM |
2826 | 2016-01-21 Jason Merrill <jason@redhat.com> |
2827 | ||
130ee9a9 JM |
2828 | PR c++/69392 |
2829 | * lambda.c (lambda_capture_field_type): Handle 'this' specially | |
2830 | for init-capture, too. | |
2831 | ||
020491e6 JM |
2832 | PR c++/65687 |
2833 | * decl.c (type_is_deprecated): Don't look into a typedef. | |
2834 | ||
2f3932b9 JM |
2835 | PR c++/40751 |
2836 | PR c++/64987 | |
2837 | * decl.c (copy_type_enum): Respect TYPE_USER_ALIGN. | |
2838 | ||
97ca3d0d JM |
2839 | PR c++/43407 |
2840 | * decl.c (start_enum): Add attributes parameter. | |
2841 | * parser.c (cp_parser_enum_specifier): Pass it. | |
2842 | * pt.c (lookup_template_class_1): Pass it. | |
2843 | * cp-tree.h: Adjust. | |
2844 | ||
33f48842 JM |
2845 | 2016-01-19 Jason Merrill <jason@redhat.com> |
2846 | ||
2847 | PR c++/59759 | |
2848 | * pt.c (convert_template_argument): Handle VAR_DECL properly. | |
2849 | ||
1e297006 MP |
2850 | 2016-01-19 Marek Polacek <polacek@redhat.com> |
2851 | ||
2852 | PR c++/68586 | |
2853 | * constexpr.c (clear_cv_cache): New. | |
2854 | * cp-gimplify.c (clear_fold_cache): New. | |
2855 | * cp-tree.h (clear_cv_cache, clear_fold_cache): Declare. | |
2856 | * decl.c (finish_enum_value_list): Call them. | |
2857 | ||
38a979f2 MP |
2858 | PR c++/68965 |
2859 | * pt.c (tsubst_copy): Mark elements in expanded vector as used. | |
2860 | ||
17c15cb9 PP |
2861 | 2016-01-18 Patrick Palka <ppalka@gcc.gnu.org> |
2862 | ||
2863 | PR c++/11858 | |
2864 | PR c++/24663 | |
2865 | PR c++/24664 | |
2866 | * decl.c (grokdeclarator): Don't decay array parameter type to | |
2867 | a pointer type if it's dependent. | |
2868 | (grokparms): Invoke strip_top_quals instead of directly invoking | |
2869 | cp_build_qualified_type. | |
2870 | * pt.c (decay_dependent_array_parm_type): New static function. | |
2871 | (type_unification_real): Call decay_dependent_array_parm_type | |
2872 | to decay a dependent array parameter type to its corresponding | |
2873 | pointer type before unification. | |
2874 | (more_specialized_fn): Likewise. | |
2875 | (get_bindings): Likewise. | |
2876 | * tree.c (cp_build_qualified_type): Trivial typofix in | |
2877 | documentation. | |
2878 | ||
7f26f7df JM |
2879 | 2016-01-18 Jason Merrill <jason@redhat.com> |
2880 | ||
4b0b30ef JM |
2881 | * cp-gimplify.c (cp_fold) [CONSTRUCTOR]: Don't clobber the input. |
2882 | ||
8d8f3235 JM |
2883 | * cp-gimplify.c (cp_fold): Remove unnecessary special cases. |
2884 | ||
7f26f7df JM |
2885 | PR c++/68767 |
2886 | * cp-gimplify.c (cp_fold) [COND_EXPR]: Simplify. Do fold COND_EXPR. | |
2887 | (contains_label_1, contains_label_p): Remove. | |
2888 | ||
ec7886c1 PP |
2889 | 2016-01-16 Patrick Palka <ppalka@gcc.gnu.org> |
2890 | ||
2891 | PR c++/69091 | |
2892 | * pt.c (type_dependent_expression_p): For a function template | |
2893 | specialization, a type is dependent iff any of its template | |
2894 | arguments are. | |
2895 | ||
203484bb PP |
2896 | 2016-01-16 Patrick Palka <ppalka@gcc.gnu.org> |
2897 | ||
2898 | * cp-array-notation.c (cp_expand_cond_array_notations): Return | |
2899 | error_mark_node only if find_rank failed, not if it was | |
2900 | successful. | |
2901 | ||
aa2500e9 PP |
2902 | 2016-01-16 Patrick Palka <ppalka@gcc.gnu.org> |
2903 | ||
2904 | PR c++/68936 | |
2905 | * tree.c (build_min_non_dep_call_vec): Don't retain the | |
2906 | KOENIG_LOOKUP_P flag of the non-dependent expression that's | |
2907 | been built. | |
2908 | (build_min_non_dep_op_overload): Instead, do it here. | |
2909 | ||
e0a575ff JJ |
2910 | 2016-01-15 Jakub Jelinek <jakub@redhat.com> |
2911 | ||
2912 | PR bootstrap/68271 | |
2913 | * parser.h (cp_token): Remove pragma_kind field. Add comment | |
2914 | with number of unused bits. | |
2915 | * parser.c (eof_token): Remove pragma_kind field initializer. | |
2916 | (cp_lexer_get_preprocessor_token): Don't set pragma_kind | |
2917 | field, don't clear CPP_PRAGMA u.value. | |
2918 | (cp_parser_pragma_kind): New function. | |
2919 | (cp_parser_omp_sections_scope, cp_parser_oacc_kernels_parallel, | |
2920 | cp_parser_omp_construct, cp_parser_initial_pragma, | |
2921 | cp_parser_pragma): Use cp_parser_pragma_kind instead of accessing | |
2922 | pragma_kind field. | |
2923 | ||
56233bd6 JM |
2924 | 2016-01-15 Jason Merrill <jason@redhat.com> |
2925 | ||
c5e3b6fc JM |
2926 | PR c++/68847 |
2927 | * call.c (build_cxx_call): Use fold_non_dependent_expr. | |
2928 | ||
f3255019 JM |
2929 | * typeck2.c (cxx_incomplete_type_diagnostic): Use the location of |
2930 | value. | |
2931 | ||
56233bd6 JM |
2932 | PR c++/69257 |
2933 | * typeck.c (decay_conversion): Don't call mark_rvalue_use for | |
2934 | array/function-to-pointer conversion. Call | |
2935 | complete_type_or_maybe_complain for lvalue-to-rvalue conversion. | |
2936 | * call.c (convert_like_real): Print call context if | |
2937 | decay_conversion errors. | |
2938 | ||
e6d6ec9e TV |
2939 | 2016-01-14 Tom de Vries <tom@codesourcery.com> |
2940 | ||
2941 | PR tree-optimization/68773 | |
2942 | * parser.c (cp_parser_oacc_declare, cp_parser_omp_declare_target): Don't | |
2943 | set force_output. | |
2944 | ||
a7ccb9e7 JM |
2945 | 2016-01-14 Jason Merrill <jason@redhat.com> |
2946 | ||
2947 | PR c++/69261 | |
2948 | * constexpr.c (find_array_ctor_elt): Handle splitting RANGE_EXPR. | |
2949 | ||
5342156c MP |
2950 | 2016-01-12 Marek Polacek <polacek@redhat.com> |
2951 | ||
2952 | PR c++/68979 | |
2953 | * constexpr.c (cxx_eval_check_shift_p): Use permerror rather than | |
2954 | error_at and adjust the return value. | |
2955 | ||
723033a6 JJ |
2956 | 2016-01-12 Jakub Jelinek <jakub@redhat.com> |
2957 | ||
65364cc5 JJ |
2958 | PR objc++/68511 |
2959 | PR c++/69213 | |
2960 | * cp-gimplify.c (cp_gimplify_expr) <case INIT_EXPR>: Don't return | |
2961 | GS_ERROR whenever seen_error (), only if *expr_p contains | |
2962 | cilk spawn stmt, but cilk_detect_spawn_and_unwrap failed. | |
2963 | ||
723033a6 JJ |
2964 | PR c++/66808 |
2965 | PR c++/69000 | |
2966 | * pt.c (tsubst_decl): If not local_p, clear DECL_TEMPLATE_INFO. | |
2967 | ||
9fc21977 JM |
2968 | 2016-01-11 Jason Merrill <jason@redhat.com> |
2969 | ||
2970 | PR c++/69131 | |
2971 | * method.c (walk_field_subobs): Add dtor_from_ctor parm. | |
2972 | (process_subob_fn): Likewise. Don't consider triviality if true. | |
2973 | (synthesize_method_walk): Pass it. | |
2974 | ||
655441d6 DM |
2975 | 2016-01-11 David Malcolm <dmalcolm@redhat.com> |
2976 | ||
2977 | PR c++/68795 | |
2978 | * parser.c (cp_parser_postfix_expression): Initialize | |
2979 | close_paren_loc to UNKNOWN_LOCATION; only use it if | |
2980 | it has been written to by | |
2981 | cp_parser_parenthesized_expression_list. | |
2982 | (cp_parser_parenthesized_expression_list): Document the behavior | |
2983 | with respect to the CLOSE_PAREN_LOC param. | |
2984 | ||
9cb6bd74 JJ |
2985 | 2016-01-11 Jakub Jelinek <jakub@redhat.com> |
2986 | ||
2987 | PR c++/69211 | |
2988 | * cp-gimplify.c (cp_fold): If COMPOUND_EXPR or MODIFY_EXPR | |
2989 | folded operands have side-effects, but folding changed any of them, | |
2990 | build a new tree with the folded operands instead of returning the | |
2991 | unfolded tree. | |
2992 | ||
73f0dae2 MP |
2993 | 2016-01-09 Marek Polacek <polacek@redhat.com> |
2994 | ||
2995 | PR c++/69113 | |
2996 | * decl2.c (comdat_linkage): Only set DECL_COMDAT if TREE_PUBLIC is set. | |
2997 | ||
c50e614b JJ |
2998 | 2016-01-09 Jakub Jelinek <jakub@redhat.com> |
2999 | ||
3000 | PR c++/69164 | |
3001 | * class.c (layout_class_type): Use copy_node to copy FIELD_DECLs. | |
3002 | ||
fe71aa4e JM |
3003 | 2016-01-08 Jason Merrill <jason@redhat.com> |
3004 | ||
3005 | PR c++/69158 | |
3006 | * constexpr.c (cxx_fold_indirect_ref): Handle array type differing | |
3007 | in completion. | |
3008 | ||
bd8f5bb2 MP |
3009 | 2016-01-08 Marek Polacek <polacek@redhat.com> |
3010 | ||
3011 | PR c++/68449 | |
3012 | * constexpr.c (cxx_eval_constant_expression): Handle NULL initializer. | |
3013 | ||
0795b6f2 JM |
3014 | 2016-01-08 Jason Merrill <jason@redhat.com> |
3015 | ||
550c5f8a JM |
3016 | * constexpr.c (cxx_eval_call_expression): Remove convert_to_void |
3017 | workaround. | |
3018 | ||
45177337 JM |
3019 | PR c++/68983 |
3020 | PR c++/67557 | |
3021 | * cvt.c (convert_to_void): Don't strip a TARGET_EXPR of | |
3022 | TREE_ADDRESSABLE type. | |
3023 | ||
0795b6f2 JM |
3024 | PR c++/68983 |
3025 | PR c++/67557 | |
3026 | * call.c (unsafe_copy_elision_p): Look through COMPOUND_EXPR. | |
3027 | ||
ce3e43d7 NS |
3028 | 2016-01-05 Nathan Sidwell <nathan@acm.org> |
3029 | ||
3030 | PR c++/58583 | |
3031 | * pt.c (build_non_dependent_expr): Don't try a checking fold when | |
3032 | parsing an nsdmi. | |
3033 | ||
818ab71a | 3034 | 2016-01-04 Jakub Jelinek <jakub@redhat.com> |
5624e564 JJ |
3035 | |
3036 | Update copyright years. | |
ad41bd84 | 3037 | \f |
818ab71a | 3038 | Copyright (C) 2016 Free Software Foundation, Inc. |
ad41bd84 JM |
3039 | |
3040 | Copying and distribution of this file, with or without modification, | |
3041 | are permitted in any medium without royalty provided the copyright | |
3042 | notice and this notice are preserved. |