]>
Commit | Line | Data |
---|---|---|
b126bff4 JM |
1 | 2017-06-16 Jason Merrill <jason@redhat.com> |
2 | ||
3da557ec JM |
3 | PR c++/81102 - Wrong error with partial specialization. |
4 | * pt.c (unify) [TEMPLATE_PARM_INDEX]: Strip reference when comparing | |
5 | types. Do type deduction later. | |
6 | ||
157420b4 JM |
7 | PR c++/80174 - ICE with partial specialization of member template. |
8 | PR c++/71747 | |
9 | * pt.c (get_partial_spec_bindings): Only coerce innermost args. | |
10 | ||
3eec359d JM |
11 | PR c++/80831 - ICE with -fsyntax-only. |
12 | * decl2.c (c_parse_final_cleanups): Use cgraph_node::get_create. | |
13 | ||
b126bff4 JM |
14 | PR c++/80639 - ICE with invalid PMF initialization. |
15 | PR c++/80043 - ICE with -fpermissive | |
16 | * typeck.c (convert_for_assignment): Recurse when instantiate_type | |
17 | returns without an error. | |
18 | ||
ac9a1c7e NS |
19 | 2017-06-16 Nathan Sidwell <nathan@acm.org> |
20 | ||
4086ef7d NS |
21 | * pt.c (tsubst_baselink): Fix & clarify formatting. |
22 | ||
e249fcad NS |
23 | * cp-tree.h (build_this_parm, cp_build_parm_decl, |
24 | build_artificial_parm): Add FN parm. | |
25 | * decl.c (start_cleanup_fn): Adjust. | |
26 | (build_this_parm): Add FN parm, pass it through. | |
27 | (grokfndecl): Adjust parm building. | |
28 | * decl2.c (cp_build_parm_decl): Add FN parm, set context. | |
29 | (build_artificial_parm): Add FN parm, pass through. | |
30 | (maybe_retrofit_in_chrg): Adjust parm building. | |
31 | (start_static_storage_duration_function): Likwise. | |
32 | * lambda.c (maybe_aadd_lambda_conv_op): Likewise. | |
33 | * method.c (implicitly_declare_fn): Likewise. | |
34 | * parser.c (inject_this_parameter): Likewise. | |
35 | ||
d7b11178 NS |
36 | Symbol tables are insert only. |
37 | * cp-tree.h (default_hash_traits <lang_identifier *>): Don't | |
38 | derive from pointer_hash. Make undeletable. | |
39 | ||
ba27a39d NS |
40 | * class.c (resort_type_method_vec): Avoid potential unsigned |
41 | overflow. | |
42 | ||
0d1dc586 NS |
43 | Don't defer noexcept_deferred_spec. |
44 | * cp-tree.h (unevaluated_noexcept_spec): Don't declare. | |
45 | * decl.c (cxx_init_decl_processing): Initialize | |
46 | noexcept_deferred_spec. | |
47 | * except.c (unevaluated_noexcept_spec): Delete. | |
48 | * class.c (deduce_noexcept_on_destructor): Use | |
49 | noexcept_deferred_spec directly. | |
50 | * method.c (implicitly_declare_fn): Likewise. | |
51 | ||
52 | Make keyed_classes a vector. | |
53 | * cp-tree.h (CPTI_KEYED_CLASSES, keyed_classes): Delete. | |
54 | (keyed_classes): Declare as vector. | |
55 | * decl.c (keyed_classes): Define. | |
56 | (cxx_init_decl_processing): Allocate it. | |
57 | (record_key_method_defined): Use vec_safe_push. | |
58 | * class.c (finish_struct_1): Likewise. | |
59 | * pt.c (instantiate_class_template_1): Likewise. | |
60 | * decl2.c (c_parse_final_cleanups): Reverse iterate keyed_classes. | |
61 | ||
ac9a1c7e NS |
62 | Make rtti lazier |
63 | * rtti.c (enum tinfo_kind): Add TK_DERIVED_TYPES, | |
64 | TK_VMI_CLASS_TYPES, TK_MAX. Delete TK_FIXED. | |
65 | (tinfo_names): New. | |
66 | (typeid_ok_p): Add quotes to error messages. Use get_tinfo_desc. | |
67 | (get_tinfo_decl): Use get_tinfo_desc. | |
68 | (get_pseudo_ti_init): Likewise. Adjust VMI construction. | |
69 | (create_pseudo_type_info): Delete. | |
70 | (get_pseudo_ti_index): Just determine the index. | |
71 | (get_tinfo_desc): New. Create all types lazily. | |
72 | (create_tinfo_types): Just allocate the descriptor array. | |
73 | (emit_support_tinfos): Use non-inserting type lookup. Set builtin | |
74 | location. | |
75 | ||
c3684b7b MS |
76 | 2017-06-15 Martin Sebor <msebor@redhat.com> |
77 | ||
78 | PR c++/80560 | |
79 | * call.c (first_non_public_field, maybe_warn_class_memaccess): New | |
80 | functions. | |
81 | (has_trivial_copy_assign_p, has_trivial_copy_p): Ditto. | |
82 | (build_cxx_call): Call maybe_warn_class_memaccess. | |
83 | ||
c74985e3 JJ |
84 | 2017-06-14 Jakub Jelinek <jakub@redhat.com> |
85 | ||
86 | * cp-gimplify.c (cp_genericize_r): Turn most of the function | |
87 | into a switch (TREE_CODE (stmt)) statement from long else if | |
88 | sequence. | |
89 | ||
c60dc053 JJ |
90 | 2017-06-13 Jakub Jelinek <jakub@redhat.com> |
91 | ||
f31a8339 JJ |
92 | PR c++/80973 |
93 | * cp-gimplify.c (cp_genericize_r): Don't instrument MEM_REF second | |
94 | argument even if it has REFERENCE_TYPE. | |
95 | ||
c60dc053 JJ |
96 | PR c++/80984 |
97 | * cp-gimplify.c (cp_genericize): Only look for VAR_DECLs in | |
98 | BLOCK_VARS (outer) chain. | |
99 | (cxx_omp_const_qual_no_mutable): Likewise. | |
100 | ||
45b2222a ML |
101 | 2017-06-13 Martin Liska <mliska@suse.cz> |
102 | ||
103 | PR sanitize/78204 | |
104 | * class.c (build_base_path): Use sanitize_flags_p. | |
105 | * cp-gimplify.c (cp_genericize_r): Likewise. | |
106 | (cp_genericize_tree): Likewise. | |
107 | (cp_genericize): Likewise. | |
108 | * cp-ubsan.c (cp_ubsan_instrument_vptr_p): Likewise. | |
109 | * decl.c (compute_array_index_type): Likewise. | |
110 | (start_preparsed_function): Likewise. | |
111 | * decl2.c (one_static_initialization_or_destruction): Likewise. | |
112 | * init.c (finish_length_check): Likewise. | |
113 | * lambda.c (maybe_add_lambda_conv_op): Likewise. | |
114 | * typeck.c (cp_build_binary_op): Likewise. | |
115 | (build_static_cast_1): Likewise. | |
116 | ||
a01f151f JM |
117 | 2017-06-11 Jason Merrill <jason@redhat.com> |
118 | ||
c3b0f4c6 JM |
119 | * error.c (dump_expr): Use is_this_parameter. |
120 | ||
a01f151f JM |
121 | * cp-tree.h, decl2.c, mangle.c, parser.c, pt.c, semantics.c: Use |
122 | id_equal. | |
123 | ||
948d0d91 JM |
124 | 2017-06-09 Jason Merrill <jason@redhat.com> |
125 | ||
e6d7d618 JM |
126 | Missing bits from N4268, constant evaluation for all non-type args. |
127 | * call.c (build_converted_constant_expr): Rename from | |
128 | build_integral_nontype_arg_conv, handle all types. | |
129 | * pt.c (convert_nontype_argument): In C++17 call it for all types. | |
130 | Move NOP stripping inside pointer case, don't strip ADDR_EXPR. | |
131 | * cvt.c (strip_fnptr_conv): Also strip conversions to the same type. | |
132 | ||
8b8b203a JM |
133 | Overhaul pointer-to-member conversion and template argument handling. |
134 | * call.c (standard_conversion): Avoid creating ck_pmem when the | |
135 | class type is the same. | |
136 | * cvt.c (can_convert_qual): Split from | |
137 | perform_qualification_conversions. | |
138 | * constexpr.c (cxx_eval_constant_expression): Check it. | |
139 | * typeck.c (convert_ptrmem): Only cplus_expand_constant if | |
140 | adjustment is necessary. | |
141 | * pt.c (check_valid_ptrmem_cst_expr): Compare class types. | |
142 | (convert_nontype_argument): Avoid redundant error. | |
143 | ||
bf31620c JM |
144 | * call.c (convert_like_real): Remove "inner" parameter. |
145 | Don't replace a constant with its value. | |
146 | * cp-gimplify.c (cp_fully_fold): Use cp_fold_rvalue. | |
147 | ||
c5d6c6d9 JM |
148 | * pt.c (convert_nontype_argument): Check NULLPTR_TYPE_P rather than |
149 | nullptr_node. | |
150 | ||
3d2e25a2 JM |
151 | * parser.c (cp_parser_constant_expression): Check |
152 | potential_rvalue_constant_expression after decay_conversion. | |
153 | * pt.c (convert_nontype_argument): Don't require linkage in C++17. | |
154 | ||
55c5c0ad JM |
155 | PR c++/80384 - ICE with dependent noexcept-specifier |
156 | * pt.c (dependent_type_p_r) [FUNCTION_TYPE]: Check for dependent | |
157 | noexcept-specifier. | |
158 | ||
948d0d91 JM |
159 | * constexpr.c (potential_constant_expression_1): Allow 'this' capture. |
160 | ||
cb59f689 JH |
161 | 2017-06-09 Jan Hubicka <hubicka@ucw.cz> |
162 | ||
163 | * class.c (build_vtbl_initializer): Mark dvirt_fn as cold. | |
164 | * decl.c (cxx_init_decl_processing, push_throw_library_fn): Likewise. | |
165 | (excpet.c): Mark terminate as cold. | |
166 | ||
34361776 JJ |
167 | 2017-06-08 Jakub Jelinek <jakub@redhat.com> |
168 | ||
8ab7005b JJ |
169 | PR c/81006 |
170 | * semantics.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE | |
171 | to sizetype before size_binop. | |
172 | ||
34361776 JJ |
173 | PR c++/81011 |
174 | * cp-gimplify.c (cxx_omp_finish_clause): When changing clause | |
175 | to OMP_CLAUSE_SHARED, also clear OMP_CLAUSE_SHARED_FIRSTPRIVATE | |
176 | and OMP_CLAUSE_SHARED_READONLY flags. | |
177 | ||
e6026dc0 JH |
178 | 2017-06-08 Jan Hubicka <hubicka@ucw.cz> |
179 | ||
180 | * cp-tree.h (lang_check_failed): Annotate by ATTRIBUTE_COLD. | |
181 | ||
a6d31e84 NS |
182 | 2017-06-07 Nathan Sidwell <nathan@acm.org> |
183 | ||
184 | * class.c (layout_class_type): Restructure overlong-bitfield tpe | |
185 | search. | |
186 | ||
83059741 JW |
187 | 2017-06-07 Jonathan Wakely <jwakely@redhat.com> |
188 | ||
189 | PR c++/80990 | |
190 | * pt.c (do_class_deduction): Build qualified type. | |
191 | ||
25d446fd NS |
192 | 2017-06-06 Nathan Sidwell <nathan@acm.org> |
193 | ||
25396db9 NS |
194 | * name-lookup.c (suggest_alternatives_for): Use qualified lookup |
195 | sans using directives. Don't walk into inline namespaces. | |
196 | ||
25d446fd NS |
197 | PR c++/80979 |
198 | * name-lookup.c (adl_class_only): Don't add visible friends. | |
199 | ||
2f20e7db VR |
200 | 2017-06-05 Volker Reichelt <v.reichelt@netcologne.de> |
201 | ||
202 | * parser.c (cp_parser_base_specifier): Fix typos in error messages. | |
203 | ||
c957e9c0 NS |
204 | 2017-06-02 Nathan Sidwell <nathan@acm.org> |
205 | ||
fb3a2657 NS |
206 | Remove lang_type_ptrmem. |
207 | * cp-tree.h (lang_type_header): Remove is_lang_type_class. Move | |
208 | into ... | |
209 | (lang_type_class): ... this. Reorder bitfields. Rename to ... | |
210 | (lang_type): ... this. Delete old definition. | |
211 | (lang_type_ptrmem): Delete. | |
212 | (LANG_TYPE_CLASS_CHECK): Simply get TYPE_LANG_SPECIFIC. Adjust uses. | |
213 | (LANG_TYPE_PTRMEM_CHECK): Delete. | |
214 | (TYPE_GET_PTRMEMFUNC_TYPE, TYPE_SET_PTRMEMFUNC_TYPE): Delete. | |
215 | (TYPE_PTRMEMFUNC_TYPE): New. Use TYPE_LANG_SLOT_1. | |
216 | * decl.c (build_ptrmemfunc_type): Adjust. | |
217 | * lex.c (copy_lang_type): Remove lang_type_ptrmem handling. | |
218 | (maybe_add_lang_type_raw): Don't set u.c.h.is_lang_type_class. | |
219 | ||
220 | * class.c (check_bases_and_members): Adjust vec_new_uses_cookie | |
221 | setting. | |
222 | ||
223 | Remove cp_binding_level::namespaces | |
c957e9c0 NS |
224 | * name-lookup.h (cp_binding_level): Lose namespaces field. |
225 | * name-lookup.c (add_decl_to_level): Chain namespaces on the names | |
226 | list. | |
227 | (suggest_alternatives_for): Adjust for namespace list. Do | |
228 | breadth-first search. | |
229 | * decl2.c (collect_source_refs): Namespaces are on the regulr | |
230 | list. | |
231 | (collect_ada_namespace): Likewise. | |
232 | ||
40ffd95f BE |
233 | 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de> |
234 | ||
235 | * typeck.c (cp_build_binary_op): Implement the -Wsizeof_pointer_div | |
236 | warning. | |
237 | ||
e257141f VV |
238 | 2017-06-01 Ville Voutilainen <ville.voutilainen@gmail.com> |
239 | ||
240 | PR c++/80812 | |
241 | * method.c (constructible_expr): Strip array types before calling | |
242 | build_value_init. | |
243 | ||
ac853c90 PC |
244 | 2017-06-01 Paolo Carlini <paolo.carlini@oracle.com> |
245 | ||
246 | PR c++/80896 | |
247 | * cvt.c (convert_to_void): Possibly call maybe_warn_nodiscard | |
248 | for case INDIRECT_REF too in the main switch. | |
249 | ||
049a5d31 JM |
250 | 2017-05-31 Jason Merrill <jason@redhat.com> |
251 | ||
252 | PR c++/80840 - ICE with constexpr and reference | |
253 | * pt.c (convert_nontype_argument): Don't test whether a decl is | |
254 | value-dependent when binding to a reference. | |
255 | ||
91e920c9 NS |
256 | 2017-05-31 Nathan Sidwell <nathan@acm.org> |
257 | ||
258 | * cp-tree.h (lang_decl_slector): New enum. | |
259 | (lang_decl_base): Make selector an enum. Drop decomposition_p | |
260 | field. | |
261 | (lang_decl): Use enum for discrimination. | |
262 | (LANG_DECL_FN_CHECK, LANG_DECL_NS_CHECK, LANG_DECL_PARM_CHECK, | |
263 | LANG_DECL_DEOMP_CHECK): Use enum. | |
264 | (DECL_DECOMPOSITION_P): Use selector value. | |
265 | (SET_DECL_DECOMPOSITION_P): Delete. | |
266 | (retrofit_lang_decl): Lose SEL parm. | |
267 | (fit_decomposition_lang_decl): Declare. | |
268 | * decl.c (cp_finish_decomp, grokdeclarator): Use | |
269 | fit_decomposition_lang_decl. | |
270 | * lex.c (maybe_add_lang_decl_raw): New. Broken out of | |
271 | retrofit_lang_decl. | |
272 | (set_decl_linkage): New. Broken out of retrofit_lang_decl. Use enum. | |
273 | (fit_decomposition_lang_decl): Likewise. | |
274 | (retrofit_lang_decl): Use worker functions. | |
275 | (cxx_dup_lang_specific_decl): Use selector enum. | |
276 | (maybe_add_lang_type_raw): New. Broken out of ... | |
277 | (cxx_make_type_name): ... here. Call it. | |
278 | ||
3c1f5a3a JM |
279 | 2017-05-30 Jason Merrill <jason@redhat.com> |
280 | ||
281 | PR c++/80856 - ICE with local extern in template | |
282 | * semantics.c (finish_call_expr): Replace a local extern overload | |
283 | set in a template with the IDENTIFIER_NODE. | |
284 | ||
f012c8ef DM |
285 | 2017-05-30 David Malcolm <dmalcolm@redhat.com> |
286 | ||
287 | * call.c (perform_implicit_conversion_flags): Convert | |
288 | "from %qT to %qT" to "from %qH to %qI" in diagnostic. | |
289 | (print_conversion_rejection): Replace pairs of %qT with | |
290 | %qH and %qI in various places. | |
291 | (build_user_type_conversion_1): Likewise. | |
292 | (build_integral_nontype_arg_conv): Likewise. | |
293 | (build_conditional_expr_1): Likewise. | |
294 | (convert_like_real): Likewise. | |
295 | (convert_arg_to_ellipsis): Likewise. | |
296 | (joust): Likewise. | |
297 | (initialize_reference): Likewise. | |
298 | * cvt.c (cp_convert_to_pointer): Likewise. | |
299 | (cp_convert_to_pointer): Likewise. | |
300 | (convert_to_reference): Likewise. | |
301 | (ocp_convert): Likewise. | |
302 | * error.c (cp_printer): Gain bool and const char ** parameters. | |
303 | (struct deferred_printed_type): New struct. | |
304 | (class cxx_format_postprocessor): New class. | |
305 | (cxx_initialize_diagnostics): Wire up a cxx_format_postprocessor | |
306 | to pp->m_format_postprocessor. | |
307 | (comparable_template_types_p): New function. | |
308 | (newline_and_indent): New function. | |
309 | (arg_to_string): New function. | |
310 | (print_nonequal_arg): New function. | |
311 | (print_template_differences): New function. | |
312 | (type_to_string_with_compare): New function. | |
313 | (print_template_tree_comparison): New function. | |
314 | (append_formatted_chunk): New function. | |
315 | (add_quotes): New function. | |
316 | (cxx_format_postprocessor::handle): New function. | |
317 | (defer_phase_2_of_type_diff): New function. | |
318 | (cp_printer): Add "quoted" and "buffer_ptr" params. Implement | |
319 | %H and %I. | |
320 | * typeck.c (cp_build_binary_op): Replace pairs of %qT with | |
321 | %qH and %qI in various places. | |
322 | (convert_member_func_to_ptr): Likewise. | |
323 | (build_reinterpret_cast_1): Likewise. | |
324 | (convert_for_assignment): Likewise. | |
325 | * typeck2.c (check_narrowing): Likewise. | |
326 | ||
e2f35333 NS |
327 | 2017-05-30 Nathan Sidwell <nathan@acm.org> |
328 | ||
98c28dd4 NS |
329 | Kill IDENTIFIER_NAMESPACE_BINDINGS |
330 | * cp-tree.h (lang_identifier): Delete namespace_bindings. | |
331 | (IDENTIFIER_NAMESPACE_BINDINGS): Delete. | |
332 | (lang_decl_ns): Add bindings. | |
333 | (DECL_NAMESPACE_BINDINGS): New. | |
334 | * lex.c (retrofit_lang_decl): Create namespace hash table. | |
335 | * name-lookup.c (find_namespace_slot): Change to use hash-map. | |
336 | * ptree.c (cxx_print_binding): Delete. | |
337 | (cxx_print_identifier): Remove NAMESPACE_BINDING printing. | |
338 | ||
5256a7f5 NS |
339 | * cp-tree.def (OVERLOAD): Fix comment. |
340 | * cp-tree.h: Fix comments and whitespace. | |
341 | * error.c (dump_decl): Use pp_cxx_colon_colon, ovl_scope. | |
342 | * name-lookup.c (add_decl_to_level): Assert not class. | |
343 | (check_local_shadow): Use OVL_P. | |
344 | (pushdecl_with_scope_1): Rename to ... | |
345 | (do_pushdecl_with_Scope): ... here. | |
346 | (do_nonmember_using_decl): Use qualified_namespace_lookup return | |
347 | value. | |
348 | (push_class_level_binding_1): Use OVL_P. | |
349 | (pushdecl_namespace_level): Use do_pushdecl_with_scope. | |
350 | (pushtag_1): Rename to ... | |
351 | (do_pushtag): ... here. Adjust do_pushdecl_with_scope call. | |
352 | (pushtag): Adjust. | |
353 | (store_class_bindings): Do not time here. | |
354 | * name-lookup.h (pushdecl_outermost_localscope): Reorder. | |
355 | * pt.c (listify): Declare argvec at point of initialization. | |
356 | ||
e2f35333 NS |
357 | PR c++/80913 |
358 | * name-lookup.c (add_decl_to_level): Assert not making a circular | |
359 | chain. | |
360 | (update_binding): Don't prematurely slide artificial decl. | |
361 | ||
b904faa0 AO |
362 | 2017-05-29 Alexandre Oliva <aoliva@redhat.com> |
363 | ||
364 | * cp-tree.h (lang_identifier): Drop oracle_looked_up, unused. | |
365 | ||
58dec010 NS |
366 | 2017-05-29 Nathan Sidwell <nathan@acm.org> |
367 | ||
3d7ff728 NS |
368 | PR c++/80891 (#1,#5) |
369 | * cp-tree.h (lookup_maybe_add): Add DEDUPING argument. | |
370 | * name-lookup.c (name_lookup): Add deduping field. | |
371 | (name_lookup::preserve_state, name_lookup::restore_state): Deal | |
372 | with deduping. | |
373 | (name_lookup::add_overload): New. | |
374 | (name_lookup::add_value, name_lookup::add_fns): Call add_overload. | |
375 | (name_lookup::search_adl): Set deduping. Don't unmark here. | |
376 | * pt.c (most_specialized_instantiation): Revert previous change, | |
377 | Assert not given duplicates. | |
378 | * tree.c (lookup_mark): Just mark the underlying decls. | |
379 | (lookup_maybe_add): Dedup using marked decls. | |
380 | ||
a5cfa13a NS |
381 | PR c++/80891 (#4) |
382 | * ptree.c (cxx_print_xnode): Show internal OVERLOAD structure. | |
383 | * tree.c (ovl_insert, ovl_iterator_remove_node): Fix copying assert. | |
384 | ||
3c9cca88 NS |
385 | Stat hack representation |
386 | * name-lookup.c (STAT_HACK_P, STAT_TYPE, STAT_DECL, | |
387 | MAYBE_STAT_DECL, MAYBE_STAT_TYPE): New. | |
388 | (stat_hack): New. | |
389 | (find_namespace_binding): Replace with ... | |
390 | (find_namespace_slot): ... this. | |
391 | (find_namespace_value): New. | |
392 | (name_lookup::search_namespace_only, | |
393 | name_lookup::adl_namespace_only): Adjust. | |
394 | (update_binding): Add SLOT parameter, adjust. | |
395 | (check_local_shadow): Use find_namespace_value. | |
396 | (set_local_extern_decl_linkage): Likewise. | |
397 | (do_pushdecl): Adjust for namespace slot. | |
398 | (push_local_binding): Assert not a namespace binding. | |
399 | (check_for_out_of_scope_variable): Use find_namespace_value. | |
400 | (set_identifier_type_value_with_scope): Likewise. | |
401 | (get_namespace_binding): Likewise. | |
402 | (set_namespace_binding): Delete. | |
403 | (set_global_binding): Directly update the binding. | |
404 | (finish_namespace_using_decl): Likewise. | |
405 | (lookup_type_scope_1): Use find_namespace_slot and update. | |
406 | (do_push_nested_namespace): Use find_namespace_value. | |
407 | ||
e514ab0c NS |
408 | PR c++/80891 (#1) |
409 | * pt.c (most_specialized_instantiation): Cope with duplicate | |
410 | instantiations. | |
411 | ||
58dec010 NS |
412 | PR c++/80891 (#3) |
413 | * cp-tree.h (build_min_nt_call_vec): Declare. | |
414 | * decl.c (build_offset_ref_call_from_tree): Call it. | |
415 | * parser.c (cp_parser_postfix_expression): Likewise. | |
416 | * pt.c (tsubst_copy_and_build): Likewise. | |
417 | * semantics.c (finish_call_expr): Likewise. | |
418 | * tree.c (build_min_nt_loc): Keep unresolved lookups. | |
419 | (build_min): Likewise. | |
420 | (build_min_non_dep): Likewise. | |
421 | (build_min_non_dep_call_vec): Likewise. | |
422 | (build_min_nt_call_vec): New. | |
b67b23f0 | 423 | |
724e517a NS |
424 | PR c++/80891 (#2) |
425 | * tree.c (ovl_copy): Adjust assert, copy OVL_LOOKUP. | |
426 | (ovl_used): New. | |
427 | (lookup_keep): Call it. | |
428 | ||
58dec010 NS |
429 | 2017-05-26 Nathan Sidwell <nathan@acm.org> |
430 | ||
945bf9e1 NS |
431 | Implement DR2061 |
432 | * name-lookup.c (push_inline_namespaces): New. | |
433 | (push_namespace): Look inside inline namespaces. | |
434 | ||
3c9feefc NS |
435 | Inline and using namespace representation change. |
436 | * cp-tree.h (struct lang_decl_ns): Delete ns_using. Add usings, | |
437 | inlinees as vector. | |
438 | (DECL_NAMESPACE_USING): Adjust. | |
439 | (DECL_NAMESPACE_INLINEES): New. | |
440 | * name-lookup.h (struct cp_binding_level): Change usings | |
441 | representation. | |
442 | * name-lookup.c (name_lookup::do_queue_usings, | |
443 | name_lookup::queue_usings): Adjust. | |
444 | (name_lookup::search_namespace, name_lookup::search_usings, | |
445 | name_lookup::queue_namespace): Adjust. | |
446 | (name_lookup::adl_namespace_only): Adjust. | |
447 | (add_using_namespace, push_namespace): Push onto vector. | |
448 | (pop_namespace): Add timing logic. | |
449 | ||
e1cad930 NS |
450 | * call.c (build_operator_new_call): Do namelookup and ADL here. |
451 | (build_new_op_1): Likewise. | |
452 | * name-lookup.h (lookup_function_nonclass): Delete declaration. | |
453 | (do_using_directive): Likewise. | |
454 | * name-lookup.c (set_namespace_binding, push_local_binding): Don't | |
455 | declare early. | |
456 | (struct scope_binding): Delete. | |
457 | (EMPTY_SCOPE_BINDING): Delete. | |
458 | (set_decl_namespace): Use OVL_P. | |
459 | (finish_local_using_decl): Lose unnecesary checks. | |
460 | (lookup_function_nonclass): Delete. | |
461 | (cp_emit_debug_info_for_using): Use MAYBE_BASELINK_P. | |
462 | ||
32196b87 NS |
463 | * cp-tree.h (OVL_CHAIN): Check looking at OVERLOAD. |
464 | (ovl_iterator): Add allow_inner field. Adjust ctor. Make | |
465 | unduplicatable. | |
466 | (ovl_iterator::maybe_push, ovl_iterator::pop): New. | |
467 | (lkp_iterator): Add outer field. Adjust ctor. | |
468 | (lkp_iterator::operator++): New. | |
469 | (lookup_mark, lookup_maybe_add): Declare. | |
470 | * name-lookup.c (name_lookup): Delete fn_set member. | |
471 | (name_lookup::preserve_state, name_lookup::restore_state): Unmark | |
472 | and mark lookup. | |
473 | (name_lookup::add_value): Use lookup_add directly. | |
474 | (name_lookup::add_fns: Use lookup_maybe_add. | |
475 | (name_lookup::search_adl): Mark and unmark fns. | |
476 | (pushdecl): Adjust. | |
477 | * pt.c (check_explicit_specialization): Use lookup_add directly. | |
478 | * ptree.c (cxx_print_xnode): Show complete overload structure. | |
479 | * tree.c (lookup_mark, lookup_maybe_add): New. | |
480 | ||
b67b23f0 NS |
481 | * name-lookup.c (name_lookup::search_adl): ADL OMP UDR type args. |
482 | ||
6fc9f7aa JJ |
483 | 2017-05-26 Jakub Jelinek <jakub@redhat.com> |
484 | ||
485 | * cp-tree.h (struct lang_decl_decomp): New type. | |
486 | (struct lang_decl): Add u.decomp. | |
487 | (LANG_DECL_DECOMP_CHECK): Define. | |
488 | (DECL_DECOMPOSITION_P): Note it is set also on the vars | |
489 | for user identifiers. | |
490 | (DECL_DECOMP_BASE): Define. | |
491 | (retrofit_lang_decl): Add extra int = 0 argument. | |
492 | * lex.c (retrofit_lang_decl): Add SEL argument, if non-zero | |
493 | use it to influence the selector choices and for selector | |
494 | 0 to non-zero transition copy old content. | |
495 | (cxx_dup_lang_specific_decl): Handle DECL_DECOMPOSITION_P. | |
496 | * decl.c (poplevel): For DECL_DECOMPOSITION_P, check | |
497 | !DECL_DECOMP_BASE instead of !DECL_VALUE_EXPR. Adjust warning | |
498 | wording if decl is a structured binding. | |
499 | (cp_finish_decomp): Pass 4 as the new argument to retrofit_lang_decl. | |
500 | Set DECL_DECOMP_BASE. Ignore DECL_READ_P sets from initialization | |
501 | of individual variables for tuple structured bindings. | |
502 | (grokdeclarator): Pass 4 as the new argument to retrofit_lang_decl. | |
503 | Clear DECL_DECOMP_BASE. | |
504 | * decl2.c (mark_used): Mark DECL_DECOMP_BASE TREE_USED as well. | |
505 | * pt.c (tsubst_decomp_names): Assert DECL_DECOMP_BASE matches what | |
506 | is expected. | |
507 | * expr.c (mark_exp_read): Recurse on DECL_DECOMP_BASE instead of | |
508 | DECL_VALUE_EXPR. | |
509 | ||
0fa367aa JM |
510 | 2017-05-25 Jason Merrill <jason@redhat.com> |
511 | ||
512 | PR c++/80605 - __is_standard_layout and zero-length array | |
513 | * class.c (check_bases): Use DECL_FIELD_IS_BASE. | |
514 | ||
44e00a7a NS |
515 | 2017-05-25 Nathan Sidwell <nathan@acm.org> |
516 | ||
87c976ae NS |
517 | Kill OVL_CURRENT, OVL_NEXT. |
518 | * cp-tree.h (OVL_CURRENT, OVL_NEXT): Delete. | |
519 | * name-lookup.c (set_decl_namespace): Use ovl_iterator. | |
520 | (consider_binding_level): Use OVL_FIRST. | |
521 | (cp_emit_debug_info_for_using): Use lkp_iterator. | |
522 | * pt.c (check_explicit_specialization): Use ovl_iterator. | |
523 | ||
44e00a7a NS |
524 | Kill DECL_NAMESPACE_USERS, DECL_NAMESPACE_ASSOCIATIONS. |
525 | * cp-tree.h (lang_decl_ns): Remove ns_users field. | |
526 | (DECL_NAMESPACE_USERS, DECL_NAMESPACE_ASSOCIATIONS): Delete. | |
527 | (TREE_INDIRECT_USING): Delete. | |
528 | * name-lookup.h (is_associated_namespace): Delete. | |
529 | * name-lookup.c (name_lookup::search_usings, | |
530 | name_lookup::do_queue_usings): Usings are always direct. | |
531 | (is_associated_namespace): Delete. | |
532 | (handle_namespace_attrs): Use DECL_NAMESPACE_INLINE_P. | |
533 | (namespace_ancestor_1, namespace_ancestor): Delete. | |
534 | (push_using_directive_1, push_using_directive): Delete. | |
535 | (add_using_namespace_1): Delete. | |
536 | (add_using_namespace): Reimplement. | |
537 | (emit_debug_info_using_namespace): New. | |
538 | (finish_namespace_using_directive, finish_local_using_directive, | |
539 | push_namespace): Adjust. | |
540 | * tree.c (cp_free_lang_data): Remove DECL_NAMESPACE_USERS handling. | |
541 | ||
63dbcd13 VR |
542 | 2017-05-25 Volker Reichelt <v.reichelt@netcologne.de> |
543 | ||
544 | * semantics.c (finish_handler_parms): Warn about non-reference type | |
545 | catch handlers. | |
546 | ||
f35a733d NS |
547 | 2017-05-25 Nathan Sidwell <nathan@acm.org> |
548 | ||
932f48ac NS |
549 | Reimplement unqualified namespace lookup. |
550 | * name-lookup.c (name_lookup::using_pair, | |
551 | name_lookup::using_queue): New typedefs. | |
552 | (name_lookup::queue_namespace, name_lookup::do_queue_usings, | |
553 | name_lookup::queue_usings): New. | |
554 | (name_lookup::search_unqualified): New. | |
555 | (merge_functions, same_entity_p, ambiguous_decl, | |
556 | unqualified_namespace_lookup_1, unqualified_namespace_lookup, | |
557 | lookup_using_namespace): Delete. | |
558 | (lookup_name_real_1): Adjust. | |
559 | ||
9dda0ace NS |
560 | Reimplement qualified namespace lookup. |
561 | * name-lookup.c (name_lookup::flags): New member. Adjust ctor. | |
562 | (name_lookup::ambiguous, name_lookup::add_value, | |
563 | name_lookup::add_type, name_lookup::process_binding): New. | |
564 | (name_lookup::search_namespace_only, | |
565 | name_lookup::search_namespace, name_lookup::search_usings): New. | |
566 | (name_lookup::search_qualified): New. | |
567 | (do_nonmember_using_decl, suggest_alternatives_for, | |
568 | lookup_qualified_name): Adjust. | |
569 | (tree_vec_contains): Delete. | |
570 | (qualified_lookup_using_namespace): Rename to ... | |
571 | (qualified_namespace_lookup): ... here. Reimplement. | |
572 | ||
573 | Reimplement ADL. | |
f35a733d NS |
574 | * cp-tree.h (LOOKUP_SEEN_P, LOOKUP_FOUND_P): New. |
575 | * name-lookup.h (lookup_arg_dependent): Return plain tree. | |
576 | * name-lookup.c (arg_lookup, arg_assoc, arg_assoc_args, | |
577 | arg_assoc_args_vec, arg_assoc_type, add_function, | |
578 | arg_assoc_namespace, arg_assoc_class_only, arg_assoc_bases, | |
579 | arg_assoc_class, arg_assoc_template_arg, arg_assoc, | |
580 | lookup_arg_dependent_1): Delete. | |
581 | (name_lookup): New lookup object. | |
582 | (name_lookup::preserve_state, name_lookup::restore_state, | |
583 | name_lookup::mark_seen, name_lookup::find_and_mark, | |
584 | name_lookup::add_fns, name_lookup::adl_namespace_only, | |
585 | name_lookup::adl_namespace, name_lookup::adl_class_only, | |
586 | name_lookup::adl_bases, name_lookup::adl_class, | |
587 | name_lookup::adl_expr, name_lookup::adl_type, | |
588 | name_lookup::adl_template_arg, name_lookup::search_adl): New. | |
589 | (lookup_arg_dependent): Return a plain tree. Adjust. | |
590 | (is_associated_namespace): Move later. | |
591 | ||
d48b9bbe NS |
592 | 2017-05-24 Nathan Sidwell <nathan@acm.org> |
593 | ||
5ad4f1c8 NS |
594 | * friend.c (do_friend): Remove check for existing decl. |
595 | * name-lookup.h (lookup_name_innermost_nonclass_level): Delete. | |
596 | * name-lookup.c (push_local_binding): Directly look for binding. | |
597 | (lookup_name_innermost_nonclass_level_1): Delete. | |
598 | (lookup_name_innermost_nonclass_level): Delete. | |
599 | ||
6cdb26f2 NS |
600 | * Make-lang.in (CXX_AND_OBJCXX_OBJS): Alphabetize. |
601 | ||
d48b9bbe NS |
602 | * cp-tree.h (cp_free_lang_data): Add extern. |
603 | (ovl_skip_hidden, is_overloaded_fn, really_overloaded_fn): Add | |
604 | ATTRIBUTE_PURE. | |
605 | (type_unknown_p): Return bool, make inline, lose TREE_LIST check. | |
606 | * typeck.c (type_unknown_p): Delete. | |
607 | * tree.c (is_overloaded_fn): Use MAYBE_BASELINE_FUNCTIONS, adjust | |
608 | overload management. | |
609 | (dependent_name): Likewise. | |
610 | (decl_anon_ns_mem_p): Simplify. | |
611 | ||
d4a760d8 JW |
612 | 2017-05-24 Jonathan Wakely <jwakely@redhat.com> |
613 | ||
614 | PR c++/80544 | |
615 | * tree.c (reshape_init): Use unqualified type for direct enum init. | |
616 | * typeck.c (maybe_warn_about_cast_ignoring_quals): New. | |
617 | (build_static_cast_1, build_reinterpret_cast_1): Strip cv-quals from | |
618 | non-class destination types. | |
619 | (build_const_cast_1): Strip cv-quals from destination types. | |
620 | (build_static_cast, build_reinterpret_cast, build_const_cast) | |
621 | (cp_build_c_cast): Add calls to maybe_warn_about_cast_ignoring_quals. | |
622 | ||
3cd211af MS |
623 | 2017-05-24 Martin Sebor <msebor@redhat.com> |
624 | ||
625 | PR c/80731 | |
626 | * call.c (fully_fold_internal): Adjust. | |
627 | ||
ef4c5e78 NS |
628 | 2017-05-24 Nathan Sidwell <nathan@acm.org> |
629 | ||
c0edbb32 NS |
630 | * cp-tree.h (ovl_skip_hidden): Declare. |
631 | * tree.c (ovl_skip_hidden): New. | |
632 | * name-lookup.c (arg_assoc_namespace): Call ovl_skip_hidden. | |
633 | (lookup_arg_dependent_1): Likewise. | |
634 | (ambiguous_decl): Use DECL_HIDDEN_P, ovl_skip_hidden. | |
635 | (hidden_name_p, remove_hidden_names): Delete. | |
636 | (lookup_name_real_1): Do not strip hidden names. | |
637 | * name-lookup.h (hidden_name_p, remove_hidden_names): Delete. | |
638 | ||
ef4c5e78 NS |
639 | * cp-tree.h (OVL_HIDDEN_P): New. |
640 | (ovl_iterator::hidden_p, ovl_iterator::reveal_node): New. | |
641 | (ovl_iterator::reveal_node): Declare. | |
642 | * tree.c (ovl_copy): Copy OVL_HIDDEN_P. | |
643 | (ovl_insert): Order on hiddenness. | |
644 | (ovl_iterator::reveal_node): New. | |
645 | * name-lookup.c (anticipated_builtin_p): New. | |
646 | (supplement_binding_1): Use it. | |
647 | (set_local_extern_decl_linkage): Use hidden_p. | |
648 | (do_pushdecl): Deal with unhiding a hidden decl, use | |
649 | anticipated_builtin_p. | |
650 | (do_nonmember_using_decl): Use anticipated_decl_p. | |
651 | (lookup_name_real_1): Use DECL_HIDDEN_P. | |
652 | ||
5726acd7 JM |
653 | 2017-05-23 Jason Merrill <jason@redhat.com> |
654 | ||
655 | -Wunused and C++17 structured bindings | |
656 | * decl.c (poplevel): Don't warn about unused structured bindings, | |
657 | only real variables. | |
658 | * error.c (dump_simple_decl): Handle structured bindings. | |
659 | * expr.c (mark_exp_read): Look through DECL_VALUE_EXPR. | |
660 | ||
3a9cc685 NS |
661 | 2017-05-23 Nathan Sidwell <nathan@acm.org> |
662 | ||
663 | * cp-tree.h (PUSH_GLOBAL, PUSH_LOCAL, PUSH_USING): Delete. | |
664 | * name-lookup.c (create_local_binding): New. | |
665 | (update_binding): New. | |
666 | (pushdecl_maybe_friend_1): Rename to ... | |
667 | (do_pushdecl): ... this. Reimplement. | |
668 | (pushdecl): Adjust. | |
669 | (push_overloaded_decl_1, push_overloaded_decl): Delete. | |
670 | ||
f0c1ade4 JM |
671 | 2017-05-23 Jason Merrill <jason@redhat.com> |
672 | ||
673 | PR c++/80396 - built-in for make_integer_sequence. | |
674 | * pt.c (builtin_pack_fn_p, builtin_pack_call_p) | |
675 | (expand_integer_pack, expand_builtin_pack_call): New. | |
676 | (find_parameter_packs_r): Check builtin_pack_call_p. | |
677 | (check_for_bare_parameter_packs): Handle it. | |
678 | (tsubst_pack_expansion): Call expand_builtin_pack_call. | |
679 | (declare_integer_pack): New. | |
680 | (init_template_processing): Call it. | |
681 | * decl2.c (mark_used): Check builtin_pack_fn_p. | |
682 | ||
e4ea7a4c NS |
683 | 2017-05-23 Nathan Sidwell <nathan@acm.org> |
684 | ||
aa7bda5f NS |
685 | * name-lookup.c (find_namespace_binding): New. |
686 | (pushdecl_maybe_friend_1): Use CP_DECL_CONTEXT. | |
687 | (set_identifier_type_value_with_scope): Use find_namespace_binding. | |
688 | (find_binding, cp_binding_level_find_binding_for_name, | |
689 | binding_for_name, namespace_binding_1): Delete. | |
690 | (push_overloaded_decl_1): Use CP_DECL_CONTEXT. | |
691 | (get_namespace_binding, set_namespace_binding, | |
692 | finish_namespace_using_decl, unqualified_namespace_lookup_1, | |
693 | qualified_lookup_using_namespace, lookup_type_scope_1, | |
694 | lookup_name_innermost_nonclass_level_1): Use find_namespace_binding. | |
695 | ||
6131102c NS |
696 | PR c++/80866 |
697 | * parser.c (cp_parser_template_id): Keep the lookup when stashing | |
698 | the template_id. | |
699 | ||
e4ea7a4c NS |
700 | * cp-tree.h (DECL_HIDDEN_P): New. |
701 | * name-lookup.c (set_decl_context, | |
702 | set_local_extern_decl_linkage): New, broken out of ... | |
703 | (pushdecl_maybe_friend_1): ... here. Call them. | |
704 | ||
fd71a9a2 TS |
705 | 2017-05-23 Thomas Schwinge <thomas@codesourcery.com> |
706 | ||
707 | * parser.c (OACC_KERNELS_CLAUSE_MASK): Add | |
708 | "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS", | |
709 | "VECTOR_LENGTH". | |
710 | ||
9d029ddf NS |
711 | 2017-05-23 Nathan Sidwell <nathan@acm.org> |
712 | ||
713 | * cp-tree.h (OVL_P): New. | |
714 | * name-lookup.h (push_local_binding): Delete. | |
715 | (do_toplevel_using_decl, do_local_using_decl): Rename to ... | |
716 | (finish_namespace_using_decl, finish_local_using_decl): ... here | |
717 | * name-lookup.c (add_decl_to_level): Swap args. | |
718 | (pop_bindings_and_leave_scope): Look inside TREE_LIST. | |
719 | (diagnose_name_conflict): Check contexts are same for redecl. | |
720 | (update_local_overload): New. | |
721 | (compparms_for_decl_and_using): Rename to ... | |
722 | (matching_fn_p): ... here. | |
723 | (pushdecl_maybe_friend_1): Adjust add_decl_to_level, | |
724 | push_local_bindings call. | |
725 | (push_local_binding): Make static, replace FLAGS arg with | |
726 | IS_USING. | |
727 | (validate_nonmember_using_decl): Use OVL_FIRST. | |
728 | (do_nonmember_using_decl): Use in/out parameters. Use | |
729 | lkp_iterator and simplify. | |
730 | (do_toplevel_using_decl, do_local_using_decl): Rename to ... | |
731 | (finish_namespace_using_decl, finish_local_using_decl): ... here. | |
732 | Adjust. | |
733 | (lookup_type_current_level): Delete. | |
734 | * parser.c (cp_parser_using_declaration): Adjust. | |
735 | * pt.c (tsubst_expr): Adjust. | |
736 | ||
c405923d NS |
737 | 2017-05-22 Nathan Sidwell <nathan@acm.org> |
738 | ||
65cc1407 NS |
739 | * name-lookup.h (parse_using_directive): Replace with ... |
740 | (finish_namespace_using_directive): ... this and ... | |
741 | (finish_local_using_directive): ... this. | |
742 | * name-lookup.c (add_using_namespace_1): Move later. | |
743 | (add_using_namespace): Move later, add namespace_p arg, remove | |
744 | indirect arg. | |
745 | (push_using_directive_1): Directly recurse. | |
746 | (do_using_directive, parse_using_directive): Delete, split into ... | |
747 | (finish_namespace_using_directive): ... this and ... | |
748 | (finish_local_using_directive): ... this. | |
749 | (push_namespace): Use add_using_namespace. | |
750 | * parser.c (cp_parser_using_directive): Call | |
751 | finish_namespace_using_directive or finish_local_using_directive. | |
752 | * pt.c (tsubst_expr): Call finish_local_using_directive. | |
753 | ||
58aca9d9 NS |
754 | * cp-objcp-common.c (cp_register_dumps): Register raw dumper. |
755 | * cp-tree.h (raw_dump_id): Declare. | |
756 | * decl2.c (raw_dump_id): Define. | |
757 | (dump_tu): Use raw_dump_id. | |
758 | ||
3b205ea1 NS |
759 | * config-lang.in (gtfiles): Sort list, break lines. |
760 | ||
1a66d857 NS |
761 | * cp-tree.h (CPTI_TERMINATE, CPTI_CALL_UNEXPECTED): Rename to ... |
762 | (CPTI_TERMINATE_FN, CPTI_CALL_UNEXPECTED_FN): ... here. | |
763 | ( CPTI_GET_EXCEPTION_PTR_FN, CPTI_BEGIN_CATCH_FN, CPTI_END_CATCH_FN, | |
764 | CPTI_ALLOCATE_EXCEPTION_FN, CPTI_FREE_EXCEPTION_FN, CPTI_THROW_FN, | |
765 | CPTI_RETHROW_FN): New. | |
766 | (noexcept_deferred_spec): New. | |
767 | (terminate_node, call_unexpected_node): Rename to ... | |
768 | (terminate_fn, call_unexpected_fn): ... here. | |
769 | (get_exception_ptr_fn, begin_catch_fn, end_catch_fn, | |
770 | allocate_exception_fn, free_exception_fn, throw_fn, rethrow_fn): New. | |
771 | * except.c (fn1..fn5, throw_fn, rethrow_rn, spec): Delete. | |
772 | (init_exception_processing): Adjust. | |
773 | (declare_library_fn): Create and push the fns here. | |
774 | (do_get_exception_ptr, do_begin_catch, do_end_catch, | |
775 | do_allocate_exception_ptr, do_free_exception_ptr): Adjust | |
776 | declare_library_fn use. | |
777 | (unevaluated_noexcept_spec): Adjust. | |
778 | * cp-gimplify.c (genericize_eh_spec_block, | |
779 | gimplify_most_not_throw_expr): Adjust. | |
780 | ||
c405923d NS |
781 | * name-lookup.c (pushdecl_top_level, |
782 | pushdecl_top_level_and_finish): Move after namespace pushing and | |
783 | popping functions. | |
784 | (push_to_top_level): Rename to ... | |
785 | (do_push_to_top_level): ... here. Remove timing code. | |
786 | (pop_from_top_level_1): Rename to ... | |
787 | (do_pop_from_top_level): ... here. | |
788 | (do_push_nested_namespace, do_pop_nested_namespace) | |
789 | (push_to_top_level): New wrapper for do_push_to_top_level. | |
790 | (pop_from_top_level): Adjust. | |
791 | (push_nested_namepace, pop_nested_namespace): Wrappers for workers. | |
792 | ||
ff502317 BE |
793 | 2017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de> |
794 | ||
795 | * config-lang.in (gtfiles): Add c-family/c-format.c, | |
796 | except.c, init.c, lambda.c and friend.c. | |
797 | * class.c (dvirt_fn): Move out of function scope, | |
798 | add GTY attribute. | |
799 | * except.c (fn1-5, throw_fn, rethrow_fn, spec): Likewise. | |
800 | * init.c (fn): Likewise. | |
801 | * lambda.c (ptr_id, max_id): Likewise. | |
802 | * friend.c (global_friend): Add GTY attribute. | |
803 | ||
6f2f4050 NS |
804 | 2017-05-19 Nathan Sidwell <nathan@acm.org> |
805 | ||
806 | * call.c (add_list_candidates): Use OVL_FIRST. | |
807 | (build_new_method_call_1): Likewise. | |
808 | * cp-tree.h (OVL_SINGLE_P): New. | |
809 | (TYPE_HIDDEN_P): New. | |
810 | * decl.c (xref_tag_1): Use TYPE_HIDDEN_P. | |
811 | * dump.c (cp_tump_tree): Adjust overload dumping. | |
812 | * error.c (dump_decl): Use OVL_SINGLE_P, simplify context | |
813 | printing. | |
814 | * method.c (lazily_declare_fn): Assert we added it. | |
815 | * parser.c (cp_parser_nested_name_specifier): Use OVL_SINGLE_P, | |
816 | OVL_FIRST. | |
817 | (cp_parser_template_name): Use lkp_iterator. | |
818 | * pt.c (begin_template_parm_list): Fixup comment. | |
819 | (instantiate_class_template_1): Use TYPE_HIDDEN_P. | |
820 | * tree.c (ovl_iterator::remove_node): Cope with inherited ctors. | |
821 | (ovl_scope): Use lkp_iterator. | |
822 | ||
9740ed54 TS |
823 | 2017-05-19 Thomas Schwinge <thomas@codesourcery.com> |
824 | ||
7fd549d2 TS |
825 | * parser.c (cp_parser_omp_clause_default): Handle |
826 | "OMP_CLAUSE_DEFAULT_PRESENT". | |
827 | ||
9740ed54 TS |
828 | * parser.c (cp_parser_omp_clause_default): Avoid printing more |
829 | than one syntax error message. | |
830 | ||
2a8a8d7b NS |
831 | 2017-05-19 Nathan Sidwell <nathan@acm.org> |
832 | ||
833 | * class.c (class_dump_id): Define. | |
834 | (dump_class_hierarchy, dump_vtable, dump_vtt): Use it. | |
835 | * cp-objcp-common.c (cp_register_dumps): New. | |
836 | * cp-objcp-common.h (cp_register_dumps): Declare. | |
837 | (LANG_HOOKS_REGISTER_DUMPS): Override. | |
838 | * cp-tree.h (class_dump_id): Declare. | |
839 | ||
59a4ede9 NS |
840 | 2017-05-18 Nathan Sidwell <nathan@acm.org> |
841 | ||
1bf07cc3 NS |
842 | * cp-tree.h (OVL_ARG_DEPENDENT): Delete. |
843 | (OVL_USED_P): New. | |
844 | (lookup_keep): Declare. | |
845 | * name-lookup.c (add_function): Don't set OVL_ARG_DEPENDENT. | |
846 | * pt.c (tsubst_copy): Assert lookup is persistent. | |
847 | * semantics.c (finish_call_expr): Use lkp_iterator, call | |
848 | lookup_keep. | |
849 | * tree.c (ovl_copy): New. | |
850 | (ovl_insert, ovl_iterator::remove_node): Copy immutable nodes. | |
851 | (lookup_keep): New. | |
852 | ||
2063b07f NS |
853 | * cp-tree.h (OVL_USED): Replace with ... |
854 | (OVL_USING_P): ... this. | |
855 | (ovl_iterator::using_p): Adjust. | |
856 | * name-lookup.c (push_overloaded_decl_1, | |
857 | do_nonmember_using_decl): Adjust. | |
858 | * search.c (lookup_field_r): Adjust. | |
859 | * tree.c (ovl_insert, ovl_scope): Adjust. | |
860 | ||
31ab89c1 NS |
861 | * cp-tree.h (lookup_add): Swap args. |
862 | (ovl_cons, build_overload): Delete. | |
863 | * name-lookup.c (add_function, push_overloaded_decl_1, | |
864 | do_nonmember_using_decl, merge_functions, remove_hidden_names): | |
865 | Use lookup_add, ovl_insert. | |
866 | * pt.c (check_explicit_specialization): Use lookup_add. | |
867 | (do_class_deduction): Likewise. Refactor if. | |
868 | * tree.c (lookup_add): Swap args. | |
869 | (ovl_cons, build_overload): Delete. | |
870 | ||
59a4ede9 NS |
871 | * name-lookup.c (find_local_binding): New, broken out of ... |
872 | (lookup_name_innermost_nonclass_level_1): ... here. Call it. | |
873 | (set_namespace_binding): Swap scope & name args. | |
874 | (namespace_binding_1): Likewise. | |
875 | (pushdecl_maybe_friend_1): Adjust set_namespace_binding call. | |
876 | (push_overloaded_decl_1): Likewise. | |
877 | (set_global_binding): Likewise. | |
878 | (get_namespace_binding): Adjust namespace_binding_1 call. | |
879 | ||
539f481a NS |
880 | 2017-05-17 Nathan Sidwell <nathan@acm.org> |
881 | ||
882 | * cp-tree.h (default_hash_traits <lang_identifier *>): New | |
883 | specialization. | |
884 | * name-lookup.c (lookup_extern_c_fun_in_all_ns): Delete. | |
885 | (extern_c_fns): New hash table. | |
886 | (check_extern_c_conflict): New, broken out of ... | |
887 | (pushdecl_maybe_friend_1): ... here. Call it. | |
888 | (c_linkage_bindings): Just look in hash table. | |
889 | ||
b42cc3ca VV |
890 | 2017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com> |
891 | ||
892 | PR c++/80654 | |
893 | PR c++/80682 | |
894 | Implement new C++ intrinsics __is_assignable and __is_constructible. | |
895 | * cp-tree.h (CPTK_IS_ASSIGNABLE, CPTK_IS_CONSTRUCTIBLE): New. | |
896 | (is_xible): New. | |
897 | * cxx-pretty-print.c (pp_cxx_trait_expression): Handle | |
898 | CPTK_IS_ASSIGNABLE and CPTK_IS_CONSTRUCTIBLE. | |
899 | * method.c (constructible_expr): Set cp_unevaluated. | |
900 | (is_xible_helper): New. | |
901 | (is_trivially_xible): Adjust. | |
902 | (is_xible): New. | |
903 | * parser.c (cp_parser_primary_expression): Handle | |
904 | RID_IS_ASSIGNABLE and RID_IS_CONSTRUCTIBLE. | |
905 | (cp_parser_trait_expr): Likewise. | |
906 | * semantics.c (trait_expr_value): Handle | |
907 | CPTK_IS_ASSIGNABLE and CPTK_IS_CONSTRUCTIBLE. | |
908 | ||
19b476fb NS |
909 | 2017-05-17 Nathan Sidwell <nathan@acm.org> |
910 | ||
36f4bc9c NS |
911 | * cp-tree.h (ovl_iterator::using_p): New predicate. |
912 | (ovl_iterator::remove_node): New worker. | |
913 | (ovl_insert): Declare. | |
914 | * tree.c (ovl_insert): New. | |
915 | (ovl_iterator::remove_node): New. | |
916 | * class.c (add_method): Use ovl_iterator, ovl_insert. | |
917 | (clone_function_decl): Fix description. | |
918 | (clone_constructors_and_destructors): Use ovl_iterator. | |
919 | ||
19b476fb NS |
920 | * class.c (handle_using_decl): Use OVL_FIRST, ovl_iterator. |
921 | (maybe_warn_about_overly_private_class): Use ovl_iterator. | |
922 | (method_name_cmp, resort_method_name_cmp): Use OVL_NAME. | |
923 | (resort_type_method_vec, finish_struct_methods): Use OVL_FIRST. | |
924 | (get_base_fndecls): Use ovl_iterator. | |
925 | (warn_hidden): Use OVL_NAME, ovl_iterator. | |
926 | (add_implicitly_declared_members): Use ovl_iterator. | |
927 | * constraint.cc (normalize_template_id_expression): Use OVL_FIRST, | |
928 | flatten nested if. | |
929 | (finish_shorthand_constraint): Simplify, use ovl_make. | |
930 | * pt.c (make_constrained_auto): Simplify. Use ovl_make. | |
931 | * search.c (shared_member_p): Use ovl_iterator. | |
932 | (lookup_field_fuzzy_info::fuzzy_lookup_fn): Use OVL_NAME. | |
933 | (lookup_conversion_operator): Use OVL_FIRST. | |
934 | (lookup_fnfiels_idx_nolazy): Use OVL_FIRST, OVL_NAME. | |
935 | (look_for_overrides_here): Use ovl_iterator. | |
936 | (lookup_conversions_r): Use OVL_FIRST, OVL_NAME, ovl_iterator. | |
937 | * typeck.c (build_x_unary_op): Use ovl_make. | |
938 | ||
1a817418 ML |
939 | 2017-05-17 Martin Liska <mliska@suse.cz> |
940 | ||
941 | * class.c (dump_class_hierarchy): Introduce dump_flags_t type and | |
942 | use it instead of int type. | |
943 | (dump_vtable): Likewise. | |
944 | (dump_vtt): Likewise. | |
945 | * decl2.c (dump_tu): Likewise. | |
946 | ||
10791753 DM |
947 | 2017-05-16 David Malcolm <dmalcolm@redhat.com> |
948 | ||
949 | * call.c (enforce_access): Add access_failure_info * param and use | |
950 | it to record access failures. | |
951 | * cp-tree.h (class access_failure_info): New class. | |
952 | (enforce_access): Add access_failure_info * param, defaulting to | |
953 | NULL. | |
954 | (lookup_member): Likewise. | |
955 | (locate_field_accessor): New function decl. | |
956 | (perform_or_defer_access_check): Add access_failure_info * param, | |
957 | defaulting to NULL. | |
958 | * search.c (lookup_member): Add access_failure_info * param and | |
959 | pass it on to call to perform_or_defer_access_check. | |
960 | (matches_code_and_type_p): New function. | |
961 | (field_access_p): New function. | |
962 | (direct_accessor_p): New function. | |
963 | (reference_accessor_p): New function. | |
964 | (field_accessor_p): New function. | |
965 | (struct locate_field_data): New struct. | |
966 | (dfs_locate_field_accessor_pre): New function. | |
967 | (locate_field_accessor): New function. | |
968 | * semantics.c (perform_or_defer_access_check): Add | |
969 | access_failure_info * param, and pass it on to call to | |
970 | enforce_access. | |
971 | * typeck.c (access_failure_info::record_access_failure): New method. | |
972 | (access_failure_info::maybe_suggest_accessor): New method. | |
973 | (finish_class_member_access_expr): Pass an access_failure_info | |
974 | instance to the lookup_member call, and call its | |
975 | maybe_suggest_accessor method afterwards. | |
976 | ||
6b6ae9eb MP |
977 | 2017-05-16 Marek Polacek <polacek@redhat.com> |
978 | ||
979 | PR sanitizer/80536 | |
980 | PR sanitizer/80386 | |
981 | * cp-gimplify.c (cp_fold): Handle SAVE_EXPR. | |
982 | ||
c20c3b42 NS |
983 | 2017-05-16 Nathan Sidwell <nathan@acm.org> |
984 | ||
c0c24822 NS |
985 | * name-lookup.c (check_local_shadow): New, broke out of ... |
986 | (pushdecl_maybe_friend_1): ... here. Call it. | |
987 | ||
e09ae857 NS |
988 | * cp-tree.h (OVL_NESTED_P, OVL_LOOKUP_P): New. |
989 | (ovl_first): Move inline definition to end of file. | |
990 | (ovl_make, lookup_add): Declare. | |
991 | (get_fns, get_first_fn): Make pure. | |
992 | * tree.c (ovl_cache): New. | |
993 | (ovl_make, lookup_add): New. | |
994 | * pt.c (do_class_deduction): Don't add candidates that will be | |
995 | elided. | |
996 | ||
a736411a | 997 | * call.c (build_user_type_conversion_1): Use OVL_FIRST. |
e09ae857 | 998 | (print_error_for_call_failure): Use OVL_NAME. |
a736411a NS |
999 | (build_op_call_1): Use ovl_iterator. |
1000 | (add_candidates): Use OVL_FIRST & lkp_iterator. | |
1001 | (build_op_delete_call): Use MAYBE_BASELINK_FUNCTIONS & | |
1002 | lkp_iterator. | |
1003 | * class.c (deduce_noexcept_on_destructors): Use ovl_iterator. | |
1004 | (type_has_user_nondefault_constructor, | |
1005 | in_class_defaulted_default_constructor, | |
1006 | type_has_user_provided_constructor, | |
1007 | type_has_user_provided_or_explicit_constructor, | |
1008 | type_has_non_user_provided_default_constructor, | |
1009 | vbase_has_user_provided_move_assign, | |
1010 | type_has_move_constructor, type_has_move_assign, | |
1011 | type_has_user_declared_move_constructor, | |
1012 | type_has_user_declared_move_assign, | |
1013 | type_build_ctor_call, type_build_dtor_call, | |
1014 | type_requires_array_cookie, explain_non_literal_class): Likewise. | |
1015 | (finish_struct): Use lkp_iterator. | |
1016 | (resolve_address_of_overloaded_function): Use OVL_NAME, lkp_iterator. | |
1017 | (note_name_declared_in_class): Use OVL_NAME. | |
1018 | * cxx-pretty-print.c (pp_cxx_unqualified_id): Use OVL_FIRST. | |
1019 | (pp_cxx_qualified_id, cxx_pretty_printer::id_expression, | |
1020 | cxx_pretty_printer::expression): Likewise. | |
1021 | * decl2.c (check_classfn): Use ovl_iterator. | |
1022 | * pt.c (retrieve_specialization): Use ovl_iterator. | |
1023 | * tree.c (cp_tree_equal): Use lkp_iterator. | |
1024 | (type_has_nontrivial_copy_init): Use ovl_iterator. | |
1025 | ||
c20c3b42 NS |
1026 | * typeck2.c (cxx_incomplete_type_diagnostic): Revert change and |
1027 | check is_overloaded_fn. | |
1028 | ||
ef6cb4c7 ML |
1029 | 2017-05-16 Martin Liska <mliska@suse.cz> |
1030 | ||
1031 | * parser.c (cp_lexer_print_token): Add default value for flags | |
1032 | argument of print_gimple_stmt, print_gimple_expr, | |
1033 | print_generic_stmt and print_generic_expr. | |
1034 | ||
322763f5 NS |
1035 | 2017-05-16 Nathan Sidwell <nathan@acm.org> |
1036 | ||
3f267553 NS |
1037 | * cp-tree.h (class ovl_iterator, class lkp_iterator): New OVERLOAD |
1038 | iterators. | |
1039 | (MAYBE_BASELINK_FUNCTIONS): New. | |
1040 | * constraint.cc (resolve_constraint_check): Use lkp_iterator. | |
1041 | * decl2.c (maybe_warn_sized_delete): Use ovl_iterator. | |
1042 | * lambda.c (maybe_generic_this_capture): Use lkp_iterator. | |
1043 | * method.c (inherited_ctor_binfo): Use ovl_iterator. | |
1044 | (binfo_inherited_from): Likewise. | |
1045 | * parser.c (lookup_literal_operator): Use lkp_iterator. | |
1046 | * pt.c (iterative_hash_template_arg): Use lkp_iterator. | |
1047 | (print_candidates_1): Likewise. | |
1048 | (determine_specialization): Likewise. | |
1049 | (resolve_overloaded_unification): Likewise. | |
1050 | (resolve_nondeduced_context): Likewise. | |
1051 | (type_dependent_expression_p): Likewise. | |
1052 | (dependent_template_p): Likewise. | |
1053 | * ptree.c (cxx_print_xnode): Likewise. | |
1054 | * semantics.c (omp_reduction_lookup): Use lkp_iterator. | |
1055 | (classtype_has_nothrow_assign_or_copy_p): Use ovl_iterator. | |
1056 | * typeck.c (check_template_keyword): Use lkp_iterator. | |
1057 | ||
848bf88d NS |
1058 | * cp-tree.h (OVL_FIRST, OVL_NAME): New. |
1059 | (ovl_first): New. | |
1060 | * constexpr.c (function_concept_check): Use OVL_FIRST. | |
1061 | * cvt.c (build_expr_type_conversion): Likewise. | |
1062 | * decl.c (poplevel, grokdeclarator): Use OVL_NAME. | |
1063 | * decl2.c (mark_used): Use OVL_FIRST. | |
1064 | * error.c (dump_decl): Use OVL_FIRST, OVL_NAME. | |
1065 | (dump_expr, location_of): Use OVL_FIRST. | |
1066 | * friend.c (do_friend): Use OVL_NAME. | |
1067 | * init.c (build_offset_ref): Use OVL_FIRST. | |
1068 | * mangle.c (write_member_name): Likewise. | |
1069 | (write_expression): Use OVL_NAME. | |
1070 | * method.c (strip_inheriting_ctors): Use OVL_FIRST. | |
1071 | * name-lookup.c (pushdecl_class_level): Use OVL_NAME. | |
1072 | * pt.c (check_explicit_specialization): Use OVL_FIRST. | |
1073 | (check_template_shadow): Likewise. | |
1074 | (tsubst_template_args): Use OVL_NAME. | |
1075 | (tsubst_baselink): Use OVL_FIRST. | |
1076 | * semantics.c (perform_koenig_lookup): Use OVL_NAME. | |
1077 | * tree.c (get_first_fn): Use OVL_FIRST. | |
1078 | * typeck.c (finish_class_member_access_expr): Use OVL_NAME. | |
1079 | (cp_build_addr_expr_1): Use OVL_FIRST. | |
1080 | ||
1f0ed17c NS |
1081 | * pt.c (tsubst_copy_and_build): Remove unnecessary COMPONENT_REF |
1082 | peeking. | |
1083 | * semantics.c (finish_id_expression): Directly init local var. | |
1084 | (finish_omp_reduction_clause): Use really_overloaded_fn. | |
1085 | * tree.c (get_fns): Document. Assert we got an overload. | |
1086 | (get_first_fn) Document. | |
1087 | * typeck.c (cp_build_addr_expr_1): Pass arg directly to | |
1088 | really_overloaded_fn. | |
c20c3b42 | 1089 | * typeck2.c (cxx_incomplete_type_diagnostic): Use get_first_fn directly. |
1f0ed17c | 1090 | |
322763f5 NS |
1091 | * cp-tree.h (SCOPE_DEPTH): New. |
1092 | * name-lookup.h (is_nested_namespace): Declare. | |
1093 | * name-lookup.c (is_nested_namespace): New. | |
1094 | (is_ancestor): Use it. | |
1095 | (set_decl_namespace): Likewise. | |
1096 | (push_namespace): Set SCOPE_DEPTH. | |
1097 | * pt.c (check_specialization_namespace): Use is_nested_namespace. | |
1098 | (check_unqualigied_spec_or_inst): Likewise. | |
1099 | ||
3a77e7cc NS |
1100 | 2017-05-15 Nathan Sidwell <nathan@acm.org> |
1101 | ||
1102 | PR c++/79369 | |
1103 | * cp-tree.h (DECL_NAMESPACE_INLINE_P): New. | |
1104 | * name-lookup.h (push_namespace): Return int, add make_inline arg. | |
1105 | * name-lookup.c (push_namespace): Deal with inline directly. | |
1106 | Return pushed count. | |
1107 | * parser.c (cp_parser_namespace_definition): Adjust for | |
1108 | push_namespace change. | |
1109 | ||
9c82d7b6 NS |
1110 | 2017-05-11 Nathan Sidwell <nathan@acm.org> |
1111 | ||
505dd180 NS |
1112 | * cp-lang.c (get_global_decls, cxx_pushdecl, LANG_HOOK_GETDECLS, |
1113 | LANG_HOOKS_PUSHDECL): Move to ... | |
1114 | * cp-objcp-common.c (cp_get_global_decls, cp_pushdec, | |
1115 | LANG_HOOK_DECLS, LANG_HOOKS_PUSHDECL): ... here. | |
1116 | * cp-objcp-common.h (cp_get_global_decls, cp_pushdecl): Declare. | |
1117 | ||
4f15a5da NS |
1118 | * name-lookup.h (pushdecl): Add default friend parm. |
1119 | (pushdecl_maybe_friend): Delete. | |
1120 | (pushdecl_top_level): Add default friend parm. | |
1121 | (pushdecl_top_level_maybe_friend): Delete. | |
1122 | * name-lookup.c (pushdecl_maybe_friend): Delete. | |
1123 | (pushdecl): Add is_friend parm. | |
1124 | (pushdecl_top_level): Add is friend_parm. | |
1125 | (pushdecl_top_level_maybe_friend, pushdecl_top_level_1): Delete. | |
1126 | (pushdecl_top_level_and_finish): Do pushing and finishing directly. | |
1127 | * friend.c (do_friend): Adjust. | |
1128 | * pt.c (tsubst_friend_class): Adjust. | |
1129 | ||
2e3757e7 NS |
1130 | Revert pushdecl_top_level_and_finish name change. |
1131 | * name-lookup.h (pushdecl_top_level_and_finish): Resurrect old name. | |
1132 | * name-lookup.c (pushdecl_top_level_and_finish): Likewise. | |
1133 | * decl.c (cp_make_fname_decl): Adjust. | |
1134 | * decl2.c (get_guard, handle_tls_init): Adjust. | |
1135 | * rtti.c (get_tinfo_decl, tinfo_base_init): Adjust. | |
1136 | ||
c8634a1a NS |
1137 | * name-lookup.c (pushdecl_outermost_localscope): Always |
1138 | conditionally stop timer. | |
1139 | ||
c443f3d5 NS |
1140 | * decl.c (xref_tag_1): Don't frob ts_lambda scope here. |
1141 | * name-lookup.c (pushtag_1): Deal with ts_lambda scope. | |
1142 | ||
056a17ee NS |
1143 | * cp-tree.h (pushdecl, pushdecl_maybe_friend, pushtag, |
1144 | pushtag_top_level_maybe_friend, | |
1145 | pushdecl_top_level_and_finish): Move declarations to ... | |
1146 | * name-lookup.h: ... here. Group pushdecl variants. | |
1147 | (pushdecl_top_level_and_finish): Rename to ... | |
1148 | (pushdecl_top_level_with_init): ... here. | |
1149 | * decl.c (cp_make_fname_decl): Use pushdecl_top_level_with_init. | |
1150 | * decl2.c (get_guard, handle_tls_init): Likewise. | |
1151 | * rtti.c (get_tinfo_decl, tinfo_base_init): Likewise. | |
1152 | * lambda.c (maybe_add_lambda_conv_op): Use namespace_bindings_p. | |
1153 | * method.c (implicitly_declare_fn): Likewise. | |
1154 | * searchc (node_debug_info_needed): Likewise. | |
1155 | * name-lookup.c (pushdecl_top_level_and_finish): Rename to ... | |
1156 | (pushdecl_top_level_with_init): ... here. | |
1157 | (pop_everything): Use namespace_bindings_p. | |
1158 | ||
9c82d7b6 NS |
1159 | * name-lookup.h (pop_binding): Rename to pop_local_binding. |
1160 | (getdecls): Rename to get_local_decls. | |
1161 | * name-lookup.c (pop_binding): Rename to ... | |
1162 | (pop_local_binding): ... here. | |
1163 | (pop_bindings_and_leave_scope): Adjust. | |
1164 | (getdecls): Rename to ... | |
1165 | (get_local_decls): ... here. Assert local scope. | |
1166 | * decl.c (poplevel): Assert not namespace. Adjust and simplify | |
1167 | logic. | |
1168 | (store_parm_decls): Adjust get_local_decls call. | |
1169 | (parser.c (synthesize_implicit_template_parm): Likewise. | |
1170 | ||
e81c8328 VV |
1171 | 2017-05-11 Ville Voutilainen <ville.voutilainen@gmail.com> |
1172 | ||
1173 | PR c++/80682 | |
1174 | * method.c (is_trivially_xible): Reject void types. | |
1175 | ||
268de039 NS |
1176 | 2017-05-10 Nathan Sidwell <nathan@acm.org> |
1177 | ||
3aa0a770 NS |
1178 | * class.c (handle_using_decl): Always use OVL_CURRENT. |
1179 | (resolve_address_of_overloaded_function): Move iterator decl into | |
1180 | for scope. Don't strip anticipated decls here. | |
1181 | ||
3dd83617 NS |
1182 | * pt.c (print_candidates_1): Separate TREE_LIST and OVERLOAD |
1183 | printing. | |
1184 | (print_candidates): Adjust. | |
1185 | ||
268de039 NS |
1186 | * cp-tree.h (build_new_function_call): Lose koenig_p arg. Fix |
1187 | line breaking. | |
1188 | * call.c (build_new_function_call): Lose koenig_p arg. Remove | |
1189 | koenig_p handling here. | |
1190 | * pt.c (push_template_decl_real): Unconditionally retrofit_lang_decl. | |
1191 | (tsubst_omp_clauses): Likewise. | |
1192 | (do_class_deduction): Adjust buld_new_function_call calls. | |
1193 | * semantics.c (finish_call_expr): Likewise. | |
1194 | ||
0ea37ae1 JM |
1195 | 2017-05-10 Jason Merrill <jason@redhat.com> |
1196 | ||
dd54ca56 JM |
1197 | * pt.c (unify_parameter_deduction_failure, unify_cv_qual_mismatch) |
1198 | (unify_type_mismatch, unify_parameter_pack_mismatch) | |
1199 | (unify_ptrmem_cst_mismatch, unify_expression_unequal) | |
1200 | (unify_parameter_pack_inconsistent, unify_inconsistency) | |
1201 | (unify_vla_arg, unify_method_type_error, unify_arity) | |
1202 | (unify_arg_conversion, unify_no_common_base) | |
1203 | (unify_inconsistent_template_template_parameters) | |
1204 | (unify_template_deduction_failure) | |
1205 | (unify_template_argument_mismatch) | |
1206 | (unify_overload_resolution_failure): Call unify_invalid. | |
1207 | ||
00e08b0f JM |
1208 | CWG 1847 - Clarifying compatibility during partial ordering |
1209 | * pt.c (more_specialized_fn): No order between two non-deducible | |
1210 | parameters. | |
1211 | ||
415dcf96 JM |
1212 | * pt.c (dependent_type_p): Make sure we aren't called with |
1213 | global_type_node. | |
1214 | ||
0ea37ae1 JM |
1215 | PR c++/79549 - C++17 ICE with non-type auto template parameter pack |
1216 | * pt.c (convert_template_argument): Just return an argument pack. | |
1217 | (coerce_template_parameter_pack, template_parm_to_arg) | |
1218 | (extract_fnparm_pack, make_argument_pack, tsubst_template_args) | |
1219 | (tsubst_decl, tsubst, type_unification_real, unify_pack_expansion): | |
1220 | Don't set the type of a NONTYPE_ARGUMENT_PACK. | |
1221 | * parser.c (make_char_string_pack, make_string_pack): Likewise. | |
1222 | ||
d5a2f455 NS |
1223 | 2017-05-10 Nathan Sidwell <nathan@acm.org> |
1224 | ||
1225 | * cp-tree.h (add_method, clone_function_decl): Change last arg to | |
1226 | bool. | |
1227 | * class.c (add_method): Change third arg to bool. Adjust. | |
1228 | (one_inheriting_sig, one_inherited_ctor): Adjust. | |
1229 | (clone_function_decl): Change 2nd arg to bool. Adjust. | |
1230 | (clone_constructors_and_destructors): Adjust. | |
1231 | * lambda.c (maybe_add_lambda_conv_op): Adjust. | |
1232 | * method.c (lazily_declare_fn): Adjust. | |
1233 | * pt.c (tsubst_decl, instantiate_template_1): Adjust. | |
1234 | * semantics.c (finish_member_declaration): Adjust. | |
1235 | ||
f00b411f PC |
1236 | 2017-05-10 Paolo Carlini <paolo.carlini@oracle.com> |
1237 | ||
1238 | PR c++/80145 | |
1239 | * decl.c (finish_function): To improve error recovery, change the | |
1240 | logic for calling apply_deduced_return_type. | |
1241 | ||
54069e59 JM |
1242 | 2017-05-09 Jason Merrill <jason@redhat.com> |
1243 | ||
0fa367aa | 1244 | PR c++/80605 - __is_standard_layout and empty base |
c0aad677 JM |
1245 | * class.c (check_bases): Ignore empty bases. |
1246 | ||
65d7adba JM |
1247 | PR c++/70979 - literal class and closure types |
1248 | * class.c (finalize_literal_type_property): Handle closures | |
1249 | specifically. | |
1250 | (explain_non_literal_class): Likewise. | |
1251 | ||
54069e59 JM |
1252 | PR c++/66297, DR 1684 - literal class and constexpr member fns |
1253 | * constexpr.c (is_valid_constexpr_fn): Only complain about | |
1254 | non-literal enclosing class in C++11. | |
1255 | * class.c (finalize_literal_type_property): Likewise. | |
1256 | ||
cc49d15a PC |
1257 | 2017-05-09 Paolo Carlini <paolo.carlini@oracle.com> |
1258 | ||
1259 | PR c++/80186 | |
1260 | * pt.c (tsubst_decl): Early return error_mark_node if | |
1261 | grok_ctor_properties returns false. | |
1262 | ||
60648580 JM |
1263 | 2017-05-09 Jason Merrill <jason@redhat.com> |
1264 | ||
1265 | PR c++/70167 - array prvalue treated as lvalue | |
1266 | * cp-tree.h (CONSTRUCTOR_C99_COMPOUND_LITERAL): New. | |
1267 | (enum fcl_t): New. | |
1268 | * semantics.c (finish_compound_literal): Add fcl_context parameter. | |
1269 | Only make a static variable for C99 syntax. | |
1270 | * parser.c (cp_parser_postfix_expression): Pass it. | |
1271 | * pt.c (tsubst_copy_and_build): Likewise. | |
1272 | * call.c (extend_ref_init_temps): Set | |
1273 | DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P. | |
1274 | ||
641da50a NS |
1275 | 2017-05-09 Nathan Sidwell <nathan@acm.org> |
1276 | ||
1277 | * cp-lang.c (get_global_decls, cxx_pushdecl): New. | |
1278 | (LANG_HOOKS_GETDECLS, LANG_HOOKS_PUSHDECL): Override. | |
1279 | * name-lookup.h (pushdecl_top_level): Declare. | |
1280 | ||
f3ec182d JM |
1281 | 2017-05-08 Jason Merrill <jason@redhat.com> |
1282 | ||
1283 | PR c++/80178 - parameter passing for uncopyable classes | |
1284 | * tree.c (type_has_nontrivial_copy_init): True for classes with only | |
1285 | deleted copy/move ctors. | |
1286 | (remember_deleted_copy, maybe_warn_parm_abi): New. | |
1287 | * decl.c (require_complete_types_for_parms, check_function_type): | |
1288 | Call maybe_warn_parm_abi. | |
1289 | * call.c (convert_for_arg_passing, build_cxx_call): Likewise. | |
1290 | ||
06aa5490 NS |
1291 | 2017-05-08 Nathan Sidwell <nathan@acm.org> |
1292 | ||
641da50a | 1293 | * decl.c (builtin_function_1): Set DECL_ANTICIPATED before pushing. |
507e429b NS |
1294 | (start_preparsed_function): Do decl pushing before setting |
1295 | current_funciton_decl and announcing it. | |
1296 | ||
d16d5eac NS |
1297 | * name-lookup.h (pushdecl_with_scope): Replace with ... |
1298 | (pushdecl_outermost_localscope): ... this. | |
1299 | * name-lookup.c (pushdecl_with_scope): Replace with ... | |
1300 | (pushdecl_outermost_localscope): ... this. | |
1301 | (pushdecl_namespace_level): Adjust. | |
1302 | * decl.c (cp_make_fname_decl): Use pushdecl_outermost_localscope. | |
1303 | * lambda.c (insert_capture_proxy): Likewise. | |
1304 | ||
7574e458 NS |
1305 | * class.c (build_vtbl_initializer): Don't shadow outer variable |
1306 | with static var. | |
1307 | ||
06aa5490 NS |
1308 | Revert _binding -> _value change. |
1309 | * name-lookup.h (get_namespace_value, set_global_value): Rename to ... | |
1310 | (get_namespace_binding, set_global_binding): ... these. | |
1311 | * name-lookup.c (get_namespace_value, set_global_value): Rename to ... | |
1312 | (get_namespace_binding, set_global_binding): ... these. | |
1313 | (arg_assoc_namespace, pushdecl_maybe_friend_1, | |
1314 | check_for_out_of_scope_variable, push_overloaded_decl_1, | |
1315 | lookup_name_innermost_nonclass_level, push_namespace): Adjust. | |
1316 | * cp-tree.h (IDENTIFIER_GLOBAL_VALUE, | |
1317 | SET_IDENTIFIER_GLOBAL_VALUE): Adjust. | |
1318 | * decl.c (poplevel): Adjust. | |
1319 | * pt.c (make_constrained_auto): Likewise. | |
1320 | ||
d4a5c4eb VR |
1321 | 2017-05-07 Volker Reichelt <v.reichelt@netcologne.de> |
1322 | ||
1323 | PR translation/80280 | |
1324 | * call.c (print_z_candidate): Fix quoting. | |
1325 | ||
56d35585 DM |
1326 | 2017-05-05 David Malcolm <dmalcolm@redhat.com> |
1327 | ||
1328 | * error.c (pedwarn_cxx98): Replace report_diagnostic | |
1329 | with diagnostic_report_diagnostic. | |
1330 | ||
30318029 NS |
1331 | 2017-05-05 Nathan Sidwell <nathan@acm.org> |
1332 | ||
4b4b2e58 NS |
1333 | * cp-tree.h (IDENTIFIER_GLOBAL_VALUE): Use get_namespace_value. |
1334 | (SET_IDENTIFIER_GLOBAL_VALUE): Use set_global_value. | |
1335 | (IDENTIFIER_NAMESPACE_VALUE): Delete. | |
1336 | * name-lookup.h (namespace_binding, set_namespace_binding): Replace | |
1337 | with ... | |
1338 | (get_namespace_value, set_global_value): ... these. | |
1339 | (get_global_value_if_present, is_typename_at_global_scope): Delete. | |
1340 | * decl.c (poplevel): Use get_namespace_value. | |
1341 | (grokdeclarator): Use IDENTIFIER_GLOBAL_VALUE. | |
1342 | * class.c (build_vtbl_initializer): Stash library decl in | |
1343 | static var. Use IDENTIFIER_GLOBAL_VALUE. | |
1344 | * except.c (do_get_exception_ptr, do_begin_catch, do_end_catch, | |
1345 | do_allocate_exception, do_free_exception, build_throw): Likewise. | |
1346 | * init.c (throw_bad_array_new_length): Likewise. | |
1347 | * rtti.c (throw_bad_cast, throw_bad_typeid): Likewise. | |
1348 | * name-lookup.c (arg_assoc_namespace, pushdecl_maybe_friend_1, | |
1349 | check_for_our_of_scope_variable, push_overloaded_decl_1): Use | |
1350 | get_namespace_value. | |
1351 | (set_namespace_binding_1): Rename to | |
1352 | (set_namespace_binding): ... here. | |
1353 | (set_global_value): New. | |
1354 | (lookup_name_innermost_nonclass_level_1, push_namespace): Use | |
1355 | get_namespace_value. | |
1356 | * pt.c (listify): Use get_namespace_value. | |
1357 | ||
77fa3ec1 NS |
1358 | * call.c (make_temporary_var_for_ref_to_temp): Push decl into |
1359 | current scope. | |
1360 | * lex.c (unqualified_name_lookup_error): Likewise. | |
1361 | ||
7187a6c8 NS |
1362 | * class.c (alter_class): Use retrofit_lang_decl directly. |
1363 | * decl.c (push_local_name, dupliate_decls): Likewise. | |
1364 | * semantics.c (omp_privatize_field): Likewise. | |
1365 | ||
b6263c5d NS |
1366 | Kill walk_namespaces. |
1367 | * cp-tree.h (walk_namespaces_fn, walk_namespaces): Delete. | |
1368 | * decl.c (walk_namespaces_r, walk_namespaces): Delete. | |
1369 | ||
30318029 NS |
1370 | Kill per-namespace static_decls. |
1371 | * cp-tree.h (static_decls): Declare. | |
1372 | (wrapup_globals_for_namespace, | |
1373 | diagnose_inline_vars_for_namespace): Replace with ... | |
1374 | (wrapup_namespace_globals): ... this. | |
1375 | * decl.c (static_decls): Define. | |
1376 | (wrapup_globals_for_namespace, | |
1377 | diagnose_inline_vars_for_namespace): Replace with ... | |
1378 | (wrapup_namespace_globals): ... this. | |
1379 | (cxx_init_decl_processing): Initialize static_decls. | |
1380 | * decl2.c (c_parse_final_cleanups): Adjust. | |
1381 | * name-lookup.h (cp_binding_level): Remove static_decls member. | |
1382 | * name-lookup.c (add_decl_to_level): Adjust. | |
1383 | (begin_scope): Adjust. | |
1384 | ||
dfae9048 PC |
1385 | 2017-05-05 Paolo Carlini <paolo.carlini@oracle.com> |
1386 | ||
1387 | PR c++/71577 | |
1388 | * decl.c (reshape_init): Unconditionally return error_mark_node | |
1389 | upon error about too many initializers. | |
1390 | ||
0f05d905 NS |
1391 | 2017-05-04 Nathan Sidwell <nathan@acm.org> |
1392 | ||
1393 | * constraint.cc (diagnose_check_constraint): Fix %E thinko. | |
1394 | ||
0f2c4a8f MS |
1395 | 2017-05-04 Martin Sebor <msebor@redhat.com> |
1396 | ||
1397 | PR translation/80280 | |
1398 | * call.c (print_z_candidate): Add missing quoting to %D and other | |
1399 | like directives. | |
1400 | (build_op_call_1): Same. | |
1401 | * constraint.cc (diagnose_check_constraint): Same. | |
1402 | * mangle.c (mangle_decl): Same. | |
1403 | * name-lookup.c (cp_binding_level_debug): Same. | |
1404 | (set_decl_namespace): Same. | |
1405 | * parser.c (cp_parser_tx_qualifier_opt): Same. | |
1406 | * pt.c (print_candidates_1): Same. | |
1407 | (check_template_variable): Same. | |
1408 | (tsubst_default_argument): Same. | |
1409 | (most_specialized_partial_spec): Same. | |
1410 | * semantics.c (omp_reduction_lookup): Same. | |
1411 | * tree.c (check_abi_tag_redeclaration): Same. | |
1412 | * typeck.c (comptypes): Same. | |
1413 | * typeck2.c (abstract_virtuals_error_sfinae): Same. | |
1414 | ||
b655c310 NS |
1415 | 2017-05-04 Nathan Sidwell <nathan@acm.org> |
1416 | ||
ad9870f2 NS |
1417 | More global trees. |
1418 | * cp-tree.h (enum cp_tree_index): Add CPTI_GLOBAL, | |
1419 | CPTI_GLOBAL_TYPE, CPTI_GLOBAL_IDENTIFIER, CPTI_ANON_IDENTIFIER, | |
1420 | CPTI_INIT_LIST_IDENTIFIER. | |
1421 | (global_namespace, global_type_node, global_identifier, | |
1422 | anon_identifier, init_list_identifier): New. | |
1423 | * decl.c (global_type_node, global_scope_name): Delete. | |
1424 | (initialize_predefined_identifiers): Add new identifiers. | |
1425 | (cxx_init_decl_processing): Adjust. | |
1426 | * name-lookup.h (global_namespace, global_type_node): Delete. | |
1427 | * name-lookup.c (global_namespace, anonymous_namespace_name, | |
1428 | get_anonymous_namespace_name): Delete. | |
1429 | (namespace_scope_ht_size, begin_scope, pushtag_1, | |
1430 | push_namespace): Adjust, | |
1431 | * call.c (type_has_extended_temps): Use init_list_identifier. | |
1432 | * pt.c (listify): Likewise. | |
1433 | ||
b655c310 NS |
1434 | * name-lookup.c: Reorder functions to make merging from modules |
1435 | branch simpler. | |
1436 | ||
8108ea30 JM |
1437 | 2017-05-03 Jason Merrill <jason@redhat.com> |
1438 | ||
1439 | * constexpr.c (cxx_eval_outermost_constant_expr): Use TV_CONSTEXPR. | |
1440 | ||
5bb64c41 NS |
1441 | 2017-05-03 Nathan Sidwell <nathan@acm.org> |
1442 | ||
1443 | * cp-tree.h (enum cp_tree_index, cp_global_trees): Move earlier, | |
1444 | along with #defines, to before name-lookup include. | |
1445 | ||
c3b73151 PC |
1446 | 2017-05-02 Paolo Carlini <paolo.carlini@oracle.com> |
1447 | ||
1448 | * pt.c (is_auto_or_concept): Remove. | |
1449 | (type_uses_auto_or_concept): Remove, unused. | |
1450 | (find_parameter_packs_r, extract_autos_r, is_auto_r): Adjust. | |
1451 | * parser.c (tree_type_is_auto_or_concept): Remove, unused. | |
1452 | * cp-tree.h (is_auto_or_concept): Remove. | |
1453 | ||
815d9cc6 XR |
1454 | 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn> |
1455 | ||
1456 | PR c++/80038 | |
1457 | * cp-cilkplus.c (cilk_install_body_with_frame_cleanup): Don't | |
1458 | add pedigree operation and detach call here. | |
1459 | * cp-gimplify.c (cp_gimplify_expr): Remove the calls to | |
1460 | cilk_cp_gimplify_call_params_in_spawned_fn. | |
1461 | (cilk_cp_gimplify_call_params_in_spawned_fn): Remove function. | |
1462 | * semantics.c (simplify_aggr_init_expr): Copy EXPR_CILK_SPAWN. | |
1463 | ||
6bbb3a69 VR |
1464 | 2017-04-29 Volker Reichelt <v.reichelt@netcologne.de> |
1465 | ||
1466 | * parser.c (cp_parser_member_declaration): Add fix-it hints for | |
1467 | stray comma and missing semicolon at end of member declaration. | |
1468 | ||
8211c4a2 VR |
1469 | 2017-04-27 Volker Reichelt <v.reichelt@netcologne.de> |
1470 | ||
1471 | * parser.c (cp_parser_cast_expression): Add target type of cast to | |
1472 | diagnostic. | |
1473 | * error.c (type_to_string): Add '{enum}' suffix to enumeration types. | |
1474 | ||
c8040757 PC |
1475 | 2017-04-26 Paolo Carlini <paolo.carlini@oracle.com> |
1476 | ||
1477 | * decl.c (grok_ctor_properties, ambi_op_p, unary_op_p): Change | |
1478 | return type to bool. | |
1479 | * cp-tree.h (grok_ctor_properties): Update. | |
1480 | ||
a480422d VR |
1481 | 2017-04-26 Volker Reichelt <v.reichelt@netcologne.de> |
1482 | ||
1483 | * parser.c (cp_parser_nested_name_specifier_opt): Add fix-it | |
1484 | information to diagnostic of invalid colon in nested-name-specifier. | |
1485 | ||
70caf430 VR |
1486 | 2017-04-25 Volker Reichelt <v.reichelt@netcologne.de> |
1487 | ||
1488 | * parser.c (cp_parser_elaborated_type_specifier): Add fix-it to | |
1489 | diagnostic of invalid class/struct keyword after enum. | |
1490 | ||
fbe91804 DM |
1491 | 2017-04-25 David Malcolm <dmalcolm@redhat.com> |
1492 | ||
1493 | * parser.c (cp_parser_member_declaration): Add fix-it hint | |
1494 | for removing stray semicolons. | |
1495 | ||
5ca28c1d DM |
1496 | 2017-04-25 David Malcolm <dmalcolm@redhat.com> |
1497 | ||
1498 | * name-lookup.c (get_std_name_hint): New function. | |
1499 | (maybe_suggest_missing_header): New function. | |
1500 | (suggest_alternative_in_explicit_scope): Call | |
1501 | maybe_suggest_missing_header. | |
1502 | ||
7d5dbb22 DM |
1503 | 2017-04-25 David Malcolm <dmalcolm@redhat.com> |
1504 | ||
1505 | PR c++/80177 | |
1506 | * name-lookup.c (suggest_alternative_in_explicit_scope): Convert | |
1507 | candidate type of bm from tree to const char *. | |
1508 | (consider_binding_level): Likewise. | |
1509 | (lookup_name_fuzzy): Likewise, using this to merge the best | |
1510 | result from the preprocessor into bm, rather than immediately | |
1511 | returning, so that better matches from reserved words can "win". | |
1512 | Guard the rejection of keywords that don't start decl-specifiers | |
1513 | so it only happens for FUZZY_LOOKUP_TYPENAME. | |
1514 | ||
761ad35c VR |
1515 | 2017-04-24 Volker Reichelt <v.reichelt@netcologne.de> |
1516 | ||
1517 | * decl.c (grokdeclarator): Use %qT instead of %<%T%> in diagnostics. | |
1518 | (start_enum): Likewise. | |
1519 | (build_enumerator): Likewise. Use %qE instead of plain %E. | |
1520 | * parser.c (cp_parser_mem_initializer_list): Use %qD instead of | |
1521 | %<%D%> in diagnostics. | |
1522 | (cp_parser_elaborated_type_specifier): Likewise. | |
1523 | * pt.c (make_pack_expansion): Use %qT and %qE instead of | |
1524 | %<%T%> and %<%E%> in diagnostics. | |
1525 | (tsubst_pack_expansion): Likewise. | |
1526 | ||
412f61f0 DM |
1527 | 2017-04-24 David Malcolm <dmalcolm@redhat.com> |
1528 | ||
1529 | PR c++/80016 | |
1530 | * parser.c (cp_parser_unary_expression): Generate a location | |
1531 | range for alignof and sizeof expressions. | |
1532 | ||
ec856f5f VR |
1533 | 2017-04-24 Volker Reichelt <v.reichelt@netcologne.de> |
1534 | ||
1535 | * parser.c (cp_parser_cv_qualifier_seq_opt): Add fix-it info to | |
1536 | error message. | |
1537 | (cp_parser_virt_specifier_seq_opt): Likewise. | |
1538 | (set_and_check_decl_spec_loc): Likewise twice. | |
1539 | ||
176e79b5 JM |
1540 | 2017-04-21 Jason Merrill <jason@redhat.com> |
1541 | ||
1542 | PR c++/80179 - ICE with initialized flexible array member. | |
1543 | * constexpr.c (verify_ctor_sanity): Handle flexible array members. | |
1544 | ||
ad32f067 RB |
1545 | 2017-04-21 Richard Biener <rguenther@suse.de> |
1546 | ||
1547 | * cp-tree.h (copy_decl): Annotate with CXX_MEM_STAT_INFO. | |
1548 | (copy_type): Likewise. | |
1549 | * lex.c (copy_decl): Pass down mem-stat info. | |
1550 | (copy_type): Likewise. | |
1551 | ||
34d57a10 JW |
1552 | 2017-04-20 Jonathan Wakely <jwakely@redhat.com> |
1553 | ||
1554 | PR c++/80473 | |
1555 | * init.c (build_new_1): Suppress notes about over-aligned new when | |
1556 | the warning is suppressed. | |
1557 | ||
c3cbcd45 VR |
1558 | 2017-04-20 Volker Reichelt <v.reichelt@netcologne.de> |
1559 | ||
1560 | * parser.c (cp_parser_member_declaration): Add warning with fixit | |
1561 | information for extra semicolon after in-class function definition. | |
1562 | ||
8a59d466 JJ |
1563 | 2017-04-20 Jakub Jelinek <jakub@redhat.com> |
1564 | ||
1565 | PR middle-end/80423 | |
1566 | * tree.c (build_cplus_array_type): Call build_array_type | |
1567 | with the intended TYPE_TYPELESS_STORAGE flag value, instead | |
1568 | of calling build_array_type and modifying later TYPE_TYPELESS_STORAGE | |
1569 | on the shared type. | |
1570 | ||
be7c73ae MP |
1571 | 2017-04-18 Marek Polacek <polacek@redhat.com> |
1572 | ||
1573 | PR c++/80244 - ICE with attribute in template alias. | |
1574 | * tree.c (strip_typedefs): Handle UNDERLYING_TYPE. | |
1575 | ||
d6e3e8a5 MP |
1576 | PR c++/80241 - ICE with alignas pack expansion. |
1577 | * error.c (dump_expr): Handle TREE_LIST. | |
1578 | * parser.c (cp_parser_std_attribute_list): Return error_mark if | |
1579 | make_pack_expansion returns an error. | |
1580 | ||
1adb82e1 BE |
1581 | 2017-04-17 Bernd Edlinger <bernd.edlinger@hotmail.de> |
1582 | ||
1583 | PR c++/80287 | |
1584 | * class.c (fixup_may_alias): Fix all type variants. | |
1585 | ||
6864d849 JM |
1586 | 2017-04-17 Jason Merrill <jason@redhat.com> |
1587 | ||
d478f1e4 JM |
1588 | PR c++/80415 - wrong error with default arg and array reference. |
1589 | * tree.c (lvalue_kind): Return clk_class for an array prvalue. | |
1590 | ||
6864d849 JM |
1591 | * pt.c (tsubst_init): Set TARGET_EXPR_DIRECT_INIT_P. |
1592 | ||
e072b0c4 AO |
1593 | 2017-04-15 Alexandre Oliva <aoliva@redhat.com> |
1594 | ||
1595 | * decl.c (name_unnamed_type): Split out of... | |
1596 | (grokdeclarator): ... this. | |
1597 | * decl.h (name_unnamed_type): Declare. | |
1598 | ||
350792ff RB |
1599 | 2017-04-12 Richard Biener <rguenther@suse.de> |
1600 | Bernd Edlinger <bernd.edlinger@hotmail.de> | |
1601 | ||
1602 | PR middle-end/79671 | |
1603 | * tree.c (build_cplus_array_type): Set TYPE_TYPELESS_STORAGE | |
1604 | for arrays of character or std::byte type. | |
1605 | ||
125db6a1 JM |
1606 | 2017-04-11 Jason Merrill <jason@redhat.com> |
1607 | ||
1608 | PR c++/80294 - ICE with constexpr and inheritance. | |
1609 | * constexpr.c (reduced_constant_expression_p): | |
1610 | A null constructor element is non-constant. | |
1611 | (cxx_eval_indirect_ref): Don't VERIFY_CONSTANT before | |
1612 | returning an empty base. | |
1613 | ||
347e1f77 JJ |
1614 | 2017-04-11 Jakub Jelinek <jakub@redhat.com> |
1615 | ||
1616 | PR c++/80370 | |
1617 | * decl.c (cp_finish_decomp): If processing_template_decl on | |
1618 | non-dependent decl, only set TREE_TYPE on the v[i] decls, but don't | |
1619 | change their DECL_VALUE_EXPR nor cp_finish_decl them. Instead make | |
1620 | sure DECL_VALUE_EXPR is the canonical NULL type ARRAY_REF for tsubst | |
1621 | processing. | |
1622 | * pt.c (value_dependent_expression_p) <case VAR_DECL>: For variables | |
1623 | with DECL_VALUE_EXPR, return true if DECL_VALUE_EXPR is type | |
1624 | dependent. | |
1625 | ||
82665822 JJ |
1626 | 2017-04-11 Jakub Jelinek <jakub@redhat.com> |
1627 | ||
1628 | PR c++/80363 | |
1629 | * error.c (dump_expr): Handle VEC_COND_EXPR like COND_EXPR. | |
1630 | ||
b447b28c JJ |
1631 | 2017-04-10 Jakub Jelinek <jakub@redhat.com> |
1632 | ||
1633 | PR c++/80176 | |
1634 | * tree.c (lvalue_kind): For COMPONENT_REF with BASELINK second | |
1635 | operand, if it is a static member function, recurse on the | |
1636 | BASELINK. | |
1637 | ||
98a7a34e MP |
1638 | 2017-04-10 Marek Polacek <polacek@redhat.com> |
1639 | ||
1640 | PR sanitizer/80348 | |
1641 | * typeck.c (cp_build_binary_op): Use NULL_TREE instead of NULL. Set | |
1642 | ORIG_TYPE earlier and not only when shortening. | |
1643 | ||
c60faeee JM |
1644 | 2017-04-07 Jason Merrill <jason@redhat.com> |
1645 | ||
3f4334cb JM |
1646 | PR c++/80356 - ICE with reference to function template argument. |
1647 | PR c++/79294 | |
1648 | * pt.c (convert_nontype_argument_function): Adjust type even with a | |
1649 | value-dependent argument. | |
1650 | ||
c60faeee JM |
1651 | PR c++/80267 - ICE with nested capture of reference |
1652 | PR c++/60992 | |
1653 | * pt.c (tsubst_copy): Handle lookup finding a capture proxy. | |
1654 | ||
1ef532f4 MP |
1655 | 2017-04-07 Marek Polacek <polacek@redhat.com> |
1656 | ||
1657 | PR sanitizer/80348 | |
1658 | * typeck.c (cp_build_binary_op): Convert COP[01] to ORIG_TYPE. | |
1659 | ||
2166aeb3 MP |
1660 | PR c++/80095 |
1661 | * call.c (build_over_call): Don't check cxx_dialect. | |
1662 | * cp-gimplify.c (cp_gimplify_init_expr): Don't check cxx_dialect nor | |
1663 | whether SUB is a CONSTRUCTOR. | |
1664 | * init.c (build_new_1): Don't check cxx_dialect. | |
1665 | * tree.c (replace_placeholders): Add a function comment. Return if | |
1666 | not in C++14, or if the object isn't a (member of a) class. | |
1667 | * typeck2.c (store_init_value): Don't check cxx_dialect nor whether | |
1668 | TYPE is CLASS_TYPE_P. | |
1669 | ||
98568e03 JJ |
1670 | 2017-04-05 Jakub Jelinek <jakub@redhat.com> |
1671 | ||
1672 | PR c++/80309 | |
1673 | * pt.c (canonical_type_parameter): Use vec_safe_grow_cleared instead | |
1674 | of a loop doing vec_safe_push of NULL. Formatting fixes. | |
1675 | (rewrite_template_parm): Copy TEMPLATE_PARM_PARAMETER_PACK from oldidx | |
1676 | to newidx before calling canonical_type_parameter on newtype. | |
1677 | ||
c0ea338b VR |
1678 | 2017-04-04 Volker Reichelt <v.reichelt@netcologne.de> |
1679 | ||
1680 | PR c++/80296 | |
1681 | * cxx-pretty-print.c (cxx_pretty_printer::expression): Add | |
1682 | UNARY_PLUS_EXPR case. | |
1683 | ||
e4307389 JM |
1684 | 2017-04-03 Jason Merrill <jason@redhat.com> |
1685 | ||
1686 | * semantics.c (finish_template_type): Check CLASSTYPE_TEMPLATE_INFO. | |
1687 | ||
5764ee3c JW |
1688 | 2017-04-03 Jonathan Wakely <jwakely@redhat.com> |
1689 | ||
1690 | * class.c (update_vtable_entry_for_fn): Fix typo in comment. | |
1691 | * decl2.c (one_static_initialization_or_destruction): Likewise. | |
1692 | * name-lookup.c (store_bindings): Likewise. | |
1693 | * parser.c (make_call_declarator): Likewise. | |
1694 | * pt.c (check_explicit_specialization): Likewise. | |
1695 | ||
5a68fae7 JM |
1696 | 2017-04-03 Jason Merrill <jason@redhat.com> |
1697 | ||
1698 | PR sanitizer/79993 - ICE with VLA initialization from string | |
1699 | PR c++/69487 - wrong VLA initialization from string | |
1700 | * init.c (finish_length_check): Split out from build_vec_init. | |
1701 | (build_vec_init): Handle STRING_CST. | |
1702 | * typeck2.c (split_nonconstant_init): Handle STRING_CST. | |
1703 | (digest_init_r): Don't give a STRING_CST VLA type. | |
1704 | ||
af88f557 JJ |
1705 | 2017-03-31 Jakub Jelinek <jakub@redhat.com> |
1706 | ||
6f3af356 JJ |
1707 | PR c++/79572 |
1708 | * cp-gimplify.c (cp_genericize_r): Sanitize INTEGER_CSTs with | |
1709 | REFERENCE_TYPE. Adjust ubsan_maybe_instrument_reference caller | |
1710 | for NOP_EXPR to REFERENCE_TYPE. | |
1711 | ||
af88f557 JJ |
1712 | PR libstdc++/80251 |
1713 | * cp-tree.h (enum cp_trait_kind): Add CPTK_IS_AGGREGATE. | |
1714 | * cxx-pretty-print.c (pp_cxx_trait_expression): Handle | |
1715 | CPTK_IS_AGGREGATE. | |
1716 | * semantics.c (trait_expr_value): Handle CPTK_IS_AGGREGATE. | |
1717 | Remove extraneous parens. | |
1718 | (finish_trait_expr): Handle CPTK_IS_AGGREGATE. | |
1719 | * parser.c (cp_parser_primary_expression): Handle RID_IS_AGGREGATE. | |
1720 | (cp_parser_trait_expr): Likewise. | |
1721 | ||
a9e4a1a5 JJ |
1722 | 2017-03-27 Jakub Jelinek <jakub@redhat.com> |
1723 | ||
1724 | PR middle-end/80162 | |
1725 | * cp-tree.h (cxx_mark_addressable): Add array_ref_p argument. | |
1726 | * typeck.c (cxx_mark_addressable): Likewise. Look through | |
1727 | VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE | |
1728 | to ARRAY_TYPE. | |
1729 | (cp_build_array_ref): Pass true as array_ref_p to cxx_mark_addressable. | |
1730 | ||
90471a3d JM |
1731 | 2017-03-24 Jason Merrill <jason@redhat.com> |
1732 | ||
1733 | PR c++/77339 - ICE with invalid use of alias template. | |
1734 | * pt.c (lookup_template_class_1): Don't try to enter the scope of an | |
1735 | alias template. | |
1736 | ||
c8b1fbc1 MP |
1737 | 2017-03-24 Marek Polacek <polacek@redhat.com> |
1738 | ||
1739 | PR c++/80119 | |
1740 | * cp-gimplify.c (cp_fold): Strip CLEANUP_POINT_EXPR if the expression | |
1741 | doesn't have side effects. | |
1742 | ||
16e9eaa6 JM |
1743 | 2017-03-23 Jason Merrill <jason@redhat.com> |
1744 | ||
842562b4 JM |
1745 | PR c++/80150 - ICE with overloaded variadic deduction. |
1746 | * pt.c (try_one_overload): Remove asserts. | |
1747 | ||
16e9eaa6 JM |
1748 | PR c++/77563 - missing ambiguous conversion error. |
1749 | * call.c (convert_like_real): Use LOOKUP_IMPLICIT. | |
1750 | ||
ee3ff394 MP |
1751 | 2017-03-23 Marek Polacek <polacek@redhat.com> |
1752 | ||
1753 | * cp-tree.h: Remove a C_RID_YYCODE reference. | |
1754 | ||
f13e9cd5 JJ |
1755 | 2017-03-22 Jakub Jelinek <jakub@redhat.com> |
1756 | ||
1757 | PR c++/80141 | |
1758 | * semantics.c (finish_omp_clause) <case OMP_CLAUSE_SIMDLEN, | |
1759 | case OMP_CLAUSE_ALIGNED>: Call maybe_constant_value only when not | |
1760 | processing_template_decl. | |
1761 | ||
d3e19c2c PC |
1762 | 2017-03-21 Paolo Carlini <paolo.carlini@oracle.com> |
1763 | ||
1764 | PR c++/77752 | |
1765 | * name-lookup.c (pushtag_1): Add check for bogus, non template, | |
1766 | std::initializer_list. | |
1767 | ||
8bee092e JJ |
1768 | 2017-03-21 Jakub Jelinek <jakub@redhat.com> |
1769 | ||
1770 | PR c++/35878 | |
1771 | * init.c (std_placement_new_fn_p, build_new_1): Formatting fixes. | |
1772 | ||
ece3b7e6 VV |
1773 | 2017-03-21 Ville Voutilainen <ville.voutilainen@gmail.com> |
1774 | ||
1775 | PR c++/35878 | |
8bee092e | 1776 | * init.c (std_placement_new_fn_p): New. |
ece3b7e6 VV |
1777 | (build_new_1): Call it. |
1778 | ||
8afd9c45 JM |
1779 | 2017-03-20 Jason Merrill <jason@redhat.com> |
1780 | ||
55b11c60 JM |
1781 | PR c++/80096 - ICE with C++17 non-type auto. |
1782 | * pt.c (tsubst): Delay tsubst of type of template non-type | |
1783 | parameter. | |
1784 | ||
18f73c5f JM |
1785 | PR c++/79519 - ICE with deleted template friend. |
1786 | * decl.c (grokdeclarator): Complain about misplaced function | |
1787 | definition using =, as well. | |
1788 | ||
8afd9c45 JM |
1789 | PR c++/79640 - infinite recursion with generic lambda. |
1790 | * pt.c (tsubst_copy) [VAR_DECL]: Register the dummy instantiation | |
1791 | before substituting its initializer. | |
1792 | ||
92377255 MP |
1793 | 2017-03-20 Marek Polacek <polacek@redhat.com> |
1794 | Paolo Carlini <paolo.carlini@oracle.com> | |
1795 | ||
1796 | PR c++/80059 - ICE with noexcept and __transaction_atomic | |
1797 | * except.c (build_must_not_throw_expr): Call | |
9da12bea | 1798 | instantiate_non_dependent_expr. |
92377255 | 1799 | |
c8816908 JM |
1800 | 2017-03-19 Jason Merrill <jason@redhat.com> |
1801 | ||
a4dfaae1 JM |
1802 | PR c++/80084 - wrong C++17 decomposition by reference of parameter. |
1803 | * decl.c (cp_finish_decomp): Don't pull out the DECL_INITIAL of a | |
1804 | reference decomposition. | |
1805 | ||
c8816908 JM |
1806 | PR c++/80077 - error with constexpr and -fno-elide-constructors. |
1807 | * constexpr.c (cxx_eval_call_expression): Set ctx->call while | |
1808 | expanding trivial constructor. | |
1809 | ||
c7ec585d JM |
1810 | 2017-03-17 Jason Merrill <jason@redhat.com> |
1811 | ||
d1a73b0b JM |
1812 | PR c++/78345 - ICE initializing array from lambda. |
1813 | * init.c (build_aggr_init): Check array initializer. | |
1814 | (build_vec_init): Check the type of a CONSTRUCTOR. | |
1815 | ||
c7ec585d JM |
1816 | PR c++/80073 - C++17 ICE with virtual base. |
1817 | * decl.c (xref_basetypes): Also check for indirect vbases. | |
1818 | ||
fbd603c4 JM |
1819 | 2017-03-16 Jason Merrill <jason@redhat.com> |
1820 | ||
2e92d7ad JM |
1821 | * decl.c (start_enum): std::byte aliases anything. |
1822 | ||
fbd603c4 JM |
1823 | PR c++/79797 |
1824 | * constexpr.c (lookup_placeholder): Tweak. | |
1825 | ||
559a77e1 JM |
1826 | 2017-03-15 Jason Merrill <jason@redhat.com> |
1827 | ||
1828 | PR c++/80043 - ICE with -fpermissive | |
1829 | * typeck.c (convert_for_assignment): Handle instantiate_type | |
1830 | not giving an error. | |
1831 | ||
9b74f933 NS |
1832 | 2017-03-14 Nathan Sidwell <nathan@acm.org> |
1833 | ||
1834 | PR c++/79393 DR 1658 workaround | |
1835 | * method.c (synthesized_method_base_walk): Inihibit abstract class | |
1836 | virtual base access check here. | |
1837 | (synthesized_method_walk): Not here. | |
1838 | ||
16e93e4b NS |
1839 | 2017-03-13 Nathan Sidwell <nathan@acm.org> |
1840 | ||
1841 | PR c++/79393 DR 1658 workaround | |
1842 | * method.c (synthesized_method_walk): Check vbases of abstract | |
1843 | classes for dtor walk. | |
1844 | ||
2f6f187a DM |
1845 | 2017-03-10 David Malcolm <dmalcolm@redhat.com> |
1846 | ||
1847 | PR translation/79848 | |
1848 | * decl.c (grokfndecl): Simplify uses of "%<%s%>" to "%qs". | |
1849 | ||
0c942f3e JM |
1850 | 2017-03-10 Jason Merrill <jason@redhat.com> |
1851 | ||
1852 | PR c++/79960 - alias templates and partial ordering | |
1853 | * pt.c (comp_template_args): Add partial_order parm. | |
1854 | (template_args_equal): Likewise. | |
1855 | (comp_template_args_porder): New. | |
1856 | (get_partial_spec_bindings): Use it. | |
1857 | ||
455d833c MP |
1858 | 2017-03-10 Marek Polacek <polacek@redhat.com> |
1859 | ||
1860 | PR c++/79967 | |
1861 | * decl.c (grokdeclarator): Check ATTRLIST before dereferencing it. | |
1862 | ||
cdd669f9 JJ |
1863 | 2017-03-10 Jakub Jelinek <jakub@redhat.com> |
1864 | ||
e260b0a7 JJ |
1865 | PR c++/79899 |
1866 | * optimize.c (maybe_thunk_body): Don't ICE if fns[0] is NULL. | |
1867 | Use XALLOCAVEC macro. | |
1868 | ||
cdd669f9 JJ |
1869 | PR c++/79896 |
1870 | * decl.c (finish_enum_value_list): If value is error_mark_node, | |
1871 | don't copy it and change its type. | |
1872 | * init.c (constant_value_1): Return error_mark_node if DECL_INITIAL | |
1873 | of CONST_DECL is error_mark_node. | |
1874 | ||
423aec8b MP |
1875 | 2017-03-09 Marek Polacek <polacek@redhat.com> |
1876 | ||
1877 | PR c++/79900 - ICE in strip_typedefs | |
1878 | * tree.c (strip_typedefs): Skip the attribute handling if T is | |
1879 | a variant type which hasn't been updated yet. | |
1880 | ||
6443c7c0 MP |
1881 | PR c++/79687 - wrong code with pointer-to-member |
1882 | * init.c (constant_value_1): Break if the variable has a dynamic | |
1883 | initializer. | |
1884 | ||
89262ec6 JM |
1885 | 2017-03-08 Jason Merrill <jason@redhat.com> |
1886 | ||
1887 | PR c++/79797 - ICE with self-reference in array DMI. | |
1888 | * constexpr.c (lookup_placeholder): Split out... | |
1889 | (cxx_eval_constant_expression): ...from here. | |
1890 | ||
a71dbc63 JJ |
1891 | 2017-03-07 Jakub Jelinek <jakub@redhat.com> |
1892 | ||
1893 | PR c/79834 | |
1894 | * parser.c (cp_parser_omp_cancellation_point, | |
1895 | cp_parser_omp_target_enter_data, cp_parser_omp_target_exit_data, | |
1896 | cp_parser_omp_target_update): Change "may only be used in compound | |
1897 | statements" diagnostics, such that the same translatable string is | |
1898 | used for all pragmas. | |
1899 | (cp_parser_pragma): Likewise. Use error_at instead of | |
1900 | cp_parser_error for that diagnostics. | |
1901 | ||
bdbbf28d MP |
1902 | 2017-03-06 Marek Polacek <polacek@redhat.com> |
1903 | ||
1904 | PR c++/79796 - ICE with NSDMI and this pointer | |
1905 | * call.c (build_over_call): Handle NSDMI with a 'this' by calling | |
1906 | replace_placeholders. | |
1907 | ||
345edb37 JJ |
1908 | 2017-03-06 Jakub Jelinek <jakub@redhat.com> |
1909 | ||
1910 | PR c++/79822 | |
1911 | * constexpr.c (cxx_eval_statement_list): Treat empty ({ }) like | |
1912 | ({ (void) 0; }). | |
1913 | ||
90d9a8e6 JM |
1914 | 2017-03-06 Jason Merrill <jason@redhat.com> |
1915 | ||
1916 | Revert "Allow deduction guides to look into primary template." | |
1917 | * cp-tree.h, parser.c, pt.c, search.c: Revert. | |
1918 | ||
d8b4baeb PC |
1919 | 2017-03-05 Paolo Carlini <paolo.carlini@oracle.com> |
1920 | ||
1921 | PR c++/70266 | |
1922 | * except.c (build_must_not_throw_expr): Perform the implicit | |
1923 | conversions on the condition. | |
1924 | ||
4cdeb234 JM |
1925 | 2017-03-03 Jason Merrill <jason@redhat.com> |
1926 | ||
108154ff JM |
1927 | * mangle.c (mangle_decl): Check -Wnoexcept-type instead of |
1928 | -Wc++1z-compat. | |
1929 | ||
4cdeb234 JM |
1930 | Core issues 2273 and 2277 |
1931 | * call.c (joust): Adjust using-declaration tiebreaker to handle | |
1932 | the intermediate base case. | |
1933 | * method.c (strip_inheriting_ctors): Just return the argument if | |
1934 | !flag_new_inheriting_ctors. | |
1935 | ||
30d309aa RB |
1936 | 2017-03-03 Richard Biener <rguenther@suse.de> |
1937 | ||
1938 | PR c++/79825 | |
1939 | * cp-gimplify.c (simple_empty_class_p): Handle EMPTY_CLASS_EXPR. | |
1940 | ||
7278b0a2 MP |
1941 | 2017-03-03 Marek Polacek <polacek@redhat.com> |
1942 | ||
1943 | PR c++/79791 | |
1944 | * typeck.c (string_conv_p): In C++11, always call pedwarn with | |
1945 | OPT_Wwrite_strings. | |
1946 | ||
de35db42 JM |
1947 | 2017-03-02 Jason Merrill <jason@redhat.com> |
1948 | ||
fb5ce608 JM |
1949 | Update overload resolution with deduction guides. |
1950 | * pt.c (do_class_deduction): Always build the copy guide. | |
1951 | (copy_guide_p, template_guide_p): New. | |
1952 | (build_deduction_guide): Remember the original constructor. | |
1953 | * call.c (joust): Prefer the copy guide and non-template guides. | |
1954 | ||
de35db42 JM |
1955 | Allow deduction guides to look into primary template. |
1956 | * cp-tree.h (struct saved_scope): Add deduction_guide_type. | |
1957 | (struct cp_decl_specifier_seq): Add constructor_p. | |
1958 | * parser.c (cp_parser_decl_specifier_seq): Set constructor_p. | |
1959 | (cp_parser_init_declarator): Check it. Set ctor_dtor_or_conv_p. | |
1960 | Clear deduction_guide_type. Don't handle deduction guide names. | |
1961 | (cp_parser_declarator): Don't clear ctor_dtor_or_conv_p. | |
1962 | (cp_parser_direct_declarator): Likewise. Handle deduction guides. | |
1963 | (cp_parser_member_declaration, cp_parser_cache_defarg) | |
1964 | (cp_parser_objc_class_ivars): Set ctor_dtor_or_conv_p. | |
1965 | * pt.c (tsubst_copy, tsubst_copy_and_build): Revert last change. | |
1966 | (build_deduction_guide): Set deduction_guide_type. | |
1967 | (dependent_scope_p): Check deduction_guide_type. | |
1968 | * search.c (lookup_member): Likewise. | |
1969 | ||
50bea0c5 JJ |
1970 | 2017-03-02 Jakub Jelinek <jakub@redhat.com> |
1971 | ||
1972 | PR c++/79782 | |
1973 | * init.c (mark_exp_read_r): New function. | |
1974 | (emit_mem_initializers): Use cp_walk_tree with mark_exp_read_r on | |
1975 | whole arguments instead of plain mark_exp_read on TREE_LIST values. | |
1976 | ||
9a642cca JM |
1977 | 2017-03-01 Jason Merrill <jason@redhat.com> |
1978 | ||
1979 | Class template argument deduction in new-expression | |
1980 | * init.c (build_new): Handle deduction from no initializer. | |
1981 | * parser.c (cp_parser_new_expression): Don't require a single | |
1982 | expression for class template deduction. | |
1983 | * typeck2.c (cxx_incomplete_type_diagnostic): Fix diagnostic for | |
1984 | class template placeholder. | |
1985 | * pt.c (tsubst_copy) [TEMPLATE_DECL]: Handle dependent context. | |
1986 | (tsubst_copy_and_build) [TEMPLATE_ID_EXPR]: Handle SCOPE_REF. | |
1987 | (redeclare_class_template): Set TEMPLATE_TYPE_PARM_FOR_CLASS. | |
1988 | ||
e3e9e8ca JJ |
1989 | 2017-03-01 Jakub Jelinek <jakub@redhat.com> |
1990 | ||
1991 | PR c++/79746 | |
1992 | * init.c (emit_mem_initializers): When not constructing vbases of | |
1993 | abstract classes, mark arguments as read for | |
1994 | -Wunused-but-set-parameter. | |
1995 | ||
853ef4e5 JM |
1996 | 2017-02-28 Jason Merrill <jason@redhat.com> |
1997 | ||
1998 | Class template argument deduction refinements | |
1999 | * call.c (joust): Move deduction guide tiebreaker down. | |
2000 | * decl.c (start_decl_1, cp_finish_decl, grokdeclarator): Allow class | |
2001 | deduction with no initializer. | |
2002 | * pt.c (build_deduction_guide): Handle implicit default/copy ctor. | |
2003 | (do_class_deduction): Use that rather than special case. | |
2004 | (do_auto_deduction): Handle null initializer. | |
2005 | ||
324ff1a0 JJ |
2006 | 2017-02-28 Jakub Jelinek <jakub@redhat.com> |
2007 | ||
2008 | * decl.c (find_decomp_class_base): Use cond ? G_("...") : G_("...") | |
2009 | instead of just cond ? "..." : "...". | |
2010 | (grokdeclarator): Likewise. | |
2011 | (build_enumerator): Likewise. | |
2012 | * init.c (build_new_1): Likewise. | |
2013 | * call.c (build_new_method_call_1): Likewise. | |
2014 | * parser.c: Include intl.h. | |
2015 | (cp_parser_oacc_enter_exit_data): Use %s and ternary operator only for | |
2016 | "enter"/"exit" keyword. | |
2017 | (cp_finalize_oacc_routine): Don't use %s to supply portions of the | |
2018 | message. | |
2019 | ||
080384d6 JM |
2020 | 2017-02-27 Jason Merrill <jason@redhat.com> |
2021 | ||
2022 | PR c++/71568 - SFINAE forming pointer to member function | |
2023 | * init.c (build_offset_ref): Check the return value of | |
2024 | perform_or_defer_access_check. | |
2025 | ||
d66d4590 MP |
2026 | 2017-02-27 Marek Polacek <polacek@redhat.com> |
2027 | ||
2028 | * decl.c (expand_static_init): Add missing } in a comment. | |
2029 | ||
24f12823 VR |
2030 | 2017-02-27 Volker Reichelt <v.reichelt@netcologne.de> |
2031 | ||
2032 | * init.c: Include intl.h. | |
2033 | (build_new_1): Move message strings into pedwarn to make them | |
2034 | -Wformat-security friendly. Mark string for translation. | |
2035 | * pt.c (tsubst_copy_and_build): Mark string for translation. | |
2036 | Make the pointer const. | |
2037 | * semantics.c (finish_id_expression): Mark strings for translation. | |
2038 | ||
9d975cb6 JJ |
2039 | 2017-02-25 Jakub Jelinek <jakub@redhat.com> |
2040 | ||
2041 | * call.c (build_op_delete_call): Make msg1 and msg2 const. | |
2042 | ||
4227c9ad JJ |
2043 | 2017-02-24 Jakub Jelinek <jakub@redhat.com> |
2044 | ||
2045 | PR c++/79588 | |
2046 | * call.c (build_over_call): Call check_function_arguments even for | |
2047 | -Wrestrict, adjust check_function_arguments caller. | |
2048 | * parser.c (cp_parser_postfix_expression): Don't handle -Wrestrict | |
2049 | here. | |
2050 | * typeck.c (cp_build_function_call_vec): Adjust | |
2051 | check_function_arguments caller. | |
2052 | ||
5713d448 MP |
2053 | 2017-02-24 Marek Polacek <polacek@redhat.com> |
2054 | ||
2055 | PR translation/79705 | |
2056 | * decl.c (check_redeclaration_exception_specification): Mark a string | |
2057 | for translation. Make the pointer const. | |
2058 | ||
e3beb191 PC |
2059 | 2017-02-23 Paolo Carlini <paolo.carlini@oracle.com> |
2060 | ||
2061 | PR c++/79361 | |
2062 | * pt.c (register_specialization): Check duplicate_decls return value | |
2063 | for error_mark_node and pass it back. | |
2064 | ||
349c6351 JM |
2065 | 2017-02-22 Jason Merrill <jason@redhat.com> |
2066 | ||
680ed106 JM |
2067 | PR c++/79679 - missing destructor for argument |
2068 | * call.c (build_over_call): Don't pass tf_no_cleanup to argument | |
2069 | conversions. | |
2070 | ||
349c6351 JM |
2071 | * pt.c (do_class_deduction): Handle 0 argument case. |
2072 | ||
e40b6fc7 JJ |
2073 | 2017-02-22 Jakub Jelinek <jakub@redhat.com> |
2074 | ||
2075 | PR c++/79664 | |
2076 | * parser.c (cp_parser_omp_teams, cp_parser_omp_target): Use | |
2077 | SET_EXPR_LOCATION on OMP_TARGET/OMP_TEAMS tree. | |
2078 | * constexpr.c (potential_constant_expression_1): Handle | |
2079 | OMP_*, OACC_* and CILK_* trees. Use error_at with | |
2080 | EXPR_LOC_OR_LOC (t, input_location) computed early | |
2081 | instead of error, or error_at with location_of (t). | |
2082 | ||
78af14ae MP |
2083 | 2017-02-22 Marek Polacek <polacek@redhat.com> |
2084 | ||
2085 | PR c++/79653 | |
2086 | * parser.c (cp_parser_std_attribute_spec): Don't build the attribute | |
2087 | if the alignas expression is erroneous. | |
2088 | * pt.c (tsubst_attribute): If tsubst_pack_expansion fails, return | |
2089 | error_mark_node. | |
2090 | ||
8fdddd3d MP |
2091 | PR c++/79657 |
2092 | * semantics.c (finish_underlying_type): Bail out for incomplete enums. | |
2093 | ||
46b48ef5 JM |
2094 | 2017-02-21 Jason Merrill <jason@redhat.com> |
2095 | ||
626aeaa7 JM |
2096 | PR c++/50308 - wrong deprecated warning with ADL |
2097 | PR c++/17729 - duplicate deprecated warning | |
2098 | * semantics.c (finish_id_expression): Only call mark_used on a | |
2099 | function if we aren't building a call. | |
2100 | ||
46b48ef5 JM |
2101 | PR c++/41727 - ICE with partial spec of partial instantiation |
2102 | * pt.c (process_partial_specialization): For now, don't check more | |
2103 | specialized if there is more than one level of args. | |
2104 | ||
a232a1cb MP |
2105 | 2017-02-21 Marek Polacek <polacek@redhat.com> |
2106 | ||
2107 | PR c++/79535 | |
2108 | * cp-tree.h (maybe_reject_flexarray_init): Declare. | |
2109 | * init.c (maybe_reject_flexarray_init): No longer static. | |
2110 | Add check for current_function_decl. | |
2111 | * parser.c (cp_parser_late_parse_one_default_arg): Reject | |
2112 | a default mem-initializer for a flexible array. | |
2113 | ||
b7280ac2 JJ |
2114 | 2017-02-21 Jakub Jelinek <jakub@redhat.com> |
2115 | Paolo Carlini <paolo.carlini@oracle.com> | |
2116 | ||
2117 | PR c++/79654 | |
2118 | * decl.c (cp_finish_decomp): Don't set decl's type to error_mark_node | |
2119 | on error. | |
2120 | * pt.c (tsubst_decomp_names): Return error_mark_node if the first | |
2121 | decl after the decomposition artificial decl has error_mark_node. | |
2122 | * decl2.c (prune_vars_needing_no_initialization): Use error_operand_p | |
2123 | instead of just == error_mark_node comparison. | |
2124 | ||
664beaf2 JJ |
2125 | 2017-02-21 Jakub Jelinek <jakub@redhat.com> |
2126 | ||
5c3f1d7b JJ |
2127 | PR sanitizer/79589 |
2128 | * decl.c: Include gimplify.h. | |
2129 | (cp_finish_decomp): Make sure there is no sharing of trees | |
2130 | in between DECL_VALUE_EXPR of decomposition decls. | |
2131 | ||
3bb43119 JJ |
2132 | PR c++/79655 |
2133 | * constexpr.c (cxx_eval_array_reference): Diagnose negative subscript. | |
2134 | ||
664beaf2 JJ |
2135 | PR c++/79639 |
2136 | * constexpr.c (cxx_eval_store_expression): If *valp is a PTRMEM_CST, | |
2137 | call cplus_expand_constant on it first. | |
2138 | ||
b80dfe44 JM |
2139 | 2017-02-19 Jason Merrill <jason@redhat.com> |
2140 | ||
0e53a276 JM |
2141 | PR c++/78139 - destructor needed by new-expression |
2142 | * call.c (build_special_member_call): Use tf_no_cleanup. | |
2143 | ||
8f712b76 JM |
2144 | PR c++/78282 - auto template and pack expansion |
2145 | * pt.c (find_parameter_packs_r): Don't walk into the type of | |
2146 | templates other than template template-parameters. | |
2147 | ||
bcbdfa4c JM |
2148 | PR c++/79606 - ICE with this->base_member in NSDMI |
2149 | * class.c (build_base_path): Check processing_template_decl. | |
2150 | ||
736a933c JM |
2151 | PR c++/79607 - ICE with T{} initializer |
2152 | * decl.c (type_dependent_init_p): Check the type of a CONSTRUCTOR. | |
2153 | ||
7950124e JM |
2154 | PR c++/79566 - elaborated-type-specifier in range for |
2155 | * parser.c (cp_parser_simple_declaration): Fix check for type | |
2156 | definition. | |
2157 | ||
bea40d11 JM |
2158 | PR c++/79400 - confusing suggestion of 'noexcept' |
2159 | * parser.c (cp_parser_exception_specification_opt): Remove | |
2160 | suggestion for deprecated dynamic exception-specification. | |
2161 | ||
4cd15931 JM |
2162 | PR c++/79470 - partial ordering with reference parameters |
2163 | * pt.c (unify) [INDIRECT_REF]: Handle pack expansions. | |
2164 | ||
cfb82564 JM |
2165 | PR c++/79500 - ICE with non-template deduction guide |
2166 | * pt.c (do_class_deduction): Use STRIP_TEMPLATE rather than | |
2167 | DECL_TEMPLATE_RESULT. | |
2168 | ||
de59c92b JM |
2169 | PR c++/79580 - ICE with compound literal |
2170 | * parser.c (cp_parser_class_head): If we're in the middle of an | |
2171 | expression, use ts_within_enclosing_non_class. | |
2172 | ||
b80dfe44 JM |
2173 | PR c++/79503 - inherited ctor taking base class |
2174 | * call.c (add_function_candidate): Also check that | |
2175 | DECL_INHERITED_CTOR_BASE is reference-related to the parameter type. | |
2176 | ||
f46e2bc9 PC |
2177 | 2017-02-19 Paolo Carlini <paolo.carlini@oracle.com> |
2178 | ||
2179 | PR c++/79380 | |
2180 | * typeck.c (cxx_alignas_expr): Reject a non-integral alignas | |
2181 | argument. | |
2182 | ||
7dfa657b JW |
2183 | 2017-02-19 Eric Fiselier <eric@efcs.ca> |
2184 | Jonathan Wakely <jwakely@redhat.com> | |
2185 | ||
2186 | PR c++/69523 | |
2187 | * parser.c (cp_parser_unqualified_id): Use OPT_Wliteral_suffix to | |
2188 | control warning about literal suffix identifiers without a leading | |
2189 | underscore. | |
2190 | ||
1ee26047 JM |
2191 | 2017-02-17 Jason Merrill <jason@redhat.com> |
2192 | ||
cb94c700 JM |
2193 | PR c++/79508 - lookup error with member template |
2194 | * parser.c (cp_parser_template_name): Clear | |
2195 | parser->context->object_type if we aren't doing lookup. | |
2196 | ||
7c586749 JM |
2197 | PR c++/78690 - ICE with using and global type with same name |
2198 | * pt.c (type_dependent_object_expression_p): True for | |
2199 | IDENTIFIER_NODE. | |
2200 | ||
edf1849a JM |
2201 | PR c++/79549 - C++17 ICE with non-type auto template parameter pack |
2202 | * pt.c (convert_template_argument): Just return an auto arg pack. | |
2203 | (tsubst_template_args): Don't tsubst an auto pack type. | |
2204 | ||
b10c7cd7 JM |
2205 | PR c++/79556 - C++17 ICE with non-type auto |
2206 | * pt.c (do_auto_deduction): Don't try to deduce from null type. | |
2207 | ||
1ee26047 JM |
2208 | PR c++/79533 - C++17 ICE with temporary cast to reference |
2209 | * call.c (build_over_call): Conversion to a reference prevents copy | |
2210 | elision. | |
2211 | ||
790ecf85 JJ |
2212 | 2017-02-16 Jakub Jelinek <jakub@redhat.com> |
2213 | Jason Merrill <jason@redhat.com> | |
2214 | ||
2215 | PR c++/79502 - lost nodiscard attribute | |
2216 | * pt.c (apply_late_template_attributes): Do apply non-dependent | |
2217 | attributes to types. | |
2218 | ||
61cee260 JM |
2219 | 2017-02-16 Jason Merrill <jason@redhat.com> |
2220 | ||
1e163090 JM |
2221 | PR c++/78572 - ICE with self-modifying array initializer |
2222 | * constexpr.c (cxx_eval_store_expression): The object we're | |
2223 | initializing is outside the constant-expression. | |
2224 | (cxx_eval_call_expression): Set ctx->call. | |
2225 | ||
61cee260 JM |
2226 | PR c++/79050 - ICE with undeduced auto and LTO |
2227 | * decl.c (poplevel): Remove undeduced auto decls. | |
2228 | ||
bcac0b4d JJ |
2229 | 2017-02-16 Jakub Jelinek <jakub@redhat.com> |
2230 | ||
2231 | PR c++/79512 | |
2232 | * parser.c (cp_parser_omp_target): For -fopenmp-simd | |
2233 | ignore #pragma omp target even when not followed by identifier. | |
2234 | ||
19e8a45f JM |
2235 | 2017-02-15 Jason Merrill <jason@redhat.com> |
2236 | Jakub Jelinek <jakub@redhat.com> | |
2237 | ||
2238 | PR c++/79464 - ICE in IPA with omitted constructor parms | |
2239 | * class.c (build_clone): Also omit parms from TYPE_ARG_TYPES. | |
2240 | (adjust_clone_args): Adjust. | |
2241 | (add_method): Remember omitted parms. | |
2242 | * call.c (add_function_candidate): Likewise. | |
2243 | * mangle.c (write_method_parms): Likewise. | |
2244 | * method.c (ctor_omit_inherited_parms): Return false if there are no | |
2245 | parms to omit. | |
2246 | ||
945c17d8 MS |
2247 | 2017-02-15 Martin Sebor <msebor@redhat.com> |
2248 | ||
2249 | PR c++/79363 | |
2250 | * init.c (maybe_reject_flexarray_init): New function. | |
2251 | (perform_member_init): Call it. | |
2252 | ||
4f5e5fcb JJ |
2253 | 2017-02-15 Jakub Jelinek <jakub@redhat.com> |
2254 | ||
e7202857 JJ |
2255 | PR c++/79301 |
2256 | * parser.c (cp_parser_std_attribute): Don't pedwarn about | |
2257 | [[deprecated]] with -std=c++11 and [[fallthrough]] with | |
2258 | -std=c++11 and -std=c++14. | |
2259 | ||
4f5e5fcb JJ |
2260 | PR c++/79288 |
2261 | * decl.c (grokdeclarator): For static data members, handle thread_p | |
2262 | only after handling inline. | |
2263 | ||
6f207d58 MP |
2264 | 2017-02-14 Marek Polacek <polacek@redhat.com> |
2265 | ||
2266 | PR c++/79420 | |
2267 | PR c++/79463 | |
2268 | * parser.c (cp_parser_postfix_dot_deref_expression): Avoid | |
2269 | clobbering if the postfix expression isn't an EXPR_P. | |
2270 | ||
8cb7aaa1 JM |
2271 | 2017-02-13 Jason Merrill <jason@redhat.com> |
2272 | ||
2273 | PR c++/79461 - ICE with lambda in constexpr constructor | |
2274 | * constexpr.c (build_data_member_initialization): Ignore | |
2275 | initialization of a local variable. | |
2276 | ||
b84702c0 JJ |
2277 | 2017-02-13 Jakub Jelinek <jakub@redhat.com> |
2278 | ||
5995f597 JJ |
2279 | * init.c (warn_placement_new_too_small): Add missing space in |
2280 | diagnostics. | |
2281 | * parser.c (cp_parser_oacc_declare): Likewise. | |
2282 | * mangle.c (maybe_check_abi_tags): Likewise. | |
2283 | ||
b84702c0 JJ |
2284 | PR c++/79232 |
2285 | * typeck.c (cp_build_modify_expr): Handle properly COMPOUND_EXPRs | |
2286 | on lhs that have {PRE{DEC,INC}REMENT,MODIFY,MIN,MAX,COND}_EXPR | |
2287 | in the rightmost operand. | |
2288 | ||
b9a161ff NS |
2289 | 2017-02-13 Nathan Sidwell <nathan@acm.org> |
2290 | ||
2291 | PR c++/79296 - ICE mangling localized template instantiation | |
2292 | * decl2.c (determine_visibility): Use template fn context for | |
2293 | local class instantiations. | |
2294 | ||
bc61048a JM |
2295 | 2017-02-11 Jason Merrill <jason@redhat.com> |
2296 | ||
817a77e4 JM |
2297 | PR c++/77659 - ICE with new and C++14 aggregate NSDMI |
2298 | * init.c (build_new): Make backups of any CONSTRUCTORs in init. | |
2299 | (build_new_1): Use replace_placeholders. | |
2300 | * tree.c (replace_placeholders_t): Also track whether we've seen a | |
2301 | placeholder. | |
2302 | (replace_placeholders, replace_placeholders_r): Adjust. | |
2303 | * cp-tree.h: Adjust. | |
2304 | ||
bc61048a JM |
2305 | PR c++/77790 - ICE with auto function in C++11 mode |
2306 | * decl.c (undeduced_auto_decl): Remove C++14 limitation. | |
2307 | (require_deduced_type): Add complain parm, return bool. | |
2308 | * cp-tree.h: Adjust. | |
2309 | * decl2.c (mark_used): Use require_deduced_type. | |
2310 | ||
c16b872c JM |
2311 | 2017-02-10 Jason Merrill <jason@redhat.com> |
2312 | ||
6a2cc46b JM |
2313 | PR c++/78908 - template ops and bitfields |
2314 | * tree.c (build_min_non_dep): Use unlowered_expr_type. | |
2315 | ||
5c97093b JM |
2316 | PR c++/78897 - constexpr union |
2317 | * constexpr.c (cxx_eval_store_expression): A store to a union member | |
2318 | erases a previous store to another member. | |
2319 | ||
f494ac0e JM |
2320 | PR c++/71285 - member of fold-expression |
2321 | * semantics.c (finish_unary_fold_expr) | |
2322 | (finish_binary_fold_expr): Use null type for fold-expressions. | |
2323 | ||
c16b872c JM |
2324 | PR c++/79401 - protected inherited constructor |
2325 | * call.c (enforce_access): For inheriting constructor, find a base | |
2326 | binfo in the path we already have. | |
2327 | ||
6f4f30bf MP |
2328 | 2017-02-10 Marek Polacek <polacek@redhat.com> |
2329 | ||
2330 | PR c++/79435 | |
2331 | * pt.c (type_dependent_expression_p): Check if the expression type | |
2332 | is null. | |
2333 | ||
3799a5b8 MP |
2334 | PR c++/79184 |
2335 | * cvt.c (ocp_convert): Add a sentinel against -Wint-in-bool-context | |
2336 | if warnings shouldn't be given. | |
2337 | ||
a7c8ed0c PC |
2338 | 2017-02-10 Paolo Carlini <paolo.carlini@oracle.com> |
2339 | ||
2340 | PR c++/71737 | |
2341 | * pt.c (tsubst_decl): Don't try to preserve a typedef that names | |
2342 | an error_mark_node as type. | |
2343 | ||
9bfc55d0 JJ |
2344 | 2017-02-09 Jakub Jelinek <jakub@redhat.com> |
2345 | Jason Merrill <jason@redhat.com> | |
2346 | ||
2347 | PR c++/79143 | |
2348 | * pt.c (instantiate_class_template_1): Copy CLASSTYPE_NON_AGGREGATE | |
2349 | from pattern to type. | |
2350 | ||
a56c0ac0 JM |
2351 | 2017-02-09 Jason Merrill <jason@redhat.com> |
2352 | ||
2353 | PR c++/79316 - default argument in deduction guide | |
2354 | PR c++/79350 - explicit deduction guide | |
2355 | * parser.c (cp_parser_constructor_declarator_p) | |
2356 | (cp_parser_direct_declarator): Parse deduction guides more like | |
2357 | constructors. | |
2358 | * cp-tree.h (enum special_function_kind): Add sfk_deduction_guide. | |
2359 | * tree.c (special_function_p): Return it. | |
2360 | * decl.c (check_special_function_return_type): Handle it. | |
2361 | (grokdeclarator, grokfndecl): Adjust. | |
2362 | (cp_finish_decl): Pass flags to do_auto_deduction. | |
2363 | * error.c (dump_decl_name): Use TFF_UNQUALIFIED_NAME. | |
2364 | * pt.c (dguide_name_p): Take a const_tree. | |
2365 | (do_class_deduction): Handle explicit. | |
2366 | (do_auto_deduction): Pass flags through. | |
2367 | (build_deduction_guide): Copy explicit flag. | |
2368 | ||
56f71478 JJ |
2369 | 2017-02-09 Jakub Jelinek <jakub@redhat.com> |
2370 | ||
f08683a1 JJ |
2371 | PR c++/79429 |
2372 | * parser.c (cp_parser_omp_ordered): Don't check for non-pragma_stmt | |
2373 | non-pragma_compound context here. | |
2374 | (cp_parser_omp_target): Likewise. | |
2375 | (cp_parser_pragma): Don't call push_omp_privatization_clauses and | |
2376 | parsing for ordered and target omp pragmas in non-pragma_stmt | |
2377 | non-pragma_compound contexts. | |
2378 | ||
56f71478 JJ |
2379 | PR c/79431 |
2380 | * parser.c (cp_parser_oacc_declare): Formatting fix. | |
2381 | (cp_parser_omp_declare_target): Don't invoke symtab_node::get on | |
2382 | automatic variables. | |
2383 | ||
02889d23 CLT |
2384 | 2016-02-09 Nathan Sidwell <nathan@codesourcery.com> |
2385 | Chung-Lin Tang <cltang@codesourcery.com> | |
2386 | ||
2387 | * parser.c (cp_parser_oacc_clause_tile): Disallow collapse. Fix | |
2388 | parsing. Parse constant expression. Remove semantic checking. | |
2389 | (cp_parser_omp_clause_collapse): Disallow tile. | |
2390 | (cp_parser_omp_for_loop): Deal with tile clause. Don't emit a parse | |
2391 | error about missing for after already emitting one. Use more | |
2392 | conventional for idiom for unbounded loop. | |
2393 | * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_TILE. | |
2394 | * semantics.c (finish_omp_clauses): Correct TILE semantic check. | |
2395 | (finish_omp_for): Deal with tile clause. | |
2396 | ||
8e956c22 NS |
2397 | 2017-02-07 Nathan Sidwell <nathan@acm.org> |
2398 | ||
2399 | * method.c (synthesized_method_base_walk): New. Broken out of ... | |
2400 | (synthesized_method_walk): ... here. Call it. Cleanup | |
2401 | initializations. | |
2402 | ||
bb7d75ff PP |
2403 | 2017-02-07 Patrick Palka <ppalka@gcc.gnu.org> |
2404 | ||
2405 | PR c++/79360 | |
2406 | * typeck2.c (process_init_constructor_union): Consider only | |
2407 | FIELD_DECLs when looking for an NSDMI. | |
2408 | ||
44a6da7b JM |
2409 | 2017-02-06 Jason Merrill <jason@redhat.com> |
2410 | ||
2411 | PR c++/71193 - incomplete types in templates | |
2412 | * parser.c (cp_parser_postfix_dot_deref_expression): In a template | |
2413 | handle incomplete type by pedwarning and then treating as dependent. | |
2414 | ||
a5e8cbd1 JJ |
2415 | 2017-02-06 Jakub Jelinek <jakub@redhat.com> |
2416 | ||
98e09245 JJ |
2417 | PR c++/79379 |
2418 | * constexpr.c (cxx_eval_constant_expression): Handle ANNOTATE_EXPR. | |
2419 | (potential_constant_expression_1): Likewise. | |
2420 | ||
e8b0383c JJ |
2421 | PR c++/79377 |
2422 | * tree.c (build_min_non_dep_op_overload): For POST{INC,DEC}REMENT_EXPR | |
2423 | allow one fewer than expected arguments if flag_permissive. | |
2424 | ||
a5e8cbd1 JJ |
2425 | PR c++/79372 |
2426 | * decl.c (cp_finish_decomp): On error set decl type to error_mark_node. | |
2427 | * pt.c (tsubst_expr): Don't call tsubst_decomp_names on decompositions | |
2428 | with error_mark_node type. | |
2429 | ||
99be38ec JM |
2430 | 2017-02-03 Jason Merrill <jason@redhat.com> |
2431 | ||
77095a6a JM |
2432 | PR c++/78689 - ICE on constructor with label |
2433 | * optimize.c (maybe_clone_body): Replace omitted parameters with | |
2434 | null lvalues. | |
2435 | * class.c (build_clone): Fix logic for omitting inherited parms. | |
2436 | ||
8a87daca JM |
2437 | PR c++/12245 - excessive memory use |
2438 | * constexpr.c (maybe_constant_value): Fold maybe_constant_value_1 | |
2439 | back in. Don't cache constants. | |
2440 | (maybe_constant_init): Don't cache constants. | |
2441 | ||
99be38ec JM |
2442 | PR c++/79294 - ICE with invalid template argument |
2443 | * pt.c (convert_nontype_argument_function): Check value-dependence. | |
2444 | (convert_nontype_argument): Don't check it here for function ptrs. | |
2445 | ||
27de0fab RB |
2446 | 2017-02-02 Richard Biener <rguenther@suse.de> |
2447 | ||
2448 | PR cp/14179 | |
2449 | * cp-gimplify.c (cp_fold): When folding a CONSTRUCTOR copy | |
2450 | it lazily on the first changed element only and copy it | |
2451 | fully upfront, only storing changed elements. | |
2452 | ||
d8d58893 PC |
2453 | 2017-02-02 Paolo Carlini <paolo.carlini@oracle.com> |
2454 | ||
2455 | PR c++/69637 | |
2456 | * decl2.c (grokbitfield): In case of error don't set-up DECL_INITIAL | |
2457 | to the width. | |
2458 | ||
19bdccb4 JJ |
2459 | 2017-01-31 Jakub Jelinek <jakub@redhat.com> |
2460 | ||
2461 | PR c++/79304 | |
2462 | * error.c (dump_expr) <case COMPONENT_REF>: Don't print . | |
2463 | after ARROW_EXPR. | |
2464 | ||
fcb2cdfc DM |
2465 | 2017-01-31 David Malcolm <dmalcolm@redhat.com> |
2466 | ||
2467 | PR c++/79298 | |
2468 | * name-lookup.c (suggest_alternative_in_explicit_scope): Resolve | |
2469 | any namespace aliases. | |
2470 | ||
7f357c61 NS |
2471 | 2017-01-31 Nathan Sidwell <nathan@acm.org> |
2472 | ||
5ae37bdf NS |
2473 | PR c++/79290 |
2474 | * typeck.c (build_ptrmemfunc_access_expr): Set TREE_NO_WARNING. | |
2475 | ||
de3fbef6 NS |
2476 | PR c++/67273 |
2477 | PR c++/79253 | |
2478 | * pt.c: (instantiate_decl): Push to top level when current | |
2479 | function scope doesn't match. Only push lmabda scope stack when | |
2480 | pushing to top. | |
2481 | ||
1a5bac38 NS |
2482 | * cp-tree.h (instantiate_decl): Make defer_ok bool. |
2483 | * pt.c: Fix instantiate_decl calls to pass true/false not 0/1 | |
2484 | (instantiate_decl): Simplify and reorder state saving and restoration. | |
2485 | ||
7f357c61 NS |
2486 | PR c++/79264 |
2487 | * lambda.c (maybe_generic_this_capture): Deal with template-id-exprs. | |
2488 | * semantics.c (finish_member_declaration): Assert class is being | |
2489 | defined. | |
2490 | ||
8db29d88 AO |
2491 | 2017-01-30 Alexandre Oliva <aoliva@redhat.com> |
2492 | ||
2493 | Introduce C++ support in libcc1. | |
2494 | * cp-tree.h (struct lang_identifier): Add oracle_looked_up. | |
2495 | (ansi_opname): Rename to... | |
2496 | (cp_operator_id): ... this. Adjust all callers. | |
2497 | (ansi_assopname): Rename to... | |
2498 | (cp_assignment_operator_id): ... this. Adjust all callers. | |
2499 | (cp_literal_operator_id): Declare. | |
2500 | (set_global_friend): Declare. | |
2501 | (is_global_friend): Declare. | |
2502 | (enum cp_oracle_request): New type. | |
2503 | (cp_binding_oracle_function): New type. | |
2504 | (cp_binding_oracle): Declare. | |
2505 | (cp_finish_injected_record_type): Declare. | |
2506 | * friend.c (global_friend): New var. | |
2507 | (set_global_friend): New fn. | |
2508 | (is_global_friend): New fn. | |
2509 | (is_friend): Call is_global_friend. | |
2510 | * name-lookup.c (cp_binding_oracle): New var. | |
2511 | (query_oracle): New fn. | |
2512 | (qualified_lookup_using_namespace): Call query_oracle. | |
2513 | (lookup_name_real_1): Likewise. | |
2514 | * parser.c (cp_literal_operator_id): Drop static. | |
2515 | * search.c (friend_accessible_p): Call is_global_friend. | |
2516 | * semantics.c (is_this_parameter): Accept a variable if the | |
2517 | binding oracle is enabled. | |
2518 | ||
20f058d0 JM |
2519 | 2017-01-27 Jason Merrill <jason@redhat.com> |
2520 | ||
2521 | PR c++/78771 - ICE with inherited constructor. | |
2522 | * call.c (build_over_call): Call deduce_inheriting_ctor here. | |
2523 | * pt.c (tsubst_decl): Not here. | |
2524 | * class.c (add_method): Or here. | |
2525 | * method.c (deduce_inheriting_ctor): Handle clones. | |
2526 | (implicitly_declare_fn): Don't deduce inheriting ctors yet. | |
2527 | ||
bb6a6ee9 AB |
2528 | 2017-01-27 Adam Butcher <adam@jessamine.co.uk> |
2529 | ||
2530 | PR c++/64382 | |
2531 | * cp/parser.c (parsing_default_capturing_generic_lambda_in_template): | |
2532 | New function. | |
2533 | * cp/cp-tree.h: Declare it. | |
2534 | * cp/semantics.c (finish_id_expression): Resolve names within a default | |
2535 | capturing generic lambda defined within a template prior to | |
2536 | instantiation to allow for captures to be added to the closure type. | |
2537 | ||
905d2812 JJ |
2538 | 2017-01-26 Jakub Jelinek <jakub@redhat.com> |
2539 | ||
2540 | PR c++/68727 | |
2541 | * cp-tree.def (OFFSETOF_EXPR): Bump number of operands to 2. | |
2542 | * cp-tree.h (finish_offsetof): Add OBJECT_PTR argument. | |
2543 | * parser.c (cp_parser_builtin_offsetof): Pass result of | |
2544 | build_static_cast of null_pointer_node to finish_offsetof. | |
2545 | * semantics.c (finish_offsetof): Add OBJECT_PTR argument, use | |
2546 | it for -Winvalid-offsetof pedwarn instead of trying to guess | |
2547 | original offsetof type from EXPR. Save OBJECT_PTR as a new | |
2548 | second operand to OFFSETOF_EXPR. | |
2549 | * pt.c (tsubst_copy_and_build) <case OFFSETOF_EXPR>: Adjust | |
2550 | finish_offsetof caller, pass the second operand of OFFSETOF_EXPR | |
2551 | as OBJECT_PTR. | |
2552 | ||
effdaefe JM |
2553 | 2017-01-26 Jason Merrill <jason@redhat.com> |
2554 | ||
5668970a JM |
2555 | * name-lookup.c (parse_using_directive): Deprecate strong using. |
2556 | ||
effdaefe JM |
2557 | PR c++/79176 - lambda ICE with -flto -Os |
2558 | * decl2.c (vague_linkage_p): Handle decloned 'tors. | |
2559 | * tree.c (decl_linkage): Likewise. | |
2560 | ||
58feaa5f MS |
2561 | 2017-01-25 Martin Sebor <msebor@redhat.com> |
2562 | ||
9f35c953 | 2563 | * decl.c (grokdeclarator): Fix a typo in a comment. |
58feaa5f | 2564 | |
0e343868 JJ |
2565 | 2017-01-25 Jakub Jelinek <jakub@redhat.com> |
2566 | ||
a25608aa JJ |
2567 | PR c++/78896 |
2568 | * decl.c (cp_finish_decomp): Disallow memberwise decomposition of | |
2569 | lambda expressions. | |
2570 | ||
0e343868 JJ |
2571 | PR c++/77914 |
2572 | * parser.c (cp_parser_lambda_declarator_opt): Pedwarn with | |
2573 | OPT_Wpedantic on lambda templates for -std=c++14 and higher. | |
2574 | ||
e5e391d6 MO |
2575 | 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com> |
2576 | ||
2577 | PR lto/79061 | |
2578 | * decl.c (cxx_init_decl_processing): Pass main_input_filename | |
2579 | to build_translation_unit_decl. | |
2580 | ||
7cfd79d6 JJ |
2581 | 2017-01-24 Jakub Jelinek <jakub@redhat.com> |
2582 | ||
2583 | PR c++/79205 | |
2584 | * cp-gimplify.c (cp_genericize_r): Add result of | |
2585 | convert_from_reference on invisiref parm to p_set. | |
2586 | ||
3e4b91f2 NS |
2587 | 2017-01-24 Nathan Sidwell <nathan@acm.org> |
2588 | ||
1d7bc790 NS |
2589 | PR c++/78469 - defaulted ctor and inaccessible dtor |
2590 | * cp-tree.h (tsubst_flags): Add tf_no_cleanup. | |
2591 | * init.c (build_new_1): Pass tf_no_cleanup to build_value_init. | |
2592 | * tree.c (build_target_expr): Check tf_no_cleanup. | |
2593 | ||
3e4b91f2 NS |
2594 | PR c++/79118 - anon-members and constexpr |
2595 | * constexpr.c (cx_check_missing_mem_inits): Caller passes type not | |
2596 | ctor decl. Recursively check anonymous members. | |
2597 | (register_constexpr_fundef): Adjust cx_check_missing_mem_inits | |
2598 | call. | |
2599 | (explain_invalid_constexpr_fn): Likewise. | |
2600 | ||
e6b8075c NS |
2601 | 2017-01-23 Nathan Sidwell <nathan@acm.org> |
2602 | ||
fc7612fd NS |
2603 | PR c++/71710 - template using directive of field |
2604 | * pt.c (tsubst_copy_and_build [COMPONENT_REF]): Move FIELD_DECL | |
2605 | check earlier. | |
2606 | ||
e6b8075c NS |
2607 | PR c++/71406 - ICE with scope-ref'd template id exprs |
2608 | PR c++/77508 | |
2609 | * typeck.c (finish_class_member_access_expr): Break up SCOPE_REF | |
2610 | before breaking up TEMPLATE_ID_EXPR. | |
2611 | ||
4b9f2115 NS |
2612 | 2017-01-20 Nathan Sidwell <nathan@acm.org> |
2613 | ||
2614 | PR c++/78495 - wrong code inherited ctor and invisi-ref parm | |
2615 | * cp-gimplify.c (cp_generize_r): Don't skip thunks. | |
2616 | ||
ebed7175 DM |
2617 | 2017-01-20 David Malcolm <dmalcolm@redhat.com> |
2618 | ||
2619 | PR c++/77829 | |
2620 | PR c++/78656 | |
2621 | * cp-tree.h (suggest_alternatives_for): Add bool param. | |
2622 | (suggest_alternative_in_explicit_scope): New decl. | |
2623 | * error.c (qualified_name_lookup_error): When SCOPE is a namespace | |
2624 | that isn't the global one, call new function | |
2625 | suggest_alternative_in_explicit_scope, only calling | |
2626 | suggest_alternatives_for if it fails, and disabling near match | |
2627 | searches fort that case. When SCOPE is the global namespace, | |
2628 | pass true for new param to suggest_alternatives_for to allow for | |
2629 | fuzzy name lookups. | |
2630 | * lex.c (unqualified_name_lookup_error): Pass true for new param | |
2631 | to suggest_alternatives_for. | |
2632 | * name-lookup.c (consider_binding_level): Add forward decl. | |
2633 | (suggest_alternatives_for): Add "suggest_misspellings" param, | |
2634 | using it to conditionalize the fuzzy name-lookup code. | |
2635 | (suggest_alternative_in_explicit_scope): New function. | |
2636 | * parser.c (cp_parser_primary_expression): When calling | |
2637 | finish_id_expression, pass location of id_expression rather | |
2638 | than that of id_expr_token. | |
2639 | (cp_parser_id_expression): Convert local "unqualified_id" from | |
2640 | tree to cp_expr to avoid implicitly dropping location information. | |
2641 | ||
2ebd93e1 MP |
2642 | 2017-01-20 Marek Polacek <polacek@redhat.com> |
2643 | ||
2644 | PR c/64279 | |
2645 | * call.c (build_conditional_expr_1): Warn about duplicated branches. | |
2646 | * semantics.c (finish_expr_stmt): Build statement using the proper | |
2647 | location. | |
2648 | ||
0655c6d5 JM |
2649 | 2017-01-19 Jason Merrill <jason@redhat.com> |
2650 | ||
b2c06d05 JM |
2651 | US 20 - forwarding references and class template argument deduction |
2652 | * cp-tree.h (TEMPLATE_TYPE_PARM_FOR_CLASS): New. | |
2653 | * pt.c (push_template_decl_real): Set it. | |
2654 | (maybe_adjust_types_for_deduction): Check it. | |
2655 | (rewrite_template_parm): Copy it. | |
2656 | ||
689f867c JM |
2657 | US 19 - deduction guides and constructors |
2658 | * call.c (joust): Prefer deduction guides to constructors. | |
2659 | * pt.c (build_deduction_guide): Set DECL_ARTIFICIAL. | |
2660 | (deduction_guide_p): Check DECL_P. | |
2661 | ||
a0889599 JM |
2662 | * decl.c (check_initializer): Always use build_aggr_init for array |
2663 | decomposition. | |
2664 | ||
0655c6d5 JM |
2665 | PR c++/79130 - decomposition and direct-initialization |
2666 | * init.c (build_aggr_init): Communicate direct-initialization to | |
2667 | build_vec_init. | |
2668 | (build_vec_init): Check for array copy sooner. | |
2669 | * parser.c (cp_parser_decomposition_declaration): Remove call to | |
2670 | build_x_compound_expr_from_list. | |
2671 | ||
8b1346a8 JM |
2672 | 2017-01-18 Jason Merrill <jason@redhat.com> |
2673 | ||
2674 | PR c++/68666 - member variable template-id | |
2675 | * typeck.c (finish_class_member_access_expr): Handle variable | |
2676 | template-id. | |
2677 | * pt.c (lookup_and_finish_template_variable): No longer static. | |
2678 | * cp-tree.h: Declare it. | |
2679 | ||
c484627c NS |
2680 | 2017-01-18 Nathan Sidwell <nathan@acm.org> |
2681 | ||
2682 | PR c++/78488 | |
2683 | * call.c (build_over_call): When checking ellipsis conversions for | |
2684 | an inherited ctor, make sure there is at least one conversion. | |
2685 | ||
46c4e8a1 | 2686 | 2017-01-18 Jason Merrill <jason@redhat.com> |
e3aeb9d3 JM |
2687 | |
2688 | PR c++/78894 - ICE with class deduction and default arg | |
2689 | * pt.c (build_deduction_guide): Set DECL_PRIMARY_TEMPLATE. | |
2690 | ||
0c6299bb MT |
2691 | 2017-01-18 Markus Trippelsdorf <markus@trippelsdorf.de> |
2692 | ||
2693 | PR c++/77489 | |
2694 | * mangle.c (write_discriminator): Reorganize abi warning check. | |
2695 | ||
2c65d990 NS |
2696 | 2017-01-18 Nathan Sidwell <nathan@acm.org> |
2697 | ||
96176bb3 NS |
2698 | * cp-tree.h: Clarify exception spec node comment. |
2699 | * except.c (nothrow_spec_p): Simplify by checking node-equality. | |
2700 | ||
2c65d990 NS |
2701 | PR c++/79091 |
2702 | * mangle.c (write_exception_spec): Check nothrow explicitly. | |
2703 | (write_encoding): Don't increment processing_template_decl around | |
2704 | encoding. | |
2705 | ||
4bbc35f3 MT |
2706 | 2017-01-18 Markus Trippelsdorf <markus@trippelsdorf.de> |
2707 | ||
2708 | PR c++/70182 | |
2709 | * mangle.c (write_template_args): Add "on" for operator names. | |
2710 | ||
f6efea51 MT |
2711 | 2017-01-18 Markus Trippelsdorf <markus@trippelsdorf.de> |
2712 | ||
2713 | PR c++/77489 | |
2714 | * mangle.c (write_discriminator): Handle discriminator >= 10. | |
2715 | ||
8ddfdbc2 NS |
2716 | 2017-01-17 Nathan Sidwell <nathan@acm.org> |
2717 | ||
2718 | PR c++/61636 | |
2719 | * cp-tree.h (maybe_generic_this_capture): Declare. | |
2720 | * lambda.c (resolvable_dummy_lambda): New, broken out of ... | |
2721 | (maybe_resolve_dummy): ... here. Call it. | |
2722 | (maybe_generic_this_capture): New. | |
2723 | * parser.c (cp_parser_postfix_expression): Speculatively capture | |
2724 | this in generic lambda in unresolved member function call. | |
2725 | * pt.c (tsubst_copy_and_build): Force hard error from failed | |
2726 | member function lookup in generic lambda. | |
2727 | ||
893ffa2c AH |
2728 | 2017-01-17 Aldy Hernandez <aldyh@redhat.com> |
2729 | ||
2730 | PR c++/70565 | |
2731 | * cp-array-notation.c (expand_array_notation_exprs): Handle | |
2732 | OMP_PARALLEL. | |
2733 | ||
91d01bf4 JM |
2734 | 2017-01-11 Jason Merrill <jason@redhat.com> |
2735 | ||
2736 | PR c++/78337 - ICE on invalid with generic lambda | |
2737 | * semantics.c (process_outer_var_ref): Check if containing_function | |
2738 | is null. Move inform call under complain test. | |
2739 | ||
01bfd257 NS |
2740 | 2017-01-11 Nathan Sidwell <nathan@acm.org> |
2741 | ||
2742 | PR c++/77812 | |
2743 | * name-lookup.c (set_namespace_binding_1): An overload of 1 decl | |
2744 | is a new overload. | |
2745 | ||
5b33cc83 NS |
2746 | 2017-01-11 Nathan Sidwell <nathan@acm.org> |
2747 | ||
2748 | * name-lookup.c (push_overloaded_decl_1): Refactor OVERLOAD creation. | |
2749 | ||
6b5b4e9c JJ |
2750 | 2017-01-11 Jakub Jelinek <jakub@redhat.com> |
2751 | ||
1f258a55 JJ |
2752 | PR c++/78341 |
2753 | * parser.c (cp_parser_std_attribute_spec): Remove over-eager | |
2754 | assertion. Formatting fix. | |
2755 | ||
6b5b4e9c JJ |
2756 | PR c++/72813 |
2757 | * decl2.c (c_parse_final_cleanups): Set flag_syntax_only to 1 after | |
2758 | writing PCH file. | |
2759 | ||
b9f4757f DM |
2760 | 2017-01-10 David Malcolm <dmalcolm@redhat.com> |
2761 | ||
2762 | PR c++/77949 | |
2763 | * parser.c (cp_parser_class_specifier_1): Only suggest inserting | |
2764 | a missing semicolon if we have a valid insertion location for | |
2765 | the fix-it hint. | |
2766 | ||
2af5cb50 JM |
2767 | 2017-01-10 Jason Merrill <jason@redhat.com> |
2768 | ||
2769 | FI 20, decomposition declaration with parenthesized initializer. | |
2770 | * parser.c (cp_parser_decomposition_declaration): Use | |
2771 | cp_parser_initializer. | |
2772 | ||
f4da28a0 JM |
2773 | 2017-01-09 Jason Merrill <jason@redhat.com> |
2774 | ||
2775 | Implement P0195R2, C++17 variadic using. | |
2776 | * parser.c (cp_parser_using_declaration): Handle ellipsis and comma. | |
2777 | * pt.c (tsubst_decl): Handle pack expansion in USING_DECL_SCOPE. | |
2778 | * error.c (dump_decl): Likewise. | |
2779 | ||
bd2c6270 JJ |
2780 | 2017-01-09 Jakub Jelinek <jakub@redhat.com> |
2781 | ||
2782 | PR translation/79019 | |
2783 | PR translation/79020 | |
2784 | * semantics.c (finish_omp_clauses): Add missing whitespace to | |
2785 | translatable strings. | |
2786 | * cp-cilkplus.c (cpp_validate_cilk_plus_loop_aux): Fix comment typo. | |
2787 | ||
38285dd7 JM |
2788 | 2017-01-07 Jason Merrill <jason@redhat.com> |
2789 | ||
2790 | PR c++/78948 - instantiation from discarded statement | |
2791 | * parser.h (struct cp_parser): Remove in_discarded_stmt field. | |
2792 | * cp-tree.h (in_discarded_stmt): Declare it. | |
2793 | (struct saved_scope): Add discarded_stmt bitfield. | |
2794 | (in_discarded_stmt): New macro. | |
2795 | * decl2.c (mark_used): Check it. | |
2796 | * parser.c (cp_parser_selection_statement): Adjust. | |
2797 | (cp_parser_jump_statement): Adjust. | |
2798 | ||
962c5679 JJ |
2799 | 2017-01-05 Jakub Jelinek <jakub@redhat.com> |
2800 | ||
26f20371 JJ |
2801 | PR c++/78931 |
2802 | * decl.c (cp_finish_decomp): Remove probe variable, if tt is | |
2803 | REFERENCE_REF_P, set tt to its operand. | |
2804 | ||
962c5679 JJ |
2805 | PR c++/78890 |
2806 | * class.c (check_field_decls): Diagnose REFERENCE_TYPE fields in | |
2807 | unions even for C++11 and later. | |
2808 | ||
dc7650cc NS |
2809 | 2017-01-05 Nathan Sidwell <nathan@acm.org> |
2810 | ||
2811 | PR c++/78765 | |
2812 | * pt.c (convert_nontype_argument): Don't try and see if integral | |
2813 | or enum expressions are constants prematurely. | |
2814 | ||
a9342885 MP |
2815 | 2017-01-04 Marek Polacek <polacek@redhat.com> |
2816 | ||
2817 | PR c++/64767 | |
2818 | * typeck.c (cp_build_binary_op): Warn when a pointer is compared with | |
2819 | a zero character literal. | |
2820 | ||
066435fe JJ |
2821 | 2017-01-04 Jakub Jelinek <jakub@redhat.com> |
2822 | ||
abec4284 JJ |
2823 | PR c++/78949 |
2824 | * typeck.c (cp_build_unary_op): Call mark_rvalue_use on arg if it has | |
2825 | vector type. | |
2826 | ||
26c43e27 JJ |
2827 | PR c++/78693 |
2828 | * parser.c (cp_parser_simple_declaration): Only complain about | |
2829 | inconsistent auto deduction if auto_result doesn't use auto. | |
2830 | ||
c9cf3863 JJ |
2831 | * parser.c (cp_parser_simple_declaration): Diagnose function |
2832 | declaration among more than one init-declarators with auto | |
2833 | specifier. | |
2834 | ||
066435fe JJ |
2835 | PR c++/71182 |
2836 | * parser.c (cp_lexer_previous_token): Use vec_safe_address in the | |
2837 | assertion, as lexer->buffer may be NULL. | |
2838 | ||
baf9ebc8 MP |
2839 | 2017-01-04 Marek Polacek <polacek@redhat.com> |
2840 | ||
2841 | PR c++/77545 | |
2842 | PR c++/77284 | |
2843 | * constexpr.c (potential_constant_expression_1): Handle CLEANUP_STMT. | |
2844 | ||
4bf07f3f NS |
2845 | 2017-01-04 Nathan Sidwell <nathan@acm.org> |
2846 | ||
2847 | PR c++/66735 | |
2848 | * cp-tree.h (DECLTYPE_FOR_REF_CAPTURE): New. | |
2849 | (lambda_capture_field_type): Update prototype. | |
2850 | * lambda.c (lambda_capture_field_type): Add is_reference parm. | |
2851 | Add referenceness here. | |
2852 | (add_capture): Adjust lambda_capture_field_type call, refactor | |
2853 | error checking. | |
2854 | * pt.c (tsubst): Adjust lambda_capture_field_type call. | |
2855 | ||
cbe34bb5 | 2856 | 2017-01-01 Jakub Jelinek <jakub@redhat.com> |
5624e564 JJ |
2857 | |
2858 | Update copyright years. | |
ad41bd84 | 2859 | \f |
cbe34bb5 | 2860 | Copyright (C) 2017 Free Software Foundation, Inc. |
ad41bd84 JM |
2861 | |
2862 | Copying and distribution of this file, with or without modification, | |
2863 | are permitted in any medium without royalty provided the copyright | |
2864 | notice and this notice are preserved. |